:root{
  --paper:#FBF5EC; --paper-2:#F3EBDD; --ink:#23201A; --muted:#62594F; --line:rgba(35,32,26,.16);
  --olive:#4C6429; --brick:#9D4529; --yellow:#FABB41; --step-lit-edge:#23201A;
  --olive-soft:rgba(76,100,41,.16); --yellow-soft:rgba(250,187,65,.28);
  --on-accent:#FBF5EC; color-scheme: light;
  --dusk:#EBCFA6; --grass:#C7D2A2; --wood:#B98A58; --night:#141A15; --night-2:#232B24; --night-ink:#F1EBE0;
  --h-rosa:#E7B3A0; --h-teo:#A8C3D8; --h-june:#EAD68E; --h-mack:#B8CBA0; --h-priya:#9ECFC3; --h-odell:#E8A9BC; --h-wen:#CBC4B9; --h-lou:#C8B2D7; --h-dark:#3A3530;   /* each house its own colour (P2-A) */
}
@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]){
    --paper:#141A15; --paper-2:#1B221C; --ink:#F1EBE0; --muted:#B7AE9F; --line:rgba(241,235,224,.18);
    --olive:#9DBF71; --brick:#E4896C; --yellow:#FABB41; --step-lit-edge:#141A15;
    --olive-soft:rgba(157,191,113,.22); --soft-mix:22%; --yellow-soft:rgba(250,187,65,.22);
    --on-accent:#23201A; color-scheme: dark;
    --dusk:#2B2F3D; --grass:#22301F; --wood:#8B6741;
    --h-rosa:#7B4637; --h-teo:#3D5A71; --h-june:#6F6232; --h-mack:#4D5F3B; --h-priya:#2E6057; --h-odell:#723B52; --h-wen:#4B4741; --h-lou:#5B4769; --h-dark:#0B0F0C;
  }
}
:root[data-theme="dark"]{
  --paper:#141A15; --paper-2:#1B221C; --ink:#F1EBE0; --muted:#B7AE9F; --line:rgba(241,235,224,.18);
  --olive:#9DBF71; --brick:#E4896C; --yellow:#FABB41; --step-lit-edge:#141A15;
  --olive-soft:rgba(157,191,113,.22); --soft-mix:22%; --yellow-soft:rgba(250,187,65,.22);
  --on-accent:#23201A; color-scheme: dark;
  --dusk:#2B2F3D; --grass:#22301F; --wood:#8B6741;
  --h-rosa:#7B4637; --h-teo:#3D5A71; --h-june:#6F6232; --h-mack:#4D5F3B; --h-priya:#2E6057; --h-odell:#723B52; --h-wen:#4B4741; --h-lou:#5B4769; --h-dark:#0B0F0C;
}
*{box-sizing:border-box}
html,body{height:100%}
body{margin:0;background:var(--paper);color:var(--ink);font:16px/1.45 "Public Sans",system-ui,sans-serif;
  display:flex;flex-direction:column;min-height:100svh;height:100svh;padding:max(8px,env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left));
  touch-action:manipulation;-webkit-user-select:none;user-select:none}
