:root {
  color-scheme: light;
  --mist: #f2f4f1;
  --surface: #ffffff;
  --ink: #1d2b2a;
  --muted: #4c5c59;
  --line: #d3dbd5;
  --ridge: #3d5a6c;
  --ridge-back: #8aa1ae;
  --clay: #a4472c;
  --pine: #2f5d3a;
  --sound: #1d6e7a;
  --sound-dark: #135460;
  --sand: #e4d6b0;
  --shoal: #c9a85c;
  --ridge-tint: #cdd9e0;
  --clay-tint: #efd2c4;
  --pine-tint: #cfe0cd;
  --water-tint: #d3e6e8;
  --good-bg: #e4f0e2;
  --retry-bg: #fbf0dc;
  --retry-ink: #6f4700;
  --display: "Baloo 2", "Trebuchet MS", system-ui, sans-serif;
  --body: "Atkinson Hyperlegible", "Verdana", system-ui, sans-serif;
  --wrap: 1180px;
  --pad: clamp(18px, 4vw, 44px);
}
* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--mist);
  color: var(--ink);
  font: 20px/1.6 var(--body);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
h1,
h2,
h3,
h4 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.1;
  margin: 0 0 0.4em;
}
h1 {
  font-size: clamp(38px, 5vw, 56px);
}
h2 {
  font-size: clamp(27px, 3vw, 34px);
}
h3 {
  font-size: 23px;
}
p {
  margin: 0 0 1em;
}
a {
  color: var(--sound-dark);
}
img {
  max-width: 100%;
  display: block;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
:focus-visible {
  outline: 3px solid var(--sound);
  outline-offset: 3px;
}
.icon {
  width: 22px;
  height: 22px;
  flex: none;
}

/* ---------- Buttons ---------- */
.primary,
.secondary,
.quiet,
.listen {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 12px;
  padding: 10px 22px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 20px;
  line-height: 1.1;
  text-align: center;
}
.primary {
  background: var(--sound);
  color: #fff;
  border: 0;
}
.primary:hover {
  background: var(--sound-dark);
}
.primary.big {
  font-size: 23px;
  padding: 14px 28px;
  min-height: 60px;
}
.secondary,
.listen {
  background: var(--surface);
  color: var(--sound-dark);
  border: 2px solid var(--sound);
}
.secondary:hover,
.listen:hover {
  background: var(--water-tint);
}
.quiet {
  background: transparent;
  border: 1px solid var(--line);
  font-size: 17px;
  min-height: 44px;
  padding: 8px 14px;
}
.quiet:hover {
  background: var(--surface);
}
.text-link {
  background: none;
  border: 0;
  padding: 4px 0;
  color: var(--sound-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
  font: inherit;
  min-height: 44px;
}

/* ---------- Top bar & footer ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: calc(14px + env(safe-area-inset-top, 0px)) var(--pad) 10px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  background: none;
  border: 0;
  padding: 0;
  min-height: 44px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 22px;
}
.brand svg {
  width: 40px;
  height: 24px;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.save-status {
  font-size: 15px;
  color: var(--muted);
}
.site-footer {
  max-width: var(--wrap);
  margin: 40px auto 0;
  padding: 20px var(--pad) 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  border-top: 1px solid var(--line);
  font-size: 16px;
  color: var(--muted);
}

/* ---------- Home ---------- */
.home {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 18px var(--pad) 0;
}
.home-head {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 30px;
  align-items: end;
  margin-bottom: 26px;
}
.home-head h1 {
  font-size: clamp(46px, 6.6vw, 80px);
  line-height: 0.92;
  letter-spacing: -0.01em;
  margin-bottom: 18px;
}
.lede {
  font-size: 21px;
  max-width: 34em;
  color: var(--muted);
}
.home-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding-bottom: 1em;
}
.stamp-count {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
}
.stamp-count strong {
  font-family: var(--display);
  font-size: 26px;
  color: var(--pine);
}
.all-done {
  font-family: var(--display);
  font-size: 24px;
  color: var(--pine);
  margin: 0;
}

/* The route profile */
.route {
  position: relative;
  aspect-ratio: 1000 / 272;
  min-height: 190px;
  border-radius: 22px;
  overflow: hidden;
  background: linear-gradient(#e9eff1, #f6f7f3 70%);
}
.profile {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.back-ridge {
  fill: var(--ridge-back);
  opacity: 0.5;
}
.water {
  fill: var(--sound);
}
.trail {
  fill: none;
  stroke: #fff;
  stroke-width: 3;
  stroke-dasharray: 3 9;
  stroke-linecap: round;
  opacity: 0.75;
  vector-effect: non-scaling-stroke;
}
.trail.done {
  stroke: var(--sand);
  stroke-dasharray: none;
  stroke-width: 5;
  opacity: 1;
}
.pin {
  position: absolute;
  width: 48px;
  height: 48px;
  margin: -42px 0 0 -24px;
  border-radius: 50%;
  border: 3px solid var(--ink);
  background: var(--surface);
  color: var(--ink);
  display: grid;
  place-items: center;
  padding: 0;
  box-shadow: 0 3px 0 rgba(29, 43, 42, 0.25);
}
.pin::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -9px;
  width: 3px;
  height: 8px;
  margin-left: -1.5px;
  background: var(--ink);
}
.pin.done {
  background: var(--pine);
  border-color: #fff;
  color: #fff;
}
.pin.done::after {
  background: #fff;
}
.pin.next {
  border-color: var(--sound);
  outline: 4px solid rgba(255, 255, 255, 0.9);
  color: var(--sound-dark);
}
.pin:hover {
  transform: translateY(-2px);
}
.region-label {
  position: absolute;
  bottom: 9%;
  transform: translateX(-50%);
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(15px, 1.7vw, 20px);
  color: #fff;
  white-space: nowrap;
  pointer-events: none;
}
.compass {
  position: absolute;
  bottom: 9%;
  font-family: var(--display);
  font-weight: 600;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.8);
  pointer-events: none;
}
.compass.west {
  left: 16px;
}
.compass.west::before {
  content: "← ";
}
.compass.east {
  right: 16px;
  color: var(--ink);
}
.compass.east::after {
  content: " →";
}

.days {
  display: grid;
  grid-template-columns: 31fr 35fr 34fr;
  margin-top: 6px;
}
.day-col {
  padding: 20px 22px 4px;
  border-left: 2px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.day-col:first-child {
  border-left: 0;
  padding-left: 4px;
}
.day-col h2 {
  font-size: 25px;
  margin-bottom: 2px;
}
.day-num {
  display: block;
  font-size: 17px;
  color: var(--sound-dark);
  font-weight: 600;
}
.day-sub {
  font-size: 16px;
  color: var(--muted);
  margin-bottom: 10px;
}
.stop-list {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  width: 100%;
}
.stop-list button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  background: none;
  border: 0;
  border-radius: 10px;
  padding: 6px 8px;
  text-align: left;
  font-size: 18px;
  line-height: 1.25;
}
.stop-list button:hover {
  background: var(--surface);
}
.stop-icon {
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 50%;
  border: 2px solid var(--line);
  display: grid;
  place-items: center;
  background: var(--surface);
}
.stop-icon .icon {
  width: 20px;
  height: 20px;
}
.done .stop-icon {
  background: var(--pine);
  border-color: var(--pine);
  color: #fff;
}
.how {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-top: 38px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 18px;
  color: var(--muted);
}
.how strong {
  color: var(--ink);
}

/* ---------- Day navigation ---------- */
.day-nav {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 6px var(--pad) 0;
}
.day-nav-top {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.back {
  background: none;
  border: 0;
  padding: 6px 0;
  min-height: 44px;
  color: var(--sound-dark);
  font-size: 17px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.day-name {
  font-family: var(--display);
  font-weight: 600;
  font-size: 19px;
}
.mini-route {
  position: relative;
  margin-left: auto;
  width: 230px;
  height: 46px;
  border-radius: 8px;
  overflow: hidden;
  background: #e9eff1;
}
.mpin {
  position: absolute;
  width: 9px;
  height: 9px;
  margin: -6px 0 0 -4.5px;
  border-radius: 50%;
  background: #fff;
  border: 1.5px solid var(--ink);
  opacity: 0.55;
}
.mpin.today {
  opacity: 1;
}
.mpin.done {
  background: var(--pine);
  border-color: #fff;
}
.mpin.current {
  width: 15px;
  height: 15px;
  margin: -9px 0 0 -7.5px;
  background: var(--sand);
  border: 2.5px solid var(--ink);
}
.steps {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 12px 0 14px;
  border-bottom: 1px solid var(--line);
  scrollbar-width: none;
}
.step {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 6px 16px 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 17px;
  line-height: 1.15;
}
.step:not(:has(.step-icon)) {
  padding-left: 16px;
}
.step-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--mist);
}
.step-icon .icon {
  width: 18px;
  height: 18px;
}
.step.done .step-icon {
  background: var(--pine);
  color: #fff;
}
.step.active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
.step.active .step-icon {
  background: rgba(255, 255, 255, 0.16);
}

/* ---------- Lesson pages ---------- */
.lesson {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 26px var(--pad) 0;
}
.lesson-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 26px;
}
.lesson-header h1 {
  margin: 0;
}
.kicker {
  font-family: var(--display);
  font-weight: 600;
  font-size: 17px;
  color: var(--sound-dark);
  margin: 0 0 4px;
}
.tools {
  display: flex;
  gap: 10px;
  flex: none;
}
.listen {
  padding: 8px 16px;
  font-size: 18px;
}
.station-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: clamp(26px, 4vw, 52px);
  align-items: start;
}
.reading {
  max-width: 62ch;
}
.reading p {
  margin-bottom: 1.05em;
}
.term {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  border-bottom: 2.5px dotted var(--sound);
  min-height: 0;
  line-height: inherit;
}
.term:hover {
  background: var(--water-tint);
}
.vocab {
  margin-top: 8px;
  padding: 18px 22px;
  background: var(--surface);
  border-radius: 14px;
  border: 1px solid var(--line);
  max-width: 62ch;
}
.vocab h3 {
  font-size: 20px;
  margin-bottom: 8px;
}
.vocab dl {
  margin: 0;
  display: grid;
  gap: 8px;
}
.vocab dl > div {
  padding: 4px 8px;
  margin: 0 -8px;
  border-radius: 8px;
  transition: background 0.2s;
}
.vocab dl > div.lit {
  background: var(--water-tint);
}
.vocab dt {
  font-weight: 700;
  display: inline;
}
.vocab dt::after {
  content: ": ";
}
.vocab dd {
  display: inline;
  margin: 0;
  font-size: 18px;
}
.panel-col {
  position: sticky;
  top: 16px;
}

