    :root {
      --bg: #F7F7F5;
      --surface: #FFFFFF;
      --border: #E8E8E4;
      --text-primary: #111111;
      --text-secondary: #787878;
      --accent: #111111;
      --sidebar-w: 300px;
      --panel-w: 420px;
      --header-h: 60px;
      --mob-header-h: 52px;
      --safe-top: env(safe-area-inset-top, 0px);
      color-scheme: only light;
    }

    /* ── Force light mode — Chrome / Safari dark-mode override ───────
       Strategy: tell the browser this page is light-only via color-scheme.
       The <html style="color-scheme:only light"> attribute + inline <style>
       + meta tag together cover all browser entry points.

       In the dark media query we only re-declare CSS variables (no !important
       — custom props don't support it) and force backgrounds on light elements.
       We do NOT force `color` globally: dark-background screens (landing,
       IFL selector) have white text that would become invisible.             */
    @media (prefers-color-scheme: dark) {
      :root {
        /* Re-declare with same light values — custom props ignore !important */
        --bg: #F7F7F5;
        --surface: #FFFFFF;
        --border: #E8E8E4;
        --text-primary: #111111;
        --text-secondary: #787878;
        --accent: #111111;
        color-scheme: only light;
      }
      html {
        color-scheme: only light !important;
        filter: none !important;
        -webkit-filter: none !important;
        /* No color:#111 here — would make dark-bg landing screen text invisible */
      }

      /* Light-background structural elements: force both bg AND fg */
      body {
        background-color: #F7F7F5 !important;
        /* color intentionally omitted — dark screens need white text */
      }
      header {
        background-color: #FFFFFF !important;
        color: #111111 !important;
        border-color: #E8E8E4 !important;
      }
      .sidebar {
        background-color: #FFFFFF !important;
        color: #111111 !important;
      }
      .list-wrap, .list-inner, #list-inner {
        background-color: #F7F7F5 !important;
        color: #111111 !important;
      }
      .loc-card {
        background-color: #FFFFFF !important;
        color: #111111 !important;
        border-color: #E8E8E4 !important;
      }
      .loc-name { color: #111111 !important; }
      .loc-meta, .loc-hood { color: #787878 !important; }
      .panel, .detail-panel {
        background-color: #FFFFFF !important;
        color: #111111 !important;
      }
      .panel-header {
        background-color: #FFFFFF !important;
        color: #111111 !important;
        border-color: #E8E8E4 !important;
      }
      .tabs { background-color: #FFFFFF !important; border-color: #E8E8E4 !important; }
      .tab { color: #787878 !important; }
      .tab.active { color: #111111 !important; }
      .detail-section { background-color: #FFFFFF !important; color: #111111 !important; }
      h2.loc-name-h2, h3, .detail-label { color: #111111 !important; }
      .route-panel {
        background-color: #FFFFFF !important;
        color: #111111 !important;
      }
      #search {
        background-color: #F7F7F5 !important;
        color: #111111 !important;
        border-color: #E8E8E4 !important;
      }
      input, textarea, select {
        background-color: #FFFFFF !important;
        color: #111111 !important;
        color-scheme: only light;
      }
      button { color-scheme: only light; }

      /* Dark-background screens — explicitly preserve dark bg + white text */
      #landing-splash,
      #landing-screen {
        filter: none !important;
        /* backgrounds already hardcoded dark — let them stay as designed */
      }
      #landing-screen .landing-btn-title { color: #ffffff !important; }
      #landing-screen .landing-btn-sub   { color: rgba(255,255,255,0.38) !important; }
      #landing-screen .landing-hdr-city  { color: rgba(255,255,255,0.35) !important; }

      /* Logo inversion for dark mode — first-screen logos only (splash + landing header) */
      .splash-logo-img,
      .landing-hdr-logo img {
        filter: invert(1) !important;
      }
    }

    * { margin: 0; padding: 0; box-sizing: border-box; }
    html { color-scheme: only light; }

    /* ── Keyboard focus ring (accessibility) ─────────────────
       outline:none throughout the codebase hides focus for
       mouse/touch users (intentional), but WCAG requires a
       visible indicator for keyboard navigation.
       :focus-visible fires only on keyboard focus, so this
       restores the ring without affecting pointer interactions. */
    :focus-visible {
      outline: 2px solid #4f46e5 !important;
      outline-offset: 2px;
      border-radius: 4px;
    }
    body {
      font-family: 'Inter', -apple-system, sans-serif;
      background: var(--bg); color: var(--text-primary);
      height: 100vh; display: flex; flex-direction: column; overflow: hidden;
    }

    /* ── HEADER ─────────────────────────────────────────── */
    header {
      height: var(--header-h);
      background: var(--surface);
      border-bottom: 1px solid var(--border);
      display: flex; align-items: center;
      padding: 0 18px; gap: 12px; z-index: 1000; flex-shrink: 0;
    }
    /* Desktop: rows act as simple flex containers in the header flow */
    .header-row1, .header-row2 {
      display: contents;
    }
    /* Desktop: hide row2 (Near Me / Fav / Route / City / Lang moved to sidebar) */
    @media (min-width: 901px) {
      .header-row2 { display: none !important; }
    }
    .logo {
      font-size: 14px; font-weight: 600; letter-spacing: -0.3px;
      white-space: nowrap; display: flex; align-items: center; gap: 8px;
    }
    .logo-img {
      height: 45px; width: auto; display: block; flex-shrink: 0;
    }
    .search-wrap { flex: 1; max-width: 360px; position: relative; }
    .search-icon { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); pointer-events: none; }
    #search {
      width: 100%; height: 34px;
      border: 1px solid var(--border); border-radius: 8px;
      padding: 0 12px 0 34px; font-size: 13px; font-family: inherit;
      background: var(--bg); outline: none; transition: border-color 0.2s;
    }
    #search:focus { border-color: #999; }
    .map-toggle {
      display: flex; border: 1px solid var(--border); border-radius: 8px;
      overflow: hidden; flex-shrink: 0;
    }
    .map-toggle button {
      padding: 6px 12px; font-size: 12px; font-family: inherit;
      border: none; background: transparent; cursor: pointer;
      color: var(--text-secondary); transition: all 0.15s; white-space: nowrap;
    }
    .map-toggle button.active { background: #111; color: #fff; }
    /* ── PWA Install Prompt ─────────────────────────────── */
    .pwa-prompt {
      display: none;
      position: fixed; top: 75vh; left: 50%; transform: translateX(-50%);
      z-index: 9000;
      background: rgba(0,0,0,0.65);
      backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
      border: none;
      border-radius: 20px;
      padding: 5px 12px;
      align-items: center; gap: 6px;
      font-family: Inter, -apple-system, sans-serif;
      width: auto;
    }
    .pwa-prompt.visible { display: flex; }
    .pwa-icon { width: 14px; height: 14px; border-radius: 3px; flex-shrink: 0; }
    .pwa-desc { font-size: 11px; color: rgba(255,255,255,0.9); line-height: 1; white-space: nowrap; }
    .pwa-install-btn {
      padding: 3px 10px; border: none; border-radius: 12px;
      background: white; color: #111; font-size: 10px; font-weight: 600;
      cursor: pointer; white-space: nowrap; font-family: inherit;
    }
    .pwa-install-btn:hover { background: #eee; }
    .pwa-today-btn {
      padding: 3px 8px; border: 1px solid rgba(255,255,255,0.3); border-radius: 12px;
      background: none; color: rgba(255,255,255,0.7); font-size: 10px; font-weight: 500;
      cursor: pointer; white-space: nowrap; font-family: inherit;
    }
    .pwa-today-btn:hover { background: rgba(255,255,255,0.15); color: white; }
    .pwa-close-btn {
      background: none; border: none; font-size: 13px;
      color: rgba(255,255,255,0.5); cursor: pointer; padding: 0 2px; line-height: 1;
    }
    .pwa-close-btn:hover { color: white; }

    /* ── Mobile Action Bar (hidden on desktop) ──────────── */
    #mobile-action-bar { display: none; }

    /* ── Near Me button (header) ───────────────────────── */
    #near-me-btn {
      height: 34px; padding: 0 13px;
      border: none; border-radius: 8px;
      font-size: 12px; font-family: inherit;
      background: linear-gradient(135deg, #6366F1, #4F46E5);
      cursor: pointer; display: flex; align-items: center; gap: 6px;
      white-space: nowrap; flex-shrink: 0; transition: all 0.2s;
      color: white; font-weight: 600; box-shadow: 0 1px 3px rgba(79,70,229,0.3);
    }
    #near-me-btn:hover { background: linear-gradient(135deg, #7577F5, #5B54F0); box-shadow: 0 2px 6px rgba(79,70,229,0.4); }
    #near-me-btn.active { background: linear-gradient(135deg, #4338CA, #3730A3); box-shadow: 0 2px 8px rgba(67,56,202,0.5); }
    /* ── Favorites button (header) ───────────────────── */
    #fav-btn {
      height: 34px; padding: 0 13px;
      border: none; border-radius: 8px;
      font-size: 12px; font-family: inherit;
      background: linear-gradient(135deg, #FF7A1A, #FF5F00);
      cursor: pointer; display: flex; align-items: center; gap: 5px;
      white-space: nowrap; flex-shrink: 0; transition: all 0.2s;
      color: white; font-weight: 600; box-shadow: 0 1px 3px rgba(255,95,0,0.3);
    }
    #fav-btn:hover { background: linear-gradient(135deg, #FF8C3A, #FF6B15); box-shadow: 0 2px 6px rgba(255,95,0,0.4); }
    #fav-btn.active { background: linear-gradient(135deg, #E05400, #CC4C00); box-shadow: 0 2px 8px rgba(204,76,0,0.5); }
    /* ── Route Planner button (header) ─────────────────── */
    #route-btn {
      height: 34px; padding: 0 13px;
      border: none; border-radius: 8px;
      font-size: 12px; font-family: inherit;
      background: linear-gradient(135deg, #E052A0, #D946A8);
      cursor: pointer; display: flex; align-items: center; gap: 5px;
      white-space: nowrap; flex-shrink: 0; transition: all 0.2s;
      color: white; font-weight: 600; box-shadow: 0 1px 3px rgba(217,70,168,0.3);
    }
    #route-btn:hover { background: linear-gradient(135deg, #E86AB5, #DF58B2); box-shadow: 0 2px 6px rgba(217,70,168,0.4); }
    #route-btn.active { background: linear-gradient(135deg, #C73D95, #B53588); box-shadow: 0 2px 8px rgba(181,53,136,0.5); }
    /* ── Route button pulse hint after theme apply ── */
    @keyframes pulse-hint {
      0%   { transform: scale(1);    box-shadow: 0 1px 3px rgba(217,70,168,0.3); }
      25%  { transform: scale(1.12); box-shadow: 0 0 12px rgba(217,70,168,0.6); }
      50%  { transform: scale(1);    box-shadow: 0 1px 3px rgba(217,70,168,0.3); }
      75%  { transform: scale(1.12); box-shadow: 0 0 12px rgba(217,70,168,0.6); }
      100% { transform: scale(1);    box-shadow: 0 1px 3px rgba(217,70,168,0.3); }
    }
    .pulse-hint { animation: pulse-hint 2.5s ease 2; }
    /* ── Fav/Visited action buttons inside panel header ── */
    .p-action-row { display: flex; gap: 7px; margin-top: 7px; }
    .p-action-btn {
      height: 30px; padding: 0 11px; border-radius: 6px;
      font-size: 11.5px; font-family: inherit; font-weight: 600;
      cursor: pointer; display: flex; align-items: center; gap: 5px;
      transition: all 0.15s; border: none; background: #f0f0f0; color: #888;
    }
    .p-action-btn:hover { background: #e5e5e5; }
    .p-action-btn .act-icon { font-size: 15px; line-height: 1; }
    .p-action-btn.fav-active { background: #FF5F00; color: #fff; }
    .p-action-btn.fav-active:hover { background: #CC4C00; }
    .p-action-btn.vis-active { background: #10b981; color: #fff; }
    .p-action-btn.vis-active:hover { background: #059669; }
    /* ── Share sheet ── */
    .share-sheet-overlay { position: fixed; inset: 0; z-index: 3100; display: none; }
    .share-sheet-overlay.open { display: block; }
    .share-sheet {
      position: absolute; background: #fff; border-radius: 14px;
      box-shadow: 0 8px 40px rgba(0,0,0,0.18); padding: 14px 16px;
      width: 272px; z-index: 3101;
    }
    .share-sheet-title { font-size: 11px; font-weight: 700; color: #aaa; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 10px; }
    .share-copy-row { display: flex; gap: 6px; }
    .share-url-input {
      flex: 1; font-size: 11px; border: 1px solid #e0e0e0; border-radius: 7px;
      padding: 6px 8px; color: #555; background: #f8f8f8; outline: none;
      white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: text;
    }
    .share-copy-btn {
      height: 30px; padding: 0 12px; background: #111; color: #fff; border: none;
      border-radius: 7px; font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap;
      font-family: inherit; transition: background .15s;
    }
    .share-copy-btn:hover { background: #333; }
    .share-copy-btn.copied { background: #16a34a; }
    @keyframes pulse-border { 0%,100%{opacity:1} 50%{opacity:0.5} }
    /* ── Fav Export/Import bar (below header, desktop only) ── */
    #fav-io-bar {
      display: none; min-height: 40px; background: #FFF7ED;
      border-bottom: 1px solid #FED7AA; padding: 0 18px;
      align-items: center; gap: 10px; font-size: 12px; color: #9a3412;
      flex-shrink: 0; z-index: 999;
    }
    #fav-io-bar.visible { display: flex; }
    .fav-io-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: #c2410c; margin-right: 2px; }
    .fav-io-btn {
      height: 28px; padding: 0 12px; border-radius: 6px; border: 1px solid #FDBA74;
      background: white; font-size: 11px; font-family: inherit; cursor: pointer;
      display: flex; align-items: center; gap: 5px; color: #9a3412;
      transition: all 0.15s; white-space: nowrap; flex-shrink: 0; font-weight: 500;
    }
    .fav-io-btn:hover { border-color: #f97316; color: #c2410c; background: #fff2e6; }
    .fav-io-sep { width: 1px; height: 20px; background: #FED7AA; flex-shrink: 0; }
    .fav-io-close {
      margin-left: auto; width: 22px; height: 22px; border-radius: 50%;
      background: transparent; border: none; color: #9a3412; cursor: pointer;
      font-size: 13px; display: flex; align-items: center; justify-content: center;
      transition: background 0.15s;
    }
    .fav-io-close:hover { background: rgba(0,0,0,0.08); }
    /* Import modal overlay */
    .fav-import-overlay {
      display: none; position: fixed; inset: 0; z-index: 9999;
      background: rgba(0,0,0,0.45); align-items: center; justify-content: center;
    }
    .fav-import-overlay.visible { display: flex; }
    .fav-import-box {
      background: white; border-radius: 14px; padding: 28px 32px 24px;
      width: 340px; max-width: 90vw; box-shadow: 0 12px 40px rgba(0,0,0,0.2);
      text-align: center;
    }
    .fav-import-title { font-size: 15px; font-weight: 700; margin-bottom: 6px; color: #111; }
    .fav-import-desc { font-size: 12px; color: #666; margin-bottom: 20px; line-height: 1.5; }
    .fav-import-btns { display: flex; gap: 10px; justify-content: center; }
    .fav-import-opt {
      flex: 1; padding: 10px 0; border-radius: 8px; border: 1px solid var(--border);
      background: white; font-size: 12px; font-family: inherit; font-weight: 600;
      cursor: pointer; transition: all 0.15s; color: #333;
    }
    .fav-import-opt:hover { border-color: #FF5F00; background: #FFF7ED; color: #c2410c; }
    .fav-import-cancel {
      margin-top: 14px; font-size: 11px; color: #999; background: none; border: none;
      cursor: pointer; font-family: inherit;
    }
    .fav-import-cancel:hover { color: #666; }

    /* ── Walk bar (below header) ───────────────────────── */
    /* Uses height transition (not display:none) to eliminate iOS ghost-strip */
    #walk-bar {
      display: flex; height: 0; min-height: 0; overflow: hidden;
      transition: height 0.22s cubic-bezier(.4,0,.2,1);
      background: #EEF2FF; border-bottom: 1px solid #C7D2FE; padding: 0 18px;
      align-items: center; gap: 10px; font-size: 12px; color: #4338CA;
      flex-shrink: 0; z-index: 999; flex-wrap: nowrap;
    }
    #walk-bar.visible { height: 44px; overflow: visible; }

    /* ── Floating walk-radius card (center screen after location set) ── */
    #walk-radius-float {
      display: none;
      position: fixed;
      top: 58%; left: 50%;
      transform: translate(-50%, -50%);
      cursor: grab;
      z-index: 1200;
      background: rgba(255,255,255,0.96);
      backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
      border: 1px solid rgba(0,0,0,0.12);
      border-radius: 28px;
      padding: 14px 18px 14px 20px;
      box-shadow: 0 8px 32px rgba(0,0,0,0.18), 0 2px 8px rgba(0,0,0,0.1);
      flex-direction: row; align-items: center; gap: 10px;
      min-width: 260px; max-width: calc(100vw - 40px);
    }
    #walk-radius-float.visible { display: flex; }
    .wrf-icon { font-size: 20px; line-height: 1; flex-shrink: 0; }
    #walk-label { font-weight: 700; font-size: 15px; color: #4338CA;
      min-width: 52px; text-align: center; flex-shrink: 0; }
    #walk-slider { flex: 1; min-width: 80px; accent-color: #4F46E5; cursor: pointer; }
    .wrf-desc { font-size: 11px; color: #6366F1; flex-shrink: 0; white-space: nowrap; }
    .wrf-close {
      margin-left: 4px; width: 24px; height: 24px; border-radius: 50%;
      border: none; background: rgba(0,0,0,0.08); cursor: pointer;
      font-size: 13px; line-height: 1; display: flex; align-items: center;
      justify-content: center; flex-shrink: 0; color: #444;
      transition: background 0.12s;
    }
    .wrf-close:hover { background: rgba(0,0,0,0.18); }

    /* Location picker buttons inside walk-bar */
    .walk-loc-btn {
      height: 28px; padding: 0 10px; border-radius: 6px; border: 1px solid #A5B4FC;
      background: white; font-size: 11px; font-family: inherit; cursor: pointer;
      display: flex; align-items: center; gap: 5px; color: #4338CA;
      transition: all 0.15s; white-space: nowrap; flex-shrink: 0;
    }
    .walk-loc-btn:hover { border-color: #4F46E5; color: #4F46E5; }
    .walk-loc-btn.active  { background: #4F46E5; border-color: #4F46E5; color: white; }
    .walk-loc-btn.locating { border-color: #4F46E5; color: #4F46E5;
      animation: pulse-border 0.9s ease-in-out infinite; }
    .walk-bar-sep {
      width: 1px; height: 20px; background: #C7D2FE; flex-shrink: 0; margin: 0 2px;
    }
    #walk-close-btn {
      margin-left: auto; padding: 3px 10px; border: 1px solid #A5B4FC; border-radius: 6px;
      background: white; font-size: 11px; font-family: inherit; cursor: pointer;
      color: #6366F1; transition: all 0.15s; white-space: nowrap; flex-shrink: 0;
    }
    #walk-close-btn:hover { background: #6366F1; color: white; border-color: #6366F1; }

    /* ✦ landing button: shown on desktop (left of map-toggle) */
    #header-star-btn {
      height: 34px; width: 34px; padding: 0;
      border: 1px solid var(--border); border-radius: 8px;
      background: white; cursor: pointer;
      display: flex; align-items: center; justify-content: center;
      flex-shrink: 0; font-size: 15px; color: #111;
      transition: background 0.15s, border-color 0.15s;
    }
    #header-star-btn:hover { background: #f3f3f0; border-color: #ccc; }

    #menu-btn {
      display: none; width: 34px; height: 34px;
      border: 1px solid var(--border); border-radius: 8px;
      background: white; cursor: pointer; align-items: center;
      justify-content: center; flex-shrink: 0; font-size: 16px;
    }
    /* ── LAYOUT ─────────────────────────────────────────── */
    .app { display: flex; flex: 1; overflow: hidden; position: relative; }

    /* ── SIDEBAR ─────────────────────────────────────────── */
    .sidebar {
      width: var(--sidebar-w);
      background: linear-gradient(160deg, rgba(255,255,255,0.65) 0%, rgba(240,240,236,0.38) 100%);
      backdrop-filter: blur(8px);
      -webkit-backdrop-filter: blur(8px);
      border-right: 1px solid var(--border);
      display: flex; flex-direction: column; overflow: hidden;
      flex-shrink: 0; z-index: 200; position: relative;
    }
    /* Sidebar top: filter section header */
    .sb-top {
      display: flex; align-items: center; justify-content: space-between;
      padding: 7px 14px 6px;
      border-bottom: 1px solid var(--border);
      background: rgba(247,247,245,0.5);
    }
    .sb-top-label { font-size: 10px; font-weight: 600; letter-spacing: 0.5px; text-transform: uppercase; color: var(--text-secondary); display: flex; align-items: center; gap: 5px; }
    .sb-clear { font-size: 11px; color: #4F46E5; background: none; border: none; cursor: pointer; padding: 2px 6px; border-radius: 4px; display: none; }
    .sb-clear.show { display: block; }
    .sb-clear:hover { background: rgba(79,70,229,0.08); }

    /* Filter toggle button */
    .sb-filter-toggle {
      display: flex; align-items: center; gap: 6px;
      width: 100%; padding: 9px 14px;
      background: var(--surface); border: none; border-bottom: 1px solid var(--border);
      font-size: 11px; font-weight: 600; letter-spacing: 0.5px; text-transform: uppercase;
      color: var(--text-primary); cursor: pointer; font-family: inherit;
      transition: background 0.12s; flex-shrink: 0;
    }
    .sb-filter-toggle:hover { background: var(--bg); }
    .sb-filter-toggle .sb-filter-arr { margin-left: auto; font-size: 9px; color: #999; transition: transform 0.2s; }
    .sb-filter-toggle.open .sb-filter-arr { transform: rotate(180deg); }
    .sb-ft-dot { width: 6px; height: 6px; border-radius: 50%; background: #4F46E5; display: none; flex-shrink: 0; }
    .sb-ft-dot.show { display: block; }

    /* Filter sections */
    .fsec { border-bottom: 1px solid var(--border); }
    .fsec-hdr {
      width: 100%; padding: 9px 14px;
      display: flex; align-items: center; gap: 6px;
      font-size: 11px; font-weight: 600; letter-spacing: 0.5px; text-transform: uppercase;
      color: var(--text-secondary); background: transparent; border: none;
      cursor: pointer; text-align: left; transition: background 0.12s;
    }
    .fsec-hdr:hover { background: var(--bg); }
    .fsec-arr { margin-left: auto; font-size: 9px; transition: transform 0.2s; color: #999; }
    .fsec.open .fsec-arr { transform: rotate(180deg); }
    .fsec-dot {
      width: 6px; height: 6px; border-radius: 50%; background: #4F46E5;
      flex-shrink: 0; display: none;
    }
    .fsec-dot.show { display: block; }
    /* Per-filter reset badge — appears when a filter section is active */
    .fsec-reset {
      display: none; align-items: center; gap: 3px;
      font-size: 10px; font-weight: 500; letter-spacing: 0;
      text-transform: none; color: #4F46E5;
      background: #EEF2FF; border: 1px solid #C7D2FE;
      border-radius: 4px; padding: 1px 6px; cursor: pointer;
      line-height: 1.5; flex-shrink: 0; transition: background 0.12s;
      white-space: nowrap;
    }
    .fsec-reset.show { display: flex; }
    .fsec-reset:hover { background: #E0E7FF; border-color: #A5B4FC; color: #3730A3; }
    .fsec-body {
      padding: 2px 14px 10px;
      display: flex; flex-wrap: wrap; gap: 5px;
      max-height: 80px; overflow-y: auto;
    }
    /* hide body when section closed — !important overrides display:flex/block on arch-list */
    .fsec:not(.open) .fsec-body { display: none !important; }
    /* Architects / Neighborhoods list — scrollable column */
    .fsec-body.arch-list,
    .fsec-body.hood-list {
      display: flex; flex-direction: column; flex-wrap: nowrap;
      max-height: 180px; overflow-y: auto; gap: 0; padding: 2px 14px 8px;
    }
    .arch-item,
    .hood-item {
      flex-shrink: 0; /* prevent items compressing inside flex column */
      width: 100%; text-align: left;
      padding: 5px 8px; font-size: 12px;
      border: none; background: none; cursor: pointer;
      color: #333; border-radius: 5px;
      font-family: inherit; transition: background 0.12s;
      white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
      line-height: 1.5;
    }
    .arch-item:hover, .hood-item:hover { background: var(--bg); color: #111; }
    .arch-item.active, .hood-item.active {
      background: #111; color: white;
      border-color: rgba(255,255,255,0.3);
    }

    /* Filter chips */
    .chip {
      padding: 4px 10px; border-radius: 20px;
      border: 1px solid var(--border); font-size: 11px;
      font-family: inherit; cursor: pointer;
      background: white; color: #111; transition: all 0.15s;
      text-transform: capitalize;
    }
    .chip.active {
      background: #111; border-color: rgba(255,255,255,0.3); color: white;
      box-shadow: inset 0 0 0 1px rgba(255,255,255,0.25);
    }

    /* Sort + results bar */
    .list-bar {
      padding: 8px 14px;
      display: flex; align-items: center; justify-content: space-between;
      border-bottom: 1px solid var(--border); flex-shrink: 0;
    }
    #list-meta { font-size: 11px; color: var(--text-secondary); font-weight: 500; }
    #sort-sel {
      font-size: 11px; font-family: inherit;
      border: 1px solid var(--border); border-radius: 6px;
      padding: 3px 8px; background: white; color: var(--text-primary);
      cursor: pointer; outline: none;
    }

    /* Location list */
    .loc-list { flex: 1; overflow-y: auto; }
    .loc-card {
      padding: 12px 14px; border-bottom: 1px solid var(--border);
      cursor: pointer; display: flex; gap: 11px; align-items: flex-start;
      transition: background 0.12s;
    }
    .loc-card:hover { background: var(--bg); }
    .loc-card.active { background: #F0F0EE; }
    .card-img {
      width: 52px; height: 52px; border-radius: 7px;
      object-fit: cover; flex-shrink: 0; background: var(--border);
    }
    .card-thumb-icon {
      width: 52px; height: 52px; border-radius: 7px; flex-shrink: 0;
      background-size: 62%; background-repeat: no-repeat; background-position: center;
      background-blend-mode: multiply;
    }
    .card-body { flex: 1; min-width: 0; }
    .card-fav-btns {
      display: flex; flex-direction: column; gap: 4px;
      flex-shrink: 0; align-self: center;
    }
    .card-fav-btn, .card-vis-btn {
      width: 26px; height: 26px; border-radius: 50%;
      border: 1px solid var(--border); background: transparent;
      cursor: pointer; font-size: 13px; line-height: 1;
      display: flex; align-items: center; justify-content: center;
      color: #bbb; transition: all 0.15s; padding: 0;
    }
    .card-fav-btn:hover { color: #FF5F00; border-color: #FF5F00; }
    .card-vis-btn:hover { color: #10b981; border-color: #10b981; }
    .card-fav-btn.active { color: #FF5F00; border-color: #FF5F00; background: #FFF7ED; }
    .card-vis-btn.active { color: #10b981; border-color: #10b981; background: #ECFDF5; }
    .card-name {
      font-size: 13px; font-weight: 500;
      white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 2px;
    }
    .card-meta { font-size: 11px; color: var(--text-secondary); margin-bottom: 5px; }
    .card-row { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
    .cat-badge { display: inline-block; font-size: 10px; font-weight: 500; padding: 2px 7px; border-radius: 10px; text-transform: capitalize; }
    .year-badge { font-size: 10px; color: var(--text-secondary); }
    /* Access badges */
    .access-badge {
      display: inline-flex; align-items: center; gap: 3px;
      font-size: 10px; font-weight: 500; padding: 2px 7px; border-radius: 10px;
    }
    .access-open  { background: #DCFCE7; color: #15803D; }
    .access-paid  { background: #FEF9C3; color: #A16207; }
    .access-priv  { background: #F3F4F6; color: #6B7280; }
    .no-results { padding: 36px 14px; text-align: center; color: var(--text-secondary); font-size: 13px; line-height: 1.6; }

    /* ── MAP ─────────────────────────────────────────────── */
    #map { flex: 1; z-index: 1; }
    .leaflet-control-zoom { border: 1px solid var(--border) !important; border-radius: 8px !important; overflow: hidden; box-shadow: none !important; }

    /* ── DETAIL PANEL ────────────────────────────────────── */
    .panel {
      width: var(--panel-w); background: rgba(255,255,255,0.50);
      backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
      border-left: 1px solid rgba(232,232,228,0.5);
      display: flex; flex-direction: column; overflow: hidden;
      flex-shrink: 0; position: absolute; right: 0; top: 0; bottom: 0;
      transform: translateX(100%);
      transition: transform 0.28s cubic-bezier(.4,0,.2,1);
      z-index: 500;
    }
    .panel.open { transform: translateX(0); }
    .panel-close {
      position: absolute; top: 12px; right: 12px;
      width: 28px; height: 28px; border-radius: 50%;
      border: 1px solid rgba(255,255,255,0.3);
      background: rgba(0,0,0,0.35); color: white;
      cursor: pointer; font-size: 16px; display: flex;
      align-items: center; justify-content: center; z-index: 10; line-height: 1;
    }
    .panel-close:hover { background: rgba(0,0,0,0.6); }

    /* Gallery */
    .gallery {
      position: relative; overflow: hidden;
      background: #000; flex-shrink: 0;
      height: 45vh;
      display: flex; align-items: center; justify-content: center;
    }
    .gallery img {
      display: block;
      position: absolute;
      top: 50%; left: 50%;
      transform: translate(-50%, -50%);
      max-width: 100%; max-height: 100%;
      width: auto; height: auto;
      opacity: 0; transition: opacity 0.3s;
    }
    .gallery img.active { opacity: 1; }
    .g-btn {
      position: absolute; top: 50%; transform: translateY(-50%);
      background: rgba(0,0,0,0.35); border: none; color: white;
      width: 30px; height: 30px; border-radius: 50%; cursor: pointer;
      font-size: 18px; display: flex; align-items: center; justify-content: center;
      transition: background 0.15s; z-index: 5;
    }
    .g-btn:hover { background: rgba(0,0,0,0.6); }
    .g-prev { left: 10px; }
    .g-next { right: 10px; }
    .g-dots { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); display: flex; gap: 5px; z-index: 5; }
    .g-dot { width: 5px; height: 5px; border-radius: 50%; background: rgba(255,255,255,0.45); cursor: pointer; transition: background 0.2s; }
    .g-dot.active { background: white; }
    .g-label { position: absolute; bottom: 10px; right: 12px; font-size: 10px; color: rgba(255,255,255,0.6); }

    /* Street View fallback in gallery */
    .gallery .sv-fallback,
    .gallery .sv-fallback-int {
      width: 100%; height: 100%; border: none;
      position: absolute; top: 0; left: 0; z-index: 1;
      overflow: hidden;
    }
    .gallery.sv-mode .g-btn { z-index: 6; background: rgba(0,0,0,0.5); }
    .gallery.sv-mode .g-label {
      background: rgba(0,0,0,0.5); padding: 2px 8px; border-radius: 8px;
      font-size: 9px; color: rgba(255,255,255,0.8); z-index: 6;
    }
    .g-dot.sv-dot { background: rgba(255,255,255,0.3); border: 1px solid rgba(255,255,255,0.5); width: 6px; height: 6px; }
    .g-dot.sv-dot.active { background: white; }
    .g-dot.sv-int-dot { background: rgba(255,200,100,0.35); border: 1px solid rgba(255,200,100,0.6); width: 6px; height: 6px; }
    .g-dot.sv-int-dot.active { background: #ffc864; }

    /* Panel scroll + header */
    .panel-scroll { flex: 1; overflow-y: auto; }
    .panel-head { padding: 16px 18px 12px; border-bottom: 1px solid var(--border); }
    .p-cat { font-size: 10px; font-weight: 600; letter-spacing: 0.8px; text-transform: uppercase; color: var(--text-secondary); margin-bottom: 4px; }
    .p-title { font-size: 19px; font-weight: 700; letter-spacing: -0.4px; line-height: 1.2; margin-bottom: 3px; }
    .p-sub { font-size: 12px; color: var(--text-secondary); margin-bottom: 9px; }
    .p-tags { display: flex; flex-wrap: wrap; gap: 4px; }
    .p-tag { font-size: 10px; padding: 2px 8px; border-radius: 10px; background: var(--bg); color: var(--text-secondary); border: 1px solid var(--border); }

    /* Tabs — equal-width, always fully visible */
    .tabs {
      display: flex; border-bottom: 1px solid var(--border);
      overflow: hidden; flex-shrink: 0; gap: 0;
    }
    .tab {
      flex: 1; min-width: 0;
      padding: 10px 3px;
      font-size: 11.5px; cursor: pointer; color: var(--text-secondary);
      border-bottom: 2px solid transparent; transition: all 0.15s;
      white-space: nowrap; text-align: center; overflow: hidden;
      text-overflow: ellipsis;
    }
    .tab.active { color: #111; border-bottom-color: #111; font-weight: 600; }
    .tab-pane { display: none; padding: 18px; }
    .tab-pane.active { display: block; }

    /* Common panel content */
    .desc { font-size: 13px; line-height: 1.75; color: #333; margin-bottom: 14px; }
    .info-row { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 12.5px; }
    .info-row:last-child { border-bottom: none; }
    .info-label { width: 88px; color: var(--text-secondary); flex-shrink: 0; font-size: 11.5px; padding-top: 1px; }
    .info-val { flex: 1; line-height: 1.55; white-space: pre-line; }
    .tour-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 500; padding: 3px 10px; border-radius: 10px; }
    .tour-yes { background: #F0FDF4; color: #15803D; }
    .tour-no  { background: #FFF1F2; color: #BE185D; }
    .btns { margin-top: 16px; display: flex; flex-direction: column; gap: 7px; }
    .btn-p {
      display: block; width: 100%; padding: 11px;
      background: #111; color: white; border: none; border-radius: 8px;
      font-size: 12.5px; font-family: inherit; cursor: pointer;
      text-align: center; text-decoration: none; transition: opacity 0.15s;
    }
    .btn-p:hover { opacity: 0.82; }
    .btn-walk-route {
      display: flex; align-items: center; justify-content: center; gap: 6px;
      width: 100%; padding: 11px; margin-top: 12px;
      background: #EEF2FF; color: #4338CA;
      border: 1px solid #C7D2FE; border-radius: 8px;
      font-size: 12.5px; font-weight: 600; font-family: inherit; cursor: pointer;
      transition: all 0.15s;
    }
    .btn-walk-route:hover { background: #E0E7FF; border-color: #A5B4FC; }
    .btn-s {
      display: block; width: 100%; padding: 11px;
      background: transparent; color: #111;
      border: 1px solid var(--border); border-radius: 8px;
      font-size: 12.5px; font-family: inherit; cursor: pointer;
      text-align: center; text-decoration: none; transition: background 0.15s;
    }
    .btn-s:hover { background: var(--bg); }

    /* ── AUDIO GUIDE TAB ────────────────────────── */
    .ag-wrap { display: flex; flex-direction: column; gap: 0; }

    /* ── Sticky player bar — stays at top when script scrolls ── */
    .ag-player {
      position: sticky; top: 0; z-index: 10;
      background: rgba(255,255,255,0.96);
      backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
      border-bottom: 1px solid var(--border);
      margin: -18px -18px 16px -18px; /* bleed past tab-pane padding */
      padding: 14px 18px 12px;
    }
    .ag-player-top-row {
      display: flex; align-items: flex-start; justify-content: space-between;
      gap: 8px; margin-bottom: 0;
    }
    .ag-player-title {
      font-size: 12px; font-weight: 700; color: #111;
      margin-bottom: 2px; display: flex; align-items: center; gap: 6px;
    }
    .ag-player-sub { font-size: 10.5px; color: var(--text-secondary); margin-bottom: 10px; }
    .ag-autoplay-label {
      display: flex; align-items: center; gap: 4px; cursor: pointer;
      font-size: 10px; color: var(--text-secondary); white-space: nowrap;
      padding-top: 1px; flex-shrink: 0;
    }
    .ag-autoplay-label input[type=checkbox] {
      width: 12px; height: 12px; cursor: pointer; accent-color: #111;
      flex-shrink: 0;
    }

    /* Timeline range input */
    .ag-timeline-wrap { margin-bottom: 4px; }
    .ag-timeline {
      -webkit-appearance: none; appearance: none;
      width: 100%; height: 4px; border-radius: 2px; outline: none;
      cursor: pointer; touch-action: none;
      background: linear-gradient(to right, #111 var(--pct,0%), var(--border-color,#e5e5e0) var(--pct,0%));
    }
    .ag-timeline::-webkit-slider-thumb {
      -webkit-appearance: none; appearance: none;
      width: 14px; height: 14px; border-radius: 50%;
      background: #111; cursor: pointer;
      box-shadow: 0 1px 4px rgba(0,0,0,0.25);
      transition: transform 0.1s;
    }
    .ag-timeline::-webkit-slider-thumb:hover { transform: scale(1.25); }
    .ag-timeline::-moz-range-thumb {
      width: 14px; height: 14px; border-radius: 50%;
      background: #111; cursor: pointer; border: none;
    }
    @media (pointer: coarse) {
      .ag-timeline { height: 6px; border-radius: 3px; }
      .ag-timeline::-webkit-slider-thumb { width: 22px; height: 22px; }
      .ag-timeline::-moz-range-thumb { width: 22px; height: 22px; }
    }
    .ag-time-row {
      display: flex; justify-content: space-between;
      font-size: 10px; color: var(--text-secondary); margin-bottom: 10px;
    }

    /* Controls row */
    .ag-ctrl-row {
      display: flex; align-items: center; justify-content: center; gap: 6px;
    }
    .ag-play-btn {
      width: 38px; height: 38px; border-radius: 50%;
      background: none; color: #555; border: 1.5px solid var(--border);
      display: flex; align-items: center; justify-content: center;
      cursor: pointer; flex-shrink: 0;
      transition: all 0.12s;
    }
    .ag-play-btn:hover { background: var(--bg); color: #111; border-color: #999; }
    .ag-play-btn:active { transform: scale(0.92); }
    .ag-play-btn.playing { color: #111; border-color: #111; }
    .ag-ctrl-btn {
      width: 34px; height: 34px; border-radius: 50%;
      background: none; color: #555; border: 1px solid var(--border);
      display: flex; align-items: center; justify-content: center;
      cursor: pointer; flex-shrink: 0;
      transition: all 0.12s;
    }
    .ag-ctrl-btn:hover { background: var(--bg); color: #111; border-color: #999; }
    .ag-ctrl-btn.active { color: #111; border-color: #111; background: var(--bg); }
    /* Speed dropdown */
    .ag-speed-wrap {
      position: relative; flex-shrink: 0; margin-right: auto;
    }
    .ag-speed-btn {
      font-size: 10px; font-weight: 700; color: var(--text-secondary);
      background: none; border: 1px solid var(--border);
      border-radius: 20px; padding: 5px 10px; cursor: pointer;
      white-space: nowrap; display: flex; align-items: center; gap: 3px;
      transition: all 0.12s; user-select: none;
    }
    .ag-speed-btn:hover, .ag-speed-btn.open { color: #111; border-color: #999; background: var(--bg); }
    .ag-speed-caret { font-size: 8px; opacity: 0.5; }
    .ag-speed-menu {
      display: none; position: absolute; bottom: calc(100% + 6px); left: 0;
      background: white; border: 1px solid var(--border); border-radius: 10px;
      box-shadow: 0 4px 16px rgba(0,0,0,0.1); overflow: hidden; min-width: 90px;
      z-index: 20;
    }
    .ag-speed-wrap.open .ag-speed-menu { display: block; }
    .ag-speed-opt {
      padding: 9px 14px; font-size: 12px; font-weight: 500; cursor: pointer;
      color: var(--text-secondary); transition: background 0.1s;
      display: flex; align-items: center; justify-content: space-between;
    }
    .ag-speed-opt:hover { background: var(--bg); color: #111; }
    .ag-speed-opt.selected { color: #111; font-weight: 700; }
    .ag-speed-opt .ag-speed-check { font-size: 10px; color: #111; }


    /* Script text */
    .ag-script-box {
      background: var(--bg); border: 1px solid var(--border);
      border-radius: 12px; padding: 16px;
      font-size: 13px; line-height: 1.85; color: #333;
    }
    .ag-script-box p { margin: 0 0 16px 0; }
    .ag-script-box p:last-child { margin-bottom: 0; }
    .ag-sentence.speaking {
      background: rgba(255, 216, 60, 0.38);
      border-radius: 3px; padding: 0 2px; margin: 0 -2px;
    }

    /* States */
    .ag-loading {
      display: flex; align-items: center; justify-content: center;
      padding: 36px 0; gap: 10px;
      color: var(--text-secondary); font-size: 12px;
    }
    .ag-spinner {
      width: 20px; height: 20px; border-radius: 50%;
      border: 2.5px solid var(--border); border-top-color: #555;
      animation: ag-spin 0.7s linear infinite; flex-shrink: 0;
    }
    @keyframes ag-spin { to { transform: rotate(360deg); } }
    .ag-unavail {
      text-align: center; padding: 28px 12px;
      border: 1px dashed var(--border); border-radius: 12px;
      color: var(--text-secondary); font-size: 12px; line-height: 1.6;
    }
    .ag-unavail .ag-unavail-icon { font-size: 28px; margin-bottom: 10px; }
    .ag-travel-note {
      font-size: 11px; color: var(--text-secondary);
      text-align: center; margin-top: 14px;
      display: flex; align-items: center; justify-content: center; gap: 5px;
    }
    /* External resources */
    .ext-resources { margin-top: 4px; }
    .ext-title { font-size: 11px; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.4px; margin-bottom: 8px; }
    .ext-links { display: flex; flex-wrap: wrap; gap: 6px; }
    .ext-link {
      font-size: 11.5px; padding: 5px 12px;
      border: 1px solid var(--border); border-radius: 20px;
      text-decoration: none; color: #333; background: white;
      transition: all 0.15s;
    }
    .ext-link:hover { border-color: #999; background: var(--bg); }

    /* ── CITY OVERVIEW CARDS (world zoom) ──────── */
    .cwp-wrap {
      background: transparent !important;
      border: none !important;
      overflow: visible !important;
    }
    /* Zero-size anchor: its (0,0) point sits exactly on the city lat/lng */
    .cwp-anchor {
      position: relative;
      width: 0; height: 0;
    }
    /* Card floats above the anchor, horizontally centered */
    .cwp-card {
      position: absolute;
      bottom: 9px;           /* sits above the dot (dot radius=5px + 4px gap) */
      left: 50%;
      transform: translateX(-50%);
      background: rgba(255,255,255,0.18);
      backdrop-filter: blur(4px);
      border-radius: 5px;
      padding: 3px 7px 5px;
      box-shadow: 0 1px 5px rgba(0,0,0,0.18);
      cursor: pointer;
      transition: box-shadow 0.15s, transform 0.15s;
      white-space: nowrap;
    }
    .cwp-card:hover {
      box-shadow: 0 4px 14px rgba(0,0,0,0.32);
      transform: translateX(-50%) translateY(-2px);
    }
    /* Dot is centered exactly on anchor (0,0) = city coordinate */
    .cwp-dot {
      position: absolute;
      top: -5px; left: -5px;
      width: 10px; height: 10px;
      background: #111;
      border-radius: 50%;
      border: 2px solid #fff;
      box-shadow: 0 1px 4px rgba(0,0,0,0.3);
    }
    /* Blinking red ping ring around city dot */
    .cwp-dot::before {
      content: '';
      position: absolute;
      top: 50%; left: 50%;
      transform: translateX(-50%) translateY(-50%) scale(1);
      width: 10px; height: 10px;
      border-radius: 50%;
      background: #e53935;
      opacity: 0.8;
      animation: cwp-ping 1.6s ease-out infinite;
    }
    @keyframes cwp-ping {
      0%   { transform: translateX(-50%) translateY(-50%) scale(1);   opacity: 0.8; }
      70%  { transform: translateX(-50%) translateY(-50%) scale(2.6); opacity: 0;   }
      100% { transform: translateX(-50%) translateY(-50%) scale(2.6); opacity: 0;   }
    }
    .cwp-name {
      font-size: 10px;
      font-weight: 700;
      color: #111;
      white-space: nowrap;
      margin-bottom: 2px;
      text-align: center;
    }
    .cwp-stats {
      display: flex;
      flex-direction: column;
      gap: 2px;
    }
    .cwp-stats-sub {
      display: flex;
      gap: 4px;
      flex-wrap: wrap;
    }
    .cwp-stat {
      font-size: 10px;
      color: #444;
      background: rgba(0,0,0,0.06);
      border-radius: 3px;
      padding: 1px 4px;
      white-space: nowrap;
    }
    .cwp-fav  { color: #c0392b; background: rgba(192,57,43,0.08); }
    .cwp-vis  { color: #27ae60; background: rgba(39,174,96,0.08); }
    .cwp-coming { color: #888; font-style: italic; }

    /* ── WORLD-MODE STATS LEGEND ────────────── */
    .wm-no-stats {
      font-size: 11px;
      color: #888;
      font-style: italic;
      padding: 4px 0 2px;
      text-align: center;
    }
    .wm-stat-row {
      display: flex;
      align-items: center;
      gap: 6px;
      padding: 4px 2px;
      font-size: 12px;
    }
    .wm-stat-icon {
      width: 18px;
      height: 18px;
      border-radius: 3px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      font-size: 11px;
      font-weight: 700;
      flex-shrink: 0;
    }
    .wm-fav { background: rgba(192,57,43,0.12); color: #c0392b; }
    .wm-vis { background: rgba(39,174,96,0.12);  color: #27ae60; }
    .wm-stat-label { flex: 1; color: #333; }
    .wm-stat-val   { font-weight: 700; color: #111; font-size: 13px; }

    /* ── MAP LEGEND ──────────────────────────── */
    .map-legend {
      background: rgba(255,255,255,0.5);
      backdrop-filter: blur(8px);
      -webkit-backdrop-filter: blur(8px);
      border-radius: 8px;
      padding: 10px 12px;
      box-shadow: 0 1px 5px rgba(0,0,0,0.15);
      font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
      max-height: calc(100vh - 80px);
      overflow-y: auto;
    }
    .legend-toggle {
      display: none;          /* hidden on desktop — always expanded */
    }
    .legend-body {
      /* desktop: always visible */
    }
    .legend-item {
      display: flex;
      align-items: center;
      gap: 6px;
      padding: 2px 0;
    }
    .legend-dot {
      width: 10px;
      height: 10px;
      border-radius: 50%;
      flex-shrink: 0;
    }
    .legend-label {
      font-size: 11px;
      color: #444;
      text-transform: capitalize;
      white-space: nowrap;
    }

    /* ── CATEGORY COLORS ─────────────────────── */
    .c-sky  { background: #DDE6FF; color: #3366FF; }  /* Skyscrapers     — vivid blue   */
    .c-his  { background: #FFF0DB; color: #FF8C00; }  /* Historic         — orange       */
    .c-inf  { background: #EDF1F4; color: #708899; }  /* Infrastructure   — slate gray   */
    .c-cul  { background: #F3E5FC; color: #AA44DD; }  /* Cultural         — purple       */
    .c-park { background: #DCFCE8; color: #22BB55; }  /* Parks            — green        */
    .c-rel  { background: #FDF8D8; color: #CCAA00; }  /* Religious        — gold         */
    .c-aca  { background: #D8F7FA; color: #11AABB; }  /* Academic / Inst. — cyan         */
    .c-res  { background: #F0F6DC; color: #88AA22; }  /* Residential      — lime-olive   */
    .c-lmk  { background: #FFE3E5; color: #EE3344; }  /* Landmarks        — red          */
    .c-pub  { background: #F5ECE5; color: #BB7755; }  /* Public           — warm brown   */
    .c-ret  { background: #FFE0F0; color: #EE2299; }  /* Retail           — hot pink     */
    .c-com  { background: #F2EADD; color: #886633; }  /* Commercial       — brown        */

    /* ── REVIEWS ─────────────────────────────────────────── */
    .star-selector { display: flex; gap: 2px; }
    .star-btn {
      font-size: 22px; cursor: pointer; color: #DDD;
      background: none; border: none; padding: 1px 2px;
      line-height: 1; font-family: inherit; transition: color 0.1s;
    }
    .star-btn.lit { color: #F59E0B; }
    .review-avg {
      display: flex; align-items: center; gap: 12px; margin-bottom: 14px;
      padding: 12px 14px; background: var(--bg); border-radius: 10px;
    }
    .review-avg-score { font-size: 32px; font-weight: 700; letter-spacing: -1.5px; }
    .review-avg-stars { font-size: 14px; color: #F59E0B; margin-bottom: 2px; }
    .review-avg-count { font-size: 11px; color: var(--text-secondary); }
    .review-form {
      background: var(--bg); border-radius: 10px; padding: 14px; margin-bottom: 16px;
    }
    .review-form-title { font-size: 12px; font-weight: 600; margin-bottom: 10px; }
    .review-form-label { font-size: 11px; color: var(--text-secondary); margin-bottom: 5px; }
    .review-input {
      width: 100%; padding: 7px 10px;
      border: 1px solid var(--border); border-radius: 7px;
      font-size: 12px; font-family: inherit; background: white; outline: none;
      transition: border-color 0.2s;
    }
    .review-input:focus { border-color: #999; }
    .review-textarea {
      width: 100%; height: 68px; padding: 7px 10px;
      border: 1px solid var(--border); border-radius: 7px;
      font-size: 12px; font-family: inherit; resize: vertical;
      background: white; outline: none; transition: border-color 0.2s;
    }
    .review-textarea:focus { border-color: #999; }
    .review-submit {
      width: 100%; padding: 9px; margin-top: 8px;
      background: #111; color: white; border: none; border-radius: 8px;
      font-size: 12.5px; font-family: inherit; cursor: pointer; transition: opacity 0.15s;
    }
    .review-submit:hover { opacity: 0.82; }
    .review-card { padding: 12px 0; border-bottom: 1px solid var(--border); }
    .review-card:last-child { border-bottom: none; }
    .review-card-stars { color: #F59E0B; font-size: 13px; letter-spacing: 1px; }
    .review-card-meta { font-size: 11px; color: var(--text-secondary); margin: 3px 0 5px; }
    .review-card-text { font-size: 12.5px; line-height: 1.65; color: #333; }
    .review-empty { padding: 18px 0; text-align: center; color: var(--text-secondary); font-size: 12.5px; }
    .review-name-badge {
      display: inline-block; font-size: 11px; font-weight: 500;
      background: #111; color: white; padding: 1px 7px; border-radius: 8px; margin-left: 6px;
    }

    /* Report tab button — sits inline right after Reviews tab */
    .tab-report-btn {
      padding: 10px 6px; margin-left: 2px;
      font-size: 11px; cursor: pointer; color: var(--text-secondary);
      background: none; border: none; border-bottom: 2px solid transparent;
      font-family: inherit; white-space: nowrap; flex-shrink: 0;
      transition: color 0.15s; opacity: 0.65;
    }
    .tab-report-btn:hover { color: #EF4444; opacity: 1; }

    /* Report modal */
    .report-modal-overlay {
      position: fixed; inset: 0; background: rgba(0,0,0,0.45);
      z-index: 9000; display: none; align-items: center; justify-content: center;
    }
    .report-modal-overlay.open { display: flex; }
    .report-modal-box {
      background: white; border-radius: 14px; width: 360px; max-width: 92vw;
      box-shadow: 0 8px 40px rgba(0,0,0,0.18); overflow: hidden;
    }
    .report-modal-header {
      display: flex; align-items: center; justify-content: space-between;
      padding: 16px 18px 14px; border-bottom: 1px solid var(--border);
    }
    .report-modal-title { font-size: 14px; font-weight: 600; }
    .report-modal-close {
      background: none; border: none; font-size: 20px; color: var(--text-secondary);
      cursor: pointer; line-height: 1; padding: 0 2px;
    }
    .report-modal-close:hover { color: #111; }
    .report-modal-body { padding: 16px 18px 20px; }
    .report-loc-label {
      font-size: 11px; font-weight: 500; color: var(--text-secondary);
      text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px;
    }
    .report-loc-name {
      font-size: 13px; font-weight: 600; color: #111; margin-bottom: 14px;
      padding: 8px 10px; background: #F5F5F5; border-radius: 6px;
    }
    .report-field-label {
      font-size: 11px; font-weight: 500; color: var(--text-secondary);
      margin-bottom: 5px; margin-top: 10px;
    }
    .report-select {
      width: 100%; padding: 8px 10px; font-size: 12.5px; font-family: inherit;
      border: 1px solid #DDD; border-radius: 7px; background: white;
      color: #111; outline: none; cursor: pointer;
    }
    .report-select:focus { border-color: #999; }
    .report-textarea {
      width: 100%; padding: 8px 10px; font-size: 12.5px; font-family: inherit;
      border: 1px solid #DDD; border-radius: 7px; resize: vertical;
      min-height: 80px; outline: none; box-sizing: border-box; color: #111;
    }
    .report-textarea:focus { border-color: #999; }
    .report-submit {
      width: 100%; padding: 9px; margin-top: 12px;
      background: #EF4444; color: white; border: none; border-radius: 8px;
      font-size: 13px; font-weight: 600; font-family: inherit; cursor: pointer;
    }
    .report-submit:hover { background: #DC2626; }
    .report-success {
      text-align: center; padding: 20px 0 8px;
      font-size: 13px; color: #16A34A; font-weight: 500;
    }

    /* Scrollbar */
    ::-webkit-scrollbar { width: 3px; height: 3px; }
    ::-webkit-scrollbar-thumb { background: #DDD; border-radius: 2px; }

    /* Pilot badge */
    .pilot-badge {
      position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%);
      background: rgba(0,0,0,0.62); color: rgba(255,255,255,0.82);
      font-size: 10px; padding: 5px 14px; border-radius: 20px;
      pointer-events: none; z-index: 800; white-space: nowrap; letter-spacing: 0.2px;
    }

    /* ── DRAG HANDLES ─────────────────────────────────────── */
    .drag-h {
      height: 5px; flex-shrink: 0; cursor: ns-resize;
      background: var(--border); position: relative;
      transition: background 0.15s; z-index: 10;
    }
    .drag-h:hover, .drag-h.dragging { background: #aaa; }
    .drag-h.hidden { display: none; }
    .drag-h::after {
      content: ''; position: absolute;
      left: 50%; transform: translateX(-50%);
      top: 1px; width: 26px; height: 3px;
      border-radius: 2px; background: #ccc;
    }
    .drag-h:hover::after, .drag-h.dragging::after { background: #888; }

    /* ── RESIZE HANDLES ──────────────────────────────────── */
    /* sb-resize is a sibling of .sidebar inside .app (position:relative),
       so overflow:hidden on .sidebar cannot clip it */
    .sb-resize {
      position: absolute;
      left: calc(var(--sidebar-w, 300px) - 3px);
      top: 0; bottom: 0; width: 8px;
      cursor: ew-resize; z-index: 300;
      background: transparent; transition: background 0.15s;
    }
    .sb-resize:hover, .sb-resize.dragging { background: rgba(0,0,0,0.18); }
    .panel-resize {
      position: absolute; left: -3px; top: 0; bottom: 0; width: 6px;
      cursor: ew-resize; z-index: 600;
      background: transparent; transition: background 0.15s;
    }
    .panel-resize:hover, .panel-resize.dragging { background: rgba(0,0,0,0.15); }

    /* ── SIDEBAR SECTIONS ─────────────────────────────────── */
    .sb-filters {
      overflow-y: auto; flex-shrink: 0;
      display: flex; flex-direction: column;
      border-bottom: 1px solid var(--border);
      max-height: 50vh;
      background: var(--surface);
    }
    /* Neighborhood section — scrollable list, capped height */
    #fsec-hood { flex-shrink: 0; }
    .sb-list-wrap { display: flex; flex-direction: column; flex: 1; overflow: hidden; min-height: 80px; }

    /* ── MOBILE ─────────────────────────────────────────── */
    #city-select-mobile {
      display: block;
      font-size: 13px; padding: 5px 10px;
      border-radius: 8px; border: 1px solid var(--border);
      background: var(--surface); color: var(--text);
      cursor: pointer; font-family: inherit; flex-shrink: 0;
    }
    /* ── MARKER SIZE ──────────────────────────────────────────── */
    .m-pin-wrap {
      width: 26px; height: 26px;
      transform: scale(0.75);
      transform-origin: 50% 100%;
      transition: transform 0.18s ease-out;
    }
    #map.zoom-full .m-pin-wrap { transform: scale(1); }
    #map.zoom-out .m-pin-wrap { transform: scale(0.5); }

    /* ── Marker Cluster Icons ────────────────────────────── */
    .cluster-icon {
      background: #111;
      color: #fff;
      font-family: 'Inter', -apple-system, sans-serif;
      font-weight: 700;
      border-radius: 50%;
      border: 2.5px solid #fff;
      box-shadow: 0 2px 12px rgba(0,0,0,0.4);
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      transition: transform 0.12s ease, box-shadow 0.12s ease;
    }
    .cluster-icon:hover {
      transform: scale(1.12);
      box-shadow: 0 4px 16px rgba(0,0,0,0.5);
    }
    /* 크기 3단계: 개수에 따라 자동 적용 */
    .cluster-sm { width: 32px; height: 32px; font-size: 12px; }
    .cluster-md { width: 42px; height: 42px; font-size: 14px; }
    .cluster-lg { width: 52px; height: 52px; font-size: 15px; }
    @media (max-width: 900px) {
      .map-legend {
        padding: 0;
        border-radius: 6px;
      }
      .legend-toggle {
        display: flex;
        align-items: center;
        gap: 4px;
        padding: 6px 10px;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
      }
      .legend-toggle-label {
        font-size: 10px;
        font-weight: 700;
        color: #333;
        text-transform: uppercase;
        letter-spacing: 0.5px;
      }
      .legend-arrow {
        font-size: 10px;
        color: #666;
        transition: transform 0.2s;
      }
      .map-legend.collapsed .legend-arrow {
        transform: rotate(-90deg);
      }
      .legend-body {
        padding: 0 10px 8px;
      }
      .map-legend.collapsed .legend-body {
        display: none;
      }
      .legend-dot { width: 8px; height: 8px; }
      .legend-label { font-size: 10px; }
      /* Mobile: bigger tap targets */
      .legend-item-cb { padding: 4px 0; }
      .legend-ck { width: 16px; height: 16px; font-size: 11px; }

      /* ── Mobile single-row header ── */
      header {
        display: flex; align-items: center; gap: 8px;
        height: calc(var(--mob-header-h) + var(--safe-top));
        padding: env(safe-area-inset-top, 0px) 10px 0;
        overflow: hidden;
      }
      .header-row1 {
        display: contents;
      }
      /* Row 2: hidden on mobile (near-me/fav/route are in sidebar actions) */
      .header-row2 { display: none !important; }
      .logo { flex-shrink: 0; order: 1; }
      .logo-img { height: 26px; }
      /* Search: visible, fills remaining space, ordered after logo */
      .search-wrap { display: flex !important; flex: 1; max-width: none; order: 2; min-width: 0; }
      .search-icon { display: block; }
      #search { height: 36px; font-size: 13px; }
      .map-toggle { display: none !important; }
      /* ✦ and ☰ buttons: right side */
      #header-star-btn { order: 3; }
      #menu-btn { display: flex; flex-shrink: 0; order: 4; }
      /* ✦ landing button — mobile only */
      #header-star-btn {
        display: flex; align-items: center; justify-content: center;
        width: 34px; height: 34px;
        border: 1px solid var(--border); border-radius: 8px;
        background: white; cursor: pointer;
        font-size: 16px; line-height: 1; flex-shrink: 0;
        -webkit-tap-highlight-color: transparent;
        transition: background 0.12s;
      }
      #header-star-btn:active { background: var(--border); }
      /* Hide city select from mobile header (moved to sidebar) */
      #city-select-mobile { display: none !important; }
      #refresh-btn { display: none !important; }
      /* Map toggle: compact on mobile */
      .map-toggle button { padding: 4px 8px; font-size: 11px; }
      #fav-io-bar.visible { display: flex; font-size: 11px; padding: 0 10px; min-height: 34px; gap: 6px; }
      #fav-io-bar .fav-io-label { font-size: 10px; }
      #fav-io-bar .fav-io-btn { height: 22px; padding: 0 8px; font-size: 10px; }

      /* ── Sidebar overlay ── */
      .app { overflow: visible; }
      .sidebar {
        pointer-events: none;
        position: fixed; left: 0;
        top: calc(var(--mob-header-h) + var(--safe-top));
        bottom: 0;
        transform: translateX(-100%);
        transition: transform 0.28s cubic-bezier(.4,0,.2,1);
        box-shadow: 4px 0 20px rgba(0,0,0,0.15);
        z-index: 400;
      }
      .sidebar.open { transform: translateX(0); pointer-events: auto; }

      /* ── Detail panel bottom sheet ── */
      .panel {
        pointer-events: none;
        position: fixed; bottom: 0; left: 0; right: 0; top: 33vh;
        width: 100%; height: auto;
        border-left: none; border-top: 1px solid rgba(232,232,228,0.5);
        border-radius: 20px 20px 0 0;
        background: rgba(255,255,255,0.50); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
        transform: translateY(100%);
        padding-bottom: env(safe-area-inset-bottom, 0px);
        z-index: 500;
        transition: transform 0.35s cubic-bezier(.4,0,.2,1), top 0.3s cubic-bezier(.4,0,.2,1), border-radius 0.3s;
      }
      .panel.open { transform: translateY(0); pointer-events: auto; }
      .panel.open.panel-fullscreen {
        top: 0 !important; border-radius: 0;
      }
      /* Walk-path mode: collapse panel to thin handle bar at bottom */
      .panel.open.walk-path-mode {
        top: auto; bottom: 0; height: 44px; min-height: 44px;
        overflow: hidden; cursor: pointer;
        transition: height 0.3s cubic-bezier(.4,0,.2,1), top 0.3s cubic-bezier(.4,0,.2,1);
      }
      #panel-backdrop {
        display: none; position: fixed;
        top: 0; left: 0; right: 0;
        height: 33vh;
        z-index: 490;
      }
      #panel-backdrop.visible { display: block; }
      .panel::before { display: none; } /* replaced by #panel-drag-handle */
      #panel-drag-handle {
        width: 100%; height: 36px; flex-shrink: 0;
        display: flex; align-items: center; justify-content: center;
        cursor: grab; touch-action: pan-x;
        -webkit-tap-highlight-color: transparent;
        position: relative;
      }
      #panel-drag-handle::before {
        content: ''; display: block;
        width: 36px; height: 4px; background: #ccc; border-radius: 2px;
        transition: background 0.15s, width 0.2s;
      }
      #panel-drag-handle:active::before { background: #aaa; }
      /* Fullscreen: replace pill with a visible downward chevron */
      .panel.panel-fullscreen #panel-drag-handle {
        height: 44px; cursor: pointer; background: rgba(0,0,0,0.03);
        border-bottom: 1px solid rgba(0,0,0,0.06);
      }
      .panel.panel-fullscreen #panel-drag-handle::before {
        display: none;
      }
      .panel.panel-fullscreen #panel-drag-handle::after {
        content: ''; display: block;
        width: 28px; height: 28px;
        background: rgba(0,0,0,0.07); border-radius: 50%;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
        background-repeat: no-repeat; background-position: center; background-size: 18px;
        transition: background-color 0.15s;
      }
      .panel.panel-fullscreen #panel-drag-handle:active::after {
        background-color: rgba(0,0,0,0.14);
      }

      /* ── Hide desktop-only elements ── */
      .map-toggle { display: none; }

      /* ── Map zoom buttons: move up to avoid phone toolbar ── */
      .leaflet-bottom.leaflet-right { bottom: 60px; }

      /* ── Hide resize handle on mobile (sidebar is flyout, not resizable) ── */
      .sb-resize { display: none !important; }

      /* ── Hide header action buttons on mobile (use action bar instead) ── */
      #near-me-btn, #fav-btn, #route-btn, #ifl-btn { display: none !important; }

      /* Mobile action bar removed — hamburger opens sidebar directly */

      /* ── Sidebar backdrop ── */
      #sidebar-backdrop { display: none; position: fixed; top: calc(var(--mob-header-h) + var(--safe-top)); left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.4); z-index: 350; }
      #sidebar-backdrop.visible { display: block; }

      /* ── Gallery: fixed height, aspect-ratio letterbox ── */
      .gallery {
        height: 210px;
        background: rgba(0,0,0,0.15);
        flex-shrink: 0;
      }
      .gallery img {
        width: 100%; height: 100%;
        object-fit: contain;
        background: rgba(0,0,0,0.15);
        position: absolute !important;
        top: 0; left: 0;
        transform: none;
        max-height: unset;
      }
      .gallery img.active { position: absolute !important; }
      .gallery .sv-fallback, .gallery .sv-fallback-int { position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; }

      /* ── Panel: gallery pinned, content scrolls ── */
      .panel { overflow: hidden; display: flex; flex-direction: column; }
      .panel-scroll {
        flex: 1; min-height: 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
      }

      .drag-h { display: none; }
      .sb-filters {
        max-height: 55vh; overflow-y: auto; display: flex;
        -webkit-overflow-scrolling: touch;
      }
      .fsec-body.hood-list { max-height: 200px; }

      /* Mobile walk bar: show only the slider (GPS/Pin selection via My Location popup) */
      .walk-loc-btn { display: none !important; }
      .walk-bar-sep { display: none !important; }
      /* Bigger slider for mobile touch */
      #walk-slider {
        flex: 1; max-width: none; height: 6px;
        accent-color: #4F46E5;
      }
      #walk-slider::-webkit-slider-thumb {
        width: 26px; height: 26px;
      }
      #walk-label { font-size: 14px; font-weight: 700; }
      #walk-bar.visible { height: 54px; }
      #walk-bar { padding: 0 20px; gap: 14px; }
    }
    
    @media (max-width: 480px) {
      header { padding: env(safe-area-inset-top, 0px) 8px 0; }
      .header-row1, .header-row2 { gap: 4px; }
      .tabs { padding: 0; gap: 0; overflow: hidden; }
      .tabs .tab { padding: 8px 3px; font-size: 11px; }
      .tab-report-btn { padding: 8px 5px; font-size: 10.5px; }
      .panel { top: 33vh; height: auto; }
      .gallery { height: 180px; }
      .detail-section { padding: 14px 14px; }
      h2 { font-size: 16px; }
      .panel-close { width: 32px; height: 32px; font-size: 16px; }
    }

    /* ── ADMIN PANEL ─────────────────────────────────────────── */
    .admin-panel {
      position: fixed; inset: 0; background: var(--surface);
      z-index: 10000; display: none; flex-direction: column;
    }
    .admin-panel.open { display: flex; }
    .admin-hdr {
      height: 52px; background: #111; color: white;
      display: flex; align-items: center; justify-content: space-between;
      padding: 0 20px; flex-shrink: 0; gap: 12px;
    }
    .admin-hdr-title { font-size: 13px; font-weight: 600; letter-spacing: -0.2px; }
    .admin-hdr-actions { display: flex; align-items: center; gap: 8px; }
    .admin-hdr-count { font-size: 11px; color: #888; margin-right: 4px; }
    .adm-hbtn {
      padding: 5px 13px; border-radius: 6px; font-size: 12px;
      border: 1px solid rgba(255,255,255,0.2); background: rgba(255,255,255,0.1);
      color: white; cursor: pointer; font-family: inherit; transition: background 0.15s;
    }
    .adm-hbtn:hover { background: rgba(255,255,255,0.22); }
    .adm-hbtn.adm-hbtn-add { background: #4F46E5; border-color: #4F46E5; }
    .adm-hbtn.adm-hbtn-add:hover { background: #4338CA; }
    .adm-hbtn.adm-hbtn-export { background: #15803D; border-color: #15803D; }
    .adm-hbtn.adm-hbtn-export:hover { background: #166534; }
    .admin-body { flex: 1; overflow-y: auto; }
    .admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
    .admin-table th {
      text-align: left; padding: 10px 14px;
      background: var(--bg); border-bottom: 2px solid var(--border);
      font-size: 10.5px; font-weight: 600; text-transform: uppercase;
      letter-spacing: 0.4px; color: var(--text-secondary); position: sticky; top: 0;
    }
    .admin-table td { padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
    .admin-table tr:hover td { background: var(--bg); }
    .admin-table .td-name { font-weight: 500; }
    .adm-btn { padding: 3px 10px; border-radius: 5px; border: 1px solid var(--border); font-size: 11px; cursor: pointer; font-family: inherit; transition: background 0.12s; }
    .adm-edit { background: #EEF2FF; color: #4F46E5; border-color: #C7D2FE; }
    .adm-edit:hover { background: #E0E7FF; }
    .adm-del  { background: #FEF2F2; color: #DC2626; border-color: #FECACA; margin-left: 4px; }
    .adm-del:hover  { background: #FEE2E2; }

    /* Admin modal */
    .adm-modal-bg {
      display: none; position: fixed; inset: 0;
      background: rgba(0,0,0,0.5); z-index: 11000;
      align-items: flex-start; justify-content: center;
      padding: 24px 16px; overflow-y: auto;
    }
    .adm-modal-bg.open { display: flex; }
    .adm-modal {
      background: white; border-radius: 12px;
      width: 100%; max-width: 780px;
      box-shadow: 0 24px 60px rgba(0,0,0,0.35);
      display: flex; flex-direction: column;
    }
    .adm-modal-hdr {
      display: flex; align-items: center; justify-content: space-between;
      padding: 15px 20px; border-bottom: 1px solid var(--border);
      font-size: 14px; font-weight: 600; flex-shrink: 0;
    }
    .adm-modal-hdr button { background: none; border: none; font-size: 20px; cursor: pointer; color: #aaa; line-height: 1; }
    .adm-modal-hdr button:hover { color: #111; }
    .adm-form-body { padding: 20px; overflow-y: auto; }
    .af-section { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px; color: var(--text-secondary); margin: 16px 0 8px; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
    .af-section:first-child { margin-top: 0; }
    .af-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
    .af-field { display: flex; flex-direction: column; gap: 4px; }
    .af-wide { grid-column: 1 / -1; }
    .af-field label { font-size: 11px; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.4px; }
    .af-field input, .af-field textarea, .af-field select {
      border: 1px solid var(--border); border-radius: 6px;
      padding: 7px 10px; font-size: 13px; font-family: inherit;
      background: var(--bg); outline: none; transition: border-color 0.15s;
    }
    .af-field input:focus, .af-field textarea:focus, .af-field select:focus { border-color: #4F46E5; background: white; }
    .af-field textarea { resize: vertical; }
    .af-check-row { display: flex; align-items: center; gap: 7px; padding-top: 20px; }
    .af-check-row input { width: 15px; height: 15px; cursor: pointer; }
    .af-check-row label { font-size: 12px; font-weight: 500; text-transform: none; letter-spacing: 0; cursor: pointer; }
    .adm-modal-footer {
      padding: 13px 20px; border-top: 1px solid var(--border);
      display: flex; justify-content: flex-end; gap: 8px; flex-shrink: 0;
    }
    .adm-cancel { padding: 8px 18px; border-radius: 7px; border: 1px solid var(--border); background: white; cursor: pointer; font-size: 13px; font-family: inherit; }
    .adm-save   { padding: 8px 20px; border-radius: 7px; border: none; background: #111; color: white; cursor: pointer; font-size: 13px; font-family: inherit; font-weight: 500; }
    .adm-save:hover { background: #333; }
    .adm-reset-btn {
      padding: 5px 13px; border-radius: 6px; border: 1px solid #FECACA;
      background: #FEF2F2; color: #DC2626; font-size: 11px;
      cursor: pointer; font-family: inherit; margin-right: auto;
    }
    .adm-reset-btn:hover { background: #FEE2E2; }

    /* Admin filter bar */
    .adm-filter-bar {
      display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
      padding: 10px 16px; border-bottom: 1px solid var(--border);
      background: var(--bg); flex-shrink: 0;
    }
    .adm-filter-bar input[type=search] {
      flex: 1; min-width: 140px; padding: 5px 10px;
      border: 1px solid var(--border); border-radius: 6px;
      font-size: 12px; font-family: inherit; background: white; outline: none;
    }
    .adm-filter-bar input[type=search]:focus { border-color: #4F46E5; }
    .adm-filter-select {
      padding: 5px 8px; border: 1px solid var(--border); border-radius: 6px;
      font-size: 12px; font-family: inherit; background: white; cursor: pointer;
      color: var(--text-primary); outline: none;
    }
    .adm-filter-select:focus { border-color: #4F46E5; }
    .adm-filter-label {
      font-size: 10px; font-weight: 600; color: var(--text-secondary);
      text-transform: uppercase; letter-spacing: 0.4px; white-space: nowrap;
    }
    .adm-filter-sep { width: 1px; height: 18px; background: var(--border); flex-shrink: 0; }
    .adm-filter-reset {
      padding: 5px 10px; border-radius: 6px; border: 1px solid var(--border);
      background: white; font-size: 11px; cursor: pointer; font-family: inherit;
      color: var(--text-secondary); white-space: nowrap;
    }
    .adm-filter-reset:hover { border-color: #999; color: #111; }
    /* Sortable column headers */
    .admin-table th.sortable { cursor: pointer; user-select: none; }
    .admin-table th.sortable:hover { color: #111; }
    .adm-sort-icon { margin-left: 3px; opacity: 0.4; font-size: 9px; }
    .admin-table th.sort-asc .adm-sort-icon,
    .admin-table th.sort-desc .adm-sort-icon { opacity: 1; color: #4F46E5; }

/* ══════════════════════════════════════════════════════════════════
   ROUTE PLANNER
   ══════════════════════════════════════════════════════════════════ */
.route-panel {
  position: fixed; top: 0; right: -420px; width: 400px; max-width: 90vw;
  height: 100vh; background: var(--surface); z-index: 1200;
  box-shadow: -4px 0 24px rgba(0,0,0,0.15);
  transition: right 0.3s ease;
  display: flex; flex-direction: column;
  font-family: Inter, -apple-system, sans-serif;
}
.route-panel.visible { right: 0; }

.route-panel-hdr {
  display: flex; align-items: center; gap: 6px;
  padding: 12px 14px; border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.route-panel-back {
  background: none; border: none; font-size: 18px; cursor: pointer;
  color: var(--text-secondary); padding: 4px 6px; border-radius: 6px;
  flex-shrink: 0; line-height: 1;
}
.route-panel-back:hover { background: #f3f3f0; color: #111; }
.route-panel-title { font-size: 15px; font-weight: 600; flex: 1; }
.route-hdr-right { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.route-panel-close {
  background: none; border: none; font-size: 16px; cursor: pointer;
  color: var(--text-secondary); padding: 4px 6px; border-radius: 6px;
}
.route-panel-close:hover { background: #f3f3f0; }
.route-btn-save, .route-btn-load {
  background: none; border: none; font-size: 15px; cursor: pointer;
  padding: 4px 6px; border-radius: 6px; line-height: 1;
  transition: background 0.12s;
}
.route-btn-save:hover { background: #EFF6FF; }
.route-btn-load:hover { background: #F0FDF4; }
.route-save-toast {
  position: absolute; top: 50px; left: 50%; transform: translateX(-50%);
  background: #111; color: #fff; font-size: 12px; padding: 5px 14px;
  border-radius: 20px; pointer-events: none; white-space: nowrap;
  opacity: 0; transition: opacity 0.2s;
  z-index: 10;
}

.route-panel-body {
  flex: 1; overflow-y: auto; padding: 12px 16px;
}

/* Add All from List button */
.route-addall-list {
  display: block; width: 100%; padding: 10px 14px;
  background: #FDF2F8; border: 1px dashed #D946A8; color: #D946A8;
  font-size: 13px; font-weight: 600; border-radius: 8px;
  cursor: pointer; margin-bottom: 12px;
  font-family: Inter, -apple-system, sans-serif;
}
.route-addall-list:hover { background: #FCE7F3; border-color: #C026D3; }

/* Add locations around me button */
.route-nearbyme-btn {
  display: flex; align-items: center; justify-content: center;
  background: #EFF6FF; border: 1px dashed #3B82F6; color: #1D4ED8;
}
.route-nearbyme-btn:hover { background: #DBEAFE; border-color: #2563EB; color: #1e40af; }

/* Near me slider panel */
.route-nearbyme-inner {
  background: #F8FAFF; border: 1px solid #BFDBFE; border-radius: 8px;
  padding: 12px 14px; margin-bottom: 12px; margin-top: -6px;
}
.route-nearbyme-row {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 8px;
}
.route-nearbyme-label {
  font-size: 12px; font-weight: 600; color: #1D4ED8;
}
.route-nearbyme-val {
  font-size: 13px; font-weight: 700; color: #1D4ED8;
}
.route-nearbyme-slider {
  width: 100%; margin-bottom: 4px; accent-color: #3B82F6;
}
.route-nearbyme-ticks {
  display: flex; justify-content: space-between;
  font-size: 10px; color: #9CA3AF; margin-bottom: 10px; padding: 0 2px;
}
.route-nearbyme-go {
  display: block; width: 100%; padding: 9px;
  background: #3B82F6; border: none; border-radius: 7px;
  color: #fff; font-size: 13px; font-weight: 600;
  cursor: pointer; font-family: Inter, -apple-system, sans-serif;
}
.route-nearbyme-go:hover { background: #2563EB; }
.route-nearbyme-msg {
  font-size: 12px; color: #1D4ED8; margin-top: 8px;
  text-align: center; min-height: 16px;
}

/* Near me — location source (GPS / pin) */
.route-nm-src-label {
  font-size: 11px; font-weight: 600; color: #374151;
  margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.04em;
}
.route-nm-src-row {
  display: flex; gap: 8px; margin-bottom: 8px;
}
.route-nm-src-btn {
  flex: 1; padding: 7px 8px;
  background: #fff; border: 1.5px solid #CBD5E1; border-radius: 7px;
  font-size: 12px; font-weight: 600; color: #374151;
  cursor: pointer; font-family: Inter, -apple-system, sans-serif;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.route-nm-src-btn:hover { border-color: #3B82F6; color: #1D4ED8; background: #EFF6FF; }
.route-nm-src-btn.active {
  background: #EFF6FF; border-color: #3B82F6; color: #1D4ED8;
}
.route-nm-src-status {
  font-size: 11px; color: #6B7280; margin-bottom: 8px;
  min-height: 14px; line-height: 1.3;
}
/* Toast hint for pin-drop mode */
.route-pin-toast {
  position: fixed; bottom: 76px; left: 50%; transform: translateX(-50%);
  background: rgba(17,17,17,0.88); color: #fff;
  font-size: 13px; font-weight: 500; padding: 10px 18px;
  border-radius: 22px; z-index: 9999; pointer-events: none;
  white-space: nowrap; box-shadow: 0 4px 16px rgba(0,0,0,0.22);
}

/* Top actions — sticky bar */
.route-top-actions {
  position: sticky; top: 0; z-index: 2;
  display: flex; gap: 6px; padding: 8px 0 10px;
  background: var(--surface); align-items: center;
}
.route-top-actions .route-btn {
  flex: none; padding: 7px 12px; font-size: 12px;
}
.route-top-actions .route-btn-pdf {
  padding: 7px 12px; font-size: 12px;
}

/* Route time input row */
.route-time-row {
  display: flex; align-items: center; gap: 6px; padding: 6px 0; margin-bottom: 8px;
}
.route-time-label {
  font-size: 11px; color: #666; white-space: nowrap;
}
.route-time-input {
  height: 28px; border: 1px solid #ddd; border-radius: 6px;
  padding: 0 8px; font-size: 12px; font-family: inherit;
  width: 100px;
}
.route-btn-now {
  height: 28px; line-height: 26px; padding: 0 10px; font-size: 11px;
  background: #f0f0ee; border: 1px solid #ddd; border-radius: 6px;
  cursor: pointer; font-family: inherit; white-space: nowrap;
  display: inline-flex; align-items: center; justify-content: center;
  box-sizing: border-box;
}
.route-btn-now:hover { background: #e4e4e0; }

/* Route status message */
.route-status-msg {
  font-size: 12px; color: #d97706; padding: 12px; border-radius: 8px;
  background: #fffbeb; border: 1px solid #fcd34d; text-align: center;
}

.route-walk-badge {
  background: #EFF6FF; color: #1D4ED8; font-size: 12px; font-weight: 500;
  padding: 8px 12px; border-radius: 8px; margin-bottom: 10px;
  border: 1px solid #BFDBFE;
}
.route-section-label {
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.5px; color: var(--text-secondary);
  margin-bottom: 10px;
}

/* Hood groups */
.route-hood { margin-bottom: 4px; }
.route-hood-hdr {
  display: flex; align-items: center; gap: 8px; width: 100%;
  background: none; border: none; padding: 8px 6px; cursor: pointer;
  font-size: 13px; font-weight: 500; text-align: left;
  border-radius: 6px;
}
.route-hood-hdr:hover { background: #f7f7f5; }
.route-hood-name { flex: 1; }
.route-hood-count {
  background: #e8e8e4; color: var(--text-secondary); font-size: 10px;
  padding: 1px 7px; border-radius: 10px; font-weight: 600;
}
.route-hood-arr { font-size: 9px; color: #aaa; }

.route-hood-body { padding-left: 8px; }

.route-hood-addall {
  background: none; border: 1px dashed var(--border); color: #3B82F6;
  font-size: 11px; font-weight: 500; padding: 4px 10px; border-radius: 5px;
  cursor: pointer; margin: 4px 0 6px;
}
.route-hood-addall:hover { background: #eff6ff; border-color: #93c5fd; }

/* Location items */
.route-loc-item {
  display: flex; align-items: center; gap: 6px; padding: 5px 6px;
  font-size: 12px; border-radius: 5px;
}
.route-loc-item:hover { background: #f7f7f5; }
.route-loc-item.in-route { background: #eff6ff; }
.route-loc-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.route-loc-toggle {
  background: var(--accent); color: white; border: none; width: 20px; height: 20px;
  border-radius: 50%; font-size: 14px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.route-loc-item.in-route .route-loc-toggle { background: #EF4444; }

/* Selected stops */
.route-selected {
  margin-top: 16px; padding-top: 12px;
  border-top: 1px solid var(--border);
}
.route-sel-title {
  font-size: 12px; font-weight: 600; color: var(--text-secondary);
  margin-bottom: 8px;
}
.rsl-header {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 2px 6px; margin-bottom: 2px;
  border-bottom: 1px solid #e8e8e4;
}
.rsl-count {
  font-size: 12px; font-weight: 700; color: #111; flex: 1;
}
.rsl-dist {
  font-size: 11px; color: #4338CA; font-weight: 600;
}
.route-sel-empty {
  font-size: 12px; color: #aaa; padding: 8px 0; text-align: center;
}
.route-sel-item {
  display: flex; align-items: center; gap: 8px; padding: 6px 8px;
  background: #f7f7f5; border-radius: 6px; margin-bottom: 4px; font-size: 12px;
}
.route-sel-num {
  background: #3B82F6; color: white; width: 20px; height: 20px;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; flex-shrink: 0;
}
.route-sel-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.route-sel-remove {
  background: none; border: none; color: #999; cursor: pointer; font-size: 12px;
  padding: 2px 4px; border-radius: 4px;
}
.route-sel-remove:hover { color: #ef4444; background: #fef2f2; }

/* Actions */
.route-actions {
  display: flex; gap: 8px; margin-top: 10px;
}
.route-btn {
  flex: 1; padding: 10px; border: none; border-radius: 8px;
  font-size: 13px; font-weight: 600; cursor: pointer;
  font-family: Inter, sans-serif;
}
.route-btn-calc { background: #D946A8; color: white; }
.route-btn-calc:hover { background: #C026D3; }
.route-btn-clear { background: #f3f3f0; color: var(--text-secondary); }
.route-btn-clear:hover { background: #e8e8e4; }
.route-btn-pdf { background: #111; color: white; padding: 10px 16px; }
.route-btn-pdf:hover { background: #333; }

/* Route result */
.route-result { margin-top: 16px; }
.route-loading { text-align: center; padding: 20px; color: #666; font-size: 13px; }

.route-summary {
  display: flex; gap: 12px; justify-content: center;
  padding: 14px; background: #f7f7f5; border-radius: 10px; margin-bottom: 12px;
}
.route-summary-stat { text-align: center; }
.route-stat-val { font-size: 16px; font-weight: 600; display: block; }
.route-stat-label { font-size: 10px; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.3px; }

.route-estimate-note {
  font-size: 11px; color: #d97706; text-align: center; margin-bottom: 10px;
}

/* Itinerary */
.route-itinerary { margin: 10px 0; }
.route-stop {
  display: flex; align-items: flex-start; gap: 10px; padding: 8px 0;
}
.route-stop-num {
  background: #3B82F6; color: white; width: 22px; height: 22px;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; flex-shrink: 0; margin-top: 1px;
}
.route-stop-info { flex: 1; min-width: 0; }
.route-stop-name { font-size: 13px; font-weight: 500; }
.route-stop-meta { font-size: 11px; color: var(--text-secondary); margin-top: 2px; }

.route-leg-info {
  font-size: 11px; color: #666; padding: 4px 0 4px 32px;
  border-left: 2px dashed #ddd; margin-left: 10px;
}

.route-export-actions {
  margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--border);
  display: flex; gap: 8px;
}

/* Header right group (clear + close) */
.route-hdr-right {
  display: flex; align-items: center; gap: 6px;
}
.route-hdr-right .route-btn-clear {
  padding: 5px 10px; font-size: 11px; border-radius: 6px;
}

/* Simplified stop list (v0.3) */
.route-stop-list { padding: 4px 0; }
.route-stop-beyond { opacity: 0.5; }

/* Route marker popup (custom DOM, works on mobile) */
.route-custom-popup {
  background: #fff;
  border-radius: 12px; overflow: hidden;
  box-shadow: 0 6px 24px rgba(0,0,0,0.20), 0 1px 4px rgba(0,0,0,0.10);
  padding: 0;
  min-width: 220px; max-width: 280px;
  font-family: Inter, -apple-system, sans-serif;
  position: fixed; /* overridden by JS */
  z-index: 3000;
  pointer-events: all;
  /* needed so absolute rmp-close is positioned relative to popup root */
  isolation: isolate;
}
.rmp-close {
  /* floats over the thumb (or body if no thumb) */
  position: absolute; top: 7px; right: 7px;
  background: rgba(0,0,0,0.45); border: none; cursor: pointer;
  color: #fff; font-size: 13px; line-height: 1;
  width: 24px; height: 24px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  z-index: 10;
}
.rmp-close:hover { background: rgba(0,0,0,0.7); }
.rmp-name {
  font-size: 13px; font-weight: 700; color: #111;
  margin-bottom: 5px; padding-right: 26px; /* space for close btn */
}
.rmp-meta {
  font-size: 11px; color: #666; margin-bottom: 8px;
}
.rmp-beyond {
  font-size: 11px; color: #d97706; background: #fffbeb;
  border: 1px solid #fcd34d; border-radius: 5px;
  padding: 3px 8px; margin-bottom: 8px;
}
.rmp-remove {
  display: block; width: 100%;
  padding: 8px 10px; border-radius: 8px;
  background: #fef2f2; border: 1.5px solid #fecaca;
  color: #ef4444; font-size: 12px; font-weight: 600;
  cursor: pointer; font-family: inherit;
  transition: background 0.12s;
  -webkit-tap-highlight-color: transparent;
}
.rmp-remove:hover, .rmp-remove:active { background: #fee2e2; border-color: #f87171; }

/* Peek handle (hidden by default, shown when minimized on mobile) */
.route-peek-handle {
  display: none;
}

/* GPS Marker Styles */
.gps-dot-icon { background: none !important; border: none !important; }
.gps-dot {
  width: 14px; height: 14px; background: #4285F4; border: 2.5px solid #fff;
  border-radius: 50%; box-shadow: 0 1px 4px rgba(0,0,0,0.3);
  position: relative;
}
.gps-dot-pulse {
  position: absolute; top: -8px; left: -8px;
  width: 30px; height: 30px; background: rgba(66,133,244,0.2);
  border-radius: 50%; animation: gpsPulse 2s ease-out infinite;
}
@keyframes gpsPulse {
  0% { transform: scale(0.5); opacity: 1; }
  100% { transform: scale(1.5); opacity: 0; }
}

/* ── SV FULLSCREEN MODAL ──────────────────────────────────── */
#sv-fullscreen {
  position: fixed; inset: 0; z-index: 9000;
  background: #000;
}
#sv-fullscreen-frame {
  width: 100%; height: 100%; border: none; display: block;
  /* pointer-events auto — user can interact with Street View */
}
#sv-fullscreen-close {
  position: absolute; top: 14px; right: 14px; z-index: 9001;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(0,0,0,0.55); color: #fff;
  border: 1px solid rgba(255,255,255,0.3);
  font-size: 18px; cursor: pointer; display: flex;
  align-items: center; justify-content: center;
  -webkit-tap-highlight-color: transparent;
}

/* ── LUCKY CARD SV HINT OVERLAY ──────────────────────────── */
/* Full-area overlay so tapping anywhere on the SV opens the interactive modal */
.ilk-sv-label {
  /* informational label — sits below the iframe (z-index lower), pointer-events:none
     so it never blocks SV interaction */
  position: absolute; bottom: 0; left: 0; right: 0; z-index: 1;
  padding: 8px 14px;
  background: linear-gradient(to top, rgba(0,0,0,0.55) 0%, transparent 100%);
  color: rgba(255,255,255,0.82); font-size: 11px; font-weight: 500;
  text-align: center; letter-spacing: 0.2px;
  pointer-events: none;
}

/* Mobile route panel */
@media (max-width: 900px) {
  .route-panel { width: 100vw; max-width: 100vw; right: -100vw; }
  .route-panel.visible { right: 0; }

  /* Minimized state: panel slides to bottom, only peek handle visible */
  .route-panel.visible.minimized {
    top: auto; bottom: 0; right: 0;
    height: 52px; overflow: hidden;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
    transition: height 0.3s ease, top 0.3s ease;
  }
  .route-panel.visible.minimized .route-panel-hdr,
  .route-panel.visible.minimized .route-panel-body {
    display: none;
  }
  .route-panel.visible.minimized .route-peek-handle {
    display: flex; flex-direction: column; align-items: center;
    justify-content: center; height: 52px; cursor: pointer;
    padding: 8px;
  }
  .route-peek-bar {
    width: 40px; height: 4px; background: #ccc; border-radius: 2px;
    margin-bottom: 6px;
  }
  .route-peek-label {
    font-size: 12px; font-weight: 600; color: var(--text-secondary);
    font-family: Inter, -apple-system, sans-serif;
  }
}

/* ══════════════════════════════════════════════════════════════════
   EXPLORE POPUP (replaces IFL theme modal)
   ══════════════════════════════════════════════════════════════════ */
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      

/* ================================================================
   MAP STYLE ENHANCEMENTS
   ================================================================ */

/* Vintage sepia filter on map tiles only */
.leaflet-tile-pane {
  filter: sepia(0.30) brightness(0.93) contrast(1.06) saturate(0.9);
}

/* CRT horizontal scanlines — map container only */
#map::after {
  content: '';
  position: absolute; inset: 0; pointer-events: none; z-index: 350;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px, transparent 3px,
    rgba(0,0,0,0.055) 3px, rgba(0,0,0,0.055) 4px
  );
}

/* ══════════════════════════════════════════════════════════════════
   LANDING / SPLASH SYSTEM
   ══════════════════════════════════════════════════════════════════ */

/* ── Splash ────────────────────────────────────────────────────── */
#landing-splash {
  position: fixed; inset: 0; z-index: 9999;
  background: #111;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 0;
  transition: opacity 0.5s ease;
  font-family: Inter, -apple-system, sans-serif;
}
#landing-splash.fade-out { opacity: 0; pointer-events: none; }
/* ── Legend toggle rows — global scope (desktop + mobile) ─────── */
.legend-all-none {
  display: flex; align-items: center; gap: 4px;
  padding: 2px 0 5px; border-bottom: 1px solid #e0e0e0; margin-bottom: 4px;
}
.legend-qbtn {
  background: none; border: none; padding: 0;
  font-size: 10px; color: #666; cursor: pointer;
  font-family: inherit; text-decoration: underline; text-underline-offset: 2px;
}
.legend-qbtn:hover { color: #111; }
.legend-qsep { font-size: 10px; color: #bbb; }
.legend-item-cb { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.legend-item-cb:active { opacity: 0.7; }
/* Toggle indicator: dark square + white checkmark when ON; light square when OFF */
.legend-ck {
  width: 14px; height: 14px; flex-shrink: 0;
  border: 1.5px solid #444; border-radius: 2px;
  background: #222; color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; line-height: 1;
  user-select: none;
}
.legend-row-off .legend-ck {
  background: #fff; border-color: #aaa; color: transparent;
}
/* Dim dot + label when row is off */
.legend-row-off .legend-dot  { opacity: 0.25; }
.legend-row-off .legend-label { color: #bbb; }

/* ── Splash screen ───────────────────────────────────────────── */
.splash-logo-img {
  width: 180px; height: 180px; object-fit: contain;
  filter: brightness(1.1);
  margin-bottom: 22px;
}
.splash-wordmark {
  color: #fff; font-size: 20px; font-weight: 700;
  font-family: 'Space Mono', 'Courier New', monospace;
  letter-spacing: 0.04em; text-transform: uppercase;
}
.splash-tagline {
  color: rgba(255,255,255,0.38); font-size: 12px;
  letter-spacing: 0.5px; margin-top: 5px;
}

/* ── Landing screen — transparent overlay so map shows through ── */
#landing-screen {
  position: fixed; inset: 0; z-index: 9998;
  background: linear-gradient(175deg, rgba(4,4,10,0.65) 0%, rgba(4,4,10,0.55) 100%);
  display: none; flex-direction: column;
  font-family: Inter, -apple-system, sans-serif;
  opacity: 0; transition: opacity 0.28s ease;
}
#landing-screen.visible { opacity: 1; }

.landing-hdr {
  display: flex; align-items: center; gap: 8px;
  padding: 18px 20px 10px;
  flex-shrink: 0;
}
.landing-hdr-city { flex: 1; }
.landing-close-btn {
  background: none; border: none;
  color: rgba(255,255,255,0.75); font-size: 18px; font-weight: 300;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0; padding: 4px 8px;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.12s;
}
.landing-close-btn:active { color: #fff; }
.landing-hdr-city {
  font-size: 11px; color: rgba(255,255,255,0.35);
  letter-spacing: 0.3px;
}

.landing-grid {
  flex: 1; display: grid; grid-template-columns: 1fr;
  gap: 10px; padding: 6px 16px 28px;
  align-content: center;
}

.landing-btn {
  border: 1px solid rgba(255,255,255,0.13);
  border-radius: 18px;
  padding: 0 28px;
  height: 76px;
  display: flex; flex-direction: row;
  align-items: center; justify-content: center;
  gap: 16px;
  cursor: pointer; text-align: left;
  transition: filter 0.18s, border-color 0.18s, transform 0.1s;
  -webkit-tap-highlight-color: transparent;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  position: relative; overflow: hidden;
}
.landing-btn:active { transform: scale(0.97); filter: brightness(1.15); }

.landing-btn-icon {
  font-size: 30px; line-height: 1; flex-shrink: 0;
}
.landing-btn-text {
  display: flex; flex-direction: column; gap: 3px;
}
.landing-btn-title {
  font-size: 15px; font-weight: 700; color: #fff;
  line-height: 1.2; white-space: nowrap;
}
.landing-btn-sub {
  font-size: 11px; color: rgba(255,255,255,0.42);
  line-height: 1.3; white-space: nowrap;
}

/* Per-button diagonal gradients (top-left → bottom-right) */
.landing-btn-city {
  background: linear-gradient(135deg, rgba(10,22,55,0.90) 0%, rgba(20,55,110,0.80) 100%);
  border-color: rgba(80,140,255,0.32);
}
.landing-btn-ifl {
  background: linear-gradient(135deg, rgba(45,8,42,0.90) 0%, rgba(100,18,88,0.80) 100%);
  border-color: rgba(220,70,180,0.32);
}
.landing-btn-rec {
  background: linear-gradient(135deg, rgba(38,28,6,0.72) 0%, rgba(72,50,8,0.62) 100%);
  border-color: rgba(200,140,20,0.22);
  opacity: 0.65;
}
.landing-btn-lucky {
  background: linear-gradient(135deg, rgba(40,28,4,0.90) 0%, rgba(88,58,6,0.80) 100%);
  border-color: rgba(240,160,30,0.32);
}

.landing-coming-soon {
  position: absolute; top: 10px; right: 12px;
  background: rgba(245,158,11,0.18); color: #f59e0b;
  font-size: 9px; font-weight: 700; padding: 2px 7px;
  border-radius: 10px; letter-spacing: 0.4px; text-transform: uppercase;
}

/* ── Landing toast ─────────────────────────────────────────────── */
.landing-toast {
  position: fixed; bottom: 44px; left: 50%;
  transform: translateX(-50%);
  background: rgba(15,15,15,0.95); color: #fff;
  font-size: 14px; font-weight: 500; padding: 12px 22px;
  border-radius: 24px; z-index: 10000; opacity: 0;
  transition: opacity 0.3s; white-space: nowrap;
  pointer-events: none; font-family: Inter, sans-serif;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}


/* ── IFL Select Screen — transparent like landing ───────────────── */
#ifl-select-screen {
  position: fixed; inset: 0; z-index: 9997;
  background: linear-gradient(175deg, rgba(4,4,10,0.65) 0%, rgba(4,4,10,0.55) 100%);
  display: none; flex-direction: column;
  font-family: Inter, -apple-system, sans-serif;
  opacity: 0; transition: opacity 0.28s ease;
}
#ifl-select-screen.visible { opacity: 1; }

.ifl-sel-hdr {
  position: relative;
  display: flex; align-items: center; gap: 10px;
  padding: 16px 56px 14px 20px;
  flex-shrink: 0;
}
.ifl-sel-back {
  background: none; border: none;
  color: rgba(255,255,255,0.5); cursor: pointer;
  padding: 4px; display: flex; align-items: center;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}
.ifl-sel-back:active { color: #fff; }
.ifl-sel-x {
  position: absolute; top: 50%; right: 20px;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.12); border: none; border-radius: 50%;
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  font-size: 14px; color: rgba(255,255,255,0.75); cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.12s, color 0.12s;
}
.ifl-sel-x:active { background: rgba(255,255,255,0.25); color: #fff; }
.ifl-sel-title {
  color: #fff; font-size: 18px; font-weight: 700;
  flex: 1; letter-spacing: -0.3px;
}
.ifl-sel-subtitle {
  font-size: 12px; color: rgba(255,255,255,0.35);
  padding: 0 20px 12px; flex-shrink: 0;
  font-family: Inter, sans-serif;
}
.ifl-sel-body {
  flex: 1; overflow-y: auto; padding: 4px 14px 8px;
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 9px; align-content: start;
}
.ifl-sel-chip {
  background: rgba(8,8,14,0.55);
  border: 1.5px solid rgba(255,255,255,0.12);
  border-radius: 14px; padding: 16px 13px 14px;
  display: flex; flex-direction: column; align-items: flex-start;
  cursor: pointer; text-align: left;
  transition: all 0.15s; -webkit-tap-highlight-color: transparent;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.ifl-sel-chip.selected {
  border-color: #D946A8;
  background: rgba(217,70,168,0.14);
}
.ifl-sel-chip:active { opacity: 0.75; transform: scale(0.97); }
.ifl-sel-icon { font-size: 28px; line-height: 1; margin-bottom: 9px; }
.ifl-sel-label {
  font-size: 12px; font-weight: 600;
  color: rgba(255,255,255,0.7); line-height: 1.3;
}
.ifl-sel-chip.selected .ifl-sel-label { color: #fff; }

.ifl-sel-footer {
  padding: 14px 14px 28px; flex-shrink: 0;
}
.ifl-sel-go {
  display: block; width: 100%; padding: 16px;
  background: rgba(255,255,255,0.08);
  border: 1.5px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  color: rgba(255,255,255,0.5);
  font-size: 15px; font-weight: 700;
  cursor: pointer; font-family: Inter, sans-serif;
  transition: all 0.18s; letter-spacing: -0.2px;
  -webkit-tap-highlight-color: transparent;
}
.ifl-sel-go.has-theme {
  background: #D946A8; border-color: #D946A8; color: #fff;
}
.ifl-sel-go:active { opacity: 0.8; }


/* ═══════════════════════════════════════════════════════════════
   I FEEL LUCKY — card swipe screen
   ═══════════════════════════════════════════════════════════════ */
#ifl-lucky-screen {
  position: fixed; inset: 0; z-index: 9998;
  background: #0d0d14;
  display: none; flex-direction: column;
  font-family: Inter, -apple-system, sans-serif;
  opacity: 0; transition: opacity 0.28s ease;
}
#ifl-lucky-screen.visible { opacity: 1; }

.ilk-hdr {
  display: flex; align-items: center; gap: 8px;
  padding: 18px 20px 12px;
  flex-shrink: 0;
}
.ilk-title {
  color: #fff; font-size: 16px; font-weight: 700;
  flex: 1;
}
.ilk-counter {
  color: rgba(255,255,255,0.45); font-size: 12px; font-weight: 600;
}
.ilk-close {
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(255,255,255,0.1); border: none;
  color: rgba(255,255,255,0.6); font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; margin-left: 8px;
  -webkit-tap-highlight-color: transparent;
}
.ilk-close:active { background: rgba(255,255,255,0.2); }

.ilk-card-area {
  flex: 1; display: flex; align-items: center; justify-content: center;
  padding: 0 20px 8px; overflow: hidden; position: relative;
}

.ilk-card {
  width: 100%; max-width: 400px; height: 100%;
  max-height: calc(100vh - 180px);
  border-radius: 20px; overflow: hidden; position: relative;
  background: #1a1a2e; cursor: grab;
  box-shadow: 0 8px 48px rgba(0,0,0,0.6);
  user-select: none; -webkit-user-select: none;
  display: flex; flex-direction: column;
}
/* ── Card media area (photo OR Street View) ── */
.ilk-card-media {
  width: 100%; height: 55%; flex-shrink: 0;
  position: relative; overflow: hidden;
  background: #0d0d14;
}
.ilk-card-img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.ilk-card-sv {
  position: absolute; inset: 0; width: 100%; height: 100%;
  border: none; display: block;
  /* interactive — user can pan/drag directly inside the SV iframe */
  pointer-events: auto;
}
.ilk-card-no-photo {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, #1e1e3a 0%, #2a1a3e 100%);
  display: flex; align-items: center; justify-content: center;
}
.ilk-card-no-photo::after {
  content: '🏛'; font-size: 40px; opacity: 0.25;
}
.ilk-card-info {
  flex: 1; padding: 14px 18px 12px; overflow: hidden;
  display: flex; flex-direction: column; gap: 0;
}
.ilk-card-name {
  color: #fff; font-size: 19px; font-weight: 800;
  line-height: 1.2; margin-bottom: 4px;
  /* clamp to 2 lines */
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.ilk-arch-yr {
  color: rgba(255,255,255,0.5); font-size: 12px; font-weight: 500;
  margin-bottom: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ilk-tags {
  display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px;
}
.ilk-tag {
  background: rgba(255,255,255,0.09); color: rgba(255,255,255,0.6);
  font-size: 10px; font-weight: 600; letter-spacing: 0.2px;
  padding: 3px 8px; border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.14);
}
.ilk-card-desc {
  color: rgba(255,255,255,0.38); font-size: 11.5px; line-height: 1.55;
  overflow: hidden; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  flex-shrink: 0;
}
.ilk-card-city {
  color: rgba(255,255,255,0.28); font-size: 10.5px; margin-top: auto;
  padding-top: 6px; font-weight: 500; letter-spacing: 0.2px;
}

/* Like / Pass overlay badges */
.ilk-like-badge, .ilk-pass-badge {
  position: absolute; top: 28px;
  font-size: 18px; font-weight: 900; letter-spacing: 1px;
  opacity: 0; pointer-events: none;
  padding: 5px 14px; border-radius: 6px; border-width: 3px; border-style: solid;
}
.ilk-like-badge { right: 20px; color: #22c55e; border-color: #22c55e; }
.ilk-pass-badge { left: 20px; color: #ef4444; border-color: #ef4444; }

/* Action buttons */
.ilk-actions {
  display: flex; gap: 16px; padding: 12px 32px 32px;
  flex-shrink: 0; justify-content: center;
}
.ilk-btn {
  flex: 1; max-width: 150px; padding: 14px 0;
  border-radius: 40px; border: none;
  font-size: 15px; font-weight: 700; font-family: Inter, sans-serif;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: transform 0.12s, opacity 0.12s;
}
.ilk-btn:active { transform: scale(0.96); opacity: 0.85; }
.ilk-pass {
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.7);
  border: 1.5px solid rgba(255,255,255,0.12);
}
.ilk-like {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #fff; box-shadow: 0 4px 16px rgba(34,197,94,0.35);
}

/* ═══════════════════════════════════════════════════════════════
   VISIT DATE + MEMO SECTION  (inside detail panel)
   ═══════════════════════════════════════════════════════════════ */
.visit-section {
  margin: 8px 0 4px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 10px;
  padding: 9px 12px 8px;
  display: flex; flex-direction: column; gap: 6px;
}
.vs-row {
  display: flex; align-items: center; gap: 7px;
}
.vs-label {
  font-size: 11px; font-weight: 600; color: #15803d;
  white-space: nowrap; min-width: 52px;
}
.vs-date-input {
  flex: 1; height: 28px; border: 1px solid #86efac; border-radius: 6px;
  padding: 0 8px; font-size: 12px; font-family: inherit;
  background: #fff; color: #111; outline: none;
  min-width: 0;
}
.vs-date-input:focus { border-color: #22c55e; }
.vs-note-input {
  flex: 1; height: 28px; border: 1px solid #86efac; border-radius: 6px;
  padding: 0 8px; font-size: 12px; font-family: inherit;
  background: #fff; color: #111; outline: none;
  min-width: 0;
}
.vs-note-input:focus { border-color: #22c55e; }
.vs-save-btn {
  flex-shrink: 0; height: 28px; padding: 0 10px;
  background: #22c55e; color: #fff; border: none; border-radius: 6px;
  font-size: 11px; font-weight: 700; cursor: pointer; font-family: inherit;
  transition: background 0.15s;
}
.vs-save-btn:hover { background: #16a34a; }
.vs-save-btn:active { transform: scale(0.96); }

/* ═══════════════════════════════════════════════════════════════
   MY PASSPORT STATS  (sidebar top)
   ═══════════════════════════════════════════════════════════════ */
#passport-stats {
  padding: 12px 14px 10px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.pp-hdr {
  display: flex; align-items: center; gap: 6px; margin-bottom: 6px;
}
.pp-icon { font-size: 14px; }
.pp-title {
  font-size: 11px; font-weight: 700; color: var(--text-primary);
  letter-spacing: -0.2px; text-transform: uppercase;
}
.pp-counts {
  display: flex; align-items: center; gap: 8px; margin-bottom: 8px;
}
.pp-count-vis, .pp-count-fav, .pp-count-route {
  font-size: 11px; color: var(--text-secondary);
}
.pp-num {
  font-size: 16px; font-weight: 700; color: var(--text-primary); line-height: 1;
}
.pp-sep { color: var(--border); font-size: 12px; }
.pp-cities { display: flex; flex-direction: column; gap: 4px; margin-bottom: 6px; }
.pp-city-row {
  display: flex; align-items: center; gap: 6px;
}
.pp-city-lbl {
  font-size: 10px; font-weight: 600; color: var(--text-secondary);
  width: 28px; flex-shrink: 0; text-align: right;
}
.pp-city-track {
  flex: 1; height: 5px; background: var(--border);
  border-radius: 3px; overflow: hidden;
}
.pp-city-fill {
  height: 100%; background: #D946A8; border-radius: 3px;
  transition: width 0.4s ease;
}
.pp-city-num {
  font-size: 10px; font-weight: 600; color: var(--text-primary);
  width: 18px; flex-shrink: 0;
}
.pp-recent {
  font-size: 10px; color: var(--text-secondary);
  border-top: 1px solid var(--border); padding-top: 6px; margin-top: 2px;
}
.pp-recent span { color: var(--text-primary); font-weight: 600; }

/* ═══════════════════════════════════════════════════════════════
   FLOATING SET ROUTE FAB  (mobile, Near Me active)
   ═══════════════════════════════════════════════════════════════ */
/* Radius control button — shown after walk-float is dismissed */
#walk-radius-ctrl-btn {
  position: fixed;
  bottom: 148px; left: 50%; transform: translateX(-50%);
  z-index: 2400;
  align-items: center; gap: 6px;
  padding: 8px 18px;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  color: #4338CA; border: 1.5px solid #C7D2FE; border-radius: 20px;
  font-size: 12px; font-weight: 600; font-family: Inter, sans-serif;
  box-shadow: 0 3px 14px rgba(79,70,229,0.18);
  cursor: pointer; white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.12s, box-shadow 0.12s;
}
#walk-radius-ctrl-btn:active {
  background: #EEF2FF;
  box-shadow: 0 1px 6px rgba(79,70,229,0.12);
}
.wrc-icon { font-size: 14px; line-height: 1; }
.wrc-label { letter-spacing: -0.2px; }

#set-route-fab {
  position: fixed;
  bottom: 148px; left: 50%; transform: translateX(-50%);
  z-index: 2500;
  display: none; align-items: center; gap: 6px;
  padding: 8px 18px;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  color: #b91c8a; border: 1.5px solid #f9a8d4; border-radius: 20px;
  font-size: 12px; font-weight: 600; font-family: Inter, sans-serif;
  box-shadow: 0 3px 14px rgba(217,70,168,0.18);
  cursor: pointer; white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.12s, box-shadow 0.12s;
}
#set-route-fab:active {
  background: #fdf2f8;
  box-shadow: 0 1px 6px rgba(217,70,168,0.12);
  transform: translateX(-50%);
}
.srf-icon { font-size: 14px; line-height: 1; }
.srf-label { letter-spacing: -0.2px; }

#walk-exit-btn {
  position: fixed;
  bottom: 112px; left: 50%; transform: translateX(-50%);
  z-index: 2490;
  display: none; align-items: center; gap: 5px;
  padding: 6px 14px;
  background: rgba(255,255,255,0.50);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  color: #888; border: 1px solid #ddd; border-radius: 16px;
  font-size: 11px; font-weight: 600; font-family: Inter, sans-serif;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  cursor: pointer; white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.12s;
}
#walk-exit-btn:active { background: #f0f0f0; }
.wex-label { letter-spacing: -0.1px; }

/* Desktop: Near Me FABs — side by side at bottom center, no bottom nav offset */
@media (min-width: 901px) {
  #set-route-fab {
    bottom: 32px;
    left: 50%;
    transform: translateX(calc(-100% - 6px));  /* left of center */
  }
  #set-route-fab:active { transform: translateX(calc(-100% - 6px)); }
  #walk-exit-btn {
    bottom: 32px;
    left: 50%;
    transform: translateX(6px);  /* right of center */
  }
}

/* ═══════════════════════════════════════════════════════════════
   ROUTE CUSTOM POPUP — photo / SV thumbnail
   ═══════════════════════════════════════════════════════════════ */
.rmp-thumb {
  width: 100%; height: 140px; overflow: hidden;
  background: #111; flex-shrink: 0;
  position: relative;
}
.rmp-thumb img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.rmp-thumb iframe {
  width: 100%; height: 100%; border: none; display: block;
  pointer-events: auto;
}
/* SV wrap — taller, orientation-aware, with optional toggle bar */
.rmp-sv-wrap {
  width: 100%; height: 220px; overflow: hidden;
  background: #111; flex-shrink: 0;
  display: flex; flex-direction: column;
}
.rmp-sv-tog-bar {
  display: flex; flex-shrink: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.rmp-sv-tog {
  flex: 1; padding: 6px 8px; font-size: 11px; font-weight: 600;
  color: rgba(255,255,255,0.55); background: none; border: none;
  cursor: pointer; transition: color 0.15s, background 0.15s;
  letter-spacing: 0.2px; font-family: inherit;
}
.rmp-sv-tog.active {
  color: #fff; background: rgba(255,255,255,0.18);
}
.rmp-sv-pane {
  flex: 1; position: relative; overflow: hidden;
}
.rmp-sv-pane iframe,
.rmp-sv-pane > div {
  position: absolute; inset: 0; width: 100%; height: 100%; border: none;
}
.rmp-body {
  padding: 10px 12px 12px;
  position: relative;
  background: #fff;
}

/* ═══════════════════════════════════════════════════════════════
   CITY & LOCATION POPUP  (bottom sheet, glassmorphism)
   ═══════════════════════════════════════════════════════════════ */
#city-loc-popup {
  position: fixed; inset: 0; z-index: 9999;
  display: none; flex-direction: column;
  align-items: center; justify-content: flex-end;
  padding-bottom: max(20px, env(safe-area-inset-bottom));
  font-family: Inter, -apple-system, sans-serif;
  opacity: 0; transition: opacity 0.28s ease;
}
#city-loc-popup.visible { opacity: 1; }

.clp-inner {
  background: rgba(255,255,255,0.33);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border: 1px solid rgba(255,255,255,0.45);
  border-radius: 26px 26px 20px 20px;
  padding: 6px 16px 20px;
  width: calc(100% - 24px);
  max-width: 520px;
  max-height: 88vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 -4px 40px rgba(0,0,0,0.22);
}

.clp-top-bar {
  display: flex; justify-content: center;
  padding: 10px 0 8px;
}
.clp-handle {
  width: 36px; height: 4px;
  background: rgba(0,0,0,0.18);
  border-radius: 2px;
}

.clp-close-btn {
  position: absolute; top: 12px; right: 14px;
  background: rgba(0,0,0,0.1); border: none; cursor: pointer;
  color: rgba(0,0,0,0.5); font-size: 13px;
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  -webkit-tap-highlight-color: transparent;
}
.clp-close-btn:active { background: rgba(0,0,0,0.2); }

.clp-sect-label {
  font-size: 10.5px; font-weight: 700;
  color: rgba(0,0,0,0.45);
  text-transform: uppercase; letter-spacing: 0.9px;
  margin: 12px 0 9px;
}

/* City grid */
.clp-city-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 8px; margin-bottom: 4px;
}
.clp-city-btn {
  background: rgba(255,255,255,0.55);
  border: 1.5px solid rgba(0,0,0,0.07);
  border-radius: 16px; padding: 14px 12px 12px;
  display: flex; flex-direction: column; align-items: flex-start;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: all 0.15s; text-align: left;
}
.clp-city-btn:active { transform: scale(0.97); }
.clp-city-btn.selected {
  background: rgba(0,0,0,0.78);
  border-color: rgba(0,0,0,0.8);
}
.clp-city-flag { font-size: 26px; line-height: 1; margin-bottom: 8px; }
.clp-city-name {
  font-size: 13px; font-weight: 700;
  color: rgba(0,0,0,0.82); line-height: 1.2;
}
.clp-city-sub {
  font-size: 10px; color: rgba(0,0,0,0.42); margin-top: 2px;
}
.clp-city-btn.selected .clp-city-name { color: #fff; }
.clp-city-btn.selected .clp-city-sub  { color: rgba(255,255,255,0.55); }

/* Location method row */
.clp-loc-row {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 8px; margin-bottom: 14px;
}
.clp-loc-btn {
  background: rgba(255,255,255,0.55);
  border: 1.5px solid rgba(0,0,0,0.07);
  border-radius: 16px; padding: 14px 12px 12px;
  display: flex; flex-direction: column; align-items: flex-start;
  gap: 4px; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: all 0.15s;
}
.clp-loc-btn:active { transform: scale(0.97); }
.clp-loc-btn.selected {
  background: rgba(217,70,168,0.82);
  border-color: rgba(217,70,168,0.9);
}
.clp-loc-icon { font-size: 24px; line-height: 1; }
.clp-loc-text {
  font-size: 12px; font-weight: 700;
  color: rgba(0,0,0,0.8); line-height: 1.3;
}
.clp-loc-sub {
  font-size: 10px; color: rgba(0,0,0,0.4);
}
.clp-loc-btn.selected .clp-loc-text { color: #fff; }
.clp-loc-btn.selected .clp-loc-sub  { color: rgba(255,255,255,0.65); }

/* Go button */
.clp-go {
  display: block; width: 100%;
  padding: 16px; border: none;
  background: rgba(0,0,0,0.65);
  border-radius: 18px; color: rgba(255,255,255,0.35);
  font-size: 15px; font-weight: 700;
  font-family: Inter, -apple-system, sans-serif;
  cursor: pointer; letter-spacing: -0.2px;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.18s, color 0.18s;
  pointer-events: none;
}
.clp-go.ready {
  background: rgba(0,0,0,0.82);
  color: #fff;
  pointer-events: auto;
}
.clp-go.ready:active { opacity: 0.75; }

/* ═══════════════════════════════════════════════════════════════
   SIDEBAR ACTION BUTTONS  (My Location / Favorites / Route / IFL)
   ═══════════════════════════════════════════════════════════════ */

/* ── Sidebar city selector row ─────────────────────────────── */
.sb-city-row {
  display: flex; align-items: center; justify-content: flex-start;
  padding: 8px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  flex-shrink: 0;
}
#sb-city-select {
  padding: 4px 22px 4px 8px; border-radius: 8px;
  border: 1.5px solid var(--border);
  background: var(--surface); color: var(--text-primary);
  font-size: 11px; font-weight: 600; font-family: inherit;
  cursor: pointer; appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='9' height='9' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2.8'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 6px center;
  transition: border-color 0.15s;
}
#sb-city-select:focus { outline: none; border-color: #111; }

/* ── Review Filtered List button ───────────────────────────── */
.sb-review-btn {
  display: flex; align-items: center; justify-content: flex-start; gap: 8px;
  width: 100%; padding: 14px;
  background: var(--surface); border: none; border-top: 1px solid var(--border);
  font-size: 13px; font-weight: 500; color: var(--text-primary);
  cursor: pointer; font-family: inherit; flex-shrink: 0;
  transition: background 0.12s;
  margin-top: auto;
}
.sb-review-btn:hover { background: var(--bg); }
.sb-review-btn svg { opacity: 0.6; }

/* ── List Overlay ───────────────────────────────────────────── */
#list-overlay {
  position: fixed;
  top: calc(var(--mob-header-h) + var(--safe-top));
  bottom: 0; left: 0; right: 0;
  z-index: 700;
  display: none; align-items: flex-start; justify-content: center;
  padding: 10px 12px;
  pointer-events: none;
}
#list-overlay.visible {
  display: flex;
  pointer-events: auto;
}
.list-overlay-box {
  background: rgba(255,255,255,0.33);
  backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px);
  border-radius: 18px;
  width: 100%; max-width: 420px;
  height: 100%;
  display: flex; flex-direction: column;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0,0,0,0.18);
}
/* Desktop: list overlay is a fixed side panel glued to the sidebar */
@media (min-width: 901px) {
  #list-overlay {
    top: var(--header-h);
    left: var(--sidebar-w);
    right: auto;
    bottom: 0;
    width: 360px;
    padding: 0;
    background: none;
    z-index: 500;
    justify-content: flex-start;
  }
  .list-overlay-box {
    border-radius: 0;
    max-width: none;
    width: 100%;
    background: var(--surface);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: 4px 0 16px rgba(0,0,0,0.08);
    border-right: 1px solid var(--border);
  }
}
.list-overlay-hdr {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  background: rgba(255,255,255,0.5);
  flex-shrink: 0;
}
.list-overlay-hdr #list-meta { font-size: 11px; color: var(--text-secondary); flex: 1; font-weight: 500; }
.list-overlay-hdr #sort-sel {
  font-size: 11px; padding: 3px 6px; border: 1px solid rgba(0,0,0,0.15);
  border-radius: 6px; background: rgba(255,255,255,0.7); color: var(--text-primary);
  flex-shrink: 0;
}
.list-overlay-close {
  background: rgba(0,0,0,0.07); border: none; cursor: pointer;
  color: #666; font-size: 14px; border-radius: 50%;
  width: 26px; height: 26px; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: background 0.12s;
}
.list-overlay-close:hover { background: rgba(0,0,0,0.15); }
#list-overlay .loc-list { flex: 1; overflow-y: auto; }
#list-overlay .loc-card { background: rgba(255,255,255,0.5); }
#list-overlay .loc-card:hover { background: rgba(255,255,255,0.7); }

/* ── World-mode lock banner (desktop sidebar) ── */
#world-lock-banner {
  padding: 22px 14px 18px;
  text-align: center;
  border-bottom: 0.5px solid var(--border);
  flex-shrink: 0;
}
.wlb-emoji { font-size: 32px; margin-bottom: 8px; }
.wlb-text { font-size: 11px; color: #888; line-height: 1.7; }
/* Dim action buttons when world-locked */
.sb-actions.world-locked .sba-btn {
  opacity: 0.22;
  pointer-events: none;
  filter: grayscale(1);
}
/* Lock banner hidden on mobile (uses bottom sheet instead) */
@media (max-width: 900px) {
  #world-lock-banner { display: none !important; }
}

/* ── Mobile city selection bottom sheet ── */
#city-sheet {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: 18px 18px 0 0;
  padding: 10px 20px calc(28px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -4px 28px rgba(0,0,0,0.13);
  z-index: 450;
  transform: translateY(100%);
  transition: transform 0.32s cubic-bezier(.4,0,.2,1);
}
#city-sheet.visible { transform: translateY(0); }
.cs-handle {
  width: 36px; height: 4px;
  background: #ccc; border-radius: 2px;
  margin: 0 auto 14px;
}
.cs-title {
  font-size: 13px; font-weight: 700;
  color: #111; margin-bottom: 14px;
  text-align: center;
}
.cs-chips {
  display: flex; flex-wrap: wrap;
  gap: 10px; justify-content: center;
}
.cs-chip {
  padding: 10px 20px;
  border-radius: 24px;
  font-size: 13px; font-weight: 600;
  background: #f0f0ee; color: #333;
  border: 0.5px solid #ddd;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.cs-chip:active { background: #111; color: #fff; border-color: #111; }
/* Bottom sheet only on mobile */
@media (min-width: 901px) {
  #city-sheet { display: none !important; }
}

.sb-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
  padding: 10px 12px 8px;
  flex-shrink: 0;
}
.sba-btn {
  /* Pixel-retro style: flat gray fill, hard 2px border, offset drop shadow */
  background: #d8d8d8;
  border: 2px solid #1a1a1a;
  border-radius: 2px;
  padding: 0 14px 0 16px;
  height: 40px;
  display: flex; flex-direction: row;
  align-items: center; justify-content: flex-start;
  gap: 11px;
  cursor: pointer;
  font-family: 'Space Mono', 'Courier New', monospace;
  /* Hard offset shadow — no blur, Game Boy / Win95 aesthetic */
  box-shadow: 3px 3px 0 #1a1a1a;
  -webkit-tap-highlight-color: transparent;
  position: relative; overflow: hidden;
  transition: none;
  color: #1a1a1a;
}
/* All 5 buttons share the same grayscale */
#sba-likable, #sba-loc, #sba-fav, #sba-route, #sba-ifl { background: #d8d8d8; }
.sba-btn:hover {
  background: #cacaca;
  transform: translate(1px, 1px);
  box-shadow: 2px 2px 0 #1a1a1a;
}
.sba-btn:active {
  background: #b8b8b8;
  transform: translate(3px, 3px);
  box-shadow: none;
}
.sba-icon {
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  width: 26px;
}
.sba-label {
  font-size: 11px; font-weight: 700;
  line-height: 1.2; white-space: nowrap;
  text-align: left; text-transform: uppercase;
  letter-spacing: 0.04em;
}
/* Active/toggled state — pressed-in look */
.sba-btn.sba-active {
  background: #b8b8b8;
  transform: translate(3px, 3px);
  box-shadow: none;
}
/* ── Explore popup ────────────────────────────────────────── */
#explore-overlay {
  position: fixed; inset: 0; z-index: 1199; background: transparent;
}
#explore-popup {
  position: fixed;
  left: calc(var(--sidebar-w, 300px) + 10px);
  top: 72px;
  z-index: 1200;
  background: rgba(255,255,255,0.72);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255,255,255,0.55);
  border-radius: 16px;
  padding: 8px;
  display: flex; flex-direction: column; gap: 6px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.13), 0 2px 8px rgba(0,0,0,0.07);
  min-width: 230px;
  animation: explore-in 0.16s ease;
}
@keyframes explore-in {
  from { opacity: 0; transform: translateY(-6px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.explore-popup-btn {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 14px;
  border: none; border-radius: 11px;
  background: rgba(255,255,255,0.45);
  cursor: pointer; text-align: left;
  transition: background 0.12s;
  -webkit-tap-highlight-color: transparent;
}
.explore-popup-btn:hover { background: rgba(255,255,255,0.82); }
.explore-popup-icon {
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; color: #111;
}
.explore-popup-title {
  display: block; font-size: 14px; font-weight: 700;
  color: #111; font-family: Inter, -apple-system, sans-serif;
}
.explore-popup-sub {
  display: block; font-size: 11px; color: #555; margin-top: 2px;
  font-family: Inter, -apple-system, sans-serif;
}
/* Mobile: popup anchors below header on full width */
@media (max-width: 767px) {
  #explore-popup {
    left: 10px; right: 10px; top: 60px;
    min-width: unset;
  }
}
/* ═══════════════════════════════════════════════════════════════
   MY LOCATION POPUP  (center modal)
   ═══════════════════════════════════════════════════════════════ */
#my-loc-popup {
  position: fixed; inset: 0; z-index: 9990;
  display: none; flex-direction: column;
  align-items: center; justify-content: center;
  background: rgba(0,0,0,0.38);
  font-family: Inter, -apple-system, sans-serif;
  opacity: 0; transition: opacity 0.22s ease;
}
#my-loc-popup.visible {
  display: flex; opacity: 1;
}
.mlp-box {
  background: #fff;
  border-radius: 22px;
  padding: 24px 20px 16px;
  width: calc(100% - 48px);
  max-width: 340px;
  box-shadow: 0 12px 48px rgba(0,0,0,0.28);
}
.mlp-title {
  font-size: 18px; font-weight: 800; color: #111;
  margin-bottom: 3px;
}
.mlp-subtitle {
  font-size: 12px; color: rgba(0,0,0,0.4);
  margin-bottom: 18px;
}
.mlp-btn {
  width: 100%; padding: 14px 16px;
  background: #fff;
  border: 1.5px solid rgba(0,0,0,0.09);
  border-radius: 15px;
  display: flex; align-items: center; gap: 14px;
  cursor: pointer; margin-bottom: 9px;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s, transform 0.1s;
  text-align: left;
}
.mlp-btn:active {
  background: #f4f4f4; transform: scale(0.98);
}
.mlp-btn-icon { font-size: 28px; line-height: 1; flex-shrink: 0; }
.mlp-btn-text {
  display: flex; flex-direction: column;
  font-size: 14px; font-weight: 700; color: #111;
}
.mlp-btn-sub {
  font-size: 11px; font-weight: 400;
  color: rgba(0,0,0,0.42); margin-top: 2px;
}
.mlp-cancel {
  display: block; width: 100%;
  padding: 12px 0; border: none;
  background: none;
  font-size: 14px; font-weight: 500;
  color: rgba(0,0,0,0.38);
  cursor: pointer; font-family: inherit;
  -webkit-tap-highlight-color: transparent;
  margin-top: 4px;
}
.mlp-cancel:active { color: rgba(0,0,0,0.7); }

/* My Journey legend (visited / favorites / route explanation) */
.pp-legend {
  margin-top: 8px;
  border-top: 1px solid var(--border);
  padding-top: 8px;
  display: flex; flex-direction: column; gap: 5px;
}
.pp-legend-row {
  display: flex; align-items: flex-start; gap: 8px;
}
.pp-legend-icon {
  font-size: 11px; font-weight: 800;
  width: 18px; height: 18px;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 1px;
}
.pp-leg-vis  { background: #22c55e; color: #fff; font-size: 9px; }
.pp-leg-fav  { background: #D946A8; color: #fff; font-size: 10px; }
.pp-leg-route { background: #111; color: #fff; font-size: 9px; }
.pp-legend-desc {
  font-size: 10.5px; color: rgb(80,80,80);
  line-height: 1.45;
}

/* ─────────────────────────────────────────────────────────────
   ROUTE PRE-SELECTION MODAL
   ───────────────────────────────────────────────────────────── */
.route-presel-overlay {
  position: fixed; inset: 0; z-index: 9500;
  background: rgba(0,0,0,0.45);
  display: none; align-items: center; justify-content: center;
  font-family: Inter, -apple-system, sans-serif;
}
.route-presel-overlay.open { display: flex; }
.rps-box {
  background: white; border-radius: 18px;
  padding: 24px 20px; max-width: 380px; width: 92vw;
  max-height: 78vh; overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.22);
}
.rps-title { font-size: 15px; font-weight: 700; color: #111; margin-bottom: 5px; }
.rps-sub { font-size: 12px; color: #666; margin-bottom: 14px; line-height: 1.45; }
.rps-section-label {
  font-size: 10px; font-weight: 600; letter-spacing: 0.6px;
  text-transform: uppercase; color: #999; margin-bottom: 8px;
}
.rps-hoods {
  display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px;
}
.rps-hood-chip {
  padding: 6px 12px; border-radius: 99px;
  border: 1.5px solid #E5E7EB; background: white;
  font-size: 12px; color: #111; cursor: pointer;
  font-family: inherit; transition: all 0.12s;
}
.rps-hood-chip:hover { background: #f5f5f5; border-color: #999; }
.rps-hood-chip:active { opacity: 0.75; }
.rps-hood-chip.selected {
  background: #111; color: white; border-color: #111;
}
.rps-divider {
  text-align: center; font-size: 11px; color: #bbb;
  margin: 8px 0 12px; position: relative;
}
.rps-divider::before {
  content: ''; position: absolute;
  top: 50%; left: 0; right: 0; height: 1px; background: #E5E7EB; z-index: 0;
}
.rps-divider span { background: white; padding: 0 8px; position: relative; z-index: 1; }
.rps-btns { display: flex; gap: 8px; margin-top: 4px; flex-wrap: wrap; }
.rps-proceed-btn {
  flex: 1; min-width: 80px; padding: 11px; border-radius: 11px;
  background: #4F46E5; color: white; border: none;
  font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit;
  transition: opacity 0.12s;
}
.rps-proceed-btn:active { opacity: 0.75; }
.rps-manual-btn {
  flex: 1; min-width: 80px; padding: 11px; border-radius: 11px;
  background: #111; color: white; border: none;
  font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit;
  transition: opacity 0.12s;
}
.rps-manual-btn:active { opacity: 0.7; }
.rps-cancel-btn {
  flex: 1; min-width: 80px; padding: 11px; border-radius: 11px;
  background: #F3F4F6; color: #374151; border: none;
  font-size: 13px; cursor: pointer; font-family: inherit;
  transition: background 0.12s;
}
.rps-cancel-btn:active { background: #E5E7EB; }
.rps-set-loc-btn {
  width: 100%; margin-top: 10px; padding: 11px; border-radius: 11px;
  background: #EEF2FF; color: #4338CA; border: 1px solid #C7D2FE;
  font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit;
  transition: background 0.12s;
}
.rps-set-loc-btn:active { background: #E0E7FF; }
/* "View details" button in map marker mini-popup */
.rmp-open-btn {
  width: 100%; margin-top: 8px; padding: 7px 10px; border-radius: 8px;
  background: #111; color: #fff; border: none;
  font-size: 12px; font-weight: 600; font-family: inherit; cursor: pointer;
  transition: opacity 0.12s; text-align: center;
}
.rmp-open-btn:active { opacity: 0.75; }

/* ═══════════════════════════════════════════════════════════════
   SAVE ROUTE DIALOG
   ═══════════════════════════════════════════════════════════════ */
.aw-dialog-overlay {
  position: fixed; inset: 0; z-index: 9600;
  background: rgba(0,0,0,0.48);
  display: flex; align-items: center; justify-content: center;
  font-family: Inter, -apple-system, sans-serif;
}
.aw-dialog-box {
  background: #fff; border-radius: 16px;
  padding: 24px; width: min(340px, 90vw);
  box-shadow: 0 8px 40px rgba(0,0,0,0.22);
}
.aw-dialog-title {
  font-size: 16px; font-weight: 700; color: #111; margin-bottom: 5px;
}
.aw-dialog-sub {
  font-size: 12px; color: #888; margin-bottom: 14px;
}
.aw-dialog-input {
  width: 100%; box-sizing: border-box;
  border: 1.5px solid #ddd; border-radius: 8px;
  padding: 10px 12px; font-size: 13px;
  font-family: inherit; color: #111;
  outline: none; margin-bottom: 16px;
  transition: border-color 0.15s;
}
.aw-dialog-input:focus { border-color: #111; }
.aw-dialog-btns { display: flex; gap: 8px; justify-content: flex-end; }
.aw-dialog-btn {
  padding: 8px 18px; border-radius: 8px;
  font-size: 13px; font-weight: 600;
  cursor: pointer; border: none; font-family: inherit;
}
.aw-dialog-cancel  { background: #f0f0f0; color: #555; }
.aw-dialog-confirm { background: #111; color: #fff; }
.aw-dialog-confirm:hover { background: #333; }

/* ═══════════════════════════════════════════════════════════════
   SAVED ROUTES OVERLAY
   ═══════════════════════════════════════════════════════════════ */
.aw-saved-routes-overlay {
  position: fixed; inset: 0; z-index: 9400;
  background: rgba(0,0,0,0.45);
  display: flex; align-items: flex-end; justify-content: center;
  font-family: Inter, -apple-system, sans-serif;
}
@media (min-width: 901px) {
  .aw-saved-routes-overlay { align-items: center; }
}
.asr-panel {
  background: #fff;
  border-radius: 20px 20px 0 0;
  width: 100%; max-width: 520px;
  max-height: 78vh;
  display: flex; flex-direction: column;
  overflow: hidden;
  box-shadow: 0 -4px 32px rgba(0,0,0,0.18);
}
@media (min-width: 901px) {
  .asr-panel { border-radius: 16px; max-height: 70vh; }
}
.asr-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 16px 12px; border-bottom: 1px solid #eee; flex-shrink: 0;
}
.asr-title { font-size: 15px; font-weight: 700; color: #111; }
.asr-header-btns { display: flex; gap: 8px; align-items: center; }
.asr-export-btn {
  background: #f4f4f4; border: none; border-radius: 6px;
  padding: 5px 10px; font-size: 11px; font-weight: 600;
  color: #555; cursor: pointer; font-family: inherit;
}
.asr-export-btn:hover { background: #e0e0e0; }
.asr-close-btn {
  background: none; border: none; font-size: 17px;
  color: #888; cursor: pointer; padding: 2px 6px; line-height: 1;
}
.asr-list { flex: 1; overflow-y: auto; padding: 6px 0; }
.asr-empty {
  padding: 36px 16px; text-align: center;
  font-size: 13px; color: #aaa;
}
.asr-row {
  display: flex; align-items: center;
  padding: 12px 14px; gap: 10px;
  border-bottom: 1px solid #f0f0f0;
}
.asr-row:last-child { border-bottom: none; }
.asr-row-main { flex: 1; min-width: 0; }
.asr-row-name {
  font-size: 13px; font-weight: 600; color: #111;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: 5px;
}
.asr-row-meta { display: flex; flex-wrap: wrap; gap: 4px; }
.asr-tag {
  font-size: 10px; color: #777;
  background: #f5f5f5; border-radius: 4px; padding: 2px 6px;
}
.asr-date { color: #bbb; }
.asr-row-btns { display: flex; gap: 6px; align-items: center; flex-shrink: 0; }
.asr-load-btn {
  background: #111; color: #fff; border: none; border-radius: 7px;
  padding: 7px 13px; font-size: 11px; font-weight: 600;
  cursor: pointer; font-family: inherit; white-space: nowrap;
}
.asr-load-btn:hover { background: #333; }
.asr-del-btn {
  background: none; border: 1px solid #eee; border-radius: 7px;
  padding: 5px 9px; font-size: 13px; cursor: pointer; color: #999; line-height: 1;
}
.asr-del-btn:hover { background: #fff0f0; border-color: #ffcccc; }

/* ═══════════════════════════════════════════════════════════════
   ROUTE MANAGER POPUP  (multi-level: home → saved | settings)
   ═══════════════════════════════════════════════════════════════ */
.arm-overlay {
  position: fixed; inset: 0; z-index: 9450;
  background: rgba(0,0,0,0.45);
  display: flex; align-items: flex-end; justify-content: center;
  font-family: Inter, -apple-system, sans-serif;
}
@media (min-width: 901px) { .arm-overlay { align-items: center; } }
.arm-panel {
  background: #fff; border-radius: 20px 20px 0 0;
  width: 100%; max-width: 480px; max-height: 82vh;
  display: flex; flex-direction: column; overflow: hidden;
  box-shadow: 0 -4px 32px rgba(0,0,0,0.18);
  position: relative;
}
@media (min-width: 901px) { .arm-panel { border-radius: 16px; max-height: 74vh; } }

/* ── Header (shared) ── */
.arm-header {
  display: flex; align-items: center; gap: 6px;
  padding: 15px 14px 13px; border-bottom: 1px solid #eee; flex-shrink: 0;
}
.arm-title { flex: 1; font-size: 15px; font-weight: 700; color: #111; }
.arm-back {
  background: none; border: none; font-size: 20px; font-weight: 700;
  color: #555; cursor: pointer; padding: 0 8px 0 2px; line-height: 1;
}
.arm-back:hover { color: #111; }
.arm-close {
  background: none; border: none; font-size: 17px;
  color: #888; cursor: pointer; padding: 2px 4px; line-height: 1;
}

/* ── Home: 3-button menu ── */
.arm-menu { padding: 10px 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.arm-item {
  display: flex; align-items: center; gap: 14px;
  background: #f9f9f7; border: 1px solid #e8e8e4; border-radius: 14px;
  padding: 14px 16px; cursor: pointer; text-align: left; width: 100%;
  font-family: inherit; transition: background 0.12s;
}
.arm-item:hover { background: #f0f0ec; }
.arm-item-icon { font-size: 20px; flex-shrink: 0; }
.arm-item-text { flex: 1; min-width: 0; }
.arm-item-label { display: block; font-size: 13px; font-weight: 700; color: #111; }
.arm-item-sub   { display: block; font-size: 11px; color: #888; margin-top: 2px; }
.arm-item-arrow { font-size: 18px; color: #ccc; flex-shrink: 0; }
.arm-item-create { background: #111; border-color: #111; }
.arm-item-create:hover { background: #333; border-color: #333; }
.arm-item-create .arm-item-label { color: #fff; }
.arm-item-create .arm-item-sub   { color: rgba(255,255,255,0.6); }

/* ── Saved Routes list ── */
.arm-scrollable { flex: 1; overflow-y: auto; }
.arm-empty { padding: 36px 16px; text-align: center; font-size: 13px; color: #aaa; }
.arm-footer { padding: 10px 14px; border-top: 1px solid #eee; flex-shrink: 0; }
.arm-export-btn {
  width: 100%; padding: 10px; border-radius: 8px;
  background: #f4f4f4; border: none; font-size: 12px; font-weight: 600;
  color: #555; cursor: pointer; font-family: inherit;
}
.arm-export-btn:hover { background: #e8e8e8; }
.arm-route-row {
  display: flex; align-items: center; padding: 12px 14px; gap: 10px;
  border-bottom: 1px solid #f0f0f0;
}
.arm-route-row:last-child { border-bottom: none; }
.arm-route-main { flex: 1; min-width: 0; }
.arm-route-name {
  font-size: 13px; font-weight: 600; color: #111;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 5px;
}
.arm-route-meta { display: flex; flex-wrap: wrap; gap: 4px; }
.arm-tag {
  font-size: 10px; color: #777;
  background: #f5f5f5; border-radius: 4px; padding: 2px 6px;
}
.arm-tag-date { color: #bbb; }
.arm-route-btns { display: flex; gap: 6px; align-items: center; flex-shrink: 0; }
.arm-load-btn {
  background: #111; color: #fff; border: none; border-radius: 7px;
  padding: 7px 12px; font-size: 11px; font-weight: 600;
  cursor: pointer; font-family: inherit; white-space: nowrap;
}
.arm-load-btn:hover { background: #333; }
.arm-del-btn {
  background: none; border: 1px solid #eee; border-radius: 7px;
  padding: 5px 9px; font-size: 13px; cursor: pointer; color: #999; line-height: 1;
}
.arm-del-btn:hover { background: #fff0f0; border-color: #ffcccc; }

/* ── Settings ── */
.arm-settings { flex: 1; overflow-y: auto; padding: 2px 0 8px; }
.arm-srow {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid #f2f2f0; gap: 14px;
}
.arm-srow:last-child { border-bottom: none; }
.arm-slabel { flex: 1; min-width: 0; }
.arm-sname { display: block; font-size: 13px; font-weight: 600; color: #111; }
.arm-sdesc { display: block; font-size: 11px; color: #888; margin-top: 2px; }
.arm-sctrl { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.arm-num {
  width: 58px; padding: 6px 8px; border: 1.5px solid #ddd;
  border-radius: 7px; font-size: 13px; font-family: inherit;
  color: #111; text-align: center; outline: none;
}
.arm-num:focus { border-color: #111; }
.arm-unit { font-size: 11px; color: #888; }
/* Toggle */
.arm-toggle { position: relative; display: inline-block; width: 42px; height: 24px; cursor: pointer; }
.arm-toggle input { opacity: 0; width: 0; height: 0; }
.arm-toggle-track {
  position: absolute; inset: 0; background: #ddd; border-radius: 24px;
  transition: background 0.2s;
}
.arm-toggle-thumb {
  position: absolute; width: 18px; height: 18px;
  left: 3px; top: 3px; background: #fff; border-radius: 50%;
  transition: transform 0.2s; box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.arm-toggle input:checked ~ .arm-toggle-track { background: #111; }
.arm-toggle input:checked ~ .arm-toggle-track .arm-toggle-thumb { transform: translateX(18px); }
.arm-srow-apply { justify-content: center; padding: 16px; }
.arm-apply-btn {
  background: #111; color: #fff; border: none; border-radius: 10px;
  padding: 10px 28px; font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit;
}
.arm-apply-btn:hover { background: #333; }
.arm-srow-export { background: #fafafa; }
.arm-export-inline {
  background: #f0f0f0; border: none; border-radius: 7px;
  padding: 7px 12px; font-size: 11px; font-weight: 600;
  color: #555; cursor: pointer; font-family: inherit; flex-shrink: 0;
}
.arm-export-inline:hover { background: #e4e4e4; }
/* Toast inside panel */
.arm-toast {
  position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%);
  background: #111; color: #fff; font-size: 12px; padding: 7px 18px;
  border-radius: 20px; white-space: nowrap; pointer-events: none;
  z-index: 1;
}

/* ─────────────────────────────────────────────────────────────
   ROUTE 6KM WARNING DIALOG
   ───────────────────────────────────────────────────────────── */
.route-6km-overlay {
  position: fixed; inset: 0; z-index: 9500;
  background: rgba(0,0,0,0.45);
  display: none; align-items: center; justify-content: center;
  font-family: Inter, -apple-system, sans-serif;
}
.route-6km-overlay.open { display: flex; }
.r6km-box {
  background: white; border-radius: 18px;
  padding: 24px 20px 20px; max-width: 320px; width: 88vw;
  box-shadow: 0 20px 60px rgba(0,0,0,0.22); text-align: center;
}
.r6km-icon { font-size: 30px; margin-bottom: 10px; }
.r6km-msg {
  font-size: 14px; color: #111; line-height: 1.55;
  margin-bottom: 18px; font-weight: 500;
}
.r6km-btns { display: flex; gap: 8px; }
.r6km-yes {
  flex: 1; padding: 11px; border-radius: 11px;
  background: #111; color: white; border: none;
  font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit;
  transition: opacity 0.12s;
}
.r6km-yes:active { opacity: 0.7; }
.r6km-no {
  flex: 1; padding: 11px; border-radius: 11px;
  background: #F3F4F6; color: #374151; border: none;
  font-size: 13px; cursor: pointer; font-family: inherit;
  transition: background 0.12s;
}
.r6km-no:active { background: #E5E7EB; }

/* ══════════════════════════════════════════════════════════════════
   MY PAGE POPUP
   ══════════════════════════════════════════════════════════════════ */
#my-page-overlay {
  opacity: 0;
  transition: opacity 0.22s ease;
  pointer-events: none;
}
#my-page-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

.arm-body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }

/* ── Sections ── */
.mpp-section {
  border: 1px solid #eee; border-radius: 14px;
  padding: 14px 14px 16px; margin-bottom: 14px;
  background: #fafaf8;
}
.mpp-sec-title {
  font-size: 13px; font-weight: 700; color: #111;
  margin-bottom: 10px; letter-spacing: 0.01em;
}
.mpp-sec-sub {
  font-size: 11px; color: #888; margin-bottom: 10px; line-height: 1.5;
}
.mpp-row-label {
  font-size: 12px; color: #444; font-weight: 600; margin-bottom: 6px;
}

/* ── Button row ── */
.mpp-btn-row {
  display: flex; gap: 7px;
}
.mpp-btn {
  flex: 1; padding: 8px 4px; border-radius: 9px;
  font-size: 11.5px; font-weight: 600; cursor: pointer;
  font-family: inherit; border: 1px solid transparent;
  transition: opacity 0.12s, background 0.12s;
  white-space: nowrap;
}
.mpp-btn:active { opacity: 0.7; }
.mpp-btn-export {
  background: #111; color: #fff; border-color: #111;
}
.mpp-btn-import {
  background: #fff; color: #111; border-color: #ddd;
}
.mpp-btn-delete {
  background: #fff0f0; color: #c0392b; border-color: #f5c6c6;
}
.mpp-btn-dbrefresh {
  background: #eaf4ff; color: #1a6fb5; border-color: #b3d7f5;
  width: 100%;
}
.mpp-btn-dbrefresh:disabled {
  opacity: 0.6; cursor: not-allowed;
}

/* ── City grid ── */
.mpp-city-grid {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px;
}
@media (max-width: 400px) {
  .mpp-city-grid { grid-template-columns: repeat(3, 1fr); }
}
.mpp-city-btn {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 8px 4px; border-radius: 10px;
  background: #fff; border: 1.5px solid #e0e0de;
  cursor: pointer; font-family: inherit;
  transition: background 0.1s, border-color 0.1s;
}
.mpp-city-btn span:first-child { font-size: 18px; line-height: 1; }
.mpp-city-btn span:last-child  { font-size: 10px; color: #555; font-weight: 500; }
.mpp-city-btn.mpp-city-sel {
  background: #111; border-color: #111;
}
.mpp-city-btn.mpp-city-sel span:last-child { color: rgba(255,255,255,0.85); }

/* ── Stats ── */
.mpp-stats-row {
  display: flex; gap: 8px; margin-bottom: 10px;
}
.mpp-stat-card {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  background: #fff; border: 1px solid #eee; border-radius: 10px;
  padding: 10px 6px;
}
.mpp-stat-num {
  font-size: 22px; font-weight: 800; color: #111; line-height: 1;
}
.mpp-stat-lbl {
  font-size: 10px; color: #888; font-weight: 500;
}
.mpp-coming-soon {
  font-size: 12px; color: #aaa; text-align: center; padding: 6px 0 2px;
}

/* ── Search autocomplete dropdown ──────────────────────── */
#search-ac {
  display: none;
  position: fixed;   /* fixed so header overflow:hidden can't clip it */
  /* top/left/width set dynamically by JS via getBoundingClientRect */
  background: #fff;
  border: 1px solid #e0e0dc;
  border-radius: 10px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.13);
  z-index: 9999;
  overflow: hidden;
  max-height: 340px;
  overflow-y: auto;
}
#search-ac.open { display: block; }
.ac-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 13px;
  cursor: pointer;
  transition: background 0.1s;
  border-bottom: 1px solid #f3f3f0;
}
.ac-item:last-child { border-bottom: none; }
.ac-item:hover,
.ac-item.ac-focused { background: #f5f5f0; }
.ac-thumb {
  width: 36px; height: 36px; border-radius: 6px;
  flex-shrink: 0; background: #e8e8e4;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.ac-thumb-icon {
  width: 30px; height: 30px; object-fit: contain; flex-shrink: 0;
  mix-blend-mode: multiply;
}
.ac-body { flex: 1; min-width: 0; }
.ac-name {
  font-size: 12px; font-weight: 600; color: #111;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ac-name mark {
  background: #fef3c7; color: #92400e;
  border-radius: 2px; padding: 0 1px; font-weight: 700;
}
.ac-meta {
  font-size: 10.5px; color: #999; margin-top: 1px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ac-meta mark {
  background: transparent; color: #c2410c; font-weight: 600;
}
.ac-badge {
  font-size: 9px; font-weight: 700;
  border-radius: 4px; padding: 2px 6px;
  flex-shrink: 0; white-space: nowrap; text-transform: capitalize;
}
.ac-footer {
  padding: 7px 13px;
  font-size: 11px; color: #aaa; text-align: center;
  background: #fafaf8; cursor: pointer;
}
.ac-footer:hover { color: #555; background: #f3f3f0; }

/* ── Highlighted / active map marker ──────────────────────────── */
/* Applied via JS: highlightMarker(id)           → glow only      */
/*                 highlightMarker(id, true)      → glow + blink   */
/*                                                                  */
/* IMPORTANT: Leaflet positions markers via transform:translate3d() */
/* on the outer .leaflet-marker-icon element.                       */
/* → filter/opacity go on the outer el (.marker-highlight)         */
/* → transform:scale goes on the inner child div only              */
.marker-highlight {
  z-index: 9999 !important;
  animation: marker-glow 0.85s ease-in-out infinite alternate;
  overflow: visible !important;
  will-change: filter;
}

/* Red expanding ring — centered on the marker element */
.marker-highlight::before {
  content: '';
  position: absolute;
  width: 44px;
  height: 44px;
  border: 2.5px solid rgba(220, 30, 30, 0.95);
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.6);
  animation: marker-ring 1.4s ease-out infinite;
  pointer-events: none;
  box-sizing: border-box;
}

/* Scale the inner icon wrapper — keeps Leaflet's translate3d intact */
.marker-highlight > div {
  animation: marker-scale 0.85s ease-in-out infinite alternate;
  transform-origin: bottom center;
  will-change: transform;
}

/* Blink variant: add .marker-blink alongside .marker-highlight */
.marker-highlight.marker-blink {
  animation: marker-glow 0.85s ease-in-out infinite alternate,
             marker-blink 1.1s ease-in-out infinite;
}

@keyframes marker-glow {
  from {
    filter: drop-shadow(0 0 5px  rgba(255,220,0,1.0))
            drop-shadow(0 0 10px rgba(255,150,0,0.8))
            drop-shadow(0 0 2px  rgba(255,255,255,0.7));
  }
  to {
    filter: drop-shadow(0 0 14px rgba(255,235,0,1.0))
            drop-shadow(0 0 28px rgba(255,170,0,0.95))
            drop-shadow(0 0 48px rgba(255,210,0,0.55))
            drop-shadow(0 0 4px  rgba(255,255,255,1.0));
  }
}

/* Ring expands outward and fades — repeating sonar pulse */
@keyframes marker-ring {
  0%   { transform: translate(-50%, -50%) scale(0.6);  opacity: 1;   border-width: 3px; }
  60%  { transform: translate(-50%, -50%) scale(1.6);  opacity: 0.5; border-width: 2px; }
  100% { transform: translate(-50%, -50%) scale(2.1);  opacity: 0;   border-width: 1px; }
}

@keyframes marker-scale {
  from { transform: scale(1.0); }
  to   { transform: scale(1.22); }
}

@keyframes marker-blink {
  0%, 100% { opacity: 1;   }
  50%      { opacity: 0.1; }
}

/* ═══════════════════════════════════════════════════════════════ */
/* FIND WHAT I LIKE (FWIL)                                        */
/* ═══════════════════════════════════════════════════════════════ */
/* FWIL backdrop + centered modal */
#fwil-screen {
  position: fixed; inset: 0; z-index: 5200;
  background: rgba(0,0,0,0.45);
  display: none;
  align-items: center; justify-content: center;
  flex-direction: column;
  opacity: 0; transition: opacity 0.22s ease;
  padding: 16px;
  font-family: Inter, -apple-system, sans-serif;
}
#fwil-screen.visible { opacity: 1; }
/* Inner panel */
#fwil-screen > * {
  position: relative;
}
#fwil-panel {
  background: #fff;
  border-radius: 20px;
  width: 100%; max-width: 520px;
  max-height: 82vh;
  display: flex; flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  color: #111;
  animation: fwil-in 0.22s ease;
}
@keyframes fwil-in {
  from { transform: translateY(12px) scale(0.98); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}

.fwil-hdr {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px 10px;
  background: #fff; border-bottom: 1px solid #eee;
  flex-shrink: 0; border-radius: 20px 20px 0 0;
}
.fwil-back {
  background: none; border: none; color: #888; font-size: 18px;
  cursor: pointer; padding: 6px 10px; border-radius: 8px;
}
.fwil-back:hover { color: #111; background: #f0f0ee; }
.fwil-hdr-center {
  display: flex; flex-direction: column; align-items: center; gap: 4px; flex: 1;
}
.fwil-hdr-title { font-size: 15px; font-weight: 700; color: #111; }
.fwil-steps { display: flex; gap: 6px; }
.fwil-step-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #ddd; transition: background 0.2s;
}
.fwil-step-dot.active { background: #f5a623; }
.fwil-close-btn {
  background: none; border: none; color: #aaa; font-size: 18px;
  cursor: pointer; padding: 6px 10px; border-radius: 8px;
}
.fwil-close-btn:hover { color: #111; background: #f0f0ee; }

.fwil-step-subtitle {
  padding: 14px 18px 6px;
  font-size: 13px; color: #555; flex-shrink: 0;
  background: #fff;
}

/* Persona container (scrollable body) */
.fwil-tag-container {
  flex: 1; overflow-y: auto; padding: 12px 14px 16px;
  -webkit-overflow-scrolling: touch;
  background: #fff;
}

/* Saved preferences row */
.fwil-saves-row {
  background: #f7f7f5; border-radius: 12px;
  padding: 10px 14px; margin-bottom: 14px;
  border: 1px solid #eee;
}
.fwil-saves-title {
  font-size: 12px; color: #888; cursor: pointer;
  display: flex; align-items: center; gap: 6px;
}
.fwil-saves-title:hover { color: #111; }
.fwil-saves-list { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.fwil-save-item {
  display: flex; justify-content: space-between; align-items: center;
  background: #fff; border-radius: 8px;
  padding: 9px 12px; cursor: pointer; border: 1px solid #eee;
  transition: border-color 0.15s;
}
.fwil-save-item:hover { border-color: #f5a623; }
.fwil-save-name { font-size: 13px; font-weight: 600; color: #111; }
.fwil-save-meta { font-size: 11px; color: #888; }

/* Persona grid — 2 columns */
.fwil-persona-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px;
}
.fwil-persona-card {
  background: #f9f9f7;
  border: 1.5px solid #e8e8e4;
  border-radius: 16px; padding: 16px 12px 14px;
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  cursor: pointer; text-align: center;
  transition: border-color 0.15s, background 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.fwil-persona-card:hover {
  border-color: rgba(245,166,35,0.6);
  background: rgba(245,166,35,0.06);
}
.fwil-persona-card.selected {
  border-color: #f5a623;
  background: rgba(245,166,35,0.10);
}
.fwil-persona-icon { font-size: 26px; line-height: 1; margin-bottom: 2px; }
.fwil-persona-name {
  font-size: 12px; font-weight: 700; color: #111; line-height: 1.2;
}
.fwil-persona-card.selected .fwil-persona-name { color: #c87f00; }
.fwil-persona-hint {
  font-size: 10px; color: #888; line-height: 1.4;
}
.fwil-persona-card.selected .fwil-persona-hint { color: #a87720; }

/* Footer */
.fwil-footer {
  padding: 12px 16px; background: #fff;
  border-top: 1px solid #eee; flex-shrink: 0;
}
.fwil-next-btn {
  width: 100%; padding: 14px; border-radius: 12px;
  background: #f0f0ee; border: none; color: #888;
  font-size: 14px; font-weight: 600; cursor: not-allowed;
  transition: background 0.2s, color 0.2s;
}
.fwil-next-btn.ready {
  background: #f5a623; color: #fff; cursor: pointer;
}
.fwil-next-btn.ready:hover { background: #e09410; }

/* Step 2: Location */
.fwil-loc-row {
  display: flex; gap: 16px; justify-content: center;
}
.fwil-loc-btn {
  background: #f9f9f7;
  border: 2px solid #e8e8e4;
  border-radius: 16px; padding: 20px 24px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  cursor: pointer; min-width: 120px; transition: border-color 0.15s, background 0.15s;
}
.fwil-loc-btn:hover, .fwil-loc-btn.selected {
  border-color: #f5a623; background: rgba(245,166,35,0.1);
}
.fwil-loc-icon { font-size: 28px; }
.fwil-loc-label { font-size: 13px; font-weight: 700; color: #111; }
.fwil-loc-sub { font-size: 11px; color: #888; }

/* Save Modal */
#fwil-save-modal {
  position: fixed; inset: 0; z-index: 5300;
  background: rgba(0,0,0,0.72);
  align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.22s ease;
}
#fwil-save-modal.visible { opacity: 1; }
.fwil-modal-body {
  background: #1e1e1e; border-radius: 20px;
  padding: 24px; max-width: 340px; width: 90%;
  border: 1px solid #333;
}
.fwil-modal-title { font-size: 16px; font-weight: 700; color: #fff; margin-bottom: 6px; }
.fwil-modal-sub { font-size: 12px; color: #888; margin-bottom: 16px; }
.fwil-slots { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.fwil-slot-btn {
  width: 100%; padding: 11px 14px; border-radius: 10px;
  display: flex; align-items: center; justify-content: space-between;
  border: 1.5px solid #333; cursor: pointer;
  font-size: 13px; transition: border-color 0.15s;
}
.fwil-slot-btn.empty {
  background: rgba(255,255,255,0.04); color: #666;
}
.fwil-slot-btn.occupied {
  background: rgba(255,255,255,0.06); color: #fff;
}
.fwil-slot-btn:hover { border-color: #f5a623; }
.fwil-slot-name { font-weight: 600; }
.fwil-slot-cnt { font-size: 11px; color: #777; }
.fwil-skip-btn {
  width: 100%; background: none; border: 1px solid #333;
  color: #aaa; padding: 10px; border-radius: 10px;
  font-size: 13px; cursor: pointer;
}
.fwil-skip-btn:hover { border-color: #888; color: #fff; }

/* Result overlay */
#fwil-result {
  position: fixed; z-index: 4500;
  bottom: 0; left: 0; right: 0;
  display: none; align-items: flex-end; justify-content: center;
  pointer-events: none;
  opacity: 0; transition: opacity 0.28s ease;
}
#fwil-result.visible { opacity: 1; pointer-events: auto; }
.fwil-result-panel {
  background: rgba(20,20,20,0.95);
  border-radius: 20px 20px 0 0;
  border: 1px solid #2a2a2a;
  width: 100%; max-width: 480px;
  padding: 16px 16px 24px;
  backdrop-filter: blur(12px);
}
.fwil-result-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.fwil-result-title { font-size: 15px; font-weight: 700; color: #fff; }
.fwil-result-close {
  background: none; border: none; color: #666;
  font-size: 17px; cursor: pointer; padding: 4px 8px; border-radius: 8px;
}
.fwil-result-close:hover { color: #fff; background: rgba(255,255,255,0.08); }
.fwil-result-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.fwil-res-item {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,0.05); border-radius: 10px;
  padding: 9px 12px; cursor: pointer; border: 1px solid transparent;
  transition: border-color 0.15s;
}
.fwil-res-item:hover { border-color: #f5a623; }
.fwil-res-rank {
  font-size: 18px; font-weight: 800; color: #f5a623;
  width: 24px; text-align: center; flex-shrink: 0;
}
.fwil-res-info { flex: 1; min-width: 0; }
.fwil-res-name {
  font-size: 13px; font-weight: 600; color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fwil-res-meta { font-size: 11px; color: #777; margin-top: 2px; }
.fwil-route-btn {
  width: 100%; padding: 13px; border-radius: 12px;
  background: #f5a623; border: none; color: #111;
  font-size: 14px; font-weight: 700; cursor: pointer;
  transition: background 0.2s;
}
.fwil-route-btn:hover { background: #e09410; }
