:root {
  color-scheme: light;
  --paper: #f8f5ec;
  --white: #fffdf7;
  --ink: #192e31;
  --plum: #173d42;
  --wine: #14555f;
  --muted: #545e5d;
  --line: #c7c7ba;
  --soft: #e1e9e4;
  --serif: Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1rem/1.6 var(--sans); }
body:has(dialog[open]) { overflow: hidden; }
a { color: var(--wine); text-underline-offset: .18em; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid #97601a; outline-offset: 3px; }
h1, h2 { font-family: var(--serif); font-weight: 400; line-height: 1.04; margin: 0; }
p { margin: 0 0 1rem; }
img { display: block; max-width: 100%; }
figure { margin: 0; }
.frame { max-width: 68rem; width: calc(100% - 2.5rem); margin-inline: auto; }
.top { background: var(--plum); color: var(--white); border-bottom: 3px solid #bc9f70; }
.top-inner { min-height: 4rem; display: flex; justify-content: space-between; align-items: center; gap: .6rem; }
.wordmark { color: inherit; font: 1.05rem var(--serif); text-decoration: none; }
.catalog-home { display: inline-flex; align-items: center; min-height: 44px; font: inherit; font-weight: 650; }
.map-open { min-height: 44px; border: 1px solid #adc6c2; background: transparent; color: inherit; border-radius: .35rem; padding: .3rem .85rem; white-space: nowrap; }
.map-open:hover { background: #24525a; }
.page:focus, #page:focus, [tabindex="-1"]:focus { outline: none; }
.hero { display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: 2rem; padding-block: 3.5rem 2.75rem; }
.overline { margin: 0 0 .7rem; color: var(--wine); font-weight: 700; font-size: .75rem; letter-spacing: .11em; text-transform: uppercase; }
.hero h1 { font-size: clamp(3rem, 7.5vw, 6.75rem); letter-spacing: -.065em; }
.deck { font-size: 1.12rem; margin-block: 1.15rem; max-width: 36rem; }
.cover-art { background: var(--soft); border: 1px solid #a9b1a6; padding: .5rem; }
.cover-art img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.stats { margin: 1.3rem 0; display: flex; flex-wrap: wrap; gap: .7rem 1.35rem; }
.stats div { border-left: 2px solid #927338; padding-left: .65rem; }
.stats dt { font-size: .75rem; color: var(--muted); }
.stats dd { margin: 0; font-weight: 700; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.button { border: 1px solid transparent; border-radius: .35rem; min-height: 44px; display: inline-flex; gap: .5rem; align-items: center; justify-content: center; padding: .65rem .95rem; line-height: 1.2; font-weight: 700; text-decoration: none; text-align: center; }
.primary { background: var(--plum); color: var(--white); }
.primary:hover { background: var(--wine); }
.secondary { background: var(--white); border-color: #78908d; color: var(--plum); }
.secondary:hover { background: var(--soft); }
.terrain, .colophon { font-size: .88rem; color: var(--muted); margin: .9rem 0 0; }
.route-home { border-top: 1px solid var(--line); padding-block: 1.5rem 3rem; }
.section-top { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: .65rem; }
.section-top h2 { font-size: 2rem; }
.stop-index { padding: 0; margin: 1rem 0; display: grid; grid-template-columns: repeat(3, 1fr); list-style: none; gap: .6rem; }
.stop-index a { display: flex; height: 100%; align-items: center; gap: .65rem; padding: .8rem; border: 1px solid var(--line); background: var(--white); color: var(--ink); text-decoration: none; }
.stop-index a:hover { border-color: var(--wine); }
.stop-index small { display: block; color: var(--muted); }
.badge { display: inline-grid; place-items: center; background: var(--soft); color: var(--plum); width: 1.75rem; height: 1.75rem; flex: none; border-radius: 50%; font-weight: 800; }
.arrow { margin-left: auto; }
.stop { max-width: 42rem; margin: 0 auto; padding-block: 1.8rem calc(7rem + env(safe-area-inset-bottom)); }
.stop-head h1, .finish h1 { font-size: clamp(2.55rem, 6vw, 4.65rem); letter-spacing: -.055em; }
.address { margin: .5rem 0 1.1rem; color: var(--muted); }
.directions { border: 1px solid #92a5a1; background: #e7eeea; border-radius: .35rem; padding: 0 .9rem .05rem; margin-bottom: 1rem; }
summary { min-height: 44px; font-weight: 700; cursor: pointer; line-height: 1.4; padding-block: .65rem; }
.directions ol { margin: 0 0 .55rem; padding-left: 1.35rem; }
.directions li + li { margin-top: .35rem; }
.directions a { display: inline-flex; align-items: center; min-height: 44px; margin-bottom: .2rem; }
.card { padding: clamp(1rem, 4vw, 1.6rem); border: 1px solid var(--line); background: var(--white); border-radius: .35rem; }
.card h2, .story h2 { margin-bottom: 1rem; font-size: clamp(1.6rem, 4.5vw, 2.65rem); line-height: 1.12; }
.arrive h2 { margin-bottom: .5rem; }
.options { display: grid; gap: .55rem; }
.option { min-height: 48px; background: var(--white); color: var(--ink); border: 1px solid #939e96; padding: .55rem .75rem; border-radius: .3rem; text-align: left; }
.option:not(:disabled):hover { background: var(--soft); }
.option:disabled { cursor: default; }
.option.correct { background: #e3eddf; color: #294030; border-color: #6b866c; }
.option.incorrect { background: #f4e0dd; color: #6b353e; border-color: #a46a70; }
.quiz-actions { margin-top: .7rem; }
.hint p { margin: 0 0 .8rem; color: var(--muted); }
.feedback { padding: .7rem .8rem; border-left: 3px solid #567657; background: #eef2e9; margin: .8rem 0; }
.feedback.miss { background: var(--soft); border-color: #a46a70; }
.feedback p, .review p { margin: .15rem 0 0; }
.review { padding-left: 1.25rem; margin-bottom: 1.2rem; }
.review li { margin-bottom: .65rem; }
.text-button { border: 0; background: transparent; color: var(--wine); text-decoration: underline; text-underline-offset: .2em; padding: .35rem .4rem; min-height: 44px; }
.story { padding-top: .65rem; }
.stop-art { margin: 0 0 1rem; }
.stop-art img { background: var(--soft); width: 100%; max-height: 300px; object-fit: cover; }
figcaption { font-size: .84rem; color: var(--muted); margin-top: .35rem; }
.look { padding: .85rem; border-left: 3px solid #927338; background: #f2e9d2; }
.look strong { display: block; }
.refs { margin-bottom: 1rem; }
.refs ul { margin: 0; padding-left: 1.25rem; }
.refs a { display: inline-flex; align-items: center; min-height: 44px; }
.next { position: fixed; z-index: 1; left: 0; right: 0; bottom: 0; padding: .55rem 0 calc(.55rem + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--white); }
.next-inner { max-width: 42rem; display: flex; justify-content: space-between; gap: .65rem; align-items: center; }
.next-inner > a:first-child { min-height: 44px; display: inline-flex; align-items: center; }
.finish { max-width: 42rem; margin: auto; padding-block: 3rem; }
.finish > p:not(.overline) { margin-block: 1rem; }
dialog { border: 1px solid #92a5a1; padding: 0; border-radius: .75rem; width: min(calc(100% - 1.5rem), 36rem); max-width: none; max-height: min(88dvh, 48rem); color: var(--ink); background: var(--white); }
dialog::backdrop { background: #241921b0; }
.sheet-head { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: center; gap: .65rem; padding: .75rem 1rem .45rem; background: var(--white); border-bottom: 1px solid var(--line); }
.sheet-head h2 { font-size: clamp(1.35rem, 4.2vw, 1.9rem); }
.handle { position: absolute; top: 0; width: 5rem; height: .85rem; left: calc(50% - 2.5rem); touch-action: none; cursor: grab; }
.handle::before { content: ""; display: block; height: 3px; width: 2.4rem; background: #83948e; margin: 3px auto 0; border-radius: 6px; }
.quiet { min-height: 44px; padding: .35rem .65rem; background: var(--white); border: 1px solid #78908d; border-radius: .35rem; color: var(--plum); }
.sheet-body { padding: .75rem 1rem 1rem; }
#map { margin: 0 auto; position: relative; width: min(100%, 78dvh); aspect-ratio: 760 / 730; background: #f1ebe0; border: 1px solid var(--line); }
#map img { width: 100%; height: 100%; }
.pin { position: absolute; transform: translate(-50%, -50%); width: 44px; height: 44px; padding: 0; border: 0; background: transparent; color: var(--white); display: grid; place-items: center; font-size: 14px; font-weight: 800; isolation: isolate; }
.pin::before { content: ""; position: absolute; z-index: -1; width: 24px; height: 24px; border: 2px solid var(--white); border-radius: 50%; background: var(--plum); }
.pin[aria-pressed="true"]::before { background: #33646b; box-shadow: 0 0 0 2px #33646b; }
.pin[aria-current="location"]::after { content: ""; position: absolute; width: 6px; height: 6px; border-radius: 50%; background: #fff3ba; bottom: 7px; right: 7px; border: 1px solid var(--plum); }
.map-note { font-size: .78rem; color: var(--muted); margin: .3rem 0 .6rem; text-align: center; }
.map-list { display: grid; gap: .3rem; grid-template-columns: repeat(3, 1fr); }
.map-list button { min-height: 44px; border: 1px solid var(--line); background: var(--white); color: var(--ink); padding: .4rem; font-size: .86rem; line-height: 1.2; }
.map-list .badge { width: 1.35rem; height: 1.35rem; margin-right: .25rem; font-size: .72rem; }
.map-list button[aria-pressed="true"] { border-color: var(--wine); background: var(--soft); }
.map-preview { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .65rem; min-height: 4.1rem; border-top: 1px solid var(--line); margin-top: .7rem; padding-top: .55rem; }
.map-preview p { margin: 0; font-size: .88rem; color: var(--muted); }
@media (max-width: 650px) {
  .top { position: sticky; top: 0; z-index: 2; }
  html { scroll-padding-top: 4.65rem; }
  .hero { grid-template-columns: 1fr; gap: 1.2rem; padding-block: 1.65rem 1.35rem; }
  .cover-art img { max-height: 10.5rem; }
  .stop-index { grid-template-columns: 1fr; }
  .stop { padding-top: 1.3rem; }
  dialog { margin: auto auto 0; width: 100%; border-radius: .75rem .75rem 0 0; max-height: 90dvh; }
}
@media (max-height: 500px) and (orientation: landscape) {
  #map { width: min(100%, 66dvh); }
}

@media (prefers-reduced-motion: no-preference) and (max-width: 650px) {
  dialog[open] { animation: show-sheet 160ms ease-out; }
  @keyframes show-sheet { from { transform: translateY(2.5rem); opacity: .6; } }
}

.hero h1 em { display: block; color: var(--wine); font-weight: normal; }
.hero { gap: clamp(2rem, 5vw, 5rem); }
.cover-art { background: transparent; padding: 0; border: none; }
.cover-art img { aspect-ratio: 5 / 4; object-position: center 45%; }
.cover-art figcaption { font-size: .77rem; }
.overline, .stats dt { font-family: ui-monospace, Menlo, monospace; }
.stop-index { grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); }
.stop-index a { border-width: 1px 0 0; background: transparent; }
.stop-art img { object-fit: contain; }
#map { width: min(100%, 49dvh); }
.map-list { grid-template-columns: repeat(auto-fit,minmax(5.7rem,1fr)); }
.pin { font-size: 0; }
.pin::before { border: 0; background: none; }
.pin[aria-pressed="true"]::before { background: transparent; box-shadow: 0 0 0 2px #315b61; }
.map-preview { min-height: 3.2rem; }
@media (max-width: 650px) {
 .hero { gap: 1.25rem; }
 .hero h1 { font-size: clamp(3.15rem, 12vw, 4.2rem); }
 .hero h1 em { display: inline; }
 .cover-art img { max-height: 12rem; aspect-ratio: 16 / 7; }
 .map-list { display: flex; flex-wrap: wrap; }
 .map-list button { flex: 1 1 28%; }
}

@media (max-width: 650px) {
  .hero { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
  .hero-copy { display: contents; }
  .hero .overline { order: 0; }
  .hero h1 { order: 1; }
  .hero .cover-art { order: 2; margin: .85rem 0 .1rem; }
  .hero .cover-art img { height: 6.8rem; aspect-ratio: auto; object-position: 50% 41%; }
  .hero .deck { order: 3; font-size: 1.02rem; margin: .8rem 0; }
  .hero .stats { order: 4; margin: 0 0 .9rem; }
  .hero .actions { order: 5; }
  .hero .terrain { order: 6; }
}

#map-sheet[open] { display: flex; flex-direction: column; overflow: hidden; }
.sheet-head, .map-preview { flex: none; }
.sheet-body { overflow-y: auto; overscroll-behavior: contain; }
.map-preview { margin: 0; padding: .55rem 1rem max(.55rem, env(safe-area-inset-bottom)); background: var(--white); }
.map-preview > div { flex: 1 1 10.5rem; }
.map-preview p { overflow-wrap: anywhere; }
.during-quiz .next-inner .primary { background: var(--white); color: var(--wine); border-color: var(--line); }
.review small { color: var(--muted); }

.all-walks { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); text-underline-offset: .2em; }