.top{display:flex;align-items:center;justify-content:space-between;gap:12px;max-width:820px;width:100%;margin:0 auto 6px}
.mid{display:flex;gap:14px;font-variant-numeric:tabular-nums;color:var(--muted);font-size:.9rem}
.lamp{display:flex;align-items:center;gap:6px}
.lamp .bulb{width:16px;height:16px;border-radius:50%;background:var(--yellow);opacity:.25;box-shadow:0 0 0 0 var(--yellow);transition:opacity .4s,box-shadow .4s}
.lamp .steps{display:flex;gap:3px}
.lamp .steps i{width:7px;height:11px;border-radius:2px;box-sizing:border-box;border:1.5px dashed var(--ink);background:var(--paper)}   /* G2 #12 (the design seat): state by shape as well as fill: unlit dashed + paper, lit solid + yellow; the outline is ink (14.9:1 on paper) */
.lamp[data-level="1"] .steps i:nth-child(-n+1),.lamp[data-level="2"] .steps i:nth-child(-n+2),.lamp[data-level="3"] .steps i:nth-child(-n+3),
.lamp[data-level="4"] .steps i:nth-child(-n+4),.lamp[data-level="5"] .steps i:nth-child(-n+5),.lamp[data-level="6"] .steps i:nth-child(-n+6){background:var(--yellow);border-style:solid;border-color:var(--step-lit-edge)}
.lamp[data-level="3"] .bulb{opacity:.5}.lamp[data-level="4"] .bulb{opacity:.7}.lamp[data-level="5"] .bulb{opacity:.85}.lamp[data-level="6"] .bulb{opacity:1}
.lamp.glow .bulb{box-shadow:0 0 16px 4px var(--yellow)}
.tree svg{width:34px;height:34px;display:block}
.tree .seed{fill:var(--olive)} .tree .split{fill:none;stroke:var(--olive);stroke-width:2.5;stroke-linecap:round;opacity:0}
/* The scene stays in view while people talk (R44): cards dock below it, or beside it on a wide screen, with no scrim. */
.stage{flex:1 1 auto;min-height:0;display:flex;flex-direction:column;gap:8px;width:100%;max-width:820px;margin:0 auto}
.wrap{position:relative;width:100%;flex:0 0 auto;min-height:300px;max-height:56svh;aspect-ratio:4/3;
  background:var(--paper-2);border:1px solid var(--line);border-radius:16px;overflow:hidden}
