:root {
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #142f44;
    background: #f3f6f8;
    font-synthesis: none;
    --teal: #087e8b;
    --border: #e2e9ee;
    --muted: #718292;
    --amber: #c78213;
}
* {
    box-sizing: border-box;
}
body {
    margin: 0;
}
button,
input,
select {
    font: inherit;
}
button,
a,
input,
select {
    outline-offset: 4px;
}
button {
    cursor: pointer;
}
button:disabled {
    opacity: 0.5;
    cursor: wait;
}
button {
    transition: background 0.15s;
}
a {
    color: inherit;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
canvas:focus-visible {
    outline: 3px solid #3eb5cb;
}
button:hover {
    filter: brightness(0.96);
}
.shell {
    display: flex;
    min-height: 100vh;
}
.sidebar {
    width: 196px;
    flex-shrink: 0;
    background: linear-gradient(165deg, #132f44, #0d2335);
    color: #c3d3df;
    display: flex;
    flex-direction: column;
    padding: 30px 0 20px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    padding: 0 23px;
    color: white;
    font-size: 25px;
    font-weight: 650;
    letter-spacing: -1px;
}
.brand svg {
    width: 38px;
    flex-shrink: 0;
}
.brand small {
    display: block;
    color: #87a4b8;
    font-size: 9px;
    letter-spacing: 3.7px;
    font-weight: 500;
    margin-top: 5px;
}
.nav-label {
    font-size: 9px;
    letter-spacing: 1.7px;
    color: #6b8b9f;
    margin: 48px 25px 15px;
}
.nav-item {
    display: flex;
    gap: 14px;
    padding: 17px 25px;
    text-decoration: none;
    font-size: 13px;
}
.nav-item span {
    font-size: 22px;
    line-height: 16px;
}
.nav-item.active {
    background: #124457;
    color: #fff;
    border-left: 3px solid #42bbd0;
    padding-left: 22px;
}
/* Keep the navigation reachable as icons when the desktop rail is collapsed. */
.sidebar-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 0;
    background: transparent;
    color: #c3d3df;
    padding: 12px 25px;
    margin-top: 24px;
    text-align: left;
    font-size: 12px;
}
.sidebar-toggle:hover {
    background: #124457;
}
.sidebar-toggle > span:first-child {
    font-size: 22px;
    line-height: 16px;
}
.sidebar.sidebar-collapsed {
    width: 68px;
}
.sidebar-collapsed .brand {
    padding: 0 17px;
}
.sidebar-collapsed .brand > span,
.sidebar-collapsed .sidebar-toggle-text,
.sidebar-collapsed .nav-label,
.sidebar-collapsed .sidebar-note,
.sidebar-collapsed .sidebar-bottom {
    display: none;
}
.sidebar-collapsed .sidebar-toggle {
    justify-content: center;
    padding: 12px 0;
}
.sidebar-collapsed .nav-item {
    font-size: 0;
    padding: 19px;
}
.sidebar-collapsed .nav-item.active {
    padding-left: 16px;
}
.sidebar-collapsed .nav-item span {
    font-size: 25px;
}
.sidebar-note {
    margin: 38px 23px;
    padding-top: 20px;
    border-top: 1px solid #284154;
    line-height: 1.6;
}
.sidebar-note p {
    font-size: 14px;
    color: #dce8ef;
    margin: 12px 0 6px;
}
.sidebar-note > span:last-child {
    font-size: 11px;
    color: #7895a9;
}
.mini-label {
    font-size: 9px;
    font-weight: 650;
    letter-spacing: 1.1px;
    color: var(--muted);
}
.sidebar-bottom {
    margin-top: auto;
    padding: 20px 22px 0;
    font-size: 11px;
    color: #9db2c1;
}
.connection-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #57b7bd;
    margin-right: 8px;
}
.about-button {
    border: 0;
    border-top: 1px solid #294154;
    background: none;
    color: #acc0ce;
    display: flex;
    justify-content: space-between;
    width: 100%;
    padding: 22px 0 0;
    margin-top: 20px;
    font-size: 11px;
}
main {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    min-height: 690px;
}
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px 20px;
    background: #fff;
    gap: 20px;
}
.eyebrow {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1.9px;
    color: #8295a3;
    margin-bottom: 7px;
}
h1 {
    font-size: 29px;
    letter-spacing: -1px;
    margin: 0;
    font-weight: 680;
}
.page-header p {
    font-size: 12px;
    color: var(--muted);
    margin: 8px 0 0;
}
.header-status {
    display: flex;
    align-items: center;
    gap: 15px;
    white-space: nowrap;
}
.header-status > span:last-child {
    font-size: 11px;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border-radius: 20px;
    padding: 7px 10px;
    background: #eaf3f4;
    color: #0c7680;
    font-size: 10px;
    font-weight: 650;
    white-space: nowrap;
}
.badge.demo {
    color: #94701f;
    background: #fff5d9;
}
.badge.stale {
    color: #a26a13;
    background: #fff3de;
}
.badge.unknown {
    color: #6a7384;
    background: #edf0f4;
}
.notice {
    background: #fff9eb;
    color: #886726;
    border-top: 1px solid #f5edd7;
    border-bottom: 1px solid #f5edd7;
    padding: 10px 30px;
    font-size: 11px;
    line-height: 1.5;
}
.notice.error {
    color: #a13d39;
    background: #fff0ee;
    border-color: #f4d6d1;
}
.notice.live {
    color: #547681;
    background: #edf7f8;
    border-color: #dbeef0;
}
.toolbar {
    display: flex;
    gap: 16px;
    align-items: center;
    background: #fff;
    padding: 17px 30px;
    border-bottom: 1px solid var(--border);
}
.filter-label {
    display: block;
    font-size: 8px;
    color: #7f91a0;
    font-weight: 700;
    letter-spacing: 1.1px;
    margin-bottom: 6px;
}
.area-control {
    border-right: 1px solid var(--border);
    padding-right: 24px;
    min-width: 106px;
}
.area-control strong {
    font-size: 13px;
}
.toolbar select {
    border: 0;
    background: transparent;
    color: #263f51;
    font-size: 12px;
    padding: 0 22px 0 0;
    max-width: 190px;
    width: 100%;
}
.route-control {
    min-width: 125px;
    max-width: 195px;
}
.search-control {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 10px 12px;
    color: #8095a5;
    min-width: 150px;
}
.search-control span {
    font-size: 22px;
    line-height: 14px;
}
.search-control input {
    width: 100%;
    border: 0;
    outline: 0;
    font-size: 11px;
    min-width: 0;
    background: transparent;
    color: #173649;
}
.search-control:focus-within {
    outline: 2px solid #3eb5cb;
}
.status-control {
    min-width: 112px;
}
.icon-button {
    background: #fff;
    border: 1px solid var(--border);
    width: 35px;
    height: 35px;
    border-radius: 6px;
    font-size: 21px;
    color: #48677c;
}
.summary {
    padding: 13px 30px;
    display: flex;
    gap: 23px;
    align-items: center;
    font-size: 11px;
    border-bottom: 1px solid var(--border);
    background: #fbfcfd;
}
.summary > div {
    display: flex;
    align-items: center;
    gap: 7px;
}
.summary strong {
    font-size: 15px;
    font-weight: 680;
}
.summary > div > span:last-child {
    color: var(--muted);
}
.metric-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
}
.teal {
    background: #15979b;
}
.amber {
    background: #d39930;
}
.slate {
    background: #8191aa;
}
.summary-right {
    margin-left: auto;
    color: #8a98a5;
    font-size: 10px;
}
.workspace {
    display: flex;
    flex: 1;
    min-height: 350px;
    overflow: hidden;
}
.vehicle-panel {
    background: white;
    width: 225px;
    flex-shrink: 0;
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    min-height: 0;
}
.panel-heading {
    padding: 20px 20px 15px;
    border-bottom: 1px solid var(--border);
}
h2 {
    font-size: 14px;
    margin: 0 0 8px;
    font-weight: 650;
}
.panel-heading h2 {
    display: flex;
    justify-content: space-between;
}
.panel-heading h2 span {
    background: #edf3f5;
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 10px;
    color: #758c9a;
}
.vehicle-list {
    flex: 1;
    overflow-y: auto;
}
.vehicle-row {
    width: 100%;
    display: flex;
    align-items: flex-start;
    gap: 11px;
    padding: 19px 18px;
    border: 0;
    border-bottom: 1px solid #edf1f4;
    background: #fff;
    text-align: left;
    color: #18374c;
    border-left: 3px solid transparent;
}
.vehicle-row.selected {
    background: #eaf6f8;
    border-left-color: #1da2b5;
}
.bus-icon {
    background: #f0f5f7;
    color: #4c758b;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 34px;
    border-radius: 7px;
    flex-shrink: 0;
}
.bus-icon svg {
    width: 18px;
    height: 22px;
}
.vehicle-row.selected .bus-icon {
    color: #0b8795;
    background: #d8f0f3;
}
.vehicle-row strong {
    display: block;
    font-size: 12px;
    margin: 1px 0 5px;
}
.vehicle-row .route-text {
    display: block;
    font-size: 10px;
    color: #768c9b;
    max-width: 143px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.vehicle-freshness {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    margin-top: 9px;
    color: #19878c;
}
.vehicle-freshness.stale {
    color: #b07b25;
}
.vehicle-freshness.unknown {
    color: #7c8994;
}
.vehicle-freshness:before {
    content: '';
    width: 5px;
    height: 5px;
    background: currentColor;
    border-radius: 50%;
}
.list-footer {
    padding: 14px 19px;
    border-top: 1px solid var(--border);
    font-size: 9px;
    color: #97a5b0;
}
.map-panel {
    flex: 1;
    position: relative;
    min-width: 180px;
    background: #e9efed;
    overflow: hidden;
}
#map,
#tiles,
#map-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}
#tiles img {
    position: absolute;
    width: 256px;
    height: 256px;
    max-width: none;
}
#map-canvas {
    touch-action: none;
    cursor: grab;
}
#map-canvas:active {
    cursor: grabbing;
}
.map-top {
    position: absolute;
    top: 16px;
    left: 16px;
    right: 16px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    pointer-events: none;
}
.map-tag,
.map-button {
    background: #fffffff2;
    padding: 9px 11px;
    border: 1px solid #dce5e8;
    border-radius: 6px;
    font-size: 10px;
    color: #345368;
    box-shadow: 0 2px 7px #1b374412;
}
.map-tag {
    max-width: 65%;
    line-height: 1.5;
}
.map-button {
    pointer-events: auto;
    white-space: nowrap;
}
.map-controls {
    position: absolute;
    right: 16px;
    top: 70px;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #dce5e8;
    border-radius: 6px;
    box-shadow: 0 2px 7px #1b374415;
}
.map-controls button {
    width: 33px;
    height: 33px;
    background: none;
    border: 0;
    color: #345368;
    font-size: 20px;
}
.map-controls button + button {
    border-top: 1px solid var(--border);
}
.map-layers {
    position: absolute;
    bottom: 73px;
    left: 16px;
    background: #fffffff2;
    border: 1px solid #dce5e8;
    border-radius: 6px;
    padding: 9px 10px;
    display: flex;
    gap: 11px;
    font-size: 10px;
    color: #4c6778;
}
.map-layers label {
    display: flex;
    gap: 5px;
    align-items: center;
}
.map-layers input {
    accent-color: #11899a;
    margin: 0;
    width: 12px;
    height: 12px;
}
.map-legend {
    position: absolute;
    bottom: 30px;
    left: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 13px;
    background: #fffffff2;
    border: 1px solid #dce5e8;
    border-radius: 6px;
    padding: 11px;
    font-size: 9px;
    color: #557081;
}
.map-legend span {
    display: flex;
    gap: 5px;
    align-items: center;
}
.route-swatch {
    height: 3px;
    width: 17px;
    background: #0c8d97;
    border-radius: 3px;
}
.vehicle-swatch,
.stale-swatch {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #0c8d97;
}
.stale-swatch {
    background: #fff;
    border: 2px solid #d39730;
}
.attribution {
    position: absolute;
    bottom: 0;
    right: 0;
    padding: 3px 6px;
    background: #ffffffd9;
    font-size: 9px;
    color: #4e6d7b;
    text-decoration: none;
}
.tile-warning {
    position: absolute;
    bottom: 116px;
    left: 16px;
    right: 16px;
    font-size: 10px;
    background: #fff5de;
    padding: 8px;
    border-radius: 5px;
    color: #90621b;
}
.details-panel {
    width: 268px;
    flex-shrink: 0;
    overflow-y: auto;
    background: #fff;
    border-left: 1px solid var(--border);
    padding: 22px;
}
.details-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 9px;
    gap: 7px;
}
.details-top h2 {
    font-size: 21px;
    margin: 0;
    letter-spacing: -0.5px;
}
.details-subtitle {
    font-size: 11px;
    color: #6f8798;
    line-height: 1.6;
    margin: 0;
}
.route-chip {
    display: inline-block;
    background: #eaf4f5;
    color: #147786;
    padding: 4px 7px;
    border-radius: 4px;
    font-weight: 650;
    margin-right: 6px;
    font-size: 11px;
}
.detail-divider {
    border: 0;
    border-top: 1px solid var(--border);
    margin: 20px 0;
}
.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    font-size: 11px;
    gap: 15px 8px;
    margin: 0;
}
.detail-grid dt {
    color: #81929f;
}
.detail-grid dd {
    margin: 0;
    color: #294b61;
    overflow-wrap: anywhere;
    font-variant-numeric: tabular-nums;
}
.detail-card {
    margin: 20px 0 15px;
    padding: 13px;
    background: #f0f8f8;
    border: 1px solid #dceeee;
    border-radius: 7px;
    font-size: 10px;
    line-height: 1.65;
    color: #58808a;
}
.detail-card strong {
    display: block;
    color: #1b7b83;
    font-size: 11px;
    margin-bottom: 4px;
}
.detail-card.warning {
    background: #fff9ec;
    border-color: #f1e2bd;
    color: #9a7c40;
}
.detail-card.warning strong {
    color: #a77b26;
}
.primary-button {
    border: 1px solid #0a7d8b;
    background: #0a7d8b;
    color: #fff;
    padding: 11px;
    border-radius: 6px;
    font-size: 11px;
    width: 100%;
    font-weight: 600;
}
.primary-button.following {
    background: #eaf6f7;
    color: #0a7d8b;
}
.secondary-button {
    background: white;
    border: 1px solid var(--border);
    color: #476879;
    padding: 10px;
    border-radius: 6px;
    width: 100%;
    margin-top: 8px;
    font-size: 11px;
}
.detail-footnote {
    font-size: 9px;
    color: #94a2ad;
    line-height: 1.65;
    margin-top: 18px;
}
.details-empty {
    text-align: center;
    padding-top: 70px;
}
.empty-icon {
    font-size: 35px;
    color: #78a5b3;
}
.details-empty h2 {
    margin-top: 18px;
    font-size: 16px;
}
.details-empty p {
    font-size: 11px;
    color: #8a9aa6;
    line-height: 1.8;
}
.empty-state {
    padding: 30px 20px;
    color: #879aa7;
    font-size: 12px;
    line-height: 1.8;
}
.statusbar {
    display: flex;
    justify-content: space-between;
    padding: 12px 25px;
    font-size: 9px;
    color: #8296a3;
    background: #fff;
    border-top: 1px solid var(--border);
    gap: 15px;
}
dialog {
    border: 1px solid #d8e4ea;
    border-radius: 12px;
    padding: 32px;
    max-width: 520px;
    color: #294758;
    box-shadow: 0 25px 90px #102c4150;
}
dialog::backdrop {
    background: #10263899;
}
dialog h2 {
    font-size: 23px;
    margin: 15px 0;
}
dialog p {
    font-size: 13px;
    line-height: 1.8;
}
.dialog-close {
    float: right;
    border: 0;
}
@media (min-width: 1550px) {
    .sidebar {
        width: 215px;
    }
    .vehicle-panel {
        width: 248px;
    }
    .details-panel {
        width: 295px;
    }
    .page-header {
        padding-top: 30px;
        padding-bottom: 26px;
    }
    .toolbar {
        padding-top: 20px;
        padding-bottom: 20px;
    }
    .vehicle-row {
        padding-top: 23px;
        padding-bottom: 23px;
    }
}
@media (max-width: 1180px) {
    .sidebar {
        width: 155px;
    }
    .brand {
        font-size: 20px;
        padding: 0 16px;
        gap: 7px;
    }
    .brand svg {
        width: 30px;
    }
    .brand small {
        font-size: 8px;
        letter-spacing: 2.4px;
    }
    .sidebar-toggle {
        padding-left: 18px;
    }
    .sidebar-note {
        margin: 30px 18px;
    }
    .nav-label {
        margin-left: 18px;
    }
    .nav-item {
        padding-left: 18px;
    }
    .nav-item.active {
        padding-left: 15px;
    }
    .vehicle-panel {
        width: 182px;
    }
    .details-panel {
        width: 233px;
        padding: 17px;
    }
    .vehicle-row {
        padding: 16px 11px;
        gap: 8px;
    }
    .vehicle-row .route-text {
        max-width: 112px;
    }
    .toolbar {
        gap: 10px;
        padding: 15px 20px;
    }
    .page-header {
        padding-left: 20px;
        padding-right: 20px;
    }
    .summary {
        padding-left: 20px;
        padding-right: 20px;
    }
    .area-control {
        padding-right: 12px;
        min-width: 80px;
    }
    .summary-right {
        display: none;
    }
    .header-status {
        flex-direction: column;
        gap: 8px;
        align-items: flex-end;
    }
    .map-button span {
        display: none;
    }
}
@media (max-width: 900px) {
    .sidebar {
        width: 68px;
        padding-top: 22px;
    }
    .brand {
        padding: 0 17px;
    }
    .brand > span,
    .nav-label,
    .sidebar-note,
    .sidebar-bottom,
    .sidebar-toggle-text {
        display: none;
    }
    .sidebar-toggle {
        justify-content: center;
        padding: 12px 0;
    }
    .nav-item {
        font-size: 0;
        margin-top: 32px;
        padding: 19px;
    }
    .nav-item.active {
        padding-left: 19px;
    }
    .nav-item span {
        font-size: 25px;
    }
    .vehicle-panel {
        width: 178px;
    }
    .details-panel {
        width: 215px;
        padding: 15px;
    }
    .search-control {
        min-width: 120px;
    }
    .toolbar {
        flex-wrap: wrap;
    }
    .route-control {
        min-width: 110px;
    }
    .status-control {
        min-width: 100px;
    }
    .page-header h1 {
        font-size: 26px;
    }
    .page-header p {
        font-size: 11px;
    }
    .summary {
        gap: 15px;
    }
}
@media (max-width: 680px) {
    body {
        background: #fff;
    }
    .shell {
        display: block;
    }
    .sidebar {
        position: sticky;
        top: 0;
        z-index: 20;
        width: 100%;
        height: 56px;
        padding: 10px 14px;
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 6px;
        box-shadow: 0 2px 8px #102c4118;
    }
    .brand {
        padding: 0;
        margin-right: auto;
        font-size: 19px;
    }
    .brand svg {
        width: 29px;
    }
    .brand > span {
        display: block;
    }
    .sidebar .sidebar-toggle {
        margin: 0;
        padding: 8px;
        order: 2;
    }
    .brand small,
    .nav-label,
    .sidebar-note,
    .sidebar-bottom,
    .sidebar .nav-item:not(.active) {
        display: none;
    }
    .sidebar .nav-item.active {
        margin: 0 !important;
        padding: 8px 10px !important;
        border: 0 !important;
        border-radius: 7px;
        font-size: 11px;
        gap: 6px;
    }
    .sidebar.sidebar-collapsed {
        width: 100%;
    }
    .sidebar.sidebar-collapsed .brand > span {
        display: block;
    }
    .sidebar.sidebar-mobile-open {
        height: auto;
        flex-wrap: wrap;
    }
    .sidebar.sidebar-mobile-open .nav-item {
        display: flex;
        order: 3;
        flex: 1 1 100%;
        margin: 0;
        padding: 10px 12px;
        font-size: 13px;
        gap: 12px;
    }
    .sidebar.sidebar-mobile-open .nav-item span {
        font-size: 18px;
    }
    .sidebar .nav-item.active span {
        font-size: 15px;
    }
    main {
        height: auto;
        min-height: calc(100dvh - 56px);
    }
    .page-header {
        padding: 17px 16px 14px;
        align-items: flex-start;
        gap: 10px;
    }
    .page-header h1 {
        font-size: 24px;
    }
    .page-header p,
    .header-status > span:last-child {
        display: none;
    }
    .eyebrow {
        margin-bottom: 5px;
    }
    .badge {
        padding: 6px 9px;
        font-size: 9px;
    }
    .notice {
        padding: 9px 16px;
    }
    .toolbar {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 38px;
        padding: 12px 16px;
        gap: 10px;
    }
    .search-control {
        grid-column: 1 / -1;
        grid-row: 1;
        min-width: 0;
        padding: 11px 12px;
    }
    .search-control input {
        font-size: 16px;
    }
    .area-control {
        display: none;
    }
    .route-control,
    .status-control {
        min-width: 0;
        max-width: none;
        padding: 8px 10px;
        border: 1px solid var(--border);
        border-radius: 7px;
    }
    .route-control {
        grid-column: 1;
    }
    .status-control {
        grid-column: 2;
    }
    .toolbar select {
        max-width: none;
        padding-right: 8px;
        font-size: 12px;
    }
    .icon-button {
        grid-column: 3;
        align-self: stretch;
        width: 38px;
        height: auto;
        min-height: 48px;
    }
    .summary {
        padding: 11px 16px;
        gap: 0;
        justify-content: space-between;
        overflow-x: auto;
    }
    .summary > div {
        gap: 5px;
        white-space: nowrap;
    }
    .summary strong {
        font-size: 14px;
    }
    .summary > div > span:last-child {
        font-size: 9px;
    }
    .summary-right {
        display: none;
    }
    .workspace {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas: 'map' 'vehicles' 'details';
        min-height: 0;
        overflow: visible;
    }
    .map-panel {
        grid-area: map;
        width: 100%;
        height: min(58vh, 430px);
        min-height: 330px;
        border-bottom: 1px solid var(--border);
    }
    .vehicle-panel {
        grid-area: vehicles;
        width: 100%;
        max-height: none;
        border-right: 0;
        border-bottom: 1px solid var(--border);
    }
    .panel-heading {
        padding: 16px;
    }
    .vehicle-list {
        display: flex;
        gap: 10px;
        padding: 0 16px 14px;
        overflow-x: auto;
        overscroll-behavior-inline: contain;
        scroll-snap-type: inline proximity;
    }
    .vehicle-list .empty-state {
        width: 100%;
    }
    .vehicle-row {
        flex: 0 0 min(78vw, 300px);
        min-height: 96px;
        padding: 14px;
        border: 1px solid var(--border);
        border-radius: 10px;
        scroll-snap-align: start;
    }
    .vehicle-row.active {
        border-left: 3px solid #21a4b7;
    }
    .vehicle-row .route-text {
        max-width: none;
    }
    .vehicle-row strong {
        font-size: 13px;
    }
    .bus-icon {
        width: 34px;
    }
    .list-footer {
        display: none;
    }
    .details-panel {
        grid-area: details;
        width: 100%;
        border: 0;
        padding: 20px 16px calc(24px + env(safe-area-inset-bottom));
    }
    .details-empty {
        padding: 20px 10px;
    }
    .map-top {
        top: 10px;
        left: 10px;
        right: 10px;
    }
    .map-tag {
        max-width: calc(100% - 52px);
        padding: 8px 10px;
        font-size: 10px;
    }
    .map-controls {
        top: 62px;
        right: 10px;
    }
    .map-controls button,
    .map-button {
        min-width: 44px;
        min-height: 44px;
    }
    .map-button span {
        display: none;
    }
    .map-layers {
        left: 10px;
        bottom: 47px;
        padding: 8px 10px;
        font-size: 10px;
    }
    .map-legend {
        left: 10px;
        bottom: 9px;
        gap: 9px;
        padding: 7px 9px;
        font-size: 8px;
    }
    .attribution {
        font-size: 8px;
    }
    .statusbar {
        padding: 11px 16px;
        line-height: 1.5;
    }
    .statusbar > span:last-child {
        display: none;
    }
    .detail-grid {
        grid-template-columns: minmax(100px, 1fr) 2fr;
    }
    .details-panel .primary-button,
    .details-panel .secondary-button {
        width: 100%;
        min-height: 44px;
        margin: 0 0 8px;
    }
    .detail-footnote {
        margin-bottom: 0;
    }
}

