*{box-sizing:border-box;margin:0;padding:0;-webkit-tap-highlight-color:transparent}
html,body{height:100%;overflow:hidden;background:#4ABCE9;overscroll-behavior:none}
body{font-family:var(--font-ui);font-weight:700;color:var(--ink);user-select:none;-webkit-user-select:none;touch-action:manipulation;-webkit-touch-callout:none}
button{font:inherit;color:inherit;border:0;background:none;cursor:pointer;touch-action:manipulation}
img{-webkit-user-drag:none}
input,select{font:inherit;user-select:text;-webkit-user-select:text}

/* ---------- backgrounds (persistent layers, cross-fade 400ms) ---------- */
#bg{position:fixed;inset:0;z-index:0}
#bg>div[data-bg]{position:absolute;inset:0;opacity:0;transition:opacity .4s ease-out}
#bg>div.on{opacity:1}
[data-bg=morning]{background:linear-gradient(var(--sky-top),var(--sky-bottom))}
[data-bg=afternoon]{background:linear-gradient(var(--afternoon-top),var(--afternoon-bottom))}
[data-bg=evening]{background:linear-gradient(var(--evening-top),var(--evening-bottom))}
[data-bg=night]{background:linear-gradient(var(--night-top),var(--night-bottom))}
[data-bg=parent]{background:var(--parent-bg)}
#grass{position:absolute;left:0;right:0;bottom:0;height:calc(150px*var(--k,1));z-index:1;background:linear-gradient(var(--grass-top),var(--grass-bottom));opacity:0;transition:opacity .3s}
body[data-screen=week] #grass{opacity:1}
.cloud{position:absolute;width:300px;opacity:.85;top:6%}
.cloud.r{right:-40px}.cloud.l{left:-40px;transform:scaleX(-1)}
body[data-screen=parent] .cloud,body[data-screen=celebrate] .cloud{display:none}

/* ---------- stage ---------- */
#stage{position:fixed;left:0;top:0;transform-origin:top left;z-index:1;overflow:hidden}
#screen,.screen{position:absolute;inset:0}
/* Notches and system bars: the sky/ground keeps bleeding to the edges, the screens inset out of the way.
   env() is in device pixels and the stage is transform-scaled, so divide by the scale (--k). */
#screen{inset:calc(var(--safe-t)/var(--k)) calc(var(--safe-r)/var(--k)) calc(var(--safe-b)/var(--k)) calc(var(--safe-l)/var(--k))}
.screen{animation:rise .32s ease-out both}
@keyframes rise{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:none}}
.sp{flex:1}
#rotate{display:none;position:fixed;inset:0;z-index:99;background:var(--ink);color:#fff;font:800 28px var(--font-head);align-items:center;justify-content:center;text-align:center;padding:30px}
/* Only a device you can actually turn, and only one that has not already said no. index.html decides which is which
   (from the SCREEN, before the first paint) and writes data-rotate="off" on <html> when nobody is to be asked.
   `pointer:coarse` used to be the test and was wrong: a laptop with a touchscreen reports one. */
@media (orientation:portrait){html:not([data-rotate=off]) #rotate{display:flex}}

/* ---------- shared pieces ---------- */
.banner{background:url(../assets/ui/banner.png) center/100% 100% no-repeat;height:74px;display:flex;align-items:center;min-width:0}
.banner-in{padding:0 40px;font-family:var(--font-head);font-weight:800;font-size:38px;line-height:1;white-space:nowrap;display:flex;align-items:baseline;gap:12px}
.banner-in em{font-style:normal;color:var(--ink-blue);font-size:26px}
.child-chip{display:flex;align-items:center;gap:8px;background:#fff;border-radius:var(--radius-chip);box-shadow:var(--shadow-chip);padding:4px 16px 4px 6px;font:800 26px var(--font-head)}
.child-chip img{width:44px;height:44px;object-fit:contain}
.pill{background:#fff;color:var(--ink);border-radius:18px;padding:8px 24px;font:800 22px var(--font-head);box-shadow:var(--shadow-chip);min-height:52px;transition:transform .12s var(--ease-press)}
.pill.on{background:var(--star);color:#fff}
.pill:active{transform:translateY(2px)}
.bar{display:flex;gap:14px;align-items:center}
/**
 * **A KID FOOTER KEEPS A FINGER'S WIDTH CLEAR OF THE RIGHT EDGE.** The last control in one is Parent mode, and it sat
 * against the screen's own 20px gutter (`.week{padding:14px 20px 0}`) — which at 1024 wide is drawn at 0.8, so
 * **16 REAL pixels**. Nothing was ever clipped (measured over 7 sizes × 1/4 children × EN/FR/ES: 0 of 84), but 16px is
 * near enough to the bezel to read as clipped, and it is reported as such. 36 more stage px puts it 44.8 real px clear
 * at that worst scale, and it costs FOOTER width rather than board width.
 *
 * `footer.bar`, not `.bar`: that class is also a card's label bar and the importer's progress bar. It covers My week,
 * Countdowns and School. **`.rt-foot` on My day is deliberately left alone** — measured, its flex spacer is ZERO stage
 * px wide at 1280×800, so it has nothing to give and already wraps in French (see the note by `.rt-foot`).
 */
footer.bar{padding-right:36px;margin-bottom:var(--foot-gap)}
/**
 * **ONE GAP UNDER ALL FOUR KID FOOTERS, AND IT IS MEASURED IN REAL PIXELS.**
 *
 * It was four different numbers and nobody had looked: My week 46 stage px, Countdowns and School 10, My day 0 — which
 * is 37–83 real px, 8–18, and 0. My week stood out by 36 stage px, and that is the whole of "My week's footer sits too
 * high". The cause was NOT the info-row or the pill (the row is 56 px whatever is in it): `footer.bar{margin-bottom}`
 * was written at the top of this file and `.countdowns .bar, .school .bar{margin:0 0 10px}` further down beats it on
 * specificity as well as order, so the rule only ever reached My week — where `.week .bar` had been edited too.
 *
 * A fixed stage-px margin cannot be right, because the stage is drawn at 0.8 on a 1024 tablet and 1.8 on a 2560
 * monitor: the same 46 px is 37 real px on one and 83 on the other. `--k` is the scale `ui.js fit()` already publishes,
 * so dividing by it gives **exactly 44 real pixels under every kid footer at every size** — a finger's width, which is
 * the number this exists for, without the hole a big screen was showing.
 */
:root{--foot-gap:calc(44px / var(--k, 1))}
.toast{position:absolute;left:50%;bottom:120px;transform:translateX(-50%);background:var(--ink);color:#fff;border-radius:16px;padding:12px 22px;font:800 20px var(--font-head);z-index:50;display:flex;flex-direction:column;align-items:center;animation:rise .2s ease-out;text-align:center}
.toast small{font:700 15px var(--font-ui);opacity:.8}
.star{display:inline-block;width:22px;height:22px;background:var(--star);clip-path:polygon(50% 0,62% 36%,100% 38%,70% 60%,80% 100%,50% 76%,20% 100%,30% 60%,0 38%,38% 36%)}
.stars .star{margin:0 2px}
.stars.big .star{width:44px;height:44px;margin:0 4px}
.star.pop{animation:pop .3s cubic-bezier(.2,1.4,.4,1) both;animation-delay:calc(.35s + var(--i)*.09s)}
@keyframes pop{from{transform:scale(.6);opacity:0}to{transform:none;opacity:1}}

/* ---------- weekly board ---------- */
.week{padding:14px 20px 0;display:flex;flex-direction:column;gap:0}
/**
 * **THE HEADER WRAPS, AND THE WEEK BOX NEVER SHRINKS BELOW ITS OWN WORDS.**
 *
 * It was one non-wrapping row of a fixed 74px in which the banner was the ONLY item allowed to give
 * (`flex:1 1 auto`); everything else — the arrows, "how far away", "↩ This week", "‹ All children", Month, Year,
 * Season — is `flex:none`, on purpose, because a squeezed chip is unreadable. So every chip that appeared came
 * straight out of the week box, and past a point the week's own dates were ellipsised away.
 *
 * Measured, in stage px, of the 1240 the header has (the stage is 1280 wide whatever the screen, so this is the same
 * at every size in sizes.html):
 *   EN, one child, this week          fixed 668 → box 524, needs 302   ok
 *   FR, one child, LAST week          fixed 826 → box 350, needs 379   clipped
 *   EN, four children, one picked, last week   fixed 900 → box 268, needs 309   clipped
 *   FR, four children, one picked, last week   fixed 993 → box 175, needs 379   clipped — the worst case
 * So it is NOT a multi-child bug: a French or Spanish family with ONE child clips as soon as they tap ‹. Picking a
 * child adds the "‹ All children" pill (167px in French) and navigating adds "how far away" (224px) and
 * "↩ This week" (160px), which is why that combination is the one that was noticed.
 *
 * The fix is the same shape as the parent weekly header's (`.wkb-head`, see CONTEXT): the row is allowed to WRAP, so
 * what does not fit moves down instead of eating the thing next to it. `flex:0 1 auto` on the banner stops it
 * shrinking past its text while there is another line to use. The header is `min-height` rather than `height`, and the
 * board below it is `flex:1`, so the two-line case costs the board one row of pixels and nothing is ever unreadable.
 */
.wk-head{display:flex;flex-wrap:wrap;align-content:center;row-gap:6px;gap:14px;align-items:center;min-height:74px;height:auto;flex:none}
.wk-banner{width:520px}
.wk-of{font-size:26px;color:var(--ink-blue)}
.chip{background:#fff;border-radius:var(--radius-chip);box-shadow:var(--shadow-chip);padding:6px 20px;display:flex;flex-direction:column;justify-content:center;height:60px;min-width:150px}
.wk-head>.chip{flex:none;min-width:0;padding:6px 12px}
.wk-head>.chip b,.wk-head>.chip small{white-space:nowrap}
/* `0 1 auto`: it may still grow to fill a line it shares, but it is no longer the one thing that pays for every chip.
   The ellipsis rule stays as the last resort for a screen narrower than the banner alone — which nothing in
   sizes.html is. */
.wk-head>.banner{flex:0 1 auto;min-width:120px;width:auto;max-width:100%}
.wk-head>.banner .banner-in{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.wk-head{gap:8px}
/* the spacer has a zero basis, so it pushes the chips right on a line they fit on and never forces a break by itself */
.wk-head>.sp{flex:1 1 0;min-width:0}
.wk-head .ichip.away{flex:none;height:52px;padding:4px 13px;gap:6px}
.wk-head .ichip.away b{font-size:18px}
.wk-head .ichip.away .wxi{font-size:19px}
.chip small{font:800 12px var(--font-ui);letter-spacing:.06em;color:var(--ink-muted)}
.chip b{font:800 26px/1 var(--font-head)}
.markers{display:flex;gap:12px;align-items:center;height:56px;flex:none}
.marker{display:flex;align-items:center;gap:8px;background:var(--surface-veil);border-radius:12px;box-shadow:var(--shadow-chip);padding:4px 14px 4px 4px;height:48px;min-width:128px;text-align:left;transition:transform .12s var(--ease-press)}
.marker:active{transform:translateY(2px)}
.marker img{width:52px;height:41px;object-fit:cover;border-radius:9px;background:#fff}
.marker span{display:flex;flex-direction:column;line-height:1.05}
.marker b{font:800 14px var(--font-head);letter-spacing:.03em}
.marker em{font:700 11px var(--font-ui);font-style:normal;color:var(--ink-blue)}
.marker.is-today{background:#fff;outline:4px solid var(--drop-active);outline-offset:-1px}
.child-chip{margin-left:auto}
.screen.week .info-row .child-chip{margin-left:0;margin-right:4px;flex:none;height:52px;gap:10px;padding:2px 18px 2px 4px;border-radius:var(--radius-chip);background:#fff;box-shadow:var(--shadow-chip),inset 0 0 0 3px var(--kc,var(--star));display:flex;align-items:center}
.screen.week .info-row .child-chip>span:not(.avbub):not(.pmascot){font:800 28px/1 var(--font-head);color:var(--kc,var(--ink));max-width:200px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.screen.week .info-row .child-chip>img,.screen.week .info-row .child-chip>.pmascot,.screen.week .info-row .child-chip>.avbub{flex:none;width:44px!important;height:44px!important}
/* **`pan-y` is what makes the swipe reach us at all.** Without it the browser claims a horizontal drag for its own
   panning and fires `pointercancel` after the first move — measured, one `pointermove` then gone. It says: the day
   columns may still scroll up and down, but sideways is this screen's. `.sc-body` has had it all along, which is why
   the School screen's swipe worked and this one would not have.
   **`.cards` needs it as much as `.board` does**, and that is the half it is easy to miss: `.cards` is the element
   that actually SCROLLS, so for a finger landing inside a column the browser reads ITS touch-action, not the board's.
   With it only on the board, a swipe starting on empty column space worked and the same swipe starting on a card
   three inches lower was cancelled — which is every swipe a child will ever make. */
.board,.mkboard,.cards{touch-action:pan-y}
/* The new week (or school day) arrives from the way you went: `--slide-dx` is +100% going forward, -100% going back,
   set by `swipe.js slideIn`. One keyframe serves both directions, so there is one duration to change.
   `both` holds the end state; `#stage` is `overflow:hidden`, which is what lets it start a whole width off-screen.
   The animations SETTING is checked in JS (`FX.anim()`); `prefers-reduced-motion` is switched off here, the way every
   other effect in this file is. */
.wk-slide{animation:wk-slide 180ms ease-out both}
@keyframes wk-slide{from{transform:translateX(var(--slide-dx,100%));opacity:.35}to{transform:none;opacity:1}}
@media (prefers-reduced-motion:reduce){.wk-slide{animation:none}}
.board{flex:1;min-height:0;display:grid;grid-template-columns:repeat(7,1fr);grid-template-rows:26px 1fr;column-gap:10px;padding-bottom:10px;position:relative}
/* **The empty board's message, LAID OVER the grid rather than placed in it.** A row of its own would move every
   column down on the one screen whose layout has been argued over most, and the columns are the thing a parent is
   being told how to fill — they stay. `pointer-events:none` keeps it a message: a holiday card behind it is still
   what a tap finds, which is the game pill's hit-testing lesson and the rule `.cards-more` above already follows.
   It shares `.rt-empty`'s type scale, because it is the same sentence on the same kind of screen. */
/* **ONE SOLID PANEL, NOT THREE TRANSLUCENT PILLS, AND CONTRAST IS THE REASON.** The first version used
   `--surface-veil` (72% white) the way `.rt-empty` does — which is fine over My day's card area and is NOT fine
   here: the weekly board carries the sky behind it, so on an evening theme the veil composited to a mid-grey and
   the two smaller lines measured **2.2:1 and 2.4:1**, against 4.5 for text this size. Measured by compositing
   every layer's alpha, because reading `color` against `backgroundColor` ignores both and reported 11.2.
   A solid panel makes the figure independent of the sky, which is the only way it can be right in four themes. */
.wk-empty{position:absolute;inset:0;z-index:5;pointer-events:none;display:flex;align-items:center;justify-content:center}
.wk-empty-in{background:var(--card-bg,#fff);border-radius:24px;padding:24px 34px;max-width:42ch;text-align:center;
  box-shadow:var(--shadow-card,0 8px 24px rgba(16,49,147,.14));display:flex;flex-direction:column;gap:8px}
.wk-empty b{font:800 30px var(--font-head);color:var(--ink,#103193)}
.wk-empty span{font:700 17px var(--font-ui);color:var(--ink-blue)}
/* Quieter than the line the child reads: it names the route, for the parent over their shoulder. Not `--ink-muted`,
   which is alpha and would put this back under 4.5 on a pale panel — a fixed ink, one step down. */
.wk-empty .wk-empty-how{font-weight:600;color:#4A5B86}
@media (max-height:780px){.wk-empty-in{padding:16px 26px}.wk-empty b{font-size:24px}.wk-empty span{font-size:15px}}
/* The weekend panel. **Its `grid-column` is written INLINE by `week.js weekendPanelsHTML` and is deliberately not here
   any more.** It used to be `6/8`, which is only true of a Monday-first week: Saturday and Sunday are the weekend in both
   layouts, but a Sunday-first week puts them at OPPOSITE ENDS of the board, so there are two single-column caps rather
   than one wide one. `.solo` is such a cap and rounds all four corners — a chip, not one end of a bar. */
/* **THE CAP KEPT THE WORD; `.wk-wash` KEPT NOTHING, SO IT WENT.** The panel used to be a cap plus a full-height
   purple wash behind Saturday and Sunday. The wash is now a third background on columns that already carry their
   own day colour at `--wk-tint * 0.64`, and with a short tint it would have put back exactly the full-height block
   this pass removes. The cap stays, because the WORD is the part that teaches, and it rounds all four corners now
   that there is nothing below it to cap. The several-children board (`.mk-wash`) is untouched: its grid is children
   as rows, so the argument above does not transfer to it. */
.wk-head-strip{background:var(--weekend-panel);border-radius:14px;display:flex;align-items:center;justify-content:center;gap:10px;color:#fff;font:800 13px var(--font-ui);letter-spacing:.06em;min-width:0;overflow:hidden}
.wk-head-strip b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.wk-head-strip em{font-style:normal;opacity:.85}
/* A single-column cap: narrower, so the word is allowed to shrink rather than be clipped, and the wash keeps its own
   gutter instead of bleeding into the column beside it (there is a weekday there, not the other weekend day). */
.wk-head-strip.solo{font-size:11px;letter-spacing:.02em;padding:0 2px}
/* A running span's band (week.js spanBandsHTML). `grid-column` and `grid-row` are inline for the same reason the
   weekend panel's are: only week.js knows which columns a run covers. Square by default and rounded only on an end
   that is REALLY an end (`.opens` / `.closes`), so a band running off the edge of the week does not claim Monday was
   the first day of the holiday. The name is allowed to ellipsis rather than widen the row - the band is a marker, and
   the chip and the Countdowns tab carry the sentence. */
.wk-span{background:var(--span-band);display:flex;align-items:center;justify-content:center;gap:6px;color:#fff;font:800 13px var(--font-ui);min-width:0;overflow:hidden;margin:0 -5px 2px;padding:0 6px;z-index:2}
.wk-span b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.wk-span.opens{border-radius:12px 0 0 12px}
.wk-span.closes{border-radius:0 12px 12px 0}
.wk-span.opens.closes{border-radius:12px}
.wk-span .wxi{font-size:14px;flex:none;line-height:1}
.wk-span .wxi.ph img{width:16px;height:16px;border-radius:4px;object-fit:cover;display:block}
.mkboard .wk-span{margin:0 -3px 2px;font-size:11px}
/**
 * **THE COLUMN IS THE DAY. The colour moved off the day name and onto the whole column, and that is the change
 * everything else in this block follows from.**
 *
 * The day pills were the brightest, most saturated objects on the screen - measured fully opaque and identical
 * across all five skies (`tools/measure-days.mjs`) - and they were the one row a non-reader cannot use. Their only
 * ACTION is scrolling a column to the top, inert unless that column overflows, and the tap already speaks the day
 * name, so demoting them costs a child nothing. Seven colour zones instead of seven words.
 *
 * **`.col` IS THE GRID CELL; `.zone` IS THE COLOURED BOX.** Two elements because the wash has to end below the last
 * card while the column keeps its whole cell: `.zone` is `flex:0 1 auto`, so the colour sizes to its content and
 * the space under a quiet day is sky. Measured at 1280x800: the wash covers 23% of the frame on a one-card day
 * against 72% at full height, and on a busy week the two are pixel-identical because the column already overflows.
 * So the week gains a free signal - tall column, busy day - that needs no reading, and costs nothing when there is
 * nothing to give back. `.zone` is also the containing block for `.cards-more`, which otherwise floats in the sky.
 *
 * **THE WASH IS MIXED TOWARDS WHITE, NOT TOWARDS TRANSPARENT, AND THAT IS THE WHOLE DIFFERENCE.** The first build
 * mixed towards `transparent`, which composites against whatever is behind - and the board carries the SKY. Seven
 * columns came out as seven near-identical pale blues, the sky's hue winning every time; seven zones that are not
 * seven colours is the idea failing silently. Against white it is the day's own hue whatever is behind it, which is
 * exactly the property the opaque pills had and the reason they read so strongly.
 *
 * `--wk-tint` is the one knob (`tokens.css` says why there is only one, and why its default is Coco's value).
 */
.col{display:flex;flex-direction:column;min-height:0;min-width:0;position:relative}
/* **NO HORIZONTAL PADDING, AND THAT IS NOT A STYLE CHOICE.** 5px a side looked right and cost the column 10px of
   content width, which pushed the Yesterday / Today / Tomorrow band's label past its box (`scrollWidth` 75 against
   `clientWidth` 70, measured in the live screen - the flat page has no marker band, so it could not have shown
   this). The cards and the band keep their own insets; the wash runs the full width of the cell and the 10px
   column gap does the separating. */
.zone{display:flex;flex-direction:column;min-height:0;position:relative;flex:0 1 auto;max-height:100%;
  border-radius:16px;padding:6px 0;background:color-mix(in srgb,var(--dayc) var(--wk-tint),#fff)}
/* TODAY is the same wash, stronger, plus a ring in the day's own colour - rather than a second kind of box laid on
   top of the first. It was `--today-wash` (flat white) with a `--star` ring and an 18px glow: three decorations
   saying what one stronger tint says, and the white one actively cancelled the day's colour on the one column a
   child is most often looking at. */
.col.is-focus>.zone{background:color-mix(in srgb,var(--dayc) calc(var(--wk-tint) * 1.8),#fff);
  box-shadow:0 0 0 3px var(--dayc) inset}
/* The weekend is quieter but still ITS OWN colour: a grey weekend would say "nothing happens here", and Saturday is
   the day with the most on it in plenty of families. */
.col.is-weekend>.zone{background:color-mix(in srgb,var(--dayc) calc(var(--wk-tint) * 0.64),#fff)}
.col.has-yesterday{opacity:.68}
.dome{width:56px;height:22px;background:#fff;border-radius:999px 999px 0 0;margin:0 auto;flex:none}
/* **PLAIN TEXT ON A COLOURED COLUMN.** No fill, no shadow, no radius, no 46px minimum - the colour is the column
   now, and this is 46px of chrome per column handed back to the cards. It is still a BUTTON with its own action and
   its own `data-say`, because the tap (scroll this column to the top; speak the day name) was never the problem;
   only its weight on the screen was. **19px is held by `tools/test-daytabs.mjs` and is not free to shrink**: under
   18.66px bold WCAG's floor moves from 3 to 4.5, so a smaller day name would change which contrast rule applies. */
/* **THE `/24px` LINE HEIGHT IS NOT TYPOGRAPHY, IT IS ARITHMETIC.** The pill had `min-height:46px`, which made the
   day name's box a whole number of pixels; plain text at 19px Baloo has a line box of 23.78, and that fraction ran
   straight down the column into the cards area - a 22px span band measured as costing 20.78 of it, and
   `test-cdband`'s "a band costs exactly its own row" started failing on a layout that was correct. An explicit
   whole-pixel line box puts the column budget back on integers. */
.daytab{flex:none;position:relative;background:none;border:0;padding:1px 0 2px;font:800 19px/24px var(--font-head);
  color:#fff;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
/* **`.daytab.fr{font-size:18px}` is gone, and the reason is a line 0.66px away.** It shrank French AND Spanish
   (`week.js` sets the class for any language but English), which put those two on the wrong side of WCAG's
   large-text threshold — 18.66px bold. English at 19px answers to a 3:1 contrast floor; 18px answers to 4.5, so
   the same seven colours failed in two languages and passed in the third, and a contrast fix aimed at the English
   figure would have left both others short. Measured before removing it: every day name in both languages fits at
   19px at all seven sizes in `public/sizes.html` — `scrollWidth` against `clientWidth`, which is the only question
   the shrink was ever answering. `tools/test-daytabs.mjs` holds both halves. */
/* The ink is CHOSEN BY MEASUREMENT, in `week.js syncTabInk`, because the colour behind the name is a per-theme
   palette and no single ink clears 4.5 across the three themes that ship. The class is the only thing CSS needs to
   know. **The default stays white and the measured class stays the thing that darkens it, although today's pale
   wash means dark always wins** - hard-coding the dark ink here would delete the choice, and the choice is what
   lets a theme set `--wk-tint: 70%` without anyone having to remember this line. */
.daytab.ink-dark{color:#111827}
/* Yesterday / Today / Tomorrow: a slim band of cards under the day names, about half an activity card high.
   Every column gets one (empty ones are invisible) so the activity cards below still line up across the week. */
.mkb{flex:none;height:var(--mkb-h);margin:6px 1px 0;padding:0;display:flex;align-items:stretch;gap:0;
     background:#fff;border:3px solid var(--cat-marker);border-radius:var(--radius-slot);overflow:hidden;
     box-shadow:var(--shadow-card);cursor:pointer;animation:mkbIn .35s var(--ease-fold);
     transition:transform .12s var(--ease-press),box-shadow .12s}
.mkb.empty{visibility:hidden;border-color:transparent;background:none;box-shadow:none;animation:none}
/* The whole picture shows (the box is the artwork's own 240x189 ratio): the arrow going back or forward is
   what teaches the idea, so it must not be cropped away. */
.mkb img{flex:none;width:var(--mkb-img);height:100%;object-fit:contain;background:#fff;border-right:2px solid var(--cat-marker)}
.mkb b{flex:1;min-width:0;display:flex;align-items:center;justify-content:center;padding:0 4px;
       font:800 16px/1.1 var(--font-head);color:var(--cat-marker);text-align:center;
       white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mkb.today{border-color:var(--star);box-shadow:0 0 0 3px rgba(255,185,59,.35),var(--shadow-card)}
.mkb.today img{border-right-color:var(--star)}
.mkb.today b{color:var(--ink)}
.mkb.yesterday{opacity:.72}
.mkb:active{transform:translateY(2px);box-shadow:none}
.mkb.sm{--mkb-h:var(--mkb-h-sm);--mkb-img:var(--mkb-img-sm);margin:4px 0 0;border-width:2px;border-radius:12px}
.mkb.sm b{font-size:12px;padding:0 2px}
.mkb.sm img{border-right-width:2px}
.fr .mkb b,.es .mkb b{font-size:14px}
.fr .mkb.sm b,.es .mkb.sm b{font-size:11px}
.noanim .mkb{animation:none}
@keyframes mkbIn{0%{transform:scale(.82) rotate(-3deg);opacity:0}70%{transform:scale(1.04)}100%{transform:none;opacity:1}}
/* `flex:1 1 auto`, and the `auto` basis is the load-bearing part. `flex:1` would mean `flex-basis:0`, which in a
   zone that is itself content-sized (see `.zone`) computes to a list of zero height with nothing to grow into;
   `flex:0 1 auto` was shrink-only, which lands the height on a fractional pixel and made a band cost 21px instead
   of 22. Grow AND shrink, from the content's own height, is the only combination that is right in both. */
.cards{flex:1 1 auto;min-height:0;overflow-y:auto;scrollbar-width:none;display:flex;flex-direction:column;gap:8px;padding:6px 4px 4px;overscroll-behavior:contain}
.cards::-webkit-scrollbar{display:none}
/* **`.slot-empty` IS GONE AND IS NOT COMING BACK.** A dashed box at the foot of every column read as "something is
   missing here"; nothing is missing, it is Saturday. It was also `flex:1 0 26px`, which is what stretched a
   one-card column to full height - so removing it is half of what makes the short wash possible. The thing it was
   sometimes mistaken for, a cue that the list runs past the bottom, is `.cards-more` below, and `week.js syncMore`
   explains why the dashed strip could never have been that cue (it is the LAST item, so it is below the fold
   exactly when it would be needed). The `empty` tap action and its "ask a grown-up" toast went with it. */
/* "there is more below" — shown only while the column can still be scrolled down (`week.js syncMore` owns that, and
   `test-cdmore` asserts the decision rather than the element). ABSOLUTE, so it costs no height: this is the same
   trick `.mk-more` has always used on the several-children board, and the reason it can exist at all after we spent
   a day arguing over 22px for the vacation band. `pointer-events:none` keeps it a pure hint — a child aiming at the
   bottom card must never hit the chevron instead. `bottom:6px` is `.col`'s own padding, so it sits on the cards'
   bottom edge rather than the column's. No number anywhere: band `y` is three years old and cannot read one. */
.cards-more{position:absolute;left:4px;right:4px;bottom:6px;height:34px;z-index:4;pointer-events:none;opacity:0;
  transition:opacity .15s ease-out;display:flex;align-items:flex-end;justify-content:center;
  border-radius:0 0 var(--radius-slot) var(--radius-slot);
  background:linear-gradient(to bottom,rgba(255,255,255,0),var(--more-fade))}
.cards-more.on{opacity:1}
/* A chevron drawn from two borders rather than a glyph: '⌄' is a different shape, weight and baseline in every
   font the three languages might fall back to, and this one is the same everywhere. */
.cards-more::after{content:'';width:13px;height:13px;margin-bottom:7px;border-right:4px solid var(--ink);
  border-bottom:4px solid var(--ink);border-radius:0 0 3px 0;transform:rotate(45deg)}
@media (prefers-reduced-motion:reduce){.cards-more{transition:none}}
.bcard{flex:none;width:100%;background:#fff;border:3px solid var(--c);border-radius:var(--radius-slot);overflow:hidden;box-shadow:var(--shadow-card);transition:transform .12s var(--ease-press),box-shadow .12s;cursor:pointer}
.bcard img{display:block;width:100%;height:104px;object-fit:cover}
/* **THE HEIGHT THE PILL GAVE BACK GOES HERE** - a bigger picture is the single change that most makes this a
   product for a child who cannot read. **It is 8px, and the first version of this comment claimed 46.** The pill
   was `min-height:46px` but carried a `margin-top:-14px` tuck under the date circle, so it only ever cost 32; the
   dashed slot cost the cards area nothing at all, because it was INSIDE it. `tokens.css --wk-card-h` has the
   measurement and the ceiling, and `tools/test-cdband.mjs` is what fails if the picture grows past it.
   **Scoped to My week's day columns on purpose.** `.bcard` is the shared card shape - My day, Countdowns, the
   voices list and the theme picker all draw it through `ui.js cardHTML` - and this pass measured one screen. */
.col .cards .bcard img{height:var(--wk-card-h)}
.bcard .lbl{background:var(--c);color:var(--ci);padding:5px 3px;font:700 14px/1.35 var(--font-ui);text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.fr .bcard .lbl{font-size:13px}
.bcard.lifted{transform:translateY(-4px);box-shadow:0 6px 0 rgba(16,49,147,.14)}
.bubble{position:absolute;z-index:40;background:var(--ink);color:#fff;border-radius:16px;padding:10px 18px;display:flex;flex-direction:column;align-items:center;font:800 22px/1.1 var(--font-head);animation:rise .18s ease-out;pointer-events:none}
.bubble span{font:700 16px var(--font-ui);opacity:.85}
/* 40px below, not 10: at 1024 the stage is drawn at 0.8, so 10 + the footer's own 6 was **15 REAL pixels** between
   Parent mode and the bottom of the screen — the other half of "nearly cut off". It costs the board 30 stage px of
   height; the 7-column board at 1280x752 still fits (test-game.mjs and test-kidscreens measure it). */
.week .bar{height:58px;flex:none;padding-bottom:6px;margin:0 0 var(--foot-gap)}

/* ---------- daily routine ---------- */
.routine{padding:14px 22px 0;display:flex;flex-direction:column}
.rt-head{display:flex;align-items:center;height:74px;flex:none;gap:14px}
.rt-head .banner{width:720px}
.rt-title{width:100%;justify-content:center;align-items:center;gap:14px;padding:0 30px}
/* My day's title is a real `h1` now (it had no heading element at all). `.banner-in` already sets the family,
   the weight and the line height, so the heading only has to stop being a block with UA margins. */
.rt-title b,.rt-title h1{font-size:36px}
.rt-title h1{margin:0;font:inherit;font-size:36px}
.rt-title em{font-size:22px}
.badge{border-radius:50%;object-fit:cover;flex:none}
.rt-tabs{display:flex;gap:10px;align-items:center;height:70px;flex:none;margin-top:6px}
.rtab{display:flex;align-items:center;gap:10px;background:rgba(255,255,255,.72);border-radius:20px;padding:10px 24px 10px 14px;border:4px solid transparent;transition:transform .12s var(--ease-press)}
.rtab span{display:flex;flex-direction:column;text-align:left;line-height:1.05}
.rtab b{font:800 22px var(--font-head)}
.rtab em{font:700 14px var(--font-ui);font-style:normal;color:var(--ink-blue)}
.rtab.on{background:#fff;border-color:var(--star);box-shadow:0 4px 0 rgba(16,49,147,.18)}
.progress{background:var(--surface-veil);border-radius:18px;padding:8px 18px;display:flex;flex-direction:column;gap:6px;height:62px;justify-content:center}
.ptxt{display:flex;gap:8px;align-items:baseline}
.ptxt b{font:800 18px var(--font-head)}.ptxt em{font:700 14px var(--font-ui);font-style:normal;color:var(--ink-blue)}
.pips{display:flex;gap:6px}
.pips i{flex:1;height:10px;border-radius:5px;background:rgba(16,49,147,.15);transition:background .2s ease-out}
.pips i.on{background:var(--done)}
/* The row scrolls inside itself. `safe center` centres while everything fits and falls back to the start when it does
   not, so the first card is never pushed out of reach (plain `center` clips it and scrollLeft cannot go negative). */
.rt-cards{flex:1;min-height:0;display:flex;gap:var(--rt-gap);align-items:center;justify-content:safe center;padding:14px var(--rt-pad);overflow-x:auto;overflow-y:hidden;scrollbar-width:none;scroll-snap-type:x proximity;scroll-padding-inline:var(--rt-pad);overscroll-behavior-x:contain}
.rt-cards.slideR{animation:slideR .4s ease-out}.rt-cards.slideL{animation:slideL .4s ease-out}
/* ---------------------------------------------------------------- ONE STEP AT A TIME (routine.js oneStepHTML)
   MEASURED, and the measurement chose the shape. The card area is 428-441 stage px tall at every size and the
   whole-period row already uses all of it (cards are 400-430 tall at 191/430). A big step keeping that portrait
   aspect, less the row underneath, would be 332x147 - SMALLER than the card it replaces. So the large card turns
   LANDSCAPE: picture left, name right, which is the same transformation `.sz-small` already applies to this exact
   markup. No second card, no second render path - `cardHTML` builds both of these.
   The next row is 96px: a 76px card, the gap, and its own padding. That leaves the large card ~332px tall and up
   to 860 wide, so its picture is about 300x300 against the old 179x280 - 1.8x the area, with the name at 44px
   instead of 19. */
.rt-one{flex:1;min-height:0;display:flex;flex-direction:column;gap:10px;padding:10px var(--rt-pad) 0}
.rt-one.slideR{animation:slideR .4s ease-out}.rt-one.slideL{animation:slideL .4s ease-out}
.rt-now{flex:1;min-height:0;display:flex;align-items:center;justify-content:center}
.rt-now .rc{height:100%;width:min(860px,100%);max-width:none;max-height:none;min-width:0;aspect-ratio:auto;flex:none}
.rt-now .rcard{flex-direction:row;align-items:center;gap:clamp(16px,3vw,34px);padding:14px 22px 14px 0;border-left-width:18px;border-radius:var(--radius-card)}
.rt-now .rcard img{width:auto;height:100%;aspect-ratio:1;flex:none;object-fit:cover;object-position:50% 35%;border-radius:20px;margin-left:16px}
.rt-now .rcard .bar{flex:1;min-width:0;background:none!important;color:var(--ink);padding:0;text-align:left;justify-content:flex-start;
  font:800 clamp(28px,4vw,44px)/1.15 var(--font-ui)!important;min-height:0;white-space:normal;overflow-wrap:anywhere}
.rt-now .rc.done:not(.just-done) .rc-check{width:54px;height:54px;font-size:32px;top:50%;transform:translateY(-50%);right:18px}
/* The timer's placement on a large step, which is B's rule applied rather than re-decided: absolutely positioned,
   so it costs the card no height here either, and centred on the right where the check sits for a done card. */
.rt-now .rt-timer{top:50%;right:84px;transform:translateY(-50%)}
.rt-now .rt-timer.run{width:96px;height:96px}
.rt-now .rt-timer.run b{font-size:24px}
/* The rest of the steps. It SCROLLS sideways when there are more than fit - a finished step a child wants to go
   back to must be reachable, which is the whole of item 4, and `.cards-more`'s lesson applies: a named element
   below the fold is not a reachable one. */
.rt-next{flex:none;height:86px;display:flex;align-items:center;gap:10px;overflow-x:auto;overflow-y:hidden;
  scrollbar-width:none;scroll-snap-type:x proximity;padding:2px 0 8px}
.rt-next::-webkit-scrollbar{display:none}
/* **AN EXPLICIT WIDTH, because `.rc` has no in-flow content to take one from**: `.flap` and `.reward` are both
   `position:absolute; inset:0` for the fold animation, so the card's size comes from `height` plus `aspect-ratio`
   and nothing else. `width:auto` measured at exactly 0 — a row of invisible cards. The whole-period row solves
   this with the portrait ratio and `.sz-small` with a grid column; here it is a fixed chip.
   220px, and the name WRAPS inside it rather than being cut: two lines of 15px over ~150px of text column is
   about 26 characters, which covers the longest card label in all three languages. A row too long to fit scrolls,
   which is the other half of being able to go back to a step. */
.rt-next .rc{flex:none;width:220px;height:76px;max-height:none;min-width:0;aspect-ratio:auto;scroll-snap-align:center}
.rt-next .rcard{flex-direction:row;align-items:center;gap:10px;padding:6px 12px 6px 0;border-left-width:10px;border-radius:14px;
  background:color-mix(in srgb,var(--c) 9%,#fff)}
.rt-next .rcard img{width:50px;height:50px;flex:none;border-radius:11px;object-fit:cover;object-position:50% 35%;margin-left:8px}
.rt-next .rcard .bar{flex:1;min-width:0;background:none!important;color:var(--ink);padding:0;text-align:left;justify-content:flex-start;
  font:800 15px/1.1 var(--font-ui)!important;min-height:0;white-space:normal;overflow-wrap:anywhere}
.rt-next .rt-timer{display:none}   /* a step that is not the one you are on is not a step to start timing */
.rt-next .rc.done:not(.just-done) .rc-check{width:26px;height:26px;font-size:16px;top:50%;transform:translateY(-50%);right:8px}
@keyframes slideR{from{transform:translateX(24px);opacity:.3}to{transform:none;opacity:1}}
@keyframes slideL{from{transform:translateX(-24px);opacity:.3}to{transform:none;opacity:1}}
.rt-empty{align-self:center;background:var(--surface-veil);border-radius:22px;padding:30px 40px;text-align:center;font:800 30px var(--font-head);display:flex;flex-direction:column;gap:6px}
.rt-empty span{font:700 17px var(--font-ui);color:var(--ink-blue);max-width:34ch}
/* The second line is for the parent over the child's shoulder: it names the route, so it is quieter than the
   line the child reads and is allowed to wrap. */
.rt-empty .rt-empty-how{font-weight:600;color:var(--ink-muted)}
/* Scroll affordances (ui.js hscroll): an arrow and a soft edge fade on whichever side still has cards.
   Nothing shows while the whole row fits, so the usual case stays clean. */
.hsc{position:relative;flex:1;min-height:0;display:flex}
.hsc>.rt-cards{flex:1}
.hsc::before,.hsc::after{content:'';position:absolute;top:0;bottom:0;width:60px;pointer-events:none;opacity:0;transition:opacity .18s;z-index:2}
.hsc::before{left:0;background:linear-gradient(90deg,rgba(16,49,147,.20),rgba(16,49,147,0))}
.hsc::after{right:0;background:linear-gradient(270deg,rgba(16,49,147,.20),rgba(16,49,147,0))}
.hsc[data-at=mid]::before,.hsc[data-at=end]::before{opacity:1}
.hsc[data-at=mid]::after,.hsc[data-at=start]::after{opacity:1}
.hsc-arrow{position:absolute;top:50%;transform:translateY(-50%);width:56px;height:56px;padding:0;border:none;border-radius:50%;background:var(--surface);color:var(--ink);font:800 36px/1 var(--font-head);box-shadow:var(--shadow-button);cursor:pointer;z-index:3;opacity:0;pointer-events:none;transition:opacity .18s}
.hsc-arrow.l{left:calc(6px + var(--safe-l))}
.hsc-arrow.r{right:calc(6px + var(--safe-r))}
.hsc[data-at=mid] .hsc-arrow,.hsc[data-at=end] .hsc-arrow.l,.hsc[data-at=start] .hsc-arrow.r{opacity:1;pointer-events:auto}
.hsc-arrow:active{transform:translateY(-50%) scale(.92)}
/* The card keeps the printed proportions (191x430) and takes the height the row actually has, so it shrinks instead of
   being clipped on a short screen and grows on a tall one. Width follows from the ratio - never a fixed pixel width. */
.rc{position:relative;flex:none;height:100%;max-height:var(--rc-max);aspect-ratio:191/430;width:auto;min-width:var(--rc-min);perspective:1100px;cursor:pointer;scroll-snap-align:center}
.flap{position:absolute;inset:0;transform-origin:top center;transition:transform .52s var(--ease-fold);backface-visibility:hidden}
.rcard{width:100%;height:100%;background:#fff;border:4px solid var(--c);border-radius:var(--radius-card);overflow:hidden;box-shadow:var(--shadow-routine);display:flex;flex-direction:column}
.rc:not(.done):active .flap{transform:rotateX(14deg)}
.rcard img{display:block;width:100%;height:69.8%;object-fit:cover;flex:none}
.rcard .bar{background:var(--c);color:var(--ci);padding:8px 4px;font:700 19px/1.2 var(--font-ui);text-align:center;min-height:40px;display:flex;align-items:center;justify-content:center}
.rcard .fr{flex:1;display:flex;align-items:center;justify-content:center;text-align:center;font:700 15px var(--font-ui);color:var(--ink-muted);padding:0 6px}
/* ---- timer on a routine card (timers.js) ----
   Idle: a start button with the length on it. Running: the same button with a coloured disk that empties as the
   time goes, in the card's own colour, so it looks like the rest of the theme. */
.rcard{position:relative}
.rt-timer{position:absolute;top:6px;right:6px;z-index:3;min-width:64px;height:38px;padding:0 10px;border:3px solid #fff;border-radius:19px;background:var(--c);color:var(--ci);font:800 14px/1 var(--font-ui);display:flex;align-items:center;justify-content:center;gap:4px;box-shadow:var(--shadow-card);cursor:pointer;overflow:hidden}
.rt-timer b{position:relative;z-index:2;font:inherit;white-space:nowrap}
.rt-timer .disk{display:none}
.rt-timer:active{transform:scale(.94)}
/* Band y: no digits, so the idle button is a round play button rather than a pill with nothing written in it.
   WIDTH ONLY — `.rt-timer` is absolutely positioned, so no state of it can change the card's height, which
   `test-timers-alarms` measures against an untimed card rather than taking on trust. */
.rt-timer.nonum:not(.run){min-width:0;width:38px;padding:0;border-radius:50%}
.rt-cards.m .rt-timer.nonum:not(.run){width:26px}
.rt-timer.run{width:76px;height:76px;border-radius:50%;min-width:0;padding:0;background:#fff;color:var(--ink);border-color:var(--c)}
.rt-timer.run .disk{display:block;position:absolute;inset:3px;border-radius:50%;
  background:conic-gradient(var(--c) calc(var(--f, 0) * 360deg), rgba(16,49,147,.10) 0)}
.rt-timer.run b{font-size:19px;color:var(--ink);text-shadow:0 0 6px #fff,0 0 6px #fff}
.rt-cards.m .rt-timer{top:3px;right:3px;min-width:44px;height:26px;font-size:11px;border-width:2px;padding:0 6px}
.rt-cards.m .rt-timer.run{width:48px;height:48px}
.rt-cards.m .rt-timer.run b{font-size:13px}
/* ---- an alarm going off (alarmui.js): one tap anywhere on the banner puts it away ---- */
/* ---------- branding and the About screen (about.js) ---------- */
.brand-logo,.ab-logo,.pm-brand{display:block;object-fit:contain}
.pm-brand{height:40px;width:auto;max-width:130px;flex:none;margin-right:2px}
.su-logo{height:76px;width:auto;max-width:320px;margin:0 auto -6px;display:block;object-fit:contain}
.screen.about{background:var(--parent-bg);display:flex;align-items:center;justify-content:center;padding:24px}
.ab-card{width:min(680px,100%);max-height:100%;overflow-y:auto;background:#fff;border-radius:var(--radius-panel);padding:28px 32px;box-shadow:var(--shadow-lift);text-align:center;display:flex;flex-direction:column;gap:10px;align-items:center}
.ab-logo{height:92px;width:auto;max-width:340px;margin-bottom:2px}
.ab-v{margin:0;font:700 15px var(--font-ui);color:var(--ink-muted)}
/* (`.ab-by` and the About screen's `<h1>` are gone: the logo already said the name, and the maker was named twice in a
   row — "Made by X" directly above "© 2026 X. All rights reserved.") */
.ab-rights{margin:0;font:600 13px var(--font-ui);color:var(--ink-muted)}
.ab-links{display:flex;gap:18px;flex-wrap:wrap;justify-content:center;margin:4px 0}
.ab-links a{font:800 15px var(--font-ui);color:var(--ink-blue)}
.ab-help{width:100%;background:var(--pm-fill);border:2px solid var(--pm-line);border-radius:16px;padding:12px 16px}
.ab-help b{display:block;font:800 17px var(--font-head);color:var(--ink);margin-bottom:2px}
.ab-help p{margin:0;font:700 14px var(--font-ui);color:var(--ink-muted)}
.ab-help a{color:var(--ink-blue)}
.ab-store{margin:2px 0 0;display:flex;align-items:center;gap:10px;justify-content:center;flex-wrap:wrap;font:600 13px var(--font-ui);color:var(--ink-muted)}
.ab-btns{display:flex;gap:12px;margin-top:6px}
.ab-new{text-align:left;margin:0;padding-left:22px;display:flex;flex-direction:column;gap:8px;font:700 16px/1.4 var(--font-ui);color:var(--ink)}
/* offline / online */
.net-chip{display:inline-flex;align-items:center;gap:6px;padding:3px 12px;border-radius:999px;background:var(--pm-tint);font:800 12px var(--font-ui);color:var(--ink)}
.net-chip i{width:9px;height:9px;border-radius:50%;background:var(--done)}
.net-chip.off{background:rgba(255,166,46,.22)}
.net-chip.off i{background:var(--star)}
/* in the parent top bar it only appears when the network has gone */
.pm-bar .net-chip{display:none;background:rgba(255,255,255,.18);color:#fff}
body.is-offline .pm-bar .net-chip{display:inline-flex}

/* ---- Parent settings 4: the alarm list ---- */
.fld.alarms{display:flex;flex-direction:column;gap:8px}
.al-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap;background:var(--pm-fill);border:2px solid var(--pm-line);border-radius:14px;padding:8px 10px}
.al-row.off{opacity:.55}
.al-row select{min-height:44px;flex:none}
.al-days{display:flex;gap:3px;flex:1;min-width:0}
.al-day{width:32px;height:36px;padding:0;border:2px solid var(--pm-line);border-radius:9px;background:#fff;color:var(--ink-muted);font:800 13px var(--font-ui);cursor:pointer}
.al-day.on{background:var(--ink);border-color:var(--ink);color:#fff}
.al-rm{width:36px;height:36px;padding:0;border:none;border-radius:50%;background:none;color:var(--pm-warn);font:800 16px var(--font-ui);cursor:pointer}
.al-rm:hover{background:rgba(216,27,48,.12)}
/* The sound and its "Hear it" take a line of their own inside the row. `.al-row` already wraps, so this is one
   flex-basis rather than a second layout: squeezing a select plus a button in beside the day letters is how the
   narrow drawer (3122 below) ends up with controls under 44px. */
.al-snd{flex:1 0 100%;display:flex;align-items:center;gap:8px}
.al-snd select{flex:1;min-width:0}
.al-test{flex:none;min-height:44px;white-space:nowrap}
/* `.row` already lays the label out against its control, as every other setting in this panel does; this only
   keeps the select from collapsing and the Test from wrapping. */
.al-tmsnd select{min-width:0;min-height:44px}
.alarm-banner{position:absolute;left:50%;top:18px;transform:translateX(-50%);z-index:60;display:flex;align-items:center;gap:16px;max-width:86%;
  padding:14px 22px;border-radius:26px;background:#fff;border:4px solid var(--star);box-shadow:var(--shadow-fold);cursor:pointer;
  animation:alarmIn .4s var(--ease-fold) both}
.alarm-banner b{font:800 26px var(--font-head);color:var(--ink)}
.alarm-banner small{font:700 14px var(--font-ui);color:var(--ink-muted)}
.alarm-banner .save-btn{min-height:48px;padding:6px 24px;font-size:18px;pointer-events:none}
.noanim .alarm-banner{animation:none}
@keyframes alarmIn{0%{transform:translate(-50%,-24px) scale(.9);opacity:0}100%{transform:translateX(-50%);opacity:1}}
.reward{position:absolute;inset:0;background:#fff;border:4px solid var(--done);border-radius:var(--radius-card);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;text-align:center;opacity:0;transition:opacity .38s ease-in-out;pointer-events:none;padding:0 8px}
.reward h3{font:800 34px/1 var(--font-head);color:var(--done)}
.reward p{font:700 19px var(--font-ui);color:var(--ink-blue)}
.reward .coco{width:136px;height:136px;object-fit:contain}
.reward .mine{font:700 15px var(--font-ui);color:var(--ink-muted)}
.rc.done.just-done .flap{transform:rotateX(90deg)}
.rc.done.just-done .reward{opacity:1;pointer-events:auto;transition:opacity .22s ease-out .3s}
.rc.done.just-done .star.pop{animation:pop .3s cubic-bezier(.2,1.4,.4,1) both;animation-delay:calc(.35s + var(--i)*.09s)}
/* **My day's footer is allowed to WRAP**, and that is the same fix (and the same reasoning) as `.wkb-head` and `.wk-head`.
   Measured after ↺ Reset and 📖 Guide came off the kid screens (1.10.1): the busiest case is My day with four children and
   one of them picked — ⤢ 48 + four tabs 567 + "‹ Tous les enfants" 167 + "↺ Réinitialiser" 226 + "Mode parent" 209, and
   five 22px gaps — which is 1327 stage px in a footer that has 1236. English lands at 1197 and Spanish at 1204, so French
   was the one over, by 92px. **And the stage is 1280 CSS px wide at EVERY size in sizes.html, so that is not a small-screen
   case: it overflowed everywhere.** A squeezed label is unreadable (which is why nothing here shrinks), so what does not
   fit moves down instead of eating its neighbour. `min-height`, so the one-row case is pixel-for-pixel what it was, and the
   cards row above is `flex:1`, so the wrapped case costs it one row. */
/* **My day's footer gets the bottom gap and NOT the 36px right padding the `.bar` footers get**, for two measured
   reasons. Its flex spacer is ZERO stage px wide at 1280x800 — it has nothing to give, and already wraps in French.
   And padding would not help anyway: Parent mode sits 42.6 real px from the right edge at 1024 with School on (five
   tabs, the widest that row ever gets) and stayed at 42.6 with 4px of padding and again with 8px, so something other
   than the footer's own box is deciding that pill's position. 1.4 px short of a finger's width, on the one screen
   whose footer has no room; the `.bar` footers clear 44.8–46.4. Left as it is rather than chased. */
/* **ONE ROW, ALWAYS.** It used to wrap, and the moment it chose to was the worst one available: finishing a
   routine adds "Reward ready!" and the trophy, which pushed "Parent mode" onto a second line and ate 21px of the
   board at the exact instant the child had just succeeded. Measured over by up to 522 stage px in French.
   `nowrap` makes two rows impossible by construction; `ui.js fitBar()` then shrinks the whole bar until it fits,
   and the gap halves so there is less to shrink away. */
.rt-foot{min-height:96px;flex:none;display:flex;flex-wrap:nowrap;align-items:center;gap:10px;position:relative;margin-bottom:var(--foot-gap);zoom:var(--foot-k,1)}
.rt-foot>.pill,.rt-foot>.ntabs{max-width:100%}
/* What gives way first, if anything has to: a parent control on a CHILD's screen. The tabs, the reward chip and
   the trophy are the child's own and never shrink. */
.rt-foot>*{flex:0 0 auto}
/* THE LAST RESORT, and only below `fitBar`'s floor: the two LOCKED parent controls and "All children" give up
   their ends. Nothing else ever does. Left to flex on its own this happened FIRST and silently — the bar
   reported that it fitted while "Parent mode" read "Parent mod…", which is why the pills do not shrink by
   default and `.tight` has to be put on deliberately. */
.rt-foot.tight>.pill{flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis}
.hint{background:var(--surface-veil);border-radius:18px;padding:10px 24px;display:flex;flex-direction:column;line-height:1.2}
.hint b{font:700 20px var(--font-ui)}.hint em{font:700 15px var(--font-ui);font-style:normal;color:var(--ink-blue)}
.coco-guide{position:absolute;right:0;bottom:0;height:150px;animation:float 4s ease-in-out infinite}
@keyframes float{50%{transform:translateY(-8px)}}
.p-evening .rt-title b,.p-night .rt-title b,.p-evening .rt-title h1,.p-night .rt-title h1{font-size:36px}
.p-evening .hint,.p-night .hint,.p-evening .progress,.p-night .progress{background:rgba(255,255,255,.85)}

/* ---------- celebration ---------- */
.celebrate{padding:30px 40px 0}
.banner.big{height:110px;width:940px;margin:0 auto;animation:drop .5s cubic-bezier(.34,1.3,.64,1) both}
@keyframes drop{from{transform:translateY(-24px);opacity:0}to{transform:none;opacity:1}}
.cel-title{width:100%;justify-content:center;gap:14px;padding:0 60px}
.cel-title b{font-size:46px}.cel-title em{font-size:24px}
.cel-body{display:flex;align-items:center;justify-content:space-between;height:480px;margin-top:6px}
.cel-left{width:250px}
.cel-done{display:flex;flex-direction:column;background:var(--surface-veil);border-radius:16px;padding:8px 14px;margin-bottom:12px;line-height:1.15}
.cel-done b{font:800 20px var(--font-head)}.cel-done em{font:700 13px var(--font-ui);font-style:normal;color:var(--ink-blue)}
.thumbs{display:grid;grid-template-columns:repeat(2,1fr);gap:8px}
.thumb{background:#fff;border:2px solid var(--done);border-radius:10px;overflow:hidden}
.thumb img{display:block;width:100%;height:58px;object-fit:cover}
.thumb span{display:block;font:700 11px var(--font-ui);text-align:center;padding:2px 2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cel-coco{width:420px;animation:float 4s ease-in-out infinite}
.cel-right{width:250px;display:flex;flex-direction:column;align-items:center;gap:22px}
.next-panel{background:#fff;border-radius:24px;padding:16px 22px;display:flex;flex-direction:column;text-align:center;gap:2px;box-shadow:var(--shadow-chip);width:100%}
.next-panel small{font:800 13px var(--font-ui);letter-spacing:.05em;color:var(--ink-muted)}
.next-panel b{font:800 26px/1.1 var(--font-head)}.next-panel em{font:700 16px var(--font-ui);font-style:normal;color:var(--ink-blue)}
.cel-btns{display:flex;gap:26px;justify-content:center;margin-top:10px}
.big-btn{background:#fff;border-radius:22px;box-shadow:var(--shadow-button);padding:12px 40px;display:flex;flex-direction:column;min-width:290px;line-height:1.1}
.big-btn b{font:800 30px var(--font-head)}.big-btn em{font:700 16px var(--font-ui);font-style:normal;color:var(--ink-blue)}
.big-btn.primary{background:var(--star);color:#fff}.big-btn.primary em{color:#fff}
.big-btn:active{transform:translateY(3px);box-shadow:0 2px 0 rgba(16,49,147,.22)}
.confetti{position:absolute;border-radius:3px;z-index:0}
.celebrate>*:not(.confetti){position:relative;z-index:1}

/* ---------- PIN ---------- */
.pin-veil{position:absolute;inset:0;background:rgba(255,255,255,.5)}
.pin-panel{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);background:#fff;border-radius:24px;padding:26px 36px 20px;display:flex;flex-direction:column;align-items:center;box-shadow:var(--shadow-button)}
.pin-panel h2{font:800 34px var(--font-head)}
.pin-sub{font:700 16px var(--font-ui);color:var(--ink-blue);margin-bottom:12px}
.pin-boxes{display:flex;gap:12px}
.pin-boxes i{width:56px;height:56px;border-radius:10px;border:2px solid rgba(16,49,147,.15);display:flex;align-items:center;justify-content:center;font:800 28px var(--font-ui);font-style:normal}
.pin-boxes i.a{border-color:var(--ink-blue)}
.pin-boxes.ok i{background:var(--done);border-color:var(--done);color:#fff;transition:background .25s}
.pin-panel.err .pin-boxes{animation:shake .4s ease-in-out}
.pin-panel.err .pin-boxes i{border-color:var(--danger)}
@keyframes shake{20%,60%{transform:translateX(-8px)}40%,80%{transform:translateX(8px)}}
.pin-err{height:26px;margin:6px 0;font:800 17px var(--font-ui);color:var(--danger)}
.keypad{display:grid;grid-template-columns:repeat(3,96px);gap:10px}
.keypad button{height:82px;border-radius:16px;background:#fff;border:2px solid rgba(16,49,147,.1);box-shadow:var(--shadow-chip);font:800 32px var(--font-head)}
.keypad button.alt{color:var(--ink-muted)}
.keypad button:active{transform:translateY(2px);box-shadow:none}
/* Throttled: the keys go quiet and the message counts the wait down. It is never a lockout - see pinlock.js. */
.pin-err{white-space:normal;height:auto;min-height:26px;max-width:320px;text-align:center}
.pin-panel.waiting .keypad button[disabled]{opacity:.35}
/* "Forgot your code?" — quiet, but never disabled: the moment it is most needed is while the pad is counting down. */
.pin-forgot{margin-top:14px;background:none;font:700 16px var(--font-ui);color:var(--ink-blue);text-decoration:underline;padding:8px 12px;min-height:44px}
.pin-forgot:active{opacity:.6}
/* the 6-digit reset code: wide, spaced and monospaced, because it is being copied off a phone one digit at a time */
.pr-code{display:block;margin:10px 0 4px}
.pr-code input{width:100%;text-align:center;font:800 30px/1.2 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;letter-spacing:.22em}
.pr-codeerr{margin:2px 0 0}

/* ---------- parent mode ---------- */
.parent{background:var(--parent-bg);display:flex;flex-direction:column;font-size:14px}
.p-bar{height:70px;flex:none;background:var(--lock);color:#fff;display:flex;align-items:center;gap:16px;padding:0 20px}
.p-bar h1{font:800 28px var(--font-head)}
.p-child{background:rgba(255,255,255,.14);border-radius:12px;padding:6px 16px;font:800 18px var(--font-head)}
.seg{display:flex;background:rgba(16,49,147,.08);border-radius:14px;padding:4px}
.seg button{padding:8px 20px;border-radius:11px;font:800 16px var(--font-ui);color:var(--ink-muted);min-height:44px}
.seg button.on{background:#fff;color:var(--ink);box-shadow:var(--shadow-chip)}
.p-bar .seg{background:rgba(255,255,255,.14)}.p-bar .seg button{color:rgba(255,255,255,.8)}.p-bar .seg button.on{color:var(--ink)}
.save-btn{background:var(--save);color:#fff;border-radius:14px;padding:10px 24px;font:800 20px var(--font-head);min-height:50px;box-shadow:var(--shadow-chip)}
.p-body{flex:1;min-height:0;display:grid;grid-template-columns:230px 1fr 330px;gap:0}
.p-body aside{padding:14px;overflow-y:auto;display:flex;flex-direction:column;gap:8px}
#left h4{font:800 12px var(--font-ui);letter-spacing:.07em;color:var(--ink-muted);margin:2px 4px}
.cat-row{display:flex;align-items:center;gap:10px;text-align:left;background:var(--parent-row);border-radius:var(--radius-row);padding:10px 12px;min-height:50px;font:700 14px/1.15 var(--font-ui);border:2px solid transparent}
.cat-row i{width:14px;height:14px;border-radius:50%;background:var(--c);flex:none}
.cat-row.on{background:color-mix(in srgb,var(--c) 14%,#fff);border-color:var(--c)}
.new-card{margin-top:auto;background:var(--ink);color:#fff;border-radius:var(--radius-row);padding:12px;display:flex;flex-direction:column;align-items:center;min-height:64px}
.new-card b{font:800 18px var(--font-head)}.new-card small{font:600 12px var(--font-ui);opacity:.8}
.p-body main{padding:14px 8px;display:flex;flex-direction:column;gap:10px;min-height:0}
.p-search{display:flex;gap:10px}
.p-search input{flex:1;border:2px solid rgba(16,49,147,.15);border-radius:var(--radius-chip);padding:12px 16px;font:700 16px var(--font-ui);color:var(--ink);background:#fff;min-height:50px}
.az{background:#fff;border-radius:var(--radius-chip);padding:0 18px;font:800 16px var(--font-ui);border:2px solid rgba(16,49,147,.15)}
.az.on{background:var(--ink);color:#fff}
.lib{flex:1;min-height:0;overflow-y:auto;display:grid;grid-template-columns:repeat(auto-fill,minmax(104px,1fr));grid-auto-rows:105px;gap:12px;align-content:start;padding:4px}
.lib-card{position:relative;background:#fff;border:2px solid var(--c);border-radius:13px;overflow:hidden;display:flex;flex-direction:column;touch-action:pan-y;transition:transform .12s;cursor:grab}
.lib-card img{display:block;width:100%;height:84px;object-fit:cover;flex:none;pointer-events:none}
.lib-card .lbl{background:var(--c);color:var(--ci);font:700 12px/21px var(--font-ui);text-align:center;height:21px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:0 2px;pointer-events:none}
.lib-card:active{transform:translateY(-2px)}
.lib-card.on-day{opacity:.55}
/* (A ".lib-card.on-day::after" tick used to be declared here. Nothing has rendered a `.lib-card` for a long time —
   the parent library draws `.pm-card` — so it was dead, and a dead rule that looks like a feature is worse than no
   rule. Removed 2026-09-24 while looking for a check mark that turned out not to be this one.) */
.ghost{position:absolute;z-index:100;width:104px;height:105px;pointer-events:none;transform:translate(-50%,-50%) scale(1.06) rotate(-5deg);box-shadow:var(--shadow-lift);opacity:1}
.hint2,.p-body main .hint{background:none;padding:0;font:600 13px var(--font-ui);color:var(--ink-muted)}
.none{padding:20px;color:var(--ink-muted)}
#right{background:#fff;border-left:2px solid rgba(16,49,147,.08)}
.wk-seg{align-self:stretch}.wk-seg button{flex:1}
.dstrip{display:flex;gap:5px}
.dstrip .dt{flex:1;min-height:46px;border-radius:12px;background:var(--parent-row);font:800 13px var(--font-ui);border:3px solid transparent;padding:0}
.dstrip.m-week .dt.on{background:var(--c);color:#fff}
.dstrip.m-routines{flex-wrap:wrap}.dstrip.m-routines .dt{flex:1 1 45%;font-size:14px}
.dstrip.m-routines .dt.on{background:var(--ink);color:#fff}
.dstrip .dt.drop-over{border:3px dashed var(--drop-active);background:var(--drop-active-fill);color:var(--ink)}
.drop-title{font:800 13px var(--font-ui);color:var(--ink-blue);margin-top:4px}
.plist{border:3px dashed var(--ink-faint);border-radius:14px;padding:8px;display:flex;flex-direction:column;gap:6px;min-height:120px;max-height:330px;overflow-y:auto;transition:background .12s linear}
.plist.drop-over{border-color:var(--drop-active);background:var(--drop-active-fill)}
.plist.ins-end{box-shadow:inset 0 -4px 0 var(--drop-active)}
.prow{display:flex;align-items:center;gap:8px;background:var(--parent-row);border-radius:var(--radius-row);padding:4px 6px 4px 2px;min-height:52px;transition:transform .2s ease-out}
.prow.ins-before{box-shadow:0 -4px 0 var(--drop-active)}
.prow.lifted{opacity:.35}
.prow img{width:44px;height:35px;object-fit:cover;border-radius:7px}
.prow b{flex:1;font:700 14px var(--font-ui);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.handle{width:34px;height:48px;display:flex;align-items:center;justify-content:center;color:var(--ink-muted);font:800 20px var(--font-ui);touch-action:none;cursor:grab;letter-spacing:-3px}
.rm{width:44px;height:44px;border-radius:10px;color:var(--danger);font:800 18px var(--font-ui)}
.pempty{margin:auto;color:var(--ink-muted);font:700 14px var(--font-ui);text-align:center;padding:20px 0}
.settings{margin-top:auto;display:flex;flex-direction:column;gap:10px;border-top:2px solid rgba(16,49,147,.08);padding-top:12px}
.settings label{display:flex;flex-direction:column;gap:4px;font:700 13px var(--font-ui);color:var(--ink-blue)}
.settings label.row{flex-direction:row;justify-content:space-between;align-items:center}
.settings input{border:2px solid rgba(16,49,147,.15);border-radius:10px;padding:8px 12px;font:700 16px var(--font-ui);color:var(--ink);min-height:44px;width:100%}
.pinrow{display:flex;gap:8px}
.sm{background:var(--parent-row);border:2px solid rgba(16,49,147,.15);border-radius:12px;padding:8px 14px;font:800 14px var(--font-ui);min-height:44px}
.sm.wide{width:100%}
.switch{width:64px;height:36px;border-radius:18px;background:rgba(16,49,147,.2);position:relative;transition:background .2s}
/* A switch whose feature cannot act yet (kidsui.js `sw(..., off)`): visible and plainly not settable, with the
   note beside it saying why. Shown rather than hidden so a parent is not left hunting for a control that moved. */
.switch.inert{opacity:.4;cursor:not-allowed}
/* ---------------------------------------------------------------- ready-made routines (startersui.js)
   The button is drawn only for a child with no routine cards, so it is a prompt on an empty board rather than a
   control competing with one that has content. The chooser shows the actual CARDS a set will place: a parent is
   choosing between three routines, and three lists of words would not tell them which is theirs. */
.st-open{margin:0 0 10px;background:var(--parent-row);border:2px dashed var(--ink-faint);font-weight:800}
.st-modal .dialog{max-width:860px}
.st-list{display:flex;flex-direction:column;gap:14px;max-height:62vh;overflow-y:auto;padding:2px}
.st-set{border:2px solid var(--ink-faint);border-radius:14px;padding:12px 14px;background:#fff}
.st-set.is-suggested{border-color:var(--ink-blue);box-shadow:0 0 0 3px rgba(24,120,178,.14)}
.st-head{display:flex;align-items:center;gap:10px;font:800 18px var(--font-ui)}
.st-tag{background:var(--ink-blue);color:#fff;border-radius:999px;padding:2px 10px;font:800 12px var(--font-ui)}
.st-periods{display:flex;flex-direction:column;gap:8px;margin:8px 0 12px}
.st-period>small{color:var(--ink-muted);font-weight:800}
.st-cards{display:flex;flex-wrap:wrap;gap:6px;margin-top:4px}
.st-card{display:flex;align-items:center;gap:6px;background:var(--parent-row);border-radius:10px;padding:4px 10px 4px 4px;font:700 13px var(--font-ui)}
.st-card img{width:30px;height:30px;border-radius:7px;object-fit:cover;object-position:50% 35%}
/* ---------------------------------------------------------------- the three week questions (weekasksui.js)
   Same shape as the routine starter above and for the same reason: drawn only on an empty week, so it is a prompt
   where there is nothing rather than a control competing with a board that has content. */
.wa-open{margin:0 0 10px;background:var(--parent-row);border:2px dashed var(--ink-faint);font-weight:800}
.wa-modal .dialog{max-width:760px}
.wa-q{border-top:2px solid var(--ink-faint);padding:12px 0 4px}
.wa-q>b{display:block;font:800 17px var(--font-ui);margin-bottom:8px}
.wa-opts{display:flex;flex-wrap:wrap;gap:8px}
.wa-opt{display:flex;align-items:center;gap:8px;background:var(--parent-row);border:2px solid transparent;border-radius:12px;padding:6px 12px 6px 6px;font:800 14px var(--font-ui)}
.wa-opt img{width:34px;height:34px;border-radius:8px;object-fit:cover;object-position:50% 35%}
.wa-opt.on{border-color:var(--ink-blue);background:color-mix(in srgb,var(--ink-blue) 10%,#fff)}
/* `picking` is the one waiting for a day — it is a question in progress, not an answer, so it reads differently. */
.wa-opt.picking{border-color:var(--star);border-style:dashed}
.wa-opt em{font-style:normal;color:var(--ink-blue);font-weight:800}
.wa-days{display:flex;flex-wrap:wrap;gap:6px;margin-top:6px}
.wa-day{background:var(--parent-row);border:2px solid transparent;border-radius:10px;padding:6px 12px;font:800 14px var(--font-ui);min-width:56px}
.wa-day.on{border-color:var(--ink-blue);background:color-mix(in srgb,var(--ink-blue) 12%,#fff)}
.wa-pick{margin-top:10px;padding:8px 10px;background:color-mix(in srgb,var(--star) 12%,#fff);border-radius:12px}
.wa-btns{display:flex;flex-direction:column;gap:8px;margin-top:14px}
/* ---------------------------------------------------------------- "anything else?" (weekaddui.js)
   The list is the part that can grow, so IT scrolls and the dialog does not: max-height keeps the field, the
   results and Done all reachable at 1024x768 however many a parent adds. Measured rather than guessed. */
.wx-modal .dialog{max-width:620px}
.wx-input{width:100%;font:700 17px var(--font-ui);padding:10px 14px;border:2px solid var(--ink-faint);border-radius:12px;margin:8px 0}
.wx-list{display:flex;flex-direction:column;gap:6px;max-height:46vh;overflow-y:auto;margin-bottom:12px}
.wx-row{border-radius:12px;background:var(--parent-row)}
.wx-row.open{background:color-mix(in srgb,var(--ink-blue) 10%,#fff)}
.wx-card{display:flex;align-items:center;gap:10px;width:100%;padding:6px 12px 6px 6px;font:800 15px var(--font-ui);text-align:left}
.wx-card img{width:38px;height:38px;border-radius:9px;object-fit:cover;object-position:50% 35%;flex:none}
.wx-card b{flex:1;min-width:0}
.wx-card em{font-style:normal;font-weight:800;font-size:13px;color:var(--ink-muted);text-align:right}
.wx-card em.wx-just{color:var(--done,#1B7A3D)}
.wx-days{display:flex;flex-wrap:wrap;gap:6px;padding:0 10px 10px}
.wx-day{background:#fff;border:2px solid var(--ink-faint);border-radius:10px;padding:5px 11px;font:800 13px var(--font-ui)}
.wx-day.on{border-color:var(--done,#1B7A3D);color:var(--done,#1B7A3D)}
.wx-empty{padding:10px;text-align:center;display:flex;flex-direction:column;gap:8px}

/* The sentence that explains it. Not red: this is not an error a parent made, it is the app being honest. */
.dq2.warn{color:var(--ink-blue);font-weight:800}
.switch i{position:absolute;top:4px;left:4px;width:28px;height:28px;border-radius:50%;background:#fff;transition:transform .2s;box-shadow:var(--shadow-card)}
.switch.on{background:var(--done)}.switch.on i{transform:translateX(28px)}
.pinstat{font:600 12px/1.3 var(--font-ui);color:var(--ink-muted)}
/* ================================================================ A DIALOG NEVER GROWS PAST THE STAGE
 *
 * **A dialog a parent cannot close is the worst version of an overflow bug, and every dialog in this app was one.**
 * `.modal` centres its dialog, `.dialog` had no height cap, and `#stage` is `overflow:hidden` — so a tall dialog grew
 * past BOTH ends of the stage and the buttons underneath it were not merely off-screen, they were clipped away.
 * "What's new" hit it first because a release with several items is the longest thing the app puts in a dialog, and
 * a French entry is longer than the English one it was written beside. Measured at up to 3100px of overflow.
 *
 * It had been fixed twice before, one dialog at a time: `.dialog.guide` and `.dialog.wide-imp` each carried their own
 * hardcoded pixel max-height. That is the shape of a bug that keeps coming back — every dialog added since started
 * broken again, and a pixel cap is wrong on a stage that is 800 tall at five of the seven sizes in `sizes.html`, 889
 * at one and 960 at another. So the cap is on `.dialog` itself and it is a share of the STAGE, not a number.
 *
 * Three parts, and all three are needed:
 *   - `.modal` gets padding, so a dialog at full height never touches the stage edge;
 *   - `.dialog` gets `max-height:100%` (of the modal's padded box) and scrolls its own content;
 *   - the action row sticks to the bottom of that scroll, so the way out is reachable WITHOUT scrolling to it. The
 *     offset is the dialog's own bottom padding, which is why it is a variable rather than the `-26px` the two
 *     hand-fixed dialogs each wrote out. `.dlg-btns` is matched as a descendant, not a child: the delete-account
 *     dialog wraps everything in `.pm-deldlg`, and sticky works through a non-scrolling ancestor.
 * `openWhatsNew` has no `.dlg-btns` — its close is a bare `.save-btn` last in the dialog — so that is matched too.
 *
 * Held by `tools/test-dialogs.mjs`, which opens every dialog and forces 45 paragraphs into it at every size in all
 * three languages, and checks the close button with `elementFromPoint` so "on screen but covered" fails too.
 */
.modal{position:absolute;inset:0;background:rgba(16,49,147,.5);display:flex;align-items:center;justify-content:center;z-index:60;padding:20px}
.dialog{--dlg-pad:26px;background:#fff;border-radius:24px;padding:var(--dlg-pad) 30px;width:640px;display:flex;flex-direction:column;gap:14px;
  max-height:100%;overflow-y:auto;overscroll-behavior:contain}
/**
 * **The sticky band goes on the WRAPPER, never on a button**, and that distinction is the whole of a bug this rule
 * caused when it was first written: it also matched `.dialog>.save-btn:last-child`, for the one dialog whose action
 * button sat bare in the dialog rather than inside `.dlg-btns` ("What's new"). On a wrapper, `background:#fff` paints
 * a band behind buttons that keep their own colours. On the BUTTON, it painted over `.save-btn`'s green — and
 * `.save-btn` also sets `color:#fff`, so the close button became white text on a white background. Invisible, on the
 * one dialog a parent meets straight after an update.
 *
 * So this matches `.dlg-btns` only, and `about.js openWhatsNew` wraps its button like every other dialog does. The
 * special case is gone rather than accommodated. `tools/test-dialogs.mjs` now measures the contrast of every button
 * in every dialog against its own background, so the next one fails instead of shipping.
 */
.dialog .dlg-btns{position:sticky;bottom:calc(var(--dlg-pad) * -1);background:#fff;
  padding-block:10px;margin-block:-10px;z-index:3}
.dialog h2{font:800 30px var(--font-head)}
.nc-grid{display:flex;gap:22px}
.nc-grid>div{flex:1;display:flex;flex-direction:column;gap:10px}
.dialog label{display:flex;flex-direction:column;gap:4px;font:700 13px var(--font-ui);color:var(--ink-blue)}
.dialog input:not([type=file]),.dialog select{border:2px solid rgba(16,49,147,.15);border-radius:10px;padding:8px 12px;font:700 16px var(--font-ui);color:var(--ink);min-height:46px;background:#fff}
.photo{width:240px;height:189px;border:3px dashed var(--ink-faint);border-radius:16px;align-items:center;justify-content:center;text-align:center;position:relative;overflow:hidden;font:700 16px var(--font-ui)!important;cursor:pointer;flex:none}
.photo img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.photo img[hidden]{display:none}
.dlg-btns{display:flex;justify-content:flex-end;gap:12px}

/* ================= v2: weather, season, dates, info, resets, photo mascot ================= */
/* weather sky (weekly board) */
[data-bg=weather]{background:linear-gradient(var(--sky-top),var(--sky-bottom))}
body[data-wx=partly] [data-bg=weather]{background:linear-gradient(#5AB4DE,#A6DCEF)}
body[data-wx=cloudy] [data-bg=weather]{background:linear-gradient(#8AA0B3,#C9D6DF)}
body[data-wx=fog] [data-bg=weather]{background:linear-gradient(#B4C0C9,#E4E9EC)}
body[data-wx=rain] [data-bg=weather]{background:linear-gradient(#586D80,#9AAEBD)}
body[data-wx=storm] [data-bg=weather]{background:linear-gradient(#3B475C,#788697)}
body[data-wx=snow] [data-bg=weather]{background:linear-gradient(#9DAEBE,#DCE5EB)}
body[data-wx=night] [data-bg=weather]{background:linear-gradient(#1F3A70,#5F3487)}
body[data-day="0"] [data-bg=weather]{filter:brightness(.62) saturate(.9)}
#sun,#moon{position:absolute;right:-24px;top:-24px;width:170px;height:170px;object-fit:cover;border-radius:50%;display:none}
#sun{border-radius:0;object-fit:contain}
body[data-screen=week][data-wx=clear] #sun,body[data-screen=week][data-wx=partly] #sun{display:block}
body[data-screen=week][data-wx=night] #moon{display:block}
.cloud.x{display:none;top:2%;width:340px}
.cloud.x.c1{left:22%}.cloud.x.c2{left:52%;top:9%;width:300px;transform:scaleX(-1)}.cloud.x.c3{left:2%;top:15%;width:260px}
body[data-screen=week][data-wx=partly] .cloud.x.c1,
body[data-screen=week]:is([data-wx=cloudy],[data-wx=rain],[data-wx=storm],[data-wx=snow],[data-wx=fog]) .cloud.x{display:block}
body:is([data-wx=cloudy],[data-wx=rain],[data-wx=storm],[data-wx=snow],[data-wx=fog]) .cloud{filter:grayscale(1) brightness(.9);opacity:.95}
body[data-wx=storm] .cloud{filter:grayscale(1) brightness(.6)}
body[data-wx=night] .cloud{opacity:.35}
/* seasonal grass */
body[data-season=fall] #grass{background:linear-gradient(#C8B04C,#9B7A3A)}
body[data-season=winter] #grass,body[data-wx=snow] #grass{background:linear-gradient(#EEF4F7,#C5D4DC)}
/* falling rain / snow */
#fx{position:absolute;inset:0;overflow:hidden;pointer-events:none;z-index:2}
#fx i{position:absolute;top:-8%;will-change:transform;animation:fall linear infinite}
body[data-wx=snow] #fx i{width:var(--s);height:var(--s);border-radius:50%;background:#fff;opacity:.92}
body:is([data-wx=rain],[data-wx=storm]) #fx i{width:2px;height:26px;background:linear-gradient(transparent,rgba(255,255,255,.75))}
@keyframes fall{from{transform:translate(0,0)}to{transform:translate(var(--d),115vh)}}
body:is([data-screen=parent],[data-screen=pin]) #fx{display:none}
@media (prefers-reduced-motion:reduce){#fx i{animation:none;opacity:.4}}

/* header rows */
.wk-banner{width:440px}
.arrow{width:52px;height:52px;border-radius:50%;background:#fff;box-shadow:var(--shadow-chip);font:800 34px/1 var(--font-head);color:var(--ink);padding-bottom:4px;flex:none}
.arrow:active{transform:translateY(2px)}
.pill.small{min-height:44px;padding:4px 18px;font-size:18px}
.chip.season b{white-space:nowrap}
/* (This wrapped for a while, to make room for the game's pill. The pill is in My week's FOOTER now, and nothing else
   in this row needed it, so it is back to the one fixed row it always was — measured at 56 stage px in every size,
   language and number of children.) */
.info-row{display:flex;gap:10px;align-items:center;height:56px;flex:none}
.info-row.compact{height:auto}
.ichip{background:#fff;border-radius:var(--radius-chip);box-shadow:var(--shadow-chip);padding:6px 18px;font:800 24px/1.1 var(--font-head);white-space:nowrap;height:46px;display:flex;align-items:center;gap:8px}
.ichip[hidden]{display:none}
.ichip.wx em{font:700 15px var(--font-ui);font-style:normal;color:var(--ink-blue)}
.wxi{font-size:26px;line-height:1}
.compact .ichip{font-size:20px;padding:4px 12px;height:42px}.compact .ichip.wx em{display:none}
.rt-head .banner{width:600px}.rt-title b,.rt-title h1{font-size:32px}.rt-title em{font-size:20px}.rt-title{gap:10px;padding:0 24px}
.rt-head{gap:10px}

/* date circles above the day tabs */
.datec{width:56px;height:56px;border-radius:50%;background:#fff;margin:0 auto;flex:none;display:flex;align-items:center;justify-content:center;font:800 28px/1 var(--font-head);color:var(--ink);box-shadow:var(--shadow-chip);position:relative;z-index:1;border:4px solid transparent}
.datec.is-today{border-color:var(--drop-active)}
/* (`.datec.manual` and its empty/right/wrong states drew the dashed circle a child typed into. The date-mode choice
    went in 1.18.3 — parent.js weekOptionsHTML — so the circle is only ever the real date.) */
/* (Three `!important` rules used to live here and at `.col.nocircle .daytab`: a negative margin tucking the day
    PILL under the date circle, and two that undid the tuck when there was no circle or a forecast sat between.
    There is no pill to tuck any more, so all three are gone - the day name is plain text in the normal flow.) */
.marker-card{outline:3px solid var(--drop-active);outline-offset:1px}
.dome,.markers,.marker{display:none}

/* dialogs */
.modal.small .dialog{width:520px;align-items:stretch}
.dialog .dq{font:700 16px var(--font-ui);color:var(--ink-blue);margin-top:-8px}
/* (`.dnum`, `.modal.small .keypad` and `.keypad button.okk` styled the date number pad, gone in 1.18.3. `.keypad`
    itself is still the PIN pad's — parent.js and setupui.js — and `.modal.small .dialog` above is used widely.) */
.opt{background:var(--parent-row);border:3px solid rgba(16,49,147,.12);border-radius:16px;padding:14px 18px;text-align:left;display:flex;flex-direction:column;min-height:72px;box-shadow:var(--shadow-chip)}
.opt b{font:800 22px var(--font-head)}.opt em{font:700 15px var(--font-ui);font-style:normal;color:var(--ink-blue)}
.opt.warn{border-color:rgba(255,48,70,.4)}
.opt:active{transform:translateY(2px)}
.pin-overlay{position:absolute;inset:0;z-index:80}
.pill.reset{margin-left:auto;margin-right:150px}

/* photo mascot */
.pmascot{display:inline-block;border-radius:50%;overflow:hidden;border:5px solid #fff;box-shadow:0 0 0 5px var(--ring),var(--shadow-chip);flex:none;background:#fff}
.pmascot img{width:100%;height:100%;object-fit:cover;display:block}
.child-chip .pmascot{border-width:2px;box-shadow:0 0 0 3px var(--ring)}
.reward .pmascot{border-width:4px}
.coco-guide.pmascot{position:absolute;right:10px;bottom:0;border-width:5px}
.cel-mid{width:420px;display:flex;justify-content:center;align-items:center}
.cel-coco.pmascot{animation:float 4s ease-in-out infinite}

/* parent settings */
.settings.first{margin-top:0;border-top:0;padding-top:4px}
.fld{display:flex;flex-direction:column;gap:6px;font:700 13px var(--font-ui);color:var(--ink-blue)}
.photorow{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.pthumb{width:64px;height:64px;border-radius:50%;object-fit:cover;border:3px solid var(--ink-faint)}
.pthumb.coco{object-fit:contain;background:#fff}
.filebtn{display:inline-flex;align-items:center;cursor:pointer}
#right select,.dialog select{border:2px solid rgba(16,49,147,.15);border-radius:10px;padding:8px 10px;font:700 14px var(--font-ui);color:var(--ink);min-height:44px;background:#fff;width:100%}
.wk-seg button{font-size:14px;padding:8px 6px}

/* v3: per-card photo + one-day reset */
.lib-card .cam{position:absolute;top:3px;left:3px;width:30px;height:30px;border-radius:50%;background:rgba(255,255,255,.92);font-size:15px;line-height:30px;padding:0;z-index:2;box-shadow:var(--shadow-card);opacity:.85}
.lib-card .cam.has{background:var(--star);opacity:1}
.cp-side{display:flex;flex-direction:column;gap:12px;font:600 14px var(--font-ui);color:var(--ink-muted)}
.dayrows{display:flex;flex-direction:column;gap:6px}
.dayrow{display:flex;gap:8px;align-items:center}
.dayrow b{flex:1;color:#fff;border-radius:12px;padding:10px 14px;font:800 18px var(--font-head);min-height:48px;display:flex;align-items:center}
/* ================================================================ DESTRUCTIVE LOOKS DESTRUCTIVE
 *
 * **A parent must not tap a GREEN button to delete things**, and until now they did: `Clear 8 cards` and the
 * copy-to overwrite were `.save-btn.warn`, and `.warn` only moved a BORDER colour — so the confirm that empties a
 * week was the same green as Save. The other five confirms had the opposite fault: `.sm.warn` is the CANCEL shape
 * (grey `--parent-row`), so "Delete my account" and "Delete Mila" were the quieter of the two buttons in their row.
 * Neither said what it was about to do.
 *
 * So the rule is about the JOB, not the class: **the `.warn` button in a dialog's action row is the destructive
 * confirm by construction**, whatever shape it started as, and it is filled with `--danger` and white. That is one
 * rule covering both the green ones and the grey ones, rather than seven buttons restyled one at a time.
 *
 * White on `--danger` #FF3046 measures **3.64:1** — over WCAG's 3:1 for large bold text, and comfortably over the
 * green it replaces. `tools/test-dialogs.mjs` measures it rather than taking this comment's word for it.
 *
 * `disabled` matters here more than anywhere: "Delete my account" and "Delete Mila" start disabled until the parent
 * types the name back, so the dimmed state has to read as not-yet rather than as a dulled red invitation.
 */
.dlg-btns button.warn{background:var(--danger);color:#fff;border-color:var(--danger);box-shadow:var(--shadow-chip)}
.dlg-btns button.warn:disabled{opacity:.38;box-shadow:none}
/* The OPENER of a destructive dialog — 🗑 Delete Mila, ↺ Reset today's progress, ✕ on a thing to bring — is not the
   act, so it stays the quiet shape and says what it is in red text. Filling every one of these would make a parent's
   settings page read like a warning. */
.sm.warn{border-color:rgba(255,48,70,.55);color:var(--danger)}
/* `.opt.warn` is deliberately NOT in any of this: it marks the CAUTIOUS choice in an option list, and in
   `celebrate.js` it is "↺ Not yet" on a reward — not destructive at all. */

/* kid-screen language toggle */
.seg.lang.kid{background:#fff;box-shadow:var(--shadow-chip);border-radius:18px;padding:4px}
.seg.lang.kid button{min-height:44px;padding:4px 18px;font:800 20px var(--font-head);color:var(--ink-muted);border-radius:14px}
.seg.lang.kid button.on{background:var(--ink);color:#fff;box-shadow:none}
.rt-foot .seg.lang.kid{margin-left:auto}
.rt-foot .seg.lang.kid+.pill.reset{margin-left:0}
.reward h3{font-size:30px;overflow-wrap:anywhere}

/* v4: planner, holidays */
.planner{display:flex;flex-direction:column;gap:8px}
.planner label,.settings label.chk{display:flex;flex-direction:column;gap:4px;font:700 13px var(--font-ui);color:var(--ink-blue)}
.planner input:not([type=checkbox]){border:2px solid rgba(16,49,147,.15);border-radius:10px;padding:8px 12px;font:700 16px var(--font-ui);color:var(--ink);min-height:44px;width:100%;background:#fff}
.planner .grow{flex:1;min-width:0}
.pl-status{font:700 14px/1.35 var(--font-ui);background:var(--parent-row);border-radius:12px;padding:10px 12px;color:var(--ink);min-height:46px}
.save-btn.wide{width:100%}
.plist.static{min-height:0;max-height:170px;border-style:solid;border-color:rgba(16,49,147,.1);background:#fff}
.plist.static.hol .prow{background:#fff7e6}
.pdate{flex:none;width:92px;font:800 12px var(--font-ui);color:var(--ink-blue);white-space:normal;line-height:1.2}
.settings label.chk{flex-direction:row;align-items:center;gap:10px;min-height:38px;font-size:14px;color:var(--ink)}
.settings label.chk input{width:22px;height:22px;min-height:0;flex:none}
/* ================================================================ EVERY COLLAPSED SECTION SAYS IT OPENS
 *
 * **`display:flex` on a `<summary>` removes Chromium's own disclosure triangle.** Nothing warns about it, and it is
 * how seven sections in parent mode ended up reading as plain labels — "More" worst of all, sitting over a card with
 * no sign there was anything under it. The same mistake as the inert scope chips: a control that does not look like
 * one. Measured rather than eyeballed, in `tools/test-dialogs.mjs`.
 *
 * So the marker is drawn here instead of being left to the browser, for ALL of them rather than only the broken ones:
 * two metaphors (a leading ▸ on some, a trailing ▾ on others, nothing on the rest) is its own small confusion. One
 * trailing ▾ that turns to point up when the section is open, pushed to the right by `margin-left:auto`, so the whole
 * summary line is the hit area and the ▾ always sits at the same end of it.
 *
 * `list-style:none` + the `::-webkit-details-marker` rule take the native triangle off the ones that still had it, so
 * nothing carries two markers.
 */
.pm-more>summary,.pm-up summary,.pm-setgrp>summary,.nf-more>summary,.hol-list>summary,.vp-list>summary,
.ss-card.cdnext>summary,.ss-card.holart>summary,.holmore>summary,.pm-libnote>summary,.guide summary{
  list-style:none;cursor:pointer;display:flex;align-items:center;gap:8px}
.pm-more>summary::-webkit-details-marker,.pm-up summary::-webkit-details-marker,.pm-setgrp>summary::-webkit-details-marker,
.nf-more>summary::-webkit-details-marker,.hol-list>summary::-webkit-details-marker,.vp-list>summary::-webkit-details-marker,
.ss-card.cdnext>summary::-webkit-details-marker,.ss-card.holart>summary::-webkit-details-marker,
.holmore>summary::-webkit-details-marker,.pm-libnote>summary::-webkit-details-marker,.guide summary::-webkit-details-marker{display:none}
.pm-more>summary::after,.pm-up summary::after,.pm-setgrp>summary::after,.nf-more>summary::after,.hol-list>summary::after,
.vp-list>summary::after,.ss-card.cdnext>summary::after,.ss-card.holart>summary::after,.holmore>summary::after,
.pm-libnote>summary::after,.guide summary::after{
  content:'\25BE';margin-left:auto;flex:none;font-size:14px;line-height:1;color:var(--ink-muted);transition:transform .14s var(--ease-press,ease)}
.pm-more[open]>summary::after,.pm-up[open] summary::after,.pm-setgrp[open]>summary::after,.nf-more[open]>summary::after,
.hol-list[open]>summary::after,.vp-list[open]>summary::after,.ss-card.cdnext[open]>summary::after,
.ss-card.holart[open]>summary::after,.holmore[open]>summary::after,.pm-libnote[open]>summary::after,
.guide details[open]>summary::after{transform:rotate(180deg)}
/* `.holmore`'s old leading ▸ is gone with this — it had a working affordance, but two of them on one line is worse
   than one, and the trailing ▾ is now what every other section does. */

.hol-list summary{cursor:pointer;font:800 14px var(--font-ui);color:var(--ink);padding:10px 0}
/* Settings 5: which voice reads the cards (parent.js voicePickHTML). A laptop offers twenty voices and a tablet two, so
   the list is inside a <details> and scrolls rather than pushing the rest of Settings down. `min-width:0` on the name and
   `flex:none` on the ▶ is the pair that keeps a long voice name from carrying the button off the right edge — the same
   rule the School grid needed for seven columns of French. */
.vp-list summary{cursor:pointer;font:800 14px var(--font-ui);color:var(--ink);padding:10px 0;white-space:normal}
.vp-list summary b{font-weight:800;color:var(--brand,#4B51AA)}
.vp-list{border-top:1px solid rgba(0,0,0,.08)}
.vp-body,.vp-list>.vp-row{max-width:100%}
.vp-list[open]{padding-bottom:6px}
.vp-row{display:flex;align-items:stretch;gap:8px;margin:4px 0;min-width:0}
.vp-pick{flex:1 1 auto;min-width:0;text-align:left;display:flex;flex-direction:column;gap:2px;background:#fff;border:2px solid rgba(0,0,0,.12);border-radius:12px;padding:8px 10px;font:700 14px/1.2 var(--font-ui);color:var(--ink);min-height:44px;overflow:hidden}
.vp-pick em{font:600 12px/1.2 var(--font-ui);font-style:normal;color:#7a6f66}
.vp-row.on .vp-pick{border-color:var(--brand,#4B51AA);background:#F4F4FD}
.vp-test{flex:none;width:44px;min-height:44px;border-radius:12px;background:#fff;border:2px solid rgba(0,0,0,.12);font:800 15px/1 var(--font-ui);color:var(--ink)}
.bcard[data-src=holiday]{position:relative}
.bcard[data-src=holiday]::after{content:'★';position:absolute;top:2px;right:6px;color:var(--star);font:800 22px/1 var(--font-ui);text-shadow:0 1px 0 #fff,0 0 4px #fff}
.wk-seg button{font-size:13px;padding:8px 4px}
.bcard[data-src=holiday]::after{content:none}
.hb{position:absolute;top:5px;right:5px;width:26px;height:26px;border-radius:50%;background:#fff;color:var(--star);font:800 17px/27px var(--font-ui);font-style:normal;text-align:center;box-shadow:var(--shadow-card);z-index:2}
.wk-banner .banner-in{font-size:32px;padding:0 30px}.wk-banner .wk-of{font-size:21px}
.prow b.pdate{flex:none;width:84px;white-space:normal;overflow:visible;text-overflow:clip;line-height:1.15}
.ichip.away{background:var(--star);color:#fff;gap:8px}
.ichip.away em{font:700 14px var(--font-ui);font-style:normal;color:#fff;opacity:.9}
.ichip.away b{font:800 22px var(--font-head)}
.pill.small{white-space:nowrap;padding:4px 16px;font-size:17px}.wk-banner{width:400px}

/* v5: forecast row + display options */
.dayhead{display:flex;flex-direction:column;align-items:center;flex:none;gap:2px}
.fc{display:flex;align-items:center;gap:4px;flex:none;max-width:100%;height:26px;padding:0 9px 0 5px;border-radius:13px;background:rgba(255,255,255,.62);box-shadow:inset 0 0 0 1px rgba(16,49,147,.07);font:800 15px/1 var(--font-head);color:var(--ink);opacity:.86;margin:0}
.fc .fci{font-size:18px;line-height:1;flex:none}
.fc b{font:inherit;background:none;padding:0;white-space:nowrap}
.fc.empty{height:26px;background:none;box-shadow:none}
.dq2{font:700 12px var(--font-ui);color:var(--ink-muted);margin:2px 0 6px}
.presets{margin-bottom:6px}.presets button{flex:1;font-size:13px;padding:8px 4px}
.disp .row{min-height:44px;padding:2px 0;border-bottom:1px solid rgba(16,49,147,.06)}
.disp .row span{font:700 14px/1.2 var(--font-ui);color:var(--ink);padding-right:8px}

#rotate span{display:none}html[lang=en] #rotate span[lang=en],html[lang=fr] #rotate span[lang=fr],html[lang=es] #rotate span[lang=es]{display:inline}
.rot-in{display:flex;flex-direction:column;align-items:center;gap:22px;max-width:520px}
.rot-in p{margin:0}
#rotate-x{min-height:56px;padding:10px 26px;border-radius:16px;border:3px solid rgba(255,255,255,.55);background:transparent;color:#fff;font:800 19px var(--font-ui);cursor:pointer}
#rotate-x:active{transform:translateY(2px)}
.rcard .bar{flex:1;font-size:23px;line-height:1.2;padding:8px 10px}.hint{justify-content:center}
.warn-note{font:700 13px/1.35 var(--font-ui);color:#B3261E;background:#FDECEA;border-radius:10px;padding:8px 10px}

/* ================= v6: rewards ================= */
/* The reward card. Everything is sized in cqw (% of the card's own width), so it scales from a 90px tile to a 220px card. */
.rw-card{container-type:inline-size;aspect-ratio:200/260;width:100%;display:block}
.rw-in{width:100%;height:100%;box-sizing:border-box;border:2.2cqw solid var(--c);border-radius:11cqw;overflow:hidden;background:#fff;display:flex;flex-direction:column;box-shadow:0 2.6cqw 0 rgba(16,49,147,.14)}
.rw-ribbon{background:var(--c);color:var(--ci);text-align:center;font:800 7.5cqw/1 var(--font-head);letter-spacing:.06em;text-transform:uppercase;padding:2.2cqw 0 1.8cqw}
.rw-art{flex:1;min-height:0;position:relative;display:flex;align-items:flex-end;justify-content:center;
  background:repeating-conic-gradient(from 0deg at 50% 62%,rgba(255,255,255,.7) 0 9deg,transparent 9deg 18deg),linear-gradient(color-mix(in srgb,var(--c) 22%,#fff),#fff)}
.rw-coco{width:82%;height:auto;max-height:96%;object-fit:contain;position:relative;z-index:1}
.rw-photo{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.rw-emoji{position:absolute;top:3.5cqw;right:3.5cqw;width:24cqw;height:24cqw;border-radius:50%;background:#fff;box-shadow:0 1.6cqw 0 rgba(16,49,147,.16);font-size:14cqw;line-height:24cqw;text-align:center;z-index:2;border:1.6cqw solid var(--c)}
.rw-stars{position:absolute;left:4cqw;top:3cqw;color:var(--star);font:800 8cqw/1 var(--font-ui);letter-spacing:.5cqw;text-shadow:0 .6cqw 0 #fff,0 0 2cqw #fff;z-index:2}
.rw-bar{background:var(--c);color:var(--ci);font:700 9.6cqw/1.15 var(--font-ui);text-align:center;padding:3.2cqw 3cqw;min-height:23cqw;display:flex;align-items:center;justify-content:center}
/* locked "back of the card" (evening/night brand gradient) */
.rw-back .rw-in{border-color:#fff;background:linear-gradient(var(--evening-top),var(--evening-bottom));color:#fff;align-items:center;justify-content:center;gap:2cqw;text-align:center;padding:0 7cqw}
.rw-back .rw-gift{font-size:34cqw;line-height:1;filter:drop-shadow(0 2cqw 0 rgba(16,49,147,.25))}
.rw-back .rw-lock{position:absolute;top:5cqw;right:6cqw;font-size:13cqw}
.rw-back b{font:800 12cqw/1.05 var(--font-head)}
.rw-back span{font:700 8.4cqw/1.2 var(--font-ui);opacity:.95}
.rw-back .rw-in{position:relative}
/* the chest on the celebration screen: flips to show the reward */
.chest{width:190px;height:247px;perspective:900px;cursor:pointer;flex:none}
.chest .inner{position:relative;width:100%;height:100%;transform-style:preserve-3d;transition:transform .85s var(--ease-fold)}
.chest .face{position:absolute;inset:0;backface-visibility:hidden;-webkit-backface-visibility:hidden}
.chest .back{transform:rotateY(180deg)}
.chest.open .inner{transform:rotateY(180deg)}
.chest.instant .inner{transition:none}
.chest:not(.open) .front{animation:wiggle 4s ease-in-out infinite}
@keyframes wiggle{0%,86%,100%{transform:none}90%{transform:rotate(-2.5deg)}94%{transform:rotate(2.5deg)}}
.cel-right.has-reward{gap:12px}
.cel-right.has-reward .stars.big .star{width:32px;height:32px}
.cel-right.has-reward .next-panel{padding:10px 18px}
.rw-earned{font:800 26px/1.05 var(--font-head);color:#fff;text-align:center;text-shadow:0 3px 0 rgba(16,49,147,.35)}
.apthumbs{display:grid;grid-template-columns:repeat(6,1fr);gap:6px}
.apthumbs .thumb img{height:44px}.apthumbs .thumb span{font-size:10px}
.modal.wide .dialog{width:760px}
/* routine footer */
.gift-slot{display:flex;gap:10px;align-items:center}
.pill.gift{background:linear-gradient(var(--evening-top),var(--evening-bottom));color:#fff}
.pill.gift.approved{background:var(--done)}
.pill.icon{padding:8px 16px;font-size:24px}
/* parent settings */
.rwp{display:flex;align-items:center;gap:8px;min-height:48px;border-bottom:1px solid rgba(16,49,147,.06)}
.rwp span{font:800 14px var(--font-ui);color:var(--ink);width:78px;flex:none}
.rwp select{flex:1;min-width:0}
.rwp .switch{width:52px;height:30px;flex:none}.rwp .switch i{width:22px;height:22px}.rwp .switch.on i{transform:translateX(22px)}
.dq2.strong{font-weight:800;color:var(--ink);margin-top:8px}
.rwgrid{display:grid;grid-template-columns:1fr 1fr;gap:12px;padding:6px 2px}
.rwtile{position:relative}
.rwtile.off .rwprev{opacity:.35;filter:grayscale(.7)}
.rwprev{display:block;width:100%;padding:0}
.rwtile .chk{position:absolute;left:6px;bottom:6px;background:#fff;border-radius:8px;padding:4px 6px;box-shadow:var(--shadow-card);min-height:0}
.rwtile .chk input{width:24px;height:24px}
.rwdel{position:absolute;right:4px;top:4px;width:34px;height:34px;border-radius:50%;background:#fff;color:var(--danger);font:800 16px var(--font-ui);z-index:3;box-shadow:var(--shadow-card)}
.rw-dlg{align-items:center}.rw-big{width:230px}
.rwbook{display:grid;grid-template-columns:repeat(6,1fr);gap:12px;max-height:440px;overflow-y:auto;padding:4px}
.rwb{display:flex;flex-direction:column;gap:6px;align-items:center;text-align:center}
.rwb-card{width:100%}.rwb small{font:700 12px var(--font-ui);color:var(--ink-muted)}
.rwtile .chk.under{position:static;background:none;box-shadow:none;padding:6px 2px 0;font:700 13px var(--font-ui);color:var(--ink);flex-direction:row;align-items:center;gap:8px}.rwtile .chk.under input{width:22px;height:22px}.rwgrid{row-gap:14px}

/* v7: thumbnails keep the picture's shape (no more cut-off heads); routine footer has Parent mode */
.thumbs{max-height:372px;overflow-y:auto;scrollbar-width:none;align-content:start}
.thumb img{height:auto;aspect-ratio:400/336;object-fit:cover;object-position:50% 20%}
.thumb span{font-size:13px;padding:3px 4px}
.apthumbs .thumb img{height:auto}.apthumbs .thumb span{font-size:11px}
.bcard img,.lib-card img,.prow img{object-position:50% 18%}
/* The one-time "Tap a card to hear it" tip (routine.js tipHTML). Its own FULL-WIDTH row above the footer, because in the
   footer it was a `flex:1` item competing with four tabs and two pills: at 1024 it was handed about 160 CSS px, wrapped
   to five or six lines, and measured 116px to 260px tall inside a footer fixed at 96px — hanging past the footer and
   past the stage, which is what cut "finish" off. Here nothing can crush it and there is no height to overflow. */
.rt-tip{flex:none;display:flex;align-items:center;gap:12px;margin:0 0 6px;padding:8px 14px;
  background:var(--surface-veil);border-radius:18px}
.rt-tip b{flex:1;min-width:0;font:700 18px/1.25 var(--font-ui);color:var(--ink)}
.rt-tip .su-bx{flex:none}
@media (max-height:760px){ .rt-tip{padding:6px 12px;margin-bottom:4px} .rt-tip b{font-size:16px} }
.pill.reset{margin-left:0;margin-right:0}
/* **No 150px reserved for the mascot, and that is what lets the footer wrap only when it has to.** This used to be
   `margin-right:150px` on the last pill, to keep it clear of the mascot in the corner — a reservation the footer has never
   actually been able to honour (measured: in English the Parent mode pill already sat over the mascot at every size), and
   in a WRAPPING footer an unhonourable margin is worse than useless: it counts towards the line, so every language broke to
   a second row. Without it the arithmetic is honest — English 1197 and Spanish 1204 of 1236 stage px stay on one row,
   French's 1328 wraps — and the mascot is decoration that the pill is allowed to overlap, as it always did. */
.pill.parentbtn{margin-right:0}
.thumbs{max-height:428px}.thumbs.many{grid-template-columns:repeat(3,1fr);gap:6px}.thumbs.many .thumb span{font-size:11px;padding:2px}

/* v8: categories, holidays by region, quick-add events */
.cat-wrap{position:relative;display:flex}
.cat-wrap .cat-row{flex:1;min-width:0}
.cat-x{position:absolute;right:4px;top:50%;transform:translateY(-50%);width:34px;height:34px;border-radius:50%;background:#fff;color:var(--danger);font:800 14px var(--font-ui);box-shadow:var(--shadow-card)}
.swatches{display:flex;flex-wrap:wrap;gap:10px}
.sw{width:44px;height:44px;border-radius:50%;border:4px solid #fff;box-shadow:0 0 0 2px rgba(16,49,147,.18)}
.sw.on{box-shadow:0 0 0 4px var(--ink)}
.qchips{display:flex;flex-wrap:wrap;gap:6px;max-height:132px;overflow-y:auto;padding:2px}
.qchip{display:flex;align-items:center;gap:6px;background:var(--parent-row);border:2px solid rgba(16,49,147,.1);border-radius:12px;padding:6px 10px;font:700 13px var(--font-ui);min-height:40px;text-align:left}
.qchip span{font-size:18px}
.qchip.on{background:var(--ink);color:#fff;border-color:var(--ink)}
.settings label.chk{align-items:center}
.settings label.chk .hemoji{font-size:20px;flex:none}
.settings label.chk .hname{flex:1;min-width:0;line-height:1.15}
.settings label.chk small{font:700 11px var(--font-ui);color:var(--ink-muted);flex:none;text-align:right;max-width:74px;line-height:1.1}

/* v9: countdown chips */
.ichip.cd{gap:8px;min-width:0;flex:0 1 auto;padding:4px 14px 4px 10px}
.ichip.cd b{font:800 28px/1 var(--font-head)}
.cd .cdtxt{display:flex;flex-direction:column;line-height:1.05;min-width:0}
.cd .cdtxt i{font:800 12px var(--font-ui);font-style:normal;letter-spacing:.04em;text-transform:uppercase;color:var(--ink-muted)}
/**
 * **`max-width` IS THE ONLY PLACE A COUNTDOWN'S NAME IS EVER CUT, and 118px was too mean for Spanish.**
 * Measured across three languages and seven sizes: the single clipped name anywhere in the app was
 * "Vacaciones de verano" in the week chip — 130px of text in a 118px box, ellipsed, at EVERY size, because this
 * is a fixed width rather than a responsive one. English and French fit; Spanish compounds with "de" and does
 * not. 150px clears the longest name the library can produce and still keeps a chip a chip.
 */
.cd .cdname{font:700 13px var(--font-ui);font-style:normal;color:var(--ink-blue);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:150px}
.compact .ichip.cd{padding:2px 10px 2px 8px;height:42px}.compact .ichip.cd b{font-size:22px}.compact .cd .cdtxt i{font-size:11px}
.rt-head .banner{width:auto;flex:1 1 0;min-width:430px;max-width:600px}
.cdrow{display:flex;align-items:center;gap:6px;min-height:52px;border-bottom:1px solid rgba(16,49,147,.06);flex-wrap:wrap;padding:4px 0}
.cdem{font-size:22px;flex:none}.cdn{flex:1;min-width:110px;font:800 14px/1.15 var(--font-ui);color:var(--ink)}
.cdn small{display:block;font:700 11px var(--font-ui);color:var(--ink-muted)}
.cdsw{display:flex;flex-direction:column;align-items:center;gap:2px;font:700 10px var(--font-ui);color:var(--ink-blue)}
.switch.sm{width:46px;height:26px}.switch.sm i{width:18px;height:18px;top:4px;left:4px}.switch.sm.on i{transform:translateX(20px)}
.emojis{display:flex;flex-wrap:wrap;gap:6px}
.em{width:46px;height:46px;border-radius:12px;background:var(--parent-row);font-size:24px;border:3px solid transparent}
.em.on{border-color:var(--ink);background:#fff}
.dialog .chk.yearly{flex-direction:row;align-items:center;gap:8px;flex:1;font-size:14px;color:var(--ink);padding-top:18px}
.dialog .chk.yearly input{width:22px;height:22px;min-height:0}

/* v10: calendar import */
/* (the max-height and overflow it used to carry are .dialog's own now — see A DIALOG NEVER GROWS PAST THE STAGE) */
.dialog.wide-imp{width:820px}
.imp-src{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}
.sm.big{min-height:64px;display:flex;align-items:center;justify-content:center;text-align:center;cursor:pointer;font-size:14px;line-height:1.2}
.dialog textarea{border:2px solid rgba(16,49,147,.15);border-radius:12px;padding:10px 12px;font:600 14px/1.4 var(--font-ui);color:var(--ink);width:100%;resize:vertical;min-height:96px;user-select:text;-webkit-user-select:text}
.imp-status{min-height:26px;font:700 14px var(--font-ui);color:var(--ink-blue)}
.imp-status .bar{height:10px;border-radius:5px;background:rgba(16,49,147,.12);margin-top:6px;overflow:hidden;display:block}
.imp-status .bar i{display:block;height:100%;background:var(--done);transition:width .2s}
.imp-tools{display:flex;gap:8px}
.irows{display:flex;flex-direction:column;gap:6px;max-height:360px;overflow-y:auto;padding:2px}
.ir{display:grid;grid-template-columns:34px 138px 54px 230px 1fr;gap:8px;align-items:center;background:var(--parent-row);border-radius:12px;padding:6px 8px}
.ir input[type=date],.ir select{border:2px solid rgba(16,49,147,.15);border-radius:10px;padding:6px 8px;font:700 14px var(--font-ui);color:var(--ink);min-height:44px;background:#fff;width:100%}
.ir .iy{width:24px;height:24px}
.ir .ith{width:54px;height:44px;object-fit:cover;border-radius:8px;background:#fff}
.ir .ititle{font:600 12px/1.2 var(--font-ui);color:var(--ink-muted);overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.importbtn{background:var(--ink)!important;color:#fff;border-color:var(--ink)!important}
.save-btn:disabled{opacity:.4}
.wide-imp .dlg-btns{position:sticky;bottom:-26px;background:#fff;padding:12px 0 4px;border-top:2px solid rgba(16,49,147,.08);z-index:2;margin-top:4px}.irows{max-height:300px}

/* v11: in-app guide */
.guide-btn{background:rgba(255,255,255,.16);color:#fff;border-radius:14px;padding:8px 18px;font:800 16px var(--font-ui);min-height:44px;margin-right:6px}
.guide-btn:active{transform:translateY(2px)}
.dialog.guide{width:780px;gap:8px}
.guide details{background:var(--parent-row);border-radius:14px;padding:4px 14px}
.guide summary{font:800 17px var(--font-head);color:var(--ink);padding:10px 0;cursor:pointer;min-height:44px;display:flex;align-items:center}
.guide ul{list-style:none;padding:0 0 10px;display:flex;flex-direction:column;gap:7px}
.guide li{font:600 15px/1.4 var(--font-ui);color:var(--ink);padding-left:16px;position:relative}
.guide li::before{content:'•';position:absolute;left:2px;color:var(--ink-blue);font-weight:800}
.guide li b{font-weight:800}.guide li i{font-style:normal;background:#fff;border-radius:8px;padding:1px 7px;color:var(--ink-blue)}
.guide .dlg-btns{position:sticky;bottom:-26px;background:#fff;padding:10px 0 2px;border-top:2px solid rgba(16,49,147,.08)}

/* v12: main-screen guide button (quiet, glass-like, sits beside Parent mode) */
.pill.quiet{background:rgba(255,255,255,.62);box-shadow:none;font-size:18px;min-height:46px;padding:6px 18px;color:var(--ink)}
.pill.quiet:active{background:#fff}

/* ================= v13: tap animation + category effects (transform / opacity only) ================= */
.fx-overlay{position:absolute;inset:0;z-index:70;overflow:hidden;perspective:900px;touch-action:manipulation}
.fx-dim{position:absolute;inset:0;background:#0b1a4a;opacity:0;transition:opacity .3s ease-out}
.fx-overlay.in .fx-dim{opacity:.38}.fx-overlay.dim-strong.in .fx-dim{opacity:.68}
.fx-overlay.out .fx-dim{opacity:0;transition-duration:.35s}
.fx-layer{position:absolute;inset:0;pointer-events:none;transition:opacity .25s}
.fx-overlay.out .fx-layer{opacity:0}
.fx-pos{position:absolute;transition:transform .5s cubic-bezier(.34,1.56,.64,1);will-change:transform}
.fx-overlay.out .fx-pos{transition:transform .38s cubic-bezier(.4,0,.2,1)}
.k-outing .fx-pos{transition-duration:.65s;transition-timing-function:cubic-bezier(.2,.9,.3,1.12)}
.fx-inner{width:100%;height:100%;transform-origin:50% 100%;will-change:transform}
.fx-card{width:100%;height:100%;background:#fff;border:6px solid var(--c);border-radius:26px;overflow:hidden;box-shadow:0 10px 0 rgba(16,49,147,.25);display:flex;flex-direction:column}
.fx-card img{display:block;width:100%;flex:1;min-height:0;object-fit:cover;object-position:50% 20%}
.fx-card .lbl{background:var(--c);color:var(--ci);font:800 26px/1.15 var(--font-head);text-align:center;padding:9px 8px;flex:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.bcard.hl,.rc.hl,.demo-card.hl{transform:translateY(-6px) scale(1.04)}
.rc{transition:transform .12s var(--ease-press)}

.p{position:absolute;pointer-events:none;line-height:1;will-change:transform,opacity}
.p-burst{font-size:34px;opacity:0;animation:fx-burst .9s ease-out both}.p-burst.small{font-size:24px}
.p-ball{opacity:0;animation:fx-ball 1.6s ease-in-out .45s both}
.p-swoosh{height:6px;border-radius:3px;background:linear-gradient(90deg,transparent,#fff);opacity:0;transform-origin:100% 50%;animation:fx-swoosh .55s ease-out both}
.p-z{font:800 44px var(--font-head);color:#fff;opacity:0;text-shadow:0 3px 0 rgba(16,49,147,.4);animation:fx-z 1.8s ease-out both}
.p-twinkle{color:#FFE27A;opacity:0;animation:fx-twinkle .9s ease-in-out infinite alternate}
.p-bub{border-radius:50%;border:3px solid rgba(255,255,255,.85);background:radial-gradient(circle at 30% 30%,rgba(255,255,255,.75),rgba(255,255,255,.1) 60%);opacity:0;animation:fx-rise 2.2s ease-in both}
.p-conf{border-radius:2px;opacity:0;animation:fx-conf 1.9s cubic-bezier(.2,.6,.4,1) both}
.p-cloud{opacity:.92;animation:fx-cloud 4s linear both}
.p-pencil{font-size:54px;opacity:0;animation:fx-pencil 1.4s ease-in-out .45s both}
.p-pop{font-size:28px;opacity:0;animation:fx-pop .5s ease-out both}
.p-cal{font-size:68px;opacity:0;transform-origin:50% 100%;animation:fx-cal 1.6s ease-in-out .4s both}

.act-wiggle{animation:fx-wiggle .5s ease-in-out 2}
.act-hop{animation:fx-hop .5s ease-out 3}
.act-sway{animation:fx-sway 1.6s ease-in-out 1}
.act-munch{animation:fx-munch .3s ease-in-out 5}
.act-settle{animation:fx-wiggle .6s ease-in-out 1}
.act-tilt{animation:fx-tilt 1.2s ease-in-out 1}
.act-calflip{transform-origin:50% 0;animation:fx-calflip 1.1s ease-in-out 1}

@keyframes fx-burst{0%{transform:translate3d(0,0,0) scale(.2);opacity:0}15%{opacity:1}100%{transform:translate3d(var(--dx),var(--dy),0) scale(1.1) rotate(var(--r));opacity:0}}
@keyframes fx-ball{0%{transform:translate3d(-30px,-10px,0) rotate(0);opacity:0}8%{opacity:1}20%{transform:translate3d(80px,-120px,0) rotate(180deg)}35%{transform:translate3d(170px,0,0) rotate(360deg)}50%{transform:translate3d(250px,-75px,0) rotate(540deg)}65%{transform:translate3d(330px,0,0) rotate(720deg)}80%{transform:translate3d(400px,-35px,0) rotate(900deg)}100%{transform:translate3d(480px,20px,0) rotate(1080deg);opacity:0}}
@keyframes fx-swoosh{0%{transform:translate3d(-40px,0,0) scaleX(.3);opacity:0}40%{opacity:.9}100%{transform:translate3d(20px,0,0) scaleX(1);opacity:0}}
@keyframes fx-z{0%{transform:translate3d(0,0,0) scale(.6);opacity:0}25%{opacity:1}100%{transform:translate3d(70px,-130px,0) scale(1.15);opacity:0}}
@keyframes fx-twinkle{0%{transform:scale(.7);opacity:.15}100%{transform:scale(1.25);opacity:1}}
@keyframes fx-rise{0%{transform:translate3d(0,0,0) scale(.6);opacity:0}12%{opacity:.95}50%{transform:translate3d(var(--sway),calc(var(--rise)*-.5),0) scale(1)}100%{transform:translate3d(calc(var(--sway)*-1),calc(var(--rise)*-1),0) scale(1.1);opacity:0}}
@keyframes fx-conf{0%{transform:translate3d(0,0,0) rotate(0);opacity:1}38%{transform:translate3d(calc(var(--dx)*.75),calc(var(--up)*-1),0) rotate(calc(var(--r)*.5))}100%{transform:translate3d(var(--dx),var(--fall),0) rotate(var(--r));opacity:0}}
@keyframes fx-cloud{0%{transform:translate3d(0,0,0);opacity:0}12%{opacity:.92}88%{opacity:.92}100%{transform:translate3d(var(--w),0,0);opacity:0}}
@keyframes fx-pencil{0%{transform:translate3d(-130px,-60px,0) rotate(-20deg);opacity:0}8%{opacity:1}20%{transform:translate3d(-70px,20px,0) rotate(-8deg)}40%{transform:translate3d(0,-30px,0) rotate(-20deg)}60%{transform:translate3d(65px,30px,0) rotate(-8deg)}80%{transform:translate3d(125px,-20px,0) rotate(-20deg)}100%{transform:translate3d(150px,15px,0) rotate(-12deg);opacity:0}}
@keyframes fx-pop{0%{transform:scale(0) rotate(-30deg);opacity:0}45%{transform:scale(1.25) rotate(10deg);opacity:1}100%{transform:scale(.6) rotate(0);opacity:0}}
@keyframes fx-cal{0%{transform:rotateX(0);opacity:0}15%{opacity:1}35%{transform:rotateX(-100deg)}55%{transform:rotateX(0)}75%{transform:rotateX(-100deg)}100%{transform:rotateX(0);opacity:0}}
@keyframes fx-wiggle{0%,100%{transform:rotate(0)}25%{transform:rotate(-3.5deg) scale(1.02)}75%{transform:rotate(3.5deg) scale(1.02)}}
@keyframes fx-hop{0%,100%{transform:translate3d(0,0,0)}45%{transform:translate3d(0,-34px,0) scale(1.03)}}
@keyframes fx-sway{0%,100%{transform:rotate(0)}50%{transform:rotate(-2.5deg) translate3d(0,4px,0)}}
@keyframes fx-munch{0%,100%{transform:scale(1,1)}50%{transform:scale(1.06,.93)}}
@keyframes fx-tilt{0%,100%{transform:rotate(0)}30%{transform:rotate(-2deg)}60%{transform:rotate(2deg)}}
@keyframes fx-calflip{0%{transform:rotateX(0)}30%{transform:rotateX(-14deg)}60%{transform:rotateX(6deg)}100%{transform:rotateX(0)}}

/* v13b: card test page + volume slider */
.screen.demo{background:var(--parent-bg);display:flex;flex-direction:column}
.dflags{font:800 15px var(--font-ui);color:rgba(255,255,255,.85);letter-spacing:.06em;margin-left:14px}
.dvoice{color:rgba(255,255,255,.8);font:700 14px var(--font-ui);margin-right:8px}
.demo-tip{font:700 14px var(--font-ui);color:var(--ink-muted);padding:10px 20px 0}
.demo-grid{flex:1;min-height:0;overflow-y:auto;display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:10px;padding:12px 16px;align-content:start;grid-auto-rows:138px}
.demo-card{position:relative;cursor:pointer;height:138px;min-height:138px}
.dbadge{position:absolute;left:4px;top:4px;background:rgba(255,255,255,.92);color:var(--ink);border-radius:8px;font:800 11px var(--font-ui);padding:2px 6px;letter-spacing:.02em}
input[type=range]{width:100%;height:44px;accent-color:var(--ink)}

.p-page{width:44px;height:34px;background:#fff;border:3px solid #FE5D21;border-radius:6px;opacity:0;animation:fx-page 1.1s ease-out both}
@keyframes fx-page{0%{transform:translate3d(0,0,0) rotate(0) scale(.6);opacity:0}20%{opacity:1}100%{transform:translate3d(var(--dx),var(--dy),0) rotate(var(--r)) scale(1);opacity:0}}

/* v14: "Did you do it?" question under the popped-up routine card */
/* `--ask-lift` is measured in effects.js: the whole stack rises by however much the question would have hung over
   the footer. 0 when it does not, which is the tallest stages. */
.fx-ask{position:absolute;left:0;right:0;top:calc(50% + 172px - var(--ask-lift, 0px));display:flex;flex-direction:column;align-items:center;gap:10px;opacity:0;transform:translate3d(0,14px,0);transition:opacity .3s ease-out,transform .35s cubic-bezier(.34,1.56,.64,1);pointer-events:none}
.fx-ask.show{opacity:1;transform:none;pointer-events:auto}
.fx-overlay.out .fx-ask{opacity:0;transition-duration:.2s}
.fx-ask .q{font:800 26px/1.1 var(--font-head);color:#fff;text-shadow:0 2px 0 rgba(16,49,147,.5)}
.fx-ask .yes{font:800 26px/1 var(--font-head);color:#fff;background:#2FA84F;border:0;border-radius:40px;padding:16px 38px;min-height:64px;box-shadow:0 7px 0 #1E7A37;cursor:pointer;touch-action:manipulation}
.fx-ask .yes:active{transform:translate3d(0,5px,0);box-shadow:0 2px 0 #1E7A37}
.fx-ask .no{font:700 18px/1 var(--font-ui);color:#fff;background:rgba(255,255,255,.18);border:2px solid rgba(255,255,255,.7);border-radius:30px;padding:10px 24px;min-height:44px;cursor:pointer}

/* v15: numbered Settings sections + voice recorder */
.sgrp{display:flex;align-items:center;gap:10px;margin:20px 0 8px;padding-top:14px;border-top:2px solid rgba(16,49,147,.14);font:800 17px var(--font-head);color:var(--ink)}
.settings.first .sgrp:first-child{margin-top:4px;padding-top:0;border-top:0}
.sgrp b{display:inline-grid;place-items:center;width:26px;height:26px;border-radius:50%;background:var(--ink-blue);color:#fff;font:800 14px var(--font-ui)}
.vsearch{padding:6px 16px 0}
.vnote{padding:0 20px 10px}
.dbadge.mine{background:#E8375A;color:#fff;font-size:14px}
.vdlg{max-width:640px}
.vcard{display:flex;gap:22px;align-items:flex-start}
.vcard .bcard{width:190px;flex:none;cursor:default}
.vcard .bcard img{height:150px}
.vside{flex:1;min-width:0;display:flex;flex-direction:column;gap:10px}
.vside h2{margin:0}
.vstat{font:700 16px var(--font-ui);color:var(--ink-muted);margin:0}
.vstat.own{color:#1E7A37}
.vbtns{display:flex;gap:10px;flex-wrap:wrap}
.vside .big{font:800 22px var(--font-head);border:0;border-radius:40px;padding:14px 26px;min-height:60px;color:#fff;cursor:pointer;touch-action:manipulation}
.vside .big.rec{background:#E8375A;box-shadow:0 6px 0 #A8203B}
.vside .big.stop{background:#103193;box-shadow:0 6px 0 #0A1F63}
.vrec{display:flex;align-items:center;gap:10px;font:800 18px var(--font-ui);color:var(--ink)}
.vrec .dot{width:16px;height:16px;border-radius:50%;background:#E8375A;animation:vpulse 1s ease-in-out infinite}
@keyframes vpulse{0%,100%{transform:scale(1);opacity:1}50%{transform:scale(1.5);opacity:.5}}

/* v16: reward editor */
.rwedit{position:absolute;left:4px;top:4px;width:34px;height:34px;border-radius:50%;background:#fff;font:800 16px var(--font-ui);z-index:3;box-shadow:var(--shadow-card)}
.rwed .nc-grid{align-items:flex-start}
.rwed-prev{flex:none!important;width:230px}
.rwed-form{min-width:0}
.rwname{display:flex;align-items:center;gap:8px}.rwname small{width:70px;flex:none;font:700 13px var(--font-ui);color:var(--ink-muted)}.rwname input{flex:1;min-width:0}
/* namefield.js: the app's own language on its own, the other two behind an expander. All three inputs are always
   in the DOM - the expander only hides two - so nothing a parent never opened can be wiped. */
.nf-l{display:flex;align-items:center;gap:8px;margin:4px 0;min-width:0}
.nf-l small{width:76px;flex:none;font:700 13px var(--font-ui);color:var(--ink-muted)}
.nf-l input{flex:1;min-width:0}
.nf-main small{color:var(--ink)}
/* Every one of these lives in a dialog, and `.dialog label{display:flex}` (an AUTHOR rule) beats the user agent's
   "hide what is inside a closed <details>" - so without this the expander expanded nothing and all three boxes were
   on screen exactly as before. Specificity 0,3,0 against the 0,2,0 of `.dialog label`. */
.nf-more:not([open]) .nf-l{display:none}
.nf-more{margin:2px 0 0}
.nf-more>summary{cursor:pointer;min-height:34px;display:flex;align-items:center;font:700 13px var(--font-ui);color:var(--ink-blue)}
.nf-more[open]>summary{margin-bottom:2px}
.rwchips{display:flex;flex-wrap:wrap;gap:8px;padding-top:6px}
.rwchip{width:44px;height:44px;border-radius:12px;border:3px solid transparent;background:#fff;box-shadow:var(--shadow-card);font-size:22px;line-height:1}
.rwchip.sw{border-radius:50%}
.rwchip.on{border-color:var(--ink-blue);transform:scale(1.08)}
.rwed .rwname{flex-direction:row;align-items:center;gap:10px}
.rwed .rwname small{width:78px;text-align:left}
.rwed .rwname input{flex:1;width:auto;min-width:0}
.rwed-form{align-items:stretch}

/* v17: compact reward list (collapsed by default) */
.rwlist{display:flex;flex-direction:column;gap:6px;max-height:288px;overflow-y:auto;padding:4px 2px}
.rwrow{display:flex;align-items:center;gap:8px;background:#fff;border-radius:14px;padding:4px 8px 4px 6px;box-shadow:var(--shadow-card);min-height:52px}
.rwrow.off .rwprev{opacity:.4}
.rwrow .chk{position:static;box-shadow:none;background:none;padding:0;flex:none;min-height:0}
.rwrow .chk input{width:26px;height:26px}
.rwrow .rwprev{display:flex;align-items:center;gap:10px;flex:1;min-width:0;width:auto;padding:0;text-align:left;filter:none}
.rwrow .rwprev .rwmini{flex:none;width:44px;height:44px;border-radius:12px;border:3px solid var(--c);background:#fff;display:grid;place-items:center;font-size:24px;overflow:hidden}
.rwrow .rwmini img{width:100%;height:100%;object-fit:cover}
.rwrow .rwlbl{font:700 15px/1.2 var(--font-ui);color:var(--ink);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.rwrow .rwedit,.rwrow .rwdel{position:static;flex:none;width:38px;height:38px;box-shadow:none;background:var(--bg-soft,#EEF2FB)}
.rwnav{display:flex;align-items:center;gap:16px;font:800 16px var(--font-ui);color:var(--ink)}
.rwnav .sm{width:48px;font-size:24px;line-height:1}

/* v18: themes (plain background), avatars */
body[data-theme-bg=plain] #bg{background:var(--theme-bg)}
body[data-theme-bg=plain] #bg>*{visibility:hidden}
.avbub{display:inline-grid;place-items:center;border-radius:50%;background:#fff;border:4px solid var(--kc,var(--star));font-family:var(--font-head);font-weight:800;color:var(--kc,var(--ink));line-height:1;flex:none;overflow:hidden;box-shadow:0 0 0 3px #fff}

/* v19: children manager, child chips, theme picker */
.kids{display:flex;flex-direction:column;gap:8px}
.kids-count{margin:0}
.kid-row{display:flex;align-items:center;gap:10px;background:#fff;border-radius:16px;padding:6px 8px;box-shadow:var(--shadow-card);border-left:8px solid var(--kc)}
.kid-row.cur{outline:3px solid var(--kc)}
.kid-row.paused{opacity:.6;border-left-style:dashed}
.kid-name{flex:1;min-width:0;text-align:left;display:flex;flex-direction:column;font:800 18px var(--font-head);color:var(--ink)}
.kid-name small{font:700 12px var(--font-ui);color:var(--ink-muted)}
.kid-tools{display:flex;gap:4px}
.kid-tools button{width:40px;height:40px;border-radius:12px;background:var(--parent-row);font-size:16px;font-weight:800}
.kid-tools button:disabled{opacity:.3}
.kid-pnote{margin:-2px 4px 4px}
.kid-chips{display:flex;gap:8px;margin-left:16px}
.kid-chip{display:flex;align-items:center;gap:6px;background:rgba(255,255,255,.16);color:#fff;border-radius:22px;padding:4px 14px 4px 5px;font:800 17px var(--font-head);border:3px solid transparent;min-height:44px}
.kid-chip.on{background:#fff;color:var(--ink);border-color:var(--kc)}
.kided .nc-grid{align-items:flex-start;gap:20px}
.kid-prev{flex:none!important;width:140px;align-items:center;text-align:center;font:800 20px var(--font-head)}
.kid-form{min-width:0}
.kid-form input,.kid-form select{width:100%}
.small-dlg{width:480px}
.theme-cur{display:flex;align-items:center;gap:12px;text-align:left}
.theme-cur img{width:60px;height:40px;border-radius:8px;object-fit:cover}
.theme-cur b{flex:1}
.theme-cur span{color:var(--ink-blue)}
.themepick{width:860px}
.tp-body{display:flex;gap:18px;align-items:flex-start}
.tp-list{width:240px;flex:none;display:flex;flex-direction:column;gap:8px}
.tp-tile{display:flex;align-items:center;gap:10px;background:var(--parent-row);border:3px solid transparent;border-radius:14px;padding:6px;text-align:left}
.tp-tile.on{border-color:var(--ink-blue);background:#fff}
.tp-tile img{width:78px;height:52px;border-radius:8px;object-fit:cover;flex:none}
.tp-tile span{display:flex;flex-direction:column;gap:3px;font:800 15px var(--font-head)}
.tbadge{font:800 11px var(--font-ui);background:#E6F4EA;color:#1E7A37;border-radius:8px;padding:2px 7px;align-self:flex-start;white-space:nowrap}
.tbadge.lock{background:#FFF1D6;color:#8A5A00}.tbadge.own{background:#E6F4EA;color:#1E7A37}
.tp-detail{flex:1;min-width:0}
.tp-detail h3{margin:0 0 4px;font:800 20px var(--font-head);color:var(--ink);display:flex;gap:8px;align-items:center}
.tp-detail p{margin:0 0 8px}
.tp-cards{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.tp-card{width:100%;cursor:default}
.tp-card img{height:74px!important}
.tp-card .lbl{font-size:12px;padding:3px 2px}
.tp-cel{display:flex;align-items:center;gap:10px;margin-top:10px;background:var(--parent-row);border-radius:14px;padding:8px 12px;font:700 14px var(--font-ui);color:var(--ink)}
.tp-cel img{height:44px}.tp-cel span{font-size:28px}.tp-cel .chk{color:#fff;background:var(--done,#6EC66C);border-radius:50%;width:36px;height:36px;display:grid;place-items:center;font-size:20px}
.save-btn.buy{background:#FFA62E;color:#103193}
.buy-price{font:800 22px var(--font-head);color:var(--ink);text-align:center}
.gallery{display:grid;grid-template-columns:repeat(auto-fill,minmax(420px,1fr));gap:16px;padding:12px 16px;overflow-y:auto}
.gal-th{background:#fff;border-radius:18px;padding:12px;box-shadow:var(--shadow-card)}
.gal-th h3{margin:0;font:800 20px var(--font-head);color:var(--ink);display:flex;gap:8px;align-items:center}
.gal-th p{margin:2px 0 8px;font:600 13px var(--font-ui);color:var(--ink-muted)}
.gal-th .tp-cards{grid-template-columns:repeat(4,1fr)}
.sample-banner{position:absolute;left:50%;top:0;transform:translateX(-50%);z-index:90;background:#103193;color:#fff;border-radius:0 0 14px 14px;padding:6px 8px 6px 16px;display:flex;align-items:center;gap:12px;font:800 14px var(--font-ui)}
.sample-banner button{background:#FFA62E;color:#103193;border-radius:10px;padding:6px 12px;font:800 13px var(--font-ui);min-height:32px}

/* v20: several children. Week: kids are rows, days are columns */
.mkboard{--mkname:112px;flex:1;min-height:0;display:grid;grid-template-columns:var(--mkname) repeat(7,minmax(0,1fr));grid-template-rows:auto repeat(var(--rows),minmax(0,1fr));column-gap:6px;row-gap:6px;padding-bottom:8px;position:relative}
/* The multi-child board's weekend panel — `grid-column` is inline (week.js weekendRunsHTML), for the reason above. */
.mk-wash{background:var(--weekend-panel);border-radius:14px;margin:0 -3px;z-index:0}
.mk-wk{align-self:start;justify-self:center;font:800 11px var(--font-ui);letter-spacing:.08em;color:#fff;z-index:1;margin-top:2px;max-width:100%;overflow:hidden}
.mk-wk b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:block}
.mk-dh{display:flex;flex-direction:column;align-items:stretch;gap:2px;padding:14px 3px 0;z-index:1;min-width:0}
.mk-dh.is-focus{background:var(--today-wash);border-radius:14px 14px 0 0;box-shadow:0 0 0 3px var(--star) inset}
.mk-dh.has-yesterday{opacity:.68}
.mk-dh .fc{height:22px;font-size:13px;padding:0 7px 0 4px;gap:3px}.mk-dh .fc .fci{font-size:15px}.mk-dh .fc.empty{height:22px}
.mk-dh .datec{width:34px;height:34px;font-size:18px;border-width:3px;margin:0 auto}
.mk-day{border-radius:12px;color:#fff;font:800 15px var(--font-head);padding:5px 0;text-align:center;box-shadow:var(--shadow-chip);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mk-day.fr{font-size:14px}
.mk-mark{text-align:center;font:800 11px var(--font-ui);color:var(--ink);opacity:.8;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mk-name{grid-column:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;background:#fff;border-left:8px solid var(--kc);border-radius:14px;box-shadow:var(--shadow-card);color:var(--ink);font:800 16px var(--font-head);padding:4px 2px;min-width:0;z-index:1;min-height:72px}
.mk-name b{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mk-cd{display:flex;gap:4px;justify-content:center;max-width:100%;overflow:hidden}
.mk-name .ichip.cd{height:22px;min-width:0;padding:0 7px;gap:3px;border-radius:11px;background:color-mix(in srgb,var(--kc) 18%,#fff);box-shadow:none}
.mk-name .ichip.cd b{font:800 14px/1 var(--font-head)}
.mk-name .ichip.cd .wxi{font-size:14px}
.mk-name .ichip.cd .cdtxt{display:none}
.mk-cell{position:relative;display:flex;flex-wrap:wrap;gap:5px;align-content:center;justify-content:center;padding:5px 3px;border-radius:14px;background:color-mix(in srgb,var(--kc) 14%,rgba(255,255,255,.72));min-width:0;min-height:0;overflow:hidden;z-index:1}
.mk-cell.is-focus{background:color-mix(in srgb,var(--kc) 24%,rgba(255,255,255,.85))}
.mk-cell.empty{background:color-mix(in srgb,var(--kc) 6%,rgba(255,255,255,.35))}
.mk-card{flex:0 0 calc(50% - 3px);min-width:66px;max-width:104px;width:auto;cursor:pointer;position:relative;box-shadow:var(--shadow-card)}
.mk-card img{height:clamp(46px,5.4vh,64px);width:100%;object-fit:cover}
.mk-card .lbl{font-size:11px;padding:2px 2px;line-height:1.2}
.mk-card .hb{position:absolute;left:2px;top:2px;z-index:2;font-size:12px;color:#fff;font-style:normal}
.mk-more{position:absolute;right:3px;bottom:3px;min-width:46px;height:34px;padding:0 10px;border-radius:17px;background:var(--ink);color:#fff;font:800 16px var(--font-head);z-index:3;box-shadow:var(--shadow-chip)}
.mk-more::before{content:'';position:absolute;inset:-20px -14px}
/* Countdown settings: the holiday list. The major holidays are a plain list; the office-closure ones fold away. */
/* ------------------------------------------------------------------ Small cards (per child; state.js cardSize)
   The SAME card markup as Big - picture, label, badges, timer, X - laid out as a row instead of a tile, so every
   behaviour (tap, flip, voice, done state, timers, delete) is untouched. The row, not the picture, carries the touch
   target: 72px minimum on a tablet even though the picture is 52px. The category colour moves from a full border to a
   thick left edge and a wash, which is what makes a list of them still readable at a glance. */
.cards.sz-small{gap:6px}
.cards.sz-small .bcard{display:flex;flex-direction:row;align-items:center;gap:8px;min-height:72px;padding:6px 8px 6px 0;border:3px solid var(--c);border-left-width:12px;background:color-mix(in srgb,var(--c) 9%,#fff);overflow:hidden}
.cards.sz-small .bcard img{object-position:50% 35%;width:40px;height:40px;flex:none;border-radius:9px;object-fit:cover;margin-left:6px}
.cards.sz-small .bcard .lbl{flex:1;min-width:0;background:none;color:var(--ink);padding:0;text-align:left;font:800 13px/1.15 var(--font-ui);white-space:normal;overflow-wrap:anywhere}
.cards.sz-small .bcard .card-time{flex:none;margin-left:auto;background:none;color:var(--ink-blue);font:800 14px var(--font-ui);padding:0 2px;white-space:nowrap}
.cards.sz-small .bcard .hb{position:static;flex:none;font-size:15px;color:var(--star);text-shadow:none;margin-left:2px}
.cards.sz-small .bcard[data-src=holiday]::after{content:none}
.cards.sz-small .wkb-rep{flex:none}

/* several children: one child's Small rows must not change the height of another child's Big row, so the cell keeps
   laying out from the top and each card simply takes the width it needs */
.mk-cell.sz-small{align-content:flex-start;gap:4px;padding:4px 4px}
.mk-cell.sz-small .mk-card{flex:0 0 100%;max-width:none;min-width:0;display:flex;flex-direction:row;align-items:center;gap:6px;min-height:32px;padding:2px 5px 2px 0;border-left-width:8px;background:color-mix(in srgb,var(--c) 9%,#fff)}
.mk-cell.sz-small .mk-card img{object-position:50% 35%;width:26px;height:26px;flex:none;border-radius:7px;object-fit:cover;margin-left:5px}
.mk-cell.sz-small .mk-card .lbl{flex:1;min-width:0;background:none;color:var(--ink);padding:0;text-align:left;font:800 12px/1.15 var(--font-ui);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mk-cell.sz-small .mk-card .card-time{flex:none;margin-left:auto;background:none;color:var(--ink-blue);font:800 11px var(--font-ui);padding:0 2px}
.mk-cell.sz-small .mk-card .hb{position:static;flex:none;font-size:12px;margin-left:3px}

/* the routine board: the filmstrip becomes a list, the grid becomes one column of rows */
.rt-cards.sz-small:not(.m){display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:76px;align-content:start;gap:8px;overflow-x:hidden;overflow-y:auto;padding:10px var(--rt-pad)}
/* ================================================================ DRESS FOR THE WEATHER
 *
 * A tile at the end of the morning routine's card row (`routine.js dressHTML`). It is a `.rc` so it takes the row's
 * sizing and scrolling for free — which is why this feature cost the screen no new layout, the header having been
 * measured at 6 stage px spare in Spanish with one child. `.rc-dress` then takes OFF everything that makes a `.rc`
 * look completable: no flap, no perspective, no timer, no reward face. It must not read as a card to tick.
 *
 * Narrower than a card on purpose: it is a note beside the row, not another thing to do.
 */
.rc-dress{perspective:none;cursor:default;aspect-ratio:auto;width:auto;min-width:200px;max-width:280px;align-self:center}
.rd-card{display:flex;flex-direction:column;gap:10px;justify-content:center;height:auto;min-height:0;padding:16px 14px;
  background:var(--surface-veil,rgba(255,255,255,.72));border-radius:var(--radius-card);box-shadow:var(--shadow-card);border:3px dashed var(--ink-faint)}
.rd-line b{font:800 20px/1.2 var(--font-head);color:var(--ink);display:block;text-align:center;overflow-wrap:anywhere}
.rd-items{display:flex;gap:8px;justify-content:center;flex-wrap:wrap}
.rd-i{display:flex;flex-direction:column;align-items:center;gap:2px;width:62px}
.rd-i img{width:56px;height:56px;border-radius:14px;display:block}
.rd-i b{font:700 11px/1.15 var(--font-ui);color:var(--ink-blue);text-align:center;overflow-wrap:anywhere}
/* The small card size shrinks the row to 76px rows; the tile goes with it rather than towering over them. */
.rt-cards.sz-small .rc-dress{width:100%;max-width:none;height:auto}
.rt-cards.sz-small .rd-card{flex-direction:row;align-items:center;gap:12px;padding:8px 12px}
.rt-cards.sz-small .rd-line b{text-align:left;font-size:16px}
.rt-cards.sz-small .rd-i{width:46px}.rt-cards.sz-small .rd-i img{width:40px;height:40px}

.rt-cards.sz-small .rc{width:100%;height:76px;max-width:none;max-height:none;min-width:0;aspect-ratio:auto;flex:none}
.rt-cards.m.sz-small .rc{height:56px}
.rt-cards.sz-small .rcard{display:flex;flex-direction:row;align-items:center;gap:12px;min-height:76px;padding:6px 12px 6px 0;border-left-width:12px;background:color-mix(in srgb,var(--c) 9%,#fff)}
.rt-cards.sz-small .rcard img{object-position:50% 35%;width:56px;height:56px;flex:none;border-radius:12px;object-fit:cover;margin-left:8px}
.rt-cards.sz-small .rcard .bar{flex:1;min-width:0;background:none!important;color:var(--ink);padding:0;text-align:left;justify-content:flex-start;font:800 18px/1.2 var(--font-ui)!important;min-height:0;white-space:normal}
.rt-cards.sz-small .rt-timer{position:absolute;top:50%;right:10px;transform:translateY(-50%)}
.rt-cards.sz-small .rc{position:relative}
.rt-cards.sz-small .reward{border-radius:14px}
.rt-cards.m.sz-small{grid-template-columns:1fr;grid-auto-rows:auto;grid-template-rows:none}

.rt-cards.m.sz-small .rcard{min-height:56px;gap:8px;border-left-width:9px}
.rt-cards.m.sz-small .rcard img{width:40px;height:40px;flex:none;margin-left:6px}
.rt-cards.m.sz-small .rcard .bar{font-size:14px!important}
.csz-seg{align-self:flex-start}

/* "Copy this to…": the same dialog for My week, My day and School. Tick boxes, never a dropdown - a parent with
   three children copies to two of them in one action, and the whole thing is one undo step. */
.cpy-modal .dialog{width:min(520px,92vw);gap:10px}
.cpy-tools{display:flex;gap:8px}
.cpy-list{display:flex;flex-direction:column;gap:6px;max-height:min(46vh,340px);overflow-y:auto}
.cpy-kid{display:flex;align-items:center;gap:10px;min-height:56px;padding:8px 12px;border:3px solid var(--pm-line);border-radius:14px;background:#fff;cursor:pointer;text-align:left}
.cpy-kid.on{border-color:var(--ink-blue);background:color-mix(in srgb,var(--ink-blue) 7%,#fff)}
.cpy-kid input{width:22px;height:22px;flex:none;accent-color:var(--ink-blue)}
.cpy-kid .avatar,.cpy-kid .avbub,.cpy-kid .pmascot,.cpy-kid img{flex:none}
.cpy-kid b{flex:1;min-width:0;font:800 18px var(--font-head);color:var(--ink);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cpy-kid em{flex:none;font:700 13px var(--font-ui);font-style:normal;color:var(--ink-muted);white-space:nowrap}
.cpy-note{margin:0;text-align:left}
.cpy-open{white-space:nowrap}
/* The parent board browses weeks with the same arrows the child's board uses, so a parent setting up next week
   never has to leave parent mode to get there. */
.wkb-nav{width:40px;height:40px;min-width:40px;padding:0;border-radius:13px;background:var(--pm-fill);color:var(--ink-blue);font:800 24px/1 var(--font-head);flex:none}
.wkb-nav:active{transform:translateY(2px)}
.wkb-thisweek{flex:none;white-space:nowrap}
.wkb-head{gap:10px}
/* The dates never break across lines or shrink; the header wraps instead. 20px rather than the 24px the child's
   banner uses - this one shares its row with three buttons, and at 1280 stage px in French there is not room for
   both a headline and a reachable Timetable switch. */
.wkb-head .wkb-range{flex:none;white-space:nowrap;font-size:20px}
.wkb-acts{margin-left:auto;flex:none;display:flex;align-items:center;gap:10px}
.wkb-acts .cpy-open{flex:none}
.rtb-schedbar .cpy-open{margin-left:auto}
/* Parent mode's four pages. Countdowns and School use the same three-part shell as My week and My day: a left rail,
   the thing being configured in the middle, and a context panel on the right.
   Four labels will not fit across the top bar as a row of words - in French the bar wanted 1595px of 1280 - so the four
   pages are icon-above-label, the way the child's own tab bar reads. No label is shortened. */
.pm-bar .pm-seg4 button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:0;padding:2px 10px;min-width:0;line-height:1.1}
.pm-bar .pm-seg4 button i{font-style:normal;font-size:19px;line-height:1.1}
.pm-bar .pm-seg4 button b{font:800 14px var(--font-head);white-space:nowrap}
/* C.17: with the language switcher, the Guide button and the mark gone, the four page buttons are the widest thing in
   the bar and sit right after the child picker; the gear and Save & exit are pushed to the far end by the spacer with a
   divider between them and everything else. */
.pm-bar .pm-seg4{margin-left:2px}
.pm-bar .pm-div{width:2px;height:34px;background:rgba(255,255,255,.22);border-radius:1px;flex:none;margin:0 4px}
.pm-set .seg.lang{align-self:flex-start}
.pm-set .seg.lang button{min-width:96px;padding:0 14px}
.pm-pagerail{width:var(--pm-lib-w);flex:none}
.pm-pagerail-in{flex:1;min-width:0;display:flex;flex-direction:column;gap:6px;padding:14px 12px;overflow-y:auto;overflow-x:hidden}
.pm-pagerail-in h3{font:800 13px var(--font-ui);letter-spacing:.06em;text-transform:uppercase;color:var(--ink-muted);margin:0 0 2px;overflow-wrap:anywhere}
.pm-pagerailb{display:flex;align-items:center;gap:9px;width:100%;min-width:0;text-align:left;background:#F2F5FC;border-radius:12px;padding:11px 12px;font:800 15px var(--font-ui);color:var(--ink-blue);min-height:46px}
.pm-pagerailb b{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pm-pagerailb>img,.pm-pagerailb>.avatar,.pm-pagerailb>.avbub,.pm-pagerailb>.pmascot{flex:none}
.pm-pagerailb.on{background:var(--ink-blue);color:#fff}
.pm-cfgside .pm-side-in{flex:1;min-width:0;display:flex;flex-direction:column;gap:8px;padding:16px 14px;overflow-y:auto}
.pm-cfgside h2{font:800 21px var(--font-head);color:var(--ink);margin:0}
.pm-nextlist{display:flex;flex-direction:column;gap:6px}
.pm-nextrow{display:flex;align-items:center;gap:9px;background:#fff;border:2px solid var(--pm-line-soft);border-radius:12px;padding:7px 10px;min-width:0}
/* "Coming up" is a parent looking at a preview, so it shows the real artwork rather than the bare emoji it used to.
   34px is above the ~26px where an illustration stops reading, and this is a panel to look at, not a chip to glance at. */
.pm-nextemo{font-size:20px;line-height:1;flex:none}
.pm-nextemo.has-art{width:34px;height:34px;border-radius:9px;overflow:hidden;background:#fff;display:grid;place-items:center}
.pm-nextemo.has-art img{width:100%;height:100%;object-fit:cover;object-position:50% 25%;display:block}
.pm-nextrow>b{font:800 22px/1 var(--font-head);color:var(--ink);flex:none;min-width:30px;text-align:right}
.pm-nexttxt{display:flex;flex-direction:column;min-width:0;line-height:1.1}
.pm-nexttxt i{font:800 11px var(--font-ui);font-style:normal;letter-spacing:.04em;text-transform:uppercase;color:var(--ink-muted)}
.pm-nexttxt em{font:700 14px var(--font-ui);font-style:normal;color:var(--ink-blue);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pm-nextrow small{margin-left:auto;font:700 12px var(--font-ui);color:var(--ink-muted);white-space:nowrap}
.pm-cfg .pm-main{padding:0}
.pm-cfg #pmcfg{flex:1;min-height:0;display:flex;flex-direction:column;overflow:hidden}
/* Inside parent mode this is ONE scrolling column, never the two-column grid .ss-body sets up below. The grid's
   1fr tracks take their minimum from the holiday list, which is wider than a track, so the second column - "How to
   count" - was pushed past the right edge with overflow-x hidden and no way to reach it. */
.ss-body.in-pm{display:flex;flex-direction:column;flex:1;min-height:0;gap:14px;overflow-y:auto;overflow-x:hidden;padding:12px 14px}
.ss-body.in-pm>.ss-card{max-width:var(--pm-form-max);width:100%;min-width:0;margin-left:0;margin-right:auto}
.tabptr{margin:0 0 6px}
/* the two headed halves of the Show block: WHERE things appear, and WHAT counts down */
.cds-sub{margin:8px 0 0;font:800 13px var(--font-ui);letter-spacing:.06em;text-transform:uppercase;color:var(--ink-muted)}
.pm-cfg .tabptr{max-width:var(--pm-form-max);padding:0 14px}
.pm-cfg .ss-tabs{max-width:var(--pm-form-max);margin-right:auto}
.tabsset .always{font:700 13px var(--font-ui);color:var(--ink-muted);white-space:nowrap}
/* A holiday row: the label fills everything left of the two buttons, so a tap almost anywhere toggles it. The date
   is a button - it says when the holiday next falls and opens the editor for its date and name. */
.holrow>.chk{flex:1;min-width:0}
.holdate{flex:none;min-width:74px;height:38px;padding:0 10px;border-radius:11px;background:var(--pm-fill,#F2F5FC);color:var(--ink-blue);font:800 14px var(--font-ui);white-space:nowrap}
.holdate.own{background:color-mix(in srgb,var(--star) 22%,#fff);color:var(--ink)}
.holdate:active{transform:translateY(1px)}
.hown{display:inline-block;margin-left:6px;padding:1px 7px;border-radius:8px;background:color-mix(in srgb,var(--star) 24%,#fff);color:var(--ink);font:800 11px var(--font-ui);vertical-align:middle;white-space:nowrap}
/* The rename dialog is the holiday editor's twin — same width, same shared name field, same "back to the original"
   button under it — so `cname-modal` takes the same rules rather than a second set that would drift from them. */
.holedit-modal .dialog,.cname-modal .dialog{width:min(520px,92vw);gap:10px}
.cname-modal .cn-voice{display:flex;flex-direction:column;gap:8px}
.holedit-modal .rwname{display:flex;align-items:center;gap:8px}
.holedit-modal .rwname small{flex:none;width:76px;color:var(--ink-muted);font:700 13px var(--font-ui)}
.holedit-modal .rwname input{flex:1;min-width:0}
.holmore{margin-top:10px;border-top:2px solid var(--ink-faint);padding-top:8px}
.holmore>summary{font:800 15px var(--font-ui);color:var(--ink-blue);padding:6px 2px}
/* (its leading ▸ is the shared trailing ▾ now — see "EVERY COLLAPSED SECTION SAYS IT OPENS" above) */
.holmore>summary b{font-weight:800;color:var(--star)}
.regask{margin:4px 0 0;font:700 14px var(--font-ui);color:var(--ink-blue);display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.mkboard.n4 .mk-name{gap:2px;padding:2px}.mkboard.n4 .mk-name .ichip.cd{height:20px}
.mkboard.n2 .mk-cell{align-content:flex-start;padding-top:8px}
.mkboard.n2 .mk-card{flex-basis:calc(50% - 3px)}
.mkboard.n2 .mk-card img{height:clamp(56px,8vh,86px)}
.mkboard.n2 .mk-card .lbl{font-size:12px}
.datec.small{width:34px;height:34px}
.dayfull{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:12px;max-height:420px;overflow-y:auto;padding:4px}
.dayfull .mk-card{max-width:none;min-width:0;flex:none}.dayfull .mk-card img{height:120px}.dayfull .mk-card .lbl{font-size:16px;padding:6px 4px}
.dayfull-modal .dialog{gap:12px}.dayfull-modal h2{display:flex;align-items:center;gap:10px}

/* Routine: one column per child */
.rt-multi .rt-head .banner{min-width:0;max-width:420px}
.rt-cols{flex:1;min-height:0;display:flex;gap:12px;padding-top:8px}
.rt-col{flex:1 1 0;min-width:0;display:flex;flex-direction:column;background:rgba(255,255,255,.4);border:4px solid var(--kc);border-radius:20px;overflow:hidden;position:relative}
.rc-head{display:flex;align-items:center;gap:8px;background:var(--kc);padding:4px 10px 4px 6px;min-height:52px;flex:none}
.rc-name{display:flex;align-items:center;gap:8px;color:#fff;font:800 22px var(--font-head);text-shadow:0 2px 0 rgba(0,0,0,.18);min-width:0}
.rc-name b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.rc-head .pill{min-height:40px;padding:4px 12px;font-size:15px}.rc-head .pill.icon{width:44px;padding:0}
.rc-prog{padding:6px 10px 0;flex:none}
.rc-prog .progress{height:auto;padding:4px 10px;background:rgba(255,255,255,.8);border-radius:12px;gap:3px}
.rc-prog .ptxt b{font-size:13px}.rc-prog .pips i{height:8px}
.rt-cards.m{flex:1;min-height:0;display:grid;grid-template-columns:repeat(var(--cc,2),minmax(0,1fr));grid-auto-rows:var(--rh,136px);gap:8px;padding:8px 10px 10px;overflow-y:auto;overflow-x:hidden;justify-content:stretch;align-items:stretch;align-content:start}
.rt-multi.n2{--cc:3;--rh:min(200px,26vh)}.rt-multi.n3,.rt-multi.n4{--cc:2;--rh:min(140px,18vh)}
.rt-cards.m .rc{width:100%;height:100%;min-width:0}
.rt-cards.m .rcard{border-width:3px;border-radius:16px}
.rt-cards.m .rcard img{height:auto;flex:1;min-height:0}
.rt-cards.m .rcard .bar{flex:none;font-size:14px!important;min-height:0;padding:4px 3px}
.rt-multi.n2 .rt-cards.m .rcard .bar{font-size:17px!important;padding:6px 4px}
.rt-cards.m .reward{border-width:3px;border-radius:16px;gap:2px;padding:0 4px}
.rt-cards.m .reward h3{font-size:15px!important}
.rt-cards.m .reward .coco,.rt-cards.m .reward .avbub,.rt-cards.m .reward .pmascot{width:52px!important;height:52px!important;font-size:28px!important}
.rt-cards.m .reward .stars{transform:scale(.6);margin:-6px 0}
.rt-cards.m .reward .mine{display:none}
.rt-cards.m .rt-empty{grid-column:1/-1}
.rt-multi .rt-tabs{margin-top:2px}
.rt-multi .rt-foot{min-height:74px}
.col-cel{position:absolute;inset:0;z-index:20;background:rgba(255,255,255,.82);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;overflow:hidden;animation:ccIn .35s ease-out both}
.col-cel.out{opacity:0;transition:opacity .5s ease-in}
.cc-check{width:110px;height:110px;border-radius:50%;background:var(--done);color:#fff;display:grid;place-items:center;font-size:72px;line-height:1;box-shadow:0 8px 0 rgba(16,49,147,.18);animation:ccPop .6s cubic-bezier(.2,1.4,.4,1) both}
.cc-title{font:800 26px/1.1 var(--font-head);color:var(--ink);text-align:center;padding:0 12px}
.cc-coco{height:120px;object-fit:contain}
.cc-bit{position:absolute;left:50%;top:44%;width:12px;height:12px;border-radius:3px;animation:ccBurst 1.5s ease-out both;font-style:normal;color:var(--star);font-size:22px;line-height:1;width:auto;height:auto}
.cc-bit:not(.star){width:12px;height:12px}
@keyframes ccIn{from{opacity:0}to{opacity:1}}
@keyframes ccPop{0%{transform:scale(.2)}70%{transform:scale(1.15)}100%{transform:scale(1)}}
@keyframes ccBurst{0%{transform:translate3d(0,0,0) rotate(0) scale(.4);opacity:0}15%{opacity:1}100%{transform:translate3d(var(--dx),var(--dy),0) rotate(var(--r)) scale(1);opacity:0}}
/* celebration without a mascot */
.cel-check{position:relative;width:340px;height:340px;display:grid;place-items:center;margin:auto}
.big-check{width:260px;height:260px;border-radius:50%;background:var(--done);color:#fff;display:grid;place-items:center;font-size:170px;line-height:1;box-shadow:0 14px 0 rgba(16,49,147,.16);animation:ccPop .7s cubic-bezier(.2,1.4,.4,1) both}
.cc-star{position:absolute;color:var(--star);font-size:64px;animation:ccTw 1.6s ease-in-out infinite}
.cc-star.s1{left:0;top:20px}.cc-star.s2{right:0;top:60px;animation-delay:.4s}.cc-star.s3{left:40px;bottom:0;animation-delay:.8s}
@keyframes ccTw{0%,100%{transform:scale(1) rotate(0)}50%{transform:scale(1.25) rotate(14deg)}}
.dmode{margin-left:14px}
.demo-fam{display:grid;grid-template-columns:repeat(auto-fit,minmax(360px,1fr));gap:16px;padding:16px;overflow-y:auto}
.demo-fam section{background:#fff;border-radius:18px;padding:14px 16px;box-shadow:var(--shadow-card);display:flex;flex-direction:column;gap:10px}
.demo-fam h3{margin:0;font:800 20px var(--font-head);color:var(--ink)}
.demo-fam p{margin:0;font:600 14px var(--font-ui);color:var(--ink-muted)}
.fam-list{display:flex;flex-direction:column;gap:6px}
.fam-kid{display:flex;align-items:center;gap:10px;background:var(--parent-row);border-radius:12px;padding:4px 10px 4px 6px;font:700 15px var(--font-ui)}
.fam-kid b{font:800 18px var(--font-head);flex:1}
.fam-kid.paused{opacity:.55}
.fam-kid em{font-style:normal;font-weight:800}
.rt-cards.m{grid-auto-rows:auto;grid-template-rows:repeat(var(--rows,2),minmax(0,var(--rhmax,150px)))}
.rt-multi.n2{--rhmax:230px}.rt-multi.n3,.rt-multi.n4{--rhmax:150px}
.mk-more{bottom:auto;top:3px;right:3px}
.mk-card img,.mkboard.n2 .mk-card img{height:auto!important;aspect-ratio:1/.8;object-fit:cover}

/* v21: undo bar, theme mode chips */
.undo-btn:disabled{opacity:.4}
.tp-mode{display:flex;gap:8px;margin:0 0 4px}
.tp-mode button{flex:1;padding:10px 8px;border-radius:14px;background:var(--parent-row);font:800 16px var(--font-head);color:var(--ink);border:3px solid transparent;min-height:48px}
.tp-mode button.on{background:#fff;border-color:var(--ink-blue)}
.tp-help{min-height:32px;margin:0 0 6px!important}

/* v22: tap-to-hear on the kids' screens */
[data-say]{cursor:pointer}
.saying{animation:sayGlow 1.5s ease-out}
@keyframes sayGlow{0%{box-shadow:0 0 0 0 rgba(255,166,46,.9)}30%{box-shadow:0 0 0 8px rgba(255,166,46,.55)}100%{box-shadow:0 0 0 14px rgba(255,166,46,0)}}

/* v23: Countdowns + School (tabs, kid screens, parent setup) */
.ntabs{display:flex;gap:8px;align-items:center}
.ntab{display:flex;align-items:center;gap:8px;background:#fff;color:var(--ink);border-radius:18px;padding:6px 18px 6px 12px;font:800 20px var(--font-head);box-shadow:var(--shadow-chip);min-height:56px;transition:transform .12s var(--ease-press)}
.ntab i{font-style:normal;font-size:26px;line-height:1}
.ntab.on{background:var(--star);color:#fff}
.ntab:active{transform:translateY(2px)}
.week .bar{height:64px}
.rt-foot .ntabs{gap:6px}.rt-foot .ntab{padding:4px 12px 4px 8px;font-size:18px;min-height:52px}.rt-foot .ntab i{font-size:22px}
.rt-multi .rt-foot .hint{display:none}
.hb.sb{width:auto;min-width:26px;padding:0 3px;font-size:14px;color:inherit}

.countdowns,.school{padding:14px 22px 0;display:flex;flex-direction:column}
.countdowns .bar,.school .bar{height:64px;flex:none;padding-bottom:6px;margin:0 0 var(--foot-gap)}
.cd-body{flex:1;min-height:0;overflow-y:auto;display:flex;flex-direction:column;gap:14px;padding:10px 4px 6px;scrollbar-width:none}
.cd-body::-webkit-scrollbar{display:none}
.cd-feature{position:relative;display:flex;gap:30px;align-items:center;background:rgba(255,255,255,.82);border-radius:28px;padding:22px 30px;box-shadow:var(--shadow-routine);flex:none}
.cd-pic{width:270px;height:280px;flex:none;cursor:pointer;display:flex;flex-direction:column;border-width:5px;border-radius:24px;overflow:hidden}
.cd-pic img{flex:1;min-height:0;width:100%;object-fit:cover;height:auto}
.cd-pic .lbl{font:800 22px/1.15 var(--font-head);padding:8px 8px;white-space:normal;text-align:center}
.cd-emoji{flex:1;display:grid;place-items:center;font-size:110px;background:#fff}
.cd-txt{flex:1;min-width:0;display:flex;flex-direction:column;gap:6px}
.cd-kick{font:800 16px var(--font-ui);letter-spacing:.08em;text-transform:uppercase;color:var(--ink-blue)}
.cd-txt h1{margin:0;font:800 44px/1.05 var(--font-head);color:var(--ink)}
.cd-count{display:flex;align-items:baseline;gap:14px;cursor:pointer}
.cd-count b{font:800 132px/.9 var(--font-head);color:var(--star)}
.cd-count span{font:800 46px var(--font-head);color:var(--ink)}
.cd-dots{display:flex;flex-wrap:wrap;gap:4px 3px;max-width:700px}
.cd-dots i{font-style:normal;font-size:26px;line-height:1;animation:cdTw 3s ease-in-out infinite;animation-delay:calc(var(--i)*.09s)}
@keyframes cdTw{0%,100%{transform:scale(1);opacity:.85}50%{transform:scale(1.18);opacity:1}}
.cd-days{font:700 20px var(--font-ui);color:var(--ink-muted);cursor:pointer}
.cd-own{display:flex;gap:4px}
.cd-party{overflow:hidden;background:linear-gradient(135deg,rgba(255,255,255,.95),rgba(255,236,186,.95))}
.cd-party .cd-txt h1{font-size:52px}
.cd-bits{position:absolute;inset:0;pointer-events:none}
.cd-bits .cc-bit{left:50%;top:46%;animation-iteration-count:infinite;animation-duration:3.2s}
.cd-party .cd-kick{font-size:24px;color:var(--danger)}
.cd-coco{height:150px;object-fit:contain;align-self:flex-start}
.cd-check{width:120px;height:120px;border-radius:50%;background:var(--done);color:#fff;display:grid;place-items:center;font-size:80px;line-height:1;box-shadow:0 8px 0 rgba(16,49,147,.18);animation:ccPop .6s cubic-bezier(.2,1.4,.4,1) both}
.cd-more{display:flex;gap:8px;flex-wrap:wrap}
.cd-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:12px;flex:none}
.cd-tile{display:flex;flex-direction:column;align-items:center;gap:4px;background:rgba(255,255,255,.85);border-radius:20px;padding:10px 10px 12px;box-shadow:var(--shadow-card);text-align:center;position:relative;min-height:190px}
.cd-timg{width:100%;height:92px;border-radius:14px;overflow:hidden;background:#fff;display:grid;place-items:center}
/* This tile is 216x92 - 2.35:1 - so whatever the picture's own shape, cover throws most of its height away. Centred,
   that window lands on the middle and cuts the top off: Coco's hats and ears, Simple's backpack handle, Bubbly's
   ribbon. 30% puts it where the subject actually is. (The other boxes have their own: .bcard img is 50% 18%.) */
.cd-timg img{width:100%;height:100%;object-fit:cover;object-position:50% 30%}.cd-timg .cd-emoji{font-size:54px;background:none}
.cd-tile b{font:800 19px/1.15 var(--font-head);color:var(--ink);min-height:44px;display:flex;align-items:center}
.cd-n{font:700 17px var(--font-ui);color:var(--ink-muted)}.cd-n em{font:800 30px var(--font-head);font-style:normal;color:var(--star)}
.cd-tile .cd-own{position:absolute;right:8px;top:8px}
.cd-empty{background:rgba(255,255,255,.85);border-radius:24px;padding:40px;font:800 26px/1.3 var(--font-head);color:var(--ink);text-align:center}

.sc-pick{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:24px}
.sc-pick h1{margin:0;font:800 44px var(--font-head);color:var(--ink);background:rgba(255,255,255,.85);border-radius:20px;padding:8px 30px}
.sc-kids{display:flex;gap:22px;flex-wrap:wrap;justify-content:center}
.sc-kid{display:flex;flex-direction:column;align-items:center;gap:8px;background:#fff;border:6px solid var(--kc);border-radius:28px;padding:18px 34px 16px;min-width:200px;box-shadow:var(--shadow-routine);font:800 34px var(--font-head);color:var(--ink)}
.sc-kid:active{transform:translateY(3px)}
/* The School screen's own title. The week control that used to be a second, different pair of arrows around it now
   sits in the header, exactly as it does on My week (weekbar.js weekHeadHTML). */
.sc-nav{display:flex;align-items:center;gap:16px;min-height:74px;flex:none}
.sc-when{flex:1;text-align:center;background:rgba(255,255,255,.85);border-radius:20px;padding:6px 16px;cursor:pointer}
.sc-when h1{margin:0;font:800 36px/1.1 var(--font-head);color:var(--ink)}.sc-when span{font:700 20px var(--font-ui);color:var(--ink-muted)}.sc-when span b{color:var(--star);font-family:var(--font-head);font-size:24px}
/* the same week navigation as the parent board, wearing the child's theme: white on the themed background, and big
   enough to hit on a tablet without crowding the day strip under it */
.sc-week{display:flex;gap:8px;justify-content:center;height:74px;flex:none;padding:4px 0}
.sc-chip{display:flex;flex-direction:column;align-items:center;justify-content:center;background:rgba(255,255,255,.75);border-radius:16px;min-width:104px;padding:2px 8px;position:relative;color:var(--ink);box-shadow:var(--shadow-card)}
.sc-chip small{font:800 12px var(--font-ui);text-transform:uppercase;color:var(--ink-muted)}.sc-chip b{font:800 22px/1 var(--font-head)}.sc-chip em{font:700 12px var(--font-ui);font-style:normal;color:var(--ink-blue)}
.sc-chip i{position:absolute;right:4px;top:2px;font-size:16px;font-style:normal}
.sc-chip.on{background:#fff;outline:4px solid var(--star)}.sc-chip.off{opacity:.55}
.sc-body{flex:1;min-height:0;overflow-y:auto;display:flex;flex-direction:column;gap:10px;padding:6px 2px;scrollbar-width:none;touch-action:pan-y}
.sc-body::-webkit-scrollbar{display:none}
.sc-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:12px;flex:none}
.sc-card{position:relative;display:flex;flex-direction:column;align-items:center;background:#fff;border:5px solid var(--cat-school);border-radius:24px;overflow:hidden;box-shadow:var(--shadow-routine);min-height:172px;padding-bottom:8px}
.sc-card:active{transform:translateY(2px)}
.sc-img{width:100%;height:112px;display:grid;place-items:center;background:#F7F9FF}.sc-img img{height:100%;width:100%;object-fit:contain}
.sc-emoji{font-style:normal;font-size:70px}
.sc-card b{font:800 22px/1.1 var(--font-head);color:var(--ink);margin-top:6px;text-align:center;padding:0 6px}
.sc-card em{font:700 15px var(--font-ui);font-style:normal;color:var(--ink-muted)}
.sc-n{position:absolute;left:8px;top:8px;width:34px;height:34px;border-radius:50%;background:var(--cat-school);color:var(--cat-ink-school);font:800 20px/34px var(--font-head);text-align:center;z-index:2}
.sc-ev{display:flex;align-items:center;gap:16px;background:#FFF3C9;border:5px solid var(--star);border-radius:22px;padding:8px 18px;flex:none;cursor:pointer}
.sc-ev.off{background:#DDE7FF;border-color:var(--cat-appointments)}
.sc-evimg{width:78px;height:62px;display:grid;place-items:center;flex:none}.sc-evimg img{height:100%;object-fit:contain}
.sc-ev small{display:block;font:800 13px var(--font-ui);text-transform:uppercase;letter-spacing:.06em;color:var(--ink-muted)}.sc-ev b{font:800 28px var(--font-head);color:var(--ink)}
.sc-bring{background:rgba(255,255,255,.88);border-radius:22px;padding:8px 18px 10px;flex:none;cursor:pointer}
.sc-bring h3{margin:0 0 4px;font:800 22px var(--font-head);color:var(--ink)}
.sc-bi{display:flex;gap:16px;flex-wrap:wrap}
.sc-b{display:flex;align-items:center;gap:10px;background:#fff;border-radius:16px;padding:4px 16px 4px 6px;box-shadow:var(--shadow-card)}
.sc-bimg{width:56px;height:46px;display:grid;place-items:center;font-size:36px}.sc-bimg img{height:100%;object-fit:contain}
.sc-b b{font:800 20px var(--font-head);color:var(--ink)}
.sc-msg{background:rgba(255,255,255,.88);border-radius:24px;padding:24px;font:800 26px/1.25 var(--font-head);color:var(--ink);text-align:center;flex:none}
.sc-msg.big{display:flex;flex-direction:column;align-items:center;gap:8px;padding:38px}.sc-msg.big span{font-size:90px;line-height:1}.sc-msg.big b{font-size:38px}

/* parent: setup screens */
.screen.cdsetup,.screen.schoolsetup{background:var(--parent-bg);display:flex;flex-direction:column}
.ss-body{flex:1;min-height:0;overflow-y:auto;display:grid;grid-template-columns:1fr 1fr;gap:16px;padding:16px;align-content:start}
.ss-body.one{grid-template-columns:1fr}
.ss-card{background:#fff;border-radius:18px;padding:14px 18px;box-shadow:var(--shadow-card);display:flex;flex-direction:column;gap:10px}
.ss-card.wide{grid-column:1/-1}.ss-card.center{align-items:center;text-align:center;padding:40px}
.ss-card h3{margin:6px 0 0;font:800 20px var(--font-head);color:var(--ink)}
.ss-card .row.bd{gap:10px}.ss-card .row.bd span:nth-child(2){flex:1}
.holgrid{display:grid;grid-template-columns:repeat(2,1fr);gap:4px 12px;max-height:340px;overflow-y:auto}
.holgrid .chk{display:flex;align-items:center;gap:8px;min-height:44px}.holgrid .hname{flex:1;font:700 15px var(--font-ui)}
.evlist{display:flex;flex-direction:column;gap:6px}
.evrow{display:flex;align-items:center;gap:10px;background:var(--parent-row);border-radius:12px;padding:6px 10px;flex-wrap:wrap}.evrow .evd{font:800 14px var(--font-ui);color:var(--ink-muted);min-width:96px}.evrow small{color:var(--ink-muted)}
.ss-tabs{margin:10px 16px 0;flex:none;align-self:flex-start}
.ss-days{display:flex;gap:6px;flex-wrap:wrap}.ss-days button{min-width:52px;min-height:44px;border-radius:12px;background:var(--parent-row);font:800 16px var(--font-ui);padding:0 12px}.ss-days button.on{background:var(--ink);color:#fff}
/* Saturday / Sunday before the parent switches them on: visible, so they can be found, but plainly not part of the week */
.ss-days button.offday{background:none;border:2px dashed var(--line,rgba(0,0,0,.18));color:var(--ink);opacity:.5;font-weight:700}
.ss-days button.offday:hover{opacity:.85}
.ss-dayoff{margin-left:10px;font:700 13px var(--font-ui);vertical-align:middle}
.ss-dv{margin-bottom:10px}

/* The week grid: the whole timetable at once, one column per day. Pick a subject from the tray, tap the days. */
.dg-hint{margin:0 0 8px;font:700 14px var(--font-ui);color:var(--ink);opacity:.65}
.dg-hint.on{opacity:1;color:var(--ink-blue)}
.dg-week{display:grid;grid-template-columns:repeat(var(--cols),minmax(0,1fr));gap:6px;align-items:start}
/* Seven columns have to survive French on a 1024-wide tablet, so every flex box here sets min-width:0 — without it
   a long day name or subject pushes its track wider than the grid and the whole week scrolls sideways. */
.dg-hd{grid-row:1;min-width:0;position:relative;display:flex;border-radius:12px 12px 0 0;background:var(--parent-row)}
.dg-hd.lit{outline:3px solid var(--ink-blue);outline-offset:-1px}
.dg-dup{position:absolute;top:2px;right:2px;width:22px;height:22px;border-radius:7px;background:rgba(0,0,0,.06);font-size:12px;line-height:1;color:var(--ink)}
.dg-dh{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px;padding:6px 22px 6px 4px;border-radius:12px 12px 0 0;background:none;text-align:center}
.dg-dh b{font:800 12px var(--font-ui);color:var(--ink);line-height:1.15;overflow-wrap:anywhere;hyphens:auto}
.dg-dh small{font:700 11px var(--font-ui);opacity:.6}
.dg-dh.off{opacity:.5}
.dg-col{grid-row:2;min-width:0;overflow:hidden;display:flex;flex-direction:column;gap:4px;min-height:96px;padding:4px;border-radius:0 0 12px 12px;background:rgba(0,0,0,.035)}
.dg-col.can{outline:2px dashed var(--ink-blue);outline-offset:-2px}
.dg-col.off{background:none;border:2px dashed var(--line,rgba(0,0,0,.18));border-radius:12px;padding:6px}
.dg-none{margin:0;padding:6px 2px;font:700 12px var(--font-ui);opacity:.4;text-align:center}
/**
 * The picture and the ✕ share the top row; the NAME takes the whole width underneath.
 *
 * It used to be one row — [picture][name] — and that is measured as the reason for this: the tile is about 71px wide at
 * seven columns, the picture takes 30 of them, so the name had **32px** and "Éducation physique" wrapped to five lines
 * inside it. Reserving the ✕'s corner out of those 32 left 8px, one character per line, and the tile grew from 69px
 * tall to 229px. Giving the name the full 67px instead makes it wrap to two or three lines, so the tile is no taller
 * than it was, the name is easier to read than it was, and there is a clear corner for the shared control to sit in
 * without covering a letter of it.
 */
.dg-tile{position:relative;min-width:0;display:flex;flex-wrap:wrap;align-items:center;gap:2px 5px;background:var(--parent-row);border-radius:10px;padding:3px 4px;min-height:38px}
.dg-tile.lit{outline:2px solid var(--ink-blue)}
/* a drawn card is 400x336 and a parent's photo 240x189, so the picture has to be told to fit its box rather than
   keep its own proportions and hang out of the column */
.dg-img{width:30px;height:26px;flex:none;display:grid;place-items:center;font-size:18px;overflow:hidden}
.dg-img img{width:100%;height:100%;object-fit:cover;border-radius:5px}
/* the name wraps rather than trailing off: "Mathématiques" in a seventh of a tablet has to be readable, not an ellipsis
   — and it gets the tile's whole width to do it in, on its own row under the picture (see .dg-tile above) */
.dg-t{flex:1 0 100%;min-width:0;display:flex;flex-direction:column;gap:0}
.dg-tile b{min-width:0;font:800 11px var(--font-ui);color:var(--ink);line-height:1.12;overflow-wrap:anywhere;hyphens:auto}
.dg-tile em{font:700 10px var(--font-ui);opacity:.6;font-style:normal}
/* kept inside the tile: overhanging the column edge pushed the last day past the grid. (The tile's own ✕ is the shared
   `.pm-x` now; this is still what the bring CHIPS use, which are chips rather than placed cards — the same small inline
   ✕ as the file chips and the skipped-date chips.) */
.dg-x{position:absolute;top:2px;right:2px;width:18px;height:18px;border-radius:9px;background:var(--danger);color:#fff;font:800 10px var(--font-ui);line-height:1;display:grid;place-items:center}
.dg-slot,.dg-addday{min-width:0;overflow:hidden;display:flex;align-items:center;justify-content:center;gap:4px;min-height:34px;border-radius:10px;border:2px dashed var(--line,rgba(0,0,0,.2));background:none;font:800 11px var(--font-ui);color:var(--ink);opacity:.5}
.dg-slot.live{opacity:1;border-style:solid;border-color:var(--ink-blue);color:var(--ink-blue)}
/* the picked-up subject's name rides in the slot: it must be able to shrink, or it sets the whole column's width */
.dg-slot span,.dg-addday span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dg-addday{flex-direction:column;min-height:88px;gap:2px}
.dg-chips{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin:10px 0 6px}
.dg-chips .pill[disabled]{opacity:.35}
.dg-tray{max-height:300px;overflow:auto}
/* things to bring, at the foot of a day column: a row of small chips, never wide enough to set the column's width */
.dg-bring{display:flex;flex-wrap:wrap;gap:3px;margin-top:4px;padding-top:4px;border-top:1px dashed var(--line,rgba(0,0,0,.18))}
.dg-b{position:relative;min-width:0;max-width:100%;display:flex;align-items:center;gap:3px;background:var(--parent-row);border-radius:9px;padding:2px 16px 2px 4px}
.dg-b img{height:16px;width:auto;object-fit:contain}.dg-b i{font-size:13px;font-style:normal}
.dg-b b{min-width:0;font:700 10px var(--font-ui);color:var(--ink);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dg-b.lit{outline:2px solid var(--ink-blue)}
.dg-b .dg-x{width:14px;height:14px;border-radius:7px;font-size:8px;top:50%;transform:translateY(-50%);right:1px}

/* ---- the School page's card picker (schoolpick.js): the card library's control, at the library's card size ---- */
.sp{display:flex;flex-direction:column;gap:6px;min-width:0}
.sp-rail{display:flex;flex-wrap:wrap;align-items:center;gap:5px}
.sp-rail .pill{font:800 12px var(--font-ui);padding:3px 11px}
.sp-rail .pill.on{background:var(--ink-blue);color:#fff}
.sp-n{margin-left:auto;font:800 12px var(--font-ui);opacity:.6}
.sp-search{margin:0}
.sp-body{min-width:0}
.sp-head{display:flex;align-items:center;gap:6px;margin:8px 0 4px;font:800 11px var(--font-ui);letter-spacing:.06em;text-transform:uppercase;color:var(--ink);opacity:.7}
.sp-head em{font-style:normal;opacity:.7}
/* the SAME card metrics as .pm-card in the library (84px picture + 21px label bar); only the column count differs,
   because the School page is the full width of the stage and the library is a 216px column */
.sp-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(104px,1fr));grid-auto-rows:118px;gap:8px;align-content:start;align-items:start}
.sp-card{min-width:0}
/* the one difference from the library: the label WRAPS to two lines instead of ending in an ellipsis. In the library a
   clipped name is recoverable — the card's picture is the thing and the tooltip has the rest — but "Éducation physique"
   is a timetable entry a parent is choosing between, and at 1024 wide in French it does not fit on one line. */
/* `.pm-card.sp-card` and not `.sp-card`: the library's own rules come LATER in this file, so at equal specificity they
   would win and the label would go back to one clipped line. */
.pm-card.sp-card .lbl{white-space:normal;height:auto;min-height:21px;font-size:11px;line-height:1.35;padding:0 3px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.pm-card.sp-card i{height:84px;font-size:40px;font-style:normal;display:grid;place-items:center;background:#fff}
.pm-card.sp-card .cam{left:auto;right:3px}
.pm-card.sp-card.sp-add{border-style:dashed;display:flex;flex-direction:column}
.pm-card.sp-card.sp-add i{flex:1;height:auto;font-size:26px;background:none}
.sp-none{font:700 13px var(--font-ui);opacity:.7;margin:8px 0}
.ss-pick{margin-top:4px}
.ss-evname{display:block;margin:8px 0}
.ss-evhint.on{font-weight:800;color:var(--ink-blue);opacity:1}
.ss-wk.can .ss-wd{outline:2px dashed var(--ink-blue);outline-offset:-3px}
.dg-col.over{outline:3px solid var(--ink-blue);outline-offset:-2px;background:rgba(0,0,0,.07)}
.dg-tile.lifting{opacity:.32}
.dg-ghost{position:fixed;z-index:90;transform:translate(-50%,-50%);pointer-events:none;display:flex;align-items:center;gap:6px;background:#fff;border-radius:12px;padding:5px 9px;box-shadow:0 6px 18px rgba(0,0,0,.28);font:800 13px var(--font-ui);color:var(--ink)}
.dg-ghost img{height:28px;border-radius:5px}.dg-ghost i{font-size:20px;font-style:normal}
.perlist{display:flex;flex-direction:column;gap:6px}
.perrow{display:flex;align-items:center;gap:8px;background:var(--parent-row);border-radius:12px;padding:4px 8px}.perrow .pn{width:28px;height:28px;border-radius:50%;background:var(--ink);color:#fff;display:grid;place-items:center;font:800 14px var(--font-ui)}
.pimg{width:44px;height:36px;display:grid;place-items:center;font-size:26px}.pimg img{height:100%;object-fit:contain}
.perrow input[type=time]{width:110px}
.subj{display:grid;grid-template-columns:repeat(8,1fr);gap:6px}.ss-gh{margin:10px 0 4px;font:800 12px var(--font-ui);letter-spacing:.06em;text-transform:uppercase;color:var(--ink-soft,var(--ink));opacity:.7}.ss-gh:first-child{margin-top:4px}.subjb{display:flex;flex-direction:column;align-items:center;background:var(--parent-row);border-radius:12px;padding:4px 2px;min-height:64px}.subjb span{height:34px;display:grid;place-items:center;font-size:24px}.subjb span img{height:100%}.subjb small{font:700 11px var(--font-ui);text-align:center;color:var(--ink)}
.fchip{display:inline-flex;align-items:center;gap:6px;background:var(--parent-row);border-radius:14px;padding:4px 6px 4px 10px;font:700 14px var(--font-ui)}
.fchip .x,.fchip .lnk{background:none;font:inherit;color:var(--ink-blue)}.fchip .x{color:var(--danger);width:28px;height:28px}
.bimg{width:44px;height:36px;display:grid;place-items:center;font-size:26px}.bimg img{height:100%}
/* something the parent named themselves: a subject, a kind of special day, a thing to bring */
.subjw{position:relative;display:block}.subjw .subjb{width:100%}
.subjed{position:absolute;top:-4px;right:-4px;width:24px;height:24px;border-radius:12px;background:var(--parent-row);font-size:12px;line-height:1}
.subjb.add{border:2px dashed var(--line,rgba(0,0,0,.18));background:none}
.row.bd.mine{align-items:flex-start}.row.bd.mine .grow{display:block}
.bx-subj{display:flex;flex-wrap:wrap;gap:4px;margin-top:4px}.bx-subj .pill{font:700 12px var(--font-ui);padding:2px 10px}
/* Special days, that week day by day: the same navigation as the board, then one button per day of the real week */
.ss-wknav{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:6px}
.ss-wknav .wkb-range{font:800 20px var(--font-head)}
.ss-wk{display:grid;grid-template-columns:repeat(auto-fit,minmax(0,1fr));gap:6px;margin:6px 0 10px}
.ss-wd{min-width:0;display:flex;flex-direction:column;align-items:center;gap:1px;padding:6px 2px;border-radius:12px;background:var(--parent-row);min-height:76px}
.ss-wd small{font:700 11px var(--font-ui);opacity:.7;text-transform:uppercase}
.ss-wd b{font:800 20px var(--font-head);color:var(--ink);line-height:1}
.ss-wd em{font:700 10px var(--font-ui);font-style:normal;opacity:.75;text-align:center;line-height:1.1;overflow-wrap:anywhere}
.ss-wd.off{opacity:.55}
.ss-wd.mark em{color:var(--ink-blue);opacity:1}
.ss-wd.on{outline:3px solid var(--ink-blue)}
.ss-wdi{display:flex;flex-wrap:wrap;justify-content:center;gap:1px;font-size:13px;line-height:1}
.ss-wdi i{font-style:normal}.ss-wdi i.pin{font-size:11px;opacity:.8}
.bdlist{display:flex;flex-direction:column;gap:6px;margin-bottom:8px}
.bdrow{display:flex;align-items:center;gap:8px;background:var(--parent-row);border-radius:12px;padding:4px 8px}
.bdrow b{font:800 14px var(--font-ui);color:var(--ink)}
.ce-dlg .ce-l{display:flex;align-items:center;gap:8px;margin:4px 0}.ce-dlg .ce-l span{width:28px;font:800 12px var(--font-ui);opacity:.7}.ce-dlg .ce-l input{flex:1}
.ce-icons{display:grid;grid-template-columns:repeat(12,1fr);gap:4px;margin:4px 0}
.ce-i{height:38px;border-radius:10px;background:var(--parent-row);font-size:22px}.ce-i.on{outline:3px solid var(--ink-blue)}
.ce-photo{display:flex;align-items:center;gap:10px}.ce-photo img{width:120px;height:95px;object-fit:cover;border-radius:12px}
.ce-ph{display:inline-block;margin-top:4px}
.evdlg .ev-prev{flex:none!important;width:150px;height:118px;border-radius:14px;background:var(--parent-row);display:grid;place-items:center;font-size:44px;overflow:hidden}.evdlg .ev-prev img{width:100%;height:100%;object-fit:cover}
.evdlg .ev-form{min-width:0}.rwchip.kc{display:flex;align-items:center;gap:6px;width:auto;padding:0 12px 0 4px;font:800 15px var(--font-ui);border-color:transparent}.rwchip.kc.on{border-color:var(--kc)}.rwchip.wide{width:auto;padding:0 14px;font:800 15px var(--font-ui)}
.tabsset{display:flex;flex-direction:column;gap:8px}

/* v23b: picture boxes (a percentage height inside a grid does not resolve, so use flex + max sizes) */
.sc-img,.sc-evimg,.sc-bimg,.pimg,.bimg,.subjb span,.cd-timg{display:flex!important;align-items:center;justify-content:center;overflow:hidden}
.sc-img img,.sc-evimg img,.sc-bimg img,.pimg img,.bimg img,.subjb span img,.cd-timg img{height:auto!important;width:auto!important;max-width:100%;max-height:100%;object-fit:contain}
.cd-timg img{width:100%!important;height:100%!important;object-fit:cover;object-position:50% 30%}
.sc-img{height:118px}
.sc-card{padding-bottom:10px}
.sc-card b{margin-top:4px}
.sc-bimg{width:64px;height:50px}

.sc-cards{grid-template-columns:repeat(auto-fit,minmax(176px,1fr))}

/* v23c: French / Spanish labels are longer: keep the footer on one line */
.ntab b{white-space:nowrap}
.week .bar{gap:10px}.week .bar .pill,.countdowns .bar .pill,.school .bar .pill{white-space:nowrap;padding:8px 16px;font-size:19px}
.ntab{padding:6px 14px 6px 10px;font-size:19px}.ntabs{gap:6px}
.rt-foot .pill{white-space:nowrap}

/* school badge on the weekly board */
.hb.sb,.mk-card .hb.sb{background:#6EC66C;color:#fff;border:2px solid #fff;width:24px;height:24px;min-width:0;padding:0;font-size:14px;line-height:20px;border-radius:50%;right:2px;left:auto;top:2px;z-index:3}
.bcard .hb.sb{right:6px;top:6px}

.cp-hint{position:absolute;left:0;right:0;bottom:0;padding:8px;background:rgba(0,0,0,.55);color:#fff;font:700 15px var(--font-ui)}
.cp-hint[hidden]{display:none}
.cp-pick{align-self:flex-start;font-size:17px;padding:12px 18px}


/* ================= First-launch setup (installer-style wizard) ================= */
.screen.setup{background:var(--parent-bg);display:flex;flex-direction:column;overflow:hidden}
.screen.setup[data-view=welcome],.screen.setup[data-view=finish]{background:transparent}
.su-top{flex:none;height:68px;display:flex;align-items:center;gap:14px;padding:0 22px;background:var(--lock);color:#fff}
.su-top .seg{background:rgba(255,255,255,.14)}.su-top .seg button{color:rgba(255,255,255,.85);min-height:44px;padding:6px 16px}.su-top .seg button.on{color:var(--ink)}
.su-link{font:800 16px var(--font-ui);color:#fff;text-decoration:underline;text-underline-offset:4px;padding:10px 6px;min-height:44px;background:none;border-radius:10px}
.su-link.plain{color:var(--ink-blue)}
.su-link.small{font-size:15px;min-height:36px;padding:2px 6px}
.su-stage{flex:1;min-height:0;display:flex;justify-content:center;align-items:stretch;padding:0 40px;overflow:hidden}
.su-slide{width:100%;max-width:1120px;min-height:0;display:flex;flex-direction:column}
.su-slide.su-anim.fwd{animation:suIn .36s var(--ease-fold) both}
.su-slide.su-anim.back{animation:suInBack .36s var(--ease-fold) both}
@keyframes suIn{from{opacity:0;transform:translateX(64px)}to{opacity:1;transform:none}}
@keyframes suInBack{from{opacity:0;transform:translateX(-64px)}to{opacity:1;transform:none}}
.su-body-in{flex:1;min-height:0;display:flex;flex-direction:column;gap:10px;padding:22px 0 8px;overflow:hidden}
.su-body-in h1{font:800 46px/1.05 var(--font-head);color:var(--ink);overflow-wrap:anywhere}
.su-inst{font:700 21px/1.3 var(--font-ui);color:var(--ink-blue);margin:0;overflow-wrap:anywhere}
.su-inst.big{font-size:28px;color:var(--ink)}
.su-input{flex:1;min-height:0;display:flex;flex-direction:column;gap:14px;padding-top:6px}
.su-hint{flex:none;min-height:26px;margin:0;font:800 17px var(--font-ui);color:#B3541E;text-align:center}
.su-for{display:inline-flex;align-items:center;gap:8px;align-self:flex-start;background:#fff;border-radius:30px;padding:4px 16px 4px 6px;font:800 16px var(--font-ui);color:var(--ink-blue);box-shadow:var(--shadow-card)}
.su-for b{color:var(--ink)}
/* the fixed navigation bar: Back | Step 3 of 7 + dots | Next */
.su-nav{flex:none;height:112px;display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:16px;padding:0 34px;background:#fff;border-top:3px solid rgba(16,49,147,.1);box-shadow:0 -6px 18px rgba(16,49,147,.08)}
.su-back{justify-self:start;min-height:64px;padding:8px 26px;border-radius:18px;background:var(--parent-row);border:2px solid rgba(16,49,147,.15);font:800 22px var(--font-head);color:var(--ink)}
.su-mid{display:flex;flex-direction:column;align-items:center;gap:4px;min-width:0;text-align:center}
.su-count{font:800 18px var(--font-ui);color:var(--ink)}
.su-dots{display:flex;gap:9px}
.su-dots i{width:14px;height:14px;border-radius:50%;background:rgba(16,49,147,.18)}
.su-dots i.done{background:var(--done)}.su-dots i.skipped{background:var(--star)}
.su-dots i.current{background:var(--ink);transform:scale(1.35)}
.su-next{justify-self:end;min-height:76px;min-width:250px;padding:8px 34px;border-radius:22px;background:var(--save);color:#fff;font:800 30px var(--font-head);box-shadow:var(--shadow-button)}
.su-next:active{transform:translateY(3px);box-shadow:none}
.su-next:disabled{opacity:.38;box-shadow:none}
/* welcome + finish */
.su-stage.welcome,.su-stage.finish{padding:0 40px}
.su-welcome{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;text-align:center}
.su-hero{min-height:270px;display:grid;place-items:center}
.su-hero .su-mascot{max-height:300px;filter:drop-shadow(0 10px 14px rgba(16,49,147,.25))}
.su-anim .su-hero .su-mascot{animation:suBob 2.6s ease-in-out infinite}
@keyframes suBob{0%,100%{transform:translateY(0)}50%{transform:translateY(-12px)}}
.su-welcome h1{font:800 84px/1 var(--font-head);color:#fff;text-shadow:0 5px 0 rgba(16,49,147,.28)}
.su-line{font:800 28px/1.3 var(--font-head);color:#fff;text-shadow:0 3px 0 rgba(16,49,147,.25);max-width:760px;margin:0}
.su-start{min-height:96px;min-width:420px;max-width:100%;padding:12px 44px;border-radius:28px;background:var(--save);color:#fff;font:800 38px/1.1 var(--font-head);box-shadow:var(--shadow-button);margin-top:14px}
.su-start:active{transform:translateY(4px);box-shadow:none}
.su-welcome .su-link.plain{color:#fff;font-size:19px;margin-top:6px;text-shadow:0 2px 0 rgba(16,49,147,.3)}
.su-body-in.fin{align-items:center;text-align:center;gap:8px;overflow:auto}
.su-finart{min-height:110px;display:grid;place-items:center}
.su-finart .su-mascot{max-height:120px;width:auto!important;height:120px!important}
.su-body-in.fin h1{color:#fff;font-size:52px;text-shadow:0 4px 0 rgba(16,49,147,.28)}
.su-body-in.fin .su-inst.big{color:#fff;text-shadow:0 3px 0 rgba(16,49,147,.25)}
.su-sum{list-style:none;padding:12px 24px;margin:6px 0;background:rgba(255,255,255,.92);border-radius:22px;display:flex;flex-direction:column;gap:5px;text-align:left;font:700 17px/1.3 var(--font-ui);color:var(--ink);max-width:760px;overflow-wrap:anywhere}
.su-note{font:700 16px var(--font-ui);color:#fff;text-shadow:0 2px 0 rgba(16,49,147,.3);margin:0}
.su-body-in.fin .su-start{margin-top:6px;min-height:84px;font-size:34px}
/* 1 parent code */
.su-pin{align-self:center;display:flex;flex-direction:column;align-items:center;gap:8px}
.su-pin .pin-boxes i{width:60px;height:60px}
.su-pinmsg{font:800 22px var(--font-head);color:var(--ink);min-height:30px;margin:0}.su-pinmsg.bad{color:var(--danger)}
.su-pinrule{max-width:460px;margin:0 auto 14px;text-align:center}
.su-pin .pin-boxes.err{animation:shake .4s ease-in-out}
.su-pin .keypad{grid-template-columns:repeat(3,92px);gap:9px}.su-pin .keypad button{height:66px;font-size:30px}
.su-pinok{align-self:center;display:flex;flex-direction:column;align-items:center;gap:14px;padding-top:30px;font:800 28px var(--font-head);color:var(--ink)}
.su-bigcheck{width:120px;height:120px;border-radius:50%;background:var(--done);color:#fff;display:grid;place-items:center;font:800 76px var(--font-ui)}
/* 2 language */
.su-langs{display:grid;grid-template-columns:1fr 1fr;gap:22px 34px;padding-top:6px}
.su-langs h3{font:800 20px var(--font-head);color:var(--ink-blue);margin-bottom:8px}
.su-bigseg{display:flex;flex-direction:column;gap:10px}
.su-bigseg button{display:flex;align-items:center;gap:16px;min-height:76px;padding:8px 20px;border-radius:20px;background:#fff;border:4px solid transparent;box-shadow:var(--shadow-card);font:800 24px var(--font-head);color:var(--ink);text-align:left;overflow-wrap:anywhere}
.su-bigseg button i{flex:none;display:grid;place-items:center;width:52px;height:52px;border-radius:50%;background:var(--parent-row);font:800 19px var(--font-ui);font-style:normal;color:var(--ink-blue)}
.su-bigseg button.on{border-color:var(--ink);background:#fff}.su-bigseg button.on i{background:var(--ink);color:#fff}
/* 3 child */
.su-two{display:flex;gap:40px;align-items:flex-start}
.su-prev{flex:none;width:200px;display:flex;flex-direction:column;align-items:center;gap:10px;text-align:center;font:800 28px var(--font-head);overflow-wrap:anywhere}
.su-form{flex:1;min-width:0;display:flex;flex-direction:column;gap:10px}
.su-form #su-name{min-height:68px;font-size:30px!important;border-radius:16px;border:3px solid rgba(16,49,147,.22);padding:8px 18px;background:#fff;width:100%}
.su-lbl{font:800 16px var(--font-ui);color:var(--ink-blue);margin-top:6px}
.screen.setup .rwchips{gap:10px;padding-top:0}
.screen.setup .rwchip{width:60px;height:60px}
.screen.setup .rwchip.sw{border-radius:50%}
.su-bd{display:flex;flex-direction:column;gap:3px;font:800 16px var(--font-ui);color:var(--ink-blue)}
.su-bd input{min-height:56px;font-size:20px!important;width:280px;border-radius:14px;border:3px solid rgba(16,49,147,.2);padding:6px 14px;background:#fff}
.su-bd small{font:700 14px var(--font-ui);color:var(--ink-muted)}
/* 4 theme */
.su-themes{display:grid;grid-template-columns:repeat(3,1fr);gap:18px;align-items:stretch}
.su-theme{position:relative;display:flex;flex-direction:column;align-items:center;gap:8px;padding:14px 12px 12px;border-radius:22px;background:#fff;border:5px solid transparent;box-shadow:var(--shadow-card);font:800 24px var(--font-head);color:var(--ink);min-width:0}
.su-theme.on{border-color:var(--ink)}.su-theme.lock{opacity:.5}
.su-theme small{font:800 14px var(--font-ui);color:var(--ink-muted)}
.su-theme .tp-cards{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;width:100%}
.su-theme .tp-card{width:auto;height:auto;aspect-ratio:1/1.05;min-width:0}
.su-theme .tp-card .lbl{font-size:11px}
.su-radio{position:absolute;right:14px;top:14px;width:30px;height:30px;border-radius:50%;border:4px solid var(--ink-faint);background:#fff}
.su-theme.on .su-radio,.su-pick.on .su-radio{border-color:var(--ink);background:radial-gradient(circle,var(--ink) 0 42%,#fff 47%)}
.su-radio.chk{border-radius:9px}.su-pick.on .su-radio.chk{background:var(--ink) center/70% no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12l5 5 9-10' fill='none' stroke='white' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")}
/* 5 routine, 6 week */
.su-picks{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}
.su-pick{position:relative;display:flex;flex-direction:column;align-items:flex-start;gap:8px;padding:16px 18px;border-radius:22px;background:#fff;border:5px solid transparent;box-shadow:var(--shadow-card);font:800 24px/1.1 var(--font-head);color:var(--ink);text-align:left;min-width:0;overflow-wrap:anywhere}
.su-pick b{padding-right:38px}.su-pick small{font:700 15px/1.3 var(--font-ui);color:var(--ink-muted)}
.su-pick.on{border-color:var(--ink)}
.su-thumbs{display:flex;flex-wrap:wrap;gap:6px}
.su-thumbs img{width:54px;height:54px;object-fit:cover;border-radius:11px;box-shadow:var(--shadow-card)}
.su-row-note{display:flex;align-items:center;justify-content:space-between;gap:16px;font:700 16px var(--font-ui);color:var(--ink-muted)}
.su-edit{min-height:56px;padding:8px 22px;font-size:18px;color:var(--ink)}
.su-weekbox{display:flex;flex-direction:column;gap:10px;background:#fff;border-radius:22px;padding:16px 20px;box-shadow:var(--shadow-card);font:800 24px var(--font-head);color:var(--ink)}
.su-mini{display:grid;grid-template-columns:repeat(7,1fr);gap:8px}
.su-mini>div{min-height:130px;border-radius:14px;background:var(--parent-row);border:2px solid rgba(16,49,147,.1);display:flex;flex-direction:column;align-items:center;gap:5px;padding:6px 4px}
.su-mini em{font:800 15px var(--font-ui);font-style:normal;color:var(--ink-muted);text-transform:capitalize}
.su-mini img{width:100%;max-width:62px;aspect-ratio:1;object-fit:cover;border-radius:10px}
/* 7 extras */

.su-ico{font-size:52px;line-height:1;flex:none}
.switch.big{width:96px;height:54px;border-radius:27px;flex:none}.switch.big i{top:6px;left:6px;width:42px;height:42px}.switch.big.on i{transform:translateX(42px)}
.su-unlock{min-height:60px;padding:8px 24px;font-size:20px;flex:none}
/* add another child */
.su-yesno{flex:1;display:grid;grid-template-columns:1fr 1fr;gap:26px;align-items:center;padding-bottom:20px}
.su-big{min-height:200px;border-radius:30px;background:#fff;border:5px solid rgba(16,49,147,.14);box-shadow:var(--shadow-button);font:800 34px/1.15 var(--font-head);color:var(--ink);padding:18px;overflow-wrap:anywhere}
.su-big.primary{background:var(--save);color:#fff;border-color:transparent}
.su-big:active{transform:translateY(4px);box-shadow:none}
/* parent-mode banner */
.su-banner{flex:none;display:flex;align-items:center;gap:16px;justify-content:space-between;padding:10px 20px;background:var(--star);color:var(--ink)}
.su-banner>div{display:flex;flex-direction:column;min-width:0;font:700 15px/1.25 var(--font-ui);overflow-wrap:anywhere}
.su-banner b{font:800 20px var(--font-head)}
.su-banner .save-btn{min-height:50px;padding:6px 20px;font-size:18px;flex:none}
/* Put the reminder away; "Finish setup" then lives in Settings 6 */
.su-bx{flex:none;width:44px;height:44px;padding:0;border:none;border-radius:50%;background:rgba(16,49,147,.12);color:var(--ink);font:800 20px/1 var(--font-ui);cursor:pointer}
.su-bx:hover{background:rgba(16,49,147,.2)}
.su-bx:active{transform:scale(.92)}
@media (prefers-reduced-motion:reduce){.su-slide.su-anim,.su-anim .su-hero .su-mascot{animation:none}}

/* ================= Guide: Group A "Read first" (heavy, coloured) vs Group B "Good to know" (light, neutral) ================= */
.dialog.guide{position:relative;width:820px;gap:10px}
.g-x{position:absolute;right:16px;top:14px;width:44px;height:44px;border-radius:50%;background:var(--parent-row);font:800 18px var(--font-ui);color:var(--ink-muted)}
.g-intro{font:700 18px/1.3 var(--font-ui);color:var(--ink-blue);margin-top:-6px;padding-right:50px;overflow-wrap:anywhere}
.g-tabs{display:flex;gap:8px;flex-wrap:wrap}
.g-tab{display:flex;align-items:center;gap:8px;min-height:48px;padding:6px 14px;border-radius:14px;font:800 15px/1.15 var(--font-ui);text-align:left;overflow-wrap:anywhere;flex:1 1 0;min-width:0}
.g-tab.a{background:rgba(255,166,46,.16);color:var(--ink);border:2px solid transparent}
.g-tab.a b{flex:none;display:grid;place-items:center;width:28px;height:28px;border-radius:50%;background:var(--star);color:var(--ink);font:800 15px var(--font-ui)}
.g-tab.a.on{border-color:var(--star);background:rgba(255,166,46,.3)}
.g-tab.b{background:var(--parent-row);color:var(--ink-muted);font-weight:700;flex:0 1 auto;border:2px solid transparent}
.g-tab.b.on{background:#fff;border-color:var(--ink-faint);color:var(--ink)}
.g-tab.lock{opacity:.5;cursor:not-allowed}
.g-card.a{background:rgba(255,166,46,.12);border-left:10px solid var(--star);border-radius:18px;padding:16px 22px 10px}
.g-card.a h3{font:800 28px/1.15 var(--font-head);color:var(--ink);margin:6px 0 8px;overflow-wrap:anywhere}
.g-card.a li{font:700 18px/1.4 var(--font-ui);padding-left:20px}
.g-card.a li::before{color:var(--star);font-size:20px}
.g-card.a ul{gap:10px}
.g-head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.g-badge{background:var(--star);color:var(--ink);border-radius:10px;padding:4px 12px;font:800 14px var(--font-ui);letter-spacing:.06em;text-transform:uppercase}
.g-prog{display:flex;align-items:center;gap:6px;font:800 15px var(--font-ui);color:var(--ink)}
.g-prog i{width:34px;height:10px;border-radius:5px;background:rgba(16,49,147,.18)}
.g-prog i.on{background:var(--star)}.g-prog i.done{background:var(--done)}
.g-prog em{font-style:normal;margin-left:6px}
.g-card.b{background:transparent;padding:2px 0}
.g-bh{font:800 20px var(--font-head);color:var(--ink-muted)}
.g-bnote{font:600 14px/1.3 var(--font-ui);color:var(--ink-muted);margin:0 0 6px}
.g-card.b details{background:var(--parent-row);border-radius:12px;padding:0 12px;margin-bottom:6px}
.g-card.b summary{font:700 15px var(--font-ui);color:var(--ink-muted);min-height:44px;overflow-wrap:anywhere}
.g-card.b li{font:600 14px/1.4 var(--font-ui);color:var(--ink-muted)}
.g-card.b li b{color:var(--ink)}
.g-primary{min-height:60px;font-size:22px;padding:8px 26px;max-width:100%;text-align:center;line-height:1.1}
.guide .dlg-btns{justify-content:space-between;align-items:center;gap:12px}

/* ================= Guided (focused) configuration inside Parent mode + routine suggestions ================= */
.g-note{flex:none;background:#FFF3D6;color:var(--ink);font:800 16px var(--font-ui);padding:7px 20px;text-align:center;border-bottom:2px solid rgba(255,166,46,.45)}
.guided .g-bar{background:var(--ink)}
.guided .wk-seg,.guided #left .sm.wide,.guided #left .new-card{pointer-events:none;opacity:.32;filter:grayscale(.6)}
.guided.g-needpick main{pointer-events:none;opacity:.35;filter:grayscale(.6)}
.guided .dstrip .dt:disabled{opacity:.3;pointer-events:none;filter:grayscale(.6)}
.guided .dstrip .dt:not(:disabled):not(.on){outline:3px dashed var(--star);outline-offset:1px}
.g-bubble-wrap{position:absolute;left:14px;bottom:14px;z-index:40;pointer-events:none;max-width:420px}
.g-bubble{display:flex;align-items:flex-end;gap:6px}
.g-bubble img{width:104px;height:104px;object-fit:contain;flex:none;filter:drop-shadow(0 4px 6px rgba(16,49,147,.25))}
.g-bubble .bubble{position:relative;background:#fff;border:3px solid var(--ink);border-radius:22px;padding:12px 16px;font:800 20px/1.25 var(--font-head);color:var(--ink);box-shadow:var(--shadow-lift);overflow-wrap:anywhere;animation:gpop .32s var(--ease-fold) both}
/* A speech bubble: the tail points at Coco (who stands to the right of it), not a trail of thought dots. */
.g-bubble .bubble::before{content:'';position:absolute;right:-15px;bottom:26px;border:9px solid transparent;border-left-color:var(--ink);border-right:0}
.g-bubble .bubble::after{content:'';position:absolute;right:-8px;bottom:29px;border:6px solid transparent;border-left-color:#fff;border-right:0}
.g-bubble.tip .bubble::before,.g-bubble.tip .bubble::after{display:none}
.g-bubble.tip .bubble{background:var(--ink);color:#fff;border-color:var(--ink);border-radius:14px}
.noanim .g-bubble .bubble{animation:none}
@keyframes gpop{from{opacity:0;transform:translateY(10px) scale(.94)}to{opacity:1;transform:none}}
.sugg{background:#FFF7E0;border:2px solid rgba(255,166,46,.5);border-radius:14px;padding:8px 10px;display:flex;flex-direction:column;gap:6px}
.sg-t{font:800 14px var(--font-ui);color:var(--ink)}
.sg-chips{display:flex;flex-wrap:wrap;gap:6px}
.qchip.sg{display:flex;align-items:center;gap:6px;min-height:46px;padding:3px 10px 3px 4px;background:#fff}
.qchip.sg img{width:38px;height:38px;object-fit:cover;border-radius:9px}
.qchip.sg span{font:800 13px var(--font-ui);color:var(--ink);text-align:left}
.qchip.sg b{font:800 16px var(--font-ui);color:var(--save)}
.qchip.sg.done{opacity:.55}
.rtshow{display:flex;flex-direction:column;gap:6px}

/* ---- setup wizard, second round: routine picker, gates, add-on walkthroughs, photo */
.su-picks.four{grid-template-columns:repeat(4,1fr)}
.su-picks.two{grid-template-columns:1fr 1fr}
.su-pico{font-size:44px;line-height:1}
.su-later{margin:0;font:700 16px var(--font-ui);color:var(--ink-muted);text-align:center}.su-later.hide{visibility:hidden}
.su-anytime{margin:0;font:800 16px var(--font-ui);color:var(--ink-blue);text-align:center;background:rgba(255,255,255,.7);border-radius:12px;padding:8px 14px;align-self:center}
.su-body-in.gate{justify-content:center;align-items:center;text-align:center;gap:14px}
.su-body-in.gate h1{max-width:900px}
.su-body-in.gate .su-yesno{width:100%;max-width:960px;flex:none;padding-bottom:6px}
.su-body-in.gate .su-big{min-height:150px}
.su-cyc{display:flex;gap:30px;align-items:flex-end;flex-wrap:wrap;padding-top:6px}
.su-cyc label{display:flex;flex-direction:column;gap:6px;font:800 16px var(--font-ui);color:var(--ink-blue)}
.su-cyc input{min-height:56px;font-size:20px!important;border-radius:14px;border:3px solid rgba(16,49,147,.2);padding:6px 14px;background:#fff}
.su-step-n{display:flex;align-items:center;gap:14px}
.su-step-n b{min-width:44px;text-align:center;font:800 34px var(--font-head);color:var(--ink)}
.su-step-n .sm{min-width:64px;min-height:60px;font-size:28px}
.su-tag{font:800 12px var(--font-ui);font-style:normal;background:var(--star);color:var(--ink);border-radius:8px;padding:2px 8px;vertical-align:middle;margin:0 4px}
.ph-add{min-height:56px;padding:8px 18px;font-size:16px;margin-top:4px}
.su-prev .su-link.small{font-size:15px}
.photodlg{width:560px}
.ph-pick{display:flex;gap:14px}
.ph-btn.big{flex:1;min-height:96px;font-size:18px}
.ph-crop{display:flex;flex-direction:column;align-items:center;gap:10px}
.ph-cv{width:280px;height:280px;border-radius:50%;border:5px solid var(--ink);touch-action:none;cursor:grab;background:var(--parent-row)}
.ph-zoom{display:flex;align-items:center;gap:12px;font:800 15px var(--font-ui);width:100%}.ph-zoom input{flex:1;min-height:44px}
/* focused mode in the add-on walkthroughs (countdown settings) */
.guided .ss-card.g-off{pointer-events:none;opacity:.32;filter:grayscale(.6)}
.guided .ss-card.g-on{outline:4px solid var(--star);outline-offset:3px}

/* ================= School schedule scan ================= */
.screen.schoolscan{background:var(--parent-bg);display:flex;flex-direction:column}
.sc-body{overflow:auto;padding:18px 26px}
.sc-cap{max-width:920px;margin:0 auto;display:flex;flex-direction:column;gap:14px;align-items:stretch}
.sc-cap.center{align-items:center;text-align:center;padding-top:30px}
.sc-help{font:700 20px/1.35 var(--font-ui);color:var(--ink-blue);margin:0}
.sc-btns{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}
.sc-big{display:flex;align-items:center;justify-content:center;text-align:center;min-height:130px;padding:14px;border-radius:24px;background:#fff;border:4px solid rgba(16,49,147,.14);box-shadow:var(--shadow-button);font:800 24px/1.15 var(--font-head);color:var(--ink);cursor:pointer;overflow-wrap:anywhere}
.sc-big:active{transform:translateY(3px);box-shadow:none}
.sc-priv{background:#fff;border-radius:12px;padding:10px 14px}
.sc-resume{display:flex;align-items:center;justify-content:space-between;gap:12px;background:#FFF3D6;border:2px solid var(--star);border-radius:16px;padding:12px 16px;font:800 17px var(--font-ui);color:var(--ink)}
.sc-resume span{display:flex;gap:10px}
.sc-row{display:flex;gap:12px;flex-wrap:wrap;justify-content:center;align-items:center}
.sc-prev{background:#fff;border-radius:16px;padding:8px;text-align:center}.sc-prev canvas{max-width:100%;max-height:52vh;object-fit:contain}
.warn-note.big{font:800 20px var(--font-ui);padding:12px 16px}
.sc-pages{display:flex;gap:12px;flex-wrap:wrap}
.sc-pg{background:#fff;border-radius:14px;padding:8px;border:3px solid transparent;display:flex;flex-direction:column;gap:6px;align-items:center;font:800 15px var(--font-ui)}
.sc-pg canvas{width:150px;height:auto}
.sc-spin{width:74px;height:74px;border-radius:50%;border:8px solid rgba(16,49,147,.15);border-top-color:var(--ink);animation:scspin 1s linear infinite}
@keyframes scspin{to{transform:rotate(360deg)}}
.sc-rev{display:grid;grid-template-columns:300px 1fr;gap:18px;align-items:start}
.sc-side{display:flex;flex-direction:column;gap:10px;position:sticky;top:0}
.sc-thumb{background:#fff;border-radius:14px;padding:6px;display:flex;flex-direction:column;gap:4px;align-items:center;font:700 13px var(--font-ui);color:var(--ink-muted)}
.sc-thumb img{width:100%;max-height:220px;object-fit:contain;border-radius:8px}
.sc-warn{background:#FFF3D6;border-left:6px solid var(--star);border-radius:10px;padding:8px 12px;font:700 14px/1.3 var(--font-ui);color:var(--ink)}.sc-warn ul{margin:4px 0 0 16px;padding:0}
.sc-main h2{font:800 28px var(--font-head);color:var(--ink);margin:0}
.ss-days button.chk{border-color:var(--star)}
.sc-day{display:flex;flex-direction:column;gap:10px;margin-top:8px}
.sc-dl{max-width:220px;font-weight:800}
.sc-per{display:grid;grid-template-columns:30px 118px 118px 1fr auto auto;gap:8px;align-items:start;background:#fff;border-radius:14px;padding:8px 10px;border:3px solid transparent}
.sc-per.check{border-color:var(--star);background:#FFFBF0}
.sc-per input[type=time]{min-height:46px;width:100%}
.sc-subj{display:flex;flex-direction:column;gap:4px;min-width:0}.sc-subj select{min-height:46px}.sc-subj small{font:700 12px var(--font-ui);color:var(--ink-muted)}
.sc-new{display:flex;flex-direction:column;gap:6px}.sc-new .rwchip{width:40px;height:40px}
.sc-flag{font:800 12px var(--font-ui);color:#B3541E;align-self:center;max-width:120px}
.sc-zoom{max-height:70vh;overflow:auto}.sc-zoom img{width:100%}

/* ================= Weekly board editor (calendar-style; Parent mode and the setup wizard) ================= */
.p-body.wkbody{display:block;padding:0;position:relative;overflow:hidden;min-height:0}
.wkx{position:relative;height:100%;display:flex;flex-direction:column;background:var(--parent-bg)}
.wkx-top{flex:none;display:flex;align-items:center;gap:14px;padding:8px 14px;min-height:68px}
.wkx-top .seg{flex:none}
.wkx-selslot{flex:1;min-width:0}
.wkx-sel{display:flex;align-items:center;gap:10px;background:#fff;border:3px solid var(--ink);border-radius:16px;padding:4px 8px 4px 6px;box-shadow:var(--shadow-card);min-width:0;flex-wrap:wrap}
.wkx-sel>img{width:46px;height:46px;object-fit:cover;border-radius:10px;flex:none}
.wkx-sel b{font:800 17px var(--font-head);color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:190px}
.wkx-sel em{font:700 13px var(--font-ui);font-style:normal;color:var(--ink-muted)}
.wkx-chips{display:flex;gap:6px;margin-left:auto;flex-wrap:wrap}
.wkx-chip{min-height:46px;padding:4px 16px;border-radius:14px;background:var(--parent-row);border:2px solid rgba(16,49,147,.18);font:800 16px var(--font-ui);color:var(--ink)}
.wkx-chip.on{background:var(--ink);color:#fff;border-color:var(--ink)}
.wkx-chip.clr{color:#B3541E}.wkx-chip:disabled{opacity:.4}
.wkx-week{flex:1;min-height:0;display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:8px;padding:0 14px 8px}
.wkx-col{background:#fff;border-radius:16px;border:3px solid transparent;display:flex;flex-direction:column;min-height:0;cursor:pointer;position:relative;overflow:hidden}
.wkx-col>header{flex:none;background:var(--c);color:#fff;padding:6px 8px;display:flex;justify-content:space-between;align-items:center;font:800 16px var(--font-ui)}
.wkx-col>header em{font-style:normal;font:800 13px var(--font-ui);background:rgba(255,255,255,.28);border-radius:9px;padding:0 7px;min-width:22px;text-align:center}
.wkx-col>header em:empty{display:none}
.wkx-col.can{border-color:rgba(24,120,178,.5);border-style:dashed}
.wkx-col.has{background:#F2FAF2}
.wkx-col.over{border-color:var(--star);background:#FFF7E0}
.wkx-list{flex:1;min-height:0;overflow-y:auto;padding:6px;display:flex;flex-direction:column;gap:6px}
.wkx-add{flex:none;text-align:center;color:var(--ink-faint);font:800 22px/28px var(--font-ui)}
.wkx-tile{display:flex;align-items:center;gap:6px;background:var(--parent-row);border-left:6px solid var(--c,var(--ink-blue));border-radius:10px;padding:3px 6px 3px 4px;min-height:48px;text-align:left;touch-action:pan-y;flex:none;width:100%}
.wkx-tile img{width:36px;height:36px;object-fit:cover;border-radius:8px;flex:none;pointer-events:none}
.wkx-tile span{font:800 12px/1.15 var(--font-ui);color:var(--ink);overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;pointer-events:none}
.wkx-tile.open{outline:3px solid var(--ink)}
.wkx-tile.lifting{opacity:.35}
.wkx-tile.pop{animation:wkpop .38s var(--ease-fold)}
@keyframes wkpop{0%{transform:scale(.4);opacity:0}70%{transform:scale(1.08)}100%{transform:none;opacity:1}}
.wkx.noanim .wkx-tile.pop,.noanim .wkx-drawer{animation:none;transition:none}
.wkx-drawer{flex:none;height:var(--wkx-drawer,330px);background:#fff;border-radius:22px 22px 0 0;box-shadow:0 -8px 20px rgba(16,49,147,.16);display:flex;flex-direction:column;min-height:0;transition:height .25s ease}
.wkx-handle{flex:none;display:flex;align-items:center;justify-content:center;gap:12px;min-height:58px;width:100%;font:800 17px var(--font-ui);color:var(--ink);position:relative}
.wkx-handle i{position:absolute;top:8px;left:50%;width:54px;height:6px;border-radius:3px;background:var(--ink-faint);transform:translateX(-50%)}
.wkx-handle b{font:800 15px var(--font-ui);color:var(--ink-blue);background:var(--parent-row);border-radius:10px;padding:2px 10px}
.wkx:not(.open) .wkx-tools,.wkx:not(.open) .wkx-grid{display:none}
.wkx-tools{flex:none;display:flex;gap:10px;padding:0 14px 8px;align-items:center}
.wkx-cats{flex:1;min-width:0;display:flex;gap:6px;overflow-x:auto;white-space:nowrap;padding-bottom:2px}
.wkx-cats button{flex:none;min-height:44px;padding:0 14px;border-radius:14px;background:var(--parent-row);font:800 14px var(--font-ui);color:var(--ink);border:2px solid transparent}
.wkx-cats button.on{background:#fff;border-color:var(--ink)}
.wkx-srch{display:flex;gap:6px;flex:none}
.wkx-srch input{border:2px solid rgba(16,49,147,.15);border-radius:12px;padding:0 12px;min-height:44px;width:210px;font:700 15px var(--font-ui)}
.wkx-srch .az{min-height:44px;min-width:52px;border-radius:12px;background:var(--parent-row);font:800 14px var(--font-ui)}.wkx-srch .az.on{background:var(--ink);color:#fff}
.wkx-grid{flex:1;min-height:0;overflow-y:auto;padding:0 14px 12px;display:grid;grid-template-columns:repeat(auto-fill,minmax(104px,1fr));grid-auto-rows:108px;gap:10px;align-content:start}
.wk-lib{position:relative;background:#fff;border:3px solid var(--c);border-radius:13px;overflow:hidden;display:flex;flex-direction:column;touch-action:pan-y;cursor:pointer}
.wk-lib img{display:block;width:100%;height:84px;object-fit:cover;flex:none;pointer-events:none;object-position:50% 18%}
.wk-lib .lbl{background:var(--c);color:var(--ci);font:700 12px/21px var(--font-ui);text-align:center;height:21px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:0 2px;pointer-events:none}
.wk-lib .cam{position:absolute;top:3px;left:3px;width:30px;height:30px;border-radius:50%;background:rgba(255,255,255,.92);font-size:15px;line-height:30px;padding:0;z-index:2;box-shadow:var(--shadow-card);opacity:.85}
.wk-lib.sel{border-color:var(--ink);box-shadow:0 0 0 4px var(--star),var(--shadow-lift);transform:translateY(-3px)}
.wk-lib .cnt{position:absolute;top:4px;right:4px;min-width:26px;height:26px;padding:0 6px;border-radius:13px;background:var(--ink);color:#fff;font:800 14px/26px var(--font-ui);text-align:center;z-index:2;box-shadow:var(--shadow-card)}
.wkx-pop{position:absolute;z-index:70;width:260px;background:#fff;border-radius:18px;box-shadow:var(--shadow-fold);border:3px solid var(--ink);padding:8px 10px 10px;display:flex;flex-direction:column;gap:6px}
.wkx-pop header{display:flex;align-items:center;gap:8px}.wkx-pop header img{width:38px;height:38px;object-fit:cover;border-radius:8px}
.wkx-pop header b{flex:1;min-width:0;font:800 16px var(--font-head);color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.wkx-pop header button{width:44px;height:44px;border-radius:50%;background:var(--parent-row);font:800 16px var(--font-ui)}
.wkx-pop>button{min-height:48px;border-radius:12px;background:var(--parent-row);font:800 15px var(--font-ui);color:var(--ink);text-align:left;padding:0 12px}
.wkx-pop>button.warn{color:#B3541E}
.wkx-pop p{margin:2px 0;font:800 14px var(--font-ui);color:var(--ink-blue)}
.wkx-dchips{display:grid;grid-template-columns:repeat(4,1fr);gap:6px}
.wkx-dchips button{min-height:46px;border-radius:12px;background:var(--parent-row);font:800 14px var(--font-ui);color:var(--ink);border:2px solid transparent}
.wkx-dchips button.on{background:var(--ink);color:#fff}
.wkx-tsel{display:flex;flex-direction:column;gap:3px;font:800 13px var(--font-ui);color:var(--ink)}
.wkx-tsel select{border:2px solid rgba(16,49,147,.15);border-radius:10px;padding:0 8px;min-height:44px;font:700 15px var(--font-ui)}
.wkx-tapply{font:700 13px var(--font-ui);color:var(--ink)}.wkx-dchips button:disabled{opacity:.35}
.wkx-go{min-height:50px;border-radius:14px;background:var(--save);color:#fff;font:800 18px var(--font-head)}.wkx-go:disabled{opacity:.4}
.wkx-ghost{position:fixed;z-index:200;pointer-events:none;transform:translate(-50%,-60%);display:flex;flex-direction:column;align-items:center;width:84px;background:#fff;border:3px solid var(--ink);border-radius:12px;overflow:hidden;box-shadow:var(--shadow-lift);opacity:.92}
.wkx-ghost img{width:100%;height:64px;object-fit:cover}.wkx-ghost span{font:800 11px var(--font-ui);padding:2px;text-align:center;line-height:1.1}
.guided .wkx .seg{pointer-events:none;opacity:.32;filter:grayscale(.6)}
.guided .g-bubble-wrap{left:14px;bottom:auto;top:auto}

.wkx{position:absolute;inset:0;height:auto}
.guided .wkbody~.g-bubble-wrap{bottom:calc(var(--wkx-drawer,330px) + 14px)}

/* ================= Clock mode: a time on a card, a "now" line, a small analog clock on a routine ================= */
.card-time{flex:none;font:800 12px var(--font-ui);color:var(--ink-blue);background:var(--parent-row,#EEF1FB);border-radius:8px;padding:1px 6px;margin:0 6px 5px;align-self:flex-start}
.mk-card .card-time{margin:0 4px 3px;font-size:10px}
.now-line{position:relative;display:flex;align-items:center;gap:8px;margin:2px 2px;flex:none}
.now-line::before,.now-line::after{content:'';flex:1;height:2px;background:var(--drop-active,#FD3B27)}
.now-line span{flex:none;font:800 11px var(--font-ui);color:#fff;background:var(--drop-active,#FD3B27);border-radius:9px;padding:2px 8px;white-space:nowrap}
.clockface{color:var(--ink-blue);flex:none}
.rt-title .clockface{margin-left:8px}
.rc-head .clockface,.rtk-row .clockface{color:var(--ink)}
.rtk-time{display:flex;align-items:center;gap:6px;font:700 13px var(--font-ui);color:var(--ink)}
.rtk-time input{border:2px solid rgba(16,49,147,.15);border-radius:10px;padding:0 8px;min-height:38px;font:700 14px var(--font-ui)}
.clk-modeseg{margin-top:4px}
/* (`.clk-suggest` went with the age-6 "Try Clock mode" banner: nothing had rendered it since it was dropped for
   reading the header child, and its three handlers were the only writers of `children[].clockSuggested`.) */

/* ================= Routines: weekday / weekend toggle in the editor ================= */
.rtk-row{display:flex;align-items:center;gap:10px;padding:0 2px 6px;flex-wrap:wrap}
.rtk-same{font:700 13px var(--font-ui);color:var(--ink-muted)}

/* ================= Countdowns: Advent doors, custom count word, preview date, count-style settings ================= */
.cd-feature[data-mode=word] .cd-count{flex-wrap:wrap;row-gap:0}.cd-feature[data-mode=word] .cd-count span{font-size:34px;line-height:1.1}
.cd-preview{align-self:flex-start;background:var(--ink);color:#fff;border-radius:14px;padding:4px 14px;font:800 15px var(--font-ui)}
.cd-advent{align-items:stretch}
.adv-grid{flex:none;width:min(52%,560px);display:grid;grid-template-columns:repeat(6,1fr);gap:8px;align-content:center}
.adv-door{position:relative;aspect-ratio:1/1;min-height:48px;border-radius:12px;border:3px solid var(--ink);background:linear-gradient(160deg,var(--cat-holidays,#6EC66C),#3b8f47);color:#fff;font:800 22px var(--font-head);display:flex;align-items:center;justify-content:center;overflow:hidden;perspective:300px;padding:0}
.adv-door .adv-n{position:relative;z-index:2;text-shadow:0 2px 0 rgba(0,0,0,.25);transform-origin:0 50%;transition:transform .5s var(--ease-fold,ease)}
.adv-door .adv-in{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-size:30px;background:#FFF7E0;opacity:0}
.adv-door.open{background:#FFF7E0;color:var(--ink);text-shadow:none}
.adv-door.open .adv-in{opacity:1}.adv-door.open .adv-n{position:absolute;top:2px;left:5px;font-size:12px;z-index:3;color:var(--ink-muted,#5b6b9a);text-shadow:none;transform:none}
.adv-door.today{box-shadow:0 0 0 4px var(--star),0 0 18px var(--star);animation:advglow 1.4s ease-in-out infinite}
.adv-door.shut{filter:saturate(.75) brightness(.95)}
.adv-door.opening .adv-in{animation:advopen .7s ease-out both}
.adv-door.opening{animation:advpop .6s ease-out}
.adv-door.peek .adv-in{animation:advpeek .45s ease-out}
.adv-door.nope{animation:advnope .4s}
@keyframes advglow{50%{box-shadow:0 0 0 6px var(--star),0 0 26px var(--star)}}
@keyframes advopen{0%{opacity:0;transform:scale(.3) rotate(-25deg)}60%{opacity:1;transform:scale(1.5) rotate(8deg)}100%{opacity:1;transform:none}}
@keyframes advpop{0%{transform:scale(1)}40%{transform:scale(1.18)}100%{transform:scale(1)}}
@keyframes advpeek{50%{transform:scale(1.4)}}
@keyframes advnope{20%,60%{transform:translateX(-6px)}40%,80%{transform:translateX(6px)}}
.noanim .adv-door,.noanim .adv-door .adv-in{animation:none!important}
.cdst{display:flex;flex-direction:column;gap:8px}
.cdst .seg button{min-height:48px;font-size:16px}
/* "How to count" is three choices and a preview - a row, not a block. It wraps rather than shrinking the buttons. */
.cdst.compact{gap:6px;padding:10px 18px}
.cdst.compact .cdst-row{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.cdst.compact .cdst-row h3{margin:0;flex:none}
.cdst.compact .seg{flex:none}
.cdst.compact .prevline{font:800 16px var(--font-head);color:var(--ink-blue);white-space:nowrap}
.cdst.compact .dq2{margin:0}
/* The holiday pictures for the family's region: browsing, not a second place to place a card, so nothing here is a
   button and nothing has a drop target. A holiday that is switched off is dimmed rather than hidden - a parent
   looking for a picture wants to see all of them. */
.ss-card.holart>summary{font:800 20px var(--font-head);color:var(--ink);cursor:pointer;min-height:44px;display:flex;align-items:center}
.holart-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(112px,1fr));gap:10px}
.holart-c{margin:0;background:#fff;border:2px solid var(--pm-line-soft);border-radius:14px;overflow:hidden;display:flex;flex-direction:column;min-width:0}
.holart-c.off{opacity:.45;filter:saturate(.5)}
.holart-p{display:grid;place-items:center;height:78px;background:var(--parent-row);font-size:34px;overflow:hidden}
.holart-p img{width:100%;height:100%;object-fit:cover;object-position:50% 25%;display:block}
.holart-c figcaption{padding:5px 7px 7px;display:flex;flex-direction:column;gap:1px;min-width:0}
.holart-c b{font:800 12px/1.2 var(--font-ui);color:var(--ink);overflow-wrap:anywhere}
.holart-c small{font:700 11px var(--font-ui);color:var(--ink-muted)}
/* the one line where the Holidays category used to be in the library */
/* One collapsed line by default. As two standing paragraphs this cost 191px of a 216px-wide column — see pmlib.js
   elsewhereHTML. `:not([open]) p` is explicit rather than trusting the user agent to hide a closed details' children,
   for the same reason namefield.js needs `.nf-more:not([open]) .nf-l{display:none}`: an author rule can beat it. */
.pm-libnote{margin:8px 2px 0;font:600 12px/1.45 var(--font-ui);color:var(--ink-muted)}
.pm-libnote:not([open]) p{display:none}
.pm-libnote>summary{cursor:pointer;list-style:none;padding:4px 2px;min-height:28px;display:flex;align-items:center;gap:5px;color:var(--ink-blue);text-decoration:underline}
.pm-libnote>summary::-webkit-details-marker{display:none}
.pm-libnote>summary::before{content:'?';display:grid;place-items:center;width:16px;height:16px;border-radius:50%;background:var(--ink-blue);color:#fff;font:800 11px/1 var(--font-ui);text-decoration:none;flex:none}
.pm-libnote[open]>summary{margin-bottom:2px}
.pm-libnote p{margin:0 0 6px}

/* "Coming up": a folded-away preview at the foot of the page, not a column of its own */
.ss-card.cdnext>summary{font:800 20px var(--font-head);color:var(--ink);cursor:pointer;min-height:44px;display:flex;align-items:center}
.ss-card.cdnext[open]>summary{margin-bottom:6px}
.birthkids{margin-bottom:4px}
.birthkids .rwchip small{font:700 12px var(--font-ui);color:var(--ink-muted);margin-left:6px}
.cdst .wordrow{display:grid;grid-template-columns:auto 1fr;gap:6px 10px;align-items:center}
.cdst .wordrow input{border:2px solid rgba(16,49,147,.15);border-radius:12px;padding:0 12px;min-height:46px;font:700 16px var(--font-ui)}
.cdst .prevline{font:800 18px var(--font-head);color:var(--ink-blue)}
.holrow{display:flex;align-items:center;gap:6px}.holrow .chk{flex:1;min-width:0}
/* `.cdst-btn` was the ⏱ on every holiday row; the rule goes with the button. "Count this one differently" is a
   block inside each editor now (cdsetup.js countBlockHTML), so a rare setting is not a control on 86 rows. */
/* The name is the way into the editor, so it has to be the button it now is — and still read as the row's label
   rather than as a control bar. (The event row's own `.evname` rule is further down, beside the rest of that row.) */
.holrow .hname{flex:1;min-width:0;text-align:left;background:none;border:0;padding:4px 2px;
  min-height:44px;font:700 15px var(--font-ui);color:inherit;cursor:pointer}
.holrow .hname:hover{text-decoration:underline}
.hseason{font:800 11px var(--font-ui);background:var(--star);color:var(--ink);border-radius:8px;padding:0 6px;margin-left:4px}

/* ================================================================================================================
   PARENT MODE - one screen: library (left) | board (centre) | context panel (right).
   Sizes and colours come from the tokens above (PARENT_MODE_REDESIGN.md §4). 1920x1080 scales the whole stage.
   ================================================================================================================ */
.pm-screen{display:flex;flex-direction:column;height:100%;background:var(--parent-bg);overflow:hidden}
.pm-bar{height:var(--pm-bar-h);flex:none;display:flex;align-items:center;gap:7px;padding:0 10px;background:var(--ink);color:#fff}
.pm-bar h1{font:800 21px var(--font-head);margin:0;white-space:nowrap;flex:none}
.pm-bar .sp{flex:1}
.pm-bar .guide-btn,.pm-bar .save-btn{min-height:var(--pm-ctl-h);white-space:nowrap;flex:none;padding:0 14px;font-size:17px}
.pm-bar .pm-icon{min-width:50px;height:var(--pm-ctl-h);padding:0 10px;font-size:18px;border-radius:14px;background:var(--pm-seg-track);color:#fff;font-family:var(--font-ui);font-weight:800;flex:none}
.pm-bar .pm-icon:disabled{opacity:.45}
.pm-bar .lang button{padding:0 10px}
.pm-childpick>button{max-width:260px}      /* "All children" / "Noah and Ava" did not fit 210 and ellipsised to nothing */
.pm-childpick b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pm-div{width:2px;height:40px;background:var(--pm-div);flex:none;margin:0 2px}
.pm-gear{width:var(--pm-ctl-h);height:var(--pm-ctl-h);flex:none;border-radius:14px;background:var(--pm-seg-track);color:#fff;font-size:24px;padding:0}
.pm-gear.on{background:#fff;color:var(--ink)}
.pm-seg{background:var(--pm-seg-track);border-radius:16px;padding:4px;gap:4px;display:flex;flex:none}
.pm-seg button{min-width:var(--pm-seg-min);height:var(--pm-ctl-h);border-radius:12px;font:800 19px var(--font-head);white-space:nowrap;background:transparent;color:#fff;padding:0 8px}
.pm-seg button.on{background:#fff;color:var(--ink)}
.pm-seg button:disabled{opacity:.45}
.pm-childpick{position:relative;flex:none}
.pm-childpick>button{display:flex;align-items:center;gap:8px;height:var(--pm-ctl-h);border-radius:14px;background:var(--pm-seg-track);color:#fff;padding:0 14px;font:800 19px var(--font-head)}
.pm-childpick .pm-dots{display:flex;gap:3px}
.pm-childpick i{width:18px;height:18px;border-radius:50%;display:block}
.pm-childpick .avatar,.pm-childmenu .avatar{flex:none}
.pm-childpick em{font-style:normal;font-size:14px;opacity:.9}
.pm-childmenu{position:absolute;top:calc(100% + 6px);left:0;z-index:60;background:#fff;border-radius:16px;box-shadow:var(--shadow-fold);padding:6px;min-width:200px;display:flex;flex-direction:column;gap:2px}
.pm-childmenu button{display:flex;align-items:center;gap:10px;min-height:48px;border-radius:12px;padding:0 12px;font:800 17px var(--font-ui);color:var(--ink);background:#fff;text-align:left}
.pm-childmenu button.on{background:var(--pm-tint)}
.pm-childmenu i{width:16px;height:16px;border-radius:50%}

.pm{flex:1;min-height:0;display:flex;gap:0;align-items:stretch;overflow:hidden}
.pm-main{flex:1;min-width:0;min-height:0;display:flex;flex-direction:column;padding:12px 14px;overflow:hidden}
.pm-main>#pmboard{flex:1;min-height:0;display:flex;flex-direction:column}
.pm-settings .pm-main{padding:0}
.pm-set{flex:1;min-height:0;overflow-y:auto;padding:14px 18px}
.pm-set .settings{max-width:980px;margin:0 auto}

/* ---------------- library (left) ---------------- */
.pm-lib{flex:none;width:var(--pm-lib-w);display:flex;background:#fff;border-right:2px solid var(--pm-line-soft);transition:width var(--pm-collapse)}
.pm-lib.closed{width:var(--pm-rail-w)}
.pm-rail{width:var(--pm-rail-w);flex:none;background:var(--pm-fill);display:flex;flex-direction:column;align-items:center;gap:8px;padding:10px 0}
.pm-libtoggle{width:44px;height:44px;border-radius:12px;background:#fff;border:2px solid var(--pm-line);font:800 20px var(--font-head);color:var(--ink);flex:none}
.pm-cats{flex:1;min-height:0;overflow-y:auto;display:flex;flex-direction:column;align-items:center;gap:10px;scrollbar-width:none;padding:2px 0}
.pm-cats::-webkit-scrollbar{display:none}
.pm-cat{width:44px;height:44px;border-radius:50%;flex:none;border:3px solid var(--c);background:#fff;overflow:hidden;padding:0;display:flex;align-items:center;justify-content:center;font:800 18px var(--font-ui);color:var(--ink);line-height:1}
.pm-cat img{width:100%;height:100%;object-fit:cover}
.pm-cat.on{box-shadow:0 0 0 3px #fff,0 0 0 6px var(--star)}
.pm-newcard.rail{width:52px;height:52px;border-radius:14px;background:var(--ink);color:#fff;font:800 28px var(--font-head);flex:none;padding:0}
.pm-libbody{flex:1;min-width:0;display:flex;flex-direction:column;gap:8px;padding:10px}
.pm-search{display:flex;align-items:center;gap:6px;border:2px solid var(--pm-line);border-radius:14px;padding:0 10px;min-height:48px;flex:none}
.pm-search span{color:var(--ink-muted);font-size:18px}
.pm-search input{flex:1;min-width:0;border:0;background:none;font:700 15px var(--font-ui);color:var(--ink);min-height:44px}
.pm-libhead{display:flex;align-items:center;gap:6px;flex:none}
.pm-libhead button{flex:1;min-width:0;text-align:left;font:800 15px var(--font-ui);color:var(--ink);background:none;padding:2px 0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pm-libhead em{font-style:normal;font:700 13px var(--font-ui);color:var(--ink-muted)}
.pm-catmenu{display:flex;flex-direction:column;gap:2px;background:var(--pm-fill);border-radius:12px;padding:6px;flex:none}
.pm-catmenu button{min-height:40px;border-radius:9px;font:700 14px var(--font-ui);color:var(--ink);text-align:left;padding:0 10px;background:none}
.pm-catmenu button.on{background:#fff;font-weight:800}
.pm-catmenu .az{border-top:2px solid var(--pm-line-soft);margin-top:4px;padding-top:6px;border-radius:0 0 9px 9px}
.pm-grid{flex:1;min-height:0;overflow-y:auto;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:107px;gap:8px;align-content:start;align-items:start;scrollbar-width:none}
.pm-grid::-webkit-scrollbar{display:none}
/* pan-y: a vertical swipe still scrolls the library, but a sideways move is ours, so the browser does not take the
   gesture away mid-drag (it cancels the pointer when it decides to scroll, which killed drag-to-place on a tablet). */
.pm-card{position:relative;border:2px solid var(--c);border-radius:13px;overflow:hidden;background:#fff;cursor:pointer;touch-action:pan-y}
.pm-card img{display:block;width:100%;height:84px;object-fit:cover;object-position:50% 18%;pointer-events:none}
.pm-card .lbl{background:var(--c);color:var(--ci);font:700 12px/21px var(--font-ui);height:21px;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:0 2px;pointer-events:none}
.pm-card.sel{box-shadow:var(--pm-ring);transform:translateY(-2px)}
.pm-card .cam{position:absolute;top:3px;left:3px;width:26px;height:26px;border-radius:50%;background:rgba(255,255,255,.92);font-size:13px;line-height:26px;padding:0;z-index:2;opacity:.85}
/* The 🎙 is the 📷's twin in the opposite top corner: same size, same chip, same `.has`. Two rules matter here —
   `right:3px` (not `left`), so the two can never be on top of each other whatever the card size; and the 21px label bar
   is its own row below the picture, so neither chip can reach the name. tools/test-voicerec.mjs probes both at every
   size x 1/4 children x EN/FR/ES rather than trusting that. */
.pm-card .mic{position:absolute;top:3px;right:3px;width:26px;height:26px;border-radius:50%;background:rgba(255,255,255,.92);font-size:13px;line-height:26px;padding:0;z-index:2;opacity:.85}
/* Recorded: the same filled state the camera uses, so "done" looks the same on both. */
.pm-card .cam.has,.pm-card .mic.has{background:var(--star);opacity:1}
/* …and `.stale`: recorded, but the family renamed the card afterwards, so the recording says the old name. The filled
   chip in the warning colour with a ring, because it IS recorded (the `.has` shape is right) and it IS something to
   come back to. It is not a third chip: both top corners are taken and a third would land on the 21px label bar. */
.pm-card .mic.stale,.wk-lib .mic.stale,.lib-card .mic.stale{background:var(--danger);color:#fff;box-shadow:0 0 0 2px var(--ink-blue);opacity:1}
/* The library card's own right-hand badge (how many times a card is on the board) would sit under the mic, so it moves
   down by exactly the chip's height + its gap. It is only ever drawn on the BOARD's cards, never in the library, but the
   selector covers both and a future screen that draws them together should not have to discover this. */
.wk-lib .mic{position:absolute;top:3px;right:3px;width:30px;height:30px;border-radius:50%;background:rgba(255,255,255,.92);font-size:15px;line-height:30px;padding:0;z-index:2;box-shadow:var(--shadow-card);opacity:.85}
.wk-lib .mic.has,.lib-card .mic.has{background:var(--star);opacity:1}
/* the recorder dialog's own language row, under the card's name */
.vdlg .seg.lang.vlang{align-self:flex-start;margin:0 0 4px}
/* ---- card size (pmlib.js density(), kept per device) ----
   Normal = the two-column grid. Big = one wide column. Circles = small round cards under their category name,
   for running an eye down the categories instead of reading labels. */
.pm-dens{flex:none;display:flex;gap:2px}
.pm-dens button{width:28px;height:28px;padding:0;border:none;border-radius:8px;background:none;color:var(--ink-muted);font:700 14px/1 var(--font-ui);cursor:pointer}
.pm-dens button.on{background:var(--pm-tint);color:var(--ink)}
.pm-grid.d-big{grid-template-columns:minmax(0,1fr);grid-auto-rows:158px}
.pm-grid.d-big .pm-card img{height:130px}
.pm-grid.d-big .pm-card .lbl{font-size:14px;line-height:25px;height:25px}
.pm-grid.d-circle{grid-template-columns:repeat(3,minmax(0,1fr));grid-auto-rows:auto;gap:10px 6px}
.pm-grid.d-circle .pm-card{border:none;background:none;border-radius:0;overflow:visible;text-align:center}
.pm-grid.d-circle .pm-card img{width:100%;aspect-ratio:1;height:auto;border-radius:50%;border:3px solid var(--c);background:#fff}
.pm-grid.d-circle .pm-card .lbl{background:none;color:var(--ink);height:auto;line-height:1.15;font-size:11px;padding:3px 0 0;white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.pm-grid.d-circle .pm-card.sel img{box-shadow:var(--pm-ring)}
.pm-grid.d-circle .pm-card.sel{transform:none}
.pm-catrow{grid-column:1/-1;display:flex;align-items:center;gap:6px;margin:6px 0 0;font:800 12px var(--font-ui);color:var(--ink-muted);text-transform:uppercase;letter-spacing:.05em}
.pm-catrow em{font-style:normal;font-weight:700;opacity:.7}
/* Folding the right panel away gives the library the room to show bigger cards */
/* Folding the right panel away widens the library — but NOT a library that is itself collapsed to its rail.
   `.pm-lib.closed` is (0,2,0) and this is (0,2,1), so without the :not() the collapsed rail was laid out 396px wide
   with 320px of empty white beside it. All children used to be the one state that set both classes at once. */
.pm-screen.panel-closed .pm-lib:not(.closed){width:var(--pm-lib-wide)}
.pm-screen.panel-closed .pm-grid{grid-auto-rows:132px}
.pm-screen.panel-closed .pm-card img{height:108px}
.pm-screen.panel-closed .pm-grid.d-big{grid-auto-rows:196px}
.pm-screen.panel-closed .pm-grid.d-big .pm-card img{height:168px}
.pm-screen.panel-closed .pm-grid.d-circle{grid-template-columns:repeat(4,minmax(0,1fr))}
.pm-screen.panel-closed .pm-grid.d-circle .pm-card img{height:auto}
.pm-none{grid-column:1/-1;padding:16px 8px;color:var(--ink-muted);font:700 14px var(--font-ui);text-align:center}
button.pm-none{color:var(--ink-blue);text-decoration:underline}
.pm-newcard{flex:none;min-height:56px;border-radius:14px;background:var(--ink);color:#fff;font:800 17px var(--font-head)}

/* ---------------- context panel (right) ---------------- */
.pm-side{flex:none;width:var(--pm-side-w);background:#fff;border-left:2px solid var(--pm-line-soft);display:flex;transition:width var(--pm-collapse);position:relative}
.pm-side.closed{width:var(--pm-side-tab)}
.pm-sidetab{width:100%;display:flex;flex-direction:column;align-items:center;gap:10px;padding:14px 0;background:none}
.pm-sidetab i{font-style:normal;font:800 20px var(--font-head);color:var(--ink)}
.pm-sidetab span{writing-mode:vertical-rl;font:800 17px var(--font-head);color:var(--ink);letter-spacing:.02em}
.pm-sidecollapse{position:absolute;top:10px;right:10px;width:40px;height:40px;border-radius:12px;background:var(--pm-fill);color:var(--ink);font:800 18px var(--font-head);z-index:2}
.pm-sidebody{flex:1;min-width:0;display:flex;flex-direction:column;gap:12px;padding:14px 20px 18px;overflow-y:auto;scrollbar-width:none}
.pm-sidebody::-webkit-scrollbar{display:none}
.pm-sidebody h2{margin:0;font:800 26px var(--font-head);color:var(--ink);padding-right:44px}
.pm-phead{display:flex;align-items:center;gap:10px}
.pm-phead div{flex:1;min-width:0}
/* The name is a BUTTON that looks like the heading it already was — tap the name to change the name. It keeps the
   heading's type and colour so the panel reads the same; what marks it as a control is the ✏️ beside it, a hit area
   that covers the whole line, and a fill on hover and press. The pencil is `.6` rather than full strength so the name
   is still the loudest thing in the header. */
.pm-headname{display:flex;align-items:center;gap:7px;width:100%;text-align:left;background:none;padding:2px 6px;margin:-2px -6px;border-radius:10px;min-height:34px}
.pm-headname i{font-style:normal;font-size:14px;opacity:.6;flex:none}
.pm-headname:hover{background:var(--pm-fill)}
.pm-headname:active{transform:translateY(1px)}
.pm-phead b{display:block;font:800 22px var(--font-head);color:var(--ink);line-height:1.1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pm-phead small{font:700 13px var(--font-ui);color:var(--ink-blue);padding-left:6px}
.pm-thumb{width:64px;height:64px;flex:none;border:3px solid var(--c);border-radius:14px;overflow:hidden;display:block}
.pm-thumb img{width:100%;height:100%;object-fit:cover}
.pm-x{width:44px;height:44px;border-radius:12px;background:var(--pm-fill);font:800 18px var(--font-ui);color:var(--ink);flex:none}
.pm-hint{background:#FFF6E2;border:2px solid #FFE3A8;border-radius:14px;padding:10px 12px}
.pm-hint b{display:block;font:800 17px var(--font-head);color:var(--ink)}
.pm-hint small{font:700 13px var(--font-ui);color:var(--ink-blue)}
.pm-fld{display:flex;flex-direction:column;gap:6px;font:700 13px var(--font-ui);color:var(--ink-blue)}
.pm-fld select,.pm-fld input{border:2px solid var(--pm-line);border-radius:12px;min-height:48px;padding:0 10px;font:700 16px var(--font-ui);color:var(--ink);background:#fff;width:100%}
.pm-row{display:flex;gap:6px;align-items:center}
.pm-row select{flex:1;min-width:0}
.pm-go{width:56px;height:48px;flex:none;border-radius:12px;background:var(--ink);color:#fff;font:800 20px var(--font-head)}
.pm-two{display:flex;gap:8px}
.pm-two>*{flex:1;min-width:0}
.pm-two.grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.pm-places{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.pm-place{min-height:var(--pm-place-h);border-radius:14px;border:2px solid var(--pm-line);background:var(--pm-fill);font:800 18px var(--font-head);color:var(--ink);padding:0 6px}
.pm-place.on{background:var(--star);border-color:var(--star)}
.pm-place.clr{background:#fff;color:var(--pm-warn)}
.pm-place:disabled{opacity:.4}
/* two columns, so "Wednesday" fits on one line: the days are written out in full on purpose */
.pm-days{display:grid;grid-template-columns:repeat(2,1fr);gap:6px}
.pm-day{min-height:var(--pm-daychip-h);border-radius:12px;border:3px solid var(--pm-line);background:#fff;font:800 15px var(--font-ui);color:var(--ink);padding:4px 6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pm-day.on{background:var(--star);border-color:var(--star)}
.pm-day.cur{background:var(--pm-tint);color:var(--ink-muted)}
.pm-added{display:flex;flex-wrap:wrap;gap:6px}
.pm-addedday{background:var(--c);color:#fff;border-radius:10px;padding:3px 10px;font:800 14px var(--font-ui)}
.pm-mc{background:var(--pm-tint);border-radius:14px;padding:4px;display:flex;gap:4px}
.pm-mc button{flex:1;min-height:48px;border-radius:11px;font:800 16px var(--font-ui);color:var(--ink);background:none}
.pm-mc button.on{background:#fff;box-shadow:var(--shadow-card)}
.pm-primary{margin-top:auto;position:sticky;bottom:0;min-height:64px;border-radius:16px;background:var(--save);color:#fff;font:800 22px var(--font-head);flex:none;box-shadow:0 -10px 10px 6px #fff}
.pm-primary.off,.pm-primary:disabled{opacity:.45}
.pm-import{min-height:56px;border-radius:14px;background:var(--ink);color:#fff;font:800 17px var(--font-ui)}
.pm-chips{display:flex;flex-wrap:wrap;gap:6px}
.pm-chip{display:flex;align-items:center;gap:6px;min-height:44px;border-radius:12px;border:2px solid var(--pm-line);background:#fff;padding:0 12px;font:700 14px var(--font-ui);color:var(--ink)}
.pm-chip.on{border-color:var(--star);background:#FFF6E2}
.pm-chip i{font-style:normal}
.pm-danger{display:flex;flex-direction:column;gap:6px;margin-top:8px}
.pm-rm{min-height:56px;border-radius:14px;border:2px solid var(--pm-warn);color:var(--pm-warn);background:#fff;font:800 17px var(--font-ui)}
.pm-rmall{min-height:44px;color:var(--pm-warn);background:none;font:700 15px var(--font-ui)}
.pm-up{border-top:2px solid var(--pm-line-soft);padding-top:8px}
.pm-up summary{font:800 15px var(--font-ui);color:var(--ink);min-height:40px;display:flex;align-items:center;cursor:pointer}
.pm-uprow{display:flex;align-items:center;gap:8px;min-height:38px;font:700 13px var(--font-ui);color:var(--ink)}
.pm-uprow b{color:var(--ink-blue);min-width:62px}
.pm-uprow span{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pm-uprow .rm{width:32px;height:32px;border-radius:9px;background:var(--pm-fill);color:var(--pm-warn)}
.pm-quick{display:flex;flex-direction:column;gap:12px;flex:1}
.pm-quick .pl-status{margin:0;font:700 13px var(--font-ui);color:var(--ink-blue)}

/* ---------------- weekly board (centre) ---------------- */
.wkb{flex:1;min-height:0;display:flex;flex-direction:column;gap:10px}
.wkb-head{flex:none;display:flex;align-items:center;gap:12px;flex-wrap:wrap;row-gap:8px}
.wkb-range{display:flex;align-items:baseline;gap:8px;font:800 24px var(--font-head);color:var(--ink)}
.wkb-range span{font:700 15px var(--font-ui);color:var(--ink-blue)}
.wkb-view{flex:none;background:#fff;border-radius:14px;padding:4px;display:flex;gap:4px;box-shadow:var(--shadow-card)}
.wkb-view button{min-height:48px;min-width:44px;padding:0 14px;border-radius:10px;font:800 16px var(--font-ui);color:var(--ink);background:none;white-space:nowrap}
.wkb-view button.on{background:var(--ink);color:#fff}
.wkb-body{flex:1;min-height:0;display:flex;flex-direction:column}
.wkb-week{flex:1;min-height:0;display:grid;grid-template-columns:repeat(7,minmax(0,1fr));grid-template-rows:var(--pm-dayhead-h) 1fr;gap:8px}
.wkb-dh{border-radius:14px;background:var(--c);color:#fff;font:800 19px var(--font-head);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;position:relative;min-width:0}
.wkb-dh b{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
.wkb-tag{font:800 12px var(--font-ui);border-radius:999px;padding:1px 10px}
.wkb-tag.today{background:#fff;color:var(--ink)}
.wkb-tag.tom{border:2px solid #fff;color:#fff}
.wkb-badge{position:absolute;top:-10px;right:-8px;width:34px;height:34px;border-radius:50%;border:3px solid #fff;object-fit:cover;z-index:2}
.wkb-dh.yesterday{opacity:.5}
.wkb-col{min-height:0;display:flex;flex-direction:column;gap:6px;padding:6px;border-radius:14px;background:rgba(255,255,255,.5);overflow-y:auto;scrollbar-width:none}
.wkb-col::-webkit-scrollbar{display:none}
.wkb-col.today{background:#fff;border:3px solid var(--drop-active)}
.wkb-col.yesterday{opacity:.55}
.wkb-col.can{background:#fff}
.wkb-col.over{box-shadow:inset 0 0 0 3px var(--drop-active)}
.wkb-tile{flex:none;display:flex;flex-direction:column;background:#fff;border:3px solid var(--c);border-radius:var(--radius-slot);overflow:hidden;box-shadow:var(--shadow-card);padding:0;text-align:left}
.wkb-tile img{width:100%;height:62px;object-fit:cover;object-position:50% 20%;display:block;pointer-events:none}
.wkb-tile .lbl{background:var(--c);color:var(--ci);font:700 13px/1.5 var(--font-ui);padding:2px 4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;pointer-events:none}
.wkb-tile .wkb-time{font:800 11px var(--font-ui);color:var(--ink-blue);padding:2px 4px;background:var(--pm-tint)}
.wkb-tile.sel{box-shadow:var(--pm-ring-sel)}
.wkb-tile.pop{animation:wkbPop .36s var(--ease-fold)}
.wkb-tile.lifting{opacity:.35}
.rtb-step.lifting{opacity:.35}
@keyframes wkbPop{0%{transform:scale(.4);opacity:0}70%{transform:scale(1.08)}100%{transform:none;opacity:1}}
.noanim .wkb-tile.pop{animation:none}
.wkb-slot{flex:none;min-height:var(--pm-slot-h);border-radius:12px;border:3px dashed var(--ink-faint);background:rgba(255,255,255,.5);color:var(--ink-faint);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;font:800 12px var(--font-ui)}
.wkb-slot i{font-style:normal;font-size:22px;line-height:1}
.wkb-slot.live{border-color:var(--drop-active);background:var(--drop-active-fill);color:var(--pm-ink-amber)}
.wkb-ghost{position:fixed;z-index:200;pointer-events:none;transform:translate(-50%,-60%);width:84px;background:#fff;border:3px solid var(--ink);border-radius:12px;overflow:hidden;box-shadow:var(--shadow-lift);opacity:.92}
.wkb-ghost img{width:100%;height:60px;object-fit:cover;display:block}
.wkb-ghost span{display:block;font:800 11px var(--font-ui);padding:2px;text-align:center}
/* Dragging a card out of the library (tap-to-place still works the same way) */
.pm-ghost{position:fixed;z-index:200;pointer-events:none;transform:translate(-50%,-60%) rotate(-3deg);width:96px;background:#fff;border:3px solid var(--ink);border-radius:14px;overflow:hidden;box-shadow:var(--shadow-lift);opacity:.94}
.pm-ghost img{width:100%;height:66px;object-fit:cover;display:block}
.pm-ghost span{display:block;font:800 12px var(--font-ui);padding:3px;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pm-dragging{cursor:grabbing}
.pm-dragging .pm-card{cursor:grabbing}
/* ---------------- take a placed card off: ONE control, on every board that places one ----------------
   Written once here and anchored per board below. It was three controls: the routines board's 32px disc hanging in the
   gutter, the weekly board's 22px one that only ever appeared on a one-off, and the School grid's 18px one — three sizes
   and two positions for the same act, which is exactly what stops a parent learning it once.

   **Why it is 24px and not a 44px target, deliberately.** This is a destructive control sitting on top of the thing it
   destroys, and the tap a parent actually aims at the same card is "select it". So it takes the corner over the PICTURE
   (never the label, never another control), it is not padded out beyond its own disc, and the boards' drag handlers all
   skip it so a press-and-hold on it cannot turn into a drag that removes on release. The white ring is what keeps it
   legible on any card colour, and the undo in the top bar is one tap away. */
.pm-x{position:absolute;top:3px;right:3px;z-index:4;width:24px;height:24px;padding:0;border:3px solid #fff;border-radius:50%;background:var(--pm-warn);color:#fff;font:800 11px/1 var(--font-ui);display:grid;place-items:center;box-shadow:var(--shadow-card);cursor:pointer}
.pm-x:hover{transform:scale(1.08)}
.pm-x:active{transform:scale(.92)}
/* **3px in from the card's VISIBLE edge, on every board** — which is the card's border box, not its padding box, and
   the two are not the same thing on a card with a coloured frame. An absolutely-positioned child is placed against its
   parent's PADDING box, so inside a `.wkb-tile` (a 3px frame) `top:3px` would sit 6px in while a routine card's
   control, anchored to a wrapper around the frame, sat at 3px. The tile's own frame supplies the 3px here.
   tools/test-cardx.mjs measures the gap from each board's card and fails if they drift apart. */
.wkb-tile>.pm-x{top:0;right:0}
/* the target under the finger */
.pm-drop{outline:4px solid var(--drop-active);outline-offset:2px;border-radius:14px;background:var(--drop-active-fill)}
.wkb-col .pm-drop,.rtb-steps .pm-drop,.rtb-rowcards .pm-drop{position:relative;z-index:3}
/* Weekend panel behind Sat + Sun. **By `data-wday`, which is the DAY, never by `nth-child`, which is the position.** It
   used to be `nth-child(6),(7)` and `nth-child(13),(14)` — the 6th and 7th heads and the 6th and 7th columns — which is
   only where the weekend is in a Monday-first week. A Sunday-first board puts Sunday in column 1 and Saturday in column 7,
   and the shading has to follow the days rather than the slots. `.wkb-multi` already did it this way. */
.wkb-week>.wkb-dh[data-wday="5"],.wkb-week>.wkb-dh[data-wday="6"]{box-shadow:0 -6px 0 6px var(--weekend-panel)}
.wkb-week>.wkb-col[data-wday="5"],.wkb-week>.wkb-col[data-wday="6"]{background:var(--weekend-panel)}
/* multi-child rows */
.wkb-multi{flex:1;min-height:0;display:grid;grid-template-columns:150px repeat(7,minmax(0,1fr));grid-auto-rows:var(--pm-dayhead-h) repeat(var(--rows),minmax(0,1fr));gap:8px;overflow-y:auto;scrollbar-width:none}
.wkb-multi::-webkit-scrollbar{display:none}
.wkb-name{display:flex;align-items:center;gap:8px;border-radius:14px;background:#fff;padding:0 10px;font:800 19px var(--font-head);color:var(--ink);border-left:6px solid var(--kc);text-align:left}
.wkb-name.on{box-shadow:var(--pm-ring)}
.wkb-name i{width:34px;height:34px;border-radius:50%;background:var(--kc);color:#fff;font-style:normal;display:flex;align-items:center;justify-content:center;font-size:17px;flex:none}
.wkb-multi .wkb-col{flex-direction:row;flex-wrap:wrap;align-content:flex-start;gap:4px;padding:4px}
.wkb-multi .wkb-tile{width:calc(50% - 2px);min-width:52px}
.wkb-multi .wkb-tile img{height:40px}
.wkb-multi .wkb-tile .lbl{font-size:11px;line-height:1.35}
.wkb-multi .wkb-slot{width:calc(50% - 2px);min-width:52px;min-height:44px}
.wkb-multi .wkb-dh{font-size:16px}
.wkb-multi .wkb-col[data-wday="5"],.wkb-multi .wkb-col[data-wday="6"]{background:var(--weekend-panel)}
/* timeline */
.wkb-timeline{flex:1;min-height:0;display:flex;gap:8px;overflow:auto;scrollbar-width:none}
.wkb-hours{flex:none;width:66px;display:flex;flex-direction:column}
.wkb-anyhd{height:86px;flex:none;font:800 12px var(--font-ui);color:var(--ink-blue);display:flex;align-items:center}
.wkb-hr{height:52px;flex:none;font:700 12px var(--font-ui);color:var(--ink-muted);border-top:2px solid var(--pm-line-soft)}
.wkb-tlcols{flex:1;min-width:0;display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:6px}
.wkb-tlcol{display:flex;flex-direction:column;min-width:0}
.wkb-tlcol.today{background:#fff;border-radius:12px;box-shadow:inset 0 0 0 3px var(--drop-active)}
.wkb-any{height:86px;flex:none;display:flex;gap:4px;overflow-x:auto;align-items:flex-start;scrollbar-width:none}
.wkb-any .wkb-tile{width:70px}
.wkb-any .wkb-tile img{height:36px}
.wkb-any .wkb-slot{min-width:60px;min-height:44px}
.wkb-track{position:relative;flex:none;min-height:0}
.wkb-slotline{height:52px;flex:none;border-top:2px solid var(--pm-line-soft)}
/**
 * **The one placed card with no ✕ on it, and the reason is measured rather than assumed.**
 *
 * A timetable block is a BAR whose height is the card's duration, down to a 34px minimum, and at seven columns it is
 * 69px wide — of which a 30px picture and the name's ellipsis already use every pixel. Reserving the shared control's
 * corner took the name to **0px**: the block became a picture and a ✕. Shrinking the control or the picture instead
 * would make one of the two useless.
 *
 * So the Timetable view keeps select-then-remove (which every board kept anyway), and it is not without the ✕: the
 * cards in its "Anytime" strip are ordinary `.wkb-tile`s and carry it. The Cards view of the same week is one tap away.
 */
.wkb-block{position:absolute;left:2px;right:2px;top:var(--top);height:var(--h);background:#fff;border:3px solid var(--c);border-radius:12px;overflow:hidden;display:flex;align-items:center;gap:4px;padding:2px;text-align:left}
.wkb-block img{width:30px;height:30px;border-radius:7px;object-fit:cover;flex:none}
.wkb-block span{font:700 12px var(--font-ui);color:var(--ink);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.wkb-block.sel{box-shadow:var(--pm-ring-sel)}
.wkb-nowline{position:absolute;left:0;right:0;top:var(--top);height:0;border-top:3px solid var(--danger);z-index:3}
.wkb-nowline span{position:absolute;top:-11px;left:2px;background:var(--danger);color:#fff;border-radius:8px;padding:0 6px;font:800 11px var(--font-ui)}

/* ---------------- routine board (centre) ---------------- */
.rtb{flex:1;min-height:0;display:flex;flex-direction:column;gap:10px;overflow-y:auto;scrollbar-width:none}
.rtb::-webkit-scrollbar{display:none}
/* Which of the ticked children My day is editing, and how to change it here. The weekly board names its rows down
   the left; this screen has one child at a time, so the same idea is a row across the top. */
.rtb-who{flex:none;display:flex;align-items:center;gap:8px;flex-wrap:wrap;background:#fff;border-radius:14px;padding:6px 10px}
.rtb-wholbl{font:800 13px var(--font-ui);color:var(--ink-blue);text-transform:uppercase;letter-spacing:.04em;flex:none}
.rtb-whok{display:flex;align-items:center;gap:7px;min-height:44px;padding:0 12px 0 7px;border-radius:14px;flex:none;
  background:var(--pm-tint);border:2px solid transparent;font:800 16px var(--font-ui);color:var(--ink);white-space:nowrap}
.rtb-whok.on{border-color:var(--kc);box-shadow:var(--pm-ring)}
.rtb-whok .avbub{flex:none}
.rtb-whonote{font:700 12px var(--font-ui);color:var(--ink-muted);flex:1 1 180px;min-width:0;text-align:right}
.rtb-tabs{flex:none;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}
.rtb-tab{min-height:var(--pm-tab-h);border-radius:16px;background:rgba(255,255,255,.6);display:flex;align-items:center;justify-content:center;gap:6px;font:800 17px var(--font-head);color:var(--ink);padding:0 6px;min-width:0}
.rtb-tab.on{background:#fff;border:4px solid var(--star);box-shadow:0 4px 0 rgba(16,49,147,.14)}
.rtb-tab .ico{font-size:22px}
.rtb-tab b{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.rtb-tab em{font-style:normal;min-width:28px;height:28px;border-radius:14px;background:#DCE6EF;color:var(--ink);font:800 14px/28px var(--font-ui);text-align:center;flex:none}
.rtb-tab.on em{background:var(--star)}
.rtb-schedbar,.rtb-days{flex:none;display:flex;align-items:center;gap:10px;background:#fff;border-radius:16px;padding:8px 12px;flex-wrap:wrap}
.rtb-schedlbl{font:800 14px var(--font-ui);color:var(--ink-blue)}
.rtb-mode{background:var(--pm-tint);border-radius:14px;padding:4px;display:flex;gap:4px}
.rtb-mode button{min-height:var(--pm-mode-h);padding:0 14px;border-radius:11px;font:800 15px var(--font-ui);color:var(--ink);background:none;white-space:nowrap}
.rtb-mode button.on{background:var(--ink);color:#fff}
.rtb-start{display:flex;align-items:center;gap:8px;font:700 14px var(--font-ui);color:var(--ink-blue)}
.rtb-start select{border:2px solid var(--pm-line);border-radius:12px;min-height:48px;padding:0 8px;font:800 16px var(--font-ui);color:var(--ink);background:#fff}
.rtb-day{width:var(--pm-schedchip);height:var(--pm-schedchip);border-radius:14px;border:3px solid var(--pm-line);background:#fff;font:800 20px var(--font-head);color:var(--ink);position:relative;flex:none}
.rtb-day.on{background:var(--star);border-color:var(--star)}
.rtb-day.base{background:var(--pm-tint);border-color:var(--pm-line)}
.rtb-day.own::after{content:'';position:absolute;top:5px;right:5px;width:10px;height:10px;border-radius:50%;background:var(--ink)}
.rtb-note{display:flex;flex-direction:column;line-height:1.15}
.rtb-note b{font:800 15px var(--font-ui);color:var(--ink)}
.rtb-note small{font:700 12px var(--font-ui);color:var(--ink-blue)}
.rtb-bad{margin:0;background:#FFE9EC;border:2px solid var(--danger);border-radius:12px;padding:6px 10px;font:800 14px var(--font-ui);color:var(--pm-warn)}
.rtb-board{flex:none;border-radius:22px;padding:14px 16px;background:linear-gradient(var(--sky-top),var(--sky-bottom))}
.rtb-board.p-afternoon{background:linear-gradient(var(--afternoon-top),var(--afternoon-bottom))}
.rtb-board.p-evening{background:linear-gradient(var(--evening-top),var(--evening-bottom))}
.rtb-board.p-night{background:linear-gradient(var(--night-top),var(--night-bottom))}
.rtb-board>header{display:flex;align-items:center;gap:10px;margin-bottom:10px}
.rtb-board h2{margin:0;font:800 24px var(--font-head);color:#fff;text-shadow:0 2px 0 rgba(16,49,147,.25)}
.rtb-pill{background:rgba(255,255,255,.85);border-radius:999px;padding:3px 14px;font:800 14px var(--font-ui);color:var(--ink)}
.rtb-steps{display:flex;gap:12px;flex-wrap:wrap;align-items:flex-start}
.rtb-step{display:flex;flex-direction:column;align-items:center;gap:4px;width:var(--pm-step-w);touch-action:none}
.rtb-rowcards .rtb-step{touch-action:pan-x}   /* the setup stack's rows scroll sideways, so leave that gesture alone */
.rtb-num{width:30px;height:30px;border-radius:50%;background:#fff;color:var(--ink);font:800 16px/30px var(--font-ui);text-align:center}
.rtb-card{width:100%;background:#fff;border:4px solid var(--c);border-radius:18px;overflow:hidden;padding:0;box-shadow:var(--shadow-card)}
.rtb-card img{display:block;width:100%;height:78px;object-fit:cover;object-position:50% 18%}
.rtb-card .lbl{background:var(--c);color:var(--ci);font:700 14px/1.5 var(--font-ui);padding:2px 4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.rtb-step.sel .rtb-card{box-shadow:var(--pm-ring-sel)}
/* Remove a card without going through the panel: a small X on the card itself. */
.rtb-step{position:relative}
/* The ✕ is positioned against the CARD, not against the step — the step is [number, card] in a column, so anything
   measured from its top depends on how tall the number is and the control ends up straddling the card's top edge
   instead of sitting in its corner. (It also used to hang 8px OUTSIDE the card, which no seven-column board can copy:
   `.wkb-col` scrolls, so anything past its edge is clipped. This is the one that moved to make all of them agree.) */
.rtb-cw{position:relative;width:100%;min-width:0}
/* Picking several at once */
.rtb-tick{position:absolute;top:24px;right:-8px;z-index:2;width:32px;height:32px;border:3px solid var(--ink);border-radius:9px;background:#fff;color:var(--ink);font:800 18px/26px var(--font-ui);text-align:center;font-style:normal}
.rtb-step.marked .rtb-card{box-shadow:var(--pm-ring-sel)}
.rtb-step.marked .rtb-tick{background:var(--ink);color:#fff}
.rtb-step.picking{cursor:pointer}
.rtb-tools{margin-left:auto;display:flex;gap:8px;flex:none}
.rtb-tool{min-height:40px;padding:4px 14px;border:none;border-radius:12px;background:rgba(255,255,255,.92);color:var(--ink);font:800 14px var(--font-ui);white-space:nowrap;cursor:pointer;box-shadow:var(--shadow-card)}
.rtb-tool.warn{color:var(--pm-warn)}
.rtb-tool[disabled],.rtb-tool.off{opacity:.45;cursor:default;box-shadow:none}
.rtb-rowhead .rtb-tools{margin:0;flex-wrap:wrap}
.rtb-rowhead .rtb-tool{min-height:32px;padding:2px 8px;font-size:12px;background:var(--pm-tint)}
.rtb-add{width:var(--pm-step-w);min-height:118px;margin-top:34px;border-radius:18px;border:3px dashed rgba(255,255,255,.9);background:rgba(255,255,255,.3);color:#fff;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;font:800 14px var(--font-ui)}
.rtb-add i{font-style:normal;font-size:26px}
.rtb-sugg{flex:none;background:rgba(255,255,255,.75);border-radius:16px;padding:10px 12px}
.rtb-sugg-t{font:800 14px var(--font-ui);color:var(--ink-blue);margin-bottom:6px}
.rtb-sugg-row{display:flex;flex-wrap:wrap;gap:8px}
.rtb-chip{display:flex;align-items:center;gap:8px;min-height:var(--pm-sugg-h);border-radius:14px;background:#fff;border:2px solid var(--pm-line-soft);padding:0 12px 0 6px;font:800 16px var(--font-ui);color:var(--ink)}
.rtb-chip img{width:44px;height:40px;border-radius:9px;object-fit:cover}
.rtb-chip b{color:var(--done);font-size:20px}
.rtb-chip.done{opacity:.55}
/* setup: all four routines as rows */
.rtb-stack{display:flex;flex-direction:column;gap:10px}
.rtb-stackhead{display:flex;align-items:baseline;gap:12px}
.rtb-stackhead h2{margin:0;font:800 26px var(--font-head);color:var(--ink)}
.rtb-stackhead p{margin:0;font:700 14px var(--font-ui);color:var(--ink-blue)}
.rtb-row{display:flex;align-items:center;gap:12px;border-radius:20px;padding:10px 12px;background:linear-gradient(90deg,var(--sky-top),var(--sky-bottom))}
.rtb-row.p-afternoon{background:linear-gradient(90deg,var(--afternoon-top),var(--afternoon-bottom))}
.rtb-row.p-evening{background:linear-gradient(90deg,var(--evening-top),var(--evening-bottom))}
.rtb-row.p-night{background:linear-gradient(90deg,var(--night-top),var(--night-bottom))}
.rtb-row.on{box-shadow:0 0 0 4px var(--star)}
.rtb-rowhead{flex:none;width:190px;display:flex;flex-direction:column;gap:6px;background:rgba(255,255,255,.9);border-radius:14px;padding:8px 10px}
.rtb-rowname{display:flex;align-items:center;gap:8px;font:800 19px var(--font-head);color:var(--ink)}
.rtb-rowname em{font-style:normal;min-width:28px;height:28px;border-radius:14px;background:var(--pm-tint);font:800 14px/28px var(--font-ui);text-align:center}
.rtb-check{color:var(--done);font-style:normal;font-weight:800}
.rtb-rowhead .rtb-start{font-size:13px}
.rtb-rowhead .rtb-start select{min-height:40px;font-size:14px}
.rtb-rowcards{flex:1;min-width:0;display:flex;gap:10px;overflow-x:auto;align-items:flex-start;padding-bottom:2px;scrollbar-width:none}
.rtb-rowcards::-webkit-scrollbar{display:none}
.rtb-rowcards .rtb-step{width:104px}
.rtb-rowcards .rtb-card img{height:64px}
.rtb-rowcards .rtb-add{width:104px;min-height:96px;margin-top:34px}

/* ---------------- setup: the same screen, everything outside the step veiled ---------------- */
.pm-screen.guided .pm-bar>*:not(.save-btn):not(h1){position:relative}
.pm-screen.guided .pm-bar::after{content:'';position:absolute;inset:0 0 auto 0;height:var(--pm-bar-h);background:var(--pm-veil-bar);pointer-events:none;z-index:5}
.pm-screen.guided .pm-bar h1,.pm-screen.guided .pm-bar .save-btn{position:relative;z-index:6}
.pm-screen.guided .pm-main{box-shadow:inset 0 0 0 4px var(--drop-active);border-radius:18px}
/* the library and the panel stay live during setup: the quick chips and the card list are part of the step's own work */
.pm-nav{height:var(--pm-nav-h);flex:none;display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:12px;padding:0 20px;background:#fff;border-top:2px solid var(--pm-line-soft)}
.pm-nav .su-back{justify-self:start;min-height:64px;border:3px solid var(--ink);border-radius:16px;background:#fff;color:var(--ink);font:800 19px var(--font-head);padding:0 20px}
.pm-nav .su-mid{display:flex;flex-direction:column;align-items:center;gap:6px}
.pm-navright{justify-self:end;display:flex;align-items:center;gap:14px}
.pm-nav .su-next{min-height:64px;min-width:170px;border-radius:16px;background:var(--save);color:#fff;font:800 20px var(--font-head)}
.pm-screen .g-bubble-wrap{position:absolute;right:calc(var(--pm-side-w) + 18px);bottom:calc(var(--pm-nav-h) + 18px);z-index:30;pointer-events:none;max-width:560px}
/* placed by parent.js placeBubble(): it must never cover the library card or the day the step points at */
.pm-screen .g-bubble-wrap.placed{right:auto;bottom:auto}
.pm-screen .g-bubble{display:flex;align-items:center;gap:6px}
.pm-screen .g-bubble .bubble{background:#fff;border:3px solid var(--ink);border-radius:30px;box-shadow:0 6px 0 rgba(16,49,147,.2);padding:14px 22px;font:800 25px var(--font-head);color:var(--ink);max-width:420px}
.pm-screen .g-dots{display:flex;align-items:center;gap:5px}
.pm-screen .g-dots i{display:block;border-radius:50%;background:#fff;border:3px solid var(--ink)}
.pm-screen .g-dots i:first-child{width:20px;height:20px}
.pm-screen .g-dots i:last-child{width:12px;height:12px}
.pm-screen .g-bubble img{width:150px;height:150px;object-fit:contain}
.pm-screen .g-note{flex:none;text-align:center;font:700 14px var(--font-ui);color:var(--ink-blue);padding:6px 0 0}













/* ---------- Coming soon: the only things that will ever be sold (parent settings only) ---------- */
.fld.soon{display:flex;flex-direction:column;gap:8px}
.soon-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:10px}
.soon-tile{position:relative;background:var(--pm-fill);border:2px dashed var(--pm-line);border-radius:16px;padding:12px 14px 30px;display:flex;flex-direction:column;gap:4px}
.soon-tile b{font:800 16px var(--font-head);color:var(--ink)}
.soon-tile small{font:600 13px/1.35 var(--font-ui);color:var(--ink-muted)}
.soon-tag{position:absolute;left:14px;bottom:10px;background:var(--pm-tint);color:var(--ink-muted);border-radius:999px;padding:2px 10px;font:800 11px var(--font-ui);text-transform:uppercase;letter-spacing:.05em}

/* ---------- Setup step 7: two included features, one row each (the text used to overlap the switch) ---------- */
.su-extras{display:flex;flex-direction:column;gap:8px;width:min(620px,100%);margin:0 auto}
.su-x{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:12px;
  background:#fff;border:3px solid var(--pm-line);border-radius:16px;padding:9px 16px;text-align:left;cursor:pointer}
.su-x .su-ico{font-size:26px;line-height:1;flex:none}
.su-xtext{min-width:0;display:flex;flex-direction:column;gap:1px}
.su-xtext b{font:800 18px var(--font-head);color:var(--ink)}
.su-xtext small{font:600 14px/1.3 var(--font-ui);color:var(--ink-muted);overflow-wrap:anywhere}
.su-x .switch{flex:none}
.su-xon{font:800 15px var(--font-ui);color:var(--ink-muted);white-space:nowrap;flex:none}
.su-xnote{margin:2px 0 0;font:600 14px/1.35 var(--font-ui);color:var(--ink-muted);text-align:center}

/* Weekday + Weekend: the two versions are named, with how many cards each has */
.rtb-days.wk{flex-wrap:wrap}
.seg.rtb-wk{flex:none}
.seg.rtb-wk button{white-space:nowrap;padding:8px 16px}
.seg.rtb-wk em{font-style:normal;display:inline-block;min-width:22px;margin-left:6px;padding:0 6px;border-radius:11px;background:var(--pm-tint);font:800 13px/22px var(--font-ui)}
.seg.rtb-wk button.on em{background:rgba(255,255,255,.35);color:inherit}
.rtb-fill{margin:4px 0 0;font:600 13px var(--font-ui);color:var(--ink-muted)}

/* Settings 6, "This device" */
.fld.device{display:flex;flex-direction:column;gap:6px}
.dev-h{margin:10px 0 0;font:800 16px var(--font-head);color:var(--ink)}
.dev-tip{background:var(--pm-fill);border:2px solid var(--pm-line);border-radius:12px;padding:8px 12px}

/* The install / full-screen offer: one line at the top of Parent mode, never on a kid screen */
.inst-bar{flex:none;display:flex;align-items:center;gap:14px;padding:8px 20px;background:var(--pm-tint);color:var(--ink);border-bottom:2px solid var(--pm-line)}
.inst-bar b{font:800 16px var(--font-head)}
.inst-bar span{flex:1;min-width:0;font:700 14px/1.3 var(--font-ui);color:var(--ink-muted);overflow-wrap:anywhere}
.inst-bar .save-btn{margin-left:auto;min-height:42px;padding:4px 18px;font-size:16px}
.inst-bar .su-bx{width:36px;height:36px;font-size:16px}
/* THE full-screen control (nav.js fullscreenBtnHTML) — one button, one place, both directions.
   There was a second one until 1.6.2: a fixed chip 10px from the bottom-right corner, which sat on top of the Parent
   mode button on My week, Countdowns and School at every size (device.js says where it went and what was measured).
   Hidden unless `body.fs-shown`: this device can only get a full screen by asking for it, or it is in one now and needs
   the way back. So it is absent entirely on an iPad, an Android phone and an installed app.
   It is IN THE FLOW of the footer, first, before the tabs: that is what makes it impossible for it to cover anything.
   Round and small, so it reads as a control rather than as a fifth tab or a card.
   48px everywhere, including My day's shorter footer: it is a child's target, and at 1024 wide the whole stage is drawn
   at 0.8, so 44 would land at 35 real pixels. There is room for it in a 96px footer. */
.fs-btn{display:none}
body.fs-shown .fs-btn{display:flex;align-items:center;justify-content:center;flex:none;width:48px;height:48px;padding:0;
  border:none;border-radius:50%;background:#fff;color:var(--ink-blue);box-shadow:var(--shadow-chip);cursor:pointer;
  transition:transform .12s var(--ease-press)}
body.fs-shown .fs-btn i{font-style:normal;font:800 24px/1 var(--font-ui);transform:rotate(90deg)}
body.fs-shown .fs-btn:active{transform:translateY(2px)}
/* In full screen it is the way OUT, and it steps back: a child is looking at their week, not at this. */
body.fs-on .fs-btn{background:var(--surface-veil);box-shadow:none;opacity:.7}
body.fs-on .fs-btn:hover,body.fs-on .fs-btn:active{opacity:1}
/* the same mark, big, on the wizard's last screen */
.su-fsart{display:grid;place-items:center;width:132px;height:132px;border-radius:32px;background:#fff;
  color:var(--ink-blue);font:800 64px/1 var(--font-ui);box-shadow:var(--shadow-routine);transform:rotate(90deg)}

/* Setup: the birthday can be typed or picked */
.su-bd{border:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px;min-width:0}
.su-bd legend{padding:0;font:700 16px var(--font-ui);color:var(--ink)}
/* A date a parent can type (datefield.js): the box in their own language's order, a calendar button beside it. */
.df-row{display:flex;gap:8px;align-items:center}
.df-row .df-text{flex:1;min-width:0}
/* The calendar button. Its TEXT is hidden on purpose: a native date input renders in the browser's own locale, which
   the app cannot set, so a Spanish parent was shown 06/23/2018 beside a box asking for 23/06/2018. Only one format
   is on screen now — the one in their language — and this stays as the way to pick rather than type. */
.df-row .df-pick{flex:none;width:58px;min-width:58px;padding:0 6px;color:transparent;text-indent:-9999px}
.df-row .df-pick::-webkit-datetime-edit,.df-row .df-pick::-webkit-inner-spin-button,.df-row .df-pick::-webkit-clear-button{display:none}
.df-row .df-pick::-webkit-calendar-picker-indicator{color:var(--ink-blue);opacity:1;margin:0;padding:0;text-indent:0;transform:scale(1.4)}
.df-msg{display:block;font:600 14px var(--font-ui);color:var(--ink-muted)}
.df-msg.bad{color:var(--pm-warn);font-weight:800}

/* Cards a parent did not put in the weekly list: a one-off from Quick add, a holiday, a school day.
   They are shown so the board matches what the child will see, with the source said plainly. */
.wkb-tile.extra{position:relative;opacity:.94;border-style:dashed}
.wkb-src{display:block;font:800 9px var(--font-ui);text-transform:uppercase;letter-spacing:.05em;opacity:.75}
.wkb-tile.src-holiday,.wkb-tile.src-school,.wkb-tile.src-event{cursor:default}

/* A card that comes back every week says so, quietly */
.wkb-rep{position:absolute;top:2px;left:4px;font:800 12px/1 var(--font-ui);font-style:normal;color:#fff;opacity:.72;text-shadow:0 1px 2px rgba(16,49,147,.5)}
.wkb-tile{position:relative}
.wkb-tile.extra .wkb-rep{display:none}
.pm-rmq{display:block;font:700 13px var(--font-ui);color:var(--ink-muted);margin-bottom:2px}
.seg.pm-how button{flex:1;white-space:nowrap}

/* A weekly card sitting out this one week: still part of the rule, just not on this date */
.wkb-tile.skipped{opacity:.42}
.wkb-tile.skipped .lbl{text-decoration:line-through}
.wkb-off{display:block;font:800 9px var(--font-ui);text-transform:uppercase;letter-spacing:.04em;background:var(--ink);color:#fff;border-radius:6px;padding:1px 4px;margin:2px auto 0;width:max-content}

.g-dots{display:none}          /* the thought-bubble dots: Coco is talking, not thinking */

/* The day names are written out; the three-letter form appears only where the column is too narrow for the word. */
.wkb-dh{container-type:inline-size}
.wkb-dh .d-abbr{display:none}
@container (max-width: 118px){
  .wkb-dh .d-full{display:none}
  .wkb-dh .d-abbr{display:inline}
}
@supports not (container-type: inline-size){   /* old browsers: keep the short form rather than a clipped word */
  .wkb-dh .d-full{display:none}
  .wkb-dh .d-abbr{display:inline}
}

/* The category rail says which category each icon is (it used to be a tooltip only) */
.pm-cat{position:relative;display:flex;flex-direction:column;align-items:center;gap:1px;height:auto;padding:4px 2px 5px}
.pm-cat em{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;
  font:800 9px/1.1 var(--font-ui);font-style:normal;color:var(--ink-muted);text-align:center;max-width:100%;overflow-wrap:anywhere}
.pm-cat.on em{color:var(--ink)}

/* ---- Signing in (signinui.js) ------------------------------------------------------------------
   One card in the middle of the screen, the same shape as the About card. It is the first thing a
   parent sees on a device with an account service behind it, so it has to carry the mark, work at
   1024 wide and leave an obvious way past it. */
/* "Add Kidspired to your home screen" (installui.js) — the same card as the sign-in screen, because it comes straight
   after it and a parent should feel they are still in the same conversation. Scrolls rather than clips: the iPad branch
   carries a picture and three steps, which is the tallest thing either screen ever holds. */
.screen.install{background:var(--parent-bg);display:flex;align-items:center;justify-content:center;padding:24px}
.in-card{width:min(520px,100%);max-height:100%;overflow-y:auto;background:#fff;border-radius:var(--radius-panel);
  padding:26px 30px;box-shadow:var(--shadow-lift);text-align:center;display:flex;flex-direction:column;gap:10px;align-items:center}
.in-mark{height:56px;width:auto;max-width:200px}
.in-card h1{margin:0;font:800 28px/1.15 var(--font-head);color:var(--ink)}
.in-h{margin:2px 0 0;font:800 18px var(--font-head);color:var(--ink)}
.in-lead{margin:0;font:700 16px/1.4 var(--font-ui);color:var(--ink);max-width:420px}
.in-note{margin:0;font:700 13px/1.4 var(--font-ui);color:var(--ink-muted);max-width:430px}
.in-card .su-start,.in-card .sm.wide{width:100%}
.in-pic{width:min(220px,70%);height:auto}
.in-steps{margin:0;padding:0 0 0 22px;text-align:left;align-self:stretch;display:flex;flex-direction:column;gap:6px;
  font:700 15px/1.35 var(--font-ui);color:var(--ink)}
.in-steps li{margin:0}
.in-later{width:100%;border-top:2px solid var(--pm-line);padding-top:10px;margin-top:2px;
  display:flex;flex-direction:column;align-items:center;gap:4px}
@media (max-height:700px){
  .in-card{gap:7px;padding:18px 22px}
  .in-mark{height:44px}
  .in-card h1{font-size:23px}
  .in-pic{width:min(170px,50%)}
}

.screen.signin{background:var(--parent-bg);display:flex;align-items:center;justify-content:center;padding:24px}
/* **A PAGE SCROLLS; A PICTURE CANNOT.** `html,body` are `overflow:hidden` and `#stage` was too, which is right for
   a board — a child must not be able to scroll the week off the screen. For a page it meant that when the soft
   keyboard shortened the viewport there was nowhere to go: measured `scrollHeight === clientHeight` on every Fire
   size, so a field under the keyboard was unreachable. `#screen` keeps its absolute insets, because that is where
   the safe-area padding lives, and takes the scrolling; the section inside it goes relative so it can be TALLER
   than the viewport instead of being clipped to it. (ui.js `PAGES` has the rest of the reasoning.) */
html[data-page] #screen{overflow-y:auto;-webkit-overflow-scrolling:touch}
html[data-page] .screen{position:relative;inset:auto;min-height:100%}
/* `margin:auto` rather than the parent's `align-items:center`: a centred flex ITEM that outgrows its container
   overflows both ways and the top of it cannot be scrolled to, which is exactly the case a keyboard creates. */
html[data-page] .screen.signin{align-items:flex-start}
html[data-page] .si-card{margin:auto;max-height:none}
.si-card{width:min(520px,100%);max-height:100%;overflow-y:auto;background:#fff;border-radius:var(--radius-panel);
  padding:26px 30px;box-shadow:var(--shadow-lift);text-align:center;display:flex;flex-direction:column;gap:10px;align-items:center}
.si-mark{height:64px;width:auto;max-width:200px}
.si-card h1{margin:0;font:800 32px var(--font-head);color:var(--ink)}
.si-lead{margin:0;font:700 16px/1.4 var(--font-ui);color:var(--ink-muted);max-width:420px}
.si-lang{margin:2px 0 2px}
.si-field{width:100%;display:flex;flex-direction:column;gap:6px;text-align:left;font:800 14px var(--font-ui);color:var(--ink)}
.si-field input{width:100%;min-height:52px;padding:10px 14px;border:2px solid var(--pm-line);border-radius:14px;
  background:#fff;font:700 18px var(--font-ui);color:var(--ink)}
.si-field input:focus{outline:none;border-color:var(--ink-blue)}
.si-card .save-btn.wide,.si-card .sm.wide{width:100%}
.si-note{margin:0;font:700 13px/1.4 var(--font-ui);color:var(--ink-muted);max-width:420px}
.si-msg{margin:0;width:100%;padding:9px 12px;border-radius:12px;font:800 14px/1.35 var(--font-ui)}
.si-msg.warn{background:rgba(255,166,46,.2);color:var(--ink)}
.si-sent{width:100%;display:flex;flex-direction:column;align-items:center;gap:6px;
  background:var(--pm-fill);border:2px solid var(--pm-line);border-radius:16px;padding:14px 16px}
.si-tick{font-size:36px;line-height:1}
.si-sent h2{margin:0;font:800 22px var(--font-head);color:var(--ink)}
.si-line{margin:0;font:700 15px/1.4 var(--font-ui);color:var(--ink);overflow-wrap:anywhere}
.si-later{width:100%;border-top:2px solid var(--pm-line);padding-top:10px;margin-top:2px;
  display:flex;flex-direction:column;align-items:center;gap:2px}
/* "Have a code?" sits BESIDE the email field, not under the send button: a parent standing at the tablet with the code
   already on their phone should see the other way in at the moment they look at the field, not after they have used it.
   The row is allowed to wrap, so at 1024 (and in French, where the label is longest) nothing is ever pushed off. */
.si-fieldrow{width:100%;display:flex;flex-wrap:wrap;align-items:flex-end;gap:8px 12px}
.si-fieldrow .si-field{flex:1 1 220px;min-width:0;width:auto}
.si-have{flex:0 0 auto;min-height:44px;white-space:nowrap}
/* the code box itself: one wide field, spaced digits, because it is read off a phone a foot away */
.si-code input{letter-spacing:.18em;text-align:center;font-variant-numeric:tabular-nums}
.si-h2{margin:0;font:800 22px var(--font-head);color:var(--ink)}
@media (max-height:700px){
  .si-card{gap:7px;padding:18px 22px}
  .si-mark{height:48px}
  .si-card h1{font-size:26px}
}
/* **THE ACTION HAS TO BE ABOVE THE FOLD, AND NO COPY PAYS FOR IT.** Off the stage the card is its natural 482px,
   which a Fire 7 in landscape (344 CSS px) cannot show: "Send me a link" ended at 419 and had to be scrolled to.
   Measured where those 482 come from, and every one of them is ABOVE the button — the trial note and the "no
   password" line are already below it, so reordering buys nothing and dropping the note would buy nothing either.
   The 75px comes out of the decoration and the type scale instead: the mark, the heading, the lead's size and the
   gaps. The lead still lands at ~3.1mm of glass against the 1.5mm it used to get on the stage, so this is a tighter
   page, not a smaller one. 420 rather than 470: the HD 8 (477) already fits and must not be shrunk for nothing. */
@media (max-height:420px){
  .si-card{gap:4px;padding:12px 20px}
  .si-mark{height:24px}
  .si-card h1{font-size:20px}
  .si-lead{font-size:14px}
}

/* ---- Parent settings 7: the account ---- */
.fld.acct{display:flex;flex-direction:column;gap:8px}
.acct-who{display:flex;flex-direction:column;gap:1px;background:var(--pm-fill);border:2px solid var(--pm-line);
  border-radius:14px;padding:9px 12px}
.acct-lbl{font:800 12px var(--font-ui);color:var(--ink-muted);text-transform:uppercase;letter-spacing:.04em}
.acct-email{font:800 17px var(--font-ui);color:var(--ink);overflow-wrap:anywhere}
.acct-sync{align-self:flex-start;margin:0}

/* The status chip has two more things to say once there is an account to sync with. */
.net-chip.sync{background:rgba(74,188,233,.22)}
.net-chip.sync i{background:var(--ink-blue);animation:netPulse 1.1s ease-in-out infinite}
.net-chip.wait{background:rgba(255,166,46,.22)}
.net-chip.wait i{background:var(--star)}
@keyframes netPulse{0%,100%{opacity:1}50%{opacity:.25}}
@media (prefers-reduced-motion:reduce){.net-chip.sync i{animation:none}}

/* A change arrived from another device while a parent is editing: the top bar offers it rather than taking it. */
.pm-pull{display:inline-flex;align-items:center;gap:5px;width:auto;padding:0 12px;border-radius:999px;
  background:var(--star);color:var(--ink);font:800 13px var(--font-ui);white-space:nowrap}
.pm-pull:active{transform:translateY(1px)}

/* The School screen's header is My week's header: same control, same place (weekbar.js weekHeadHTML). */
.screen.school .wk-head.sc-head{display:flex;align-items:center;gap:12px;height:74px;flex:none;padding:0 4px}
.screen.school .wk-head.sc-head .wk-banner{width:auto;flex:0 1 560px;min-width:240px}

/* "Who uses this device?" (parent settings, This device). Device-local, never synced. */
.fld.who{display:flex;flex-direction:column;gap:6px}
.who-opts{display:flex;flex-wrap:wrap;gap:6px}
.who-opt{display:inline-flex;align-items:center;gap:7px;min-height:48px;padding:4px 14px;border-radius:14px;
  border:3px solid var(--pm-line);background:#fff;color:var(--ink);font:800 15px var(--font-ui);cursor:pointer;max-width:100%}
.who-opt span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.who-opt.on{border-color:var(--kc,var(--ink-blue));background:color-mix(in srgb,var(--kc,var(--ink-blue)) 12%,#fff)}

/* ---- The family's devices (devicesui.js) --------------------------------------------------------- */
.fld.dv{display:flex;flex-direction:column;gap:8px}
.dv-head{display:flex;align-items:baseline;gap:10px;flex-wrap:wrap}
.dv-head b{font:800 17px var(--font-head);color:var(--ink)}
.dv-list{display:flex;flex-direction:column;gap:6px}
.dv-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap;background:var(--pm-fill);border:2px solid var(--pm-line);border-radius:14px;padding:8px 10px}
.dv-row.cur{border-color:var(--ink-blue)}
.dv-what{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}
.dv-what b{font:800 16px var(--font-ui);color:var(--ink);overflow-wrap:anywhere}
.dv-what small{font:700 13px var(--font-ui);color:var(--ink-muted);overflow-wrap:anywhere}
.dv-cur{flex:none;font:800 12px var(--font-ui);color:var(--ink-blue);background:rgba(74,188,233,.18);border-radius:999px;padding:3px 10px;white-space:nowrap}
.dv-row .sm.warn{color:#B3261E;border-color:rgba(179,38,30,.35)}

/* the two whole-screen states: all devices in use, and this one removed */
.screen.devices{background:var(--parent-bg);display:flex;align-items:center;justify-content:center;padding:24px}
.dv-card{width:min(620px,100%);max-height:100%;overflow-y:auto;background:#fff;border-radius:var(--radius-panel);
  padding:26px 30px;box-shadow:var(--shadow-lift);text-align:center;display:flex;flex-direction:column;gap:12px;align-items:center}
.dv-mark{height:56px;width:auto;max-width:180px}
.dv-card h1{margin:0;font:800 28px/1.15 var(--font-head);color:var(--ink)}
.dv-lead{margin:0;font:700 16px/1.4 var(--font-ui);color:var(--ink-muted);max-width:460px}
.dv-card .dv-list{width:100%;text-align:left}
.dv-card .save-btn.wide{width:100%}
.dv-card .save-btn[disabled]{opacity:.45}
.dv-later{width:100%;border-top:2px solid var(--pm-line);padding-top:10px;display:flex;flex-direction:column;align-items:center;gap:2px}
.dv-note{margin:0;font:700 13px/1.4 var(--font-ui);color:var(--ink-muted);max-width:440px}
@media (max-height:700px){.dv-card{gap:8px;padding:18px 22px}.dv-mark{height:44px}.dv-card h1{font-size:23px}}

/* A countdown chip whose family uploaded their own photo shows it, round, in place of the emoji
   (countdowns.js faceOf). Small, but it is their picture and they recognise it. */
.ichip.cd .wxi.ph{width:26px;height:26px;flex:none;border-radius:50%;overflow:hidden;display:inline-block;
  box-shadow:0 0 0 2px rgba(16,49,147,.18)}
.ichip.cd .wxi.ph img{width:100%;height:100%;object-fit:cover;display:block}
.ichip.cd.compact .wxi.ph{width:22px;height:22px}

/* ================================================================================================================
   PARENT MODE - SHARED COMPONENTS (pmparts.js, design handoff 7a)
   One component and one set of words per concept. Every colour, radius and font here is a token already in use; the
   handoff is an information-architecture pass, so nothing below introduces a new visual language.
   ================================================================================================================ */

/* ---- scope chip: who this applies to. The child's own colour rings the avatar, so the chip carries the same
   identity mark the header picker and the board columns already use. */
.pm-scope{position:relative;display:inline-flex;flex:none}
.pm-scopebtn{display:flex;align-items:center;gap:7px;min-height:44px;padding:0 10px 0 6px;border-radius:14px;
  background:var(--pm-tint);border:2px solid var(--kc,var(--pm-line));font:800 15px var(--font-ui);color:var(--ink);white-space:nowrap}
.pm-scopebtn b{font-weight:800}
.pm-scopebtn em{font-style:normal;font-size:12px;opacity:.7}
.pm-scope .avbub{flex:none}
.pm-scope .pm-dots{display:flex}
.pm-scope .pm-dots i{width:16px;height:16px;border-radius:50%;display:block;box-shadow:0 0 0 2px #fff}
.pm-scope .pm-dots i+i{margin-left:-7px}     /* two overlapping dots: the mark for "all children" */
.pm-scopemenu{position:absolute;top:calc(100% + 6px);left:0;z-index:70;background:#fff;border-radius:16px;
  box-shadow:var(--shadow-fold);padding:6px;min-width:216px;display:flex;flex-direction:column;gap:2px}
.pm-scopemenu button{display:flex;align-items:center;gap:9px;min-height:46px;border-radius:12px;padding:0 11px;
  font:800 16px var(--font-ui);color:var(--ink);background:#fff;text-align:left;white-space:nowrap}
.pm-scopemenu button.on{background:var(--pm-tint)}
/* ---- a scope is a SET: every row is a tick box, and the menu stays open while they are ticked. The box is drawn
   rather than an ✓ glyph so an unticked row still reserves its width and the names do not shuffle sideways. */
.pm-tick{flex:none;width:22px;height:22px;border-radius:7px;border:2.5px solid var(--pm-line);background:#fff;position:relative}
.pm-scopemenu.multi button.on .pm-tick,.pm-childmenu.multi button.on .pm-tick{background:var(--ok,#2C9E4B);border-color:var(--ok,#2C9E4B)}
.pm-scopemenu.multi button.on .pm-tick::after,.pm-childmenu.multi button.on .pm-tick::after{
  content:'';position:absolute;left:6px;top:2px;width:5px;height:10px;border:solid #fff;border-width:0 2.5px 2.5px 0;transform:rotate(45deg)}
.pm-scopeall{border-top:2px solid var(--pm-line-soft);margin-top:4px;padding-top:4px}
.pm-childmenu.multi button{display:flex;align-items:center;gap:9px}
/* the explicit end a tick list needs: a single-select confirms by closing, this cannot */
.pm-menudone{justify-content:center;background:var(--ok,#2C9E4B) !important;color:#fff !important;margin-top:4px}
/* where an add will land, said before the button that does it */
.pm-goesto{font:700 13px var(--font-ui);color:var(--ink-muted);margin:0 0 6px}

/* ---- the same face as the chip, as a LABEL: no tint, no border, no ▾, nothing that invites a tap. Every place that
   only needs to SAY who uses this, because a chip that opens nothing reads as broken. */
.pm-scopename{display:inline-flex;align-items:center;gap:7px;min-height:30px;flex:none;
  font:800 15px var(--font-ui);color:var(--ink);white-space:nowrap}
.pm-scopename .avbub{flex:none}
.pm-scopename .pm-dots{display:flex}
.pm-scopename .pm-dots i{width:16px;height:16px;border-radius:50%;display:block;box-shadow:0 0 0 2px #fff}
.pm-scopename .pm-dots i+i{margin-left:-7px}
.pm-side .pm-scopename{max-width:100%}
.pm-side .pm-scopename span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
/* whose board this card is on: a sentence, shown only when the picker says All children */
.pm-whose{font:700 13px var(--font-ui);color:var(--ink-muted);margin:0 0 2px}

/* ---- read-only tags, for a setting that cannot be per child. Three, and they never open a menu. */
.pm-scopetag{display:inline-flex;align-items:center;min-height:30px;padding:0 10px;border-radius:10px;flex:none;
  font:800 12px var(--font-ui);text-transform:uppercase;letter-spacing:.04em;white-space:nowrap}
.pm-scopetag.family{background:#E4EEFA;color:#103193}
.pm-scopetag.device{background:#E6F5E6;color:#2C6E2F}
.pm-scopetag.each{background:#FFF0DA;color:var(--pm-ink-amber)}

/* ---- How often: six choices, wrapping in three columns so no label is ever squeezed (French "Fins de semaine" and
   "Jours au choix" are the long ones). Custom days reveals the seven day chips. */
.pm-howfld{display:flex;flex-direction:column;gap:7px}
.pm-oftens{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
.pm-often{min-height:46px;border-radius:12px;border:2px solid var(--pm-line);background:#fff;color:var(--ink);
  font:800 14px/1.15 var(--font-ui);padding:4px 6px;text-wrap:balance}
.pm-often.on{background:var(--ink);border-color:var(--ink);color:#fff}
.pm-oftendays{display:flex;gap:5px}
.pm-oftenday{flex:1;min-width:0;min-height:46px;border-radius:12px;border:2px solid var(--pm-line);background:#fff;
  color:var(--ink);font:800 16px var(--font-ui)}
.pm-oftenday.on{background:var(--star);border-color:var(--star);color:var(--ink)}
.pm-oftensum{display:block}
.pm-oftencompact{display:inline-flex;align-items:center;gap:6px;min-height:44px;padding:0 12px;border-radius:14px;
  border:2px solid var(--pm-line);background:#fff;color:var(--ink);font:800 15px var(--font-ui);white-space:nowrap}
.pm-oftencompact em{font-style:normal;font-size:12px;opacity:.7}

/* ---- the time picker: one button that always says what it holds, "No time" included. */
.pm-timebtn{display:inline-flex;align-items:center;gap:6px;min-height:44px;padding:0 12px;border-radius:14px;
  border:2px solid var(--pm-line);background:#fff;color:var(--ink);font:800 15px var(--font-ui);white-space:nowrap}
.pm-timebtn.set{border-color:var(--ink)}
.pm-timedlg .pm-timemode{display:flex;gap:4px}
.pm-timedlg .pm-timeslots{display:flex;gap:8px}
.pm-timedlg .pm-timeslots select{flex:1;min-width:0}

/* ---- a toolbar button. The three that end every board tab's toolbar (Copy to. / Clear. / Options) are one shape. */
.pm-tool{display:inline-flex;align-items:center;gap:6px;min-height:46px;padding:0 13px;border-radius:14px;flex:none;
  border:2px solid var(--pm-line);background:#fff;color:var(--ink);font:800 15px var(--font-ui);white-space:nowrap}
.pm-tool:disabled{opacity:.45}
.pm-tool.warn{color:var(--pm-warn);border-color:#F0CDD2}
.pm-tool.pm-opt.on{background:var(--ink);border-color:var(--ink);color:#fff}

/* ---- Clear confirmation and the undo toast */
.pm-cleardlg .pm-clearwho{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.undo-toast{display:flex;align-items:center;gap:12px}
.undo-toast-btn{min-height:40px;padding:0 12px;border-radius:12px;background:#fff;color:var(--ink);
  font:800 15px var(--font-ui);white-space:nowrap}

/* ---- Options drawer: over the right panel, with the board dimmed behind it. The panel is not replaced, so closing
   the drawer puts back whatever the parent had selected. */
.pm-drawer{position:absolute;top:0;right:0;bottom:0;width:400px;max-width:100%;z-index:65;background:#fff;
  border-left:2px solid var(--pm-line-soft);box-shadow:var(--shadow-fold);display:flex;flex-direction:column}
.pm-drawerhead{flex:none;display:flex;align-items:center;gap:10px;min-height:60px;padding:0 12px 0 16px;
  border-bottom:2px solid var(--pm-line-soft)}
.pm-drawerhead b{flex:1;min-width:0;font:800 20px var(--font-head);color:var(--ink)}
.pm-drawerhead .pm-x{width:40px;height:40px;flex:none;border-radius:12px;background:var(--pm-fill);color:var(--ink);
  font:800 17px var(--font-head)}
.pm-drawerscope{flex:none;padding:10px 16px 0}
.pm-drawer-in{flex:1;min-height:0;overflow-y:auto;padding:12px 16px 20px;display:flex;flex-direction:column;gap:12px}
.pm{position:relative}
/* The veil is anchored to .pm-main itself, not to .pm: without `position:relative` here it resolves against the row
   and washes the DRAWER out too, which is the one thing it must not touch. */
.pm-screen.drawer-open .pm-main{position:relative}
.pm-screen.drawer-open .pm-main::after{content:"";position:absolute;inset:0;background:var(--pm-veil);opacity:.5;pointer-events:none;z-index:3}
.pm-drawer .row{display:flex;align-items:center;gap:12px}
.pm-drawer .row>span{flex:1;min-width:0}
.pm-drawer .row .always{flex:none}
.pm-drawer .fld{display:flex;flex-direction:column;gap:6px}

/* ---- deleting a child: the name is typed, and the field is as wide as the dialog */
.pm-deldlg label{display:flex;flex-direction:column;gap:5px;font:800 15px var(--font-ui);color:var(--ink)}
.pm-deldlg input{min-height:48px;border:2px solid var(--pm-line);border-radius:12px;padding:0 12px;
  font:700 17px var(--font-ui);color:var(--ink)}

/* ================================================================ THE GAME (gameui.js)
   The control on My week, the five-question screen, and the hint sheet. Nothing here is fixed-position and nothing
   here has a fixed height that its own words can overflow — the two mistakes the footer chip and the routine tip
   each cost a release. */

/* ---- the pill in `.info-row`, and Coco's one offer beside it -------------------------------------------------- */
/* **56 stage px, not the `.pill` family's 52 — and the arithmetic is the `--k` trap CONTEXT names.** At 1024 wide
   `ui.js fit()` draws the stage at 0.8, so 52 lands at 41.6 REAL pixels and 56 lands at 44.8. This is a control a
   child aims at on the smallest tablet the app supports, so it is measured in real pixels rather than in stage ones.
   56 is also `.info-row`'s own min-height, so the pill costs the row no extra height. */
.gm-pill{display:flex;align-items:center;gap:10px;background:var(--star);color:#fff;border-radius:var(--radius-chip);
  box-shadow:var(--shadow-chip);padding:4px 20px 4px 14px;min-height:56px;font:800 24px var(--font-head);
  transition:transform .12s var(--ease-press)}
.gm-pill i{font-size:26px;line-height:1;font-style:normal}
.gm-pill:active{transform:translateY(2px)}
.gm-offer{display:flex;align-items:center;gap:8px;background:#fff;border-radius:var(--radius-chip);
  box-shadow:var(--shadow-chip);padding:4px 8px 4px 16px;min-height:56px;max-width:360px}
/* Coco's question is a CONTROL, not a label: a child taps the words, and for one release that did nothing at all.
   It is a sibling of the ✕ rather than wrapping it — a button cannot nest inside a button. */
.gm-offer-q{flex:1;min-width:0;text-align:left;padding:4px 6px 4px 0;min-height:44px;display:flex;align-items:center;background:none}
.gm-offer b{font:700 17px/1.2 var(--font-ui);color:var(--ink)}
.gm-offer .su-bx{width:38px;height:38px;font-size:17px}

/* ---- the screen ----------------------------------------------------------------------------------------------- */
/* No `position` of its own: `.screen` is already `absolute; inset:0`, which both fills the stage AND gives the hint
   sheet its containing block. Setting `position:relative` here took the `inset:0` away and left the screen half its
   height, with the footer floating in the middle of the sky. */
.screen.game{display:flex;flex-direction:column;gap:8px;padding:10px 16px 0}
.gm-head{flex:none;display:flex;align-items:center;gap:12px;min-height:74px;flex-wrap:wrap}
.gm-head .banner{width:auto}
.gm-head .banner-in{padding:0 26px;font:800 30px var(--font-head)}
.gm-count{display:flex;flex-direction:column;align-items:flex-end;gap:6px;background:#fff;border-radius:var(--radius-chip);
  box-shadow:var(--shadow-chip);padding:8px 18px;flex:none}
.gm-count b{font:800 20px var(--font-head);color:var(--ink-blue)}
.gm-dots{display:flex;gap:6px}
.gm-dots i{width:12px;height:12px;border-radius:50%;background:rgba(16,49,147,.16)}
.gm-dots i.on{background:var(--star)}
.gm-dots i.now{background:var(--ink-blue);transform:scale(1.25)}
/* Centred, with `safe` so a screen too short for the content still starts at the top rather than clipping it into
   the scroller — the classic centred-flex overflow trap. The plain `center` above it is the fallback. */
.gm-body{flex:1;min-height:0;display:flex;flex-direction:column;gap:14px;align-items:center;
  justify-content:center;justify-content:safe center;overflow-y:auto;padding-bottom:6px}
/* The question is the replay control: tap it to hear it again. A <button>, so it is reachable by keyboard and named
   for a screen reader, but it keeps the card it always was — nothing about it should read as "one of the answers". */
.gm-q{flex:none;max-width:1100px;text-align:center;background:#fff;border-radius:22px;box-shadow:var(--shadow-chip);
  padding:14px 26px;display:flex;align-items:center;justify-content:center;gap:14px;cursor:pointer}
.gm-q b{font:800 34px/1.2 var(--font-head);color:var(--ink)}
.gm-qspk{flex:none;font-style:normal;font-size:26px;line-height:1;opacity:.55}
.gm-q:active{transform:scale(.985)}
.gm-face{background:none;padding:0;border-radius:50%;cursor:pointer}
.gm-face:active{transform:scale(.96)}

/* Options. A row that wraps, never a fixed grid: four French subject names and four card names are not the same
   width, and squeezing a label is what CONTEXT forbids. */
.gm-opts{display:flex;flex-wrap:wrap;gap:14px;justify-content:center;align-items:stretch;max-width:1180px}
.gm-opt{background:#fff;border:4px solid transparent;border-radius:20px;box-shadow:var(--shadow-card);
  padding:14px 22px;min-height:88px;min-width:190px;display:flex;flex-direction:column;align-items:center;
  justify-content:center;gap:8px;transition:transform .12s var(--ease-press)}
.gm-opt b{font:800 26px/1.15 var(--font-head);color:var(--ink);text-align:center}
.gm-opt:active{transform:translateY(2px)}
.gm-opt.picture{min-width:210px;padding:10px}
.gm-opt.picture img{width:190px;height:128px;object-fit:cover;border-radius:14px}
.gm-opt .clockface{color:var(--ink-blue)}
.gm-opt.right{border-color:var(--save);background:#f2fbf3}
.gm-opt.wrong{border-color:var(--danger);opacity:.72}
.gm-opt[disabled]{cursor:default}

/* The 9+ number pad. An on-screen keypad rather than a text field: a system keyboard over a full-screen kid app
   covers half the question. */
.gm-num{display:flex;flex-direction:column;align-items:center;gap:10px}
.gm-typed{min-width:180px;text-align:center;background:#fff;border-radius:18px;box-shadow:var(--shadow-chip);
  padding:6px 20px;font:800 44px/1.1 var(--font-head);color:var(--ink)}
.gm-typed.right{color:var(--save)}.gm-typed.wrong{color:var(--danger)}
.gm-pad{display:grid;grid-template-columns:repeat(3,92px);gap:10px}
.gm-pad button{min-height:64px;border-radius:16px;background:#fff;box-shadow:var(--shadow-chip);
  font:800 28px var(--font-head);color:var(--ink)}
.gm-pad button.ok{background:var(--save);color:#fff}
.gm-pad button[disabled]{opacity:.45}

/* Coco's answer. Always warm, never a mark: the right answer is said either way and nothing is counted. */
.gm-told{display:flex;align-items:center;gap:16px;flex-wrap:wrap;justify-content:center;max-width:1100px;
  background:var(--surface-veil);border-radius:22px;padding:12px 20px}
.gm-told p{flex:1;min-width:260px;font:700 24px/1.3 var(--font-ui);color:var(--ink)}
/* why the answer is the answer: quieter than the answer, on its own line, never competing with Next */
.gm-told .gm-why{flex:1 0 100%;min-width:0;font:700 18px/1.35 var(--font-ui);color:var(--ink-blue);margin:2px 0 0}
.gm-told p b{font:800 26px var(--font-head);color:var(--ink-blue);margin-right:6px}
.gm-face img,.gm-face .avbub,.gm-face .pmascot{flex:none}
.gm-big{background:var(--save);color:#fff;border-radius:18px;padding:12px 34px;font:800 26px var(--font-head);
  min-height:62px;box-shadow:var(--shadow-chip)}
.gm-big.alt{background:#fff;color:var(--ink)}
.gm-end{display:flex;flex-direction:column;align-items:center;gap:16px;text-align:center;padding-top:10px}
.gm-msg{font:800 30px/1.25 var(--font-head);color:var(--ink);max-width:820px}
.gm-btns{display:flex;gap:14px;flex-wrap:wrap;justify-content:center}

/* The hint's button: its own full-width row above the footer, the shape `.rt-tip` had to become. */
.gm-hintbar{flex:none;display:flex;justify-content:center;padding:4px 0 6px}
.gm-hintbtn{background:#fff;border-radius:var(--radius-chip);box-shadow:var(--shadow-chip);padding:10px 26px;
  min-height:52px;font:800 22px var(--font-head);color:var(--ink-blue)}
.gm-foot .pill.small{font-size:18px;padding:6px 16px}

/* ---- the hint sheet: over the lower half, the question still readable above it ---------------------------------- */
/* **Its top is written by JS, not fixed here, so the question is never covered.** A French question wraps to two
   lines where a Spanish one does not, so any single height is wrong for one of them; `gameui.js openHint` measures the
   question block and starts the sheet below it. That is the whole point of a hint inside the game — a child reads
   their own board without losing the question they are reading it for. The 50% here is only a starting value. */
.gm-sheet{position:absolute;left:0;right:0;bottom:0;top:50%;z-index:40;display:flex;align-items:flex-end}
.gm-sheet-in{width:100%;height:100%;background:#fff;border-radius:26px 26px 0 0;box-shadow:var(--shadow-lift);
  display:flex;flex-direction:column;overflow:hidden}
.gm-sheet-in>header{flex:none;display:flex;align-items:center;gap:12px;padding:10px 18px;border-bottom:2px solid rgba(16,49,147,.1)}
.gm-sheet-in>header b{font:800 24px var(--font-head);color:var(--ink)}
.gm-sheet-in>header em{flex:1;font:700 16px var(--font-ui);font-style:normal;color:var(--ink-muted)}
.gm-sheet-body{flex:1;min-height:0;overflow:auto;padding:12px 18px 18px}
.gh-empty,.gh-none{font:700 18px var(--font-ui);color:var(--ink-muted)}
.gh-week{display:grid;grid-template-columns:repeat(7,1fr);gap:8px}
.gh-col{min-width:0;display:flex;flex-direction:column;gap:6px}
.gh-col>b{display:block;text-align:center;border-radius:10px;padding:4px 2px;color:#fff;font:800 13px var(--font-ui);
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.gh-col.on{outline:3px solid var(--star);outline-offset:3px;border-radius:12px}
.gh-cards{display:flex;flex-direction:column;gap:6px;min-width:0}
.gh-c{display:flex;flex-direction:column;align-items:center;gap:2px;min-width:0}
.gh-c img{width:100%;height:64px;object-fit:cover;border-radius:8px}
.gh-c em{font:700 11px/1.1 var(--font-ui);font-style:normal;text-align:center;color:var(--ink);overflow:hidden}
.gh-rt h3,.gm-sheet-body h3{font:800 20px var(--font-head);color:var(--ink-blue);margin:8px 0 6px}
.gh-steps{display:flex;flex-wrap:wrap;gap:10px}
.gh-s,.gh-ev{display:flex;flex-direction:column;align-items:center;gap:3px;width:104px}
.gh-s i{font:800 14px var(--font-ui);font-style:normal;color:var(--ink-muted)}
.gh-s img,.gh-ev img{width:72px;height:56px;object-fit:cover;border-radius:10px}
.gh-s em,.gh-ev em{font:700 13px/1.15 var(--font-ui);font-style:normal;text-align:center;color:var(--ink)}
.gh-cds{display:flex;flex-wrap:wrap;gap:14px}
.gh-cd{display:flex;flex-direction:column;align-items:center;gap:4px;width:200px}
.gh-cd img{width:180px;height:120px;object-fit:cover;border-radius:14px}
.gh-cd i{font-size:58px;font-style:normal}
.gh-cd b{font:800 18px/1.15 var(--font-head);text-align:center;color:var(--ink)}
.gh-cd em{font:700 14px var(--font-ui);font-style:normal;color:var(--ink-muted)}
.gh-cd span{font:800 20px var(--font-head);color:var(--star)}
.gh-cal{max-width:520px}
.gh-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:4px;text-align:center}
.gh-grid b{font:800 13px var(--font-ui);color:var(--ink-muted);padding:2px 0}
.gh-grid span{font:700 17px var(--font-ui);color:var(--ink);padding:6px 0;border-radius:9px}
.gh-grid span.on{background:var(--star);color:#fff;font-weight:800}
.gh-times{display:flex;flex-wrap:wrap;gap:14px}
.gh-t{display:flex;flex-direction:column;align-items:center;gap:2px;width:120px;color:var(--ink-blue)}
.gh-t b{font:800 18px var(--font-head);color:var(--ink)}
.gh-t em{font:700 13px/1.15 var(--font-ui);font-style:normal;text-align:center;color:var(--ink-muted)}

/* 1024x768 and the shorter 1280x752: the question and the options give up height before anything is clipped. */
@media (max-height:780px){
  .gm-q b{font-size:28px}
  .gm-opt{min-height:74px;padding:10px 18px}
  .gm-opt b{font-size:22px}
  .gm-opt.picture img{width:164px;height:104px}
  .gm-pad{grid-template-columns:repeat(3,78px)}
  .gm-pad button{min-height:54px;font-size:24px}
  .gm-msg{font-size:26px}
}


/* ================================================================================================================
   PARENT MODE - SETTINGS, six groups by SCOPE (design handoff 1a-1d)
   Two panes: the "On this page" rail the Countdowns page already uses, and a column of collapsible group cards. The
   group card is the app's own <details class="hol-list">, so nothing here is a new kind of panel.
   ================================================================================================================ */
.pm-settings .pm-set{padding:14px 18px}
.pm-setpage{max-width:var(--pm-form-max);margin:0 auto;display:flex;flex-direction:column;gap:12px}
.pm-setrail .pm-pagerailb{flex-direction:column;align-items:flex-start;gap:4px;height:auto;padding:9px 11px;text-align:left}
.pm-setrail .pm-pagerailb b{white-space:normal;text-wrap:balance}

/* A group card. Its summary is one row: icon, name, scope tag, and - when it is shut - what is inside it. */
.pm-setgrp>summary{display:flex;align-items:center;gap:9px;flex-wrap:wrap}
.pm-setgrp>summary .pm-setname{font:800 19px var(--font-head);color:var(--ink)}
.pm-setgrp>summary .pm-setico{font-style:normal;font-size:20px;line-height:1;flex:none}
.pm-setgrp>summary em{flex:1;min-width:0;text-align:right;font-style:normal;font:700 13px var(--font-ui);
  color:var(--ink-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pm-setgrp[open]>summary em{display:none}   /* an open group shows its contents; the summary line would say it twice */
.pm-setgrp-in{display:flex;flex-direction:column;gap:12px;padding-top:4px}
.pm-loc{display:flex;flex-direction:column;gap:8px}

/* ---- the child's profile: the per-child settings page (kidsui.js). It is taller than the old editor, so the dialog
   scrolls inside itself rather than growing past the stage. */
.dialog.kided{max-height:92%;display:flex;flex-direction:column}
.dialog.kided .nc-grid{flex:1;min-height:0;overflow-y:auto}
.kid-form{display:flex;flex-direction:column;gap:12px}
.kid-topchip{height:auto;min-height:40px;padding:0 12px;border-radius:12px;font:800 14px var(--font-ui);width:auto}
.kid-topchip.on{background:var(--star);border-color:var(--star)}
.kid-tablist{display:flex;flex-wrap:wrap;gap:6px;margin:4px 0 0}
.kid-tablist span{display:inline-flex;align-items:center;gap:5px;min-height:34px;padding:0 10px;border-radius:10px;
  background:var(--pm-tint);font:800 14px var(--font-ui);color:var(--ink)}
.kid-aloud{display:flex;flex-direction:column;gap:6px}
.kid-del{margin-top:6px;border-top:2px solid var(--pm-line-soft);padding-top:12px}

/* ---- the Countdowns page's read-only region line (TEXT_RULES 3) */
.cds-regline{display:flex;align-items:center;gap:10px;flex-wrap:wrap}


/* ---- My week: the right panel's two states (design handoff 3a / 3b) -------------------------------------------
   Add leads with the scope chip, so a parent reads WHO before they read what. Card details is the same panel
   whether the card was picked from the library or tapped on the board, which is what makes it one component. */
/* The collapse chevron sits in the panel's top-right corner, so the heading keeps clear of it and the chip goes
   under rather than beside it — at 336px the two do not fit on one line in any of the three languages. */
.pm-addhead{display:flex;flex-direction:column;align-items:flex-start;gap:8px}
.pm-addhead h2{margin:0;max-width:100%;padding-right:48px}
.pm-orpick{margin:2px 0 0;font:700 13px/1.4 var(--font-ui);color:var(--ink-muted);text-wrap:pretty}
.pm-side .pm-scope{max-width:100%}
.pm-side .pm-scopebtn{max-width:100%}
.pm-side .pm-scopebtn b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
/* Narrowed How often (Quick add has two of the six) keeps the button size rather than stretching two across three. */
.pm-howfld.narrow .pm-oftens{grid-template-columns:repeat(2,minmax(0,1fr))}
.pm-more{border-top:2px solid var(--pm-line-soft);padding-top:8px}
.pm-more>summary{font:800 15px var(--font-ui);color:var(--ink);cursor:pointer;min-height:40px;display:flex;align-items:center}
.pm-more>summary::marker{color:var(--ink-muted)}
.pm-more .sm.wide{margin-top:6px}
/* "Your name for this card": the same filled state the library's chips use for "the family has set one here", so the
   expander can be read without opening the dialog behind it. */
.pm-more .sm.wide.has{background:var(--star);border-color:var(--star)}

/* ---- the toolbar trio on a board tab.
   The board header has 624 stage px for the actions and now carries five things, so the three shared tools are
   drawn tighter than a form control: they are a toolbar, read left to right in one pass, not a column of choices.
   The HEADER may still wrap (nothing is ever pushed off the edge) but the action group itself stays on one line. */
.wkb-acts{flex-wrap:nowrap}
.wkb-head .pm-tool{min-height:44px;padding:0 9px;font-size:14px;gap:4px}
.wkb-head .wkb-view button{padding:0 7px;font-size:16px}


/* ---- My day: the routine strip and the board toolbar (design handoff 4a-4c) -----------------------------------
   Row 2 is the strip - everything that belongs to THIS routine and to no other. Row 3 is the routine's own name
   and count, then the same three tools that end every board tab's toolbar. */
.rtb-strip{flex-wrap:nowrap;gap:10px;align-items:center}
.rtb-strip .rtb-schedlbl{white-space:nowrap}
.rtb-modes{padding-top:0}
.rtb-strip .pm-scope,.rtb-strip .pm-scopename{flex:none}
.rtb-alarm{display:inline-flex;align-items:center;gap:6px;min-height:40px;padding:0 10px;border-radius:12px;
  background:var(--pm-fill);font:800 14px var(--font-ui);color:var(--ink);white-space:nowrap;flex:none}
.rtb-alarm em{font-style:normal;font-weight:700;color:var(--ink-muted)}
.rtb-alarm.on{background:#FFF0DA;color:var(--pm-ink-amber)}
.rtb-board>header{flex-wrap:wrap;row-gap:8px}
.rtb-board>header h2{white-space:nowrap}
.rtb-board>header .wkb-acts{display:flex;align-items:center;gap:6px;flex:none}
.rtb-board>header .pm-tool{min-height:44px;padding:0 9px;font-size:14px;gap:4px}

/* The Options drawer holds older blocks that were written for a full-width settings column; inside 400px they line
   up as rows rather than as a two-column grid. */
/* An alarm row was written for a full-width settings column: two selects, seven day letters, a switch and a ✕. In a
   400px drawer the seven letters are the only thing that can shrink, so they collapsed to 11px each — under the
   touch minimum, and far enough under the switch beside them that a tap on the last day hit the switch instead.
   They take their own line here, at a real size. */
.pm-drawer .alarms .al-row{flex-wrap:wrap;row-gap:8px}
.pm-drawer .alarms .al-days{flex:1 0 100%;display:flex;gap:4px;order:3}
.pm-drawer .alarms .al-day{flex:1;min-width:38px;min-height:38px}
.pm-drawer .rwlist{grid-template-columns:minmax(0,1fr)}
.pm-drawer .pm-danger{border-top:2px solid var(--pm-line-soft);padding-top:12px;margin-top:4px}


/* ---- Countdowns: one holiday list, with the picture on the row and the switch on the right (handoff 5b) --------
   The separate "Holiday pictures" browser is gone, so the row carries the picture it used to show elsewhere. */
.holrow{display:flex;align-items:center;gap:10px;min-height:58px;padding:5px 8px;border-radius:14px}
.holrow+.holrow{border-top:2px solid var(--pm-line-soft)}
.holrow .holpic{width:58px;height:44px;flex:none;border-radius:10px;overflow:hidden;display:flex;
  align-items:center;justify-content:center;background:var(--pm-fill)}
.holrow .holpic img{width:100%;height:100%;object-fit:cover;object-position:50% 25%}
.holrow .hname{flex:1;min-width:0;display:flex;align-items:center;gap:7px;flex-wrap:wrap;
  font:800 15px var(--font-ui);color:var(--ink)}
.holrow:not(.on) .holpic{filter:grayscale(1);opacity:.5}
.holrow:not(.on) .hname{color:var(--ink-muted)}
.holrow .switch{flex:none;margin-left:auto}
.holgrid{display:flex;flex-direction:column}

/* The chip that replaced the clock button: only drawn when this one countdown counts differently from the family. */
.cds-countchip{min-height:34px;padding:0 10px;border-radius:10px;background:#FFF0DA;color:var(--pm-ink-amber);
  font:800 12px var(--font-ui);white-space:nowrap;flex:none}

/* An event row: the date the way the app writes dates, who it is for as a chip, and the same X that takes a card
   off a board. */
.evrow{display:flex;align-items:center;gap:10px;flex-wrap:wrap;min-height:56px;width:100%;box-sizing:border-box}
.evrow .evd{flex:none;font:800 14px var(--font-ui);color:var(--ink-muted);white-space:nowrap}
/* **`.evrow` IS TWO ROWS ON TWO PAGES**, and only one of them changed. The Countdowns row's title became a
   `<button class="evname">` — tap the name to change the name — while the School page's special-day row
   (`schoolsetup.js`) still uses a `<b>` and shares `.evrow`, `.evd` and `.sp` with it. So the `b` rule stays:
   repointing it at `.evname` alone would have taken `flex:1` off a page nothing in this change touched, and the
   School row would have quietly stopped taking up the slack. */
.evrow b,.evrow .evname{flex:1;min-width:120px;font:800 16px var(--font-ui);color:var(--ink);overflow-wrap:anywhere}
.evrow .evname{text-align:left;background:none;border:0;padding:4px 2px;min-height:44px;cursor:pointer}
.evrow .evname:hover{text-decoration:underline}
.evrow .sp{display:none}                 /* the name already takes the slack; a second spacer pushed the ✕ off the card */
.evrow .evx{width:44px;height:44px;flex:none;border-radius:12px;background:var(--pm-fill);color:var(--pm-warn);
  font:800 17px var(--font-head)}

/* ---- School: the toolbar and its Options drawer (design handoff 6) --------------------------------------------
   The page keeps its sub-tabs on the left of the row and ends it the way every board tab ends: Copy to. and Options. */
.ss-toolbar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:0 14px 8px}
.ss-toolbar .sp{flex:1}
.ss-toolbar .wkb-acts{display:flex;align-items:center;gap:6px;flex:none}
.ss-toolbar .pm-tool{min-height:44px;padding:0 10px;font-size:14px;gap:4px}
#pmcfg{position:relative}
#pmcfg .pm-drawer{position:absolute}
.screen.schoolsetup{position:relative}
.ss-showtab{padding:0 14px}

/* Special days: the placement strip uses the shared How often buttons, so the four reaches read the same here as
   on My week and My day. */
.dg-chips.ss-often{display:flex;flex-wrap:wrap;gap:6px}
.dg-chips.ss-often .pm-often{flex:0 1 auto;min-width:120px}
.dg-chips.ss-often .pm-often.warn{color:var(--pm-warn);border-color:#F0CDD2}
.dg-chips.ss-often .pm-often:disabled{opacity:.45}

/* ================= the locked screen (access.js / lockui.js) =================
   Two audiences on one screen: a child gets a warm sentence and one button, a parent gets the prompt. It is sized in
   stage px like everything else, and it centres rather than filling, so 1024x768 and 2560x1440 both look deliberate.
   `max-width` on the card is what keeps the Spanish copy from running to 2000px on a big desktop. */
.lk-wrap{min-height:100%;display:grid;place-items:center;padding:24px}
.lk-card{max-width:760px;text-align:center;display:grid;gap:12px;justify-items:center;
  background:var(--card-bg,#fff);border-radius:28px;padding:28px 32px;box-shadow:var(--shadow-card,0 8px 24px rgba(16,49,147,.14))}
.lk-card h1{font:800 44px/1.1 var(--font-head);color:var(--ink,#103193);margin:0}
.lk-card p{font:600 20px/1.4 var(--font-ui);color:var(--ink,#103193);margin:0;max-width:60ch}
.lk-card .dq2{font-size:16px;opacity:.75}
.lk-when{font:800 20px/1.2 var(--font-ui);opacity:.8}
.lk-mascot{font-size:72px;line-height:1}
.lk-kid h1{font-size:52px}
.lk-kid p{font-size:24px}
/* Which account is locked, above the choices, because it is what decides between them. Set apart from the prose and
   from the buttons: it is neither reassurance nor an action, it is the fact a stuck parent is missing. */
.lk-who{font:800 17px/1.3 var(--font-ui);opacity:.9;padding:8px 14px;border-radius:12px;background:var(--chip-bg,#EEF3FF);
  word-break:break-all}
.lk-buy{display:grid;gap:10px;justify-items:center;width:100%;max-width:460px;margin-top:6px}
.lk-buy .sm{min-height:56px}
/* The trial warning in parent mode. A banner, not a dialog: it must never be the thing a parent has to dismiss
   before they can do the thing they opened parent mode to do. */
.lk-warn{display:flex;gap:10px;align-items:center;justify-content:space-between;flex-wrap:wrap;
  font:700 15px/1.35 var(--font-ui);color:#7A4A00;background:#FFF4E0;border-radius:12px;padding:10px 12px;margin:0 0 10px}
.lk-warn b{font-weight:800}
.lk-warn button{min-height:40px;padding:0 14px;border-radius:10px;background:var(--save);color:#fff;font:800 14px/1 var(--font-ui)}
@media (max-width:820px){.lk-card h1{font-size:34px}.lk-kid h1{font-size:40px}.lk-card p{font-size:18px}.lk-kid p{font-size:20px}}

/* The Edit card sheet (parent.js openCardSheet): the one door for renaming, photographing, recording and — for a card
   the family made — deleting. The scope chip sits after each action because they do not all apply to the same thing. */
.card-edit .dialog{max-width:520px;display:grid;gap:8px}
.card-edit .ce-art{display:grid;place-items:center}
.card-edit .ce-art img{width:96px;height:96px;object-fit:cover;border-radius:14px;background:#fff}
.card-edit .ce-acts{display:grid;grid-template-columns:1fr auto;gap:6px 8px;align-items:center}
.card-edit .ce-acts .sm{min-height:48px}
.card-edit .ce-del{border-top:2px solid var(--line,#E6EAF5);padding-top:10px;display:grid;gap:4px}
.card-edit .ce-builtin{opacity:.8}

/* ================= a card's time lives in the LABEL BAR =================
   Measured before changing anything (1.18.18), and then measured again after the first attempt was wrong.

   The original fault: a timed card was never a different WIDTH (161px stayed 161px at every size) and nothing tied
   height to width (`aspect-ratio` computed to `auto` on every card, both sizes). In BIG the time was a block pill
   in the flow: a flat +23px, which turned "2 fit" into "1 fit" in 10 of 14 size/language combinations. In SMALL the
   card is a ROW and the time was `flex:none; white-space:nowrap` beside a `flex:1; min-width:0` label, so it took
   131-148px of a 161-181px column and wrapped the label to 0-7px wide and 9-14 lines: a 72px row became 197px (en),
   272px (fr), 287px (es).

   The first fix took the time out of the flow and put it OVER THE PICTURE. That held the measurements - same height,
   same number fitting - and was wrong for a different reason: a time over the artwork is the thing a child misses at
   a glance, and whether it reads at all depends on which card and which theme. In Small it was worse, because
   `top:48px` assumed the picture started at the top of the row when the row is `align-items:center`, so it sat on
   the picture's lower edge rather than under it.

   So the time goes in the LABEL BAR. That bar is a solid band of known colour on every card and every theme, and its
   height comes from its own line-height, so a time inside it cannot make the card taller. Always readable, never a
   layout driver - the two things actually required. */
.bcard{position:relative}
.lbl.has-time{display:flex;align-items:center;justify-content:space-between;gap:6px}
.lbl.has-time>span{min-width:0;overflow:hidden;text-overflow:ellipsis}
/* `background:none` and the rest are RESETS, not decoration: the original `.card-time` rule earlier in this file
   still supplies a pale pill (`var(--parent-row)`), and inheriting the label bar's white text on to it made the time
   white-on-near-white — invisible, which a screenshot showed and the geometry tests could not. */
.card-time{flex:none;font:800 11px/1 var(--font-ui);color:inherit;opacity:.95;white-space:nowrap;font-style:normal;
  background:none;padding:0;margin:0;border-radius:0;box-shadow:none;position:static;align-self:center}
.card-time i,.card-time em{font-style:normal}
/* Small is a row whose label area is already the widest thing on the card: the time sits at its right end, on the
   row's own tint rather than on the picture. Only the START - 161px of row minus a 40px picture has no space for a
   range, and the start is what the dense view is for. */
.cards.sz-small .bcard .lbl.has-time>span,.mk-cell.sz-small .mk-card .lbl.has-time>span{
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;white-space:normal}
.cards.sz-small .bcard .card-time{font-size:13px;color:var(--ink-blue)}
.mk-cell.sz-small .mk-card .card-time{font-size:10px;color:var(--ink-blue)}
.cards.sz-small .bcard .card-time em,.mk-cell.sz-small .mk-card .card-time em{display:none}
.mk-card .card-time{font-size:9px}

/* A routine with no cards is not a card grid: it is one message, centred in the space the cards would have used.
   Without this, Small (whose rows are sized for 76px cards) centred the 189px empty box inside a 76px row and let
   it overflow upward into the period tabs. Scoped to the single-child view: the all-children grid draws one empty
   box per child's cell, which is correct there and must stay a grid item. */
.rt-cards.is-empty:not(.m){display:flex;align-items:center;justify-content:center;grid-template-columns:none}

/* ================= Ask Coco (askdata.js / askui.js) =================
   The pill sits in My day's period-tabs row, in the measured 376 stage px gap between the four tabs and the
   progress chip — that screen's FOOTER has 16 stage px of spare in French at 1024x768, so a pill cannot go there.
   Styled as the game's twin, because it is the same kind of thing: optional, per child, parent-enabled. */
.ask-pill{display:flex;align-items:center;gap:8px;background:var(--ink-blue,#1878B2);color:#fff;border-radius:var(--radius-chip,999px);
  padding:0 16px;min-height:44px;font:800 17px/1 var(--font-ui);flex:none}
.ask-pill i{font-size:22px;line-height:1;font-style:normal}
.ask-pill:active{transform:translateY(2px)}
/* Two rows of three. `minmax(0,1fr)` so a long French question shrinks its column instead of widening the sheet. */
.ask-sheet .dialog{max-width:760px;display:grid;gap:12px}
.ask-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.ask-q{min-height:84px;padding:12px 10px;border-radius:16px;border:3px solid var(--ink-blue,#1878B2);background:#fff;
  color:var(--ink,#103193);font:800 17px/1.25 var(--font-ui);text-align:center;overflow-wrap:anywhere}
.ask-q.on{background:var(--ink-blue,#1878B2);color:#fff}
.ask-q:active{transform:translateY(2px)}
/* The answer keeps its height whether or not one has been given, so the sheet does not jump when a child taps. */
.ask-a{min-height:2.6em;margin:0;display:grid;place-items:center;text-align:center;
  font:800 24px/1.3 var(--font-head);color:var(--ink,#103193)}
@media (max-width:900px){.ask-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.ask-q{font-size:15px;min-height:76px}}
.ask-sheet .ask-more{background:var(--ink-blue,#1878B2);color:#fff;border:0}

/* ================= a finished card: a MOMENT, then a STATE =================
   The celebration (Coco's face, the praise, the stars) now belongs to `.just-done`, which `routine.js` takes off
   again after CELEBRATE_MS. What is left is the card itself, still showing its picture and its LABEL, with a
   check — because a child needs to know what they finished, and they already know who they are. */
.rc.done .rcard{background:color-mix(in srgb,var(--done,#1B7A3D) 8%,#fff);border-color:var(--done,#1B7A3D)}
.rc.done .rcard img{opacity:.55}
.rc-check{display:none}
.rc.done:not(.just-done) .rc-check{display:grid;place-items:center;position:absolute;top:6px;right:6px;z-index:3;
  width:40px;height:40px;border-radius:50%;background:var(--done,#1B7A3D);color:#fff;
  font:800 24px/1 var(--font-ui);font-style:normal;box-shadow:0 2px 0 rgba(16,49,147,.18)}
/* ================================================================ MY DAY, THE PATH VIEW
   Geometry from `js/pathgeom.js`; this is only how the computed points are painted. Everything is positioned from
   a point (the node's CENTRE) and a size (`--pv-node`), both handed in as inline custom properties, so the layout
   cannot drift from the module that worked it out. `public/path.html` is the flat page it was looked at on.

   The node is the same card markup laid out SQUARE — picture above, label under — which is the transformation
   `.sz-small` already applies to the same element. A portrait `.rc` (191/430) cannot go on a path: twelve of them
   in two rows is 724px of height in a band measured at 493. */
.pv-wrap{position:relative;width:var(--pv-w);height:var(--pv-h);flex:none}
.pv-scroll{flex:1;min-height:0;overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch}
.pv-ribbon{position:absolute;left:0;top:0;pointer-events:none;z-index:0;overflow:visible}
/* two strokes, wide-pale under narrow-dark, so the ribbon reads as a path with edges over any of the five skies —
   the same compositing problem the day tabs had, solved here by not depending on the sky at all */
.pv-line-under{fill:none;stroke:var(--ink);stroke-opacity:.16;stroke-width:calc(var(--pv-stroke, 32px) * 1.34);stroke-linecap:round;stroke-linejoin:round}
.pv-line{fill:none;stroke:#fff;stroke-opacity:.92;stroke-width:var(--pv-stroke, 32px);stroke-linecap:round;stroke-linejoin:round}
/* the dashes that make it read as a path to walk rather than a pipe — ink on the white road, so they are the same
   two colours over all five skies and need no per-sky contrast check */
.pv-line-dash{fill:none;stroke:var(--ink);stroke-opacity:.26;stroke-width:calc(var(--pv-stroke, 32px) * .12);stroke-linecap:round;
  stroke-dasharray:calc(var(--pv-stroke, 32px) * .30) calc(var(--pv-stroke, 32px) * .50)}
/* WHICH WAY TO WALK. A dash is symmetrical and says nothing; the second row of a serpentine runs right to left,
   and without these a child reads it backwards — Bedtime before Lunch. One per segment, on the road itself. */
.pv-chev{fill:none;stroke:var(--ink);stroke-opacity:.42;stroke-width:calc(var(--pv-stroke, 32px) * .15);
  stroke-linecap:round;stroke-linejoin:round}

/* THE STATION IS THE SAME `.rc` THE ROW DRAWS, laid out square — the transformation `.sz-small` already applies to
   this element. Same markup, so the tap, the voice, the tick, the timer, the reward, the done tint, the check and
   the `is-now` ring are all the paths they have always been; only the arrangement is different, and arrangement is
   CSS. A portrait card cannot go on a path: twelve at 191/430 in two rows is 724px of height in a 493px band. */
.pv-wrap .rc{position:absolute;width:var(--pv-node);height:var(--pv-node);max-width:none;max-height:none;
  min-width:0;aspect-ratio:auto;flex:none;transform:translate(-50%,-50%);z-index:1;perspective:none}
.pv-wrap .rcard{border-width:calc(var(--pv-node) * .024);border-radius:calc(var(--pv-node) * .17)}
/* `flex:none` on the LABEL is the load-bearing part. The row gives `.rcard .bar` `flex:1` at some sizes and the
   picture a fixed `height:69.8%`; on a square station that split the card in half and left a letterbox of
   photograph above a slab of text. The picture takes what is left and the label is one line.

   **AND THE LABEL IS ON TOP HERE, which is the fix for the mascot eating it.** He stands on the road at the
   card's foot, so whatever is at the BOTTOM of the card is what he covers — and the first version covered the
   name: "Brush teeth" rendered as "sh teeth", and under a circle avatar it vanished. There is no size at which
   he both stands on the road and clears a label that is also at the bottom, so the label moved. The name is the
   most important word on the screen and it is now the one thing on the card he cannot reach; he overlaps
   picture, which a child can still read around. `column-reverse` rather than reordered markup, because the
   markup is `cardHTML`'s and is shared with the row. */
/* **THE ONE PLACE A CARD'S LABEL SITS ON TOP, AND IT IS AN OCCLUSION FIX RATHER THAN A RULE.** Every other board —
   My week's `.bcard`, My day's `.rcard` — puts the name under the picture, which is the order a child scanning a
   column wants: picture, then caption. Here the walker stands on the current station and his feet land on a bottom
   label, so the card is flipped instead.

   **MEASURED BEFORE IT WAS KEPT** (`tools/measure-walker.mjs`): the obvious alternative is to move him sideways,
   fully clear of the card, onto the road between stations, using the shift `pathgeom.js walkerAt` already applies.
   It does not fit. Clearing a card needs a shift of ~0.96 x node (his half-width plus half a card) against the 0.46
   he has — and raising it does not help, because at the counts where cards pack together the GAP is not big enough
   to hold him at all: at 5 cards the gap is 56px against a 199px walker, at 12 it is 54px against 159px, and at one
   card there is a single station and no gap whatsoever. Three to four times too wide at every tight count.

   So the exception stays, and this is the reason. Do not "make it consistent" without re-running that tool. */
.pv-wrap .rcard{flex-direction:column-reverse}
.pv-wrap .rcard img{flex:1 1 auto;min-height:0;height:auto;object-position:50% 40%}
.pv-wrap .rcard .bar{flex:0 0 auto;min-height:0;font:800 calc(var(--pv-node) * .115)/1.2 var(--font-ui);
  padding:calc(var(--pv-node) * .045) calc(var(--pv-node) * .04);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block}
/* the check moves to the BOTTOM corner with the label out of the way, so it is not sitting on the name */
.pv-wrap .rc.done:not(.just-done) .rc-check{width:30%;height:30%;top:auto;bottom:5%;right:5%;font-size:calc(var(--pv-node) * .19)}
.pv-wrap .rc.is-now .rcard::after{box-shadow:inset 0 0 0 calc(var(--pv-node) * .05) var(--ink)}
/* the row's "you are here" BADGE is not drawn here: the mascot standing on this card is the same claim said
   louder, and the two sat on top of each other in the corner. The ring stays — it is what makes the card itself
   read as current for anyone looking at the cards rather than at the figure. */
.pv-wrap .rc-now{display:none}
/* the celebration face is drawn for the whole-period row's proportions; on a square station it would overflow it */
.pv-wrap .reward{border-radius:inherit;overflow:hidden}

/* THE WALKER, standing ON THE TRACK under his own card. `object-fit:contain` on the 420x330 pose frame makes the
   figure 0.674 of the box tall and centred, so its own bottom edge sits 0.837 of the box down; putting THAT on the
   track line is what stands him on the path rather than leaving him in the air. `assets/coco/affirm.png` is the
   pose because it is the only one of the six with no padding left, right OR bottom — the frame's bottom edge IS
   the character's feet (measured, tools/_pathprobe.mjs). `left`/`top` are the TRACK point, not the card's. */
/* IN FRONT OF THE CARD, not behind it and not squeezed into the gap. The air between a card and the track is
   about 24px and the figure is about 100; there is no size at which he both fits in the gap and is visible, so he
   stands on the road and overlaps the lower part of his own card — which is the card a pre-reader is meant to be
   looking at, and the label he covers is the one thing on it they cannot read anyway. Offset left so the picture's
   centre stays clear. */
/**
 * **THE WALKER STANDS ON A BASE, AND THE BASE IS WHAT NO CARD HAS.**
 *
 * The default family is a Coco theme with no photo and the Coco avatar — and every card on this board is a
 * picture of Coco. Captured and looked at: the walker is a brown dog standing among twelve brown dogs and you
 * have to hunt for him. The lion in a tester's recording proved that a DISTINCT figure works; it did not prove
 * that the default one does, and it does not.
 *
 * A photo and a letter bubble already arrive as a ringed disc (`mascot()`); Coco arrives as a loose figure. So
 * rather than make the figure louder, the walker gets a piece's BASE: a flat ellipse in the child's own colour
 * at his feet, which turns him from "another dog" into a counter standing on a board. No card has one, no card
 * ever will, and it works the same for all three shapes.
 *
 * `--pv-feet` is where the figure's feet are inside its box: 0.893 for a pose frame (`contain` on 420x330, the
 * `dance` frame's bottom edge IS the feet) and 1 for a circle, whose own bottom edge is the box's. One variable
 * rather than two rules, so the base and the figure cannot disagree about where the ground is.
 */
.pv-walk-hit{position:absolute;left:0;top:0;width:var(--pv-walk);height:var(--pv-walk);z-index:5;cursor:pointer;
  transform:translate(calc(var(--pv-x) - 50%),calc(var(--pv-y) - var(--pv-walk) * var(--pv-feet, .893) + var(--pv-stroke, 0px) * .12));
  transition:transform .55s cubic-bezier(.45,.05,.3,1)}
.pv-walk-hit::after{content:'';position:absolute;left:50%;top:calc(var(--pv-walk) * var(--pv-feet, .893));
  width:calc(var(--pv-node) * .66);height:calc(var(--pv-node) * .17);transform:translate(-50%,-62%);
  border-radius:50%;background:color-mix(in srgb,var(--kc, #FF3046) 38%,#fff);
  box-shadow:0 0 0 calc(var(--pv-node) * .022) var(--kc, #FF3046),0 3px 6px rgba(16,49,147,.22)}
.pv-walk{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;z-index:1;
  filter:drop-shadow(0 4px 5px rgba(0,0,0,.32))}
/**
 * **AND COCO GETS THE SAME RINGED DISC A PHOTO AND A LETTER ALREADY HAVE.**
 *
 * The base alone was not enough: captured and looked at, the default family's walker was still a brown dog in a
 * field of brown dogs and the eye went to the ring on the card, not to him. A photo arrives as `.pmascot` and a
 * letter as `.avbub` — both are a disc with a ring in the child's colour, which is a shape NO CARD HAS and no
 * card ever will. Coco arrived as a loose figure, so he was the only one of the three that could be camouflaged.
 *
 * Now all three are the same object: the child, in a ring, standing on a base. The figure is inset so the ring
 * stays unbroken, and `--pv-feet` is 1 because a disc's bottom edge IS its feet.
 */
.pv-walk-hit.pv-disc{background:#fff;border-radius:50%;border:calc(var(--pv-walk) * .055) solid var(--kc, #FF3046);
  box-shadow:0 4px 10px rgba(16,49,147,.28)}
.pv-walk-hit.pv-disc .pv-walk{inset:7%;width:86%;height:86%;filter:none}
/**
 * **THE POSITION IS ENTIRELY IN THE TRANSFORM and `left`/`top` stay at 0.** That is what makes the walk a
 * composited `transform` transition rather than an animation of `left`, and it is why a tap is never blocked: the
 * transition runs off the main thread and every card stays tappable the whole way. A parent ticking seven cards
 * waits for nothing.
 *
 * Both switches below, and they are different switches: the DEVICE asking for less motion, and the family's own
 * animation setting (`settings.js FX.anim`). With either one off he is simply in the new place — which the
 * picture reads correctly without, because the ring says which card and the distance says how much is left.
 */
@media (prefers-reduced-motion:reduce){.pv-walk-hit{transition:none}}
.pv-wrap.noanim .pv-walk-hit{transition:none}
/* **THE MASCOT IS A TARGET NOW, NOT AN ORNAMENT.** He stands on the card a child is doing next, so tapping him
   does what tapping that card does — which makes him the biggest, plainest thing to aim at on the screen, and
   for the youngest band probably the best part of this view. `check-decor` was right to flag him when he was
   inert; the answer was to give him the action rather than to exempt him. */


/* WHICH ONE IS NOW — the first card a child has not done, in the ordinary whole-period row (routine.js nowStep).
   Both halves are drawn INSIDE the card's own box: `.rt-cards` scrolls, so a ring or a badge hanging outside the
   card would be clipped by the scroller on the first card and the last. Hence an INSET ring rather than an outline,
   and a badge at top-left, mirroring the done check at top-right.
   One colour, not the child's: `--kc` is set on `.rt-col` (several children) and nowhere in the single layout, so
   reading it would have given a navy ring on one board and a red one on the other for the same reason. The white
   inner band is what makes the ring read as a ring whatever colour the category gave the card's border.
   It does not animate, deliberately: see the note in routine.js cardHTML. */
/* The ring is a PSEUDO-ELEMENT OVER the card, not an inset shadow on it. An inset shadow paints on the element's own
   background, UNDERNEATH its children — and `.rcard` is entirely covered by the picture and the label bar, so the
   first version was invisible on three sides and only showed in the hairline between them. Measured as painted and
   then looked at: the screenshot is what found it. */
.rc.is-now .rcard::after{content:'';position:absolute;inset:0;border-radius:inherit;pointer-events:none;z-index:4;
  box-shadow:inset 0 0 0 6px var(--ink)}
.rt-cards.m .rc.is-now .rcard::after{box-shadow:inset 0 0 0 4px var(--ink)}
.rc-now{position:absolute;top:6px;left:6px;z-index:3;display:grid;place-items:center;width:34px;height:34px;
  border-radius:50%;background:var(--ink);color:#fff;font:800 15px/1 var(--font-ui);font-style:normal;
  box-shadow:0 2px 0 rgba(16,49,147,.18)}
.rt-cards.m .rc-now{width:24px;height:24px;font-size:11px;top:4px;left:4px}
.rt-cards.sz-small .rc.is-now .rcard::after{box-shadow:inset 0 0 0 4px var(--ink)}
/* Small is a 76px ROW with a 60px thumbnail at its left end, and the badge landed on top of that picture — looked
   at, not guessed. The ring runs the whole width of the row there, which is a stronger signal than a badge could be
   at that size, so the badge is dropped rather than shrunk: one marker, not one and a half. */
.rt-cards.sz-small .rc-now{display:none}
/* Small is a 76px ROW, so the celebration has to be a row too: no 136px head, no stars, just the praise and the
   check. Measured before this: 144px of content in a 68px box, praise/stars/label all 0% visible and the head
   overflowing onto the card below. The Big card has room for the whole thing and keeps it. */
.rt-cards.sz-small .reward{flex-direction:row;gap:10px;padding:0 12px;overflow:hidden}
.rt-cards.sz-small .reward img,.rt-cards.sz-small .reward .avbub,.rt-cards.sz-small .reward .stars{display:none}
.rt-cards.sz-small .reward h3{font-size:22px;margin:0}
.rt-cards.sz-small .reward .mine{font-size:14px;margin-left:auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
/* Matching specificity with the base rule above, or its top:6px wins and translateY pulls the check half out of
   the card - measured at 75%% visible, which is exactly how it looked. */
.rt-cards.sz-small .rc.done:not(.just-done) .rc-check{width:30px;height:30px;font-size:18px;top:50%;transform:translateY(-50%);right:8px}
/* The multi-child cell is smaller again: the check scales with it and the celebration keeps its own smaller face. */
.rt-cards.m .rc.done:not(.just-done) .rc-check{width:30px;height:30px;font-size:18px}
.rt-cards.m.sz-small .rc.done:not(.just-done) .rc-check{width:24px;height:24px;font-size:15px}

/* The corner mascot is decoration. `pointer-events:none` is the part that makes it true: without it a child taps a
   big friendly character and gets silence, which is how it was. It costs no board space — measured 0px of overlap
   with `.rt-cards` at all seven sizes — so it stays, as a picture. */
.coco-decor{pointer-events:none}
.coco-decor .coco-guide{pointer-events:none}
/* Marked decoration: a picture a child might aim at that has nothing to answer with. `pointer-events:none` is what
   makes "not a control" true rather than merely intended — tools/check-decor.mjs fails the build without it. */
.decor{pointer-events:none}
