:root {
  color-scheme: light;
  --paper: #f2efe7;
  --paper-deep: #e8e3d7;
  --ink: #151719;
  --muted: #646760;
  --line: #cfc9bb;
  --blue: #2b58ed;
  --blue-dark: #1e42c5;
  --white: #fffdf7;
  --content: 1440px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: auto;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: "Arial", "Helvetica Neue", sans-serif;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

button,
audio,
input {
  font: inherit;
}

button {
  color: inherit;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 20;
  padding: 0.7rem 1rem;
  background: var(--ink);
  color: white;
  transform: translateY(-180%);
}

.skip-link:focus {
  transform: translateY(0);
}

.topbar {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 3.25rem;
  border-bottom: 1px solid var(--line);
}

.brand {
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.stage-badge,
.eyebrow,
.audio-kicker,
.prompt-card span {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.stage-badge {
  color: var(--muted);
}

.stage-badge a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 0.2rem;
}

main {
  max-width: var(--content);
  margin: 0 auto;
}

main:focus {
  outline: none;
}

.intro-screen {
  min-height: calc(100vh - 74px);
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(360px, 0.8fr);
}

.intro-copy,
.intro-map,
.map-panel,
.point-panel,
.error-screen {
  padding: clamp(2rem, 5vw, 5.5rem);
}

.intro-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-right: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 1.3rem;
  color: var(--blue);
}

h1,
h2 {
  max-width: 900px;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  letter-spacing: -0.055em;
  line-height: 0.96;
  overflow-wrap: anywhere;
  hyphens: auto;
}

h1 {
  font-size: clamp(3.5rem, 7vw, 6.75rem);
}

h2,
.point-panel h1 {
  font-size: clamp(2.75rem, 5vw, 5rem);
}

.lead {
  max-width: 720px;
  margin: 2rem 0 0;
  color: var(--muted);
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  line-height: 1.5;
}

.route-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 720px;
  margin: 2.75rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.route-meta div {
  padding: 1.15rem 1.2rem 1.15rem 0;
}

.route-meta div + div {
  padding-left: 1.2rem;
  border-left: 1px solid var(--line);
}

.route-meta dt {
  margin-bottom: 0.4rem;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.route-meta dd {
  margin: 0;
  font-weight: 700;
}

.primary-button,
.secondary-button,
.text-button {
  min-height: 48px;
  border: 0;
  cursor: pointer;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  width: max-content;
  padding: 0.95rem 1.3rem;
  font-weight: 750;
}

.primary-button {
  background: var(--blue);
  color: white;
}

.primary-button:hover:not(:disabled) {
  background: var(--blue-dark);
}

.primary-button:disabled {
  cursor: wait;
  opacity: 0.5;
}

.secondary-button {
  border: 1px solid var(--ink);
  background: transparent;
}

.secondary-button:disabled {
  cursor: not-allowed;
  opacity: 0.35;
}

.text-button {
  padding: 0.5rem 0;
  background: transparent;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 0.25rem;
}

button:focus-visible,
a:focus-visible,
audio:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}

.status-message {
  min-height: 1.4em;
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.entry-hint {
  max-width: 620px;
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.intro-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.intro-map {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--blue);
  color: white;
}

.intro-map > span {
  position: absolute;
  color: rgb(255 255 255 / 72%);
  font-size: 0.78rem;
  font-weight: 800;
}

.intro-map > span:nth-of-type(1) { left: 10%; bottom: 21%; }
.intro-map > span:nth-of-type(2) { left: 35%; top: 49%; }
.intro-map > span:nth-of-type(3) { right: 33%; top: 25%; }
.intro-map > span:nth-of-type(4) { right: 8%; top: 11%; }

.intro-map svg {
  width: min(100%, 620px);
  fill: none;
  stroke: currentColor;
  stroke-width: 6;
}

.intro-map circle {
  fill: var(--blue);
}

.map-number {
  position: absolute;
  top: 2rem;
  right: 2rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 5rem;
  opacity: 0.35;
}

.experience-screen {
  min-height: calc(100vh - 74px);
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(480px, 1.05fr);
}

.experience-screen[hidden],
.error-screen[hidden],
.intro-screen[hidden] {
  display: none;
}

.map-panel {
  border-right: 1px solid var(--line);
  background: var(--paper-deep);
}

.progress-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.9rem;
  font-weight: 750;
}

.progress-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.progress-track {
  height: 3px;
  margin: 1rem 0 2.5rem;
  background: var(--line);
}

.progress-track span {
  display: block;
  width: 25%;
  height: 100%;
  background: var(--blue);
  transition: width 220ms ease;
}

.route-map {
  display: grid;
  place-items: center;
  min-height: min(62vh, 680px);
  margin: 0;
}

.route-map img {
  display: block;
  width: min(100%, 680px);
  height: auto;
}

.point-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.point-body {
  max-width: 680px;
  margin: 2rem 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  line-height: 1.55;
}

.audio-card,
.prompt-card,
.video-card {
  max-width: 680px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.audio-card {
  display: grid;
  grid-template-columns: minmax(180px, 0.7fr) minmax(260px, 1.3fr);
  align-items: center;
  gap: 1.5rem;
  padding: 1.35rem 0;
}

.video-card {
  margin-top: 1.25rem;
  overflow: hidden;
}

.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--ink);
}

