        :root {
            --bg-color: #f0f2f5;
            --glass-bg: rgba(255, 255, 255, 0.90);
            --glass-border: 1px solid rgba(255, 255, 255, 0.5);
            --primary: #2563eb;
            --success: #10b981;
            --danger: #ef4444;
            /* Sensory Colors (customizable for accessibility) */
            --quiet-color: #22c55e;
            --normal-color: #eab308;
            --loud-color: #ef4444;
        }

        /* Protanopia (red-green blind) */
        .a11y-protanopia {
            --quiet-color: #2563eb;
            --normal-color: #f59e0b;
            --loud-color: #7c3aed;
        }

        /* Deuteranopia (green blind) */
        .a11y-deuteranopia {
            --quiet-color: #06b6d4;
            --normal-color: #f97316;
            --loud-color: #dc2626;
        }

        /* High Contrast */
        .a11y-highcontrast {
            --quiet-color: #00ff00;
            --normal-color: #ffff00;
            --loud-color: #ff0000;
            --glass-bg: rgba(255, 255, 255, 0.98);
        }

        /* Accessibility Panel Base (Light Mode defaults) */
        #a11yPanel button {
            color: #334155 !important;
        }

        /* Dark Mode */
        .dark-mode {
            --bg-color: #0f172a;
            --glass-bg: rgba(15, 23, 42, 0.88);
            --glass-border: 1px solid rgba(148, 163, 184, 0.12);
            --primary: #60a5fa;
            --success: #34d399;
            --danger: #f87171;
            --text-color: #e2e8f0;
            --text-muted: #94a3b8;
            --card-bg: rgba(30, 41, 59, 0.85);
            --input-bg: rgba(30, 41, 59, 0.7);
            --border-color: rgba(148, 163, 184, 0.15);
        }

        /* Sidebar */
        .dark-mode .sidebar {
            background: var(--glass-bg) !important;
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            color: var(--text-color);
            border-right: 1px solid var(--border-color);
        }

        .dark-mode .sidebar h1,
        .dark-mode .sidebar h2,
        .dark-mode .sidebar h3,
        .dark-mode .sidebar p {
            color: #f1f5f9;
        }

        /* Live status */
        .dark-mode .live-status {
            background: rgba(30, 41, 59, 0.5) !important;
            border-color: var(--border-color) !important;
        }

        .dark-mode .live-status span {
            color: var(--text-color);
        }

        /* User section */
        .dark-mode .user-section {
            background: var(--card-bg) !important;
            border-color: var(--border-color) !important;
        }

        .dark-mode .user-section span,
        .dark-mode .user-section small,
        .dark-mode .user-section a {
            color: var(--text-muted);
        }

        /* Cards */
        .dark-mode .route-history-card {
            background: var(--card-bg) !important;
            border-color: var(--border-color) !important;
        }

        .dark-mode .route-history-card:hover {
            background: rgba(51, 65, 85, 0.7) !important;
        }

        .dark-mode .route-history-card span,
        .dark-mode .route-history-card small {
            color: var(--text-muted);
        }

        /* Tabs */
        .dark-mode .tab-btn {
            background: var(--input-bg) !important;
            color: var(--text-muted) !important;
            border-color: var(--border-color) !important;
        }

        .dark-mode .tab-btn.active {
            background: var(--primary) !important;
            color: #fff !important;
        }

        /* Inputs & selects */
        .dark-mode input,
        .dark-mode select,
        .dark-mode textarea {
            background: rgba(30, 41, 59, 0.6) !important;
            color: var(--text-color) !important;
            border-color: var(--border-color) !important;
        }

        .dark-mode input::placeholder {
            color: var(--text-muted) !important;
        }

        /* Toggle labels */
        .dark-mode .pref-toggle label {
            color: var(--text-color) !important;
        }

        .dark-mode .legend span {
            color: var(--text-muted) !important;
        }

        .dark-mode .footer-text,
        .dark-mode .footer-text div {
            color: var(--text-muted) !important;
        }

        /* Search bar */
        .dark-mode .search-container input {
            background: rgba(30, 41, 59, 0.8) !important;
            color: #f1f5f9 !important;
            border-color: var(--border-color) !important;
        }

        /* Buttons */
        .dark-mode .info-btn {
            background: linear-gradient(135deg, #3b82f6, #2563eb) !important;
            box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3) !important;
        }

        .dark-mode .lang-btn {
            background: rgba(15, 23, 42, 0.85) !important;
            color: #e2e8f0 !important;
            border-color: var(--border-color) !important;
        }

        /* Primary action button */
        .dark-mode .start-route-btn,
        .dark-mode button[style*="background: linear-gradient"] {
            background: linear-gradient(135deg, #3b82f6, #6366f1) !important;
        }

        /* Modals */
        .dark-mode .modal-content,
        .dark-mode [style*="background: white"],
        .dark-mode [style*="background:#fff"],
        .dark-mode #a11yPanel {
            background: #1e293b !important;
            color: var(--text-color) !important;
            border-color: var(--border-color) !important;
        }

        .dark-mode .modal-content h2,
        .dark-mode .modal-content h3,
        .dark-mode #a11yPanel h3 {
            color: #f1f5f9 !important;
        }

        .dark-mode .modal-content p,
        .dark-mode .modal-content li {
            color: var(--text-muted) !important;
        }

        /* Leaflet controls */
        .dark-mode .leaflet-control-zoom a {
            background: rgba(15, 23, 42, 0.85) !important;
            color: #e2e8f0 !important;
            border-color: var(--border-color) !important;
        }

        .dark-mode .leaflet-control-attribution {
            background: rgba(15, 23, 42, 0.7) !important;
            color: var(--text-muted) !important;
        }

        .dark-mode .leaflet-control-attribution a {
            color: var(--primary) !important;
        }

        /* Dark map tiles — using CSS invert+hue for dark cartography look */
        .dark-mode .leaflet-tile {
            filter: invert(1) hue-rotate(180deg) brightness(0.95) contrast(0.9) saturate(0.3);
        }

        /* Preference toggle cards */
        .dark-mode .preference-item {
            background: rgba(30, 41, 59, 0.6) !important;
            border: 1px solid rgba(148, 163, 184, 0.1);
        }

        .dark-mode .preference-item:hover {
            background: rgba(51, 65, 85, 0.7) !important;
        }

        .dark-mode .pref-label {
            color: #e2e8f0 !important;
        }

        .dark-mode .slider {
            background-color: #475569 !important;
        }

        /* Login prompt */
        .dark-mode #loginPrompt {
            background: rgba(96, 165, 250, 0.08) !important;
            color: #94a3b8 !important;
        }

        .dark-mode #loginPrompt a {
            color: #60a5fa !important;
        }

        .dark-mode #loginSuffix {
            color: #94a3b8 !important;
        }

        /* Status text */
        .dark-mode .status {
            color: #94a3b8 !important;
        }

        /* Legend */
        .dark-mode .legend,
        .dark-mode .legend div,
        .dark-mode .legend span {
            color: #94a3b8 !important;
        }

        /* Footer credit */
        .dark-mode #footerCredit {
            color: #64748b !important;
        }

        /* Disabled button */
        .dark-mode button:disabled {
            background: #334155 !important;
            color: #64748b !important;
        }

        /* City dropdown */
        .dark-mode .city-selector select {
            background: rgba(15, 23, 42, 0.85) !important;
            color: #e2e8f0 !important;
        }

        /* Popup tooltip on map */
        .dark-mode .leaflet-popup-content-wrapper {
            background: #1e293b !important;
            color: #e2e8f0 !important;
        }

        .dark-mode .leaflet-popup-tip {
            background: #1e293b !important;
        }

        /* Sidebar subtitle */
        .dark-mode .sidebar small,
        .dark-mode .controls-subtitle {
            color: #94a3b8 !important;
        }

        /* Accessibility panel */
        .dark-mode #a11yPanel {
            background: #1e293b !important;
            color: #e2e8f0 !important;
        }

        .dark-mode #a11yPanel label {
            color: #cbd5e1 !important;
        }

        .dark-mode #a11yPanel select {
            background: #334155 !important;
            color: #e2e8f0 !important;
        }

        .dark-mode #a11yPanel button {
            background: #334155 !important;
            color: #f1f5f9 !important;
            border-color: #475569 !important;
        }

        .dark-mode #a11yPanel span,
        .dark-mode #a11yPanel div#a11yFooter {
            color: #cbd5e1 !important;
        }

        /* Sidebar title */
        .dark-mode .sidebar-title {
            color: #f1f5f9 !important;
        }

        /* Time widget */
        .dark-mode .time-widget {
            background: rgba(30, 41, 59, 0.6) !important;
        }

        .dark-mode .time-widget div {
            color: #e2e8f0 !important;
        }

        /* Auth modal dark mode handled via CSS vars below */

        /* Stats modal cards */
        .dark-mode .dashboard-card {
            background: #1e293b !important;
            border-color: rgba(148, 163, 184, 0.1) !important;
        }

        .dark-mode .card-title {
            color: #f1f5f9 !important;
        }

        .dark-mode .card-desc {
            color: #94a3b8 !important;
        }

        /* Game button on landing */
        .dark-mode .game-btn-landing {
            background: rgba(255, 255, 255, 0.06) !important;
            border-color: rgba(148, 163, 184, 0.2) !important;
            color: #cbd5e1 !important;
        }

        /* Landing footer */
        .dark-mode #landing-page>p {
            color: #475569 !important;
        }

        body {
            margin: 0;
            padding: 0;
            font-family: 'Lexend', 'Plus Jakarta Sans', 'Inter', sans-serif;
            background: var(--bg-color);
            overflow: hidden;
        }

        /* LANDING PAGE */
        /* =============================================
           CALMROUTE LANDING PAGE — Design System v3.0
           Style: Soft UI Evolution + Cinema Dark + Glassmorphism
           Palette: Teal/Cyan primary + Emerald accent
           Typography: Plus Jakarta Sans / Lexend
           ============================================= */

        :root {
            --cr-primary: #0891B2;
            --cr-primary-light: #22D3EE;
            --cr-primary-dim: rgba(8, 145, 178, 0.08);
            --cr-accent: #059669;
            --cr-accent-light: #34D399;
            --cr-bg: #FAFCFD;
            --cr-bg-alt: #F0F9FF;
            --cr-fg: #0F172A;
            --cr-fg-muted: #64748B;
            --cr-fg-subtle: #94A3B8;
            --cr-card-bg: rgba(255, 255, 255, 0.6);
            --cr-card-border: rgba(148, 163, 184, 0.18);
            --cr-card-hover: rgba(255, 255, 255, 0.85);
            --cr-quiet: #22C55E;
            --cr-loud: #EF4444;
            --cr-nature: #15803D;
            --cr-radius: 16px;
            --cr-radius-sm: 10px;
            --cr-radius-xs: 6px;
            --cr-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 16px rgba(0, 0, 0, 0.04);
            --cr-shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.03), 0 16px 48px rgba(0, 0, 0, 0.06);
            --cr-shadow-glow: 0 0 0 1px rgba(8, 145, 178, 0.1), 0 8px 40px rgba(8, 145, 178, 0.1);
            --cr-transition: 200ms cubic-bezier(0.25, 0.1, 0.25, 1);
        }

        .dark-mode {
            --cr-primary: #22D3EE;
            --cr-primary-light: #67E8F9;
            --cr-primary-dim: rgba(34, 211, 238, 0.08);
            --cr-accent: #34D399;
            --cr-accent-light: #6EE7B7;
            --cr-bg: #080D1A;
            --cr-bg-alt: #0C1222;
            --cr-fg: #F1F5F9;
            --cr-fg-muted: #94A3B8;
            --cr-fg-subtle: #64748B;
            --cr-card-bg: rgba(15, 23, 42, 0.55);
            --cr-card-border: rgba(148, 163, 184, 0.08);
            --cr-card-hover: rgba(15, 23, 42, 0.75);
            --cr-shadow: 0 1px 3px rgba(0, 0, 0, 0.2), 0 4px 16px rgba(0, 0, 0, 0.15);
            --cr-shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.2), 0 16px 48px rgba(0, 0, 0, 0.25);
            --cr-shadow-glow: 0 0 0 1px rgba(34, 211, 238, 0.08), 0 8px 40px rgba(34, 211, 238, 0.06);
        }

        .icon-sm { width: 20px; height: 20px; }
        .icon-xs { width: 16px; height: 16px; }

        #landing-page {
            position: fixed;
            top: 0;
            left: 0;
            width: 100vw;
            height: 100vh;
            background: var(--cr-bg);
            display: flex;
            flex-direction: column;
            z-index: 9999;
            transition: opacity 0.6s ease, background 0.4s;
            overflow-x: hidden;
            overflow-y: auto;
            font-family: 'Plus Jakarta Sans', 'Lexend', -apple-system, sans-serif;
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
        }

        #landing-canvas {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            pointer-events: none;
            opacity: 0.25;
        }

        .dark-mode #landing-canvas { opacity: 0.35; }

        /* ---- Floating Geometric Shapes (21st.dev Shape Landing Hero inspired) ---- */
        .floating-shapes {
            position: fixed;
            top: 0; left: 0;
            width: 100%; height: 100%;
            pointer-events: none;
            overflow: hidden;
            z-index: 0;
        }

        .shape {
            position: absolute;
            border-radius: 100px;
            backdrop-filter: blur(2px);
            -webkit-backdrop-filter: blur(2px);
            border: 2px solid rgba(148, 163, 184, 0.18);
            box-shadow: 0 8px 32px 0 rgba(148, 163, 184, 0.08);
            opacity: 0;
            will-change: transform, opacity;
            animation: shapeEnter 2.4s cubic-bezier(0.23, 0.86, 0.39, 0.96) forwards,
                       shapeFloat 14s ease-in-out infinite;
        }

        .shape::after {
            content: '';
            position: absolute;
            inset: 0;
            border-radius: inherit;
            background: radial-gradient(circle at 50% 50%, rgba(255,255,255,0.35), transparent 70%);
            pointer-events: none;
        }

        .dark-mode .shape {
            border-color: rgba(255, 255, 255, 0.12);
            box-shadow: 0 8px 32px 0 rgba(255, 255, 255, 0.04);
        }

        .dark-mode .shape::after {
            background: radial-gradient(circle at 50% 50%, rgba(255,255,255,0.12), transparent 70%);
        }

        .shape-1 {
            width: 600px; height: 140px;
            left: -8%; top: 18%;
            transform: rotate(12deg);
            background: linear-gradient(135deg, rgba(8, 145, 178, 0.22), transparent);
            animation-delay: 0.3s, 0.3s;
        }

        .shape-2 {
            width: 480px; height: 120px;
            right: -5%; top: 72%;
            transform: rotate(-15deg);
            background: linear-gradient(135deg, rgba(5, 150, 105, 0.22), transparent);
            animation-delay: 0.5s, 0.5s;
        }

        .shape-3 {
            width: 320px; height: 90px;
            left: 8%; bottom: 8%;
            transform: rotate(-8deg);
            background: linear-gradient(135deg, rgba(124, 58, 237, 0.18), transparent);
            animation-delay: 0.7s, 0.7s;
        }

        .shape-4 {
            width: 220px; height: 70px;
            right: 18%; top: 12%;
            transform: rotate(20deg);
            background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), transparent);
            animation-delay: 0.9s, 0.9s;
        }

        .shape-5 {
            width: 160px; height: 50px;
            left: 28%; top: 8%;
            transform: rotate(-25deg);
            background: linear-gradient(135deg, rgba(236, 72, 153, 0.18), transparent);
            animation-delay: 1.1s, 1.1s;
        }

        @keyframes shapeEnter {
            from { opacity: 0; transform: translateY(-180px) rotate(var(--enter-rot, 0deg)); }
            to { opacity: 1; }
        }
        .shape-1 { --enter-rot: -3deg; } .shape-1 { animation-name: shapeEnter1, shapeFloat; }
        .shape-2 { --enter-rot: -30deg; } .shape-2 { animation-name: shapeEnter2, shapeFloat; }
        .shape-3 { --enter-rot: -23deg; } .shape-3 { animation-name: shapeEnter3, shapeFloat; }
        .shape-4 { --enter-rot: 5deg; } .shape-4 { animation-name: shapeEnter4, shapeFloat; }
        .shape-5 { --enter-rot: -40deg; } .shape-5 { animation-name: shapeEnter5, shapeFloat; }

        @keyframes shapeEnter1 { from { opacity: 0; transform: translateY(-150px) rotate(-3deg); } to { opacity: 1; transform: translateY(0) rotate(12deg); } }
        @keyframes shapeEnter2 { from { opacity: 0; transform: translateY(-150px) rotate(-30deg); } to { opacity: 1; transform: translateY(0) rotate(-15deg); } }
        @keyframes shapeEnter3 { from { opacity: 0; transform: translateY(-150px) rotate(-23deg); } to { opacity: 1; transform: translateY(0) rotate(-8deg); } }
        @keyframes shapeEnter4 { from { opacity: 0; transform: translateY(-150px) rotate(5deg); } to { opacity: 1; transform: translateY(0) rotate(20deg); } }
        @keyframes shapeEnter5 { from { opacity: 0; transform: translateY(-150px) rotate(-40deg); } to { opacity: 1; transform: translateY(0) rotate(-25deg); } }

        @keyframes shapeFloat {
            0%, 100% { translate: 0 0; }
            50% { translate: 0 18px; }
        }

        @media (prefers-reduced-motion: reduce) {
            .shape { animation: none !important; opacity: 1 !important; }
        }

        /* ---- Gradient Mesh Background ---- */
        .gradient-mesh {
            position: fixed;
            top: 0; left: 0;
            width: 100%; height: 100%;
            pointer-events: none;
            z-index: 0;
            background:
                radial-gradient(ellipse 60% 40% at 20% 20%, rgba(8, 145, 178, 0.10), transparent),
                radial-gradient(ellipse 50% 40% at 80% 30%, rgba(124, 58, 237, 0.08), transparent),
                radial-gradient(ellipse 60% 40% at 50% 85%, rgba(5, 150, 105, 0.10), transparent),
                radial-gradient(ellipse 40% 30% at 85% 80%, rgba(245, 158, 11, 0.06), transparent);
            -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, black 30%, transparent 85%);
            mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, black 30%, transparent 85%);
        }

        .dark-mode .gradient-mesh {
            background:
                radial-gradient(ellipse 60% 40% at 20% 20%, rgba(34, 211, 238, 0.12), transparent),
                radial-gradient(ellipse 50% 40% at 80% 30%, rgba(167, 139, 250, 0.10), transparent),
                radial-gradient(ellipse 60% 40% at 50% 85%, rgba(52, 211, 153, 0.10), transparent),
                radial-gradient(ellipse 40% 30% at 85% 80%, rgba(251, 191, 36, 0.08), transparent);
        }

        /* ---- Navigation ---- */
        .landing-nav {
            position: sticky;
            top: 0;
            z-index: 100;
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 14px 48px;
            max-width: 1280px;
            margin: 0 auto;
            width: 100%;
            box-sizing: border-box;
            background: rgba(250, 252, 253, 0.7);
            backdrop-filter: blur(16px) saturate(1.4);
            -webkit-backdrop-filter: blur(16px) saturate(1.4);
            border-bottom: 1px solid var(--cr-card-border);
        }

        .dark-mode .landing-nav {
            background: rgba(8, 13, 26, 0.75);
        }

        .landing-nav-logo {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .landing-nav-logo img {
            width: 28px;
            height: 28px;
            object-fit: contain;
        }

        .landing-nav-logo span {
            font-weight: 700;
            font-size: 1.05rem;
            color: var(--cr-fg);
            letter-spacing: -0.4px;
        }

        .landing-nav-actions {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .nav-link-btn {
            background: none;
            border: none;
            color: var(--cr-fg-muted);
            font-weight: 500;
            font-size: 0.85rem;
            cursor: pointer;
            padding: 8px 14px;
            border-radius: 8px;
            transition: color var(--cr-transition), background var(--cr-transition);
            font-family: inherit;
        }

        .nav-link-btn:hover {
            color: var(--cr-fg);
            background: var(--cr-primary-dim);
        }

        .nav-cta-btn {
            background: var(--cr-fg);
            color: var(--cr-bg);
            border: none;
            font-weight: 600;
            font-size: 0.85rem;
            padding: 8px 18px;
            border-radius: 8px;
            cursor: pointer;
            transition: opacity var(--cr-transition), transform var(--cr-transition);
            font-family: inherit;
        }

        .nav-cta-btn:hover {
            opacity: 0.85;
            transform: translateY(-1px);
        }

        .dark-mode .nav-cta-btn {
            background: #F1F5F9;
            color: #0F172A;
        }

        .nav-icon-btn {
            width: 36px;
            height: 36px;
            border-radius: 8px;
            padding: 0;
            border: 1px solid var(--cr-card-border);
            background: transparent;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--cr-fg-muted);
            transition: color var(--cr-transition), background var(--cr-transition), border-color var(--cr-transition);
            font-family: inherit;
        }

        .nav-icon-btn:hover {
            background: var(--cr-primary-dim);
            color: var(--cr-primary);
            border-color: transparent;
        }

        .nav-lang-btn {
            height: 36px;
            padding: 0 12px;
            border-radius: 8px;
            border: 1px solid var(--cr-card-border);
            background: transparent;
            cursor: pointer;
            font-size: 0.72rem;
            font-weight: 600;
            font-family: inherit;
            color: var(--cr-fg-muted);
            white-space: nowrap;
            transition: color var(--cr-transition), background var(--cr-transition), border-color var(--cr-transition);
            letter-spacing: 0.5px;
        }

        .nav-lang-btn:hover {
            background: var(--cr-primary-dim);
            color: var(--cr-primary);
            border-color: transparent;
        }

        /* Nav auth/user group */
        #navAuthBtns, #navUserBtns {
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .nav-profile-btn {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 4px 12px 4px 4px;
            border-radius: 20px;
            border: 1px solid var(--cr-card-border);
            background: transparent;
            cursor: pointer;
            font-family: inherit;
            font-size: 0.82rem;
            font-weight: 600;
            color: var(--cr-fg);
            transition: all var(--cr-transition);
        }

        .nav-profile-btn:hover {
            background: var(--cr-primary-dim);
            border-color: var(--cr-primary);
        }

        .nav-avatar {
            width: 28px;
            height: 28px;
            min-width: 28px;
            min-height: 28px;
            flex-shrink: 0;
            border-radius: 50%;
            background: linear-gradient(135deg, var(--cr-primary), var(--cr-accent));
            color: white;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.75rem;
            font-weight: 700;
            line-height: 1;
            aspect-ratio: 1;
            overflow: hidden;
        }

        .nav-logout-btn {
            display: flex;
            align-items: center;
            gap: 5px;
            padding: 7px 12px;
            border-radius: 8px;
            border: 1px solid rgba(239, 68, 68, 0.15);
            background: rgba(239, 68, 68, 0.05);
            color: #DC2626;
            cursor: pointer;
            font-family: inherit;
            font-size: 0.8rem;
            font-weight: 600;
            transition: all var(--cr-transition);
        }

        .dark-mode .nav-logout-btn {
            border-color: rgba(248, 113, 113, 0.15);
            background: rgba(248, 113, 113, 0.06);
            color: #F87171;
        }

        .nav-logout-btn:hover {
            background: rgba(239, 68, 68, 0.1);
        }

        /* ---- Profile Modal ---- */
        .profile-card {
            position: relative;
            background: var(--cr-card-bg, rgba(255, 255, 255, 0.85));
            backdrop-filter: blur(24px);
            -webkit-backdrop-filter: blur(24px);
            border: 1px solid var(--cr-card-border);
            border-radius: var(--cr-radius, 20px);
            padding: 32px 28px 24px;
            max-width: 480px;
            width: 94%;
            max-height: 88vh;
            overflow-y: auto;
            box-shadow: 0 24px 80px rgba(0, 0, 0, 0.12);
            animation: authSlideUp 0.3s ease-out;
        }

        .profile-card::-webkit-scrollbar { width: 4px; }
        .profile-card::-webkit-scrollbar-track { background: transparent; }
        .profile-card::-webkit-scrollbar-thumb { background: rgba(8, 145, 178, 0.2); border-radius: 4px; }

        .dark-mode .profile-card {
            background: rgba(15, 23, 42, 0.92);
            border-color: rgba(148, 163, 184, 0.12);
            box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
        }

        .profile-header {
            text-align: center;
            margin-bottom: 20px;
        }

        .profile-avatar-lg {
            width: 76px;
            height: 76px;
            border-radius: 50%;
            background: linear-gradient(135deg, var(--cr-primary), var(--cr-accent));
            color: white;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.7rem;
            font-weight: 700;
            margin: 0 auto 12px;
            box-shadow: 0 8px 28px rgba(8, 145, 178, 0.3);
            font-family: 'Plus Jakarta Sans', sans-serif;
        }

        .profile-header h2 {
            margin: 0 0 4px;
            font-size: 1.25rem;
            font-weight: 700;
            color: var(--cr-fg);
            font-family: 'Plus Jakarta Sans', sans-serif;
        }

        .profile-header p {
            margin: 0 0 10px;
            font-size: 0.82rem;
            color: var(--cr-fg-muted);
        }

        .profile-badge {
            display: inline-flex;
            align-items: center;
            gap: 5px;
            background: rgba(5, 150, 105, 0.08);
            color: var(--cr-accent);
            padding: 4px 12px;
            border-radius: 20px;
            font-size: 0.72rem;
            font-weight: 600;
        }

        .profile-stats {
            display: flex;
            justify-content: center;
            gap: 20px;
            padding: 14px 0;
            margin-bottom: 16px;
            border-top: 1px solid var(--cr-card-border);
            border-bottom: 1px solid var(--cr-card-border);
        }

        .profile-stat-item {
            text-align: center;
            min-width: 52px;
        }

        .profile-stat-num {
            display: block;
            font-size: 1.15rem;
            font-weight: 700;
            color: var(--cr-fg);
            font-family: 'Plus Jakarta Sans', sans-serif;
        }

        .profile-stat-label {
            font-size: 0.7rem;
            color: var(--cr-fg-muted);
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        /* Profile Tabs */
        .profile-tabs {
            display: flex;
            gap: 4px;
            margin-bottom: 16px;
            background: rgba(100, 116, 139, 0.06);
            border-radius: 12px;
            padding: 4px;
        }

        .dark-mode .profile-tabs {
            background: rgba(100, 116, 139, 0.12);
        }

        .profile-tab {
            flex: 1;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 5px;
            padding: 9px 8px;
            border: none;
            border-radius: 9px;
            background: transparent;
            color: var(--cr-fg-muted);
            font-size: 0.78rem;
            font-weight: 600;
            font-family: 'Plus Jakarta Sans', sans-serif;
            cursor: pointer;
            transition: all 0.2s;
        }

        .profile-tab .icon-xs { width: 14px; height: 14px; }

        .profile-tab:hover {
            color: var(--cr-fg);
            background: rgba(8, 145, 178, 0.05);
        }

        .profile-tab.active {
            background: white;
            color: var(--cr-primary);
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
        }

        .dark-mode .profile-tab.active {
            background: rgba(34, 211, 238, 0.1);
            color: var(--cr-primary);
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
        }

        .profile-tab-content {
            display: none;
        }

        .profile-tab-content.active {
            display: block;
            animation: profileTabFadeIn 0.25s ease-out;
        }

        @keyframes profileTabFadeIn {
            from { opacity: 0; transform: translateY(6px); }
            to { opacity: 1; transform: translateY(0); }
        }

        .profile-section {
            margin-bottom: 16px;
        }

        .profile-section h3 {
            font-size: 0.85rem;
            font-weight: 700;
            color: var(--cr-fg);
            margin: 0 0 6px;
            font-family: 'Plus Jakarta Sans', sans-serif;
        }

        .profile-section-desc {
            font-size: 0.75rem;
            color: var(--cr-fg-muted);
            margin: 0 0 14px;
        }

        /* Preference rows with toggle */
        .profile-pref-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            padding: 12px 14px;
            margin-bottom: 8px;
            background: rgba(8, 145, 178, 0.03);
            border: 1px solid var(--cr-card-border);
            border-radius: 12px;
            transition: all 0.2s;
        }

        .dark-mode .profile-pref-row {
            background: rgba(100, 116, 139, 0.06);
            border-color: rgba(148, 163, 184, 0.1);
        }

        .profile-pref-row:hover {
            background: rgba(8, 145, 178, 0.06);
        }

        .pref-info {
            display: flex;
            align-items: flex-start;
            gap: 10px;
            flex: 1;
        }

        .pref-info > .icon-xs {
            margin-top: 2px;
            color: var(--cr-primary);
            flex-shrink: 0;
        }

        .pref-info span {
            display: block;
            font-size: 0.84rem;
            font-weight: 600;
            color: var(--cr-fg);
        }

        .pref-info small {
            display: block;
            font-size: 0.72rem;
            color: var(--cr-fg-muted);
            margin-top: 2px;
            line-height: 1.3;
        }

        .profile-toggle {
            position: relative;
            width: 44px;
            height: 24px;
            flex-shrink: 0;
        }

        .profile-toggle input {
            opacity: 0;
            width: 0;
            height: 0;
            position: absolute;
        }

        .profile-toggle-slider {
            position: absolute;
            cursor: pointer;
            inset: 0;
            background: rgba(100, 116, 139, 0.2);
            border-radius: 24px;
            transition: background 0.3s;
        }

        .profile-toggle-slider::before {
            content: '';
            position: absolute;
            height: 18px;
            width: 18px;
            left: 3px;
            bottom: 3px;
            background: white;
            border-radius: 50%;
            transition: transform 0.3s;
            box-shadow: 0 1px 4px rgba(0,0,0,0.15);
        }

        .profile-toggle input:checked + .profile-toggle-slider {
            background: var(--cr-accent);
        }

        .profile-toggle input:checked + .profile-toggle-slider::before {
            transform: translateX(20px);
        }

        /* Activity list */
        .profile-activity-list {
            max-height: 260px;
            overflow-y: auto;
        }

        .profile-activity-item {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 10px 12px;
            margin-bottom: 6px;
            background: rgba(8, 145, 178, 0.03);
            border: 1px solid var(--cr-card-border);
            border-radius: 10px;
            transition: all 0.2s;
        }

        .dark-mode .profile-activity-item {
            background: rgba(100, 116, 139, 0.06);
            border-color: rgba(148, 163, 184, 0.1);
        }

        .profile-activity-item:hover {
            background: rgba(8, 145, 178, 0.06);
        }

        .activity-icon {
            width: 34px;
            height: 34px;
            border-radius: 10px;
            background: linear-gradient(135deg, rgba(8, 145, 178, 0.1), rgba(5, 150, 105, 0.1));
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            color: var(--cr-primary);
        }

        .activity-details {
            flex: 1;
            min-width: 0;
        }

        .activity-route {
            font-size: 0.82rem;
            font-weight: 600;
            color: var(--cr-fg);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .activity-meta {
            font-size: 0.7rem;
            color: var(--cr-fg-muted);
            margin-top: 2px;
        }

        .activity-badge {
            font-size: 0.65rem;
            font-weight: 600;
            padding: 3px 8px;
            border-radius: 6px;
            white-space: nowrap;
            flex-shrink: 0;
        }

        .activity-badge.quiet {
            background: rgba(34, 197, 94, 0.1);
            color: #16A34A;
        }

        .activity-badge.normal {
            background: rgba(234, 179, 8, 0.1);
            color: #CA8A04;
        }

        /* Cities pills */
        .profile-cities {
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
        }

        .city-pill {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            padding: 5px 12px;
            border-radius: 20px;
            font-size: 0.75rem;
            font-weight: 600;
            background: linear-gradient(135deg, rgba(8, 145, 178, 0.08), rgba(5, 150, 105, 0.08));
            color: var(--cr-primary);
            border: 1px solid rgba(8, 145, 178, 0.15);
        }

        .dark-mode .city-pill {
            background: linear-gradient(135deg, rgba(34, 211, 238, 0.08), rgba(52, 211, 153, 0.08));
            border-color: rgba(34, 211, 238, 0.15);
        }

        .city-pill-empty {
            background: none;
            border: 1px dashed var(--cr-fg-muted);
            color: var(--cr-fg-muted);
            font-weight: 400;
        }

        /* Achievement badges */
        .profile-badges-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 8px;
        }

        .badge-card {
            display: flex;
            flex-direction: column;
            align-items: center;
            padding: 14px 8px 10px;
            border-radius: 12px;
            border: 1px solid var(--cr-card-border);
            background: rgba(8, 145, 178, 0.02);
            text-align: center;
            transition: all 0.2s;
        }

        .dark-mode .badge-card {
            background: rgba(100, 116, 139, 0.04);
            border-color: rgba(148, 163, 184, 0.1);
        }

        .badge-card.unlocked {
            background: linear-gradient(135deg, rgba(8, 145, 178, 0.06), rgba(5, 150, 105, 0.06));
            border-color: rgba(8, 145, 178, 0.2);
        }

        .dark-mode .badge-card.unlocked {
            background: linear-gradient(135deg, rgba(34, 211, 238, 0.08), rgba(52, 211, 153, 0.08));
            border-color: rgba(34, 211, 238, 0.2);
        }

        .badge-card.locked {
            opacity: 0.4;
            filter: grayscale(0.8);
        }

        .badge-icon {
            font-size: 1.5rem;
            margin-bottom: 6px;
        }

        .badge-title {
            font-size: 0.7rem;
            font-weight: 700;
            color: var(--cr-fg);
            line-height: 1.2;
            margin-bottom: 2px;
        }

        .badge-desc {
            font-size: 0.6rem;
            color: var(--cr-fg-muted);
            line-height: 1.2;
        }

        /* Empty state */
        .profile-empty-state {
            text-align: center;
            padding: 24px 16px;
            color: var(--cr-fg-muted);
        }

        .profile-empty-state .icon-lg {
            width: 32px;
            height: 32px;
            margin-bottom: 8px;
            opacity: 0.4;
        }

        .profile-empty-state p {
            font-size: 0.82rem;
            margin: 0;
        }

        .profile-save-btn {
            width: 100%;
            padding: 12px;
            margin-top: 12px;
            border: none;
            border-radius: var(--cr-radius-sm, 12px);
            background: linear-gradient(135deg, var(--cr-primary), var(--cr-accent));
            color: white;
            font-size: 0.88rem;
            font-weight: 600;
            font-family: 'Plus Jakarta Sans', sans-serif;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            transition: all 0.2s;
            box-shadow: 0 4px 16px rgba(8, 145, 178, 0.2);
        }

        .profile-save-btn:hover {
            transform: translateY(-1px);
            box-shadow: 0 6px 24px rgba(8, 145, 178, 0.3);
        }

        .profile-logout-btn {
            width: 100%;
            padding: 11px;
            margin-top: 12px;
            border: 1px solid rgba(239, 68, 68, 0.15);
            border-radius: var(--cr-radius-sm, 12px);
            background: rgba(239, 68, 68, 0.03);
            color: #DC2626;
            font-size: 0.84rem;
            font-weight: 600;
            font-family: 'Plus Jakarta Sans', sans-serif;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            transition: all 0.2s;
        }

        .dark-mode .profile-logout-btn {
            color: #F87171;
            border-color: rgba(248, 113, 113, 0.15);
            background: rgba(248, 113, 113, 0.04);
        }

        .profile-logout-btn:hover {
            background: rgba(239, 68, 68, 0.1);
        }

        /* Hide global fixed buttons when landing page is visible */
        #landing-page ~ .lang-btn,
        #landing-page:not([style*="display: none"]) ~ .lang-btn {
            /* They still show on app view, hiding handled by JS */
        }

        /* ---- Hero Section ---- */
        /* ---- Hero Section (cinematic, full-bleed) ---- */
        .landing-hero {
            position: relative;
            z-index: 2;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            text-align: center;
            padding: 60px 24px 80px;
            max-width: 960px;
            margin: 0 auto;
            width: 100%;
            box-sizing: border-box;
            min-height: calc(100vh - 65px);
        }

        .hero-content {
            max-width: 720px;
            width: 100%;
        }

        /* ---- Entrance animations ---- */
        @keyframes animReveal {
            from { opacity: 0; transform: translateY(16px); filter: blur(8px); }
            to { opacity: 1; transform: translateY(0); filter: blur(0); }
        }

        .anim-reveal {
            opacity: 0;
            animation: animReveal 0.9s cubic-bezier(0.25, 0.4, 0.25, 1) forwards;
            animation-delay: var(--delay, 0s);
        }

        @keyframes wordReveal {
            from { opacity: 0; transform: translateY(24px); filter: blur(12px); }
            to { opacity: 1; transform: translateY(0); filter: blur(0); }
        }

        .word-reveal {
            display: inline-block;
            opacity: 0;
            animation: wordReveal 0.8s cubic-bezier(0.25, 0.4, 0.25, 1) forwards;
            animation-delay: var(--delay, 0s);
            margin-right: 0.25em;
        }

        @keyframes scrollReveal {
            from { opacity: 0; transform: translateY(24px); filter: blur(4px); }
            to { opacity: 1; transform: translateY(0); filter: blur(0); }
        }

        .scroll-reveal {
            opacity: 0;
            transform: translateY(24px);
            filter: blur(4px);
            transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.25, 0.4, 0.25, 1), filter 0.7s ease;
        }

        .scroll-reveal.revealed {
            opacity: 1;
            transform: translateY(0);
            filter: blur(0);
        }

        /* ---- Hero Badge with pulsing dot ---- */
        .hero-badge {
            display: inline-flex;
            align-items: center;
            gap: 10px;
            background: rgba(255, 255, 255, 0.04);
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            border: 1px solid var(--cr-card-border);
            border-radius: 100px;
            padding: 7px 16px 7px 12px;
            font-size: 0.82rem;
            font-weight: 500;
            color: var(--cr-fg-muted);
            margin-bottom: 36px;
            letter-spacing: 0.2px;
        }

        .dark-mode .hero-badge {
            background: rgba(255, 255, 255, 0.03);
            border-color: rgba(255, 255, 255, 0.08);
        }

        .badge-dot {
            width: 7px;
            height: 7px;
            border-radius: 50%;
            background: var(--cr-accent);
            box-shadow: 0 0 0 0 rgba(5, 150, 105, 0.7);
            animation: badgePulse 2.2s ease-out infinite;
        }

        @keyframes badgePulse {
            0% { box-shadow: 0 0 0 0 rgba(5, 150, 105, 0.5); }
            70% { box-shadow: 0 0 0 10px rgba(5, 150, 105, 0); }
            100% { box-shadow: 0 0 0 0 rgba(5, 150, 105, 0); }
        }

        /* ---- Title with word-by-word reveal ---- */
        .landing-title {
            font-family: 'Lexend', 'Plus Jakarta Sans', sans-serif;
            font-size: clamp(2.5rem, 6vw, 5rem);
            font-weight: 700;
            line-height: 1.04;
            letter-spacing: -2.5px;
            color: var(--cr-fg);
            margin: 0 0 28px 0;
        }

        .title-highlight {
            background: linear-gradient(135deg, var(--cr-primary), var(--cr-accent) 70%, #8B5CF6);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }

        .dark-mode .title-highlight {
            background: linear-gradient(135deg, #22D3EE, #34D399 60%, #A78BFA);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }

        .landing-subtitle {
            font-size: clamp(1rem, 1.4vw, 1.15rem);
            line-height: 1.65;
            color: var(--cr-fg-muted);
            margin: 0 auto 40px auto;
            max-width: 560px;
        }

        .landing-subtitle strong {
            color: var(--cr-fg);
            font-weight: 600;
        }

        .hero-actions {
            display: flex;
            gap: 12px;
            flex-wrap: wrap;
            justify-content: center;
            margin-bottom: 72px;
        }

        .start-btn {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 14px 28px;
            background: var(--cr-fg);
            color: var(--cr-bg);
            border: none;
            border-radius: 12px;
            font-size: 0.95rem;
            font-weight: 600;
            cursor: pointer;
            transition: opacity var(--cr-transition), transform var(--cr-transition), box-shadow var(--cr-transition);
            font-family: inherit;
            box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05), 0 0 0 0 rgba(8, 145, 178, 0);
        }

        .start-btn:hover {
            opacity: 0.92;
            transform: translateY(-2px);
            box-shadow: 0 8px 24px rgba(8, 145, 178, 0.25), 0 0 0 4px rgba(8, 145, 178, 0.08);
        }

        .start-btn:active { transform: translateY(0); }

        .start-btn:focus-visible {
            outline: 2px solid var(--cr-primary);
            outline-offset: 2px;
        }

        .dark-mode .start-btn {
            background: #F1F5F9;
            color: #0F172A;
        }

        .dark-mode .start-btn:hover {
            box-shadow: 0 8px 24px rgba(34, 211, 238, 0.2), 0 0 0 4px rgba(34, 211, 238, 0.1);
        }

        .start-btn .icon-sm { color: inherit; }

        .secondary-btn {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 14px 24px;
            background: rgba(255, 255, 255, 0.04);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            border: 1px solid var(--cr-card-border);
            color: var(--cr-fg-muted);
            border-radius: 12px;
            font-size: 0.95rem;
            font-weight: 500;
            cursor: pointer;
            transition: color var(--cr-transition), border-color var(--cr-transition), background var(--cr-transition);
            font-family: inherit;
        }

        .secondary-btn:hover {
            border-color: var(--cr-fg-subtle);
            color: var(--cr-fg);
            background: rgba(255, 255, 255, 0.08);
        }

        .secondary-btn:focus-visible {
            outline: 2px solid var(--cr-primary);
            outline-offset: 2px;
        }

        .secondary-btn .icon-sm { color: inherit; }

        /* ---- Hero floating stat pills ---- */
        .hero-stats {
            display: flex;
            gap: 10px;
            flex-wrap: wrap;
            justify-content: center;
            max-width: 680px;
        }

        .stat-pill {
            display: inline-flex;
            align-items: baseline;
            gap: 8px;
            background: rgba(255, 255, 255, 0.06);
            backdrop-filter: blur(16px) saturate(1.4);
            -webkit-backdrop-filter: blur(16px) saturate(1.4);
            border: 1px solid var(--cr-card-border);
            border-radius: 100px;
            padding: 10px 20px;
            transition: transform var(--cr-transition), border-color var(--cr-transition), background var(--cr-transition);
        }

        .stat-pill:hover {
            transform: translateY(-2px);
            border-color: rgba(8, 145, 178, 0.3);
            background: rgba(8, 145, 178, 0.06);
        }

        .dark-mode .stat-pill {
            background: rgba(255, 255, 255, 0.03);
            border-color: rgba(255, 255, 255, 0.08);
        }

        .dark-mode .stat-pill:hover {
            border-color: rgba(34, 211, 238, 0.3);
            background: rgba(34, 211, 238, 0.06);
        }

        .stat-value {
            font-family: 'Lexend', sans-serif;
            font-size: 1.05rem;
            font-weight: 700;
            color: var(--cr-fg);
            letter-spacing: -0.3px;
        }

        .stat-label {
            font-size: 0.72rem;
            font-weight: 500;
            color: var(--cr-fg-muted);
            text-transform: uppercase;
            letter-spacing: 1px;
        }

        @media (prefers-reduced-motion: reduce) {
            .anim-reveal, .word-reveal, .scroll-reveal, .badge-dot {
                animation: none !important;
                opacity: 1 !important;
                transform: none !important;
                filter: none !important;
            }
        }

        /* ---- Features — Bento Grid (21st.dev Bounce Card inspired) ---- */
        .landing-features {
            position: relative;
            z-index: 2;
            padding: 40px 24px 100px;
            max-width: 1200px;
            margin: 0 auto;
            width: 100%;
            box-sizing: border-box;
        }

        .features-header {
            text-align: center;
            margin-bottom: 56px;
        }

        .section-label {
            display: inline-block;
            font-size: 0.72rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 2px;
            color: var(--cr-primary);
            margin-bottom: 14px;
            padding: 4px 12px;
            background: var(--cr-primary-dim);
            border-radius: 100px;
        }

        .section-title {
            font-family: 'Lexend', sans-serif;
            font-size: clamp(1.8rem, 3.2vw, 2.6rem);
            font-weight: 700;
            letter-spacing: -1.5px;
            line-height: 1.15;
            color: var(--cr-fg);
            margin: 0;
        }

        .bento-grid {
            display: grid;
            grid-template-columns: repeat(12, 1fr);
            grid-auto-rows: minmax(200px, auto);
            gap: 16px;
        }

        .bento-wide { grid-column: span 8; }
        .bento-tall { grid-column: span 4; grid-row: span 2; }
        .bento-card:not(.bento-wide):not(.bento-tall) { grid-column: span 4; }

        .bento-card {
            position: relative;
            overflow: hidden;
            border-radius: 22px;
            background: var(--cr-card-bg);
            backdrop-filter: blur(16px) saturate(1.2);
            -webkit-backdrop-filter: blur(16px) saturate(1.2);
            border: 1px solid var(--cr-card-border);
            cursor: pointer;
            transition: transform 0.3s cubic-bezier(0.25, 0.4, 0.25, 1),
                        border-color 0.3s ease,
                        box-shadow 0.4s ease;
            min-height: 200px;
        }

        .bento-card:hover {
            transform: scale(0.97) rotate(-0.8deg);
            border-color: rgba(8, 145, 178, 0.25);
            box-shadow: var(--cr-shadow-lg), 0 0 0 1px rgba(8, 145, 178, 0.05);
        }

        .dark-mode .bento-card:hover {
            border-color: rgba(34, 211, 238, 0.3);
        }

        .bento-card-inner {
            position: relative;
            z-index: 2;
            padding: 32px 28px;
            height: 100%;
            display: flex;
            flex-direction: column;
        }

        .bento-card h3 {
            font-family: 'Lexend', sans-serif;
            font-size: 1.15rem;
            font-weight: 700;
            color: var(--cr-fg);
            margin: 0 0 10px 0;
            letter-spacing: -0.3px;
        }

        .bento-card p {
            font-size: 0.9rem;
            color: var(--cr-fg-muted);
            line-height: 1.65;
            margin: 0;
            max-width: 32ch;
        }

        /* Bento glow — gradient sheet that slides up on hover */
        .bento-glow {
            position: absolute;
            left: 0; right: 0; bottom: -60%;
            height: 100%;
            pointer-events: none;
            opacity: 0;
            transition: bottom 0.5s cubic-bezier(0.25, 0.4, 0.25, 1), opacity 0.4s ease;
            border-radius: 100% 100% 0 0 / 30% 30% 0 0;
        }

        .bento-card:hover .bento-glow {
            bottom: -20%;
            opacity: 1;
        }

        .bento-card[data-accent="cyan"] .bento-glow {
            background: radial-gradient(ellipse at center top, rgba(8, 145, 178, 0.18), transparent 70%);
        }
        .bento-card[data-accent="violet"] .bento-glow {
            background: radial-gradient(ellipse at center top, rgba(124, 58, 237, 0.18), transparent 70%);
        }
        .bento-card[data-accent="emerald"] .bento-glow {
            background: radial-gradient(ellipse at center top, rgba(5, 150, 105, 0.18), transparent 70%);
        }
        .bento-card[data-accent="amber"] .bento-glow {
            background: radial-gradient(ellipse at center top, rgba(245, 158, 11, 0.18), transparent 70%);
        }

        /* Feature icon (kept, restyled) */
        .feature-icon {
            width: 52px;
            height: 52px;
            border-radius: 14px;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-bottom: 20px;
            box-shadow: 0 4px 16px -4px rgba(0, 0, 0, 0.2);
            transition: transform 0.3s cubic-bezier(0.25, 0.4, 0.25, 1);
        }

        .bento-card:hover .feature-icon {
            transform: rotate(-5deg) scale(1.08);
        }

        .feature-icon i {
            width: 24px;
            height: 24px;
            color: white;
        }

        .fi-noise { background: linear-gradient(135deg, #0891B2, #0E7490); }
        .fi-crowd { background: linear-gradient(135deg, #7C3AED, #6D28D9); }
        .fi-nature { background: linear-gradient(135deg, #059669, #047857); }
        .fi-smart { background: linear-gradient(135deg, #F59E0B, #D97706); }

        /* ---- Auth buttons (legacy compat) ---- */
        .auth-buttons { display: flex; gap: 12px; margin-top: 16px; }
        .auth-btn { flex: 1; padding: 12px 20px; border-radius: 10px; font-weight: 600; cursor: pointer; transition: all 0.2s; font-size: 0.9rem; font-family: inherit; }
        .auth-btn-primary { background: var(--cr-primary-dim); color: var(--cr-primary); border: 1px solid rgba(8, 145, 178, 0.15); }
        .auth-btn-primary:hover { background: rgba(8, 145, 178, 0.12); }
        .dark-mode .auth-btn-primary { background: rgba(34, 211, 238, 0.08); color: var(--cr-primary); border-color: rgba(34, 211, 238, 0.15); }
        .auth-btn-secondary { background: rgba(0, 0, 0, 0.02); color: var(--cr-fg-muted); border: 1px solid var(--cr-card-border); }
        .auth-btn-secondary:hover { background: rgba(0, 0, 0, 0.04); }
        .dark-mode .auth-btn-secondary { background: rgba(255, 255, 255, 0.04); color: #94a3b8; border-color: var(--cr-card-border); }

        /* ---- Landing Footer ---- */
        .landing-footer {
            position: relative;
            z-index: 2;
            padding: 20px 48px;
            border-top: 1px solid var(--cr-card-border);
            margin-top: auto;
        }

        .footer-inner {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 24px;
            max-width: 1200px;
            margin: 0 auto;
        }

        .footer-brand {
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .footer-brand img { width: 18px; height: 18px; opacity: 0.5; }

        .footer-brand span {
            font-size: 0.8rem;
            font-weight: 600;
            color: var(--cr-fg-subtle);
        }

        .footer-copy {
            font-size: 0.78rem;
            color: var(--cr-fg-subtle);
        }

        .footer-link {
            font-size: 0.78rem;
            color: var(--cr-fg-muted);
            text-decoration: none;
            font-weight: 500;
            transition: color var(--cr-transition);
        }

        .footer-link:hover {
            color: var(--cr-primary);
        }

        .game-link {
            margin-top: 30px;
            color: var(--cr-fg-muted);
            text-decoration: underline;
            cursor: pointer;
            font-size: 0.9rem;
        }

        @keyframes float {
            0% { transform: translateY(0px); }
            50% { transform: translateY(-20px); }
            100% { transform: translateY(0px); }
        }

        /* APP CONTAINER */
        #app-container {
            opacity: 0;
            transition: opacity 1s ease;
            display: none;
            width: 100vw;
            height: 100vh;
            position: relative;
        }

        #map {
            height: 100%;
            width: 100%;
            z-index: 1;
        }

        .sensory-canvas {
            transition: opacity 0.15s ease-out;
        }

        /* UI CONTROLS */
        .controls {
            position: absolute;
            top: 20px;
            left: 20px;
            width: 350px;
            background: var(--glass-bg);
            backdrop-filter: blur(12px);
            padding: 20px;
            border-radius: 16px;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
            border: var(--glass-border);
            z-index: 1000;
        }

        h2 {
            margin: 0;
            font-size: 1.4rem;
            color: #1e293b;
        }

        p {
            font-size: 0.9rem;
            color: #64748b;
            margin-bottom: 20px;
        }

        /* Toggles */
        .preference-group {
            margin-bottom: 20px;
        }

        .preference-item {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 12px;
            padding: 10px;
            background: rgba(255, 255, 255, 0.6);
            border-radius: 8px;
            transition: background 0.2s;
        }

        .preference-item:hover {
            background: rgba(255, 255, 255, 0.9);
        }

        .pref-label {
            display: flex;
            align-items: center;
            font-size: 0.9rem;
            font-weight: 600;
            color: #334155;
        }

        .pref-icon {
            font-size: 1.2rem;
            margin-right: 10px;
        }

        /* Switch UI */
        .switch {
            position: relative;
            display: inline-block;
            width: 44px;
            height: 24px;
        }

        .switch input {
            opacity: 0;
            width: 0;
            height: 0;
        }

        .slider {
            position: absolute;
            cursor: pointer;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: #cbd5e1;
            transition: .4s;
            border-radius: 34px;
        }

        .slider:before {
            position: absolute;
            content: "";
            height: 18px;
            width: 18px;
            left: 3px;
            bottom: 3px;
            background-color: white;
            transition: .4s;
            border-radius: 50%;
        }

        input:checked+.slider {
            background-color: var(--primary);
        }

        input:checked+.slider:before {
            transform: translateX(20px);
        }

        button {
            width: 100%;
            padding: 12px;
            background: var(--primary);
            color: white;
            border: none;
            border-radius: 8px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s;
        }

        button:hover {
            background: #1d4ed8;
            transform: translateY(-1px);
        }

        button:disabled {
            background: #94a3b8;
            cursor: not-allowed;
        }

        .status {
            margin-top: 15px;
            font-size: 0.85rem;
            text-align: center;
            color: #475569;
        }

        /* Legend */
        .legend {
            margin-top: 15px;
            display: flex;
            justify-content: space-around;
            font-size: 0.75rem;
            color: #64748b;
        }

        .gmaps-icon {
            width: 24px !important;
            height: 24px !important;
            min-width: 24px;
        }

        .dot {
            width: 10px;
            height: 10px;
            display: inline-block;
            border-radius: 50%;
            margin-right: 5px;
        }

        /* Search Box - Moved Right */
        .search-container {
            position: absolute;
            top: 14px;
            left: 50%;
            transform: translateX(-50%);
            z-index: 5000;
            display: flex;
            gap: 8px;
            align-items: center;
        }

        /* Google Maps Button */
        /* Google Maps Button - Modern Premium Style */
        .gmaps-btn {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 12px;
            background: linear-gradient(135deg, #4285f4 0%, #3367d6 100%);
            color: #ffffff !important;
            border: none;
            padding: 12px 20px;
            border-radius: 12px;
            text-decoration: none;
            font-size: 15px;
            font-weight: 600;
            margin-top: 15px;
            box-shadow: 0 4px 6px rgba(66, 133, 244, 0.3);
            transition: transform 0.2s, box-shadow 0.2s;
            cursor: pointer;
            width: 100%;
            box-sizing: border-box;
        }

        .gmaps-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 12px rgba(66, 133, 244, 0.4);
            text-decoration: none;
            color: #fff;
        }

        .gmaps-btn:active {
            transform: translateY(0);
        }

        /* Info Modal */
        .modal {
            display: none;
            position: fixed;
            z-index: 10001;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.4);
            backdrop-filter: blur(5px);
        }

        .modal-content {
            background-color: #fefefe;
            margin: 5% auto;
            /* Better centering for tall modals */
            padding: 25px;
            border: 1px solid #888;
            width: 80%;
            max-width: 600px;
            border-radius: 20px;
            max-height: 90vh;
            /* Allow max height */
            overflow-y: auto;
            /* Enable scrolling */
        }

        .close {
            color: #aaa;
            float: right;
            font-size: 28px;
            font-weight: bold;
            cursor: pointer;
        }

        .info-btn {
            position: absolute;
            bottom: 110px;
            right: 20px;
            width: 50px;
            height: 50px;
            border-radius: 50%;
            background: linear-gradient(135deg, #2563eb, #1d4ed8);
            color: white;
            border: none;
            font-size: 24px;
            font-weight: 700;
            cursor: pointer;
            z-index: 1000;
            box-shadow: 0 4px 16px rgba(37, 99, 235, 0.4);
            transition: transform 0.2s, box-shadow 0.2s;
        }

        .info-btn:hover {
            transform: scale(1.1);
            box-shadow: 0 6px 24px rgba(37, 99, 235, 0.5);
        }

        .leaflet-bottom.leaflet-right .leaflet-control-zoom {
            margin-right: 7px;
            margin-bottom: 18px;
        }

        /* GAME CENTER STYLES */
        .game-modal-content {
            background: #f8fafc;
            min-height: 400px;
            display: flex;
            flex-direction: column;
            align-items: center;
        }

        .game-tabs {
            display: flex;
            gap: 10px;
            margin-bottom: 20px;
            background: #e2e8f0;
            padding: 5px;
            border-radius: 12px;
        }

        .game-tab {
            padding: 10px 20px;
            border: none;
            background: transparent;
            color: #64748b;
            cursor: pointer;
            border-radius: 8px;
            font-weight: 600;
        }

        .game-tab.active {
            background: white;
            color: #2563eb;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        }

        .game-content {
            width: 100%;
            flex: 1;
            display: flex;
            justify-content: center;
            align-items: center;
        }

        /* Breathing Game */
        .breath-container {
            text-align: center;
        }

        .breath-circle {
            width: 150px;
            height: 150px;
            background: #a5f3fc;
            border-radius: 50%;
            margin: 0 auto 20px;
            box-shadow: 0 0 20px #a5f3fc;
            animation: breathe 19s infinite ease-in-out;
        }

        .breath-text {
            font-size: 1.2rem;
            color: #0ea5e9;
            font-weight: bold;
            animation: breatheText 19s infinite;
        }

        @keyframes breathe {

            0%,
            20% {
                transform: scale(1);
                background: #a5f3fc;
            }

            /* Start / Exhale complete */
            40% {
                transform: scale(1.6);
                background: #67e8f9;
            }

            /* Inhale (4s) */
            60% {
                transform: scale(1.6);
                background: #22d3ee;
            }

            /* Hold (7s approx adjusted) */
            100% {
                transform: scale(1);
                background: #a5f3fc;
            }

            /* Exhale (8s) */
        }

        /* Breathing Text Animation - Controlled by JS for i18n */
        @keyframes breatheText {

            0%,
            20% {
                opacity: 0.5;
            }

            40% {
                opacity: 1;
            }

            60% {
                opacity: 1;
            }

            100% {
                opacity: 0.5;
            }
        }

        .lang-btn {
            position: fixed;
            top: 20px;
            right: 20px;
            z-index: 100000;
            width: auto;
            padding: 8px 16px;
            background: rgba(255, 255, 255, 0.9);
            color: #333;
            border: 1px solid #ccc;
            border-radius: 20px;
            font-weight: bold;
            cursor: pointer;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        }

        .dark-toggle-btn {
            right: 120px;
        }

        .lang-toggle-btn {
            right: 20px;
        }

        .lang-btn:hover {
            background: #fff;
        }

        /* Memory Game */
        .memory-board {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 10px;
            max-width: 320px;
        }

        .memory-card {
            width: 60px;
            height: 60px;
            position: relative;
            transform-style: preserve-3d;
            transition: transform 0.5s;
            cursor: pointer;
        }

        .memory-card.flipped {
            transform: rotateY(180deg);
        }

        .memory-card .front,
        .memory-card .back {
            position: absolute;
            width: 100%;
            height: 100%;
            backface-visibility: hidden;
            display: flex;
            justify-content: center;
            align-items: center;
            border-radius: 8px;
            font-size: 1.5rem;
            border: 2px solid #e2e8f0;
        }

        .memory-card .front {
            background: white;
            color: #cbd5e1;
            font-weight: bold;
        }

        .memory-card .back {
            background: #fff;
            transform: rotateY(180deg);
            border-color: #3b82f6;
        }

        /* Balloon & Emotion Game Styles */
        .emo-card {
            font-size: 4rem;
            cursor: pointer;
            padding: 20px;
            background: white;
            border-radius: 16px;
            border: 2px solid #e2e8f0;
            transition: transform 0.2s;
        }

        .emo-card:hover {
            transform: scale(1.1);
        }

        /* NEW: Pattern Game */
        .pattern-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 15px;
            width: 300px;
            height: 300px;
        }

        .pattern-btn {
            border-radius: 16px;
            background: #eee;
            cursor: pointer;
            transition: opacity 0.2s;
            opacity: 0.6;
        }

        .pattern-btn.lit {
            opacity: 1;
            box-shadow: 0 0 20px currentColor;
        }

        /* FULLSCREEN DASHBOARD */
        .modal {
            background-color: var(--bg-color);
            /* Opaque background */
        }

        .game-modal-content {
            width: 100%;
            height: 100%;
            margin: 0;
            border: none;
            border-radius: 0;
            max-width: none;
            justify-content: flex-start;
            /* Top align */
            padding: 40px;
            box-sizing: border-box;
        }

        .game-header {
            width: 100%;
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 40px;
        }

        /* Toast Notification for Route Insights */
        .toast-msg {
            position: fixed;
            top: 100px;
            left: 50%;
            transform: translate(-50%, -50px);
            /* Start slightly higher */
            background: rgba(15, 23, 42, 0.95);
            /* Deep dark blue */
            color: #e2e8f0;
            padding: 16px 20px;
            border-radius: 12px;
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
            font-size: 13px;
            z-index: 10000;
            opacity: 0;
            transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
            text-align: left;
            border: 1px solid rgba(255, 255, 255, 0.1);
            backdrop-filter: blur(10px);
            min-width: 250px;
            max-width: 85%;
            line-height: 1.5;
        }


        .game-dashboard {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 30px;
            width: 100%;
            max-width: 1000px;
        }

        .dashboard-card {
            background: white;
            padding: 30px;
            border-radius: 20px;
            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
            text-align: center;
            cursor: pointer;
            transition: transform 0.2s;
            border: 1px solid #e2e8f0;
        }

        .dashboard-card:hover {
            transform: translateY(-5px);
            border-color: #2563eb;
        }

        .card-icon {
            font-size: 3rem;
            margin-bottom: 15px;
            display: block;
        }

        .card-title {
            font-size: 1.2rem;
            font-weight: bold;
            color: #1e293b;
        }

        .card-desc {
            font-size: 0.9rem;
            color: #64748b;
            margin-top: 10px;
        }

        .back-btn {
            background: #e2e8f0;
            color: #475569;
            border: none;
            padding: 10px 20px;
            border-radius: 50px;
            cursor: pointer;
            font-weight: 600;
        }

        .footer-brand {
            position: absolute;
            bottom: 20px;
            font-size: 0.8rem;
            color: #94a3b8;
            opacity: 0.7;
        }

        /* AUTH STYLES */
        .auth-buttons {
            display: flex;
            gap: 10px;
            margin-top: 20px;
            justify-content: center;
        }

        .auth-btn {
            padding: 10px 24px;
            border-radius: 12px;
            border: none;
            cursor: pointer;
            font-weight: 600;
            font-size: 0.9rem;
            transition: all 0.3s;
        }

        .auth-btn-primary {
            background: var(--primary);
            color: white;
        }

        .auth-btn-primary:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
        }

        .auth-btn-secondary {
            background: white;
            color: #334155;
            border: 1px solid #e2e8f0;
        }

        .auth-btn-secondary:hover {
            border-color: var(--primary);
            color: var(--primary);
        }

        .auth-modal {
            display: none;
            position: fixed;
            z-index: 20000;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.4);
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
            justify-content: center;
            align-items: center;
            animation: authFadeIn 0.25s ease-out;
        }

        @keyframes authFadeIn {
            from { opacity: 0; }
            to { opacity: 1; }
        }

        @keyframes authSlideUp {
            from { opacity: 0; transform: translateY(24px) scale(0.97); }
            to { opacity: 1; transform: translateY(0) scale(1); }
        }

        .auth-modal.active {
            display: flex;
        }

        .auth-form {
            position: relative;
            background: var(--cr-card-bg, rgba(255, 255, 255, 0.85));
            backdrop-filter: blur(24px);
            -webkit-backdrop-filter: blur(24px);
            border: 1px solid var(--cr-card-border, rgba(165, 243, 252, 0.5));
            border-radius: var(--cr-radius, 20px);
            padding: 40px 36px 32px;
            max-width: 420px;
            width: 92%;
            box-shadow: 0 24px 80px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
            animation: authSlideUp 0.3s ease-out;
        }

        .dark-mode .auth-form {
            background: rgba(15, 23, 42, 0.88);
            border-color: rgba(148, 163, 184, 0.12);
            box-shadow: 0 24px 80px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
        }

        .auth-close {
            position: absolute;
            top: 16px;
            right: 16px;
            width: 36px;
            height: 36px;
            border: none;
            background: rgba(100, 116, 139, 0.08);
            border-radius: 10px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--cr-fg-muted, #64748B);
            transition: all 0.2s;
        }

        .auth-close:hover {
            background: rgba(100, 116, 139, 0.15);
            color: var(--cr-fg, #164E63);
        }

        .auth-header {
            text-align: center;
            margin-bottom: 28px;
        }

        .auth-icon {
            width: 56px;
            height: 56px;
            border-radius: 16px;
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 auto 16px;
            background: linear-gradient(135deg, var(--cr-primary, #0891B2), var(--cr-accent, #059669));
            color: white;
            box-shadow: 0 8px 24px rgba(8, 145, 178, 0.25);
        }

        .auth-icon .icon-md {
            width: 24px;
            height: 24px;
        }

        .auth-form h2 {
            margin: 0 0 6px 0;
            font-size: 1.4rem;
            font-weight: 700;
            color: var(--cr-fg, #164E63);
            font-family: 'Plus Jakarta Sans', sans-serif;
        }

        .auth-form p {
            margin: 0;
            color: var(--cr-fg-muted, #64748B);
            font-size: 0.88rem;
        }

        .auth-fields {
            display: flex;
            flex-direction: column;
            gap: 12px;
            margin-bottom: 20px;
        }

        .auth-field {
            position: relative;
            display: flex;
            align-items: center;
        }

        .auth-field label {
            position: absolute;
            left: 14px;
            color: var(--cr-fg-muted, #64748B);
            pointer-events: none;
            display: flex;
            align-items: center;
            z-index: 1;
        }

        .auth-field label .icon-xs {
            width: 16px;
            height: 16px;
        }

        .auth-input {
            width: 100%;
            padding: 14px 16px 14px 42px;
            border: 1.5px solid var(--cr-card-border, rgba(165, 243, 252, 0.5));
            border-radius: var(--cr-radius-sm, 12px);
            font-size: 0.92rem;
            font-family: 'Lexend', sans-serif;
            box-sizing: border-box;
            transition: border-color 0.2s, box-shadow 0.2s;
            background: rgba(255, 255, 255, 0.6);
            color: var(--cr-fg, #164E63);
            -webkit-appearance: none;
            -moz-appearance: none;
            appearance: none;
            -webkit-tap-highlight-color: transparent;
        }

        /* Hide Safari/Chrome password auto-fill decorations */
        .auth-input::-webkit-credentials-auto-fill-button,
        .auth-input::-webkit-contacts-auto-fill-button,
        .auth-input::-ms-reveal,
        .auth-input::-ms-clear {
            display: none !important;
            visibility: hidden !important;
            pointer-events: none !important;
            width: 0 !important;
            height: 0 !important;
        }

        /* Password field needs right padding for eye toggle */
        .auth-field .auth-input[type="password"],
        .auth-field .auth-input[type="text"]#authPassword {
            padding-right: 48px;
        }

        /* Kill browser autofill blue background */
        .auth-input:-webkit-autofill,
        .auth-input:-webkit-autofill:hover,
        .auth-input:-webkit-autofill:focus {
            -webkit-box-shadow: 0 0 0 50px rgba(255,255,255,0.6) inset !important;
            -webkit-text-fill-color: var(--cr-fg, #164E63) !important;
            transition: background-color 5000s ease-in-out 0s;
        }

        .dark-mode .auth-input:-webkit-autofill,
        .dark-mode .auth-input:-webkit-autofill:hover,
        .dark-mode .auth-input:-webkit-autofill:focus {
            -webkit-box-shadow: 0 0 0 50px rgba(30, 41, 59, 0.6) inset !important;
            -webkit-text-fill-color: #E2E8F0 !important;
        }

        .dark-mode .auth-input {
            background: rgba(30, 41, 59, 0.6);
            color: #E2E8F0;
            border-color: rgba(148, 163, 184, 0.15);
        }

        .auth-input::placeholder {
            color: var(--cr-fg-muted, #64748B);
            opacity: 0.7;
        }

        .auth-input:focus {
            outline: none;
            border-color: var(--cr-primary, #0891B2);
            box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.12);
        }

        .dark-mode .auth-input:focus {
            border-color: var(--cr-primary, #22D3EE);
            box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.1);
        }

        .auth-pw-toggle {
            position: absolute;
            right: 12px;
            top: 50%;
            transform: translateY(-50%);
            width: 32px;
            height: 32px;
            background: none;
            border: none;
            cursor: pointer;
            color: var(--cr-fg-muted, #64748B);
            padding: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: color 0.2s;
            outline: none;
            -webkit-tap-highlight-color: transparent;
            -webkit-user-select: none;
            user-select: none;
            z-index: 2;
            border-radius: 6px;
        }

        .auth-pw-toggle:hover {
            color: var(--cr-primary, #0891B2);
        }

        .auth-pw-toggle:focus {
            outline: none;
        }

        .auth-pw-toggle:focus-visible {
            outline: 2px solid var(--cr-primary, #0891B2);
            outline-offset: 2px;
            border-radius: 4px;
        }

        .auth-pw-toggle:active {
            background: none;
            color: var(--cr-primary, #0891B2);
        }

        .auth-submit {
            width: 100%;
            padding: 14px 20px;
            border: none;
            border-radius: var(--cr-radius-sm, 12px);
            background: linear-gradient(135deg, var(--cr-primary, #0891B2), var(--cr-accent, #059669));
            color: white;
            font-size: 1rem;
            font-weight: 600;
            font-family: 'Plus Jakarta Sans', sans-serif;
            cursor: pointer;
            transition: all 0.25s;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            box-shadow: 0 4px 16px rgba(8, 145, 178, 0.25);
        }

        .auth-submit:hover {
            transform: translateY(-1px);
            box-shadow: 0 6px 24px rgba(8, 145, 178, 0.35);
        }

        .auth-submit:active {
            transform: translateY(0);
        }

        .auth-submit .icon-sm {
            width: 18px;
            height: 18px;
            transition: transform 0.2s;
        }

        .auth-submit:hover .icon-sm {
            transform: translateX(3px);
        }

        .auth-error {
            background: rgba(239, 68, 68, 0.08);
            border: 1px solid rgba(239, 68, 68, 0.2);
            border-radius: 10px;
            padding: 10px 14px;
            color: #DC2626;
            font-size: 0.84rem;
            font-weight: 500;
            margin-bottom: 16px;
            display: none;
        }

        .dark-mode .auth-error {
            background: rgba(239, 68, 68, 0.1);
            color: #F87171;
        }

        .auth-divider {
            display: flex;
            align-items: center;
            gap: 12px;
            margin: 20px 0 16px;
        }

        .auth-divider::before,
        .auth-divider::after {
            content: '';
            flex: 1;
            height: 1px;
            background: var(--cr-card-border, rgba(165, 243, 252, 0.5));
        }

        .auth-divider span {
            font-size: 0.8rem;
            color: var(--cr-fg-muted, #64748B);
            font-weight: 500;
        }

        .auth-switch {
            text-align: center;
            font-size: 0.88rem;
            color: var(--cr-fg-muted, #64748B);
        }

        .auth-switch a {
            color: var(--cr-primary, #0891B2);
            cursor: pointer;
            font-weight: 600;
            text-decoration: none;
            transition: color 0.2s;
        }

        .auth-switch a:hover {
            text-decoration: underline;
        }

        .user-panel {
            background: rgba(37, 99, 235, 0.06);
            border-radius: 12px;
            padding: 12px;
            margin-bottom: 16px;
            display: none;
        }

        .user-panel.active {
            display: block;
        }

        .user-info {
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .user-avatar {
            width: 36px;
            height: 36px;
            border-radius: 50%;
            background: var(--primary);
            color: white;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 700;
            font-size: 0.9rem;
        }

        .user-name {
            font-weight: 600;
            font-size: 0.95rem;
            color: #1e293b;
        }

        .dark-mode .user-name {
            color: #E2E8F0;
        }

        .user-email {
            font-size: 0.75rem;
            color: #94a3b8;
        }

        .user-tabs {
            display: flex;
            gap: 8px;
            margin-top: 10px;
        }

        .user-tab {
            flex: 1;
            padding: 8px;
            border-radius: 8px;
            border: 1px solid #e2e8f0;
            background: white;
            cursor: pointer;
            text-align: center;
            font-size: 0.8rem;
            transition: all 0.2s;
        }

        .user-tab:hover,
        .user-tab.active {
            background: var(--primary);
            color: white;
            border-color: var(--primary);
        }

        .user-tab-content {
            display: none;
            max-height: 200px;
            overflow-y: auto;
            margin-top: 10px;
        }

        .user-tab-content.active {
            display: block;
        }

        .history-item,
        .favorite-item {
            padding: 8px 10px;
            border-radius: 8px;
            background: white;
            margin-bottom: 6px;
            font-size: 0.8rem;
            cursor: pointer;
            border: 1px solid #f1f5f9;
            transition: all 0.2s;
        }

        .history-item:hover,
        .favorite-item:hover {
            border-color: var(--primary);
        }

        .dark-mode .history-item,
        .dark-mode .favorite-item {
            background: #1e293b;
            border-color: #334155;
            color: #e2e8f0;
        }

        .dark-mode .history-item:hover,
        .dark-mode .favorite-item:hover {
            border-color: var(--primary);
            background: #253347;
        }

        .dark-mode .user-panel {
            background: rgba(30, 41, 59, 0.6);
        }

        .dark-mode .user-tab {
            background: #1e293b;
            border-color: #334155;
            color: #94a3b8;
        }

        .dark-mode .user-tab:hover,
        .dark-mode .user-tab.active {
            background: var(--primary);
            color: white;
            border-color: var(--primary);
        }

        .fav-star {
            cursor: pointer;
            font-size: 1.1rem;
            transition: transform 0.2s;
        }

        .fav-star:hover {
            transform: scale(1.3);
        }

        .logout-btn {
            background: none;
            border: none;
            color: #94a3b8;
            cursor: pointer;
            font-size: 0.8rem;
            padding: 4px 8px;
        }

        .logout-btn:hover {
            color: #ef4444;
        }

        .search-wrapper {
            position: relative;
            flex: 1;
            max-width: 360px;
        }

        .search-wrapper input {
            width: 100%;
            padding: 10px 40px 10px 18px;
            border-radius: 25px;
            border: none;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
            outline: none;
            font-size: 0.85rem;
            box-sizing: border-box;
            transition: box-shadow 0.3s;
        }

        .search-wrapper input:focus {
            box-shadow: 0 4px 20px rgba(37, 99, 235, 0.25);
        }

        .search-spinner {
            position: absolute;
            right: 14px;
            top: 50%;
            transform: translateY(-50%);
            width: 16px;
            height: 16px;
            border: 2px solid #e2e8f0;
            border-top-color: #2563eb;
            border-radius: 50%;
            animation: spin 0.6s linear infinite;
            display: none;
        }

        @keyframes spin {
            to {
                transform: translateY(-50%) rotate(360deg);
            }
        }

        .search-dropdown {
            position: absolute;
            top: calc(100% + 6px);
            left: 0;
            right: 0;
            background: white;
            border-radius: 16px;
            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.18);
            max-height: 350px;
            overflow-y: auto;
            z-index: 15000;
            display: none;
        }

        .search-dropdown.active {
            display: block;
        }

        .search-item {
            padding: 12px 16px;
            cursor: pointer;
            border-bottom: 1px solid #f1f5f9;
            display: flex;
            align-items: flex-start;
            gap: 10px;
            transition: background 0.15s;
        }

        .search-item:last-child {
            border-bottom: none;
        }

        .search-item:hover,
        .search-item.selected {
            background: #eff6ff;
        }

        .search-item-icon {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            background: #f1f5f9;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.9rem;
            flex-shrink: 0;
            margin-top: 2px;
        }

        .search-item-text {
            flex: 1;
            min-width: 0;
        }

        .search-item-name {
            font-weight: 600;
            font-size: 0.88rem;
            color: #1e293b;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .search-item-detail {
            font-size: 0.75rem;
            color: #64748b;
            margin-top: 2px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .search-no-result {
            padding: 20px;
            text-align: center;
            color: #94a3b8;
            font-size: 0.85rem;
        }

        /* ============================================================
   GOOGLE MAPS STYLE MOBILE LAYOUT
   ============================================================ */

        /* Floating Action Button (hidden on desktop) */
        .mobile-fab {
            display: none;
        }

        /* Bottom sheet drag handle (hidden on desktop) */
        .sheet-handle {
            display: none;
        }

        /* Peek section (hidden on desktop) */
        .peek-section {
            display: none;
        }

        @media (max-width: 768px) {

            /* ---- SEARCH BAR: Google Maps pill ---- */
            .search-container {
                left: 12px;
                right: 96px;
                top: 12px;
                transform: none;
                width: auto;
                background: white;
                border-radius: 28px;
                box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
                padding: 4px 6px;
                gap: 4px;
                flex-wrap: nowrap;
                align-items: center;
            }

            .dark-mode .search-container {
                background: #1e293b;
                box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
            }

            .search-container select {
                font-size: 11px !important;
                padding: 6px 8px !important;
                min-width: auto !important;
                max-width: 130px;
                border-radius: 20px !important;
                background: #f1f5f9 !important;
                border: none !important;
                box-shadow: none !important;
                flex-shrink: 0;
            }

            .dark-mode .search-container select {
                background: #334155 !important;
                color: #e2e8f0 !important;
            }

            .search-container .search-wrapper {
                flex: 1;
                min-width: 0;
            }

            .search-container input {
                font-size: 15px !important;
                padding: 8px 6px !important;
                border: none !important;
                box-shadow: none !important;
                background: transparent !important;
                border-radius: 0 !important;
            }

            .search-container #locateMeBtn {
                width: 34px !important;
                height: 34px !important;
                min-width: 34px;
                padding: 0 !important;
                border-radius: 50% !important;
                font-size: 0.85rem;
                flex-shrink: 0;
                display: flex !important;
                align-items: center;
                justify-content: center;
            }

            /* ---- LANG & DARK BUTTONS: small circles ---- */
            .lang-btn {
                top: 16px;
                width: 34px;
                height: 34px;
                min-width: 34px;
                padding: 0;
                font-size: 0.7rem;
                border-radius: 50%;
                display: flex;
                align-items: center;
                justify-content: center;
                box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
                overflow: hidden;
            }

            .dark-toggle-btn {
                right: 50px;
                font-size: 1rem;
            }

            .lang-toggle-btn {
                right: 8px;
                font-size: 0.5rem;
                letter-spacing: -0.5px;
            }

            /* ---- BOTTOM SHEET: 3-stage ---- */
            .controls {
                position: fixed;
                top: auto;
                bottom: 0;
                left: 0;
                width: 100%;
                max-height: 85vh;
                border-radius: 16px 16px 0 0;
                overflow: hidden;
                box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.12);
                z-index: 1000;
                padding: 0;
                transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
                box-sizing: border-box;
                /* Default: PEEK state */
                transform: translateY(calc(100% - 60px));
            }

            .controls.sheet-half {
                transform: translateY(calc(100% - 50vh));
                overflow-y: hidden;
            }

            .controls.sheet-full {
                transform: translateY(0);
                overflow-y: auto;
            }

            /* Compact user panel on mobile */
            .controls .user-panel {
                padding: 8px;
                margin-bottom: 8px;
            }

            .controls .user-panel .user-info {
                gap: 6px;
            }

            .controls .user-panel .user-avatar {
                width: 28px;
                height: 28px;
                font-size: 0.75rem;
            }

            .controls .user-panel .user-name {
                font-size: 0.8rem;
            }

            .controls .user-panel .user-email {
                font-size: 0.65rem;
            }

            .controls .user-panel .user-tabs {
                margin-top: 6px;
                gap: 4px;
            }

            .controls .user-panel .user-tab {
                padding: 5px;
                font-size: 0.7rem;
            }

            .controls .user-panel .user-tab-content {
                max-height: 70px;
                margin-top: 6px;
            }

            .controls .user-panel .history-item,
            .controls .user-panel .favorite-item {
                padding: 6px 8px;
                margin-bottom: 4px;
                font-size: 0.72rem;
            }

            /* Drag handle — visual indicator */
            .sheet-handle {
                display: flex;
                justify-content: center;
                padding: 14px 0 8px;
                cursor: grab;
                touch-action: none;
                min-height: 28px;
            }

            /* Entire sheet is draggable (touch-action pan-x allows horizontal scroll but captures vertical) */
            .controls {
                touch-action: pan-x;
            }

            .sheet-handle::after {
                content: '';
                width: 48px;
                height: 5px;
                background: #94a3b8;
                border-radius: 3px;
            }

            .dark-mode .sheet-handle::after {
                background: #475569;
            }

            /* Hide old sidebar toggle */
            .sidebar-toggle {
                display: none !important;
            }

            /* ---- PEEK SECTION (animated: grows when sheet opens) ---- */
            .peek-section {
                display: flex !important;
                align-items: center;
                justify-content: space-between;
                padding: 2px 16px 6px;
                transition: all 0.3s ease;
            }

            .peek-section h2 {
                font-size: 0.95rem !important;
                margin: 0 !important;
                display: flex;
                align-items: center;
                gap: 6px;
                transition: font-size 0.3s ease;
            }

            .peek-section h2 img {
                height: 26px !important;
                width: 26px !important;
                transition: all 0.3s ease;
            }

            /* Peek grows when half/full */
            .controls.sheet-half .peek-section,
            .controls.sheet-full .peek-section {
                padding: 6px 16px 10px;
            }

            .controls.sheet-half .peek-section h2,
            .controls.sheet-full .peek-section h2 {
                font-size: 1.15rem !important;
            }

            .controls.sheet-half .peek-section h2 img,
            .controls.sheet-full .peek-section h2 img {
                height: 36px !important;
                width: 36px !important;
            }

            .peek-section .peek-weather {
                display: flex;
                align-items: center;
                gap: 4px;
                font-size: 0.8rem;
                color: #64748b;
                transition: font-size 0.3s ease;
            }

            .controls.sheet-half .peek-section .peek-weather,
            .controls.sheet-full .peek-section .peek-weather {
                font-size: 0.95rem;
            }

            .peek-section .peek-weather .peek-icon {
                font-size: 1.1rem;
            }

            .dark-mode .peek-section .peek-weather {
                color: #94a3b8;
            }

            .dark-mode .peek-section h2,
            .dark-mode .peek-section h2 a {
                color: #e2e8f0 !important;
            }

            /* Sheet inner content (scrollable) */
            .sheet-content {
                padding: 0 16px 16px;
                overflow-y: auto;
                max-height: calc(85vh - 80px);
                -webkit-overflow-scrolling: touch;
                overscroll-behavior: contain;
            }

            .controls.sheet-half .sheet-content {
                max-height: calc(50vh - 80px);
                overflow-y: auto;
            }

            /* HIDE the original header in sheet-content on mobile (peek replaces it) */
            .sheet-content > div:first-child {
                display: none !important;
            }

            /* Live status compact */
            .controls #liveStatus {
                margin-bottom: 6px;
                padding: 5px 10px;
                font-size: 0.75rem;
            }

            /* Preferences compact */
            .controls .preference-item {
                padding: 5px 8px;
                margin-bottom: 3px;
            }

            .controls .pref-label {
                font-size: 0.8rem;
            }

            .controls .pref-icon {
                font-size: 0.9rem;
                margin-right: 5px;
            }

            /* Route button */
            .controls #routeBtn {
                margin-top: 6px;
                padding: 10px;
                font-size: 0.85rem;
            }

            /* Login prompt */
            .controls #loginPrompt {
                font-size: 0.75rem;
                padding: 5px 10px;
                margin-bottom: 6px;
            }

            /* Status/legend/footer compact */
            .controls .status {
                margin-top: 4px;
                font-size: 0.72rem;
            }

            .controls .legend {
                margin-top: 3px;
                font-size: 0.65rem;
            }

            .controls #footerCredit {
                font-size: 0.55rem;
                padding: 3px 0;
            }

            .controls .gmaps-btn {
                padding: 8px 12px;
                font-size: 11px;
                margin-top: 4px;
            }

            .controls p {
                font-size: 0.72rem;
                margin: 2px 0;
            }

            /* ---- FAB: erişilebilirlik button (BEHIND sheet) ---- */
            .mobile-fab {
                display: flex;
                position: fixed;
                bottom: 72px;
                right: 16px;
                width: 50px;
                height: 50px;
                border-radius: 50%;
                background: white;
                color: #2563eb;
                border: 1px solid #e2e8f0;
                box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
                z-index: 999;
                cursor: pointer;
                align-items: center;
                justify-content: center;
                font-size: 1.4rem;
                transition: transform 0.2s, box-shadow 0.2s, opacity 0.3s;
                padding: 0;
            }

            .mobile-fab:hover {
                transform: scale(1.05);
                box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
            }

            .dark-mode .mobile-fab {
                background: #1e293b;
                color: #60a5fa;
                border-color: #334155;
            }

            /* Hide desktop ♿ button on mobile (FAB replaces it) */
            .a11y-fab-desktop {
                display: none !important;
            }

            /* Info button — move below search bar on right */
            .info-btn#infoBtn {
                position: fixed !important;
                top: 60px !important;
                bottom: auto !important;
                right: 8px !important;
                width: 36px !important;
                height: 36px !important;
                font-size: 0.8rem !important;
                z-index: 999;
            }

            /* Hide zoom controls */
            .leaflet-control-zoom {
                display: none !important;
            }

            /* ---- LANDING page (tablet 768px) ---- */
            .landing-nav {
                padding: 12px 20px;
            }

            .landing-hero {
                padding: 60px 24px 48px;
                gap: 28px;
                min-height: auto;
                max-width: 100%;
            }

            .landing-title {
                font-size: clamp(2rem, 7vw, 3.2rem);
                letter-spacing: -1.2px;
            }

            .landing-subtitle {
                font-size: 1rem;
                max-width: 100%;
            }

            .hero-actions {
                justify-content: center;
                flex-wrap: wrap;
            }

            .hero-stats {
                gap: 12px;
                flex-wrap: wrap;
                justify-content: center;
            }

            .stat-pill {
                padding: 10px 16px;
            }

            .features-header { margin-bottom: 32px; }
            .section-title { font-size: 1.8rem; }

            .bento-grid {
                grid-template-columns: repeat(6, 1fr);
                grid-auto-rows: minmax(180px, auto);
                gap: 14px;
            }

            .bento-wide { grid-column: span 6; }
            .bento-tall { grid-column: span 6; grid-row: span 1; }
            .bento-card:not(.bento-wide):not(.bento-tall) { grid-column: span 3; }

            .landing-features {
                padding: 48px 24px 60px;
            }

            .shape-1, .shape-2, .shape-3, .shape-4, .shape-5 {
                transform: scale(0.7);
            }

            .footer-inner { gap: 16px; }
            .landing-footer { padding: 16px 20px; }

            /* ---- MODALS ---- */
            .modal-content {
                width: 95% !important;
                max-height: 90vh;
                margin: 5vh auto;
                padding: 14px !important;
            }

            .auth-form {
                width: 90% !important;
                padding: 18px !important;
            }

            /* Stats panel */
            .stats-panel {
                padding: 12px;
            }

            .poi-card {
                min-width: 65px;
                padding: 6px;
            }

            .poi-card .poi-value {
                font-size: 1.1rem !important;
            }

            .poi-card .poi-label {
                font-size: 0.65rem !important;
            }

            #statsContainer {
                flex-direction: column !important;
            }

            #statsContainer>div {
                width: 100% !important;
                min-width: unset !important;
            }
        }

        /* ---- Smaller mobile (480px) ---- */
        @media (max-width: 480px) {
            .search-container {
                left: 8px;
                right: 82px;
                top: 8px;
            }

            .search-container select {
                max-width: 105px;
                font-size: 10px !important;
            }

            .lang-btn {
                top: 12px;
                width: 30px;
                height: 30px;
                min-width: 30px;
            }

            .dark-toggle-btn {
                right: 48px;
            }

            .lang-toggle-btn {
                right: 8px;
                font-size: 0.45rem;
            }

            .mobile-fab {
                bottom: 68px;
                right: 12px;
                width: 44px;
                height: 44px;
                font-size: 1.2rem;
                border-radius: 50%;
            }

            /* ---- LANDING small mobile ---- */
            .landing-nav {
                padding: 12px 16px;
            }

            .landing-nav-logo span {
                font-size: 1.05rem;
            }

            .landing-nav-actions .nav-cta-btn {
                display: none;
            }

            .landing-nav-actions .nav-link-btn {
                font-size: 0.75rem;
                padding: 6px 12px;
                border-radius: 20px;
                background: rgba(37, 99, 235, 0.1);
                color: var(--primary);
                font-weight: 600;
            }

            .nav-logout-btn span { display: none; }
            .nav-profile-btn span:not(.nav-avatar) { display: none; }
            .nav-profile-btn { padding: 4px; border-radius: 50%; }

            .nav-icon-btn {
                width: 36px;
                height: 36px;
                min-width: 36px;
            }

            .nav-lang-btn {
                height: 36px;
                padding: 0 10px;
                font-size: 0.72rem;
            }

            .landing-hero {
                padding: 40px 16px 32px;
                gap: 24px;
            }

            .hero-badge {
                font-size: 0.78rem;
                padding: 6px 14px;
            }

            .landing-title {
                font-size: clamp(1.9rem, 9vw, 2.6rem);
                letter-spacing: -0.8px;
            }

            .landing-subtitle {
                font-size: 0.9rem;
            }

            .hero-actions {
                flex-direction: column;
                width: 100%;
            }

            .start-btn {
                padding: 14px 24px;
                font-size: 0.95rem;
                width: 100%;
                justify-content: center;
            }

            .secondary-btn {
                padding: 14px 24px;
                font-size: 0.95rem;
                width: 100%;
                justify-content: center;
            }

            .hero-stats {
                gap: 10px;
                flex-wrap: wrap;
                justify-content: center;
                width: 100%;
            }

            .stat-pill {
                padding: 8px 14px;
                flex: 1 1 calc(50% - 10px);
                min-width: 120px;
            }

            .stat-value {
                font-size: 1rem;
            }

            .stat-label {
                font-size: 0.65rem;
            }

            /* Features mobile */
            .features-header {
                margin-bottom: 24px;
            }

            .section-label {
                font-size: 0.65rem;
            }

            .section-title {
                font-size: 1.5rem;
            }

            .bento-grid {
                grid-template-columns: 1fr;
                grid-auto-rows: auto;
                gap: 14px;
            }

            .bento-wide,
            .bento-tall,
            .bento-card:not(.bento-wide):not(.bento-tall) {
                grid-column: span 1;
                grid-row: auto;
            }

            .bento-card-inner {
                padding: 24px 20px;
            }

            .landing-features {
                padding: 16px 16px 32px;
            }

            .shape-1, .shape-2, .shape-3, .shape-4, .shape-5 {
                transform: scale(0.5);
                opacity: 0.6;
            }

            /* Footer mobile */
            .landing-footer {
                padding: 16px;
            }

            .footer-inner {
                flex-direction: column;
                gap: 8px;
                text-align: center;
            }

            .footer-brand span {
                font-size: 0.8rem;
            }

            .footer-copy,
            .footer-link {
                font-size: 0.72rem;
            }

            .modal-content {
                width: 98% !important;
                margin: 2vh auto !important;
                max-height: 95vh;
                border-radius: 14px;
                padding: 12px !important;
            }

            .auth-form {
                width: 95% !important;
                padding: 16px !important;
            }
        }

        /* Sidebar toggle button (hidden by default, shown on mobile) */
        .sidebar-toggle {
            display: none;
            position: fixed;
            bottom: 10px;
            left: 50%;
            transform: translateX(-50%);
            z-index: 1001;
            width: 50px;
            height: 6px;
            background: rgba(0, 0, 0, 0.2);
            border-radius: 3px;
            border: none;
            cursor: pointer;
            padding: 0;
        }

        .dark-mode .sidebar-toggle {
            background: rgba(255, 255, 255, 0.2);
        }

        /* Live navigation overlay */
        .live-nav-bar {
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            background: var(--glass-bg);
            backdrop-filter: blur(16px);
            -webkit-backdrop-filter: blur(16px);
            border-top: var(--glass-border);
            padding: 12px 20px;
            z-index: 999;
            display: none;
            align-items: center;
            justify-content: space-between;
            box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
        }

        .live-nav-bar.active {
            display: flex;
        }

        .live-nav-info {
            display: flex;
            flex-direction: column;
            gap: 2px;
        }

        .live-nav-info .distance {
            font-size: 1.4rem;
            font-weight: 700;
            color: #1e293b;
        }

        .dark-mode .live-nav-info .distance {
            color: #f1f5f9;
        }

        .live-nav-info .eta {
            font-size: 0.85rem;
            color: #64748b;
        }

        .dark-mode .live-nav-info .eta {
            color: #94a3b8;
        }

        .live-nav-stop {
            padding: 10px 24px;
            background: #ef4444;
            color: white;
            border: none;
            border-radius: 50px;
            font-weight: 600;
            cursor: pointer;
            font-size: 0.9rem;
            width: auto;
        }

        .live-nav-stop:hover {
            background: #dc2626;
        }

        /* Logo dark mode swap */
        .dark-mode .logo-light {
            display: none !important;
        }

        .dark-mode .logo-dark {
            display: inline !important;
        }

        .stats-panel {
            background: #f8fafc;
            padding: 20px;
            border-radius: 15px;
            display: flex;
            flex-direction: column;
        }

        .poi-card {
            text-align: center;
            min-width: 100px;
            padding: 10px;
            background: white;
            border-radius: 10px;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
        }

        .poi-card .poi-value {
            color: #3b82f6;
        }

        .poi-card .poi-label {
            color: #64748b;
        }

        .dark-mode .stats-panel {
            background: #334155;
        }

        .dark-mode .stats-panel h3 {
            color: #f1f5f9;
        }

        .dark-mode .poi-card {
            background: #1e293b;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
        }

        .dark-mode .poi-card .poi-value {
            color: #60a5fa;
        }

        .dark-mode .poi-card .poi-label {
            color: #f1f5f9;
        }

        html,
        body {
            overscroll-behavior-y: none;
        }

        .modal-content {
            overscroll-behavior-y: none;
        }