/* Layout: one game screen. A hall and two rooms off it (the Arcade, the Library), one on screen at a time under a
   following camera; HUD pinned top, dialogue box pinned bottom. One committed look (the app's paper-and-ink room),
   so no second theme; the Arcade is the one darker room, lit warm. */
/* Base rules. Sizes below are content-box unless a rule says otherwise. */
/* The handwriting, in small files. The room's stylesheet, loaded first, names the full fonts; lobby.js takes those
   rules off the list, and where it cannot, these later rules still win for every character they cover. Kalam's small
   file leaves out its Devanagari half, which nothing here is written in; every other character is the same drawing.
   Made with fonttools: see README.md, "Loading and resting". */
@font-face { font-family: 'Patrick Hand'; src: url('/fonts/PatrickHand-Regular.woff2?v=99306830167e') format('woff2'); font-style: normal; font-weight: 400; font-display: swap; }
@font-face { font-family: Kalam; src: url('/fonts/Kalam-Regular.subset.woff2?v=02c63e24311d') format('woff2'); font-style: normal; font-weight: 400; font-display: swap; unicode-range: U+0-8FF, U+980-10FFFF; }
@font-face { font-family: Kalam; src: url('/fonts/Kalam-Bold.subset.woff2?v=e45849a7e444') format('woff2'); font-style: normal; font-weight: 700; font-display: swap; unicode-range: U+0-8FF, U+980-10FFFF; }
:root { color-scheme: light; }
[hidden] { display: none !important; }
img { max-width: 100%; }
body { margin: 0; font: 14px system-ui; }
:root {
  --ink: #2B2724; --ink-soft: #625D55;
  --paper: #FBF8F0; --paper-hi: #FFFEFA; --paper-lo: #F0EADA;
  --wall: #D6E5F5; --dado: #F7F0E2; --slate: #3D4B4A; --floor: #F3E9D8; --base: #E9DCC6;
  --blue: #2563C9; --blue-deep: #173F86; --navy: #27376B;
  --gold: #F5D76E; --coral: #F2A488; --mint: #9FD7AE; --lilac: #C9B3E8; --sky: #9CC3EC;
  --green: #7FC8A9; --green-wash: #DCEFE2;
  --wood: #B98550; --wood-lo: #9A6A3E;
  --plum: #352F6C; --plum-hi: #493573; --plum-lo: #1D1B46;
  --hand: Kalam, 'Patrick Hand', 'Comic Sans MS', cursive;
  --print: 'Patrick Hand', Kalam, 'Comic Sans MS', cursive;
  --torn: 14px 18px 12px 19px / 18px 12px 19px 14px;
  --gut-l: max(16px, env(safe-area-inset-left, 0px));
  --gut-r: max(16px, env(safe-area-inset-right, 0px));
}
html, body { height: 100%; }
body { background: var(--floor); color: var(--ink); font-family: var(--hand); overflow: hidden; }
button, input { font-family: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

#game { position: relative; height: 100%; overflow: hidden; background: var(--floor); touch-action: manipulation; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; }

/* ── the room ────────────────────────────────────────────── */
#world { position: absolute; left: 0; top: 0; width: 1400px; height: 980px; transform-origin: 0 0; will-change: transform; }
#world > * { position: absolute; }
/* A room is only a corner to measure from: it has no size and no layer of its own, so the people in it and the
   visitor walking through sort by how far down the floor they stand. A room that is not on screen is [hidden]:
   not drawn, not animated. */
.room { position: absolute; left: 0; top: 0; }
.room > * { position: absolute; }
.w-wall, .w-base, .w-floor, .w-front { pointer-events: none; }
/* A room nobody can see does no work (lobby.js, "resting"): not drawn at all under the title card or a game, and
   held still under a full-screen view that leaves it showing, dimmed. */
#game.unseen #world { visibility: hidden; }
#game.resting #world *, #game.resting #world *::before, #game.resting #world *::after { animation-play-state: paused !important; }
/* The back wall: painted, with the soft pencil shading the app's own room has, a cream dado under a rail, and the
   warm of the two lanterns. Squared paper is what a student writes on (Ivy's board); it is not wallpaper. */
.w-wall { left: -3000px; top: -2000px; width: 7500px; height: 2236px;
  background:
    radial-gradient(circle, rgba(255,236,170,.6), rgba(255,236,170,0) 68%) 3413px 2034px / 180px 180px no-repeat,
    radial-gradient(circle, rgba(255,236,170,.6), rgba(255,236,170,0) 68%) 3807px 2034px / 180px 180px no-repeat,
    linear-gradient(to top, var(--dado) 0 62px, var(--ink) 62px 64px, var(--base) 64px 71px, rgba(43,39,36,.55) 71px 72.5px, rgba(0,0,0,0) 72.5px) 0 100% / 100% 74px no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='132' height='108'%3E%3Cg fill='none' stroke-linecap='round'%3E%3Cpath d='M6 30L27 13M38 58L66 35M80 26L104 7M14 84L42 61M60 98L88 75M96 60L122 39M50 20L63 9M104 96L124 80M22 50L34 40' stroke='%23FFFEFA' stroke-width='2' opacity='.17'/%3E%3Cpath d='M70 66L92 48M10 70L24 58' stroke='%235B7FA6' stroke-width='1' opacity='.1'/%3E%3C/g%3E%3C/svg%3E") 0 0 / 132px 108px,
    var(--wall); }
/* The saying is chalked on a small board at the end of the wall: a hand font is what chalk looks like. */
.quote { box-sizing: border-box; width: 128px; margin: 0; padding: 10px 5px 8px; transform: translateX(-50%) rotate(-1.5deg); text-align: center;
  font-weight: 400; font-size: 18px; line-height: 1.16; color: rgba(255,254,250,.9);
  background: radial-gradient(ellipse at 28% 30%, rgba(255,254,250,.10), rgba(255,254,250,0) 60%), radial-gradient(ellipse at 80% 78%, rgba(255,254,250,.07), rgba(255,254,250,0) 55%), var(--slate);
  border: 2.5px solid var(--ink); border-radius: 4px; box-shadow: 0 0 0 5px var(--wood), 0 0 0 7.5px var(--ink); }
.quote em { display: block; margin-top: 1px; padding-bottom: 8px; font-style: normal; font-weight: 700; font-size: 27px; line-height: 1.1; color: var(--gold);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 96 8' preserveAspectRatio='none'%3E%3Cpath d='M3 5C20 2 34 6 50 4S80 2 93 4' fill='none' stroke='%23F5D76E' stroke-width='2.6' stroke-linecap='round' opacity='.9'/%3E%3C/svg%3E") 50% 100% / 92px 8px no-repeat; }
/* the chalk ledge, and a stub of chalk on it */
.quote::after { content: ""; position: absolute; left: -11px; right: -11px; bottom: -17px; height: 5px; background: var(--wood-lo); border: 2.5px solid var(--ink); border-radius: 3px; }
.quote::before { content: ""; position: absolute; right: 16px; bottom: -13px; width: 15px; height: 4px; z-index: 1; background: var(--paper-hi); border: 1.5px solid var(--ink); border-radius: 2px; transform: rotate(-4deg); }
.w-bunt { left: -3000px; top: -90px; width: 7500px; height: 38px; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='250' height='38'%3E%3Cpath d='M0 3 Q125 13 250 3' fill='none' stroke='%232B2724' stroke-width='2.5'/%3E%3Cpath d='M10 4 L40 6 L26 33 Z' fill='%23F5D76E' stroke='%232B2724' stroke-width='2.5' stroke-linejoin='round'/%3E%3Cpath d='M60 7 L90 8 L76 35 Z' fill='%23F2A488' stroke='%232B2724' stroke-width='2.5' stroke-linejoin='round'/%3E%3Cpath d='M110 8 L140 8 L125 36 Z' fill='%239FD7AE' stroke='%232B2724' stroke-width='2.5' stroke-linejoin='round'/%3E%3Cpath d='M160 8 L190 7 L176 35 Z' fill='%23C9B3E8' stroke='%232B2724' stroke-width='2.5' stroke-linejoin='round'/%3E%3Cpath d='M210 6 L240 4 L226 33 Z' fill='%23FFFEFA' stroke='%232B2724' stroke-width='2.5' stroke-linejoin='round'/%3E%3C/svg%3E") repeat-x; }
.w-base { left: -3000px; top: 236px; width: 7500px; height: 12px; box-sizing: border-box; background: var(--base);
  border-top: 2.5px solid var(--ink); border-bottom: 1.5px solid rgba(43,39,36,.45); }
.w-floor { left: -3000px; top: 248px; width: 7500px; height: 3000px;
  background: repeating-linear-gradient(0deg, rgba(120,90,50,.10) 0 1.5px, rgba(120,90,50,0) 1.5px 64px), var(--floor); }
#tap { left: -3000px; top: -2000px; width: 7500px; height: 5248px; }
.deco { pointer-events: none; }

.zone { box-sizing: border-box; border: 2.5px solid var(--ink); pointer-events: none; }
.arcade-floor { border-radius: 18px; background:
  radial-gradient(circle, var(--gold) 3px, rgba(0,0,0,0) 3.5px) 0 0 / 46px 46px,
  radial-gradient(circle, var(--coral) 3px, rgba(0,0,0,0) 3.5px) 23px 23px / 46px 46px,
  radial-gradient(circle, var(--mint) 2px, rgba(0,0,0,0) 2.5px) 12px 34px / 46px 46px, var(--navy); }
.lib-rug { border-radius: 26px; background: radial-gradient(circle, rgba(255,255,255,.7) 3px, rgba(0,0,0,0) 3.5px) 0 0 / 30px 30px, #BFE3CB; box-shadow: inset 0 0 0 9px #DCEFE2, inset 0 0 0 11.5px var(--ink); }
.runner { border-top: 0; background: linear-gradient(90deg, var(--gold) 0 12px, var(--coral) 12px calc(100% - 12px), var(--gold) calc(100% - 12px) 100%); border-radius: 0 0 60px 60px / 0 0 26px 26px; }
.desk-rug { border-radius: 50%; background: radial-gradient(circle at 50% 50%, #FBEFC4 0 58%, var(--gold) 58.5% 100%); }
.lounge-rug { border-radius: 50%; background: repeating-radial-gradient(circle at 50% 50%, #F8D9CB 0 16px, #FBE7DD 16px 32px); }
.shop-rug { border-radius: 14px; background: repeating-linear-gradient(90deg, #EADFF7 0 26px, var(--paper-hi) 26px 52px); }
.trail { width: 0; border-left: 6px dotted rgba(43,39,36,.28); pointer-events: none; }
.mat { box-sizing: border-box; text-align: center; font-family: var(--print); font-size: 17px; letter-spacing: .2em; line-height: 40px; color: var(--ink);
  background: #E9D3A6; border: 2.5px solid var(--ink); border-radius: 8px; pointer-events: none; }

.sign { box-sizing: border-box; padding: 4px 16px 1px; font-weight: 700; font-size: 22px; letter-spacing: .12em; line-height: 1.2; white-space: nowrap;
  background: var(--paper-hi); border: 2.5px solid var(--ink); border-radius: var(--torn); transform: translateX(-50%); pointer-events: none; }
.neon { padding: 12px 34px 8px; font-size: 34px; letter-spacing: .2em; color: var(--gold); background: var(--navy); border: 3px solid var(--ink); border-radius: 16px;
  outline: 4px dotted var(--gold); outline-offset: -9px; box-shadow: 0 0 0 5px rgba(245,215,110,.28), 0 6px 0 rgba(43,39,36,.3); animation: bulbs 1.1s steps(1) infinite; }
@keyframes bulbs { 50% { outline-color: var(--paper-hi); box-shadow: 0 0 0 8px rgba(245,215,110,.18), 0 6px 0 rgba(43,39,36,.3); } }
.ribbon { padding: 8px 40px 4px; font-size: 31px; letter-spacing: .16em; background: var(--coral); border-radius: 6px; box-shadow: 0 5px 0 rgba(43,39,36,.25); }

/* ── the two archways on the hall's back wall ────────────────
   About three quarters the height of the studio doors, so the doors are what the wall is about (Min, 2026-11-15),
   and open: no glass. What shows through is a still picture of the room,
   drawn small by the code that draws the room itself (lobby.js). Nothing in it moves, and only the machines,
   shelves and books in it can be tapped: a tap on one walks you in and straight up to it. */
.arch { box-sizing: border-box; width: 164px; height: 190px; overflow: hidden; background: var(--base);
  border: 3px solid var(--ink); border-bottom: 0; border-radius: 82px 82px 0 0 / 73px 73px 0 0; }
.arch.arcade { box-shadow: 0 0 0 5px var(--plum), 0 0 0 8px var(--ink), 0 0 30px 10px rgba(245,215,110,.45); }
.arch.library { box-shadow: 0 0 0 5px var(--wood), 0 0 0 8px var(--ink), 0 0 30px 10px rgba(245,215,110,.34); }
/* the signs over the two archways, a size down from the same signs inside the rooms */
.neon.side { padding: 8px 24px 5px; font-size: 25px; border-radius: 12px; }
.sign.big.side { padding: 6px 22px 3px; font-size: 23px; }
.arch-way { position: absolute; left: 0; top: 0; width: 100%; height: 100%; margin: 0; padding: 0; background: none; border: 0; border-radius: inherit; }
.arch-way:focus-visible { outline-offset: -9px; }
.glimpse { position: absolute; left: 6px; right: 6px; top: 6px; bottom: 0; overflow: hidden; pointer-events: none; border-radius: 74px 74px 0 0 / 66px 66px 0 0; }
/* the wall is thick: its inside edge, and the shade it throws on the room behind */
.glimpse::after { content: ""; position: absolute; left: 0; top: 0; right: 0; bottom: 0; border-radius: inherit; box-shadow: inset 0 0 0 2.5px var(--ink), inset 0 16px 20px -10px rgba(43,39,36,.45); }
.mini { transform-origin: 0 0; }
.mini.arcade { transform: translate(-50px, 13px) scale(.316); }
.mini.library { transform: translate(-109px, 7px) scale(.331); }
.mini, .mini *, .mini *::before, .mini *::after { pointer-events: none; animation: none !important; transition: none !important; }
.mini button { pointer-events: auto; }
/* each room's floor runs out through its archway, and its light falls on the hall floor */
.tongue { border-top: 0; border-radius: 0 0 30px 30px / 0 0 24px 24px; }
.tongue.arcade-floor { background-color: var(--plum); }
.lib-tongue { background: radial-gradient(circle, rgba(255,255,255,.7) 3px, rgba(0,0,0,0) 3.5px) 0 0 / 30px 30px, #BFE3CB; box-shadow: inset 0 0 0 7px #DCEFE2; }
.spill { border-radius: 0 0 50% 50%; }
.spill.warm { background: radial-gradient(ellipse 50% 100% at 50% 0, rgba(245,215,110,.62), rgba(242,164,136,.22) 55%, rgba(245,215,110,0) 100%); }
.spill.lamp { background: radial-gradient(ellipse 50% 100% at 50% 0, rgba(245,215,110,.5), rgba(245,215,110,0) 100%); }
.sign.big { padding: 8px 30px 4px; font-size: 31px; letter-spacing: .16em; background: var(--mint); border-radius: 6px; box-shadow: 0 5px 0 rgba(43,39,36,.25); }

/* ── inside a room ───────────────────────────────────────────
   Where a room's own floor stops, the hall's floor begins, and the doorstep there is the way back. */
.w-front { left: -3000px; top: 692px; width: 7500px; height: 3000px; box-sizing: border-box; border-top: 3px solid var(--ink);
  background: repeating-linear-gradient(0deg, rgba(120,90,50,.10) 0 1.5px, rgba(120,90,50,0) 1.5px 64px), var(--floor); }
.obj.exit { box-sizing: border-box; width: 300px; height: 96px; padding: 16px 0 0; background: var(--floor);
  border: 3px solid var(--ink); border-bottom: 0; border-radius: 34px 34px 0 0 / 26px 26px 0 0; box-shadow: 0 -10px 30px rgba(255,254,250,.3); }
.exit .mat { display: block; width: 236px; margin: 0 auto; pointer-events: none; }
.exit:hover .mat, .exit:focus-visible .mat { background: var(--gold); }
/* the session stays in view from inside a room: a tag by the way out, and a tap on it walks you to the studio doors */
.door-next.den-next { pointer-events: auto; font-size: 15px; padding: 3px 12px 1px; }
.door-next.den-next:hover, .door-next.den-next:focus-visible { background: var(--paper-hi); }
.den .cab svg { width: 104px; height: 205px; }
.den .cab-name { top: 20px; font-size: 15px; }
.mini .cab-name { font-weight: 700; }

/* ── the Arcade: the one darker room, lit warm ───────────────
   A plum wall and carpet instead of flat navy, a string of lights, lamp light on the wall, and each machine
   standing in a pool of its own colour. */
.room.arcade > .w-wall { background:
  radial-gradient(ellipse 700px 270px at 3680px 1880px, rgba(242,164,136,.38), rgba(242,164,136,0) 72%),
  radial-gradient(ellipse 300px 270px at 3140px 2090px, rgba(245,215,110,.20), rgba(245,215,110,0) 72%),
  radial-gradient(ellipse 300px 270px at 4196px 2090px, rgba(245,215,110,.20), rgba(245,215,110,0) 72%),
  linear-gradient(rgba(255,254,250,.04) 1.5px, rgba(0,0,0,0) 1.5px) 0 12px / 100% 34px,
  linear-gradient(90deg, rgba(255,254,250,.04) 1.5px, rgba(0,0,0,0) 1.5px) 0 0 / 34px 100%,
  linear-gradient(var(--plum-hi), var(--plum)); }
.room.arcade > .w-base { background: var(--plum-lo); }
.room.arcade > .w-floor { background:
  radial-gradient(circle, var(--gold) 3px, rgba(0,0,0,0) 3.5px) 0 0 / 46px 46px,
  radial-gradient(circle, var(--coral) 3px, rgba(0,0,0,0) 3.5px) 23px 23px / 46px 46px,
  radial-gradient(circle, var(--mint) 2px, rgba(0,0,0,0) 2.5px) 12px 34px / 46px 46px, var(--plum); }
/* a string of lights along the top of the wall: each bulb with its own soft halo */
.lights { left: -3000px; width: 7500px; height: 56px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='56'%3E%3Cpath d='M0 8 Q75 34 150 8 T300 8' fill='none' stroke='%23161433' stroke-width='2.5'/%3E%3Cg%3E%3Ccircle cx='26' cy='25' r='15' fill='%23F5D76E' opacity='.22'/%3E%3Ccircle cx='75' cy='30' r='15' fill='%23F2A488' opacity='.22'/%3E%3Ccircle cx='124' cy='25' r='15' fill='%239FD7AE' opacity='.22'/%3E%3Ccircle cx='176' cy='25' r='15' fill='%23C9B3E8' opacity='.24'/%3E%3Ccircle cx='225' cy='30' r='15' fill='%23F5D76E' opacity='.22'/%3E%3Ccircle cx='274' cy='25' r='15' fill='%23FFFEFA' opacity='.18'/%3E%3C/g%3E%3Cg stroke='%232B2724' stroke-width='2'%3E%3Cellipse cx='26' cy='25' rx='5.5' ry='7' fill='%23F5D76E'/%3E%3Cellipse cx='75' cy='30' rx='5.5' ry='7' fill='%23F2A488'/%3E%3Cellipse cx='124' cy='25' rx='5.5' ry='7' fill='%239FD7AE'/%3E%3Cellipse cx='176' cy='25' rx='5.5' ry='7' fill='%23C9B3E8'/%3E%3Cellipse cx='225' cy='30' rx='5.5' ry='7' fill='%23F5D76E'/%3E%3Cellipse cx='274' cy='25' rx='5.5' ry='7' fill='%23FFFEFA'/%3E%3C/g%3E%3C/svg%3E") repeat-x; }
/* maths in lights on the wall: a sum written as one glowing tube */
.neon-math { transform: translateX(-50%) rotate(var(--tilt, -2deg)); padding: 5px 16px 1px; white-space: nowrap; font-weight: 700; font-size: 30px; line-height: 1.2; letter-spacing: .04em;
  color: var(--tube, var(--coral)); border: 3px solid var(--tube, var(--coral)); border-radius: 14px;
  text-shadow: 0 0 10px var(--tube, var(--coral)); box-shadow: 0 0 14px -2px var(--tube, var(--coral)), inset 0 0 12px -4px var(--tube, var(--coral)); }
/* a paper poster pinned to the wall */
.poster { box-sizing: border-box; padding: 6px 6px 3px; text-align: center; background: var(--paper-hi); border: 2.5px solid var(--ink); border-radius: 5px; box-shadow: 0 5px 0 rgba(0,0,0,.28); transform: rotate(var(--tilt, 0deg)); }
.poster svg { display: block; width: 100%; height: auto; }
.poster b { display: block; font-weight: 700; font-size: 15px; line-height: 1.2; white-space: nowrap; }
.poster small { display: block; font-family: var(--print); font-size: 13px; line-height: 1.15; color: var(--ink-soft); }
/* over each machine: its name, and a few words on what the game is */
.placard { box-sizing: border-box; width: 146px; min-height: 60px; transform: translateX(-50%); padding: 9px 6px 2px; text-align: center; background: var(--paper-hi); border: 2.5px solid var(--ink); border-radius: 10px;
  box-shadow: inset 0 6px 0 var(--c, var(--gold)), 0 4px 0 rgba(0,0,0,.28); }
.placard b { display: block; font-weight: 700; font-size: 15px; line-height: 1.15; white-space: nowrap; }
.placard small { display: block; font-family: var(--print); font-size: 13.5px; line-height: 1.12; color: var(--ink-soft); }
.placard.pair { width: 216px; }
/* the light a machine throws: on the wall behind it, and in a pool of its own colour on the carpet */
.pool { width: 200px; height: 150px; border-radius: 50%; opacity: .5; background: radial-gradient(ellipse 50% 50% at 50% 50%, var(--c), rgba(0,0,0,0) 70%); }
.halo { width: 190px; height: 250px; border-radius: 50%; opacity: .3; background: radial-gradient(ellipse 50% 50% at 50% 50%, var(--gold), rgba(0,0,0,0) 70%); }
.lamp-pool { border-radius: 50%; background: radial-gradient(ellipse 50% 50% at 50% 50%, rgba(245,215,110,.42), rgba(245,215,110,0) 70%); }
.path { border-radius: 26px 26px 0 0; border-bottom: 0; background: repeating-linear-gradient(0deg, var(--coral) 0 26px, #F6B9A2 26px 52px); box-shadow: inset 0 0 0 8px var(--gold), inset 0 0 0 10.5px var(--ink); }
.cosy-rug { border-radius: 50%; background: repeating-radial-gradient(circle at 50% 50%, #F8D9CB 0 16px, #FBE7DD 16px 32px); }
.den .npc.cheer .spr { animation: cheer 2.6s ease-in-out infinite; animation-delay: var(--d, 0s); }
@keyframes cheer { 0%, 58%, 100% { transform: translateY(0); } 66% { transform: translateY(-10px); } 74% { transform: translateY(0); } 82% { transform: translateY(-6px); } 90% { transform: translateY(0); } }
.cheer .crv-flight-arm { transform-box: view-box; transform-origin: 71px 99px; animation: dz-cheer 2.6s ease-in-out infinite; animation-delay: var(--d, 0s); }
@keyframes dz-cheer { 0%, 56%, 94%, 100% { transform: rotate(0deg); } 64%, 86% { transform: rotate(-138deg); } 75% { transform: rotate(-112deg); } }

/* ── the Library: lamp-lit and warm ─────────────────────────── */
.room.library > .w-wall { background: linear-gradient(rgba(185,133,80,.10) 1.5px, rgba(0,0,0,0) 1.5px) 0 12px / 100% 34px,
  linear-gradient(90deg, rgba(185,133,80,.10) 1.5px, rgba(0,0,0,0) 1.5px) 0 0 / 34px 100%, #FBF1D6; }
.room.library > .w-floor { background: repeating-linear-gradient(0deg, rgba(120,90,50,.12) 0 1.5px, rgba(120,90,50,0) 1.5px 64px), #EFE1C6; }
.lamp::before { content: ""; position: absolute; left: 50%; top: -30px; width: 260px; height: 260px; margin-left: -130px; border-radius: 50%; z-index: -1;
  background: radial-gradient(circle, rgba(245,215,110,.5), rgba(245,215,110,0) 68%); }
/* a workbook standing on the table, cover out: drawn here, so the room asks for no pictures until a book is opened */
.cover span { box-sizing: border-box; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 62px; height: 80px; padding-left: 5px;
  color: var(--ink); background: linear-gradient(90deg, rgba(43,39,36,.22) 0 5px, rgba(0,0,0,0) 5px), var(--c, var(--sky));
  border: 2.5px solid var(--ink); border-radius: 3px 6px 6px 3px; box-shadow: 3px 3px 0 rgba(43,39,36,.28); transition: transform .16s ease; }
.cover small { font-family: var(--print); font-size: 11px; line-height: 1; letter-spacing: .08em; }
.cover b { font-weight: 700; font-size: 34px; line-height: 1; margin: 1px 0 -3px; }
.cover:hover span, .cover:focus-visible span { transform: translateY(-6px) rotate(-2deg); }
.shelf-note { transform: translateX(-50%); padding: 2px 10px 0; font-family: var(--print); font-size: 14px; line-height: 1.35; white-space: nowrap;
  background: var(--paper-hi); border: 2px solid var(--ink); border-radius: 9px; pointer-events: none; }
/* the lesson corner: a big screen on the wall between the bookcases, with a rug and cushions in front of it */
.screen svg { display: block; width: 204px; height: 180px; }
.screen .tag { top: auto; bottom: 9px; transform: translateX(-50%); font-size: 15px; letter-spacing: .04em; }
.screen:hover .play-mark, .screen:focus-visible .play-mark { fill: var(--blue-deep); }
.cushion { border-width: 2.5px; box-shadow: inset 0 -7px 0 rgba(43,39,36,.10); }

/* going from one room to the next: the next room's own light comes up over the picture for a moment */
#veil { position: absolute; left: 0; top: 0; right: 0; bottom: 0; z-index: 15; pointer-events: none; opacity: 0; transition: opacity .2s ease; background: var(--floor); }
#veil.on { opacity: 1; }
#veil.arcade { background: var(--plum); } #veil.library { background: #FBF1D6; }

/* things you can tap */
.obj, .thing { background: none; border: 0; padding: 0; margin: 0; display: block; }
.thing { transform: translate(-50%, -100%); }
.cab svg { display: block; width: 80px; height: 158px; }
.cab .scr { animation: flick 1.6s steps(2) infinite; animation-delay: var(--d, 0s); }
@keyframes flick { 50% { opacity: .55; } }
.cab-name { position: absolute; left: 0; right: 0; top: 15px; text-align: center; font-family: var(--print); font-size: 11.5px; line-height: 1; color: var(--ink); pointer-events: none; }

.door { box-sizing: border-box; width: 344px; height: 250px; padding: 16px 16px 0; display: flex; gap: 8px; overflow: hidden;
  background: var(--base); border: 3px solid var(--ink); border-bottom: 0; border-radius: 172px 172px 0 0 / 104px 104px 0 0;
  box-shadow: 0 0 0 7px var(--gold), 0 0 0 10px var(--ink); }
/* the room itself, seen through the doorway once the glass slides away */
.door::before { content: ""; position: absolute; left: 16px; right: 16px; top: 16px; bottom: 0; border-radius: 156px 156px 0 0 / 90px 90px 0 0;
  background: #F1E7D7; box-shadow: inset 0 0 0 2.5px var(--ink), inset 0 18px 22px -10px rgba(43,39,36,.35); }
.door i { flex: 1; display: block; position: relative; z-index: 1; border: 2.5px solid var(--ink); border-bottom: 0; background-color: rgba(220, 235, 247, .16);
  background-image: linear-gradient(var(--ink), var(--ink)), linear-gradient(112deg, rgba(255,255,255,0) 26%, rgba(255,255,255,.38) 34%, rgba(255,255,255,.1) 41%, rgba(255,255,255,0) 48%);
  background-repeat: no-repeat; background-size: 100% 2.5px, 100% 100%; background-position: 0 40%, 0 0; transition: transform .7s cubic-bezier(.4, 0, .2, 1); }
.door i:first-of-type { border-radius: 154px 6px 0 0 / 88px 6px 0 0; }
.door i:last-of-type { border-radius: 6px 154px 0 0 / 6px 88px 0 0; }
/* the live room behind the glass: the app's own room, drawn small and cropped to the middle tables */
.door-room { position: absolute; left: 16px; right: 16px; top: 16px; bottom: 0; overflow: hidden; pointer-events: none; border-radius: 156px 156px 0 0 / 90px 90px 0 0; background: #F1E7D7; }
.door-room:empty { display: none; }
.door-room svg.crv-room { position: absolute; left: -292px; top: -116px; display: block; width: 900px; height: auto; max-width: none; min-width: 0; margin: 0; border-radius: 0; box-shadow: none; background: none; }
.door-room::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 2.5px var(--ink), inset 0 18px 22px -10px rgba(43,39,36,.35); }
.door i::after { content: ""; position: absolute; top: 56%; width: 6px; height: 34px; border-radius: 3px; background: var(--ink); }
.door i:first-of-type::after { right: 7px; } .door i:last-of-type::after { left: 7px; }
.door.open i:first-of-type { transform: translateX(-97%); } .door.open i:last-of-type { transform: translateX(97%); }
.lantern { width: 34px; height: 64px; }

.case { box-sizing: border-box; width: 196px; height: 190px; padding: 8px 8px 0; display: flex; flex-direction: column; justify-content: space-between;
  background: var(--wood-lo); border: 3px solid var(--ink); border-bottom: 0; border-radius: 8px 8px 0 0; }
.shelf { display: flex; align-items: flex-end; gap: 2px; height: 38px; padding: 0 3px; border-bottom: 5px solid var(--wood); box-shadow: 0 2.5px 0 var(--ink); }
.shelf b { display: block; border: 2px solid var(--ink); border-bottom: 0; border-radius: 3px 3px 0 0; }

.desk { box-sizing: border-box; width: 248px; height: 70px; background: var(--wood); border: 3px solid var(--ink); border-radius: 10px 12px 8px 10px;
  box-shadow: inset 0 22px 0 rgba(255,255,255,.18), 0 5px 0 rgba(43,39,36,.25); }
.desk span, .counter span { position: absolute; left: 50%; bottom: 7px; transform: translateX(-50%); padding: 2px 12px 0; font-family: var(--print); font-size: 14px; letter-spacing: .16em; white-space: nowrap; line-height: 1.3;
  background: var(--paper-hi); border: 2px solid var(--ink); border-radius: 6px; }
.desk svg { position: absolute; left: 16px; top: -14px; width: 70px; height: 44px; }
.uni img { display: block; width: 104px; height: 104px; }

/* the shop stall */
.stall-back { box-sizing: border-box; background: var(--paper-lo); border: 3px solid var(--ink); border-radius: 6px; }
.stall-back::before, .stall-back::after { content: ""; position: absolute; left: 0; right: 0; height: 5px; background: var(--wood); box-shadow: 0 2px 0 var(--ink); }
.stall-back::before { top: 50px; } .stall-back::after { top: 104px; }
.stall-back span { position: absolute; width: 42px; height: 42px; } .stall-back span svg { width: 100%; height: 100%; display: block; overflow: visible; }
.awning { box-sizing: border-box; border: 3px solid var(--ink); border-radius: 12px 12px 0 0; background: repeating-linear-gradient(90deg, var(--coral) 0 11.112%, var(--paper-hi) 11.112% 22.223%); box-shadow: 0 6px 0 rgba(43,39,36,.22); }
.awning::after { content: ""; position: absolute; left: -3px; right: -3px; top: 100%; height: 17px; background: radial-gradient(circle at 17px 0, var(--coral) 15px, var(--ink) 15.5px 17.5px, rgba(0,0,0,0) 18px) 0 0 / 34px 18px round; }
.post { width: 10px; box-sizing: border-box; background: var(--wood); border: 2.5px solid var(--ink); border-radius: 3px; }
.counter { box-sizing: border-box; background: var(--wood); border: 3px solid var(--ink); border-radius: 8px; box-shadow: inset 0 18px 0 rgba(255,255,255,.18), 0 5px 0 rgba(43,39,36,.25); }

.couch { box-sizing: border-box; background: var(--coral); border: 3px solid var(--ink); border-radius: 22px 22px 10px 10px; box-shadow: inset 0 -26px 0 rgba(43,39,36,.10); }
.couch-front { box-sizing: border-box; background: #F6B9A2; border: 3px solid var(--ink); border-radius: 12px; }
.bag { border: 3px solid var(--ink); border-radius: 50%; box-sizing: border-box; }
.stool { display: block; width: 44px; height: 30px; }

/* people and pets */
.spr { display: block; }
.k { display: block; width: 92px; height: auto; overflow: visible; }
img.k { width: 60px; height: 106px; }
.npc .spr { animation: idle 2.6s ease-in-out infinite; animation-delay: var(--d, 0s); }
.npc.play .spr { animation: play .5s ease-in-out infinite; }
@keyframes idle { 50% { transform: translateY(-2.5px); } }
@keyframes play { 25% { transform: rotate(-3deg); } 75% { transform: rotate(3deg); } }
.tag { position: absolute; left: 50%; top: 100%; transform: translate(-50%, -4px); padding: 0 8px; font-family: var(--print); font-size: 14px; line-height: 1.35; white-space: nowrap;
  background: var(--paper-hi); border: 2px solid var(--ink); border-radius: 999px; pointer-events: none; }
.prop { position: absolute; left: 50%; bottom: 2px; width: 56px; height: auto; transform: translateX(-50%); pointer-events: none; }
#player { pointer-events: none; }
#player .tag { background: var(--gold); font-weight: 700; }
#player.walk .spr, .npc.walk .spr { animation: bob .3s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-5px) rotate(-2deg); } }
.shadow { position: absolute; left: 50%; bottom: -4px; width: 50px; height: 12px; margin-left: -25px; border-radius: 50%; background: rgba(43,39,36,.16); z-index: -1; }
.pet .spr { width: var(--w, 64px); animation: hop2 3.4s ease-in-out infinite; animation-delay: var(--d, 0s); }
.pet .spr svg, .pet .spr img { display: block; width: 100%; height: auto; overflow: visible; }
.pet.walk .spr { animation: bob .26s ease-in-out infinite; }
/* a Uni under the app's own rig moves by that rig alone: it breathes, blinks, glances and hops */
.pet.rigged .spr, .pet.rigged.walk .spr { animation: none; transition: transform .16s ease; }
.rig { display: block; transform-origin: 50% 100%; }
#dPort .rig { width: 100%; }
.rig svg, .rig img { display: block; width: 100%; height: auto; overflow: visible; }
/* doodles come alive: everyone blinks; whoever is speaking moves their mouth and nods; a hello gets a wave */
.dz-eye { transform-box: fill-box; transform-origin: 50% 50%; animation: dz-blink 4.6s infinite; animation-delay: var(--bd, 0s); }
@keyframes dz-blink { 0%, 93%, 100% { transform: scaleY(1); } 96% { transform: scaleY(.08); } }
.dz-talk .crv-flight-head { transform-box: view-box; transform-origin: 50px 80px; animation: dz-nod 1.3s ease-in-out infinite; }
@keyframes dz-nod { 50% { transform: rotate(-1.4deg); } }
.dz-wave .crv-flight-arm { transform-box: view-box; transform-origin: 71px 99px; animation: dz-wave 2s ease-in-out 1; }
@keyframes dz-wave { 0%, 92%, 100% { transform: rotate(0deg); } 14%, 44%, 74% { transform: rotate(-132deg); } 29%, 59% { transform: rotate(-98deg); } }
@keyframes hop2 { 0%, 14%, 100% { transform: translateY(0); } 5% { transform: translateY(-10px) rotate(-4deg); } 9% { transform: translateY(0); } 11.5% { transform: translateY(-5px); } }
.heart { position: absolute; left: 50%; top: -8px; width: 26px; height: 26px; margin-left: -13px; pointer-events: none; animation: love .9s ease-out forwards; }
.heart svg { display: block; width: 100%; height: 100%; }
@keyframes love { from { transform: translateY(6px) scale(.5); opacity: 0; } 25% { opacity: 1; transform: translateY(-8px) scale(1.1); } to { transform: translateY(-40px) scale(1); opacity: 0; } }

#mark { width: 34px; height: 34px; margin: -17px 0 0 -17px; box-sizing: border-box; text-align: center; font-weight: 700; font-size: 22px; line-height: 32px;
  background: var(--gold); border: 2.5px solid var(--ink); border-radius: 50%; pointer-events: none; z-index: 2000; animation: hop .7s ease-in-out infinite; }
@keyframes hop { 50% { transform: translateY(-6px); } }
.cloud { animation: drift 16s linear infinite; }
@keyframes drift { from { transform: translateX(-70px); } to { transform: translateX(150px); } }
.twinkle { animation: twinkle 1.8s ease-in-out infinite; transform-origin: center; transform-box: fill-box; }
@keyframes twinkle { 50% { transform: scale(.55) rotate(20deg); opacity: .5; } }

/* ── HUD ─────────────────────────────────────────────────── */
#hud { position: absolute; left: 0; right: 0; top: 0; z-index: 30; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px;
  padding-block: calc(10px + env(safe-area-inset-top, 0px)) 0; padding-left: var(--gut-l); padding-right: var(--gut-r); pointer-events: none; }
#hud > div { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; pointer-events: auto; }
/* The bar's sound buttons are a little smaller so that, on a phone, they share a row with the first button.
   Where they would cost the bar an extra row, the page hangs them under its right end instead (seatSound). */
#hudSnd { display: flex; gap: 6px; }
#hudSnd .snd { width: 40px; height: 40px; }
#hud.snd-out #hudSnd { position: absolute; right: var(--gut-r); top: calc(100% + 6px); pointer-events: auto; }
.mark { font-weight: 700; font-size: 22px; line-height: 1; padding: 8px 14px 5px; background: var(--paper-hi); border: 2.5px solid var(--ink); border-radius: var(--torn); }
.chip { font-family: var(--print); font-size: 16px; line-height: 1; padding: 8px 12px 7px; background: var(--gold); border: 2px solid var(--ink); border-radius: 999px; }
.chip.saved { background: var(--green-wash); }
.btn { min-height: 44px; box-sizing: border-box; padding: 6px 18px 4px; font-weight: 700; font-size: 18px; line-height: 1.2;
  color: var(--paper-hi); background: var(--blue); border: 2.5px solid var(--ink); border-radius: var(--torn); box-shadow: 3px 4px 0 var(--ink); }
.btn.quiet { color: var(--ink); background: var(--paper-hi); box-shadow: none; }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 2px 0 var(--ink); }

#hint { position: absolute; left: var(--gut-l); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 25; max-width: min(300px, calc(100% - 32px)); box-sizing: border-box;
  padding: 6px 16px 4px; font-family: var(--print); font-size: 17px; line-height: 1.3; text-align: left; background: var(--paper-hi); border: 2px solid var(--ink); border-radius: 16px; pointer-events: none; transition: opacity .4s; }

/* ── the opening ─────────────────────────────────────────── */
#intro { position: absolute; inset: 0; z-index: 20; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center;
  padding-block: 24px 210px; padding-left: var(--gut-l); padding-right: var(--gut-r); box-sizing: border-box;
  background: radial-gradient(ellipse 62% 56% at 50% 44%, var(--paper-hi), rgba(255,254,250,0) 72%), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='140'%3E%3Cpath d='M9 21l3-1M71 12l1 3M128 34l3 1M38 62l2-2M102 78l3-.6M150 96l1 3M18 108l3 1M64 126l2-2M118 118l-2-2M84 44l-3 1' fill='none' stroke='%238E887E' stroke-width='1' stroke-linecap='round' opacity='.14'/%3E%3C/svg%3E") 0 0 / 160px 140px, #F4EEE0;
  transition: opacity .6s; }
/* The title card centres when it fits and scrolls when it does not, so a short phone never loses the top of the
   name or the last line. The two empty ends take the spare room; plain centring would cut both ends off instead. */
#intro.title { padding-block: 24px; justify-content: flex-start; overflow-y: auto; }
#intro.title::before, #intro.title::after { content: ''; margin-block: auto; }
@media (max-height: 800px) {
  #intro.title { gap: 6px; padding-block: 12px; }
  #intro.title .tagline { margin-top: 12px; }
}
@media (max-height: 720px) { #intro.title #bigUni { width: min(300px, 46vw, 22vh); } }
#intro.gone { opacity: 0; pointer-events: none; }
#intro h1 { margin: 0; font-size: clamp(54px, 11vw, 104px); line-height: 1; font-weight: 700; }
/* the name is underlined by hand, close under the letters */
#intro h1 span { padding-bottom: 6px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 360 14' preserveAspectRatio='none'%3E%3Cpath d='M5 9C52 4 96 11 148 7S262 3 355 8' fill='none' stroke='%237FC8A9' stroke-width='6' stroke-linecap='round'/%3E%3C/svg%3E") 50% calc(100% - .13em) / 100% .14em no-repeat; }
#intro .tagline { margin: 26px 0 0; font-family: var(--print); font-size: clamp(20px, 3.4vw, 28px); color: var(--ink-soft); }
#introRow { position: relative; display: flex; align-items: flex-end; justify-content: center; }
#bigUni { width: min(300px, 46vw, 38vh); aspect-ratio: 1; animation: float 2.6s ease-in-out infinite; }
/* a soft shadow on the ground, so Uni and Sara stand on the page instead of hanging in it */
#introRow::after { content: ""; position: absolute; left: 50%; bottom: -1%; width: 56%; height: 6%; z-index: -1; transform: translateX(-50%); border-radius: 50%; background: rgba(43,39,36,.09); }
#bigUni svg { display: block; width: 100%; height: 100%; overflow: visible; }
/* the baby Uni sits beside Sara without being part of the row, so she never moves when it arrives or speaks */
#baby { position: absolute; left: calc(50% + min(115px, 20vw, 18vh) + 4px); bottom: 3%; width: min(130px, 22vw, 17vh); transform-origin: 0 100%;
  animation: comeOut .6s cubic-bezier(.2, 1.4, .4, 1) both, float 2.1s ease-in-out .6s infinite; }
@keyframes comeOut { from { transform: translateX(-70%) scale(.15); opacity: 0; } }
#baby svg, #baby img, #bigSara svg, #bigSara img { display: block; width: 100%; height: auto; overflow: visible; }
#baby { transition: width .25s ease; } #baby.talk { width: min(165px, 27vw, 21vh); }
#bigSara { width: min(230px, 40vw, 36vh); }
@keyframes float { 50% { transform: translateY(-8px); } }
@keyframes pop { from { transform: scale(0); } }
#intro .btn { font-size: 23px; min-height: 56px; padding: 8px 26px 6px; }
#intro .who { margin: 4px 0 0; font-family: var(--print); font-size: 21px; color: var(--ink-soft); }
.starts { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
#intro .staff { margin: 0; font-family: var(--print); font-size: 15px; color: var(--ink-soft); }
#intro .staff a { display: inline-block; min-height: 44px; padding: 0 6px; line-height: 44px; color: inherit; text-decoration: underline; }
.linky { min-height: 44px; padding: 0 10px; background: none; border: 0; font-family: var(--print); font-size: 19px; color: var(--blue-deep); text-decoration: underline; }
#tBack { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.back-row { display: flex; align-items: flex-end; justify-content: center; gap: 4px; }
#backUni { width: min(120px, 22vw, 18vh); margin-bottom: 4%; animation: float 2.1s ease-in-out infinite; }
#backUni svg { display: block; width: 100%; height: auto; overflow: visible; }
#intro h2 { margin: 0; font-size: clamp(30px, 6vw, 46px); line-height: 1.1; }
#intro .note { margin: 6px 0 0; font-family: var(--print); font-size: 16px; color: var(--ink-soft); }

/* ── dialogue box ────────────────────────────────────────── */
#dlg { position: absolute; left: 0; right: 0; bottom: 0; z-index: 40; padding-block: 0 calc(14px + env(safe-area-inset-bottom, 0px)); padding-left: var(--gut-l); padding-right: var(--gut-r); pointer-events: none; }
.card { position: relative; max-width: 900px; margin: 0 auto; box-sizing: border-box; padding: 18px 22px 14px; pointer-events: auto;
  background: var(--paper-hi); border: 3px solid var(--ink); border-radius: var(--torn); box-shadow: 5px 6px 0 var(--ink); display: flex; gap: 14px; align-items: flex-start; }
#dWho { position: absolute; left: 22px; top: -17px; padding: 2px 14px 0; font-weight: 700; font-size: 17px; line-height: 1.4; background: var(--gold); border: 2.5px solid var(--ink); border-radius: 999px; }
/* Sound and music: the same two round buttons on the dialogue card and in the top bar. */
.snd { flex: none; width: 44px; height: 44px; box-sizing: border-box; padding: 0; display: flex; align-items: center; justify-content: center;
  background: var(--paper-hi); border: 2.5px solid var(--ink); border-radius: 50%; }
.snd svg { width: 24px; height: 24px; } .snd .off { display: none; }
.snd[aria-pressed="false"] .on { display: none; } .snd[aria-pressed="false"] .off { display: inline; }
.snd[disabled] { opacity: .45; }
#dSound { position: absolute; right: 16px; top: -22px; }
#dMusic { position: absolute; right: 66px; top: -22px; }
#dPort { flex-shrink: 0; width: 84px; height: 84px; display: flex; align-items: center; justify-content: center; }
#dPort img, #dPort svg { display: block; width: 100%; height: auto; max-height: 100%; object-fit: contain; overflow: visible; }
#dPort.kid { width: 76px; height: 76px; box-sizing: border-box; border: 2.5px solid var(--ink); border-radius: 50%; background: var(--paper-lo); overflow: hidden; align-items: flex-start; }
#dPort.kid svg, #dPort.kid img { width: 118%; max-height: none; margin-top: 6%; flex-shrink: 0; }
.body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
#dText { margin: 0; min-height: 2.7em; font-size: clamp(19px, 2.5vw, 24px); line-height: 1.35; user-select: text; -webkit-user-select: text; }
#dNext { position: absolute; right: 16px; bottom: 8px; width: 22px; height: 22px; animation: hop .7s ease-in-out infinite; pointer-events: none; }
#dOpts { display: flex; flex-wrap: wrap; gap: 8px; max-height: 46vh; overflow-y: auto; padding: 3px; margin: -3px; }
.opt { min-height: 44px; box-sizing: border-box; display: inline-flex; align-items: center; padding: 6px 16px 4px; font-family: var(--print); font-size: 19px; line-height: 1.2; text-decoration: none;
  color: var(--ink); background: var(--paper-lo); border: 2.5px solid var(--ink); border-radius: 999px; }
/* beside a row of picture cards a plain answer keeps its own height, instead of stretching into an egg */
.opt:not(.look) { align-self: center; }
.opt:hover, .opt:focus-visible { background: var(--gold); }
.opt.go { color: var(--paper-hi); background: var(--blue); font-family: var(--hand); font-weight: 700; }
.opt.go:hover, .opt.go:focus-visible { background: var(--blue-deep); }
.opt.look { padding: 6px 8px 3px; border-radius: 16px; flex-direction: column; gap: 2px; background: var(--paper-hi); width: 98px; justify-content: flex-end; }
.opt.look:hover, .opt.look:focus-visible { background: var(--gold); }
.opt.look .pic { display: block; width: 68px; } .opt.look .pic.wide { width: 76px; }
.opt.look .pic svg, .opt.look .pic img { display: block; width: 100%; height: auto; overflow: visible; }
.opt.look small { font-size: 13px; line-height: 1.15; text-align: center; }
/* a seat ticket: the day, the time, how far away */
.opt.look.tkt { width: 116px; padding: 9px 6px 5px; justify-content: center; }
.opt.look.tkt .pic { width: auto; text-align: center; }
.tkt-day { display: block; font-family: var(--print); font-size: 14px; line-height: 1.1; color: var(--ink-soft); }
.tkt-time { display: block; font-family: var(--hand); font-weight: 700; font-size: 22px; line-height: 1.2; white-space: nowrap; }
.opt.look.tkt.now { background: var(--gold); }
@media (max-width: 560px) { .opt.look.tkt { width: 98px; padding: 7px 4px 4px; } .tkt-time { font-size: 19px; } }
/* the next table, on a tag under the studio sign */
.door-next { position: absolute; transform: translateX(-50%); box-sizing: border-box; padding: 2px 10px 0; font-family: var(--print); font-size: 14px; line-height: 1.35; white-space: nowrap;
  color: var(--ink); background: var(--gold); border: 2px solid var(--ink); border-radius: 9px; box-shadow: 2px 2px 0 rgba(43,39,36,.3); pointer-events: none; }
.door-next:empty { display: none; }
/* opening it on the iPad */
#handoff { position: absolute; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; box-sizing: border-box; background: rgba(43, 39, 36, .55);
  padding-block: 14px; padding-left: var(--gut-l); padding-right: var(--gut-r); }
.ho-row { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.ho-qr { flex: none; width: 168px; height: 168px; box-sizing: border-box; padding: 8px; background: #fff; border: 2.5px solid var(--ink); border-radius: 12px; }
.ho-steps { flex: 1; min-width: 220px; margin: 0; padding-left: 26px; font-family: var(--print); font-size: 20px; line-height: 1.35; color: var(--ink); }
.ho-steps li { margin: 0 0 6px; }
.ho-ctl { display: flex; gap: 12px; flex-wrap: wrap; }
a.btn { display: inline-flex; align-items: center; text-decoration: none; }
.field { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.field label { flex-basis: 100%; font-family: var(--print); font-size: 16px; color: var(--ink-soft); }
.field input { flex: 1 1 200px; min-width: 0; height: 48px; box-sizing: border-box; padding: 4px 14px; font-family: var(--print); font-size: 21px;
  background: var(--paper); border: 2.5px solid var(--ink); border-radius: 12px; user-select: text; -webkit-user-select: text; }

/* ── a sheet over everything (the iPad handoff) ──────────── */
.sheet { max-width: 720px; width: 100%; max-height: 100%; overflow: auto; box-sizing: border-box; padding: 20px 22px; display: flex; flex-direction: column; gap: 12px;
  background: var(--paper-hi); border: 3px solid var(--ink); border-radius: var(--torn); box-shadow: 6px 7px 0 var(--ink); }
.sheet h2 { margin: 0; font-size: 30px; line-height: 1.15; text-wrap: balance; }
.sheet p { margin: 0; font-family: var(--print); font-size: 20px; line-height: 1.35; color: var(--ink-soft); }
.sheet img { width: 100%; height: auto; border: 2.5px solid var(--ink); border-radius: 10px; box-sizing: border-box; }
.sheet .btn { align-self: flex-start; }

/* ── full-screen things: a real game, an open book, Ivy's iPad ── */
#play, #book, #ipad, #peek { position: absolute; inset: 0; z-index: 60; box-sizing: border-box; display: flex; flex-direction: column; }
#play { background: var(--paper); }
/* inside the Math Studio: the app's own room fills the screen, a session plays, and a caption card sits where the dialogue box does */
#peek { display: block; background: #F1E7D7; opacity: 0; transition: opacity .45s ease; }
#peek.in { opacity: 1; }
.peek-room { position: absolute; left: 0; right: 0; top: 0; bottom: 0; box-sizing: border-box; padding: calc(62px + env(safe-area-inset-top, 0px)) var(--gut-r) 150px var(--gut-l); }
.peek-room svg.crv-room { display: block; width: 100%; height: 100%; max-width: none; min-width: 0; margin: 0; border-radius: 0; box-shadow: none; background: none; }
.peek-top { position: absolute; left: 0; right: 0; top: 0; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px;
  padding-block: calc(10px + env(safe-area-inset-top, 0px)) 0; padding-left: var(--gut-l); padding-right: var(--gut-r); }
.peek-top > div { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.peek-card { position: absolute; left: 0; right: 0; bottom: 0; padding-block: 0 calc(14px + env(safe-area-inset-bottom, 0px)); padding-left: var(--gut-l); padding-right: var(--gut-r); pointer-events: none; }
.peek-card > div { position: relative; max-width: 900px; margin: 0 auto; box-sizing: border-box; padding: 18px 22px 12px; background: var(--paper-hi); border: 3px solid var(--ink); border-radius: var(--torn); box-shadow: 5px 6px 0 var(--ink); }
.peek-clock { position: absolute; left: 22px; top: -17px; padding: 2px 14px 0; font-weight: 700; font-size: 17px; line-height: 1.4; background: var(--gold); border: 2.5px solid var(--ink); border-radius: 999px; }
.peek-cap { margin: 0; min-height: 2.6em; font-size: clamp(19px, 2.4vw, 24px); line-height: 1.3; }
.peek-note { margin: 4px 0 0; font-family: var(--print); font-size: 15px; color: var(--ink-soft); }
#playFrame { flex: 1; min-height: 0; width: 100%; border: 0; background: var(--paper); }
/* the frame's top bar: what is playing, and the way back */
#play .bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; box-sizing: border-box; background: var(--paper-hi); border-bottom: 3px solid var(--ink);
  padding-block: calc(8px + env(safe-area-inset-top, 0px)) 8px; padding-left: var(--gut-l); padding-right: var(--gut-r); }
#play .bar b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 22px; line-height: 1.2; }
#play .bar .btn { flex: none; }
#playMiss { margin: auto; max-width: 520px; padding: 20px; text-align: center; font-family: var(--print); font-size: 20px; line-height: 1.35; color: var(--ink-soft); }
#book, #ipad { background: rgba(43, 39, 36, .55); align-items: center; justify-content: center; padding-block: 14px; padding-left: var(--gut-l); padding-right: var(--gut-r); }
.book-sheet { width: 100%; max-width: 820px; max-height: 100%; min-height: 0; box-sizing: border-box; display: flex; flex-direction: column; gap: 10px; padding: 14px 16px;
  background: var(--paper-hi); border: 3px solid var(--ink); border-radius: var(--torn); box-shadow: 6px 7px 0 var(--ink); }
.book-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.book-head img { width: 52px; height: auto; border: 2px solid var(--ink); border-radius: 4px; flex-shrink: 0; }
.book-head div { flex: 1; min-width: 160px; }
.book-head h2 { margin: 0; font-size: 26px; line-height: 1.1; }
.book-head p, #bkFoot { margin: 0; font-family: var(--print); font-size: 17px; line-height: 1.3; color: var(--ink-soft); }
.book-page { flex: 1; min-height: 0; overflow: auto; background: var(--paper-lo); border: 2.5px solid var(--ink); border-radius: 8px; }
.book-page img { display: block; width: 100%; max-width: 700px; height: auto; margin: 0 auto; }
.book-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.book-nav .btn[disabled] { opacity: .4; box-shadow: none; cursor: default; }
/* the download: a button by the title, then an email asked for on the same sheet, then the link */
.book-get { flex: none; display: flex; flex-direction: column; align-items: center; gap: 3px; }
.book-get small, .book-keep { margin: 0; font-family: var(--print); font-size: 15.5px; line-height: 1.25; color: var(--ink-soft); }
.book-ask, .book-ready { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; align-items: flex-start; gap: 9px; padding: 4px 6px 8px 4px; user-select: text; -webkit-user-select: text; }
.book-ask > *, .book-ready > * { flex-shrink: 0; }            /* the panel scrolls; nothing in it is squeezed */
.book-ask h3, .book-ready h3 { margin: 0; font-size: 25px; line-height: 1.15; text-wrap: balance; }
.book-lead { margin: 0; padding: 3px 12px 1px; font-size: 19px; line-height: 1.3; background: var(--gold); border: 2px solid var(--ink); border-radius: 12px; }
.book-label { display: block; font-family: var(--print); font-size: 17px; line-height: 1.3; color: var(--ink-soft); }
.book-who .book-label { flex-basis: 100%; }                   /* the question takes its own line above the three answers */
.book-who { display: flex; flex-wrap: wrap; gap: 8px; }
.book-who .opt[aria-pressed="true"] { font-family: var(--hand); font-weight: 700; font-size: 18px; background: var(--gold); box-shadow: 2px 3px 0 var(--ink); }
#bkEmail { width: 100%; max-width: 440px; height: 50px; box-sizing: border-box; padding: 4px 14px; font-family: var(--print); font-size: 21px; color: var(--ink);
  background: var(--paper); border: 2.5px solid var(--ink); border-radius: 12px; user-select: text; -webkit-user-select: text; }
.book-err { margin: 0; padding: 3px 12px 1px; font-family: var(--print); font-size: 18px; line-height: 1.3; background: #FCE4DA; border: 2px solid var(--ink); border-radius: 12px; }
.book-ctl { display: flex; flex-wrap: wrap; gap: 10px; padding: 2px 5px 5px 0; }
.book-ctl .btn[disabled] { opacity: .55; box-shadow: none; cursor: default; }
#bkReadyName { margin: 0; font-family: var(--print); font-size: 20px; line-height: 1.3; }
#bkFile { font-size: 21px; min-height: 52px; padding: 8px 24px 6px; margin: 4px 5px 4px 0; }
@media (max-width: 560px) {
  .book-head h2 { font-size: 22px; }
  .book-get { flex-direction: row; flex-basis: 100%; gap: 10px; order: 3; }
  .book-ask h3, .book-ready h3 { font-size: 22px; }
  /* with the form up on a phone the cover and the small print make room: a keyboard takes half the screen */
  .book-sheet.asking #bkCover, .book-sheet.asking #bkMeta { display: none; }
  .book-sheet.asking .book-head h2 { font-size: 19px; }
}
.pad-wrap { width: 100%; max-width: 960px; max-height: 100%; overflow: auto; }
.pad { box-sizing: border-box; padding: 14px; background: #3A3F4B; border: 3px solid var(--ink); border-radius: 26px; box-shadow: 6px 7px 0 var(--ink); }
/* The student board, drawn to the app's own measurements: a 1180-point stage scaled to fit, as the real one is. */
.pad-screen { position: relative; aspect-ratio: 1180 / 770; overflow: hidden; border-radius: 10px; background: #e3dfd6; }
.bd { position: absolute; left: 0; top: 0; width: 1180px; height: 770px; transform-origin: 0 0; display: flex; flex-direction: column; color: #2b2a28; font-family: Kalam, 'Patrick Hand', cursive; }
.bd-status { height: 24px; padding: 0 18px; text-align: right; font-size: 15px; line-height: 24px; color: #625d55; background: #fcfaf3; }
.bd-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 14px; padding: 6px 18px 8px; background: #fcfaf3; }
.bd-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.bd-ring { flex-shrink: 0; width: 48px; height: 48px; } .bd-ring svg { display: block; width: 100%; height: 100%; }
#bdArc { transition: stroke-dasharray .6s ease; }
.bd-title { font-size: 18px; line-height: 1.25; color: #625d55; } .bd-title b { color: #2b2a28; }
.bd-mid svg { display: block; width: 30px; height: 30px; }
.bd-right { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.bd-xp { font-size: 17px; color: #625d55; white-space: nowrap; } .bd-xp.won { color: #2e7d4f; font-weight: 700; }
.bd-save { font-size: 16px; color: #625d55; min-width: 62px; text-align: right; } .bd-save.ok { color: #2e7d4f; }
.bd-btn { position: relative; box-sizing: border-box; min-height: 40px; padding: 5px 18px 3px; font-family: Kalam, cursive; font-weight: 700; font-size: 18px; line-height: 1.2; text-transform: lowercase; white-space: nowrap;
  color: #173f86; background: #e1ecfd; border: 2.2px solid #2563c9; border-radius: 12px 15px 11px 16px / 15px 11px 16px 12px; }
.bd-btn::after { content: ""; position: absolute; inset: -3px; border: 1.6px solid currentColor; border-radius: 14px 11px 16px 12px / 11px 16px 12px 15px; opacity: .42; transform: rotate(-.8deg); pointer-events: none; }
.bd-btn.ghost { color: #2b2a28; background: #fffefa; border-color: #2b2a28; }
.bd-btn.marking { color: #2b2a28; background: rgba(247,227,107,.78); border-color: rgba(174,118,22,.75); }
.bd-btn.solution { color: #1d5a37; background: #dcefe2; border-color: #2e7d4f; cursor: pointer; }
.bd-btn.press { transform: translate(1.5px, 1.5px); }
.bd-strip { display: flex; align-items: flex-end; gap: 10px; height: 68px; box-sizing: border-box; padding: 0 18px 8px; background: #fcfaf3; border-bottom: 5px double rgba(37,99,201,.5); font-size: 22px; color: #2563c9; }
.bd-strip > b { align-self: center; font-weight: 700; }
.bd-pills { flex: 1; display: flex; justify-content: center; gap: 12px; }
.pill { position: relative; width: 80px; text-align: center; font-size: 14px; line-height: 1.3; color: #2b2a28; }
.pill i { display: block; height: 10px; margin-bottom: 3px; border-radius: 3px; box-sizing: border-box; border: 1.5px solid rgba(43,42,40,.55); }
.pill.right i { border: 0; background: rgba(126,211,150,.7); } .pill.wrong i { border: 0; background: rgba(242,150,104,.72); } .pill.sent i { border: 0; background: rgba(247,227,107,.78); }
.pill.inked i { background: repeating-linear-gradient(135deg, rgba(43,42,40,.6) 0 1.5px, rgba(0,0,0,0) 1.5px 5px); }
.pill.cur { font-weight: 700; }
.pill.cur::after { content: ""; position: absolute; left: -8px; right: -8px; top: -9px; bottom: -3px; border: 2.4px solid #2563c9; border-radius: 50% 46% 52% 48% / 55% 50% 50% 45%; transform: rotate(-2deg); }
.bd-paper { position: relative; flex: 1; min-height: 0; overflow: hidden;
  background: linear-gradient(rgba(70,138,176,.13) 1px, rgba(0,0,0,0) 1px) 0 0 / 100% 44px, linear-gradient(90deg, rgba(70,138,176,.13) 1px, rgba(0,0,0,0) 1px) 0 0 / 44px 100%, #fbf8f0; }
.bd-q { position: absolute; left: 16px; top: 20px; right: 16px; margin: 0; font: 27px/1.4 -apple-system, 'SF Pro Text', 'Helvetica Neue', Arial, sans-serif; color: #000; }
.bd-q .fr { vertical-align: middle; font-size: .82em; margin: 0 2px; } .bd-q .fr i:first-child { border-bottom-width: 2px; }
.bd-ink { position: absolute; left: 60px; top: 196px; display: flex; flex-direction: column; gap: 10px; }
.bd-ink p { margin: 0; align-self: flex-start; display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 34px; color: #111; clip-path: inset(-10% 100% -10% 0); transition: clip-path 1.1s linear; }
.bd-ink p.on { clip-path: inset(-10% 0 -10% 0); }
.fr { display: inline-flex; flex-direction: column; align-items: center; line-height: 1.05; }
.fr i { font-style: normal; padding: 0 4px; } .fr i:first-child { border-bottom: 3px solid currentColor; }
.bd-tray { position: absolute; right: 20px; top: 46.5%; transform: translateY(-50%); width: 56px; box-sizing: border-box; padding: 8px 0 10px; display: flex; flex-direction: column; align-items: center; gap: 8px;
  background: #fffefa; border: 1.8px solid rgba(43,42,40,.5); border-radius: 18px 16px 19px 15px; box-shadow: 0 6px 14px -8px rgba(43,42,40,.5); }
.bd-tray::before { content: ""; width: 22px; border-top: 2.5px dashed rgba(43,42,40,.4); margin-bottom: 2px; }
.bd-tray span { width: 42px; height: 42px; display: flex; align-items: center; justify-content: center; border-radius: 50%; }
.bd-tray span.on { background: rgba(247,227,107,.78); }
.bd-tray svg { width: 26px; height: 26px; }
.bd-uni { position: absolute; right: 20px; bottom: -6px; width: 124px; }
.bd-uni svg, .bd-uni img { display: block; width: 100%; height: auto; overflow: visible; }
.bd-sol { position: absolute; inset: 0; display: flex; flex-direction: column; background: #fffefa; }
.bd-sol-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 18px; font-size: 20px; border-bottom: 2px solid rgba(43,42,40,.3); }
.bd-sol img { flex: 1; min-height: 0; width: 100%; object-fit: contain; background: #fff; }
.pad-ctl { display: flex; justify-content: center; gap: 12px; margin-top: 14px; flex-wrap: wrap; }

/* ── the lessons: a paper sheet over the dimmed Library ──────
   Level chips, a "Start here" row and the sets as plain tiles; a set opens to its chapters on the left and the
   chosen chapter's topics on the right. Drawn here: no cover pictures, no logos. */
#lessons { position: absolute; inset: 0; z-index: 60; box-sizing: border-box; display: flex; justify-content: center; background: rgba(43, 39, 36, .55);
  padding-block: calc(14px + env(safe-area-inset-top, 0px)) calc(14px + env(safe-area-inset-bottom, 0px)); padding-left: var(--gut-l); padding-right: var(--gut-r); }
.ls-sheet { width: 100%; max-width: 1080px; min-height: 0; box-sizing: border-box; display: flex; flex-direction: column; overflow: hidden;
  background: var(--paper-hi); border: 3px solid var(--ink); border-radius: var(--torn); box-shadow: 6px 7px 0 var(--ink); }
.ls-head { display: flex; align-items: center; gap: 4px 14px; padding: 9px 12px 8px 18px; background: var(--paper-lo); border-bottom: 3px solid var(--ink); }
.ls-head h2 { margin: 0; font-size: 28px; line-height: 1.1; }
.ls-head p { flex: 1; min-width: 0; margin: 0; padding-top: 3px; font-family: var(--print); font-size: 18px; line-height: 1.25; color: var(--ink-soft); }
.ls-head .btn { flex: none; }
.ls-body { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 4px 18px 14px; }
.ls-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 8px 8px 4px; margin: 0 -8px 0 -4px; }
.ls-chips { flex: none; display: flex; gap: 8px; padding: 14px 4px 10px; margin-bottom: 8px; overflow-x: auto; scrollbar-width: none; border-bottom: 2px dashed rgba(43, 39, 36, .25); }
.ls-chips::-webkit-scrollbar { display: none; }
.ls-chip { position: relative; flex: none; min-height: 44px; box-sizing: border-box; padding: 5px 16px 3px; font-family: var(--print); font-size: 19px; line-height: 1.1; white-space: nowrap;
  color: var(--ink); background: var(--paper-lo); border: 2.5px solid var(--ink); border-radius: 999px; }
.ls-chip:hover { background: #FFF6CF; }
.ls-chip.on, .ls-chip.on:hover { font-family: var(--hand); font-weight: 700; font-size: 18px; background: var(--gold); box-shadow: 2px 3px 0 var(--ink); }
.ls-yours { position: absolute; right: -8px; top: -13px; z-index: 1; padding: 0 8px; font-family: var(--print); font-style: normal; font-weight: 400; font-size: 13.5px; line-height: 1.4; white-space: nowrap;
  color: var(--paper-hi); background: var(--blue); border: 2px solid var(--ink); border-radius: 999px; transform: rotate(3deg); }
.ls-h { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 10px; margin: 6px 0 8px; font-size: 21px; line-height: 1.2; }
.ls-h small { font-family: var(--print); font-weight: 400; font-size: 16.5px; color: var(--ink-soft); }
.ls-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 14px; margin: 0 0 14px; padding: 0 5px 5px 0; }
.ls-row.start { padding-bottom: 14px; border-bottom: 2px dashed rgba(43, 39, 36, .25); }
/* a set of lessons: a plain tile, its grade on the edge like the spine of a book lying flat */
.ls-tile { display: flex; align-items: stretch; min-height: 60px; padding: 0; text-align: left; color: var(--ink); background: var(--paper); border: 2.5px solid var(--ink); border-radius: 5px 12px 12px 5px; }
.ls-tile:hover, .ls-tile:focus-visible { background: #FFF6CF; }
.ls-tile i { flex: none; width: 46px; display: flex; align-items: center; justify-content: center; font-style: normal; font-weight: 700; font-size: 24px; line-height: 1;
  background: var(--c, var(--sky)); border-right: 2.5px solid var(--ink); border-radius: 2px 0 0 2px; box-shadow: inset -7px 0 0 rgba(255, 255, 255, .4); }
.ls-tile span { min-width: 0; display: flex; flex-direction: column; justify-content: center; padding: 6px 12px 3px; }
.ls-tile b { font-size: 17px; line-height: 1.2; }
.ls-tile small { font-family: var(--print); font-size: 15.5px; line-height: 1.25; color: var(--ink-soft); }
/* a topic: a lesson to play, or a lecture video to watch (its own mark, and a warm tag in place of the blue one) */
.ls-topic { width: 100%; box-sizing: border-box; display: flex; align-items: center; gap: 11px; min-height: 52px; padding: 6px 12px 4px 10px; text-align: left; font-family: var(--hand); font-weight: 700; font-size: 18.5px; line-height: 1.2;
  color: var(--ink); background: var(--paper-hi); border: 2.5px solid var(--ink); border-radius: var(--torn); box-shadow: 3px 4px 0 var(--ink); }
button.ls-topic:hover, button.ls-topic:focus-visible { background: #FFF6CF; }
button.ls-topic:active { transform: translate(2px, 2px); box-shadow: 1px 2px 0 var(--ink); }
.ls-topic > span { flex: 1; min-width: 0; }
.ls-topic em { flex: none; padding: 1px 11px 0; font-family: var(--print); font-style: normal; font-weight: 400; font-size: 16px; line-height: 1.4; color: var(--blue-deep); background: #E1ECFD; border: 2px solid var(--ink); border-radius: 999px; }
.ls-topic svg { flex: none; display: block; width: 30px; height: 30px; }
.ls-topic .ls-seen { width: 24px; height: 24px; }
.ls-topic.video em { color: var(--ink); background: #FCE4DA; }
/* loading, and a read that failed */
.ls-note { margin: auto; max-width: 460px; padding: 26px 8px; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.ls-note p { margin: 0; font-family: var(--print); font-size: 22px; line-height: 1.35; color: var(--ink-soft); }
.ls-wait { margin: 2px 0 10px; font-family: var(--print); font-size: 17px; line-height: 1.3; color: var(--ink-soft); }
/* a set, opened */
.ls-back { align-self: flex-start; display: inline-flex; align-items: center; gap: 2px; min-height: 44px; margin-top: 2px; padding: 0 10px 0 0; font-family: var(--print); font-size: 18px; color: var(--blue-deep); background: none; border: 0; text-decoration: underline; text-underline-offset: 3px; }
.ls-back svg { width: 20px; height: 20px; }
.ls-set { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.ls-set h3 { margin: 0; font-size: 32px; line-height: 1.1; text-wrap: balance; }
.ls-meta { margin: 3px 0 9px; font-family: var(--print); font-size: 19px; line-height: 1.3; color: var(--ink-soft); }
.ls-cols { flex: 1; min-height: 0; display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 18px; }
.ls-chapters { min-height: 0; overflow-y: auto; margin: 0; padding: 6px; list-style: none; display: flex; flex-direction: column; gap: 3px; background: var(--paper); border: 2.5px solid var(--ink); border-radius: 12px; }
.ls-chap { width: 100%; box-sizing: border-box; display: block; min-height: 46px; padding: 6px 12px 3px; text-align: left; font-family: var(--print); font-size: 18.5px; line-height: 1.15; color: var(--ink);
  background: none; border: 2px solid rgba(0, 0, 0, 0); border-radius: 10px; }
.ls-chap:hover { background: var(--paper-lo); }
.ls-chap.on { font-family: var(--hand); font-weight: 700; font-size: 17px; background: #FFF6CF; border-color: var(--ink); }
.ls-topics { min-height: 0; overflow-y: auto; padding: 0 10px 8px 2px; }
.ls-topics h4 { margin: 2px 0 6px; font-size: 23px; line-height: 1.2; }
.ls-topics h5 { margin: 12px 0 7px; font-family: var(--print); font-weight: 400; font-size: 17px; line-height: 1.25; color: var(--ink-soft); }
.ls-topics ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
@media (max-width: 760px) {
  #lessons { padding-left: 8px; padding-right: 8px; padding-block: calc(8px + env(safe-area-inset-top, 0px)) calc(8px + env(safe-area-inset-bottom, 0px)); }
  .ls-sheet { box-shadow: 4px 5px 0 var(--ink); }
  .ls-head { flex-wrap: wrap; padding: 7px 8px 6px 12px; }
  .ls-head h2 { flex: 1; font-size: 24px; }
  .ls-head p { order: 3; flex-basis: 100%; padding-top: 0; font-size: 16px; }
  .ls-body { padding: 2px 10px 10px; }
  .ls-chips { gap: 6px; padding-top: 13px; }
  .ls-chip { min-height: 44px; padding-inline: 13px; font-size: 17.5px; } .ls-chip.on, .ls-chip.on:hover { font-size: 16.5px; }
  .ls-row { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .ls-set h3 { font-size: 24px; }
  .ls-meta { font-size: 16.5px; margin-bottom: 6px; }
  .ls-cols { display: flex; flex-direction: column; gap: 8px; }
  .ls-chapters { flex: none; flex-direction: row; overflow-x: auto; overflow-y: hidden; padding: 5px; gap: 4px; scrollbar-width: none; }
  .ls-chapters::-webkit-scrollbar { display: none; }
  .ls-chapters li { flex: none; }
  .ls-chap { width: auto; min-height: 44px; white-space: nowrap; font-size: 17px; padding-top: 11px; } .ls-chap.on { font-size: 16px; }
  .ls-topics { flex: 1; padding-right: 6px; }
  .ls-topics h4 { font-size: 19px; }
  .ls-topic { font-size: 17px; gap: 9px; padding-inline: 8px 10px; min-height: 50px; } .ls-topic em { font-size: 14.5px; padding-inline: 8px; }
  #play .bar b { font-size: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  #player.walk .spr, .npc .spr, .npc.play .spr, .den .npc.cheer .spr, .cheer .crv-flight-arm, .pet .spr, #mark, #bigUni, #baby, #dNext, .neon, .cab .scr, .cloud, .twinkle, .dz-eye, .dz-talk .crv-flight-head, .dz-wave .crv-flight-arm { animation: none; }
  .bd-ink p, #bdArc, #veil, .cover span { transition: none; }
  #intro { transition: none; }
}
