/* ───────── the interface's design tokens (18.11.2026) ─────────
   One palette, one type scale, one rhythm for every screen that is not the canvas: the menu, the parent gate, «מי משחק
   היום?», the team area, the owl screen's overlays. The colours belong to the painted forest (public/owl/bg-*.webp): dusk
   plum for surfaces, the fire's amber for the one primary action, cream for ink. Every text pair below is WCAG AA or better
   (ink on surface 13.9:1, ink-2 9.7:1, ink-3 6.4:1, amber 8.8:1, danger 7.3:1; primary-ink on amber 9.7:1).
   Imported first from main.ts. Screens keep their own scoping roots and read these — see AGENTS.md → "The interface's design system". */
:root {
  /* surfaces: night under the game's own HUD, plum for everything an adult reads */
  --c-night: #0b1424;            /* the canvas's own night (behind the forest) */
  --c-bg: #1d1526;               /* a full screen (team area) */
  --c-bg-glow: #3b2540;          /* the warm top of a full screen's gradient */
  --c-surface: #2a1f35;          /* cards, dialogs */
  --c-raised: #362944;           /* a thing on a card: selected tab, hover */
  --c-inset: #18111f;            /* wells: inputs, a quoted question */
  --c-glass: rgb(26 18 36 / .62);        /* over the living forest, with a blur */
  --c-glass-strong: rgb(26 18 36 / .84);
  --c-scrim: rgb(14 9 20 / .72);         /* behind a dialog */
  /* ink */
  --c-ink: #fbf1e0;
  --c-ink-2: #d9cabb;
  --c-ink-3: #b3a399;
  /* lines */
  --c-line: rgb(255 238 214 / .12);
  --c-line-strong: rgb(255 238 214 / .24);
  /* the one primary: the fire's amber */
  --c-primary: #ffb454;
  --c-primary-hi: #ffc77a;
  --c-primary-ink: #2a1708;
  --c-primary-soft: rgb(255 180 84 / .14);
  --c-primary-line: rgb(255 180 84 / .42);
  /* semantic accents */
  --c-ok: #93d6a4;      --c-ok-soft: rgb(147 214 164 / .14);     --c-ok-line: rgb(147 214 164 / .42);
  --c-info: #a6c0f0;    --c-info-soft: rgb(166 192 240 / .13);   --c-info-line: rgb(166 192 240 / .38);
  --c-violet: #c3adf5;  --c-violet-soft: rgb(195 173 245 / .14); --c-violet-line: rgb(195 173 245 / .4);
  --c-danger: #f59a8a;  --c-danger-soft: rgb(245 154 138 / .11);  --c-danger-line: rgb(245 154 138 / .4);  --c-danger-ink: #2a0f0b;
  --c-cream: #f6ead6;   /* the disc behind an avatar (the animals are painted on paper) */

  /* type: one family for Hebrew, Cyrillic and Latin (index.html loads it) */
  --font-ui: 'Rubik', 'Arial Hebrew', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --fs-xs: 12px;  --fs-sm: 13px;  --fs-md: 15px;  --fs-base: 16px;  --fs-lg: 18px;  --fs-xl: 21px;  --fs-2xl: 26px;  --fs-3xl: 34px;  --fs-display: 52px;
  --lh-tight: 1.2;  --lh-snug: 1.4;  --lh-body: 1.55;
  --fw-regular: 400;  --fw-medium: 500;  --fw-semi: 600;  --fw-bold: 700;

  /* space (4px grid) */
  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px;  --sp-4: 16px;  --sp-5: 20px;  --sp-6: 24px;  --sp-8: 32px;  --sp-10: 40px;
  --gutter: 16px;
  --safe-t: env(safe-area-inset-top, 0px);  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px); --safe-r: env(safe-area-inset-right, 0px);
  --tap: 48px;                   /* the smallest thing a child's finger is asked to hit */
  --w-read: 640px;               /* a column of reading */
  --w-dialog: 440px;

  /* radii */
  --r-sm: 8px;  --r-md: 12px;  --r-lg: 16px;  --r-xl: 22px;  --r-2xl: 28px;  --r-full: 999px;

  /* shadows: few and soft — the forest is the decoration */
  --sh-1: 0 1px 2px rgb(8 4 14 / .3);
  --sh-2: 0 6px 20px rgb(8 4 14 / .28);
  --sh-3: 0 18px 48px rgb(8 4 14 / .42);
  --sh-inset-hi: inset 0 1px 0 rgb(255 255 255 / .06);

  /* the focus ring: a gap in the surface's colour, then amber */
  --ring: 0 0 0 2px var(--c-bg), 0 0 0 4px var(--c-primary);

  /* motion */
  --t-fast: .12s;  --t-med: .2s;  --t-slow: .36s;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --ease-pop: cubic-bezier(.3, 1.45, .6, 1);

  /* the names the game's HUD (style.css) has always used */
  --night: var(--c-night);
  --ink: var(--c-ink);
  --ink-soft: rgb(251 241 224 / .74);
  --amber: #ffd28a;              /* the HUD's star: Numi's own lighter gold, drawn on the canvas too */
  --veil: rgb(10 18 30 / .36);
  --line: rgb(243 236 220 / .2);
  --font-body: var(--font-ui);
  color-scheme: dark;
}
@media (prefers-reduced-motion: reduce) {
  :root { --t-fast: 0s; --t-med: 0s; --t-slow: 0s; }
}
/* ───────── the interface's components (18.11.2026) ─────────
   Small classes over tokens.css, in the manner of shadcn/ui: quiet borders, one primary, crisp focus rings, real states.
   Each component has a `ui-` class for new markup AND lists the names the screens already use (tests drive those names),
   so the menu, the gate, «מי משחק היום?», the team area and the owl's overlays all wear the same button, card, chip, field.
   Everything sits in :where() — zero specificity — so a screen's own rule always wins without a fight.
   Order in main.ts: tokens.css, components.css, then the screens. */

/* ── icons ── */
.ui-ico { display:inline-block; flex:none; vertical-align:-.18em; }
[dir=rtl] .ui-ico-dir { transform:scaleX(-1); }
[dir=ltr] .ui-ico-dir { transform:none; }
.ui-ico-dir:dir(rtl) { transform:scaleX(-1); }
.ui-ico-dir:dir(ltr) { transform:none; }
[data-icon] { display:inline-grid; place-items:center; font-style:normal; }

/* ── focus: one ring everywhere ── */
:where(.ui-btn, .ui-iconbtn, .ui-row, .ui-chip, .ui-link, .ui-seg button, .ui-tabs button, .ui-switch, .ui-avatar-btn,
  #menu button, .ov button, #tm-root button, #tm-root summary, #ow-root button, #ow-root a, #ow-root summary, #pf-root button, #pf-chip):focus-visible {
  outline:none; box-shadow:var(--ring); }

/* ── button: primary by default; .secondary, .ghost, .danger; .sm, .lg, .block; disabled, .is-loading ── */
:where(.ui-btn, #tm-root .btn, #tm-root .ab-send, #ow-root .btn, #pf-root .pf-btn, #gateSum button) {
  box-sizing:border-box; display:inline-flex; align-items:center; justify-content:center; gap:var(--sp-2); min-height:44px; padding:0 var(--sp-5);
  border:1px solid transparent; border-radius:var(--r-md); background:var(--c-primary); color:var(--c-primary-ink);
  font:var(--fw-semi) var(--fs-md)/1.2 var(--font-ui); letter-spacing:.005em; text-decoration:none; white-space:nowrap; cursor:pointer; touch-action:manipulation;
  -webkit-tap-highlight-color:transparent; box-shadow:var(--sh-1), inset 0 1px 0 rgb(255 255 255 / .28);
  transition:background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease), opacity var(--t-fast); }
