:root {
  --paper: #f4ecdc;
  --paper-2: #ebe0c8;
  --leaf: rgba(249, 243, 230, 0.94);
  --ink: #2e2319;
  --ink-2: #5a4836;
  --ink-3: #8a775f;
  --madder: #b0402c;
  --madder-2: #c85a3f;
  --saffron: #d98e3a;
  --sage: #6f8f5c;
  --sage-soft: rgba(111, 143, 92, 0.12);
  --rule: rgba(90, 72, 54, 0.28);
  --display: "IM Fell English", "EB Garamond", Georgia, serif;
  --caps: "IM Fell English SC", "EB Garamond", Georgia, serif;
  --serif: "EB Garamond", Georgia, serif;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='280' height='280'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.35 0 0 0 0 0.25 0 0 0 0 0.14 0 0 0 0.11 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23p)'/%3E%3C/svg%3E");
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100svh;
  color: var(--ink); font-family: var(--serif); font-size: 18px;
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
body.stage-open, body.modal-open { overflow: hidden; }
button, input, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
a { color: var(--madder); }

.ornament { display: flex; justify-content: center; margin: 16px auto; }
.ornament svg { width: 190px; height: 26px; }

/* ---------- painted backdrop ---------- */
.backdrop { position: fixed; inset: 0; z-index: 0; }
.scene { position: absolute; inset: 0; overflow: hidden; }
.scene-svg { width: 100%; height: 100%; display: block; }
.cloud { animation: drift 90s ease-in-out infinite alternate; }
.cloud.c2 { animation-duration: 120s; animation-delay: -40s; }
.cloud.c3 { animation-duration: 105s; animation-delay: -70s; }
@keyframes drift { to { transform: translateX(120px); } }
.birds { animation: fly 60s linear infinite; }
@keyframes fly { from { transform: translate(-120px, 260px); } to { transform: translate(1720px, 150px); } }
.grass { transform-box: fill-box; transform-origin: bottom; animation: sway 7s ease-in-out infinite alternate; }
@keyframes sway { to { transform: skewX(-2.5deg); } }
.sun { transition: transform 2s var(--ease); }

/* ---------- header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px clamp(14px, 4vw, 48px);
  background: linear-gradient(rgba(244, 236, 220, 0.9), rgba(244, 236, 220, 0));
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; min-width: 0; }
.brand-name { font-family: var(--display); font-size: 19px; white-space: nowrap; }
.header-nav { display: flex; gap: 18px; }
.header-link { font-family: var(--caps); font-size: 17px; color: var(--ink-2); text-decoration: none; border-bottom: 1px solid transparent; }
.header-link:hover, .header-link.on { color: var(--madder); border-color: var(--madder); }

/* ---------- views ---------- */
.view { position: relative; z-index: 1; min-height: 100svh; outline: none; }
.page {
  position: relative; width: min(780px, calc(100% - 24px)); margin: 86px auto 30px;
  padding: clamp(26px, 5vw, 54px) clamp(20px, 5vw, 60px);
  background: var(--grain), var(--leaf);
  border: 1px solid var(--rule); outline: 1px solid var(--rule); outline-offset: -9px;
  box-shadow: 0 40px 80px -40px rgba(60, 45, 25, 0.5);
  animation: rise-in 0.6s var(--ease);
}
@keyframes rise-in { from { opacity: 0; transform: translateY(14px); } }

.site-footer {
  position: relative; z-index: 1; text-align: center;
  width: min(520px, calc(100% - 24px)); margin: 0 auto 26px; padding: 6px 18px 14px;
  background: var(--grain), rgba(249, 243, 230, 0.88); border: 1px solid var(--rule);
}
.site-footer .ornament { margin: 6px auto 2px; }
.credit { font-family: var(--display); font-size: 19px; margin: 0; }
.credit strong { font-weight: 400; color: var(--madder); }
.fineprint { font-size: 14px; font-style: italic; color: var(--ink-3); margin: 2px 0 0; }
body.home .site-footer { display: none; }