#tiles {
    filter: saturate(0.48) brightness(1.04);
}

.login-page { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem; background: #112b3e; }
.login-card { width: min(100%, 28rem); padding: 2.5rem; border-radius: 1rem; background: white; color: #112b3e; }
.login-card h1 { margin-top: 0; }
.login-card [role="alert"] { color: #9b2525; }

/* Recording controls remain usable on narrow device screens. */
.recordings-page h1 { margin: 0 0 16px; }
.recordings-page h2 { font-size: 18px; margin: 24px 0 12px; }
.recordings-page form { padding: 18px; background: white; border: 1px solid var(--border); border-radius: 10px; }
.recordings-page form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.recordings-page form input { padding: 9px 10px; border: 1px solid #b9cbd5; border-radius: 6px; width: 200px; max-width: 100%; }
.recordings-page button { padding: 9px 13px; border: 1px solid #b9cbd5; border-radius: 6px; background: white; color: #142f44; text-align: left; }
.recordings-page form button { background: var(--teal); color: white; border-color: var(--teal); }
.recordings-page ul { list-style: none; padding: 0; display: grid; gap: 8px; }
.recordings-page li button { width: 100%; }
.recordings-page button[aria-pressed="true"] { border-color: var(--teal); background: #e8f5f6; }
.recordings-page [role="alert"] { padding: 12px; background: #fff0df; color: #8c3c00; border-radius: 6px; }
@media (max-width: 650px) { .recordings-page form label, .recordings-page form input { width: 100%; } }