/* Evidence figures */
.evidence-figure {
  margin: 0;
}
.figure-img {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: #e7ebe6;
  border-radius: 14px;
  overflow: hidden;
  cursor: zoom-in;
}
.figure-img img {
  width: 100%;
  max-height: 64vh;
  object-fit: contain;
  margin: 0 auto;
}
.paper .figure-img {
  background: #efe9da;
}
.evidence-figure figcaption {
  margin-top: 12px;
  font-size: 17px;
  line-height: 1.5;
  color: var(--muted);
}
.kind {
  display: inline-block;
  margin: 0 8px 4px 0;
  padding: 1px 10px;
  border-radius: 999px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 15px;
  line-height: 1.6;
  vertical-align: 1px;
  white-space: nowrap;
}
.kind-photo {
  background: var(--water-tint);
  color: var(--sound-dark);
}
.kind-video {
  background: var(--water-tint);
  color: var(--sound-dark);
}
.kind-historic-photo {
  background: var(--ridge-tint);
  color: var(--ridge);
}
.kind-engraving,
.kind-map {
  background: #efe3c3;
  color: #5d4513;
}
.kind-ai {
  background: var(--surface);
  color: var(--clay);
  border: 2px dashed var(--clay);
  line-height: 1.45;
}
.thumbs {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}
.thumb {
  width: 72px;
  height: 56px;
  padding: 0;
  border: 3px solid transparent;
  border-radius: 10px;
  overflow: hidden;
  background: var(--line);
}
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.thumb.active {
  border-color: var(--sound);
}

