/* Family Table Quest: built for one tablet in landscape at the dinner table.
   Big buttons, big text. Everything scales with the screen's short side. */
:root {
  --bg1: #1b1533; --bg2: #46214f;
  --paper: #fff6e3; --paper2: #ffeccb; --ink: #2b2118; --ink2: #6a5744; --line: rgba(80, 55, 30, .22);
  --fire: #ff8a3d; --gold: #ffc93c; --gold-d: #b8860b;
  --good: #2e9e5b; --bad: #d6453d; --ok: #3a7bd5;
  --font: "Fredoka", "Trebuchet MS", "Segoe UI Rounded", system-ui, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { font-size: clamp(15px, 2.35vmin, 26px); }
body {
  margin: 0; min-height: 100dvh; font: 500 1.3rem/1.45 var(--font); color: var(--ink);
  background: radial-gradient(ellipse at 50% 120%, #ff9a4d33 0, transparent 55%), linear-gradient(180deg, var(--bg1), var(--bg2));
  background-attachment: fixed; touch-action: manipulation; -webkit-user-select: none; user-select: none;
}
textarea, input { -webkit-user-select: text; user-select: text; }
[hidden] { display: none !important; }
#app { height: 100dvh; display: flex; flex-direction: column; }
h1, h2, h3, h4, p { margin: 0; }
h1 { font-size: 1.75rem; line-height: 1.15; font-weight: 700; }
h2 { font-size: 1.4rem; font-weight: 600; }
button { font: inherit; color: inherit; cursor: pointer; }
button:focus-visible, [role=button]:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 4px solid #6ab0ff; outline-offset: 3px; }

/* ---------- top bar ---------- */
.top { flex: none; display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: .6rem; padding: .35rem .8rem; background: #120d26; color: #fff; border-bottom: 3px solid #ff8a3d55; }
.logo { display: flex; align-items: center; gap: .5rem; background: none; border: 0; color: var(--gold); font-weight: 700; font-size: 1rem; line-height: 1.05; text-align: left; padding: .2rem .4rem; -webkit-touch-callout: none; }
.flame-logo { font-size: 1.7rem; }
.party { display: flex; gap: .35rem; justify-content: center; flex-wrap: nowrap; min-width: 0; }
.chip { display: flex; align-items: center; gap: .3rem; padding: .2rem .55rem .2rem .25rem; border-radius: 999px; background: #ffffff14; border: 3px solid transparent; font-size: .95rem; white-space: nowrap; }
.chip.turn { border-color: var(--c); background: #ffffff26; box-shadow: 0 0 14px var(--c); }
.chip.caged { opacity: .8; background: #ffffff0d; }
.chip .cn { font-weight: 600; }
.chip .gold { color: var(--gold); font-weight: 700; }
.avatar { display: inline-grid; place-items: center; width: 1.8rem; height: 1.8rem; border-radius: 50%; background: var(--c, #888); font-size: 1.1rem; flex: none; }
.avatar.lg { width: 3.2rem; height: 3.2rem; font-size: 1.9rem; }
.xp { min-width: 8.5rem; font-size: .85rem; }
.xp-top b { color: var(--gold); }
.xp-sub { color: #cdbfe6; font-size: .8rem; }
.bar { height: .7rem; border-radius: 999px; background: #ffffff26; overflow: hidden; margin: .15rem 0; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--fire), var(--gold)); border-radius: inherit; transition: width .6s ease-out; }
.bar.big { height: 1.4rem; background: #0000001a; border: 2px solid var(--line); }
.nav { display: flex; gap: .4rem; }
.navbtn { display: flex; flex-direction: column; align-items: center; min-width: 3.9rem; padding: .2rem .4rem; border: 2px solid #ffffff33; border-radius: .8rem; background: #ffffff12; color: #fff; font-size: .85rem; line-height: 1.15; }
.navbtn span:first-child { font-size: 1.3rem; }
.navbtn.on { background: var(--fire); border-color: var(--fire); color: #2b1400; }

/* ---------- stage and cards ---------- */
.stage { flex: 1; overflow-y: auto; padding: .7rem 1rem .9rem; display: flex; }
.screen {
  margin: auto; width: min(100%, 68rem); background: var(--paper); border-radius: 1.4rem; padding: 1rem 1.6rem 1.2rem;
  display: flex; flex-direction: column; align-items: center; gap: .65rem; text-align: center;
  box-shadow: 0 10px 40px #0007, inset 0 0 0 3px #fff8;
}
.lead { font-size: 1.25rem; max-width: 52rem; }
.note { font-size: 1.05rem; color: var(--ink2); max-width: 52rem; }
.muted { color: var(--ink2); font-size: .95rem; font-weight: 400; }
.kicker { text-transform: uppercase; letter-spacing: .15em; font-size: .9rem; color: var(--gold-d); font-weight: 700; }
.place { color: var(--ink2); }
.read { font-size: 1.45rem; line-height: 1.42; }
.story { text-align: left; display: flex; flex-direction: column; gap: .5rem; max-width: 56rem; font-size: 1.3rem; }
.actions { display: flex; gap: .8rem; justify-content: center; flex-wrap: wrap; margin-top: .3rem; }
.actions.small .btn { font-size: .95rem; min-height: 2.8rem; }
.stack { display: flex; flex-direction: column; gap: .7rem; width: min(100%, 40rem); }

.btn {
  min-height: 3.6rem; padding: .6rem 1.4rem; border-radius: 1rem; border: 3px solid var(--ink); background: #fff; color: var(--ink);
  font-weight: 600; font-size: 1.15rem; box-shadow: 0 4px 0 var(--ink); transition: transform .08s, box-shadow .08s;
}
.btn:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.btn.big { min-height: 4.1rem; font-size: 1.4rem; padding: .6rem 2rem; }
.btn.go { background: var(--fire); border-color: #7a3300; box-shadow: 0 4px 0 #7a3300; color: #2b1400; }
.btn.go:active:not(:disabled) { box-shadow: 0 1px 0 #7a3300; }
.btn.quiet { background: transparent; box-shadow: none; border-color: var(--line); color: var(--ink2); }
.btn.warn { border-color: var(--bad); color: var(--bad); box-shadow: 0 4px 0 var(--bad); }
.btn:disabled { opacity: .4; cursor: not-allowed; box-shadow: none; }
.btn small { display: block; font-weight: 400; font-size: .8rem; color: var(--ink2); }
.btn.pick { display: inline-flex; align-items: center; gap: .5rem; }
.btn.pick.on { background: var(--c); color: #fff; text-shadow: 0 1px 2px #0006; }
.rescue-btn { background: var(--c); color: #fff; border-color: #0006; box-shadow: 0 4px 0 #0006; text-shadow: 0 1px 2px #0006; }

/* ---------- banners ---------- */
.banner { display: flex; align-items: center; gap: 1rem; text-align: left; }
.banner .sub { color: var(--ink2); font-size: 1.05rem; }
.banner h1 { font-size: 1.55rem; }

/* ---------- campfire ---------- */
.rate-grid { display: flex; flex-direction: column; gap: .5rem; width: 100%; }
.rate-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .2rem 1rem; border-radius: 1rem; background: var(--paper2); border-left: 10px solid var(--c); }
.rate-who { display: flex; align-items: center; gap: .6rem; font-size: 1.5rem; font-weight: 700; min-width: 10rem; }
.flames { display: flex; gap: .3rem; }
.flame { width: 4.4rem; height: 3.5rem; border-radius: 1rem; border: 3px solid var(--line); background: #fff; font-size: 2rem; line-height: 1; filter: grayscale(1) opacity(.35); }
.flame.on { filter: none; background: #fff0d4; border-color: var(--fire); box-shadow: 0 0 12px #ff8a3d88; }
.dots { display: flex; gap: .6rem; }
.dots i { width: 1rem; height: 1rem; border-radius: 50%; background: var(--line); }
.dots i.done { background: var(--good); } .dots i.now { background: var(--fire); box-shadow: 0 0 8px var(--fire); }
.pick-row { display: flex; gap: .7rem; flex-wrap: wrap; justify-content: center; }
.prompts { display: flex; gap: .5rem; flex-wrap: wrap; justify-content: center; align-items: center; }
.chip-btn { padding: .4rem 1rem; border-radius: 999px; border: 2px dashed var(--gold-d); background: #fff9e6; font-size: 1.05rem; }
.words-input { width: 100%; font: 500 1.5rem/1.4 var(--font); padding: .8rem 1rem; border-radius: 1rem; border: 3px solid var(--ink2); background: #fff; color: var(--ink); resize: none; }
.anvil { font-size: 5rem; animation: bonk .7s infinite alternate ease-in; }
@keyframes bonk { from { transform: rotate(-20deg) translateY(-8px); } to { transform: rotate(10deg) translateY(6px); } }
.forged-item { width: min(100%, 40rem); }

/* ---------- items ---------- */
.items { display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: .8rem; width: 100%; }
.item { text-align: left; background: #fff; border: 3px solid var(--gold-d); border-radius: 1rem; padding: .7rem 1rem; display: flex; flex-direction: column; gap: .3rem; box-shadow: 0 3px 0 #b8860b66; }
.item.big { padding: 1rem 1.3rem; } .item.big h3 { font-size: 1.7rem; }
.item.spent { opacity: .55; filter: grayscale(.6); border-style: dashed; }
.item.selected { background: #e9f9ee; border-color: var(--good); box-shadow: 0 0 0 5px #2e9e5b55; }
.item-head { display: flex; align-items: center; gap: .5rem; } .item-head h3 { font-size: 1.25rem; line-height: 1.15; flex: 1; }
.gem { font-size: 1.5rem; }
.tag { font-size: .75rem; padding: .1rem .5rem; border-radius: 999px; background: var(--ink2); color: #fff; font-weight: 600; }
.desc { font-size: 1.05rem; } .power { font-size: .95rem; color: var(--ink2); }
.words { margin: .3rem 0 0; padding: .4rem .8rem; border-left: 6px solid var(--fire); background: #fff4e2; border-radius: .5rem; font-size: 1.1rem; font-style: italic; }
.words small { display: block; font-style: normal; font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--gold-d); font-weight: 700; }
.words footer .from { font-style: normal; font-size: .85rem; color: var(--ink2); }
.item-btn { text-align: left; cursor: pointer; border-radius: 1rem; }
.item-btn .item { height: 100%; }

/* ---------- trail board ---------- */
.trail { list-style: none; display: flex; gap: .35rem; margin: 0; padding: 0; justify-content: center; }
.stone { width: 3.1rem; height: 2.3rem; border-radius: 50%; background: #d9c9a8; display: grid; place-items: center; font-size: 1.35rem; border-bottom: 5px solid #b39f78; }
.stone.passed { background: var(--gold); border-bottom-color: var(--gold-d); }
.stone.here { background: #fff; border-color: var(--fire); box-shadow: 0 0 0 4px var(--fire); transform: translateY(-4px); }
.party-token { font-size: 1.6rem; }

/* ---------- scene and question ---------- */
.scene-card, .q-card { position: relative; width: 100%; background: #fff; border-radius: 1.2rem; padding: 1rem 4rem 1rem 1.6rem; border: 3px solid var(--line); text-align: left; }
.q-card { font-size: 1.6rem; font-weight: 600; line-height: 1.35; }
.q-card .read, .q-card p { font-size: inherit; }
.speak { position: absolute; top: .5rem; right: .6rem; width: 3rem; height: 3rem; border-radius: 50%; border: 2px solid var(--line); background: #fff8e6; font-size: 1.4rem; }
.fork-q { font-size: 1.5rem; font-weight: 700; }
.fork { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; width: 100%; }
.path-btn { display: flex; flex-direction: column; align-items: center; gap: .1rem; padding: .8rem 1rem; min-height: 7.2rem; border-radius: 1.3rem; border: 4px solid rgba(0, 0, 0, .35); background: var(--c); color: #fff; text-shadow: 0 2px 3px #0007; box-shadow: 0 6px 0 rgba(0, 0, 0, .35); }
.path-btn:active { transform: translateY(4px); box-shadow: 0 2px 0 rgba(0, 0, 0, .35); }
.path-btn .pi { font-size: 2.6rem; line-height: 1.1; } .path-btn .pl { font-size: 1.7rem; font-weight: 700; } .path-btn .ps { font-size: 1.05rem; background: #0004; border-radius: 999px; padding: .05rem .8rem; }
.guide { display: flex; align-items: center; gap: .6rem; font-size: 1.2rem; }
.g-icon { font-size: 2.4rem; } .g-name { font-weight: 600; }
.pchip { background: var(--c); color: #fff; border-radius: 999px; padding: .1rem .8rem; font-size: .95rem; text-shadow: 0 1px 2px #0006; }
.answers { display: grid; gap: .8rem; width: 100%; grid-template-columns: 1fr 1fr; }
.answers.n3 { grid-template-columns: 1fr; }
.ans { display: flex; align-items: center; gap: 1rem; text-align: left; min-height: 4.8rem; padding: .6rem 1.2rem; border-radius: 1.1rem; border: 4px solid var(--ink); background: #fff; font-size: 1.55rem; font-weight: 600; box-shadow: 0 5px 0 var(--ink); }
.ans:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--ink); }
.ans b { flex: none; display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 50%; background: var(--gold); border: 3px solid var(--ink); font-size: 1.3rem; }
.num-form { width: 100%; display: flex; flex-direction: column; gap: .6rem; align-items: center; }
.num-row { display: flex; gap: .8rem; align-items: stretch; }
.num-row input { width: 14rem; font: 700 2rem var(--font); text-align: center; border-radius: 1rem; border: 4px solid var(--ink); padding: .4rem; background: #fff; }
.loading { padding: 2rem 0; display: flex; flex-direction: column; align-items: center; gap: .7rem; }
.spin { font-size: 5rem; animation: wob 1.1s infinite ease-in-out alternate; }
@keyframes wob { from { transform: rotate(-12deg) scale(.95); } to { transform: rotate(12deg) scale(1.08); } }

/* ---------- results ---------- */
.result .burst, .result .villain { font-size: 4.5rem; line-height: 1; animation: pop .5s cubic-bezier(.2, 1.5, .4, 1) both; }
@keyframes pop { from { transform: scale(.2) rotate(-20deg); opacity: 0; } to { transform: none; opacity: 1; } }
.result.good { background: #effbf1; } .result.good h1 { color: var(--good); }
.result.bad { background: #fff3ee; } .result.bad h1 { color: #a8321d; }
.answer-line { font-size: 1.6rem; } .answer-line b { background: var(--gold); border-radius: .5rem; padding: .05rem .6rem; }
.say { background: #fff; border: 4px dashed var(--fire); border-radius: 1.2rem; padding: .6rem 1.4rem; }
.say span { display: block; font-size: .95rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink2); font-weight: 700; }
.say q { font-size: 1.7rem; font-weight: 700; quotes: "“" "”"; }
.explain { background: #fff; border-radius: .8rem; padding: .4rem 1rem; font-size: 1.1rem; color: var(--ink2); }
.level-note { font-size: 1.05rem; color: var(--ink2); } .level-note.up { color: var(--good); font-weight: 700; }

/* ---------- rescue ---------- */
.team { width: 100%; text-align: left; background: #fff9e6; border-radius: 1rem; padding: .5rem 1rem; border: 2px dashed var(--gold-d); }
.team summary { cursor: pointer; font-weight: 600; font-size: 1.1rem; }
.team-row h4 { display: flex; align-items: center; gap: .5rem; margin: .5rem 0 .3rem; font-size: 1.1rem; }
.read-words { display: flex; flex-direction: column; gap: .8rem; width: 100%; }
.big-quote { margin: 0; background: #fff; border: 4px solid var(--fire); border-radius: 1.3rem; padding: 1rem 1.5rem; }
.big-quote blockquote { margin: 0; font-size: 2.1rem; font-weight: 600; line-height: 1.3; }
.big-quote figcaption { margin-top: .4rem; color: var(--ink2); font-size: 1rem; }

/* ---------- camp ---------- */
.camp-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 1.2rem; width: 100%; text-align: left; }
.gold-row { display: grid; grid-template-columns: auto 6rem 1fr auto; gap: .6rem; align-items: center; margin: .2rem 0; }
.gold-row .gname { font-weight: 700; } .gold-row .gbar { height: 1.2rem; border-radius: 999px; background: #0000001a; overflow: hidden; }
.gold-row .gbar i { display: block; height: 100%; background: var(--c); border-radius: inherit; min-width: .2rem; }
.gold-row .lost { grid-column: 2 / -1; color: var(--bad); font-size: .95rem; }
.xp-line { margin: .2rem 0; font-size: 1.1rem; } .levelup { background: #fff3c4; border: 3px solid var(--gold-d); border-radius: 1rem; padding: .4rem 1rem; margin-top: .3rem; font-size: 1.1rem; }
.flames-line { margin-top: .5rem; font-size: 1rem; letter-spacing: .05em; }
.cliff { background: #261a44; color: #fff6e3; border-radius: 1.2rem; padding: .6rem 1.4rem; width: 100%; text-align: left; font-size: 1.15rem; display: flex; flex-direction: column; gap: .4rem; }
.cliff .next-time { color: var(--gold); font-weight: 700; }

/* ---------- satchel, book, map ---------- */
.tabs { display: flex; gap: .5rem; flex-wrap: wrap; justify-content: center; }
.tab { display: inline-flex; align-items: center; gap: .5rem; padding: .35rem 1rem .35rem .4rem; border-radius: 999px; border: 3px solid var(--line); background: #fff; font-size: 1.15rem; font-weight: 600; }
.tab.on { border-color: var(--c); background: var(--c); color: #fff; text-shadow: 0 1px 2px #0006; }
.count { background: #0003; border-radius: 999px; padding: 0 .55rem; font-size: .9rem; }
.entries { display: flex; flex-direction: column; gap: .7rem; width: 100%; text-align: left; }
.entry { background: #fff; border-radius: 1rem; padding: .6rem 1.2rem; border-left: 10px solid var(--fire); }
.e-head { display: flex; align-items: center; gap: .6rem; font-weight: 700; } .e-head time { margin-left: auto; font-weight: 500; font-size: .95rem; color: var(--ink2); }
.entry blockquote { margin: .3rem 0; font-size: 1.35rem; font-style: italic; } .e-item { font-size: .95rem; color: var(--ink2); }
.world { position: relative; width: 100%; height: 16.5rem; border-radius: 1.2rem; background: linear-gradient(180deg, #cfe9c1, #a5d28f 60%, #86c07a); border: 3px solid var(--line); overflow: hidden; }
.world svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.world path { fill: none; stroke: #8b6b3a; stroke-width: 7; stroke-dasharray: 2 14; stroke-linecap: round; }
.node { position: absolute; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; width: 9rem; text-align: center; line-height: 1.1; }
.node .dot { width: 3.2rem; height: 3.2rem; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 4px solid var(--ink2); font-size: 1.6rem; }
.node b { font-size: .95rem; margin-top: .2rem; text-shadow: 0 0 6px #fff, 0 0 6px #fff; } .node small { font-size: .8rem; color: #3a2c1c; text-shadow: 0 0 6px #fff; }
.node.ready .dot, .node.current .dot { border-color: var(--fire); background: #fff0d4; box-shadow: 0 0 0 5px #ff8a3d66; animation: pulse 1.4s infinite alternate; }
.node.done .dot { background: #dff6e5; border-color: var(--good); } .node.locked { opacity: .65; }
@keyframes pulse { to { box-shadow: 0 0 0 11px #ff8a3d22; } }

/* ---------- hazards, tools, dice ---------- */
.cue { font-size: 1rem; font-weight: 500; background: #fff3; border-radius: .7rem; padding: .1rem .7rem; margin-top: .25rem; text-shadow: none; color: #fff; line-height: 1.25; }
.trait { font-size: .75rem; font-weight: 600; background: #eef3ff; color: #2b3f78; border: 2px solid #b9c8f2; border-radius: 999px; padding: 0 .5rem; white-space: nowrap; }
.hz-icon { font-size: 4.2rem; line-height: 1; animation: wob 1.1s infinite ease-in-out alternate; }
.hazard .items.tools { grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
.tool { position: relative; display: flex; flex-direction: column; }
.tool .item { flex: 1; height: auto; }
.fit { display: block; margin-top: .25rem; font-size: .9rem; font-weight: 600; color: var(--ink2); text-align: center; }
.fit.good { color: var(--good); }
.item-btn.sel .item { background: #e9f9ee; border-color: var(--good); box-shadow: 0 0 0 5px #2e9e5b55; }
.die { font-size: 7rem; line-height: 1; animation: diceroll 1s ease-out both; }
@keyframes diceroll { 0% { transform: rotate(-540deg) scale(.3); opacity: 0; } 70% { transform: rotate(20deg) scale(1.15); opacity: 1; } 100% { transform: none; } }
.roll-line { font-size: 1.4rem; } .roll-line b { background: var(--gold); border-radius: .5rem; padding: 0 .6rem; }
.reveal-after { display: flex; flex-direction: column; align-items: center; gap: .6rem; animation: fadein .5s 1s both; }
@keyframes fadein { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.effects { display: flex; gap: .5rem; flex-wrap: wrap; justify-content: center; }
.effects span { background: #fff; border: 3px solid var(--line); border-radius: 999px; padding: .15rem .9rem; font-weight: 600; }
.hazard-result.good .effects span { border-color: var(--good); }
.hazard-result.bad .effects span { border-color: var(--bad); }

/* ---------- day talk, gifts and reveal ---------- */
.daytalk-list { display: flex; flex-direction: column; gap: .5rem; width: 100%; text-align: left; }
.daytalk-row { display: flex; align-items: center; gap: .9rem; padding: .35rem 1rem; border-radius: 1rem; background: var(--paper2); border-left: 10px solid var(--c); font-size: 1.3rem; }
.daytalk-q { font-size: 1.2rem; font-weight: 600; color: #7a3300; line-height: 1.25; }
.gift-card.wrapping { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 9rem; border: 4px dashed var(--line); background: #fff8; border-radius: 1.1rem; color: var(--ink2); }
.gift { font-size: 5rem; line-height: 1; animation: wob 1.2s infinite ease-in-out alternate; }
.big-quote-lite { margin: 0; font-size: 1.7rem; font-style: italic; background: #fff; border-left: 8px solid var(--fire); border-radius: 1rem; padding: .6rem 1.4rem; max-width: 44rem; }
.gifts { display: grid; grid-template-columns: repeat(4, 1fr); gap: .7rem; width: 100%; }
.reveal .actions { position: sticky; bottom: -.4rem; background: linear-gradient(0deg, var(--paper) 70%, transparent); padding-top: .6rem; width: 100%; }
.gift-card .item { padding: .5rem .7rem; } .gift-card .item h3 { font-size: 1.05rem; } .gift-card .words { font-size: .95rem; }
@media (max-width: 800px) { .gifts { grid-template-columns: repeat(2, 1fr); } }
.gift-card { text-align: left; border-radius: 1.1rem; }
.gift-card.wrapped { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .2rem; min-height: 9rem; border: 4px dashed var(--c); background: #fff; cursor: pointer; box-shadow: 0 5px 0 #0002; }
.gift-card.wrapped:active { transform: translateY(3px); }
.gift-big { font-size: 3.4rem; animation: wob 1.2s infinite ease-in-out alternate; }
.gift-card .for { display: flex; align-items: center; gap: .4rem; font-weight: 700; margin-bottom: .2rem; }
.gift-card.open { animation: pop .5s cubic-bezier(.2, 1.4, .4, 1) both; }
.gift-card small { color: var(--ink2); }

.book-finale { width: 100%; text-align: left; background: #fff; border: 4px solid var(--gold); border-radius: 1.2rem; padding: .6rem 1.2rem; }
.book-finale h2 { text-align: center; }
.book-picks { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; margin-top: .4rem; }
.book-picks blockquote { margin: 0; background: #fff4e2; border-left: 6px solid var(--fire); border-radius: .6rem; padding: .3rem .7rem; font-style: italic; font-size: 1.05rem; }
.book-picks small { display: block; font-style: normal; color: var(--ink2); font-size: .8rem; }
@media (max-width: 800px) { .book-picks { grid-template-columns: 1fr; } }
.trophy { display: flex; align-items: center; gap: 1rem; background: #fff3c4; border: 4px solid var(--gold-d); border-radius: 1.2rem; padding: .5rem 1.2rem; text-align: left; flex-wrap: wrap; justify-content: center; }
.trophy-icon { font-size: 3rem; animation: wob 1.2s infinite ease-in-out alternate; }
.trophy p { max-width: 30rem; }
.btn.mini { min-height: 2.6rem; padding: .2rem .9rem; font-size: 1rem; box-shadow: none; }

/* ---------- parent menu and toast ---------- */
dialog#parent { border: 0; border-radius: 1.4rem; padding: 1.2rem 1.6rem; width: min(92vw, 40rem); background: var(--paper); color: var(--ink); font-size: 1.1rem; }
.voice-row { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; margin: .4rem 0 0; }
.voice-row label { font-weight: 600; }
.voice-row select { flex: 1; min-width: 10rem; font: inherit; font-size: 1rem; padding: .5rem; border-radius: .7rem; border: 2px solid var(--ink2); background: #fff; }
dialog#parent::backdrop { background: #000a; }
.pmenu { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin: .8rem 0; }
.pmenu .btn { font-size: 1.05rem; text-align: left; }
#toast { position: fixed; left: 50%; bottom: 1.2rem; transform: translate(-50%, 200%); background: #120d26; color: #fff; padding: .8rem 1.4rem; border-radius: 1rem; font-size: 1.1rem; max-width: 80vw; transition: transform .25s; z-index: 50; text-align: center; }
#toast.on { transform: translate(-50%, 0); }

@media (max-width: 1280px) {
  .logo span:last-child { display: none; }
  .xp { min-width: 7rem; } .xp-sub { display: none; }
  .navbtn { min-width: 3.4rem; } .navbtn span:last-child { font-size: .72rem; }
  .chip .cn { max-width: 5rem; overflow: hidden; text-overflow: ellipsis; }
}
@media (max-width: 900px) {
  .top { grid-template-columns: 1fr auto; } .xp { display: none; } .nav { grid-column: 2; grid-row: 1; }
  .camp-grid { grid-template-columns: 1fr; } .fork, .answers { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
