/* moogi.life: site styles. Character + world animation CSS is generated by Python (cast.css). */

:root {
  --bg: #FFF9F2;
  --surface: #FFFFFF;
  --ink: #2E2440;
  --muted: #6E6480;
  --line: #F0E6DA;
  --accent: #7A5CD6;
  --accent-deep: #5A3FB0;
  --accent-soft: #EFE9FF;
  --gold: #FFD45E;
  --shadow: 0 1px 0 var(--line), 0 18px 40px -24px rgba(60, 40, 90, .35);
  --display: "Fredoka", ui-rounded, "Nunito", system-ui, sans-serif;
  --body: "Nunito", ui-rounded, system-ui, sans-serif;
  /* The world is a storybook page: its cards stay light in dark mode too. */
  --paper: #FFFFFF;
  --paper-ink: #2E2440;
  --paper-muted: #6E6480;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #17142A; --surface: #221D3B; --ink: #F3EEFF; --muted: #B5ABCF; --line: #2F2850;
    --accent: #A58BFF; --accent-deep: #7A5CD6; --accent-soft: #2E2752;
    --shadow: 0 1px 0 var(--line), 0 18px 40px -24px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #17142A; --surface: #221D3B; --ink: #F3EEFF; --muted: #B5ABCF; --line: #2F2850;
  --accent: #A58BFF; --accent-deep: #7A5CD6; --accent-soft: #2E2752;
  --shadow: 0 1px 0 var(--line), 0 18px 40px -24px rgba(0, 0, 0, .6);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.55 var(--body); }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.15; margin: 0 0 .4em; }
a { color: var(--accent); }
.muted { color: var(--muted); }
button { font: inherit; }

/* ---------- Top bar ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 16px; max-width: 1280px; margin: 0 auto;
}
.brand {
  display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: var(--ink);
  font: 700 26px/1 var(--display); letter-spacing: -.01em;
}
.brand svg { width: 44px; height: 44px; margin: -4px -4px -2px -6px; }
.brand .tld { color: var(--accent); }
.topbar nav { display: flex; gap: 4px; }
.topbar nav a {
  font: 600 16px var(--display); color: var(--ink); text-decoration: none; padding: 8px 12px; border-radius: 999px;
}
.topbar nav a:hover { background: var(--accent-soft); }

/* ---------- The world stage ---------- */
.stage {
  position: relative; overflow: hidden; background: #CDEBFF;
  height: clamp(440px, min(78svh, 56vw), 860px);
  isolation: isolate;
}
.stage[data-mode="story"] { height: clamp(560px, min(88svh, 56vw), 860px); }
#world {
  position: absolute; inset: 0; width: 100%; height: 100%; display: block;
  touch-action: pan-y; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent;
}
.stage[data-mode="story"] #world { touch-action: manipulation; cursor: pointer; }
.stage.dragging #world { cursor: grabbing; }

.hud { position: absolute; top: 14px; left: 14px; display: flex; gap: 8px; z-index: 2; }
.hud-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 16px;
  border: 0; border-radius: 999px; background: rgba(255, 255, 255, .92); color: var(--paper-ink);
  font: 600 17px var(--display); cursor: pointer; box-shadow: 0 6px 18px -8px rgba(40, 30, 80, .45);
}
.hud-btn:hover { background: #fff; }
.hud-btn svg { width: 22px; height: 22px; }
.hud-btn.icon { width: 44px; padding: 0; justify-content: center; }
.hud-btn .i-sun, .stage.is-night .hud-btn .i-moon { display: none; }
.stage.is-night .hud-btn .i-sun { display: block; }
.stage[data-mode="story"] .hud:not(.hud-sound), .stage[data-mode="story"] .hint { display: none; }
.hud-sound { left: auto; right: 14px; }
.stage[data-mode="story"] .hud-sound { z-index: 6; }
.snd[aria-pressed="true"] .off-only, .snd[aria-pressed="false"] .on-only { display: none; }
.snd[aria-pressed="false"] { color: #8D7C8A; background: rgba(255, 255, 255, .75); }
.stage:not(.has-music) [data-action="music"], .stage:not(.has-voices) [data-action="voice"] { display: none; }

.hint {
  position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); margin: 0; z-index: 2;
  background: rgba(255, 255, 255, .92); color: var(--paper-ink); padding: 8px 16px; border-radius: 999px;
  font: 500 16px var(--display); white-space: nowrap; box-shadow: 0 6px 18px -8px rgba(40, 30, 80, .45);
  animation: hint-bob 2.4s ease-in-out infinite; transition: opacity .5s;
}
.hint.gone { opacity: 0; pointer-events: none; }
@keyframes hint-bob { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, -5px); } }

