:root {
  --ink: #17192e;
  --paper: #fffaf0;
  --gold: #ffcf38;
  --mint: #58e3cf;
  --orange: #ff7751;
  --muted: #565766;
  color-scheme: light;
  font: 17px/1.5 "Nunito", "Trebuchet MS", Arial, sans-serif;
  color: var(--ink);
  background: #f7f3e8;
}
* { box-sizing: border-box }
body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(#beb5aa70 .8px, transparent .9px) 0 0/7px 7px;
}
header, main, footer { width: min(1120px, calc(100% - 64px)); margin-inline: auto }
header {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.15rem 0; border-bottom: 3px solid var(--ink);
}
.brand { font: 900 clamp(1.05rem,3vw,1.55rem)/1.1 "Archivo Black","Arial Black",sans-serif; letter-spacing: -.055em; color: var(--ink); text-decoration: none }
nav { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center }
button, .primary {
  cursor: pointer; color: var(--ink); background: white; font: inherit; font-weight: 750;
  border: 2px solid var(--ink); border-radius: 9px; padding: .58em 1em;
  min-height: 44px; text-decoration: none; transition: transform .12s, box-shadow .12s;
}
nav button { background: transparent; border-color: transparent; font-size: .92rem }
nav button:is([aria-current="page"],[aria-pressed="true"],.active), nav button:hover { border-color: var(--ink); background: white }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 4px solid #8843db; outline-offset: 4px }
button:disabled { cursor: default; opacity: .7 }
main { padding-block: 1.6rem 3rem }
.hero {
  position: relative; display: grid; grid-template-columns: 1.15fr 1fr;
  overflow: hidden; border: 3px solid var(--ink); border-radius: 19px;
  background: var(--gold); box-shadow: 5px 6px var(--ink);
}
.intro { padding: clamp(24px, 4vw, 58px); align-self: center }
.eyebrow, .pill {
  display: inline-block; font-weight: 850; font-size: .78rem;
  letter-spacing: .06em; text-transform: uppercase; line-height: 1.35;
}
.eyebrow { border-bottom: 3px solid var(--ink); padding-bottom: .28rem }
.pill { background: #f3eddf; border: 1.5px solid var(--ink); padding: .24rem .55rem; border-radius: 6px; letter-spacing: .025em }
h1,h2,h3 { font-family: "Archivo Black","Arial Black",Arial,sans-serif; font-weight: 900; line-height: 1.09; letter-spacing: -.045em; overflow-wrap: anywhere }
h1 { margin: .25em 0; font-size: clamp(2.4rem, 5.2vw, 4.65rem) }
h2 { font-size: clamp(1.55rem,3.8vw,2.1rem); margin: 1.1em 0 .55em }
h3 { font-size: 1.28rem; margin: .5em 0 }
p { max-width: 70ch }
.intro p { margin: .65rem 0 1.4rem }
.primary { display: inline-block; background: var(--ink); color: white; box-shadow: 3px 4px #fff8cc; padding: .74em 1.18em }
button:not(:disabled):hover { transform: translateY(-2px) }
button:not(:disabled):active { transform: translateY(1px) }
.scene {
  isolation: isolate; overflow: hidden; position: relative; display: flex; flex-direction: column;
  align-items: center; justify-content: center; min-height: 330px; padding: 1rem;
  border-left: 3px solid var(--ink);
  background:
    radial-gradient(ellipse at 6% 80%, #fff8b6 0 2px, transparent 3px),
    radial-gradient(ellipse at 86% 37%, #fff8b6 0 3px, transparent 4px),
    radial-gradient(#34225980 1px, transparent 1.8px) 0 0/8px 8px,
    repeating-conic-gradient(from 13deg at 52% 64%,#a795ff 0deg 14deg,#c1aeff 14deg 23deg);
}
.scene::before {
  content: ""; z-index: -1; position: absolute; width: 65%; height: 41%; left: 18%; bottom: 8%;
  border: 3px dashed #352956; border-radius: 50%; transform: rotate(-21deg);
}
.scene::after {
  content: "✦"; position: absolute; left: 14%; bottom: 23%; font: 900 39px/1 Arial;
  color: #fff47a; -webkit-text-stroke: 1.8px var(--ink); text-shadow: 185px -92px #fff47a, 155px 30px #fff47a;
  pointer-events: none; z-index: -1;
}
.speech {
  position: relative; max-width: 90%; padding: .56em 1em;
  margin: .2rem 0 .8rem; border: 2.5px solid var(--ink); border-radius: 22px 22px 22px 6px;
  background: #fffdf5; box-shadow: 3px 3px var(--ink); font-weight: 800; text-align:center;
}
.bot {
  --shell: #5de8db; --shine: #c3fff4; --shadow: #15999e;
  width: 174px; height: 199px; position: relative; flex: none;
  filter: drop-shadow(4px 5px 0 #362e5955); transform: rotate(-5deg);
}
.bot[data-stage="1"] { --shell:#ff986a; --shine:#ffdfb4; --shadow:#da5b3e }
.bot[data-stage="2"] { --shell:#9bd4ff; --shine:#dcf4ff; --shadow:#5895c9 }
.bot[data-stage="3"] { --shell:#eed16d; --shine:#fff4ab; --shadow:#ce8f2f; filter: drop-shadow(0 0 12px #fff174) }
.bot .antenna {
  position:absolute; width:6px; height:26px; background:var(--ink); left:82px; top:8px;
  transform:rotate(12deg);
}
.bot .antenna::before { content:""; position:absolute; width:17px; height:17px; left:-6px; top:-8px; border:3px solid var(--ink); border-radius:50%; background:var(--orange) }
.bot .head {
  position:absolute; z-index:3; left:13px; top:27px; width:148px; height:99px;
  border:4px solid var(--ink); border-radius:38% 38% 34% 34%; background:var(--shell);
  box-shadow:inset 4px 5px var(--shine), inset -5px -7px var(--shadow);
  display:flex; align-items:center; justify-content:center; gap:27px;
}
.bot .head::before {
  content:""; position:absolute; inset:15px 11px 16px; border:3px solid var(--ink);
  border-radius:28px; background:#24253c; box-shadow:inset 2px 3px #4e516a;
}
.bot .head::after {
  content:""; position:absolute; bottom:25px; left:60px; width:16px; height:7px;
  border:2px solid #84fff0; border-top:0; border-radius:0 0 16px 16px;
}
.bot .head i { position:relative; width:12px; height:20px; border-radius:7px; background:#9affed; box-shadow:0 0 6px #b7ffe780; margin-top:-8px }
.bot .body {
  position:absolute; left:45px; top:117px; width:85px; height:61px;
  background:var(--shell); border:4px solid var(--ink); border-radius:20px 20px 28px 28px; box-shadow:inset -7px -5px var(--shadow);
}
.bot .body::before, .bot .body::after {
  content:""; width:17px; height:37px; border:3px solid var(--ink); border-radius:14px;
  position:absolute; top:8px; left:-22px; background:var(--shine); transform:rotate(24deg);
}
.bot .body::after { left:auto; right:-24px; top:-4px; transform:rotate(42deg) }
.bot .feet { position:absolute; width:28px; height:21px; left:53px; top:174px; border-radius:45%; border:3px solid var(--ink); background:#46516a }
.bot .feet::after { content:""; position:absolute; width:23px; height:16px; left:42px; top:-3px; border:3px solid var(--ink); border-radius:45%; background:#46516a }
.bot:is([data-stage="2"],[data-stage="3"]) .scarf {
  z-index:4; position:absolute; left:48px; top:117px; width:79px; height:16px; background:var(--orange);
  border:3px solid var(--ink); border-radius:35%; transform:rotate(-5deg);
}
.bot:is([data-stage="2"],[data-stage="3"]) .scarf::after { content:""; position:absolute; left:48px; top:7px; width:15px; height:30px; border:2px solid var(--ink); background:var(--orange); transform:rotate(-22deg) }
section + section { margin-top:1.75rem }
.grid { display:grid; grid-template-columns: repeat(auto-fit,minmax(min(240px,100%),1fr)); gap:1rem }
.card,.panel {
  background:var(--paper); border:2.5px solid var(--ink); border-radius:13px;
  padding:clamp(18px,2.4vw,32px); box-shadow:3px 4px var(--ink);
}
.card { border-top:7px solid #5cc9ba }
.card:nth-child(3n + 2) { border-top-color:#f48869 }
.card:nth-child(3n) { border-top-color:#ad90f0 }
.panel { margin:.85rem 0; max-width:100% }
.choices { display:grid; gap:.7rem; margin:1.25rem 0 }
.choices button { text-align:left; background:#fff; box-shadow:2px 2px var(--ink) }
.choices button:not(:disabled):hover { background:#fff1b7 }
.progress { height:14px; border:2px solid var(--ink); background:white; border-radius:20px; overflow:hidden; margin-block:.6rem }
.progress i { display:block; height:100%; background:var(--mint) }
.muted, footer { color:var(--muted) }
.success { color:#145841; font-weight:800 }
a { color:#4931a3; text-underline-offset:.18em }
footer { border-top:2px solid var(--ink); padding:1rem 0 2rem; font-size:.9rem }
@media(max-width:720px) {
  header, main, footer { width:min(100% - 28px,620px) }
  header { align-items:flex-start; flex-direction:column; gap:.5rem }
  nav { gap:.15rem }
  nav button { padding:.28rem .55rem; font-size:.85rem }
  .hero { grid-template-columns:1fr }
  .scene { border-left:0; border-top:3px solid var(--ink); min-height:245px; padding:.7rem; gap:.35rem }
  .scene .bot { zoom:.85 }
  main { padding-top:1rem }
}
@media(prefers-reduced-motion:reduce) { *,*::before,*::after { animation:none!important; transition:none!important } }
.voyage,.report,.planet,.practice{background:#fffcf4;border:2px solid var(--ink);border-radius:16px;padding:clamp(16px,3vw,30px);margin:18px 0}.voyage{background:#ffe17a}.voyage strong,.metric strong{display:block;font-size:2rem;font-weight:900}.voyage .progress,.report .progress{margin:.65rem 0}.planet h2,.report h2{margin-top:0}.planet details{border-top:1px dashed #817d8c;padding:.6rem 0}.planet summary,details summary{cursor:pointer;font-weight:800;padding:.4rem}.route{display:grid;gap:0;margin:8px 0}.station{display:flex;gap:14px;align-items:flex-start;padding:12px 0;position:relative}.station:not(:last-child):before{content:"";position:absolute;top:44px;bottom:-12px;left:19px;border-left:3px dashed #89829c}.marker{display:grid;place-items:center;min-width:40px;height:40px;background:#ffe17a;border:2px solid var(--ink);border-radius:50%;z-index:1}.earned .marker{background:var(--mint)}.locked .marker,.future{background:#edeaf2}.station h3{margin:.12rem 0}.station small{font-weight:bold}.practice{background:#e8faf6}details p{white-space:pre-line}.panel p{white-space:pre-line}nav{justify-content:center}@media(max-width:650px){header{flex-direction:column}nav{gap:0}nav button{padding:.35rem .5rem}}
#word-input{font:inherit;border:2px solid var(--ink);border-radius:8px;padding:.65rem;width:min(100%,24rem)}
.cup-banner{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:clamp(22px,4vw,48px);background:radial-gradient(#9b651558 1px,transparent 1px) 0 0/7px 7px,#ffdb63;border:3px solid var(--ink);border-radius:16px;box-shadow:4px 5px var(--ink)}.cup-icon{background:#fffae5;border:3px solid var(--ink);border-radius:50%;display:grid;place-items:center;flex:none;width:clamp(55px,10vw,112px);aspect-ratio:1;font-size:clamp(26px,5vw,58px);transform:rotate(8deg)}.cup-grid{margin:26px 0}.cup-grid h2{margin:.5em 0}.cup-history,.cup-controls{display:flex;flex-wrap:wrap;align-items:center;gap:10px}.cup-history{justify-content:space-between;border-top:1px dashed var(--muted);padding:12px 0}.cup-prompt,.cup-review p{white-space:pre-line}.cup-prompt{font-size:1.15rem}#cup-input{width:min(100%,36rem);font:inherit;padding:.7rem;border:2px solid var(--ink);border-radius:8px}.cup-review summary{font-weight:bold;cursor:pointer}
