.page-prelaunch .top .site-search { display: none; }
.page-prelaunch.past-map .top .site-search { display: block; }

.map-home { display: flex; flex-direction: column; height: calc(100vh - 65px); height: calc(100svh - 65px); min-height: 320px; }
.map-stage { position: relative; z-index: 1; flex: 1; min-height: 0; background: var(--land); }
.map-stage .map-canvas { position: absolute; inset: 0; z-index: 0; }
.map-canvas .maplibregl-canvas:focus-visible { outline: 2.5px solid var(--ink); outline-offset: -3px; }

.map-top {
  position: absolute; left: 0; right: 0; top: 0; z-index: 3; pointer-events: none; text-align: center;
  padding: 18px max(16px, env(safe-area-inset-left)) 34px;
  background: linear-gradient(var(--bg) 62%, transparent);
}
.brand-lockup { display: flex; align-items: center; min-width: 0; }
.brand-tag { margin: 0 0 0 14px; padding-left: 14px; border-left: 1px solid var(--line); font-size: 15px; font-weight: 700; line-height: 22px; letter-spacing: -0.005em; color: var(--ink); white-space: nowrap; }
.page-prelaunch .top .site-search { margin-left: auto; }
.map-search { position: relative; max-width: 620px; margin: 0 auto; pointer-events: auto; text-align: left; }
.map-field { position: relative; }
.map-field > svg { position: absolute; left: 16px; top: 50%; margin-top: -9px; width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.map-field input {
  -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 52px; margin: 0; padding: 0 56px 0 44px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font: 500 17px var(--font);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.14);
}
.map-field input::placeholder { color: var(--muted); opacity: 1; }
.map-field input::-webkit-search-decoration, .map-field input::-webkit-search-cancel-button { -webkit-appearance: none; }
.map-field input:hover { border-color: var(--muted); }
.map-field input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink), 0 6px 22px rgba(0, 0, 0, 0.14); }
.map-go {
  position: absolute; right: 6px; top: 6px; width: 40px; height: 40px; padding: 0; display: grid; place-items: center; cursor: pointer;
  border: 0; border-radius: 50%; background: var(--invert-bg); color: var(--invert-ink);
}
.map-go svg { width: 18px; height: 18px; }
.map-go:hover { opacity: 0.86; }
.map-note { margin-top: 12px; color: var(--muted); font-size: 15px; pointer-events: auto; }