.video-slot {
  margin-top: 22px;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.video-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: 20px;
  line-height: 1.2;
  margin-bottom: 12px;
}
.video-slot .support {
  margin: 10px 0 0;
  font-size: 15px;
}
.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  overflow: hidden;
  background: #000;
}
.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.pause {
  margin: 34px 0;
  padding: 20px 24px;
  border-left: 6px solid var(--sand);
  background: var(--surface);
  border-radius: 0 14px 14px 0;
  max-width: 820px;
}
.pause p:last-child {
  margin: 0;
}

/* Intro */
.intro-grid {
  display: grid;
  gap: 32px;
}
.intro-grid.side {
  grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr);
  align-items: start;
}
.opening.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
.opening.two .figure-img img {
  aspect-ratio: 3 / 2;
  object-fit: cover;
}
.big-question {
  margin-bottom: 26px;
}
.big-question h2 {
  font-size: clamp(30px, 3.4vw, 40px);
}
.talk-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 28px;
}
.intro-grid.side .talk-grid {
  grid-template-columns: 1fr;
}
.talk-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
  font-size: 18px;
}
.talk-card strong {
  display: block;
  font-family: var(--display);
  color: var(--sound-dark);
  font-size: 19px;
}
.talk-card p {
  margin: 0;
}
.intro-read .reading {
  max-width: 64ch;
}
.agenda {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 30px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.agenda div {
  padding: 14px 16px;
  font-size: 17px;
  border-left: 1px solid var(--line);
}
.agenda div:first-child {
  border-left: 0;
  padding-left: 0;
}
.agenda strong {
  display: block;
  font-family: var(--display);
  font-size: 22px;
}

/* ---------- Activities ---------- */
.activity {
  margin: 34px 0;
  padding: clamp(22px, 3vw, 36px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
}
.activity h2.second {
  margin-top: 40px;
  padding-top: 30px;
  border-top: 1px solid var(--line);
}
.instruction {
  max-width: 62ch;
}
.support {
  font-size: 17px;
  color: var(--muted);
  margin-top: 16px;
}
.feedback {
  margin-top: 16px;
  padding: 14px 18px;
  border-radius: 12px;
  font-size: 18px;
  max-width: 62ch;
}
.feedback.good {
  background: var(--good-bg);
  color: #1f4527;
  border-left: 6px solid var(--pine);
}
.feedback.retry {
  background: var(--retry-bg);
  color: var(--retry-ink);
  border-left: 6px solid var(--shoal);
}
.activity > .secondary {
  margin-top: 18px;
}

/* map */
.map {
  width: 100%;
  max-width: 820px;
  height: auto;
  display: block;
  margin: 10px 0 6px;
}
.map text {
  font-family: var(--display);
  font-weight: 700;
  font-size: 24px;
  fill: var(--ink);
  pointer-events: none;
}
.map text.small {
  font-size: 17px;
  font-weight: 500;
}
.region-shape {
  cursor: pointer;
}
.region-shape.on {
  filter: saturate(1.6) brightness(0.92);
}
.region-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 14px 0;
}
.region-tabs button {
  min-height: 48px;
  padding: 8px 18px;
  border-radius: 12px;
  border: 2px solid var(--line);
  background: var(--surface);
  font-family: var(--display);
  font-weight: 600;
  font-size: 19px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.region-tabs button.active {
  border-color: var(--sound);
  background: var(--water-tint);
  color: var(--sound-dark);
}
.tick {
  width: 18px;
  height: 18px;
  color: var(--pine);
}
.region-info {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  margin-top: 10px;
}
.region-info .figure-img img {
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

/* sort rows */
.sorting {
  display: grid;
  gap: 10px;
  margin: 10px 0;
}
.sort-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
  gap: 16px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--mist);
}
select {
  min-height: 48px;
  width: 100%;
  padding: 8px 12px;
  border: 2px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  font-size: 18px;
}

/* site cards */
.site-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 8px;
}
.site-card {
  padding: 0;
  border: 3px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: var(--surface);
  text-align: left;
  display: flex;
  flex-direction: column;
}
.site-card img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}
.site-text {
  padding: 12px 16px 16px;
  font-size: 17px;
  line-height: 1.45;
}
.site-text strong {
  display: block;
  font-family: var(--display);
  font-size: 21px;
  margin-bottom: 2px;
}
.site-card.selected {
  border-color: var(--sound);
  box-shadow: 0 0 0 3px var(--sound);
}
.site-card.selected .site-text strong::after {
  content: " ✓";
  color: var(--sound);
}

