/* Dont Panic on the web. Same paper, ink and amber as the iPad app (Look in Crew.swift).
   Sizes: body 19px, tap targets at least 48px, one 760px reading column (the quest board widens on laptops). */
@font-face { font-family: "Nunito"; src: url("fonts/nunito.woff2") format("woff2"); font-weight: 200 1000; font-display: swap; }
:root {
  --paper: #F6EFE3; --card: #FCF8F0; --ink: #2A1810; --soft: #604A3C; --line: #DCCDB9;
  --amber: #E58A2E; --button: #D4741A; --amber-deep: #A9570C; --night: #0E1B1F; --glow: #B8F28B; --letter: #FAEEDA; --mine: #F3DFC2;
  --round: "Nunito", ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --shadow: 0 10px 26px rgba(42, 24, 16, .10);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 500 19px/1.5 var(--round); min-height: 100dvh;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; }
img { display: block; max-width: 100%; }
p { margin: 0 0 12px; }
.wrap { max-width: 760px; margin: 0 auto; padding: 16px 20px 140px; }

/* ---------- Top bar ---------- */
.bar { display: flex; align-items: center; gap: 12px; padding: 4px 0 18px; min-height: 68px; }
.brand { font-weight: 900; font-size: 22px; line-height: 1.1; letter-spacing: -.01em; }
.brand small { display: block; font-weight: 700; font-size: 13px; color: var(--amber-deep); letter-spacing: 0; }
.bar .spacer { flex: 1; }
.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 8px 18px;
  border-radius: 999px; background: var(--card); border: 2px solid var(--line); font-weight: 800; font-size: 16px; white-space: nowrap;
  transition: transform .08s ease, border-color .15s ease, background .15s ease;
}
.pill:hover { border-color: var(--amber); }
.pill:active { transform: scale(.96); }
.pill[aria-pressed="false"] { color: var(--soft); }
.pill.sky { background: var(--night); color: #fff; border-color: var(--night); }
.pill.sky:hover { border-color: var(--glow); }
.back { display: inline-grid; place-items: center; text-decoration: none; color: inherit; width: 48px; height: 48px; flex: none; border-radius: 50%; background: var(--card); border: 2px solid var(--line); font-size: 26px; font-weight: 900; line-height: 1; padding-bottom: 3px; }
.back { font-size: 0; padding: 0; }
.back::before { content: ""; width: 11px; height: 11px; border-left: 3.5px solid var(--ink); border-bottom: 3.5px solid var(--ink); border-radius: 2px; transform: translateX(2px) rotate(45deg); }
.back:hover { border-color: var(--amber); }

/* ---------- Type ---------- */
h1 { font-weight: 900; font-size: clamp(28px, 6vw, 40px); line-height: 1.1; letter-spacing: -.02em; margin: 6px 0 14px; text-wrap: balance; }
h2 { font-weight: 900; font-size: 23px; line-height: 1.2; margin: 34px 0 14px; }
h2 small { font-weight: 700; font-size: 15px; color: var(--amber-deep); }
.sub { color: var(--soft); margin: 0 0 22px; }
.hint { color: var(--soft); font-size: 16px; margin-top: 16px; }
.foot { color: var(--soft); font-size: 15px; margin-top: 40px; line-height: 1.7; }
.link { color: var(--amber-deep); font-weight: 800; text-decoration: underline; text-underline-offset: 3px; padding: 8px 0; }
.small { color: var(--soft); font-size: 15px; text-align: center; }

/* ---------- Big buttons ---------- */
.go {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 60px; padding: 12px 32px;
  background: var(--button); color: #fff; font-weight: 900; font-size: 21px; border-radius: 999px; text-decoration: none;
  box-shadow: 0 6px 0 var(--amber-deep); transition: transform .08s ease, box-shadow .08s ease, filter .15s ease;
}
.go:hover { filter: brightness(1.06); }
.go:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--amber-deep); }
.go.quiet { background: var(--card); color: var(--ink); box-shadow: 0 6px 0 var(--line); border: 2px solid var(--line); }
.go.quiet:active { box-shadow: 0 2px 0 var(--line); }