/* ---------- type ---------- */
.kicker { font-family: var(--caps); font-size: 17px; letter-spacing: 0.06em; color: var(--madder); margin: 0 0 10px; }
.h-title { font-family: var(--display); font-weight: 400; font-size: clamp(34px, 6vw, 54px); line-height: 1.05; margin: 0; }
.h-title em { color: var(--madder); }
.lead { font-size: clamp(18px, 1.8vw, 20.5px); line-height: 1.6; color: var(--ink-2); margin: 0 0 18px; }
.center { text-align: center; }
.muted { color: var(--ink-3); }
.q-line { font-style: italic; font-size: 20px; color: var(--ink-2); margin: 6px 0 0; }

.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--madder); color: #fbf4e6; border: none;
  padding: 13px 26px; border-radius: 2px; text-decoration: none;
  font-family: var(--caps); font-size: 18px; letter-spacing: 0.03em; cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18), 0 8px 20px -10px rgba(176, 64, 44, 0.7);
  transition: background 0.3s, transform 0.3s var(--ease), opacity 0.3s;
}
.btn-primary:hover:not(:disabled) { background: var(--madder-2); transform: translateY(-1px); }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; box-shadow: none; }
.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: transparent; color: var(--ink); border: 1px solid var(--ink-3);
  padding: 12px 22px; border-radius: 2px; text-decoration: none;
  font-family: var(--caps); font-size: 18px; letter-spacing: 0.03em; cursor: pointer;
  transition: border-color 0.3s, color 0.3s;
}
.btn-ghost:hover { color: var(--madder); border-color: var(--madder); }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; }
.btn-row.center { justify-content: center; }
.link-btn { background: none; border: none; padding: 0; color: var(--madder); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- home ---------- */
.home-wrap { min-height: 100svh; display: flex; align-items: flex-end; justify-content: center; padding: 90px 12px clamp(24px, 6vh, 64px); }
.plate {
  width: min(680px, 100%); text-align: center;
  padding: clamp(28px, 5vw, 48px) clamp(20px, 5vw, 56px) clamp(24px, 4vw, 36px);
  background: var(--grain), rgba(248, 241, 227, 0.94);
  border: 1px solid var(--rule); outline: 1px solid var(--rule); outline-offset: -8px;
  box-shadow: 0 30px 60px -30px rgba(70, 50, 30, 0.45);
  animation: rise-in 0.8s var(--ease);
}
.plate .h-title { font-size: clamp(40px, 7vw, 70px); }
.plate .lead { max-width: 500px; margin-left: auto; margin-right: auto; }
.plate-credit { font-family: var(--display); font-size: 17px; color: var(--ink-3); margin: 22px 0 0; }
.plate-credit strong { font-weight: 400; color: var(--madder); }

.field { display: block; text-align: left; margin: 0 auto 18px; max-width: 420px; }
.field-label { display: block; font-family: var(--caps); font-size: 16px; color: var(--ink-2); margin-bottom: 6px; }
.text-input {
  width: 100%; padding: 12px 14px; font-size: 19px;
  background: rgba(255, 252, 244, 0.9); border: 1px solid var(--rule); border-radius: 2px; outline: none;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.text-input:focus { border-color: var(--madder); box-shadow: 0 0 0 3px rgba(176, 64, 44, 0.12); }

.voices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; max-width: 420px; margin: 0 auto 22px; }
.voice-card {
  position: relative; display: flex; align-items: center; gap: 10px; text-align: left;
  padding: 11px 12px; border: 1px solid var(--rule); border-radius: 2px; cursor: pointer;
  background: rgba(255, 252, 244, 0.7); transition: border-color 0.25s, background 0.25s;
}
.voice-card input { position: absolute; opacity: 0; pointer-events: none; }
.voice-card:has(input:checked) { border-color: var(--madder); background: rgba(176, 64, 44, 0.07); box-shadow: inset 0 0 0 1px var(--madder); }
.voice-name { font-family: var(--display); font-size: 18px; line-height: 1.1; }
.voice-desc { display: block; font-size: 14px; color: var(--ink-3); font-style: italic; }
.voice-play {
  flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--ink-3);
  background: transparent; color: var(--ink-2); display: grid; place-items: center; cursor: pointer;
}
.voice-play:hover, .voice-play.on { background: var(--madder); color: #fbf4e6; border-color: var(--madder); }

/* ---------- path ---------- */
.path-head { text-align: center; margin-bottom: 28px; }
.progress-line { display: flex; align-items: center; gap: 12px; justify-content: center; margin-top: 14px; font-family: var(--caps); font-size: 16px; color: var(--ink-2); }
.progress-bar { width: 180px; height: 6px; background: var(--rule); border-radius: 3px; overflow: hidden; }
.progress-bar span { display: block; height: 100%; background: var(--sage); border-radius: 3px; transition: width 1s var(--ease); }

.path { list-style: none; margin: 0; padding: 0; position: relative; }
.path::before { content: ""; position: absolute; left: 35px; top: 30px; bottom: 30px; border-left: 2px dotted var(--rule); }
.stop { position: relative; display: grid; grid-template-columns: 72px 1fr; gap: 16px; align-items: center; padding: 12px 0; }
.stop-card {
  display: block; padding: 14px 18px; text-decoration: none; color: var(--ink);
  border: 1px solid var(--rule); background: rgba(255, 252, 244, 0.6);
  transition: background 0.3s, border-color 0.3s, transform 0.3s var(--ease);
}
a.stop-card:hover { border-color: var(--madder); background: rgba(255, 252, 244, 0.95); transform: translateX(3px); }
.stop-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.stop-theme { font-family: var(--caps); font-size: 15px; color: var(--ink-3); }
.stop-title { font-family: var(--display); font-size: 23px; line-height: 1.15; margin: 2px 0; }
.stop-q { font-style: italic; font-size: 16.5px; color: var(--ink-3); margin: 0; }
.chip { flex-shrink: 0; font-family: var(--caps); font-size: 14.5px; padding: 2px 10px; border-radius: 999px; border: 1px solid currentColor; }
.chip.now { color: var(--madder); }
.chip.done { color: var(--sage); }
.chip.wait { color: var(--saffron); }
.chip.locked { color: var(--ink-3); }
.stop.locked .stop-card { opacity: 0.55; background: transparent; }
.stop.locked .stop-title { color: var(--ink-3); }

.seal { width: 72px; height: 72px; position: relative; display: grid; place-items: center; }
.seal svg { width: 100%; height: 100%; overflow: visible; }
.seal-num { position: absolute; font-family: var(--display); font-size: 22px; color: #fbf1e2; text-shadow: 0 1px 0 rgba(0, 0, 0, 0.25); }
.seal.locked .seal-num { color: #efe6d3; font-size: 18px; }
.seal.current svg { animation: glow 3s ease-in-out infinite; }
@keyframes glow { 50% { filter: drop-shadow(0 0 10px rgba(217, 142, 58, 0.7)); } }

.bonus-head { margin: 34px 0 10px; text-align: center; }
.bonus-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.certificate {
  text-align: center; padding: 26px 20px; margin-bottom: 28px;
  border: 1px solid var(--sage); outline: 1px solid var(--sage); outline-offset: -6px; background: var(--sage-soft);
}
.certificate .h-title { font-size: clamp(28px, 4.5vw, 40px); }

/* ---------- level ---------- */
.level-head { text-align: center; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); margin: 28px 0 26px; position: relative; }
.steps::before { content: ""; position: absolute; top: 17px; left: 12.5%; right: 12.5%; height: 2px; background: var(--rule); }
.step { position: relative; text-align: center; font-family: var(--caps); font-size: 15.5px; color: var(--ink-3); }
.step-dot {
  position: relative; z-index: 1; width: 36px; height: 36px; margin: 0 auto 6px; border-radius: 50%;
  display: grid; place-items: center; background: var(--paper); border: 2px solid var(--rule);
  font-family: var(--display); font-size: 17px; color: var(--ink-3);
}
.step.done { color: var(--sage); }
.step.done .step-dot { background: var(--sage); border-color: var(--sage); color: #fbf4e6; }
.step.now { color: var(--madder); }
.step.now .step-dot { border-color: var(--madder); color: var(--madder); box-shadow: 0 0 0 5px rgba(176, 64, 44, 0.1); }

.panel { border-top: 1px solid var(--rule); padding-top: 24px; animation: rise-in 0.5s var(--ease); }
.panel-title { font-family: var(--display); font-size: 28px; margin: 0 0 8px; }
.meter { margin: 18px 0 22px; }
.meter-top { display: flex; justify-content: space-between; font-family: var(--caps); font-size: 16px; color: var(--ink-2); margin-bottom: 6px; }
.meter-bar { position: relative; height: 10px; background: rgba(90, 72, 54, 0.12); border-radius: 5px; overflow: hidden; }
.meter-bar span { display: block; height: 100%; background: var(--sage); border-radius: 5px; transition: width 0.8s var(--ease); }
.meter-bar i { position: absolute; top: -2px; bottom: -2px; width: 2px; background: var(--madder); }

.task {
  margin: 16px 0 20px; padding: 20px 22px;
  border: 1px solid var(--rule); outline: 1px solid var(--rule); outline-offset: -6px; background: rgba(217, 142, 58, 0.08);
}
.task-label { font-family: var(--caps); color: var(--saffron); font-size: 16px; }
.task-title { font-family: var(--display); font-size: 25px; margin: 2px 0 8px; }
.task p { margin: 0; line-height: 1.6; }
.countdown { font-family: var(--display); font-size: clamp(34px, 6vw, 48px); color: var(--madder); text-align: center; margin: 10px 0 2px; font-variant-numeric: tabular-nums; }

/* quiz */
.quiz { counter-reset: q; }
.qcard { margin: 0 0 22px; padding: 0; border: none; }
.qcard legend { counter-increment: q; font-size: 19.5px; line-height: 1.5; margin-bottom: 10px; padding: 0; }
.qcard legend::before { content: counter(q, upper-roman) ". "; font-family: var(--display); color: var(--madder); }
.opt {
  display: flex; gap: 12px; align-items: flex-start; padding: 10px 14px; margin-bottom: 7px; cursor: pointer;
  border: 1px solid var(--rule); background: rgba(255, 252, 244, 0.6); line-height: 1.45;
  transition: border-color 0.2s, background 0.2s;
}
.opt:hover { border-color: var(--ink-3); }
.opt input { accent-color: var(--madder); margin-top: 5px; flex-shrink: 0; }
.opt:has(input:checked) { border-color: var(--madder); background: rgba(176, 64, 44, 0.06); }
.result { padding: 18px 20px; margin-bottom: 18px; border-left: 3px solid var(--saffron); background: rgba(217, 142, 58, 0.08); }
.result h3 { font-family: var(--display); font-weight: 400; font-size: 24px; margin: 0 0 6px; }
.replays { list-style: none; padding: 0; margin: 14px 0 0; }
.replays li { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 10px 0; border-top: 1px solid var(--rule); }
.replays .snip { font-style: italic; color: var(--ink-2); }
.replays .done-mark { font-family: var(--caps); color: var(--sage); font-size: 15px; flex-shrink: 0; }

/* reflect */
.prompt { margin-bottom: 20px; }
.prompt label { display: block; font-size: 19.5px; margin-bottom: 8px; }
.textarea {
  width: 100%; min-height: 130px; padding: 12px 14px; resize: vertical; line-height: 1.6; font-size: 18.5px;
  background: rgba(255, 252, 244, 0.9); border: 1px solid var(--rule); border-radius: 2px; outline: none;
  background-image: repeating-linear-gradient(transparent 0 28.8px, rgba(90, 72, 54, 0.1) 28.8px 29.8px);
  background-attachment: local;
}
.textarea:focus { border-color: var(--madder); box-shadow: 0 0 0 3px rgba(176, 64, 44, 0.12); }
.count { display: block; text-align: right; font-size: 15px; color: var(--ink-3); margin-top: 4px; font-variant-numeric: tabular-nums; }
.count.ok { color: var(--sage); }
.honest { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 20px; cursor: pointer; }
.honest input { accent-color: var(--madder); width: 18px; height: 18px; margin-top: 4px; }

.answers { margin-top: 20px; }
.answer { margin-bottom: 16px; }
.answer-q { font-family: var(--caps); font-size: 16px; color: var(--ink-3); margin: 0 0 4px; }
.answer-a { margin: 0; line-height: 1.65; white-space: pre-wrap; }
.transcript-read { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--rule); }
.transcript-read p { line-height: 1.75; margin: 0 0 16px; }

.journal-entry { padding: 20px 0; border-top: 1px solid var(--rule); }
.journal-entry:first-of-type { border-top: none; }
.journal-entry h3 { font-family: var(--display); font-weight: 400; font-size: 25px; margin: 0; }
.danger-zone { margin-top: 30px; font-size: 15.5px; color: var(--ink-3); }
.danger-zone summary { cursor: pointer; }

.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 80; transform: translateX(-50%);
  padding: 12px 20px; background: var(--ink); color: #fbf4e6; font-size: 17px; border-radius: 2px;
  box-shadow: 0 16px 30px -12px rgba(0, 0, 0, 0.4); animation: toast 3.6s var(--ease) forwards;
}
@keyframes toast { 0% { opacity: 0; transform: translate(-50%, 10px); } 10%, 85% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; } }
.preview-flag {
  position: fixed; left: 12px; bottom: 12px; z-index: 90; padding: 5px 12px; font-size: 13.5px;
  background: var(--saffron); color: #2e2319; border-radius: 2px; font-family: var(--caps);
}

