        /* ── Settings panel ── */
        .settings-section { margin-bottom: 22px; padding: 14px; border: 1px solid rgba(255,255,255,.07); border-radius: 14px; background: rgba(255,255,255,.025); }
        .settings-section-title { font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase; letter-spacing: .8px; color: var(--accent); padding: 0 2px; margin-bottom: 10px; }
        .setting-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 12px; border-radius: 10px; background: rgba(0,0,0,.16); border: 1px solid rgba(255,255,255,.035); margin-bottom: 5px; }
        .setting-label { font-size: var(--fs-sm); line-height: 1.3; flex: 1; color: #fff }
        .setting-label small { color: #aaa; font-size: var(--fs-xs); }
        .toggle-switch { position: relative; width: 44px; height: 24px; flex-shrink: 0; }
        .toggle-switch input { opacity: 0; width: 0; height: 0; }
        .toggle-slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #454c55; border-radius: 24px; transition: .2s; }
        .toggle-slider:before { position: absolute; content: ""; height: 18px; width: 18px; left: 3px; bottom: 3px; background: white; border-radius: 50%; transition: .2s; }
        .toggle-switch input:checked + .toggle-slider { background-color: var(--accent); }
        .toggle-switch input:focus-visible + .toggle-slider { outline: 2px solid var(--accent); outline-offset: 2px; }
        .toggle-switch input:checked + .toggle-slider:before { transform: translateX(20px); }
        .lang-options { display: flex; gap: 8px; width: 100%; }
        .lang-option { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 6px; border-radius: 8px; border: 2px solid var(--line); color: var(--text-secondary); cursor: pointer; font-size: var(--fs-sm); font-weight: 600; transition: all .2s; user-select: none; }
        .lang-option input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
        .lang-option { position: relative; }
        .lang-option:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
        .lang-option.active { border-color: var(--accent); background: var(--accent-soft); color: #fff; }
        .vehicle-custom-marker { cursor: pointer; }
        .vm-wrap { display: inline-flex; position: relative; align-items: center; justify-content: center; }
        .vm-hitbox { position: absolute; inset: 50% auto auto 50%; transform: translate(-50%, -50%); border-radius: 999px; background: transparent; }
        .vm-body { display: flex; align-items: center; height: 22px; box-sizing: border-box; padding: 0 8px; border-radius: 10px; box-shadow: 0 1px 2px rgba(0,0,0,.3), 0 3px 8px rgba(0,0,0,.4); gap: 5px; position: relative; }
        .vm-arrow-wrap { display: flex; align-items: center; justify-content: center; flex-shrink: 0; width: 12px; height: 12px; }
        .vm-arrow-svg { width: 12px; height: 12px; color: rgba(255,255,255,0.92); transition: transform 0.3s ease; filter: drop-shadow(0 1px 1px rgba(0,0,0,.25)); }
        .vm-vehicle-visuals { display: inline-flex; align-items: center; flex-shrink: 0; }
        .vm-icon { width: 18px; height: 18px; background-color: rgba(255,255,255,.9); flex-shrink: 0; }
        .vm-icon-svg { background: transparent !important; }
        .vm-icon-svg svg { width: 100%; height: 100%; display: block; }
        .vm-label { font-family: inherit; font-size: 10px; font-weight: 500; color: white; white-space: nowrap; line-height: 1; }
        /* SVG icons in various contexts */
        .stop-departure-line-badge > svg,
        .fav-stop-departure-badge > svg,
        .brigade-trip-line-badge > svg,
        .route-badge-inline > svg,
        .vehicle-stop-vehicle-icon > svg,
        #route-details-badge-icon > svg,
        #vc-route-icon > svg,
        .route-pill-icon > svg,
        .brigade-route-filter-pill > svg,
        .rbi-icon > svg,
        .btlb-icon > svg,
        .brfp-icon > svg,
        .stop-departure-line-icon > svg,
        .delays-badge-icon > svg,
        .delays-summary-route-icon > svg,
        .search-result-badge-icon > svg,
        .fav-stop-departure-badge-icon > svg,
        .fav-config-route-pill-icon > svg { width: 100%; height: 100%; display: block; }
        .vm-line { font-family: inherit; font-size: var(--fs-md); font-weight: 600; }
        .vm-details { font-family: inherit; font-size: 11px; font-weight: 450; }
        .vm-dot { width: 7px; height: 7px; border-radius: 50%; box-shadow: 0 1px 4px rgba(0,0,0,.5); }
        .vehicle-panel { position: fixed; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; pointer-events: none; z-index: var(--z-panel); }
        .vehicle-panel-card { pointer-events: auto; background: var(--surface-2); border-radius: 20px 20px 0 0; box-shadow: 0 10px 30px rgba(0,0,0,0.75); width: 100%; max-width: 600px; height: min(438px, 70dvh); max-height: calc(100dvh - var(--safe-area-top, 0px) - 8px); box-sizing: border-box; padding: 8px 16px 18px 16px; overflow: hidden; transform: translateY(0); }
        .vehicle-panel:not(.vehicle-panel-hidden) .vehicle-panel-card { animation: vehicle-panel-slide-in 0.28s ease-out both; }
        .vehicle-panel.vehicle-panel-closing .vehicle-panel-card { animation: vehicle-panel-slide-out 0.22s ease-in both; }
        @keyframes vehicle-panel-slide-in { from { transform: translateY(100%); } to { transform: translateY(0); } }
        @keyframes vehicle-panel-slide-out { from { transform: translateY(0); } to { transform: translateY(100%); } }
        .vehicle-panel-hidden { display: none; }
        .drag-handle { display: flex; justify-content: center; align-items: center; padding: 4px 0 8px 0; cursor: ns-resize; touch-action: none; user-select: none; }
        .drag-handle-bar { width: 36px; height: 4px; border-radius: 2px; background: rgba(255,255,255,0.25); transition: background 0.2s; }
        .drag-handle:active .drag-handle-bar{ background: rgba(255,255,255,0.5); }@media (hover: hover) and (pointer: fine) { .drag-handle:hover .drag-handle-bar { background: rgba(255,255,255,0.5); } }
        .vehicle-panel-header { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
        .vehicle-badge { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 10px; background: var(--accent-strong); max-width: 40%; white-space: nowrap; min-width: 0; }
        .vehicle-badge-icon { width: 18px; height: 18px; background-color: rgba(255,255,255,0.9); flex-shrink: 0; }
        #sp-stop-icons { background-color: transparent; display: flex; gap: 3px; }
        .vehicle-badge-line { font-family: inherit; font-weight: 600; font-size: var(--fs-lg); color: #FFFFFF; overflow: hidden; text-overflow: ellipsis; }
        .vehicle-headsign { flex: 1; font-family: inherit; font-weight: 550; font-size: 18px; color: #E7E8E8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; position: relative; }
        .vehicle-headsign .marquee-inner { display: inline-block; white-space: nowrap; will-change: transform; }
        .vehicle-headsign.marquee-active { text-overflow: clip; }
        .vehicle-headsign.marquee-active .marquee-inner { animation: marquee-scroll var(--marquee-duration, 8s) linear infinite; animation-delay: var(--marquee-delay, 1s); }
        @keyframes marquee-scroll {
            0%, 10% { transform: translateX(0); }
            45%, 55% { transform: translateX(var(--marquee-distance, 0px)); }
            90%, 100% { transform: translateX(0); }
        }
        .vehicle-panel-buttons { display: flex; align-items: center; gap: 8px; }
        .vehicle-btn { position: relative; width: 36px; height: 36px; border-radius: 999px; border: none; padding: 0; background: var(--surface-3); display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; }
        .vehicle-btn::after { content: ""; position: absolute; inset: -4px; }
        .vehicle-btn svg { width: 18px; height: 18px; color: var(--text-primary); }
        .vehicle-btn.is-fav svg { fill: currentColor; }
        .vehicle-btn[disabled] svg { opacity: .4; }
        .vehicle-btn[disabled] { opacity: 0.4; cursor: default; }
        /* ── Service Alerts btn ── */
        .vehicle-btn--alerts { order: -1; }
        .vehicle-btn--alerts svg { width: 20px; height: 20px; color: var(--warning); }
        /* ── Service Alerts overlay ── */
        #service-alerts-overlay.overlay-visible {
            position: fixed; inset: 0; z-index: var(--z-overlay); display: flex;
            align-items: center; justify-content: center;
            background: rgba(0,0,0,0.55);
            backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
            animation: saFadeIn 0.18s ease;
        }
        @keyframes saFadeIn { from { opacity: 0; } to { opacity: 1; } }
        #service-alerts-card {
            background: var(--surface-2); border-radius: 16px;
            box-shadow: 0 16px 40px rgba(0,0,0,0.7);
            width: min(480px, calc(100vw - 28px));
            max-height: min(80dvh, 680px);
            display: flex; flex-direction: column;
            overflow: hidden;
            animation: saSlideUp 0.2s ease;
        }
        @keyframes saSlideUp { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }
        #service-alerts-header {
            display: flex; align-items: center; justify-content: space-between;
            padding: 16px 16px 12px 18px; flex-shrink: 0;
            border-bottom: 1px solid rgba(255,255,255,0.08);
        }
        #service-alerts-title {
            font-family: inherit; font-size: var(--fs-xl); font-weight: 700; color: #FFFFFF;
        }
        #service-alerts-close {
            width: 30px; height: 30px; border-radius: 999px; border: none; padding: 0;
            background: var(--surface-3); display: flex; align-items: center; justify-content: center;
            cursor: pointer; flex-shrink: 0; transition: background 0.15s;
        }
        @media (hover: hover) and (pointer: fine) { #service-alerts-close:hover { background: var(--surface-4); } }
        #service-alerts-close svg { width: 16px; height: 16px; color: rgba(255,255,255,0.85); }
        #service-alerts-list {
            overflow-y: auto; padding: 12px 14px 16px 14px;
            display: flex; flex-direction: column; gap: 10px;
            overscroll-behavior: contain;
        }
        #service-alerts-list::-webkit-scrollbar { width: 5px; }
        #service-alerts-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.14); border-radius: 5px; }
        .service-alert-item {
            background: var(--surface-0); border-radius: 12px; padding: 12px 14px;
            display: flex; flex-direction: column; gap: 6px;
        }
        .service-alert-header-text {
            font-family: inherit; font-size: var(--fs-lg); font-weight: 700;
            color: #FFFFFF; text-align: center; line-height: 1.35;
        }
        .service-alert-description-text {
            font-family: inherit; font-size: var(--fs-xs); font-weight: 400;
            color: #C8CBCA; line-height: 1.55; white-space: pre-wrap; word-break: break-word;
        }
        .service-alert-loading {
            font-family: inherit; font-size: var(--fs-md); color: var(--text-muted);
            padding: 16px 4px; text-align: center;
        }
        /* ── Vehicle info overlay ── */
        #vehicle-info-overlay.overlay-visible {
            position: fixed; inset: 0; z-index: var(--z-overlay); display: flex;
            align-items: center; justify-content: center;
            background: rgba(0,0,0,0.55);
            backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
            animation: saFadeIn 0.18s ease;
        }
        #vehicle-info-card {
            background: var(--surface-2); border-radius: 16px;
            box-shadow: 0 16px 40px rgba(0,0,0,0.7);
            width: min(620px, calc(100vw - 28px));
            max-height: min(88dvh, 720px);
            display: flex; flex-direction: column;
            overflow: hidden;
            animation: saSlideUp 0.2s ease;
        }
        #vehicle-info-header {
            display: flex; align-items: center; justify-content: space-between;
            gap: 12px; padding: 10px 16px 8px 18px; flex-shrink: 0;
            border-bottom: 1px solid rgba(255,255,255,0.08);
        }
        #vehicle-info-heading { font-family: inherit; font-size: var(--fs-sm); font-weight: 450; color: #C8CBCA; line-height: 1.3; letter-spacing: 0.2px; }
        #vehicle-info-title { margin: 0 2px 20px; font-family: inherit; font-size: var(--fs-2xl); font-weight: 500; color: #FFFFFF; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; }
        #vehicle-info-close {
            width: 30px; height: 30px; border-radius: 999px; border: none; padding: 0;
            background: var(--surface-3); display: flex; align-items: center; justify-content: center;
            cursor: pointer; flex-shrink: 0; transition: background 0.15s;
        }
        @media (hover: hover) and (pointer: fine) { #vehicle-info-close:hover { background: var(--surface-4); } }
        #vehicle-info-close svg { width: 16px; height: 16px; color: rgba(255,255,255,0.85); }
        #vehicle-info-body { overflow-y: auto; padding: 16px; overscroll-behavior: contain; }
        #vehicle-info-body::-webkit-scrollbar { width: 5px; }
        #vehicle-info-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.14); border-radius: 5px; }
        .vi-loading {
            font-family: inherit; font-size: var(--fs-md); color: var(--text-muted);
            padding: 24px 4px; text-align: center;
        }
        .view-loading-spinner { display: flex; align-items: center; justify-content: center; min-height: 96px; width: 100%; }
        .view-loading-spinner::before { content: ''; width: 30px; height: 30px; border: 3px solid rgba(255,255,255,0.18); border-top-color: rgba(255,255,255,0.9); border-radius: 50%; animation: view-loading-spin 0.8s linear infinite; }
        @keyframes view-loading-spin { to { transform: rotate(360deg); } }
        .vi-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
        .vi-cell {
            background: var(--surface-0); border-radius: 12px; padding: 12px 14px;
            display: flex; align-items: center; gap: 9px; min-width: 0;
        }
        .vi-cell-icon {
            width: 32px; height: 32px; flex-shrink: 0;
            background: transparent; display: flex; align-items: center; justify-content: center;
        }
        .vi-cell-icon svg, .vi-cell-icon img { width: 24px; height: 24px; }
        .vi-cell-icon svg { color: #FFFFFF; stroke: #FFFFFF; }
        .vi-cell-text { min-width: 0; }
        .vi-cell-label {
            font-family: inherit; font-size: var(--fs-xs); font-weight: 400; color: #999;
            text-transform: uppercase; letter-spacing: 0.3px; margin-bottom: 2px;
        }
        .vi-cell-value {
            font-family: inherit; font-size: var(--fs-sm); font-weight: 450; color: #FFFFFF;
            overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
        }
        .vi-cell-value > span { display: inline-block; white-space: nowrap; }
        .vi-cell-value.marquee-active { text-overflow: clip; }
        .vi-cell-value.marquee-active > span {
            animation: vi-marquee-scroll var(--vi-marquee-duration, 7s) linear infinite;
            animation-delay: 1s; will-change: transform;
        }
        @keyframes vi-marquee-scroll {
            0%, 12% { transform: translateX(0); }
            44%, 56% { transform: translateX(var(--vi-marquee-distance, 0px)); }
            88%, 100% { transform: translateX(0); }
        }
        .vi-photo-wrap { position: relative; margin-top: 18px; border-radius: 14px; overflow: hidden; line-height: 0; background: var(--surface-0); }
        .vi-photo-placeholder { width: 100%; height: 320px; background: var(--surface-0); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: rgba(255,255,255,0.7); line-height: 1.3; text-align: center; }
        .vi-photo-placeholder svg { width: 42px; height: 42px; color: #DDDDDD; }
        .vi-photo-placeholder span { font-family: inherit; font-size: var(--fs-md); }
        .vi-photo { width: 100%; max-height: 320px; object-fit: cover; display: block; }
        .vi-photo-embed { width: 100%; height: 320px; border: 0; display: block; background: var(--surface-0); }
        .vi-photo-embed[hidden] { display: none; }
        .vi-photo-credit {
            position: static; box-sizing: border-box; width: 100%; min-height: 36px;
            padding: 8px 12px;
            font-family: inherit; font-size: var(--fs-xs); font-weight: 400;
            line-height: 1.35; color: #DDDDDD; text-align: right;
            background: transparent; pointer-events: none;
            display: flex; align-items: center; justify-content: flex-end;
        }
        .vi-error-state { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 30px 10px 20px 10px; }
        .vi-error-icon {
            width: 68px; height: 68px; border-radius: 50%; background: var(--danger-soft);
            display: flex; align-items: center; justify-content: center;
        }
        .vi-error-icon svg { width: 30px; height: 30px; color: var(--danger); }
        .vi-error-text { font-family: inherit; font-size: 18px; font-weight: 500; color: #E7E8E8; text-align: center; }
        .vehicle-panel-body { margin-top: 6px; background: var(--surface-2); border-top: 1px solid var(--surface-3); border-radius: 12px; padding: 12px 14px; overflow-y: auto; background-clip: padding-box; scrollbar-color: var(--surface-3) transparent; transition: max-height 0.3s ease; }
        .vehicle-panel-body::-webkit-scrollbar { width: 8px; }
        .vehicle-panel-body::-webkit-scrollbar-track { background: transparent; }
        .vehicle-panel-body::-webkit-scrollbar-thumb { background: var(--surface-3); border: 2px solid var(--surface-0); border-radius: 999px; }
        #vehicle-course-panel.vehicle-course-panel--favorites .vehicle-panel-header { margin-bottom: 4px; }
        #vehicle-course-panel.vehicle-course-panel--favorites .vehicle-panel-card { display: flex; flex-direction: column; }
        #vehicle-course-panel.vehicle-course-panel--favorites #vc-route-badge,
        #vehicle-course-panel.vehicle-course-panel--favorites #vc-gps-btn,
        #vehicle-course-panel.vehicle-course-panel--favorites #vc-more-btn,
        #vehicle-course-panel.vehicle-course-panel--favorites #vc-calendar-btn,
        #vehicle-course-panel.vehicle-course-panel--favorites #vc-alerts-btn { display: none !important; }
        #vc-fav-badge { display: none; }
        #vehicle-course-panel.vehicle-course-panel--favorites #vc-fav-badge { display: inline-flex; width: 38px; height: 38px; box-sizing: border-box; padding: 0; justify-content: center; border-radius: 10px; background: var(--surface-3); }
        #vc-fav-badge svg { width: 21px; height: 21px; color: #FFFFFF; stroke: #FFFFFF; stroke-width: 2; }
        #vehicle-course-panel.vehicle-course-panel--favorites #vc-headsign { font-size: var(--fs-xl); font-weight: 700; color: #FFFFFF; }
        #vehicle-course-panel.vehicle-course-panel--favorites .vehicle-panel-body { display: flex; flex: 1 1 auto; flex-direction: column; min-height: 0; height: auto; margin-top: 0; padding: 8px 10px 14px; }
        #vehicle-course-panel.vehicle-course-panel--favorites .fav-stops-scroll { max-height: none; overflow-y: visible; }
        @media (min-width: 769px) and (pointer: fine) {
            #multi-marker-popup { max-width: 600px !important; }
        }
        .vehicle-course-panel--route .vehicle-stop-times, .vehicle-course-panel--route .vehicle-stop-eta { display: none !important; }
        .vehicle-course-panel--route #vc-gps-btn { display: none; }
        .vehicle-course-panel--route #vc-calendar-btn { display: flex !important; }
        .vehicle-course-panel--route .vehicle-timeline::before { content: ''; position: absolute; left: 6px; top: 16px; bottom: 16px; width: 6px; background: var(--route-line-color, var(--accent)); border-radius: 2px; z-index: 0; display: block; }
        .vehicle-course-panel--route .vehicle-stop { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
        .vehicle-course-panel--route .vehicle-stop-line { padding-top: 0; width: 20px; justify-content: center; }
        .vehicle-course-panel--route .vehicle-stop-info { padding-top: 0; }
        .vehicle-course-panel--route .vehicle-stop-name { line-height: 1.25; word-break: break-word; }
        .routes-panel { background: rgba(40, 45, 50, 0.95); border-radius: 14px; padding: 14px 14px 12px 14px; margin: 4px 0 14px 0; max-height: 56vh; overflow-y: auto; overscroll-behavior: contain; }
        .routes-panel::-webkit-scrollbar { width: 6px; }
        .routes-panel::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.14); border-radius: 6px; }
        .routes-sections { display: flex; flex-direction: column; gap: 16px; }
        .routes-section-title { font-size: var(--fs-xs); font-family: inherit; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase; color: var(--text-muted); margin: 0 5px; }
        .routes-grid { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
        .route-pill { border: none; cursor: pointer; border-radius: 10px; padding: 8px 14px; font-family: inherit; font-weight: 700; font-size: 15px; line-height: 1; color: #FFFFFF; box-shadow: 0 8px 18px rgba(0,0,0,0.45); transition: transform 0.12s ease, filter 0.12s ease; display: inline-flex; align-items: center; gap: 8px; min-height: 36px; }
        #schedules-overlay .choose-text { font-family: inherit; font-weight: 700; font-size: 24px; letter-spacing: 0.2px; }
        @media (hover: hover) and (pointer: fine) { .route-pill:hover { transform: translateY(-1px); filter: brightness(1.04); } }
        .route-pill:active { transform: translateY(0px); filter: brightness(0.98); }
        .route-pill-icon { width: 16px; height: 16px; background: rgba(255,255,255,0.9); flex-shrink: 0; }
        .vehicle-no-data { font-family: inherit; font-size: var(--fs-md); color: #B6BAB8; padding: 4px 2px; }
        .vehicle-no-data.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; min-height: 132px; padding: 24px 10px; box-sizing: border-box; text-align: center; }
        .vehicle-no-data.empty-state .empty-state-icon { width: 68px; height: 68px; border-radius: 50%; background: var(--danger-soft); display: flex; align-items: center; justify-content: center; }
        .vehicle-no-data.empty-state .empty-state-icon svg { width: 30px; height: 30px; color: var(--danger); }
        .vehicle-no-data.empty-state .empty-state-text { font-family: inherit; font-size: var(--fs-lg); font-weight: 500; color: #E7E8E8; }
        .stop-panel-tabs { display: flex; gap: 8px; margin: 4px 0 8px 0; }
        .stop-tab { flex: 1; border: none; border-radius: 999px; padding: 6px 10px; background: #14161a; color: #AEB2B8; font-family: inherit; font-size: var(--fs-sm); font-weight: 500; cursor: pointer; transition: background 0.2s, color 0.2s; min-height: 34px; }
        .stop-tab-active { background: #1F2227; color: #FFFFFF; }
        .vehicle-panel-body.stop-panel-body { box-sizing: border-box; margin-top: 4px; padding-bottom: 32px; scroll-padding-bottom: 32px; }
        .stop-time-filter-indicator { display: none; font-family: inherit; font-size: var(--fs-xs); color: var(--text-muted); margin: 0 2px 6px 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .stop-time-filter-indicator strong { color: rgba(255,255,255,0.82); font-weight: 700; }
        #stop-time-overlay .selection-card { width: min(560px, calc(100vw - 28px)); max-width: 560px; background: rgba(22, 24, 28, 0.96); border-radius: 18px; box-shadow: 0 18px 45px rgba(0,0,0,0.72); padding: 18px 16px 14px 16px; }
        .stop-time-title { font-family: inherit; font-size: var(--fs-xl); font-weight: 700; color: #E7E8E8; text-align: left; margin: 0 0 10px 0; }
        .stop-time-date-row { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 2px 0 16px 0; }
        .stop-time-date-btn { border: none; cursor: pointer; width: 54px; height: 32px; border-radius: 999px; background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.92); font-size: 18px; font-weight: 700; transition: background 0.15s, transform 0.1s; display: inline-flex; align-items: center; justify-content: center; }
        @media (hover: hover) and (pointer: fine) { .stop-time-date-btn:hover { background: rgba(255,255,255,0.10); transform: translateY(-1px); } }
        .stop-time-date-label { font-family: inherit; font-size: 18px; font-weight: 700; color: rgba(255,255,255,0.90); letter-spacing: 0.2px; }
        .stop-time-picker-row { display: flex; align-items: stretch; justify-content: center; gap: 12px; margin: 0 0 14px 0; }
        .stop-time-picker { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 130px; }
        .stop-time-number { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 12px; border-radius: 14px; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.06); }
        .stop-time-number input { width: 64px; border: none; outline: none; background: transparent; color: rgba(255,255,255,0.95); font-family: inherit; font-size: 34px; font-weight: 700; text-align: center; appearance: textfield; }
        .stop-time-number input::-webkit-outer-spin-button, .stop-time-number input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
        .stop-time-sep { display: flex; align-items: center; justify-content: center; font-family: inherit; font-size: 34px; font-weight: 700; color: rgba(255,255,255,0.80); padding: 0 2px; }
        .stop-time-picker-label { font-family: inherit; font-size: var(--fs-sm); color: var(--text-muted); }
        .stop-time-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 6px; }
        .stop-time-action-btn { border: none; background: transparent; cursor: pointer; font-family: inherit; font-size: var(--fs-lg); font-weight: 700; padding: 8px 10px; border-radius: 10px; transition: background 0.15s; min-height: 40px; }
        .stop-time-action-btn--cancel { color: rgba(255,255,255,0.60); }
        .stop-time-action-btn--ok { color: #2C95D0; }
        @media (hover: hover) and (pointer: fine) { .stop-time-action-btn:hover { background: rgba(255,255,255,0.06); } }
        .stop-departure-row { display: grid; grid-template-columns: 1fr auto; column-gap: 10px; align-items: center; padding: 6px 0; }
        .stop-departure-row--clickable { cursor: pointer; border-radius: 8px; margin: 0 -6px; padding: 8px 6px; transition: background 0.15s; }
        @media (hover: hover) and (pointer: fine) { .stop-departure-row--clickable:hover { background: rgba(255,255,255,0.06); } }
        .stop-departure-top-row { display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; min-width: 0; }
        .stop-departure-line-badge { display: inline-flex; flex-direction: row; align-items: center; flex-shrink: 0; padding: 4px 8px; border-radius: 8px; background: #2C95D0; gap: 5px; }
        .stop-departure-line-icon { width: 15px; height: 15px; flex-shrink: 0; background-color: rgba(255,255,255,0.9); }
        .stop-departure-line-name { font-family: inherit; font-weight: 700; font-size: var(--fs-md); color: #FFFFFF; white-space: nowrap; }
        .stop-departure-headsign { font-family: inherit; font-size: 15px; font-weight: 450; color: #E7E8E8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
        .stop-departure-meta { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
        .stop-departure-status-row { display: flex; align-items: center; gap: 4px; flex-wrap: nowrap; }
        .stop-departure-status { font-family: inherit; font-size: var(--fs-sm); font-weight: 450; }
        .stop-departure-platform { font-family: inherit; font-size: var(--fs-sm); font-weight: 400; color: #FFFFFF; opacity: 0.6; white-space: nowrap; margin-left: 4px; }
        .stop-departure-time-col { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
        .stop-departure-time-main { font-family: inherit; font-size: var(--fs-lg); font-weight: 450; color: #E7E8E8; white-space: nowrap; }
        .stop-departure-eta { font-family: inherit; font-size: var(--fs-sm); font-weight: 450; color: #9FA3A8; }
        .stop-departure-vehicle-label { font-family: inherit; font-size: var(--fs-xs); font-weight: 450; color: #9FA3A8; }
        .stop-departure-last-stop { font-family: inherit; font-size: var(--fs-xs); font-weight: 450; color: #FFB200; margin-top: 3px; }
        .stop-table-view { display: none; flex-direction: column; gap: 10px; padding-bottom: 8px; }
        .stop-table-route-strip { display: flex; flex-wrap: wrap; gap: 8px; }
        .stop-table-main-headsign { display: flex; align-items: stretch; gap: 10px; font-family: inherit; font-size: var(--fs-xl); color: rgba(255,255,255,0.86); margin: 1px 0 2px 0; line-height: 1.25; }
        .stop-table-main-headsign .stop-table-main-route-pill { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 36px; padding: 6px 10px; border-radius: 9px; font-size: var(--fs-md); line-height: 1; font-weight: 700; color: #fff; white-space: nowrap; flex-shrink: 0; box-shadow: 0 6px 14px rgba(0,0,0,0.32); }
        .stop-table-main-headsign .stop-table-main-route-pill .route-pill-icon { width: 16px; height: 16px; }
        .stop-table-main-headsign .stop-table-main-direction { display: flex; flex-direction: column; min-width: 0; padding-top: 1px; }
        .stop-table-main-headsign .stop-table-main-direction-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
        .stop-table-main-headsign .stop-table-main-from { margin-top: 2px; font-size: var(--fs-sm); line-height: 1.2; color: var(--text-muted); }
        .stop-table-route-pill { padding: 6px 10px; border-radius: 9px; font-size: var(--fs-md); box-shadow: 0 6px 14px rgba(0,0,0,0.42); }
        .stop-table-route-pill--inactive { filter: grayscale(0.9) saturate(0.25) brightness(0.72); opacity: 0.72; }
        .stop-table-grid { display: flex; flex-direction: column; gap: 3px; }
        .stop-table-hour-row { display: grid; grid-template-columns: 24px 1fr; align-items: baseline; column-gap: 7px; padding: 1px 0 3px 0; }
        .stop-table-hour-row + .stop-table-hour-row { border-top: 1px solid rgba(255,255,255,0.10); padding-top: 4px; }
        .stop-table-hour { font-family: inherit; font-size: 22px; font-weight: 500; color: #FFFFFF; line-height: 1; letter-spacing: 0.3px; text-align: left; }
        .stop-table-minutes { display: flex; flex-wrap: wrap; gap: 3px 6px; align-items: baseline; min-height: 14px; }
        .stop-table-minute { position: relative; border: none; background: transparent; padding: 3px 1px; margin: 0; cursor: pointer; font-family: inherit; font-size: var(--fs-lg); font-weight: 400; color: #D2D6D4; line-height: 1; letter-spacing: 0.2px; }
        @media (hover: hover) and (pointer: fine) { .stop-table-minute:hover { opacity: 0.92; } }
        .stop-table-minute--past, .stop-table-hour-row--past .stop-table-minute { color: #808489; }
        .stop-table-hour-row--past .stop-table-hour { color: #8C9095; }
        .stop-table-minute sup { font-size: 50%; vertical-align: baseline; position: relative; top: -0.62em; margin-left: 1px; font-weight: 700; letter-spacing: 0; }
        .stop-table-minute-rt--ontime { color: #65E765; }
        .stop-table-minute-rt--late { color: #FF6966; }
        .stop-table-minute-rt--early { color: #FF9500; }
        .stop-table-minute-with-note sub { font-size: 50%; vertical-align: baseline; position: relative; bottom: -0.24em; margin-left: 1px; color: #BFC3C1; }
        .stop-table-overflow-sep { margin: 2px 0 0 0; border-top: 1px solid rgba(255,255,255,0.10); padding-top: 4px; }
        .stop-table-legend { display: none; margin-top: 4px; padding-top: 8px; border-top: 1px solid rgba(255,255,255,0.08); font-family: inherit; font-size: var(--fs-sm); color: rgba(255,255,255,0.75); }
        .stop-table-legend-row { line-height: 1.45; }
        .stop-table-tooltip { position: fixed; z-index: var(--z-top); display: none; pointer-events: none; max-width: 280px; padding: 5px 8px; border-radius: 7px; background: rgba(17, 20, 24, 0.95); border: 1px solid rgba(255,255,255,0.14); box-shadow: 0 8px 24px rgba(0,0,0,0.45); color: rgba(255,255,255,0.92); font-family: inherit; font-size: var(--fs-xs); font-weight: 500; line-height: 1.3; white-space: nowrap; transform: translate(-50%, calc(-100% - 8px)); }
        .vehicle-timeline { display: flex; flex-direction: column; gap: 0; position: relative; }
        .vehicle-timeline::before { content: ''; position: absolute; left: 67px; top: 13px; bottom: 13px; width: 6px; background: var(--route-line-color, var(--accent)); border-radius: 2px; z-index: 0; }
        .vehicle-stop { display: grid; grid-template-columns: 52px 20px 1fr auto; column-gap: 10px; padding: 9px 0; align-items: start; border: 0; border-radius: 7px; width: 100%; background: transparent; color: inherit; text-align: left; font: inherit; cursor: pointer; }
         .vehicle-stop:focus { background: rgba(255,255,255,0.06); }@media (hover: hover) and (pointer: fine) { .vehicle-stop:hover { background: rgba(255,255,255,0.06); } }
        .vehicle-stop:focus-visible { outline: 2px solid #6C757D; outline-offset: -2px; border-radius: 6px; }
.vehicle-stop-times { display: none; }
.vehicle-stop { grid-template-columns: 0 20px minmax(0, 1fr) auto !important; }
.vehicle-stop > .vehicle-stop-times { display: none !important; }
.vehicle-stop > .vehicle-stop-line { grid-column: 2; grid-row: 1; }
.vehicle-stop > .vehicle-stop-info { grid-column: 3; grid-row: 1; }
.vehicle-stop > .vehicle-stop-eta { grid-column: 4; grid-row: 1; }
.vehicle-panel#vehicle-course-panel:not(.vehicle-course-panel--route) .vehicle-stop-info { padding-left: 0; }
.vehicle-panel#vehicle-course-panel:not(.vehicle-course-panel--route) .vehicle-timeline::before { left: 17px; }
.vehicle-panel#vehicle-course-panel:not(.vehicle-course-panel--route) .vehicle-timeline::before { bottom: 44px; }
.vehicle-panel#vehicle-course-panel:not(.vehicle-course-panel--route) .vehicle-timeline.vehicle-timeline--last-stop-details::before { bottom: 62px; }
.vehicle-stop-status-row .vehicle-stop-time-line { display: inline-flex; align-items: center; gap: 3px; margin-left: 7px; vertical-align: middle; }
.vehicle-stop-status-row .vehicle-stop-time-line + .vehicle-stop-time-line { margin-left: 3px; }
.vehicle-stop-inline-times { display: inline-flex; align-items: center; flex-wrap: wrap; vertical-align: middle; color: inherit; }
.vehicle-stop-inline-times .vehicle-stop-time-line { min-height: 18px; }
.vehicle-stop-inline-times .vehicle-stop-time-line > svg { width: 13px; height: 13px; }
.vehicle-stop-status-row .vehicle-stop-inline-times .vehicle-stop-time-line + .vehicle-stop-time-line { margin-left: 5px; }
.vehicle-stop-time-line { display: inline-flex; align-items: center; justify-content: flex-end; gap: 4px; min-height: 21px; }
.vehicle-stop-time-line > svg { width: 14px; height: 14px; stroke-width: 2.4; }
.vehicle-stop-time-icon-spacer { width: 14px; height: 14px; flex-shrink: 0; }
.vehicle-stop-time-line--arrival > svg { color: #8fc8ff; }
.vehicle-stop-time-line--departure > svg { color: #8fc8ff; }
        .vehicle-stop-time { font-family: inherit; font-size: var(--fs-md); font-weight: 450; color: #E7E8E8; line-height: 1.2; }
        .vehicle-stop-time--passed { font-size: var(--fs-md); font-weight: 450; color: #858687; }
        .vehicle-stop-time--passed-planned { color: #6A6A6B; }
        .vehicle-stop-time--passed-real { font-size: var(--fs-md); font-weight: 450; color: #858687; }
.vehicle-stop-time--planned-strike { font-size: var(--fs-md); font-weight: 450; color: #C1C1BD; text-decoration: line-through; }
.vehicle-stop-time--planned-strike.vehicle-stop-time--passed-planned { color: #6A6A6B !important; }
        .vehicle-stop-time--late-main { font-size: var(--fs-md); font-weight: 450; color: #FF6966; }
        .vehicle-stop-time--early-main { font-size: var(--fs-md); font-weight: 450; color: #FF9500; }
        .stop-ascending-row--past { opacity: 0.38; }
        .stop-ascending-time--past { color: #858687; }
        .vehicle-stop-times--compact .vehicle-stop-time, .vehicle-stop-times--compact .vehicle-stop-time--passed, .vehicle-stop-times--compact .vehicle-stop-time--planned-strike, .vehicle-stop-times--compact .vehicle-stop-time--late-main, .vehicle-stop-times--compact .vehicle-stop-time--early-main { font-size: var(--fs-md); }
        .vehicle-stop-time-sep { height: 4px; flex-shrink: 0; }
        .vehicle-stop-line { position: relative; display: flex; align-items: flex-start; justify-content: center; padding-top: 4px; }
        .vehicle-stop-dot, .brigade-trip-tl-dot, .trip-stop-dot, .route-scheme-stop-dot {
            --dot-color: var(--route-line-color, var(--route-scheme-color, #2C95D0));
            box-sizing:border-box; width:12px; height:12px; flex-shrink:0;
            border:3px solid var(--dot-color); border-radius:50%; background:var(--surface-2);
            box-shadow:0 2px 4px rgba(0,0,0,.6);
        }
        .vehicle-stop:first-child .vehicle-stop-dot, .vehicle-stop:last-child .vehicle-stop-dot,
        .brigade-trip-tl-dot, .trip-stop-dot--terminal, .route-scheme-stop-dot--terminal { background:var(--dot-color); }
        .vehicle-stop-dot { position:relative; z-index:1; }
        .vehicle-stop-dot--passed { opacity:.75; }
        .vehicle-stop-vehicle-icon { position: absolute; top: -5px; left: 50%; transform: translateX(-50%); width: 20px; height: 20px; border-radius: 999px; border: 2px solid #1F6E9C; background-color: #2C95D0; display: flex; align-items: center; justify-content: center; z-index: 2; }
        .vehicle-stop-vehicle-icon-inner { width: 13px; height: 13px; background-color: rgba(255,255,255,0.9); }
        .vehicle-stop-info { display: flex; flex-direction: column; gap: 3px; padding-top: 2px; min-width: 0; }
        .vehicle-stop-name { font-family: inherit; font-size: 18px; font-weight: 450; color: #E7E8E8; line-height: 1.2; min-width: 0; overflow-wrap: normal; }
        .vehicle-stop-name--passed { color: #858687; }
.vehicle-stop-status-row { display: flex; align-items: center; gap: 4px; margin-top: 1px; flex-wrap: wrap; min-width: 0; }
.vehicle-stop-details { display: block; margin-top: 2px; font-family: inherit; font-size: var(--fs-sm); font-weight: 450; line-height: 1.2; color: #B6BAB8; }
.stop-departure-details { display: block; margin-top: 3px; font-family: inherit; font-size: var(--fs-xs); color: #B6BAB8; }
        .vehicle-stop-status-icon { width: 16px; height: 16px; flex-shrink: 0; }
        .vehicle-stop-status { font-family: inherit; font-size: var(--fs-md); font-weight: 450; }
        .vehicle-stop-status--ontime  { color: #65E765; }
        .vehicle-stop-status--late    { color: #FF6966; }
        .vehicle-stop-status--early   { color: #FF9500; }
        .vehicle-stop-status--static  { color: #B6BAB8; }
        .vehicle-stop-status--passed  { color: #858687; }
        .vehicle-stop-status--cancelled { color: #939393; }
        .vehicle-stop-name--cancelled { color: #B0B0B0; }
        .vehicle-stop-time--cancelled { color: #939393; text-decoration: line-through; }
        .stop-departure-line-badge--cancelled { background: #7A7A7A !important; }
        .stop-departure-headsign--cancelled { color: #B0B0B0; }
        .stop-departure-time-main--cancelled { color: #939393; text-decoration: line-through; }
        .stop-departure-cancelled-icon { width: 16px; height: 16px; flex-shrink: 0; filter: brightness(0) saturate(100%) invert(60%) sepia(0%) saturate(0%) hue-rotate(0deg) brightness(96%) contrast(96%); }
        .vehicle-stop-eta { font-family: inherit; font-size: 18px; font-weight: 450; color: #E7E8E8; white-space: nowrap; padding-top: 2px; }
        .trip-stop-marker { display: flex; flex-direction: column; align-items: center; transform: translateY(-50%); }
        .trip-stop-dot { width:14px; height:14px; }
        .trip-stop-label { margin-top: 4px; font-family: inherit; font-size: var(--fs-sm); font-weight: 550; text-align: center; white-space: nowrap; paint-order: stroke fill; -webkit-text-stroke: 0; text-stroke: 0; }
        .vehicle-tooltip { position: fixed; z-index: var(--z-tooltip); pointer-events: none; display: flex; flex-direction: column; align-items: center; transform: translate(-50%, calc(-100% - 18px)); }
        .vehicle-tooltip-hidden { display: none; }
        .vt-body { background: rgba(74, 79, 88, 0.6); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-radius: 12px; padding: 8px 18px; min-height: 83px; box-sizing: border-box; display: flex; flex-direction: column; justify-content: center; gap: 7px; white-space: nowrap; box-shadow: 0 4px 18px rgba(0,0,0,0.45); }
        .vt-arrow { width: 0; height: 0; border-left: 10px solid transparent; border-right: 10px solid transparent; border-top: 10px solid rgba(74, 79, 88, 0.6); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); flex-shrink: 0; }
        .vt-title { font-family: inherit; font-size: var(--fs-lg); font-weight: 400; color: #FFFFFF; line-height: 1.3; }
        .vt-model { font-family: inherit; font-size: var(--fs-sm); color: #FFFFFF; line-height: 1.3; }
        .vt-row { display: flex; align-items: center; gap: 7px; font-family: inherit; font-size: var(--fs-md); color: #C8CAD0; line-height: 1.3; }
        .vt-icon { width: 17px; height: 17px; flex-shrink: 0; }
        .vt-time-text { font-style: italic; color: #9A9DA6; }
        .stop-name-tooltip { position: fixed; z-index: var(--z-tooltip); pointer-events: none; display: flex; flex-direction: column; align-items: center; transform: translate(-50%, calc(-100% - 8px)); }
        .stop-name-tooltip-hidden { display: none; }
        .snt-body { background: rgba(74, 79, 88, 0.6); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-radius: 9px; padding: 8px 18px; box-sizing: border-box; display: flex; flex-direction: column; justify-content: center; white-space: nowrap; box-shadow: 0 4px 18px rgba(0,0,0,0.45); }
        .snt-text { font-family: inherit; font-size: var(--fs-sm); font-weight: 500; color: #FFFFFF; line-height: 1.3; }
        .snt-arrow { width: 0; height: 0; border-left: 7px solid transparent; border-right: 7px solid transparent; border-top: 8px solid rgba(74, 79, 88, 0.6); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); flex-shrink: 0; }
        .date-strip-wrapper { width: 100%; margin: 8px 0 14px 0; }
        .date-strip { display: flex; align-items: center; gap: 8px; }
        .date-strip-nav { width: 34px; height: 34px; border-radius: 10px; border: none; background: rgba(255,255,255,0.08); cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: rgba(255,255,255,0.7); transition: background 0.15s; }
        @media (hover: hover) and (pointer: fine) { .date-strip-nav:hover { background: rgba(255,255,255,0.14); } }
        .date-strip-nav:disabled { opacity: 0.3; cursor: default; }
        .date-strip-nav svg { width: 18px; height: 18px; }
        .date-strip-label { flex: 1; text-align: center; font-family: inherit; font-size: 15px; font-weight: 500; color: rgba(255,255,255,0.9); line-height: 1.3; white-space: nowrap; }
        .overlay-back-row { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
        .overlay-back-btn { width: 34px; height: 34px; border-radius: 10px; border: none; background: rgba(255,255,255,0.07); display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; color: rgba(255,255,255,0.8); transition: background 0.15s; }
        @media (hover: hover) and (pointer: fine) { .overlay-back-btn:hover { background: rgba(255,255,255,0.12); } }
        .overlay-back-btn svg { width: 18px; height: 18px; }
        .brigades-overlay-title { font-family: inherit; font-size: var(--fs-xl); font-weight: 700; color: #FFFFFF; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
        .brigades-overlay-title .route-badge-inline { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 9px; font-size: var(--fs-lg); font-weight: 700; color: #fff; flex-shrink: 0; }
        .brigades-overlay-title .route-badge-inline .rbi-icon { width: 16px; height: 16px; background: rgba(255,255,255,0.9); flex-shrink: 0; }
        #brigades-overlay.overlay-visible, #brigade-detail-overlay.overlay-visible {
            animation: viewOverlayFadeIn 0.18s ease;
        }
        #brigades-overlay.overlay-visible > .selection-card, #brigade-detail-overlay.overlay-visible > .selection-card {
            animation: viewOverlaySlideIn 0.22s ease;
        }
        @keyframes viewOverlayFadeIn { from { opacity: 0; } to { opacity: 1; } }
        @keyframes viewOverlaySlideIn { from { transform: translate(-50%, calc(-50% + 14px)); opacity: 0; } to { transform: translate(-50%, -50%); opacity: 1; } }
        #route-details-overlay.overlay-visible { position: fixed; inset: 0; z-index: var(--z-overlay-low); display: flex; align-items: center; justify-content: center; padding: 14px; background: rgba(13, 15, 19, 0.58); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); }
        .route-details-card { width: min(520px, calc(100vw - 28px)); max-width: 520px; background: #1a1f27; border-radius: 16px; box-shadow: 0 8px 32px rgba(0,0,0,0.6); padding: 20px 20px 16px 20px; color: #FFFFFF; }
        .route-details-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
        .route-details-title { font-family: inherit; font-size: var(--fs-xl); font-weight: 700; line-height: 1.1; color: #FFFFFF; }
        .route-details-close { width: 32px; height: 32px; border: none; border-radius: 50%; background: transparent; color: rgba(255,255,255,0.7); cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: color 0.15s, background 0.15s; font-size: var(--fs-xl); font-weight: 400; }
        @media (hover: hover) and (pointer: fine) { .route-details-close:hover { color: #FFFFFF; background: rgba(255,255,255,0.10); } }
        .route-details-close svg { width: 20px; height: 20px; }
        .route-details-badge-row { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
        .route-details-badge { display: flex; align-items: stretch; width: 100%; border-radius: 10px; overflow: hidden; background: #5a82e8; }
        .route-details-badge-left { display: flex; align-items: center; gap: 9px; padding: 10px 14px; flex-shrink: 0; }
        .route-details-badge-icon { width: 22px; height: 22px; background: rgba(255,255,255,0.92); flex-shrink: 0; }
        .route-details-badge-line { font-family: inherit; font-size: 22px; font-weight: 700; line-height: 1; white-space: nowrap; }
        .route-details-badge-name { font-family: inherit; font-size: var(--fs-md); font-weight: 500; line-height: 1.3; overflow: hidden; display: flex; align-items: center; white-space: normal; word-break: break-word; min-width: 0; padding: 10px 14px; background: rgba(0,0,0,0.18); border: none; outline: none; box-shadow: none; color: rgba(255,255,255,0.85); flex: 1; align-self: stretch; }
        .route-details-meta { display: flex; flex-direction: column; align-items: center; gap: 3px; margin-bottom: 14px; padding: 4px 0; }
        .route-details-meta-item { background: transparent; border-radius: 0; padding: 1px 0; text-align: center; }
        .route-details-meta-label { font-family: inherit; font-size: var(--fs-xs); font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--text-muted); margin-bottom: 0; display: none; }
        .route-details-meta-value { font-family: inherit; font-size: var(--fs-md); font-weight: 700; letter-spacing: 1px; text-transform: uppercase; line-height: 1.5; color: rgba(255,255,255,0.75); overflow-wrap: anywhere; }
        .route-details-meta-item:first-child .route-details-meta-value { font-size: var(--fs-md); color: #FFFFFF; letter-spacing: 1px; }
        .route-details-meta-item:last-child .route-details-meta-value { font-size: var(--fs-xs); color: var(--text-muted); font-weight: 500; letter-spacing: 0.6px; }
        .route-details-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
        .route-details-action-btn { width: 100%; border: none; border-radius: 10px; min-height: 56px; padding: 12px 16px; background: rgba(255,255,255,0.07); color: #FFFFFF; cursor: pointer; display: flex; align-items: center; gap: 12px; text-align: left; transition: background 0.15s; }
        @media (hover: hover) and (pointer: fine) { .route-details-action-btn:hover { background: rgba(255,255,255,0.12); } }
        .route-details-action-btn:active { background: rgba(255,255,255,0.15); }
        .route-details-action-btn:focus-visible { outline: 2px solid rgba(255,255,255,0.20); outline-offset: 2px; }
        .route-details-action-btn .menu-icon { margin: 0; width: auto; height: auto; border-radius: 0; flex-shrink: 0; background: transparent; backdrop-filter: none; display: flex; align-items: center; justify-content: center; }
        .route-details-action-btn .menu-icon i { width: 20px; height: 20px; color: rgba(255,255,255,0.75); }
        .route-details-action-btn .city-content { text-align: left; }
        .route-details-action-btn .city-name-line { font-size: var(--fs-md); margin-bottom: 0; font-weight: 500; color: rgba(255,255,255,0.9); }
        .route-details-action-btn .city-description { margin-left: 0; margin-top: 2px; font-size: var(--fs-xs); }
        .route-details-action-btn--primary { background: rgba(255,255,255,0.07); }
        @media (hover: hover) and (pointer: fine) { .route-details-action-btn--primary:hover { background: rgba(255,255,255,0.12); } }
        .route-details-action-btn--ghost,
        .route-details-action-btn--muted { background: rgba(255,255,255,0.07); }
        .route-details-action-btn[disabled] { opacity: 0.4; cursor: default; }
        .brigades-list { display: flex; flex-direction: column; gap: 8px; max-height: 52vh; overflow-y: auto; overscroll-behavior: contain; padding-right: 2px; }
        .brigades-list::-webkit-scrollbar { width: 4px; }
        .brigades-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.14); border-radius: 4px; }
        .brigade-row { display: flex; align-items: center; gap: 12px; background: rgba(40,45,50,0.85); border-radius: 12px; padding: 12px 14px; cursor: pointer; transition: background 0.15s; border: 1px solid rgba(255,255,255,0.05); }
        @media (hover: hover) and (pointer: fine) { .brigade-row:hover { background: rgba(55,62,70,0.95); } }
        .brigade-block-pill { display: inline-flex; align-items: center; justify-content: center; padding: 5px 12px; border-radius: 8px; font-family: inherit; font-size: 15px; font-weight: 700; color: #FFFFFF; flex-shrink: 0; min-width: 56px; }
        .brigade-row-info { font-family: inherit; font-size: var(--fs-md); font-weight: 400; color: rgba(255,255,255,0.7); line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .brigade-detail-scroll { max-height: 58vh; overflow-y: auto; overscroll-behavior: contain; padding-right: 2px; }
        .brigade-detail-scroll::-webkit-scrollbar { width: 4px; }
        .brigade-detail-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.14); border-radius: 4px; }
        .brigade-route-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
        .brigade-route-filter-pill { display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 8px; font-family: inherit; font-size: var(--fs-sm); font-weight: 700; color: #fff; cursor: pointer; border: 2px solid transparent; transition: filter 0.12s, border-color 0.12s; }
        .brigade-route-filter-pill--inactive { filter: grayscale(0.6) brightness(0.65); }
        .brigade-route-filter-pill .brfp-icon { width: 13px; height: 13px; background: rgba(255,255,255,0.9); flex-shrink: 0; }
        .brigade-trip-block { background: rgba(40,45,50,0.85); border-radius: 12px; padding: 12px 14px 10px 14px; margin-bottom: 4px; cursor: pointer; transition: background 0.15s; border-left: 4px solid transparent; position: relative; }
        @media (hover: hover) and (pointer: fine) { .brigade-trip-block:hover { background: rgba(55,62,70,0.95); } }
        .brigade-trip-header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
        .brigade-trip-line-badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 7px; font-family: inherit; font-size: var(--fs-md); font-weight: 700; color: #fff; flex-shrink: 0; }
        .brigade-trip-line-badge .btlb-icon { width: 13px; height: 13px; background: rgba(255,255,255,0.9); flex-shrink: 0; }
        .brigade-trip-headsign { font-family: inherit; font-size: 15px; font-weight: 700; color: #E7E8E8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; flex: 1; }
        .brigade-trip-timeline { display: flex; flex-direction: column; margin-bottom: 4px; }
        .brigade-trip-tl-row { display: flex; align-items: stretch; gap: 10px; }
        .brigade-trip-tl-time { font-family: inherit; font-size: 15px; font-weight: 500; color: #E7E8E8; line-height: 1; flex-shrink: 0; width: 40px; text-align: right; padding-top: 3px; }
        .brigade-trip-tl-dot-col { display: flex; flex-direction: column; align-items: center; flex-shrink: 0; width: 12px; }
        .brigade-trip-tl-dot { margin-top:5px; }
        .brigade-trip-tl-line { width: 6px; border-radius: 2px; flex: 1; margin-top: 0; margin-bottom: -5px; min-height: 8px; }
        .brigade-trip-tl-stop { font-family: inherit; font-size: 15px; font-weight: 700; color: #E7E8E8; line-height: 1; padding-top: 3px; text-align: left; flex: 1; }
        .brigade-trip-mid-info { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; margin-bottom: 8px; text-align: left; }
        .brigade-trip-meta { display: flex; align-items: center; }
        .brigade-trip-meta-item { font-family: inherit; font-size: var(--fs-xs); color: rgba(255,255,255,0.6); font-weight: 400; text-align: left; }
        .brigade-click-hint { font-family: inherit; font-size: var(--fs-xs); color: var(--text-muted); text-align: left; }
        .brigade-break-separator { display: flex; align-items: center; gap: 8px; padding: 6px 4px; margin: 2px 0; }
        .brigade-break-line { flex: 1; height: 1px; background: rgba(255,255,255,0.08); }
        .brigade-break-text { font-family: inherit; font-size: var(--fs-xs); font-weight: 500; color: var(--text-muted); white-space: nowrap; flex-shrink: 0; }
        .vehicle-more-menu { position: fixed; z-index: var(--z-menu); background: rgba(40, 44, 52, 0.97); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-radius: 14px; box-shadow: 0 8px 32px rgba(0,0,0,0.55); padding: 6px 0; min-width: 220px; max-width: 280px; pointer-events: auto; }
        .vehicle-more-menu--hidden { display: none; }
        .vmm-timestamp { font-family: inherit; font-size: var(--fs-sm); color: var(--text-muted); padding: 8px 18px 4px 18px; user-select: none; }
        .vmm-items { display: flex; flex-direction: column; }
        .vmm-item { display: flex; align-items: center; gap: 14px; padding: 11px 18px; cursor: pointer; font-family: inherit; font-size: 15px; color: rgba(255,255,255,0.92); border: none; background: transparent; text-align: left; transition: background 0.13s; border-radius: 8px; margin: 0 4px; width: calc(100% - 8px); box-sizing: border-box; }
        @media (hover: hover) and (pointer: fine) { .vmm-item:hover { background: rgba(255,255,255,0.08); } }
        .vmm-item svg { width: 18px; height: 18px; flex-shrink: 0; color: rgba(255,255,255,0.65); }
        .search-results-scroll { max-height: 52vh; overflow-y: auto; padding-right: 2px; margin-top: 0; }
        .search-results-scroll::-webkit-scrollbar { width: 4px; }
        .search-results-scroll::-webkit-scrollbar-thumb { background: #ddd; border-radius: 4px; }
        #search-overlay .selection-card { width: min(600px, calc(100vw - 28px)); max-width: 600px; height: min(921px, calc(100dvh - 32px)); max-height: calc(100dvh - 32px); box-sizing: border-box; display: flex; flex-direction: column; padding: 30px 16px 24px; border-radius: 20px; }
        #search-overlay .search-results-scroll { max-height: none; flex: 1 1 auto; min-height: 0; }
        .search-top-row { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
        .search-top-row .search-input-row { flex: 1; margin-bottom: 0; }
        .search-top-back-btn { width: 44px; height: 44px; border: none; border-radius: 12px; background: var(--surface-3); color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; transition: background 0.15s, transform 0.15s; }
        @media (hover: hover) and (pointer: fine) { .search-top-back-btn:hover { background: #454d54; transform: translateY(-1px); } }
        .search-top-back-btn svg { width: 20px; height: 20px; }
        .search-help-title { font-family: inherit; font-size: 24px; font-weight: 500; color: #fff; margin: 0 0 12px; }
        .search-help-card { display: flex; align-items: center; gap: 13px; background: rgba(40, 45, 50, 0.95); border-radius: 13px; padding: 12px 13px; margin-bottom: 9px; }
        .search-help-icon { width: 42px; height: 42px; border-radius: 11px; background: var(--surface-3); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
        .search-help-icon img { width: 20px; height: 20px; object-fit: contain; }
        .search-help-info { min-width: 0; text-align: left; }
        .search-help-card-title { font-family: inherit; font-size: var(--fs-lg); font-weight: 450; color: #fff; line-height: 1.3; margin-bottom: 3px; }
        .search-help-card-text { font-family: inherit; font-size: var(--fs-md); font-weight: 400; color: #b8bdc2; line-height: 1.4; }
        .search-input-row { display: flex; align-items: center; gap: 10px; height: 44px; box-sizing: border-box; background: rgba(40, 45, 50, 0.95); border-radius: 12px; padding: 10px 14px; margin-bottom: 12px; }
        .search-input-row svg { width: 18px; height: 18px; flex-shrink: 0; color: #aaa; }
        #search-input { flex: 1; border: none; outline: none; background: transparent; font-family: inherit; font-size: var(--fs-lg); font-weight: 400; color: #FFFFFF; }
        #search-input::placeholder { color: #bbb; font-size: var(--fs-md); }
        #search-clear-btn { border: none; background: transparent; cursor: pointer; padding: 0 2px; font-size: var(--fs-lg); color: #bbb; line-height: 1; display: none; }
        #search-clear-btn.visible { display: block; }
        .search-hint { font-family: inherit; font-size: var(--fs-md); color: #aaa; text-align: center; padding: 8px 8px 8px 8px; line-height: 1.6; }
        .search-hint b { color: #888; }
        .search-section-title { font-size: var(--fs-lg); font-weight: 550; text-transform: uppercase; letter-spacing: 0.6px; color: #999; padding: 0 2px; margin: 12px 0 6px 0; }
        .search-section-title:first-child { margin-top: 0; }
        .search-result-btn { display: flex; align-items: center; gap: 10px; width: 100%; border: none; background: rgba(40, 45, 50, 0.95); border-radius: 10px; padding: 10px 12px; margin-bottom: 5px; cursor: pointer; text-align: left; transition: background 0.15s; }
        @media (hover: hover) and (pointer: fine) { .search-result-btn:hover { background: #3a4047; transform: translateY(-2px); } }
        .search-result-btn:active { background: rgba(0,0,0,0.12); }
        .search-result-badge { display: inline-flex; align-items: center; justify-content: center; gap: 5px; padding: 5px 9px; border-radius: 8px; font-family: inherit; font-size: var(--fs-sm); font-weight: 700; color: #fff; white-space: nowrap; flex-shrink: 0; }
        .search-result-badge-icon { width: 13px; height: 13px; background: rgba(255,255,255,0.9); flex-shrink: 0; }
        .search-result-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
        .search-result-name { font-family: inherit; font-size: var(--fs-md); font-weight: 500; color: #FFFFFF; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.3; }
        .search-result-sub { font-family: inherit; font-size: var(--fs-xs); color: #888; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.3; }
        .search-no-results { font-family: inherit; font-size: var(--fs-md); color: #aaa; text-align: center; padding: 20px 8px; }
        .search-loading { font-family: inherit; font-size: var(--fs-md); color: #aaa; text-align: center; padding: 20px 8px; }
        .fav-stops-scroll { max-height: 70vh; overflow-y: auto; padding-right: 2px; }
        .fav-stops-scroll::-webkit-scrollbar { width: 4px; }
        .fav-stops-scroll::-webkit-scrollbar-thumb { background: #ddd; border-radius: 4px; }
        .fav-stop-card { background: rgba(40, 45, 50, 0.95); border-radius: 14px; padding: 12px 14px 10px 14px; margin-bottom: 10px; }
        .fav-stop-card-header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
        .fav-stop-card-badge { display: inline-flex; align-items: center; justify-content: center; gap: 4px; padding: 5px 8px; border-radius: 8px; background: var(--surface-3); flex-shrink: 0; }
        .fav-stop-card-badge-icon { width: 15px; height: 15px; background: rgba(255,255,255,0.92); flex-shrink: 0; }
        .fav-stop-card-title { font-family: inherit; font-size: 15px; font-weight: 700; color: #FFFFFF; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.3; }
        .fav-stop-card-edit-btn { width: 28px; height: 28px; border-radius: 999px; border: none; background: rgba(0,0,0,0.06); display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; color: #888; transition: background 0.15s; }
        @media (hover: hover) and (pointer: fine) { .fav-stop-card-edit-btn:hover { background: rgba(0,0,0,0.12); } }
        .fav-stop-card-edit-btn svg { width: 14px; height: 14px; }
        .fav-stop-departure-row { display: flex; align-items: center; gap: 8px; padding: 5px 0; border-top: 1px solid rgba(0,0,0,0.06); cursor: pointer; border-radius: 6px; margin: 0 -4px; padding-left: 4px; padding-right: 4px; transition: background 0.13s; }
        @media (hover: hover) and (pointer: fine) { .fav-stop-departure-row:hover { background: rgba(0,0,0,0.04); } }
        .fav-stop-departure-badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 7px; border-radius: 7px; font-family: inherit; font-size: var(--fs-sm); font-weight: 700; color: #fff; flex-shrink: 0; white-space: nowrap; }
        .fav-stop-departure-badge-icon { width: 12px; height: 12px; background: rgba(255,255,255,0.9); flex-shrink: 0; }
        .fav-stop-departure-headsign { font-family: inherit; font-size: var(--fs-md); font-weight: 500; color: #FFFFFF; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
        .fav-stop-departure-time { font-family: inherit; font-size: var(--fs-md); font-weight: 500; color: #222; white-space: nowrap; text-align: right; flex-shrink: 0; }
        .fav-stop-departure-eta { font-family: inherit; font-size: var(--fs-xs); color: #888; white-space: nowrap; text-align: right; flex-shrink: 0; min-width: 44px; }
        .fav-stop-card-loading { font-family: inherit; font-size: var(--fs-sm); color: #aaa; padding: 4px 0 2px 0; }
        .fav-stop-card-empty { font-family: inherit; font-size: var(--fs-sm); color: #bbb; padding: 4px 0 2px 0; }
        .fav-stops-empty-hint { width:100%; box-sizing:border-box; display:flex; flex-direction:column; align-items:center; gap:10px; font-family: inherit; color:#aaa; text-align:center; padding:34px 16px 24px; line-height:1.55; }
        .fav-stops-empty-hint .empty-state-icon { width:68px; height:68px; border-radius:50%; background:rgba(255,193,7,.16); display:flex; align-items:center; justify-content:center; color:#FFC107; margin:0 auto 3px; }
        .fav-stops-empty-hint .empty-state-icon svg { width:31px; height:31px; }
        .fav-stops-empty-hint .empty-state-title { color:#E7E8E8; font-size: var(--fs-lg); font-weight:500; }
        .fav-stops-empty-hint .empty-state-description { width:100%; font-size: var(--fs-sm); color:#999; text-align:center !important; line-height:1.45; }
        #vehicle-course-panel.vehicle-course-panel--favorites #fav-stops-list { display:flex; flex:1 1 auto; flex-direction:column; min-height:0; padding:0; }
        #vehicle-course-panel.vehicle-course-panel--favorites #fav-stops-empty { flex:1 1 auto; justify-content:center; min-height:0; padding:18px 16px 28px; }
        .fav-config-card { position:relative; overflow:hidden; border:1px solid rgba(44,149,208,.22); background:var(--surface-1); box-shadow:0 20px 55px rgba(0,0,0,.78); padding:20px; }
        .fav-config-card::before { content:''; position:absolute; left:0; top:0; right:0; height:3px; background:#2C95D0; }
        .fav-config-title { padding-bottom:12px; margin-bottom:16px; border-bottom:1px solid rgba(255,255,255,.08); }
        .fav-config-option { border-width:1px; border-radius:12px; padding:11px 12px; background:rgba(255,255,255,.025); }
        .fav-config-option.active { border-color:#2C95D0; background:rgba(44,149,208,.14); box-shadow:inset 3px 0 #2C95D0; }
        .fav-config-actions { margin-top:18px; }
        .fav-config-card { border: 1px solid rgba(255,255,255,0.08); background: var(--surface-2); border-radius: 14px; box-shadow: 0 16px 40px rgba(0,0,0,0.72); padding: 16px 14px 12px; }
        .fav-config-card::before { display: none; }
        .fav-config-title { font-size: 18px; color: #FFFFFF; margin: 0 2px 14px; padding: 0 0 12px; border-bottom: 1px solid rgba(255,255,255,0.08); }
        .fav-config-option { border: 1px solid rgba(255,255,255,0.08); background: #14161a; border-radius: 10px; }
        .fav-config-option.active { border-color: #2C95D0; background: rgba(44,149,208,0.14); box-shadow: inset 3px 0 #2C95D0; }
        .fav-config-actions { border-top: 1px solid rgba(255,255,255,0.08); padding-top: 10px; }
        #fav-config-overlay.overlay-visible { display: flex; align-items: center; justify-content: center; }
        .fav-config-card { width: min(480px, calc(100vw - 28px)); background: rgba(22, 24, 28, 0.96); border-radius: 18px; box-shadow: 0 18px 45px rgba(0,0,0,0.72); padding: 20px 18px 16px 18px; }
        .fav-config-title { font-family: inherit; font-size: var(--fs-xl); font-weight: 700; color: #E7E8E8; margin-bottom: 14px; }
        .fav-config-section-label { font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px; color: var(--text-muted); margin: 12px 0 6px 0; }
        .fav-config-options { display: flex; flex-direction: column; gap: 6px; margin-bottom: 4px; }
        .fav-config-option { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; border: 2px solid rgba(255,255,255,0.08); background: rgba(255,255,255,0.04); cursor: pointer; transition: border-color 0.15s, background 0.15s; font-family: inherit; font-size: var(--fs-md); color: rgba(255,255,255,0.85); user-select: none; }
        @media (hover: hover) and (pointer: fine) { .fav-config-option:hover { background: rgba(255,255,255,0.08); } }
        .fav-config-option.active { border-color: #2C95D0; background: rgba(44,149,208,0.12); color: #fff; }
        .fav-config-option-radio { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.25); display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: border-color 0.15s; }
        .fav-config-option.active .fav-config-option-radio { border-color: #2C95D0; }
        .fav-config-option-radio-dot { width: 8px; height: 8px; border-radius: 50%; background: #2C95D0; display: none; }
        .fav-config-option.active .fav-config-option-radio-dot { display: block; }
        .fav-config-value-section { margin-top: 4px; }
        .fav-config-routes-scroll { display: flex; flex-wrap: nowrap; gap: 8px; overflow-x: auto; padding: 6px 2px 8px 2px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.15) transparent; }
        .fav-config-routes-scroll::-webkit-scrollbar { height: 4px; }
        .fav-config-routes-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 4px; }
        .fav-config-route-pill { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 10px; font-family: inherit; font-weight: 700; font-size: var(--fs-md); color: #fff; cursor: pointer; flex-shrink: 0; border: 2px solid transparent; transition: filter 0.12s, border-color 0.12s, opacity 0.12s; user-select: none; box-shadow: 0 4px 10px rgba(0,0,0,0.35); }
        .fav-config-route-pill--inactive { filter: grayscale(0.85) brightness(0.55); opacity: 0.7; }
        .fav-config-route-pill-icon { width: 13px; height: 13px; background: rgba(255,255,255,0.9); flex-shrink: 0; }
        .fav-config-select { width: 100%; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.10); border-radius: 10px; padding: 10px 14px; font-family: inherit; font-size: var(--fs-md); color: rgba(255,255,255,0.92); outline: none; cursor: pointer; appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.4)' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; margin-top: 2px; }
        .fav-config-select option { background: #1a1d22; color: rgba(255,255,255,0.92); }
        .fav-config-select:focus { border-color: rgba(44,149,208,0.5); }
        .fav-config-multicheck { display: flex; flex-direction: column; gap: 4px; max-height: 160px; overflow-y: auto; margin-top: 4px; padding-right: 2px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.15) transparent; }
        .fav-config-multicheck::-webkit-scrollbar { width: 4px; }
        .fav-config-multicheck::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 4px; }
        .fav-config-check-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.06); cursor: pointer; transition: background 0.13s; user-select: none; }
        @media (hover: hover) and (pointer: fine) { .fav-config-check-item:hover { background: rgba(255,255,255,0.08); } }
        .fav-config-check-item.active { background: rgba(44,149,208,0.12); border-color: rgba(44,149,208,0.35); }
        .fav-config-check-box { width: 16px; height: 16px; border-radius: 4px; border: 2px solid rgba(255,255,255,0.25); display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: border-color 0.13s, background 0.13s; }
        .fav-config-check-item.active .fav-config-check-box { border-color: #2C95D0; background: #2C95D0; }
        .fav-config-check-tick { display: none; color: #fff; font-size: var(--fs-xs); line-height: 1; font-weight: 700; }
        .fav-config-check-item.active .fav-config-check-tick { display: block; }
        .fav-config-check-label { font-family: inherit; font-size: var(--fs-sm); color: rgba(255,255,255,0.85); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
        .fav-config-check-item.active .fav-config-check-label { color: #fff; }
        .fav-config-loading { font-family: inherit; font-size: var(--fs-sm); color: var(--text-muted); padding: 8px 2px; }
        .fav-config-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,0.08); gap: 10px; }
        .fav-config-btn { border: none; background: transparent; cursor: pointer; font-family: inherit; font-size: 15px; font-weight: 700; padding: 8px 12px; border-radius: 10px; transition: background 0.15s; }
        .fav-config-btn--delete { color: #FF6966; }
        .fav-config-btn--cancel { color: var(--text-muted); }
        .fav-config-btn--save   { color: #2C95D0; }
        @media (hover: hover) and (pointer: fine) { .fav-config-btn:hover { background: rgba(255,255,255,0.07); } }
        .fav-config-select-rows { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
        .fav-config-select-row { display: flex; align-items: center; gap: 6px; }
        .fav-config-select-row .fav-config-select { flex: 1; margin-top: 0; }
        .fav-config-select-remove-btn { width: 28px; height: 28px; border-radius: 999px; border: none; background: rgba(255,255,255,0.06); color: var(--text-muted); font-size: var(--fs-lg); line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: background 0.13s, color 0.13s; }
        @media (hover: hover) and (pointer: fine) { .fav-config-select-remove-btn:hover { background: rgba(255,80,80,0.18); color: #FF6966; } }
        .fav-config-add-btn { display: flex; align-items: center; gap: 6px; margin-top: 4px; padding: 7px 10px; border-radius: 9px; border: 1px dashed rgba(255,255,255,0.15); background: transparent; color: var(--text-muted); font-family: inherit; font-size: var(--fs-sm); font-weight: 500; cursor: pointer; transition: background 0.13s, color 0.13s, border-color 0.13s; width: 100%; }
        @media (hover: hover) and (pointer: fine) { .fav-config-add-btn:hover { background: rgba(255,255,255,0.05); color: rgba(255,255,255,0.75); border-color: rgba(255,255,255,0.28); } }
        #delays-overlay.overlay-visible { position: fixed; inset: 0; z-index: var(--z-panel); display: block; overflow-y: auto; background: rgba(22, 24, 28, 0.94); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
        .delays-card { width: 100%; max-width: none; min-height: 100vh; min-height: 100dvh; background: var(--surface-1); border-radius: 0; box-shadow: none; padding: 22px 20px 16px 20px; display: flex; flex-direction: column; box-sizing: border-box; }
        .delays-header { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
        .delays-title { font-family: inherit; font-size: 18px; font-weight: 700; color: #FFFFFF; line-height: 1.1; letter-spacing: 0.1px; }
        .delays-summary-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
        .delays-summary-card { background: #3a4047; border-radius: 12px; padding: 10px 12px; min-height: 74px; display: flex; flex-direction: column; gap: 5px; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.03); }
        .delays-summary-card--clickable { cursor: pointer; transition: transform 0.12s ease, background 0.12s ease; }
        @media (hover: hover) and (pointer: fine) { .delays-summary-card--clickable:hover { transform: translateY(-1px); background: #3a424a; } }
        .delays-summary-label { font-family: inherit; font-size: var(--fs-xs); font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.45px; }
        .delays-summary-value { font-family: inherit; font-size: 18px; font-weight: 700; line-height: 1.05; }
        .delays-summary-value--ontime { color: #65E765; }
        .delays-summary-value--late { color: #FF6966; }
        .delays-summary-value--early { color: #FFC94A; }
        .delays-summary-route { display: inline-flex; align-items: center; gap: 4px; width: fit-content; max-width: 100%; padding: 4px 8px; border-radius: 999px; color: #FFFFFF; font-family: inherit; font-size: var(--fs-xs); font-weight: 700; }
        .delays-summary-route-icon { width: 12px; height: 12px; flex-shrink: 0; background: rgba(255,255,255,0.9); }
        .delays-summary-meta { font-family: inherit; font-size: var(--fs-xs); color: rgba(255,255,255,0.70); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .delays-summary-vehicle { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
        .delays-summary-desc { font-family: inherit; font-size: var(--fs-xs); line-height: 1.3; color: var(--text-muted); }
        .delays-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 14px 0; }
        .delays-toolbar-group { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
        .delays-toolbar-label { font-family: inherit; font-size: var(--fs-xs); font-weight: 500; color: rgba(255,255,255,0.82); }
        .delays-select, .delays-search-input { border: 1px solid rgba(255,255,255,0.10); background: rgba(255,255,255,0.04); color: #FFFFFF; border-radius: 8px; font-family: inherit; font-size: var(--fs-xs); padding: 7px 10px; outline: none; }
        .delays-search-input { width: min(280px, 56vw); }
        .delays-table-wrap { border: 1px solid rgba(255,255,255,0.08); border-radius: 14px; overflow: hidden; background: rgba(14, 16, 20, 0.92); flex: 1; min-height: 0; }
        .delays-table-scroll { max-height: none; height: 100%; overflow: auto; }
        .delays-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
        .delays-table th, .delays-table td { padding: 10px 12px; text-align: left; font-family: inherit; border-bottom: 1px solid rgba(255,255,255,0.07); }
        .delays-table th { position: sticky; top: 0; z-index: 2; background: var(--surface-2); color: rgba(255,255,255,0.88); font-size: var(--fs-xs); font-weight: 700; }
        .delays-table td { color: rgba(255,255,255,0.82); font-size: var(--fs-xs); font-weight: 400; vertical-align: middle; }
        .delays-table tr:nth-child(even) td { background: rgba(255,255,255,0.02); }
        @media (hover: hover) and (pointer: fine) { .delays-table tr:hover td { background: rgba(255,255,255,0.05); } }
        .delays-table .delay-cell { font-weight: 700; font-size: var(--fs-xs); }
        .delays-badge { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; padding: 4px 8px; border-radius: 999px; color: #FFFFFF; font-family: inherit; font-size: var(--fs-xs); font-weight: 700; white-space: nowrap; }
        .delays-badge-icon { width: 11px; height: 11px; flex-shrink: 0; background: rgba(255,255,255,0.92); }
        .delays-link-btn { border: none; background: transparent; color: inherit; padding: 0; margin: 0; font: inherit; cursor: pointer; text-decoration: underline; text-decoration-color: rgba(255,255,255,0.20); text-underline-offset: 2px; }
        @media (hover: hover) and (pointer: fine) { .delays-link-btn:hover { text-decoration-color: currentColor; } }
        .delays-pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 2px 0 2px; }
        .delays-pagination-info { font-family: inherit; font-size: var(--fs-xs); color: rgba(255,255,255,0.62); }
        .delays-pagination-buttons { display: flex; align-items: center; gap: 8px; }
        .delays-pagination-btn { border: 1px solid rgba(255,255,255,0.12); background: rgba(255,255,255,0.04); color: rgba(255,255,255,0.86); border-radius: 9px; padding: 7px 11px; font-family: inherit; font-size: var(--fs-xs); font-weight: 600; cursor: pointer; transition: background 0.12s ease, opacity 0.12s ease; }
        @media (hover: hover) and (pointer: fine) { .delays-pagination-btn:hover { background: rgba(255,255,255,0.08); } }
        .delays-pagination-btn:disabled { opacity: 0.35; cursor: default; }
        .delays-empty { padding: 28px 18px; text-align: center; font-family: inherit; font-size: var(--fs-sm); color: rgba(255,255,255,0.72); }
        .delays-muted { color: var(--text-muted); }
        @media (max-width: 980px) {
            .delays-summary-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
        }
        @media (max-width: 700px) {
            .delays-card { padding: 14px 12px 12px 12px; }
            .delays-title { font-size: var(--fs-lg); }
            .delays-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
            .delays-toolbar { flex-direction: column; align-items: stretch; }
            .delays-toolbar-group { justify-content: space-between; }
            .delays-search-input { width: 100%; }
            .delays-table { min-width: 840px; }
            .settings-card { padding: 14px 12px 12px 12px; }
            .settings-title { font-size: var(--fs-lg); }
            .about-card { padding: 14px 12px 12px 12px; }
            .about-title { font-size: var(--fs-lg); }
        }
        /* ── Dispatches (Przydziały liniowe) overlay ── */
        #dispatches-overlay.overlay-visible { position: fixed; inset: 0; z-index: var(--z-panel); display: block; overflow-y: auto; background: rgba(22, 24, 28, 0.94); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
        .dispatches-card { width: 100%; max-width: none; min-height: 100vh; min-height: 100dvh; background: var(--surface-1); border-radius: 0; box-shadow: none; padding: 22px 20px 16px 20px; display: flex; flex-direction: column; box-sizing: border-box; }
        .dispatches-header { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
        .dispatches-title { font-family: inherit; font-size: 18px; font-weight: 700; color: #FFFFFF; line-height: 1.1; letter-spacing: 0.1px; }
        .dispatches-filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
        .dispatches-filter-group { display: flex; flex-direction: column; gap: 4px; flex: 1 1 140px; min-width: 110px; }
        .dispatches-filter-input { border: 1px solid rgba(255,255,255,0.10); background: rgba(255,255,255,0.04); color: #FFFFFF; border-radius: 9px; font-family: inherit; font-size: var(--fs-md); padding: 9px 11px; outline: none; width: 100%; box-sizing: border-box; transition: border-color 0.15s, background 0.15s; }
        .dispatch-picker { position:relative; }
        .dispatch-picker > button { display:flex; align-items:center; justify-content:space-between; gap:8px; min-height:42px; text-align:left; cursor:pointer; }
        .dispatch-picker > button::after { content:""; width:7px; height:7px; border:solid #aab2bc; border-width:0 2px 2px 0; transform:rotate(45deg); margin:-3px 3px 0 0; }
        .dispatch-picker > button[aria-expanded=true]::after { transform:rotate(225deg); margin-top:4px; }
        .dispatch-picker > button:disabled { opacity:.6; cursor:default; }
        .dispatch-picker button:focus-visible { outline:2px solid #72a9ed; outline-offset:-2px; }
        .dispatch-picker-options { position:absolute; z-index:5; inset:calc(100% + 4px) 0 auto; max-height:min(38dvh,320px); overflow:auto; overscroll-behavior:contain; padding:5px; background:#272c31; border:1px solid #42484f; border-radius:12px; box-shadow:0 8px 24px #0006; }
        .dispatch-picker-option { display:flex; align-items:center; gap:8px; width:100%; padding:6px 9px; min-height:36px; border:0; border-radius:7px; background:transparent; color:#ecf0f3; font:inherit; text-align:left; cursor:pointer; }
        .dispatch-picker-option[aria-pressed=true] { background:#363d44; }@media (hover: hover) and (pointer: fine) { .dispatch-picker-option:hover { background:#363d44; } }
        .dispatch-picker-option[aria-pressed=true]::after { content:"✓"; margin-left:auto; }
        .dispatch-line-pill { display:inline-flex; gap:6px; align-items:center; justify-content:center; min-width:54px; padding:3px 10px; border-radius:9px; font-weight:700; }
        .dispatch-line-icon { background:currentColor; }
        .dispatch-line-icon svg { width:100%; height:100%; }
        .dispatch-days:empty { display:none; }
        .dispatch-days { display:flex; gap:6px; margin:0 0 12px; align-items:stretch; }
        .dispatch-days button,#dispatch-calendar button { border:0; background:#32383e; color:#e8eaed; border-radius:10px; padding:8px; cursor:pointer; font:inherit; }
        .dispatch-days button[data-day] { flex:1 1 0; min-width:0; }
        .dispatch-days small { display:block; margin-top:2px; }
        .dispatch-days button[aria-pressed=true],.dispatch-dialog button[aria-pressed=true] { background:#166adc; color:white; }
        .dispatch-days button:disabled,.dispatch-dialog button:disabled { opacity:.36; cursor:default; }
        #dispatches-results .dispatches-tl-time { width:auto; min-width:100px; flex-wrap:wrap; }
        .dispatch-days svg { width:17px; height:17px; }
        .dispatch-dialog { box-sizing:border-box; margin:auto; position:fixed; inset:0; border:0; border-radius:18px; padding:18px; background:var(--surface-2); color:#e7e8e8; max-height:85dvh; font:14px Roboto,sans-serif; color-scheme:dark; box-shadow:0 16px 64px #0008; }
        .dispatch-dialog::backdrop { background:#080c10aa; }
        .dispatch-dialog header { display:flex; align-items:center; gap:8px; margin-bottom:16px; font-size: var(--fs-lg); }
        .dispatch-dialog header strong { flex:1; }
        #dispatch-calendar-grid { display:grid; grid-template-columns:repeat(7,1fr); gap:4px; text-align:center; }
        #dispatch-calendar-grid small { color:#b6bab8; padding:4px; }
        #dispatch-detail { width:min(540px,94vw); }
        #dispatch-detail .vehicle-timeline { margin-top:12px; }
        #dispatch-detail .vehicle-timeline::before { display:none; }
        #dispatch-detail .vehicle-stop { position:relative; cursor:default; }
        #dispatch-detail .vehicle-stop:not(:last-child)::before { content:""; position:absolute; left:18px; top:19px; height:100%; width:4px; background:var(--route-line-color); }
        #dispatch-detail .dispatch-transfer { color:#bac0c7; }
        #dispatch-detail .dispatch-transfer::before { top:0 !important; }
        #dispatch-detail-body > .vehicle-stop-details { overflow-wrap:anywhere; }
        #dispatches-results button.brigade-trip-block { width:100%; text-align:left; color:inherit; border:0; }
        .dispatches-count { font-family: inherit; font-size: var(--fs-xs); color: var(--text-muted); margin: 2px 2px 8px 2px; min-height: 15px; }
        .dispatches-results { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding-right: 2px; }
        .dispatches-results::-webkit-scrollbar { width: 4px; }
        .dispatches-results::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.18); border-radius: 4px; }
        .dispatches-hint { font-family: inherit; font-size: var(--fs-sm); color: var(--text-muted); text-align: center; padding: 36px 14px; line-height: 1.5; }
        .dispatches-tl-time { font-family: inherit; display: flex; align-items: baseline; gap: 4px; flex-shrink: 0; width: 100px; padding-top: 3px; }
        .dispatches-tl-time-planned { font-size: var(--fs-md); font-weight: 600; color: #E7E8E8; flex-shrink: 0; text-align: left; }
        .dispatches-tl-time-real { font-size: var(--fs-md); font-weight: 700; flex-shrink: 0; text-align: left; }
        .dispatches-tl-time-real--no-data { color: var(--text-muted) !important; font-weight: 500; }
        .dispatches-headsign { margin-left: 6px; }
        .dispatches-shortened-tag { font-family: inherit; font-size: var(--fs-xs); font-weight: 600; color: var(--text-muted); margin-left: 6px; white-space: nowrap; }
        @media (max-width: 700px) {
            .dispatches-card { padding: 14px 12px 12px 12px; }
            .dispatches-title { font-size: var(--fs-lg); }
            .dispatches-filters { flex-wrap: wrap; }
            .dispatches-filter-group { flex: 1 1 100%; }
            .dispatches-tl-time { width: 86px; gap: 3px; }
            .dispatches-tl-time-planned, .dispatches-tl-time-real { font-size: var(--fs-sm); }
        }
        .user-location-marker { position: relative; width: 20px; height: 20px; cursor: default; }
        .user-location-dot { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 14px; height: 14px; background: #2C95D0; border: 2.5px solid #FFFFFF; border-radius: 50%; box-shadow: 0 2px 6px rgba(0,0,0,0.4); z-index: 2; }
        .user-location-pulse { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 14px; height: 14px; border-radius: 50%; background: rgba(44,149,208,0.35); animation: user-pulse 2s ease-out infinite; z-index: 1; }
        @keyframes user-pulse { 0% { transform: translate(-50%,-50%) scale(1); opacity: 0.8; } 100% { transform: translate(-50%,-50%) scale(3.5); opacity: 0; } }

        /* ── Schedules full-screen overlay ── */
#schedules-overlay.overlay-visible {
    position: fixed; inset: 0; z-index: var(--z-panel); display: block;
    overflow: hidden; background: rgba(22, 24, 28, 0.94);
    backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.schedules-card {
    width: 100%; height: 102%; min-height: 102%; background: var(--surface-1);
    border-radius: 0; box-shadow: none; padding: 22px 20px 28px 20px;
    display: flex; flex-direction: column; box-sizing: border-box;
}
.schedules-header { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.schedules-title { font-family: inherit; font-size: var(--fs-xl); font-weight: 700; color: #FFFFFF; line-height: 1.1; }
.schedules-routes-panel {
    flex: 1;
    min-height: 0;
    max-height: none;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y;
}
.schedules-section-title {
    font-size: var(--fs-lg); font-family: inherit; font-weight: 700;
    letter-spacing: 0.8px; text-transform: uppercase; color: rgba(255,255,255,0.65);
    margin: 0 5px 6px 5px;
    text-align: center;
}
.settings-card {
    width: 100%; height: 100vh; height: 100dvh; background: var(--surface-1);
    border-radius: 0; box-shadow: none; padding: 22px 20px calc(28px + env(safe-area-inset-bottom, 0px)) 20px;
    display: flex; flex-direction: column; box-sizing: border-box;
}
.settings-header { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; padding-bottom: 14px; border-bottom: 1px solid var(--line-subtle); }
.settings-title { font-family: inherit; font-size: var(--fs-xl); font-weight: 700; color: #FFFFFF; line-height: 1.1; }
.settings-panel { flex: 1; min-height: 0; overflow-y: auto; padding-right: 4px; -webkit-overflow-scrolling: touch; touch-action: pan-y; overscroll-behavior: contain; }
.settings-panel::-webkit-scrollbar { width: 4px; }
.settings-panel::-webkit-scrollbar-thumb { background: rgba(255,255,255,.14); border-radius: 4px; }
/* Settings follow the same dark, layered visual language as the other panels. */
.about-card {
    width: 100%; min-height: 100vh; min-height: 100dvh; background: var(--surface-1);
    border-radius: 0; box-shadow: none; padding: 22px 20px 28px 20px;
    display: flex; flex-direction: column; box-sizing: border-box;
}
.about-header { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.about-title { font-family: inherit; font-size: var(--fs-xl); font-weight: 700; color: #FFFFFF; line-height: 1.1; }
.about-panel { flex: 1; overflow-y: auto; padding-right: 4px; }
.about-panel::-webkit-scrollbar { width: 4px; }
.about-panel::-webkit-scrollbar-thumb { background: rgba(255,255,255,.14); border-radius: 4px; }
.about-panel p {
    color: #fff;
}

/* ── Route Scheme full-screen overlay ── */
#route-scheme-overlay.overlay-visible {
    position: fixed; inset: 0; z-index: var(--z-panel); display: block;
    overflow: hidden; background: rgba(22, 24, 28, 0.94);
    backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.route-scheme-card {
    width: 100%; height: 102%; min-height: 102%; background: var(--surface-1);
    border-radius: 0; box-shadow: none; padding: 22px 20px 28px 20px;
    display: flex; flex-direction: column; box-sizing: border-box;
}
.route-scheme-header { 
    display: flex; align-items: center; gap: 12px; margin-bottom: 18px; 
    justify-content: space-between;
}
.route-scheme-title { 
    font-family: inherit; font-size: var(--fs-xl); font-weight: 700; color: #FFFFFF; line-height: 1.1; 
    flex: 1;
}
.route-scheme-direction-toggle {
    width: 34px; height: 34px; border-radius: 10px; border: none;
    background: rgba(255, 255, 255, 0.07); display: flex; align-items: center;
    justify-content: center; cursor: pointer; flex-shrink: 0;
    transition: background 0.15s;
}
@media (hover: hover) and (pointer: fine) { .route-scheme-direction-toggle:hover {
    background: rgba(255, 255, 255, 0.12);
} }
.route-scheme-direction-toggle { position: relative; color: var(--text-primary); }
.route-scheme-direction-toggle::after { content: ""; position: absolute; inset: -5px; }
.route-scheme-direction-toggle svg {
    width: 18px; height: 18px;
}
.route-scheme-badge-row {
    display: flex; align-items: center; gap: 8px; margin-bottom: 18px;
}
.route-scheme-graph-container {
    flex: 1; min-height: 0; overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y;
}
.route-scheme-graph {
    display: flex; flex-direction: column; gap: 0; padding: 0 0 4px 8px;
    position: relative;
}
.route-scheme-graph-loading {
    display: flex; align-items: center; justify-content: center;
    min-height: 200px; font-family: inherit;
    font-size: var(--fs-lg); color: rgba(255, 255, 255, 0.65);
}
.route-scheme-stop {
    display: flex; flex-direction: row; align-items: center;
    gap: 10px; padding: 12px 0; position: relative;
}
.route-scheme-stop-markers {
    position: relative;
    flex: 0 0 var(--route-scheme-markers-width, 44px);
    width: var(--route-scheme-markers-width, 44px);
    min-height: 16px;
}
.route-scheme-stop-dot { position:relative; z-index:1; }
.route-scheme-stop-dot--base { position:absolute; left:0; top:50%; transform:translateY(-50%); }
.route-scheme-stop-dot--branch {
    --dot-color:var(--route-branch-color);
    position:absolute; top:50%; transform:translate(-50%,-50%);
    width:10px; height:10px; border-width:2px;
}
.route-scheme-stop-dot--ghost { visibility:hidden; pointer-events:none; }
.route-scheme-stop-dot--variant-node { outline:1px solid var(--dot-color); outline-offset:1px; }

.route-scheme-stop-info {
    display: flex; flex-direction: column; gap: 2px; flex: 1;
}
.route-scheme-stop--variant .route-scheme-stop-name {
    color: rgba(255, 255, 255, 0.75);
    font-weight: 500;
}
.route-scheme-stop--variant .route-scheme-stop-code {
    color: var(--text-muted);
}
.route-scheme-stop-name {
    font-family: inherit; font-size: var(--fs-md); font-weight: 600;
    color: #FFFFFF; line-height: 1.2;
}
.route-scheme-stop-code {
    font-family: inherit; font-size: var(--fs-xs);
    color: var(--text-muted); font-weight: 500;
}
.route-scheme-stop--node .route-scheme-stop-name {
    /* Przystanek-węzeł: widoczny jak główny, bo to rzeczywiście przystanek na trasie */
    color: #FFFFFF;
    font-weight: 600;
}
/* Mała etykieta "wariant" przy przystanku-węźle — opcjonalna */
.route-scheme-stop--node .route-scheme-stop-branch-hint {
    font-family: inherit;
    font-size: var(--fs-xs);
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.3px;
    margin-top: 1px;
}
.route-scheme-variant-separator {
    display: flex; align-items: center; gap: 8px; padding: 8px 0;
    margin: 4px 0; opacity: 0.7;
}
.route-scheme-variant-line {
    flex: 1; height: 1px; background: rgba(255, 255, 255, 0.1);
}
.route-scheme-variant-label {
    font-family: inherit; font-size: var(--fs-xs); font-weight: 500;
    color: var(--text-muted); text-transform: uppercase;
    letter-spacing: 0.5px; white-space: nowrap;
}

/* ── City Popup ── */
#city-popup-overlay {
    position: fixed;
    inset: 0;
    z-index: var(--z-city-popup);
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.55);
    padding: 16px;
}
#city-popup-overlay.popup-visible { display: flex; }
#city-popup-card {
    background: var(--surface-2);
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.75);
    width: 100%;
    max-width: 480px;
    padding: 18px 20px 20px 20px;
    animation: cityPopupFadeIn 0.25s ease;
}
@keyframes cityPopupFadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}
#city-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}
#city-popup-title {
    font-family: inherit;
    font-size: 18px;
    font-weight: 700;
    color: #FFFFFF;
    flex: 1;
}
#city-popup-close {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    border: none;
    padding: 0;
    background: var(--surface-3);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    margin-left: 12px;
    transition: background 0.15s;
}
@media (hover: hover) and (pointer: fine) { #city-popup-close:hover { background: var(--surface-4); } }
#city-popup-close img { width: 18px; height: 18px; }
#city-popup-content {
    font-family: inherit;
    font-size: var(--fs-md);
    color: #E7E8E8;
    line-height: 1.6;
}
#city-popup-content p { margin: 0 0 8px 0; }
#city-popup-content p:last-child { margin-bottom: 0; }

@media (max-width: 768px), (pointer: coarse) {
    .vehicle-panel {
        padding: 0;
    }

    .vehicle-panel-card {
        max-width: 100vw;
        height: auto;
        min-height: min(25dvh, 220px);
        max-height: min(74dvh, 680px);
        border-radius: 22px 22px 0 0;
        padding: 6px calc(12px + env(safe-area-inset-right, 0px)) calc(12px + env(safe-area-inset-bottom, 0px)) calc(12px + env(safe-area-inset-left, 0px));
    }

    .drag-handle {
        padding: 6px 0 8px 0;
    }

    .drag-handle-bar {
        width: 48px;
        height: 5px;
    }

    .vehicle-panel-header {
        gap: 8px;
        align-items: center;
        margin-bottom: 8px;
    }

    .vehicle-badge {
        max-width: 42%;
        padding: 6px 10px;
        min-height: 38px;
    }

    .vehicle-badge-icon {
        width: 18px;
        height: 18px;
    }

    .vehicle-badge-line,
    .vehicle-headsign {
        font-size: 15px;
        line-height: 1.15;
    }

    .vehicle-headsign {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        display: block;
        position: relative;
    }

    .vehicle-panel-buttons {
        gap: 6px;
    }

    .overlay-back-btn,
    #city-popup-close,
    #mm-close {
        width: 44px;
        height: 44px;
    }

    .overlay-back-btn svg,
    #city-popup-close img,
    #mm-close img {
        width: 20px;
        height: 20px;
    }

    .vehicle-panel-buttons .vehicle-btn {
        width: 38px;
        height: 38px;
    }

    .vehicle-panel-buttons .vehicle-btn svg {
        width: 18px;
        height: 18px;
    }

    .vehicle-panel-body {
        max-height: calc(60dvh - 76px);
        padding: 11px 12px 14px;
    }

    .routes-panel {
        max-height: 56dvh;
        padding: 12px 12px 12px;
    }

    .settings-card { height:100dvh; min-height:0; padding-bottom:calc(16px + env(safe-area-inset-bottom, 0px)); }
    .settings-panel { min-height:0; overflow-y:auto; -webkit-overflow-scrolling:touch; touch-action:pan-y; }

    .schedules-routes-panel {
        max-height: none;
    }

    .route-pill,
    .stop-tab,
    .date-strip-nav,
    .stop-time-date-btn {
        min-height: var(--touch-target);
    }

    .route-pill {
        padding: 9px 14px;
        font-size: 15px;
        border-radius: 12px;
    }

    .route-pill-icon {
        width: 17px;
        height: 17px;
    }

    .stop-panel-tabs {
        gap: 6px;
    }

    .stop-tab {
        padding: 8px 12px;
        font-size: var(--fs-sm);
    }

    #stop-time-overlay .selection-card,
    #search-overlay .selection-card,
    #fav-stops-overlay .selection-card,
    #route-details-overlay .route-details-card,
    #brigades-overlay .selection-card,
    #brigade-detail-overlay .selection-card {
        width: min(calc(100vw - (var(--mobile-side-gap) * 2)), var(--panel-mobile-max-width));
        height: min(921px, calc(100dvh - (var(--mobile-side-gap) * 2)));
        max-height: calc(100dvh - (var(--mobile-side-gap) * 2));
    }

    #search-overlay .selection-card {
        width: 100vw;
        max-width: none;
        height: 100dvh;
        max-height: none;
        min-height: 100dvh;
        padding: calc(14px + env(safe-area-inset-top, 0px))
                 calc(14px + env(safe-area-inset-right, 0px))
                 calc(18px + env(safe-area-inset-bottom, 0px))
                 calc(14px + env(safe-area-inset-left, 0px));
        border-radius: 0;
    }

    .search-input-row {
        height: 48px;
        padding: 12px 14px;
        border-radius: 14px;
    }

    .search-top-back-btn {
        width: 48px;
        height: 48px;
    }

    .search-help-card {
        padding: 13px 14px;
    }

    .search-result-btn {
        padding: 11px 13px;
        margin-bottom: 7px;
        border-radius: 12px;
    }

    .search-result-badge {
        min-height: 32px;
        padding: 6px 10px;
        font-size: var(--fs-md);
    }

    .search-result-name {
        font-size: 15px;
    }

    .search-result-sub {
        font-size: var(--fs-sm);
    }

    .vehicle-stop {
        grid-template-columns: 0 20px minmax(0, 1fr) auto;
        column-gap: 10px;
        padding: 9px 0;
    }

    .vehicle-timeline::before {
        left: 27px;
    }

    .vehicle-stop-time,
    .vehicle-stop-time--passed,
    .vehicle-stop-time--planned-strike,
    .vehicle-stop-time--late-main,
    .vehicle-stop-time--early-main,
    .vehicle-stop-name,
    .vehicle-stop-eta {
        font-size: var(--fs-lg);
    }

    .vehicle-stop-status {
        font-size: var(--fs-sm);
    }

    .vehicle-stop-dot {
        width: 13px;
        height: 13px;
    }

    .vehicle-stop-vehicle-icon {
        width: 20px;
        height: 20px;
    }

    .stop-departure-row {
        column-gap: 12px;
        align-items: center;
    }

    .stop-departure-top-row {
        flex-wrap: nowrap;
    }

    .stop-departure-line-badge {
        padding: 5px 9px;
    }

    .stop-departure-line-name,
    .stop-departure-headsign,
    .stop-departure-time-main {
        font-size: 15px;
    }

    .stop-departure-headsign {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        line-height: 1.2;
    }

    .stop-departure-status,
    .stop-departure-platform,
    .stop-departure-eta {
        font-size: var(--fs-sm);
    }

    .stop-table-route-pill,
    .stop-table-main-headsign .stop-table-main-route-pill {
        padding: 7px 10px;
        font-size: var(--fs-md);
    }

    .stop-table-main-headsign .stop-table-main-route-pill .route-pill-icon {
        width: 17px;
        height: 17px;
    }

    .stop-table-main-headsign,
    .stop-table-hour {
        font-size: var(--fs-xl);
    }

    .stop-table-minute {
        padding: 2px 2px;
        font-size: var(--fs-lg);
    }

    .date-strip-nav,
    .overlay-back-btn {
        border-radius: 12px;
    }
}

@media (hover: none) {
    .route-pill:hover,
    .search-result-btn:hover,
    .stop-departure-row--clickable:hover,
    .overlay-back-btn:hover,
    .date-strip-nav:hover,
    #city-popup-close:hover {
        transform: none;
        filter: none;
    }
}


    
        /* =====================================================================
           Time picker + favourite-stop config — final, consistent look
           ===================================================================== */
        #stop-time-overlay, #fav-config-overlay {
            --dlg-bg: #212629; --dlg-surface: #2b3035; --dlg-surface-hover: #343b41;
            --dlg-text: #e7ecf0; --dlg-muted: #9aa6b0; --dlg-accent: #0d6efd; --dlg-accent-hover: #2a7fff;
            --dlg-danger: #ff6b68;
        }
        #stop-time-overlay.overlay-visible, #fav-config-overlay.overlay-visible { background: rgba(8,10,12,.62); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
        #stop-time-overlay button:focus-visible, #fav-config-overlay button:focus-visible, #fav-config-overlay input:focus-visible { outline: 2px solid #83b6ff; outline-offset: 2px; }

        /* ---------- Time picker ---------- */
        #stop-time-overlay .selection-card { width: min(380px, calc(100vw - 24px)) !important; max-width: none; height: auto !important; min-height: 0; max-height: calc(100dvh - 24px) !important; overflow-y: auto; box-sizing: border-box; display: block; padding: 16px; border-radius: 28px; background: var(--dlg-bg); border: 1px solid rgba(255,255,255,.06); box-shadow: 0 24px 60px rgba(0,0,0,.6); text-align: left; color: var(--dlg-text); scrollbar-width: none; }
        #stop-time-overlay .selection-card::-webkit-scrollbar { display: none; }
        .stop-time-tabs { display: flex; gap: 4px; padding: 4px; background: var(--dlg-surface); border-radius: 16px; margin: 0 0 18px; }
        .stop-time-tabs button { flex: 1; min-height: 42px; border: 0; border-radius: 12px; background: transparent; color: var(--dlg-muted); font: 600 14px 'Roboto', sans-serif; cursor: pointer; transition: background .15s, color .15s, box-shadow .15s; }
        @media (hover: hover) and (pointer: fine) { .stop-time-tabs button:hover:not(.active) { color: #fff; } }
        .stop-time-tabs button.active { background: var(--dlg-accent); color: #fff; box-shadow: 0 4px 12px rgba(13,110,253,.35); }
        .stop-time-date-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 14px; }
        .stop-time-date-btn { width: 40px; height: 40px; min-height: 40px; padding: 0; border: 0; border-radius: 12px; background: var(--dlg-surface); color: var(--dlg-text); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; transform: none; transition: background .15s; }
        @media (hover: hover) and (pointer: fine) { .stop-time-date-btn:hover { background: var(--dlg-surface-hover); transform: none; } }
        .stop-time-date-btn svg { width: 18px; height: 18px; }
        .stop-time-date-label { flex: 1; text-align: center; font: 700 17px 'Roboto', sans-serif; color: #fff; text-transform: capitalize; letter-spacing: .2px; }
        .stop-time-weekdays, .stop-time-calendar { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
        .stop-time-weekdays { margin-bottom: 8px; text-align: center; color: var(--dlg-muted); font: 700 12px 'Roboto', sans-serif; text-transform: capitalize; }
        .stop-time-calendar { margin-bottom: 14px; }
        .stop-time-calendar button { height: 40px; padding: 0; border: 0; border-radius: 12px; background: var(--dlg-surface); color: var(--dlg-text); font: 600 15px 'Roboto', sans-serif; cursor: pointer; transition: background .12s; }
        @media (hover: hover) and (pointer: fine) { .stop-time-calendar button:hover:not(.active) { background: var(--dlg-surface-hover); } }
        .stop-time-calendar button.today:not(.active) { box-shadow: inset 0 0 0 1.5px rgba(110,154,195,.85); }
        .stop-time-calendar button.active { background: var(--dlg-accent); color: #fff; box-shadow: 0 4px 12px rgba(13,110,253,.35); }
        .stop-time-clock { position: relative; display: flex; align-items: center; justify-content: center; margin: 0 0 10px; padding: 10px 52px; border-radius: 16px; background: var(--dlg-surface); color: var(--dlg-muted); cursor: text; transition: box-shadow .15s; }
        .stop-time-clock:focus-within { box-shadow: 0 0 0 2px rgba(13,110,253,.7); }
        .stop-time-clock input { width: 100%; min-width: 0; border: 0; outline: none; background: transparent; color: var(--dlg-text); font: 700 30px/1.2 'Roboto Mono', ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: 2px; text-align: center; color-scheme: dark; }
        .stop-time-clock input::-webkit-calendar-picker-indicator { display: none; }
        .stop-time-clock svg { position: absolute; right: 18px; top: 50%; width: 20px; height: 20px; margin-top: -10px; pointer-events: none; }
        .stop-time-shortcuts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
        .stop-time-shortcuts button { min-height: 44px; border: 0; border-radius: 12px; background: var(--dlg-surface); color: var(--dlg-text); font: 600 14px 'Roboto', sans-serif; cursor: pointer; transition: background .12s, transform .08s; }
        @media (hover: hover) and (pointer: fine) { .stop-time-shortcuts button:hover { background: var(--dlg-surface-hover); } }
        .stop-time-shortcuts button:active { transform: scale(.97); }
        .stop-time-actions { display: flex; margin-top: 16px; }
        #st-ok-btn { width: 100%; min-height: 50px; padding: 0 16px; border-radius: 14px; background: var(--dlg-accent); color: #fff; font: 700 16px 'Roboto', sans-serif; transition: background .15s; }
        @media (hover: hover) and (pointer: fine) { #st-ok-btn:hover { background: var(--dlg-accent-hover); } }

        /* ---------- Favourite stop config ---------- */
        #fav-config-overlay.overlay-visible { padding: 12px; box-sizing: border-box; }
        #fav-config-overlay .fav-config-card { width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); display: flex; flex-direction: column; box-sizing: border-box; padding: 16px 16px 14px; border: 1px solid rgba(255,255,255,.06); border-radius: 26px; background: var(--dlg-bg); box-shadow: 0 24px 60px rgba(0,0,0,.6); overflow-y: auto; scrollbar-width: none; }
        #fav-config-overlay .fav-config-card::-webkit-scrollbar { display: none; }
        .fav-config-header { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; flex-shrink: 0; }
        .fav-config-back { width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; border: 0; border-radius: 12px; background: transparent; color: var(--dlg-text); cursor: pointer; transition: background .15s; }
        @media (hover: hover) and (pointer: fine) { .fav-config-back:hover { background: rgba(255,255,255,.07); } }
        .fav-config-back svg { width: 22px; height: 22px; }
        .fav-config-header .fav-config-title { flex: 1; min-width: 0; margin: 0; padding: 0; border: 0; font: 700 20px/1.25 'Roboto', sans-serif; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
        .fav-config-title-code { margin-left: 8px; font-size: 15px; font-weight: 500; color: var(--dlg-muted); }
        .fav-config-hint { margin: 0 0 4px; color: var(--dlg-muted); font-size: var(--fs-sm); line-height: 1.55; flex-shrink: 0; }
        .fav-config-hint--last { margin-bottom: 14px; }
        #fav-config-overlay .fav-config-options { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 0 14px; flex-shrink: 0; }
        #fav-config-overlay .fav-config-option { display: flex; align-items: center; justify-content: center; min-height: 48px; padding: 8px 10px; border: 0; border-radius: 14px; background: var(--dlg-surface); color: var(--dlg-muted); font: 600 13px/1.25 'Roboto', sans-serif; text-align: center; box-shadow: none; cursor: pointer; transition: background .15s, color .15s, box-shadow .15s; }
        @media (hover: hover) and (pointer: fine) { #fav-config-overlay .fav-config-option:hover { background: var(--dlg-surface-hover); color: #fff; } }
        #fav-config-overlay .fav-config-option.active { background: var(--dlg-accent); color: #fff; box-shadow: 0 4px 12px rgba(13,110,253,.3); }
        #fav-config-value-section { flex: 0 1 auto; min-height: 0; margin: 0; }
        #fav-config-value-label { display: none; }
        #fav-config-value-body { color: var(--dlg-muted); font-size: var(--fs-md); }
        .fav-config-loading { padding: 8px 2px; }
        .fav-config-search { width: 100%; box-sizing: border-box; min-height: 44px; margin: 0 0 8px; padding: 0 14px; border: 0; border-radius: 12px; background: var(--dlg-surface); color: var(--dlg-text); font: 400 14px 'Roboto', sans-serif; outline: none; }
        .fav-config-search::placeholder { color: #7f8b95; }
        .fav-config-search:focus { box-shadow: 0 0 0 2px rgba(13,110,253,.65); }
        .fav-config-choice-list { max-height: max(168px, min(340px, calc(100dvh - 410px))); overflow-y: auto; margin: 0 -4px; padding: 0 4px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.18) transparent; }
        .fav-config-choice-list::-webkit-scrollbar { width: 4px; }
        .fav-config-choice-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,.18); border-radius: 4px; }
        .fav-config-choice { display: flex; align-items: center; gap: 10px; min-height: 54px; padding: 6px 6px 6px 4px; border-radius: 12px; cursor: pointer; user-select: none; transition: background .12s; }
        @media (hover: hover) and (pointer: fine) { .fav-config-choice:hover { background: rgba(255,255,255,.04); } }
        .fav-config-choice[hidden] { display: none; }
        .fav-config-type-icon { width: 30px; height: 30px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; }
        .fav-config-type-icon .fav-config-route-pill-icon { width: 16px; height: 16px; }
        .fav-config-line-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 52px; padding: 5px 10px; box-sizing: border-box; border-radius: 8px; color: #fff; font: 700 15px 'Roboto', sans-serif; flex-shrink: 0; }
        .fav-config-choice-name { flex: 1; min-width: 0; color: var(--dlg-text); font-size: 15px; line-height: 1.3; overflow-wrap: anywhere; }
        .fav-config-choice input { -webkit-appearance: none; appearance: none; width: 28px; height: 28px; margin: 0; flex-shrink: 0; border: 2px solid rgba(255,255,255,.7); border-radius: 9px; background: transparent center / 18px no-repeat; cursor: pointer; transition: background-color .12s, border-color .12s; }
        .fav-config-choice input:checked { border-color: var(--dlg-accent); background-color: var(--dlg-accent); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E"); }
        .fav-config-error { margin: 8px 2px 0; color: #ffadad; font-size: var(--fs-sm); }
        #fav-config-overlay .fav-config-actions { display: flex; align-items: stretch; gap: 8px; margin: 14px 0 0; padding: 0; border: 0; flex-shrink: 0; }
        #fav-config-overlay .fav-config-btn { min-height: 50px; padding: 0 16px; border: 0; border-radius: 14px; font: 700 15px 'Roboto', sans-serif; cursor: pointer; transition: background .15s, opacity .15s; }
        #fav-config-overlay .fav-config-btn--secondary { flex: 1; background: var(--dlg-surface); color: #c4ced6; }
        @media (hover: hover) and (pointer: fine) { #fav-config-overlay .fav-config-btn--secondary:hover:not(:disabled) { background: var(--dlg-surface-hover); } }
        #fav-config-overlay .fav-config-btn--secondary:disabled { opacity: .45; cursor: default; }
        #fav-config-overlay .fav-config-btn--delete { flex: none; width: 50px; padding: 0; align-items: center; justify-content: center; background: rgba(255,107,104,.12); color: var(--dlg-danger); }
        @media (hover: hover) and (pointer: fine) { #fav-config-overlay .fav-config-btn--delete:hover { background: rgba(255,107,104,.22); } }
        #fav-config-overlay .fav-config-btn--delete svg { width: 20px; height: 20px; }
        #fav-config-overlay #fav-config-save-btn { flex: 1; background: var(--dlg-accent); color: #fff; }
        @media (hover: hover) and (pointer: fine) { #fav-config-overlay #fav-config-save-btn:hover:not(:disabled) { background: var(--dlg-accent-hover); } }
        #fav-config-overlay #fav-config-save-btn:disabled { opacity: .5; cursor: wait; }

/* =====================================================================
   Audit additions: touch targets, responsive steps, motion, a11y
   ===================================================================== */
.about-card, .delays-card, .dispatches-card {
    padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px));
}
[role="dialog"]:focus { outline: none; }

/* 44px hit areas for small controls (visual size unchanged) */
.fav-stop-card-edit-btn, .fav-config-select-remove-btn { position: relative; }
.fav-stop-card-edit-btn::after, .fav-config-select-remove-btn::after { content: ""; position: absolute; inset: -8px; }

/* Shared scrollbar look (use on any scrollable panel) */
.scrollable { overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.18) transparent; }
.scrollable::-webkit-scrollbar { width: 6px; }
.scrollable::-webkit-scrollbar-thumb { background: rgba(255,255,255,.14); border-radius: 6px; }

/* iOS zooms the page on focus when text fields are < 16px */
@media (pointer: coarse) {
    input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), select, textarea { font-size: max(var(--fs-lg), 1em); }
}

/* Small phones */
@media (max-width: 360px) {
    .selection-card, .settings-card, .about-card, .delays-card, .dispatches-card { padding-left: 14px; padding-right: 14px; }
    .vi-grid { grid-template-columns: 1fr; }
    .stop-panel-tabs { flex-wrap: wrap; }
}

/* Landscape phones: panel docks to the side, map stays visible */
@media (max-height: 500px) and (orientation: landscape) {
    .vehicle-panel { justify-content: flex-start; }
    .vehicle-panel-card {
        width: min(420px, 45vw);
        max-width: none;
        height: calc(100dvh - 16px);
        max-height: calc(100dvh - 16px);
        border-radius: var(--radius-lg);
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .vehicle-headsign.marquee-active,
    .vi-cell-value.marquee-active { text-overflow: ellipsis; }
    .vehicle-headsign.marquee-active .marquee-inner,
    .vi-cell-value.marquee-active > span { animation: none; }
}



/* ── About page: centered brand + one card per piece of information ── */
.about-brand { text-align: center; padding: 8px 0 20px; }
.about-brand .logo-icon { display: block; margin: 0 auto 12px; }
.about-brand .main-title { margin-bottom: 8px; }
.about-brand .about-version { margin-bottom: 0; font-size: var(--fs-lg); }
.about-brand .about-author { margin-bottom: 4px; font-size: var(--fs-md); color: rgba(255,255,255,0.7); }
.about-panel .about-content.about-item {
    display: flex; align-items: center; gap: 14px;
    max-width: 720px; margin: 0 auto 10px; padding: 14px 16px;
}
.about-item .menu-icon { margin: 0; flex-shrink: 0; width: 44px; height: 44px; }
.about-item .menu-icon i,
.about-item .menu-icon svg { width: 20px; height: 20px; }
.about-item-text { flex: 1; min-width: 0; }
.about-item-text p { margin: 0; overflow-wrap: anywhere; }
.about-item--small .about-item-text p { font-size: var(--fs-sm); color: rgba(255,255,255,0.7); }
.about-item--small .about-item-text a { color: inherit; }
