    /* GoGoPet Map design tokens (v23 "Sunset Atelier").
       `--naver-green*` names are legacy aliases kept for existing selectors; they now resolve to the GoGoPet coral brand. */
    :root {
      --gp-brand: #ff6b3d;
      --gp-brand-2: #ffa24a;
      --gp-brand-deep: #b93a12;
      --gp-brand-soft: rgba(255, 107, 61, 0.12);
      --gp-brand-line: rgba(255, 107, 61, 0.42);
      --gp-brand-grad: linear-gradient(135deg, #ff6b3d 0%, #ffa24a 100%);
      --gp-on-brand: #1f1838;
      --gp-ink: #1f1838;
      --gp-ink-raise: #2d2450;
      --gp-violet: #5b4be0;
      --gp-violet-soft: rgba(91, 75, 224, 0.12);
      --gp-danger: #e11d48;
      --gp-danger-soft: rgba(225, 29, 72, 0.10);
      --gp-focus: #5b4be0;
      --gp-line: #efe6da;
      --gp-glass: rgba(255, 252, 247, 0.92);
      --gp-glass-border: rgba(31, 24, 56, 0.09);
      --gp-shadow-float: 0 1px 2px rgba(31, 24, 56, 0.06), 0 10px 28px rgba(31, 24, 56, 0.13);
      --gp-ease: cubic-bezier(0.22, 1, 0.36, 1);
      --gp-gap: 12px;
      --gp-rail-w: 60px;
      --gp-panel-left: 12px;
      --gp-panel-w: 348px;
      --gp-map-left: 372px;
      --naver-green: var(--gp-brand);
      --naver-green-dark: var(--gp-brand-deep);
      --bori-blue: var(--gp-violet);
      --panel-bg: #fffdf9;
      --panel-border: rgba(31, 24, 56, 0.10);
      --ink-1: #1f1838;
      --ink-2: #5d5670;
      --ink-3: #8f88a3;
      --chip-bg: #f6f0e8;
      --shadow-lg: 0 2px 4px rgba(31, 24, 56, 0.05), 0 18px 44px rgba(31, 24, 56, 0.16);
    }
    body.dark-ui {
      --gp-brand-deep: #ffb48a;
      --gp-brand-soft: rgba(255, 138, 76, 0.16);
      --gp-violet: #8f83ff;
      --gp-violet-soft: rgba(143, 131, 255, 0.18);
      --gp-danger-soft: rgba(244, 63, 94, 0.18);
      --gp-focus: #ffb48a;
      --gp-line: rgba(255, 255, 255, 0.08);
      --gp-glass: rgba(27, 21, 48, 0.90);
      --gp-glass-border: rgba(255, 255, 255, 0.10);
      --gp-shadow-float: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 30px rgba(0, 0, 0, 0.45);
      --panel-bg: #1b1530;
      --panel-border: rgba(255, 255, 255, 0.10);
      --ink-1: #f6f2ff;
      --ink-2: #b9b1d0;
      --ink-3: #8a82a3;
      --chip-bg: #2a2247;
      --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.5);
    }
    * { box-sizing: border-box; margin: 0; padding: 0; }
    html, body {
      width: 100%; height: 100%; overflow: hidden;
      font-family: "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", -apple-system, BlinkMacSystemFont, sans-serif;
      background: #f5f6f8; color: var(--ink-1);
      user-select: none;
    }
    #gl-canvas {
      position: fixed; inset: 0; width: 100vw; height: 100vh;
      pointer-events: none; display: block; z-index: 1;
    }
    #sanctuary-canvas {
      position: fixed; inset: 0; width: 100vw; height: 100vh;
      pointer-events: none; display: none; z-index: 2; opacity: 1;
    }
    #map-canvas {
      position: fixed; inset: 0; width: 100vw; height: 100vh;
      cursor: grab; display: block; z-index: 3;
    }
    #portal-flash {
      position: fixed; inset: 0; pointer-events: none; z-index: 60; opacity: 0;
      background: radial-gradient(circle, rgba(254,243,199,0.96) 0%, rgba(16,185,129,0.55) 55%, rgba(6,78,59,0.9) 100%);
      transition: opacity 0.36s ease-out;
    }
    #portal-back-btn {
      position: fixed; top: 16px; left: 16px; z-index: 30; display: none;
      background: rgba(15, 23, 34, 0.88); color: #fef3c7;
      border: 1.5px solid rgba(251, 191, 36, 0.72); border-radius: 999px;
      padding: 9px 16px; font-size: 13px; font-weight: 800; cursor: pointer;
      backdrop-filter: blur(12px); box-shadow: 0 10px 28px rgba(0,0,0,0.35);
    }
    #portal-cam-hint {
      position: fixed; top: 16px; right: 16px; z-index: 30; display: none;
      background: rgba(15, 23, 34, 0.78); color: #e2e8f0;
      border: 1px solid rgba(148, 163, 184, 0.35); border-radius: 999px;
      padding: 8px 14px; font-size: 12px; font-weight: 600; backdrop-filter: blur(10px);
    }
    body.portal-3d-active #left-panel,
    body.portal-3d-active #panel-toggle,
    body.portal-3d-active #basemap-bar,
    body.portal-3d-active #quick-regions,
    body.portal-3d-active #right-hud,
    body.portal-3d-active #gl-canvas,
    body.portal-3d-active #sanctuary-dom-badges,
    body.portal-3d-active #map-canvas { display: none !important; }
    #sanctuary-dom-badges { position: fixed; inset: 0; pointer-events: none; z-index: 16; }
    #sanctuary-3d-pins { position: fixed; inset: 0; pointer-events: none; display: none; z-index: 24; }
    body.portal-3d-active #sanctuary-3d-pins { display: block; }
    .sanc-3d-pin {
      position: absolute; transform: translate(-50%, -100%); pointer-events: auto; cursor: pointer;
      background: rgba(15, 23, 34, 0.84); color: #fef3c7; border: 1.5px solid rgba(251, 191, 36, 0.78);
      border-radius: 999px; padding: 4px 11px; font: 700 12px Pretendard, sans-serif; white-space: nowrap;
      box-shadow: 0 4px 14px rgba(0,0,0,0.38); backdrop-filter: blur(6px);
      transition: transform 0.12s ease, background 0.12s ease;
    }
    .sanc-3d-pin:hover { background: #065f46; transform: translate(-50%, -106%) scale(1.06); }
    .sanc-map-portal-btn {
      position: absolute; transform: translate(-50%, -115%); pointer-events: auto; cursor: pointer;
      background: linear-gradient(135deg, #064e3b 0%, #047857 100%); color: #fef3c7;
      border: 2.5px solid #fbbf24; border-radius: 999px; padding: 8px 16px;
      font: 800 14px Pretendard, sans-serif; white-space: nowrap;
      box-shadow: 0 8px 24px rgba(0,0,0,0.34), 0 0 0 5px rgba(16,185,129,0.26);
      transition: transform 0.14s ease, box-shadow 0.14s ease;
    }
    .sanc-map-portal-btn:hover { transform: translate(-50%, -120%) scale(1.04); box-shadow: 0 12px 28px rgba(0,0,0,0.42), 0 0 0 8px rgba(251,191,36,0.35); }
    .sanc-map-portal-btn::after {
      content: ''; position: absolute; left: 50%; bottom: -9px; transform: translateX(-50%);
      border-left: 8px solid transparent; border-right: 8px solid transparent; border-top: 9px solid #fbbf24;
    }
    body.portal-3d-active #sanctuary-canvas { display: block !important; pointer-events: auto; cursor: grab; }
    body.portal-3d-active #sanctuary-canvas:active { cursor: grabbing; }
    body.portal-3d-active #portal-back-btn,
    body.portal-3d-active #portal-cam-hint { display: block; }
    #sanctuary-hud {
      position: fixed; bottom: 52px; left: 50%; transform: translateX(-50%);
      background: rgba(15, 23, 34, 0.90); color: #f8fafc;
      border: 1px solid rgba(251, 191, 36, 0.52); border-radius: 999px;
      padding: 7px 15px; display: none; align-items: center; gap: 8px; white-space: nowrap;
      backdrop-filter: blur(12px); z-index: 30; box-shadow: 0 12px 32px rgba(0,0,0,0.42);
      font-size: 12.5px;
    }
    .sanc-pill {
      border: 1px solid rgba(255,255,255,0.2); background: rgba(255,255,255,0.10);
      color: #f1f5f9; border-radius: 999px; padding: 4px 10px; font-size: 11.5px;
      font-weight: 700; cursor: pointer;
    }
    .sanc-pill.active { background: #10b981; border-color: #34d399; color: #052e16; }
    #map-canvas:active { cursor: grabbing; }

    /* Left Floating Naver-Map-Style Smart Workspace (Opaque GPU-Promoted Layer — Zero Canvas Backdrop Readback Flicker) */
    #left-panel {
      position: fixed; top: 14px; left: 14px; bottom: 14px; width: 376px;
      max-width: calc(100vw - 76px);
      background: var(--panel-bg); border: 1px solid var(--panel-border);
      border-radius: 16px; box-shadow: var(--shadow-lg);
      contain: layout paint style; backface-visibility: hidden;
      transform: translate3d(0, 0, 0);
      display: flex; flex-direction: column; z-index: 20;
      transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
    }
    #left-panel.collapsed { transform: translate3d(calc(-100% - 16px), 0, 0); }

    .brand-header {
      padding: 14px 16px 10px;
      border-bottom: 1px solid var(--panel-border);
      display: flex; align-items: center; justify-content: space-between;
    }
    .brand-logo {
      display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 18px; letter-spacing: -0.4px;
    }
    .brand-badge {
      background: var(--naver-green); color: #fff; font-size: 11px; font-weight: 800;
      padding: 3px 7px; border-radius: 6px; letter-spacing: 0.2px;
    }
    .rust-tag {
      font-size: 11px; font-weight: 600; color: var(--naver-green-dark);
      background: rgba(3, 199, 90, 0.12); padding: 3px 8px; border-radius: 999px;
    }

    .nav-tabs {
      display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 10px 14px 6px;
    }
    .nav-tab {
      border: none; border-radius: 10px; padding: 9px 0; font-size: 13.5px; font-weight: 700;
      background: var(--chip-bg); color: var(--ink-2); cursor: pointer; transition: 0.15s;
    }
    .nav-tab.active { background: var(--naver-green); color: #fff; }

    .search-box-wrap { padding: 8px 14px; position: relative; }
    .search-input-row {
      display: flex; align-items: center;
      border: 2px solid var(--naver-green); border-radius: 12px;
      padding: 2px 6px 2px 12px; background: rgba(255,255,255,0.06);
    }
    #search-input {
      flex: 1; border: none; outline: none; background: transparent;
      color: var(--ink-1); font-size: 14.5px; font-weight: 500; padding: 8px 0;
    }
    #search-btn {
      border: none; background: var(--naver-green); color: #fff;
      border-radius: 8px; padding: 7px 12px; font-weight: 700; font-size: 13px; cursor: pointer;
    }
    .search-clear-btn {
      border: none; background: transparent; color: var(--ink-2); font-size: 14px;
      padding: 4px 7px; cursor: pointer; opacity: 0.72;
    }
    .search-clear-btn:hover { opacity: 1.0; }
    .search-here-pill {
      display: none; width: 100%; margin-top: 6px; padding: 6px 10px;
      border-radius: 8px; border: 1px solid rgba(3,199,90,0.45);
      background: rgba(3,199,90,0.10); color: #059669; font-size: 12.5px; font-weight: 700; cursor: pointer;
    }
    .search-here-pill.visible { display: block; }

    .category-bar {
      display: flex; gap: 6px; overflow-x: auto; padding: 4px 14px 10px;
      scrollbar-width: none; border-bottom: 1px solid var(--panel-border);
    }
    .category-bar::-webkit-scrollbar { display: none; }
    .cat-chip {
      flex-shrink: 0; border: 1px solid var(--panel-border); background: var(--chip-bg);
      color: var(--ink-1); border-radius: 999px; padding: 5px 11px; font-size: 12.5px; font-weight: 600;
      cursor: pointer; white-space: nowrap;
    }
    .cat-chip.active { background: #111827; color: #fff; border-color: #111827; }
    body.dark-ui .cat-chip.active { background: var(--naver-green); color: #fff; }

    /* Directions Panel */
    #route-pane { display: none; padding: 10px 14px; border-bottom: 1px solid var(--panel-border); }
    .mode-pills { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 10px; }
    .mode-pill {
      border: 1px solid var(--panel-border); background: var(--chip-bg); color: var(--ink-1);
      padding: 7px 0; border-radius: 9px; font-size: 12.5px; font-weight: 700; cursor: pointer;
    }
    .mode-pill.active { background: var(--bori-blue); color: #fff; border-color: var(--bori-blue); }
    .route-inputs { display: flex; flex-direction: column; gap: 6px; }
    .route-field {
      display: flex; align-items: center; gap: 8px; background: var(--chip-bg);
      padding: 7px 10px; border-radius: 9px; font-size: 13px;
    }
    .route-field input {
      flex: 1; border: none; outline: none; background: transparent; color: var(--ink-1); font-size: 13px;
    }
    .route-actions { display: flex; gap: 6px; margin-top: 8px; }
    .btn-primary {
      flex: 1; border: none; background: var(--bori-blue); color: #fff;
      padding: 9px; border-radius: 9px; font-weight: 700; font-size: 13px; cursor: pointer;
    }
    .btn-ghost {
      border: 1px solid var(--panel-border); background: var(--chip-bg); color: var(--ink-1);
      padding: 9px 11px; border-radius: 9px; font-weight: 700; font-size: 12.5px; cursor: pointer;
    }

    #results-list {
      flex: 1; overflow-y: auto; padding: 10px 14px; user-select: text;
    }
    .result-card {
      padding: 11px 12px; border-radius: 12px; border: 1px solid var(--panel-border);
      margin-bottom: 8px; cursor: pointer; transition: background 0.12s, transform 0.12s;
    }
    .result-card:hover { background: rgba(3, 199, 90, 0.07); }
    .res-title { font-size: 14.5px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
    .res-meta { font-size: 12px; color: var(--ink-2); margin-top: 3px; }
    .fed-links { display: flex; gap: 5px; margin-top: 8px; flex-wrap: wrap; }
    .fed-a {
      text-decoration: none; font-size: 11px; font-weight: 700; padding: 3px 8px;
      border-radius: 6px; border: 1px solid var(--panel-border); color: var(--ink-1); background: var(--chip-bg);
    }
    .fed-a.naver { color: #02a94c; border-color: rgba(3, 199, 90, 0.35); }
    .fed-a.google { color: #2563eb; border-color: rgba(37, 99, 235, 0.35); }

    /* Collapse Handle */
    #panel-toggle {
      position: fixed; top: 22px; left: 396px; z-index: 21;
      width: 32px; height: 48px; border-radius: 0 10px 10px 0;
      border: 1px solid var(--panel-border); background: var(--panel-bg); color: var(--ink-1);
      box-shadow: var(--shadow-lg); cursor: pointer; font-weight: 800;
      transition: left 0.24s cubic-bezier(0.22, 1, 0.36, 1);
    }
    #panel-toggle.collapsed { left: 14px; border-radius: 10px; }

    /* Top Center Quick Regional Jump Bar */
    #quick-regions {
      position: fixed; top: 54px; left: 440px; right: 76px; z-index: 22;
      display: flex; gap: 6px; overflow-x: auto; pointer-events: auto; scrollbar-width: none;
    }
    #quick-regions::-webkit-scrollbar { display: none; }
    .region-pill {
      border: 1px solid rgba(255,255,255,0.72); background: rgba(255,255,255,0.82); color: var(--ink-1);
      backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4);
      padding: 5px 11px; border-radius: 999px; font-size: 11.5px; font-weight: 700;
      box-shadow: 0 4px 14px rgba(15,23,42,0.07); cursor: pointer; white-space: nowrap;
      transition: all 0.16s ease;
    }
    body.dark-ui .region-pill { background: rgba(15,23,42,0.78); border-color: rgba(148,163,184,0.22); }
    .region-pill:hover { border-color: var(--naver-green); color: var(--naver-green-dark); transform: translateY(-1px); }
    .region-pill.mood-active { background: rgba(16,185,129,0.16); border-color: #10b981; color: #065f46; }
    body.dark-ui .region-pill.mood-active { background: rgba(56,189,248,0.22); border-color: #38bdf8; color: #e0f2fe; }

    /* Multi-Engine Basemap Switcher Bar (Frosted Glass) */
    #basemap-bar {
      position: fixed; top: 12px; left: 440px; max-width: calc(100vw - 512px); z-index: 23;
      display: flex; background: rgba(255,255,255,0.82); border: 1px solid rgba(255,255,255,0.75);
      backdrop-filter: blur(18px) saturate(1.45); -webkit-backdrop-filter: blur(18px) saturate(1.45);
      border-radius: 12px; padding: 3px; gap: 2px; box-shadow: 0 8px 24px rgba(15,23,42,0.08);
      overflow-x: auto; scrollbar-width: none;
    }
    body.dark-ui #basemap-bar { background: rgba(15,23,42,0.82); border-color: rgba(148,163,184,0.22); }
    #basemap-bar::-webkit-scrollbar { display: none; }
    .bmap-mode-btn {
      border: none; background: transparent; color: var(--ink-2);
      padding: 5px 10px; border-radius: 7px; font-size: 12px; font-weight: 800; cursor: pointer;
      white-space: nowrap;
    }
    .bmap-mode-btn.active { background: var(--naver-green); color: #fff; }
    @media (max-width: 750px) {
      #basemap-bar { left: 14px; top: 12px; max-width: calc(100vw - 82px); }
      #quick-regions { left: 14px; top: 52px; }
      #bori-walk-bar { left: 14px; top: 88px; }
    }

    /* Right HUD Controls */
    #right-hud {
      position: fixed; top: 14px; right: 14px; z-index: 20;
      display: flex; flex-direction: column; gap: 8px;
    }
    .hud-group {
      background: var(--panel-bg); border: 1px solid var(--panel-border);
      border-radius: 12px; box-shadow: var(--shadow-lg); overflow: hidden;
      display: flex; flex-direction: column;
    }
    .hud-btn {
      width: 42px; height: 42px; border: none; border-bottom: 1px solid var(--panel-border);
      background: transparent; color: var(--ink-1); font-size: 13px; font-weight: 800; cursor: pointer;
    }
    .hud-btn:last-child { border-bottom: none; }
    .hud-btn.active { background: var(--naver-green); color: #fff; }

    /* Minimal Bottom Scale & Legal Attribution Strip */
    #bottom-bar {
      position: fixed; right: 12px; bottom: 8px; z-index: 20;
      display: flex; align-items: center; gap: 7px; flex-wrap: wrap; justify-content: flex-end;
      pointer-events: none;
    }
    .scale-box {
      background: rgba(255,255,255,0.78);
      padding: 2px 7px; border-radius: 5px; font-size: 10.5px; font-weight: 700; color: #334155;
      display: inline-flex; align-items: center; gap: 5px;
    }
    body.dark-ui .scale-box { background: rgba(15,23,42,0.78); color: #cbd5e1; }
    .scale-line {
      height: 4px; width: 48px; border-left: 1.5px solid currentColor;
      border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
    }
    .bm-attr-line {
      background: rgba(255,255,255,0.78);
      padding: 2px 7px; border-radius: 5px; font-size: 10px; font-weight: 500; color: #64748b;
      letter-spacing: -0.1px; pointer-events: auto;
    }
    body.dark-ui .bm-attr-line { background: rgba(15,23,42,0.78); color: #94a3b8; }
    .bm-attr-line a { text-decoration: none; }
    .bm-attr-line a:hover { text-decoration: underline; }
    .telemetry-badge {
      background: rgba(255,255,255,0.82); padding: 2px 8px; border-radius: 5px;
      font-size: 10px; font-weight: 600; color: var(--ink-2);
    }
    body.dark-ui .telemetry-badge { background: rgba(15,23,42,0.82); }
    .telemetry-badge strong { color: var(--naver-green-dark); }

    /* Context Menu */
    #ctx-menu {
      position: fixed; display: none; z-index: 50; min-width: 176px;
      background: var(--panel-bg); border: 1px solid var(--panel-border);
      border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px;
    }
    .ctx-item {
      padding: 8px 11px; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer;
    }
    .ctx-item:hover { background: rgba(3, 199, 90, 0.12); }

/* Phase-3 Strict CSP (`style-src 'self'`) Externalized Component Styles */
.sanc-title-gold { color: #fcd34d; }
.sanc-meta-sub { color: #e2e8f0; font-size: 11.5px; }
.sanc-sep { opacity: 0.3; }
.lbl-orig-tag { color: #03c75a; font-weight: 800; }
.lbl-dest-tag { color: #ef4444; font-weight: 800; }
.bm-hidden { display: none !important; }
.bm-link-inherit { color: inherit; }
.bm-empty-hint { padding: 20px; color: var(--ink-2); font-size: 13px; }
.bm-cat-tag { font-size: 11px; color: var(--naver-green-dark); font-weight: 700; }
.bm-step-num { color: var(--bori-blue); }
.bm-route-summary-card { border-color: var(--naver-green); background: rgba(3, 199, 90, 0.06); }

#bori-transit-sheet {
  position: fixed; bottom: 52px; left: 50%; transform: translateX(-50%);
  width: min(500px, calc(100vw - 28px)); max-height: 54vh; overflow-y: auto;
  background: rgba(255,255,255,0.97); backdrop-filter: blur(16px);
  border: 1px solid rgba(15,23,42,0.12); border-radius: 18px;
  box-shadow: 0 18px 42px rgba(15,23,42,0.22); z-index: 45;
  padding: 16px 18px; display: none; font-family: Pretendard, sans-serif;
}
body.dark-ui #bori-transit-sheet { background: rgba(15,23,42,0.95); color: #f8fafc; border-color: rgba(255,255,255,0.14); }
.bt-hdr { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; }
.bt-title { font-size: 16px; font-weight: 800; display: flex; align-items: center; gap: 7px; }
.bt-sub { font-size: 12px; color: #64748b; margin-bottom: 10px; }
.bt-row { display: flex; justify-content: space-between; align-items: center; padding: 9px 10px; border-radius: 11px; background: rgba(241,245,249,0.72); margin-bottom: 7px; gap: 10px; }
body.dark-ui .bt-row { background: rgba(30,41,59,0.82); }
.bt-pill { display: inline-block; padding: 3px 8px; border-radius: 999px; color: #fff; font-size: 11px; font-weight: 800; white-space: nowrap; background: #03c75a; }
.bt-dir { font-size: 12.5px; font-weight: 700; margin-top: 3px; }
.bt-eta1 { font-size: 13px; font-weight: 800; color: #dc2626; text-align: right; white-space: nowrap; }
body.dark-ui .bt-eta1 { color: #f87171; }
.bt-eta2 { font-size: 11px; color: #64748b; text-align: right; margin-top: 2px; }
.bt-actions { display: flex; gap: 7px; margin-top: 10px; flex-wrap: wrap; }
.bt-btn { border: 1px solid rgba(15,23,42,0.14); background: #fff; color: #0f172a; border-radius: 9px; padding: 6px 11px; font-size: 12px; font-weight: 700; cursor: pointer; }
.bt-btn.primary { background: #03c75a; color: #fff; border-color: #03c75a; }

#bori-walk-bar { position: fixed; top: 90px; left: 440px; right: 76px; z-index: 22; pointer-events: auto; display: flex; gap: 5px; overflow-x: auto; scrollbar-width: none; align-items: center; }
body.left-panel-collapsed #basemap-bar,
body.left-panel-collapsed #quick-regions,
body.left-panel-collapsed #bori-walk-bar { left: 58px; }
body.portal-3d-active #bori-walk-bar,
body.portal-3d-active #bori-walk-inspector { display: none !important; }
.walk-zoom-hint { font-size: 10.5px; font-weight: 800; color: #059669; margin-left: 4px; }
.walk-zoom-hint.muted { color: var(--ink-3); font-weight: 600; }
.bw-vdiv { width: 1px; height: 16px; background: rgba(148,163,184,0.4); margin: 0 2px; display: inline-block; }
#bori-walk-inspector { position: fixed; right: 14px; bottom: 52px; width: 348px; max-width: calc(100vw - 28px); z-index: 28; display: none; background: rgba(255,255,255,0.94); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border: 1px solid rgba(16,185,129,0.35); border-radius: 16px; padding: 13px 15px; box-shadow: 0 14px 36px rgba(15,23,42,0.16); font-size: 12.5px; color: #0f172a; }
.bw-hdr { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.bw-hdr-title { font-weight: 800; font-size: 14px; color: #065f46; }
.bw-close-btn { border: none; background: transparent; font-size: 15px; cursor: pointer; color: #64748b; }
.bw-stack { display: flex; flex-direction: column; gap: 6px; line-height: 1.42; }
.bw-box-green { background: #f0fdf4; padding: 7px 9px; border-radius: 10px; border: 1px solid #bbf7d0; }
.bw-lbl-green { font-weight: 700; color: #166534; }
.bw-fee-blue { color: #0369a1; font-weight: 700; }
.bw-meta-muted { font-size: 11.5px; color: #475569; }
.bw-box-slate { background: #f8fafc; padding: 7px 9px; border-radius: 10px; border: 1px solid #e2e8f0; }
.bw-wc-cyan { color: #0e7490; font-weight: 600; }
.bw-leash-note { font-size: 11.5px; color: #334155; padding: 4px 2px; }
.bw-loop-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; margin-top: 2px; }
.bw-loop-btn { border: 1px solid #10b981; background: #ecfdf5; color: #065f46; border-radius: 8px; padding: 6px 4px; font-weight: 700; font-size: 11px; cursor: pointer; }
.bw-loop-sum { font-size: 11.5px; color: #047857; font-weight: 700; }

/* GoGoPet Map Production — Naver-Map-Benchmark 3-Pane PC + Mobile Bottom-Sheet (Zero 3D) */
body.gp-map-prod #gp-rail {
  position: fixed; top: 0; left: 0; bottom: 0; width: 62px; z-index: 34;
  background: #ffffff; border-right: 1px solid rgba(15,23,42,0.09);
  display: flex; flex-direction: column; align-items: center; padding: 10px 4px; gap: 6px;
  box-shadow: 2px 0 12px rgba(15,23,42,0.05);
}
body.gp-map-prod.dark-ui #gp-rail { background: #0f172a; border-color: rgba(148,163,184,0.18); }
.rail-home {
  width: 42px; height: 42px; border-radius: 12px; background: #03c75a; color: #fff;
  display: flex; align-items: center; justify-content: center; text-decoration: none;
  font-size: 20px; margin-bottom: 6px; box-shadow: 0 4px 12px rgba(3,199,90,0.28);
}
.rail-btn {
  width: 52px; padding: 8px 2px; border: none; border-radius: 11px; background: transparent;
  color: #475569; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 3px;
  font-size: 10.5px; font-weight: 700; transition: all 0.14s ease;
}
.rail-btn .rail-ico { font-size: 17px; line-height: 1; }
.rail-btn:hover { background: rgba(3,199,90,0.1); color: #03c75a; }
.rail-btn.active { background: #03c75a; color: #ffffff; }
.rail-btn.rail-emergency.active { background: #dc2626; color: #ffffff; }
body.gp-map-prod #left-panel { left: 62px; top: 0; bottom: 0; width: 356px; border-radius: 0; border-left: none; }
body.gp-map-prod #left-panel.collapsed { transform: translateX(-356px); }
body.gp-map-prod #panel-toggle { left: 418px; }
body.gp-map-prod #panel-toggle.collapsed { left: 62px; }
body.gp-map-prod #quick-regions { left: 432px; top: 56px; }
body.gp-map-prod #bori-walk-bar { left: 432px; top: 92px; }
body.gp-map-prod.left-panel-collapsed #quick-regions,
body.gp-map-prod.left-panel-collapsed #bori-walk-bar,
body.gp-map-prod.left-panel-collapsed #gp-dog-lens-bar { left: 78px; }
.gp-home-link {
  font-size: 11.5px; font-weight: 700; color: #03c75a; text-decoration: none;
  padding: 4px 9px; border-radius: 999px; background: rgba(3,199,90,0.1);
}
#gp-dog-lens-bar {
  position: fixed; top: 12px; left: 432px; right: 76px; z-index: 25;
  display: flex; align-items: center; gap: 6px; overflow-x: auto; scrollbar-width: none;
  padding: 5px 10px; border-radius: 14px;
  background: rgba(255,255,255,0.92); backdrop-filter: blur(16px);
  border: 1px solid rgba(15,23,42,0.09); box-shadow: 0 8px 24px rgba(15,23,42,0.09);
}
body.dark-ui #gp-dog-lens-bar { background: rgba(15,23,42,0.88); border-color: rgba(148,163,184,0.22); }
#gp-dog-lens-bar::-webkit-scrollbar { display: none; }
.lens-title { font-size: 12px; font-weight: 800; color: #065f46; white-space: nowrap; }
body.dark-ui .lens-title { color: #34d399; }
.lens-pill {
  border: 1px solid rgba(15,23,42,0.12); background: #fff; color: #334155;
  padding: 5px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700; cursor: pointer; white-space: nowrap;
}
.lens-pill.active { background: #03c75a; border-color: #03c75a; color: #fff; }
.lens-sep { width: 1px; height: 18px; background: rgba(148,163,184,0.4); flex-shrink: 0; }
.re-search-pill {
  position: fixed; top: 102px; left: 56%; transform: translateX(-50%); z-index: 26;
  border: 1px solid rgba(3,199,90,0.4); background: #ffffff; color: #047857;
  padding: 8px 16px; border-radius: 999px; font-size: 12.5px; font-weight: 800;
  box-shadow: 0 8px 24px rgba(15,23,42,0.16); cursor: pointer;
}
.ac-dropdown {
  position: relative; margin-top: 6px; background: #fff; border: 1px solid #e2e8f0;
  border-radius: 12px; box-shadow: 0 12px 28px rgba(15,23,42,0.14); max-height: 260px; overflow-y: auto; z-index: 40;
}
.ac-item { display: flex; align-items: center; gap: 8px; padding: 9px 11px; cursor: pointer; border-bottom: 1px solid #f1f5f9; }
.ac-item:hover { background: #f0fdf4; }
.ac-name { font-size: 12.5px; font-weight: 700; color: #0f172a; }
.ac-sub { font-size: 11px; color: #64748b; }
.gp-detail-drawer {
  position: fixed; top: 12px; left: 430px; bottom: 16px; width: 344px; max-width: calc(100vw - 84px); z-index: 33;
  background: #ffffff; border: 1px solid rgba(15,23,42,0.1); border-radius: 16px;
  box-shadow: 0 18px 42px rgba(15,23,42,0.18); overflow-y: auto; padding: 14px;
}
body.dark-ui .gp-detail-drawer { background: #0f172a; color: #f8fafc; border-color: rgba(148,163,184,0.22); }
.gp-detail-close {
  position: sticky; top: 0; float: right; border: none; background: rgba(15,23,42,0.08);
  width: 28px; height: 28px; border-radius: 999px; cursor: pointer; font-weight: 800;
}
.gp-detail-photo { width: 100%; height: 170px; object-fit: cover; border-radius: 12px; margin-bottom: 10px; }
.gp-photo-placeholder { display: flex; align-items: center; justify-content: center; background: #ecfdf5; color: #047857; font-weight: 800; font-size: 15px; }
.gp-detail-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.gp-detail-head h3 { margin: 0; font-size: 16px; font-weight: 800; }
.gp-detail-addr { font-size: 12px; color: #64748b; margin: 5px 0 8px; }
.gp-adm-badge { font-size: 10.5px; font-weight: 800; padding: 3px 7px; border-radius: 999px; white-space: nowrap; }
.gp-adm-badge.adm-ok { background: #dcfce7; color: #166534; }
.gp-adm-badge.adm-warn { background: #fef3c7; color: #92400e; }
.gp-adm-badge.adm-no { background: #f1f5f9; color: #475569; }
.gp-tag-row { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; margin-top: 6px; }
.gp-tag { font-size: 11px; font-weight: 700; padding: 3px 7px; border-radius: 6px; background: #f1f5f9; color: #334155; }
.gp-tag-emg { background: #fee2e2; color: #b91c1c; }
.gp-mini-star { margin-left: auto; border: none; background: transparent; font-size: 15px; cursor: pointer; color: #f59e0b; }
.gp-detail-actions { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 6px; margin: 12px 0; }
.gp-detail-links { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.gp-ext-link { font-size: 11.5px; font-weight: 700; padding: 6px 10px; border-radius: 8px; background: #f8fafc; border: 1px solid #e2e8f0; color: #0f172a; text-decoration: none; }
.gp-ext-main { background: #03c75a; border-color: #03c75a; color: #fff; }
.gp-ext-emg { background: #dc2626; border-color: #dc2626; color: #fff; }
.gp-detail-sec { margin-top: 10px; padding-top: 10px; border-top: 1px solid #e2e8f0; }
.gp-detail-sec h5 { margin: 0 0 6px; font-size: 12.5px; }
.gp-pk-row { font-size: 11.5px; padding: 6px 8px; background: #f8fafc; border-radius: 8px; margin-bottom: 5px; }
.gp-side-pane { padding: 10px 12px; overflow-y: auto; }
.gp-pane-card { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px; padding: 12px; margin-bottom: 10px; }
.gp-pane-card h4 { margin: 0 0 6px; font-size: 13.5px; }
.gp-pane-sub { margin: 0 0 10px; font-size: 12px; color: #64748b; line-height: 1.45; }
.gp-pane-head { display: flex; justify-content: space-between; align-items: center; }
.gp-pill-row { display: flex; flex-wrap: wrap; gap: 6px; }
.gp-paw-risk { margin-top: 8px; padding: 7px 10px; border-radius: 8px; background: #ecfdf5; color: #065f46; font-size: 12px; font-weight: 700; }
.btn-danger { border: none; background: #dc2626; color: #fff; padding: 8px 12px; border-radius: 9px; font-size: 12px; font-weight: 800; cursor: pointer; }
.gp-list-meta { padding: 6px 12px; font-size: 11.5px; color: #475569; border-bottom: 1px solid #f1f5f9; }
.gp-place-card, .gp-saved-card, .gp-vet-card { padding: 10px 12px; border-bottom: 1px solid #f1f5f9; cursor: pointer; }
.gp-place-card:hover { background: #f0fdf4; }
.gp-card-top { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.gp-card-title { font-size: 13px; font-weight: 800; color: #0f172a; }
.gp-card-sub { font-size: 11.5px; color: #64748b; margin-top: 3px; }
.gp-empty { padding: 20px 14px; text-align: center; color: #64748b; font-size: 12.5px; line-height: 1.5; }
.gp-via-row { display: flex; align-items: center; gap: 6px; }
.lbl-via-tag { font-size: 11px; font-weight: 800; color: #2563eb; min-width: 28px; }
.gp-via-rm { border: none; background: transparent; color: #94a3b8; cursor: pointer; font-weight: 800; }
.gp-route-pk { margin-top: 8px; padding-top: 8px; border-top: 1px dashed #cbd5e1; font-size: 11.5px; }
.gp-measure-banner {
  position: fixed; bottom: 44px; left: 55%; transform: translateX(-50%); z-index: 32;
  background: rgba(15,23,42,0.92); color: #fff; padding: 8px 14px; border-radius: 999px;
  display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 700;
}
.gp-toast {
  position: fixed; bottom: 88px; left: 55%; transform: translateX(-50%); z-index: 50;
  background: rgba(15,23,42,0.92); color: #fff; padding: 9px 16px; border-radius: 999px;
  font-size: 12.5px; font-weight: 700; box-shadow: 0 10px 26px rgba(15,23,42,0.25);
}
.mobile-sheet-handle { display: none; }
@media (max-width: 768px) {
  body.gp-map-prod #gp-rail {
    top: auto; bottom: 0; left: 0; right: 0; width: 100%; height: 56px;
    flex-direction: row; justify-content: space-around; border-right: none; border-top: 1px solid #e2e8f0; padding: 4px 6px;
  }
  .rail-home { display: none; }
  body.gp-map-prod #left-panel {
    left: 0; right: 0; top: auto; bottom: 56px; width: 100%; max-width: 100%; z-index: 30;
    border-radius: 18px 18px 0 0; transition: height 0.22s ease;
  }
  body.gp-map-prod #left-panel.sheet-peek { height: 116px; }
  body.gp-map-prod #left-panel.sheet-half { height: 42vh; }
  body.gp-map-prod #left-panel.sheet-full { height: calc(100vh - 122px); }
  .mobile-sheet-handle { display: flex; justify-content: center; padding: 7px 0 2px; cursor: pointer; }
  .sheet-bar { width: 40px; height: 4px; border-radius: 999px; background: #cbd5e1; }
  body.gp-map-prod #panel-toggle { display: none; }
  body.gp-map-prod #gp-dog-lens-bar { left: 10px; right: 64px; top: 10px; }
  body.gp-map-prod #quick-regions { left: 10px; right: 64px; top: 56px; }
  body.gp-map-prod #gp-detail-drawer { left: 8px; right: 8px; top: auto; bottom: 62px; width: auto; max-height: 62vh; }
}

/* ==========================================================================
   GoGoPet Map — "Sunset Atelier" redesign layer (v23)
   Coral brand + aubergine ink + cream surfaces. Appended after the legacy rules so
   every existing id/class/DOM contract keeps working; only presentation changes.
   Rule: text on coral is always ink (`--gp-on-brand`) for WCAG AA contrast.
   ========================================================================== */
html, body {
  background: #f4ede3; color: var(--ink-1);
  font-family: "Pretendard Variable", "Pretendard", "SUIT", "Apple SD Gothic Neo", "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.01em; -webkit-tap-highlight-color: transparent;
}
body.dark-ui { background: #120e22; }
button, input { font-family: inherit; letter-spacing: inherit; }
::selection { background: rgba(255, 107, 61, 0.28); }

/* --- Focus, press and motion feedback ------------------------------------ */
:focus { outline: none; }
:focus-visible { outline: 3px solid var(--gp-focus); outline-offset: 2px; }
#map-canvas:focus-visible { outline-offset: -4px; }
button, .ctx-item, .result-card, .gp-place-card, .gp-saved-card, .gp-vet-card, .ac-item, .fed-a, .gp-ext-link {
  transition: background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease, box-shadow 0.2s ease, transform 0.16s var(--gp-ease);
}
/* `scale` is an individual transform property, so pressed feedback composes with positioned `transform`s. */
button:active:not(:disabled) { scale: 0.96; }
button:disabled { opacity: 0.5; cursor: not-allowed; }
@keyframes gp-rise-in { from { opacity: 0; transform: translate(-50%, 10px) scale(0.96); } to { opacity: 1; transform: translate(-50%, 0) scale(1); } }
@keyframes gp-fade-up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes gp-drawer-in { from { opacity: 0; transform: translateX(-14px); } to { opacity: 1; transform: translateX(0); } }
@keyframes gp-pulse-ring { 0% { box-shadow: 0 0 0 0 rgba(255, 107, 61, 0.45); } 100% { box-shadow: 0 0 0 12px rgba(255, 107, 61, 0); } }

/* --- Icon rail: floating aubergine island -------------------------------- */
body.gp-map-prod #gp-rail {
  top: var(--gp-gap); left: var(--gp-gap); bottom: var(--gp-gap); width: var(--gp-rail-w);
  background: linear-gradient(180deg, #2a2050 0%, #1f1838 60%, #191330 100%);
  border: 1px solid rgba(255, 255, 255, 0.06); border-right: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 22px; padding: 10px 5px; gap: 4px;
  box-shadow: 0 2px 4px rgba(31, 24, 56, 0.12), 0 16px 36px rgba(31, 24, 56, 0.28);
}
body.gp-map-prod.dark-ui #gp-rail { background: linear-gradient(180deg, #241c44 0%, #150f29 100%); border-color: rgba(255, 255, 255, 0.10); }
.rail-home {
  width: 44px; height: 44px; border-radius: 15px; background: var(--gp-brand-grad); color: var(--gp-on-brand);
  font-size: 21px; margin-bottom: 10px; box-shadow: 0 6px 16px rgba(255, 107, 61, 0.42);
  transition: transform 0.2s var(--gp-ease), box-shadow 0.2s ease;
}
.rail-home:hover { transform: rotate(-8deg) scale(1.06); box-shadow: 0 8px 22px rgba(255, 107, 61, 0.55); }
.rail-btn {
  width: 50px; min-height: 52px; padding: 8px 2px 7px; border-radius: 15px; color: rgba(255, 255, 255, 0.66);
  font-size: 10.5px; font-weight: 700; gap: 4px; letter-spacing: -0.02em;
}
.rail-btn .rail-ico { font-size: 18px; transition: transform 0.2s var(--gp-ease); }
.rail-btn:hover { background: rgba(255, 255, 255, 0.09); color: #ffffff; }
.rail-btn:hover .rail-ico { transform: translateY(-1px) scale(1.08); }
.rail-btn.active { background: var(--gp-brand-grad); color: var(--gp-on-brand); font-weight: 800; box-shadow: 0 6px 16px rgba(255, 107, 61, 0.38); }
.rail-btn.rail-emergency { margin-top: auto; color: #ffb3c1; }
.rail-btn.rail-emergency:hover { background: rgba(225, 29, 72, 0.22); color: #ffffff; }
.rail-btn.rail-emergency.active { background: var(--gp-danger); color: #ffffff; box-shadow: 0 6px 16px rgba(225, 29, 72, 0.42); }
.rail-btn:focus-visible, .rail-home:focus-visible { outline-color: #ffd0b8; }

/* --- Left workspace panel ------------------------------------------------- */
body.gp-map-prod #left-panel {
  left: var(--gp-panel-left); top: var(--gp-gap); bottom: var(--gp-gap); width: var(--gp-panel-w);
  border: 1px solid var(--panel-border); border-radius: 24px; overflow: hidden;
  transition: transform 0.32s var(--gp-ease), height 0.28s var(--gp-ease);
}
body.gp-map-prod #left-panel.collapsed { transform: translate3d(-460px, 0, 0); }
.brand-header { padding: 16px 18px 12px; border-bottom: none; align-items: flex-start; }
.brand-logo { flex-wrap: wrap; gap: 7px; font-size: 21px; font-weight: 800; letter-spacing: -0.04em; line-height: 1.1; }
.brand-badge {
  background: var(--gp-brand-grad); color: var(--gp-on-brand); font-size: 12px; font-weight: 800;
  padding: 5px 9px; border-radius: 9px; letter-spacing: -0.01em; box-shadow: 0 4px 10px rgba(255, 107, 61, 0.28);
}
.brand-tagline { flex-basis: 100%; font-size: 11.5px; font-weight: 600; color: var(--ink-2); letter-spacing: -0.01em; margin-top: 2px; }
.gp-home-link {
  color: var(--gp-brand-deep); background: var(--gp-brand-soft); font-size: 11.5px; font-weight: 700;
  padding: 6px 10px; border-radius: 999px; white-space: nowrap;
  transition: background-color 0.16s ease, color 0.16s ease;
}
.gp-home-link:hover { background: var(--gp-brand); color: var(--gp-on-brand); }
.rust-tag { color: var(--gp-brand-deep); background: var(--gp-brand-soft); }
.nav-tab.active { background: var(--gp-ink); color: #fff; }

.search-box-wrap { padding: 4px 16px 10px; }
.search-input-row {
  min-height: 50px; border: 1.5px solid transparent; border-radius: 16px; padding: 4px 5px 4px 16px;
  background: var(--chip-bg); transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}
.search-input-row:hover { border-color: var(--gp-brand-line); }
.search-input-row:focus-within { border-color: var(--gp-brand); background: var(--panel-bg); box-shadow: 0 0 0 4px var(--gp-brand-soft); }
#search-input { font-size: 14.5px; font-weight: 600; padding: 9px 0; min-width: 0; }
#search-input::placeholder { color: var(--ink-3); font-weight: 500; }
#search-input:focus-visible { outline: none; }
#search-btn {
  background: var(--gp-brand-grad); color: var(--gp-on-brand); border-radius: 12px; padding: 10px 15px;
  font-weight: 800; font-size: 13px; box-shadow: 0 4px 12px rgba(255, 107, 61, 0.32);
}
#search-btn:hover { box-shadow: 0 6px 18px rgba(255, 107, 61, 0.48); transform: translateY(-1px); }
.search-clear-btn { width: 30px; height: 30px; border-radius: 999px; padding: 0; font-size: 12px; margin-right: 4px; }
.search-clear-btn:hover { background: var(--panel-border); }
.search-here-pill {
  margin-top: 8px; padding: 9px 12px; border-radius: 12px; border: 1px dashed var(--gp-brand-line);
  background: var(--gp-brand-soft); color: var(--gp-brand-deep); font-weight: 700;
}
.search-here-pill.visible { animation: gp-fade-up 0.28s var(--gp-ease); }
.search-here-pill:hover { background: var(--gp-brand); color: var(--gp-on-brand); border-style: solid; }

.category-bar { gap: 7px; padding: 2px 16px 12px; border-bottom: 1px solid var(--gp-line); scroll-snap-type: x proximity; }
.cat-chip {
  border: 1px solid var(--panel-border); background: transparent; color: var(--ink-1);
  padding: 7px 13px; font-size: 12.5px; font-weight: 700; scroll-snap-align: start;
}
.cat-chip:hover { background: var(--gp-brand-soft); border-color: var(--gp-brand-line); color: var(--gp-brand-deep); }
.cat-chip.active { background: var(--gp-ink); color: #fff; border-color: var(--gp-ink); box-shadow: 0 4px 12px rgba(31, 24, 56, 0.22); }
body.dark-ui .cat-chip.active { background: var(--gp-brand-grad); color: var(--gp-on-brand); border-color: transparent; }

#route-pane { padding: 6px 16px 14px; border-bottom: 1px solid var(--gp-line); }
.mode-pills { gap: 4px; padding: 4px; border-radius: 14px; background: var(--chip-bg); margin-bottom: 12px; }
.mode-pill { border: none; background: transparent; color: var(--ink-2); padding: 9px 0; border-radius: 11px; }
.mode-pill:hover { color: var(--ink-1); }
.mode-pill.active { background: var(--panel-bg); color: var(--gp-violet); box-shadow: 0 2px 8px rgba(31, 24, 56, 0.12); }
.route-inputs { gap: 7px; }
.route-field {
  padding: 11px 13px; border-radius: 13px; border: 1.5px solid transparent;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}
.route-field:focus-within { border-color: var(--gp-violet); background: var(--panel-bg); box-shadow: 0 0 0 4px var(--gp-violet-soft); }
.route-field input { font-weight: 600; min-width: 0; }
.route-field input:focus-visible { outline: none; }
.lbl-orig-tag { color: var(--gp-violet); font-size: 11.5px; }
.lbl-dest-tag { color: var(--gp-danger); font-size: 11.5px; }
.lbl-via-tag { color: var(--gp-brand-deep); }
.route-actions { gap: 7px; margin-top: 10px; }
.btn-primary {
  background: var(--gp-violet); color: #fff; padding: 11px 12px; border-radius: 12px; font-weight: 800;
  box-shadow: 0 4px 12px rgba(91, 75, 224, 0.28);
}
body.dark-ui .btn-primary { color: #150f29; }
.btn-primary:hover { box-shadow: 0 6px 18px rgba(91, 75, 224, 0.42); transform: translateY(-1px); }
.btn-ghost { padding: 10px 12px; border-radius: 12px; background: transparent; text-decoration: none; display: inline-flex; align-items: center; }
.btn-ghost:hover { background: var(--chip-bg); border-color: var(--ink-3); }
.btn-danger { background: var(--gp-danger); padding: 10px 13px; border-radius: 12px; box-shadow: 0 4px 12px rgba(225, 29, 72, 0.28); }
.btn-danger:hover { box-shadow: 0 6px 18px rgba(225, 29, 72, 0.42); transform: translateY(-1px); }

#results-list { padding: 12px 16px 16px; scrollbar-width: thin; scrollbar-color: var(--panel-border) transparent; }
#results-list::-webkit-scrollbar, .gp-side-pane::-webkit-scrollbar, .gp-detail-drawer::-webkit-scrollbar { width: 6px; }
#results-list::-webkit-scrollbar-thumb, .gp-side-pane::-webkit-scrollbar-thumb, .gp-detail-drawer::-webkit-scrollbar-thumb { background: var(--panel-border); border-radius: 999px; }
.result-card { padding: 13px 14px; border-radius: 16px; border: 1px solid var(--gp-line); margin-bottom: 9px; background: var(--panel-bg); }
.result-card:hover { background: var(--gp-brand-soft); border-color: var(--gp-brand-line); transform: translateY(-1px); box-shadow: 0 6px 16px rgba(31, 24, 56, 0.08); }
.res-title { font-size: 14.5px; font-weight: 800; letter-spacing: -0.02em; }
.res-meta { line-height: 1.45; }
.fed-a { padding: 4px 9px; border-radius: 8px; background: transparent; }
.fed-a.naver, .fed-a.google { color: var(--ink-2); border-color: var(--panel-border); }
.fed-a:hover, .fed-a.naver:hover, .fed-a.google:hover { color: var(--gp-brand-deep); border-color: var(--gp-brand-line); background: var(--gp-brand-soft); }
.bm-empty-hint, .gp-empty { color: var(--ink-2); line-height: 1.6; }
.bm-cat-tag { color: var(--gp-brand-deep); }
.bm-route-summary-card { border-color: var(--gp-violet); background: var(--gp-violet-soft); }

/* Side panes, list cards and autocomplete now follow the theme tokens (incl. dark mode) */
.gp-side-pane { padding: 6px 16px 12px; }
.gp-pane-card { background: var(--chip-bg); border: 1px solid var(--gp-line); border-radius: 18px; padding: 15px; margin-bottom: 12px; }
.gp-pane-card h4 { font-size: 14px; font-weight: 800; letter-spacing: -0.02em; color: var(--ink-1); }
.gp-pane-sub { color: var(--ink-2); line-height: 1.55; }
.gp-pane-head { gap: 8px; }
.gp-pill-row { gap: 7px; }
.gp-emergency-card { background: var(--gp-danger-soft); border-color: rgba(225, 29, 72, 0.24); }
.gp-paw-risk { margin-top: 10px; padding: 9px 12px; border-radius: 12px; }
body.dark-ui .gp-paw-risk { background: rgba(16, 185, 129, 0.16); color: #a7f3d0; }
.gp-list-meta { padding: 8px 4px; color: var(--ink-2); border-bottom: 1px solid var(--gp-line); }
.gp-place-card, .gp-saved-card, .gp-vet-card { padding: 12px 12px; border-bottom: 1px solid var(--gp-line); border-radius: 14px; }
.gp-place-card:hover, .gp-saved-card:hover, .gp-vet-card:hover { background: var(--gp-brand-soft); }
.gp-card-title { font-size: 13.5px; color: var(--ink-1); letter-spacing: -0.02em; }
.gp-card-sub { color: var(--ink-2); line-height: 1.45; }
.gp-tag { background: var(--chip-bg); color: var(--ink-2); padding: 3px 8px; border-radius: 7px; }
.gp-tag-emg { background: var(--gp-danger-soft); color: var(--gp-danger); }
.gp-mini-star { color: #f59e0b; width: 30px; height: 30px; border-radius: 999px; }
.gp-mini-star:hover { background: rgba(245, 158, 11, 0.16); transform: scale(1.12); }
.gp-adm-badge.adm-no { background: var(--chip-bg); color: var(--ink-2); }
.gp-via-rm { color: var(--ink-3); }
.gp-via-rm:hover { color: var(--gp-danger); }
.gp-route-pk { border-top-color: var(--panel-border); }
.ac-dropdown { margin-top: 8px; background: var(--panel-bg); border: 1px solid var(--panel-border); border-radius: 16px; box-shadow: var(--shadow-lg); animation: gp-fade-up 0.18s var(--gp-ease); }
.ac-item { padding: 11px 13px; border-bottom: 1px solid var(--gp-line); }
.ac-item:last-child { border-bottom: none; }
.ac-item:hover, .ac-item:focus-visible { background: var(--gp-brand-soft); }
.ac-name { font-size: 13px; color: var(--ink-1); }
.ac-sub { color: var(--ink-2); }

/* --- Panel collapse handle ------------------------------------------------ */
body.gp-map-prod #panel-toggle {
  top: 50%; margin-top: -30px; left: calc(var(--gp-panel-left) + var(--gp-panel-w) + 3px); width: 20px; height: 60px;
  border-radius: 0 12px 12px 0; border: 1px solid var(--panel-border); border-left: none; font-size: 9px; color: var(--ink-2);
  box-shadow: 6px 6px 16px rgba(31, 24, 56, 0.10); transition: left 0.32s var(--gp-ease), background-color 0.16s ease, color 0.16s ease;
}
body.gp-map-prod #panel-toggle:hover { background: var(--gp-brand); color: var(--gp-on-brand); }
body.gp-map-prod #panel-toggle.collapsed { left: var(--gp-panel-left); border-radius: 12px; border-left: 1px solid var(--panel-border); width: 26px; }

/* --- Floating top bars over the map --------------------------------------- */
#gp-dog-lens-bar, body.gp-map-prod #gp-dog-lens-bar {
  top: var(--gp-gap); left: var(--gp-map-left); right: 72px; gap: 6px; padding: 6px 8px 6px 14px; border-radius: 999px;
  background: var(--gp-glass); border: 1px solid var(--gp-glass-border); box-shadow: var(--gp-shadow-float);
  -webkit-backdrop-filter: blur(18px) saturate(1.5); backdrop-filter: blur(18px) saturate(1.5);
  transition: left 0.32s var(--gp-ease);
}
body.dark-ui #gp-dog-lens-bar { background: var(--gp-glass); border-color: var(--gp-glass-border); }
.lens-title { font-size: 12.5px; color: var(--ink-1); letter-spacing: -0.02em; margin-right: 2px; }
body.dark-ui .lens-title { color: var(--ink-1); }
.lens-pill { border: 1px solid transparent; background: transparent; color: var(--ink-2); padding: 7px 12px; font-size: 12px; flex-shrink: 0; }
.lens-pill:hover { background: var(--gp-brand-soft); color: var(--gp-brand-deep); }
.lens-pill.active { background: var(--gp-ink); border-color: var(--gp-ink); color: #fff; box-shadow: 0 3px 10px rgba(31, 24, 56, 0.22); }
body.dark-ui .lens-pill.active { background: var(--gp-brand-grad); border-color: transparent; color: var(--gp-on-brand); }
.lens-sep { background: var(--panel-border); height: 20px; margin: 0 2px; }

body.gp-map-prod #quick-regions {
  left: var(--gp-map-left); top: 66px; right: 72px; gap: 7px; padding: 2px 28px 8px 2px;
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent);
  mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent);
  transition: left 0.32s var(--gp-ease);
}
body.gp-map-prod #bori-walk-bar { left: var(--gp-map-left); top: 106px; right: 72px; transition: left 0.32s var(--gp-ease); }
body.gp-map-prod.left-panel-collapsed #quick-regions,
body.gp-map-prod.left-panel-collapsed #bori-walk-bar,
body.gp-map-prod.left-panel-collapsed #gp-dog-lens-bar { left: 120px; }
.region-pill {
  border: 1px solid var(--gp-glass-border); background: var(--gp-glass); color: var(--ink-1); flex-shrink: 0;
  padding: 7px 13px; font-size: 12px; font-weight: 700; box-shadow: 0 2px 8px rgba(31, 24, 56, 0.08);
}
body.dark-ui .region-pill { background: var(--gp-glass); border-color: var(--gp-glass-border); }
.region-pill:hover { border-color: var(--gp-brand); color: var(--gp-brand-deep); transform: translateY(-2px); box-shadow: 0 6px 14px rgba(31, 24, 56, 0.14); }
.region-pill.mood-pill { border-style: dashed; border-color: var(--gp-brand-line); }
.region-pill.mood-active, body.dark-ui .region-pill.mood-active {
  background: var(--gp-brand-grad); border: 1px solid transparent; color: var(--gp-on-brand); font-weight: 800;
  box-shadow: 0 4px 14px rgba(255, 107, 61, 0.36);
}
.walk-zoom-hint { color: var(--gp-brand-deep); }
.bmap-mode-btn.active { background: var(--gp-ink); color: #fff; }

.re-search-pill {
  top: 68px; left: calc(var(--gp-map-left) + (100vw - var(--gp-map-left) - 72px) / 2);
  border: none; background: var(--gp-ink); color: #fff; padding: 11px 20px; font-size: 13px; font-weight: 800;
  box-shadow: 0 10px 26px rgba(31, 24, 56, 0.34); animation: gp-rise-in 0.3s var(--gp-ease);
}
.re-search-pill:hover { background: var(--gp-brand); color: var(--gp-on-brand); }
body.dark-ui .re-search-pill { background: var(--gp-brand-grad); color: var(--gp-on-brand); }

/* --- Google-Maps-style bottom-right HUD ----------------------------------- */
#right-hud {
  top: auto; bottom: 44px; right: var(--gp-gap); gap: 8px;
  align-items: center;
}
.gmap-fab {
  width: 38px; height: 38px; border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 50%; background: rgba(255, 255, 255, 0.96); color: #3c4043;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.16), 0 1px 2px rgba(15, 23, 42, 0.08);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; padding: 0;
  transition: background-color 0.14s ease, color 0.14s ease, transform 0.16s ease, opacity 0.18s ease, box-shadow 0.14s ease;
}
.gmap-fab:hover { background: #ffffff; color: #111827; box-shadow: 0 4px 12px rgba(15, 23, 42, 0.22); }
.gmap-fab:active { transform: scale(0.95); }
.gmap-fab.active, #btn-my-loc.active {
  background: #ffffff; color: #1a73e8; border-color: rgba(26, 115, 232, 0.28);
  box-shadow: 0 2px 10px rgba(26, 115, 232, 0.28);
}
#btn-my-loc.active { animation: none; }
.gmap-compass { transition: opacity 0.18s ease, transform 0.18s ease, max-height 0.18s ease, margin 0.18s ease; }
.gmap-compass.is-north {
  opacity: 0; pointer-events: none; transform: scale(0.75);
  height: 0; min-height: 0; margin-bottom: -8px; border-width: 0; overflow: hidden; box-shadow: none;
}
#compass-needle { display: block; transition: transform 0.08s linear; }
.gmap-zoom-stack {
  display: flex; flex-direction: column; align-items: center;
  border-radius: 10px; background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.16), 0 1px 2px rgba(15, 23, 42, 0.08);
  overflow: hidden;
}
.gmap-zoom-btn {
  width: 36px; height: 34px; border: none; background: transparent; color: #3c4043;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; padding: 0; transition: background-color 0.12s ease, color 0.12s ease;
}
.gmap-zoom-btn:hover { background: rgba(15, 23, 42, 0.05); color: #111827; }
.gmap-zoom-btn:active { background: rgba(15, 23, 42, 0.10); }
.gmap-zoom-div { width: 22px; height: 1px; background: rgba(15, 23, 42, 0.10); flex-shrink: 0; }
body.dark-ui .gmap-fab, body.dark-ui .gmap-zoom-stack {
  background: rgba(27, 21, 48, 0.92); border-color: rgba(255, 255, 255, 0.14); color: #e2e8f0;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.42);
}
body.dark-ui .gmap-zoom-btn { color: #e2e8f0; }
body.dark-ui .gmap-zoom-btn:hover, body.dark-ui .gmap-fab:hover { background: rgba(255, 255, 255, 0.10); color: #ffffff; }
body.dark-ui .gmap-zoom-div { background: rgba(255, 255, 255, 0.14); }
body.dark-ui #btn-my-loc.active { color: #60a5fa; border-color: rgba(96, 165, 250, 0.4); }
.gp-menu-tools { display: flex; flex-wrap: wrap; gap: 6px; }
.gp-tool-pill.active { background: var(--gp-brand-grad); border-color: transparent; color: var(--gp-on-brand); }

/* --- Bottom strip, context menu, toast, measure banner --------------------- */
#bottom-bar { right: var(--gp-gap); bottom: 10px; }
.scale-box, .bm-attr-line, .telemetry-badge { background: var(--gp-glass); color: var(--ink-2); border-radius: 999px; padding: 3px 10px; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
body.dark-ui .scale-box, body.dark-ui .bm-attr-line, body.dark-ui .telemetry-badge { background: var(--gp-glass); color: var(--ink-2); }
.scale-box { color: var(--ink-1); font-variant-numeric: tabular-nums; }
.telemetry-badge strong { color: var(--gp-brand-deep); }
#ctx-menu { min-width: 232px; border-radius: 18px; padding: 7px; animation: gp-fade-up 0.16s var(--gp-ease); }
.ctx-item { padding: 10px 12px; border-radius: 12px; font-weight: 700; color: var(--ink-1); }
.ctx-item:hover, .ctx-item:focus-visible { background: var(--gp-brand-soft); color: var(--gp-brand-deep); }
.gp-toast {
  bottom: 92px; left: calc(var(--gp-map-left) + (100vw - var(--gp-map-left) - 72px) / 2); max-width: min(520px, calc(100vw - 32px));
  background: var(--gp-ink); color: #fff; padding: 12px 20px; font-size: 13px; border: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow: 0 14px 34px rgba(31, 24, 56, 0.38); animation: gp-rise-in 0.28s var(--gp-ease);
}
.gp-measure-banner {
  bottom: 46px; left: calc(var(--gp-map-left) + (100vw - var(--gp-map-left) - 72px) / 2);
  background: var(--gp-ink); padding: 8px 10px 8px 18px; gap: 8px; font-size: 12.5px; border: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow: 0 14px 34px rgba(31, 24, 56, 0.38); animation: gp-rise-in 0.28s var(--gp-ease);
}
.gp-measure-banner .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, 0.22); border-radius: 999px; padding: 6px 12px; }
.gp-measure-banner .btn-ghost:hover { background: rgba(255, 255, 255, 0.14); border-color: rgba(255, 255, 255, 0.4); }
body.left-panel-collapsed .re-search-pill, body.left-panel-collapsed .gp-toast, body.left-panel-collapsed .gp-measure-banner { left: 50%; }

/* --- Place detail drawer --------------------------------------------------- */
.gp-detail-drawer {
  top: var(--gp-gap); bottom: var(--gp-gap); left: calc(var(--gp-map-left) + 12px); width: 356px;
  background: var(--panel-bg); color: var(--ink-1); border: 1px solid var(--panel-border); border-radius: 24px;
  box-shadow: var(--shadow-lg); padding: 16px; animation: gp-drawer-in 0.26s var(--gp-ease);
  scrollbar-width: thin; scrollbar-color: var(--panel-border) transparent;
}
body.dark-ui .gp-detail-drawer { background: var(--panel-bg); color: var(--ink-1); border-color: var(--panel-border); }
.gp-detail-close { z-index: 2; width: 34px; height: 34px; background: var(--gp-glass); color: var(--ink-1); border: 1px solid var(--gp-glass-border); box-shadow: var(--gp-shadow-float); }
.gp-detail-close:hover { background: var(--gp-ink); color: #fff; }
.gp-detail-photo { height: 184px; border-radius: 18px; margin-bottom: 14px; }
.gp-photo-placeholder { background: linear-gradient(135deg, #ffe3d4 0%, #ffd3a3 55%, #e3dcff 100%); color: var(--gp-ink); }
.gp-detail-head h3 { font-size: 19px; letter-spacing: -0.03em; line-height: 1.25; }
.gp-detail-addr { color: var(--ink-2); font-size: 12.5px; line-height: 1.5; }
.gp-detail-actions { gap: 7px; margin: 14px 0; }
.gp-detail-links { gap: 7px; }
.gp-ext-link { padding: 8px 12px; border-radius: 11px; background: var(--chip-bg); border: 1px solid var(--gp-line); color: var(--ink-1); }
.gp-ext-link:hover { border-color: var(--gp-brand-line); background: var(--gp-brand-soft); color: var(--gp-brand-deep); }
.gp-ext-main, .gp-ext-main:hover { background: var(--gp-brand-grad); border-color: transparent; color: var(--gp-on-brand); }
.gp-ext-emg, .gp-ext-emg:hover { background: var(--gp-danger); border-color: var(--gp-danger); color: #fff; }
.gp-detail-sec { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--gp-line); }
.gp-detail-sec h5 { font-size: 13px; font-weight: 800; color: var(--ink-1); margin-bottom: 8px; }
.gp-pk-row { background: var(--chip-bg); border-radius: 11px; padding: 8px 10px; color: var(--ink-1); }

/* --- Transit sheet, walk inspector, portal button -------------------------- */
#bori-transit-sheet { background: var(--gp-glass); border: 1px solid var(--gp-glass-border); border-radius: 24px; color: var(--ink-1); font-family: inherit; }
body.dark-ui #bori-transit-sheet { background: var(--gp-glass); color: var(--ink-1); border-color: var(--gp-glass-border); }
.bt-sub, .bt-eta2 { color: var(--ink-2); }
.bt-row, body.dark-ui .bt-row { background: var(--chip-bg); border-radius: 14px; }
.bt-pill { background: var(--gp-violet); }
.bt-btn { border-color: var(--panel-border); background: var(--panel-bg); color: var(--ink-1); border-radius: 11px; padding: 8px 12px; }
.bt-btn.primary { background: var(--gp-brand-grad); color: var(--gp-on-brand); border-color: transparent; }
#bori-walk-inspector { background: var(--gp-glass); border: 1px solid var(--gp-glass-border); border-radius: 20px; color: var(--ink-1); box-shadow: var(--shadow-lg); }
.bw-hdr-title { color: var(--ink-1); letter-spacing: -0.02em; }
.bw-close-btn { color: var(--ink-2); }
.bw-box-green { background: var(--gp-brand-soft); border-color: var(--gp-brand-line); }
.bw-lbl-green, .bw-loop-sum { color: var(--gp-brand-deep); }
.bw-box-slate { background: var(--chip-bg); border-color: var(--gp-line); }
.bw-meta-muted, .bw-leash-note { color: var(--ink-2); }
.bw-loop-btn { border: 1px solid var(--gp-brand-line); background: var(--gp-brand-soft); color: var(--gp-brand-deep); border-radius: 10px; padding: 8px 4px; }
.bw-loop-btn:hover { background: var(--gp-brand); color: var(--gp-on-brand); }
.sanc-map-portal-btn { background: linear-gradient(135deg, #1f1838 0%, #3a2b6b 100%); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.34), 0 0 0 5px rgba(255, 107, 61, 0.26); }
.sanc-3d-pin:hover { background: #3a2b6b; }
.sanc-pill.active { background: var(--gp-brand); border-color: #ffb48a; color: var(--gp-on-brand); }
#portal-flash { background: radial-gradient(circle, rgba(254, 243, 199, 0.96) 0%, rgba(255, 138, 76, 0.55) 55%, rgba(31, 24, 56, 0.92) 100%); }

/* --- Mid-width desktops: tighter panel so the map keeps room --------------- */
@media (min-width: 769px) and (max-width: 1100px) {
  :root { --gp-panel-w: 320px; --gp-map-left: 344px; }
  .gp-detail-drawer { width: 320px; }
}

/* --- Mobile: floating tab bar + bottom sheet ------------------------------- */
@media (max-width: 768px) {
  :root { --gp-map-left: 0px; --gp-sheet-h: 42vh; }
  /* Sheet geometry and the in-sheet menu tabs live in the "Unified workspace panel" layer below. */
  body.gp-map-prod #left-panel { border-radius: 26px 26px 0 0; border-bottom: none; box-shadow: 0 -10px 34px rgba(31, 24, 56, 0.18); }
  .mobile-sheet-handle { padding: 10px 0 4px; min-height: 24px; align-items: center; }
  .sheet-bar { width: 44px; height: 5px; background: var(--panel-border); transition: background-color 0.16s ease, width 0.2s var(--gp-ease); }
  .mobile-sheet-handle:hover .sheet-bar, .mobile-sheet-handle:focus-visible .sheet-bar { background: var(--gp-brand); width: 56px; }
  .brand-header { padding: 6px 16px 8px; align-items: center; }
  .brand-logo { font-size: 18px; }
  .brand-tagline { display: none; }
  /* Touch targets: 44px minimum for every tappable pill, chip and button on phones. */
  .cat-chip, .lens-pill, .region-pill, .mode-pill, .btn-primary, .btn-ghost, .btn-danger, #search-btn,
  .bt-btn, .bw-loop-btn, .ctx-item, .ac-item, .gp-ext-link { min-height: 44px; }
  .cat-chip, .lens-pill, .region-pill { font-size: 13px; padding-left: 14px; padding-right: 14px; }
  .ctx-item { display: flex; align-items: center; font-size: 14px; }
  .search-clear-btn, .gp-detail-close, .bw-close-btn { width: 44px; height: 44px; min-width: 44px; font-size: 15px; }
  .fed-a { display: inline-flex; align-items: center; min-height: 36px; padding: 6px 12px; font-size: 12.5px; }
  .fed-links { gap: 8px; }
  body.gp-map-prod #gp-dog-lens-bar { left: 10px; right: 10px; top: calc(10px + env(safe-area-inset-top, 0px)); }
  body.gp-map-prod.left-panel-collapsed #gp-dog-lens-bar { left: 10px; }
  #right-hud {
    top: auto; right: calc(10px + env(safe-area-inset-right, 0px));
    bottom: calc(var(--gp-sheet-h) + 148px + env(safe-area-inset-bottom, 0px));
    gap: 8px;
  }
  #left-panel.sheet-peek ~ #right-hud { bottom: calc(188px + env(safe-area-inset-bottom, 0px)); }
  #left-panel.sheet-full ~ #right-hud { display: none; }
  .gmap-fab { width: 42px; height: 42px; }
  .gmap-zoom-btn { width: 40px; height: 38px; }
  .re-search-pill { top: calc(78px + env(safe-area-inset-top, 0px)); left: 50%; min-height: 44px; }
  /* Toast, measure banner and legal attribution ride just above the bottom sheet stage. */
  .gp-toast { left: 50%; bottom: calc(var(--gp-sheet-h) + 166px + env(safe-area-inset-bottom, 0px)); }
  .gp-measure-banner { left: 50%; bottom: calc(var(--gp-sheet-h) + 116px + env(safe-area-inset-bottom, 0px)); max-width: calc(100vw - 20px); }
  #bottom-bar { left: 10px; right: 10px; bottom: calc(var(--gp-sheet-h) + 86px + env(safe-area-inset-bottom, 0px)); }
  #left-panel.sheet-peek ~ .gp-toast { bottom: calc(206px + env(safe-area-inset-bottom, 0px)); }
  #left-panel.sheet-peek ~ .gp-measure-banner { bottom: calc(156px + env(safe-area-inset-bottom, 0px)); }
  #left-panel.sheet-peek ~ #bottom-bar { bottom: calc(126px + env(safe-area-inset-bottom, 0px)); }
  #left-panel.sheet-full ~ #bottom-bar { display: none; }
  body.gp-map-prod #gp-detail-drawer {
    left: 8px; right: 8px; top: auto; bottom: calc(8px + env(safe-area-inset-bottom, 0px)); width: auto; max-width: none; max-height: 66vh;
    border-radius: 24px; animation-name: gp-fade-up;
  }
  /* Readability: raise the smallest labels on phones (body copy >= 12px; tab-bar labels 11.5px, legal line 11px). */
  html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
  .rail-btn { font-size: 11.5px; }
  .bm-cat-tag, .gp-tag, .ac-sub, .bt-pill, .bt-eta2, .gp-adm-badge, .gp-card-sub, .gp-list-meta, .gp-pk-row, .gp-route-pk,
  .bw-meta-muted, .bw-leash-note, .bw-loop-btn, .bw-loop-sum, .gp-home-link, .gp-ext-link,
  .lbl-orig-tag, .lbl-dest-tag, .lbl-via-tag, .walk-zoom-hint { font-size: 12px; }
  .res-meta { font-size: 12.5px; }
  .bm-attr-line, .scale-box { font-size: 11px; }
  /* Floating cards sit on top of the bottom sheet instead of hiding behind it. */
  #bori-walk-inspector {
    left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom, 0px)); width: auto; max-width: none;
    max-height: 60vh; overflow-y: auto; z-index: 36; font-size: 13px; overscroll-behavior: contain;
  }
  #bori-transit-sheet { bottom: calc(8px + env(safe-area-inset-bottom, 0px)); width: min(500px, calc(100vw - 16px)); overscroll-behavior: contain; }
  body.gp-map-prod #left-panel { overscroll-behavior: contain; }
  /* Horizontal pill bars: momentum scroll without dragging the map underneath. */
  #gp-dog-lens-bar { -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; touch-action: pan-x; }
  /* Landscape notches: keep edge controls inside the safe area. */
  #right-hud { right: calc(10px + env(safe-area-inset-right, 0px)); }
}

/* Tall phones have room for full 44px map controls beside the bottom sheet. */
@media (max-width: 768px) and (min-height: 820px) {
  .hud-btn { width: 44px; height: 44px; }
}

/* Short phones: shrink the half sheet and HUD so map controls never hide behind the sheet. */
@media (max-width: 768px) and (max-height: 700px) {
  :root { --gp-sheet-h: 36vh; }
  .hud-btn { width: 36px; height: 36px; font-size: 14px; }
}

/* ==========================================================================
   Unified workspace panel + map view dropdown (v25)
   - The main menu (`#gp-rail`) is no longer a separate floating column: it is a tab strip
     inside `#left-panel`, so one compact panel covers the map instead of two.
   - The mood/region row (`#quick-regions`) and the walk filter row (`#bori-walk-bar`) are no
     longer always-visible bars: they live in the `#gp-view-menu` dropdown opened from the
     dog lens bar. Ids, classes and data attributes are unchanged.
   ========================================================================== */
body.gp-map-prod #gp-rail {
  position: static; z-index: auto; width: auto; height: auto; flex: 0 0 auto;
  flex-direction: row; align-items: stretch; justify-content: flex-start;
  margin: 0 14px 10px; padding: 4px; gap: 2px; border-radius: 16px;
  background: var(--chip-bg); border: 1px solid var(--gp-line); box-shadow: none;
}
body.gp-map-prod.dark-ui #gp-rail { background: var(--chip-bg); border-color: var(--gp-line); }
#gp-rail .rail-btn {
  flex: 1 1 0; width: auto; min-width: 0; min-height: 48px; padding: 6px 2px 5px; gap: 2px;
  border-radius: 12px; color: var(--ink-2); font-size: 11.5px;
}
#gp-rail .rail-btn .rail-ico { font-size: 17px; }
#gp-rail .rail-btn:hover { background: var(--gp-brand-soft); color: var(--gp-brand-deep); }
#gp-rail .rail-btn.active { background: var(--gp-brand-grad); color: var(--gp-on-brand); box-shadow: 0 4px 12px rgba(255, 107, 61, 0.30); }
#gp-rail .rail-btn.rail-emergency { margin-top: 0; color: var(--gp-danger); }
#gp-rail .rail-btn.rail-emergency:hover { background: var(--gp-danger-soft); color: var(--gp-danger); }
#gp-rail .rail-btn.rail-emergency.active { background: var(--gp-danger); color: #ffffff; box-shadow: 0 4px 12px rgba(225, 29, 72, 0.34); }
#gp-rail .rail-btn:focus-visible { outline-color: var(--gp-focus); outline-offset: -2px; }
.brand-header { padding: 13px 16px 9px; align-items: center; gap: 8px; }
.brand-logo { flex-wrap: nowrap; align-items: center; min-width: 0; font-size: 18px; }
.brand-tagline { flex-basis: auto; min-width: 0; margin-top: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gp-home-link { flex-shrink: 0; }
#results-list:empty { padding-top: 0; padding-bottom: 0; }

/* "Pick a place on the map" guidance (directions destination / walk spot) */
.gp-pick-hint {
  margin: 10px 0 0; padding: 9px 12px; border-radius: 12px; border: 1px dashed var(--gp-violet);
  background: var(--gp-violet-soft); color: var(--ink-1); font-size: 12.5px; font-weight: 600; line-height: 1.5;
}
#walk-pane [data-walk-min][aria-pressed="false"] { background: var(--panel-bg); color: var(--ink-1); border: 1px solid var(--panel-border); box-shadow: none; }
#walk-pane [data-walk-min][aria-pressed="true"] { outline: 2px solid var(--gp-violet); outline-offset: 2px; }

/* Dropdown trigger: stays pinned at the right end of the (horizontally scrollable) dog lens bar */
.lens-menu-btn {
  position: sticky; right: 0; flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px; margin-left: 4px;
  padding: 7px 12px; border-radius: 999px; border: 1px solid var(--gp-brand-line); background: var(--panel-bg); color: var(--ink-1);
  font-size: 12px; font-weight: 800; white-space: nowrap; cursor: pointer; box-shadow: -10px 0 12px -8px rgba(31, 24, 56, 0.22);
}
.lens-menu-btn:hover, .lens-menu-btn.open { background: var(--gp-brand-grad); border-color: transparent; color: var(--gp-on-brand); }
.lens-menu-caret { font-size: 10px; transition: transform 0.2s var(--gp-ease); }
.lens-menu-btn.open .lens-menu-caret { transform: rotate(180deg); }

/* Dropdown panel (JS aligns it under the trigger; these are the no-JS fallbacks) */
.gp-view-menu {
  position: fixed; z-index: 40; top: 66px; left: var(--gp-map-left); width: min(440px, calc(100vw - 20px));
  max-height: calc(100vh - 90px); overflow-y: auto; overscroll-behavior: contain;
  display: flex; flex-direction: column; gap: 9px; padding: 14px;
  background: var(--panel-bg); color: var(--ink-1); border: 1px solid var(--panel-border); border-radius: 20px;
  box-shadow: var(--shadow-lg); animation: gp-fade-up 0.18s var(--gp-ease);
}
body.portal-3d-active .gp-view-menu { display: none !important; }
.gp-menu-label { flex-basis: 100%; font-size: 11.5px; font-weight: 800; color: var(--ink-2); letter-spacing: -0.01em; }
#quick-regions .gp-menu-label:not(:first-child) { margin-top: 6px; }
body.gp-map-prod #gp-view-menu #quick-regions,
body.gp-map-prod #gp-view-menu #bori-walk-bar {
  position: static; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 0; overflow: visible;
  -webkit-mask-image: none; mask-image: none; touch-action: auto;
}
#gp-view-menu .region-pill:not(.mood-active):not(.active) { background: var(--chip-bg); border-color: var(--gp-line); }
#gp-view-menu .region-pill { box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
#gp-view-menu .region-pill:hover { transform: none; }
#gp-view-menu .walk-lang-btn.active { background: var(--gp-ink); border-color: var(--gp-ink); color: #ffffff; }
body.dark-ui #gp-view-menu .walk-lang-btn.active { background: var(--gp-brand-grad); border-color: transparent; color: var(--gp-on-brand); }
/* The walk bar's divider becomes a row break: amenity filters on one row, language buttons on the next. */
#gp-view-menu .bw-vdiv { flex-basis: 100%; width: 0; height: 0; margin: 0; background: none; }

@media (min-width: 769px) {
  /* The panel hugs its content (short on directions/walk, tall only when a result list needs it). */
  body.gp-map-prod #left-panel {
    bottom: auto; max-height: calc(100vh - 2 * var(--gp-gap)); max-height: calc(100dvh - 2 * var(--gp-gap));
  }
  body.gp-map-prod #panel-toggle { top: calc(var(--gp-gap) + 12px); margin-top: 0; height: 44px; }
  #gp-dog-lens-bar, body.gp-map-prod #gp-dog-lens-bar { right: auto; max-width: calc(100vw - var(--gp-map-left) - 24px); }
  body.gp-map-prod.left-panel-collapsed #gp-dog-lens-bar { left: 50px; max-width: calc(100vw - 74px); }
}

@media (max-width: 768px) {
  /* One bottom sheet: handle, menu tabs, active pane. No separate floating tab bar. */
  body.gp-map-prod #left-panel {
    left: 0; right: 0; top: auto; bottom: 0; width: 100%; max-width: 100%;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  body.gp-map-prod #left-panel.sheet-peek { height: calc(112px + env(safe-area-inset-bottom, 0px)); }
  body.gp-map-prod #left-panel.sheet-half { height: calc(var(--gp-sheet-h) + 70px + env(safe-area-inset-bottom, 0px)); }
  body.gp-map-prod #left-panel.sheet-full { height: calc(100vh - 72px); height: calc(100dvh - 72px); }
  body.gp-map-prod #gp-rail { margin: 0 12px 8px; }
  #gp-rail .rail-btn { min-height: 50px; }
  /* Brand row moves below the content so the peek stage shows the handle and the menu tabs. */
  .brand-header { order: 99; padding: 8px 16px; border-top: 1px solid var(--gp-line); }
  .lens-menu-btn { min-height: 44px; font-size: 13px; padding-left: 14px; padding-right: 14px; }
  .gp-view-menu { width: calc(100vw - 20px); max-height: 62vh; }
  .gp-menu-label, .gp-pick-hint { font-size: 12.5px; }
}

/* --- Urgent Potty Top 3 & Saved-in-Explore styling ------------------------ */
#gp-rail .rail-btn.rail-potty { color: #b45309; }
body.dark-ui #gp-rail .rail-btn.rail-potty { color: #fbbf24; }
#gp-rail .rail-btn.rail-potty.active {
  background: linear-gradient(135deg, #ea580c 0%, #d97706 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(234, 88, 12, 0.34);
}
.gp-potty-hero {
  background: rgba(234, 88, 12, 0.08);
  border-color: rgba(234, 88, 12, 0.24);
}
body.dark-ui .gp-potty-hero {
  background: rgba(234, 88, 12, 0.16);
  border-color: rgba(251, 146, 60, 0.32);
}
.gp-potty-btn {
  background: linear-gradient(135deg, #ea580c 0%, #d97706 100%);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(234, 88, 12, 0.32);
}
.gp-potty-card {
  padding: 13px 13px;
  border-radius: 15px;
  border: 1.5px solid var(--gp-line);
  margin-bottom: 10px;
  background: var(--panel-bg);
  cursor: pointer;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}
.gp-potty-card:hover, .gp-potty-card.active {
  border-color: #ea580c;
  box-shadow: 0 6px 18px rgba(234, 88, 12, 0.14);
}
.gp-potty-title-wrap { display: flex; align-items: center; gap: 7px; min-width: 0; }
.gp-potty-rank {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 999px;
  color: #ffffff;
}
.gp-potty-rank.rank-1 { background: #ea580c; }
.gp-potty-rank.rank-2 { background: #0d9488; }
.gp-potty-rank.rank-3 { background: #0284c7; }
.gp-potty-walk {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 800;
  color: #c2410c;
  background: rgba(234, 88, 12, 0.12);
  padding: 3px 8px;
  border-radius: 8px;
}
body.dark-ui .gp-potty-walk { color: #fdba74; background: rgba(234, 88, 12, 0.22); }
.gp-tag-infra { background: rgba(13, 148, 136, 0.12); color: #0f766e; }
body.dark-ui .gp-tag-infra { background: rgba(45, 212, 191, 0.18); color: #99f6e4; }
.gp-tag-offleash { background: rgba(234, 88, 12, 0.12); color: #c2410c; }
body.dark-ui .gp-tag-offleash { background: rgba(251, 146, 60, 0.2); color: #fed7aa; }
.gp-potty-actions { display: flex; gap: 7px; margin-top: 9px; }
.gp-potty-go-btn {
  flex: 1;
  padding: 8px 10px;
  font-size: 12.5px;
  background: #ea580c;
  color: #ffffff;
  box-shadow: 0 3px 10px rgba(234, 88, 12, 0.28);
}
.gp-potty-info-btn { padding: 8px 11px; font-size: 12px; }
.gp-potty-etiquette {
  margin-top: 4px;
  padding: 9px 12px;
  border-radius: 12px;
  background: var(--chip-bg);
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 600;
  text-align: center;
}
.gp-saved-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.gp-saved-share-btn { padding: 5px 10px; font-size: 11.5px; border-radius: 9px; }

/* --- 110-Upgrade Enhancement Styles (Quick Search, Sort, Safety Brief, Triage, Detail Extras, A11y) --- */
.gp-skip-link {
  position: fixed; left: -9999px; top: 8px; z-index: 9999;
  padding: 8px 14px; border-radius: 10px; background: #0f172a; color: #ffffff;
  font-size: 13px; font-weight: 700; text-decoration: none;
}
.gp-skip-link:focus { left: 12px; }
:focus-visible { outline: 2.5px solid #0284c7; outline-offset: 2px; }
.gp-quick-search-strip { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.gp-qchip {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 4px 9px; border-radius: 999px; border: 1px solid var(--gp-line);
  background: var(--chip-bg); color: var(--ink-2); font-size: 11.5px; font-weight: 600; cursor: pointer;
}
.gp-qchip-btn { border: none; background: none; color: inherit; font: inherit; padding: 0; cursor: pointer; }
.gp-qchip-del { border: none; background: none; color: var(--ink-2); font-size: 12px; padding: 0 2px; cursor: pointer; opacity: 0.7; }
.gp-sort-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 4px 14px 2px; gap: 8px; font-size: 12px; color: var(--ink-2);
}
.gp-result-count { font-weight: 700; }
.gp-sort-select {
  border: 1px solid var(--gp-line); border-radius: 8px; padding: 3px 8px;
  background: var(--panel-bg); color: var(--gp-ink); font-size: 11.5px; font-weight: 600;
}
.gp-dym-banner {
  margin: 4px 14px 6px; padding: 8px 10px; border-radius: 10px;
  background: rgba(2, 132, 199, 0.08); border: 1px solid rgba(2, 132, 199, 0.22);
  font-size: 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
}
.gp-dym-btn {
  border: 1px solid rgba(2, 132, 199, 0.38); background: var(--panel-bg); color: #0369a1;
  border-radius: 999px; padding: 3px 9px; font-size: 11.5px; font-weight: 700; cursor: pointer;
}
body.dark-ui .gp-dym-btn { color: #7dd3fc; }
.gp-potty-opts { margin-top: 6px; }
.gp-safety-brief-box { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--gp-line); }
.gp-sb-head { font-size: 12.5px; font-weight: 800; margin-bottom: 4px; }
.gp-sb-head.risk-2 { color: #dc2626; }
.gp-sb-head.risk-1 { color: #d97706; }
.gp-sb-sub { font-size: 11.5px; color: var(--ink-2); margin-bottom: 7px; line-height: 1.4; }
.gp-sb-grid, .gp-sb-checks { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; }
.gp-sb-chip {
  font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 8px;
  background: var(--chip-bg); color: var(--gp-ink); border: 1px solid var(--gp-line);
}
.gp-check-pill {
  font-size: 11px; padding: 2px 7px; border-radius: 999px;
  background: rgba(16, 185, 129, 0.12); color: #047857; font-weight: 600;
}
body.dark-ui .gp-check-pill { color: #6ee7b7; background: rgba(16, 185, 129, 0.2); }
.gp-emergency-triage { margin-top: 9px; }
.gp-triage-details summary { font-size: 12px; font-weight: 800; cursor: pointer; color: #b91c1c; padding: 4px 0; }
body.dark-ui .gp-triage-details summary { color: #fca5a5; }
.gp-triage-list { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.gp-triage-item {
  padding: 7px 9px; border-radius: 9px; background: var(--panel-bg);
  border: 1px solid var(--gp-line); font-size: 11.5px; display: flex; flex-direction: column; gap: 2px;
}
.gp-triage-item span { color: var(--ink-2); line-height: 1.35; }
.gp-tag-24h { background: rgba(220, 38, 38, 0.14); color: #b91c1c; font-weight: 800; }
body.dark-ui .gp-tag-24h { color: #fca5a5; background: rgba(220, 38, 38, 0.24); }
.gp-mini-btn { padding: 5px 9px; font-size: 11.5px; border-radius: 9px; text-decoration: none; display: inline-flex; align-items: center; }
.gp-detail-extras { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--gp-line); }
.gp-detail-sec-title { font-size: 12px; font-weight: 800; color: var(--ink-2); margin: 8px 0 5px; }
.gp-comp-list { display: flex; flex-direction: column; gap: 5px; }
.gp-comp-item {
  display: flex; justify-content: space-between; align-items: center; width: 100%;
  padding: 7px 10px; border-radius: 10px; border: 1px solid var(--gp-line);
  background: var(--chip-bg); color: var(--gp-ink); font-size: 12px; font-weight: 700; cursor: pointer;
}
.gp-comp-item em { font-style: normal; font-size: 11px; color: var(--ink-2); }
.ac-item.ac-active { background: rgba(2, 132, 199, 0.14); }
.gp-skel-card {
  height: 76px; border-radius: 14px; margin-bottom: 10px;
  background: linear-gradient(90deg, var(--chip-bg) 25%, rgba(148,163,184,0.2) 50%, var(--chip-bg) 75%);
  background-size: 200% 100%; animation: gp-shimmer 1.2s infinite;
}
@keyframes gp-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.gp-offline-banner {
  position: fixed; top: 10px; left: 50%; transform: translateX(-50%); z-index: 2500;
  padding: 7px 14px; border-radius: 999px; background: #0f172a; color: #f8fafc;
  font-size: 12px; font-weight: 700; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

/* --- Wave 2 Styles (Livability, Compare, Elevation SVG, Profile, Tracker, Notes, Print) --- */
.gp-sim-row { display: flex; align-items: center; gap: 10px; margin: 8px 0 4px; font-size: 12px; }
.gp-sim-row input[type="range"] { flex: 1; accent-color: #0d9488; }
.gp-sb-gauge-wrap { margin: 5px 0 6px; }
.gp-sb-gauge-lbl { display: flex; justify-content: space-between; font-size: 11px; color: var(--ink-2); margin-bottom: 3px; }
.gp-sb-jump { cursor: pointer; }
.gp-win-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin-top: 7px; }
.gp-win-slot { font-size: 10.5px; padding: 4px 7px; border-radius: 8px; border: 1px solid var(--gp-line); background: var(--panel-bg); display: flex; flex-direction: column; }
.gp-win-slot.risk-0 { border-color: rgba(16, 185, 129, 0.45); }
.gp-win-slot.risk-2 { border-color: rgba(220, 38, 38, 0.45); }
.gp-liv-head { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.gp-liv-grade {
  width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 900; color: #ffffff; background: linear-gradient(135deg, #0d9488, #0284c7); flex-shrink: 0;
}
.gp-liv-grade.grade-Sp, .gp-liv-grade.grade-S { background: linear-gradient(135deg, #059669, #0d9488); }
.gp-liv-grade.grade-B, .gp-liv-grade.grade-C { background: linear-gradient(135deg, #d97706, #ea580c); }
.gp-liv-score { font-size: 13px; font-weight: 800; }
.gp-liv-score strong { font-size: 18px; color: #0f766e; }
body.dark-ui .gp-liv-score strong { color: #5eead4; }
.gp-liv-sub { font-size: 11px; color: var(--ink-2); }
.gp-liv-bars { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.gp-liv-bar-row small { font-size: 10.5px; color: var(--ink-2); }
.gp-liv-bar-top { display: flex; justify-content: space-between; font-size: 11.5px; font-weight: 700; }
.gp-liv-prog {
  width: 100%; height: 7px; border: none; border-radius: 999px; overflow: hidden;
  appearance: none; -webkit-appearance: none; background: rgba(148, 163, 184, 0.25); display: block; margin: 2px 0;
}
.gp-liv-prog::-webkit-progress-bar { background: rgba(148, 163, 184, 0.25); border-radius: 999px; }
.gp-liv-prog::-webkit-progress-value { background: linear-gradient(90deg, #0d9488, #0284c7); border-radius: 999px; }
.gp-liv-prog::-moz-progress-bar { background: linear-gradient(90deg, #0d9488, #0284c7); border-radius: 999px; }
.gp-liv-prog.gauge-safe::-webkit-progress-value { background: #10b981; }
.gp-liv-prog.gauge-warn::-webkit-progress-value { background: #f59e0b; }
.gp-liv-prog.gauge-danger::-webkit-progress-value { background: #ef4444; }
.gp-liv-prog.gauge-safe::-moz-progress-bar { background: #10b981; }
.gp-liv-prog.gauge-warn::-moz-progress-bar { background: #f59e0b; }
.gp-liv-prog.gauge-danger::-moz-progress-bar { background: #ef4444; }
.gp-liv-tip { margin-top: 8px; font-size: 11.5px; padding: 7px 9px; border-radius: 10px; background: var(--chip-bg); color: var(--ink-2); }
.gp-elev-box { margin-top: 8px; }
.gp-elev-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 5px; font-size: 12.5px; }
.gp-elev-svg { width: 100%; height: 54px; border-radius: 8px; background: var(--chip-bg); display: block; }
.gp-elev-metrics { display: flex; flex-wrap: wrap; gap: 8px; font-size: 11.5px; font-weight: 700; margin: 6px 0 4px; }
.gp-trk-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; font-size: 12.5px; }
.gp-trk-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; text-align: center; margin-bottom: 8px; }
.gp-trk-stats div { background: var(--chip-bg); border-radius: 9px; padding: 5px 2px; display: flex; flex-direction: column; }
.gp-trk-stats b { font-size: 12.5px; }
.gp-trk-stats span { font-size: 10px; color: var(--ink-2); }
.gp-trk-logs { margin-top: 8px; display: flex; flex-direction: column; gap: 4px; }
.gp-trk-log-row { display: flex; justify-content: space-between; align-items: center; font-size: 11px; padding: 4px 7px; border-radius: 8px; background: var(--chip-bg); }
.gp-detail-note-box { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--gp-line); }
.gp-note-row { display: flex; gap: 6px; }
.gp-note-row input { flex: 1; padding: 6px 9px; border-radius: 9px; border: 1px solid var(--gp-line); background: var(--panel-bg); color: var(--gp-ink); font-size: 12px; }
.gp-compare-tray {
  position: fixed; bottom: 44px; left: 50%; transform: translateX(-50%); z-index: 1600;
  display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 16px;
  background: var(--panel-bg); border: 1.5px solid #7c3aed; box-shadow: 0 10px 30px rgba(15, 23, 42, 0.22);
  max-width: calc(100vw - 24px);
}
.gp-cmp-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.gp-cmp-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 999px; background: rgba(124, 58, 237, 0.12); color: #6d28d9; font-size: 11.5px; font-weight: 700; }
body.dark-ui .gp-cmp-chip { color: #ddd6fe; background: rgba(124, 58, 237, 0.28); }
.gp-cmp-chip button { border: none; background: none; color: inherit; cursor: pointer; font-weight: 800; }
.gp-cmp-btns { display: flex; gap: 6px; flex-shrink: 0; }
.gp-first-tip {
  position: fixed; bottom: 42px; right: 64px; z-index: 1200; display: flex; align-items: center; gap: 8px;
  padding: 6px 11px; border-radius: 999px; background: var(--panel-bg); border: 1px solid var(--gp-line);
  font-size: 11.5px; box-shadow: 0 6px 18px rgba(15, 23, 42, 0.14);
}
.gp-first-tip button { border: none; background: none; color: var(--ink-2); cursor: pointer; font-weight: 700; }
.gp-modal-backdrop {
  position: fixed; inset: 0; z-index: 3000; background: rgba(15, 23, 42, 0.54);
  display: flex; align-items: center; justify-content: center; padding: 14px;
}
.gp-modal-card {
  width: 100%; max-width: 460px; max-height: 85vh; overflow-y: auto;
  border-radius: 18px; background: var(--panel-bg); color: var(--gp-ink);
  border: 1px solid var(--gp-line); padding: 16px; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}
.gp-modal-wide { max-width: 720px; }
.gp-modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.gp-modal-head h3 { margin: 0; font-size: 15px; }
.gp-modal-close { border: 1px solid var(--gp-line); background: var(--chip-bg); color: var(--gp-ink); border-radius: 10px; width: 32px; height: 32px; cursor: pointer; font-weight: 800; }
.gp-win-banner { padding: 9px 12px; border-radius: 12px; background: rgba(16, 185, 129, 0.12); border: 1px solid rgba(16, 185, 129, 0.32); font-size: 12.5px; margin-bottom: 10px; }
.gp-cmp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.gp-cmp-col { border: 1px solid var(--gp-line); border-radius: 14px; padding: 10px; background: var(--chip-bg); }
.gp-cmp-col.winner { border: 2px solid #10b981; }
.gp-cmp-col-head { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; font-size: 13px; }
.gp-win-badge { font-size: 10.5px; padding: 2px 6px; border-radius: 999px; background: #10b981; color: #ffffff; font-weight: 800; }
.gp-cmp-row { display: flex; justify-content: space-between; font-size: 11.5px; padding: 4px 0; border-bottom: 1px dashed var(--gp-line); }
.gp-prof-list { display: flex; flex-direction: column; gap: 7px; margin-bottom: 10px; }
.gp-prof-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; border-radius: 11px; background: var(--chip-bg); font-size: 12.5px; }
.gp-prof-tags { display: flex; gap: 4px; margin-top: 3px; }
.gp-prof-tags span { font-size: 10.5px; padding: 1px 6px; border-radius: 999px; background: rgba(124, 58, 237, 0.14); color: #6d28d9; }
.gp-prof-form { display: flex; flex-direction: column; gap: 8px; }
.gp-form-row { display: grid; grid-template-columns: 1.5fr 0.7fr 0.9fr; gap: 6px; }
.gp-form-row input, .gp-form-row select { padding: 7px 8px; border-radius: 9px; border: 1px solid var(--gp-line); background: var(--panel-bg); color: var(--gp-ink); font-size: 12.5px; }
.gp-form-checks { display: flex; flex-wrap: wrap; gap: 10px; font-size: 12px; }
.gp-sc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; font-size: 12.5px; }
.gp-sc-grid kbd { display: inline-block; padding: 2px 6px; border-radius: 6px; border: 1px solid var(--gp-line); background: var(--chip-bg); font-family: monospace; font-weight: 800; margin-right: 4px; }
@media (max-width: 768px) {
  .gp-compare-tray { bottom: 124px; flex-wrap: wrap; }
  .gp-first-tip { display: none !important; }
  .gp-sc-grid, .gp-form-row { grid-template-columns: 1fr; }
}
@media print {
  #gl-canvas, #map-canvas, #right-hud, #gp-dog-lens-bar, #gp-rail, #bottom-bar, .gp-compare-tray { display: none !important; }
  #left-panel, #gp-detail-drawer { position: static !important; width: 100% !important; max-height: none !important; box-shadow: none !important; }
}

/* --- Wave 3 Styles (Isochrone, Regions, Trip Planner, Corridor Radar, Hazard Alert, Med Card) --- */
.gp-vp-stats { font-size: 11px; color: var(--ink-2); font-weight: 600; white-space: nowrap; }
.gp-iso-summary { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--gp-line); }
.gp-iso-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; margin-top: 6px; }
.gp-iso-card { padding: 6px 7px; border-radius: 10px; background: var(--chip-bg); border: 1.5px solid var(--gp-line); font-size: 11px; }
.gp-iso-card.iso-5 { border-color: rgba(5, 150, 105, 0.55); }
.gp-iso-card.iso-10 { border-color: rgba(13, 148, 136, 0.55); }
.gp-iso-card.iso-15 { border-color: rgba(2, 132, 199, 0.55); }
.gp-iso-top { display: flex; justify-content: space-between; margin-bottom: 3px; }
.gp-iso-nums { font-size: 10.5px; color: var(--ink-2); }
.gp-reg-totals { font-size: 12px; color: var(--ink-2); margin-bottom: 10px; padding: 8px 10px; border-radius: 10px; background: var(--chip-bg); }
.gp-reg-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 9px; margin-top: 8px; }
.gp-reg-card { padding: 10px; border-radius: 13px; border: 1px solid var(--gp-line); background: var(--chip-bg); display: flex; flex-direction: column; gap: 5px; }
.gp-reg-top { display: flex; justify-content: space-between; align-items: center; font-size: 13.5px; }
.gp-reg-meta { font-size: 11px; color: var(--ink-2); line-height: 1.35; }
.gp-reg-lm { font-size: 10.5px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gp-trip-list { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.gp-trip-stop { padding: 10px; border-radius: 13px; border: 1px solid var(--gp-line); background: var(--chip-bg); }
.gp-trip-stop-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 4px; font-size: 13px; }
.gp-corr-list { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; max-height: 185px; overflow-y: auto; }
.gp-corr-item {
  display: flex; align-items: center; gap: 7px; width: 100%; text-align: left;
  padding: 6px 8px; border-radius: 9px; border: 1px solid var(--gp-line);
  background: var(--chip-bg); color: var(--gp-ink); font-size: 11.5px; cursor: pointer;
}
.gp-corr-dist { font-weight: 800; color: #0f766e; min-width: 44px; }
body.dark-ui .gp-corr-dist { color: #5eead4; }
.gp-corr-name { flex: 1; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gp-corr-item em { font-style: normal; font-size: 10.5px; color: var(--ink-2); }
.gp-haz-alert {
  margin-top: 6px; padding: 7px 9px; border-radius: 9px; font-size: 11.5px; font-weight: 700;
  background: rgba(220, 38, 38, 0.12); border: 1px solid rgba(220, 38, 38, 0.35); color: #b91c1c;
}
body.dark-ui .gp-haz-alert { color: #fca5a5; background: rgba(220, 38, 38, 0.24); }
.gp-med-form { margin-top: 6px; }
.gp-med-form input { padding: 6px 9px; border-radius: 9px; border: 1px solid var(--gp-line); background: var(--panel-bg); color: var(--gp-ink); font-size: 12px; }
.gp-w4-gap { margin-top: 7px; }
.gp-badge-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.gp-badge-item {
  display: flex; align-items: center; gap: 8px; padding: 8px 9px; border-radius: 12px;
  border: 1px solid var(--gp-line); background: var(--chip-bg); opacity: 0.55; font-size: 12px;
}
.gp-badge-item.unlocked { opacity: 1; border-color: #10b981; background: rgba(16, 185, 129, 0.10); }
.gp-badge-ico { font-size: 18px; flex-shrink: 0; }
.gp-tools-accordion { margin-top: 7px; border-top: 1px dashed var(--gp-line); padding-top: 6px; }
.gp-tools-accordion summary { font-size: 12px; font-weight: 700; color: var(--ink-2); cursor: pointer; }
.gp-cmd-input {
  width: 100%; box-sizing: border-box; padding: 9px 11px; border-radius: 11px;
  border: 1.5px solid var(--gp-line); background: var(--chip-bg); color: var(--gp-ink);
  font-size: 13px; margin-bottom: 8px;
}
.gp-cmd-list { display: flex; flex-direction: column; gap: 5px; max-height: 55vh; overflow-y: auto; }
.gp-cmd-item {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  padding: 8px 10px; border-radius: 11px; border: 1px solid var(--gp-line);
  background: var(--chip-bg); color: var(--gp-ink); cursor: pointer;
}
.gp-cmd-item.active, .gp-cmd-item:hover { border-color: #0d9488; background: rgba(13, 148, 136, 0.10); }
.gp-cmd-ico { font-size: 17px; flex-shrink: 0; }
.gp-cmd-txt { flex: 1; display: flex; flex-direction: column; gap: 1px; }
.gp-cmd-txt b { font-size: 12.5px; }
.gp-cmd-txt small { font-size: 11px; color: var(--ink-2); }
.gp-cmd-item kbd { padding: 2px 6px; border-radius: 6px; border: 1px solid var(--gp-line); background: var(--panel-bg); font-family: monospace; font-size: 11px; font-weight: 800; }
@media (max-width: 768px) {
  .gp-badge-grid { grid-template-columns: 1fr; }
  .gp-iso-grid { grid-template-columns: 1fr; }
  .gp-vp-stats { display: none; }
}

/* --- Accessibility preferences --------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
@media (prefers-contrast: more) {
  :root { --panel-border: rgba(31, 24, 56, 0.4); --gp-glass: #fffdf9; --ink-2: #3b3550; --gp-line: rgba(31, 24, 56, 0.3); }
  body.dark-ui { --panel-border: rgba(255, 255, 255, 0.45); --gp-glass: #1b1530; --ink-2: #e2dcf3; --gp-line: rgba(255, 255, 255, 0.3); }
}
@media (forced-colors: active) {
  .rail-btn.active, .cat-chip.active, .lens-pill.active, .hud-btn.active, .mode-pill.active, .region-pill.mood-active, .lens-menu-btn.open { outline: 2px solid Highlight; outline-offset: -2px; }
}