/* choice cards */
.choice-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.choice-card {
  min-height: 90px;
  padding: 16px;
  border: 2px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  text-align: left;
  font-size: 18px;
  line-height: 1.4;
}
.choice-card.selected {
  border-color: var(--sound);
  background: var(--water-tint);
}

/* timeline */
.timeline {
  list-style: none;
  margin: 10px 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.timeline-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  background: var(--mist);
  border-radius: 12px;
}
.order {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-weight: 700;
}
.event {
  font-size: 18px;
  line-height: 1.4;
}
.event strong {
  display: block;
  font-family: var(--display);
  color: var(--pine);
}
.moves {
  display: flex;
  gap: 6px;
}
.moves button {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  border: 2px solid var(--line);
  background: var(--surface);
  font-size: 22px;
}

/* daymarks */
.daymarks {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 12px 0 4px;
}
.daymark {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.dm-photo {
  border-radius: 12px;
  overflow: hidden;
  background: var(--line);
}
.dm-photo img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}
.dm-name {
  font-family: var(--display);
  font-weight: 600;
  font-size: 18px;
  line-height: 1.15;
}
.coast-map {
  width: 100%;
  max-width: 820px;
  height: auto;
  border-radius: 14px;
  display: block;
  margin: 8px 0;
}
.coast-map text {
  font-family: var(--body);
  font-size: 19px;
  font-weight: 700;
  fill: var(--ink);
}
.site-dot {
  fill: var(--surface);
  stroke: var(--ink);
  stroke-width: 3;
}
.site-dot.on {
  fill: var(--sound);
}
.extra {
  margin-top: 22px;
}
.extra summary,
.source-links summary {
  cursor: pointer;
  min-height: 44px;
  display: flex;
  align-items: center;
  font-family: var(--display);
  font-weight: 600;
  color: var(--sound-dark);
}
.extra .evidence-figure {
  max-width: 520px;
  margin: 10px 0 14px;
}

