/* Maple Hollow: the look of the ages 5-7 picture-puzzle books. Big type (Andika, made for early readers), big tap
   targets, a leafy green bar on top that holds the six pieces of the book's big picture. */
:root {
  --ink: #2E2A26; --paper: #FFF9EE; --cream: #FFF1D6; --desk: #F3E6CF; --leaf: #3E8E55; --leaf-d: #2C6A3E; --leaf-l: #CBE8B6;
  --maple: #D9572B; --maple-d: #A83E1C; --sun: #F7CD46; --sky: #BFE6FA; --berry: #9B6BCB; --line: #EAD9BA; --muted: #6B6157;
  --good: #2E8B57; --bad: #C0582B;
  --f-body: "Andika", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --f-display: "Lilita One", "Poppins", "Segoe UI", Arial, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body { margin: 0; background: var(--desk); color: var(--ink); font-family: var(--f-body); font-size: 20px; line-height: 1.5; -webkit-tap-highlight-color: transparent; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 4px solid var(--sun); outline-offset: 2px; border-radius: 10px; }
h1, h2 { font-family: var(--f-display); font-weight: 400; line-height: 1.1; margin: 0; letter-spacing: .01em; text-wrap: balance; }
a { color: var(--leaf-d); }
.art { width: 100%; height: auto; display: block; }
.tiny { font-size: 16px; color: var(--muted); margin: 0; text-align: center; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.row.center, .center { justify-content: center; text-align: center; }

/* top bar */
.topbar { position: sticky; top: 0; z-index: 20; background: var(--leaf-d); color: #fff; padding: 8px max(16px, env(safe-area-inset-right, 0px)) 8px max(16px, env(safe-area-inset-left, 0px)); }
.topbar-in { max-width: 980px; margin: 0 auto; display: flex; align-items: center; gap: 12px; }
.brand { color: #fff; text-decoration: none; font-family: var(--f-display); font-size: 22px; white-space: nowrap; }
.slots { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.slots .lbl { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #DDF0D0; }
.slots6 { display: grid; grid-template-columns: repeat(3, 30px); grid-template-rows: repeat(2, 28px); gap: 2px; background: rgba(0,0,0,.18); padding: 3px; border-radius: 8px; }
.slot { border-radius: 4px; border: 2px dashed rgba(255,255,255,.4); overflow: hidden; display: block; }
.slot.full { border: 0; } .slot svg { width: 100%; height: 100%; display: block; }
.slot.pop { animation: pop .5s ease; }
.tools { display: flex; gap: 6px; }
.iconbtn { width: 46px; height: 46px; border-radius: 14px; border: 0; background: rgba(255,255,255,.16); color: #fff; display: grid; place-items: center; }
.iconbtn svg { width: 24px; height: 24px; } .iconbtn.off { opacity: .5; }
@media (max-width: 520px) { .slots .lbl { display: none; } .brand { font-size: 18px; } .slots6 { grid-template-columns: repeat(3, 24px); grid-template-rows: repeat(2, 22px); } .iconbtn { width: 42px; height: 42px; } }

/* pages */
.stage { padding: 18px max(16px, env(safe-area-inset-right, 0px)) 124px max(16px, env(safe-area-inset-left, 0px)); }
.screen { max-width: 880px; margin: 0 auto; background: var(--paper); border-radius: 26px; box-shadow: 0 2px 0 #E2CFAA, 0 14px 30px rgba(80,60,30,.14); overflow: hidden; animation: pageIn .4s ease both; }
@keyframes pageIn { from { opacity: .3; transform: translateX(16px); } to { opacity: 1; transform: none; } }
.band { background: var(--leaf); color: #fff; padding: 16px 24px 18px; }
.band.puzzle { background: var(--maple); }
.band .eyebrow { font-size: 14px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; opacity: .9; }
.band h1 { font-size: clamp(28px, 5vw, 40px); }
.body { padding: 20px 24px 28px; display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); }
.lead { margin: 0; font-size: 22px; }

/* story pages */
.story .pic { background: var(--sky); }
.story .pic .scene { width: 100%; }
.story .words { padding: 18px 26px 28px; display: grid; gap: 14px; max-width: 680px; margin: 0 auto; }
.story .words p { margin: 0; font-size: clamp(24px, 3.6vw, 30px); line-height: 1.45; font-weight: 700; }
.say { display: flex; gap: 12px; align-items: flex-start; }
.say .face { width: 62px; flex: none; background: #fff; border-radius: 50%; padding: 6px; box-shadow: 0 0 0 3px var(--line); }
.say .bubble { margin: 0; background: #fff; border-radius: 18px; padding: 10px 16px; box-shadow: 0 0 0 3px var(--line); position: relative; font-size: 22px; font-weight: 700; }
.say .bubble b { display: block; font-size: 14px; color: var(--maple); letter-spacing: .06em; text-transform: uppercase; }
.say.big .bubble { font-size: clamp(22px, 3.4vw, 27px); }
.story .say .bubble { font-size: clamp(22px, 3.2vw, 26px); }

/* cover */
.cover .coverpic .scene { width: 100%; }
.cover .cbody { padding: 18px 24px 28px; display: grid; gap: 14px; justify-items: center; text-align: center; }
.cover .eyebrow { font-size: 15px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--maple); }
.cover h1 { font-size: clamp(38px, 7vw, 58px); color: var(--leaf-d); }
.cover .sub { margin: 0; font-size: 22px; max-width: 34ch; }
.namefield { display: grid; gap: 4px; width: min(100%, 360px); text-align: left; }
.namefield label { font-size: 15px; font-weight: 700; color: var(--muted); }
.namefield input { border: 3px solid var(--line); border-radius: 14px; padding: 10px 14px; font-size: 22px; background: #fff; }

/* cast */
.cast { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.castcard { background: #fff; border: 3px solid var(--line); border-radius: 20px; padding: 12px; display: grid; justify-items: center; gap: 4px; text-align: center; }
.castcard .ph { width: 100px; } .castcard b { font-family: var(--f-display); font-weight: 400; font-size: 24px; color: var(--leaf-d); } .castcard span:last-child { font-size: 18px; line-height: 1.3; }
.castcard.hop .ph { animation: hop .5s ease; }
.how { background: var(--cream); border-radius: 18px; padding: 14px 18px; font-size: 20px; }
.how p { margin: 0 0 6px; } .how p:last-child { margin: 0; }

/* buttons */
.btn { border: 0; border-radius: 18px; padding: 12px 22px; min-height: 54px; font-weight: 700; font-size: 20px; background: var(--leaf); color: #fff; box-shadow: 0 4px 0 var(--leaf-d); display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--leaf-d); }
.btn.go { background: var(--maple); box-shadow: 0 4px 0 var(--maple-d); }
.btn.go.alt { background: var(--leaf); box-shadow: 0 4px 0 var(--leaf-d); }
.btn.big { font-size: 24px; min-height: 62px; padding: 12px 28px; }
.btn.ghost { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 3px var(--line); }
.btn.night { background: #3F3A52; box-shadow: 0 4px 0 #26223A; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn.help { background: #fff; color: var(--maple-d); box-shadow: inset 0 0 0 3px #F3B9A3; padding: 6px 18px 6px 8px; }
.btn.help svg { width: 42px; height: 42px; }
.btn.help.nudge { animation: nudge .9s ease 3; }
.helprow { display: flex; justify-content: center; }
.afterwin { display: none; justify-content: center; }
.solved .afterwin { display: flex; } .solved .helprow { display: none; }
.solved .afterwin .btn { animation: breathe 1.6s ease infinite; }

/* puzzle parts */
.ask .say .face { width: 70px; }
.widget { display: grid; gap: 14px; min-width: 0; }
.feedback { margin: 0; min-height: 1.5em; text-align: center; font-size: 23px; font-weight: 700; }
.feedback.good { color: var(--good); } .feedback.bad { color: var(--bad); } .feedback.hint { color: var(--maple-d); }
.feedback.good::before { content: "★ "; color: var(--sun); }
.field { width: 100%; height: auto; display: block; background: #FFF4DE; border-radius: 20px; border: 3px solid var(--line); touch-action: manipulation; }
.field .thing { cursor: pointer; outline: none; }
.field .thing .hit { fill: transparent; }
.field .thing:focus-visible .hit { stroke: var(--sun); stroke-width: 4; }
.field .thing.on .hit { fill: rgba(93,179,90,.16); stroke: var(--good); stroke-width: 3; }
.field .thing.gone { opacity: 0; pointer-events: none; transition: opacity .25s; }
.field .mark circle.num { fill: var(--maple); } .field .mark circle.tick { fill: var(--good); }
.field .mark text { fill: #fff; font: 700 18px var(--f-body); }
.counter { margin: 0; text-align: center; font-size: 22px; }
.cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); }
.cards.n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 440px; margin: 0 auto; width: 100%; }
.cards.n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cards.n4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 520px) { .cards.n4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.card { background: #fff; border: 4px solid var(--line); border-radius: 22px; padding: 10px; display: grid; justify-items: center; align-content: center; gap: 4px; min-height: 110px; transition: transform .15s; }
.card .ci { width: min(100%, 110px); }
.card .ct { font-family: var(--f-display); font-size: 44px; line-height: 1; color: #2F3C7E; }
.card.txt .ct { font-size: 46px; }
.card .cw { font-size: 20px; font-weight: 700; }
.card .cs { width: 100%; border-radius: 14px; overflow: hidden; display: block; }
.card.right { border-color: var(--good); background: #E6F5E4; }
.card.wrong { border-color: #F3B9A3; }
.prow { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; background: #FFF4DE; border-radius: 20px; padding: 12px; border: 3px solid var(--line); }
.pcell { width: clamp(52px, 13vw, 92px); }
.pcell.q { animation: breathe 1.8s ease infinite; }
.bigone { width: min(60%, 240px); margin: 0 auto; background: #FFF4DE; border-radius: 24px; padding: 14px; border: 3px solid var(--line); }
.scenebox { border-radius: 20px; overflow: hidden; border: 3px solid var(--line); }
.sum { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; background: #FFF4DE; border-radius: 20px; padding: 12px; border: 3px solid var(--line); }
.sum .grp { display: flex; gap: 4px; background: #E9F2FA; border-radius: 14px; padding: 6px; }
.sum .grp span { width: clamp(40px, 10vw, 64px); display: block; } .sum .grp.q { width: clamp(52px, 12vw, 72px); }
.sum .plus { font-family: var(--f-display); font-size: 42px; color: var(--maple); font-weight: 400; }
/* pick */
.pickwrap { display: grid; gap: 12px; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: center; }
@media (max-width: 560px) { .pickwrap { grid-template-columns: 1fr; } .into { max-width: 220px; margin: 0 auto; } }
.into { display: grid; justify-items: center; gap: 4px; }
.intoart { position: relative; width: 100%; max-width: 200px; }
.inside { position: absolute; left: 14%; right: 14%; top: 28%; display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; pointer-events: none; }
.inside span { width: 26%; animation: dropIn .35s ease both; }
.incount { margin: 0; font-size: 22px; }
/* sort */
.sortnow { display: grid; justify-items: center; gap: 4px; }
.current { width: 140px; background: #fff; border-radius: 26px; padding: 12px; box-shadow: 0 0 0 4px var(--sun); animation: dropIn .35s ease both; }
.bins { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.bins.n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.bin { background: #fff; border: 4px solid var(--line); border-radius: 22px; padding: 10px; display: grid; justify-items: center; gap: 4px; min-height: 150px; align-content: start; }
.bin .binart { width: 90px; } .bin .bl { font-weight: 700; font-size: 20px; }
.bin .got { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; } .bin .got span { width: 34px; animation: dropIn .35s ease both; }
/* order */
.olist { display: flex; gap: 10px; justify-content: center; align-items: flex-end; flex-wrap: wrap; background: #FFF4DE; border-radius: 20px; padding: 14px; border: 3px solid var(--line); min-height: 150px; }
.oitem { border: 4px solid transparent; background: #E9F2FA; border-radius: 18px; padding: 4px; width: calc(60px + 70px * var(--s, 1)); }
.oitem.used { visibility: hidden; }
.oline { display: flex; gap: 8px; justify-content: center; align-items: flex-end; flex-wrap: wrap; min-height: 90px; border-bottom: 5px solid #C9A57A; padding-bottom: 4px; }
.oline.stack { flex-direction: column-reverse; align-items: center; flex-wrap: nowrap; gap: 0; width: 220px; margin: 0 auto; }
.oline.stack .oput b { display: none; }
.oline.stack .oput { margin-top: -4px; }
.oput { width: calc(40px + 50px * var(--s, 1)); display: grid; justify-items: center; animation: dropIn .35s ease both; }
.oput b { font-family: var(--f-display); font-weight: 400; color: var(--maple); font-size: 22px; }
@media (max-width: 520px) { .oitem { width: calc(44px + 46px * var(--s, 1)); } .oput { width: calc(30px + 34px * var(--s, 1)); } }
/* maze */
.maze { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: 4px; background: var(--bgc); padding: 8px; border-radius: 20px; border: 3px solid var(--line); max-width: 520px; margin: 0 auto; width: 100%; }
.mc { aspect-ratio: 1; border: 0; border-radius: 12px; background: rgba(255,255,255,.72); padding: 2px; display: grid; place-items: center; }
.mc.wall { background: transparent; cursor: default; }
.mc.trail { background: #FFE9A8; } .mc.near { box-shadow: inset 0 0 0 3px rgba(217,87,43,.45); }
.mc .who { width: 100%; animation: hop .35s ease; } .mc svg { width: 100%; }
.arrows { display: grid; grid-template-columns: repeat(4, 64px); gap: 8px; justify-content: center; }
.arrows button { height: 56px; border: 0; border-radius: 16px; background: var(--leaf); color: #fff; font-size: 24px; box-shadow: 0 4px 0 var(--leaf-d); }
/* dots */
.dots .drawn { fill: none; stroke: #2F3C7E; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.dots .shape { fill: none; opacity: 0; transition: opacity .6s; } .dots.doneall .shape { opacity: .85; }
.dots .dot { cursor: pointer; outline: none; } .dots .dot .hit { fill: transparent; }
.dots .dot .dd { fill: #fff; stroke: #2F3C7E; stroke-width: 3; } .dots .dot.on .dd { fill: var(--sun); }
.dots .dot text { fill: #fff; font: 700 20px var(--f-body); paint-order: stroke; stroke: #2F3C7E; stroke-width: 4px; }
.dots .dot:focus-visible .hit { stroke: var(--sun); stroke-width: 4; }
.reveal { font-size: 22px; color: var(--leaf-d); font-weight: 700; }
/* pairs */
.pairs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; max-width: 560px; margin: 0 auto; width: 100%; }
.pairs.n6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pr { background: #fff; border: 4px solid var(--line); border-radius: 20px; padding: 8px; aspect-ratio: 1; }
.pr.sel { border-color: var(--sun); box-shadow: 0 0 0 4px var(--sun); transform: translateY(-3px); }
.pr.done { border-color: var(--good); background: #E6F5E4; opacity: .7; }

/* the big picture */
.bigpic { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; width: min(100%, 560px); margin: 0 auto; aspect-ratio: 400 / 250; background: #E9DCC2; border-radius: 18px; padding: 4px; }
.bigpic .pc { border-radius: 10px; overflow: hidden; background: #F6EBD6; display: grid; place-items: center; border: 3px dashed #D8C39C; }
.bigpic .pc span { font-family: var(--f-display); font-size: 30px; color: #CDB68C; }
.bigpic .pc.on { border: 0; animation: pieceIn .6s ease both; animation-delay: var(--d); }
.bigpic .pc svg { width: 100%; height: 100%; display: block; }
.starcard { display: flex; gap: 14px; align-items: center; background: #fff; border: 4px solid var(--sun); border-radius: 22px; padding: 14px 18px; text-align: left; max-width: 520px; margin: 0 auto; }
.starcard .stamp { width: 84px; flex: none; animation: spin 1.2s ease; }
.starcard .eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--maple); }
.starcard b { display: block; font-family: var(--f-display); font-weight: 400; font-size: 30px; color: var(--leaf-d); }
.teaser { display: flex; gap: 14px; align-items: center; background: var(--cream); border-radius: 22px; padding: 16px; text-align: left; }
.teaser .tpic { width: 110px; flex: none; } .teaser h2 { font-size: 28px; color: var(--leaf-d); } .teaser p { margin: 4px 0 10px; font-size: 19px; }
.teaser .eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--maple); }
@media (max-width: 520px) { .teaser { flex-direction: column; text-align: center; } }

/* flying piece, confetti */
.fly { position: fixed; z-index: 60; width: 60px; height: 56px; border-radius: 8px; overflow: hidden; pointer-events: none; box-shadow: 0 4px 14px rgba(0,0,0,.3); }
.fly svg { width: 100%; height: 100%; display: block; }
.conf { position: fixed; top: 0; z-index: 59; width: 10px; height: 14px; border-radius: 3px; pointer-events: none; }

/* pager */
.pager { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: rgba(255,249,238,.97); border-top: 2px solid var(--line); padding: 10px max(16px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
.pager-in { max-width: 880px; margin: 0 auto; display: flex; align-items: center; gap: 12px; }
.pager .where { flex: 1; min-width: 0; text-align: center; font-size: 15px; color: var(--muted); font-weight: 700; }
.dots { display: flex; gap: 5px; justify-content: center; margin-top: 4px; flex-wrap: wrap; }
.dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--line); display: block; }
.dots i.pz { border-radius: 2px; } .dots i.done { background: var(--leaf-l); } .dots i.now { background: var(--maple); transform: scale(1.3); }
.pager .btn { min-width: 120px; }
@media (max-width: 520px) { .pager .btn { min-width: 0; padding: 10px 14px; font-size: 18px; } .dots { display: none; } }

/* grown-ups sheet */
.sheet { position: fixed; inset: 0; z-index: 50; background: rgba(40,34,26,.55); display: grid; place-items: center; padding: 16px; }
.sheet-card { background: #fff; border-radius: 22px; max-width: 640px; width: 100%; max-height: 92vh; overflow: auto; padding: 22px; display: grid; gap: 14px; font-size: 17px; }
.sheet-card h2 { font-size: 28px; color: var(--leaf-d); } .sheet-card p { margin: 0; }
.skills { margin: 0; padding-left: 22px; } .skills li { margin: 2px 0; }
.toggle { display: flex; gap: 12px; align-items: center; font-weight: 700; } .toggle input { width: 24px; height: 24px; accent-color: var(--leaf); }
.jump { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.jump button { text-align: left; border: 0; border-radius: 10px; background: var(--cream); padding: 8px 12px; font-size: 15px; }
.answers { background: var(--cream); border-radius: 14px; padding: 12px 14px; font-size: 16px; } .answers ol { margin: 0; padding-left: 22px; }
.holdbtn { position: relative; overflow: hidden; } .holdbtn .fillbar { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: rgba(255,255,255,.35); }

/* motion */
.shake { animation: shake .45s ease; }
.glow { animation: glow 1s ease 3; }
g.glow { animation: glowSvg 1s ease 3; }
@keyframes shake { 0%, 100% { transform: none; } 20% { transform: translateX(-7px); } 40% { transform: translateX(7px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(4px); } }
g.shake, .field .shake { animation: shakeSvg .45s ease; transform-box: fill-box; }
@keyframes shakeSvg { 0%, 100% { transform: none; } 25% { transform: translateX(-6px); } 50% { transform: translateX(6px); } 75% { transform: translateX(-4px); } }
@keyframes glow { 0%, 100% { box-shadow: 0 0 0 0 rgba(247,205,70,0); } 50% { box-shadow: 0 0 0 8px rgba(247,205,70,.9); transform: scale(1.06); } }
@keyframes glowSvg { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes pop { 0% { transform: scale(1); } 50% { transform: scale(1.35); } 100% { transform: scale(1); } }
@keyframes hop { 0%, 100% { transform: none; } 40% { transform: translateY(-14px); } }
@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
@keyframes dropIn { from { opacity: 0; transform: translateY(-16px) scale(.7); } to { opacity: 1; transform: none; } }
@keyframes pieceIn { from { opacity: 0; transform: scale(.6) rotate(-6deg); } to { opacity: 1; transform: none; } }
@keyframes spin { from { transform: rotate(-200deg) scale(.4); } to { transform: none; } }
@keyframes nudge { 0%, 100% { transform: none; } 50% { transform: scale(1.08); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

@media print {
  body.printing { background: #fff; }
  body.printing .topbar, body.printing .pager, body.printing .band, body.printing .teaser, body.printing .row, body.printing .lead, body.printing .bigpic { display: none !important; }
  body.printing .stage { padding: 0; } body.printing .screen { box-shadow: none; }
  body.printing .starcard { transform: scale(1.4); margin-top: 120px; }
}

/* wide screens: picture beside the words, so both fit without scrolling */
@media (min-width: 760px) {
  .story { display: grid; grid-template-columns: 1.35fr 1fr; align-items: center; }
  .story .pic { height: 100%; display: grid; align-items: center; background: transparent; padding-left: 0; }
  .story .words { padding: 22px 26px; }
  .cover { display: grid; grid-template-columns: 1.25fr 1fr; align-items: center; }
  .cover .coverpic { height: 100%; background: var(--sky); display: grid; align-items: end; }
}
/* keep each puzzle on one screen where possible */
.field, .prow, .sum, .scenebox, .olist, .pickwrap, .bins, .cards { width: 100%; max-width: min(640px, 82vh); margin-left: auto; margin-right: auto; }
.maze { max-width: min(520px, 62vh); }
.pairs { max-width: min(560px, 70vh); }
.card { min-height: 0; }
.card .ci { width: min(100%, 96px); }

/* "#poster": the shelf cover (600 x 900) */
body.poster { width: 600px; height: 900px; overflow: hidden; background: var(--leaf-d); display: grid; grid-template-rows: 420px 480px; }
.poster-top { padding: 54px 40px 0; color: #fff; text-align: center; display: grid; align-content: start; gap: 16px; background: radial-gradient(circle at 50% 0, #4FA35A, var(--leaf-d) 70%); }
.poster-top .eyebrow { font-size: 26px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--sun); }
.poster-top h1 { font-size: 74px; line-height: 1; }
.poster-top .age { justify-self: center; background: var(--maple); border-radius: 999px; padding: 6px 22px; font-size: 26px; font-weight: 700; }
.poster-pic { border-top: 8px solid var(--sun); overflow: hidden; }
.poster-pic .scene { width: 100%; height: 100%; }