.dock{position:relative;flex:1 1 auto;min-height:150px}
.idle{display:flex;flex-direction:column}
body[data-card="dock"] .idle{visibility:hidden}
@media (max-aspect-ratio:5/4), (max-width:559px){   /* the intro's words are big (R51), so on a phone its scene is taller */
  body[data-intro="1"] .wrap{min-height:min(58svh,440px);max-height:none}
  body[data-intro="1"] .dock{min-height:56px}
  body[data-intro="1"] .purpose{display:none}
}
@media (min-aspect-ratio:5/4) and (min-width:560px){
  .top{max-width:1200px}
  .stage{flex-direction:row;max-width:1200px;gap:16px}
  .wrap{flex:1 1 0;min-width:0;min-height:220px;max-height:min(100%,620px);aspect-ratio:auto;height:100%}
  .dock{flex:0 0 min(360px,36%);min-height:0}
  .bar,.status{max-width:1200px}
  body[data-intro="1"] .dock{display:none}   /* the intro takes the whole width, so its words can be as large as they go */
}
canvas{position:absolute;inset:0;display:block;width:100%;height:100%;touch-action:none}   /* out of flow: the scene's box never depends on the canvas */
.cards{position:absolute;inset:0;display:flex;align-items:flex-start;justify-content:center}
.cards[hidden]{display:none}
/* R52: talk happens where people are. A neighbor's words are a bubble by them; your choices are a bubble from you. */
.tails{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;overflow:visible}
.tails .tail{fill:var(--paper);stroke:var(--ink);stroke-width:2;stroke-linejoin:round}
.tails .tail.you{fill:color-mix(in srgb,var(--olive) var(--soft-mix,16%),var(--paper))}   /* D1: solid, the same tint as before over paper */
.tails .lead{fill:none;stroke:var(--ink);stroke-width:2;stroke-dasharray:5 5;opacity:.55}
.tails .dot{fill:var(--paper);stroke:var(--ink);stroke-width:1.5}
.cards.bubbles{position:absolute;inset:0;display:block;pointer-events:none;font-size:18px}
.cards.bubbles .card{display:contents}
.cards.bubbles .say,.cards.bubbles .reply{position:absolute;pointer-events:auto;width:max-content;background:var(--paper);color:var(--ink);border:2px solid var(--ink);border-radius:18px;padding:10px 14px;box-shadow:none}   /* D1: no soft shadow spilling past the bubble across the scene (the grey band); the ink border carries it */
.cards.bubbles .reply{background:var(--paper-2)}
.cards.bubbles .say:empty,.cards.bubbles .reply:empty{display:none}
.cards.bubbles h2{font-size:1.2rem;margin:0 0 4px}
.cards.bubbles p{margin:4px 0}
.cards.bubbles .choices{margin:2px 0 0;align-items:stretch}
.cards.bubbles .choices.few{position:static;padding:0;background:transparent}
.cards:not(.bubbles) .reply.few{position:sticky;bottom:0;background:var(--paper)}
.cards:not(.bubbles) .reply.few .choices.few{position:static}
.cards.bubbles .choice{border-radius:999px;padding:8px 16px;min-height:44px;font-size:1rem;text-align:center;background:var(--paper)}
.cards.bubbles .choice.sel{background:linear-gradient(var(--olive-soft),var(--olive-soft)),var(--paper)}   /* D1 (Justin, 2026-10-03): the tint goes over paper, never instead of it, so nothing shows through */
.cards.bubbles .typed{flex-direction:column;gap:6px}
.cards.bubbles .typed .choice{border-radius:14px}
.cards.bubbles .hint{margin-top:6px;font-size:.85rem;text-align:right}
.cards.bubbles .hint:empty{display:none}
.thought{position:absolute;max-width:40%;background:var(--paper);color:var(--ink);border:1.5px solid var(--ink);border-radius:16px;padding:7px 12px;font-size:18px;line-height:1.3;pointer-events:none;box-shadow:none}
.thought[hidden]{display:none}
body[data-thought="1"] .line .hint{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}   /* the Next line is at your figure now; readers still get it here */
.cards.modal{position:fixed;z-index:10;align-items:center;align-items:safe center;padding:12px;background:rgba(20,26,21,.45);overflow-y:auto}   /* only the menu pauses the street */
.card{background:var(--paper);color:var(--ink);border-radius:18px;padding:16px 18px;max-width:480px;width:100%;max-height:100%;overflow-y:auto;border:1px solid var(--line)}
.card > .scrollcue{position:sticky;bottom:-16px;height:30px;margin:-30px -18px 0;display:flex;align-items:flex-end;justify-content:center;padding-bottom:3px;background:linear-gradient(rgba(0,0,0,0),var(--paper) 75%);color:var(--muted);font-size:.8rem;line-height:1;pointer-events:none}   /* R60: more below; bottom -16px (the card's padding) so the fade reaches the card's foot, with no bare strip of text under it */
.card > .scrollcue[hidden]{display:none}
.cards.modal .card{box-shadow:0 20px 60px rgba(0,0,0,.25)}
/* the calm menu (R46): one large Resume, small switches in a grid, a row of text links, Start over last and smallest */
.card.menu h2{font-size:1.05rem;margin-bottom:10px}
.choice.primary{display:block;width:100%;text-align:center;font-size:1.15rem;min-height:56px;background:var(--olive);color:var(--on-accent);border-color:var(--olive)}
.choice.primary.sel{background:var(--olive);outline:3px solid var(--ink);outline-offset:2px}
.switches{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:12px 0 6px}
.choice.switch{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:.9rem;font-weight:600;padding:8px 10px;min-height:48px;border-width:1px}
.choice.switch .pill{flex:0 0 auto;font-size:.75rem;font-weight:700;letter-spacing:.04em;text-transform:uppercase;padding:3px 8px;border-radius:999px;border:1px solid var(--line);color:var(--muted)}
.choice.switch[aria-checked="true"] .pill{background:var(--olive);border-color:var(--olive);color:var(--on-accent)}
.links{display:flex;flex-wrap:wrap;gap:0 4px;margin:4px 0 0}
.choice.link{border:0;border-radius:8px;min-height:44px;padding:0 8px;font-size:.9rem;font-weight:600;color:var(--olive);text-decoration:underline;text-underline-offset:3px}
.choice.danger{display:block;border:0;border-radius:8px;min-height:44px;padding:0 8px;margin-top:2px;font-size:.8rem;font-weight:600;color:var(--muted);text-decoration:underline;text-underline-offset:3px}
.choice.switch.sel,.choice.link.sel,.choice.danger.sel{background:linear-gradient(var(--olive-soft),var(--olive-soft)),var(--paper);outline:2px solid var(--olive);outline-offset:0}
.card.menu .keysline{color:var(--muted);font-size:.8rem;margin:8px 0 0}
.card .eyebrow{font:700 .7rem/1 "Public Sans",sans-serif;letter-spacing:.12em;text-transform:uppercase;color:var(--olive);margin-bottom:8px}
.card h2{font:600 1.35rem/1.2 Fraunces,Georgia,serif;margin:0 0 8px}
.card p{margin:6px 0}
.card.teach h2{font-size:clamp(1.6rem,3.4vw,2.4rem)}   /* a chapter title is big, clear and present (R51) */
.card.teach p{font-size:1.1rem}
.choices{display:flex;flex-direction:column;gap:8px;margin:14px 0 4px}
.choices.row{flex-direction:row}
.choices.few{position:sticky;bottom:0;padding:8px 0 2px;margin-bottom:0;background:var(--paper)}
.choices.row .choice{flex:1 1 0;text-align:center}
.choice{font:600 1rem "Public Sans",sans-serif;text-align:left;padding:11px 14px;min-height:48px;border:2px solid var(--line);border-radius:12px;background:transparent;color:var(--ink);cursor:pointer}
.choice.sel{border-color:var(--olive);background:linear-gradient(var(--olive-soft),var(--olive-soft)),var(--paper)}
.choice:focus-visible,.go:focus-visible,#bar button:focus-visible{outline:3px solid var(--olive);outline-offset:2px}
.typed{display:flex;gap:8px;margin-top:8px}
.typed input{flex:1;font:16px "Public Sans",sans-serif;padding:10px 12px;border:2px solid var(--line);border-radius:12px;background:var(--paper);color:var(--ink);min-height:48px}
.hint{min-height:1.3em;color:var(--muted);font-size:.9rem;margin-top:8px}
.go{display:inline-block;margin-top:12px;background:var(--olive);color:var(--on-accent);border:0;border-radius:12px;padding:12px 18px;min-height:48px;font:700 1rem "Public Sans",sans-serif;cursor:pointer}
.line{width:100%;margin:2px 0 0;display:flex;gap:10px;flex-wrap:wrap;font-size:.95rem}
.keys{color:var(--muted)} .line .hint{margin:0;color:var(--ink);font-size:.95rem}
.purpose{width:100%;margin:2px 0 0;color:var(--muted);font:600 .95rem Fraunces,Georgia,serif}   /* audit #10: upright; no italic face ships */
#cards:not([hidden]) ~ #leave{display:none}
.leave{min-height:48px}
.bar{display:flex;gap:8px;max-width:820px;width:100%;margin:8px auto 0;justify-content:center;position:sticky;bottom:0;background:var(--paper);padding-bottom:env(safe-area-inset-bottom)}
@media (hover:hover) and (pointer:fine){ .bar button:not([data-k="pause"]){display:none} }
.bar button{font:700 1rem "Public Sans",sans-serif;min-width:48px;min-height:48px;padding:0 16px;border-radius:12px;border:1px solid var(--line);background:var(--paper-2);color:var(--ink)}
.status{max-width:820px;width:100%;margin:6px auto 0;color:var(--muted);font-size:.85rem;min-height:1.2em}
@media (prefers-reduced-motion:reduce){ .lamp .bulb{transition:none} }
.leave{position:absolute;right:10px;top:10px;min-height:44px;padding:0 14px;border-radius:12px;border:1px solid var(--line);background:var(--paper);color:var(--ink);font:600 .9rem "Public Sans",sans-serif;cursor:pointer}
.leave[hidden]{display:none}
html[data-calm="1"] *{transition:none!important;animation:none!important}
@media (orientation:landscape) and (max-height:500px){   /* a phone held sideways: the card still sits beside the scene, on screen */
  body{padding-top:4px;padding-bottom:4px}
  .top{margin-bottom:2px}
  .wrap{min-height:150px}
  .purpose{display:none}
  .bar{margin-top:4px}
  .bar button{min-height:44px}
  .status{margin-top:2px;min-height:0;font-size:.75rem}
  .status:empty{display:none}
}
.lamp[hidden]{display:none}
.haspic > :not(img){display:none}
.tree[data-stage="2"] .seed{ry:5;cy:30} .tree[data-stage="2"] .split{opacity:1}
.tree[data-stage="1"] .seed{ry:8;cy:26} .tree[data-stage="1"] .split{opacity:0}
.tree[data-stage="1"] svg{filter:none}
.savestate{color:var(--brick);font-weight:600}
.savestate:empty{display:none}
.failed{max-width:480px;margin:24px auto;padding:16px 18px;border:1px solid var(--line);border-radius:18px;background:var(--paper);color:var(--ink);text-align:center}
.failed button{font:700 1rem "Public Sans",sans-serif;min-height:44px;padding:0 18px;border-radius:12px;border:1px solid var(--olive);background:var(--olive);color:var(--on-accent)}
.typed textarea.paste{width:100%;min-height:6em;font:inherit;padding:8px 10px;border:1px solid var(--line);border-radius:10px;background:var(--paper-2);color:var(--ink);resize:vertical}
.typed input::placeholder{color:var(--muted);opacity:1}
.say .rest{visibility:hidden}   /* R54: the untyped part keeps its place, so the bubble never grows */
.say .more{visibility:hidden;position:absolute;right:8px;bottom:4px;font-size:.7em;color:var(--olive)}   /* in the corner: it takes no line */
.say .more.on{visibility:visible;animation:ng3blink 1s steps(2,start) infinite}
@keyframes ng3blink{to{visibility:hidden}}
.reply.waiting{visibility:hidden}   /* the answers come once the line is complete */
.cards.bubbles.caption .say,.cards.bubbles.caption .reply{border-radius:8px;border:1px solid var(--line);background:var(--paper-2);box-shadow:none}   /* R53.4: the game's own voice: a plain box, no tail, no name */
.cards.bubbles.caption .say{color:var(--muted)}   /* R53.4 narrator: its form marks it; upright, ink a step muted (the design seat, 2026-10-03: no unshipped italic) */
.toast{position:fixed;z-index:20;transform:translate(-50%,-50%);pointer-events:none;background:var(--paper);color:var(--ink);border:1px solid var(--line);border-radius:999px;padding:4px 12px;font:600 .85rem "Public Sans",sans-serif;white-space:nowrap}
.choice.link.erase{display:inline-block;min-height:44px;font-size:.85rem;margin-top:4px}
.caption-note{margin-top:4px;padding:4px 10px;border:1px solid var(--line);border-radius:8px;background:var(--paper-2);font-size:.9rem}
.caption-note[hidden]{display:none}
.nametab{display:inline-block;margin:0 0 4px;padding:1px 8px;border-radius:6px;background:var(--olive);color:var(--on-accent);font:700 .72rem/1.5 "Public Sans",sans-serif;letter-spacing:.06em;text-transform:uppercase}   /* R53.6 */
.say .page{max-width:40ch}
.say.paged .page{width:40ch;max-width:100%;min-height:calc(var(--lines, 3) * 1.5em)}   /* one size for every page */
.say .up{display:block;font-size:.7em;color:var(--olive);line-height:1}
.cards.bubbles .reply.mine{border-color:var(--brick);border-radius:14px 14px 4px 14px}   /* R53.3: yours, under the words */
.say .dots{position:absolute;top:3px;right:10px;font-size:.55em;letter-spacing:.15em;color:var(--olive)}   /* R58: where you are, taking no line of its own */
.cards:not(.bubbles) .say{position:relative}
.typed{flex-wrap:wrap}
.typed input{flex:1 1 12em;min-width:0}
.typed .choice{white-space:nowrap;flex:0 0 auto}   /* Ask for this stays on one line: beside the box, or under it */
.typed.sel input{border-color:var(--olive);background:linear-gradient(var(--olive-soft),var(--olive-soft)),var(--paper)}   /* the box highlights as an answer would */
.cards.bubbles .say .nametab{float:left;margin:3px 8px 0 0}   /* beside the first line, so the bubble stays short */
.cards.bubbles .reply.mine.single{background:transparent;border:0;padding:0;box-shadow:none;width:auto}
.cards.bubbles .reply.mine.single .choices{flex-direction:row;justify-content:flex-end;margin:0}
.capband{position:absolute;z-index:3;padding:6px 12px;border:1px solid var(--line);border-radius:8px;background:var(--paper-2);color:var(--muted);font:600 1.125rem/1.35 "Public Sans",sans-serif;text-align:center}   /* L7: 18 px; the narrator's band: upright, muted ink */
.capband[hidden]{display:none}
.cards.bubbles .say .page p{margin:0;line-height:1.5}
.cards.bubbles .say .eyebrow{float:right;margin:4px 0 0 8px}   /* the turn count shares the name tab's line */
/* R56: a calm menu that draws the eye in order: Resume (the only filled control), the tile names, then section labels and
   descriptions muted, the warning ink on Start over alone, the footer lightest. One screen on a phone; two columns sideways. */