.map-suggest {
  position: absolute; left: 0; right: 0; top: 60px; z-index: 5; max-height: min(58vh, 460px); overflow-y: auto; overscroll-behavior: contain;
  padding: 6px 12px 10px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.2);
}
.map-suggest[hidden] { display: none; }
.suggest-title { margin: 10px 4px 4px; font-size: 13px; font-weight: 700; color: var(--ink); }
.suggest-title .detail { font-size: 12.5px; }
.map-suggest .hit-row { padding: 7px 6px; border-top: 0; border-radius: 10px; }
.map-suggest .hit-thumb, .map-suggest .hit-icon { width: 40px; height: 34px; border-radius: 8px; }
.map-suggest .hit-icon svg { width: 17px; height: 17px; }
.map-suggest .hit-row .hit-text b { font-size: 15px; }
.map-suggest .hit-row .hit-text > span { font-size: 13px; }
.map-suggest .suggest-plain { padding: 8px 6px; }
.map-suggest [role=option][aria-selected=true], .map-suggest a[role=option]:hover { background: var(--soft); }
.suggest-all { display: block; margin-top: 6px; padding: 10px 6px; border-radius: 10px; font-size: 14.5px; font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.suggest-none { margin: 10px 6px 4px; color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }

.map-bottom {
  position: absolute; left: 12px; right: 12px; bottom: 28px; z-index: 2; pointer-events: none;
  display: flex; flex-direction: row-reverse; align-items: flex-end; justify-content: space-between; gap: 12px;
}
.map-tools { position: relative; margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.map-tools > *, .map-card { pointer-events: auto; }
.map-locate {
  display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 18px 0 14px; cursor: pointer; white-space: nowrap;
  border: 0; border-radius: 999px; background: var(--invert-bg); color: var(--invert-ink); font: 700 15px var(--font);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
}
.map-locate[hidden], .map-zoom[hidden] { display: none; }
.map-locate svg { width: 18px; height: 18px; }
.map-locate[aria-busy=true] { opacity: 0.8; }
.map-locate:hover { opacity: 0.88; }
.map-zoom { display: none; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); box-shadow: 0 4px 14px rgba(0, 0, 0, 0.14); }
@media (hover: hover) and (pointer: fine) { .map-zoom { display: block; } }
.map-zoom button { display: block; width: 40px; height: 38px; padding: 0; border: 0; background: none; color: var(--ink); font: 500 21px/1 var(--font); cursor: pointer; }
.map-zoom button + button { border-top: 1px solid var(--line); }
.map-zoom button:hover { background: var(--soft); }
.map-zoom button:focus-visible { outline: 2.5px solid var(--ink); outline-offset: -3px; border-radius: 0; }
.map-reset {
  position: absolute; right: 0; bottom: calc(100% + 10px); display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px 0 11px;
  cursor: pointer; white-space: nowrap; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink);
  font: 700 14px var(--font); box-shadow: 0 4px 14px rgba(0, 0, 0, 0.16);
}
.map-reset[hidden] { display: none; }
.map-reset svg { width: 16px; height: 16px; }
.map-reset:hover { background: var(--soft); }

.map-card {
  position: relative; flex: 0 1 360px; min-width: 0; padding: 14px 42px 14px 16px; border: 1px solid var(--line); border-radius: 16px;
  background: var(--surface); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2); font-size: 15px;
}
.map-card:empty { display: none; }
.map-card-title { display: block; font-size: 17px; font-weight: 700; line-height: 1.25; }
.map-card-detail { margin-top: 3px; color: var(--muted); font-size: 14px; line-height: 1.4; }
.map-card-detail a { color: var(--ink); font-weight: 600; }
.map-card-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.map-card-go, .map-card-do {
  display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: 999px; font: 700 14px var(--font); text-decoration: none; cursor: pointer;
}
.map-card-go { background: var(--invert-bg); color: var(--invert-ink); border: 1px solid var(--invert-bg); }
.map-card-do { background: none; color: var(--ink); border: 1px solid var(--line); }
.map-card-do:hover { border-color: var(--muted); }
.map-card-note { margin-left: 6px; font-weight: 400; color: var(--muted); }
.map-card .area-mail { margin-top: 10px; }
.map-card .map-card-near { margin-top: 12px; }
.map-card-close { position: absolute; right: 8px; top: 8px; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--muted); cursor: pointer; }
.map-card-close::before, .map-card-close::after { content: ""; position: absolute; left: 8px; right: 8px; top: 14px; height: 2px; background: currentColor; border-radius: 1px; }
.map-card-close::before { transform: rotate(45deg); }
.map-card-close::after { transform: rotate(-45deg); }
.map-card-close:hover { color: var(--ink); background: var(--soft); }

