:root {
  --lake: #123e59;
  --lake-2: #0d6283;
  --cream: #f7f0e2;
  --paper: #fffdf7;
  --ink: #173344;
  --muted: #5f707a;
  --brass: #b47738;
  --mist: #dceaf0;
  --line: rgba(18, 62, 89, .16);
  --shadow: 0 18px 46px rgba(7, 31, 45, .17);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--cream); color: var(--ink); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
a { color: inherit; }
button { font: inherit; }
button:focus-visible, a:focus-visible { outline: 3px solid #69c8e8; outline-offset: 3px; }

.tour-header {
  position: sticky;
  z-index: 20;
  top: 0;
  min-height: 74px;
  padding: max(10px, env(safe-area-inset-top)) 16px 10px;
  background: rgba(18, 62, 89, .97);
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  box-shadow: 0 5px 20px rgba(7, 31, 45, .14);
}
.brand { min-width: 0; display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 42px; height: 42px; object-fit: contain; }
.brand span { min-width: 0; display: grid; }
.brand small { font-size: .68rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; opacity: .78; white-space: nowrap; }
.brand strong { font-family: Georgia, serif; font-size: 1.22rem; line-height: 1.1; }
.map-link { flex: 0 0 auto; padding: 10px 12px; border: 1px solid rgba(255,255,255,.45); border-radius: 999px; text-decoration: none; font-size: .82rem; font-weight: 850; }

main { max-width: 1120px; margin: 0 auto; background: var(--paper); min-height: 100vh; }
.tour-hero { min-height: min(760px, calc(100dvh - 74px)); position: relative; display: grid; align-items: end; overflow: hidden; background: var(--lake); }
.tour-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(4,29,43,.06) 20%, rgba(4,29,43,.84) 86%); }
.tour-hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 46%; }
.hero-copy { position: relative; z-index: 2; max-width: 760px; padding: 46px 24px 42px; color: white; }
.eyebrow { margin: 0 0 7px; font-size: .75rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; color: var(--lake-2); }
.hero-copy .eyebrow { color: #acd9e9; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: Georgia, serif; line-height: 1.06; }
h1 { max-width: 680px; margin-bottom: 14px; font-size: clamp(2.7rem, 8vw, 5.4rem); font-weight: 500; }
h2 { margin-bottom: 12px; font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 500; }
h3 { margin-bottom: 8px; font-size: 1.45rem; }
.hero-copy > p:not(.eyebrow) { max-width: 650px; font-family: Georgia, serif; font-size: clamp(1.12rem, 2.4vw, 1.4rem); line-height: 1.45; }
.start-link { display: inline-flex; gap: 9px; align-items: center; margin-top: 7px; padding: 13px 17px; border-radius: 999px; background: var(--paper); color: var(--lake); font-weight: 900; text-decoration: none; }

.chapter-section { padding: 58px 22px 68px; scroll-margin-top: 88px; }
.chapter-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.chapter-card { position: relative; min-height: 250px; overflow: hidden; border: 0; border-radius: 22px; padding: 0; background: var(--lake); color: white; text-align: left; cursor: pointer; box-shadow: var(--shadow); }
.chapter-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(6,34,50,.04), rgba(6,34,50,.88)); }
.chapter-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.chapter-card:hover img { transform: scale(1.025); }
.chapter-card-copy { position: absolute; z-index: 2; inset: auto 18px 18px; }
.chapter-card-copy small { display: block; margin-bottom: 6px; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; opacity: .82; }
.chapter-card-copy h3 { margin: 0; }

.story-stage { padding: 26px 22px 70px; background: #eef4f3; scroll-margin-top: 82px; }
.stage-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.back-button, .previous-button, .next-button { min-height: 44px; border: 0; border-radius: 999px; padding: 11px 15px; font-weight: 900; cursor: pointer; }
.back-button, .previous-button { background: var(--paper); color: var(--lake); border: 1px solid var(--line); }
.next-button { background: var(--lake); color: white; }
.progress-text { margin: 0; color: var(--muted); font-size: .84rem; font-weight: 800; }
.progress-track { height: 5px; margin: 15px 0 20px; overflow: hidden; border-radius: 99px; background: #cadadd; }
.progress-track span { display: block; height: 100%; width: 0; background: var(--brass); transition: width .2s ease; }
.story-card { overflow: hidden; border-radius: 24px; background: var(--paper); box-shadow: var(--shadow); }
.story-image-wrap { min-height: 0; background: var(--mist); display: grid; place-items: center; }
.story-image-wrap img { display: block; width: 100%; height: auto; max-height: 720px; object-fit: contain; }
.story-image-wrap img.portrait { object-position: center; }
.photo-placeholder { min-height: 300px; padding: 28px; color: white; display: grid; place-items: center; text-align: center; background: radial-gradient(circle at 30% 20%, #1d6686, var(--lake)); }
.photo-placeholder span { max-width: 270px; font-family: Georgia, serif; font-size: 1.35rem; line-height: 1.35; }
.story-copy { padding: 26px; }
.story-copy > p:not(.eyebrow) { color: var(--muted); font-size: 1.04rem; line-height: 1.62; }
.detail-list { margin: 18px 0 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.detail-list li { padding: 10px 12px; border-radius: 12px; background: var(--mist); font-size: .9rem; font-weight: 800; }
.audio-player { margin-top: 20px; padding: 15px; border-radius: 16px; background: var(--mist); }
.audio-player audio { width: 100%; margin-top: 9px; }
.story-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 18px; }
.story-actions button:disabled { visibility: hidden; }

.visit-note { padding: 54px 24px; background: var(--lake); color: white; display: grid; grid-template-columns: 1fr auto; gap: 30px; align-items: center; }
.visit-note .eyebrow { color: #acd9e9; }
.visit-note h2 { margin-bottom: 8px; }
.visit-note p:not(.eyebrow) { margin: 0; max-width: 650px; line-height: 1.55; opacity: .82; }
.visit-note a { padding: 14px 18px; border-radius: 999px; background: var(--paper); color: var(--lake); text-decoration: none; font-weight: 900; white-space: nowrap; }
footer { max-width: 1120px; margin: 0 auto; padding: 30px 22px calc(30px + env(safe-area-inset-bottom)); display: flex; gap: 12px; align-items: center; color: var(--muted); }
footer img { width: 44px; height: 44px; object-fit: contain; }
footer p { margin: 0; font-size: .82rem; line-height: 1.4; }

@media (max-width: 640px) {
  .brand small { max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
  .map-link { width: 45px; height: 45px; padding: 0; display: grid; place-items: center; font-size: 0; }
  .map-link span { font-size: 1.3rem; }
  .tour-hero { min-height: 600px; }
  .chapter-grid { grid-template-columns: 1fr; }
  .chapter-card { min-height: 230px; }
  .visit-note { grid-template-columns: 1fr; gap: 22px; }
  .visit-note a { text-align: center; }
  .detail-list { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

/* v11.8: links back to the main site */
.tour-links { display: flex; gap: 8px; flex: 0 0 auto; }
@media (max-width: 640px) { .home-link { font-size: 0; width: 45px; height: 45px; padding: 0; display: grid; place-items: center; } .home-link::before { content: "⌂"; font-size: 1.3rem; } }