/* museum */
.museum-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.exhibit span {
  display: block;
  font-family: var(--display);
  font-weight: 600;
  margin-bottom: 6px;
}

/* questions */
.question {
  margin-top: 26px;
}
.question h3 {
  font-family: var(--body);
  font-size: 21px;
  line-height: 1.4;
  font-weight: 700;
}
.answers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.answer {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-height: 60px;
  padding: 12px 14px;
  border: 2px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  text-align: left;
  font-size: 18px;
  line-height: 1.4;
}
.answer:hover {
  border-color: var(--sound);
}
.letter {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--mist);
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-weight: 700;
}
.answer.right {
  border-color: var(--pine);
  background: var(--good-bg);
}
.answer.right .letter {
  background: var(--pine);
  color: #fff;
}
.answer.wrong {
  border-color: var(--shoal);
  background: var(--retry-bg);
}

/* notebook */
.notebook {
  margin: 34px 0 20px;
}
.notebook label {
  display: block;
  font-family: var(--display);
  font-weight: 700;
  font-size: 26px;
  line-height: 1.2;
}
.note-help {
  color: var(--muted);
  font-size: 18px;
  margin: 4px 0 10px;
}
textarea {
  width: 100%;
  min-height: 130px;
  padding: 14px 16px;
  border: 2px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  font-size: 20px;
  line-height: 1.5;
  resize: vertical;
}
textarea:focus {
  border-color: var(--sound);
  outline: none;
}
input[type="text"] {
  width: 100%;
  min-height: 50px;
  padding: 10px 14px;
  border: 2px solid var(--line);
  border-radius: 10px;
}
.field-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 15px;
  color: var(--muted);
  margin-top: 6px;
}
.source-links {
  margin: 10px 0 20px;
}
.source-links a {
  display: block;
  margin: 6px 0;
  font-size: 18px;
}
.lesson-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 20px 0;
  margin-top: 10px;
  border-top: 1px solid var(--line);
}
.status {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 16px;
}
.status-label {
  color: var(--muted);
}
.status-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.status-item.ok {
  background: var(--good-bg);
  border-color: var(--good-bg);
  color: #1f4527;
}
.status-item .icon {
  width: 16px;
  height: 16px;
}
.status-done {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--pine);
  font-weight: 700;
}

/* reflection */
.reflection-page {
  max-width: 820px;
}
.check-list {
  list-style: none;
  padding: 0;
  margin: 22px 0;
  display: grid;
  gap: 6px;
}
.check-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 12px;
  background: var(--surface);
  border-radius: 12px;
}
.check-list li > span:last-child {
  margin-left: auto;
  font-size: 16px;
  color: var(--muted);
}
.check-list li.done > span:last-child {
  color: var(--pine);
  font-weight: 700;
}
.next-day {
  margin-top: 20px;
}

