/* Draw It's own (EdGames docs/family/DRAWIT-DESIGN.md §4 "Draw It's own"): the play screen (the family HUD, the time
   bar, the paper, the tools, the guess), the pick cards, the reveal, the gallery, the sketchbook, and the sheets shared
   with Quiz Race (rooms, players, passing the device). The family look is css/game.css; motion is css/motion.css. */
:root{ --paper-w:#FFFDF7; --r0:#ef5a4f; --r1:#f39a1e; --r2:#13a89e; --r3:#8b5cf6; --r5:#1f9fd6 }

/* The start card (the family order, family review 1): the chip (always, 44 px), the logo, the tabs and their line, the
   strip, Change, the main button, Play with friends, the sketchbook, the together line, How to play · Calm motion */
.card.start .tiles{display:block; width:min(200px, 56%); height:auto; margin:6px auto 0}
.card.start .mebtn{position:static; align-self:flex-end; min-height:44px; margin:-10px -6px -6px 0; max-width:70%}
.start-head,.startmain{display:flex; flex-direction:column; gap:12px; min-width:0}
.tabwrap{display:flex; flex-direction:column; gap:8px}
.seg{display:flex; gap:4px; padding:4px; border-radius:16px; background:var(--given)}
.seg .chip{flex:1 1 0; min-width:0; min-height:44px; border:0; border-radius:12px; padding:8px 4px; background:transparent; font:600 17px/1 var(--font-display); color:var(--muted); box-shadow:none}
.seg .chip[aria-checked="true"]{background:var(--tile); color:var(--you); box-shadow:0 1px 3px rgba(24,38,63,.16)}
.gamehint{margin:0; min-height:2.7em; font-size:14px; line-height:1.35; font-weight:600; color:var(--muted); text-align:center; text-wrap:balance}
.start-head .pl-tgt{width:100%; box-sizing:border-box; min-height:52px}
.pl-strip.book{width:100%; box-sizing:border-box; color:var(--ink)}
.pl-strip .pl-n{font:600 15px/1 var(--font-display); color:var(--you)}
.links .dotsep{color:var(--muted); font-weight:800; align-self:center}
.linkbtn.small{min-height:44px; color:var(--muted)}
.linkbtn.small.calm[aria-checked="true"]{color:var(--ink); background:var(--you-soft); box-shadow:inset 0 0 0 2px var(--you)}
body.asking .start-head :is(.tabwrap,.pl-tgt){display:none}
/* a short phone upright (375 x 667): the start card fits without scrolling */
@media (max-height: 720px) and (max-aspect-ratio: 5/4){
  .card.start{gap:10px; padding:14px 18px 12px}
  .card.start .tiles{width:min(150px, 44%)}
  .card.start h1{font-size:30px}
  .start-head,.startmain{gap:9px}
  .gamehint{min-height:0; font-size:13px}
  .card.start .choice{min-height:46px}
  .card.start .btn{min-height:52px}
  .card.start .mebtn{margin:-6px -4px -4px 0}
  .gallery{max-height:34vh}
}

/* The family HUD (Word Cube's pills) */
.bar{display:flex; align-items:center; gap:6px; min-height:44px; flex:none}
.pill{flex:none; display:inline-flex; align-items:center; justify-content:center; min-height:36px; padding:0 12px; border:0; border-radius:999px; background:var(--panel); box-shadow:inset 0 0 0 1px var(--panel-line);
  font:600 16px/1 var(--font-display); font-variant-numeric:tabular-nums; color:var(--ink); white-space:nowrap}
.pill.pbtn{width:44px; min-height:44px; padding:0; font-size:18px; touch-action:manipulation}
.pill.pbtn[aria-checked="false"]{color:var(--muted); text-decoration:line-through}
.pill.pbtn:focus-visible{outline:3px solid var(--you); outline-offset:2px}
.hud-title{flex:1 1 auto; min-width:0; text-align:center; font:600 18px/1.2 var(--font-display); overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
/* the live round's clock: a thin bar that empties; never red, never pulsing, no number */
.timebar{flex:none; height:6px; border-radius:3px; background:var(--given); overflow:hidden}
.timebar i{display:block; height:100%; width:100%; background:var(--you); border-radius:3px; transform-origin:left center}

/* The play screen: the paper above (a phone upright) or beside (a phone on its side) the tools or the guess */
.play{flex:1 1 auto; min-height:0; display:flex; flex-direction:column; justify-content:center; gap:10px}
.side-a{flex:0 1 auto; min-height:0; display:flex; flex-direction:column; gap:6px; align-items:center}
.side-b{flex:none; display:flex; flex-direction:column; gap:8px; width:100%; max-width:560px; margin:0 auto}
.wordline{flex:none; display:flex; align-items:center; justify-content:center; gap:8px; min-height:32px; width:100%; font:600 20px/1.2 var(--font-display); text-align:center}
.wordline .cface{width:28px; height:28px}
.wordline .art{width:34px; height:34px; display:inline-block}
.wordline .art svg{display:block}
.wordline .muted{color:var(--muted); font-size:16px}
.wordline .gotfaces{display:inline-flex; gap:2px; margin-left:4px}
.wordline .gotfaces .cface{width:24px; height:24px}
.paperbox{position:relative; flex:0 1 auto; min-height:120px; width:100%; aspect-ratio:1; max-height:100%; display:grid; place-items:start center}
canvas.paper{display:block; border-radius:16px; box-shadow:0 1px 2px rgba(24,38,63,.08), 0 6px 20px rgba(24,38,63,.12); touch-action:none; background:var(--paper-w)}
.paperbox .tracer canvas{background:var(--paper-w); box-shadow:0 1px 2px rgba(24,38,63,.08), 0 6px 20px rgba(24,38,63,.12)}
.paperbox .more{position:absolute; right:6px; top:6px; z-index:2; width:44px; height:44px; border:0; border-radius:50%; background:rgba(255,255,255,.85); box-shadow:0 1px 4px rgba(0,0,0,.12); font:700 20px/1 var(--font-display); color:var(--muted)}
.paperbox .hidnote{position:absolute; inset:0; display:grid; place-items:center; font:600 17px/1.3 var(--font-display); color:var(--muted); pointer-events:none}

/* The tools: the pen's colour, the colour bar and the rubber; sizes (in the pen's colour), Undo, Clear (asks) */
.tools{display:flex; flex-direction:column; gap:8px}
.trow{display:flex; align-items:center; justify-content:center; gap:5px; flex-wrap:nowrap}
.trow.crow{gap:8px}
.cur{flex:none; width:44px; height:44px; border-radius:50%; border:4px solid var(--tile); padding:0; background:var(--c); box-shadow:0 0 0 1px var(--panel-line), inset 0 0 0 1px rgba(24,38,63,.18); touch-action:manipulation}
.cur[aria-checked="true"]{box-shadow:0 0 0 3px var(--you), inset 0 0 0 1px rgba(24,38,63,.18)}
.sw.rub{flex:none; width:44px; height:44px; border-radius:50%; border:3px solid var(--tile); padding:0; background:var(--paper-w); color:var(--muted); font-size:18px; display:grid; place-items:center; box-shadow:0 0 0 1px var(--tile-edge); touch-action:manipulation}
.sw.rub[aria-checked="true"]{box-shadow:0 0 0 3px var(--you)}
/* the bar: the warm half over the cool half, the greys at the end (src/draw/spectrum.js); markers: the colour, and its
   match while pressing */
.cbar{position:relative; flex:1 1 auto; min-width:0; height:60px; border-radius:12px; touch-action:none; -webkit-user-select:none; user-select:none; -webkit-touch-callout:none; cursor:crosshair}
.cbar canvas{display:block; width:100%; height:100%; border-radius:12px}
.cbar:focus-visible{outline:3px solid var(--you); outline-offset:3px}
.cbar .mk{position:absolute; width:16px; height:16px; margin:-8px 0 0 -8px; border-radius:50%; background:var(--c); box-shadow:0 0 0 3px #fff, 0 0 0 4.5px rgba(20,28,48,.7); pointer-events:none}
.cbar .mk2{width:12px; height:12px; margin:-6px 0 0 -6px; box-shadow:0 0 0 2.5px #fff, 0 0 0 4px rgba(20,28,48,.55)}
/* the loupe: over everything, never under the finger; Calm and reduced motion: it simply appears */
.loupe{position:fixed; z-index:40; width:108px; height:108px; box-sizing:border-box; border-radius:50%; border:12px solid var(--c); background:#fff; box-shadow:0 0 0 2px #fff, 0 6px 22px rgba(24,38,63,.32); pointer-events:none; animation:loupe-in .12s ease-out}
.loupe[hidden]{display:none}
.loupe .lens{display:block; border-radius:50%}
.loupe .lmatch{position:absolute; right:-12px; bottom:-12px; width:34px; height:34px; border-radius:50%; border:3px solid #fff; box-shadow:0 2px 6px rgba(24,38,63,.3)}
.loupe .lmatch[hidden]{display:none}
@keyframes loupe-in{from{opacity:0; transform:scale(.85)}}
@media (prefers-reduced-motion: reduce){ .loupe{animation:none} }
html.calm .loupe{animation:none}
@media (max-height: 720px) and (max-aspect-ratio: 5/4){ .cbar{height:56px} }
.sz{width:44px; height:44px; border:0; border-radius:12px; background:var(--given); display:grid; place-items:center; padding:0; touch-action:manipulation}
.sz i{display:block; border-radius:50%; background:var(--pen, var(--ink)); box-shadow:0 0 0 1px rgba(24,38,63,.18)}
.sz[aria-checked="true"]{background:var(--you-soft); box-shadow:inset 0 0 0 2px var(--you)}
.tbtn{min-height:44px; padding:0 14px; border:0; border-radius:12px; background:var(--given); color:var(--ink); font:600 16px/1 var(--font-display); touch-action:manipulation}
.tbtn:disabled{opacity:.45}
.trow .gap{flex:1 1 8px; max-width:24px}
.ask{display:inline-flex; align-items:center; gap:6px; font:600 16px/1 var(--font-display)}
.ask .tbtn.yes{background:var(--you); color:var(--on-you)}
.side-b > .btn{width:100%}

/* Guessing: four options; the blanks with the tray or the keyboard */
.guess{display:flex; flex-direction:column; gap:8px}
.guess.got{display:none}
.opts{display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:10px}
.opt{min-height:64px; padding:8px 12px; border:0; border-radius:16px; background:var(--given); color:var(--ink); font:600 22px/1.15 var(--font-display); box-shadow:0 3px 0 var(--tile-edge); display:flex; align-items:center; justify-content:center; gap:8px; touch-action:manipulation; overflow-wrap:anywhere}
.opts.pics .opt{flex-direction:column; min-height:92px; gap:2px; font-size:18px}
.opt .pic{width:52px; height:52px; display:block}
.opt.rest{opacity:.4}
.opt.it{background:var(--you-soft); box-shadow:inset 0 0 0 3px var(--you)}
.blanks{display:flex; justify-content:center; flex-wrap:wrap; gap:6px 14px; min-height:40px; align-items:flex-end}
.bw{display:inline-flex; gap:4px}
.bl{width:clamp(18px, 6.2vw, 28px); height:36px; border-bottom:3px solid var(--slot-line); display:grid; place-items:end center; font:600 26px/1 var(--font-display); color:var(--ink); padding-bottom:2px}
.bl.on{border-color:var(--you)}
.bw.extra{font:600 26px/36px var(--font-display); color:var(--muted)}
.blanks.wait .bl.on{color:var(--muted)}
.gotline{display:flex; align-items:center; justify-content:center; gap:10px; min-height:56px; border-radius:16px; background:var(--you-soft); font:600 22px/1 var(--font-display)}
.gotline .cface{width:40px; height:40px}
/* Word Cube's keyboard (its css/game.css "The keyboard"): a touch anywhere goes to the nearest key */
.kbd{flex:none; display:flex; flex-direction:column; gap:6px; padding:7px 3px; border-radius:18px; background:var(--panel); border:1px solid var(--panel-line); touch-action:none}
@media (max-width:520px){ .kbd{margin-inline:-12px} }
.krow{display:flex; gap:4px; justify-content:center}
.key{flex:1 1 0; max-width:60px; height:50px; border-radius:10px; border:2px solid var(--tile-edge); background:var(--tile); box-shadow:0 3px 0 var(--tile-edge); font:600 22px/1 var(--font-display); color:var(--ink); padding:0; touch-action:none}
.key.wide{max-width:90px; flex-grow:1.5; font-size:20px}
.key[data-k="✓"]{color:var(--you)}
.key:active,.key.down{transform:translateY(2px); box-shadow:0 1px 0 var(--tile-edge)}
.kbd.tray{flex-direction:row; align-items:center; gap:8px; box-sizing:border-box}
.kbd.tray .krow{flex-wrap:wrap; gap:8px}
.kbd.tray .krow.letters{flex:1; min-width:0}
.kbd.tray .key{flex:0 0 auto; width:54px; max-width:none; height:54px; font-size:26px; border-radius:14px}
.kbd.tray .key.wide{width:72px; font-size:22px}
.kbd.tray .key.del{flex:none; align-self:center}
.kpop{position:fixed; z-index:90; display:grid; place-items:center; border-radius:14px; background:var(--tile); box-shadow:0 6px 18px rgba(0,0,0,.2), inset 0 0 0 2px var(--tile-edge); font:600 32px/1 var(--font-display); color:var(--ink); pointer-events:none}
@media (max-height:700px){ .key{height:46px} }
@media (max-height:560px){ .key{height:36px; font-size:18px} .kbd.tray .key{width:46px; height:46px; font-size:22px} }

/* Pick one of two */
.pick .cards{display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:12px}
.wcard{min-height:132px; padding:14px 10px; border:0; border-radius:20px; background:var(--you-soft); color:var(--ink); box-shadow:0 4px 0 var(--tile-edge); display:flex; flex-direction:column; align-items:center; justify-content:center; gap:8px; font:600 24px/1.15 var(--font-display); touch-action:manipulation; overflow-wrap:anywhere}
.wcard .art{width:64px; height:64px; display:block}
.pickbar{height:6px; border-radius:3px; background:var(--given); overflow:hidden}
.pickbar i{display:block; height:100%; width:100%; background:var(--you); transform-origin:left center}

/* Big pictures, the gallery, the sketchbook */
.bigpic{display:grid; place-items:center}
.bigpic canvas{border-radius:16px; box-shadow:0 1px 2px rgba(24,38,63,.08), 0 6px 20px rgba(24,38,63,.12); max-width:100%; height:auto!important; aspect-ratio:1}
.bigpic:empty{display:none}
canvas.thumb{display:block; border-radius:12px; box-shadow:inset 0 0 0 1px var(--panel-line)}
canvas.thumb.hid,.bigpic canvas.hid{filter:blur(14px) saturate(.4)}
.gallery{display:grid; grid-template-columns:repeat(auto-fill, minmax(88px, 1fr)); gap:10px; max-height:46vh; overflow:auto}
.gitem{position:relative; display:flex; flex-direction:column; align-items:center; gap:4px; border:0; background:none; padding:0; font:600 15px/1.15 var(--font-display); color:var(--ink); text-align:center; min-width:0}
.gitem > canvas{width:100%!important; height:auto!important; aspect-ratio:1}
.gitem .gw{max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.gitem .gf{display:flex; align-items:center; gap:2px; font:800 12px/1 var(--font-body); color:var(--muted)}
.gitem .gf .cface{width:20px; height:20px}
.points{margin:0; text-align:center; font:600 17px/1.5 var(--font-display); text-wrap:balance}
.points .cface{width:22px; height:22px; margin-right:3px}
.bookgrid{display:grid; grid-template-columns:repeat(auto-fill, minmax(96px, 1fr)); gap:10px}
.bookgrid .none{grid-column:1 / -1; margin:0; text-align:center; color:var(--muted); font-weight:700}
.card.sheet.book{max-width:560px}

/* The reveal */
.card.reveal{align-items:center; text-align:center; gap:10px}
.card.reveal h2{font-size:30px}
.faces{display:flex; flex-wrap:wrap; justify-content:center; gap:6px; min-height:8px}
.faces .cface{width:34px; height:34px}
.reacts{display:flex; gap:8px; justify-content:center}
.reacts button{min-width:48px; min-height:44px; border:0; border-radius:999px; background:var(--given); font-size:22px}
.reacts button.sent{background:var(--you-soft)}

/* Rooms, players, passing the device (Quiz Race's) */
.joincode{display:flex; gap:8px}
.joincode input{flex:1 1 auto; min-width:0; min-height:48px; padding:0 14px; border:0; border-radius:14px; background:var(--given); color:var(--ink); font:700 22px/1 var(--font-display); letter-spacing:.2em; text-transform:uppercase}
.joincode input:focus{outline:2px solid var(--you)}
.joincode .btn{flex:none}
.list{display:flex; flex-direction:column; gap:6px}
.prow{display:flex; align-items:center; gap:8px; width:100%; min-height:48px; padding:6px 10px; border:0; border-radius:14px; background:var(--given); color:var(--ink); font:800 15px/1.2 var(--font-body); text-align:left; box-sizing:border-box}
.prow .cface{width:32px; height:32px}
.prow .pn{flex:1 1 auto; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.prow .pn small{display:block; font-weight:700; color:var(--muted); font-size:12px}
.prow .go{flex:none; padding:8px 12px; border:0; border-radius:999px; background:var(--you); color:var(--on-you); font:800 14px/1 var(--font-body)}
.prow .go.quiet{background:var(--tile); color:var(--muted)}
.codebox{display:flex; flex-direction:column; align-items:center; gap:8px}
.code{font:700 48px/1 var(--font-display); letter-spacing:.18em}
.room-people{display:flex; flex-wrap:wrap; justify-content:center; gap:10px}
.rp{display:flex; flex-direction:column; align-items:center; gap:4px; width:72px; border:0; background:none; padding:0; font:700 13px/1.2 var(--font-body); color:var(--ink)}
.rp .cface{width:56px; height:56px}
.rp.off{opacity:.45}
.rp .nm{max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.ways{display:flex; gap:8px; justify-content:center; flex-wrap:wrap}
.ways .chip{font-size:15px; padding:10px 16px}
.wayhint{flex-basis:100%; margin:0; text-align:center; font-size:13px; font-weight:700; color:var(--muted)}
.turns-grid{display:flex; flex-wrap:wrap; justify-content:center; gap:12px}
.tp{display:flex; flex-direction:column; align-items:center; gap:6px; width:84px; padding:6px 2px; border:0; border-radius:16px; background:none; font:700 14px/1.2 var(--font-display); color:var(--ink)}
.tp .cface{width:60px; height:60px; box-shadow:0 0 0 3px transparent}
.tp[aria-checked="true"] .cface{box-shadow:0 0 0 4px var(--you)}
.tp .nm{max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.tp small{color:var(--muted); font-size:12px}
.tp.add .plus{width:60px; height:60px; border-radius:50%; border:3px dashed var(--panel-line); display:grid; place-items:center; font-size:30px; color:var(--muted); box-sizing:border-box}
.card.hand{align-items:center; text-align:center}
.hand-face .cface{width:110px; height:110px}
.react{position:fixed; z-index:70; pointer-events:none; font-size:34px; animation:reactUp 1.4s ease-out forwards}
@keyframes reactUp{0%{opacity:0; transform:translateY(10px) scale(.6)}20%{opacity:1; transform:translateY(0) scale(1.1)}100%{opacity:0; transform:translateY(-70px)}}
/* short praise ("Got it", "Nice"), allowed */
.praise{position:fixed; left:50%; top:var(--y, 40%); transform:translate(-50%,-50%); z-index:30; pointer-events:none; font:700 clamp(30px,9vw,48px)/1 var(--font-display); color:var(--you); white-space:nowrap; text-shadow:0 4px 0 var(--paper),0 0 14px var(--paper); animation:praise 1.1s cubic-bezier(.3,1.5,.5,1) forwards}
@keyframes praise{0%{opacity:0; transform:translate(-50%,-50%) scale(.4)}25%{opacity:1; transform:translate(-50%,-50%) scale(1.06)}70%{opacity:1; transform:translate(-50%,-60%) scale(1)}100%{opacity:0; transform:translate(-50%,-90%)}}
@media (prefers-reduced-motion: reduce){ .praise,.react{animation:none!important} .praise{opacity:0} }
html.calm :is(.praise,.react){animation:none!important}
html.calm .praise{display:none}

/* A phone on its side: the paper on the left, the full height; the word, tools or guess on the right */
@media (min-aspect-ratio: 5/4) and (max-height: 600px){
  #app{max-width:none}
  .play{flex-direction:row; gap:14px}
  .side-a{flex:0 0 auto; align-self:stretch; width:min(56vw, calc(100vh - 92px)); width:min(56vw, calc(100dvh - 92px))}
  .paperbox{flex:1 1 auto; aspect-ratio:auto}
  .side-b{flex:1 1 auto; max-width:none; justify-content:center; min-width:0}
  .pill{min-height:32px; padding:0 9px; font-size:14px} .pill.pbtn{width:38px; min-height:38px}
  .card.start h1{margin-top:0; font-size:30px}
  .card.start .tiles{margin-top:0; width:min(150px, 44%)}
  .card.start{max-width:min(780px, 100%); display:grid; grid-template-columns:minmax(0, 1fr) minmax(0, 1fr); grid-template-rows:auto 1fr; grid-template-areas:"head me" "head main"; column-gap:24px; row-gap:6px; align-items:center; padding:14px 20px}
  .card.start .mebtn{grid-area:me; justify-self:end; align-self:start; margin:0}
  .card.start .start-head{grid-area:head; align-self:center; gap:8px}
  .card.start .startmain,.card.start .ageask{grid-area:main; gap:7px}
  .card.start .btn{min-height:46px} .card.start .btn.ghost{min-height:44px}
  .card.start .choice{min-height:44px; padding-block:6px}
  .card.start{padding:10px 20px}
  .gamehint{min-height:0}
  .ab{height:46px; font-size:20px}
  .card{padding:16px 18px 14px; gap:12px}
  .kbd{margin-inline:0}
  .opt{min-height:52px; font-size:19px} .opts.pics .opt{min-height:76px} .opt .pic{width:40px; height:40px}
  .wcard{min-height:96px}
  .gallery{max-height:40vh}
}

/* The HUD's part icon (Figures): three bands, the one you draw filled */
.parti{display:inline-flex; flex-direction:column; gap:2px; vertical-align:middle; margin-right:8px}
.parti i{display:block; width:20px; height:6px; border-radius:2px; background:var(--given); box-shadow:inset 0 0 0 1.5px var(--slot-line)}
.parti i.on{background:var(--you); box-shadow:none}
.hud-title .parti{margin-top:-2px}
/* the fold strip above the paper: the part before's last 80 units, a dashed fold line under it */
.foldwrap{display:flex; flex-direction:column; align-items:center}
canvas.fold{display:block; border-radius:16px 16px 0 0; box-shadow:0 1px 2px rgba(24,38,63,.08)}
.foldwrap canvas.paper{border-radius:0 0 16px 16px}
/* who is done (a live part): their faces under the tools */
.doneline{display:flex; align-items:center; justify-content:center; gap:6px; min-height:32px; font:700 14px/1 var(--font-body); color:var(--muted)}
.doneline .cface{width:28px; height:28px}
.waitcard{display:flex; flex-direction:column; align-items:center; gap:10px; padding:18px 12px; border-radius:18px; background:var(--panel); box-shadow:inset 0 0 0 1px var(--panel-line); font:600 18px/1.3 var(--font-display); text-align:center}
.waitcard .faces .cface{width:40px; height:40px}

/* The unfold: the figure 3:1 tall, its drawers' faces beside their parts; each part opens in turn (Calm: at once) */
.card.unfold{align-items:center; gap:12px; max-width:440px}
.card.unfold .btns{align-self:stretch}
.figbox{display:grid; grid-template-columns:auto auto; column-gap:12px; justify-content:center}
.figbox .figcol{display:flex; flex-direction:column; border-radius:14px; overflow:hidden; box-shadow:0 1px 2px rgba(24,38,63,.08), 0 6px 20px rgba(24,38,63,.12); background:var(--paper-w)}
.figbox .figcol canvas{display:block}
.figbox .facecol{display:flex; flex-direction:column}
.figbox .facecol > span{display:flex; flex-direction:column; align-items:center; justify-content:center; gap:4px; font:700 13px/1.1 var(--font-body); color:var(--muted); max-width:84px; text-align:center; overflow-wrap:anywhere}
.figbox .facecol .cface{width:40px; height:40px}
.figbox .open{animation:unfoldIn .55s var(--feel-in, ease-out) both; animation-delay:var(--d, 0ms)}
@keyframes unfoldIn{from{opacity:0; transform:translateY(-18px) scaleY(.6); transform-origin:top center}}
html.calm .figbox .open{animation:none}
@media (prefers-reduced-motion: reduce){ .figbox .open{animation:none} }
/* "Ava got it!": their face on everyone's paper (short praise) */
.firstpop{position:absolute; left:50%; top:42%; transform:translate(-50%,-50%); z-index:3; display:flex; align-items:center; gap:10px; padding:10px 18px 10px 10px; border-radius:999px; background:var(--tile); box-shadow:0 6px 22px rgba(24,38,63,.2), inset 0 0 0 3px var(--you); font:700 24px/1 var(--font-display); color:var(--ink); white-space:nowrap; pointer-events:none; animation:firstIn .45s cubic-bezier(.3,1.4,.5,1) both}
.firstpop .cface{width:44px; height:44px}
@keyframes firstIn{from{opacity:0; transform:translate(-50%,-50%) scale(.6)}}
html.calm .firstpop{animation:none}
@media (prefers-reduced-motion: reduce){ .firstpop{animation:none} }
.firsts{margin:0; text-align:center; font:600 16px/1.4 var(--font-display); color:var(--ink); text-wrap:balance}
.firsts .cface{width:26px; height:26px; margin-right:4px}
/* the gallery's figures and takes */
.gallery.figs{grid-template-columns:repeat(auto-fill, minmax(84px, 1fr))}
.gitem > canvas.fig{width:56px!important; height:168px!important; aspect-ratio:auto}
.bookgrid .gitem > canvas.fig{width:100%!important; height:auto!important; aspect-ratio:1}
.gitem .first{font:800 12px/1.2 var(--font-body); color:var(--you)}
.sentpic{display:grid; place-items:center}
.sentpic:empty{display:none}
@media (min-aspect-ratio: 5/4) and (max-height: 600px){
  /* the end card on its side: the picture (or the gallery) on the left, the words and buttons on the right */
  .card.endcard{max-width:min(800px, 100%); display:grid; grid-template-columns:auto minmax(0, 1fr); column-gap:24px; row-gap:8px; align-items:center; align-content:center}
  .card.endcard > *{grid-column:2}
  .card.endcard > :is(.bigpic, .gallery){grid-column:1; grid-row:1 / span 7}
  .card.endcard > .gallery{width:min(44vw, 400px); max-height:calc(100dvh - 72px)}
  .card.endcard > .btns{gap:8px} .card.endcard .btn{min-height:48px} .card.endcard .btn.ghost{min-height:44px}
  .card.unfold{max-width:min(720px, 100%); display:grid; grid-template-columns:auto minmax(0, 1fr); grid-template-rows:1fr auto auto auto 1fr; grid-template-areas:"fig ." "fig title" "fig reacts" "fig btns" "fig ."; column-gap:24px; row-gap:14px; align-items:center}
  .card.unfold h2{grid-area:title} .card.unfold .figbox{grid-area:fig} .card.unfold .reacts{grid-area:reacts} .card.unfold .btns{grid-area:btns}
}
.gitem .first{display:inline-flex; align-items:center; gap:3px}
.gitem .first .cface{width:18px; height:18px}

/* A big screen in the room (src/screen.js; EdGames docs/family/SCREEN-PRINT-NOTE.md §1): "Show on a big screen", and a
   guesser's phone with the input full height, the drawing a thumbnail to tap open (the TV shows it big) */
.bigscreen{margin:0; font-size:13px; line-height:1.35; text-align:center; color:var(--muted); overflow-wrap:anywhere}
.bigscreen b{color:var(--ink)}
.bigscreen:empty{display:none}
body.tv-guess:not(.tv-open) .paperbox{flex:none; width:96px; height:96px; min-height:0; aspect-ratio:1; cursor:zoom-in}
body.tv-guess:not(.tv-open) .paperbox .more{display:none}
body.tv-guess:not(.tv-open) .side-a{flex:none}
body.tv-guess .side-b{flex:1 1 auto; justify-content:center}
body.tv-guess.tv-open .paperbox{cursor:zoom-out}
@media (min-aspect-ratio: 5/4) and (max-height: 600px){ body.tv-guess:not(.tv-open) .side-a{width:auto} }
