*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; height: 100%; }
body { margin: 0; min-height: 100dvh; background: var(--bg); color: var(--ink); font-family: var(--font-ui); line-height: 1.4; -webkit-font-smoothing: antialiased; overscroll-behavior: none; overflow: hidden; touch-action: manipulation; }
h1, h2, h3 { margin: 0; font-family: var(--font-display); line-height: 1.1; font-weight: 800; }
p { margin: 0; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; touch-action: manipulation; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-touch-callout: none; -webkit-user-select: none; }
:focus-visible { outline: 4px solid var(--focus); outline-offset: 3px; border-radius: var(--r-md); }
[tabindex="-1"]:focus { outline: none; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.learn { font-family: var(--font-learn); font-weight: 700; }
svg.icon { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* Screens fill the viewport; the play screen never scrolls. */
.screen { position: fixed; inset: 0; display: flex; flex-direction: column; padding: max(var(--gutter), env(safe-area-inset-top)) max(var(--gutter), env(safe-area-inset-right)) max(var(--gutter), env(safe-area-inset-bottom)) max(var(--gutter), env(safe-area-inset-left)); container-type: size; container-name: screen; overflow: hidden; }
.screen[data-enter] { animation: rise-fade var(--t-base) var(--ease-out); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2); min-height: 48px; padding: 0 var(--s-5); border-radius: var(--r-pill); background: var(--surface-2); color: var(--ink); font-weight: 800; font-family: var(--font-display); transition: transform var(--t-fast) var(--ease-out), background var(--t-fast); box-shadow: var(--shadow-1); }
.btn:active { transform: scale(.96); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-icon { width: 48px; height: 48px; min-height: 48px; padding: 0; }
/* Child-facing round buttons: 64 px minimum */
.kid-btn { display: inline-grid; place-items: center; width: var(--tap); height: var(--tap); border-radius: 50%; background: var(--surface); color: var(--ink); box-shadow: var(--shadow-2); transition: transform var(--t-press) var(--ease-out); }
.kid-btn:active { transform: scale(.92); }
.kid-btn svg.icon { width: 30px; height: 30px; }
.row { display: flex; align-items: center; gap: var(--s-3); } .grow { flex: 1; }