/* Speech bubble */
.bubble {
  position: absolute; left: 0; top: 0; z-index: 3; transform: translate(-50%, calc(-100% - 14px));
  max-width: min(300px, 80vw); width: max-content; padding: 12px 16px;
  background: var(--paper); color: var(--paper-ink); border: 3px solid var(--c, var(--accent)); border-radius: 22px;
  font: 500 17px/1.35 var(--display); pointer-events: none;
  box-shadow: 0 10px 24px -12px rgba(40, 30, 80, .5);
}
.bubble::after {
  content: ""; position: absolute; left: 50%; bottom: -11px; width: 18px; height: 18px; background: var(--paper);
  border-right: 3px solid var(--c, var(--accent)); border-bottom: 3px solid var(--c, var(--accent));
  transform: translateX(-50%) rotate(45deg); border-bottom-right-radius: 4px;
}
.bubble.pop { animation: pop .28s cubic-bezier(.3, 1.5, .5, 1); }
@keyframes pop { from { opacity: 0; scale: .7; } to { opacity: 1; scale: 1; } }

/* Effects inside the world */
.fx-heart { transform-box: fill-box; transform-origin: center; animation: fx-float 1.5s ease-out forwards; opacity: 0; }
@keyframes fx-float {
  0% { transform: translateY(0) scale(.4); opacity: 0; }
  20% { transform: translateY(-14px) scale(1.7); opacity: 1; }
  100% { transform: translateY(-130px) scale(1.3); opacity: 0; }
}
.fx-ripple { fill: none; stroke: #fff; stroke-width: 3; transform-box: fill-box; transform-origin: center; animation: fx-ripple 1.3s ease-out forwards; }
@keyframes fx-ripple { from { transform: scale(.4); opacity: 1; } to { transform: scale(4.5); opacity: 0; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px;
  padding: 0 20px; border: 0; border-radius: 999px; cursor: pointer;
  background: #7A5CD6; color: #fff; font: 600 17px var(--display);
  box-shadow: 0 4px 0 #5A3FB0; transition: transform .08s, box-shadow .08s, opacity .2s;
}
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: translateY(2px); box-shadow: 0 2px 0 #5A3FB0; }
.btn:disabled { opacity: .4; cursor: default; filter: none; transform: none; }
.btn-alt { background: #FFE2A8; color: #2E2440; box-shadow: 0 4px 0 #E0B65E; }
.btn-alt:active { box-shadow: 0 2px 0 #E0B65E; }
.btn-big { min-height: 54px; padding: 0 28px; font-size: 20px; }
.btn-ghost {
  min-height: 44px; min-width: 44px; padding: 0 14px; border: 0; border-radius: 999px; cursor: pointer;
  background: #F2EEFB; color: #2E2440; font: 600 17px var(--display);
}
.btn-ghost:disabled { opacity: .35; cursor: default; }
.btn-link { border: 0; background: none; color: #6E6480; text-decoration: underline; cursor: pointer; padding: 10px; font: 500 16px var(--display); }
.btn.nudge { animation: nudge .6s ease; }
@keyframes nudge { 0%, 100% { transform: none; } 30% { transform: scale(1.1); } 60% { transform: scale(.96); } }
:focus-visible { outline: 3px solid #7A5CD6; outline-offset: 3px; }

/* ---------- Story dialog ---------- */
.dialog {
  position: absolute; left: 50%; bottom: max(14px, env(safe-area-inset-bottom)); z-index: 4; transform: translateX(-50%);
  width: min(780px, calc(100% - 24px)); padding: 26px 20px 14px; border-radius: 26px;
  background: var(--paper); color: var(--paper-ink);
  box-shadow: 0 24px 50px -20px rgba(40, 30, 80, .55), 0 0 0 4px rgba(255, 255, 255, .55);
}
.dialog-who {
  position: absolute; top: -24px; left: 18px; display: flex; align-items: center; gap: 8px;
  padding: 4px 16px 4px 4px; border-radius: 999px; background: var(--c); color: #fff; font: 600 18px var(--display);
}
.portrait {
  position: relative; width: 44px; height: 44px; border-radius: 50%; background: var(--tint, #fff); overflow: hidden;
  display: grid; place-items: center; box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .7);
}
.portrait svg { position: absolute; left: 50%; top: -14px; width: 64px; height: 64px; transform: translateX(-50%); }
.dialog.is-idea { background: #FFF8DB; box-shadow: 0 24px 50px -20px rgba(80, 60, 0, .45), 0 0 0 4px #FFD45E; }
.dialog.is-idea .portrait svg { position: static; width: 30px; height: 30px; transform: none; }
.dialog-text { font: 500 clamp(18px, 2.3vw, 23px)/1.42 var(--display); min-height: 2.84em; padding-right: 36px; }
.dialog-text em { font-style: normal; font-weight: 600; color: var(--c); }
.dialog.is-idea .dialog-text em { color: #A06A00; }
.dialog-text.in { animation: text-in .35s ease-out; }
@keyframes text-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.dialog-nav { display: flex; align-items: center; gap: 14px; margin-top: 10px; }
.progress { flex: 1; height: 6px; border-radius: 3px; background: #F0EBFA; position: relative; overflow: hidden; }
.progress::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--p, 0%); background: var(--c, #7A5CD6); border-radius: 3px; transition: width .3s; }
.dialog .close { top: 10px; right: 10px; }

/* ---------- Overlays (storybook, story start/end, activities) ---------- */
.overlay {
  position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; padding: 12px;
  background: rgba(30, 24, 60, .28);
}
.overlay[hidden], .dialog[hidden], .bubble[hidden] { display: none; }
.overlay .card {
  position: relative; width: min(580px, 100%); max-height: 100%; overflow: auto; padding: 24px;
  background: var(--paper); color: var(--paper-ink); border-radius: 28px;
  box-shadow: 0 30px 60px -20px rgba(30, 20, 70, .55); animation: pop .3s cubic-bezier(.3, 1.4, .5, 1);
}
.overlay .card h2 { font-size: 28px; }
.overlay .muted { color: var(--paper-muted); }
.close {
  position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; border: 0; border-radius: 50%;
  background: #F2EEFB; color: #2E2440; font: 600 24px/1 var(--display); cursor: pointer;
}
.ep {
  display: inline-block; font: 600 13px var(--display); letter-spacing: .06em; text-transform: uppercase;
  color: #7A5CD6; background: #EFE9FF; padding: 5px 12px; border-radius: 999px;
}

.story-start { background: rgba(255, 249, 242, .25); }
.story-start .card { text-align: center; padding: 30px 26px 20px; }
.story-start h1 { font-size: clamp(30px, 5vw, 42px); margin: 14px 0 8px; }
.story-start p { margin: 0 auto 6px; max-width: 440px; color: var(--paper-muted); }
.avatars { display: inline-flex; }
.avatars .avatar + .avatar { margin-left: -10px; }
.avatar {
  display: inline-grid; place-items: center; overflow: hidden; border-radius: 50%; background: var(--tint);
  width: var(--s, 44px); height: var(--s, 44px);
  box-shadow: 0 0 0 3px var(--surface);
}
.avatar svg { margin-top: 18%; }
.avatars.big { margin: 14px 0 18px; gap: 10px; }
.avatars.big .avatar + .avatar { margin-left: 0; }
.avatars.big .avatar { box-shadow: none; }

.storybook .card { padding: 26px 22px 18px; }
.sb-list { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 10px; }
.sb-list a {
  display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 20px; text-decoration: none;
  color: var(--paper-ink); background: #F7F3FF; transition: transform .15s, background .15s;
}
.sb-list a:hover { background: #EFE9FF; transform: translateY(-2px); }
.sb-ep {
  flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: #7A5CD6; color: #fff; font: 700 18px var(--display);
}
.sb-text { flex: 1; display: grid; }
.sb-text b { font: 600 18px/1.25 var(--display); }
.sb-text small { color: var(--paper-muted); font-size: 14px; }
.sb-list .avatar { box-shadow: 0 0 0 3px #F7F3FF; }

.story-end .card { text-align: center; }
.story-end h2 { margin-top: 14px; }
.end-ideas { text-align: left; margin: 12px 0 18px; padding: 0; list-style: none; display: grid; gap: 10px; }
.end-ideas li { background: #FFF8DB; border-radius: 16px; padding: 12px 14px 12px 44px; position: relative; line-height: 1.45; }
.end-ideas li::before { content: "★"; position: absolute; left: 16px; top: 11px; color: #E0A100; }
.end-ideas em { font-style: normal; font-weight: 700; }
.end-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; align-items: center; }

/* ---------- Activities ---------- */
.activity { background: rgba(30, 24, 60, .2); }
.act-card { width: min(600px, 100%); padding: 20px 20px 16px; }
.act-tag {
  display: inline-block; font: 600 13px var(--display); letter-spacing: .06em; text-transform: uppercase;
  color: #A06A00; background: #FFF3C4; padding: 5px 12px; border-radius: 999px;
}
.act-card h3 { font-size: 26px; margin: 10px 0 4px; outline: none; }
.act-instr { margin: 0 0 12px; color: var(--paper-muted); line-height: 1.45; }
.act-instr b { color: var(--paper-ink); }
.act-instr .count { display: inline-block; font: 600 13px var(--display); color: #7A5CD6; background: #EFE9FF; border-radius: 999px; padding: 1px 9px; margin-left: 4px; }
.act-foot {
  position: sticky; bottom: -16px; z-index: 1; display: flex; justify-content: space-between; gap: 10px;
  margin: 14px -20px -16px; padding: 10px 20px 16px; background: var(--paper); border-top: 2px solid #F3EEF9;
}
.c-sun { color: #D99A00; }
.c-heat { color: #E5532F; }

/* Teach Moogi */
.teach { display: grid; gap: 10px; }
.teach-item { display: grid; justify-items: center; gap: 4px; padding: 10px; border-radius: 22px; background: #FFF6EC; }
.teach-item.in { animation: pop .3s cubic-bezier(.3, 1.4, .5, 1); }
.teach-item.shake { animation: shake .4s ease; }
@keyframes shake { 0%, 100% { transform: none; } 25% { transform: translateX(-8px); } 50% { transform: translateX(8px); } 75% { transform: translateX(-4px); } }
.teach-art svg { width: 108px; height: 108px; display: block; }
.teach-name { font: 600 19px var(--display); }
.clues { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.clue { font: 600 14px var(--display); padding: 3px 10px; border-radius: 999px; }
.clue.yes { background: #DDF5E0; color: #2C7A3E; }
.clue.no { background: #F4EEF2; color: #8D7C8A; }
.teach-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; min-height: 48px; align-items: center; }
.teach-msg { margin: 0; min-height: 1.5em; text-align: center; line-height: 1.45; }
.teach-msg small { display: block; color: var(--paper-muted); font-size: 15px; margin-top: 2px; }
.teach-msg .sure { color: var(--paper-muted); }
.verdict { display: inline-block; margin-top: 6px; font: 600 16px var(--display); padding: 3px 12px; border-radius: 999px; }
.verdict.right { background: #DDF5E0; color: #2C7A3E; }
.verdict.wrong { background: #FFE1E1; color: #B23B3B; }
.score { margin: 0; font: 500 18px var(--display); }
.thinking { font: 500 17px var(--display); color: #7A5CD6; }
.dots i { display: inline-block; width: 6px; height: 6px; margin-left: 3px; border-radius: 50%; background: currentColor; animation: dot 1s infinite; }
.dots i:nth-child(2) { animation-delay: .15s; } .dots i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 60%, 100% { opacity: .25; transform: none; } 30% { opacity: 1; transform: translateY(-3px); } }
.memory { border-top: 2px dashed #EEE6F5; padding-top: 10px; }
.memory-label { font: 600 13px var(--display); letter-spacing: .05em; text-transform: uppercase; color: var(--paper-muted); }
.memory-row { display: flex; flex-wrap: wrap; gap: 6px; min-height: 48px; margin-top: 6px; }
.thumb { position: relative; width: 46px; height: 46px; border-radius: 14px; background: #F7F3FF; animation: pop .3s; }
.thumb svg { width: 46px; height: 46px; }
.thumb i {
  position: absolute; right: -4px; bottom: -4px; width: 20px; height: 20px; border-radius: 50%;
  display: grid; place-items: center; font: 700 12px/1 var(--display); font-style: normal; color: #fff;
}
.thumb.is-cookie i { background: #3BA55C; }
.thumb.not-cookie i { background: #B7AFC4; }

/* Greenhouse */
.gh-wrap svg { width: 100%; height: auto; display: block; border-radius: 18px; }
.gh-gas { transition: opacity .4s; }
.gh-controls { display: flex; align-items: center; gap: 10px; margin: 12px 0 6px; font: 600 15px var(--display); color: var(--paper-muted); }
.gh-controls input { flex: 1; accent-color: #E5532F; height: 32px; }
.gh-readout { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; justify-content: center; text-align: center; }
.gh-temp { font: 600 22px var(--display); }
.gh-label { color: var(--paper-muted); }
.goals { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 10px; }
.goal { font: 600 14px var(--display); padding: 5px 12px; border-radius: 999px; background: #F4EEF2; color: #8D7C8A; }
.goal::before { content: "○ "; }
.goal.done { background: #DDF5E0; color: #2C7A3E; }
.goal.done::before { content: "✓ "; }

/* Packets */
.net { width: 100%; height: auto; display: block; background: #F7F3FF; border-radius: 18px; }
.net-edge { stroke: #D9D0F0; stroke-width: 6; stroke-linecap: round; transition: opacity .3s; }
.net-edge.dim { opacity: .3; stroke-dasharray: 4 8; }
.endpoint { stroke: #3D3355; stroke-width: 3; }
.router { cursor: pointer; }
.router-body { fill: #fff; stroke: #3D3355; stroke-width: 3; transition: fill .2s; }
.router-arrows { fill: none; stroke: #7A5CD6; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.router-x { fill: none; stroke: #E24B4B; stroke-width: 3.5; stroke-linecap: round; opacity: 0; }
.router:hover .router-body { fill: #EFE9FF; }
.router.broken .router-body { fill: #EEE9EE; stroke: #A99FB0; }
.router.broken .router-arrows { opacity: 0; }
.router.broken .router-x { opacity: 1; }
.router:focus-visible { outline: none; }
.router:focus-visible .router-body { stroke: #7A5CD6; stroke-width: 5; }
.packet rect { fill: #FFD45E; stroke: #3D3355; stroke-width: 2.5; }
.packet text { font: 700 11px var(--display); fill: #3D3355; text-anchor: middle; }
.packet .packet-n { fill: #7A5CD6; }
.packet.lost { animation: poof .6s ease-out forwards; }
@keyframes poof { to { opacity: 0; transform: scale(1.8); } }
.net-bar { display: flex; justify-content: center; margin: 12px 0 8px; }
.inbox { background: #FFF6EC; border-radius: 18px; padding: 10px 12px; text-align: center; }
.inbox-label { font: 600 13px var(--display); letter-spacing: .05em; text-transform: uppercase; color: var(--paper-muted); }
.slots { display: flex; justify-content: center; gap: 8px; margin: 6px 0; }
.slot {
  position: relative; width: 58px; height: 44px; border-radius: 12px; border: 2px dashed #E3C9A6;
  display: grid; place-items: center; font: 700 18px var(--display);
}
.slot small { position: absolute; top: 2px; left: 6px; font-size: 11px; color: #B79A78; }
.slot.filled { border-style: solid; border-color: #3D3355; background: #FFD45E; animation: pop .3s; }
.slot.filled::after {
  content: attr(data-order); position: absolute; right: -7px; top: -9px; min-width: 20px; height: 20px; padding: 0 4px;
  border-radius: 10px; background: #7A5CD6; color: #fff; font: 700 11px/20px var(--display);
}
.inbox-msg { margin: 4px 0 0; line-height: 1.45; }
.assembled { color: #7A5CD6; letter-spacing: .04em; }

/* ---------- Page content ---------- */
.content { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.intro { text-align: center; padding: 56px 0 8px; max-width: 720px; margin: 0 auto; }
.intro h1 { font-size: clamp(32px, 5vw, 50px); }
.intro p { font-size: 19px; color: var(--muted); }
.section { padding: 40px 0 8px; }
.section > h2 { font-size: clamp(28px, 4vw, 38px); text-align: center; margin-bottom: 22px; }

.story-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 20px; }
.story-card {
  display: flex; flex-direction: column; gap: 8px; padding: 20px 22px 22px; border-radius: 26px;
  background: var(--surface); color: var(--ink); text-decoration: none; box-shadow: var(--shadow);
  transition: transform .18s ease;
}
.story-card:hover { transform: translateY(-4px); }
.story-card-top { display: flex; justify-content: space-between; align-items: center; }
.story-card h3 { font-size: 25px; margin: 6px 0 0; }
.story-card .concept { align-self: flex-start; font: 600 14px var(--display); color: #A06A00; background: #FFF3C4; padding: 3px 10px; border-radius: 999px; }
.story-card p { margin: 4px 0 6px; color: var(--muted); flex: 1; }
.story-card .play { font: 600 17px var(--display); color: var(--accent); }
.story-card .avatar { box-shadow: 0 0 0 3px var(--surface); }

.friend-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 20px; }
.friend { background: var(--surface); border-radius: 26px; padding: 0 20px 22px; box-shadow: var(--shadow); text-align: center; overflow: hidden; }
.friend-art { background: var(--tint); margin: 0 -20px 14px; padding: 18px 0 4px; display: grid; place-items: center; }
.friend-art svg { width: 160px; height: 160px; }
.friend h3 { font-size: 26px; margin: 0; }
.friend .role { display: inline-block; font: 600 14px var(--display); color: var(--accent); margin: 2px 0 8px; }
.friend p { margin: 0; color: var(--muted); font-size: 16px; }

.transcript { max-width: 720px; margin: 0 auto; padding: 48px 0 8px; }
.transcript h2 { font-size: 34px; margin-top: 14px; }
.lede { font-size: 19px; color: var(--muted); }
.transcript .line { margin: 0 0 12px; font-size: 18px; }
.transcript .line b { font-family: var(--display); font-weight: 600; }
.transcript .line em { font-weight: 700; font-style: normal; }
.transcript .idea, .transcript .try { border-radius: 20px; padding: 14px 18px; margin: 18px 0; }
.transcript .idea { background: #FFF8DB; color: #3D3355; }
.transcript .try { background: var(--accent-soft); }
.transcript .idea p, .transcript .try p { margin: 6px 0 0; }
.idea-tag { font: 600 13px var(--display); letter-spacing: .06em; text-transform: uppercase; color: #A06A00; }
.transcript .try .idea-tag { color: var(--accent); }

.footer { text-align: center; padding: 56px 16px 40px; color: var(--ink); }
.footer p { margin: 4px 0; }

@media (max-width: 700px) {
  .stage { height: clamp(460px, 64svh, 620px); }
  .stage[data-mode="story"] { height: clamp(560px, 86svh, 760px); }
}
@media (max-width: 560px) {
  .topbar nav a { padding: 8px 8px; font-size: 15px; }
  .brand { font-size: 22px; }
  .hud-btn span { display: none; }
  .hud-btn:not(.icon) { width: 44px; padding: 0; justify-content: center; }
  .hint { font-size: 14px; white-space: normal; text-align: center; width: max-content; max-width: calc(100% - 32px); }
  .dialog { padding: 26px 14px 12px; }
  .act-card { padding: 16px 14px 12px; }
  .act-foot { margin: 12px -14px -12px; padding: 10px 14px 12px; bottom: -12px; }
  .act-card h3 { font-size: 22px; margin-top: 0; }
  .act-tag { display: none; }
  .act-instr { font-size: 15px; margin-bottom: 10px; }
  .teach-item { padding: 6px; }
  .gh-readout { font-size: 15px; }
  .gh-temp { font-size: 19px; }
  .teach-art svg { width: 88px; height: 88px; }
  .slot { width: 52px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