/* ---------- Home ---------- */
.hello { display: block; width: 100%; text-align: center; padding: 6px 0 2px; margin-bottom: 4px; }
.crewrow { display: flex; justify-content: center; gap: clamp(2px, 1.4vw, 12px); }
.crewrow img { width: clamp(30px, 9.4vw, 64px); height: clamp(30px, 9.4vw, 64px); object-fit: contain; animation: bob 2.6s ease-in-out infinite; }
.hello:hover .crewrow img { animation-duration: 1.1s; }
.hi { color: var(--soft); font-weight: 700; font-size: 17px; margin-top: 10px; text-wrap: balance; }
.hello + h1 { text-align: center; margin-top: 18px; }
.ask { display: flex; gap: 10px; align-items: center; }
.idea, .field {
  flex: 1; min-width: 0; background: #fff; border: 2px solid var(--line); border-radius: 20px; padding: 14px 20px; min-height: 58px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.idea::placeholder, .field::placeholder { color: #9A8778; }
.idea:focus, .field:focus { outline: none; border-color: var(--amber); box-shadow: 0 0 0 4px rgba(229, 138, 46, .18); }
.ask.big .idea { min-height: 64px; font-size: 20px; box-shadow: var(--shadow); }
.send { width: 58px; height: 58px; flex: none; border-radius: 50%; background: var(--button); color: #fff; font-size: 26px; font-weight: 900; line-height: 1; box-shadow: 0 5px 0 var(--amber-deep); transition: transform .08s ease, box-shadow .08s ease; }
.send:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--amber-deep); }
.ask.big .send { width: 64px; height: 64px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 4px; align-items: center; justify-content: center; }
.try { font-size: 15px; font-weight: 800; color: var(--soft); margin-right: 2px; }
.chip { min-height: 46px; padding: 8px 16px; border-radius: 999px; background: var(--card); border: 2px solid var(--line); font-weight: 700; font-size: 16px; transition: transform .08s ease, border-color .15s ease, background .15s ease; }
.chip:hover { border-color: var(--amber); background: #fff; }
.chip:active { transform: scale(.96); }

.how { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 34px; }
.how div { background: var(--card); border-radius: 22px; padding: 16px 14px; text-align: center; font-weight: 800; font-size: 16px; line-height: 1.3; }
.how b { display: grid; place-items: center; width: 38px; height: 38px; margin: 0 auto 8px; border-radius: 50%; background: var(--button); color: #fff; font-weight: 900; }
@media (max-width: 560px) { .how { grid-template-columns: 1fr; } .how div { display: flex; align-items: center; gap: 12px; text-align: left; } .how b { margin: 0; flex: none; } }
.qlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.qcard { display: flex; align-items: center; gap: 14px; text-align: left; background: var(--card); border: 2px solid var(--line); border-radius: 22px; padding: 12px 16px 12px 12px; min-height: 84px; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.qcard:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--amber); }
.qface, .qpic { width: 60px; height: 60px; flex: none; object-fit: contain; }
.qpic { object-fit: cover; border-radius: 14px; }
.qtext { min-width: 0; flex: 1; }
.qcard .for, .cover .for { font-size: 13px; font-weight: 800; color: var(--amber-deep); letter-spacing: .04em; text-transform: uppercase; }
.qcard .name { font-weight: 900; font-size: 18px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pips { display: flex; align-items: center; gap: 5px; margin-top: 8px; }
.pips i { width: 22px; height: 6px; border-radius: 3px; background: var(--line); }
.pips i.on { background: var(--amber); }
.pips .star { margin-left: 4px; font-size: 16px; line-height: 1; }

.shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.cover { text-align: left; background: var(--card); border: 2px solid var(--line); border-radius: 24px; padding: 10px; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.cover:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--amber); }
.cover img { border-radius: 16px; aspect-ratio: 1; object-fit: cover; width: 100%; }
.cover .for { margin: 10px 4px 0; text-transform: none; letter-spacing: 0; }
.cover .name { font-weight: 900; font-size: 18px; line-height: 1.2; margin: 2px 4px 6px; }
.cover .done { float: right; font-size: 18px; }
.tile { aspect-ratio: 1; border-radius: 16px; display: grid; place-items: center; overflow: hidden; background: #EADFCB; }
.tile span { font-weight: 900; font-size: 64px; color: rgba(255, 255, 255, .92); }
.tile img { width: 100%; height: 100%; object-fit: cover; }
.k-make { background: #E4683A; } .k-art { background: #D8559B; } .k-invent { background: #2CA7B8; } .k-wonder { background: #C98A2E; }
.k-event { background: #8E5BD6; } .k-experiment { background: #4FA36B; } .k-game { background: #3E6FD8; } .k-homework { background: #D9473B; } .k-cheer { background: #8A7A62; }

/* ---------- Covers and the huddle ---------- */
.hero { border-radius: 28px; overflow: hidden; background: var(--night); margin: 4px 0 20px; box-shadow: var(--shadow); }
.hero img { width: 100%; aspect-ratio: 16 / 11; object-fit: cover; }
.crewlist { display: grid; gap: 12px; }
.mate { display: flex; gap: 14px; align-items: center; background: var(--card); border-radius: 18px; padding: 10px 14px; }
.mate b { font-weight: 900; }
.job { color: var(--soft); font-size: 16px; }
.plan { margin: 0; padding: 0; list-style: none; counter-reset: step; display: grid; gap: 10px; font-weight: 800; }
.plan li { counter-increment: step; display: flex; align-items: center; gap: 12px; }
.plan li::before { content: counter(step); width: 34px; height: 34px; flex: none; border-radius: 50%; background: #fff; border: 2px solid var(--line); display: grid; place-items: center; font-weight: 900; font-size: 16px; }

/* ---------- Chat ---------- */
.beat { display: flex; gap: 12px; margin: 14px 0; align-items: flex-start; animation: rise .32s cubic-bezier(.2, .8, .3, 1) both; }
.face { width: 54px; height: 54px; flex: none; object-fit: contain; }
.bubble { background: var(--card); border-radius: 8px 24px 24px 24px; padding: 12px 18px 14px; max-width: min(100%, 560px); border: 2px solid transparent; }
.bubble .who { font-size: 14px; font-weight: 900; margin-bottom: 2px; letter-spacing: .01em; }
.bubble.talking { border-color: var(--line); box-shadow: 0 6px 18px rgba(42, 24, 16, .08); background: #fff; }
.bubble.thinking { display: flex; gap: 6px; align-items: center; padding: 18px 20px; }
.bubble.thinking i { width: 9px; height: 9px; border-radius: 50%; background: var(--soft); opacity: .35; animation: think 1s ease-in-out infinite; }
.bubble.thinking i:nth-child(2) { animation-delay: .15s; } .bubble.thinking i:nth-child(3) { animation-delay: .3s; }
.beat.me { justify-content: flex-end; }
.beat.me .bubble { background: var(--mine); border-radius: 24px 24px 8px 24px; font-weight: 800; }
.scene { border-radius: 24px; overflow: hidden; margin: 16px 0 6px; box-shadow: var(--shadow); animation: rise .5s ease both; }
.scene img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.mine { border-radius: 14px; max-width: 240px; margin-bottom: 6px; }
.mine.big { max-width: min(100%, 420px); margin: 14px auto; }

.choices { display: flex; flex-direction: column; gap: 10px; margin: 14px 0 6px 66px; }
.choice {
  text-align: left; min-height: 54px; padding: 12px 18px; background: #fff; border: 2px solid var(--amber); border-radius: 18px;
  font-weight: 800; font-size: 18px; line-height: 1.25; box-shadow: 0 3px 0 rgba(229, 138, 46, .35);
  transition: background .12s ease, transform .08s ease, box-shadow .08s ease; animation: rise .3s cubic-bezier(.2, .8, .3, 1) both;
}
.choice:hover { background: #FFF4E6; }
.choice:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(229, 138, 46, .35); }
.choice.other { border-style: dashed; border-color: var(--line); color: var(--soft); font-weight: 700; box-shadow: none; background: transparent; }

/* Letters from a person */
.letter { background: var(--letter); border-radius: 20px; padding: 18px 22px 16px; margin: 18px 0 18px 8px; font: 400 20px/1.55 var(--serif); position: relative; transform: rotate(-.4deg); box-shadow: var(--shadow); animation: rise .5s ease both; }
.letter .from { font: 900 13px/1 var(--round); letter-spacing: .08em; text-transform: uppercase; color: var(--amber-deep); margin-bottom: 8px; }
.letter.big { font-size: 22px; padding: 26px 26px 22px; transform: rotate(-.6deg); margin-left: 0; }
.letter .sign { margin-top: 12px; font-style: italic; color: var(--soft); }

.chapter { display: flex; align-items: baseline; gap: 10px; margin: 18px 0 14px; }
.chapter .n, .stephead .n, .sheet .k, .chapterbox .n { font-size: 13px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; color: var(--amber-deep); white-space: nowrap; }
.chapter .t { font-weight: 900; font-size: 24px; line-height: 1.15; }
.dots { display: flex; gap: 6px; margin: 0 0 6px; }
.dots i { height: 6px; flex: 1; border-radius: 3px; background: var(--line); }
.dots i.on { background: var(--amber); }

/* ---------- Bottom bar ---------- */
.dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; padding: 28px 20px calc(14px + env(safe-area-inset-bottom)); background: linear-gradient(to top, var(--paper) 70%, rgba(246, 239, 227, 0)); display: flex; justify-content: center; pointer-events: none; }
.dock > * { pointer-events: auto; }
.dock .go { min-width: min(100%, 320px); }
.dock.tall { flex-direction: column; gap: 10px; align-items: stretch; }
.dock.tall > * { width: 100%; max-width: 720px; margin: 0 auto; }
.tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.done-step { background: var(--button); color: #fff; border-color: var(--amber-deep); }
.done-step:hover { border-color: var(--amber-deep); filter: brightness(1.06); }
.done-step.pulse { animation: pulse 1.4s ease-in-out infinite; }

/* ---------- Quest board ---------- */
.qtitle { font-size: clamp(22px, 5vw, 30px); margin-bottom: 12px; }
.steps { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 12px; margin: 0 -2px; scrollbar-width: none; scroll-snap-type: x proximity; }
.steps::-webkit-scrollbar { display: none; }
.step { flex: none; scroll-snap-align: start; display: flex; align-items: center; gap: 8px; max-width: 250px; min-height: 48px; padding: 6px 16px 6px 8px; border-radius: 999px; background: var(--card); border: 2px solid var(--line); font-weight: 800; font-size: 15px; text-align: left; line-height: 1.2; }
.step:disabled { opacity: .55; cursor: default; }
.step.is-now { border-color: var(--amber); background: #fff; box-shadow: 0 0 0 4px rgba(229, 138, 46, .16); }
.step.is-done { color: var(--soft); }
.mini { width: 30px; height: 30px; object-fit: contain; flex: none; }
.stephead { display: flex; gap: 12px; align-items: center; margin: 8px 0 4px; }
.stephead .t { font-weight: 900; font-size: 23px; line-height: 1.15; }
.log { padding-bottom: 170px; }
.log > * { scroll-margin: 96px 0 200px; }

@media (min-width: 980px) {
  .wrap.board { max-width: 1080px; display: grid; grid-template-columns: 280px minmax(0, 1fr); column-gap: 36px; align-items: start; }
  .board > .bar, .board > .qtitle { grid-column: 1 / -1; }
  .board > .steps { grid-column: 1; grid-row: 3 / span 3; flex-direction: column; overflow: visible; position: sticky; top: 16px; padding: 0; margin: 0; }
  .board > .steps .step { max-width: none; width: 100%; border-radius: 20px; min-height: 60px; padding: 10px 14px; font-size: 16px; }
  .board > .stephead, .board > .log { grid-column: 2; }
  .board > .dock { grid-column: 2; position: sticky; bottom: 0; padding: 26px 0 16px; margin-top: -150px; }
  .board .choices.grid { display: grid; grid-template-columns: 1fr 1fr; }
}

/* ---------- Finish ---------- */
.mission { background: var(--night); color: #fff; border-radius: 28px; padding: 28px 24px; margin: 26px 0; text-align: center; animation: rise .6s ease both; box-shadow: var(--shadow); }
.mission .k { font-size: 13px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; color: var(--glow); }
.mission .m { font-weight: 900; font-size: clamp(24px, 5.5vw, 32px); line-height: 1.2; margin: 10px 0 12px; text-wrap: balance; }
.mission p { color: #C9D6D2; margin: 0; }
.heart { font-size: 46px; text-align: center; margin: 22px 0 6px; animation: beat 1.6s ease-in-out infinite; }
.toast { position: fixed; bottom: calc(22px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); z-index: 30; display: flex; gap: 12px; align-items: center; background: #fff; border: 2px solid var(--line); border-radius: 24px; padding: 10px 20px 10px 10px; box-shadow: 0 14px 34px rgba(42, 24, 16, .2); font-size: 15px; line-height: 1.3; width: max-content; max-width: calc(100vw - 32px); animation: drop .45s cubic-bezier(.2, 1.3, .4, 1) both; }
.toast b { font-size: 17px; font-weight: 900; }
.medal { width: 46px; height: 46px; flex: none; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 900; font-size: 21px; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .15); }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 20; overflow: hidden; }
.confetti i { position: absolute; top: -20px; width: 10px; height: 16px; border-radius: 3px; animation: fall 3s ease-in forwards; }

/* ---------- My Sky ---------- */
.skycanvas { width: 100%; height: clamp(240px, 56vw, 420px); border-radius: 28px; display: block; cursor: pointer; box-shadow: var(--shadow); }
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.badge { background: var(--card); border: 2px solid var(--line); border-radius: 20px; padding: 16px; display: grid; gap: 6px; justify-items: start; }
.badge b { font-weight: 900; line-height: 1.2; }
.badge small { color: var(--soft); font-size: 14px; line-height: 1.35; }
.made { display: grid; gap: 8px; }
.row { display: flex; align-items: center; gap: 12px; text-align: left; background: var(--card); border: 2px solid var(--line); border-radius: 18px; padding: 12px 18px; min-height: 56px; transition: border-color .15s ease; }
.row:hover { border-color: var(--amber); }
.row b { font-weight: 900; }
.row small { color: var(--soft); margin-left: auto; font-size: 14px; white-space: nowrap; }
.dot { width: 14px; height: 14px; border-radius: 50%; flex: none; }
.over { position: fixed; inset: 0; z-index: 40; background: rgba(14, 27, 31, .6); display: grid; place-items: center; padding: 16px; overflow: auto; animation: fade .2s ease both; }
.over.night { background: var(--night); color: #fff; }
.sheet { background: var(--paper); border-radius: 28px; padding: 24px; width: min(100%, 520px); max-height: calc(100dvh - 32px); overflow: auto; animation: rise .3s cubic-bezier(.2, .8, .3, 1) both; }
.sheet.wide { width: min(100%, 760px); }
.sheet h2 { margin: 6px 0 12px; }
.sheet .tools { margin-top: 16px; }
.gold { color: #9A6B00; font-weight: 900; }
.show { text-align: center; display: grid; gap: 16px; justify-items: center; }
.show h2 { margin: 0; }
.show .pill { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .35); }
.hand { position: relative; width: 160px; height: 160px; border-radius: 50%; font-size: 80px; border: 3px dashed rgba(255, 255, 255, .5); touch-action: none; user-select: none; -webkit-user-select: none; animation: breathe 2.4s ease-in-out infinite; }
.hand.gold { border-color: #E5B13A; border-style: solid; background: rgba(229, 177, 58, .25); animation: none; }
.ring { position: absolute; inset: -3px; border-radius: 50%; background: rgba(229, 177, 58, .35); transform: scale(0); transition: transform .05s linear; pointer-events: none; }

/* ---------- Drawing pad ---------- */
.pad { width: 100%; aspect-ratio: 4 / 3; border-radius: 18px; border: 2px solid var(--line); background: #FFFDF8; touch-action: none; margin: 8px 0 12px; cursor: crosshair; }
.swatch { width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--line); transition: transform .1s ease; }
.swatch.on { box-shadow: 0 0 0 3px var(--paper), 0 0 0 6px var(--amber); transform: scale(1.05); }

/* ---------- Quest Maker ---------- */
.field { width: 100%; margin: 6px 0; font-size: 17px; min-height: 50px; padding: 10px 16px; border-radius: 16px; }
textarea.field { resize: vertical; line-height: 1.4; }
select.field { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--soft) 50%), linear-gradient(135deg, var(--soft) 50%, transparent 50%); background-position: calc(100% - 20px) 22px, calc(100% - 14px) 22px; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 36px; }
.chapterbox { background: var(--card); border: 2px solid var(--line); border-radius: 24px; padding: 16px 18px; margin: 14px 0; }
.beatrow { display: grid; grid-template-columns: minmax(120px, 180px) 1fr 44px; gap: 8px; align-items: start; }
.qblock { border-left: 4px solid var(--amber); padding-left: 12px; margin: 10px 0; }
.choicerow { display: grid; grid-template-columns: 1fr 1.6fr; gap: 8px; margin-left: 24px; }
.x { width: 44px; height: 50px; margin-top: 6px; border-radius: 14px; color: var(--soft); font-weight: 900; }
.x:hover { background: #fff; color: #B3261E; }
.warn { color: #B3261E; font-weight: 800; min-height: 1.5em; margin-top: 10px; }

/* ---------- Motion ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes drop { from { opacity: 0; transform: translate(-50%, 18px) scale(.94); } to { opacity: 1; transform: translate(-50%, 0) scale(1); } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes beat { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.12); } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes think { 0%, 100% { opacity: .3; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-3px); } }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(212, 116, 26, .55); } 60% { box-shadow: 0 0 0 12px rgba(212, 116, 26, 0); } }
@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
@keyframes fall { to { transform: translateY(110vh) rotate(540deg); opacity: .9; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* ---------- Small screens ---------- */
@media (max-width: 430px) { .bar .lbl { display: none; } .bar .pill { min-width: 48px; padding: 8px 12px; font-size: 20px; } .brand { white-space: nowrap; } }
@media (max-width: 560px) {
  body { font-size: 18px; }
  .chips .chip:nth-child(n+6) { display: none; }
  .wrap { padding: 12px 16px 140px; }
  .face { width: 44px; height: 44px; }
  .choices { margin-left: 0; }
  .letter { font-size: 19px; margin-left: 0; }
  .chapter { flex-direction: column; gap: 2px; }
  .pill { padding: 8px 14px; font-size: 15px; }
  .beatrow { grid-template-columns: 1fr 44px; } .beatrow .who { grid-column: 1 / -1; }
  .choicerow { grid-template-columns: 1fr; margin-left: 0; }
  .row small { display: none; }
  .qlist { grid-template-columns: 1fr; }
}