.video-frame video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-unavailable {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: center;
  gap: 0.75rem;
  padding: 1.5rem;
  color: var(--white);
}

.video-unavailable span {
  color: #9ab4ff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.video-unavailable strong {
  max-width: 300px;
  font-size: clamp(1.25rem, 4vw, 2rem);
  line-height: 1.1;
}

.audio-card > div {
  display: grid;
  gap: 0.4rem;
}

.audio-kicker,
.prompt-card span {
  color: var(--blue);
}

.audio-card audio {
  width: 100%;
}

.media-status {
  max-width: 680px;
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.prompt-card {
  margin-top: 1.25rem;
  padding: 1.35rem 0;
}

.prompt-card p {
  margin: 0.6rem 0 0;
  font-size: 1.05rem;
  line-height: 1.45;
}

.point-navigation {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  max-width: 680px;
  margin-top: 2rem;
}

.completion-screen {
  min-height: calc(100vh - 74px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: clamp(2rem, 7vw, 7rem);
}

.completion-screen h1 {
  max-width: 900px;
}

.completion-screen > p:not(.eyebrow):not(.status-message) {
  max-width: 680px;
  margin: 1.75rem 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  line-height: 1.5;
}

.error-screen {
  min-height: calc(100vh - 74px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

.error-screen p:not(.eyebrow) {
  max-width: 600px;
  margin: 1.5rem 0;
  color: var(--muted);
  font-size: 1.2rem;
}

.scanner-dialog {
  width: min(760px, calc(100% - 2rem));
  max-height: calc(100vh - 2rem);
  padding: 0;
  overflow: auto;
  border: 1px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
}

.scanner-dialog::backdrop {
  background: rgb(21 23 25 / 72%);
}

.scanner-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
  padding: 1.5rem;
  border-bottom: 1px solid var(--line);
}

.scanner-header .eyebrow {
  margin-bottom: 0.7rem;
}

.scanner-header h2 {
  max-width: 560px;
  font-size: clamp(2rem, 5vw, 3.75rem);
}

.icon-button {
  display: grid;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid var(--ink);
  background: transparent;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

.scanner-view {
  min-height: 280px;
  padding: 1.5rem;
  background: var(--ink);
}

.scanner-view video {
  display: block;
  width: 100%;
  max-height: 52vh;
  min-height: 280px;
  object-fit: cover;
  background: #08090a;
}

.scanner-status {
  min-height: 1.5em;
  margin: 0;
  padding: 1rem 1.5rem 0;
  color: var(--muted);
  line-height: 1.45;
}

.manual-code-form {
  display: grid;
  gap: 0.65rem;
  padding: 1rem 1.5rem 1.5rem;
  border-top: 1px solid var(--line);
}

.manual-code-form label {
  font-size: 0.85rem;
  font-weight: 700;
}

.manual-code-form > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
}

.manual-code-form input {
  min-width: 0;
  min-height: 48px;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--white);
  color: var(--ink);
}

.manual-code-form input:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}

.qr-sheet {
  padding: clamp(2rem, 6vw, 5rem);
}

.qr-sheet h1 {
  font-size: clamp(3rem, 8vw, 7rem);
}

.qr-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 3rem 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.qr-grid figure {
  margin: 0;
  padding: 1.25rem;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.qr-grid img {
  display: block;
  width: 100%;
  background: white;
}

.qr-grid figcaption {
  margin-top: 1rem;
  font-weight: 700;
  line-height: 1.45;
}

.qr-grid code {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 400;
}

@media (max-width: 900px) {
  .topbar {
    padding: 0 1.25rem;
  }

  .intro-screen,
  .experience-screen {
    grid-template-columns: 1fr;
  }

  .intro-copy,
  .map-panel {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .intro-map {
    min-height: 220px;
  }

  .progress-track {
    margin-bottom: 1.25rem;
  }

  .route-map {
    height: clamp(240px, 38svh, 360px);
    min-height: 0;
  }

  .route-map img {
    width: 100%;
    max-height: 100%;
    object-fit: contain;
  }

  .qr-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .point-panel {
    min-height: 0;
    justify-content: flex-start;
  }
}

@media (max-width: 580px) {
  .topbar {
    min-height: 64px;
  }

  .stage-badge {
    font-size: 0.68rem;
  }

  .intro-screen,
  .experience-screen,
  .error-screen,
  .completion-screen {
    min-height: calc(100vh - 64px);
  }

  .intro-copy,
  .intro-map,
  .map-panel,
  .point-panel,
  .error-screen,
  .completion-screen {
    padding: 1.5rem 1.25rem;
  }

  h1 {
    font-size: clamp(2.65rem, 13.25vw, 3.25rem);
  }

  h2,
  .point-panel h1 {
    font-size: clamp(2.75rem, 14vw, 4rem);
  }

  .route-meta {
    grid-template-columns: 1fr;
  }

  .route-meta div,
  .route-meta div + div {
    padding: 0.9rem 0;
    border-left: 0;
  }

  .route-meta div + div {
    border-top: 1px solid var(--line);
  }

  .intro-map {
    min-height: 180px;
  }

  .route-map {
    height: clamp(140px, 22svh, 180px);
  }

  .audio-card {
    grid-template-columns: 1fr;
  }

  .point-panel {
    padding-bottom: calc(9.5rem + env(safe-area-inset-bottom));
  }

  .point-navigation {
    position: fixed;
    z-index: 10;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.75rem;
    max-width: none;
    margin: 0;
    padding: 0.75rem 1.25rem calc(0.75rem + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: rgb(242 239 231 / 96%);
    backdrop-filter: blur(10px);
  }

  .point-navigation .secondary-button {
    width: auto;
  }

  .point-navigation .primary-button {
    width: 100%;
  }

  .progress-header {
    align-items: flex-start;
  }

  .progress-actions {
    align-items: flex-end;
    flex-direction: column;
    gap: 0;
  }

  .primary-button,
  .secondary-button {
    width: 100%;
  }

  .intro-actions {
    display: grid;
  }

  .progress-actions .text-button {
    min-height: 44px;
  }

  .scanner-dialog {
    width: calc(100% - 1rem);
    max-height: calc(100vh - 1rem);
  }

  .scanner-header,
  .scanner-view,
  .manual-code-form {
    padding: 1rem;
  }

  .scanner-status {
    padding: 1rem 1rem 0;
  }

  .scanner-view,
  .scanner-view video {
    min-height: 220px;
  }

  .manual-code-form > div {
    grid-template-columns: 1fr;
  }

  .qr-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .progress-track span {
    transition: none;
  }
}
.point-rich-content{display:grid;gap:18px;margin:20px 0}.point-rich-content h2{margin:10px 0 0;font:400 clamp(24px,3vw,34px)/1.1 Georgia,"Times New Roman",serif;letter-spacing:-.035em}.point-rich-content p{margin:0;line-height:1.7;white-space:pre-wrap}.point-rich-content figure{margin:0}.point-rich-content img,.point-rich-content video{display:block;width:100%;height:auto;max-height:560px;object-fit:contain;background:#e8e3d7}.point-rich-content figcaption{margin-top:7px;color:var(--muted,#646760);font-size:12px}.point-rich-content audio{display:block;width:100%;margin-top:8px}.point-rich-content a{width:max-content;color:var(--blue,#2b58ed);text-underline-offset:3px}