@media (hover:hover) { :where(.ui-btn, #tm-root .btn, #tm-root .ab-send, #ow-root .btn, #pf-root .pf-btn, #gateSum button):hover { background:var(--c-primary-hi); } }
:where(.ui-btn, #tm-root .btn, #tm-root .ab-send, #ow-root .btn, #pf-root .pf-btn, #gateSum button):active { transform:scale(.97); background:var(--c-primary-hi); }
:where(.ui-btn.secondary) { background:var(--c-raised); color:var(--c-ink); border-color:var(--c-line); box-shadow:var(--sh-1), var(--sh-inset-hi); }
:where(.ui-btn.ghost, #tm-root .btn.ghost, #ow-root .btn.plain, #pf-root .pf-btn.ghost) {
  background:transparent; color:var(--c-ink-2); border-color:var(--c-line-strong); font-weight:var(--fw-medium); box-shadow:none; }
@media (hover:hover) {
  :where(.ui-btn.secondary):hover { background:var(--c-raised); border-color:var(--c-line-strong); }
  :where(.ui-btn.ghost, #tm-root .btn.ghost, #ow-root .btn.plain, #pf-root .pf-btn.ghost):hover { background:rgb(255 238 214 / .06); color:var(--c-ink); } }
:where(.ui-btn.ghost, #tm-root .btn.ghost, #ow-root .btn.plain, #pf-root .pf-btn.ghost):active { background:rgb(255 238 214 / .1); }
:where(.ui-btn.danger, #tm-root .btn.danger) { background:var(--c-danger); color:var(--c-danger-ink); }
:where(.ui-btn.danger, #tm-root .btn.danger):active, :where(.ui-btn.danger, #tm-root .btn.danger):hover { background:#f8ada0; }
:where(.ui-btn.sm, #tm-root .btn.sm) { min-height:36px; padding:0 var(--sp-3); font-size:var(--fs-sm); border-radius:10px; }
:where(.ui-btn.lg) { min-height:54px; padding:0 var(--sp-6); font-size:var(--fs-lg); border-radius:var(--r-lg); }
:where(.ui-btn.block) { display:flex; width:100%; }
:where(.ui-btn, #tm-root .btn, #tm-root .ab-send, #ow-root .btn, #pf-root .pf-btn, #gateSum button):disabled,
:where(.ui-btn).is-loading { opacity:.55; cursor:default; transform:none; pointer-events:none; }
:where(.ui-btn).is-loading::before { content:''; width:14px; height:14px; border-radius:50%; border:2px solid currentColor; border-inline-end-color:transparent; animation:ui-spin .8s linear infinite; }
@keyframes ui-spin { to { transform:rotate(360deg); } }

/* ── icon button: a round glass button (close, back, more) ── */
:where(.ui-iconbtn, .ov .x, #exBack, .mback, #tm-root #tm-close, #ow-root .pill) {
  box-sizing:border-box; display:inline-grid; place-items:center; flex:none; width:42px; height:42px; padding:0; border-radius:var(--r-full);
  border:1px solid var(--c-line); background:var(--c-glass); color:var(--c-ink); font:var(--fw-medium) var(--fs-sm)/1 var(--font-ui); cursor:pointer; touch-action:manipulation;
  -webkit-tap-highlight-color:transparent; backdrop-filter:blur(8px); -webkit-backdrop-filter:blur(8px);
  transition:background var(--t-fast) var(--ease), transform var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
:where(.ui-iconbtn, .ov .x, #exBack, .mback, #tm-root #tm-close, #ow-root .pill):active { transform:scale(.92); background:rgb(255 238 214 / .14); }
@media (hover:hover) { :where(.ui-iconbtn, .ov .x, #exBack, .mback, #tm-root #tm-close, #ow-root .pill):hover { border-color:var(--c-line-strong); } }
:where(.ui-iconbtn.quiet, .ov .x) { background:transparent; border-color:transparent; color:var(--c-ink-2); backdrop-filter:none; -webkit-backdrop-filter:none; }

/* ── link button: an action in a line of text ── */
:where(.ui-link, #tm-root .link) { display:inline-flex; align-items:center; gap:6px; padding:4px 2px; border:0; border-radius:var(--r-sm); background:none; color:var(--c-primary);
  font:var(--fw-medium) var(--fs-sm)/1.3 var(--font-ui); cursor:pointer; text-decoration:none; }
:where(.ui-link.quiet, #tm-root .link.faint) { color:var(--c-ink-3); }
:where(.ui-link.danger) { color:var(--c-danger); }
@media (hover:hover) { :where(.ui-link, #tm-root .link):hover { text-decoration:underline; text-underline-offset:3px; } }

/* ── card and dialog ── */
:where(.ui-card, #tm-root .card, #tm-root .ab-card, #tm-root .ab-q, #tm-root .ab-item) {
  box-sizing:border-box; background:var(--c-surface); border:1px solid var(--c-line); border-radius:var(--r-xl); padding:var(--sp-4); box-shadow:var(--sh-1), var(--sh-inset-hi); }
:where(.ui-scrim, .ov) { background:var(--c-scrim); backdrop-filter:blur(5px); -webkit-backdrop-filter:blur(5px); }
:where(.ui-dialog, .ov > .card, #ow-root .box) {
  box-sizing:border-box; position:relative; width:100%; max-width:var(--w-dialog); max-height:100%; overflow:auto; padding:var(--sp-6) var(--sp-5) var(--sp-5);
  background:var(--c-surface); border:1px solid var(--c-line); border-radius:var(--r-2xl); box-shadow:var(--sh-3), var(--sh-inset-hi);
  color:var(--c-ink); font:var(--fw-regular) var(--fs-md)/var(--lh-body) var(--font-ui); animation:ui-rise var(--t-slow) var(--ease) both; }
@keyframes ui-rise { from { opacity:0; transform:translateY(10px) scale(.985); } }
@keyframes ui-fade { from { opacity:0; } }

/* ── list row: icon tile, title, a line under it, a chevron ── */
:where(.ui-row, .ml) { box-sizing:border-box; display:grid; grid-template-columns:40px minmax(0, 1fr) 18px; column-gap:var(--sp-3); align-items:center; width:100%; min-height:64px; padding:10px var(--sp-4) 10px 14px;
  border:0; background:transparent; color:var(--c-ink); font:var(--fw-medium) var(--fs-base)/1.3 var(--font-ui); text-align:start; cursor:pointer; touch-action:manipulation;
  -webkit-tap-highlight-color:transparent; transition:background var(--t-fast) var(--ease); }
:where(.ui-row, .ml) > i { grid-row:1 / 3; display:grid; place-items:center; width:40px; height:40px; border-radius:var(--r-md); background:var(--c-primary-soft); color:var(--c-primary); font-style:normal; }
:where(.ui-row, .ml) > b { grid-column:2; align-self:end; font-weight:var(--fw-medium); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
:where(.ui-row, .ml) > small { grid-column:2; align-self:start; font-size:var(--fs-sm); line-height:1.35; color:var(--c-ink-3); text-wrap:pretty; }
:where(.ui-row, .ml)::after { content:''; grid-column:3; grid-row:1 / 3; width:8px; height:8px; border-inline-end:1.8px solid var(--c-ink-3); border-block-start:1.8px solid var(--c-ink-3); transform:rotate(45deg); justify-self:center; opacity:.8; }
:where([dir=rtl]) :where(.ui-row, .ml)::after { transform:rotate(-45deg); }
:where([dir=ltr]) :where(.ui-row, .ml)::after { transform:rotate(45deg); }
:where(.ui-row, .ml):active { background:rgb(255 238 214 / .08); }
@media (hover:hover) { :where(.ui-row, .ml):hover { background:rgb(255 238 214 / .05); } }

/* ── chip / badge: a quiet label; tones for meaning ── */
:where(.ui-chip, #tm-root .chip, #tm-root .ab-tag, #tm-root .ab-n) { display:inline-flex; align-items:center; gap:5px; min-height:22px; padding:0 9px; border-radius:var(--r-full); border:1px solid transparent;
  background:rgb(255 238 214 / .07); color:var(--c-ink-2); font:var(--fw-medium) var(--fs-xs)/1.5 var(--font-ui); white-space:nowrap; }
:where(.ui-chip.amber, #tm-root .chip.answer, #tm-root .ab-n) { background:var(--c-primary-soft); color:var(--c-primary); }
:where(.ui-chip.danger, #tm-root .chip.risk, #tm-root .ab-tag.risk) { background:var(--c-danger-soft); color:var(--c-danger); border-color:var(--c-danger-line); }
:where(.ui-chip.info, #tm-root .chip.off_topic, #tm-root .chip.test, #tm-root .ab-tag.off) { background:var(--c-info-soft); color:var(--c-info); }
:where(.ui-chip.ok, #tm-root .chip.chat, #tm-root .ab-tag.chat) { background:var(--c-ok-soft); color:var(--c-ok); }
:where(.ui-chip.muted, #tm-root .chip.unclear) { color:var(--c-ink-3); }

/* ── choice chip: a filter or an option that can be on ── */
:where(.ui-choice, #tm-root .fchip, #tm-root .ab-toc button, #ow-root .lab-chip, #ow-root .chip) { display:inline-flex; align-items:center; justify-content:center; gap:6px; flex:none; min-height:36px; padding:0 14px; border-radius:var(--r-full);
  border:1px solid var(--c-line); background:rgb(255 238 214 / .05); color:var(--c-ink-2); font:var(--fw-medium) var(--fs-sm)/1.2 var(--font-ui); white-space:nowrap; cursor:pointer; touch-action:manipulation;
  -webkit-tap-highlight-color:transparent; transition:background var(--t-fast) var(--ease), color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease); }
:where(.ui-choice, #tm-root .fchip, #tm-root .ab-toc button, #ow-root .lab-chip, #ow-root .chip):active { transform:scale(.96); }
:where(.ui-choice, #tm-root .fchip, #ow-root .lab-chip).on { background:var(--c-primary); border-color:var(--c-primary); color:var(--c-primary-ink); font-weight:var(--fw-semi); }

/* ── segmented control: two or three options, one is on ── */
:where(.ui-seg, #tm-root .seg, #tm-root .langs, #langSw) { display:inline-flex; flex:none; gap:2px; padding:3px; border-radius:var(--r-full); border:1px solid var(--c-line); background:var(--c-glass); }
:where(.ui-seg, #tm-root .seg, #tm-root .langs, #langSw) > button { min-width:40px; min-height:32px; padding:0 12px; border:0; border-radius:var(--r-full); background:transparent; color:var(--c-ink-2);
  font:var(--fw-medium) var(--fs-sm)/1 var(--font-ui); white-space:nowrap; cursor:pointer; touch-action:manipulation; -webkit-tap-highlight-color:transparent;
  transition:background var(--t-med) var(--ease), color var(--t-med) var(--ease); }
:where(.ui-seg, #tm-root .seg, #tm-root .langs, #langSw) > button.on { background:var(--c-primary); color:var(--c-primary-ink); font-weight:var(--fw-semi); box-shadow:var(--sh-1); }

/* ── tabs: a rail; the page that is open is a raised tile ── */
:where(.ui-tabs, #tm-root .tabs) { display:flex; gap:2px; padding:4px; border-radius:var(--r-lg); border:1px solid var(--c-line); background:var(--c-inset); overflow-x:auto; scrollbar-width:none; }
:where(.ui-tabs, #tm-root .tabs)::-webkit-scrollbar { display:none; }
:where(.ui-tabs, #tm-root .tabs) > button { flex:1 0 auto; display:inline-flex; align-items:center; justify-content:center; gap:6px; min-height:36px; padding:0 8px; border:0; border-radius:var(--r-md); background:transparent; color:var(--c-ink-3);
  font:var(--fw-medium) var(--fs-sm)/1 var(--font-ui); white-space:nowrap; cursor:pointer; -webkit-tap-highlight-color:transparent; transition:background var(--t-med) var(--ease), color var(--t-med) var(--ease); }
:where(.ui-tabs, #tm-root .tabs) > button.on { background:var(--c-raised); color:var(--c-ink); font-weight:var(--fw-semi); box-shadow:var(--sh-1), var(--sh-inset-hi); }
@media (hover:hover) { :where(.ui-tabs, #tm-root .tabs) > button:not(.on):hover { color:var(--c-ink); } }

/* ── fields ── */
:where(.ui-input, #tm-root textarea, #tm-root input[type=text], #tm-root input[type=password], #tm-root input[type=email], #tm-root input:not([type]), #tm-root select,
  #ow-root textarea, #ow-root input[type=text], #gateSum input) {
  box-sizing:border-box; width:100%; min-height:46px; padding:11px 14px; border:1px solid var(--c-line-strong); border-radius:var(--r-md); background:var(--c-inset); color:var(--c-ink);
  font:var(--fw-regular) var(--fs-base)/1.45 var(--font-ui); -webkit-user-select:text; user-select:text; transition:border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease); }
:where(.ui-input, #tm-root textarea, #tm-root input, #tm-root select, #ow-root textarea, #ow-root input[type=text], #gateSum input):focus { outline:none; border-color:var(--c-primary); box-shadow:0 0 0 3px var(--c-primary-soft); }
:where(.ui-input, #tm-root textarea, #tm-root input, #ow-root textarea, #ow-root input)::placeholder { color:var(--c-ink-3); opacity:.85; }
:where(.ui-label, #tm-root .form label) { font:var(--fw-medium) var(--fs-sm)/1.4 var(--font-ui); color:var(--c-ink-2); }

/* ── switch ── */
:where(.ui-switch, #tm-root .switch) { flex:none; position:relative; width:44px; height:26px; padding:0; border-radius:var(--r-full); border:1px solid var(--c-line-strong); background:var(--c-inset); cursor:pointer; transition:background var(--t-med) var(--ease), border-color var(--t-med) var(--ease); }
:where(.ui-switch, #tm-root .switch)::after { content:''; position:absolute; top:2px; inset-inline-start:2px; width:20px; height:20px; border-radius:50%; background:var(--c-ink-3); box-shadow:var(--sh-1); transition:inset-inline-start var(--t-med) var(--ease), background var(--t-med) var(--ease); }
:where(.ui-switch, #tm-root .switch).on { background:var(--c-primary); border-color:var(--c-primary); }
:where(.ui-switch, #tm-root .switch).on::after { inset-inline-start:20px; background:#fff8ea; }

/* ── avatar: an animal on a paper disc; .ui-avatar-btn rings the one that is chosen ── */
:where(.ui-avatar, .pf-av) { display:inline-block; flex:none; border-radius:50%; background-color:var(--c-cream); background-repeat:no-repeat; box-shadow:inset 0 -4px 10px rgb(60 30 10 / .12), var(--sh-1); }

/* ── empty state ── */
:where(.ui-empty, #tm-root .empty) { display:flex; flex-direction:column; align-items:center; gap:var(--sp-3); padding:var(--sp-8) var(--sp-5); text-align:center; color:var(--c-ink-2); font-size:var(--fs-md); line-height:var(--lh-snug); text-wrap:balance; }
:where(.ui-empty, #tm-root .empty) > .ui-empty-art { display:grid; place-items:center; width:56px; height:56px; border-radius:50%; background:var(--c-primary-soft); color:var(--c-primary); }
:where(.ui-empty, #tm-root .empty) > img.ui-empty-art { background:none; width:64px; height:64px; opacity:.92; }

/* ── toast ── */
:where(.ui-toast, #tm-root .toast) { position:fixed; inset-inline:var(--gutter); bottom:calc(20px + var(--safe-b)); z-index:9; max-width:420px; margin:0 auto; padding:12px 16px; border-radius:var(--r-lg);
  background:var(--c-raised); border:1px solid var(--c-line-strong); color:var(--c-ink); font:var(--fw-medium) var(--fs-md)/1.4 var(--font-ui); text-align:center; box-shadow:var(--sh-3); animation:ui-rise var(--t-med) var(--ease) both; }

/* ── skeleton: a line that is still loading ── */
.ui-skel { display:block; height:14px; border-radius:var(--r-sm); background:linear-gradient(90deg, rgb(255 238 214 / .06), rgb(255 238 214 / .13), rgb(255 238 214 / .06)); background-size:200% 100%; animation:ui-skel 1.4s linear infinite; }
@keyframes ui-skel { to { background-position:-200% 0; } }

@media (prefers-reduced-motion:reduce) {
  :where(.ui-dialog, .ov > .card, #ow-root .box, .ui-toast, #tm-root .toast, .ui-skel) { animation:none; }
  :where(.ui-btn, .ui-iconbtn, .ui-choice, #tm-root .btn, #ow-root .btn, #pf-root .pf-btn):active { transform:none; }
}
/* the game's own screen: a full-bleed canvas world, a thin HUD and one line of hint text above it.
   Colours, type and spacing come from ui/tokens.css; buttons, dialogs, rows and fields from ui/components.css. */
html,body{height:100%;margin:0;background:var(--night);overflow:hidden;overscroll-behavior:none;
  -webkit-user-select:none;user-select:none;-webkit-touch-callout:none;-webkit-tap-highlight-color:transparent}
body{font-family:var(--font-body);color:var(--ink)}
canvas{position:fixed;inset:0;width:100%;height:100%;display:block;touch-action:none}
#film{position:fixed;inset:0;pointer-events:none;background-size:100% 100%,128px 128px}
#hud{position:fixed;top:12px;left:16px;right:16px;display:flex;justify-content:space-between;align-items:center;gap:12px;pointer-events:none}
#count{display:flex;align-items:baseline;gap:8px;padding:7px 14px;border-radius:999px;background:var(--veil);
  border:1px solid var(--line);font-size:15px;backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px)}
#count .s{color:var(--amber);font-size:14px}
#cname{color:var(--ink-soft);font-size:14px;white-space:nowrap}
#mute{pointer-events:auto;flex:none;width:40px;height:40px;border-radius:50%;border:1px solid var(--line);background:var(--veil);
  color:var(--ink);display:grid;place-items:center;padding:0;cursor:pointer;backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px)}
#mute:focus-visible{outline:2px solid var(--amber);outline-offset:2px}
#mute svg{width:20px;height:20px}
#mute.off .wave{display:none}
#mute:not(.off) .cross{display:none}
#meters{display:flex;flex:none;gap:7px;direction:ltr}
.m{position:relative;width:34px;height:34px;border-radius:50%;border:1px solid var(--line);background:var(--veil);overflow:hidden;
  color:var(--ink);backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px)}
.m i{position:absolute;left:0;right:0;bottom:0;height:var(--v,50%);background:var(--c);opacity:.62;transition:height .7s ease}
.m svg{position:absolute;inset:0;margin:auto;width:17px;height:17px}
#mFull{--c:#d9566b}#mJoy{--c:#f0a23c}#mEn{--c:#6f8fe0}
.m.low{border-color:#ffb08a;animation:low 1.1s ease-in-out infinite}
.m.bump{animation:bump .6s ease}
@keyframes low{50%{transform:scale(1.1);box-shadow:0 0 0 4px rgba(255,160,110,.28)}}
@keyframes bump{35%{transform:scale(1.28);box-shadow:0 0 0 6px rgba(255,236,190,.35)}}
#toast{position:fixed;top:34%;left:16px;right:16px;text-align:center;font-size:19px;line-height:1.4;text-wrap:balance;
  color:var(--ink);text-shadow:0 1px 14px rgba(0,0,0,.55);opacity:0;transform:translateY(8px);
  transition:opacity .7s ease,transform .7s ease;pointer-events:none}
#toast.on{opacity:1;transform:none}
#hint{position:fixed;bottom:26px;left:16px;right:16px;text-align:center;font-size:15px;line-height:1.5;text-wrap:balance;
  color:var(--ink);text-shadow:0 1px 3px rgba(0,0,0,.6),0 0 16px rgba(0,0,0,.55);opacity:0;transition:opacity .9s ease;pointer-events:none}
#hint.on{opacity:1}
@media (prefers-reduced-motion:reduce){#toast,#hint{transition:none}.m.low,.m.bump,#fire.ready{animation:none}}
#fire{position:fixed;left:16px;bottom:66px;width:54px;height:54px;border-radius:50%;border:1px solid var(--line);background:var(--veil);
  color:var(--ink-soft);display:grid;place-items:center;padding:0;cursor:pointer;touch-action:manipulation;
  backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px)}
#fire svg{width:24px;height:24px}
#fire bdi{position:absolute;right:-8px;top:-6px;min-width:22px;padding:2px 6px;border-radius:999px;background:rgba(10,18,30,.82);
  border:1px solid var(--line);font:12px var(--font-body);color:var(--ink)}
#fire.ready{color:var(--amber);border-color:var(--amber);animation:low 1.4s ease-in-out infinite}
#fire:focus-visible{outline:2px solid var(--amber);outline-offset:2px}
[hidden]{display:none!important}
#count{pointer-events:auto}
#tbtn{position:fixed;right:16px;bottom:74px;padding:9px 14px;border-radius:999px;border:1px solid var(--amber);background:rgba(10,18,30,.82);
  color:var(--amber);font:14px var(--font-body);cursor:pointer;touch-action:manipulation}
#test{position:fixed;left:12px;right:12px;bottom:12px;padding:12px;border-radius:18px;background:rgba(10,18,30,.94);border:1px solid var(--line);
  max-width:460px;margin:0 auto;z-index:5}
#test .tt{display:flex;justify-content:space-between;align-items:center;font-size:15px;color:var(--ink);margin:0 4px 10px}
#test .tg{display:grid;grid-template-columns:1fr 1fr;gap:8px}
#test button{min-height:42px;padding:6px 8px;border-radius:12px;border:1px solid var(--line);background:rgba(255,255,255,.07);color:var(--ink);
  font:14px var(--font-body);cursor:pointer;touch-action:manipulation}
#test button:active{background:rgba(255,255,255,.18)}
#test .tt button{min-height:34px;width:34px;border-radius:50%;padding:0}
#test .off{grid-column:1/-1;color:var(--ink-soft)}
/* «לשאול את הינשוף»: screens for the parent lie over the forest while the game waits underneath (src/friends/ask.ts) */
#noteBtn{position:fixed;left:23px;bottom:134px;width:40px;height:40px;border-radius:50%;border:1px solid var(--line);background:var(--veil);
  color:var(--amber);display:grid;place-items:center;padding:0;cursor:pointer;touch-action:manipulation}
#noteBtn svg{width:20px;height:20px}
#noteBtn:focus-visible{outline:2px solid var(--amber);outline-offset:2px}
/* ── overlays: a scrim over the waiting forest, one dialog in the middle (the parent gate, the owl's notes) ── */
.ov{position:fixed;inset:0;z-index:20;display:grid;place-items:center;
  padding:max(var(--gutter),var(--safe-t)) max(var(--gutter),var(--safe-r)) max(var(--gutter),var(--safe-b)) max(var(--gutter),var(--safe-l));animation:ui-fade var(--t-med) var(--ease) both}
.ov h2{margin:0 0 var(--sp-3);margin-inline-end:40px;font-size:var(--fs-xl);line-height:1.25;font-weight:var(--fw-semi);color:var(--c-ink);text-wrap:balance}
.ov p{margin:0 0 var(--sp-3);color:var(--c-ink-2);text-wrap:pretty}
.ov .x{position:absolute;top:12px;inset-inline-end:12px;width:40px;height:40px}
/* the gate: three short truths, then the hold */
#askGate .card p{position:relative;padding-inline-start:18px}
#askGate .card p::before{content:'';position:absolute;inset-inline-start:2px;top:.62em;width:6px;height:6px;border-radius:50%;background:var(--c-primary);opacity:.85}
#holdBtn{position:relative;overflow:hidden;display:flex;align-items:center;justify-content:center;width:100%;min-height:58px;margin-top:var(--sp-4);padding:0 var(--sp-4);border-radius:var(--r-lg);
  border:1.5px solid var(--c-primary-line);background:var(--c-primary-soft);color:var(--c-ink);font:var(--fw-semi) var(--fs-md)/1.25 var(--font-ui);text-wrap:balance;cursor:pointer;touch-action:none;
  transition:border-color var(--t-fast) var(--ease),transform var(--t-fast) var(--ease)}
#holdBtn i{position:absolute;inset:0;background:var(--c-primary);opacity:.5;transform:scaleX(0);transform-origin:right center}
[dir=ltr] #holdBtn i{transform-origin:left center}
#holdBtn.on{border-color:var(--c-primary);transform:scale(.985)}
#holdBtn.on i{transform:scaleX(1);transition:transform 3s linear}   /* fills for as long as the hold must last */
#holdBtn span{position:relative}
#gateSum{display:flex;gap:var(--sp-3);align-items:center;margin-top:var(--sp-4)}
#gateSum bdi{font-size:var(--fs-2xl);font-weight:var(--fw-semi);white-space:nowrap;color:var(--c-ink);font-variant-numeric:tabular-nums}
#gateSum input{flex:1;min-width:0;height:54px;border-radius:var(--r-lg);font-size:var(--fs-2xl);font-weight:var(--fw-semi);text-align:center;padding:0 var(--sp-2)}
#gateSum button{height:54px;padding:0 var(--sp-5);border-radius:var(--r-lg);font-size:var(--fs-base)}
#askFrame{display:block;padding:0;background:var(--c-bg);animation:none;backdrop-filter:none;-webkit-backdrop-filter:none}
#askFrame iframe{display:block;width:100%;height:100%;border:0}
#notesList article{padding:var(--sp-3) 0 var(--sp-1);border-top:1px solid var(--c-line)}
#notesList article:first-child{border-top:0;padding-top:0}
#notesList time{font-size:var(--fs-sm);color:var(--c-ink-3)}
#notesList h3{margin:var(--sp-2) 0 2px;font-size:var(--fs-xs);font-weight:var(--fw-semi);letter-spacing:.02em;color:var(--c-primary)}
#notesList p{color:var(--c-ink);-webkit-user-select:text;user-select:text}

/* ── the main menu and the exercises (src/menu/): the forest waits behind, still drawn ──
   Three doors for the child are the whole screen; the adults' door is one quiet line at the bottom. */
#menu{display:flex;flex-direction:column;align-items:center;justify-content:center;
  padding:calc(72px + var(--safe-t)) max(var(--gutter),var(--safe-r)) calc(76px + var(--safe-b)) max(var(--gutter),var(--safe-l));
  background:linear-gradient(180deg,rgb(20 13 30 / .34),rgb(20 13 30 / .5) 42%,rgb(20 13 30 / .78));backdrop-filter:none;-webkit-backdrop-filter:none;animation:menuIn .5s ease both}
@keyframes menuIn{from{opacity:0}}
.mv{box-sizing:border-box;width:100%;max-width:380px;display:flex;flex-direction:column;gap:var(--sp-3)}
#menu h1{margin:0 0 var(--sp-4);text-align:center;font-size:var(--fs-display);line-height:1;font-weight:var(--fw-bold);letter-spacing:.01em;color:var(--amber);
  text-shadow:0 2px 22px rgb(20 10 30 / .6),0 0 44px rgb(255 190 110 / .28)}
.mh{display:flex;align-items:center;gap:var(--sp-3);margin-bottom:var(--sp-2)}
#menu h2{margin:0;font-size:var(--fs-xl);line-height:1.2;font-weight:var(--fw-semi);color:var(--c-ink);text-shadow:0 2px 14px rgb(20 10 30 / .6)}
#exBack,.mback{width:46px;height:46px}
/* a door: a picture in a tinted well, two or three words, an arrow in the door's own colour */
.mc{--a:255 210 138;box-sizing:border-box;position:relative;display:flex;align-items:center;gap:var(--sp-4);width:100%;min-height:108px;padding:12px;padding-inline-end:var(--sp-5);border-radius:var(--r-2xl);
  border:1px solid rgb(var(--a) / .34);background:linear-gradient(180deg,rgb(34 24 46 / .7),rgb(24 17 34 / .7));color:var(--c-ink);font:var(--fw-semi) 22px/1.2 var(--font-ui);text-align:start;cursor:pointer;
  touch-action:manipulation;-webkit-tap-highlight-color:transparent;box-shadow:var(--sh-2),inset 0 1px 0 rgb(255 255 255 / .07);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);
  transition:transform var(--t-fast) var(--ease),border-color var(--t-fast) var(--ease),background var(--t-fast) var(--ease);animation:mcIn .5s var(--ease) both}
.mc:nth-of-type(2){animation-delay:.05s}.mc:nth-of-type(3){animation-delay:.1s}
@keyframes mcIn{from{opacity:0;transform:translateY(10px)}}
.mc:active{transform:scale(.975);border-color:rgb(var(--a) / .7)}
@media (hover:hover){.mc:hover{border-color:rgb(var(--a) / .6)}}
.mc b{flex:1;min-width:0;font-weight:var(--fw-semi);text-wrap:balance}
.mc:not(.staff)::after{content:'';flex:none;width:9px;height:9px;border-inline-end:2.2px solid rgb(var(--a) / .9);border-block-start:2.2px solid rgb(var(--a) / .9);transform:rotate(45deg)}
[dir=rtl] .mc:not(.staff)::after{transform:rotate(-45deg)}
[dir=ltr] .mc:not(.staff)::after{transform:rotate(45deg)}
.mc[data-go=play]{--a:255 200 120}.mc[data-go=ask]{--a:196 160 255}.mc[data-go=ex],.mc[data-ex=tl]{--a:130 214 150}.mc[data-ex=tug]{--a:245 140 124}
.mc .pic{flex:none;position:relative;width:104px;height:84px;display:flex;align-items:flex-end;justify-content:center;border-radius:20px;
  background:rgb(var(--a) / .13);box-shadow:inset 0 0 0 1px rgb(var(--a) / .16)}
.mc .pic>svg{width:100%;height:100%}
.mc .pic canvas{position:static;display:block;height:78px;width:auto}   /* the game's canvas rule above is for the forest only */
.mc .pic .qm{position:absolute;top:-4px;inset-inline-end:0;width:36px;height:36px;animation:bob 3.2s ease-in-out infinite}
.mc .pic.wide{width:136px}
.mc .pic.wide>canvas{height:70px}
.mc .pic.wide>svg{width:70px;height:84px;flex:none;animation:bob 3.2s ease-in-out infinite}
.mc .pic.tug{direction:ltr;align-items:flex-end;padding-bottom:6px;box-sizing:border-box}
.mc .pic.tug>canvas{height:42px}
.mc .pic.tug>canvas:last-child{transform:scaleX(-1)}
.mc .pic.tug>svg{width:30px;height:30px;margin:0 -12px 44px;z-index:1}
@keyframes bob{50%{transform:translateY(-3px)}}
/* the top line: the language on one side, the child who plays in the middle */
#langSw{position:absolute;top:calc(14px + var(--safe-t));left:max(var(--gutter),var(--safe-l));backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)}
#langSw button{min-width:44px;min-height:34px}
/* the team's door (18.11.2026): shown to the owner and the reviewer (body[data-staff], set by profile/profile.ts).
   Upright: one quiet line at the bottom of the menu, apart from the child's three doors. Lying down (no room below): the small button in the top corner. */
.staff{display:none!important} body[data-staff] .mc.staff{display:flex!important}
.mc.staff{position:absolute;left:50%;bottom:calc(18px + var(--safe-b));transform:translateX(-50%);width:auto;max-width:calc(100% - 32px);min-height:44px;gap:var(--sp-2);padding:0 var(--sp-4);border-radius:var(--r-full);
  border:1px solid var(--c-line);background:var(--c-glass);color:var(--c-ink-2);font:var(--fw-medium) var(--fs-md)/1 var(--font-ui);box-shadow:none;animation:ui-fade .6s .2s var(--ease) both}
.mc.staff b{flex:none;font-weight:var(--fw-medium);white-space:nowrap}
.mc.staff:active{transform:translateX(-50%) scale(.97);background:var(--c-glass-strong)}
.mc.staff i:last-child{color:var(--c-ink-3)}
#teamBtn{position:absolute;top:calc(14px + var(--safe-t));right:max(var(--gutter),var(--safe-r));height:40px;padding:0 var(--sp-4);border-radius:var(--r-full);border:1px solid var(--c-line);background:var(--c-glass);color:var(--c-ink-2);
  font:var(--fw-medium) var(--fs-sm)/1 var(--font-ui);cursor:pointer;touch-action:manipulation;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)}
/* the team's list: one sheet of rows */
#menuTeam{gap:0;max-height:100%;min-height:0}
#menuTeam .mlist{display:flex;flex-direction:column;overflow-y:auto;border-radius:var(--r-xl);border:1px solid var(--c-line);background:var(--c-glass-strong);box-shadow:var(--sh-2),var(--sh-inset-hi);
  backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px)}
#menuTeam .ml+.ml{border-top:1px solid var(--c-line)}
#menuTeam .ml:nth-child(2) i,#menuTeam .ml:nth-child(7) i{background:var(--c-violet-soft);color:var(--c-violet)}
#menuTeam .ml:nth-child(4) i,#menuTeam .ml:nth-child(5) i{background:var(--c-ok-soft);color:var(--c-ok)}
#menuTeam .ml:nth-child(6) i{background:var(--c-info-soft);color:var(--c-info)}
#homeBtn{position:fixed;top:62px;left:19px;width:34px;height:34px;border-radius:50%;border:1px solid var(--line);background:var(--veil);color:var(--ink-soft);
  display:grid;place-items:center;padding:0;cursor:pointer;touch-action:manipulation;backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px)}
#homeBtn svg{width:17px;height:17px}
#exDone{position:fixed;left:50%;bottom:74px;width:64px;height:64px;margin-left:-32px;border-radius:50%;border:1.5px solid var(--amber);background:rgba(10,18,30,.72);
  color:var(--amber);display:grid;place-items:center;padding:0;cursor:pointer;touch-action:manipulation;animation:menuIn 1.2s ease both,low 2.4s ease-in-out 1.2s infinite}
#exDone svg{width:28px;height:28px}
#homeBtn:focus-visible,#exDone:focus-visible{outline:2px solid var(--amber);outline-offset:2px}
body.menu #hud,body.menu #fire,body.menu #noteBtn,body.menu #homeBtn,body.menu #exDone,body.menu #hint,body.menu #toast,body.menu #tbtn,body.menu #test{visibility:hidden}
body.leaving::after{content:'';position:fixed;inset:0;z-index:40;background:var(--night);animation:menuIn .36s ease both}
/* a phone lying down: the doors stand side by side, the team's door moves to the top corner */
@media (orientation:landscape) and (max-height:520px){
  #menu{padding:calc(56px + var(--safe-t)) max(var(--gutter),var(--safe-r)) calc(12px + var(--safe-b)) max(var(--gutter),var(--safe-l))}
  .mv{max-width:760px;flex-direction:row;flex-wrap:wrap;justify-content:center}
  #menu h1{flex:0 0 100%;margin:0;font-size:var(--fs-3xl)}
  .mh{flex:0 0 100%;margin:0}
  .mc:not(.staff){flex:1 1 0;flex-direction:column;gap:var(--sp-2);min-height:0;padding:12px 8px 14px;font-size:var(--fs-lg);text-align:center}
  .mc:not(.staff)::after{display:none}
  .mc b{flex:none}
  body[data-staff] .mc.staff{display:none!important}
  body[data-staff] #teamBtn.staff{display:block!important}
  #menuTeam{max-width:560px;flex-direction:column;flex-wrap:nowrap}
}
/* a tablet or a desk: the same column, a little wider, never a stretched phone */
@media (min-width:900px) and (min-height:521px){.mv{max-width:420px}.mc{min-height:116px}}
@media (max-width:359px){.mc{font-size:19px;gap:var(--sp-3)}.mc .pic{width:88px}.mc .pic.wide{width:118px}}
@media (prefers-reduced-motion:reduce){#menu,#exDone,.mc,.mc.staff,.ov,.mc .pic .qm,.mc .pic.wide>svg,body.leaving::after{animation:none}.mc{transition:none}}
/* The owl screen's own layers over its canvas (screen.ts builds the markup). Every rule is scoped under #ow-root and every
   id is prefixed ow-, so the game's styles and these never touch. Tokens: ui/tokens.css; the round buttons, the dialog box,
   the fields and the option chips: ui/components.css (they list .pill, .box, .btn, .lab-chip, .chip of this screen).
   The canvas — the owl himself, the clearing — is drawn in screen.ts and is not styled here. */

  #ow-root { --ink:var(--c-ink); --dim:var(--c-ink-2); --warm:var(--c-primary); --card:var(--c-glass-strong); --line:var(--c-line); --risk:var(--c-danger);
    /* --dock: from the bottom of the screen (above the safe area) up to where the owl's words must end. The talk button and
       the line under it live inside it; #ow-talk ends at it. screen.ts → frame() reads the same number for the owl's place. */
    --dock:172px; }
  #ow-root * { box-sizing:border-box; -webkit-tap-highlight-color:transparent; }
  #ow-root { margin:0; height:100%; overflow:hidden; background:var(--c-bg); color:var(--c-ink); font:var(--fw-regular) var(--fs-base)/1.5 var(--font-ui); }
  #ow-root #ow-scene { position:fixed; inset:0; width:100%; height:100%; display:block; }

  /* ── the top line: the way out on one side, the adult's folded controls on the other ── */
  #ow-root #ow-top { position:fixed; top:max(10px, var(--safe-t)); left:max(12px, var(--safe-l)); right:max(12px, var(--safe-r)); display:flex; justify-content:space-between; align-items:center; z-index:3; }
  #ow-root #ow-top > span { display:flex; gap:var(--sp-2); }
  #ow-root .pill { width:auto; min-width:42px; padding:0 13px; display:inline-flex; align-items:center; justify-content:center; gap:6px; white-space:nowrap; text-decoration:none; }
  #ow-root .pill:has(> svg:only-child) { padding:0; width:42px; }
  #ow-root .pill.on { background:var(--c-primary); border-color:var(--c-primary); color:var(--c-primary-ink); font-weight:var(--fw-semi); }
  /* the adult's controls fold behind one small button, so the child sees a calm screen */
  #ow-root #ow-adult { opacity:.7; } #ow-root #ow-adult.on { opacity:1; background:var(--c-glass-strong); border-color:var(--c-line-strong); color:var(--c-ink); }
  #ow-root #ow-adultMenu { position:absolute; top:50px; inset-inline-end:0; display:flex; flex-wrap:wrap; justify-content:flex-end; gap:6px; width:max-content; max-width:min(320px, calc(100vw - 24px)); padding:var(--sp-2);
    border-radius:var(--r-xl); background:var(--c-glass-strong); border:1px solid var(--c-line); box-shadow:var(--sh-3); backdrop-filter:blur(12px); -webkit-backdrop-filter:blur(12px); animation:ui-rise var(--t-med) var(--ease) both; }
  #ow-root #ow-adultMenu .pill { height:40px; min-width:40px; background:rgb(255 238 214 / .06); border-color:transparent; backdrop-filter:none; -webkit-backdrop-filter:none; }
  #ow-root #ow-adultMenu .pill:has(> svg:only-child) { width:40px; }
  #ow-root #ow-adultMenu .pill.on { background:var(--c-primary); }

  /* ── what he says: one sentence at a time, always ending above the talk button ── */
  #ow-root #ow-talk { position:fixed; left:0; right:0; bottom:calc(var(--dock) + var(--safe-b)); max-height:max(132px, calc(100vh - var(--dock) - 92px - min(25vh, 50vw, 270px) * 1.36)); overflow-y:auto; padding:0 var(--gutter); z-index:2; scrollbar-width:none;
    -webkit-mask-image:linear-gradient(transparent, #000 16px); mask-image:linear-gradient(transparent, #000 16px); }
  @supports (height:100dvh) { #ow-root #ow-talk { max-height:max(132px, calc(100dvh - var(--dock) - var(--safe-b) - 92px - min(25vh, 50vw, 270px) * 1.36)); } }
  #ow-root #ow-talk::-webkit-scrollbar { display:none; }
  /* what the child said is never shown (owner, 16.11.2026: only the owl's words are on the screen); the element keeps the text for the tests */
  #ow-root #ow-heard { display:none; }
  #ow-root #ow-heard.live { color:var(--c-ink); }
  /* the subtitle: centred, balanced lines, a soft shade behind the words that is not a box */
  #ow-root #ow-say { width:fit-content; max-width:min(100%, 21em); margin:0 auto var(--sp-2); padding:10px 20px 12px; font-size:20px; line-height:1.4; font-weight:var(--fw-medium); text-align:center; text-wrap:balance; color:#fff8ea;
    text-shadow:0 1px 2px rgb(20 10 30 / .9), 0 0 16px rgb(20 10 30 / .8); background:radial-gradient(closest-side, rgb(22 12 30 / .5), rgb(22 12 30 / .28) 62%, rgb(22 12 30 / 0)); transition:opacity .2s; }
  #ow-root #ow-say:empty { display:none; }
  #ow-root #ow-say.swap { opacity:0; }
  @media (min-width:600px) { #ow-root #ow-say { font-size:23px; } }
  @media (max-width:359px) { #ow-root #ow-say { font-size:19px; } }
  #ow-root .more summary { display:flex; align-items:center; justify-content:center; gap:6px; list-style:none; color:var(--c-ink-2); font-size:var(--fs-sm); font-weight:var(--fw-medium); padding:var(--sp-2) 0 var(--sp-1); cursor:pointer; text-shadow:0 1px 6px rgb(20 10 30 / .9); }
  #ow-root .more summary::-webkit-details-marker { display:none; }
  #ow-root .more summary::after { content:''; width:6px; height:6px; border-inline-end:1.8px solid currentColor; border-block-end:1.8px solid currentColor; transform:translateY(-2px) rotate(45deg); transition:transform var(--t-med) var(--ease); }
  #ow-root .more[open] summary::after { transform:translateY(2px) rotate(-135deg); }
  #ow-root .card { background:var(--c-glass-strong); border:1px solid var(--c-line); border-radius:var(--r-lg); padding:12px 16px; margin:var(--sp-2) auto; max-width:520px; box-shadow:var(--sh-2); backdrop-filter:blur(10px); -webkit-backdrop-filter:blur(10px); animation:ui-rise var(--t-slow) var(--ease) both; }
  #ow-root .card h3 { margin:0 0 3px; font-size:var(--fs-xs); font-weight:var(--fw-semi); letter-spacing:.03em; color:var(--c-primary); }
  #ow-root .card p { margin:0; font-size:var(--fs-base); line-height:1.5; text-wrap:pretty; }
  #ow-root .card.parent { border-color:var(--c-danger-line); } #ow-root .card.parent h3 { color:var(--c-danger); }
  #ow-root .card.quiet { background:rgb(26 18 36 / .66); box-shadow:none; } #ow-root .card.quiet h3 { color:var(--c-ink-3); } #ow-root .card.quiet p { font-size:var(--fs-sm); color:var(--c-ink-2); }
  #ow-root #ow-lines a { color:var(--c-ink); text-decoration:none; display:block; padding:7px 0; border-top:1px solid var(--c-line); }
  #ow-root #ow-lines a:first-child { border-top:0; }
  #ow-root #ow-lines b { color:var(--c-primary); font-size:var(--fs-md); margin-inline-end:6px; }

  /* ── the one button (redesigned 18.11.2026): a clean lit disc, one icon, one seat ring.
     Four faces a child can read by colour and sign: talk (warm, a microphone) → I am done (green, a tick) → he is thinking
     (violet, dots) → stop him (coral, a square). Idle it breathes slowly and sends one soft ripple; while the child speaks a
     single ring follows the voice (--lvl, set by screen.ts). */
  #ow-root #ow-dock { position:fixed; left:0; right:0; bottom:max(16px, var(--safe-b)); height:calc(var(--dock) - 34px); display:flex; flex-direction:column; align-items:center; justify-content:flex-end; gap:10px; z-index:3; pointer-events:none; }
  #ow-root #ow-dock > * { pointer-events:auto; }
  #ow-root #ow-mic { --c1:#ffb84d; --c2:#f07f22; --glow:rgb(255 150 60 / .5); --seat:rgb(255 214 160 / .2);
    flex:none; width:84px; height:84px; border-radius:50%; border:0; padding:0; color:#fff; position:relative; cursor:pointer; touch-action:manipulation; display:grid; place-items:center;
    background:linear-gradient(180deg, var(--c1), var(--c2));
    box-shadow:0 0 0 6px var(--seat), 0 10px 28px var(--glow), 0 2px 6px rgb(20 8 24 / .45), inset 0 1.5px 0 rgb(255 255 255 / .5), inset 0 -4px 10px rgb(60 10 0 / .16);
    transition:transform .16s var(--ease), box-shadow .3s var(--ease), filter .16s var(--ease), opacity .3s; }
  #ow-root #ow-mic:active { transform:scale(.93); filter:brightness(.93); animation:none; }
  #ow-root #ow-mic:focus-visible { outline:none; box-shadow:0 0 0 3px var(--c-bg), 0 0 0 6px #fff8ea, 0 10px 28px var(--glow); }
  #ow-root #ow-mic svg { grid-area:1 / 1; position:relative; width:40px; height:40px; display:block; filter:drop-shadow(0 1px 2px rgb(60 20 0 / .3)); }
  /* idle: a deep plum seat, so the painted cream-and-gold microphone stands out (on the amber disc it melted in) */
  #ow-root[data-s=idle] #ow-mic, #ow-root:not([data-s]) #ow-mic { --c1:#7a5796; --c2:#3f2a57; --glow:rgb(255 190 110 / .38); --seat:rgb(255 214 160 / .26); }
  #ow-root #ow-mic img { grid-area:1 / 1; position:relative; width:58px; height:58px; display:block; object-fit:contain; filter:drop-shadow(0 2px 3px rgb(20 8 24 / .45)); pointer-events:none; user-select:none; }
  #ow-root #ow-mic img.hide { display:none; }
  #ow-root[data-s=idle] #ow-mic .rip { border-color:#ffc878; }
  #ow-root #ow-mic .wave { opacity:0; }
  #ow-root #ow-mic .rip { position:absolute; inset:0; border-radius:50%; border:2px solid var(--c1); opacity:0; pointer-events:none; }
  #ow-root #ow-mic .rip.r2 { display:none; }
  #ow-root[data-s=idle] #ow-mic .rip { animation:ow-rip 3.6s var(--ease) infinite; }
  @keyframes ow-rip { 0% { transform:scale(1); opacity:.5; } 70%, 100% { transform:scale(1.4); opacity:0; } }
  #ow-root[data-s=idle] #ow-mic { animation:ow-invite 3.6s ease-in-out infinite; }
  @keyframes ow-invite { 50% { transform:scale(1.035); } }
  #ow-root #ow-mic .ring { position:absolute; inset:-9px; border-radius:50%; border:3px solid rgb(170 245 200 / .9); transform:scale(min(var(--lvl, 1), 1.16)); opacity:0; pointer-events:none; transition:transform .08s linear, opacity .2s; }   /* capped: it never climbs into the words */
  #ow-root[data-s=listen] #ow-mic .ring { opacity:1; }
  #ow-root[data-s=listen] #ow-mic { --seat:rgb(150 235 185 / .16); }
  #ow-root #ow-mic #ow-icoDots, #ow-root #ow-mic #ow-icoStop { display:none; }
  #ow-root[data-s=listen] #ow-mic, #ow-root[data-s=confirm] #ow-mic { --c1:#6fd8a0; --c2:#279a64; --glow:rgb(70 200 130 / .5); --seat:rgb(150 235 185 / .2); }
  #ow-root[data-s=think] #ow-mic, #ow-root[data-s=hear] #ow-mic { --c1:#b39ae6; --c2:#6f55ae; --glow:rgb(150 120 220 / .42); --seat:rgb(200 180 245 / .18); }
  #ow-root[data-s=speak] #ow-mic { --c1:#ff9d84; --c2:#e2573c; --glow:rgb(255 120 90 / .46); --seat:rgb(255 190 170 / .2); }
  #ow-root[data-s=think] #ow-mic #ow-icoMic, #ow-root[data-s=hear] #ow-mic #ow-icoMic, #ow-root[data-s=speak] #ow-mic #ow-icoMic { display:none; }
  #ow-root[data-s=think] #ow-mic #ow-icoDots, #ow-root[data-s=hear] #ow-mic #ow-icoDots { display:block; }
  #ow-root #ow-icoDots circle { animation:ow-dot 1.2s ease-in-out infinite; transform-box:fill-box; transform-origin:center; }
  #ow-root #ow-icoDots circle:nth-child(2) { animation-delay:.16s; } #ow-root #ow-icoDots circle:nth-child(3) { animation-delay:.32s; }
  @keyframes ow-dot { 0%, 60%, 100% { transform:none; opacity:.75; } 30% { transform:translateY(-6px); opacity:1; } }
  #ow-root[data-s=speak] #ow-mic #ow-icoStop { display:block; }
  #ow-root #ow-mic .count { position:absolute; inset:-9px; border-radius:50%; border:3px solid #fff; border-color:#fff transparent transparent transparent; opacity:0; pointer-events:none; }
  #ow-root[data-s=confirm] #ow-mic .count { opacity:.9; animation:ow-spin 2.4s linear forwards; }
  @keyframes ow-spin { to { transform:rotate(360deg); } }
  #ow-root #ow-under { flex:none; height:28px; display:flex; gap:10px; align-items:center; font-size:var(--fs-sm); color:var(--c-ink-2); }
  #ow-root #ow-hint { font-size:var(--fs-md); font-weight:var(--fw-medium); color:var(--c-ink); text-shadow:0 1px 2px rgb(20 10 30 / .9), 0 0 12px rgb(20 10 30 / .8); }
  #ow-root #ow-dots { display:inline-flex; gap:5px; } #ow-root #ow-dots:empty { display:none; }
  #ow-root #ow-dots i { display:block; width:7px; height:7px; border-radius:50%; background:var(--c-primary); } #ow-root #ow-dots i.off { background:rgb(255 244 226 / .3); }
  #ow-root .chip { min-height:28px; padding:0 12px; background:var(--c-glass); color:var(--c-ink); backdrop-filter:blur(8px); -webkit-backdrop-filter:blur(8px); }
  /* while he says hello the talk button waits: dim, still, no ripples (screen.ts → greet) */
  #ow-root[data-greet="1"] #ow-mic { opacity:.5; filter:saturate(.45); animation:none; pointer-events:none; box-shadow:0 0 0 6px rgb(255 244 226 / .08), 0 2px 6px rgb(20 8 24 / .45), inset 0 1.5px 0 rgb(255 255 255 / .35); }
  #ow-root[data-greet="1"] #ow-mic .rip { animation:none; opacity:0; }

  /* ── typing instead of speaking (a sheet from below); the owl's own gate (a dialog) ── */
  #ow-root #ow-sheet, #ow-root #ow-gate { position:fixed; inset:0; z-index:5; background:var(--c-scrim); backdrop-filter:blur(4px); -webkit-backdrop-filter:blur(4px); display:flex; align-items:flex-end; justify-content:center; animation:ui-fade var(--t-med) var(--ease) both; }
  #ow-root #ow-gate { align-items:center; padding:var(--gutter); }
  #ow-root .box { max-width:560px; padding:var(--sp-5) var(--sp-4) calc(var(--sp-4) + var(--safe-b)); border-radius:var(--r-2xl) var(--r-2xl) 0 0; border-bottom:0; }
  #ow-root #ow-gate .box { max-width:var(--w-dialog); max-height:calc(100vh - 32px); padding:var(--sp-6) var(--sp-5) var(--sp-5); border-radius:var(--r-2xl); border-bottom:1px solid var(--c-line); overflow:auto; }
  #ow-root #ow-gateTitle { margin:0 0 6px !important; font-size:var(--fs-lg) !important; font-weight:var(--fw-semi); color:var(--c-ink) !important; }
  #ow-root textarea { min-height:96px; resize:none; }
  #ow-root .row { display:flex; gap:10px; margin-top:var(--sp-3); align-items:center; }
  #ow-root .btn { flex:1; min-height:50px; font-size:var(--fs-base); border-radius:var(--r-lg); }
  #ow-root .btn.plain { flex:0 0 auto; }
  #ow-root .fine { font-size:var(--fs-xs); color:var(--c-ink-3); line-height:1.5; margin:var(--sp-2) 0 0; white-space:pre-line; }
  #ow-root .fine input[type=checkbox] { accent-color:var(--c-primary); vertical-align:-2px; }
  #ow-root .hide { display:none !important; }
  #ow-root #ow-kidsBox { display:flex; flex-wrap:wrap; gap:var(--sp-3); justify-content:center; margin:var(--sp-3) 0 var(--sp-1); }
  #ow-root .kid { flex:0 1 128px; min-height:var(--tap); background:none; border:0; border-radius:var(--r-lg); color:var(--c-ink); padding:6px 4px; font:var(--fw-semi) var(--fs-lg)/1.2 var(--font-ui); display:flex; flex-direction:column; align-items:center; gap:6px; cursor:pointer; transition:transform var(--t-fast) var(--ease); }
  #ow-root .kid:active { transform:scale(.95); } #ow-root .kid small { font-size:var(--fs-xs); font-weight:var(--fw-regular); color:var(--c-ink-3); }
  #ow-root .kid .pf-av { width:76px !important; height:76px !important; border:3px solid rgb(255 244 226 / .2); }
  #ow-root .kid i { font-style:normal; font-size:30px; line-height:1; }

/* the screen itself: over the whole app, above the game and its menu (the team area, #tm-root, sits above it) */
#ow-root { position:fixed; inset:0; z-index:55; }
#ow-root[hidden] { display:none !important; }

/* ── the rig lab (#rig): the conversation steps aside, a panel of controls takes the lower part (screen.ts → buildLab) ── */
#ow-root[data-lab="1"] { z-index:59; }
#ow-root[data-lab="1"] #ow-dock, #ow-root[data-lab="1"] #ow-talk, #ow-root[data-lab="1"] #ow-sheet, #ow-root[data-lab="1"] #ow-gate, #ow-root[data-lab="1"] #ow-adult, #ow-root[data-lab="1"] #ow-adultMenu { display:none !important; }
#ow-root #ow-lab { display:none; }
#ow-root[data-lab="1"] #ow-lab { display:block; position:fixed; left:0; right:0; bottom:0; max-height:46vh; overflow-y:auto; z-index:4; padding:var(--sp-2) max(var(--gutter), var(--safe-r)) calc(var(--sp-4) + var(--safe-b)) max(var(--gutter), var(--safe-l));
  background:var(--c-glass-strong); border-top:1px solid var(--c-line); border-radius:var(--r-2xl) var(--r-2xl) 0 0; box-shadow:0 -10px 40px rgb(8 4 14 / .35); backdrop-filter:blur(14px); -webkit-backdrop-filter:blur(14px); scrollbar-width:thin; }
#ow-root #ow-lab::before { content:''; display:block; width:36px; height:4px; margin:2px auto 0; border-radius:var(--r-full); background:var(--c-line-strong); }
#ow-root #ow-lab h4 { margin:var(--sp-3) 2px var(--sp-2); font-size:var(--fs-xs); font-weight:var(--fw-semi); letter-spacing:.03em; color:var(--c-ink-3); }
#ow-root #ow-lab .lab-row { display:flex; flex-wrap:wrap; gap:6px; align-items:center; }
#ow-root #ow-lab .lab-chip { min-height:34px; padding:0 13px; }
#ow-root #ow-lab .lab-sl { display:flex; align-items:center; gap:var(--sp-2); flex:1 1 220px; min-height:34px; font-size:var(--fs-sm); color:var(--c-ink-2); }
#ow-root #ow-lab .lab-sl input { flex:1; accent-color:var(--c-primary); }
@media (min-width:900px) { #ow-root[data-lab="1"] #ow-lab { left:auto; top:0; bottom:0; width:380px; max-height:none; border-radius:0; border-top:0; border-inline-start:1px solid var(--c-line); } #ow-root #ow-lab::before { display:none; } }
@media (prefers-reduced-motion:reduce) { #ow-root #ow-mic, #ow-root #ow-mic .rip, #ow-root .card, #ow-root #ow-adultMenu, #ow-root #ow-icoDots circle { animation:none !important; } }
/* «מי משחק היום?» (profile/profile.ts) — above the game, its menu and the owl's gate (z 58; the owl screen 55, the team 60).
   Tokens: ui/tokens.css; buttons and avatars: ui/components.css. Two kinds of face:
     a panel (.pf-box)    the sign-in and the short messages: one card in the middle of the dimmed clearing
     a stage (.pf-stage)  the two choosers, made like a game's "who is playing": no panel — a heading that stays at the top,
                          portraits straight on the forest, the actions fixed at the bottom; only the middle may scroll. */
#pf-root { box-sizing:border-box; position:fixed; inset:0; z-index:58; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:var(--sp-3);
  padding:max(18px, var(--safe-t)) max(var(--gutter), var(--safe-r)) max(18px, var(--safe-b)) max(var(--gutter), var(--safe-l));
  /* the owl's clearing at dusk, dimmed: the entry is already the forest */
  background:linear-gradient(rgb(24 15 34 / .7), rgb(24 15 34 / .42) 40%, rgb(20 12 28 / .86)), url(../owl/bg-portrait.webp) center 62% / cover no-repeat var(--c-bg);
  color:var(--c-ink); font:var(--fw-regular) var(--fs-base)/var(--lh-body) var(--font-ui); overflow:auto; animation:ui-fade var(--t-slow) var(--ease) both; }
#pf-root[hidden] { display:none !important; }
@media (min-aspect-ratio:1/1) { #pf-root { background-image:linear-gradient(rgb(24 15 34 / .7), rgb(24 15 34 / .42) 40%, rgb(20 12 28 / .86)), url(../owl/bg-landscape.webp); } }
#pf-root * { box-sizing:border-box; -webkit-tap-highlight-color:transparent; }
#pf-root h1 { margin:0; font-size:var(--fs-2xl); line-height:1.2; font-weight:var(--fw-bold); letter-spacing:.005em; text-wrap:balance; text-shadow:0 2px 16px rgb(14 8 20 / .7); }
#pf-root .pf-sub { margin:0; color:var(--c-ink-2); font-size:var(--fs-md); }
#pf-root .pf-fine { margin:var(--sp-1) 0 0; color:var(--c-ink-3); font-size:var(--fs-xs); line-height:1.5; max-width:420px; text-wrap:pretty; }
#pf-root .pf-msg { font-size:var(--fs-base); line-height:var(--lh-body); margin:var(--sp-2) 0; text-wrap:pretty; }

/* ── a panel: the sign-in, a message ── */
#pf-root .pf-box { width:100%; max-width:440px; display:flex; flex-direction:column; align-items:center; gap:var(--sp-3); text-align:center; padding:var(--sp-5) var(--sp-4) var(--sp-4);
  background:rgb(34 24 46 / .86); border:1px solid var(--c-line); border-radius:var(--r-2xl); backdrop-filter:blur(10px); -webkit-backdrop-filter:blur(10px); box-shadow:var(--sh-3), var(--sh-inset-hi);
  animation:ui-rise var(--t-slow) var(--ease) both; }
#pf-root .pf-owl { width:92px; height:92px; margin-top:-62px; border-radius:50%; border:4px solid #2c1f3a; background:#2c1f3a; box-shadow:var(--sh-2); animation:pf-bob 4s ease-in-out infinite; }
@keyframes pf-bob { 50% { transform:translateY(-4px) rotate(-2deg); } }
#pf-root .pf-signin { width:100%; display:flex; justify-content:center; min-height:44px; }
#pf-root .pf-row { display:flex; gap:var(--sp-2); justify-content:center; flex-wrap:wrap; }

/* ── a stage ── */
#pf-root.pf-staged { justify-content:stretch; overflow:hidden; padding-block:0; }
#pf-root .pf-stage { flex:1; min-height:0; width:100%; max-width:560px; display:flex; flex-direction:column; align-items:center; text-align:center; }
#pf-root .pf-top { flex:none; width:100%; padding:calc(22px + var(--safe-t)) 0 var(--sp-3); display:flex; flex-direction:column; align-items:center; gap:2px; }
#pf-root .pf-who { font-size:var(--fs-md); font-weight:var(--fw-semi); color:var(--c-primary); text-shadow:0 1px 10px rgb(14 8 20 / .8); }
#pf-root .pf-mid { flex:1 1 auto; min-height:0; width:100%; overflow-y:auto; overscroll-behavior:contain; -webkit-overflow-scrolling:touch; display:flex; flex-direction:column; scrollbar-width:none; padding:10px 0; }
#pf-root .pf-mid::-webkit-scrollbar { display:none; }
#pf-root .pf-mid > * { margin-block:auto; }   /* in the middle while it fits; from the top once it scrolls */
#pf-root .pf-bot { flex:none; width:100%; display:flex; flex-direction:column; align-items:center; gap:var(--sp-3); padding:var(--sp-3) 0 calc(16px + var(--safe-b)); }
#pf-root .pf-bot .pf-btn.ghost { min-height:40px; padding:0 var(--sp-4); font-size:var(--fs-sm); background:var(--c-glass); border-color:var(--c-line); backdrop-filter:blur(8px); -webkit-backdrop-filter:blur(8px); }

/* a portrait: the animal's paper disc in a ring */
#pf-root .pf-ring { display:block; width:var(--av, 96px); max-width:100%; aspect-ratio:1; padding:4px; border-radius:50%; background:rgb(255 244 226 / .16);
  box-shadow:0 10px 26px rgb(10 5 16 / .45); transition:transform var(--t-med) var(--ease-pop), box-shadow var(--t-med) var(--ease), background var(--t-med) var(--ease); }
#pf-root .pf-ring .pf-av { display:block; width:100%; height:100%; }
#pf-root .on > .pf-ring, #pf-root .pf-ring.big { background:var(--c-primary); box-shadow:0 0 0 5px rgb(255 180 84 / .22), 0 0 34px rgb(255 180 84 / .35), 0 12px 28px rgb(10 5 16 / .5); }

/* «מי משחק היום?»: the children. Sizes follow how many there are, so five or six fit a phone with the browser's bar showing;
   rows are centred, so an odd one out never sits alone at one side. */
#pf-root .pf-kids { --cols:2; --gap:14px; --av:clamp(108px, 17vh, 148px); display:flex; flex-wrap:wrap; justify-content:center; gap:18px var(--gap); width:100%; }
#pf-root .pf-kids[data-n="1"] { --cols:1; --av:clamp(120px, 20vh, 168px); }
#pf-root .pf-kids[data-n="2"] { --av:clamp(112px, 18vh, 152px); }
#pf-root .pf-kids[data-n="5"], #pf-root .pf-kids[data-n="6"] { --cols:3; --gap:8px; --av:clamp(92px, 14.5vh, 110px); }
#pf-root .pf-kids[data-n="7"], #pf-root .pf-kids[data-n="8"], #pf-root .pf-kids[data-n="9"], #pf-root .pf-kids[data-n="10"] { --cols:3; --gap:8px; --av:92px; }
#pf-root .pf-kid { position:relative; flex:0 0 calc((100% - (var(--cols) - 1) * var(--gap)) / var(--cols)); max-width:190px; min-width:0; min-height:var(--tap); padding:4px 2px; border:0; background:none; color:var(--c-ink);
  font:inherit; display:flex; flex-direction:column; align-items:center; gap:10px; cursor:pointer; touch-action:manipulation; animation:pf-in .5s var(--ease-pop) both; animation-delay:calc(var(--i, 0) * 60ms); }
#pf-root .pf-kid b { max-width:100%; padding:0 4px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:var(--fs-xl); line-height:1.2; font-weight:var(--fw-semi); text-shadow:0 1px 10px rgb(14 8 20 / .85); }
#pf-root .pf-kids[data-n="5"] b, #pf-root .pf-kids[data-n="6"] b, #pf-root .pf-kids[data-n="7"] b, #pf-root .pf-kids[data-n="8"] b, #pf-root .pf-kids[data-n="9"] b, #pf-root .pf-kids[data-n="10"] b { font-size:var(--fs-lg); }
#pf-root .pf-kid.on b { color:var(--c-primary-hi); }
#pf-root .pf-kid:active .pf-ring { transform:scale(.93); }
@media (hover:hover) { #pf-root .pf-kid:hover .pf-ring, #pf-root .pf-avbtn:hover .pf-ring { transform:scale(1.04); } }
#pf-root .pf-kid:focus-visible, #pf-root .pf-avbtn:focus-visible { box-shadow:none; }
#pf-root .pf-kid:focus-visible .pf-ring, #pf-root .pf-avbtn:focus-visible .pf-ring { box-shadow:0 0 0 3px var(--c-bg), 0 0 0 6px var(--c-primary); }
@keyframes pf-in { from { opacity:0; transform:translateY(14px) scale(.94); } }
/* «להחליף חיה» was tapped: the portraits ask "whose?" */
#pf-root .pf-kids.changing .pf-ring { background:var(--c-violet); box-shadow:0 0 0 5px rgb(195 173 245 / .2), 0 10px 26px rgb(10 5 16 / .45); animation:pf-ask 1.6s ease-in-out infinite; }
#pf-root .pf-kids.changing .pf-kid:nth-child(even) .pf-ring { animation-delay:.25s; }
#pf-root .pf-kids.changing .pf-kid b { color:var(--c-ink); }
@keyframes pf-ask { 50% { transform:rotate(-3deg) scale(1.03); } }
#pf-root .pf-change { display:inline-flex; align-items:center; gap:var(--sp-2); min-height:40px; padding:0 var(--sp-3); border:0; border-radius:var(--r-full); background:none; color:var(--c-ink-2);
  font:var(--fw-medium) var(--fs-sm)/1 var(--font-ui); cursor:pointer; text-shadow:0 1px 8px rgb(14 8 20 / .8); }
#pf-root .pf-change[aria-pressed=true] { color:var(--c-violet); }

/* the animal chooser: the one in hand, large; the rest in a grid under it; one button */
#pf-root .pf-hero { flex:none; display:flex; flex-direction:column; align-items:center; gap:var(--sp-2); padding:var(--sp-1) 0 var(--sp-3); }
#pf-root .pf-ring.big { --av:clamp(104px, 20vh, 176px); padding:5px; animation:pf-float 4.5s ease-in-out infinite; }
#pf-root .pf-ring.big.pop { animation:pf-pop .42s var(--ease-pop) both, pf-float 4.5s ease-in-out .42s infinite; }
@keyframes pf-float { 50% { transform:translateY(-5px) rotate(-1.5deg); } }
@keyframes pf-pop { from { transform:scale(.82) rotate(4deg); opacity:.6; } }
#pf-root .pf-animal { font-size:var(--fs-xl); line-height:1.2; font-weight:var(--fw-semi); color:var(--c-primary-hi); text-shadow:0 1px 10px rgb(14 8 20 / .85); }
#pf-root .pf-animal::first-letter { text-transform:uppercase; }
#pf-root .pf-staged-avs, #pf-root .pf-stage:has(.pf-avs) .pf-mid { -webkit-mask-image:linear-gradient(transparent, #000 14px, #000 calc(100% - 18px), transparent); mask-image:linear-gradient(transparent, #000 14px, #000 calc(100% - 18px), transparent); }
#pf-root .pf-avs { --av:min(96px, calc((100vw - 2 * var(--gutter) - 2 * 14px) / 3 - 8px)); display:grid; grid-template-columns:repeat(3, auto); justify-content:center; gap:14px; padding:6px 0 10px; margin-block:0 auto !important; }
#pf-root .pf-avbtn { padding:4px; border:0; background:none; border-radius:50%; cursor:pointer; touch-action:manipulation; animation:pf-in .45s var(--ease-pop) both; animation-delay:calc(var(--i, 0) * 30ms); }
#pf-root .pf-avbtn:active .pf-ring { transform:scale(.93); }
#pf-root .pf-avbtn.on .pf-ring { transform:scale(1.04); }
#pf-root .pf-ok { width:100%; max-width:340px; min-height:56px; border-radius:var(--r-lg); font-size:var(--fs-lg); font-weight:var(--fw-bold); box-shadow:0 8px 24px rgb(255 160 60 / .28), inset 0 1px 0 rgb(255 255 255 / .35); }
@media (min-width:700px) { #pf-root .pf-avs { grid-template-columns:repeat(4, auto); } }
@media (max-height:560px) { #pf-root .pf-ring.big { --av:84px; } #pf-root .pf-top { padding-top:calc(10px + var(--safe-t)); } #pf-root h1 { font-size:var(--fs-xl); } }

/* «להוסיף את נומי למסך הבית»: a quiet pill at the very bottom */
#pf-root .pf-install { display:inline-flex; align-items:center; gap:var(--sp-2); min-height:36px; padding:0 var(--sp-4); border:1px solid var(--c-line); border-radius:var(--r-full); background:var(--c-glass); color:var(--c-ink-2);
  font:var(--fw-medium) var(--fs-sm)/1 var(--font-ui); cursor:pointer; backdrop-filter:blur(8px); -webkit-backdrop-filter:blur(8px); }
#pf-root .pf-av.none { display:inline-grid; place-items:center; font-size:30px; color:#8a6f86; }

/* the child playing now, at the top of the main menu: a tap goes back to «מי משחק היום?» */
#pf-chip { position:absolute; top:calc(14px + var(--safe-t)); left:50%; transform:translateX(-50%); display:flex; align-items:center; gap:var(--sp-2); height:40px; max-width:44vw; padding-inline:5px 12px;
  border-radius:var(--r-full); border:1px solid var(--c-line); background:var(--c-glass); color:var(--c-ink); font:var(--fw-medium) var(--fs-md)/1 var(--font-ui); cursor:pointer; touch-action:manipulation;
  backdrop-filter:blur(8px); -webkit-backdrop-filter:blur(8px); transition:transform var(--t-fast) var(--ease), background var(--t-fast) var(--ease); }
#pf-chip:active { transform:translateX(-50%) scale(.96); background:var(--c-glass-strong); }
#pf-chip span:not(.pf-av) { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
#pf-chip svg { color:var(--c-ink-3); }
@media (prefers-reduced-motion:reduce) { #pf-root, #pf-root .pf-box, #pf-root .pf-owl, #pf-root .pf-kid, #pf-root .pf-avbtn, #pf-root .pf-ring, #pf-root .pf-ring.big, #pf-root .pf-ring.big.pop { animation:none !important; } }
/* ───────── the team area (src/team/team.ts) — every rule is scoped under #tm-root ─────────
   A working place for two adults: a clear header, one column of reading, cards that say who asked and what the owl answered.
   Tokens: ui/tokens.css. Buttons, cards, chips, tabs, fields, the switch, the toast: ui/components.css (they list this area's
   class names — .btn, .card, .chip, .tabs, .seg, .switch, .fchip, .link, .empty, .toast). This file is the layout and what is
   the team's own. The game's overlays go up to z-index 55 (the owl screen); this one is above them all. html/body never
   scroll in the game, so #tm-root is its own scrolling box. */
#tm-root {
  /* the names this area's rules have always used, now read from the tokens */
  --ink:var(--c-ink); --dim:var(--c-ink-2); --faint:var(--c-ink-3); --warm:var(--c-primary); --card:var(--c-surface); --line:var(--c-line);
  --deep:var(--c-inset); --risk:var(--c-danger); --good:var(--c-ok); --off:var(--c-info);
  position:fixed; inset:0; z-index:60; overflow-y:auto; overflow-x:hidden; -webkit-overflow-scrolling:touch; overscroll-behavior:contain;
  background:radial-gradient(120% 420px at 50% 0%, var(--c-bg-glow) 0%, var(--c-bg) 70%), var(--c-bg); color:var(--c-ink);
  font:var(--fw-regular) var(--fs-md)/var(--lh-body) var(--font-ui); -webkit-text-size-adjust:100%; text-align:start;
  touch-action:auto; user-select:text; -webkit-user-select:text;
}
#tm-root[hidden] { display:none !important; }
#tm-root *, #tm-root *::before, #tm-root *::after { box-sizing:border-box; }
#tm-root [hidden] { display:none !important; }
#tm-root button { -webkit-tap-highlight-color:transparent; }
#tm-root button:disabled { opacity:.55; cursor:default; }
#tm-root h1, #tm-root h2, #tm-root h3 { color:var(--c-ink); }
#tm-root .wrap { max-width:var(--w-read); margin:0 auto; padding:0 max(var(--gutter), var(--safe-r)) calc(48px + var(--safe-b)) max(var(--gutter), var(--safe-l)); }

/* ── the header: close, the title, the language; who is signed in; the tabs ── */
#tm-root .top { position:sticky; top:0; z-index:5; margin:0 calc(-1 * var(--gutter)); padding:calc(10px + var(--safe-t)) var(--gutter) 12px;
  background:linear-gradient(rgb(29 21 38 / .94) 78%, rgb(29 21 38 / 0)); backdrop-filter:blur(10px); -webkit-backdrop-filter:blur(10px); }
#tm-root .bar { display:flex; align-items:center; gap:var(--sp-3); min-height:44px; }
#tm-root .bar h1 { flex:1; min-width:0; margin:0; font-size:var(--fs-lg); line-height:1.25; font-weight:var(--fw-semi); letter-spacing:.005em; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
#tm-root #tm-close { background:rgb(255 238 214 / .06); backdrop-filter:none; -webkit-backdrop-filter:none; }
#tm-root .langs { background:var(--c-inset); }
#tm-root .langs > button { min-width:38px; min-height:30px; padding:0 10px; }
#tm-root .acct { display:flex; align-items:center; justify-content:flex-end; gap:var(--sp-2); margin-top:6px; font-size:var(--fs-xs); color:var(--c-ink-3); min-height:24px; }
#tm-root .acct span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; min-width:0; }
#tm-root .acct .link { font-size:var(--fs-xs); color:var(--c-ink-2); }
#tm-root .link.quiet { color:var(--c-ink-2); border:1px solid var(--c-line); border-radius:var(--r-full); padding:6px 14px; background:rgb(255 238 214 / .05); }
#tm-root .tabs { margin-top:10px; }
#tm-root .tabs.two { display:grid; grid-template-columns:repeat(6, 1fr); overflow:hidden; }
#tm-root .tabs.two button { min-width:0; overflow:hidden; text-overflow:ellipsis; }
#tm-root .tabs .count { display:inline-grid; place-items:center; min-width:18px; height:18px; padding:0 5px; border-radius:var(--r-full); background:var(--c-primary-soft); color:var(--c-primary); font-size:11px; font-weight:var(--fw-semi); line-height:1; }

/* ── common pieces ── */
#tm-root main { animation:ui-fade var(--t-med) var(--ease) both; }
#tm-root .card { margin:var(--sp-3) 0; }
#tm-root .lead { color:var(--c-ink-2); font-size:var(--fs-sm); line-height:1.55; margin:var(--sp-3) 2px; text-wrap:pretty; }
#tm-root .small { color:var(--c-ink-3); font-size:var(--fs-xs); line-height:1.5; }
#tm-root .err { color:var(--c-danger); }
#tm-root .row { display:flex; gap:var(--sp-2); align-items:center; flex-wrap:wrap; }
#tm-root .form { margin-top:var(--sp-3); display:grid; gap:var(--sp-2); }
#tm-root .card > .form:first-child { margin-top:0; }
#tm-root .form label { margin-top:var(--sp-1); }
#tm-root .form label.big { font-size:var(--fs-base); font-weight:var(--fw-semi); color:var(--c-ink); margin-top:0; }
#tm-root .form .row { margin-top:var(--sp-1); }
#tm-root textarea { min-height:96px; resize:vertical; line-height:1.5; }
#tm-root textarea.short { min-height:56px; }
#tm-root select { flex:1 1 140px; min-width:0; max-width:100%; width:auto; }
#tm-root .more { display:flex; width:100%; margin:var(--sp-2) 0; }
#tm-root .card.empty { padding:var(--sp-8) var(--sp-5); }
#tm-root .empty .big { display:none; }
#tm-root .keep { color:var(--c-ink-3); font-size:var(--fs-xs); line-height:1.5; text-align:center; margin:var(--sp-5) var(--sp-2) 0; text-wrap:pretty; }
#tm-root .screen h2 { margin:0 0 6px; font-size:var(--fs-lg); font-weight:var(--fw-semi); }
#tm-root .screen .lead { margin:6px 0 var(--sp-3); }
#tm-root .screen, #tm-root #tm-gate { margin-top:var(--sp-5); padding:var(--sp-5); }
#tm-root #tm-clerkBox { min-height:40px; }
#tm-root .back-about { margin:var(--sp-1) 2px; }
/* a folded part: a chevron that turns */
#tm-root details { margin:6px 0 var(--sp-1); }
#tm-root summary { display:flex; align-items:center; gap:var(--sp-2); width:fit-content; min-height:32px; color:var(--c-ink-2); font-size:var(--fs-sm); font-weight:var(--fw-medium); cursor:pointer; list-style:none; border-radius:var(--r-sm); }
#tm-root summary::-webkit-details-marker { display:none; }
#tm-root summary::before { content:''; flex:none; width:7px; height:7px; margin-inline:3px 4px; border-inline-end:1.8px solid currentColor; border-block-end:1.8px solid currentColor; transform:rotate(-45deg); transition:transform var(--t-med) var(--ease); }
#tm-root [dir=rtl] > summary::before, #tm-root[dir=rtl] summary::before { transform:rotate(135deg); }
#tm-root [dir=ltr] summary::before { transform:rotate(-45deg); }
#tm-root details[open] > summary::before { transform:rotate(45deg); }
#tm-root dl { margin:var(--sp-1) 0 0; font-size:var(--fs-sm); line-height:1.55; color:var(--c-ink-2); }
#tm-root dt { color:var(--c-ink-3); font-weight:var(--fw-semi); margin-top:10px; font-size:var(--fs-xs); letter-spacing:.02em; }
#tm-root dd { margin:2px 0 0; color:var(--c-ink); }

/* ── conversations: who talked, then each turn — the child's question, the owl's answer, the review ── */
#tm-root .filters { display:flex; gap:6px; overflow-x:auto; padding:6px var(--gutter) 2px; margin:0 calc(-1 * var(--gutter)); scrollbar-width:none; }
#tm-root .filters::-webkit-scrollbar { display:none; }
#tm-root .tw { display:flex; flex-wrap:wrap; align-items:baseline; gap:2px var(--sp-2); }
#tm-root .tw .kid { font-weight:var(--fw-semi); font-size:var(--fs-base); color:var(--c-ink); }
#tm-root .tw .fam { color:var(--c-ink-3); font-size:var(--fs-sm); overflow-wrap:anywhere; }
#tm-root .tw .chip { align-self:center; }
#tm-root .thread-head { display:flex; flex-wrap:wrap; align-items:center; gap:6px; margin-top:2px; padding-bottom:var(--sp-3); border-bottom:1px solid var(--c-line); }
#tm-root .thread-head .when { color:var(--c-ink-3); font-size:var(--fs-sm); margin-inline-end:auto; }
#tm-root .thread-head .chip { background:none; padding:0 2px; color:var(--c-ink-3); }
#tm-root .thread-head .chip + .chip::before { content:'·'; margin-inline-end:6px; opacity:.7; }
#tm-root .turn { padding:var(--sp-3) 0 2px; }
#tm-root .turn + .turn { border-top:1px solid var(--c-line); margin-top:var(--sp-3); }
#tm-root .chips { display:flex; flex-wrap:wrap; gap:6px; margin:0 0 10px; }
/* the child's words: a quiet well. The owl's words: his face and a warm sheet — never mistaken for one another */
#tm-root .q { width:fit-content; max-width:100%; background:var(--c-inset); border:1px solid var(--c-line); border-radius:var(--r-lg); border-start-start-radius:5px; padding:10px 14px; font-size:var(--fs-base); line-height:1.5; font-weight:var(--fw-medium); color:var(--c-ink); overflow-wrap:anywhere; }
#tm-root .say { display:flex; gap:10px; margin:10px 0 6px; align-items:flex-start; }
#tm-root .say .who { flex:none; width:34px; height:34px; border-radius:50%; background:var(--c-primary-soft) center / 118% no-repeat; border:1px solid var(--c-primary-line); font-size:0; overflow:hidden; }
#tm-root .say .who img { display:block; width:100%; height:100%; object-fit:cover; transform:scale(1.18); }
#tm-root .say p { flex:1; min-width:0; margin:0; padding:10px 14px; border-radius:var(--r-lg); border-start-start-radius:5px; background:rgb(255 180 84 / .1); border:1px solid rgb(255 180 84 / .24); font-size:var(--fs-base); line-height:1.6; color:var(--c-ink); overflow-wrap:anywhere; }
#tm-root .turn > .small { margin-top:var(--sp-1); }
#tm-root .heard { margin:var(--sp-2) 0 2px; padding:var(--sp-2) var(--sp-3); border-radius:var(--r-md); border:1px dashed var(--c-line-strong); font-size:var(--fs-sm); color:var(--c-ink-2); display:grid; gap:var(--sp-1); }
#tm-root .heard b { color:var(--c-ink-3); font-weight:var(--fw-medium); font-size:var(--fs-xs); margin-inline-end:6px; }
#tm-root .play { display:inline-flex; align-items:center; gap:6px; min-height:34px; margin:var(--sp-2) 0 0; padding:0 14px 0 12px; border:1px solid var(--c-line-strong); border-radius:var(--r-full); background:transparent; color:var(--c-ink-2); font:var(--fw-medium) var(--fs-sm)/1 var(--font-ui); cursor:pointer; transition:background var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
#tm-root .play.on { background:var(--c-primary); border-color:var(--c-primary); color:var(--c-primary-ink); }
/* the review: two small buttons; what was written shows as the reviewer's own note */
#tm-root .rate { display:flex; flex-wrap:wrap; gap:var(--sp-2); margin:var(--sp-3) 0 2px; align-items:center; }
#tm-root .rbtn { display:inline-flex; align-items:center; gap:6px; min-height:36px; padding:0 14px 0 12px; border:1px solid var(--c-line-strong); border-radius:var(--r-full); background:transparent; color:var(--c-ink-2);
  font:var(--fw-medium) var(--fs-sm)/1 var(--font-ui); cursor:pointer; transition:background var(--t-fast) var(--ease), color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease); }
#tm-root .rbtn:active { transform:scale(.96); }
#tm-root .rbtn.plain { border-color:transparent; color:var(--c-ink-3); padding:0 var(--sp-2); }
#tm-root .rbtn.good.on { background:var(--c-ok-soft); border-color:var(--c-ok-line); color:var(--c-ok); font-weight:var(--fw-semi); }
#tm-root .rbtn.fix.on { background:var(--c-primary-soft); border-color:var(--c-primary-line); color:var(--c-primary); font-weight:var(--fw-semi); }
#tm-root .saved { display:inline-flex; align-items:center; gap:4px; color:var(--c-ok); font-size:var(--fs-sm); opacity:0; transition:opacity .3s; }
#tm-root .saved.show { opacity:1; }
#tm-root .mine { margin-top:10px; padding:10px 14px; border-radius:var(--r-md); background:rgb(255 238 214 / .04); border:1px solid var(--c-line); border-inline-start:3px solid var(--c-primary); font-size:var(--fs-sm); line-height:1.55; cursor:pointer; }
#tm-root .mine b { color:var(--c-primary); font-weight:var(--fw-semi); display:block; font-size:var(--fs-xs); letter-spacing:.02em; margin-bottom:2px; }
#tm-root .mine .n { color:var(--c-ink-2); margin-top:6px; }

/* ── guidance: the standing notes ── */
#tm-root .note { display:flex; gap:var(--sp-3); align-items:flex-start; padding:var(--sp-3) 0; }
#tm-root .note:first-child { padding-top:2px; } #tm-root .note:last-child { padding-bottom:2px; }
#tm-root .note + .note { border-top:1px solid var(--c-line); }
#tm-root .note .txt { flex:1; min-width:0; font-size:var(--fs-md); overflow-wrap:anywhere; }
#tm-root .note.off .txt { color:var(--c-ink-3); }
#tm-root .note .acts { display:flex; flex-wrap:wrap; gap:var(--sp-1) var(--sp-3); margin-top:6px; align-items:center; }
#tm-root .note .acts button, #tm-root .acts2 button { display:inline-flex; align-items:center; gap:5px; min-height:30px; border:0; background:transparent; color:var(--c-ink-3); font:var(--fw-medium) var(--fs-sm)/1 var(--font-ui); padding:0 2px; border-radius:var(--r-sm); cursor:pointer; }
#tm-root .note .acts button.danger, #tm-root .acts2 button.danger { color:var(--c-danger); }
@media (hover:hover) { #tm-root .note .acts button:hover, #tm-root .acts2 button:hover { color:var(--c-ink); } #tm-root .note .acts button.danger:hover, #tm-root .acts2 button.danger:hover { color:var(--c-danger); text-decoration:underline; text-underline-offset:3px; } }
#tm-root .note .switch { margin-top:1px; }
#tm-root .feed { display:flex; gap:10px; align-items:center; font-size:var(--fs-sm); color:var(--c-ink-2); }
#tm-root .feed .dot { width:8px; height:8px; border-radius:50%; background:var(--c-primary); box-shadow:0 0 0 4px var(--c-primary-soft); flex:none; }

/* ── families ── */
#tm-root .group { font-size:var(--fs-xs); font-weight:var(--fw-semi); color:var(--c-ink-3); margin:var(--sp-6) 4px calc(-1 * var(--sp-1)); letter-spacing:.03em; }
#tm-root .person + .person { border-top:1px solid var(--c-line); margin-top:var(--sp-3); padding-top:var(--sp-3); }
#tm-root .pname { font-weight:var(--fw-semi); font-size:var(--fs-base); display:flex; flex-wrap:wrap; gap:6px; align-items:center; }
#tm-root .pmail { color:var(--c-ink-3); font-size:var(--fs-sm); overflow-wrap:anywhere; }
#tm-root .acts2 { display:flex; flex-wrap:wrap; gap:2px var(--sp-3); margin-top:6px; align-items:center; }
#tm-root .ask { margin-top:var(--sp-2); padding:var(--sp-3); border-radius:var(--r-md); background:var(--c-danger-soft); border:1px solid var(--c-danger-line); font-size:var(--fs-sm); line-height:1.5; }
#tm-root .ask .row { margin-top:10px; }
#tm-root .status { display:flex; gap:6px; align-items:baseline; margin-top:var(--sp-2); font-size:var(--fs-sm); color:var(--c-ok); }
#tm-root .status.warn { color:var(--c-primary); }
#tm-root .kids { margin-top:var(--sp-3); padding:2px var(--sp-3); border-radius:var(--r-lg); background:rgb(24 17 31 / .6); border:1px solid var(--c-line); }
#tm-root .kidrow { display:flex; align-items:center; gap:10px; flex-wrap:wrap; padding:10px 0; }
#tm-root .kidrow + .kidrow, #tm-root .kmem + .kidrow { border-top:1px solid var(--c-line); }
#tm-root .kidrow .kname { flex:1; min-width:80px; font-weight:var(--fw-semi); font-size:var(--fs-base); }
#tm-root .kids .none { color:var(--c-ink-3); font-size:var(--fs-sm); padding:10px 0; }
#tm-root .seg { background:var(--c-inset); padding:2px; }
#tm-root .seg > button { min-height:28px; min-width:0; padding:0 11px; font-size:var(--fs-xs); }
#tm-root .seg > button.on { background:var(--c-primary-soft); color:var(--c-primary); box-shadow:inset 0 0 0 1px var(--c-primary-line); }
#tm-root .inl { display:flex; gap:var(--sp-2); align-items:center; flex-wrap:wrap; width:100%; padding:var(--sp-1) 0; }
#tm-root .inl input { flex:1 1 160px; width:auto; min-width:0; min-height:40px; padding:8px 12px; }
#tm-root .addkid, #tm-root .kabout .kaboutBtn { display:inline-flex; align-items:center; gap:6px; min-height:36px; border:0; background:transparent; color:var(--c-primary); font:var(--fw-medium) var(--fs-sm)/1 var(--font-ui); padding:0; cursor:pointer; border-radius:var(--r-sm); }
/* «what the owl should know» and «what the owl remembers» under each child */
#tm-root .kabout { padding:0 0 var(--sp-2); }
#tm-root .kabout .ktext, #tm-root .kmem .ktext { font-size:var(--fs-sm); line-height:1.55; color:var(--c-ink-2); white-space:pre-wrap; margin:2px 0 4px; }
#tm-root .klabel { font-size:var(--fs-xs); font-weight:var(--fw-semi); letter-spacing:.02em; color:var(--c-ink-3); margin:4px 0; }
#tm-root .khint { font-size:var(--fs-xs); line-height:1.5; color:var(--c-ink-3); margin:4px 0 6px; }
#tm-root .kabout textarea { min-height:84px; }
#tm-root .kmem { padding:var(--sp-2) 0 10px; border-top:1px dashed var(--c-line); }
#tm-root .kmemhead { display:flex; align-items:baseline; gap:var(--sp-2); flex-wrap:wrap; margin:2px 0; }
#tm-root .kmemat { font-size:var(--fs-xs); color:var(--c-ink-3); }
#tm-root .kmemclear { background:none; border:0; color:var(--c-danger); font:var(--fw-medium) var(--fs-sm)/1.3 var(--font-ui); padding:4px 0; cursor:pointer; border-radius:var(--r-sm); }
/* the child's animal: the picture from public/avatars.webp (the emoji stays as the button's text for a reader and the tests) */
#tm-root .kav { width:38px; height:38px; flex:none; border-radius:50%; border:2px solid rgb(255 244 226 / .2); background:var(--c-cream) no-repeat; font-size:20px; line-height:1; padding:0; display:inline-grid; place-items:center; cursor:pointer; color:transparent; overflow:hidden; transition:border-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease); }
#tm-root .kav:not([style*="background-image"]) { color:inherit; background:rgb(255 238 214 / .06); }
#tm-root .kav.none { border-style:dashed; border-color:var(--c-line-strong); color:var(--c-ink-3); background:transparent; }
#tm-root .kav.open, #tm-root .kav.on { border-color:var(--c-primary); box-shadow:0 0 0 3px var(--c-primary-soft); }
#tm-root .kav:active { transform:scale(.94); }
#tm-root .kavpick { padding:0 0 10px; }
#tm-root .kavpick .klabel { display:block; margin:0 0 6px; }
#tm-root .kavrow { display:flex; flex-wrap:wrap; gap:var(--sp-2); align-items:center; }
#tm-root .kavrow .kav { width:44px; height:44px; }
#tm-root .kavnone { background:none; border:0; color:var(--c-ink-2); font:var(--fw-medium) var(--fs-sm)/1 var(--font-ui); padding:4px 6px; cursor:pointer; text-decoration:underline; text-underline-offset:3px; }

/* ── the answers tab ── */
#tm-root .qa-a dt { font-size:var(--fs-xs); color:var(--c-primary); margin-top:var(--sp-3); }
#tm-root .qa-a dt .qn { display:inline-block; font-weight:var(--fw-bold); margin-inline-end:6px; }
#tm-root .qa-a dt .qt { display:block; color:var(--c-ink-3); font-weight:var(--fw-medium); font-size:var(--fs-xs); line-height:1.45; margin-top:2px; text-align:start; letter-spacing:0; }
#tm-root .qa-a dd { white-space:pre-wrap; color:var(--c-ink); font-size:var(--fs-md); overflow-wrap:anywhere; }

/* ── the about tab: the reviewer's page, in Russian — long reading on the same surfaces ── */
#tm-root .about { padding-top:var(--sp-1); font-size:var(--fs-base); line-height:1.65; }
#tm-root .about p { margin:9px 0; }
#tm-root .about b { color:var(--c-ink); font-weight:var(--fw-semi); }
#tm-root .about ul, #tm-root .about ol { padding-inline-start:22px; margin:var(--sp-2) 0; }
#tm-root .about li { margin:7px 0; }
#tm-root .about .ab-head { display:flex; gap:14px; align-items:center; margin:10px 0 6px; }
#tm-root .about .ab-head img { width:72px; height:72px; object-fit:contain; flex:none; }
#tm-root .about .ab-head img:not([src]) { visibility:hidden; }
#tm-root .about h1 { font-size:var(--fs-2xl); line-height:1.2; font-weight:var(--fw-bold); margin:0; text-wrap:balance; }
#tm-root .about h2 { font-size:var(--fs-xl); line-height:1.3; font-weight:var(--fw-semi); margin:36px 0 var(--sp-2); color:var(--c-primary); text-wrap:balance; }
#tm-root .about h3 { font-size:var(--fs-base); font-weight:var(--fw-semi); margin:22px 0 4px; color:var(--c-ink); }
#tm-root .about .ab-lead { color:var(--c-ink-2); font-size:var(--fs-md); margin:6px 0; }
#tm-root .about .ab-note { font-size:var(--fs-sm); color:var(--c-ink-2); }
#tm-root .about .ab-toc { display:flex; flex-wrap:wrap; gap:6px; margin:var(--sp-3) 0 var(--sp-1); }
#tm-root .about .ab-toc button { min-height:32px; padding:0 12px; }
#tm-root .about .ab-link { border:0; background:transparent; color:var(--c-primary); padding:0; font:inherit; text-decoration:underline; text-underline-offset:3px; cursor:pointer; }
#tm-root .about .ab-card { border-radius:var(--r-lg); padding:12px 16px; margin:var(--sp-3) 0; }
#tm-root .about .ab-who { display:grid; grid-template-columns:repeat(auto-fit, minmax(200px, 1fr)); gap:10px; }
#tm-root .about .ab-who .ab-card { margin:0; }
#tm-root .about .ab-who b { display:block; font-size:var(--fs-base); color:var(--c-primary); margin-bottom:2px; }
#tm-root .about .ab-quote { border-inline-start:3px solid var(--c-primary); padding:6px 12px; margin:var(--sp-2) 0; background:var(--c-primary-soft); border-radius:0 var(--r-md) var(--r-md) 0; }
#tm-root .about .ab-table { border-collapse:collapse; width:100%; font-size:var(--fs-md); margin:6px 0; }
#tm-root .about .ab-table td { border-top:1px solid var(--c-line); padding:7px 4px; vertical-align:top; }
#tm-root .about .ab-table td:first-child { font-weight:var(--fw-semi); color:var(--c-ink); white-space:nowrap; padding-inline-end:10px; }
#tm-root .about .ab-q, #tm-root .about .ab-item { border-radius:var(--r-lg); padding:12px 14px; margin:14px 0; }
#tm-root .about .ab-q p { margin:4px 0; }
#tm-root .about .ab-n, #tm-root .about .ab-tag { margin-inline-end:6px; vertical-align:2px; }
#tm-root .about .ab-ctx { font-size:var(--fs-sm); color:var(--c-ink-2); }
#tm-root .about textarea { margin-top:var(--sp-2); min-height:76px; }
#tm-root .about .ab-bar { position:static; margin:18px calc(-1 * var(--gutter)) 0; padding:10px var(--gutter) calc(10px + var(--safe-b));
  background:rgb(29 21 38 / .94); border-top:1px solid var(--c-line); backdrop-filter:blur(10px); -webkit-backdrop-filter:blur(10px); display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
#tm-root .about .ab-bar input { flex:1 1 150px; min-width:0; width:auto; min-height:44px; padding:10px 12px; }
#tm-root .about .ab-send { flex:none; }
#tm-root .about #tm-qaStatus { font-size:var(--fs-sm); color:var(--c-ink-2); flex-basis:100%; }
#tm-root .about #tm-qaStatus:empty { display:none; }
#tm-root .about .ab-ex { margin:28px 0 var(--sp-2); border-top:1px solid var(--c-line); padding-top:var(--sp-3); }
#tm-root .about .ab-ex > summary { width:auto; font-size:var(--fs-lg); font-weight:var(--fw-semi); color:var(--c-ink); padding:var(--sp-2) 0; line-height:1.4; }
#tm-root .about .ab-tag.bad { background:var(--c-danger); color:var(--c-danger-ink); }
#tm-root .about .ab-iq { font-weight:var(--fw-semi); font-size:var(--fs-base); margin-top:var(--sp-2); }
#tm-root .about .ab-say { margin:10px 0 var(--sp-2); font-size:var(--fs-base); }
#tm-root .about .ab-item dt { font-size:var(--fs-xs); }
#tm-root .about .ab-row { display:flex; gap:10px; align-items:center; flex-wrap:wrap; margin-top:10px; }
#tm-root .about .ab-old { color:var(--c-primary); }

/* ── the lab tab: the form, one answer or two side by side (stacked on a phone), the earlier runs folded ── */
#tm-root .labrow { display:flex; flex-wrap:wrap; gap:var(--sp-2) 10px; align-items:center; }
#tm-root .labrow .small { flex:1; min-width:0; }
#tm-root .labrow label { margin:0; }
#tm-root #tm-labKidHint { margin:0; }
#tm-root .labnote { display:flex; gap:var(--sp-2); align-items:baseline; justify-content:space-between; flex-wrap:wrap; padding:6px 0; border-top:1px dashed var(--c-line); font-size:var(--fs-sm); color:var(--c-ink-2); }
#tm-root .labnote span { flex:1 1 180px; min-width:0; overflow-wrap:anywhere; }
#tm-root .labnote .link { flex:none; white-space:nowrap; }
#tm-root .labrun .q { margin:var(--sp-3) 0 var(--sp-1); }
#tm-root .labrun .thread-head { margin-top:0; }
#tm-root .labans { padding:var(--sp-3) 0 2px; min-width:0; overflow-wrap:anywhere; }
#tm-root .labpair .labans + .labans { border-top:1px solid var(--c-line); margin-top:var(--sp-3); }
#tm-root .lablabel { display:flex; align-items:center; gap:6px; font-size:var(--fs-xs); font-weight:var(--fw-semi); color:var(--c-ink-3); letter-spacing:.03em; margin-bottom:var(--sp-2); }
#tm-root .labans[data-v=plus] .lablabel, #tm-root .labans[data-v=draft] .lablabel { color:var(--c-primary); }
#tm-root .labans[data-v=plus] .lablabel::before, #tm-root .labans[data-v=draft] .lablabel::before { content:''; width:7px; height:7px; border-radius:50%; background:var(--c-primary); box-shadow:0 0 0 3px var(--c-primary-soft); }
#tm-root .labmeta { margin-top:10px; display:grid; gap:2px; }
#tm-root .labtexts ul { margin:4px 0 0; padding-inline-start:20px; font-size:var(--fs-sm); color:var(--c-ink-2); }
#tm-root .labtexts li.isdraft { color:var(--c-primary); }
#tm-root .labhist { margin-top:var(--sp-6); }
#tm-root .labrun summary { width:auto; flex-wrap:wrap; gap:4px 6px; color:var(--c-ink-3); }
#tm-root .labrun summary .labsq { flex:1 1 140px; min-width:0; color:var(--c-ink); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
@media (min-width:900px) {
  #tm-root .labpair { display:grid; grid-template-columns:1fr 1fr; gap:0 22px; }
  #tm-root .labpair .labans + .labans { border-top:0; margin-top:0; border-inline-start:1px solid var(--c-line); padding-inline-start:22px; }
  #tm-root .labrun:has(.labpair) { width:min(1040px, calc(100vw - 48px)); margin-inline:calc((606px - min(1040px, 100vw - 48px)) / 2); }
}

@media (prefers-reduced-motion:reduce) { #tm-root * { transition:none !important; animation:none !important; scroll-behavior:auto !important; } }

/* the owl's base instructions (guide tab, read-only) */
#tm-root details.base { margin-top:24px; border:1px solid rgb(255 255 255 / .12); border-radius:14px; padding:12px 14px; background:rgb(255 255 255 / .03); }
#tm-root details.base summary { cursor:pointer; font-weight:600; min-height:32px; display:flex; align-items:center; }
#tm-root details.base h3 { margin:16px 0 6px; font-size:14px; }
#tm-root details.base pre { margin:0; padding:12px; border-radius:10px; background:rgb(0 0 0 / .28); white-space:pre-wrap; overflow-wrap:anywhere; font:12.5px/1.55 ui-monospace, SFMono-Regular, Menlo, monospace; text-align:left; max-height:60vh; overflow:auto; }
