:root {
  color-scheme: light;
  --accent: #578000;
  --accent-wash: #f0f5e6;
  --ink: #202b33;
  --muted: #556471;
  --line: #e4e8eb;
  --white: #fff;
  --sea: #edf3f5;
  --sand: #9b6a3f;
  --slate: #657481;
  --display: "Iowan Old Style", Baskerville, Georgia, serif;
  font: 14px/1.5 system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: #fbfcfc;
}
* { box-sizing: border-box }
body { margin: 0 }
button, input { font: inherit; color: inherit }
button { cursor: pointer }
button:focus-visible, input:focus-visible, svg:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px }
header { min-height: 76px; padding: 12px 30px; display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--white); border-bottom: 1px solid var(--line) }
.brand { display: flex; gap: 14px; align-items: center }
.brand b { font: 500 34px/.95 var(--display); letter-spacing: -.06em; color: var(--accent) }
.brand > span, .eyebrow { font-size: 10px; letter-spacing: .16em; font-weight: 700 }
.brand > span { border-left: 1px solid var(--line); padding-left: 14px; color: var(--muted) }
nav, .filters { display: flex; flex-wrap: wrap; gap: 5px }
nav { padding: 4px; border-radius: 12px; background: #f5f7f8; border: 1px solid var(--line) }
nav button, .filters button { background: transparent; border: 1px solid transparent; border-radius: 8px; font-size: 13px; font-weight: 650; padding: 7px 12px }
nav button[aria-pressed=true] { color: var(--accent); background: var(--white); border-color: #dce5eb; box-shadow: 0 1px 2px #2033400c }
nav button:hover, .filters button:hover { color: var(--accent) }
main { display: grid; grid-template-columns: minmax(307px, 364px) minmax(0,1fr); height: calc(100dvh - 76px); min-height: 490px; gap: 16px; padding: 16px }
.guide { display: flex; flex-direction: column; min-height: 0; background: var(--white); border: 1px solid var(--line); border-radius: 16px; overflow: hidden }
.intro { padding: 25px 22px 13px }
.eyebrow { margin: 0 0 10px; color: var(--accent) }
h1, h2 { font-family: var(--display); font-weight: 400 }
h1 { font-size: clamp(34px,4vw,49px); line-height: .99; letter-spacing: -.045em; margin: 0 0 13px }
.intro > p:last-child { margin: 0; color: var(--muted); font-size: 13px }
.browse { padding: 0 22px 14px; border-bottom: 1px solid var(--line) }
.search { display: flex; align-items: center; gap: 8px; margin: 4px 0 10px; padding: 5px 10px; border: 1px solid var(--line); background: #fbfcfd; border-radius: 8px }
.search > span { font-size: 22px; line-height: 1; color: var(--accent) }
.search input { width: 100%; min-width: 0; border: 0; background: none; padding: 4px 0 }
.filters button { padding: 5px 8px; border-color: var(--line); font-size: 11px }
.filters button[aria-pressed=true] { background: var(--accent-wash); color: var(--accent); border-color: #d3e0bb }
.results { overflow: auto; padding: 0 14px 12px }
#count { color: var(--muted); font-size: 11px; margin: 12px 8px 6px }
.row { display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 11px 8px; border: 0; border-bottom: 1px solid var(--line); background: none }
.row:hover, .row[aria-current=true] { background: var(--accent-wash) }
.row strong, .row small { display: block }
.row strong { font-size: 13px }
.row small { font-size: 11px; color: var(--muted); margin-top: 2px }
.row > span:last-child { color: var(--accent) }
.row em, .legend i { font-style: normal; display: grid; place-items: center }
.row em { width: 27px; height: 27px; border-radius: 7px }
.stay { color: var(--accent); background: var(--accent-wash) }
.beach { color: #81512c; background: #f6efe8 }
.spot { color: #536575; background: #eef1f4 }
.map-panel { position: relative; min-width: 0; min-height: 0; isolation: isolate; background: var(--sea); border: 1px solid #dbe4e8; border-radius: 16px; overflow: hidden }
#map { width: 100%; height: 100%; display: block; touch-action: none; cursor: grab }
#map:active { cursor: grabbing }
#map:focus-visible { outline-offset: -3px }
.marker { cursor: pointer; outline: none }
.marker .anchor { fill: var(--accent) }
.marker .pin-face { fill: white; stroke: var(--accent); stroke-width: 1.4; filter: drop-shadow(0 2px 2px #1f385226) }
.marker .pin-symbol { stroke: var(--accent) }
.marker:is(:hover,:focus,.active) .pin-face { fill: var(--accent); stroke: white }
.marker:is(:hover,:focus,.active) .pin-symbol { stroke: white }
.marker:focus .poi, .marker:hover .poi { stroke: var(--ink); stroke-width: 1.8 }
.poi.beach { fill: var(--sand) }
.poi.spot { fill: var(--slate) }
.zoom { position: absolute; right: 14px; top: 73px; display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; box-shadow: 0 2px 10px #2f485c12 }
.zoom button, .detail > button { border: 0; background: white; padding: 0; width: 37px; height: 37px; font-size: 21px; color: var(--accent) }
.zoom button:hover, .detail > button:hover { background: var(--accent-wash) }
.north { position: absolute; right: 15px; top: 15px; width: 38px; padding: 4px 0; border-radius: 9px; border: 1px solid var(--line); background: white; color: var(--accent); text-align: center; font-size: 9px; font-weight: 700; pointer-events: none }
.north span { display: block; font-size: 18px; line-height: 1 }
.legend, .detail { position: absolute; left: 14px; background: white; border: 1px solid var(--line); box-shadow: 0 5px 22px #23374615; border-radius: 11px }
.legend { bottom: 14px; display: flex; gap: 12px; padding: 8px 11px; font-size: 11px; font-weight: 650 }
.legend span { display: flex; align-items: center; gap: 6px }
.legend i { width: 8px; height: 8px; border-radius: 50% }
.legend .stay { background: white; border: 1.5px solid var(--accent); border-radius: 50% 50% 50% 0; transform: rotate(-45deg) }
.legend .beach { background: var(--sand) }
.legend .spot { background: var(--slate); border-radius: 1px; transform: rotate(45deg) }
.detail { bottom: 61px; width: min(320px,calc(100% - 75px)); padding: 16px; }
.detail h2 { font-size: 24px; margin: 4px 24px 5px 0; line-height: 1.08 }
.detail p { margin: 7px 0; font-size: 13px }
.detail .meta { font-size: 10px; text-transform: uppercase; letter-spacing: .09em; font-weight: 750; color: var(--accent) }
.detail .coords { font-size: 11px; color: var(--muted); user-select: all }
.detail > button { position: absolute; top: 6px; right: 6px; width: 30px; height: 30px; border-radius: 6px }
.nearby { display: grid; gap: 4px; max-height: 110px; overflow: auto; margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line) }
.nearby button { border: 0; text-align: left; background: var(--accent-wash); color: var(--accent); border-radius: 5px; padding: 4px 8px; font-size: 11px }
@media(max-width:720px) {
  header { padding: 8px 12px; flex-wrap: wrap; gap: 7px }
  .brand b { font-size: 29px }
  .brand > span { font-size: 9px }
  nav { padding: 2px }
  nav button { padding: 6px 8px; font-size: 12px }
  main { display: flex; flex-direction: column; height: auto; min-height: 0; padding: 8px; gap: 9px }
  .map-panel { order: -1; height: 57svh; min-height: 320px }
  .intro { padding-top: 19px }
  h1 br { display: none }
  .results { overflow: visible }
}
.airport { color: #475967; background: #eaf0f3 }
.legend .airport { width: auto; height: auto; border-radius: 0; background: none; font-size: 12px }
.airport-pin { fill: #fff; stroke: #657b8a; stroke-width: 1.1 }
.airport-plane, .airport-code { fill: #364b59; font-size: 11px; font-weight: 700; pointer-events: none }
.airport-code { font-size: 9px; paint-order: stroke; stroke: #f7fafb; stroke-width: 3px }
.marker:is(:hover,:focus,.active) .airport-pin { fill: #425967; stroke: #fff }
.marker:is(:hover,:focus,.active) .airport-plane { fill: #fff }
.detail { max-height: calc(100% - 74px); overflow: auto; scrollbar-width: thin }
.place-photo { margin: 11px 0 8px }
.place-photo img { display: block; width: 100%; aspect-ratio: 2.1; object-fit: cover; border-radius: 7px; background: #f0f2f2 }
.place-photo figcaption { font-size: 9px; color: var(--muted); margin-top: 4px; overflow-wrap: anywhere }
@media(max-width:720px) {
  .detail { bottom: 53px; max-height: calc(100% - 64px) }
  .legend { gap: 8px; bottom: 10px }
}

.stay-control { display: flex; align-items: center; gap: 8px; min-width: 0; color: var(--muted); font-size: 12px; font-weight: 650 }
.stay-control > span { white-space: nowrap }
.stay-control select { min-width: 0; width: clamp(165px,24vw,250px); border: 1px solid #d3e0bb; border-radius: 8px; padding: 7px 8px; color: var(--ink); background-color: var(--accent-wash); font: inherit }
.stay-control select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px }
.marker.base .pin-face { stroke-width: 2.5 }
.marker.base .anchor { r: 4px }
.drive-card { margin-top: 9px; padding: 9px 10px; border: 1px solid #d3e0bb; border-radius: 8px; background: var(--accent-wash) }
.drive-card strong { display: block; color: var(--accent); font-size: 15px; line-height: 1.25 }
.drive-card p { margin: 0; font-size: 11px }
.drive-card .drive-origin { margin-bottom: 4px; font-weight: 650; color: var(--ink) }
.drive-card .drive-note { margin-top: 4px; color: var(--muted) }
.set-stay { padding: 0; border: 0; background: transparent; color: var(--accent); font-size: 12px; font-weight: 700; text-decoration: underline; text-underline-offset: 2px }
.drive-card p + .set-stay { margin-top: 5px }
@media(max-width:820px) {
  header { flex-wrap: wrap; }
  .stay-control { flex: 1 1 100%; }
  .stay-control select { width: auto; flex: 1; }
  main { height: calc(100dvh - 119px); }
}
@media(max-width:720px) {
  main { height: auto; }
}

#route-layer { pointer-events: none }
.route-halo, .route-road, .route-ferry { fill: none; stroke-linejoin: round; stroke-linecap: round }
.route-halo { stroke: #fff; stroke-width: 6.5 }
.route-road { stroke: var(--accent); stroke-width: 3.4 }
.route-ferry { stroke: #386b84; stroke-width: 3; stroke-dasharray: 4 6 }
.drive-card .drive-total { margin-top: 5px; color: var(--ink) }
@media(max-width:720px) {
  .map-panel:has(.has-route:not([hidden])) { height: auto }
  .map-panel:has(.has-route:not([hidden])) #map { height: max(320px,57svh) }
  .map-panel:has(.has-route:not([hidden])) .legend { top: calc(max(320px,57svh) - 43px); bottom: auto }
  .detail.has-route { position: relative; inset: auto; width: auto; margin: 0 8px 8px; max-height: none; overflow: visible }
}