.card.menu h2{font:600 1.25rem/1.2 Fraunces,Georgia,serif;margin:0 0 10px}
.card.menu .msect{margin:12px 0 6px;font:700 .72rem/1 "Public Sans",sans-serif;letter-spacing:.1em;text-transform:uppercase;color:var(--muted)}
.card.menu .switches{grid-template-columns:1fr 1fr;gap:6px;margin:0}
.card.menu .choice.switch{display:grid;grid-template-columns:1fr auto;grid-template-areas:"name pill" "desc desc";align-items:center;gap:2px 6px;text-align:left;padding:7px 10px;min-height:48px;background:transparent}
.card.menu .choice.switch .name{grid-area:name;font-weight:700;font-size:.92rem}
.card.menu .choice.switch .pill{grid-area:pill}
.card.menu .choice.switch .desc{grid-area:desc;font-weight:400;font-size:.78rem;line-height:1.25;color:var(--muted)}
.card.menu .choice.switch[data-cycle] .name{grid-column:1 / -1}
.card.menu .choice.switch.dim{opacity:1;color:var(--muted);background:var(--paper-2);border-style:dashed}   /* G2: inert, read in muted ink at full opacity (muted on paper-2 is a checked pair) */
.card.menu .choice.switch.dim .name,.card.menu .choice.switch.dim .desc,.card.menu .choice.switch.dim .pill{color:var(--muted)}
.card.menu .links{gap:0 2px}
.card.menu .choice.link{min-height:44px;font-size:.9rem;color:var(--ink);text-decoration:none;padding:0 8px;border-radius:8px}
.card.menu .choice.danger{display:inline-block;margin-top:10px;min-height:44px;padding:0 14px;border:1.5px solid var(--brick);border-radius:10px;color:var(--brick);text-decoration:none;font-size:.9rem;font-weight:700;background:transparent}
.card.menu .why{margin:4px 0 0;font-size:.78rem;color:var(--muted)}
.card.menu .links.footer{margin-top:10px;border-top:1px solid var(--line);padding-top:4px}
.card.menu .links.footer .choice.link{font-size:.78rem;font-weight:600;color:var(--muted);min-height:44px}
.card.menu{max-width:520px}
.card.menu .mnote{margin:0 0 8px;font-size:.82rem}
@media (orientation:landscape) and (max-height:500px){
  .card.menu{max-width:640px;display:grid;grid-template-columns:1fr 1fr;gap:0 18px;padding:12px 14px}   /* G1: even columns, so the Your-game items (Save, Load, Erase, Restore) sit two to a row: measured 333 of 349 px at 667x375 with all four, 336 with a notice */
  .card.menu .gitem .why{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);margin:0;white-space:nowrap}   /* and their lines are read, not shown, as on a short phone */
  .card.menu h2{grid-column:1 / -1;margin-bottom:4px;font-size:1.05rem}
  .card.menu .msect{margin:6px 0 4px}
  .card.menu .choice.primary{min-height:44px}
  .card.menu .choice.switch{min-height:44px;padding:5px 8px}
  .card.menu .choice.switch .desc{font-size:.72rem}
  .card.menu .choice.danger{margin-top:2px}
  .card.menu .links.footer{margin-top:4px}
  .card.menu{padding:6px 14px}   /* G2: the Letter keys line in How to play ran the menu to 359 of 349 px at 667x375; the spacing gives way, never a control's 44 px */
  .card.menu h2{grid-row:1;margin-bottom:2px}                      /* the title row holds the menu's notice too, right of the title */
  .card.menu .mnote{grid-row:1;grid-column:1 / -1;justify-self:end;align-self:center;max-width:calc(100% - 10.5rem);margin:0 0 2px;padding:2px 8px;font-size:.72rem}
  .card.menu .mcol{grid-row:2}
  .card.menu .msect{margin:3px 0 2px}
  .card.menu .why{font-size:.72rem;margin-top:3px}
  .card.menu .links.gamerow{row-gap:4px}
  .card.menu .links.footer{margin-top:0;padding-top:0}
}
.card.menu.noted .gwhy{display:none}
.card.menu .gamerow{display:flex;flex-direction:column;align-items:stretch;gap:6px;margin-top:2px}   /* A5: each line with its own control */
.card.menu .gline{display:flex;align-items:flex-start;flex-wrap:wrap;gap:6px 10px}
.card.menu .gline > .why{flex:1 1 9rem;margin:0;align-self:center}
.card.menu .gitem{display:flex;flex-direction:column;flex:1 1 0;min-width:8.5rem}   /* beside Save a copy; its line wraps under the button */
.card.menu .gitem .why{margin:0 0 0 8px;line-height:1.25}
@media (max-height:700px) and (max-width:559px){ .card.menu .gitem .why{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);margin:0;white-space:nowrap} }
.card.menu .gamerow .choice.danger{margin-top:0}
@media (max-width:440px){   /* R56 on a phone: one screen, no scroll */
  .card.menu{padding:12px 12px}
  .card.menu h2{margin-bottom:6px}
  .card.menu .msect{margin:8px 0 4px}
  .card.menu .choice.primary{min-height:50px}
  .card.menu .choice.switch{padding:5px 8px;gap:1px 4px}
  .card.menu .choice.switch .name{font-size:.86rem}
  .card.menu .choice.switch .desc{font-size:.7rem;line-height:1.2}
  .card.menu .why{font-size:.7rem}
  .card.menu .links.footer{margin-top:6px}
  .card.menu .mnote{font-size:.72rem;padding:3px 8px;margin-bottom:4px}
}
@media (max-height:700px) and (max-width:559px){ .card.menu .links:not(.footer):not(.gamerow) .choice.link{font-size:.8rem;padding:0 6px}   /* G2: How it works, What's new and Letter keys share ONE 44 px row (they wrapped to two, 88 px, and the menu with a notice and four Your-game items ran past 640 px) */ .card.menu{padding:8px 12px} .card.menu h2{margin-bottom:2px} .card.menu .msect{margin:3px 0 2px} .card.menu .mnote{margin:0 0 2px;padding:2px 8px} .card.menu .choice.switch{min-height:44px;padding:4px 8px} .card.menu .links.footer{margin-top:2px;padding-top:0} }   /* G1 (after the 440 px block, which it must outrank): on a short phone the spacing gives way, never the warning: with its notice the menu measured 638 of 614 px at 360x640, 589 after */   /* G1 (after the 440 px block, which it must outrank): on a short phone the Your-game lines (Load, Erase, Restore) are read, not shown: four items would run the menu past the screen (658 of 614 px at 360x640); the labels say what they do */