/* ---------- Overlays ---------- */
.scrim {
  position: fixed;
  inset: 0;
  background: rgba(29, 43, 42, 0.5);
  display: grid;
  place-items: center;
  padding: 20px;
  z-index: 50;
}
.modal {
  background: var(--surface);
  border-radius: 20px;
  width: min(560px, 100%);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.modal.wide {
  width: min(940px, 100%);
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
}
.modal-header h2 {
  margin: 0;
  font-size: 26px;
}
.modal-body {
  padding: 20px 24px 26px;
  overflow-y: auto;
}
.close {
  width: 48px;
  height: 48px;
  flex: none;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 28px;
  line-height: 1;
}
.field {
  display: block;
  margin-bottom: 14px;
  font-weight: 700;
}
.stack {
  display: grid;
  gap: 12px;
}
.big-figure {
  margin: 0;
}
.big-figure img {
  max-height: 64vh;
  margin: 0 auto;
  border-radius: 12px;
}
.big-figure figcaption {
  margin-top: 14px;
  font-size: 18px;
}
.credit-entry {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr);
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: 16px;
  line-height: 1.45;
}
.credit-entry.plain {
  grid-template-columns: 1fr;
}
.credit-entry img {
  width: 80px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
}
.credit-entry strong {
  display: block;
  font-size: 17px;
}
.credit-entry span {
  display: block;
  color: var(--muted);
}
.credit-entry .kind {
  display: inline-block;
  color: inherit;
}
.credit-entry p {
  margin: 4px 0;
  font-size: 15px;
}
.credit-entry a {
  margin-right: 4px;
}
.modal-body h3 {
  margin-top: 26px;
}
.modal-body h4 {
  margin: 18px 0 0;
  font-size: 19px;
}
[tabindex="-1"]:focus {
  outline: none;
}
.toast,
.definition {
  visibility: hidden;
}
.toast.visible,
.definition.visible {
  visibility: visible;
}
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  transform: translate(-50%, 160%);
  background: var(--ink);
  color: #fff;
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 17px;
  max-width: min(560px, calc(100% - 32px));
  z-index: 80;
  transition: transform 0.25s, visibility 0.25s;
}
.toast.visible {
  transform: translate(-50%, 0);
}
.definition {
  position: fixed;
  left: 50%;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  transform: translate(-50%, 180%);
  width: min(640px, calc(100% - 32px));
  background: var(--ink);
  color: #fff;
  border-radius: 16px;
  padding: 14px 16px 14px 22px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 70;
  transition: transform 0.25s, visibility 0.25s;
  font-size: 19px;
}
.definition.visible {
  transform: translate(-50%, 0);
}
.definition strong {
  font-family: var(--display);
  font-size: 22px;
  color: var(--sand);
}
.definition span {
  flex: 1;
}
.definition button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: transparent;
  color: #fff;
  font-size: 24px;
  flex: none;
}

/* Stamp moment: the one orchestrated animation */
.stamp-moment {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  z-index: 90;
}
.stamp {
  width: 250px;
  height: 250px;
  border-radius: 50%;
  border: 7px double var(--pine);
  background: rgba(255, 255, 255, 0.96);
  color: var(--pine);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 26px;
  transform: rotate(-9deg);
  animation: stamp-in 0.38s cubic-bezier(0.2, 1.4, 0.4, 1) both;
  box-shadow: 0 18px 50px rgba(29, 43, 42, 0.25);
}
.stamp-icon {
  width: 54px;
  height: 54px;
  margin-bottom: 6px;
}
.stamp span {
  font-family: var(--display);
  font-weight: 700;
  font-size: 22px;
  line-height: 1.1;
}
.stamp small {
  margin-top: 6px;
  font-size: 15px;
}
.stamp-moment.leaving .stamp {
  opacity: 0;
  transition: opacity 0.45s;
}
@keyframes stamp-in {
  from {
    transform: rotate(-9deg) scale(1.7);
    opacity: 0;
  }
  to {
    transform: rotate(-9deg) scale(1);
    opacity: 1;
  }
}
@media (prefers-reduced-motion: reduce) {
  .stamp {
    animation: none;
  }
  .toast,
  .definition {
    transition: none;
  }
  .pin:hover {
    transform: none;
  }
}