/* ---------- talk view ---------- */
.stage { position: fixed; inset: 0; z-index: 50; overflow: hidden; background: var(--paper); animation: fade-in 0.7s var(--ease); }
@keyframes fade-in { from { opacity: 0; } }
.stage.closing { animation: fade-out 0.5s var(--ease) forwards; }
@keyframes fade-out { to { opacity: 0; } }

.stage-top {
  position: absolute; top: 0; left: 0; right: 0; z-index: 3;
  display: flex; align-items: center; gap: 10px;
  padding: max(16px, env(safe-area-inset-top)) clamp(14px, 4vw, 44px) 0;
  transition: opacity 1s var(--ease);
}
.stage-meta {
  display: flex; gap: 12px; align-items: baseline; min-width: 0; margin-right: auto;
  padding: 7px 14px; background: rgba(248, 241, 227, 0.85); border: 1px solid var(--rule);
}
.stage-num { font-family: var(--caps); color: var(--madder); font-size: 16px; flex-shrink: 0; }
.stage-title { font-family: var(--display); font-size: 16px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.heard-chip {
  display: flex; align-items: center; gap: 6px; padding: 5px 12px 5px 7px;
  background: rgba(248, 241, 227, 0.85); border: 1px solid var(--rule);
  font-family: var(--caps); font-size: 15px; color: var(--sage); font-variant-numeric: tabular-nums;
}
#heardRing { transition: stroke-dashoffset 0.6s var(--ease); }
.stage-x {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  border: 1px solid var(--rule); background: rgba(248, 241, 227, 0.88); color: var(--ink-2);
  display: grid; place-items: center; cursor: pointer;
}
.stage-x:hover { color: var(--madder); border-color: var(--madder); }

.stage-center { position: absolute; top: 72px; bottom: 128px; left: 0; right: 0; z-index: 2; display: flex; align-items: center; justify-content: center; padding: 0 14px; }
.leaf {
  position: relative; width: min(900px, 100%); max-height: 100%; display: flex; flex-direction: column;
  padding: clamp(24px, 4vw, 48px) clamp(20px, 5vw, 62px) 10px;
  background: var(--grain), rgba(249, 243, 230, 0.92);
  border: 1px solid var(--rule); outline: 1px solid var(--rule); outline-offset: -9px;
  box-shadow: 0 40px 80px -40px rgba(60, 45, 25, 0.55);
}
.transcript {
  flex: 1; min-height: 0; overflow: hidden;
  font-family: var(--serif); font-size: var(--fs, clamp(21px, 2.5vw, 34px)); line-height: 1.5;
  transition: opacity 0.38s var(--ease), transform 0.5s var(--ease);
}
.transcript.swap { opacity: 0; transform: translateY(-10px); }
.w { opacity: 0.16; transition: opacity 0.35s ease; }
.w.on { opacity: 1; }
.tp.said .w.on { opacity: 0.55; }
.tp.punch .w { font-style: italic; font-weight: 500; color: var(--madder); }
.tp.said.punch .w.on { opacity: 0.7; }
.t-title { display: block; margin: 0 0 0.45em; text-align: center; font-family: var(--display); font-weight: 400; font-size: 1.45em; line-height: 1.1; }
.t-title .w.on, .t-title.said .w.on { opacity: 1; }
.t-label { display: block; text-align: center; margin-bottom: 0.7em; font-family: var(--caps); font-size: 0.8em; color: var(--sage); opacity: 0.25; transition: opacity 0.6s; }
.t-label.now, .t-label.said { opacity: 1; }
.t-label::before, .t-label::after { content: "—"; margin: 0 0.5em; opacity: 0.6; }
.t-para.is-summary { border-left: 2px solid var(--sage); padding-left: clamp(16px, 2.4vw, 30px); }
.stage-wave { display: block; width: 100%; height: 52px; flex-shrink: 0; margin-top: 8px; }

.stage-end { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 10px 0; animation: fade-in 0.8s var(--ease); }
.end-label { font-family: var(--caps); font-size: 17px; color: var(--madder); margin: 0 0 10px; }
.end-title { font-family: var(--display); font-size: clamp(30px, 4.4vw, 48px); line-height: 1.08; margin: 0 0 10px; }
.end-question { font-style: italic; font-size: clamp(18px, 2vw, 21px); color: var(--ink-2); margin: 0 0 26px; max-width: 520px; }
.end-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

.stage-controls {
  position: absolute; left: 50%; bottom: max(12px, env(safe-area-inset-bottom)); z-index: 3;
  transform: translateX(-50%); width: min(900px, calc(100% - 28px)); padding: 8px 16px 10px;
  background: var(--grain), rgba(249, 243, 230, 0.93); border: 1px solid var(--rule);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
}
.stage-track { position: relative; height: 18px; cursor: pointer; touch-action: none; }
.stage-track::before { content: ""; position: absolute; left: 0; right: 0; top: 7px; height: 4px; background: rgba(90, 72, 54, 0.14); border-radius: 2px; }
.heard-map { position: absolute; left: 0; right: 0; top: 7px; height: 4px; }
.heard-map span { position: absolute; top: 0; bottom: 0; background: rgba(111, 143, 92, 0.55); }
.stage-fill { position: absolute; left: 0; top: 7px; height: 4px; width: 0; background: var(--madder); border-radius: 2px; opacity: 0.85; }
.stage-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; margin-top: 4px; }
.stage-time { font-size: 14.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.transport { display: flex; align-items: center; gap: 14px; }
.t-btn { width: 42px; height: 42px; border-radius: 50%; border: none; background: transparent; color: var(--ink-2); display: grid; place-items: center; cursor: pointer; }
.t-btn:hover { color: var(--madder); }
.t-play {
  width: 54px; height: 54px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--madder); color: #fbf4e6; display: grid; place-items: center;
  box-shadow: 0 6px 16px -8px rgba(176, 64, 44, 0.8); transition: transform 0.25s var(--ease), background 0.25s;
}
.t-play:hover { transform: scale(1.05); background: var(--madder-2); }
.i-pause { display: none; }
.is-playing .i-play { display: none; }
.is-playing .i-pause { display: block; }
.stage-right { display: flex; justify-content: flex-end; }
.speed { min-width: 50px; height: 32px; border-radius: 2px; border: 1px solid var(--rule); background: transparent; color: var(--ink-2); font-size: 15px; cursor: pointer; font-variant-numeric: tabular-nums; }
.speed:hover { border-color: var(--madder); color: var(--madder); }
.stage.idle { cursor: none; }
.stage.idle .stage-controls { opacity: 0; transform: translate(-50%, 10px); pointer-events: none; }
.stage.idle .stage-top { opacity: 0.4; }

