* { box-sizing: border-box; margin: 0; padding: 0; }
    html, body { height: 100%; font-family: Arial, sans-serif; }
    #map { position: absolute; top: 0; left: 0; right: 0; bottom: 0; z-index: 1; overflow: hidden; }

    #topbar {
        position: absolute; top: 0; left: 0; right: 0; z-index: 3500;
        display: flex; flex-direction: column; padding: 0;
        pointer-events: none;
    }
    #topbar-row1, #topbar-row2, #topbar-row3,
    #nav-topbar-card, #nav-card-then, #nav-hud, #nav-bottom-wrap {
        pointer-events: all;
    }

    /* Row 1 - fuel pills - brand gradient */
    #topbar-row1 {
        background: linear-gradient(135deg, #b45309 0%, #d97706 60%, #f59e0b 100%);
        padding: 8px 12px;
        display: flex; gap: 5px; flex-wrap: wrap; justify-content: space-between;
    }
    .fuel-pill {
        flex: 1; text-align: center;
        padding: 5px 8px; border-radius: 20px; font-size: 12px; font-weight: 700;
        text-decoration: none; border: 1.5px solid rgba(255,255,255,0.4);
        color: rgba(255,255,255,0.85); background: rgba(255,255,255,0.15);
        cursor: pointer; transition: all .15s; white-space: nowrap;
    }
    .fuel-pill:hover { background: rgba(255,255,255,0.3); color: #fff; }
    .fuel-pill.active { background: #fff; border-color: #fff; color: #b45309; }
    .fuel-pill.unavailable { opacity: .4; cursor: not-allowed; pointer-events: none; }

    /* Row 2 - stats - warm tint */
    #topbar-row2 {
        background: rgba(254,243,199,0.97);
        backdrop-filter: blur(8px);
        border-bottom: 1px solid #fde68a;
        padding: 5px 12px;
        display: flex; align-items: center; gap: 8px;
    }
    #tgp-badge { font-size: 11px; font-weight: 600; color: #92400e; white-space: nowrap; }
    #tgp-badge span { color: #b45309; font-weight: 800; }
    .stat-pill { font-size: 11px; color: #78350f; white-space: nowrap; background: none; border: none; padding: 0; }
    .stat-pill span { color: #92400e; font-weight: 800; }
    .stat-pill.clickable { cursor: pointer; transition: color .15s; }
    .stat-pill.clickable:hover { color: #b45309; }
    .stat-divider { color: #fcd34d; font-size: 11px; }

    /* Row 3 - same flow as rows 1+2 */
    #topbar-row3 {
        background: transparent;
        padding: 6px 10px;
        display: flex; align-items: center; justify-content: space-between; gap: 6px;
    }

    /* Row 4 - refresh + search buttons + rise warning, fixed height */
    #topbar-row4 {
        background: transparent;
        padding: 0 10px;
        height: 80px;
        display: flex; align-items: center; justify-content: space-between;
        pointer-events: none;
        flex-shrink: 0;
    }
    #map-refresh-btn, #map-search-btn {
        pointer-events: all;
        width: 40px; height: 40px; border-radius: 50%;
        background: rgba(255,255,255,0.95);
        box-shadow: 0 2px 8px rgba(0,0,0,0.18);
        border: none;
        display: flex; align-items: center; justify-content: center;
        cursor: pointer; font-size: 18px;
        transition: background .2s;
        flex-shrink: 0;
    }

    #cache-badge { font-size: 9px; color: #ccc; white-space: nowrap; font-weight: 400; }

    #stale-btn,
    #locate-btn {
        padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 600;
        background: rgba(255,255,255,0.92); border: 1px solid #e5e7eb;
        color: #555; cursor: pointer; transition: all .15s; white-space: nowrap;
        box-shadow: 0 1px 4px rgba(0,0,0,0.1);
    }
    #stale-btn { line-height: 1.3; text-align: center; }
    #stale-btn .sub { font-size: 9px; font-weight: 400; color: #aaa; display: block; }
    #stale-btn:hover, #locate-btn:hover { border-color: #d97706; color: #d97706; }
    #stale-btn.active { background: #fef3c7; border-color: #d97706; color: #92400e; }
    #locate-btn.locating { border-color: #3b82f6; color: #3b82f6; }
    #locate-btn.located { background: #16a34a; border-color: #16a34a; color: #fff; }

    #legend {
        position: absolute; bottom: 8px; left: 12px; z-index: 1000;
        background: rgba(255,255,255,.35);
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
        border: 1px solid rgba(255,255,255,.3);
        border-radius: 10px; padding: 8px 12px; font-size: 11px;
        box-shadow: 0 2px 8px rgba(0,0,0,.06);
        opacity: 1; transition: opacity 1s ease;
    }
    #legend.hidden { opacity: 0; pointer-events: none; }
    #legend h4 {
        font-size: 10px; color: #999; text-transform: uppercase;
        letter-spacing: .5px; margin-bottom: 5px;
    }
    .legend-row { display: flex; align-items: center; gap: 6px; margin-bottom: 2px; color: #444; }
    .legend-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }

    .leaflet-popup-content-wrapper {
        border-radius: 10px !important;
        box-shadow: 0 4px 20px rgba(0,0,0,.15) !important;
        overflow: hidden !important;
    }
    .leaflet-popup-content { margin: 0 !important; min-width: 180px; padding: 0 !important; }
    .popup-fixed { padding: 12px 14px 8px; }
    .popup-scroll { padding: 0 14px 12px; overflow-y: auto; border-top: 1px solid #f0f0f0; }
    .popup-header { display: flex; align-items: center; gap: 7px; margin-bottom: 6px; }
    .popup-header img { width: 36px; height: 36px; object-fit: contain; }
    .popup-name  { font-size: 13px; font-weight: 700; color: #111; }
    .popup-brand { font-size: 10px; color: #999; margin-top: -2px; }

    /* ── POI popup redesign ───────────────────────── */
    .poi-popup-header {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 14px 14px 10px;
        border-bottom: 3px solid #f0fdf4;
    }
    .poi-popup-icon {
        width: 44px; height: 44px;
        border-radius: 12px;
        display: flex; align-items: center; justify-content: center;
        font-size: 24px;
        flex-shrink: 0;
    }
    .poi-popup-title  { font-size: 15px; font-weight: 800; color: #111; line-height: 1.2; }
    .poi-popup-type   { font-size: 11px; font-weight: 700; color: #888; margin-top: 2px; text-transform: uppercase; letter-spacing: 0.5px; }
    .poi-popup-cost   {
        display: inline-block;
        margin-top: 4px;
        font-size: 11px; font-weight: 700;
        background: #f0fdf4; color: #16a34a;
        border: 1px solid #bbf7d0;
        border-radius: 20px;
        padding: 2px 8px;
    }
    .poi-popup-body   { padding: 10px 14px 10px; }
    .poi-popup-chips  { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 10px; }
    .poi-popup-chip   {
        background: #f3f4f6;
        border: 1px solid #e5e7eb;
        border-radius: 20px;
        padding: 4px 10px;
        font-size: 11px;
        font-weight: 600;
        color: #374151;
        white-space: nowrap;
    }
    .poi-popup-chip.restriction {
        background: #fff1f2;
        border-color: #fecaca;
        color: #dc2626;
    }
    .poi-popup-notes {
        font-size: 12px;
        color: #555;
        line-height: 1.5;
        background: #f9fafb;
        border-radius: 8px;
        padding: 8px 10px;
        margin-bottom: 6px;
        border-left: 3px solid #e5e7eb;
    }
    .poi-popup-divider { height: 1px; background: #f0f0f0; margin: 4px 0; }

    /* ── Comments ─────────────────────────────────── */
    .poi-comments-section { padding: 0 14px 6px; }
    .poi-comments-title {
        font-size: 10px;
        font-weight: 700;
        color: #aaa;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        margin-bottom: 8px;
    }
    .poi-comment-item {
        display: flex;
        gap: 8px;
        margin-bottom: 10px;
        align-items: flex-start;
    }
    .poi-comment-avatar {
        width: 26px; height: 26px;
        border-radius: 50%;
        display: flex; align-items: center; justify-content: center;
        font-size: 11px; font-weight: 800; color: #fff;
        flex-shrink: 0;
        background: #6b7280;
    }
    .poi-comment-bubble {
        flex: 1;
        background: #f9fafb;
        border-radius: 10px;
        padding: 7px 10px;
    }
    .poi-comment-meta {
        font-size: 10px; font-weight: 700; color: #374151; margin-bottom: 2px;
    }
    .poi-comment-meta span { font-weight: 400; color: #aaa; margin-left: 5px; }
    .poi-comment-text { font-size: 12px; color: #444; line-height: 1.4; }
    .poi-comment-pending {
        font-size: 10px; color: #d97706; font-weight: 600; margin-top: 3px;
    }
    .poi-comment-input-row {
        display: flex; gap: 8px; align-items: flex-end;
        padding: 10px 14px 12px;
        border-top: 1px solid #f0f0f0;
        background: #fafafa;
    }
    .poi-comment-textarea {
        flex: 1;
        border: 1.5px solid #e5e7eb;
        border-radius: 10px;
        padding: 9px 11px;
        font-size: 13px;
        font-family: inherit;
        resize: none;
        outline: none;
        line-height: 1.4;
        min-height: 38px;
        max-height: 80px;
        color: #111;
        background: #fff;
    }
    .poi-comment-textarea:focus { border-color: #93c5fd; }
    .poi-comment-post-btn {
        padding: 9px 14px;
        background: #1a73e8;
        color: #fff;
        border: none;
        border-radius: 10px;
        font-size: 13px;
        font-weight: 700;
        cursor: pointer;
        flex-shrink: 0;
        white-space: nowrap;
        height: 38px;
    }
    .poi-comment-post-btn:active { background: #1557b0; }
    .poi-comment-nudge {
        padding: 10px 14px 12px;
        border-top: 1px solid #f0f0f0;
        font-size: 12px;
        color: #aaa;
        text-align: center;
        background: #fafafa;
    }
    .popup-price { font-size: 28px; font-weight: 800; color: #111; letter-spacing: -1px; }
    .popup-price span { font-size: 12px; font-weight: 400; color: #999; }
    .popup-price.stale { color: #9ca3af; }
    .popup-price.stale s { text-decoration-thickness: 2px; }
    .popup-stale-note {
        display: inline-flex;
        align-items: center;
        font-size: 10px;
        font-weight: 700;
        padding: 2px 8px;
        border-radius: 10px;
        margin-top: 4px;
        background: #fee2e2;
        color: #dc2626;
    }
    .popup-margin {
        display: inline-flex; align-items: center; font-size: 11px; font-weight: 700;
        padding: 2px 8px; border-radius: 10px; margin-top: 3px;
    }
    .popup-margin.pos  { background: #dcfce7; color: #16a34a; }
    .popup-margin.neg  { background: #fee2e2; color: #dc2626; }
    .popup-margin.zero { background: #f3f4f6; color: #888; }
    .popup-addr { font-size: 10px; color: #aaa; margin-top: 5px; }
    .popup-tgp  { font-size: 10px; color: #aaa; margin-top: 1px; }
    .popup-updated { font-size: 10px; color: #aaa; margin-top: 4px; overflow: hidden; }
    .popup-lag  {
        display: inline-flex; align-items: center; gap: 4px; font-size: 10px;
        font-weight: 700; padding: 1px 7px; border-radius: 8px; margin-top: 3px;
    }
    .popup-lag.lag0 { background: #dcfce7; color: #16a34a; }
    .popup-lag.lag1 { background: #dcfce7; color: #16a34a; }
    .popup-lag.lag2 { background: #fef9c3; color: #a16207; }
    .popup-lag.lag3 { background: #ffedd5; color: #c2410c; }
    .popup-lag.lagx { background: #fee2e2; color: #dc2626; }

    /* Wholesale breakdown table */
    .popup-wholesale {
        margin-top: 8px;
        border: 1px solid #e5e7eb;
        border-radius: 8px;
        overflow: hidden;
        font-size: 11px;
    }
    .popup-wholesale-title {
        background: #f8fafc;
        padding: 4px 8px;
        font-size: 10px;
        font-weight: 700;
        color: #64748b;
        text-transform: uppercase;
        letter-spacing: .4px;
        border-bottom: 1px solid #e5e7eb;
    }
    .popup-ws-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 3px 8px;
        border-bottom: 1px solid #f1f5f9;
    }
    .popup-ws-row:last-child { border-bottom: none; }
    .popup-ws-label { color: #555; font-size: 10px; }
    .popup-ws-label em { font-style: normal; color: #999; font-size: 9px; margin-left: 3px; }
    .popup-ws-val { font-weight: 700; color: #111; font-size: 11px; }
    .popup-ws-margin {
        font-size: 10px; font-weight: 700;
        padding: 1px 5px; border-radius: 6px; margin-left: 5px;
    }
    .popup-ws-margin.pos { background: #dcfce7; color: #16a34a; }
    .popup-ws-margin.neg { background: #fee2e2; color: #dc2626; }
    .popup-ws-margin.zero { background: #f3f4f6; color: #888; }
    .popup-ws-row.highlight { background: #fffbeb; }

    .popup-report, .popup-copy {
        display: inline-block;
        margin-top: 7px;
        margin-right: 10px;
        font-size: 10px;
        font-weight: 700;
        color: #2563eb;
        text-decoration: none;
    }
    .popup-report:hover, .popup-copy:hover { text-decoration: underline; }

    #loading-overlay {
    position: absolute; inset: 0; z-index: 4000;
        background: #f8fafc;
        display: flex; flex-direction: column;
        align-items: center; justify-content: center;
        gap: 12px;
        transition: opacity .4s;
    }
    #loading-overlay.hidden { opacity: 0; pointer-events: none; }
    .loading-spinner {
        width: 36px; height: 36px;
        border: 3px solid #e5e7eb;
        border-top-color: #d97706;
        border-radius: 50%;
        animation: spin .7s linear infinite;
    }
    @keyframes spin { to { transform: rotate(360deg); } }
    @keyframes pinJump {
        0%, 100% { transform: translateY(0); }
        20%       { transform: translateY(-10px); }
        40%       { transform: translateY(0); }
        60%       { transform: translateY(-6px); }
        80%       { transform: translateY(0); }
    }
    .cheapest-pin { animation: pinJump 1s ease 0.3s 3; }
    .loading-text { font-size: 14px; color: #888; }

    @media (max-width: 768px) {
        #topbar { gap: 6px; padding: 8px 10px; }
        #legend { bottom: 8px; left: 10px; }
    }

    .maplibregl-popup { z-index: 9999 !important; }
    .maplibregl-popup a { border: none; outline: none; }
    .maplibregl-popup button { border: none; outline: none; }
    .maplibregl-popup .popup-action-btn { border: 1px solid #e5e7eb; }
    .maplibregl-marker { overflow: visible !important; }

    /* Fixed centred popup panel */
    #station-popup-panel {
        display: none;
        position: fixed;
        left: 50%;
        transform: translateX(-50%);
        z-index: 4000;
        width: min(300px, calc(100vw - 44px));
        max-height: calc(100vh - var(--topbar-bottom, 90px) - 6px);
        background: #fff;
        border-radius: 14px;
        box-shadow: 0 8px 32px rgba(0,0,0,0.22);
        overflow: hidden;
        flex-direction: column;
    }
    #station-popup-panel.open {
        display: flex;
        top: calc(var(--topbar-bottom, 90px) + max(12px, calc((100vh - var(--topbar-bottom, 90px) - var(--popup-height, 400px)) / 4)) - 30px);
    }
    #station-popup-inner-scroll {
        overflow-y: scroll;
        -webkit-overflow-scrolling: touch;
        flex: 1;
        min-height: 0;
        scrollbar-width: thin;
        scrollbar-color: #d1d5db transparent;
    }
    #station-popup-actions {
        flex-shrink: 0;
        padding: 8px 14px 10px;
        border-top: 1px solid #f0f0f0;
        background: #fff;
        border-radius: 0 0 14px 14px;
    }
    #station-popup-close {
        position: absolute;
        top: 8px; right: 10px;
        width: 26px; height: 26px;
        border-radius: 50%;
        background: rgba(0,0,0,0.08);
        border: none;
        font-size: 16px;
        line-height: 26px;
        text-align: center;
        cursor: pointer;
        color: #555;
        z-index: 1;
    }

    .maplibregl-ctrl-attrib {
        font-size: 8px !important;
        background: transparent !important;
        box-shadow: none !important;
        color: rgba(120, 120, 120, 0.55) !important;
    }
    .maplibregl-ctrl-attrib a {
        color: rgba(120, 120, 120, 0.55) !important;
        text-decoration: none !important;
    }
    .maplibregl-ctrl-attrib-button { display: none !important; }
    .maplibregl-ctrl-logo { display: none !important; }

    .popup-price-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        width: 100%;
    }

    .cheapest-badge {
        display: flex;
        align-items: center;
        justify-content: center;
        margin-left: 8px;
        padding: 0;
        background: transparent;
        border: none;
        box-shadow: none;
        flex-shrink: 0;
        animation: cheapestPopIn 0.35s ease-out;
        transform-origin: center;
    }

    .cheapest-badge-logo {
        display: block;
        object-fit: contain;
        border-radius: 0;
        animation: cheapestBadgeBounce 1s ease-out;
    }

    @keyframes cheapestPopIn {
        0% {
            opacity: 0;
            transform: translateY(8px) scale(0.85);
        }
        60% {
            opacity: 1;
            transform: translateY(-3px) scale(1.08);
        }
        100% {
            opacity: 1;
            transform: translateY(0) scale(1);
        }
    }

    @keyframes cheapestBadgeBounce {
        0% {
            transform: translateY(0) scale(0.88) rotate(-6deg);
        }
        18% {
            transform: translateY(-10px) scale(1.08) rotate(4deg);
        }
        36% {
            transform: translateY(0) scale(0.98) rotate(-3deg);
        }
        52% {
            transform: translateY(-6px) scale(1.04) rotate(2deg);
        }
        68% {
            transform: translateY(0) scale(1) rotate(-1deg);
        }
        82% {
            transform: translateY(-3px) scale(1.02) rotate(1deg);
        }
        100% {
            transform: translateY(0) scale(1) rotate(0deg);
        }
    }


    #rise-warning {
        flex: 1;
        text-align: center;
        background: rgba(255, 247, 237, 0.92);
        border: 1px solid rgba(253, 186, 116, 0.75);
        color: #c2410c;
        border-radius: 12px;
        padding: 6px 10px;
        font-size: 13px;
        font-weight: 700;
        box-shadow: 0 2px 10px rgba(0,0,0,.06);
        display: none;
        pointer-events: none;
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
        white-space: normal;
        margin: 0 8px;
    }

    .popup-actions {
        display: flex;
        gap: 8px;
        padding: 12px 14px 14px;
        border-top: 1px solid #f3f4f6;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .popup-actions::-webkit-scrollbar { display: none; }

    .popup-action-btn {
        flex-shrink: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0 14px;
        height: 36px;
        border-radius: 20px;
        font-size: 13px;
        font-weight: 600;
        text-decoration: none;
        border: 1.5px solid #e5e7eb;
        background: transparent;
        color: #374151;
        cursor: pointer;
        transition: background 0.1s;
        letter-spacing: 0.1px;
        white-space: nowrap;
    }
    .popup-action-btn:active { background: #f3f4f6; }

    .popup-action-btn.navigate {
        border-color: #16a34a;
        color: #16a34a;
        font-weight: 700;
    }
    .popup-action-btn.navigate:active { background: #f0fdf4; }

    .popup-action-btn.nav-to {
        border-color: #16a34a;
        color: #16a34a;
        font-weight: 700;
    }
    .popup-action-btn.nav-to:active { background: #f0fdf4; }

    .popup-action-btn.add-stop {
        border-color: #1a73e8;
        color: #1a73e8;
        font-weight: 700;
    }
    .popup-action-btn.add-stop:active { background: #eff6ff; }

    .popup-action-btn.phone {
        border-color: #1a73e8;
        color: #1a73e8;
    }
    .popup-action-btn.phone:active { background: #eff6ff; }

    .popup-action-btn.amend {
        border-color: #e5e7eb;
        color: #6b7280;
    }
    .popup-action-btn.amend:active { background: #f3f4f6; }

    .popup-action-btn.danger {
        border-color: #fca5a5;
        color: #dc2626;
    }
    .popup-action-btn.danger:active { background: #fff5f5; }

    /* Lag analyser */
    .lag-analyser-toggle {
        width: 100%;
        margin-top: 8px;
        padding: 7px 10px;
        background: #f8fafc;
        border: 1px solid #e5e7eb;
        border-radius: 8px;
        font-size: 11px;
        font-weight: 700;
        color: #64748b;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: space-between;
        letter-spacing: .3px;
    }
    .lag-analyser-toggle:hover { background: #f1f5f9; }
    .lag-analyser-toggle .lag-toggle-arrow { transition: transform .2s; font-size: 10px; }
    .lag-analyser-toggle.open .lag-toggle-arrow { transform: rotate(180deg); }

    .lag-analyser-panel {
        display: none;
        margin-top: 6px;
        border: 1px solid #e5e7eb;
        border-radius: 8px;
        overflow: hidden;
        font-size: 11px;
    }
    .lag-analyser-panel.open { display: block; }

    .lag-analyser-avg {
        padding: 4px 10px;
        background: #f8fafc;
        border-bottom: 1px solid #e5e7eb;
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 11px;
    }
    .lag-analyser-avg-label { color: #64748b; }
    .lag-analyser-avg-val { font-weight: 800; font-size: 13px; }

    .lag-analyser-cols {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
        padding: 4px 10px;
        border-bottom: 1px solid #e5e7eb;
        font-size: 9px;
        font-weight: 700;
        letter-spacing: .5px;
        color: #94a3b8;
        background: #f8fafc;
    }

    .lag-analyser-row {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
        padding: 3px 10px;
        border-bottom: 1px solid #f1f5f9;
        align-items: center;
        cursor: grab;
        user-select: none;
        touch-action: none;
    }
    .lag-analyser-row:last-child { border-bottom: none; }
    .lag-analyser-row.today { background: #fffbeb; }

    .lag-analyser-cell-price { font-size: 12px; font-weight: 600; color: #111; }
    .lag-analyser-cell-price.today { color: #b45309; font-weight: 800; }
    .lag-analyser-cell-date { font-size: 9px; color: #aaa; margin-top: 1px; }
    .lag-analyser-cell-gap { font-size: 10px; color: #d1d5db; font-style: italic; }

    .lag-analyser-margin { font-size: 12px; font-weight: 700; }
    .lag-analyser-margin.pos-tight  { color: #16a34a; }
    .lag-analyser-margin.pos-normal { color: #d97706; }
    .lag-analyser-margin.pos-high   { color: #ea580c; }
    .lag-analyser-margin.pos-excess { color: #dc2626; }

    .lag-analyser-stepper {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 12px;
        padding: 5px 10px;
        background: #f8fafc;
        border-top: 1px solid #e5e7eb;
    }
    .lag-stepper-btn {
        width: 28px; height: 28px;
        border-radius: 50%;
        border: 1px solid #d1d5db;
        background: #fff;
        color: #555;
        font-size: 16px;
        cursor: pointer;
        display: flex; align-items: center; justify-content: center;
        line-height: 1;
    }
    .lag-stepper-btn:active { background: #f3f4f6; }
    .lag-stepper-display { text-align: center; min-width: 60px; }
    .lag-stepper-days { font-size: 16px; font-weight: 800; color: #b45309; }
    .lag-stepper-label { font-size: 9px; color: #94a3b8; }

    .lag-analyser-legend {
        padding: 5px 10px 7px;
        background: #f8fafc;
        display: flex;
        gap: 8px;
        flex-wrap: wrap;
        border-top: 1px solid #e5e7eb;
    }
    .lag-legend-item { display: flex; align-items: center; gap: 3px; font-size: 9px; color: #94a3b8; }
    .lag-legend-dot { width: 6px; height: 6px; border-radius: 2px; flex-shrink: 0; }

    /* ── In-map road navigation — Google Maps style ─────────────── */
    /* ── Alternate route picker ──────────────────────────────────── */
    /* ── Nav bottom wrap — single fixed column, pills + HUD stack naturally ── */
    #nav-bottom-wrap {
        position: fixed;
        bottom: 0; left: 0; right: 0;
        z-index: 3000;
        display: none;
        flex-direction: column;
    }
    #nav-bottom-wrap.active { display: flex; }

    /* ── Route pills — transparent row above HUD ── */
    #nav-route-picker {
        display: none; flex-direction: row; gap: 6px;
        padding: 5px 10px;
        background: transparent;
        overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none;
    }
    #nav-route-picker::-webkit-scrollbar { display: none; }
    #nav-route-picker.visible { display: flex; }
    .nav-route-pill {
        flex-shrink: 0; display: flex; flex-direction: column; align-items: center;
        padding: 5px 12px; border-radius: 18px;
        border: 1.5px solid rgba(0,0,0,0.12);
        background: rgba(255,255,255,0.85);
        backdrop-filter: blur(6px);
        -webkit-backdrop-filter: blur(6px);
        color: #3c4043;
        cursor: pointer; transition: all 0.15s; min-width: 70px;
    }
    .nav-route-pill.failed { opacity: 0.4; cursor: default; }
    .nav-route-pill.active {
        background: #1A73E8; border-color: #1A73E8; color: #fff;
        box-shadow: 0 2px 8px rgba(26,115,232,0.3);
    }
    .nav-route-pill-label { font-weight: 700; font-size: 10px; margin-bottom: 2px; color: inherit; opacity: 0.7; }
    .nav-route-pill-dist  { font-size: 13px; font-weight: 800; color: inherit; }
    .nav-route-pill-time  { font-size: 11px; color: inherit; opacity: 0.7; margin-top: 0px; }

    /* ── Nav topbar card — replaces rows 1+2 in topbar during nav ── */
    #nav-topbar-card {
        display: none;
        align-items: stretch;
        background: #1a6b3c;
        min-height: 68px;
        width: 100%;
    }
    #nav-topbar-card.active { display: flex; }

    #nav-topbar-arrow-wrap {
        width: 72px; flex-shrink: 0;
        display: flex; flex-direction: column;
        align-items: center; justify-content: center;
        background: rgba(0,0,0,0.22);
        padding: 8px 6px;
    }
    /* SVG arrow — transitions opacity for smooth maneuver swap */
    #nav-hud-arrow {
        display: block;
        transition: opacity 0.2s;
        flex-shrink: 0;
    }
    #nav-hud-arrow.spinning {
        animation: navArrowSpin 1s linear infinite;
    }
    @keyframes navArrowSpin { to { transform: rotate(360deg); } }

    #nav-topbar-text {
        flex: 1; display: flex; flex-direction: column;
        justify-content: center; padding: 8px 10px 8px 8px; min-width: 0; gap: 1px;
    }
    /* Big distance-to-turn — primary number, Google style */
    #nav-hud-dist-big {
        font-size: 26px; font-weight: 900; color: #fff;
        letter-spacing: -0.5px; line-height: 1.05;
    }
    /* Instruction text — street / action */
    #nav-hud-step {
        font-size: 14px; font-weight: 700; color: rgba(255,255,255,0.9);
        line-height: 1.25; white-space: normal;
    }
    /* Road/highway number badge strip */
    #nav-hud-street-tag {
        font-size: 11px; font-weight: 700; color: rgba(255,255,255,0.6);
        line-height: 1.3; margin-top: 1px;
        display: flex; flex-wrap: wrap; gap: 4px; align-items: center;
    }
    .nav-road-badge {
        display: inline-block;
        background: rgba(255,255,255,0.18);
        border: 1px solid rgba(255,255,255,0.3);
        border-radius: 4px;
        padding: 1px 5px;
        font-size: 10px; font-weight: 800; letter-spacing: 0.3px;
        color: #fff;
    }
    .nav-road-badge.motorway  { background: #2e7d32; border-color: #81c784; }
    .nav-road-badge.highway   { background: #1565c0; border-color: #90caf9; }
    .nav-road-badge.state     { background: #6a1b9a; border-color: #ce93d8; }
    #nav-hud-step-dist { display: none; } /* replaced by dist-big */

    /* ── "Then" pill arrow SVG ── */
    #nav-then-arrow-svg { flex-shrink: 0; }

    /* ── "Then" pill — sits in topbar below the nav card ── */
    #nav-card-then {
        display: none;
        align-items: center; gap: 10px;
        background: #145a32;
        padding: 7px 14px;
        width: 100%;
    }
    #nav-card-then.active { display: flex; }
    #nav-then-label {
        font-size: 13px; font-weight: 700; color: rgba(255,255,255,0.75);
        white-space: nowrap;
    }
    #nav-then-arrow {
        font-size: 18px; color: #fff; font-weight: 700;
        flex-shrink: 0;
    }
    #nav-then-street {
        font-size: 13px; font-weight: 700; color: #fff;
        white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    }

    /* ── Speedometer badge ── */
    #nav-speedometer {
        position: fixed;
        right: 12px;
        z-index: 3100;
        bottom: 0; /* set dynamically by JS to sit above pills + HUD */
        width: 58px; height: 58px;
        border-radius: 50%;
        background: #fff;
        border: 3px solid #dadce0;
        box-shadow: 0 2px 10px rgba(0,0,0,0.22);
        display: flex; flex-direction: column;
        align-items: center; justify-content: center;
        transition: border-color 0.3s, bottom 0.2s, opacity 0.3s;
        pointer-events: none;
        opacity: 0;
    }
    #nav-speedometer.visible { opacity: 1; }
    #nav-speedometer.speeding { border-color: #e53935; }
    #nav-speed-value {
        font-size: 22px; font-weight: 900; color: #202124;
        line-height: 1; letter-spacing: -0.5px;
    }
    #nav-speed-unit {
        font-size: 9px; font-weight: 700; color: #5f6368;
        letter-spacing: 0.3px; text-transform: uppercase;
        margin-top: 1px;
    }

    /* ── Bottom HUD bar ── */
    #nav-hud {
        display: none;
        background: #fff;
        flex-direction: column;
        border-radius: 20px 20px 0 0;
        box-shadow: 0 -4px 24px rgba(0,0,0,0.18);
        overflow: hidden;
    }
    #nav-hud.active { display: flex; }

    #nav-hud-bar {
        display: flex; align-items: center;
        padding: 14px 16px 18px; gap: 0;
        background: #fff;
    }

    /* ✕ stop button */
    #nav-hud-stop {
        width: 44px; height: 44px; border-radius: 50%;
        border: 2px solid #dadce0;
        background: #fff; color: #5f6368;
        font-size: 18px; font-weight: 700;
        cursor: pointer; flex-shrink: 0;
        display: flex; align-items: center; justify-content: center;
        transition: all 0.15s;
    }
    #nav-hud-stop:active { background: #f1f3f4; }

    /* Centre block */
    #nav-hud-centre {
        flex: 1; text-align: center; padding: 0 12px;
    }
    #nav-hud-bar-time {
        font-size: 26px; font-weight: 800;
        color: #1a73e8; line-height: 1; letter-spacing: -0.5px;
    }
    #nav-hud-bar-unit {
        font-size: 14px; font-weight: 600; color: #1a73e8;
    }
    #nav-hud-bar-sub {
        font-size: 13px; color: #5f6368; margin-top: 3px; font-weight: 500;
    }
    #nav-hud-dist { font-weight: 600; color: #3c4043; }
    #nav-hud-dist-unit { color: #5f6368; }
    #nav-hud-eta { color: #5f6368; }
    #nav-hud-duration { display: none; } /* rendered inline in bar-time */
    #nav-hud-eta-label { display: none; } /* not needed in new layout */

    /* Route options icon button */
    #nav-hud-routes-btn {
        width: 44px; height: 44px; border-radius: 50%;
        border: 2px solid #dadce0;
        background: #fff; color: #5f6368;
        font-size: 13px; cursor: pointer; flex-shrink: 0;
        display: flex; align-items: center; justify-content: center;
        transition: all 0.15s;
    }
    #nav-hud-routes-btn:active { background: #f1f3f4; }

    /* Right side controls group */
    #nav-hud-right {
        display: flex; align-items: center; gap: 8px; flex-shrink: 0;
    }
    #nav-hud-mute {
        width: 44px; height: 44px; border-radius: 50%;
        border: 2px solid #dadce0;
        background: #fff; color: #5f6368;
        cursor: pointer; flex-shrink: 0;
        display: flex; align-items: center; justify-content: center;
        transition: all 0.15s;
    }
    #nav-hud-mute:active { background: #f1f3f4; }
    #nav-hud-mute.muted {
        background: #f1f3f4; color: #bdc1c6;
        border-color: #e8eaed;
    }
    #nav-hud-mute.testing {
        background: #e8f0fe; color: #1a73e8;
        border-color: #1a73e8;
    }

    /* Route options panel — slides up from bottom */
    #nav-hud-loading {
        font-size: 11px; color: #5f6368;
        text-align: center; padding: 3px 0 4px; display: none;
        background: #fff;
    }
    #nav-hud-loading.visible { display: block; }

    #nav-debug-row {
        display: none; align-items: center;
        padding: 2px 8px; gap: 4px;
        border-top: 1px solid rgba(255,255,0,0.1);
    }

    /* #nav-debug-toggle styles are defined below near the debug panel */
    #nav-speed-debug-btn {
        background: rgba(96,165,250,0.12);
        border: 1px solid rgba(96,165,250,0.25);
        border-radius: 6px; color: #60a5fa;
        font-size: 10px; font-weight: 700;
        padding: 4px 8px; cursor: pointer;
        margin-left: 6px; letter-spacing: 0.3px;
    }

    /* ── Expanded stops panel ────────────────────────────────────── */
    #nav-stops-panel {
        display: none;
        flex-direction: column;
        background: #12122a;
        border-top: 1px solid rgba(255,255,255,0.08);
        max-height: 55vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    #nav-stops-panel.open { display: flex; }

    .nav-stop-row {
        display: flex;
        align-items: center;
        padding: 11px 16px;
        border-bottom: 1px solid rgba(255,255,255,0.06);
        gap: 12px;
    }
    .nav-stop-row:last-child { border-bottom: none; }
    .nav-stop-icon {
        width: 28px; height: 28px; border-radius: 50%;
        display: flex; align-items: center; justify-content: center;
        font-size: 12px; font-weight: 800; flex-shrink: 0;
        color: #fff;
    }
    .nav-stop-icon.waypoint { background: #1A73E8; }
    .nav-stop-icon.destination { background: #ef4444; }
    .nav-stop-body { flex: 1; min-width: 0; }
    .nav-stop-name {
        font-size: 13px; font-weight: 700; color: #fff;
        white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    }
    .nav-stop-meta {
        font-size: 11px; color: rgba(255,255,255,0.45); margin-top: 2px;
    }
    .nav-stop-remove {
        background: none; border: none;
        color: rgba(255,255,255,0.35); font-size: 18px;
        cursor: pointer; padding: 4px; flex-shrink: 0; line-height: 1;
    }
    .nav-stop-remove:active { color: #ef4444; }
    .nav-stop-remove.dest-pin { color: transparent; cursor: default; pointer-events: none; }

    /* ── Steps sheet — slides up from bottom like Google Maps ───── */
    #nav-steps-sheet {
        position: fixed;
        bottom: 0; left: 0; right: 0;
        z-index: 4100;
        background: #fff;
        border-radius: 16px 16px 0 0;
        box-shadow: 0 -4px 24px rgba(0,0,0,0.18);
        max-height: 70vh;
        display: flex; flex-direction: column;
        transform: translateY(100%);
        transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
        pointer-events: all;
    }
    #nav-steps-sheet.open { transform: translateY(0); }

    #nav-steps-handle {
        display: flex; align-items: center; justify-content: space-between;
        padding: 12px 16px 8px;
        border-bottom: 1px solid #e8eaed;
        flex-shrink: 0;
    }
    #nav-steps-handle-bar {
        width: 36px; height: 4px; border-radius: 2px;
        background: #dadce0; margin: 0 auto 10px;
    }
    #nav-steps-title {
        font-size: 14px; font-weight: 700; color: #3c4043;
    }
    #nav-steps-close {
        background: none; border: none;
        color: #9aa0a6; font-size: 20px;
        cursor: pointer; padding: 0 4px; line-height: 1;
    }
    #nav-steps-list {
        overflow-y: auto; flex: 1;
        -webkit-overflow-scrolling: touch;
        padding: 4px 0 16px;
    }
    .nav-step-row {
        display: flex; align-items: flex-start;
        padding: 10px 16px; gap: 14px;
        border-bottom: 1px solid #f1f3f4;
    }
    .nav-step-row:last-child { border-bottom: none; }
    .nav-step-row.current {
        background: #e8f0fe;
    }
    .nav-step-arrow {
        font-size: 20px; flex-shrink: 0;
        width: 32px; text-align: center;
        margin-top: 1px;
    }
    .nav-step-body { flex: 1; min-width: 0; }
    .nav-step-instruction {
        font-size: 13px; font-weight: 600; color: #3c4043;
        line-height: 1.3;
    }
    .nav-step-row.current .nav-step-instruction { color: #1a73e8; }
    .nav-step-dist {
        font-size: 11px; color: #9aa0a6; margin-top: 3px; font-weight: 500;
    }
    .nav-step-row.current .nav-step-dist { color: #1a73e8; }

    /* Backdrop */
    #nav-steps-backdrop {
        position: fixed; inset: 0; z-index: 4099;
        background: rgba(0,0,0,0.3);
        display: none;
        opacity: 0; transition: opacity 0.3s;
    }
    #nav-steps-backdrop.open { display: block; opacity: 1; }

    /* ── Nav options panel ───────────────────────────────────────── */
    #nav-options-panel {
        display: none;
        flex-direction: column;
        background: #fff;
        border-top: 1px solid #e8eaed;
        padding: 0;
        max-height: 60vh;
        overflow-y: auto;
    }
    #nav-options-panel.visible { display: flex; }
    #nav-options-panel.open    { display: flex; }

    #nav-options-header {
        display: flex; align-items: center;
        padding: 0 12px;
        border-bottom: 1px solid #e8eaed;
        gap: 4px;
        flex-shrink: 0;
    }
    .nav-options-tab {
        flex: 1; padding: 10px 8px;
        background: none; border: none;
        font-size: 12px; font-weight: 700;
        color: #9aa0a6; cursor: pointer;
        border-bottom: 2px solid transparent;
        margin-bottom: -1px;
        transition: all 0.15s;
    }
    .nav-options-tab.active {
        color: #1a73e8;
        border-bottom-color: #1a73e8;
    }
    #nav-stops-panel-inner {
        padding: 8px 0;
    }
    #nav-stops-panel-inner .nav-stop-row {
        color: #3c4043;
        border-bottom-color: #e8eaed;
    }
    #nav-stops-panel-inner .nav-stop-name { color: #3c4043; }
    #nav-stops-panel-inner .nav-stop-meta { color: #9aa0a6; }
    #nav-stops-panel-inner .nav-stop-remove { color: #dadce0; }
    #nav-stops-panel-inner .nav-stop-icon.waypoint { background: #1a73e8; }
    #nav-stops-panel-inner .nav-stop-icon.destination { background: #ef4444; }

    .nav-options-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 6px;
        padding: 10px 12px 14px;
    }

    .nav-vehicle-row {
        grid-column: 1 / -1;
        display: flex; gap: 8px; justify-content: space-between;
    }
    .nav-vehicle-btn {
        flex: 1; aspect-ratio: 1;
        max-width: 52px;
        border-radius: 50%;
        border: 2px solid #dadce0;
        background: #fff; color: #5f6368;
        cursor: pointer; display: flex;
        align-items: center; justify-content: center;
        transition: all 0.15s;
        padding: 0;
    }
    .nav-vehicle-btn:active { background: #f1f3f4; }
    .nav-vehicle-btn.active {
        background: #e8f0fe; border-color: #1a73e8; color: #1a73e8;
    }

    .nav-height-row {
        grid-column: 1 / -1;
        display: flex; align-items: center; gap: 8px; padding: 2px 0;
    }
    .nav-height-label { font-size: 11px; color: #5f6368; white-space: nowrap; }
    .nav-height-input {
        width: 58px; padding: 4px 6px;
        border-radius: 6px; border: 1.5px solid #dadce0;
        background: #fff; color: #3c4043;
        font-size: 12px; font-weight: 700; text-align: center;
    }
    .nav-height-input:focus { outline: none; border-color: #1A73E8; }
    .nav-height-unit { font-size: 11px; color: #9aa0a6; }

    .nav-opt-divider {
        grid-column: 1 / -1;
        height: 1px; background: #e8eaed; margin: 2px 0;
    }

    .nav-opt-row {
        display: flex; align-items: center; gap: 10px;
        padding: 7px 8px; border-radius: 8px;
        cursor: pointer; transition: background 0.15s;
    }
    .nav-opt-row:active { background: #f1f3f4; }
    .nav-opt-check {
        width: 18px; height: 18px; border-radius: 4px;
        border: 1.5px solid #dadce0; background: #fff;
        flex-shrink: 0; display: flex; align-items: center; justify-content: center;
        font-size: 11px; color: #fff; transition: all 0.15s;
    }
    .nav-opt-row.checked .nav-opt-check {
        background: #1A73E8; border-color: #1A73E8;
    }
    .nav-opt-label {
        font-size: 12px; font-weight: 600; color: #5f6368; line-height: 1.2;
    }
    .nav-opt-row.checked .nav-opt-label { color: #3c4043; }

    /* Conflict info */
    #nav-opts-conflict {
        grid-column: 1 / -1;
        font-size: 10px;
        color: #93c5fd;
        padding: 4px 4px 0;
        display: none;
    }
    #nav-opts-conflict.visible { display: block; }
    /* ── Maneuver speed debug modal ──────────────────────────────── */
    #nav-speed-debug {
        display: none;
        position: fixed;
        inset: 0;
        background: #0a0a1a;
        z-index: 9999;
        flex-direction: column;
    }
    #nav-speed-debug.open { display: flex; }
    #nav-speed-debug-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 12px 16px;
        background: #111130;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        flex-shrink: 0;
    }
    #nav-speed-debug-title { font-size: 13px; font-weight: 700; color: rgba(255,255,255,0.8); }
    #nav-speed-debug-close {
        background: rgba(255,255,255,0.1); border: none; border-radius: 6px;
        color: #fff; font-size: 14px; padding: 4px 10px; cursor: pointer;
    }
    #nav-speed-debug-body { flex: 1; overflow-y: auto; padding: 0; -webkit-overflow-scrolling: touch; }
    .sdm-row {
        display: grid;
        grid-template-columns: 2fr 1fr 1fr 1fr;
        gap: 4px; padding: 6px 12px;
        border-bottom: 1px solid rgba(255,255,255,0.04);
        font-size: 11px;
    }
    .sdm-row.header {
        background: rgba(255,255,255,0.06); font-weight: 700;
        color: rgba(255,255,255,0.5); font-size: 10px;
        letter-spacing: 0.4px; text-transform: uppercase;
        position: sticky; top: 0; z-index: 1;
    }
    .sdm-name { color: rgba(255,255,255,0.7); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .sdm-dist { color: rgba(255,255,255,0.45); text-align: right; }
    .sdm-time { color: rgba(255,255,255,0.45); text-align: right; }
    .sdm-speed { font-weight: 700; text-align: right; }
    .sdm-speed.fast  { color: #22c55e; }   /* >85 km/h — rural highway */
    .sdm-speed.med   { color: #f4a261; }   /* 50-85 km/h */
    .sdm-speed.slow  { color: #e63946; }   /* <50 km/h — likely wrong default */
    .sdm-speed.urban { color: #60a5fa; }   /* 50-60 km/h urban */

    /* ── Off-route prompt ───────────────────────────────────────── */
    #nav-debug-panel {
        display: none;
        background: #0a0a1a;
        border-top: 1px solid rgba(255,255,0,0.2);
        padding: 8px 12px;
        max-height: 220px;
        overflow-y: auto;
        font-family: monospace;
        font-size: 10px;
        color: #adf;
        white-space: pre-wrap;
        word-break: break-all;
    }
    #nav-debug-panel.visible { display: block; }
    #nav-debug-toggle {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 6px 16px;
        background: none;
        border: none;
        border-top: 1px solid rgba(255,255,0,0.1);
        color: rgba(255,255,0,0.4);
        font-size: 10px;
        font-weight: 700;
        cursor: pointer;
        width: 100%;
        text-align: left;
        letter-spacing: 0.5px;
        text-transform: uppercase;
    }
    #nav-debug-toggle:hover { color: rgba(255,255,0,0.7); }


    /* ── Account / Auth Panel ──────────────────────────────────── */
    #account-panel {
        position:fixed;inset:0;z-index:9000;
        background:rgba(0,0,0,0.5);
        display:none;align-items:center;justify-content:center;
        opacity:0;pointer-events:none;transition:opacity 0.25s;
    }
    #account-panel.open { display:flex;opacity:1;pointer-events:all; }
    .account-card {
        background:#fff;border-radius:20px;
        width:calc(100% - 32px);max-width:400px;
        max-height:90vh;overflow-y:auto;
        padding:28px 24px;box-shadow:0 24px 64px rgba(0,0,0,0.4);
        position:relative;
        backdrop-filter:blur(12px);
        -webkit-backdrop-filter:blur(12px);
    }
    .account-card h2 { font-size:22px;font-weight:800;color:#1a73e8;margin:0 0 4px; }
    .account-card .subtitle { font-size:13px;color:#888;margin:0 0 24px; }
    .account-close {
        position:absolute;top:16px;right:16px;
        background:none;border:none;font-size:22px;
        color:#999;cursor:pointer;padding:4px 8px;border-radius:8px;line-height:1;
    }
    .auth-field { margin-bottom:16px; }
    .auth-field label {
        display:block;font-size:12px;font-weight:700;
        color:#555;margin-bottom:6px;text-transform:uppercase;letter-spacing:0.5px;
    }
    .auth-field input {
        width:100%;border:1.5px solid #e0e0e0;border-radius:10px;
        padding:12px 14px;font-size:16px;outline:none;
        transition:border-color 0.2s;box-sizing:border-box;-webkit-appearance:none;
    }
    .auth-field input:focus { border-color:#1a73e8; }
    .auth-submit {
        width:100%;background:#1a73e8;color:#fff;
        border:none;border-radius:10px;padding:14px;
        font-size:16px;font-weight:700;cursor:pointer;margin-top:4px;
    }
    .auth-submit:active { background:#1557b0; }
    .auth-msg { padding:10px 14px;border-radius:8px;font-size:13px;margin-bottom:16px;display:none; }
    .auth-msg.error   { background:#fee2e2;color:#dc2626; }
    .auth-msg.success { background:#dcfce7;color:#16a34a; }
    .auth-link { background:none;border:none;color:#1a73e8;font-size:14px;cursor:pointer;padding:0;text-decoration:underline; }
    .auth-switch { text-align:center;margin-top:20px;font-size:14px;color:#666; }
    .auth-divider { border:none;border-top:1px solid #f0f0f0;margin:20px 0; }
    .account-avatar {
        width:60px;height:60px;border-radius:50%;
        background:#1a73e8;color:#fff;
        display:flex;align-items:center;justify-content:center;
        font-size:24px;font-weight:800;margin:0 auto 16px;
    }
    .account-email { text-align:center;font-size:14px;color:#666;margin-bottom:4px; }
    .account-nickname { text-align:center;font-size:18px;font-weight:700;color:#1a1a1a;margin-bottom:24px; }
    .account-action-btn {
        width:100%;background:#f5f5f5;color:#333;
        border:none;border-radius:10px;padding:13px;
        font-size:15px;font-weight:600;cursor:pointer;
        text-align:left;margin-bottom:10px;
        display:flex;align-items:center;gap:10px;
    }
    .account-action-btn:active { background:#e8e8e8; }
    .account-action-btn.danger { background:#fee2e2;color:#dc2626; }    .acc-tab-btn {
        flex-shrink: 0;
        background: #f3f4f6;
        border: none;
        border-radius: 20px;
        padding: 7px 14px;
        font-size: 13px;
        font-weight: 600;
        cursor: pointer;
        color: #374151;
        white-space: nowrap;
        transition: background 0.15s, color 0.15s;
    }
    .acc-tab-btn.active {
        background: #1a73e8;
        color: #fff;
    }
    /* Hide scrollbar on tab bar */
    .acc-tab-bar::-webkit-scrollbar { display: none; }