.map-home { --panel-w: clamp(340px, 34vw, 420px); }
.map-panel {
  position: absolute; z-index: 4; top: 12px; right: 12px; bottom: 28px; width: var(--panel-w); max-width: calc(100% - 24px);
  display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: 18px;
  background: var(--bg); box-shadow: 0 14px 40px rgba(0, 0, 0, 0.24);
}
.map-panel[hidden] { display: none; }
.has-panel .map-top { padding-right: calc(var(--panel-w) + 24px); }
.has-panel .map-bottom { right: calc(var(--panel-w) + 24px); }
.panel-bar { flex: none; display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 6px 8px 0 10px; }
.panel-back {
  display: inline-flex; align-items: center; gap: 4px; min-width: 0; min-height: 36px; padding: 0 10px 0 4px; border: 0; border-radius: 999px;
  background: none; color: var(--ink); font: 600 15px var(--font); cursor: pointer;
}
.panel-back span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.panel-back svg { width: 20px; height: 20px; flex: none; }
.panel-back:hover { background: var(--soft); }
.panel-close {
  position: relative; flex: none; width: 36px; height: 36px; margin-left: auto; padding: 0; border: 0; border-radius: 50%;
  background: var(--soft); color: var(--ink); cursor: pointer;
}
.panel-close::before, .panel-close::after { content: ""; position: absolute; left: 11px; right: 11px; top: 17px; height: 2px; background: currentColor; border-radius: 1px; }
.panel-close::before { transform: rotate(45deg); }
.panel-close::after { transform: rotate(-45deg); }
.panel-close:hover { background: var(--line); }
.panel-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 18px 22px; }
.panel-title { font-size: 24px; line-height: 1.2; margin: 0 44px 6px 0; }
.panel-title:focus { outline: none; }
.panel-meta { margin: 2px 0 0; color: var(--muted); font-size: 15px; line-height: 1.4; }
.map-panel .tally { justify-content: flex-start; margin-top: 12px; font-size: 15px; }
.map-panel .tally.new { display: block; }
.panel-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; }
.panel-actions .btn { min-height: 36px; font-size: 14px; }
.panel-section { margin: 24px 0 10px; font-size: 18px; }
.panel-section .detail { color: var(--muted); font-size: 14px; font-weight: 600; margin-left: 4px; }
.map-panel .seg-panel { margin-top: 10px; }
.map-panel .photo-row { padding: 8px; }
.map-panel .photo-row .photo { width: 72px; height: 90px; }
.panel-more { margin: 14px 0 0; font-size: 14px; }
.panel-wait { margin-top: 16px; }
.map-panel .app-note { margin: 22px 0 0; font-size: 14px; }
.map-panel .who-line { gap: 8px; margin-top: 2px; font-size: 17px; }
.map-panel .chips { margin-top: 10px; }
.map-panel .post-photos { margin-top: 14px; }
.map-panel .post-photos li { flex-basis: 100%; }
.map-panel .post-photos.many li { flex-basis: 86%; }
.map-panel .dish-row { padding: 10px 12px; }
.dish-price { color: var(--muted); font-size: 14px; font-weight: 600; white-space: nowrap; }
.panel-body { margin-top: 14px; font-size: 16px; line-height: 1.5; white-space: pre-line; overflow-wrap: anywhere; }

@media (max-width: 899px) and (min-height: 481px) {
  .map-panel { top: auto; left: 0; right: 0; bottom: 0; width: auto; max-width: none; height: 68%; border-width: 1px 0 0; border-radius: 18px 18px 0 0; }
  .map-panel::before { content: ""; position: absolute; left: 50%; top: 6px; width: 36px; height: 4px; margin-left: -18px; border-radius: 2px; background: var(--line); }
  .has-panel .map-top { padding-right: max(16px, env(safe-area-inset-right)); }
  .has-panel .map-bottom { display: none; }
  .has-panel .map-credit { bottom: 68%; }
  .panel-bar { padding-top: 12px; }
  .panel-scroll { padding-bottom: max(22px, env(safe-area-inset-bottom)); }
  .panel-title { font-size: 22px; }
}
@media (max-height: 480px) {
  .map-home { --panel-w: min(380px, 52vw); }
  .map-panel { top: 8px; bottom: 26px; }
  .panel-title { font-size: 20px; }
}
@media (prefers-reduced-motion: no-preference) {
  .map-panel:not([hidden]) { animation: panel-in 0.18s ease-out; }
}
@keyframes panel-in { from { opacity: 0; transform: translateY(8px); } }

