        :root {
            color-scheme: light dark;

            /* ── Klafny v0.4 brand foundation (BRAND.md §3, §4) ── */
            --klafny-page-dark:        #1A1A1C;
            --klafny-page-elevated:   #252528;
            --klafny-gold:        #D4AF37;
            --klafny-gold-soft:   #E8C875;
            --klafny-teal:        #1F6B6B;
            --klafny-teal-deep:   #134A4A;
            --klafny-paper:       #FFFFFF;
            --klafny-ink:         #0B0B0B;
            --klafny-ink-soft:    #2D2D2D;
            --klafny-suit-red:    #C8102E;
            --klafny-font-display: 'Bricolage Grotesque', system-ui, sans-serif;
            --klafny-font-body:    'Alef', 'Heebo', sans-serif;

            --bg-color: #FDFCFB;
            --text-color: #2A2A2A;
            --text-muted: #5A5A5A;
            --card-bg: #FAF7F4;
            --filter-bg: #F2F4F7;
            --border-color: #DCE0E5;
            --border-light: #E8ECF1;
            --primary: #1F6B6B;
            --title-color: #1E1E1E;
            --btn-bg: #F2F4F7;
            --badge-bg: #E8ECF1;
            --challenge-bg: #FFF4EC;
            --challenge-text: #8C3F18;
            --poker-bg: #F2F4F7;
            --overlay-bg: rgba(0, 0, 0, 0.55);
            /* Destination accent (consumed by hero card) */
            --theme-accent:   var(--klafny-teal);
            --theme-card-end: var(--klafny-page-dark);
            /* ── Premium Micro-interaction Easing ── */
            --ease-ui:     cubic-bezier(0.25, 0.46, 0.45, 0.94);  /* smooth ease-out */
            --ease-enter:  cubic-bezier(0.0,  0.0,  0.2,  1.0);   /* fast decel, Apple HIG */
            --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1.0);   /* spring with overshoot */

            /* ── Klafny v0.4 aliases — old token → brand token ── */
            --bg-color:    var(--klafny-paper);
            --text-color:  var(--klafny-ink);
            --card-bg:     var(--klafny-paper);
        }

        body.dark-mode {
            --text-color: #E8E4DF;
            --text-muted: #A09890;
            --filter-bg: #252528;
            --border-color: #33333A;
            --border-light: #252528;
            --primary: #7DC4C4;
            --title-color: #D8D2C9;
            --klafny-teal: #7DC4C4;
            --badge-bg: #252528;
            --challenge-bg: #3A2218;
            --challenge-text: #F4A070;
            --poker-bg: #202224;
            /* Dark-mode accent terminus — page-elevated keeps the card body visible against page-dark */
            --theme-card-end: var(--klafny-page-elevated);

            /* ── Klafny v0.4 aliases — surface dark ── */
            --bg-color:   var(--klafny-page-dark);
            --card-bg:    var(--klafny-page-elevated);
            --btn-bg:     color-mix(in srgb, var(--klafny-page-dark) 70%, #fff 8%);
            /* --text-color stays #E8E4DF — paper-on-charcoal reading color */
        }

        body.dark-mode::after {
            content: '';
            position: fixed;
            inset: 0;
            pointer-events: none;
            z-index: 9999;
            opacity: 0.04;
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180' viewBox='0 0 180 180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
        }

        html { scroll-behavior: smooth; overflow-y: scroll; scrollbar-gutter: stable; }
        body { font-family: var(--klafny-font-body); background-color: var(--bg-color); color: var(--text-color); margin: 0; padding: 0; transition: background-color 0.3s, color 0.3s; padding-bottom: 80px; touch-action: manipulation; line-height: 1.6; overflow-x: hidden; }
        .exp-modal-content { overflow-x: hidden; }
        button, a, .game-card, .calc-tab-btn, .game-sub-btn, .nav-btn, .overlay-back-btn, .info-badge, .genre-tag, .dest-grid-card, .quick-tool-btn { touch-action: manipulation; }

        /* ערכות נושא (Themes) — light mode */
        [data-theme="thailand"] {
            --theme-accent: #0E8A95;
            --challenge-bg: #FFEDD5;
            --challenge-text: #9A3412;
        }
        [data-theme="other"] {
            --theme-accent: #3F4A5C;
        }
        [data-theme="india"] {
            --theme-accent: #8A3A1A;
            --challenge-bg: #FEF3C7;
            --challenge-text: #92400E;
        }
        [data-theme="vietnam"] {
            --theme-accent: #2A5530;
            --challenge-bg: #FEE2E2;
            --challenge-text: #991B1B;
        }
        [data-theme="philippines"] {
            --theme-accent: #1F5780;
            --challenge-bg: #D1FAE5;
            --challenge-text: #065F46;
        }

        /* ערכות נושא — night mode (lifted hue family for legibility on dark page) */
        body.dark-mode[data-theme="thailand"] {
            --theme-accent: #5BC4CC;
            --challenge-bg: #1A3A3D;
            --challenge-text: #7FCBD3;
        }
        body.dark-mode[data-theme="india"] {
            --theme-accent: #E08D62;
            --challenge-bg: #3A2218;
            --challenge-text: #F4A070;
        }
        body.dark-mode[data-theme="vietnam"] {
            --theme-accent: #7FBE8B;
            --challenge-bg: #1E3A26;
            --challenge-text: #A0D4AB;
        }
        body.dark-mode[data-theme="philippines"] {
            --theme-accent: #6FAEDC;
            --challenge-bg: #1A3550;
            --challenge-text: #9CC8E8;
        }
        body.dark-mode[data-theme="other"] {
            --theme-accent: #6B7585;
        }

        /* עיצוב מודאל קבלת פנים */
        .welcome-modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.8); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); z-index: 4999; display: none; justify-content: center; align-items: center; opacity: 0; transition: opacity 0.3s; }
        .welcome-modal.active { display: flex; opacity: 1; padding: 5vh 0; box-sizing: border-box; }
        .welcome-modal.active .welcome-content { animation: modalEnter 0.32s var(--ease-spring); }
        .welcome-content { background: var(--card-bg); width: 90%; max-width: 400px; border-radius: 20px; padding: 30px 20px; text-align: center; box-shadow: 0 15px 35px rgba(0,0,0,0.4); }
        .welcome-content h2 { color: var(--primary); margin-top: 0; font-size: 1.8rem; }
        .welcome-content p { color: var(--text-muted); font-size: 1.1rem; margin-bottom: 25px; }
        .dest-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
        .dest-btn { padding: 15px 10px; border: 2px solid var(--border-light); border-radius: 12px; background: var(--bg-color); color: var(--text-color); font-family: 'Rubik', sans-serif; font-weight: 600; font-size: 1.1rem; cursor: pointer; transition: transform 0.12s var(--ease-spring), border-color 0.2s var(--ease-ui), background 0.2s var(--ease-ui); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 82px; box-sizing: border-box; }
        .dest-btn span { font-size: 1.8rem; line-height: 1; flex-shrink: 0; }
        .dest-btn:hover { border-color: var(--primary); background: var(--badge-bg); transform: translateY(-2px); }
        .dest-btn:active { transform: scale(0.95); }
        .dest-btn.other-btn { grid-column: span 2; background: var(--btn-bg); color: var(--primary); border-color: transparent; min-height: 52px; }
        .settings-dest-btn { min-height: 82px; justify-content: center; }
        .settings-dest-btn.other-btn { min-height: 52px; }
        .dest-btn.selected { border-color: var(--primary); background: var(--badge-bg); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 20%, transparent); }
        
        .container { padding: 15px; }
        #view-mytrip .container { padding-top: 0; }

        /* כותרת עליונה */
        .top-bar { display: flex; align-items: center; justify-content: center; min-height: 70px; padding: 0 58px; background-color: var(--card-bg); box-shadow: 0 2px 12px rgba(0,0,0,0.07); border-radius: 0 0 18px 18px; position: sticky; top: 0; z-index: 1000; transition: background-color 0.3s; }
        body.dark-mode .top-bar { background-color: rgba(26,28,30,0.88); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
        .top-bar-center { position: absolute; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 4px; pointer-events: none; }
        .main-title { margin: 0; font-size: 1.5rem; color: var(--title-color); font-weight: 800; letter-spacing: -0.03em; white-space: nowrap; }
        .tb-icon-btn { background: none; border: none; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; color: var(--primary); cursor: pointer; border-radius: 12px; -webkit-tap-highlight-color: transparent; padding: 0; transition: background 0.15s, opacity 0.2s; position: absolute; top: 50%; transform: translateY(-50%); }
        .tb-icon-btn:active { background: var(--btn-bg); }
        .tb-icon-btn.tb-hidden { display: none; }
        #tb-settings-btn { left: 10px; }
        #tb-search-btn { right: 10px; }
        #back-btn { right: 10px; }

        /* ===== Clock Pill ===== */
        .clock-pill { pointer-events: all; display: inline-flex; flex-direction: column; align-items: flex-start; gap: 1px; background: transparent; border: 1px solid var(--border-light); border-radius: 12px; padding: 5px 10px; height: auto; box-sizing: border-box; font-family: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: background 0.15s, border-color 0.15s; direction: ltr; flex-shrink: 0; max-width: 105px; }
        .pill-il   { display: block; font-size: 0.72rem; font-weight: 700; color: var(--text-muted); line-height: 1.3; font-variant-numeric: tabular-nums; white-space: nowrap; }
        .pill-dest { display: block; font-size: 0.68rem; font-weight: 600; color: var(--primary);    line-height: 1.3; font-variant-numeric: tabular-nums; white-space: nowrap; }
        .clock-pill:active { background: var(--btn-bg); border-color: var(--primary); }
        body.dark-mode .clock-pill { border-color: rgba(255,255,255,0.12); }
        /* Fixed floating pill — always visible top-left, next to settings button */
        /* Vertically centred in the 70px top-bar — matches the gear icon's midpoint */
        #clock-pill { position: fixed; top: 35px; left: 56px; transform: translateY(-50%); z-index: 1000; }

        /* ===== Clock Modal (bottom-sheet) ===== */
        #clock-modal { display: none; visibility: hidden; position: fixed; inset: 0; z-index: 3999; background: rgba(0,0,0,0.45); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); pointer-events: none; }
        #clock-modal.open { display: block; visibility: visible; pointer-events: auto; }
        /* Positioning delegated to .premium-floating-sheet; padding override kept for clock layout */
        #clock-modal-sheet { padding: 20px 20px 32px; }
        #clock-modal.open #clock-modal-sheet { display: flex; }
        .clock-modal-handle { width: 36px; height: 4px; background: var(--border-color); border-radius: 4px; margin: 0 auto 18px; }
        .clock-modal-title { margin: 0 0 16px; color: var(--title-color); font-size: 1rem; display: flex; align-items: center; gap: 8px; }
        .clock-modal-diff { text-align: center; font-size: 0.85rem; color: var(--text-muted); margin-bottom: 18px; line-height: 1.5; min-height: 1.5em; }
        .clock-modal-action { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; padding: 12px; border-radius: 12px; border: 1.5px solid var(--primary); background: transparent; color: var(--primary); font-family: inherit; font-size: 0.9rem; font-weight: 700; cursor: pointer; -webkit-tap-highlight-color: transparent; margin-bottom: 10px; transition: transform 0.12s var(--ease-spring), opacity 0.12s var(--ease-ui); }
        .clock-modal-action:active { transform: scale(0.96); opacity: 0.8; }
        .clock-modal-close { width: 100%; padding: 11px; border-radius: 12px; border: 1px solid var(--border-light); background: var(--btn-bg); color: var(--text-muted); font-family: inherit; font-size: 0.88rem; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: transform 0.12s var(--ease-spring), opacity 0.12s var(--ease-ui); }
        .clock-modal-close:active { transform: scale(0.97); opacity: 0.75; }
        .menu-btn { background: none; border: none; font-size: 1.8rem; color: var(--primary); cursor: pointer; padding: 0 10px; -webkit-tap-highlight-color: transparent; }

        /* Sidebar removed — navigation is now via bottom nav */

        /* ===== Games Lobby ===== */
        #games-lobby { padding: 4px 0 8px; }
        .games-lobby-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
        .lobby-card { background: var(--card-bg); border: 1px solid var(--border-light); border-radius: 20px; padding: 22px 16px 18px; text-align: center; cursor: pointer; transition: transform 0.15s var(--ease-spring), box-shadow 0.18s var(--ease-ui); box-shadow: 0 4px 20px rgba(0,0,0,0.04); -webkit-tap-highlight-color: transparent; display: flex; flex-direction: column; align-items: center; gap: 10px; position: relative; }
        .lobby-pin-btn { position: absolute; top: 8px; left: 8px; background: none; border: none; font-size: 1rem; cursor: pointer; color: var(--text-muted); padding: 4px 5px; line-height: 1; -webkit-tap-highlight-color: transparent; transition: color 0.15s, transform 0.12s; touch-action: manipulation; }
        .lobby-pin-btn.active { color: var(--primary); }
        .lobby-pin-btn:active { transform: scale(1.35); }
        .game-pin-btn { position: absolute; top: 6px; left: 6px; background: none; border: none; font-size: 1.1rem; cursor: pointer; color: var(--text-muted); padding: 4px 5px; line-height: 1; -webkit-tap-highlight-color: transparent; transition: color 0.15s, transform 0.12s; touch-action: manipulation; z-index: 2; }
        .game-pin-btn.active { color: var(--primary); }
        .game-pin-btn:active { transform: scale(1.35); }
        .home-quick-favs-section { margin-bottom: 20px; }
        .lobby-card:active { transform: scale(0.94); box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
        .lobby-card-icon { width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; border-radius: 14px; background: color-mix(in srgb, var(--primary) 10%, var(--btn-bg)); flex-shrink: 0; }
        .lobby-card-label { font-size: 0.95rem; font-weight: 700; color: var(--title-color); letter-spacing: -0.01em; line-height: 1.3; }
        .lobby-card-sub { font-size: 0.72rem; color: var(--text-muted); font-weight: 500; }
        .games-back-btn { display: flex; align-items: center; gap: 8px; background: none; border: none; color: var(--primary); font-family: inherit; font-size: 1rem; font-weight: 700; cursor: pointer; padding: 4px 0 16px; -webkit-tap-highlight-color: transparent; }

        /* כפתורים צפים */
        .fab-btn { position: fixed; bottom: 80px; background-color: var(--card-bg); color: var(--text-color); border: 2px solid var(--border-color); border-radius: 50%; width: 50px; height: 50px; font-size: 1.5rem; display: flex; justify-content: center; align-items: center; cursor: pointer; box-shadow: 0 4px 10px rgba(0,0,0,0.2); z-index: 1000; transition: transform 0.2s, background-color 0.3s, opacity 0.3s; -webkit-tap-highlight-color: transparent; padding: 0; }
        .fab-btn:active { transform: scale(0.9); }
        .back-to-top { right: 20px; background-color: var(--primary); color: #fff; border-color: var(--primary); opacity: 0; pointer-events: none; font-size: 1.2rem; }
        .back-to-top.visible { opacity: 1; pointer-events: auto; }

        /* אזור סינון וחיפוש */
        .filter-section { background-color: var(--filter-bg); border-radius: 12px; box-shadow: 0 2px 8px rgba(0,0,0,0.08); margin-bottom: 20px; border: 1px solid var(--border-light); overflow: hidden; }
        .filter-header { padding: 15px; display: flex; justify-content: space-between; align-items: center; cursor: pointer; font-weight: bold; color: var(--primary); background-color: var(--filter-bg); -webkit-tap-highlight-color: transparent; }
        .filter-header-icon { transition: transform 0.3s ease; }
        .filter-section.open .filter-header-icon { transform: rotate(180deg); }
        .filter-content { display: none; padding: 0 15px 15px 15px; border-top: 1px solid var(--border-light); }
        .filter-section.open .filter-content { display: block; animation: fadeIn 0.3s ease; }

        /* אזור החיפוש וכפתור הרנדום הקומפקטי */
        .search-random-wrapper { display: flex; gap: 10px; align-items: center; margin-bottom: 15px; margin-top: 10px; }
        .search-wrapper { position: relative; flex-grow: 1; display: flex; align-items: center; }
        .search-input { width: 100%; padding: 12px 35px 12px 12px; border: 1px solid var(--border-color); border-radius: 8px; box-sizing: border-box; background-color: var(--bg-color); color: var(--text-color); font-family: inherit; font-size: 1rem; transition: border-color 0.2s; }
        .search-input:focus { outline: none; border-color: var(--primary); }
        .clear-search-btn { position: absolute; left: 10px; background: none; border: none; font-size: 1.2rem; color: var(--text-muted); cursor: pointer; display: none; padding: 5px; }
        
        .random-btn-compact { background-color: var(--primary); color: white; border: none; width: 45px; height: 45px; border-radius: 8px; font-size: 1.5rem; cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; box-shadow: 0 2px 5px rgba(0,0,0,0.1); transition: transform 0.1s, background-color 0.3s; }
        .random-btn-compact:active { transform: scale(0.9); }

        .filter-group { margin-bottom: 12px; }
        .filter-group:last-child { margin-bottom: 0; }
        .filter-group h2 { margin: 0 0 8px 0; font-size: 0.9rem; color: var(--title-color); border-right: 3px solid var(--primary); padding-right: 8px; }
        .filter-buttons { display: flex; gap: 8px; flex-wrap: wrap; }
        .filter-btn { background-color: var(--btn-bg); border: 1px solid var(--border-color); color: var(--text-color); padding: 8px 16px; border-radius: 20px; font-size: 0.85rem; font-weight: 500; cursor: pointer; transition: transform 0.1s var(--ease-spring), background 0.18s var(--ease-ui), border-color 0.18s var(--ease-ui), color 0.18s var(--ease-ui); -webkit-tap-highlight-color: transparent; }
        .filter-btn:active { transform: scale(0.92); }
        .filter-btn.active { background-color: var(--primary); color: #fff; border-color: var(--primary); }
        .fav-filter { background-color: #fff3cd; color: #664d03; border-color: #ffc107; }
        body.dark-mode .fav-filter { background-color: #332701; color: #ffc107; border-color: #ffc107; }
        .fav-filter.active { background-color: #ffc107; color: #000; }

        /* Bottom Nav — Glassmorphism */
        #bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; z-index: 1500; background: rgba(255,252,250,0.82); backdrop-filter: blur(18px) saturate(180%); -webkit-backdrop-filter: blur(18px) saturate(180%); border-top: 1px solid rgba(196,112,74,0.15); box-shadow: 0 -4px 24px rgba(0,0,0,0.08); display: flex; height: 64px; padding-bottom: env(safe-area-inset-bottom, 0); }
        body.dark-mode #bottom-nav { background: rgba(26,28,30,0.85); border-top-color: rgba(224,128,96,0.15); box-shadow: 0 -4px 24px rgba(0,0,0,0.3); }
        .b-nav-item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; cursor: pointer; color: var(--text-muted); transition: color 0.2s var(--ease-ui), transform 0.15s var(--ease-spring); -webkit-tap-highlight-color: transparent; user-select: none; pointer-events: auto; position: relative; z-index: 10; }
        .b-nav-item:active { transform: scale(0.86); }
        .b-nav-item.active { color: var(--primary); }
        .b-nav-icon { width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
        .b-nav-icon svg { width: 24px; height: 24px; }
        .b-nav-text { font-size: 0.66rem; font-weight: 700; letter-spacing: 0.02em; }

        /* כרטיסיות המשחקים - Bento Box / App Store style */
        .genre-section { display: none; margin-bottom: 25px; background: var(--card-bg); border-radius: 16px; border: 1px solid var(--border-light); overflow: hidden; box-shadow: 0 3px 12px rgba(0,0,0,0.07); }
        .genre-section-header { padding: 14px 16px 12px; background: color-mix(in srgb, var(--primary) 10%, var(--btn-bg)); border-bottom: 2px solid color-mix(in srgb, var(--primary) 30%, var(--border-light)); }
        .genre-row-title { margin: 0; font-size: 1.1rem; color: var(--title-color); font-weight: 800; letter-spacing: -0.02em; display: flex; align-items: center; gap: 8px; }
        .genre-row-title::before { content: ''; display: inline-block; width: 4px; height: 1.2em; background: var(--primary); border-radius: 3px; flex-shrink: 0; }
        .genre-section-body { padding: 12px 12px 14px; }
        .genre-row { display: flex; gap: 16px; overflow-x: auto; padding: 10px 4% 12px; -webkit-overflow-scrolling: touch; scrollbar-width: none; align-items: stretch; }
        .genre-row::-webkit-scrollbar { display: none; }
        .game-card { background-color: var(--card-bg); border-radius: 16px; box-shadow: 0 4px 16px rgba(0,0,0,0.06); overflow: hidden; border: 1px solid var(--border-light); min-width: 155px; width: 155px; cursor: pointer; transition: transform 0.18s var(--ease-spring), box-shadow 0.2s var(--ease-ui); flex-shrink: 0; display: flex; flex-direction: column; position: relative; }
        .game-card:active { transform: scale(0.95); }
        @media (hover: hover) { .game-card:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0,0,0,0.14); } }
        .game-header { padding: 12px; -webkit-tap-highlight-color: transparent; box-sizing: border-box; width: 100%; display: flex; flex-direction: column; flex-grow: 1; }
        .header-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 6px; }
        .game-title { margin: 0; font-size: 0.92rem; color: var(--title-color); font-weight: bold; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; padding-left: 4px; unicode-bidi: plaintext; }
        .header-icons { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
        .fav-star { font-size: 1.4rem; cursor: pointer; color: #bbb; transition: color 0.2s, transform 0.2s; user-select: none; line-height: 1; -webkit-tap-highlight-color: transparent; }
        .fav-star.active { color: var(--primary); }
        .fav-star:active { transform: scale(1.3); }
        .toggle-icon { display: none; }
        .game-hook { font-style: italic; color: #7f8c8d; margin: 0 0 8px 0; font-size: 0.78rem; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; unicode-bidi: plaintext; }
        .game-info { display: flex; flex-wrap: wrap; gap: 6px; font-size: 0.75rem; font-weight: 500; margin-top: auto; justify-content: center; }
        .info-badge { background-color: var(--badge-bg); padding: 3px 9px; border-radius: 20px; display: flex; align-items: center; gap: 3px; color: var(--text-muted); font-size: 0.72rem; font-weight: 600; }
        .genre-tag { background-color: color-mix(in srgb, var(--primary) 15%, var(--badge-bg)); color: var(--primary); padding: 3px 9px; border-radius: 20px; font-size: 0.7rem; font-weight: 700; }
        .game-body { display: none; padding: 0 16px 20px 16px; border-top: 1px solid var(--border-light); background-color: var(--card-bg); box-sizing: border-box; width: 100%; }
        #game-info-overlay .game-body { display: block; animation: fadeIn 0.3s ease; }
        /* #game-info-overlay .close-btn-container is intentionally visible */
        /* Game info overlay */
        #game-info-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100dvh; z-index: 2600; background: var(--bg-color); overflow-y: auto; display: none; pointer-events: none; }
        #game-info-overlay.active { display: block; pointer-events: auto; }
        #game-info-overlay-header { padding: 16px 16px 14px; border-bottom: 1px solid var(--border-light); }

        /* ===== Snake Game Overlay ===== */
        #snake-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100dvh; z-index: 2500; background: var(--bg-color); overflow-y: auto; display: none; pointer-events: none; }
        #snake-overlay.active { display: block; pointer-events: auto; }
        #snake-canvas { touch-action: none; }
        .dpad { display: grid; grid-template-areas: '. up .' 'left . right' '. down .'; grid-template-columns: 64px 64px 64px; gap: 6px; justify-content: center; margin: 18px auto 0; direction: ltr; }
        .dpad-btn { width: 64px; height: 64px; border-radius: 12px; border: 1px solid var(--border-color); background: var(--btn-bg); color: var(--title-color); font-size: 1.6rem; cursor: pointer; display: flex; align-items: center; justify-content: center; -webkit-tap-highlight-color: transparent; user-select: none; transition: background 0.1s, transform 0.1s; }
        .dpad-btn:active { background: var(--primary); color: #fff; transform: scale(0.88); }
        .dpad-up { grid-area: up; } .dpad-left { grid-area: left; } .dpad-right { grid-area: right; } .dpad-down { grid-area: down; }

        /* ===== Trip Builder ===== */
        .wizard-step { background: var(--card-bg); border: 1px solid var(--border-light); border-radius: 16px; padding: 20px; margin-bottom: 16px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); position: relative; z-index: 1; }
        .wizard-step h3 { margin: 0 0 14px; font-size: 1.1rem; color: var(--primary); display: flex; align-items: center; gap: 8px; }
        .wizard-chips { display: flex; flex-wrap: wrap; gap: 10px; }
        .wizard-chip { padding: 10px 16px; border-radius: 24px; border: 2px solid var(--border-color); background: var(--bg-color); color: var(--text-color); font-family: inherit; font-size: 0.95rem; cursor: pointer; transition: transform 0.1s var(--ease-spring), border-color 0.18s var(--ease-ui), background 0.18s var(--ease-ui), color 0.18s var(--ease-ui); -webkit-tap-highlight-color: transparent; touch-action: manipulation; user-select: none; }
        .wizard-chip:active { transform: scale(0.94); }
        .wizard-chip.selected { border-color: var(--primary); background: var(--primary); color: #fff; font-weight: bold; }
        .generate-btn { width: 100%; padding: 18px; border-radius: 16px; border: none; background: linear-gradient(135deg, var(--primary), #27ae60); color: #fff; font-family: inherit; font-size: 1.2rem; font-weight: bold; cursor: pointer; margin-top: 8px; letter-spacing: 0.5px; box-shadow: 0 6px 20px rgba(41,128,185,0.35); transition: transform 0.15s, box-shadow 0.15s; -webkit-tap-highlight-color: transparent; }
        .generate-btn:active { transform: scale(0.97); box-shadow: 0 3px 10px rgba(41,128,185,0.2); }

        /* ===== Offline Games card list ===== */
        .offline-game-btn { display: flex; align-items: center; gap: 16px; padding: 18px 20px; border: 1px solid var(--border-light); border-radius: 16px; background: var(--card-bg); cursor: pointer; -webkit-tap-highlight-color: transparent; transition: border-color 0.2s var(--ease-ui), transform 0.12s var(--ease-spring); width: 100%; box-sizing: border-box; }
        .offline-game-btn:active { transform: scale(0.97); border-color: var(--primary); }
        .offline-game-icon { font-size: 2.4rem; flex-shrink: 0; }

        /* Back-button exit toast */
        #back-toast { position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%); background: rgba(0,0,0,0.82); color: #fff; padding: 11px 22px; border-radius: 22px; font-size: 0.95rem; z-index: 99999; opacity: 0; transition: opacity 0.25s; pointer-events: none; white-space: nowrap; }
        #back-toast.show { opacity: 1; }

        /* Game full-screen overlay */
        #game-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100dvh; z-index: 2500; background: var(--bg-color); overflow-y: auto; display: none; pointer-events: none; }
        #game-overlay.active { display: block; pointer-events: auto; }
        .overlay-back-btn { position: sticky; top: 0; z-index: 10; width: 100%; display: flex; align-items: center; gap: 8px; padding: 13px 16px; background: var(--card-bg); border-bottom: 1px solid var(--border-light); border: none; cursor: pointer; font-size: 1rem; font-weight: bold; color: var(--primary); font-family: inherit; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
        .overlay-back-btn:active { background: var(--btn-bg); }
        #game-overlay .overlay-content { padding: 16px 16px 50px; }
        
        /* ═══════════════════════════════════════════════════════════════
           PREMIUM ANIMATION SYSTEM — only transform & opacity animated
           ═══════════════════════════════════════════════════════════════ */
        @keyframes globeSpin    { from { transform:rotate(0deg); } to { transform:rotate(360deg); } }
        .globe-spin             { animation: globeSpin 24s linear infinite; }
        @keyframes fadeIn       { from { opacity:0; transform:translateY(-4px); } to { opacity:1; transform:translateY(0); } }
        @keyframes fadeSlideUp  { from { opacity:0; transform:translateY(16px); } to { opacity:1; transform:translateY(0); } }
        @keyframes scaleIn      { from { opacity:0; transform:scale(0.96);      } to { opacity:1; transform:scale(1);    } }
        @keyframes modalEnter   { from { opacity:0; transform:scale(0.94);      } to { opacity:1; transform:scale(1);    } }
        @keyframes slideUpSheet { from { transform:translateY(105%);             } to { transform:translateY(0);          } }
        @keyframes fadeBackdrop { from { opacity:0;                              } to { opacity:1;                        } }

        /* ── 1. View transitions — slide disabled, instant swap ── */
        .view-section.active { }

        /* ── 2. Full-screen overlays (.active class) ── */
        #dest-info-overlay.active, #planned-trips-overlay.active, #master-journal-overlay.active,
        #emergency-overlay.active, #game-info-overlay.active, #snake-overlay.active,
        #game-overlay.active { animation: scaleIn 0.26s var(--ease-spring) both; }

        /* ── 3. Full-screen overlays (toggled via style.display) ── */
        #block-puzzle-overlay, #map-overlay { animation: scaleIn 0.26s var(--ease-spring) both; }

        /* ── 4. Bottom-sheet backdrop fade ── */
        #clock-modal.open  { animation: fadeBackdrop 0.24s var(--ease-ui) both; }
        /* pointer-events re-enabled in JS when display:flex is set */
        #conv-exp-modal    { animation: fadeBackdrop 0.24s var(--ease-ui) both; pointer-events: none; }
        #exp-edit-modal    { animation: fadeBackdrop 0.24s var(--ease-ui) both; pointer-events: none; }
        #dest-edit-modal   { animation: fadeBackdrop 0.22s var(--ease-ui) both; pointer-events: none; }

        /* Clock modal closing animation (class added by JS) */
        #clock-modal.closing                    { animation: fadeBackdrop 0.24s var(--ease-ui) reverse both; pointer-events: none; visibility: visible; }
        #clock-modal.closing #clock-modal-sheet { animation: fadeBackdrop 0.2s var(--ease-ui) reverse both; }

        /* ── 5. Floating card fade-in (no transform — preserves translate centering) ── */
        #clock-modal.open #clock-modal-sheet { animation: fadeBackdrop 0.24s var(--ease-spring) both; }
        #conv-exp-modal .exp-modal-content   { animation: slideUpSheet 0.38s var(--ease-spring) both; }
        #exp-edit-modal .exp-modal-content   { animation: slideUpSheet 0.38s var(--ease-spring) both; }

        /* ── 6. Center dialog inner card ── */
        #dest-edit-modal > div { animation: modalEnter 0.28s var(--ease-spring) both; }

        .rules-section h3 { font-size: 1.05rem; color: var(--primary); margin: 20px 0 8px 0; border-bottom: 1px solid var(--border-light); padding-bottom: 5px; font-weight: 700; }
        .rules-section h3:first-child { margin-top: 15px; }
        .rules-section p { margin: 0 0 10px 0; line-height: 1.75; font-size: 1rem; font-weight: 500; color: var(--text-color); unicode-bidi: plaintext; }
        .rules-list { margin: 5px 0 15px 0; padding-right: 20px; line-height: 1.8; font-size: 1rem; font-weight: 500; color: var(--text-color); unicode-bidi: plaintext; }
        .rules-list li { margin-bottom: 6px; }
        .challenge-box { background-color: var(--challenge-bg); padding: 14px; border-radius: 10px; border-right: 4px solid #E89A3F; margin-top: 15px; font-size: 1rem; font-weight: 600; color: var(--challenge-text); line-height: 1.7; }
        .close-btn-container { text-align: center; margin-top: 25px; padding-top: 15px; border-top: 1px dashed var(--border-light); }
        .close-btn { background-color: var(--btn-bg); color: var(--primary); border: 1px solid var(--border-color); font-size: 0.95rem; font-weight: bold; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 5px; padding: 10px 20px; border-radius: 20px; transition: all 0.2s; }
        
        .card-demo { font-family: monospace; font-size: 1.1rem; direction: ltr; background: var(--bg-color); color: var(--text-color); padding: 4px 8px; border: 1px solid var(--border-color); border-radius: 6px; width: fit-content; }
        .red-suit { color: #d32f2f; }
        body.dark-mode .red-suit { color: #ff5252; }
        .black-suit { color: #212121; }
        body.dark-mode .black-suit { color: #fff; }
        .poker-hands { background-color: var(--poker-bg); border: 1px solid var(--border-light); border-radius: 8px; padding: 15px 10px 5px 10px; margin-top: 10px; font-size: 0.9rem; }
        .poker-hands ol, .poker-hands ul { margin: 0; padding-right: 20px; }
        .poker-hands li { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; margin-bottom: 12px; border-bottom: 1px dashed var(--border-color); padding-bottom: 8px; }
        .poker-hands li:last-child { border-bottom: none; }
        .poker-hands strong { color: var(--title-color); }

        /* אזור הקוביות (Dice Roller) */
        .dice-view { display: none; background-color: var(--card-bg); border-radius: 12px; padding: 20px; box-shadow: 0 4px 10px rgba(0,0,0,0.08); border: 1px solid var(--border-light); text-align: center; }
        .dice-view h2 { margin-top: 0; color: var(--title-color); font-size: 1.4rem; }
        
        .dice-controls { display: flex; flex-direction: column; gap: 15px; margin-bottom: 25px; text-align: right; }
        .control-group { display: flex; flex-direction: column; gap: 5px; }
        .control-group label { font-size: 0.95rem; font-weight: bold; color: var(--text-color); }
        .control-group input, .control-group select { padding: 10px; border-radius: 8px; border: 1px solid var(--border-color); background-color: var(--bg-color); color: var(--text-color); font-size: 1rem; font-family: inherit; }
        .control-group input:focus, .control-group select:focus { outline: none; border-color: var(--primary); }
        
        .stepper-wrapper { display: flex; align-items: center; gap: 8px; }
        .stepper-btn { background-color: var(--primary); color: white; border: none; width: 44px; height: 44px; border-radius: 8px; font-size: 1.5rem; cursor: pointer; display: flex; justify-content: center; align-items: center; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
        .stepper-btn:active { transform: scale(0.9); }
        #dice-amount { text-align: center; flex-grow: 1; font-weight: bold; font-size: 1.1rem; }

        .roll-btn { background-color: var(--primary); color: white; border: none; padding: 15px; border-radius: 8px; font-size: 1.2rem; font-weight: bold; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 10px; box-shadow: 0 4px 10px rgba(41, 128, 185, 0.3); transition: transform 0.1s, background-color 0.3s; width: 100%; }
        .roll-btn:active { transform: scale(0.95); }

        .dice-results { display: flex; flex-wrap: wrap; justify-content: center; gap: 15px; min-height: 100px; align-items: center; padding: 20px; background: var(--bg-color); border-radius: 12px; border: 1px inset var(--border-light); }
        
        .die { width: 60px; height: 60px; background-color: var(--card-bg); border: 2px solid var(--primary); border-radius: 12px; display: flex; justify-content: center; align-items: center; font-size: 1.8rem; font-weight: bold; color: var(--primary); box-shadow: 0 4px 8px rgba(0,0,0,0.15); user-select: none; }
        
        .die.rolling { animation: roll-shake 0.4s infinite linear; color: transparent; text-shadow: 0 0 5px rgba(41,128,185,0.5); }
        .die.pop { animation: pop-in 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; }
        
        @keyframes roll-shake {
            0% { transform: translate(0, 0) rotate(0deg) scale(1); }
            25% { transform: translate(3px, -5px) rotate(15deg) scale(1.1); }
            50% { transform: translate(-3px, 5px) rotate(-15deg) scale(0.9); }
            75% { transform: translate(-5px, -3px) rotate(25deg) scale(1.05); }
            100% { transform: translate(0, 0) rotate(0deg) scale(1); }
        }
        
        @keyframes pop-in {
            0% { transform: scale(0.5); opacity: 0; }
            80% { transform: scale(1.1); opacity: 1; }
            100% { transform: scale(1); opacity: 1; }
        }
        
        .sum-result { margin-top: 20px; font-size: 1.2rem; font-weight: bold; color: var(--title-color); display: none; }

        /* --- עיצוב למחשבונים --- */
        .calculator-box { background-color: var(--poker-bg); border: 2px dashed var(--border-color); border-radius: 12px; padding: 20px; margin-top: 25px; box-shadow: inset 0 0 10px rgba(0,0,0,0.02); }
        .calculator-box h3 { margin-top: 0; color: var(--primary); text-align: center; margin-bottom: 10px; font-size: 1.2rem; }
        .calc-table-wrapper { overflow-x: auto; margin-bottom: 15px; border-radius: 8px; border: 1px solid var(--border-light); direction: rtl; }
        .calc-table { width: 100%; border-collapse: collapse; text-align: center; background: var(--card-bg); font-size: 0.95rem; white-space: nowrap; }
        .calc-table th, .calc-table td { border: 1px solid var(--border-light); padding: 10px; min-width: 60px; }
        .calc-table th { background-color: var(--btn-bg); color: var(--title-color); font-weight: bold; }
        .calc-input { width: 100%; box-sizing: border-box; padding: 8px; text-align: center; border: 1px solid var(--border-color); border-radius: 6px; background: var(--bg-color); color: var(--text-color); font-family: inherit; font-size: 1rem; transition: border-color 0.2s; min-width: 50px; }
        .calc-input:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 2px rgba(41, 128, 185, 0.2); }
        .calc-btn { background-color: var(--primary); color: white; border: none; padding: 10px 15px; border-radius: 8px; cursor: pointer; font-weight: bold; font-size: 1rem; transition: transform 0.1s, background-color 0.2s; display: inline-flex; justify-content: center; align-items: center; flex: 1; }
        .calc-btn:active { transform: scale(0.95); }
        .calc-btn.danger { background-color: #e74c3c; flex: 0.5; }
        .calc-btn.danger:hover { background-color: #c0392b; }
        .add-player-wrapper { display: flex; gap: 10px; margin-bottom: 15px; }
        .add-player-input { flex-grow: 1; padding: 10px; border-radius: 8px; border: 1px solid var(--border-color); background: var(--bg-color); color: var(--text-color); font-family: inherit; }
        .add-player-input:focus { outline: none; border-color: var(--primary); }
        
        .yaniv-cut-badge { display: inline-block; font-size: 0.7rem; color: #fff; background: #27ae60; border-radius: 4px; padding: 2px 4px; margin-top: 4px; font-weight: normal; }
        .yaniv-eliminated { opacity: 0.6; text-decoration: line-through; color: #e74c3c; }

        .calc-table-wrapper { overflow-x: auto; direction: ltr; border-radius: 8px; border: 1px solid var(--border-color); margin-bottom: 15px; }
        .calc-table th, .calc-table td { white-space: nowrap; }
        .sticky-name { position: sticky; right: 0; z-index: 4; background: var(--card-bg); width: 70px; min-width: 70px; max-width: 70px; overflow: hidden; text-overflow: ellipsis; border-left: 1px solid var(--border-light); font-size: 0.85rem; }
        .sticky-input { position: sticky; right: 70px; z-index: 4; background: var(--badge-bg); width: 60px; min-width: 60px; max-width: 60px; border-left: 2px solid var(--border-color); box-shadow: -3px 0 5px rgba(0,0,0,0.05); }
        .sticky-input .calc-input { width: 52px; min-width: unset; padding: 6px 4px; font-size: 0.9rem; }
        .sticky-total { position: sticky; left: 0; z-index: 4; background: var(--card-bg); width: 60px; min-width: 60px; max-width: 60px; border-right: 2px solid var(--border-color); box-shadow: 3px 0 5px rgba(0,0,0,0.05); }
        .calc-table th.sticky-name, .calc-table th.sticky-input, .calc-table th.sticky-total { z-index: 5; background: var(--btn-bg); }
        .cp-btn-group { display: flex; gap: 5px; justify-content: center; align-items: center; }
        .cp-btn { padding: 4px 8px; border: none; border-radius: 4px; font-weight: bold; cursor: pointer; color: #fff; }
        .cp-btn.plus { background: #27ae60; }
        .cp-btn.minus { background: #e74c3c; }

        /* מחיקת שחקן */
        .del-player-btn { background: none; border: none; color: #e74c3c; font-size: 1rem; cursor: pointer; padding: 2px 5px; line-height: 1; opacity: 0.7; transition: opacity 0.2s; vertical-align: middle; }
        .del-player-btn:hover { opacity: 1; }

        /* עריכת תא ניקוד */
        .editable-score { cursor: pointer; border-radius: 4px; padding: 2px 4px; transition: background 0.15s; display: inline-block; min-width: 28px; }
        .editable-score:hover { background: var(--btn-bg); }
        .edit-score-input { width: 48px; padding: 2px 4px; text-align: center; border: 1px solid var(--primary); border-radius: 4px; background: var(--bg-color); color: var(--text-color); font-size: 0.9rem; font-family: inherit; }

        /* wrapper גלילה לטבלה — שם וסה"כ קבועים, סיבובים גוללים */
        .calc-table-wrapper { overflow-x: auto; margin-bottom: 15px; border-radius: 8px; border: 1px solid var(--border-light); direction: ltr; }
        .calc-table { width: max-content; min-width: 100%; border-collapse: collapse; text-align: center; background: var(--card-bg); font-size: 0.95rem; white-space: nowrap; direction: rtl; }

        .anim-btn { background-color: #8e44ad; color: #fff; border: none; padding: 8px 16px; border-radius: 20px; font-size: 0.9rem; font-weight: bold; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; box-shadow: 0 2px 5px rgba(142, 68, 173, 0.3); transition: transform 0.1s, background-color 0.2s; }
        .anim-btn:active { transform: scale(0.95); }
        .anim-btn:hover { background-color: #9b59b6; }

        /* --- מערכת האנימציות (Modal) --- */
        .anim-modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.85); z-index: 3000; display: none; justify-content: center; align-items: center; opacity: 0; transition: opacity 0.3s; pointer-events: none; }
        .anim-modal.active { display: flex; opacity: 1; pointer-events: auto; }
        .anim-content { background: var(--card-bg); width: 95%; max-width: 380px; border-radius: 12px; padding: 20px; position: relative; box-shadow: 0 10px 30px rgba(0,0,0,0.3); text-align: center; }
        .anim-modal.active .anim-content { animation: modalEnter 0.32s var(--ease-spring); }
        .close-anim-btn { position: absolute; top: 10px; right: 10px; background: none; border: none; font-size: 1.5rem; color: var(--text-muted); cursor: pointer; padding: 5px; line-height: 1; z-index: 100; }
        .anim-stage { height: 260px; background: #2c3e50; border-radius: 8px; position: relative; overflow: hidden; margin-top: 15px; border: 2px solid #34495e; direction: ltr; perspective: 1000px; }
        .anim-card { position: absolute; width: 42px; height: 60px; background: #fff; border-radius: 5px; display: flex; justify-content: center; align-items: center; font-weight: bold; font-size: 1.1rem; box-shadow: 0 2px 5px rgba(0,0,0,0.4); opacity: 0; border: 1px solid #ccc; backface-visibility: hidden; }
        .anim-card.red { color: #d32f2f; }
        .anim-card.black { color: #212121; }
        .anim-text-step { position: absolute; bottom: 8px; width: 100%; color: #ecf0f1; font-weight: 600; font-size: 0.95rem; opacity: 0; text-align: center; direction: rtl; text-shadow: 0 1px 3px rgba(0,0,0,0.8); padding: 0 10px; box-sizing: border-box; z-index: 10; }

        @keyframes show-text-early { 0%, 5% { opacity: 0; } 10%, 90% { opacity: 1; } 100% { opacity: 0; } }

        /* בלאק ג'ק (50 שניות מסודר) */
        .bj-stage { background: #1a5e20; border: 2px solid #2e7d32; }
        .bj-d1 { animation: bj-move-d1 50s infinite; z-index: 5;} 
        .bj-d2 { animation: bj-move-d2 50s infinite; z-index: 6;}
        .bj-p1-1 { animation: bj-move-p1-1 50s infinite; z-index: 5;}
        .bj-p1-2 { animation: bj-move-p1-2 50s infinite; z-index: 6; transform: rotate(5deg); }
        .bj-p2-1 { animation: bj-move-p2-1 50s infinite; z-index: 5;}
        .bj-p2-2 { animation: bj-move-p2-2 50s infinite; z-index: 6; transform: rotate(5deg); }
        .bj-p2-3 { animation: bj-move-p2-3 50s infinite; z-index: 7; transform: rotate(10deg); }
        .bj-p3-1 { animation: bj-move-p3-1 50s infinite; z-index: 5;}
        .bj-p3-2 { animation: bj-move-p3-2 50s infinite; z-index: 6; transform: rotate(5deg); }
        .bj-status { position: absolute; padding: 2px 6px; border-radius: 4px; font-size: 0.75rem; font-weight: bold; color: white; opacity: 0; text-align: center; z-index: 10; box-shadow: 0 1px 3px rgba(0,0,0,0.5);}
        .bj-stat-p1 { top: 185px; left: 10%; background: #e67e22; animation: bj-s-p1 50s infinite; }
        .bj-stat-p2 { top: 200px; left: 40%; background: #e74c3c; animation: bj-s-p2 50s infinite; }
        .bj-stat-p3 { top: 185px; left: 70%; background: #f1c40f; color: #000; animation: bj-s-p3 50s infinite; }
        .bj-stat-d  { top: 85px; left: 45%; background: #27ae60; animation: bj-s-d 50s infinite; } 

        @keyframes bj-move-p1-1 { 0%, 2% { top: -60px; left: 80%; opacity: 0; box-shadow: none; } 4%, 12% { top: 110px; left: 10%; opacity: 1; box-shadow: none;} 14%, 26% { top: 110px; left: 10%; opacity: 1; box-shadow: 0 0 15px #f1c40f; } 28%, 95% { top: 110px; left: 10%; opacity: 1; box-shadow: none; } 98%, 100% { top: 110px; left: 10%; opacity: 0; box-shadow: none; } }
        @keyframes bj-move-p1-2 { 0%, 10% { top: -60px; left: 80%; opacity: 0; box-shadow: none;} 12%, 13% { top: 125px; left: 16%; opacity: 1; box-shadow: none;} 14%, 26% { top: 125px; left: 16%; opacity: 1; box-shadow: 0 0 15px #f1c40f; } 28%, 95% { top: 125px; left: 16%; opacity: 1; box-shadow: none; } 98%, 100% { top: 125px; left: 16%; opacity: 0; box-shadow: none; } }

        @keyframes bj-move-p2-1 { 0%, 4% { top: -60px; left: 80%; opacity: 0; box-shadow: none; } 6%, 26% { top: 110px; left: 40%; opacity: 1; box-shadow: none; } 28%, 52% { top: 110px; left: 40%; opacity: 1; box-shadow: 0 0 15px #f1c40f; } 54%, 95% { top: 110px; left: 40%; opacity: 1; box-shadow: none; } 98%, 100% { top: 110px; left: 40%; opacity: 0; box-shadow: none; } }
        @keyframes bj-move-p2-2 { 0%, 12% { top: -60px; left: 80%; opacity: 0; } 14%, 26% { top: 125px; left: 46%; opacity: 1; box-shadow: none; } 28%, 52% { top: 125px; left: 46%; opacity: 1; box-shadow: 0 0 15px #f1c40f; } 54%, 95% { top: 125px; left: 46%; opacity: 1; box-shadow: none; } 98%, 100% { top: 125px; left: 46%; opacity: 0; box-shadow: none; } }
        @keyframes bj-move-p2-3 { 0%, 38% { top: -60px; left: 80%; opacity: 0; } 40%, 52% { top: 140px; left: 52%; opacity: 1; box-shadow: 0 0 15px #f1c40f; } 54%, 95% { top: 140px; left: 52%; opacity: 1; box-shadow: none; filter: grayscale(50%); } 98%, 100% { top: 140px; left: 52%; opacity: 0; box-shadow: none; filter: grayscale(50%); } }

        @keyframes bj-move-p3-1 { 0%, 6% { top: -60px; left: 80%; opacity: 0; } 8%, 52% { top: 110px; left: 70%; opacity: 1; box-shadow: none; } 54%, 66% { top: 110px; left: 70%; opacity: 1; box-shadow: 0 0 15px #f1c40f; } 68%, 95% { top: 110px; left: 70%; opacity: 1; box-shadow: none; } 98%, 100% { top: 110px; left: 70%; opacity: 0; box-shadow: none; } }
        @keyframes bj-move-p3-2 { 0%, 14% { top: -60px; left: 80%; opacity: 0; } 16%, 52% { top: 125px; left: 76%; opacity: 1; box-shadow: none; } 54%, 66% { top: 125px; left: 76%; opacity: 1; box-shadow: 0 0 15px #f1c40f; } 68%, 95% { top: 125px; left: 76%; opacity: 1; box-shadow: none; } 98%, 100% { top: 125px; left: 76%; opacity: 0; box-shadow: none; } }

        @keyframes bj-move-d1   { 0%, 8% { top: -60px; left: 80%; opacity: 0; } 10%, 66% { top: 20px; left: 40%; opacity: 1; box-shadow: none;} 68%, 88% { top: 20px; left: 40%; opacity: 1; box-shadow: 0 0 15px #f1c40f; } 90%, 95% { top: 20px; left: 40%; opacity: 1; box-shadow: none; } 98%, 100% { top: 20px; left: 40%; opacity: 0; box-shadow: none; } }
        @keyframes bj-move-d2 { 0%, 16% { top: -60px; left: 80%; opacity: 0; border: 2px solid #fff; } 18%, 66% { top: 20px; left: 52%; opacity: 1; border: 2px solid #fff; background: repeating-linear-gradient(45deg, #2980b9, #2980b9 5px, #3498db 5px, #3498db 10px); color: transparent; box-shadow: none; } 68%, 88% { top: 20px; left: 52%; opacity: 1; background: #fff; color: #d32f2f; border: 1px solid #ccc; box-shadow: 0 0 15px #f1c40f; } 90%, 95% { top: 20px; left: 52%; opacity: 1; background: #fff; color: #d32f2f; border: 1px solid #ccc; box-shadow: none; } 98%, 100% { top: 20px; left: 52%; opacity: 0; background: #fff; color: #d32f2f; border: 1px solid #ccc; box-shadow: none; } }

        @keyframes bj-s-p1 { 0%, 25% { opacity: 0; } 26%, 95% { opacity: 1; } 98%, 100% { opacity: 0; } }
        @keyframes bj-s-p2 { 0%, 46% { opacity: 0; } 48%, 95% { opacity: 1; } 98%, 100% { opacity: 0; } } 
        @keyframes bj-s-p3 { 0%, 60% { opacity: 0; } 62%, 95% { opacity: 1; } 98%, 100% { opacity: 0; } }
        @keyframes bj-s-d  { 0%, 80% { opacity: 0; } 82%, 95% { opacity: 1; } 98%, 100% { opacity: 0; } }

        /* אסים למעלה (Aces Up) - אנימציה חכמה 28 שניות */
        .aces-m-c1 { top: 30px; left: 10%; opacity: 1; } .aces-m-c2 { top: 45px; left: 10%; opacity: 1; } .aces-m-c3 { top: 60px; left: 10%; opacity: 1; }
        .aces-m-c4 { top: 30px; left: 35%; opacity: 1; } .aces-m-c5 { top: 45px; left: 35%; opacity: 1; }
        .aces-m-c7 { top: 30px; left: 85%; opacity: 1; } .aces-m-c8 { top: 45px; left: 85%; opacity: 1; } .aces-m-c9 { top: 60px; left: 85%; opacity: 1; } .aces-m-c10 { top: 75px; left: 85%; opacity: 1; } 
        .aces-m-c11 { top: 90px; left: 85%; opacity: 1; animation: a-high-5h 28s infinite; }

        .aces-3-spades { animation: a-move-3s 28s infinite; z-index: 6; } 
        .aces-a-spades { animation: a-move-as 28s infinite; z-index: 7; } 
        .aces-2-hearts { animation: a-move-2h 28s infinite; z-index: 5; } 

        @keyframes a-move-3s { 
            0%, 12% { top: 30px; left: 60%; opacity: 1; transform: scale(1.15); box-shadow: 0 0 15px #f1c40f; z-index: 10; } 
            15%, 100% { top: -100px; left: 60%; opacity: 0; transform: scale(1); box-shadow: none; z-index: 6; } 
        }
        @keyframes a-move-as { 
            0%, 12% { top: 90px; left: 10%; opacity: 1; transform: scale(1.15); box-shadow: 0 0 15px #f1c40f; z-index: 10; } 
            15%, 30% { top: 90px; left: 10%; opacity: 1; transform: scale(1); box-shadow: 0 2px 5px rgba(0,0,0,0.4); z-index: 7; } 
            35%, 100% { top: 30px; left: 60%; opacity: 1; transform: scale(1); box-shadow: 0 2px 5px rgba(0,0,0,0.4); z-index: 7; } 
        }
        @keyframes a-move-2h { 
            0%, 60% { top: 75px; left: 10%; opacity: 1; transform: scale(1); box-shadow: 0 2px 5px rgba(0,0,0,0.4); z-index: 5; } 
            64%, 78% { top: 75px; left: 10%; opacity: 1; transform: scale(1.15); box-shadow: 0 0 15px #f1c40f; z-index: 10; } 
            82%, 100% { top: -100px; left: 10%; opacity: 0; transform: scale(1); box-shadow: none; z-index: 5; } 
        }
        @keyframes a-high-5h { 
            0%, 60% { transform: scale(1); box-shadow: 0 2px 5px rgba(0,0,0,0.4); z-index: 1; } 
            64%, 78% { transform: scale(1.15); box-shadow: 0 0 15px #f1c40f; z-index: 10; } 
            82%, 100% { transform: scale(1); box-shadow: 0 2px 5px rgba(0,0,0,0.4); z-index: 1; } 
        }

        /* אסים למעלה: זריקה קצרה */
        .idiot-card1 { top: 50px; left: 20%; opacity: 1; } .idiot-card2 { top: 50px; left: 45%; opacity: 1; } .idiot-card3 { animation: idiotFly 4s infinite; z-index: 5; } .idiot-card4 { top: 50px; left: 95%; opacity: 1; } .idiot-step1 { animation: show-text-early 4s infinite; }
        @keyframes idiotFly { 0%, 30% { top: 50px; left: 70%; opacity: 1; transform: rotate(0deg); } 60%, 100% { top: -100px; left: 70%; opacity: 0; transform: rotate(45deg); } }

        /* דוראק: משיכת קוזיר */
        .durak-deck { top: 40px; left: 40%; opacity: 1; background: #2980b9; border: 2px solid #fff; z-index: 1;}
        .durak-kozir-card { animation: kozir-slide 10s infinite; z-index: 2; }
        @keyframes kozir-slide { 0%, 10% { top: 40px; left: 40%; opacity: 0; transform: rotate(0deg); z-index: 2; } 15%, 30% { top: 10px; left: 40%; opacity: 1; transform: rotate(0deg); background: #fff; z-index: 2; } 40%, 85% { top: 60px; left: 35%; opacity: 1; transform: rotate(90deg); background: #fff; z-index: 0; } 95%, 100% { top: 60px; left: 35%; opacity: 0; z-index: 0;} }
        .kozir-text-1 { animation: k-text1 10s infinite; z-index: 10; }
        .kozir-text-2 { animation: k-text2 10s infinite; z-index: 10; }
        @keyframes k-text1 { 0%, 5% { opacity: 0; } 10%, 35% { opacity: 1; } 36%, 100% { opacity: 0; } }
        @keyframes k-text2 { 0%, 35% { opacity: 0; } 40%, 85% { opacity: 1; } 90%, 100% { opacity: 0; } }

        /* דוראק: העברת תקיפה */
        .pass-card1 { animation: dropCard1 9s infinite; } .pass-card2 { animation: slideCard2 9s infinite; } .step1 { animation: showStep1 9s infinite; } .step2 { animation: showStep2 9s infinite; } .step3 { animation: showStep3 9s infinite; }
        @keyframes dropCard1 { 0%, 5% { top: -80px; left: 25%; opacity: 0; transform: rotate(0deg); } 15%, 70% { top: 40px; left: 35%; opacity: 1; transform: rotate(-8deg); } 80%, 100% { top: 40px; left: 120%; opacity: 1; transform: rotate(15deg); } }
        @keyframes slideCard2 { 0%, 35% { bottom: -80px; left: 55%; opacity: 0; transform: rotate(0deg); } 45%, 70% { bottom: 40px; left: 55%; opacity: 1; transform: rotate(5deg); } 80%, 100% { bottom: 40px; left: 120%; opacity: 1; transform: rotate(35deg); } }
        @keyframes showStep1 { 0%, 5% { opacity: 0; } 10%, 30% { opacity: 1; } 33%, 100% { opacity: 0; } }
        @keyframes showStep2 { 0%, 33% { opacity: 0; } 38%, 60% { opacity: 1; } 63%, 100% { opacity: 0; } }
        @keyframes showStep3 { 0%, 63% { opacity: 0; } 68%, 95% { opacity: 1; } 100% { opacity: 0; } }

        /* סוליטר */
        .sol-card1 { top: 30px; left: 40%; opacity: 1; z-index: 1; } .sol-card2 { animation: solSlide 4s infinite; z-index: 2; } .sol-step1 { animation: show-text-early 4s infinite; }
        @keyframes solSlide { 0% { top: -80px; left: 60%; opacity: 0; } 20%, 80% { top: 55px; left: 40%; opacity: 1; } 100% { top: 55px; left: 40%; opacity: 0; } }

        /* אקורדיון */
        .acc-card1 { top: 50px; left: 10%; opacity: 1; } .acc-card2 { top: 50px; left: 35%; opacity: 1; } .acc-card3 { top: 50px; left: 60%; opacity: 1; } .acc-card4 { animation: accJump 5s infinite; z-index: 5; } .acc-step1 { animation: show-text-early 5s infinite; }
        @keyframes accJump { 0%, 20% { top: 50px; left: 85%; opacity: 1; transform: scale(1); } 30% { top: 10px; left: 47%; opacity: 1; transform: scale(1.1) rotate(-10deg); } 45%, 80% { top: 50px; left: 10%; opacity: 1; transform: scale(1) rotate(0deg); } 100% { top: 50px; left: 10%; opacity: 0; } }

        /* שיטהד: חלוקת פתיחה (מתוקן ומסונכרן) */
        .sh-card-down { background: repeating-linear-gradient(45deg, #2980b9, #2980b9 5px, #3498db 5px, #3498db 10px) !important; color: transparent !important; border: 2px solid #fff !important; }

        .sh-d1 { top: 30px; left: 15%; opacity: 0; animation: sh-d1 15s infinite; }
        .sh-d2 { top: 30px; left: 45%; opacity: 0; animation: sh-d2 15s infinite; }
        .sh-d3 { top: 30px; left: 75%; opacity: 0; animation: sh-d3 15s infinite; }

        .sh-u1 { top: 40px; left: 15%; opacity: 0; animation: sh-u1 15s infinite; z-index: 2; }
        .sh-u2 { top: 40px; left: 45%; opacity: 0; animation: sh-u2 15s infinite; z-index: 2; }
        .sh-u3 { top: 40px; left: 75%; opacity: 0; animation: sh-u3 15s infinite; z-index: 2; }

        .sh-h1 { bottom: 45px; left: 25%; opacity: 0; animation: sh-h1 15s infinite; z-index: 25 !important; }
        .sh-h2 { bottom: 55px; left: 45%; opacity: 0; animation: sh-h2 15s infinite; z-index: 26 !important; }
        .sh-h3 { bottom: 45px; left: 65%; opacity: 0; animation: sh-h3 15s infinite; z-index: 25 !important; }

        @keyframes sh-d1 { 0%, 100% { opacity: 0; transform: translateY(-50px); } 2%, 90% { opacity: 1; transform: translateY(0); } 95% { opacity: 0; transform: translateY(0); } }
        @keyframes sh-d2 { 0%, 2%, 100% { opacity: 0; transform: translateY(-50px); } 4%, 90% { opacity: 1; transform: translateY(0); } 95% { opacity: 0; transform: translateY(0); } }
        @keyframes sh-d3 { 0%, 4%, 100% { opacity: 0; transform: translateY(-50px); } 6%, 90% { opacity: 1; transform: translateY(0); } 95% { opacity: 0; transform: translateY(0); } }

        @keyframes sh-u1 { 0%, 20%, 100% { opacity: 0; transform: translateY(-50px); } 22%, 90% { opacity: 1; transform: translateY(0); } 95% { opacity: 0; transform: translateY(0); } }
        @keyframes sh-u2 { 0%, 22%, 100% { opacity: 0; transform: translateY(-50px); } 24%, 90% { opacity: 1; transform: translateY(0); } 95% { opacity: 0; transform: translateY(0); } }
        @keyframes sh-u3 { 0%, 24%, 100% { opacity: 0; transform: translateY(-50px); } 26%, 90% { opacity: 1; transform: translateY(0); } 95% { opacity: 0; transform: translateY(0); } }

        @keyframes sh-h1 { 0%, 40%, 100% { opacity: 0; transform: translateY(50px) rotate(-15deg); } 42%, 90% { opacity: 1; transform: translateY(0) rotate(-15deg); } 95% { opacity: 0; transform: translateY(0) rotate(-15deg); } }
        @keyframes sh-h2 { 0%, 42%, 100% { opacity: 0; transform: translateY(50px) rotate(0deg); } 44%, 90% { opacity: 1; transform: translateY(0) rotate(0deg); } 95% { opacity: 0; transform: translateY(0) rotate(0deg); } }
        @keyframes sh-h3 { 0%, 44%, 100% { opacity: 0; transform: translateY(50px) rotate(15deg); } 46%, 90% { opacity: 1; transform: translateY(0) rotate(15deg); } 95% { opacity: 0; transform: translateY(0) rotate(15deg); } }

        .sh-step1 { animation: sh-txt1 15s infinite; }
        .sh-step2 { animation: sh-txt2 15s infinite; }
        .sh-step3 { animation: sh-txt3 15s infinite; }
        @keyframes sh-txt1 { 0%, 2% { opacity: 0; } 4%, 18% { opacity: 1; } 20%, 100% { opacity: 0; } }
        @keyframes sh-txt2 { 0%, 20% { opacity: 0; } 22%, 38% { opacity: 1; } 40%, 100% { opacity: 0; } }
        @keyframes sh-txt3 { 0%, 40% { opacity: 0; } 42%, 90% { opacity: 1; } 95%, 100% { opacity: 0; } }
        /* עמוד פתיחה (Landing Page) */
        .landing-hero { display: none; }
        .live-status-widget { display: flex; align-items: center; gap: 8px; background: var(--card-bg); border: 1px solid var(--border-light); border-radius: 12px; padding: 10px 14px; margin-bottom: 12px; font-size: 0.95rem; font-weight: 600; color: var(--text-color); }
        .live-status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); flex-shrink: 0; box-shadow: 0 0 0 3px rgba(196,112,74,0.2); animation: pulse-dot 2s infinite; }
        @keyframes pulse-dot { 0%,100%{box-shadow:0 0 0 3px rgba(196,112,74,0.2);} 50%{box-shadow:0 0 0 6px rgba(196,112,74,0.08);} }
        .quick-actions-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
        .qa-btn { background: var(--card-bg); border: 1px solid var(--border-light); border-radius: 14px; padding: 14px 10px; font-family: 'Rubik', sans-serif; font-size: 0.92rem; font-weight: 700; color: var(--primary); cursor: pointer; text-align: center; transition: background 0.15s, transform 0.12s, box-shadow 0.15s; -webkit-tap-highlight-color: transparent; box-shadow: 0 2px 8px rgba(0,0,0,0.04); }
        .qa-btn:active { transform: scale(0.95); box-shadow: none; background: var(--btn-bg); }
        .today-exp-widget { display: inline-flex; align-items: center; gap: 8px; background: var(--card-bg); border: 1px solid var(--border-light); border-radius: 30px; padding: 7px 20px; font-size: 0.84rem; color: var(--text-muted); box-shadow: 0 2px 8px rgba(0,0,0,0.04); cursor: pointer; -webkit-tap-highlight-color: transparent; }
        .home-action-stack { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
        .home-action-card { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 16px; background: var(--card-bg); border: 1px solid var(--border-light); border-radius: 16px; box-shadow: 0 2px 10px rgba(0,0,0,0.05); cursor: pointer; font-family: 'Rubik', sans-serif; text-align: right; box-sizing: border-box; -webkit-tap-highlight-color: transparent; transition: transform 0.12s, box-shadow 0.12s; }
        .home-action-card:active { transform: scale(0.97); box-shadow: none; }
        .home-action-icon { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
        .home-action-text { flex: 1; display: flex; flex-direction: column; gap: 2px; }
        .home-action-title { font-size: 1rem; font-weight: 700; color: var(--title-color); }
        .home-action-sub { font-size: 0.8rem; color: var(--text-muted); }
        .home-action-arrow { font-size: 1.4rem; color: var(--text-muted); font-weight: 300; flex-shrink: 0; }
        .home-action-sos { border-color: rgba(231,76,60,0.2); background: rgba(231,76,60,0.03); }
        /* Date-edit pill trigger */
        #btn-edit-dates { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; background: var(--card-bg); border: 1.5px solid var(--primary); border-radius: 50px; padding: 11px 20px; margin-bottom: 14px; color: var(--primary); font-family: inherit; font-size: 0.9rem; font-weight: 700; cursor: pointer; letter-spacing: 0.015em; -webkit-tap-highlight-color: transparent; transition: transform 0.12s var(--ease-spring), opacity 0.12s var(--ease-ui), background 0.18s var(--ease-ui); }
        #btn-edit-dates:active { transform: scale(0.97); opacity: 0.8; }
        body.dark-mode #btn-edit-dates { background: color-mix(in srgb, var(--primary) 10%, var(--card-bg)); }

        /* ── Unified Master Modal Sheet — every modal uses exactly this class ── */
        .premium-modal-sheet { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 92%; max-width: 420px; max-height: 85vh; background: var(--bg-color); border-radius: 28px; z-index: 5000; box-shadow: 0 25px 60px rgba(0,0,0,0.35); border: 1px solid var(--border-light); overflow-y: auto; overflow-x: hidden; padding: 24px; display: none; flex-direction: column; overscroll-behavior: contain; text-align: right; box-sizing: border-box; }
        .premium-modal-sheet.open { display: flex; }
        /* Clock: sheet shown when parent backdrop is open */
        #clock-modal.open #clock-modal-sheet { display: flex; }
        /* Dates: sheet shown when parent overlay is active */
        #dates-modal.active #dates-modal-sheet { display: flex; }


        /* Dates modal — 3-tab switcher */
        .dates-tab-row { display: flex; gap: 4px; background: var(--bg-color); border-radius: 12px; padding: 4px; margin-bottom: 16px; }
        .dates-tab { flex: 1; padding: 7px 4px; border-radius: 9px; border: none; background: transparent; color: var(--text-muted); font-family: inherit; font-size: 0.74rem; font-weight: 600; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: background 0.18s var(--ease-ui), color 0.18s var(--ease-ui), box-shadow 0.18s var(--ease-ui); white-space: nowrap; }
        .dates-tab.active { background: var(--card-bg); color: var(--primary); box-shadow: 0 1px 5px rgba(0,0,0,0.1); }

        /* Side-by-side trip grid (alias for trip-grid-row, usable standalone) */
        .trip-grid-container { display: flex; gap: 12px; width: 100%; }
        .dates-panel { display: none; }
        .dates-panel.active { display: block; }
        .dates-input-label { font-size: 0.68rem; font-weight: 700; letter-spacing: 1.4px; color: var(--primary); margin-bottom: 8px; text-transform: uppercase; }
        .dates-input { width: 100%; padding: 7px 4px; border-radius: 8px; border: 1px solid var(--border-color); background: var(--card-bg); color: var(--text-color); font-family: inherit; font-size: 0.87rem; box-sizing: border-box; text-align: center; }
        .dates-summary { text-align: center; font-size: 0.82rem; color: var(--text-muted); margin-bottom: 14px; min-height: 1.1em; }

        /* Trip tools side-by-side grid */
        .trip-grid-row { display: flex; gap: 12px; width: 100%; margin-bottom: 14px; }
        .trip-grid-btn { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; background: var(--card-bg); border: 2px solid var(--border-color); border-radius: 16px; padding: 14px 10px; cursor: pointer; color: var(--title-color); font-size: 0.88rem; font-weight: 600; font-family: inherit; text-align: center; box-sizing: border-box; -webkit-tap-highlight-color: transparent; margin-bottom: 0; transition: transform 0.12s var(--ease-spring), opacity 0.12s var(--ease-ui); }
        .trip-grid-btn:active { transform: scale(0.96); opacity: 0.8; }
        .trip-grid-btn--primary { border-color: var(--primary); }
        .trip-grid-btn__label { font-size: 0.83rem; font-weight: 700; color: var(--title-color); }

        /* World Conquest Progress Meter */
        .conquest-card { display: flex; align-items: center; gap: 10px; background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 12px; padding: 8px 12px; margin-bottom: 12px; }
        .conquest-label { flex-shrink: 0; font-size: 0.75rem; font-weight: 700; color: var(--text-muted); letter-spacing: 0.04em; white-space: nowrap; }
        .conquest-track { flex: 1; height: 4px; background: var(--border-color); border-radius: 4px; overflow: hidden; }
        .conquest-fill { height: 100%; width: 0%; background: var(--primary); border-radius: 4px; transition: width 0.9s cubic-bezier(0.34, 1.4, 0.64, 1); }
        .conquest-pct { flex-shrink: 0; font-size: 0.75rem; font-weight: 800; color: var(--primary); font-variant-numeric: tabular-nums; min-width: 2.8ch; text-align: left; }
        body.dark-mode .conquest-card { border-color: rgba(255,255,255,0.08); }

        .premium-map-container { background: var(--card-bg); border: 1px solid var(--border-light); border-radius: 16px; box-shadow: 0 4px 15px rgba(0,0,0,0.06); height: 260px; position: relative; overflow: hidden; }
        body.dark-mode .premium-map-container { background: #1E2124; border-color: rgba(255,255,255,0.08); box-shadow: 0 4px 20px rgba(0,0,0,0.35); }
        /* jsVectorMap root element inside the container */
        #world-map { width: 100%; height: 100%; display: block; background: transparent; touch-action: none; pointer-events: none; }
        #world-map svg { display: block; }
        .hero-trip-card { display: flex; align-items: center; background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 65%, #fff) 0%, var(--primary) 30%, color-mix(in srgb, var(--primary) 55%, #000) 65%, color-mix(in srgb, var(--primary) 20%, #000) 100%); background-size: 300% 300%; animation: hero-gradient-drift 16s ease-in-out infinite alternate; color: white; border-radius: 20px; padding: 20px; margin-bottom: 20px; box-shadow: 0 8px 20px rgba(0,0,0,0.15); cursor: pointer; -webkit-tap-highlight-color: transparent; transition: transform 0.2s; border: none; width: 100%; box-sizing: border-box; font-family: 'Rubik', sans-serif; text-align: right; }
        .hero-trip-card:active { transform: scale(0.98); }
        .quick-tool-btn { background: var(--card-bg); border: 1px solid var(--border-color); padding: 10px 16px; border-radius: 20px; font-weight: bold; color: var(--text-color); box-shadow: 0 2px 5px rgba(0,0,0,0.05); flex-grow: 1; text-align: center; cursor: pointer; transition: all 0.2s; font-family: 'Rubik', sans-serif; font-size: 0.95rem; -webkit-tap-highlight-color: transparent; }
        .quick-tool-btn:hover { transform: translateY(-2px); border-color: var(--primary); box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
        .home-active-trip-card { display: flex; align-items: center; gap: 14px; width: 100%; background: var(--card-bg); border: 1.5px solid var(--border-color); border-radius: 18px; padding: 16px 18px; cursor: pointer; font-family: 'Rubik', sans-serif; text-align: right; box-sizing: border-box; box-shadow: 0 4px 20px rgba(0,0,0,0.07); margin-bottom: 14px; -webkit-tap-highlight-color: transparent; transition: transform 0.12s, box-shadow 0.12s; position: relative; z-index: 2; touch-action: manipulation; pointer-events: auto; }
        .home-active-trip-card:active { transform: scale(0.97); box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
        .home-qa-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
        .home-qa-card { display: flex; align-items: center; gap: 10px; background: var(--card-bg); border: 1px solid var(--border-light); border-radius: 14px; padding: 13px 14px; cursor: pointer; font-family: 'Rubik', sans-serif; text-align: right; box-sizing: border-box; box-shadow: 0 2px 8px rgba(0,0,0,0.04); -webkit-tap-highlight-color: transparent; transition: transform 0.12s, box-shadow 0.12s; position: relative; z-index: 2; touch-action: manipulation; pointer-events: auto; }
        .home-qa-card:active { transform: scale(0.95); box-shadow: none; background: var(--btn-bg); }
        .home-qa-icon { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
        .home-qa-sos { border-color: rgba(231,76,60,0.25); background: rgba(231,76,60,0.03); }
        .home-qa-sos:active { background: rgba(231,76,60,0.08); }
        .main-menu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
        .fav-row { display: flex; overflow-x: auto; gap: 10px; padding-bottom: 10px; -webkit-overflow-scrolling: touch; }
        .fav-mini-card { background: var(--card-bg); border: 1px solid var(--border-light); border-radius: 12px; padding: 12px 14px; flex-shrink: 0; text-align: center; cursor: pointer; font-family: 'Rubik', sans-serif; font-size: 0.9rem; font-weight: 600; color: var(--text-color); box-shadow: 0 2px 6px rgba(0,0,0,0.07); transition: border-color 0.2s, transform 0.15s; max-width: 130px; }
        .fav-mini-card:hover { border-color: var(--primary); transform: translateY(-2px); }
        .main-menu-card { background: var(--card-bg); border-radius: 20px; padding: 20px 10px; text-align: center; box-shadow: 0 4px 14px rgba(0,0,0,0.06); color: var(--text-color); border: 1.5px solid var(--border-light); transition: all 0.18s; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; position: relative; z-index: 2; touch-action: manipulation; -webkit-tap-highlight-color: transparent; pointer-events: auto; }
        .main-menu-card:active { transform: scale(0.95); border-color: var(--primary); box-shadow: none; }
        .main-menu-icon { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; margin: 0 auto; }
        .main-menu-title { font-weight: 700; font-size: 1.1rem; color: var(--title-color); margin: 0; }
        .main-menu-badge { background: var(--challenge-bg); color: var(--challenge-text); font-size: 0.75rem; padding: 4px 10px; border-radius: 20px; font-weight: bold; margin-top: 5px; }

        /* ===== Home Game Carousel ===== */
        .home-section-label { font-size: 0.7rem; font-weight: 700; color: var(--text-muted); letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 10px; padding: 0 2px; }
        .home-game-carousel { display: flex; overflow-x: auto; -webkit-overflow-scrolling: touch; gap: 16px; padding: 10px 4%; scrollbar-width: none; -ms-overflow-style: none; }
        .home-game-carousel::-webkit-scrollbar { display: none; }
        .home-carousel-card { flex: 0 0 200px; background: var(--card-bg); border: 1px solid var(--border-light); border-radius: 18px; padding: 18px 14px; text-align: center; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 9px; box-shadow: 0 2px 10px rgba(0,0,0,0.05); transition: transform 0.15s var(--ease-spring), box-shadow 0.15s; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
        .home-carousel-card:active { transform: scale(0.93); box-shadow: none; }
        .dice-btn.selected { border: 2px solid var(--primary) !important; transform: scale(1.1); background: var(--badge-bg) !important; color: var(--primary) !important; }
        .home-carousel-icon { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border-radius: 13px; background: color-mix(in srgb, var(--primary) 10%, var(--btn-bg)); flex-shrink: 0; }
        .home-carousel-label { font-size: 0.88rem; font-weight: 700; color: var(--title-color); line-height: 1.3; }
        .home-carousel-sub { font-size: 0.68rem; color: var(--text-muted); font-weight: 500; }

        /* ===== Search Hub Overlay ===== */
        #search-overlay { display: none; position: fixed; inset: 0; z-index: 2900; }
        #search-overlay.active { display: block; }
        #search-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.42); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); animation: fadeBackdrop 0.2s ease both; }
        #search-panel { position: absolute; top: 0; left: 0; right: 0; background: var(--card-bg); border-radius: 0 0 24px 24px; padding: 72px 16px 22px; box-shadow: 0 12px 40px rgba(0,0,0,0.18); animation: searchSlideDown 0.24s var(--ease-spring) both; }
        @keyframes searchSlideDown { from { transform: translateY(-102%); } to { transform: translateY(0); } }
        #search-input-row { display: flex; align-items: center; gap: 10px; background: var(--bg-color); border: 1.5px solid var(--border-color); border-radius: 14px; padding: 10px 14px; margin-bottom: 14px; transition: border-color 0.18s; }
        #search-input-row:focus-within { border-color: var(--primary); }
        #search-input-row svg { flex-shrink: 0; color: var(--text-muted); }
        #search-hub-input { flex: 1; background: none; border: none; outline: none; font-family: 'Rubik', sans-serif; font-size: 1rem; color: var(--text-color); direction: rtl; min-width: 0; }
        #search-hub-input::placeholder { color: var(--text-muted); }
        #search-close-btn { background: none; border: none; color: var(--text-muted); font-size: 1.3rem; cursor: pointer; padding: 2px 4px; line-height: 1; flex-shrink: 0; border-radius: 6px; -webkit-tap-highlight-color: transparent; }
        #search-results { display: flex; flex-direction: column; gap: 6px; max-height: 56vh; overflow-y: auto; }
        .search-result-item { display: flex; align-items: center; gap: 12px; padding: 11px 14px; background: var(--bg-color); border-radius: 12px; cursor: pointer; border: 1px solid var(--border-light); -webkit-tap-highlight-color: transparent; transition: background 0.12s; }
        .search-result-item:active { background: var(--btn-bg); border-color: var(--primary); }
        .search-result-icon { width: 34px; height: 34px; border-radius: 9px; background: color-mix(in srgb, var(--primary) 10%, var(--btn-bg)); display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--primary); }
        .search-result-text { flex: 1; min-width: 0; }
        .search-result-label { font-size: 0.92rem; font-weight: 700; color: var(--title-color); }
        .search-result-sub { font-size: 0.73rem; color: var(--text-muted); margin-top: 1px; }
        .search-empty { text-align: center; color: var(--text-muted); font-size: 0.88rem; padding: 22px 0; }
        .search-result-arrow { color: var(--text-muted); flex-shrink: 0; }

        /* ===== Oral Games: Card Grid Layout ===== */
        .oral-games-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
        .oral-game-grid-card { background: var(--card-bg); border: 1px solid var(--border-light); border-radius: 16px; padding: 16px 10px 14px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 9px; text-align: center; -webkit-tap-highlight-color: transparent; transition: transform 0.13s var(--ease-spring), box-shadow 0.13s; box-shadow: 0 2px 8px rgba(0,0,0,0.04); }
        .oral-game-grid-card:active { transform: scale(0.93); box-shadow: none; }
        .oral-game-grid-icon { width: 44px; height: 44px; border-radius: 13px; background: color-mix(in srgb, var(--primary) 11%, var(--btn-bg)); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
        .oral-game-grid-name { font-size: 0.82rem; font-weight: 700; color: var(--title-color); line-height: 1.3; }
        .oral-game-grid-meta { font-size: 0.65rem; color: var(--text-muted); font-weight: 500; }
        /* Detail panel (drill-down within same modal) */
        .oral-detail-panel { display: none; flex-direction: column; }
        .oral-back-btn { display: inline-flex; align-items: center; gap: 6px; background: none; border: none; color: var(--primary); font-family: inherit; font-size: 0.85rem; font-weight: 700; cursor: pointer; padding: 0 0 14px; -webkit-tap-highlight-color: transparent; }
        .oral-detail-title { font-size: 1.05rem; font-weight: 800; color: var(--title-color); margin-bottom: 4px; }
        .oral-detail-meta { font-size: 0.72rem; color: var(--text-muted); margin-bottom: 14px; }
        .oral-detail-body p { font-size: 0.84rem; color: var(--text-muted); line-height: 1.65; margin: 0 0 10px; }
        .oral-detail-body ol { padding-right: 20px; margin: 0 0 10px; }
        .oral-detail-body li { font-size: 0.84rem; color: var(--text-color); line-height: 1.75; }
        .oral-tip-box { background: color-mix(in srgb, var(--primary) 7%, var(--bg-color)); border-radius: 10px; padding: 10px 12px; margin-top: 6px; font-size: 0.79rem; color: var(--text-muted); line-height: 1.55; }

        /* ── Settings: premium toggle switch ── */
        .settings-toggle { position: relative; display: inline-block; width: 50px; height: 28px; flex-shrink: 0; cursor: pointer; }
        .settings-toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
        .settings-toggle-track { position: absolute; inset: 0; background: var(--border-color); border-radius: 28px; transition: background 0.22s var(--ease-ui); }
        .settings-toggle-track::before { content: ''; position: absolute; width: 22px; height: 22px; left: 3px; top: 3px; background: #fff; border-radius: 50%; box-shadow: 0 2px 6px rgba(0,0,0,0.22); transition: transform 0.22s var(--ease-spring); }
        .settings-toggle input:checked + .settings-toggle-track { background: var(--primary); }
        .settings-toggle input:checked + .settings-toggle-track::before { transform: translateX(22px); }
        .settings-toggle:active .settings-toggle-track::before { width: 26px; }

        /* ── Settings: pill action bar ── */
        .settings-section-title { text-align: center; margin: 0 auto 30px; font-size: 1.4rem; font-weight: 800; color: var(--title-color); }
        .settings-action-bar { display: flex; flex-wrap: nowrap; gap: 12px; justify-content: center; width: 100%; margin-bottom: 30px; }
        .sab-btn { display: flex; align-items: center; justify-content: center; padding: 10px 22px; background: var(--card-bg); border: 1.5px solid var(--border-light); border-radius: 50px; font-family: inherit; color: var(--text-color); cursor: pointer; transition: all 0.2s var(--ease-spring); -webkit-tap-highlight-color: transparent; }
        .sab-btn:active { transform: scale(0.95); }
        .sab-btn .sab-icon { font-size: 1.4rem; line-height: 1; }
        .sab-btn.sab--on { border-color: var(--primary); color: var(--primary); background: color-mix(in srgb, var(--primary) 10%, var(--card-bg)); box-shadow: none; }

        /* כפתור איפוס */
        .reset-btn { background: #e74c3c; color: white; border: none; padding: 15px 20px; border-radius: 12px; font-weight: bold; font-family: 'Rubik', sans-serif; cursor: pointer; width: 100%; margin-top: 25px; font-size: 1.1rem; display: flex; justify-content: center; align-items: center; gap: 10px; transition: background 0.2s; box-shadow: 0 4px 10px rgba(231, 76, 60, 0.3); }
        .reset-btn:hover { background: #c0392b; }
        @keyframes fadeOutCheck { 0%, 50% { opacity: 1; } 100% { opacity: 0; } }
        @keyframes fadeInText { from { opacity: 0; } to { opacity: 1; } }
        .calc-nav { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 10px; margin-bottom: 20px; }
        .calc-tab-btn { background: var(--card-bg); border: 2px solid var(--border-light); padding: 10px 15px; border-radius: 20px; font-weight: bold; color: var(--text-muted); cursor: pointer; white-space: nowrap; transition: all 0.2s; font-family: 'Rubik', sans-serif; }
        .calc-tab-btn.active { background: var(--primary); color: white; border-color: var(--primary); }
        .calc-container { display: none; }
        .calc-container.active { display: block; animation: fadeIn 0.3s; }
        .game-sub-nav { display: flex; gap: 10px; margin-bottom: 15px; }
        .game-sub-btn { background: var(--btn-bg); border: 2px solid var(--border-light); padding: 8px 18px; border-radius: 20px; font-weight: bold; color: var(--text-muted); cursor: pointer; white-space: nowrap; transition: all 0.2s; font-family: 'Rubik', sans-serif; font-size: 0.95rem; }
        .game-sub-btn.active { background: var(--primary); color: white; border-color: var(--primary); }
        .currency-row { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
        .curr-select { padding: 10px; border-radius: 8px; border: 1px solid var(--border-color); background: var(--bg-color); color: var(--text-color); font-family: 'Rubik', sans-serif; font-size: 0.95rem; flex-shrink: 0; }
        .curr-input { flex: 1; padding: 10px; border-radius: 8px; border: 1px solid var(--border-color); background: var(--bg-color); color: var(--text-color); font-family: 'Rubik', sans-serif; font-size: 1rem; min-width: 0; direction: ltr; }
        .curr-input:focus { outline: none; border-color: var(--primary); }
        .curr-delete-btn { background: none; border: none; color: #e74c3c; font-size: 1.2rem; cursor: pointer; padding: 5px; flex-shrink: 0; line-height: 1; opacity: 0.7; transition: opacity 0.2s; }
        .curr-delete-btn:hover { opacity: 1; }
        .exp-select { padding: 10px; border-radius: 8px; border: 1px solid var(--border-color); background: var(--bg-color); color: var(--text-color); font-family: 'Rubik', sans-serif; }
        .exp-group-header { font-weight: bold; font-size: 0.9rem; color: var(--primary); padding: 8px 0 4px; border-bottom: 1px solid var(--border-light); margin-bottom: 4px; display: flex; justify-content: space-between; }
        .exp-item { display: flex; justify-content: space-between; align-items: center; padding: 8px 4px; border-bottom: 1px solid var(--border-light); font-size: 0.9rem; }
        .exp-item-amount { color: var(--text-muted); direction: ltr; text-align: left; }
        .exp-cat-header { background: var(--btn-bg); padding: 10px; border-radius: 8px; cursor: pointer; font-weight: bold; display: flex; justify-content: space-between; align-items: center; margin-top: 10px; }
        .exp-cat-items { padding: 5px 10px; }
        #filter-forbidden { list-style: none; margin: 0; padding: 0; color: #d63031; font-size: 1.2rem; line-height: 1.8; }
        .bottle { transition: transform 3s cubic-bezier(0.2, 0.8, 0.3, 1); }
        @keyframes mapPulse { 0%,100% { transform:scale(1); opacity:1; } 50% { transform:scale(1.4); opacity:0.65; } }
        @keyframes dotPulse { 0%,100% { box-shadow:0 0 6px 2px rgba(0,230,118,0.8); } 50% { box-shadow:0 0 14px 6px rgba(0,230,118,0.4); } }
        .map-dot { position:absolute; width:10px; height:10px; background:#00e676; border-radius:50%; transform:translate(-50%,-50%); cursor:pointer; z-index:10; animation:dotPulse 2s ease-in-out infinite; transition:transform 0.15s; }
        .map-dot:hover { transform:translate(-50%,-50%) scale(1.6); }

        /* Bottle bounce — applied to the container so rotation on inner span is preserved */
        @keyframes bottleContainerBounce {
            0%   { transform: scale(1); }
            20%  { transform: scale(1.18); }
            40%  { transform: scale(0.93); }
            60%  { transform: scale(1.10); }
            80%  { transform: scale(0.97); }
            100% { transform: scale(1); }
        }
        .bottle-bounce { animation: bottleContainerBounce 0.55s ease-in-out 2; }

        /* Destination grid */
        .dest-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 15px; }
        .dest-grid-card { background: var(--card-bg); border: 1px solid var(--border-light); border-radius: 14px; padding: 16px 12px; text-align: center; cursor: pointer; transition: transform 0.15s, box-shadow 0.15s; -webkit-tap-highlight-color: transparent; position: relative; display: flex; flex-direction: column; justify-content: space-between; height: 100%; box-sizing: border-box; }
        .dest-grid-card:active { transform: scale(0.96); }
        .dest-grid-card .dest-flag { font-size: 2.2rem; line-height: 1; display: block; margin-bottom: 6px; }
        .dest-grid-card .dest-name-label { font-size: 0.85rem; font-weight: bold; color: var(--title-color); line-height: 1.2; }
        .dest-grid-card .dest-dates-label { display: block; margin-top: 5px; font-size: 0.7rem; color: var(--text-muted); line-height: 1.4; }
        .dest-days-badge { display: inline-block; margin-top: auto; background: color-mix(in srgb, var(--primary) 15%, var(--badge-bg)); color: var(--primary); font-size: 0.7rem; font-weight: 700; padding: 4px 10px; border-radius: 20px; }
        .dest-active-dot { position: absolute; top: 10px; left: 10px; width: 10px; height: 10px; border-radius: 50%; background: #00e676; box-shadow: 0 0 6px 3px rgba(0,230,118,0.6); }
        #emergency-content p, #emergency-content li { font-size: 1rem; font-weight: 500; line-height: 1.65; }
        #emergency-content h2, #emergency-content h3 { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.2px; margin-bottom: 6px; color: var(--title-color); }
        #emergency-content strong { font-weight: 700; color: var(--title-color); }
        #dest-info-content p, #dest-info-content li { font-size: 1rem; font-weight: 500; line-height: 1.65; }
        #dest-info-content h2 { font-size: 1.4rem; font-weight: 800; letter-spacing: -0.3px; }
        #dest-info-content h3, #dest-info-content h4 { font-size: 1.1rem; font-weight: 700; color: var(--title-color); margin-bottom: 6px; }
        .dest-del-float { position: absolute; top: -9px; right: -7px; background: none; border: none; color: #e74c3c; font-size: 1rem; cursor: pointer; padding: 15px; line-height: 1; opacity: 0.7; }
        .dest-del-float:active { opacity: 1; }

        /* Destination info overlay */
        #dest-info-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100dvh; z-index: 2600; background: var(--bg-color); overflow-y: auto; display: none; pointer-events: none; }
        #dest-info-overlay.active { display: block; pointer-events: auto; }
        #planned-trips-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100dvh; z-index: 2600; background: var(--bg-color); overflow-y: auto; display: none; pointer-events: none; }
        #planned-trips-overlay.active { display: block; pointer-events: auto; }
        #master-journal-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100dvh; z-index: 2600; background: var(--bg-color); overflow-y: auto; display: none; pointer-events: none; }
        #master-journal-overlay.active { display: block; pointer-events: auto; }
        .journal-timeline-item { background: var(--card-bg); border-radius: 16px; padding: 18px 20px; border: 1px solid var(--border-color); margin-bottom: 16px; position: relative; }
        .journal-timeline-item::before { content: ''; position: absolute; right: -1px; top: 24px; width: 4px; height: calc(100% - 24px + 16px); background: var(--border-color); display: none; }
        .journal-timeline-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--primary); flex-shrink: 0; margin-top: 5px; }
        #emergency-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100dvh; z-index: 2600; background: var(--bg-color); overflow-y: auto; display: none; pointer-events: none; }
        #emergency-overlay.active { display: block; pointer-events: auto; }
        .dest-info-journal { width: 100%; box-sizing: border-box; min-height: 120px; padding: 12px; border-radius: 10px; border: 1px solid var(--border-color); background: var(--bg-color); color: var(--text-color); font-family: inherit; font-size: 0.95rem; line-height: 1.6; resize: vertical; }
        .dest-info-journal:focus { outline: none; border-color: var(--primary); }

        /* Global search — icon expands inline */
        .gs-wrap { padding: 0 0 15px; position: relative; }
        .gs-icon-btn { background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 12px; width: 100%; padding: 11px 14px; font-size: 1rem; color: var(--text-muted); cursor: pointer; text-align: right; display: flex; align-items: center; gap: 8px; font-family: inherit; transition: border-color 0.2s; -webkit-tap-highlight-color: transparent; }
        .gs-icon-btn:hover { border-color: var(--primary); }
        .gs-input-row { display: none; align-items: center; gap: 8px; }
        .gs-wrap.open .gs-icon-btn { display: none; }
        .gs-wrap.open .gs-input-row { display: flex; }
        #global-search { flex: 1; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--primary); background: var(--card-bg); color: var(--text-color); font-family: inherit; font-size: 1rem; outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 20%, transparent); }
        .gs-close-btn { background: none; border: none; font-size: 1.4rem; color: var(--text-muted); cursor: pointer; padding: 4px; flex-shrink: 0; }
        /* סוליטר: צבעים מתחלפים */
        .sol-alt1 { top:60px; left:35%; opacity:1; z-index:1; }
        .sol-alt2 { animation:solAlt2 6s ease-in-out infinite; z-index:2; }
        .sol-alt3 { animation:solAlt3 6s ease-in-out infinite; z-index:3; }
        .sol-alt-step1 { animation:sh-txt1 6s infinite; }
        .sol-alt-step2 { animation:sh-txt2 6s infinite; }
        @keyframes solAlt2 { 0%,5% { top:-80px; left:55%; opacity:0; } 20%,80% { top:75px; left:35%; opacity:1; } 95%,100% { top:75px; left:35%; opacity:1; } }
        @keyframes solAlt3 { 0%,40% { top:-80px; left:55%; opacity:0; } 58%,88% { top:92px; left:35%; opacity:1; } 100% { top:92px; left:35%; opacity:0; } }
        /* סוליטר: גרירת רצף */
        .sol-drag-dest { top:40px; left:65%; opacity:1; z-index:1; }
        .sol-drag1 { animation:solDrag1 6s ease-in-out infinite; z-index:2; }
        .sol-drag2 { animation:solDrag2 6s ease-in-out infinite; z-index:3; }
        .sol-drag3 { animation:solDrag3 6s ease-in-out infinite; z-index:4; }
        .sol-drag-step1 { animation:show-text-early 6s infinite; }
        @keyframes solDrag1 { 0%,10% { top:50px; left:10%; opacity:1; } 35%,80% { top:55px; left:65%; opacity:1; } 95%,100% { top:50px; left:10%; opacity:1; } }
        @keyframes solDrag2 { 0%,10% { top:67px; left:10%; opacity:1; } 35%,80% { top:72px; left:65%; opacity:1; } 95%,100% { top:67px; left:10%; opacity:1; } }
        @keyframes solDrag3 { 0%,10% { top:84px; left:10%; opacity:1; } 35%,80% { top:89px; left:65%; opacity:1; } 95%,100% { top:84px; left:10%; opacity:1; } }
        .expense-item { display: flex; justify-content: space-between; align-items: center; padding: 12px; border-bottom: 1px solid var(--border-light); background: var(--card-bg); }
        .expense-cat { font-weight: bold; color: var(--primary); }
        .input-group { display: flex; gap: 8px; margin-bottom: 15px; align-items: center; }
        .input-group input, .input-group select { flex: 1; padding: 10px; border-radius: 8px; border: 1px solid var(--border-color); background: var(--bg-color); color: var(--text-color); font-family: 'Rubik', sans-serif; font-size: 1rem; }
        .input-group button { background: var(--primary); color: white; border: none; padding: 10px 16px; border-radius: 8px; font-weight: bold; cursor: pointer; font-family: 'Rubik', sans-serif; white-space: nowrap; }
        #custom-category { display: block; width: 100%; max-width: 100%; box-sizing: border-box; margin-top: 10px; margin-bottom: 12px; padding: 10px; border-radius: 8px; border: 1px solid var(--border-color); background: var(--bg-color); color: var(--text-color); font-family: 'Rubik', sans-serif; font-size: 1rem; min-width: 0; }
        .card { background: var(--card-bg); border-radius: 16px; padding: 20px; box-shadow: 0 4px 20px rgba(0,0,0,0.03); margin-bottom: 15px; border: 1px solid var(--border-light); }

        /* Premium form inputs — soft bottom-border style */
        .prem-input { width: 100%; background: transparent; border: none; border-bottom: 2px solid var(--border-color); border-radius: 0; padding: 10px 4px 8px; color: var(--text-color); font-family: 'Rubik', sans-serif; font-size: 1rem; box-sizing: border-box; transition: border-color 0.2s; }
        .prem-input:focus { outline: none; border-bottom-color: var(--primary); }
        .prem-input::placeholder { color: var(--text-muted); font-size: 0.9rem; }
        .prem-card { background: var(--card-bg); border-radius: 20px; padding: 20px; box-shadow: 0 6px 28px rgba(0,0,0,0.07); border: none; margin-bottom: 14px; }
        .prem-card-saved { background: var(--card-bg); border-radius: 16px; padding: 16px 18px; box-shadow: 0 4px 18px rgba(0,0,0,0.06); border: none; margin-bottom: 10px; }
        .add-dest-cta { width: 100%; margin-top: 18px; padding: 14px; border-radius: 14px; border: 2px dashed var(--primary); background: transparent; color: var(--primary); font-family: 'Rubik', sans-serif; font-size: 1rem; font-weight: 700; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: background 0.15s; }
        .add-dest-cta:active { background: var(--btn-bg); }
        .exp-note-input { width: 100%; background: transparent; border: none; border-bottom: 1px solid var(--border-light); padding: 7px 4px; color: var(--text-muted); font-family: 'Rubik', sans-serif; font-size: 0.88rem; box-sizing: border-box; transition: border-color 0.2s; margin-bottom: 12px; }
        .exp-note-input:focus { outline: none; border-bottom-color: var(--primary); color: var(--text-color); }
        .exp-note-input::placeholder { color: var(--text-muted); }
        /* Donut chart */
        .donut-wrap { display: flex; align-items: center; gap: 18px; background: var(--badge-bg); border-radius: 14px; padding: 16px 14px; }
        .donut-ring { width: 110px; height: 110px; border-radius: 50%; flex-shrink: 0; -webkit-mask: radial-gradient(farthest-side, transparent 55%, #000 56%); mask: radial-gradient(farthest-side, transparent 55%, #000 56%); transition: background 0.4s; }
        .donut-legend { flex: 1; display: flex; flex-direction: column; gap: 5px; min-width: 0; }
        .donut-legend-row { display: flex; align-items: center; gap: 7px; font-size: 0.8rem; }
        .donut-legend-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
        .donut-legend-label { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-color); font-weight: 600; }
        .donut-legend-pct { color: var(--text-muted); font-size: 0.75rem; direction: ltr; flex-shrink: 0; }
        .exp-del-btn { background: none; border: none; color: var(--text-muted); cursor: pointer; padding: 4px; line-height: 1; display: flex; align-items: center; transition: color 0.15s; flex-shrink: 0; }
        .exp-del-btn:active { color: #e74c3c; }

        /* ===== Trip Builder CTA nav ===== */
        .tb-cta-btn { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 12px 6px; background: var(--card-bg); border: 1px solid var(--border-light); border-radius: 14px; color: var(--title-color); font-family: 'Rubik', sans-serif; font-size: 0.8rem; font-weight: 700; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: border-color 0.15s var(--ease-ui), transform 0.12s var(--ease-spring); }
        .tb-cta-btn:active { transform: scale(0.95); border-color: var(--primary); }
        .tb-cta-btn svg { stroke: var(--primary); }

        /* ===== World Clock ===== */
        .wc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 4px; }
        .wc-card { background: var(--bg-color); border: 1px solid var(--border-light); border-radius: 16px; padding: 16px 12px; text-align: center; }
        .wc-card-dest { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 5%, var(--bg-color)); }
        .wc-flag { font-size: 1.8rem; line-height: 1; margin-bottom: 4px; }
        .wc-city { font-size: 0.88rem; font-weight: 700; color: var(--text-muted); margin-bottom: 8px; }
        .wc-time { font-size: 1.7rem; font-weight: 800; color: var(--title-color); direction: ltr; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
        .wc-date { font-size: 0.72rem; color: var(--text-muted); margin-top: 3px; }
        .wc-tz { font-size: 0.65rem; color: var(--text-muted); margin-top: 4px; opacity: 0.7; direction: ltr; }
        .wc-extra-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border-light); touch-action: pan-y; transition: transform 0.12s ease; }
        #modal-wc-extra { overflow-y: auto; max-height: 50vh; }
        .wc-extra-row:last-child { border-bottom: none; }
        .wc-extra-flag { font-size: 1.2rem; flex-shrink: 0; }
        .wc-extra-city { flex: 1; font-weight: 600; color: var(--title-color); font-size: 0.95rem; }
        .wc-extra-time { font-size: 1.1rem; font-weight: 700; color: var(--primary); direction: ltr; font-variant-numeric: tabular-nums; flex-shrink: 0; }
        /* ===== World Clock — Add City UI ===== */
        .wc-add-city { display: flex; gap: 8px; align-items: center; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border-light); }
        .wc-city-select { flex: 1; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--border-color); background: var(--bg-color); color: var(--text-color); font-family: inherit; font-size: 0.88rem; cursor: pointer; }
        .wc-city-select:focus { outline: none; border-color: var(--primary); }
        .wc-add-btn { padding: 9px 16px; background: var(--primary); color: #fff; border: none; border-radius: 10px; font-family: inherit; font-size: 0.88rem; font-weight: 700; cursor: pointer; white-space: nowrap; -webkit-tap-highlight-color: transparent; transition: opacity 0.15s; }
        .wc-add-btn:active { opacity: 0.8; }
        .wc-extra-remove { background: none; border: none; color: var(--text-muted); font-size: 0.85rem; cursor: pointer; padding: 2px 6px; flex-shrink: 0; opacity: 0.5; transition: opacity 0.15s, color 0.15s; -webkit-tap-highlight-color: transparent; line-height: 1; }
        .wc-extra-remove:active { opacity: 1; color: #e74c3c; }
        .wc-drag-handle { font-size: 0.9rem; color: var(--text-muted); opacity: 0.35; cursor: grab; flex-shrink: 0; padding: 4px 3px; user-select: none; -webkit-user-select: none; touch-action: none; line-height: 1; letter-spacing: 1px; }
        .wc-extra-row.wc-dragging { opacity: 0.92; box-shadow: 0 8px 24px rgba(0,0,0,0.15); border-radius: 10px; background: var(--card-bg); position: relative; z-index: 10; border-bottom-color: transparent; transition: none; }

        /* ===== Offline Game Card (Block Puzzle elegant card) ===== */
        .offline-game-card { display: flex; align-items: center; gap: 16px; padding: 18px 20px; border: 1px solid var(--border-light); border-radius: 16px; background: var(--card-bg); cursor: pointer; -webkit-tap-highlight-color: transparent; transition: border-color 0.2s, transform 0.15s; width: 100%; box-sizing: border-box; margin-bottom: 10px; }
        .offline-game-card:active { transform: scale(0.98); border-color: var(--primary); }
        .offline-game-card-icon { width: 52px; height: 52px; border-radius: 14px; background: color-mix(in srgb, var(--primary) 10%, var(--btn-bg)); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
        /* ===== Block Puzzle — 8×8 DOM Grid ===== */
        .bp-game-area { touch-action: none; width: 100%; }
        #bp-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; width: 100%; }
        .bp-cell { aspect-ratio: 1 / 1; background: var(--bg-color); border-radius: 3px; border: 1px solid var(--border-light); transition: background 0.08s, border-color 0.08s; }
        .bp-cell.bp-filled { background: var(--primary); border-color: color-mix(in srgb, var(--primary) 75%, #000 25%); }
        .bp-cell.bp-preview { background: color-mix(in srgb, var(--primary) 45%, var(--bg-color)); border-color: color-mix(in srgb, var(--primary) 65%, var(--border-light)); }
        .bp-cell.bp-preview-invalid { background: rgba(231,76,60,0.28); border-color: rgba(231,76,60,0.65); }
        .bp-piece-btn { background: var(--card-bg); border: 2px dashed var(--border-color); border-radius: 12px; cursor: grab; padding: 10px; display: flex; align-items: center; justify-content: center; -webkit-tap-highlight-color: transparent; transition: border-color 0.15s, opacity 0.15s; min-width: 74px; min-height: 74px; box-sizing: border-box; flex-shrink: 0; touch-action: none; }
        .bp-piece-btn:active { cursor: grabbing; }
        .bp-mini-grid { display: grid; gap: 2px; }
        .bp-mini-cell { width: 14px; height: 14px; border-radius: 2px; }

        /* ══════════════════════════════════════════════════════════════
           DIRECTION 01 — REFINED PREMIUM DESIGN SYSTEM
           ══════════════════════════════════════════════════════════════ */

        /* ── Design Tokens ── */
        :root {
            --klafny-teal-dark:  #134A4A;
            --surface-paper:     #F7F8FA;
            --surface-sand:      #F2F4F7;
            --surface-card:      #FFFFFF;
            --surface-border:    #DCE0E5;
            --ink:               #1A1F1F;
            --ink-muted:         #5C645F;
            --cat-sos-bg:        #FEE9E5;
            --cat-sos-fg:        #D03525;
            --cat-sos-line:      #E5736A;
            --cat-money-bg:      #E8F2E8;
            --cat-money-fg:      #3F6B32;
            --cat-money-line:    #7FA06A;
            --cat-convert-bg:    #E8EEF4;
            --cat-convert-fg:    #335B82;
            --cat-convert-line:  #7B9AB8;
            --cat-tools-bg:      #F5E6DF;
            --cat-tools-fg:      #C2654C;
            --cat-tools-line:    #E0997D;
            --cat-games-bg:      #ECE3F7;
            --cat-games-fg:      #6B4E9E;
            --cat-games-line:    #A893C9;
            --cat-map-bg:        #E1EDEA;
            --cat-map-fg:        #1F6B6B;
            --cat-map-line:      #6BA19A;
            --status-online-dot: #7FE3B0;
            --radius-xs:  10px;
            --radius-sm:  12px;
            --radius-md:  14px;
            --radius-lg:  16px;
            --radius-xl:  18px;
            --radius-2xl: 22px;
            --shadow-hero: 0 12px 28px -12px rgba(31,107,107,0.45);
            --shadow-chip: 0 1px 3px rgba(15,23,42,0.06);
            --shadow-card: 0 1px 3px rgba(15,23,42,0.07), 0 4px 12px rgba(15,23,42,0.05);
        }

        /* ── Dark mode overrides for Direction 01 tokens ── */
        body.dark-mode {
            /* ── Klafny v0.4 aliases — Dream Voice (BRAND.md §2.2) ── */
            --bg-color:   var(--klafny-page-dark);
            --card-bg:    var(--klafny-page-elevated);
            --btn-bg:     color-mix(in srgb, var(--klafny-page-dark) 70%, #fff 8%);

            --surface-paper:     #1A1A1C;
            --surface-sand:      #252528;
            --surface-card:      #252528;
            --surface-border:    #33333A;
            --ink:               #E8E4DF;
            --ink-muted:         #A09890;
            --klafny-teal-dark:  #D4AF37;
            --cat-sos-bg:        #3A1A18;
            --cat-sos-fg:        #FF6A5C;
            --cat-sos-line:      #C05050;
            --cat-money-bg:      #1A2E1A;
            --cat-money-fg:      #80C580;
            --cat-money-line:    #4A8050;
            --cat-convert-bg:    #1A2030;
            --cat-convert-fg:    #82AACC;
            --cat-convert-line:  #4A6A8A;
            --cat-tools-bg:      #2D1E18;
            --cat-tools-fg:      #E89678;
            --cat-tools-line:    #A55E45;
            --cat-games-bg:      #201830;
            --cat-games-fg:      #B39DDB;
            --cat-games-line:    #7060A0;
            --cat-map-bg:        #142422;
            --cat-map-fg:        #4DB6AC;
            --cat-map-line:      #2A7070;
            --shadow-hero:       0 12px 28px -12px rgba(0,0,0,0.6);
            --shadow-card:       0 1px 3px rgba(0,0,0,0.2), 0 4px 12px rgba(0,0,0,0.15);
        }

        /* ── Base font update ── */
        body { font-family: 'Heebo', 'Rubik', sans-serif; background-color: var(--surface-paper); direction: rtl; }

        /* ── Top bar — Direction 01 ── */
        .top-bar {
            display: flex;
            align-items: center;
            justify-content: space-between;
            height: 62px;
            min-height: 62px;
            padding: 14px 16px 10px;
            background-color: var(--surface-paper);
            box-shadow: none;
            border-radius: 0;
            border-bottom: 1px solid var(--surface-border);
            position: sticky;
            top: 0;
            z-index: 1000;
            transition: background-color 0.3s;
            box-sizing: border-box;
        }
        body.dark-mode .top-bar { background-color: rgba(26,28,30,0.95); border-bottom-color: rgba(255,255,255,0.06); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }

        .tb-start-cluster { display: flex; align-items: center; gap: 8px; }
        .tb-end-cluster   { display: flex; align-items: center; gap: 6px; }

        /* Icon buttons — Direction 01 */
        .tb-icon-btn {
            width: 38px;
            height: 38px;
            border-radius: var(--radius-sm);
            background: var(--surface-sand);
            border: none;
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--klafny-teal);
            cursor: pointer;
            -webkit-tap-highlight-color: transparent;
            padding: 0;
            transition: background 0.15s, transform 0.12s;
            position: static;
            transform: none;
        }
        .tb-icon-btn:active { background: var(--surface-sand); transform: scale(0.94); }
        body.dark-mode .tb-icon-btn { background: rgba(255,255,255,0.08); color: var(--klafny-teal); }

        /* Wordmark */
        .main-title {
            font-size: 22px;
            font-weight: 800;
            color: #8E6A22;
            letter-spacing: 1px;
            font-family: 'Heebo', 'Rubik', sans-serif;
            text-align: center;
        }

        /* Clock pill — now inline in top-bar start cluster */
        #clock-pill {
            position: static;
            top: auto;
            left: auto;
            transform: none;
            background: var(--surface-sand);
            border: none;
            border-radius: var(--radius-xs);
            padding: 6px 10px;
            display: inline-flex;
            flex-direction: column;
            align-items: flex-start;
            gap: 1px;
            cursor: pointer;
            -webkit-tap-highlight-color: transparent;
            transition: background 0.15s;
            flex-shrink: 0;
            max-width: 110px;
            height: auto;
            box-sizing: border-box;
        }
        #clock-pill:active { background: var(--surface-sand); }
        .pill-il   { font-size: 12px; font-weight: 800; color: var(--ink-muted); line-height: 1.2; font-variant-numeric: tabular-nums; white-space: nowrap; }
        .pill-dest { font-size: 12px; font-weight: 700; color: var(--klafny-teal); line-height: 1.2; font-variant-numeric: tabular-nums; white-space: nowrap; }

        /* ── Region 2: Hero Header ── */
        .home-hero-header { padding: 8px 20px 12px; }
        .home-hero-title {
            display: flex;
            align-items: center;
            gap: 8px;
            margin: 0 0 6px;
            font-size: 26px;
            font-weight: 800;
            color: #8E6A22;
            letter-spacing: -0.5px;
            line-height: 1.1;
            text-align: right;
        }
        .home-hero-sub {
            margin: 0;
            font-size: 13px;
            color: var(--ink-muted);
            line-height: 1.5;
            text-align: right;
        }

        /* ── Region 3: Active Trip Hero Card ── */
        .home-trip-hero-wrap { padding: 0 20px 18px; }
        .home-active-trip-card {
            display: flex;
            flex-direction: column;
            align-items: stretch;
            width: 100%;
            background: transparent;
            border-radius: var(--radius-2xl);
            padding: 8px 20px;
            color: #fff;
            box-shadow: none;
            border: none;
            overflow: visible;
            position: relative;
            cursor: pointer;
            font-family: 'Heebo', 'Rubik', sans-serif;
            text-align: right;
            direction: rtl;
            box-sizing: border-box;
            -webkit-tap-highlight-color: transparent;
            touch-action: manipulation;
            transition: transform 0.12s var(--ease-spring), box-shadow 0.12s var(--ease-ui);
            z-index: 2;
            margin-bottom: 0;
        }
        /* D-shape card: background starts at globe centre-x (58px from card left), right side fully rounded */
        .home-active-trip-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 58px;
            right: 0;
            bottom: 0;
            background:
                radial-gradient(150% 100% at 100% 0%, rgba(255,255,255,0.28) 0%, rgba(255,255,255,0) 55%),
                linear-gradient(225deg, var(--theme-accent) 0%, color-mix(in oklab, var(--theme-accent) 38%, var(--theme-card-end)) 55%, var(--theme-card-end) 100%);
            border-radius: 0 var(--radius-2xl) var(--radius-2xl) 0;
            box-shadow:
                var(--shadow-hero),
                0 2px 6px rgba(0,0,0,0.05),
                inset 0 1px 0 rgba(255,255,255,0.24),
                inset 0 -1px 0 rgba(0,0,0,0.24),
                inset 1px 0 0 rgba(255,255,255,0.10);
            z-index: -1;
            pointer-events: none;
        }
        /* Subtle grain overlay — adds tactile texture without color shift */
        .home-active-trip-card::after {
            content: '';
            position: absolute;
            top: 0;
            left: 58px;
            right: 0;
            bottom: 0;
            border-radius: 0 var(--radius-2xl) var(--radius-2xl) 0;
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180' viewBox='0 0 180 180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
            opacity: 0.09;
            mix-blend-mode: overlay;
            pointer-events: none;
            z-index: -1;
        }
        .home-active-trip-card:active { transform: scale(0.97); }
        .home-active-trip-card:active::before { box-shadow: 0 3px 10px -4px rgba(31,107,107,0.4); }

        .home-trip-topo {
            position: absolute;
            left: -20px;
            bottom: -10px;
            opacity: 0.12;
            pointer-events: none;
        }
        /* ── Hero Card: Globe & Info layout ── */
        .hero-card-body {
            display: flex;
            flex-direction: row;
            align-items: center;
            gap: 14px;
            width: 100%;
        }
        .hero-card-info {
            flex: 1;
            min-width: 0;
            display: flex;
            flex-direction: column;
            gap: 5px;
            text-align: right;
        }
        .home-trip-eyebrow {
            font-size: 10px;
            letter-spacing: 2px;
            text-transform: uppercase;
            opacity: 0.65;
            font-weight: 700;
        }
        .home-trip-title {
            font-size: 20px;
            font-weight: 800;
            line-height: 1.15;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .home-trip-status {
            font-size: 11px;
            opacity: 0.75;
            min-height: 1em;
        }
        .hero-card-pills {
            display: flex;
            flex-direction: row;
            gap: 10px;
            align-items: center;
            margin-top: 6px;
        }
        .hero-visa-btn, .hero-weather-pill {
            display: inline-flex;
            align-items: center;
            gap: 5px;
            background: rgba(255,255,255,0.18);
            border: 1px solid rgba(255,255,255,0.32);
            border-radius: 20px;
            padding: 5px 12px 5px 10px;
            font-size: 12px;
            font-weight: 700;
            color: rgba(255,255,255,0.95);
            white-space: nowrap;
        }
        .hero-visa-btn {
            cursor: pointer;
            -webkit-tap-highlight-color: transparent;
            transition: transform 0.12s var(--ease-spring), opacity 0.12s;
        }
        .hero-visa-btn:active { transform: scale(0.92); opacity: 0.75; }
        .hero-visa-icon { font-size: 13px; line-height: 1; }
        .hero-weather-pill {
            font-size: 14px; letter-spacing: -0.3px;
            cursor: pointer;
            -webkit-tap-highlight-color: transparent;
            transition: transform 0.12s var(--ease-spring), opacity 0.12s;
        }
        .hero-weather-pill:active { transform: scale(0.92); opacity: 0.75; }
        .hero-card-globe {
            flex-shrink: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            opacity: 1;
            margin-top: -8px;
            margin-bottom: -8px;
            margin-left: -28px;
        }
        #hero-globe-element { display: block; overflow: visible; }

        /* ── 3D CSS Globe (real map, sliding-background sphere technique) ── */
        #hero-globe-3d {
            position: relative;
            width: 132px;
            height: 132px;
            border-radius: 50%;
            overflow: hidden;
            background-color: #0d47a1;
            background-image: url('./world-map.png');
            background-size: 200% 130%;
            background-repeat: repeat-x;
            background-position: 0 center;
            box-shadow:
                inset -22px -18px 44px rgba(0,0,0,0.75),
                inset   8px   7px 22px rgba(255,255,255,0.10),
                0 16px 44px rgba(0,0,0,0.55),
                0  0   28px rgba(80,160,255,0.20);
            animation: spin-3d-earth 82s linear infinite;
        }
        #hero-globe-3d::after {
            content: '';
            position: absolute;
            inset: 0;
            border-radius: 50%;
            background:
                radial-gradient(ellipse 55% 45% at 30% 25%, rgba(255,255,255,0.38) 0%, transparent 100%),
                radial-gradient(ellipse 60% 55% at 76% 76%, rgba(0,0,0,0.62)       0%, transparent 100%),
                radial-gradient(ellipse at 50% 50%,          transparent 48%,       rgba(0,0,0,0.52) 100%);
            pointer-events: none;
        }
        @keyframes spin-3d-earth {
            from { background-position: 0      center; }
            to   { background-position: -264px center; }
        }
        @keyframes spin-3d-earth-md {
            from { background-position: 0      center; }
            to   { background-position: -220px center; }
        }

        /* ── Dedicated VT globe — positioned by JS, invisible at rest ── */
        #vt-globe {
            display: none;
            position: fixed;
            border-radius: 50%;
            overflow: hidden;
            pointer-events: none;
            z-index: 9999;
            background-color: #0d47a1;
            background-image: url('./world-map.png');
            background-size: 200% 130%;
            background-repeat: repeat-x;
            box-shadow:
                inset -22px -18px 44px rgba(0,0,0,0.75),
                inset   8px   7px 22px rgba(255,255,255,0.10),
                0 16px 44px rgba(0,0,0,0.55),
                0  0   28px rgba(80,160,255,0.20);
        }
        #vt-globe::after {
            content: '';
            position: absolute;
            inset: 0;
            border-radius: 50%;
            background:
                radial-gradient(ellipse 55% 45% at 30% 25%, rgba(255,255,255,0.38) 0%, transparent 100%),
                radial-gradient(ellipse 60% 55% at 76% 76%, rgba(0,0,0,0.62)       0%, transparent 100%),
                radial-gradient(ellipse at 50% 50%,          transparent 48%,       rgba(0,0,0,0.52) 100%);
            pointer-events: none;
        }

        /* ── Page crossfade ── */
        ::view-transition-old(root) {
            animation-duration: 220ms;
            animation-timing-function: ease;
            animation-fill-mode: forwards;
        }
        ::view-transition-new(root) {
            animation-duration: 300ms;
            animation-timing-function: ease;
        }

        /* ── mth Hero Banner: Passport World Globe ──────────────────────── */
        @keyframes hero-gradient-drift {
            0%   { background-position: 0% 0%; }
            100% { background-position: 100% 100%; }
        }

        .mth-banner {
            background: transparent;
            border-radius: 26px;
            border: 1px solid rgba(255,255,255,0.08);
            overflow: hidden;
            color: #fff;
            position: relative;
            isolation: isolate;
        }
        .mth-banner::before {
            content: '';
            position: absolute;
            inset: 0;
            background:
                radial-gradient(150% 100% at 100% 0%, rgba(255,255,255,0.28) 0%, rgba(255,255,255,0) 55%),
                linear-gradient(225deg, var(--theme-accent) 0%, color-mix(in oklab, var(--theme-accent) 38%, var(--theme-card-end)) 55%, var(--theme-card-end) 100%);
            box-shadow:
                var(--shadow-hero),
                inset 0 1px 0 rgba(255,255,255,0.24),
                inset 0 -1px 0 rgba(0,0,0,0.24);
            z-index: -1;
            pointer-events: none;
        }
        .mth-banner::after {
            content: '';
            position: absolute;
            inset: 0;
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180' viewBox='0 0 180 180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
            opacity: 0.09;
            mix-blend-mode: overlay;
            pointer-events: none;
            z-index: -1;
        }
        .mth-inner { padding: 8px 20px; }

        /* Top row: 3-col grid collapsed, 1-col centered when open */
        .mth-top-row {
            display: grid;
            grid-template-columns: auto minmax(0,1fr) auto;
            grid-template-areas: "chev title globe";
            align-items: center;
            gap: 14px;
        }
        .mth-banner.mth-open .mth-top-row {
            grid-template-columns: 1fr auto;
            grid-template-rows: auto auto;
            grid-template-areas:
                "title chev"
                "globe globe";
            align-items: start;
            gap: 6px;
        }

        /* Globe area with ring + level chip */
        .mth-globe-area {
            grid-area: globe;
            position: relative;
            width: 96px;
            height: 96px;
            flex-shrink: 0;
            display: grid;
            place-items: center;
            transition: transform 420ms cubic-bezier(0.22,1,0.36,1);
        }
        .mth-banner.mth-open .mth-globe-area { justify-self: center; transform: scale(1.5); }

        /* Globe — in-flow at 96px in both states */
        #mytrip-globe-placeholder {
            position: relative;
            top: auto;
            left: auto;
            width: 96px;
            height: 96px;
            border-radius: 50%;
            overflow: hidden;
            background-color: #0d47a1;
            background-image: url('./world-map.png');
            background-size: 200% 130%;
            background-repeat: repeat-x;
            background-position: 0 center;
            box-shadow:
                inset -18px -15px 37px rgba(0,0,0,0.75),
                inset   7px   6px 18px rgba(255,255,255,0.10),
                0 10px 28px rgba(0,0,0,0.45),
                0  0   18px rgba(80,160,255,0.18);
            opacity: 1;
            pointer-events: none;
            z-index: 1;
            animation: spin-3d-earth-md 82s linear infinite;
            flex-shrink: 0;
        }
        #mytrip-globe-placeholder::after {
            content: '';
            position: absolute;
            inset: 0;
            border-radius: 50%;
            background:
                radial-gradient(ellipse 55% 45% at 30% 25%, rgba(255,255,255,0.38) 0%, transparent 100%),
                radial-gradient(ellipse 60% 55% at 76% 76%, rgba(0,0,0,0.62)       0%, transparent 100%),
                radial-gradient(ellipse at 50% 50%,          transparent 48%,       rgba(0,0,0,0.52) 100%);
            pointer-events: none;
        }

        /* XP ring SVG — overlays globe, only visible when expanded */
        .mth-xp-ring {
            position: absolute;
            top: -11px;
            left: -11px;
            width: 118px;
            height: 118px;
            pointer-events: none;
            opacity: 0;
            transition: opacity 200ms ease;
        }
        .mth-banner.mth-open .mth-xp-ring { opacity: 1; }


        /* Title block */
        .mth-title-block { grid-area: title; min-width: 0; }
        .mth-banner.mth-open .mth-title-block { text-align: start; }
        .mth-banner.mth-open .mth-title { font-size: 14px; font-weight: 700; letter-spacing: 0; }
        .mth-eyebrow {
            font-family: 'JetBrains Mono', 'Courier New', monospace;
            font-size: 9px;
            letter-spacing: 2.4px;
            opacity: 0.55;
            margin-bottom: 4px;
            color: #fff;
            font-weight: 700;
        }
        .mth-title {
            margin: 0;
            color: #fff;
            font-size: 20px;
            font-weight: 800;
            letter-spacing: -0.4px;
            line-height: 1.2;
        }

        /* Chevron circle */
        .mth-chevron {
            grid-area: chev;
            width: 32px;
            height: 32px;
            border-radius: 50%;
            background: rgba(255,255,255,0.08);
            display: flex;
            align-items: center;
            justify-content: center;
            color: rgba(255,255,255,0.7);
            flex-shrink: 0;
            transition: transform 0.42s cubic-bezier(0.2,0,0,1);
        }
        .mth-banner.mth-open .mth-chevron { transform: rotate(180deg); }

        /* Expand panel — CSS grid-row height animation */
        .mth-expand-panel {
            display: grid;
            grid-template-rows: 0fr;
            transition: grid-template-rows 420ms cubic-bezier(0.22,1,0.36,1);
        }
        .mth-banner.mth-open .mth-expand-panel { grid-template-rows: 1fr; }
        .mth-expand-inner {
            overflow: hidden;
            min-height: 0;
            opacity: 0;
            transition: opacity 280ms ease 0ms;
        }
        .mth-banner.mth-open .mth-expand-inner {
            opacity: 1;
            transition: opacity 280ms ease 150ms;
        }

        /* Level caption */
        .mth-level-caption {
            display: flex;
            justify-content: space-between;
            align-items: baseline;
            font-size: 11px;
            padding: 14px 6px 14px;
            color: #fff;
            font-weight: 700;
        }
        .mth-xp-mono {
            font-family: 'JetBrains Mono', 'Courier New', monospace;
            font-size: 10px;
            opacity: 0.6;
            font-weight: 400;
        }

        /* Stats grid */
        .mth-stats-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 8px;
            padding-bottom: 4px;
        }
        .mth-stat {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 6px;
            padding: 12px 14px;
            background: rgba(255,255,255,0.06);
            border-radius: 14px;
            border: 1px solid rgba(255,255,255,0.08);
            opacity: 0;
            transform: translateY(8px);
            transition: opacity 360ms ease, transform 360ms cubic-bezier(0.22,1,0.36,1);
        }
        .mth-banner.mth-open .mth-stat:nth-child(1) { opacity:1; transform:none; transition-delay:120ms; }
        .mth-banner.mth-open .mth-stat:nth-child(2) { opacity:1; transform:none; transition-delay:170ms; }
        .mth-banner.mth-open .mth-stat:nth-child(3) { opacity:1; transform:none; transition-delay:220ms; }
        .mth-banner.mth-open .mth-stat:nth-child(4) { opacity:1; transform:none; transition-delay:270ms; }
        .mth-stat-val {
            font-size: 22px;
            font-weight: 800;
            color: #fff;
            line-height: 1;
            letter-spacing: -0.5px;
            font-variant-numeric: tabular-nums;
        }
        .mth-stat-val--gold  { color: #E8C390; }
        .mth-stat-val--green { color: #34D399; }
        .mth-stat-lbl {
            font-size: 10px;
            font-family: 'JetBrains Mono', 'Courier New', monospace;
            opacity: 0.6;
            letter-spacing: 1px;
            color: #fff;
            font-weight: 400;
        }

        /* Active trip banner */
        .mth-active-banner {
            margin-top: 14px;
            padding: 10px 12px;
            background: rgba(52,211,153,0.10);
            border: 1px solid rgba(52,211,153,0.25);
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 8px;
            cursor: pointer;
            -webkit-tap-highlight-color: transparent;
        }
        .mth-active-left {
            display: flex;
            align-items: center;
            gap: 10px;
            min-width: 0;
        }
        .mth-active-eyebrow {
            font-size: 9px;
            font-family: 'JetBrains Mono', 'Courier New', monospace;
            opacity: 0.7;
            letter-spacing: 1.5px;
            color: #34D399;
        }
        .mth-active-label {
            font-size: 13px;
            font-weight: 800;
            color: #fff;
            margin-top: 1px;
        }
        .mth-active-open {
            font-size: 10px;
            font-family: 'JetBrains Mono', 'Courier New', monospace;
            opacity: 0.7;
            color: #fff;
            flex-shrink: 0;
        }

        /* Next trip card */
        .mth-next-trip-card {
            background: var(--card-bg);
            border-radius: 18px;
            border: 1px solid var(--border-color);
            padding: 16px 18px;
            display: grid;
            grid-template-columns: minmax(0,1fr) auto;
            align-items: center;
            gap: 12px;
            direction: rtl;
            cursor: pointer;
            -webkit-tap-highlight-color: transparent;
            text-align: right;
        }
        .mth-next-trip-card:active { opacity: 0.8; }
        .mth-next-eyebrow {
            font-family: 'JetBrains Mono', 'Courier New', monospace;
            font-size: 9px;
            color: var(--primary);
            letter-spacing: 1.6px;
            font-weight: 700;
            margin-bottom: 4px;
        }
        .mth-next-name {
            font-size: 17px;
            font-weight: 800;
            color: var(--title-color);
            letter-spacing: -0.3px;
        }
        .mth-next-sub {
            font-size: 11px;
            color: var(--text-muted);
            margin-top: 4px;
        }
        .mth-next-chip {
            background: color-mix(in srgb, var(--primary) 80%, #000);
            color: #fff;
            border-radius: 14px;
            padding: 10px 12px;
            text-align: center;
            min-width: 64px;
        }
        .mth-next-chip-num { font-size: 22px; font-weight: 800; line-height: 1; letter-spacing: -0.5px; }
        .mth-next-chip-lbl {
            font-family: 'JetBrains Mono', 'Courier New', monospace;
            font-size: 9px;
            opacity: 0.7;
            letter-spacing: 1px;
            margin-top: 3px;
        }

        /* Journal strip */
        .mth-section-header {
            display: flex;
            align-items: baseline;
            justify-content: space-between;
            margin-bottom: 10px;
            direction: rtl;
        }
        .mth-section-title { margin: 0; font-size: 14px; font-weight: 800; color: var(--title-color); letter-spacing: -0.2px; }
        .mth-section-link {
            background: transparent;
            border: none;
            color: var(--primary);
            font-weight: 700;
            font-size: 12px;
            cursor: pointer;
            font-family: inherit;
            padding: 0;
            -webkit-tap-highlight-color: transparent;
        }
        /* Stamp book */
        .mth-stamp-book {
            width: 100%;
            text-align: right;
            direction: rtl;
            cursor: pointer;
            background: var(--card-bg);
            border: 1px solid var(--border-color);
            border-radius: 18px;
            padding: 14px 18px;
            display: grid;
            grid-template-columns: minmax(0,1fr) auto;
            align-items: center;
            gap: 12px;
            font-family: inherit;
            -webkit-tap-highlight-color: transparent;
        }
        .mth-stamp-book:active { opacity: 0.8; }
        .mth-stamp-eyebrow {
            font-family: 'JetBrains Mono', 'Courier New', monospace;
            font-size: 9px;
            color: var(--text-muted);
            letter-spacing: 1.6px;
            font-weight: 700;
            margin-bottom: 4px;
        }
        .mth-stamp-title { font-size: 15px; font-weight: 800; color: var(--title-color); letter-spacing: -0.2px; }
        .mth-stamp-flags { display: flex; margin-top: 8px; direction: ltr; }
        .mth-stamp-flag-circle {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            background: var(--card-bg);
            border: 1.5px solid var(--border-color);
            display: grid;
            place-items: center;
            font-size: 16px;
            box-shadow: 0 2px 4px rgba(15,75,75,0.08);
            flex-shrink: 0;
        }
        .mth-stamp-flag-circle + .mth-stamp-flag-circle { margin-left: -10px; }
        .mth-stamp-overflow {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            background: var(--btn-bg);
            border: 1.5px solid var(--border-color);
            display: grid;
            place-items: center;
            font-size: 10px;
            font-weight: 800;
            color: var(--text-muted);
            margin-left: -10px;
            font-family: 'JetBrains Mono', 'Courier New', monospace;
            flex-shrink: 0;
        }
        .mth-stamp-open-lbl { color: var(--primary); font-size: 12px; font-weight: 700; flex-shrink: 0; }

        /* ── Actions FAB ── */
        #mth-fab-trigger {
            width: 32px; height: 32px; border-radius: 50%;
            background: var(--btn-bg); border: 1px solid var(--border-color);
            color: var(--text-muted); font-size: 1.25rem; line-height: 1;
            cursor: pointer; flex-shrink: 0; font-family: inherit;
            display: flex; align-items: center; justify-content: center;
            transition: transform 0.25s cubic-bezier(0.34,1.56,0.64,1), color 0.15s, border-color 0.15s;
            -webkit-tap-highlight-color: transparent;
        }
        #mth-fab-trigger.open { transform: rotate(45deg); color: var(--primary); border-color: var(--primary); }
        #mth-fab-pills {
            display: flex; gap: 6px; align-items: center;
            max-width: 0; overflow: hidden;
            transition: max-width 0.32s cubic-bezier(0.4,0,0.2,1);
        }
        #mth-fab-pills.open { max-width: 380px; }
        .mth-fab-pill {
            flex-shrink: 0; padding: 5px 12px; border-radius: 20px;
            background: var(--btn-bg); border: 1px solid var(--border-color);
            color: var(--title-color); font-family: inherit; font-size: 0.78rem; font-weight: 600;
            cursor: pointer; white-space: nowrap; -webkit-tap-highlight-color: transparent;
            opacity: 0; transform: scale(0.75);
            transition: opacity 0.15s, transform 0.18s cubic-bezier(0.34,1.56,0.64,1), background 0.1s;
        }
        .mth-fab-pill:active { background: var(--border-light); }
        #mth-fab-pills.open .mth-fab-pill { opacity: 1; transform: scale(1); }
        #mth-fab-pills.open .mth-fab-pill:nth-child(1) { transition-delay: 80ms; }
        #mth-fab-pills.open .mth-fab-pill:nth-child(2) { transition-delay: 130ms; }
        #mth-fab-pills.open .mth-fab-pill:nth-child(3) { transition-delay: 180ms; }

        @media (prefers-reduced-motion: reduce) {
            .mth-top-row, .mth-globe-area, .mth-expand-panel, .mth-expand-inner,
            .mth-stat, .mth-xp-ring, #mth-xp-fill, .mth-chevron {
                transition: none !important;
                animation: none !important;
            }
            .hero-trip-card, .mth-banner {
                animation: none !important;
                background-position: 30% 30%;
            }
        }
        /* ── Globe View Transition ──
           Group handles all geometry (position + size).
           Image pairs get no crossfade — the globe spins only ~2° in 500ms
           so the freeze-frame → real-element switch is invisible. */
        /* ── Home hero → mytrip shared-element globe VT ── */
        ::view-transition-group(trip-globe) {
            animation-duration: 480ms;
            animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
        }
        ::view-transition-old(trip-globe),
        ::view-transition-new(trip-globe) {
            animation-duration: 480ms;
            border-radius: 50%;
        }
        /* Hero card morph: home-active-trip-card ↔ mth-banner */
        ::view-transition-group(trip-hero-card) {
            animation-duration: 480ms;
            animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
        }
        ::view-transition-old(trip-hero-card),
        ::view-transition-new(trip-hero-card) {
            animation-duration: 480ms;
        }

        /* ── Region 4+6 merged: Quick-action grid (2×3) ── */
        .home-quick-grid {
            padding: 0 20px 14px;
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 10px;
        }
        /* 3-col compact navigation grid (tools / games / build trip) */
        .home-nav-grid {
            padding: 0 20px 14px;
            display: grid;
            grid-template-columns: 1fr 1fr 1fr;
            gap: 10px;
        }
        .home-nav-grid .home-tool-tile { min-height: 84px; padding: 14px 8px; gap: 6px; }
        .home-nav-grid .home-tool-chip { width: 36px; height: 36px; }
        .home-nav-grid .home-tool-chip svg { width: 18px; height: 18px; }
        .home-nav-grid .home-tool-label { font-size: 12px; }
        .home-pill {
            border-radius: var(--radius-xl);
            padding: 18px 10px;
            min-height: 96px;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 8px;
            cursor: pointer;
            font-family: 'Heebo', 'Rubik', sans-serif;
            -webkit-tap-highlight-color: transparent;
            touch-action: manipulation;
            transition: transform 0.12s var(--ease-spring);
            box-sizing: border-box;
            border: 1px solid transparent;
            position: relative;
            z-index: 2;
        }
        .home-pill:active { transform: scale(0.95); }

        /* Money pills — filled CTA buttons styled like mini hero cards
           (diagonal gradient + sheen + inset). Hardcoded hex so the saturated
           dark color persists in dark mode and never clashes with destination themes. */
        .home-pill-money {
            background:
                radial-gradient(120% 100% at 100% 0%, rgba(255,255,255,0.20) 0%, rgba(255,255,255,0) 55%),
                linear-gradient(225deg, #C99327 0%, color-mix(in oklab, #C99327 38%, #5E4A14) 55%, #5E4A14 100%);
            border: 1.5px solid transparent;
            box-shadow:
                0 6px 16px rgba(94,74,20,0.38),
                inset 0 1px 0 rgba(255,255,255,0.24),
                inset 0 -1px 0 rgba(0,0,0,0.30);
        }
        .home-pill-convert {
            background:
                radial-gradient(120% 100% at 100% 0%, rgba(255,255,255,0.20) 0%, rgba(255,255,255,0) 55%),
                linear-gradient(225deg, #5C3D5A 0%, color-mix(in oklab, #5C3D5A 38%, #2D1A2C) 55%, #2D1A2C 100%);
            border: 1.5px solid transparent;
            box-shadow:
                0 6px 16px rgba(45,26,44,0.38),
                inset 0 1px 0 rgba(255,255,255,0.24),
                inset 0 -1px 0 rgba(0,0,0,0.30);
        }

        /* Nav tiles — neutral surface + neutral border; the chip alone carries identity */
        .home-tool-tile.home-tool-tile--tools,
        .home-tool-tile.home-tool-tile--games,
        .home-tool-tile.home-tool-tile--map {
            background: var(--surface-card);
            border: 1.5px solid var(--surface-border);
            box-shadow:
                0 2px 6px rgba(0,0,0,0.04),
                inset 0 1px 0 rgba(255,255,255,0.55),
                inset 0 -1px 0 rgba(0,0,0,0.04);
        }

        .home-pill-chip {
            width: 42px;
            height: 42px;
            border-radius: var(--radius-sm);
            background: #fff;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }
        .home-pill-chip svg { width: 22px; height: 22px; }
        /* Money / convert chips inverted: white bg, deep colored icon (hardcoded for both modes) */
        .home-pill-chip-money   { background: #fff; color: #7A5510; box-shadow: 0 2px 5px rgba(0,0,0,0.18), inset 0 1px 0 rgba(255,255,255,0.85); }
        .home-pill-chip-convert { background: #fff; color: #3D2640; box-shadow: 0 2px 5px rgba(0,0,0,0.18), inset 0 1px 0 rgba(255,255,255,0.85); }

        .home-pill-label         { font-size: 13px; font-weight: 700; }
        .home-pill-label-money,
        .home-pill-label-convert { color: #fff; font-weight: 800; }

        body.dark-mode .home-tool-chip--tools,
        body.dark-mode .home-tool-chip--games,
        body.dark-mode .home-tool-chip--map { box-shadow: inset 0 1px 0 rgba(255,255,255,0.10); }

        /* ── Region 5: Daily expense strip ── */
        .home-expense-strip {
            margin: 0 20px 14px;
            background: var(--surface-sand);
            border-radius: var(--radius-md);
            padding: 10px 14px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            cursor: pointer;
            -webkit-tap-highlight-color: transparent;
            touch-action: manipulation;
            transition: background 0.12s;
        }
        .home-expense-strip:active { background: var(--surface-sand); }
        .home-expense-strip-left {
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 12px;
            color: var(--ink-muted);
        }
        .home-expense-strip-val {
            font-size: 15px;
            font-weight: 800;
            font-variant-numeric: tabular-nums;
            font-feature-settings: "tnum";
            color: var(--ink);
        }

        /* ── Tips info strip — mirrors expense-strip pattern ── */
        .home-tips-strip {
            margin: 0 20px 14px;
            background: var(--surface-sand);
            border-radius: var(--radius-md);
            padding: 10px 14px;
            display: flex;
            align-items: center;
            gap: 10px;
            cursor: pointer;
            -webkit-tap-highlight-color: transparent;
            touch-action: manipulation;
            transition: background 0.12s;
        }
        .home-tips-strip:active { background: color-mix(in oklab, var(--surface-sand) 92%, var(--ink)); }
        .home-tips-strip-icon {
            width: 30px;
            height: 30px;
            border-radius: var(--radius-xs);
            background: #B85585;
            color: #fff;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            box-shadow: 0 1px 3px rgba(184,85,133,0.30), inset 0 1px 0 rgba(255,255,255,0.30);
        }
        .home-tips-strip-text { flex: 1; min-width: 0; }
        .home-tips-strip-title { font-size: 13px; font-weight: 700; color: var(--ink); text-align: right; }
        .home-tips-strip-sub { font-size: 11px; color: var(--ink-muted); margin-top: 1px; text-align: right; }
        .home-tips-strip-chevron { color: var(--ink-muted); flex-shrink: 0; transform: scaleX(-1); }

        /* ── Region 6: Tool tile shared styles (now lives inside .home-quick-grid) ── */
        .home-tool-tile {
            background: var(--surface-card);
            border: 1px solid var(--surface-border);
            border-radius: var(--radius-xl);
            padding: 18px 10px;
            min-height: 96px;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 8px;
            cursor: pointer;
            -webkit-tap-highlight-color: transparent;
            touch-action: manipulation;
            transition: transform 0.12s var(--ease-spring), box-shadow 0.12s var(--ease-ui);
            box-sizing: border-box;
            position: relative;
            z-index: 2;
        }
        .home-tool-tile:active { transform: scale(0.95); box-shadow: none; }
        @media (hover: hover) { .home-tool-tile:hover { transform: translateY(-1px); box-shadow: var(--shadow-card); } }

        /* Per-variant background rules removed — the unified sand+grain treatment above covers them */

        .home-tool-chip {
            width: 42px;
            height: 42px;
            border-radius: var(--radius-sm);
            background: #fff;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }
        .home-tool-chip svg { width: 22px; height: 22px; }
        /* Hardcoded chip bgs so saturation persists in dark mode (no flip to lighter -fg) */
        .home-tool-chip--tools   { background: #C2654C; color: #fff; box-shadow: 0 2px 5px rgba(194,101,76,0.32),  inset 0 1px 0 rgba(255,255,255,0.30); }
        .home-tool-chip--games   { background: #2D8A5C; color: #fff; box-shadow: 0 2px 5px rgba(45,138,92,0.32), inset 0 1px 0 rgba(255,255,255,0.30); }
        .home-tool-chip--map     { background: #2D5AB5; color: #fff; box-shadow: 0 2px 5px rgba(45,90,181,0.32), inset 0 1px 0 rgba(255,255,255,0.30); }

        .home-tool-label { font-size: 13px; font-weight: 700; color: var(--ink); margin: 0; text-align: right; }

        /* Per-variant dark-mode borders removed — uniform border via --surface-border in the unified rule above */

        /* ── Floating SOS FAB (homepage-only, lives inside #view-landing) ── */
        .home-sos-fab {
            position: fixed;
            inset-block-end: calc(64px + env(safe-area-inset-bottom, 0px) + 16px);
            inset-inline-end: 16px;
            width: 56px;
            height: 56px;
            border-radius: 50%;
            border: 1px solid rgba(255,255,255,0.18);
            background: radial-gradient(120% 120% at 30% 25%, #E25B4E 0%, #C9382B 70%, #A52319 100%);
            color: #fff;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 1px;
            cursor: pointer;
            z-index: 1500;
            box-shadow:
                0 6px 16px rgba(180,40,30,0.32),
                0 0 0 4px rgba(208,53,37,0.10),
                inset 0 1px 0 rgba(255,255,255,0.30);
            -webkit-tap-highlight-color: transparent;
            touch-action: manipulation;
            transition: transform 0.12s var(--ease-spring);
            font-family: 'Heebo', 'Rubik', sans-serif;
            padding: 0;
        }
        .home-sos-fab:active { transform: scale(0.92); }
        .home-sos-fab-label { font-size: 10px; font-weight: 800; letter-spacing: 0.5px; line-height: 1; }
        @media (prefers-reduced-motion: reduce) { .home-sos-fab { transition: none; } }

        /* ── Region 8: Games discovery scroller ── */
        .home-games-section { margin-bottom: 20px; }
        .home-section-label {
            padding: 0 20px;
            font-size: 11px;
            color: var(--ink-muted);
            letter-spacing: 1px;
            text-transform: uppercase;
            margin-bottom: 8px;
            font-weight: 700;
            display: block;
            text-align: right;
        }
        .home-game-carousel {
            display: flex;
            gap: 10px;
            padding: 4px 20px 8px;
            overflow-x: auto;
            direction: rtl;
            scroll-snap-type: x mandatory;
            scrollbar-width: none;
            -webkit-overflow-scrolling: touch;
            overscroll-behavior-x: contain;
            list-style: none;
            margin: 0;
        }
        .home-game-carousel::-webkit-scrollbar { display: none; }
        .home-carousel-card {
            flex: 0 0 150px;
            background: var(--surface-card);
            border: 1px solid var(--surface-border);
            border-radius: var(--radius-lg);
            padding: 14px;
            display: flex;
            flex-direction: column;
            gap: 8px;
            scroll-snap-align: start;
            cursor: pointer;
            -webkit-tap-highlight-color: transparent;
            touch-action: manipulation;
            transition: transform 0.12s var(--ease-spring);
            box-sizing: border-box;
        }
        .home-carousel-card:active { transform: scale(0.93); }

        .home-carousel-icon {
            width: 38px;
            height: 38px;
            border-radius: var(--radius-xs);
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }
        .home-carousel-icon--games   { background: var(--cat-games-bg);   color: var(--cat-games-fg); }
        .home-carousel-icon--map     { background: var(--cat-map-bg);     color: var(--cat-map-fg); }
        .home-carousel-icon--tools   { background: var(--cat-tools-bg);   color: var(--cat-tools-fg); }
        .home-carousel-icon--sos     { background: var(--cat-sos-bg);     color: var(--cat-sos-fg); }
        .home-carousel-icon--convert { background: var(--cat-convert-bg); color: var(--cat-convert-fg); }

        .home-carousel-label { font-size: 13px; font-weight: 700; color: var(--ink); line-height: 1.3; text-align: right; }
        .home-carousel-sub   { font-size: 10px; color: var(--ink-muted); margin-top: 2px; text-align: right; }

        /* ── Bottom nav: active pill ── */
        .b-nav-item.active .b-nav-icon {
            background: var(--cat-map-bg);
            border-radius: var(--radius-sm);
            padding: 6px 14px;
            color: var(--klafny-teal);
        }
        .b-nav-item.active { color: var(--klafny-teal); }
        .b-nav-item.active .b-nav-text { font-weight: 700; color: var(--klafny-teal); }
        body.dark-mode .b-nav-item.active .b-nav-icon { background: rgba(212,175,55,0.14); color: #D4AF37; }
        body.dark-mode .b-nav-item.active,
        body.dark-mode .b-nav-item.active .b-nav-text { color: #D4AF37; }
        .b-nav-icon { width: auto; min-width: 24px; height: 24px; }

        /* ── Reduced motion ── */
        @media (prefers-reduced-motion: reduce) {
            .home-active-trip-card,
            .home-pill,
            .home-tool-tile,
            .home-carousel-card,
            .home-expense-strip { transition: none; }
        }

        /* ── Sunlight mode ── */
        @media (prefers-contrast: more) {
            :root {
                --ink-muted:      #4A5450;
                --surface-sand:   #EDE4D3;
            }
            .home-active-trip-card::before { background: var(--klafny-teal-dark); }
            .top-bar, .home-tool-tile, .home-carousel-card {
                border-width: 1.5px;
            }
        }
        html.sunlight {
            --ink-muted:    #4A5450;
            --surface-sand: #EDE4D3;
        }
        html.sunlight .home-active-trip-card::before { background: var(--klafny-teal-dark); }
        .bp-mini-cell { width: 14px; height: 14px; border-radius: 2px; }

        /* ── Custom suggest dropdown ── */
        .suggest-wrap { position: relative; }
        .currency-row .suggest-wrap { flex-shrink: 0; }
        .suggest-list {
            position: fixed; z-index: 99999;
            background: var(--card-bg); border: 1px solid var(--border-light);
            border-radius: 12px; overflow-y: auto;
            box-shadow: 0 8px 24px rgba(0,0,0,0.18);
            direction: rtl; display: none;
            -webkit-overflow-scrolling: touch;
            overscroll-behavior: contain;
            touch-action: pan-y;
        }
        .suggest-item {
            padding: 11px 14px; font-size: 0.95rem; cursor: pointer;
            color: var(--text-color); border-bottom: 1px solid var(--border-light);
            transition: background 0.1s;
        }
        .suggest-item:last-child { border-bottom: none; }
        .suggest-item:active, .suggest-item:hover { background: var(--btn-bg); }

        /* ================================================================
           Currency Converter — cv-* namespace
           Design tokens, calculator layout, numpad, picker
        ================================================================ */

        /* Hide h2 everywhere except hub */
        #view-calculators > .container > h2 { display: none; }
        #view-calculators[style*="block"].active:has(#calc-hub.active) > .container > h2 {
            display: block; margin-bottom: 16px;
        }
        /* Hide calc-nav on hub */
        #view-calculators[style*="block"].active:has(#calc-hub.active) .calc-nav { display: none; }

        /* ── Tools Hub ── */
        .hub-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            grid-auto-rows: 1fr;
            gap: 12px;
            direction: rtl;
        }
        .hub-card {
            background: var(--card-bg);
            border: 1px solid var(--border-light);
            border-radius: 20px;
            padding: 16px 14px 14px;
            cursor: pointer;
            display: flex;
            flex-direction: column;
            transition: transform 80ms ease;
            -webkit-tap-highlight-color: transparent;
            touch-action: manipulation;
            direction: rtl;
            text-align: right;
        }
        .hub-card:active { transform: scale(0.95); }
        .hub-icon { font-size: 28px; line-height: 1; }
        .hub-title { font-size: 11px; font-weight: 700; color: var(--text-muted); letter-spacing: 0.3px; margin-top: 5px; }
        .hub-value {
            font-size: 22px; font-weight: 800; color: var(--title-color);
            line-height: 1.1; margin-top: auto; padding-top: 8px;
        }
        .hub-value-sm {
            font-size: 14px; font-weight: 700; line-height: 1.5;
            margin-top: auto; padding-top: 8px;
        }
        .hub-sub { font-size: 10px; color: var(--text-muted); margin-top: 4px; }

        /* Color tokens — light mode */
        .cv-scope {
            --cv-bg:      #F4F6F8;
            --cv-card:    #FFFFFF;
            --cv-border:  var(--surface-border);
            --cv-teal:    var(--primary);
            --cv-ink:     var(--ink);
            --cv-muted:   var(--ink-muted);
            --cv-online:  #22C07A;
            /* Numpad surface + keys — modern cool neutrals (light mode) */
            --cv-pad-1:        #F2F5F8;
            --cv-pad-2:        #E9EDF2;
            --cv-key-num-bg:   #FFFFFF;
            --cv-key-num-bd:   #E6EAEF;
            --cv-key-op-bg:    color-mix(in srgb, var(--primary) 9%, #FFFFFF);
            --cv-key-op-bd:    color-mix(in srgb, var(--primary) 22%, #FFFFFF);
            --cv-key-eq-bg:    var(--primary);
            --cv-key-eq-fg:    #FFFFFF;
            --cv-key-clear-bg: #E8ECF1;
            --cv-key-clear-fg: #4A5568;
            --cv-key-del-bg:   #FDEDEA;
            --cv-key-del-fg:   #C2412E;
        }
        /* Dark-mode overrides */
        body.dark-mode .cv-scope {
            --cv-bg:      var(--surface-paper);
            --cv-card:    var(--surface-card);
            --cv-border:  var(--surface-border);
            --cv-ink:     var(--ink);
            --cv-muted:   var(--ink-muted);
            --cv-pad-1:        var(--surface-paper);
            --cv-pad-2:        var(--surface-paper);
            --cv-key-num-bg:   #3C3F44;
            --cv-key-num-bd:   transparent;
            --cv-key-op-bg:    color-mix(in srgb, var(--primary) 20%, #2C2F33);
            --cv-key-op-bd:    transparent;
            --cv-key-eq-bg:    var(--primary);
            --cv-key-eq-fg:    var(--surface-paper);
            --cv-key-clear-bg: #252830;
            --cv-key-clear-fg: var(--ink-muted);
            --cv-key-del-bg:   #3A1F1F;
            --cv-key-del-fg:   #F07878;
        }

        /* Override calc-container display for currency tab */
        #calc-currency.cv-scope.active {
            display: flex;
            flex-direction: column;
            flex: 1;
            min-height: 0;
            overflow: hidden;
            animation: fadeIn 0.3s;
        }

        /* ── Display card ── */
        .cv-display-card {
            background: linear-gradient(155deg, var(--cv-bg) 0%, color-mix(in srgb, var(--cv-bg) 88%, var(--cv-border)) 100%);
            border-radius: 20px;
            padding: 12px 14px 10px;
            margin-bottom: 7px;
            direction: rtl;
            flex: 1;
            min-height: 0;
            overflow: hidden;
            display: flex;
            flex-direction: column;
        }
        /* ── Numbers wrap — no animation needed (numpad slides away instead) ── */
        .cv-numbers-wrap { flex-shrink: 0; }

        /* ── Expand handle — sits at bottom of chip area ── */
        .cv-expand-btn {
            flex-shrink: 0;
            align-self: center;
            background: color-mix(in srgb, var(--cv-border) 70%, transparent);
            border: none;
            border-radius: 10px;
            width: 36px; height: 16px;
            display: flex; align-items: center; justify-content: center;
            cursor: pointer; color: var(--cv-muted);
            margin: 4px 0 2px;
            -webkit-tap-highlight-color: transparent;
            transition: background 150ms;
        }
        .cv-expand-btn:active { background: color-mix(in srgb, var(--primary) 25%, transparent); color: var(--primary); }
        .cv-chevron {
            display: block;
            transform: rotate(0deg); /* points down = expand numpad away */
            transition: transform 260ms ease;
        }
        #calc-currency.cv-chips-expanded .cv-chevron {
            transform: rotate(180deg); /* points up = collapse numpad back */
        }

        /* ── Numpad slides DOWN out when chips are expanded (JS sets inline styles) ── */
        .cv-numpad {
            transition: transform 300ms ease, opacity 250ms ease, margin-top 300ms ease;
        }

        .cv-base-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 6px;
        }
        .cv-base-chip {
            padding: 5px 11px;
            border-radius: 20px;
            background: var(--cv-card);
            border: 1.5px solid var(--cv-border);
            font-family: 'Rubik', sans-serif;
            font-size: 12px;
            font-weight: 700;
            color: var(--cv-teal);
            cursor: pointer;
            user-select: none;
            -webkit-tap-highlight-color: transparent;
            display: flex;
            align-items: center;
            gap: 5px;
            transition: opacity 120ms, border-color 120ms;
        }
        .cv-base-chip:active { opacity: 0.65; }
        .cv-base-chip-active {
            border-color: var(--primary);
            background: color-mix(in srgb, var(--primary) 8%, var(--cv-card));
        }
        .cv-base-arrow { font-size: 9px; opacity: 0.5; }
        .cv-online-row { display: flex; align-items: center; gap: 5px; }
        .cv-online-dot {
            width: 7px; height: 7px; border-radius: 50%;
            background: var(--cv-online);
            box-shadow: 0 0 0 3px rgba(34,192,122,0.2);
            animation: cvPulse 2.4s ease-out infinite;
            flex-shrink: 0;
        }
        @keyframes cvPulse {
            0%,100% { box-shadow: 0 0 0 3px rgba(34,192,122,0.2); }
            50%      { box-shadow: 0 0 0 7px rgba(34,192,122,0.05); }
        }
        .cv-online-label { font-size: 10px; font-weight: 700; color: var(--cv-online); }

        .cv-tape {
            font-family: 'Rubik', sans-serif;
            font-size: 10px;
            color: var(--cv-muted);
            line-height: 1.3;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            direction: ltr;
            text-align: left;
            margin-bottom: 0;
        }
        .cv-tape:empty { display: none; }
        .cv-total-row { text-align: right; direction: ltr; line-height: 1.1; }
        .cv-total {
            font-size: 34px; font-weight: 900;
            color: var(--cv-ink);
            font-feature-settings: "tnum";
            letter-spacing: -0.5px;
            white-space: nowrap;
        }
        .cv-cursor {
            color: var(--cv-teal);
            animation: cvBlink 1s step-end infinite;
            font-size: 26px; font-weight: 300;
            vertical-align: middle;
        }
        @keyframes cvBlink { 0%,100%{opacity:1} 50%{opacity:0} }

        /* ILS reference strip — always reserves height, opacity-only toggle to avoid layout shift */
        .cv-ils-ref {
            font-family: 'Rubik', sans-serif;
            font-size: 12px; font-weight: 600;
            color: var(--cv-muted);
            text-align: right; direction: ltr;
            margin-top: 1px; margin-bottom: 2px;
            min-height: 16px;
            opacity: 1;
            transition: opacity 160ms;
        }
        .cv-ils-ref.cv-ils-hidden { opacity: 0; pointer-events: none; }
        #cv-ils-ref-val { color: var(--cv-ink); font-weight: 800; }

        /* ── Chip scroll wrap — fills all remaining display-card space ── */
        .cv-chip-scroll-wrap {
            flex: 1;
            min-height: 0;
            overflow-y: auto;
            -webkit-overflow-scrolling: touch;
            scrollbar-width: none;
            margin-top: 6px;
        }
        .cv-chip-scroll-wrap::-webkit-scrollbar { display: none; }

        .cv-chip-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 5px;
        }

        /* ── Individual currency chip ── */
        .cv-chip {
            position: relative;
            background: var(--cv-card);
            border: 1.5px solid var(--cv-border);
            border-radius: 14px;
            padding: 7px 9px 6px;
            cursor: pointer;
            display: flex;
            flex-direction: column;
            gap: 2px;
            direction: rtl;
            -webkit-tap-highlight-color: transparent;
            transition: transform 90ms ease, border-color 130ms, background 130ms;
            user-select: none;
        }
        .cv-chip:active { transform: scale(0.92); }
        .cv-chip-active {
            border-color: var(--primary);
            background: color-mix(in srgb, var(--primary) 7%, var(--cv-card));
        }
        .cv-chip-pending-del { background: #FEE9E5; border-color: #F5C6C0; }
        body.dark-mode .cv-chip-pending-del { background: #3A1A1A; border-color: #6B2A2A; }
        /* Top zone: tap = change which currency */
        .cv-chip-label-zone {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding-bottom: 3px;
            cursor: pointer;
            -webkit-tap-highlight-color: transparent;
        }
        .cv-chip-label {
            font-family: 'Rubik', sans-serif;
            font-size: 10px; font-weight: 700;
            color: var(--cv-muted); line-height: 1.2;
            white-space: nowrap; overflow: hidden;
        }
        .cv-chip-edit-dot {
            font-size: 10px; opacity: 0.3; flex-shrink: 0; margin-left: 3px;
        }
        /* Bottom zone: tap = set as active input */
        .cv-chip-amount-zone {
            cursor: pointer;
            -webkit-tap-highlight-color: transparent;
        }
        .cv-chip-amount {
            font-family: 'Rubik', sans-serif;
            font-size: 16px; font-weight: 900;
            color: var(--cv-teal);
            font-feature-settings: 'tnum';
            direction: ltr; text-align: right; line-height: 1.1;
            white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
        }
        .cv-chip-active .cv-chip-amount { color: var(--primary); }
        .cv-chip-del-confirm {
            font-family: 'Rubik', sans-serif;
            font-size: 11px; font-weight: 800;
            color: #C2412E;
            text-align: center;
            padding: 10px 0 8px;
            cursor: pointer;
            -webkit-tap-highlight-color: transparent;
        }

        .cv-chip-add {
            display: flex; align-items: center; justify-content: center; gap: 5px;
            border-style: dashed; border-color: var(--cv-border);
            background: transparent;
            padding: 7px 0; min-height: 32px;
            font-family: 'Rubik', sans-serif; font-size: 12px; font-weight: 700;
            color: var(--cv-muted);
            cursor: pointer;
            -webkit-tap-highlight-color: transparent;
            transition: background 130ms, border-color 130ms;
        }
        .cv-chip-add:active { background: var(--cv-bg); border-color: var(--primary); color: var(--primary); }

        @keyframes cvSlideIn {
            from { transform: translateY(6px); opacity: 0; }
            to   { transform: translateY(0);   opacity: 1; }
        }

        /* ── + currency chip (inline in chip grid) — only used inside cv-chip-grid ── */
        .cv-add-chip-btn {
            padding: 0 13px;
            height: 40px;
            border-radius: 13px;
            border: 1.5px dashed var(--cv-border);
            background: transparent;
            color: var(--cv-teal);
            font-family: 'Rubik', sans-serif;
            font-size: 11px; font-weight: 700;
            cursor: pointer;
            display: flex; align-items: center; gap: 5px;
            white-space: nowrap; flex-shrink: 0;
            -webkit-tap-highlight-color: transparent;
            transition: background 130ms;
        }
        .cv-add-chip-btn:active { background: var(--cv-bg); }
        /* ── Expense key — sits inside the numpad grid as the bottom-left key ── */
        .cv-key-expense {
            font-size: 26px;
            line-height: 1;
            text-align: center;
            border-style: solid;
            border-width: 1.5px;
        }
        .cv-syn-ready {
            background: var(--primary);
            color: #fff;
            border-color: transparent;
        }
        .cv-syn-fired { background: #3F6B32 !important; color: #fff !important; border-color: transparent !important; }

        /* ── Category bar — normal flow inside numpad; fixed container absorbs height change ── */
        .cv-cat-bar {
            overflow: hidden;
            max-height: 0;
            transition: max-height 220ms ease;
        }
        .cv-cat-bar.open { max-height: 56px; }
        .cv-cat-scroll {
            display: flex; gap: 6px;
            overflow-x: auto; scrollbar-width: none;
            padding-bottom: 3px; direction: rtl;
        }
        .cv-cat-scroll::-webkit-scrollbar { display: none; }
        .cv-cat-pill {
            padding: 6px 12px;
            border-radius: 20px;
            border: 1.5px solid var(--cv-border);
            background: var(--cv-card);
            color: var(--cv-ink);
            font-family: 'Rubik', sans-serif; font-size: 12px; font-weight: 700;
            cursor: pointer; white-space: nowrap; flex-shrink: 0;
            -webkit-tap-highlight-color: transparent;
            transition: all 110ms;
        }
        .cv-cat-pill:active {
            background: color-mix(in srgb, var(--primary) 12%, var(--cv-card));
            border-color: var(--primary); color: var(--primary);
        }


        /* ── Numpad — escapes container padding for edge-to-edge ── */
        .cv-numpad {
            background: linear-gradient(180deg, var(--cv-pad-1) 0%, var(--cv-pad-2) 100%);
            padding: 8px 12px 8px;
            border-radius: 20px 20px 0 0;
            margin: 0 -15px -15px;
            flex-shrink: 0;
            position: relative;
        }
        .cv-keys {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 7px;
            direction: ltr;
        }
        .cv-key {
            height: 58px; border-radius: 18px; border: none;
            font-family: 'Rubik', sans-serif; font-size: 19px; font-weight: 700;
            cursor: pointer; user-select: none;
            display: grid; place-items: center;
            box-shadow: 0 2px 0 rgba(0,0,0,0.10);
            transition: transform 75ms ease, box-shadow 75ms ease;
            -webkit-tap-highlight-color: transparent;
            touch-action: manipulation;
        }
        .cv-key:active { transform: scale(0.89); box-shadow: none; }
        .cv-key-num   { background: var(--cv-key-num-bg); color: var(--cv-ink); font-size: 24px; border: 1px solid var(--cv-key-num-bd); }
        .cv-key-op    { background: var(--cv-key-op-bg); color: var(--primary); font-size: 26px; border: 1px solid var(--cv-key-op-bd); }
        .cv-key-eq    { background: var(--cv-key-eq-bg); color: var(--cv-key-eq-fg); font-weight: 900; font-size: 24px; }
        .cv-key-clear { background: var(--cv-key-clear-bg); color: var(--cv-key-clear-fg); font-size: 20px; }
        .cv-key-del   { background: var(--cv-key-del-bg); color: var(--cv-key-del-fg); font-size: 22px; }
        .cv-key-zero  { grid-column: span 2; }

        /* ── Screen lock: fixed overlay covering bottom nav, never scrolls ──
           Scoped to when the currency sub-tab is truly the active visible tab. */
        body:has(#view-calculators[style*="block"].active #calc-currency.active) {
            overflow: hidden;
        }
        #view-calculators[style*="block"].active:has(#calc-currency.active) {
            position: fixed !important;
            top: 70px; left: 0; right: 0;
            bottom: calc(64px + env(safe-area-inset-bottom, 0px) + 8px);
            height: auto !important;
            display: flex !important;
            flex-direction: column;
            z-index: 1600;
            overflow: hidden;
            background: var(--bg-color);
        }
        #view-calculators[style*="block"].active:has(#calc-currency.active) > .container {
            flex: 1;
            min-height: 0;
            display: flex;
            flex-direction: column;
            overflow: hidden;
            padding: 10px 8px 0;
        }
        #view-calculators[style*="block"].active:has(#calc-currency.active) .calc-nav {
            display: none;
        }
        #view-calculators[style*="block"].active:has(#calc-currency.active) .cv-numpad {
            margin: 0 -8px 0;
        }

        /* ── Currency picker — fixed overlay ── */
        .cv-picker-overlay {
            position: fixed; inset: 0;
            background: rgba(10,10,10,0.45);
            z-index: 500;
            backdrop-filter: blur(3px);
            -webkit-backdrop-filter: blur(3px);
            display: flex; align-items: flex-end;
        }
        .cv-picker-sheet {
            width: 100%; max-height: 65vh;
            background: var(--card-bg);
            border-radius: 24px 24px 0 0;
            padding: 14px 16px 28px;
            overflow-y: auto;
        }
        .cv-picker-handle {
            width: 36px; height: 4px;
            background: var(--cv-border);
            border-radius: 3px;
            margin: 0 auto 14px;
        }
        .cv-picker-title {
            font-size: 14px; font-weight: 800;
            color: var(--cv-ink);
            margin-bottom: 10px;
            text-align: right; direction: rtl;
        }
        .cv-search-wrap { margin-bottom: 10px; }
        .cv-search-input {
            width: 100%; box-sizing: border-box;
            padding: 9px 13px;
            border-radius: 13px;
            border: 1.5px solid var(--cv-border);
            background: var(--cv-bg);
            color: var(--cv-ink);
            font-family: 'Rubik', sans-serif; font-size: 14px;
            outline: none; direction: rtl;
            -webkit-appearance: none; appearance: none;
            transition: border-color 140ms, box-shadow 140ms;
        }
        .cv-search-input:focus {
            border-color: var(--primary);
            box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 15%, transparent);
        }
        .cv-search-input::placeholder { color: var(--cv-muted); }
        body.dark-mode .cv-search-input { background: var(--cv-card); }
        .cv-picker-grid {
            display: grid;
            grid-template-columns: 1fr 1fr 1fr;
            gap: 8px;
        }

        /* ── Country combobox (search-enabled dropdown) ────────────────────── */
        .country-combobox { position: relative; cursor: text; }
        .country-combobox .cc-search {
            width: 100%;
            margin: 0;
            padding: 0;
            border: 0;
            background: transparent;
            color: inherit;
            font: inherit;
            text-align: inherit;
            outline: none;
            box-sizing: border-box;
            min-width: 0;
        }
        .country-combobox .cc-search::placeholder { color: var(--text-muted); opacity: 0.7; }

        .cc-list {
            position: fixed;
            z-index: 9999;
            background: var(--card-bg);
            border: 1px solid var(--border-color);
            border-radius: 12px;
            box-shadow: 0 8px 24px rgba(0,0,0,0.18);
            overflow-y: auto;
            -webkit-overflow-scrolling: touch;
            padding: 4px 0;
        }
        .cc-row {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 9px 14px;
            cursor: pointer;
            color: var(--text-color);
            font-family: inherit;
            font-size: 0.9rem;
            line-height: 1.4;
            direction: rtl;
            -webkit-tap-highlight-color: transparent;
        }
        .cc-row:hover, .cc-row.cc-active { background: var(--bg-color); }
        .cc-row .cc-flag {
            flex: 0 0 1.6em;
            text-align: center;
            font-size: 1.05rem;
            line-height: 1;
        }
        .cc-row .cc-name {
            flex: 1;
            min-width: 0;
            text-align: start;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        .cc-sep {
            height: 0;
            border-block-start: 1px solid var(--border-light);
            margin: 4px 12px;
        }
        .cc-empty {
            padding: 14px 16px;
            text-align: center;
            color: var(--text-muted);
            font-size: 0.9rem;
        }