/* ---- R60: a game screen, not a web page. The scene fills the viewport (envelop); one HUD cluster top-left; Notebook
   and Menu as icons top-right; tall cards in a panel inside the stage; the touch bar only for coarse pointers. ---- */
body.gs{display:block;padding:0;height:100svh;min-height:0;overflow:hidden}
body.gs .stage{position:fixed;inset:0;max-width:none;width:auto;margin:0;display:block;gap:0}
body.gs .stage:has(.cards.modal){z-index:11}   /* the fixed stage is its own layer: while the menu is open it sits over the HUD, the failed-save line and the bar */
body.gs .wrap{position:absolute;inset:0;width:auto;height:auto;min-height:0;max-height:none;aspect-ratio:auto;border:0;border-radius:0;flex:none}
body.gs .top{position:fixed;z-index:6;top:max(8px,env(safe-area-inset-top));left:max(10px,env(safe-area-inset-left));width:auto;max-width:none;margin:0;
  justify-content:flex-start;gap:10px;padding:5px 12px;background:var(--paper);border:1px solid var(--line);border-radius:999px}
body.gs .top .mid:has(#week:not(:empty)) #yeses{display:none}   /* one count at a time: the week replaces the yeses once it starts */
body.gs .mid:not(:has(.count:not(:empty))){display:none}
.icons{display:none}
body.gs .icons{position:fixed;z-index:6;top:max(8px,env(safe-area-inset-top));right:max(10px,env(safe-area-inset-right));display:flex;gap:8px}
body.gs .icons .icon{width:44px;height:44px;display:grid;place-items:center;border-radius:12px;border:1px solid var(--line);background:var(--paper);color:var(--ink);cursor:pointer;padding:0}
body.gs .icons .icon svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}
body.gs .icons .icon:focus-visible{outline:3px solid var(--olive);outline-offset:2px}
body.gs .dock{position:absolute;inset:0;min-height:0;pointer-events:none;flex:none}
body.gs .dock > *{pointer-events:auto}
body.gs .idle{position:fixed;z-index:5;left:50%;transform:translateX(-50%);bottom:calc(14px + var(--barh, 0px));max-width:min(92vw,560px);pointer-events:none}
body.gs .idle .keys,body.gs .idle .purpose{display:none}   /* controls are shown where they act; the tagline lives in the intro and About */
body.gs .idle .line{justify-content:center}
body.gs .idle .hint:not(:empty){display:inline-block;padding:6px 12px;border:1px solid var(--line);border-radius:10px;background:var(--paper);color:var(--ink);font-size:1.125rem;text-align:center}
body.gs #cards:not(.bubbles):not(.modal){inset:auto;right:max(12px,env(safe-area-inset-right));top:64px;bottom:calc(12px + var(--barh, 0px));width:min(380px,36%);align-items:stretch;pointer-events:auto}   /* the in-stage panel, right on a wide screen */
body.gs #cards:not(.bubbles):not(.modal) .card{max-height:100%;box-shadow:none}   /* D1 fade rule: no shadow spilling past the panel across the scene; its border carries it */
@media (orientation:landscape) and (max-height:500px){   /* a phone held sideways: a teaching card (no speaker to keep in view) takes a wider panel, so its button is in view (R60 ruling on R32) */
  body.gs #cards:not(.bubbles):not(.modal):has(> .card.teach){width:min(420px,52%)}
  body.gs #cards:not(.bubbles):not(.modal) .card.teach{padding:12px 16px}
}
@media (max-aspect-ratio:5/4), (max-width:559px){
  body.gs #cards:not(.bubbles):not(.modal){left:max(8px,env(safe-area-inset-left));right:max(8px,env(safe-area-inset-right));top:auto;width:auto;max-height:42%;bottom:calc(8px + var(--barh, 0px))}   /* bottom on a narrow one */
}
body.gs #status{position:fixed;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);margin:0;white-space:nowrap}   /* the polite region, for readers only */
body.gs #savestate{position:fixed;z-index:6;top:calc(max(8px,env(safe-area-inset-top)) + 50px);left:max(10px,env(safe-area-inset-left));width:auto;max-width:min(80vw,calc(64vw - 40px));margin:0;padding:3px 10px;border:1.5px solid var(--brick);border-radius:8px;background:var(--paper);color:var(--brick);font-weight:700}   /* a failed save's line stays left of the side panel (36% wide): at 667x375 it ran over the panel's words (the second review's row) */
body.gs .bar{position:fixed;z-index:6;left:50%;transform:translateX(-50%);bottom:max(8px,env(safe-area-inset-bottom));width:auto;max-width:none;margin:0;background:transparent;padding:0}
@media not all and (pointer:coarse){ body.gs .bar{display:none} }   /* L6: the touch bar is for touch */
body.gs[data-mode="mini"] .top,body.gs[data-mode="intro"] .top,body.gs[data-mode="intro"] .icons{display:none}
body.gs[data-mode="mini"] .bar{display:none}   /* the design seat (L4 takeover): Talk/Ask is the street's, noise in a micro-game; Leave (top-left) and the Menu icon stay. The game's own line stays (5 October): it sits in a band main.js reserves at the foot, and stays a polite live region, never display:none */
body.gs .leave{position:fixed;z-index:7;left:max(10px,env(safe-area-inset-left));right:auto;top:max(8px,env(safe-area-inset-top))}   /* Leave and Skip: top-left */
.insetprobe{position:fixed;left:0;bottom:0;width:0;height:env(safe-area-inset-bottom,0px);visibility:hidden;pointer-events:none}   /* audit #12: main.js reads the home-indicator inset from this */