.map-fallback { position: absolute; left: 16px; right: 16px; top: 50%; z-index: 1; text-align: center; font-size: 15px; visibility: hidden; animation: map-late-show 0s 5s forwards; }
.map-live .map-fallback { display: none; }
.map-credit { animation: map-late-hide 0s 5s forwards; }
.map-live .map-credit { animation: none; }
@keyframes map-late-show { to { visibility: visible; } }
@keyframes map-late-hide { to { visibility: hidden; } }

.map-credit {
  position: absolute; left: 0; bottom: 0; z-index: 2; max-width: 100%; padding: 3px 8px; border-top-right-radius: 8px;
  background: color-mix(in srgb, var(--bg) 82%, transparent); color: var(--muted); font-size: 11px; line-height: 1.35;
}
.map-credit a { text-decoration: none; }
.map-credit a:hover { color: var(--ink); text-decoration: underline; }

.map-peek {
  flex: none; display: flex; align-items: center; justify-content: space-between; gap: 6px 16px; flex-wrap: wrap;
  padding: 12px max(20px, env(safe-area-inset-left)); border-bottom: 1px solid var(--line); background: var(--bg);
}
.map-peek .eyebrow { margin: 0; font-size: 12px; }
.map-peek .text-link { font-size: 14.5px; white-space: nowrap; }

.page-prelaunch .hero { padding-top: 64px; }
.page-prelaunch .hero .lede { margin-top: 0; color: var(--ink); font-size: clamp(21px, 2.6vw, 30px); line-height: 1.32; font-weight: 700; letter-spacing: -0.015em; }
.page-prelaunch .areas-body { display: block; }
.page-prelaunch .area-list { grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.journeys-note { text-align: center; font-size: 13px; color: var(--muted); margin-top: 14px; }

@media (max-width: 560px) {
  .map-top { padding-top: 12px; padding-bottom: 26px; }
  .brand-tag { margin-left: 11px; padding-left: 11px; font-size: 13px; line-height: 18px; }
  .map-bottom { flex-direction: column; align-items: stretch; gap: 8px; }
  .map-card { flex: none; }
  .map-peek { padding-top: 10px; padding-bottom: 10px; }
  .page-prelaunch .hero { padding-top: 44px; }
}
@media (max-height: 480px) {
  .map-home { min-height: 0; }
  .map-top { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; padding-top: 6px; padding-bottom: 12px; text-align: left; }
  .map-search { flex: 1; min-width: 240px; max-width: none; margin: 0; }
  .map-note { flex-basis: 100%; margin-top: 0; }
  .map-field input { height: 44px; }
  .map-go { top: 4px; right: 4px; width: 36px; height: 36px; }
  .map-suggest { top: 50px; max-height: calc(100svh - 135px); }
  .map-bottom { flex-direction: row-reverse; align-items: flex-end; bottom: 26px; gap: 10px; }
  .map-card { flex: 0 1 360px; padding: 10px 40px 10px 14px; max-height: calc(100svh - 184px); overflow-y: auto; overscroll-behavior: contain; }
  .map-card-actions { margin-top: 4px; }
  .map-card-go, .map-card-do { min-height: 32px; }
  .map-card .area-mail { margin-top: 4px; }
  .map-card .map-card-near { margin-top: 6px; }
  .map-card-close { top: 4px; right: 4px; }
  .map-peek { flex-wrap: nowrap; padding-top: 6px; padding-bottom: 6px; }
  .map-peek .eyebrow { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}
@media (max-height: 480px) and (max-width: 560px) {
  .map-suggest { max-height: calc(100svh - 165px); }
  .map-card { max-height: calc(100svh - 207px); }
}
@media (forced-colors: active) {
  .map-go, .map-locate, .map-card-go { border: 1px solid ButtonText; }
}
@media (max-width: 359px) {
  .brand-tag { margin-left: 8px; padding-left: 8px; font-size: 11.5px; }
}
@media (max-width: 380px) {
  .page-prelaunch.past-map .brand-tag { display: none; }
}