/* ---------- Screenshot report ---------- */
.report-preview {
  position: fixed;
  inset: 0;
  background: #dfe5e0;
  z-index: 60;
  overflow: auto;
  padding: 0 10px 20px;
}
.report-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(8px + env(safe-area-inset-top, 0px)) 6px 8px;
  font-size: 16px;
}
.report {
  margin: 0 auto;
  background: var(--surface);
  border-radius: 16px;
  padding: 26px 34px 18px;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto auto;
  gap: 12px;
  box-shadow: 0 10px 30px rgba(29, 43, 42, 0.18);
  overflow: hidden;
}
.report-top {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}
.report-top h1 {
  font-size: 36px;
  margin: 0;
}
.report-names {
  font-size: 19px;
  font-weight: 700;
}
.report-meta {
  text-align: right;
}
.report-badge {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 999px;
  background: var(--retry-bg);
  color: var(--retry-ink);
  font-family: var(--display);
  font-weight: 700;
}
.report-badge.ready {
  background: var(--good-bg);
  color: var(--pine);
}
.report-date {
  font-size: 15px;
  color: var(--muted);
  margin-top: 4px;
}
.report-summary {
  display: flex;
  gap: 10px;
  font-size: 15px;
}
.report-summary span {
  padding: 3px 12px;
  border-radius: 999px;
  background: var(--mist);
}
.report-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  min-height: 0;
}
.report-panel {
  font-size: var(--body-size, 16px);
  line-height: 1.45;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 18px;
  overflow: hidden;
  min-height: 0;
}
.report-panel h3 {
  font-size: 21px;
}
.report-panel p {
  margin-bottom: 0.5em;
}
.report-panel .map {
  margin: 4px 0;
}
.report-panel .map text {
  font-size: 30px;
}
.report-detail {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}
.report-detail.first {
  border: 0;
  margin: 0;
  padding: 0;
}
.report-detail strong,
.report-list b,
.report-reflection strong {
  display: block;
  font-family: var(--display);
  color: var(--sound-dark);
}
.report-list {
  display: grid;
  gap: 6px;
}
.mini-timeline {
  margin: 0;
  padding-left: 1.3em;
}
.mini-timeline b {
  display: block;
  color: var(--pine);
}
.report-reflection {
  background: var(--mist);
  border-radius: 12px;
  padding: 10px 16px;
  font-size: 16px;
}
.report-reflection p {
  margin: 0;
}
.report-foot {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--muted);
}

/* ---------- Projector ---------- */
body.projector {
  font-size: 25px;
}
body.projector .lesson,
body.projector .day-nav {
  max-width: 1500px;
}
body.projector .reading,
body.projector .intro-read .reading {
  max-width: 60ch;
}

/* ---------- Narrower screens ---------- */
@media (max-width: 960px) {
  .station-grid {
    grid-template-columns: 1fr;
  }
  .panel-col {
    position: static;
    order: -1;
    max-width: 720px;
  }
  .intro-grid.side {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  }
  .daymarks {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .site-cards,
  .choice-cards {
    grid-template-columns: 1fr;
  }
  .site-card {
    flex-direction: row;
  }
  .site-card img {
    width: 42%;
    aspect-ratio: auto;
    min-height: 140px;
  }
  .talk-grid {
    grid-template-columns: 1fr;
  }
  .home-head {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .mini-route {
    display: none;
  }
}
@media (max-width: 760px) {
  body {
    font-size: 19px;
  }
  .save-status {
    display: none;
  }
  .days {
    grid-template-columns: 1fr;
  }
  .day-col,
  .day-col:first-child {
    border-left: 0;
    border-top: 2px solid var(--line);
    padding: 18px 0;
  }
  .how,
  .answers,
  .region-info,
  .museum-grid,
  .opening.two,
  .intro-grid.side {
    grid-template-columns: 1fr;
  }
  .sort-row {
    grid-template-columns: 1fr;
  }
  .agenda {
    grid-template-columns: 1fr 1fr;
  }
  .lesson-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .pin {
    width: 38px;
    height: 38px;
    margin: -34px 0 0 -19px;
  }
  .pin .icon {
    width: 18px;
    height: 18px;
  }
  .region-label {
    display: none;
  }
}

@media print {
  .topbar,
  .site-footer,
  .day-nav,
  .report-toolbar {
    display: none;
  }
  .report-preview {
    position: static;
    background: none;
  }
  .report {
    box-shadow: none;
  }
}