/* ---------- celebration ---------- */
.celebrate { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 16px; background: rgba(60, 45, 25, 0.35); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); animation: fade-in 0.5s ease; }
.cert-frame { margin: 4px auto 16px; width: min(420px, 100%); }
.cert-img {
  display: block; width: 100%; height: auto; aspect-ratio: 3 / 4; background: #f4ecdc;
  box-shadow: 0 24px 50px -22px rgba(40, 25, 10, 0.55), 0 0 0 1px rgba(90, 72, 54, 0.2);
  animation: cert-in 1s cubic-bezier(0.2, 1.2, 0.4, 1) both;
}
@keyframes cert-in { from { opacity: 0; transform: scale(1.08) rotate(-2deg); } }
.celebrate-next { font-style: italic; color: var(--ink-2); margin: 0 auto 18px; max-width: 420px; line-height: 1.5; }
.celebrate-card {
  max-height: calc(100svh - 24px); overflow-y: auto;
  width: min(520px, 100%); text-align: center; padding: 26px 22px 24px;
  background: var(--grain), var(--paper); border: 1px solid var(--rule); outline: 1px solid var(--rule); outline-offset: -9px;
  box-shadow: 0 40px 80px -30px rgba(40, 30, 15, 0.6);
}
.celebrate .seal { width: 110px; height: 110px; margin: 0 auto 16px; animation: stamp 0.9s cubic-bezier(0.2, 1.4, 0.4, 1) both; }
.celebrate .seal-num { font-size: 32px; }
@keyframes stamp { 0% { transform: scale(2.4) rotate(-18deg); opacity: 0; } 60% { opacity: 1; } 100% { transform: scale(1) rotate(-6deg); } }

@media (max-width: 640px) {
  body { font-size: 17px; }
  .header-nav { gap: 12px; }
  .brand-name { font-size: 17px; }
  .stop { grid-template-columns: 56px 1fr; gap: 10px; }
  .seal { width: 56px; height: 56px; }
  .path::before { left: 27px; }
  .bonus-grid { grid-template-columns: 1fr; }
  .steps { font-size: 13.5px; }
  .step { font-size: 13.5px; }
  .stage-center { top: 64px; bottom: 118px; padding: 0 8px; }
  .stage-time, .stage-title { display: none; }
  .voices { grid-template-columns: 1fr; }
}
@media (max-width: 380px) { .brand-name { display: none; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cloud, .birds, .grass, .seal.current svg { animation: none; }
  .transcript, .w { transition-duration: 0.15s; }
}
