:root {
  --map-navy: #102b4e;
  --map-blue: #1769b0;
  --map-gold: #d5a73d;
  --map-ink: #14243b;
  --map-muted: #66768b;
  --map-line: #dce6ef;
}

.park-map-shell { max-width: 1280px; margin: 0 auto; padding: 18px 12px 48px; }
.park-map-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding: 26px 24px; border: 1px solid rgba(202,218,233,.85); border-radius: 24px; background: radial-gradient(circle at 88% 15%,rgba(91,180,239,.22),transparent 22rem),linear-gradient(135deg,#eef8ff 0,#fff 62%); box-shadow: 0 18px 46px rgba(17,42,74,.08); }
.park-map-eyebrow { display: block; margin-bottom: 9px; color: #2674af; font-size: 11px; font-weight: 900; letter-spacing: .16em; }
.park-map-hero h1 { margin: 0; color: var(--map-navy); font: 700 clamp(27px,4vw,44px)/1.2 Georgia,"Yu Mincho",serif; letter-spacing: -.035em; }
.park-map-hero p { max-width: 660px; margin: 13px 0 0; color: #4d6077; line-height: 1.8; }
.park-map-switch { display: inline-flex; gap: 5px; margin-top: 14px; padding: 4px; border: 1px solid #cfe0ef; border-radius: 999px; background: rgba(255,255,255,.76); }
.park-map-switch a { min-width: 76px; padding: 7px 13px; border-radius: 999px; color: #4c6077; font-size: 12px; font-weight: 900; text-align: center; }
.park-map-switch a.is-active { background: var(--map-blue); color: #fff; box-shadow: 0 4px 12px rgba(23,105,176,.2); }
.park-map-live { display: inline-flex; align-items: center; gap: 8px; flex: 0 0 auto; padding: 9px 12px; border: 1px solid #cfe6dc; border-radius: 999px; background: #f2fbf7; color: #24634b; font-size: 12px; font-weight: 800; }
.park-map-live-dot { width: 8px; height: 8px; border-radius: 50%; background: #16a36a; box-shadow: 0 0 0 5px rgba(22,163,106,.12); }

.park-map-panel,.park-map-guide { margin-top: 18px; border: 1px solid rgba(202,218,233,.9); border-radius: 24px; background: #fff; box-shadow: 0 18px 46px rgba(17,42,74,.075); }
.park-map-panel { padding: 18px; }
.park-map-toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 14px; }
.park-map-toolbar h2,.park-map-guide h2 { margin: 0; color: var(--map-navy); font-size: 20px; }
.park-map-toolbar p { margin: 5px 0 0; color: var(--map-muted); font-size: 12px; }
.park-map-filters { display: flex; gap: 7px; overflow-x: auto; align-items: center; padding: 2px; }
.map-filter { flex: 0 0 auto; border: 1px solid #cddbe8; border-radius: 999px; background: #fff; color: #40536b; padding: 8px 12px; font-weight: 800; cursor: pointer; }
.map-filter.is-active { border-color: var(--map-blue); background: var(--map-blue); color: #fff; }
.map-area-filter { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 5px; padding: 3px 4px 3px 11px; border: 1px solid #cddbe8; border-radius: 999px; background: #fff; color: #40536b; font-size: 13px; font-weight: 800; }
.map-area-filter.is-active { border-color: var(--map-blue); box-shadow: inset 0 0 0 1px var(--map-blue); color: var(--map-blue); }
.map-area-filter select { max-width: 132px; min-height: 28px; border: 0; background: transparent; color: inherit; font: inherit; outline: 0; }
.park-map-legend { display: flex; gap: 8px 16px; flex-wrap: wrap; margin: 0 0 14px; padding: 10px 12px; border: 1px solid #e0e8f0; border-radius: 14px; background: #f8fbfd; }
.park-map-legend span { display: inline-flex; align-items: center; gap: 6px; color: #516278; font-size: 11px; font-weight: 800; }
.legend-pin { width: 10px; height: 10px; border: 2px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px rgba(28,49,74,.14); }
.legend-attraction-shape { width: 11px; height: 14px; clip-path: polygon(50% 100%,0 43%,8% 18%,27% 3%,50% 0,73% 3%,92% 18%,100% 43%); background: var(--map-blue); }
.legend-restaurant-shape { width: 9px; height: 9px; border: 2px solid #fff; border-radius: 50%; background: #b64c78; box-shadow: 0 0 0 1px #b64c78,0 2px 5px rgba(33,38,54,.25); }
.legend-wait-low { background: #16835d; }
.legend-wait-mid { background: #c18a17; }
.legend-wait-high { background: #df6827; }
.legend-wait-very-high { background: #cc3545; }
.legend-stop-temporary { background: #8d55c7; }
.legend-stop-day { background: #536273; }
.legend-no-data { background: var(--map-blue); }
.park-map-filter-note { margin: -6px 3px 14px; color: #6b7b8e; font-size: 10px; line-height: 1.55; }
.park-map-layout { display: grid; gap: 14px; }
.park-map-stage { min-width: 0; }
.park-map-navigation { display: flex; justify-content: flex-end; align-items: center; gap: 6px; margin-bottom: 8px; }
.park-map-navigation span { margin-right: 3px; color: var(--map-muted); font-size: 10px; font-weight: 900; }
.park-map-navigation button { display: grid; place-items: center; min-width: 38px; height: 36px; padding: 0 11px; border: 1px solid #cbd9e6; border-radius: 10px; background: #fff; color: var(--map-navy); box-shadow: 0 3px 10px rgba(17,42,74,.08); font-size: 18px; font-weight: 900; cursor: pointer; }
.park-map-navigation button:last-child { font-size: 11px; }

.park-map-adjust { display: grid; grid-template-columns: minmax(180px,1fr) auto auto auto; align-items: end; gap: 10px; margin: 0 0 14px; padding: 13px; border: 1px solid #e0c477; border-radius: 15px; background: #fff9e9; }
.park-map-adjust[hidden] { display: none; }
.park-map-adjust label { display: grid; gap: 5px; color: #625328; font-size: 11px; font-weight: 900; }
.park-map-adjust select,.park-map-adjust button { min-height: 42px; border: 1px solid #d6bd77; border-radius: 11px; background: #fff; color: var(--map-ink); font: inherit; font-weight: 800; }
.park-map-adjust select { width: 100%; padding: 0 10px; }
.park-map-adjust button { padding: 0 13px; cursor: pointer; }
.park-map-adjust-output { min-width: 112px; color: #6a5621; font-size: 12px; font-weight: 900; text-align: center; }
.park-map-adjust-help { grid-column: 1/-1; margin: 0; color: #786a43; font-size: 11px; line-height: 1.6; }

.park-map-viewer { position: relative; overflow: hidden; aspect-ratio: 4/3; border: 1px solid #cbd8e5; border-radius: 19px; background: #f2eee4; touch-action: none; cursor: grab; isolation: isolate; }
.park-map-viewer.is-dragging { cursor: grabbing; }
.park-map-viewer.is-adjusting { box-shadow: inset 0 0 0 3px rgba(213,167,61,.72); }
.park-map-viewer.is-adjusting:not(.is-dragging) { cursor: crosshair; }
.park-map-viewer.is-adjusting .park-map-pin { pointer-events: none; }
.park-map-viewer.is-adjusting .park-map-pin:not(.is-active) { opacity: .3; }
.park-map-canvas { position: absolute; inset: 0; width: 100%; height: 100%; transform-origin: 0 0; will-change: transform; }
.park-map-canvas>img { display: block; width: 100%; height: 100%; object-fit: cover; pointer-events: none; user-select: none; }
.park-map-pins { position: absolute; inset: 0; }

/* The button is a large invisible touch target; the SVG tip marks the exact map coordinate. */
.park-map-pin { position: absolute; left: var(--pin-x); top: var(--pin-y); z-index: 2; width: 34px; height: 38px; padding: 0; transform: translate(-50%,-50%); border: 0; background: transparent; color: var(--map-blue); cursor: pointer; touch-action: none; }
.park-map-pin-marker { position: absolute; left: 50%; bottom: 50%; width: clamp(17px,2vw,22px); height: clamp(23px,2.7vw,30px); transform: translateX(-50%) scale(1); transform-origin: 50% 100%; filter: drop-shadow(0 4px 5px rgba(10,42,76,.3)); transition: transform .18s ease,filter .18s ease,color .18s ease; }
.park-map-pin-marker svg { display: block; width: 100%; height: 100%; overflow: visible; }
.park-map-pin-marker path { fill: currentColor; stroke: #fff; stroke-width: 2.4; vector-effect: non-scaling-stroke; }
.park-map-pin-number { position: absolute; left: 50%; top: 36%; transform: translate(-50%,-50%); color: #fff; font-size: clamp(8px,.9vw,10px); font-weight: 900; line-height: 1; }
.park-map-pin:hover,.park-map-pin:focus-visible { z-index: 5; outline: none; }
.park-map-pin:hover .park-map-pin-marker,.park-map-pin:focus-visible .park-map-pin-marker { transform: translateX(-50%) scale(1.1); }
.park-map-pin.is-active { z-index: 7; color: var(--map-gold); }
.park-map-pin.is-active .park-map-pin-marker { transform: translateX(-50%) scale(1.35); filter: drop-shadow(0 6px 8px rgba(21,49,80,.38)); }
.park-map-pin.is-hidden { display: none; }
.park-map-pin.wait-low { color: #16835d; }
.park-map-pin.wait-mid { color: #c18a17; }
.park-map-pin.wait-high { color: #df6827; }
.park-map-pin.wait-very-high { color: #cc3545; }
.park-map-pin.stop-temporary { color: #8d55c7; }
.park-map-pin.stop-day { color: #536273; }
.park-map-pin.is-active { color: var(--map-gold); }
.park-map-pin.is-restaurant { width: var(--restaurant-hit-size,18px); height: var(--restaurant-hit-size,18px); color: #b64c78; }
.park-map-pin.is-restaurant .park-map-pin-marker { bottom: 50%; width: var(--restaurant-marker-size,6.5px); height: var(--restaurant-marker-size,6.5px); border: var(--restaurant-marker-border,1.5px) solid #fff; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 1px rgba(73,33,52,.25),0 2px 5px rgba(26,37,54,.32); filter: none; }
.park-map-pin.is-restaurant .park-map-pin-marker svg,.park-map-pin.is-restaurant .park-map-pin-number { display: none; }
.park-map-pin.is-restaurant:hover .park-map-pin-marker,.park-map-pin.is-restaurant:focus-visible .park-map-pin-marker { transform: translateX(-50%) scale(1.35); }
.park-map-pin.is-restaurant.is-active .park-map-pin-marker { transform: translateX(-50%) scale(1.8); box-shadow: 0 0 0 2px rgba(213,167,61,.5),0 3px 7px rgba(26,37,54,.38); }
.park-map-callout { position: absolute; z-index: 12; width: min(230px,calc(100% - 16px)); padding: 10px 34px 10px 11px; border: 1px solid rgba(196,211,225,.96); border-radius: 12px; background: rgba(255,255,255,.98); box-shadow: 0 10px 28px rgba(17,42,74,.25); color: var(--map-ink); font-size: 11px; line-height: 1.45; }
.park-map-callout[hidden] { display: none; }
.park-map-callout strong { display: block; padding-right: 2px; font-size: 12px; line-height: 1.35; }
.park-map-callout em { display: block; margin-top: 2px; color: var(--map-blue); font-size: 13px; font-style: normal; font-weight: 900; }
.park-map-callout small { display: block; margin-top: 2px; color: #596b7f; font-size: 9px; font-weight: 800; }
.map-callout-close,.map-detail-close { position: absolute; display: grid; place-items: center; width: 27px; height: 27px; padding: 0; border: 0; border-radius: 50%; background: #eef4f9; color: #42566f; font-size: 18px; font-weight: 800; line-height: 1; cursor: pointer; }
.map-callout-close { right: 6px; top: 6px; }
.park-map-hint { position: absolute; left: 12px; bottom: 12px; z-index: 8; padding: 7px 10px; border-radius: 999px; background: rgba(15,40,70,.82); color: #fff; font-size: 11px; font-weight: 800; pointer-events: none; }

.park-map-detail { position: relative; min-height: 210px; padding: 18px; border: 1px solid var(--map-line); border-radius: 19px; background: linear-gradient(160deg,#f8fbff,#fff); }
.map-detail-close { right: 10px; top: 10px; }
.map-detail-empty { display: grid; place-items: center; height: 100%; min-height: 174px; text-align: center; }
.map-detail-empty h2 { margin: 8px 0 3px; color: var(--map-navy); font-size: 18px; }
.map-detail-empty p { max-width: 300px; margin: 0; color: var(--map-muted); font-size: 13px; line-height: 1.7; }
.map-detail-compass { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: #e6f3ff; color: var(--map-blue); font-size: 20px; }
.map-detail-area { color: #2876af; font-size: 11px; font-weight: 900; letter-spacing: .08em; }
.map-detail-title { margin: 7px 0 14px; color: var(--map-navy); font-size: 21px; line-height: 1.45; }
.map-detail-status { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.map-detail-metric { padding: 11px; border: 1px solid #dce7f0; border-radius: 13px; background: #fff; }
.map-detail-metric span { display: block; color: #718197; font-size: 10px; font-weight: 800; }
.map-detail-metric strong { display: block; margin-top: 4px; color: var(--map-ink); font-size: 17px; }
.map-detail-access { display: grid; gap: 7px; margin-top: 10px; }
.map-access-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 10px; border-radius: 11px; font-size: 11px; }
.map-access-row strong { font-size: 12px; }
.map-access-row span { color: inherit; opacity: .78; font-size: 9px; text-align: right; }
.map-access-active { background: #e8f8ef; color: #14764c; }
.map-access-ended { background: #fff2e8; color: #a64d16; }
.map-access-linecut { background: #eef3f8; color: #3c5068; }
.map-access-closed { background: #edf0f3; color: #435163; }
.map-detail-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.map-detail-badge { padding: 4px 8px; border-radius: 999px; background: #e8f3ff; color: #1760a0; font-size: 10px; font-weight: 900; }
.map-detail-link { display: flex; align-items: center; justify-content: center; margin-top: 14px; padding: 11px 14px; border-radius: 13px; background: var(--map-navy); color: #fff; font-size: 13px; font-weight: 900; }
.map-detail-link:hover { background: #164a7d; }

body.park-map-adjustment-mode.is-map-adjust-expanded { overflow: hidden; }
body.park-map-adjustment-mode.is-map-adjust-expanded .site-header,
body.park-map-adjustment-mode.is-map-adjust-expanded .footer-wrap,
body.park-map-adjustment-mode.is-map-adjust-expanded .park-map-hero,
body.park-map-adjustment-mode.is-map-adjust-expanded .park-map-toolbar,
body.park-map-adjustment-mode.is-map-adjust-expanded .park-map-legend,
body.park-map-adjustment-mode.is-map-adjust-expanded .park-map-filter-note,
body.park-map-adjustment-mode.is-map-adjust-expanded .park-map-detail,
body.park-map-adjustment-mode.is-map-adjust-expanded .park-map-guide { display: none; }
body.park-map-adjustment-mode.is-map-adjust-expanded .page-container { max-width: none; padding: 0; }
body.park-map-adjustment-mode.is-map-adjust-expanded .park-map-shell { max-width: none; height: 100dvh; padding: 0; }
body.park-map-adjustment-mode.is-map-adjust-expanded .park-map-panel { position: fixed; inset: 0; z-index: 1000; display: flex; flex-direction: column; margin: 0; padding: 8px; border: 0; border-radius: 0; }
body.park-map-adjustment-mode.is-map-adjust-expanded .park-map-adjust { flex: 0 0 auto; margin-bottom: 7px; padding: 8px; }
body.park-map-adjustment-mode.is-map-adjust-expanded .park-map-adjust-help { display: none; }
body.park-map-adjustment-mode.is-map-adjust-expanded .park-map-layout { display: block; flex: 1 1 auto; min-height: 0; }
body.park-map-adjustment-mode.is-map-adjust-expanded .park-map-stage { display: flex; flex-direction: column; height: 100%; }
body.park-map-adjustment-mode.is-map-adjust-expanded .park-map-navigation { flex: 0 0 auto; margin-bottom: 5px; }
body.park-map-adjustment-mode.is-map-adjust-expanded .park-map-viewer { flex: 1 1 auto; min-height: 0; aspect-ratio: auto; border-radius: 12px; }

.park-map-guide { padding: 22px; }
.park-map-guide-grid { display: grid; gap: 10px; margin-top: 14px; }
.park-map-guide article { position: relative; padding: 15px 14px 14px 50px; border: 1px solid #e1e9f1; border-radius: 15px; background: #f9fbfd; }
.park-map-guide article>span { position: absolute; left: 13px; top: 13px; display: grid; place-items: center; width: 27px; height: 27px; border-radius: 50%; background: #e5f2ff; color: var(--map-blue); font-weight: 900; }
.park-map-guide strong { display: block; color: var(--map-navy); }
.park-map-guide article p,.park-map-note { margin: 6px 0 0; color: var(--map-muted); font-size: 12px; line-height: 1.7; }
.park-map-note { margin-top: 15px; }
.map-load-error { color: #a33b46; }

@media (min-width:900px) {
  .park-map-shell { padding: 24px 18px 58px; }
  .park-map-panel { padding: 22px; }
  .park-map-layout { grid-template-columns: minmax(0,3fr) minmax(270px,1fr); }
  .park-map-detail { min-height: 0; }
  .park-map-guide-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
}

@media (max-width:719px) {
  .park-map-shell { padding: 10px 8px 36px; }
  .park-map-hero { display: block; padding: 20px 16px; border-radius: 18px; }
  .park-map-hero h1 { font-size: 27px; }
  .park-map-hero p { font-size: 13px; }
  .park-map-live { margin-top: 14px; }
  .park-map-panel,.park-map-guide { border-radius: 18px; }
  .park-map-panel { padding: 10px; }
  .park-map-toolbar { display: block; padding: 7px 5px 0; }
  .park-map-filters { margin-top: 12px; }
  .park-map-legend { gap: 7px 12px; padding: 9px; }
  .park-map-legend span { font-size: 10px; }
  .park-map-adjust { grid-template-columns: 1fr auto; }
  .park-map-adjust label { grid-column: 1/-1; }
  .park-map-adjust-output { text-align: left; }
  body.park-map-adjustment-mode.is-map-adjust-expanded .park-map-adjust { grid-template-columns: minmax(0,1fr) auto auto; }
  body.park-map-adjustment-mode.is-map-adjust-expanded .park-map-adjust label { grid-column: 1/-1; }
  body.park-map-adjustment-mode.is-map-adjust-expanded .park-map-adjust-output { display: none; }
  body.park-map-adjustment-mode.is-map-adjust-expanded .park-map-adjust button { min-height: 36px; padding: 0 9px; font-size: 11px; }
  .park-map-pin { width: 28px; height: 32px; }
  .park-map-pin-marker { width: clamp(11px,3vw,15px); height: clamp(16px,4.2vw,21px); }
  .park-map-hint { font-size: 10px; }
  .park-map-detail { padding: 15px; }
  .park-map-guide { padding: 18px 14px; }
}

@media (prefers-reduced-motion:reduce) {
  .park-map-canvas,.park-map-pin-marker { transition: none; }
}
