/* Sheets — slice 3 of 9 of the former components.css.

   ⚠️ LOAD ORDER IS PART OF THESE FILES. They are CONTIGUOUS slices of one
   6841-line sheet, cut at section banners and never re-sorted, so concatenating
   them in the order index.html lists them reproduces the original byte for byte
   — which is the proof the cascade did not shift. Moving a rule to a different
   slice throws that guarantee away. index.html and sw.js's SHELL_ASSETS must
   list all 9 in the same order as each other.

   Contents: Activity sheet + timer overlay, PIN gate, parent confirm queue, activity picker, parent settings panel, quest composer tree. */

/* ── Activity sheet + timer overlay ──────────────────────── */

.wu-sheet-backdrop,
.wu-timer-overlay {
  position: fixed;
  inset: 0;
  /* ⌨️ While a soft keyboard is up, keyboard-fit.js sets --vv-top / --vv-h to
     the VISIBLE part of the screen, and the backdrop shrinks to it so the card
     centres above the keyboard instead of behind it. With top + height set,
     bottom is ignored. With no keyboard the variables are absent and these
     fall back to exactly `inset: 0`. */
  top: var(--vv-top, 0px);
  height: var(--vv-h, auto);
  z-index: 400;
  background: color-mix(in srgb, var(--colour-text-primary) 32%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

/* ⌨️ A text field in a sheet has focus on a touch screen (keyboard-fit.js sets
   data-kb): the card moves to the TOP and is capped at half the screen, so
   the keyboard rising from the bottom cannot cover it. This is the half that
   works even where the page is never told about the keyboard (the APK, until
   the shell applies the IME insets — #184's handoff); where it is told,
   --vv-h is the visible part and the cap follows it. */
.wu-sheet-backdrop[data-kb] {
  align-items: flex-start;
  padding-top: max(var(--space-md), var(--safe-top, 0px));
}
.wu-sheet-backdrop[data-kb] > .wu-sheet {
  max-height: calc(var(--vv-h, 50vh) - var(--space-md) * 2);
}

/* ⚠️ A WIDTH CLAMPED AGAINST 100% IS A BORDER-BOX STATEMENT, and there is no
   global box-sizing reset here (#90). Content-box bounded only the MIDDLE, so
   the 40px padding either side and the 1px border sat OUTSIDE the clamp: on a
   375px phone `calc(100% - 64px)` asked for 311 of content and produced a
   393px BOX, which the backdrop's flex silently shrank to 375 — every sheet in
   the app edge to edge, with the gutter its own rule asks for nowhere on
   screen. Third instance of this trap (#98/v399 the rail drawer, #166 the
   confirm sheet), and the first one where the symptom was invisible because
   flex-shrink was covering for it.

   THE NUMBERS MOVED WITH THE FIX, so that no sheet ends up with LESS room than
   it has today — this is a bug fix, not a re-layout: 500px keeps a desktop
   sheet's content at ~418 (it was 420), and on a phone the padding drops to
   --space-lg so 351px of box still yields 301 of content (it was 293) while
   finally leaving a 12px gutter. */
.wu-sheet {
  box-sizing: border-box;
  position: relative;
  background: var(--colour-surface);
  border: 1px solid var(--colour-border);
  border-radius: var(--radius-card);
  padding: var(--space-xl);
  width: min(500px, calc(100% - var(--space-lg)));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.18);
  /* A SHEET IS NEVER TALLER THAN THE SCREEN (owner, batch item 2: "when
     creating a new book on mobile it does not allow to scroll"). The library's
     cover-maker measured 988px on an 812px phone, 88px off the top AND 88 off
     the bottom, with no way to reach either end — the ✕ and the Save button
     both unreachable. Nothing about that is specific to books: any sheet whose
     content grows (a long picker, a list, a translated label) has the same
     cliff, so the guarantee belongs on the sheet rather than on the one that
     was reported. --vh, never 100vh (§6). With the keyboard up the screen is
     the part above it (--vv-h, keyboard-fit.js), so the card scrolls inside
     that instead of running under the keys. */
  max-height: calc(var(--vv-h, var(--vh)) - var(--space-lg) * 2);
  overflow-y: auto;
  /* A modal that scrolls must not hand the scroll on to the page behind it
     once it hits its end. */
  overscroll-behavior: contain;
}
/* A 40px inset is a tenth of a phone's width from each side. The sheet keeps
   its dialog padding where there is room and takes the page's own inset where
   there is not — which is what buys back the content the gutter costs. */
@media (max-width: 480px) {
  .wu-sheet {
    padding: var(--space-lg);
  }
}

.wu-sheet-icon {
  font-size: 40px;
  line-height: 1;
}
/* A SIDEWAYS PHONE (#515, owner: "avoid scrolling modal on such simple
   content"): a question and two buttons stood 340px tall on a 360px screen.
   Less air, a smaller icon, and the stacked buttons go side by side. */
@media (orientation: landscape) and (max-height: 500px) {
  .wu-sheet { padding: var(--space-md) var(--space-lg); gap: var(--space-sm); max-height: calc(var(--vv-h, var(--vh)) - var(--space-md) * 2); }
  .wu-sheet .wu-sheet-icon { font-size: 32px; }
  .wu-sheet .wu-sheet-icon-img { width: 36px; height: 36px; }
  .wu-sheet .wu-sheet-actions-col { flex-flow: row wrap; gap: var(--space-sm); margin-top: var(--space-xs); }
  .wu-sheet .wu-sheet-actions-col > .wu-sheet-btn { flex: 1 1 180px; width: auto; padding-block: var(--space-sm); }
}

.wu-sheet-icon-img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  display: block;
}

.wu-confirm-icon-img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  display: block;
}

.wu-sheet-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--font-size-lg);
  color: var(--colour-text-primary);
}

.wu-sheet-notes {
  width: 100%;
  resize: none;
  font-family: var(--font-body);
  font-size: var(--font-size-md);
  padding: var(--space-md);
  border: 1px solid var(--colour-border);
  border-radius: var(--radius-button);
  background: var(--colour-bg);
  color: var(--colour-text-primary);
  box-sizing: border-box;
}

.wu-sheet-notes:focus {
  outline: 2px solid var(--colour-accent);
  border-color: transparent;
}

.wu-sheet-label {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: var(--font-size-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--colour-text-secondary);
}

.wu-sheet-input {
  width: 100%;
  font-family: var(--font-body);
  font-size: var(--font-size-md);
  padding: var(--space-sm) var(--space-md);
  border: 1px solid var(--colour-border);
  border-radius: var(--radius-button);
  background: var(--colour-bg);
  color: var(--colour-text-primary);
  box-sizing: border-box;
}

.wu-sheet-input:focus {
  outline: 2px solid var(--colour-accent);
  border-color: transparent;
}

.wu-sheet-actions {
  display: flex;
  gap: var(--space-md);
}

.wu-sheet-actions-col {
  flex-direction: column;
  width: 100%;
}

.wu-sheet-actions-col .wu-sheet-btn {
  width: 100%;
}

.wu-sheet-btn {
  /* Unified box model so a <button> and an <a> with this class render at the
     exact same size (the install sheet stacks one of each — without this the
     button's UA box model made it a different height than the APK link). */
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-decoration: none;
  line-height: var(--line-height-normal);
  padding: var(--space-md) var(--space-lg);
  font-family: var(--font-display);
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-bold);
  background: var(--colour-bg);
  color: var(--colour-text-primary);
  border: 1px solid var(--colour-border);
  border-radius: var(--radius-button);
  cursor: pointer;
  min-height: var(--tap-target-min);
}

.wu-sheet-btn:hover { border-color: var(--colour-accent); }

/* The commit button on a sheet — solid, so "which one do I press" is answered
   by weight rather than by reading both labels (#98's one-filled-control rule).
   White on solid accent, never accent-as-text on a tint: every warm accent in
   this palette measures under the 4.5:1 body-text floor that way (#121).
   MUST stay after .wu-sheet-btn — same specificity, so order decides. */
.wu-sheet-primary {
  background: var(--colour-accent);
  border-color: var(--colour-accent);
  color: #fff;
  font-weight: var(--font-weight-bold);
}
.wu-sheet-primary:hover { filter: brightness(1.05); }
.wu-sheet-primary:disabled { opacity: 0.6; cursor: default; }

/* iOS / generic "Add to Home Screen" guided steps */
.wu-install-steps {
  width: 100%;
  text-align: left;
  background: var(--colour-bg);
  border: 1px solid var(--colour-border);
  border-radius: var(--radius-button);
  padding: var(--space-sm) var(--space-md);
}

.wu-install-steps .wu-sheet-label {
  margin-bottom: var(--space-xs);
}

.wu-install-steps ol,
.wu-install-steps p {
  margin: 0;
  padding-left: 1.2em;
  font-size: var(--font-size-sm);
  color: var(--colour-text-primary);
  line-height: var(--line-height-normal);
}

.wu-install-steps p {
  padding-left: 0;
}

/* The line under a way to install that says where the board goes (#183). */
.wu-install-note {
  margin: var(--space-xs) 0 0;
  font-size: var(--font-size-sm);
  line-height: 1.4;
  color: var(--colour-text-secondary);
  text-align: left;
}

.wu-sheet-done {
  background: color-mix(in srgb, var(--colour-success) 18%, var(--colour-surface));
  border-color: var(--colour-success);
  color: var(--colour-success);
}

.wu-sheet-timer {
  background: color-mix(in srgb, var(--colour-accent) 14%, var(--colour-surface));
  border-color: var(--colour-accent);
  color: var(--colour-accent);
}

/* The corner control on every sheet — including the ✓ that COMMITS the language
   choice (decision #77), which makes it the least appropriate control in the
   app to be a 28px target. Grown to 44 (v290 audit). */
.wu-sheet-cancel {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--colour-text-secondary);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}

.wu-sheet-cancel:hover { color: var(--colour-text-primary); }

/* ✓ variant — same corner button, but reads as "confirm my choice" (used on
   the avatar picker, where a pick applies immediately). */
.wu-sheet-cancel.wu-sheet-ok {
  color: var(--colour-success);
  background: color-mix(in srgb, var(--colour-success) 12%, transparent);
  font-weight: var(--font-weight-bold);
}
.wu-sheet-cancel.wu-sheet-ok:hover {
  background: color-mix(in srgb, var(--colour-success) 22%, transparent);
}

.wu-timer-display {
  font-family: var(--font-mono);
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-bold);
  color: var(--colour-accent);
}

/* Countdown reached zero — chimed; child still taps Stop & finish */
.wu-timer-display.wu-timer-done {
  color: var(--colour-success);
  font-family: var(--font-display);
}

.wu-timer-notes {
  margin: 0;
  color: var(--colour-text-secondary);
  font-size: var(--font-size-sm);
  text-align: center;
}

/* ── PIN gate ────────────────────────────────────────────── */

.wu-pin-card {
  max-width: 320px;
  /* Compact (#345, owner: "the pin modal … looks too long"): a smaller lock,
     tighter rhythm, and the padding a phone sheet already uses. */
  padding: var(--space-lg);
  gap: var(--space-sm);
}
.wu-pin-card .wu-sheet-icon { font-size: 28px; }

.wu-pin-sub {
  margin: 0;
  font-size: var(--font-size-sm);
  color: var(--colour-text-secondary);
}

.wu-pin-dots {
  display: flex;
  gap: 14px;
  margin: var(--space-sm) 0;
}

.wu-pin-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--colour-border);
}

/* The sheet holds 6 dots for the emailed code (#344); a PIN shows 4. */
.wu-pin-dot[hidden] { display: none; }

.wu-pin-dot-filled {
  background: var(--colour-accent);
  border-color: var(--colour-accent);
}

.wu-pin-pad {
  grid-template-columns: repeat(3, 64px);
  padding-bottom: 0;
  /* The drill numpad lifts itself off the screen's foot with a 12vh margin —
     inside this sheet that was 12% of the screen of EMPTY CARD under the keys,
     the main reason the modal read as too long. */
  margin-bottom: 0;
}

.wu-pin-pad button {
  height: 48px;
  /* Beige on the PIN sheet's white — the drill keys went white (#253), and
     white on white would lose the keys' edges. */
  background: var(--colour-bg);
}

.wu-pin-pad button[data-key="none"] {
  visibility: hidden;
}

.wu-pin-shake {
  animation: wu-shake 300ms ease;
}

.wu-pin-forgot {
  background: none;
  border: none;
  color: var(--colour-text-secondary);
  font-size: var(--font-size-xs);
  cursor: pointer;
  text-decoration: underline;
  padding: var(--space-xs);
}

.wu-pin-forgot:hover {
  color: var(--colour-text-primary);
}

/* ── Parent confirmation queue ───────────────────────────── */

/* THE QUEUE AS A SHEET (#166). The default .wu-sheet is 420px wide with 40px of
   padding and centres its children — right for a question with two buttons,
   wrong for a LIST: a confirm row carries an icon, two lines of text and two
   44px controls, which had 231px to do it in on a 375px phone. This variant is
   as wide as the list's own max (560px), pads like a panel rather than a
   dialog, and stretches its children so the rows use the full width.

   The LIST scrolls, not the sheet: the title and ⚙️ Parent settings must stay
   put while a long week's worth of rows moves under them. */
.wu-confirm-sheet {
  /* ⚠️ A WIDTH CLAMPED AGAINST 100% IS A BORDER-BOX STATEMENT, and there is no
     global box-sizing reset here (#90). Content-box bounds only the MIDDLE, so
     the 24px padding either side and the 1px border sat OUTSIDE the clamp:
     measured 325px of content rendering as a 375px box on a 375px phone, edge
     to edge with no gutter at all. Same bug as the rail drawer's (#98/v399). */
  box-sizing: border-box;
  width: min(560px, calc(100% - var(--space-lg)));
  max-height: min(80vh, calc(var(--vh) - var(--space-xl)));
  padding: var(--space-lg);
  align-items: stretch;
  gap: var(--space-sm);
  /* The base lets a sheet scroll as a whole; this one pins its title and
     ⚙️ Parent settings and scrolls the LIST between them instead, so a long
     week's rows never carry the controls off screen. */
  overflow: hidden;
}
.wu-confirm-sheet .wu-sheet-title {
  /* Clear of the ✕, which is absolutely placed in the corner. */
  padding-right: var(--space-xl);
  text-align: left;
}
.wu-confirm-sheet .wu-confirm-host {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  min-height: 0;
  overflow: hidden;
}
.wu-confirm-sheet .wu-confirm-list {
  width: 100%;
  max-height: none;
}

/* ✓ Approve all — full width under the list on both surfaces, so it reads as
   "everything above" rather than as one more row's control. */
.wu-confirm-all {
  flex: none;
  width: 100%;
}

.wu-confirm-list {
  flex: 1;
  width: min(560px, 100%);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  overflow-y: auto;
  padding: var(--space-md) 0;
}

.wu-confirm-row {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  background: var(--colour-bg);
  border: 1px solid var(--colour-border);
  border-radius: var(--radius-button);
  padding: var(--space-sm) var(--space-md);
}

.wu-confirm-grace-row {
  border-color: var(--colour-warning);
  background: color-mix(in srgb, var(--colour-warning) 8%, var(--colour-bg));
}

.wu-confirm-grace {
  color: var(--colour-warning);
  font-style: normal;
  font-weight: 700;
}

/* Website (link) tiles list — parent dashboard → Settings → School websites */
.wu-link-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  margin-bottom: var(--space-sm);
}

.wu-link-row {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  background: var(--colour-bg);
  border: 1px solid var(--colour-border);
  border-radius: var(--radius-button);
  padding: var(--space-xs) var(--space-sm);
}

.wu-link-ic {
  font-size: 20px;
  flex: none;
}

.wu-link-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.wu-link-meta small {
  color: var(--colour-text-secondary);
  font-size: var(--font-size-xs);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ✏️ edit and ✕ remove. REAL 44px boxes, not a 26px button with a 44px
   pseudo-element underneath: two of those sit 40px apart in this row, so their
   hit areas would overlap and the later sibling would quietly take the sliver
   nearest its neighbour — the overlap #100 kept a 10px gap to avoid. */
.wu-link-edit,
.wu-link-del {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  background: none;
  font-size: 18px;
  cursor: pointer;
  border-radius: var(--radius-pill);
}

.wu-link-edit { color: var(--colour-text-secondary); }
.wu-link-del { color: var(--colour-danger); }

.wu-link-edit:hover {
  background: color-mix(in srgb, var(--colour-accent) 12%, transparent);
}

.wu-link-del:hover {
  background: color-mix(in srgb, var(--colour-danger) 12%, transparent);
}

/* The row whose site the form below is editing. */
.wu-link-row.wu-link-on {
  border-color: var(--colour-accent);
  background: color-mix(in srgb, var(--colour-accent) 8%, var(--colour-surface));
}

.wu-confirm-icon {
  font-size: 24px;
  flex: none;
}

.wu-confirm-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.wu-confirm-text small {
  color: var(--colour-text-secondary);
  font-size: var(--font-size-xs);
}

.wu-confirm-yes,
.wu-confirm-no {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-bold);
  flex: none;
}
/* 44px HIT AREA under a 40px disc (#88-#90). The discs stay 40 — a bigger pair
   would unbalance a row that is mostly text — and the target grows underneath,
   the house pattern. Their centres sit 56px apart, so two 44px areas clear each
   other by 12 and neither can steal the other's tap (the arithmetic #100 did
   for the filter chips). */
.wu-confirm-yes::after,
.wu-confirm-no::after {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  width: 44px;
  height: 44px;
  transform: translate(-50%, -50%);
}

.wu-confirm-yes {
  background: color-mix(in srgb, var(--colour-success) 18%, var(--colour-surface));
  border: 1px solid var(--colour-success);
  color: var(--colour-success);
}

.wu-confirm-no {
  background: transparent;
  border: 1px solid var(--colour-border);
  color: var(--colour-text-secondary);
}

.wu-confirm-no:hover {
  border-color: var(--colour-danger);
  color: var(--colour-danger);
}

/* ── Activity picker ─────────────────────────────────────── */

.wu-picker {
  max-width: 420px;
}

.wu-picker-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-sm);
  width: 100%;
}

.wu-picker-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-md) var(--space-sm);
  background: color-mix(in srgb, var(--tile-color) 8%, var(--colour-surface));
  border: 1px solid color-mix(in srgb, var(--tile-color) 45%, var(--colour-border));
  border-radius: var(--radius-button);
  cursor: pointer;
  min-height: var(--tap-target-min);
}

.wu-picker-item:hover {
  background: color-mix(in srgb, var(--tile-color) 18%, var(--colour-surface));
  border-color: var(--tile-color);
}

.wu-picker-item.wu-picker-current {
  border-width: 2px;
  border-color: var(--tile-color);
}

/* Unavailable, but still SHOWN (#79 — greyed rather than hidden). Desaturated
   so the tile stops reading as "one of my options" while its icon stays
   recognisable; it keeps its tap target, because tapping it is how the child
   hears why. Hover is suppressed so nothing offers a lift it will not deliver. */
.wu-picker-item.wu-picker-off,
.wu-picker-item.wu-picker-off:hover {
  filter: grayscale(1);
  opacity: 0.45;
  background: var(--colour-surface);
  border-color: var(--colour-border);
  cursor: default;
}

.wu-picker-icon { font-size: 28px; line-height: 1; }

.wu-picker-icon-img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  display: block;
}

.wu-picker-label {
  font-size: var(--font-size-xs);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--colour-text-secondary);
}

/* ── Parent settings panel ───────────────────────────────── */

.wu-set-list {
  flex: 1;
  width: min(560px, 100%);
  min-width: 0;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  overflow-y: auto;
  /* overflow-y:auto makes the cross-axis compute to auto too — clip it so a
     sub-pixel-wide row can't add a horizontal scrollbar on mobile. */
  overflow-x: hidden;
  padding: var(--space-md) 0;
}

/* No global box-sizing reset exists, so padded settings boxes (groups, rows,
   dash rows) would otherwise add their side padding ON TOP of width:100% and
   spill past the right edge — clipped on mobile. Scope border-box to the whole
   settings subtree so every nested box fits its width. */
.wu-set-list,
.wu-set-list * {
  box-sizing: border-box;
}

/* Portrait phones: the settings nest three padded levels deep (panel → group →
   row). Trim the side padding at each level so rows aren't pushed wide and the
   rounded right corners stay on-screen — and the controls scale down a touch. */
@media (max-width: 540px) {
  .wu-dash-settings,
  .wu-set-group {
    padding-left: var(--space-sm);
    padding-right: var(--space-sm);
  }
  .wu-set-row,
  .wu-dash-row {
    padding-left: var(--space-sm);
    padding-right: var(--space-sm);
  }
  .wu-set-group > summary {
    padding-left: 0;
    padding-right: 0;
  }
  /* Stack any segmented control under its label so multi-option rows (music
     practice length, maths difficulty/length) wrap fully into view instead of
     clipping the last button. */
  .wu-set-row:has(.wu-set-seg) {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-sm);
  }
  .wu-set-row:has(.wu-set-seg) .wu-set-seg {
    justify-content: flex-start;
  }
}

.wu-set-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  background: var(--colour-bg);
  border: 1px solid var(--colour-border);
  border-radius: var(--radius-button);
  padding: var(--space-sm) var(--space-md);
  min-height: 56px;
}

.wu-set-label {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
  color: var(--colour-text-primary);
  font-size: var(--font-size-sm);
}

.wu-set-label small {
  color: var(--colour-text-secondary);
  font-size: var(--font-size-xs);
}

.wu-set-icon {
  width: 22px;
  height: 22px;
  object-fit: contain;
  display: block;
}

.wu-set-seg {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
  flex: none;
}

/* "Choose a look" sheet grid (Slots panel Music/Sport icon picker). */
.wu-sheet-sub {
  margin: 0;
  color: var(--colour-text-secondary);
  font-size: var(--font-size-sm);
}
.wu-look-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-sm);
  margin-top: var(--space-sm);
}
.wu-look-grid .wu-icon-pick {
  font-size: var(--font-size-xl);
  padding: var(--space-md);
  min-height: 56px;
}

/* Stacked row — label on top, control wraps full-width below. Used by the
   day pickers (8 options) that overflow the narrow dashboard column inline. */
.wu-set-row.wu-set-stack {
  flex-direction: column;
  align-items: stretch;
  gap: var(--space-sm);
}
.wu-set-row.wu-set-stack .wu-set-seg {
  justify-content: flex-start;
}

/* ── 🗺️ Quest composer: a scrollable TREE (owner, 2026-08-28) ────────────────
   Nested <details>, which is the dashboard's own accordion — so the whole menu
   of exercises is scannable at once instead of four stacked segmented rows that
   hid every branch but the chosen one. Depth is shown by indent alone; a second
   card outline inside a card reads as clutter at this size. */
.wu-q-leaf {
  margin-left: var(--space-md);
  border-left: 2px solid var(--colour-border);
  border-radius: 0;
  padding-left: var(--space-sm);
}
.wu-q-leaf > summary {
  font-size: var(--font-size-sm);
}

/* Multi-select chips wrap rather than scroll sideways: twelve tables must be
   reachable without a horizontal gesture inside a vertically-scrolling panel. */
.wu-set-multi {
  flex-wrap: wrap;
  /* 10px ROW gap, so a wrapped chip's 44px hit area (below) clears the row
     above it: 44 − 36 = 8px of overhang, and 8 < 10. Column gap stays at the
     seg default of 4px because the hit area is grown vertically only — the
     same measured trade-off as .wu-set-toggle::after, and the same reason
     decision #100's filter chips use a 10px row gap. */
  row-gap: 10px;
}

/* A wrapped multi-select chip needs the 44px floor too (#88–#90). The plain
   .wu-set-seg is deliberately excluded — its options sit 4px apart on ONE row,
   where a taller target would steal its neighbour's taps. Wrapping is what makes
   it safe here, and the row-gap above is what makes wrapping safe. */
.wu-set-multi button::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 44px;
  transform: translateY(-50%);
}
/* The one action in each leaf, so it reads as the commit rather than as another
   option among the chips above it. */
.wu-set-toggle.wu-set-primary {
  width: 100%;
  margin-top: var(--space-sm);
  background: var(--colour-accent);
  border-color: var(--colour-accent);
  color: #fff;
  font-weight: var(--font-weight-bold);
}

.wu-set-seg button,
.wu-set-toggle,
.wu-set-stepper button {
  padding: var(--space-xs) var(--space-sm);
  min-height: 36px;
  background: var(--colour-surface);
  border: 1px solid var(--colour-border);
  border-radius: var(--radius-button);
  color: var(--colour-text-secondary);
  font-size: var(--font-size-sm);
  font-family: var(--font-body);
  cursor: pointer;
  position: relative;
}

/* 36px box, 44px hit area (#88–#90). Grown VERTICALLY ONLY, and that is
   measured rather than assumed: stacked toggles sit 12px apart, so 4px of
   overhang each side is clear — but same-row segmented options are only 4px
   apart, and widening them would make each option steal its neighbour's taps.
   A too-small target is bad; a target that activates the wrong control is
   worse. The box stays 36px because growing it would re-flow every settings row
   in the dashboard. */
.wu-set-toggle::after,
.wu-set-stepper button::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 44px;
  transform: translateY(-50%);
}

.wu-set-seg button:hover,
.wu-set-toggle:hover,
.wu-set-stepper button:hover {
  border-color: var(--colour-accent);
}

.wu-set-seg button.wu-set-on,
.wu-set-toggle.wu-set-on {
  background: color-mix(in srgb, var(--colour-accent) 14%, var(--colour-surface));
  border-color: var(--colour-accent);
  color: var(--colour-accent);
  font-weight: var(--font-weight-bold);
}

/* Vocab language chips — compact flag + code, all five on one row */
.wu-set-langs {
  flex-wrap: nowrap;
  justify-content: stretch;
  gap: 4px;
}

.wu-set-langs .wu-set-toggle {
  flex: 1 1 0;
  min-width: 0;
  padding: var(--space-xs) 2px;
  font-size: var(--font-size-xs);
  text-align: center;
}

/* Collapsible settings subpanels (decision #55, settings rethink) */
.wu-set-group {
  border: 1px solid var(--colour-border);
  border-radius: var(--radius-card);
  background: var(--colour-bg);
  padding: 0 var(--space-md) var(--space-xs);
  margin-bottom: var(--space-sm);
}

.wu-set-group[open] > .wu-set-row,
.wu-set-group[open] > .wu-set-iconpick {
  margin-bottom: var(--space-xs);
}

.wu-set-group > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) 0;
  font-family: var(--font-display);
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-bold);
  color: var(--colour-text-primary);
}

.wu-set-group > summary::-webkit-details-marker {
  display: none;
}

/* Count badge in a panel summary (e.g. Confirm activities pending count) */
.wu-grp-count {
  font-family: var(--font-mono);
  font-size: var(--font-size-xs);
  color: #fff;
  background: var(--colour-danger);
  border-radius: var(--radius-pill);
  padding: 0 7px;
  min-width: 18px;
  text-align: center;
}

.wu-grp-count:empty {
  display: none;
}

.wu-set-group > summary::after {
  content: "›";
  margin-left: auto;
  font-size: var(--font-size-lg);
  color: var(--colour-text-secondary);
  transition: transform var(--transition-fast);
}

.wu-set-group[open] > summary::after {
  transform: rotate(90deg);
}

.wu-set-group[open] > summary {
  border-bottom: 1px solid var(--colour-border);
  margin-bottom: var(--space-sm);
}

/* ── Settings groups and title-bar counts (owner, 2026-10-31) ─────────────
   Weekly WarmUps / School / Games, each a heading over its panels. A counted
   activity carries its − n + IN the summary, so the chevron gives up its auto
   margin to the stepper: two auto margins would split the free space and park
   the chevron in the middle of the bar. */
.wu-set-grouphead {
  margin: var(--space-md) 0 var(--space-sm);
  font-family: var(--font-display);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--colour-text-secondary);
}

.wu-set-grouphead:first-child {
  margin-top: 0;
}

.wu-set-board {
  padding: 0 var(--space-xs) var(--space-sm);
}

.wu-set-group > summary .wu-sum-name {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  min-width: 0;
}

.wu-set-group > summary .wu-sum-name small {
  font-family: var(--font-body);
  font-weight: normal;
  font-size: var(--font-size-xs);
  color: var(--colour-text-secondary);
}

.wu-set-group > summary .wu-sum-tail {
  margin-left: auto;
}

.wu-set-group > summary:has(.wu-sum-tail)::after {
  margin-left: 0;
}

.wu-set-stepper button:disabled {
  opacity: 0.4;
  cursor: default;
}

/* A quest that is OFF is greyed but still openable — its steps have to be set
   before the switch will turn it on (#131). The switch itself stays at full
   strength: it is the one control that changes the state. */
/* (#313) An OFF quest is no longer greyed: on its own page it read as
   disabled, though its steps must be set while it is off. The switch says
   On / Off. */

/* 📝 One block per homework tile: its name, then its look. */
.wu-hw-tile {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--colour-border);
}

.wu-hw-tile:last-of-type {
  border-bottom: 0;
}

/* A site row now carries its own count between the name and the ✏️ ✕. */
.wu-link-row .wu-set-stepper {
  flex: none;
}

/* Icon picker (Music / Sports) */
.wu-set-iconpick {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  justify-content: flex-start;
}

.wu-icon-pick {
  width: 44px;
  height: 44px;
  font-size: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--colour-border);
  border-radius: var(--radius-button);
  background: var(--colour-surface);
  cursor: pointer;
}

.wu-icon-pick.wu-set-on {
  border-color: var(--colour-accent);
  background: color-mix(in srgb, var(--colour-accent) 14%, var(--colour-surface));
}

/* Activity recolour swatches (Phase 5 activity-type config) */
.wu-colour-row {
  gap: var(--space-sm);
}
.wu-colour-pick {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 50%;
  border: 2px solid var(--colour-border);
  background: var(--sw);
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease;
}
.wu-colour-pick.wu-set-on {
  border-color: var(--colour-text-primary);
  box-shadow: 0 0 0 2px var(--colour-surface), 0 0 0 4px var(--sw);
  transform: scale(1.08);
}



/* ── 📱 "This app" bar — the parent page's APK update (owner, 2026-10-31,
   modelled on myArtBox). Only drawn inside the Android app (app-update.js). A
   waiting update tints the bar with the brand and pulses its button twice —
   enough to be seen on arrival, not a loop to be stared at. */
.wu-app-bar {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  padding: var(--space-md);
  margin-bottom: var(--space-sm);
  background: var(--colour-surface);
  border: 1px solid var(--colour-border);
  border-radius: var(--radius-card);
}

.wu-app-bar-waiting {
  border-color: var(--colour-brand);
  background: color-mix(in srgb, var(--colour-brand) 10%, var(--colour-surface));
}

.wu-app-bar p {
  margin: 0;
}

.wu-app-bar-line {
  font-size: var(--font-size-sm);
  color: var(--colour-text-primary);
}

.wu-app-bar-notes,
.wu-app-bar-out {
  font-size: var(--font-size-xs);
  color: var(--colour-text-secondary);
}

.wu-app-bar-acts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm) var(--space-md);
}

.wu-app-bar-go {
  min-height: 44px;
  padding: 0 var(--space-md);
  border: 0;
  border-radius: var(--radius-button);
  background: var(--colour-success-ink);
  color: #fff;
  font-family: var(--font-body);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  cursor: pointer;
}

.wu-app-bar-go.wu-app-bar-ghost {
  background: var(--colour-surface);
  border: 1px solid var(--colour-border);
  color: var(--colour-text-primary);
  font-weight: normal;
}

.wu-app-bar-go:disabled {
  opacity: 0.6;
  cursor: default;
}

.wu-app-bar-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: var(--font-size-xs);
  color: var(--colour-text-secondary);
}

.wu-app-bar-flash {
  animation: wu-app-bar-flash 1.6s ease-in-out 2;
}

@keyframes wu-app-bar-flash {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--colour-brand) 0%, transparent); }
  50% { box-shadow: 0 0 0 8px color-mix(in srgb, var(--colour-brand) 45%, transparent); }
}

@media (prefers-reduced-motion: reduce) {
  .wu-app-bar-flash { animation: none; }
}


/* ── The profile sheet (#185) ─────────────────────────────────────────────────
   Children as one row of pills (four at most — MAX_PROFILES), then the rows
   that are about this child. The pill row never wraps a name under its disc
   into a second line: names are clipped, the disc is what is recognised. */
.wu-prof-pills {
  display: flex;
  justify-content: center;
  gap: var(--space-sm);
  margin: var(--space-sm) 0 var(--space-md);
}
.wu-prof-pill {
  flex: 0 1 78px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 8px 4px;
  border: 2px solid transparent;
  border-radius: var(--radius-card);
  background: var(--colour-bg);
  color: var(--colour-text-primary);
  font: inherit;
  cursor: pointer;
}
.wu-prof-pill-on {
  border-color: var(--colour-accent);
  background: var(--colour-surface);
}
.wu-prof-pill .wu-prof-av {
  width: 44px;
  height: 44px;
  flex: none;
  margin: 0; /* the list's right margin pushed it off centre (#511) */
  font-size: 22px;
}
.wu-prof-pill-name {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: var(--font-weight-bold);
}
.wu-prof-menu {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-top: 1px solid var(--colour-border);
  padding-top: var(--space-sm);
}
.wu-prof-row {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  min-height: 48px;
  padding: 0 var(--space-sm);
  border: none;
  border-radius: var(--radius-button);
  background: none;
  color: var(--colour-text-primary);
  font: inherit;
  font-size: 15px;
  text-align: left;
  cursor: pointer;
}
.wu-prof-row:hover {
  background: var(--colour-bg);
}
.wu-prof-row-ic {
  width: 28px;
  font-size: 20px;
  text-align: center;
  flex: none;
}


/* 🌐 School websites, one block per site (#192): the row (name, count, ✏️ ✕)
   with each of its dock tiles' days underneath, then the free slots up to the
   cap as dashed "+ Add website" buttons. */
.wu-site-block {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  padding-bottom: var(--space-xs);
}

.wu-site-day {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-xs) var(--space-sm);
  padding-left: var(--space-sm);
}

.wu-site-day > .wu-set-label {
  flex: none;
  min-width: 3.5em;
}

.wu-site-none {
  margin: 0;
  padding-left: var(--space-sm);
}

.wu-link-empty {
  box-sizing: border-box;
  min-height: 44px;
  width: 100%;
  border: 1px dashed var(--colour-border);
  border-radius: var(--radius-button);
  background: none;
  color: var(--colour-text-secondary);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.wu-link-empty:hover {
  border-color: var(--colour-accent);
  color: var(--colour-text-primary);
}

/* A dock tile's day: the Mo-Su taps wrap rather than overflow a narrow panel. */
.wu-dock-days {
  flex-wrap: wrap;
}

/* The add / edit website sheet: fields full width, not centred. */
.wu-link-sheet {
  align-items: stretch;
}

.wu-link-sheet .wu-sheet-title {
  text-align: center;
}

.wu-link-sheet .wu-sheet-actions {
  justify-content: flex-end;
}

/* Fields on the LEFT, icons on the RIGHT (owner, v489): the sheet is about
   half as tall as the stacked version, so the field the keyboard is raised for
   sits near the top of the card instead of under the keys. */
.wu-link-sheet {
  width: min(640px, calc(100% - var(--space-lg)));
}
/* v490 (owner): icons on the LEFT as a 5-wide grid (20 icons = 4 rows of 5),
   fields on the RIGHT with the commit button at the foot of that column, so the
   whole sheet is the height of the icon block. No Cancel — the ✕ closes. */
.wu-link-body {
  width: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--space-md);
  align-items: stretch;
}
.wu-link-fields,
.wu-link-icons {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  min-width: 0;
}
.wu-link-fields .wu-sheet-input { width: 100%; box-sizing: border-box; }
.wu-link-icons .wu-set-iconpick {
  display: grid;
  grid-template-columns: repeat(5, 44px);
  gap: 6px;
}
.wu-link-fields { justify-content: space-between; }
.wu-link-go { width: 100%; margin-top: auto; }
/* A phone has no room for 244px of icons beside two inputs: stack, icons first. */
@media (max-width: 560px) {
  .wu-link-body { grid-template-columns: minmax(0, 1fr); }
  .wu-link-icons { align-items: center; }
}

/* The label beside a day or icon row: kept on the left, the taps wrap past it. */
.wu-hw-tile .wu-site-day {
  padding-left: 0;
}
.wu-site-day > .wu-set-label {
  text-transform: none;
  letter-spacing: 0;
}

/* 🔒 A dashboard row that does not apply on this device (#198): greyed, still
   tappable so it can say why. */
.wu-dash-row-off {
  opacity: 0.5;
  filter: grayscale(1);
}

/* ✕ beside each homework / music / sport tile (#200). */
.wu-hw-head .wu-hw-del {
  margin-left: auto;
}
.wu-hw-ic {
  display: inline-flex;
  font-size: 22px;
  line-height: 1;
}


/* ── 👤 The profile PANEL (#237) ──────────────────────────────────────────
   Slides out of the rail instead of opening in the middle of the screen, so it
   reads as part of the bar the child tapped. The backdrop sits UNDER the rail
   (z 59 < 60): the bar stays visible and the panel appears to come out of it. */
.wu-switcher-backdrop.wu-prof-slide {
  z-index: 59;
  justify-content: flex-start;
  align-items: stretch;
  background: color-mix(in srgb, var(--colour-text-primary) 18%, transparent);
}
.wu-prof-slide > .wu-prof-sheet {
  margin: 0 0 0 calc(var(--safe-left) + var(--rail-bar-w) - var(--radius-shell));
  padding: var(--space-lg) var(--space-lg) var(--space-lg) calc(var(--space-lg) + var(--radius-shell));
  width: min(380px, calc(100vw - var(--rail-bar-w) - var(--space-md)));
  max-height: none;
  height: 100%;
  overflow-y: auto;
  align-items: stretch;
  justify-content: center;
  border: none;
  border-radius: 0 var(--radius-shell) var(--radius-shell) 0;
  box-shadow: 6px 0 28px rgba(0, 0, 0, 0.18);
  animation: wu-prof-in-side 180ms ease-out;
}
@keyframes wu-prof-in-side {
  from { transform: translateX(-24px); opacity: 0; }
  to { transform: none; opacity: 1; }
}
/* The phone's bottom bar (#230): the panel rises from it instead. */
@media (orientation: portrait) {
  .wu-switcher-backdrop.wu-prof-slide {
    align-items: flex-end;
    justify-content: stretch;
  }
  .wu-prof-slide > .wu-prof-sheet {
    margin: 0 0 calc(var(--rail-bar-w) + var(--safe-bottom) - var(--radius-shell)) 0;
    padding: var(--space-lg) var(--space-lg) calc(var(--space-lg) + var(--radius-shell));
    width: 100%;
    height: auto;
    max-height: calc(100vh - var(--rail-bar-w) - var(--space-xl));
    justify-content: flex-start;
    border-radius: var(--radius-shell) var(--radius-shell) 0 0;
    box-shadow: 0 -6px 28px rgba(0, 0, 0, 0.18);
    animation-name: wu-prof-in-up;
  }
}
@keyframes wu-prof-in-up {
  from { transform: translateY(24px); opacity: 0; }
  to { transform: none; opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .wu-prof-slide > .wu-prof-sheet { animation: none; }
}

/* Level progress on the profile panel (#240) — one card per subject: name and
   level, a bar for "open activities already at the next level", and a pip per
   activity so the child can see WHICH ones the next level is waiting on. */
.wu-prof-levels {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}
.wu-prof-lvl {
  --lvl-c: var(--activity-maths);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-card);
  background: var(--colour-bg);
}
.wu-prof-lvl[data-subject="vocab"] { --lvl-c: var(--activity-reading); }
/* A level card starts an exercise (#281). */
.wu-prof-lvl[role="button"] { cursor: pointer; }
.wu-prof-lvl[role="button"]:active { filter: brightness(0.96); }
.wu-prof-lvl[role="button"]:focus-visible { outline: 2px solid var(--lvl-c); outline-offset: 2px; }
.wu-prof-lvl-go {
  width: 28px;
  height: 28px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 12px;
  color: #fff;
  background: var(--lvl-c);
}
.wu-prof-lvl-head {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-display);
  font-weight: var(--font-weight-bold);
}
.wu-prof-lvl-ic { font-size: 18px; }
.wu-prof-lvl-num {
  margin-left: auto;
  font-size: var(--font-size-sm);
  font-variant-numeric: tabular-nums;
}
.wu-prof-lvl-bar {
  height: 10px;
  margin: 6px 0;
  border-radius: 999px;
  background: color-mix(in srgb, var(--lvl-c) 20%, var(--colour-surface));
  overflow: hidden;
}
.wu-prof-lvl-bar > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--lvl-c);
  transition: width 400ms ease;
}
.wu-prof-lvl-foot {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}
.wu-prof-pips {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  flex: 1;
  min-width: 0;
}
.wu-prof-pip {
  width: 8px;
  height: 9px;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  background: color-mix(in srgb, var(--lvl-c) 25%, var(--colour-border));
}
.wu-prof-pip-on { background: var(--lvl-c); }
.wu-prof-lvl-note {
  flex: none;
  font-size: var(--font-size-xs);
  color: var(--colour-text-secondary);
}
@media (prefers-reduced-motion: reduce) {
  .wu-prof-lvl-bar > span { transition: none; }
}

/* The profile panel's rows become BUTTONS, four to a row (#241, owner
   2026-11-16: "profile menu as buttons instead of list. Keep 4 in a row") —
   the same icon-over-label tile the ★ menu uses, so the two windows read as a
   pair. A fifth row (Get the app / Guest) wraps to a second line. */
.wu-prof-menu {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-xs);
}
.wu-prof-row {
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  min-height: 72px;
  padding: var(--space-xs) 2px;
  text-align: center;
  font-size: 12px;
  line-height: 1.2;
  border-radius: var(--radius-card);
}
.wu-prof-row-ic {
  width: auto;
  font-size: 24px;
}
.wu-prof-row-lbl {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.4em;
}

/* ── Which operation? (#266) — the sheet before a maths "way to practise".
   Two across, 🎲 Mixed full width under the four: it is the odd one out. */
.wu-way-ops {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-sm);
  width: 100%;
}
.wu-way-ops > .wu-sheet-btn { min-height: var(--tap-target-min); margin: 0; }
.wu-way-ops > .wu-sheet-btn:last-child { grid-column: 1 / -1; }

/* ══ THE PROFILE PANEL AS A CARD (#288) ═════════════════════════════════════
   Owner, 2026-11-21: "The profile side window to become a modal from the
   bottom right. similar to the weekly. they can be both on at the same time
   and they should stack if they are. toggle approach to both pills. the
   modals should push the hex frame to the side. same on mobile so that on the
   phone the modal is full width." The backdrop stops blocking (no scrim, taps
   pass through) and the sheet floats bottom-right above the floating buttons,
   lifted by --wkd-stack when the week window is open beneath it. The profile
   disc toggles it (#241); the ★ menu still closes it. */
@media (orientation: portrait), (min-height: 501px) {
  .wu-switcher-backdrop.wu-prof-slide {
    background: transparent !important;
    /* No blur (#289): the card is more information BESIDE the flower, read
       together with it and the week window, not a modal over it. */
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    pointer-events: none;
    /* Drops from the bar's profile button (#290): top-right, with the week
       window under it in one full-height column. */
    align-items: flex-start !important;
    justify-content: flex-end !important;
  }
  .wu-prof-slide > .wu-prof-sheet {
    pointer-events: auto;
    /* INSIDE the hex frame (#290): the frame is inset --space-md from the
       screen and the bar, the card a further --space-sm inside it. */
    margin: calc(var(--bar-top-h, 56px) + var(--space-md) + var(--space-sm)) calc(var(--space-md) + var(--space-sm) + var(--safe-right)) 0 0 !important;
    padding: var(--space-md) !important;
    width: min(420px, calc(100vw - 2 * (var(--space-md) + var(--space-sm)))) !important;
    height: auto !important;
    max-height: calc(var(--vh) - 2 * (var(--space-md) + var(--space-sm))) !important; /* --vh already excludes the bar in layout B */
    border-radius: 18px !important;
    box-shadow: 0 8px 28px rgba(43, 41, 38, 0.2) !important;
    animation: wu-prof-in-corner 0.2s ease-out !important;
    transform-origin: top right;
  }
  /* With the week window open beneath it, the card gives up enough height for
     the window to stay usable (its day strip and a row of activities) and
     scrolls inside instead: on a short screen the window was left 24px. */
  body:has(#wu-wkd.wu-wkd-open:not([hidden])) .wu-prof-slide > .wu-prof-sheet {
    max-height: calc(var(--vh) - 2 * (var(--space-md) + var(--space-sm)) - 250px) !important;
    overflow-y: auto;
  }
  @keyframes wu-prof-in-corner {
    from { transform: scale(0.2); opacity: 0; }
    to { transform: none; opacity: 1; }
  }
  /* MOVE THE FLOWER ASIDE (#289): home.js asideFlower() publishes a shift in
     whole columns; the flower keeps its size. (#288 padded the box instead,
     and the fitter shrank the flower into what was left.) */
  .wu-honeycomb-pane > .wu-honeycomb-wrap {
    translate: var(--flower-shift, 0px) 0;
    transition: translate 0.25s ease-out;
  }
}
/* A phone: the cards are full width; the flower keeps its width (the docked
   week window already moves it up, #285). */
@media (orientation: portrait) and (max-width: 599px) {
  .wu-prof-slide > .wu-prof-sheet {
    width: calc(100vw - 2 * (var(--space-md) + var(--space-sm))) !important;
  }
}
@media (prefers-reduced-motion: reduce) {
  .wu-prof-slide > .wu-prof-sheet { animation: none !important; }
  .wu-honeycomb-pane > .wu-honeycomb-wrap { transition: none; }
}

/* ══ THE STATS IN THE PROFILE CARD (#290) ═══════════════════════════════════
   Moved off the foot of home (owner: "the stats at the base appear lost and
   clash with the modals"). One row under the children; each opens what it
   opened on the rail. 🧾 with something waiting is marked, matching the dot
   on the profile button. */
.wu-prof-stats {
  display: flex;
  justify-content: center;
  gap: var(--space-sm);
  margin: var(--space-sm) 0 var(--space-md);
}
/* ONE LINE each (icon + number) — a labelled column made the card tall
   enough to push the week window off a 800px tablet. The label is the
   tooltip and the screen-reader name. */
.wu-prof-stat {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 4px 12px;
  border: 1px solid var(--colour-border);
  border-radius: 999px;
  background: var(--colour-surface);
  font: inherit;
  color: var(--colour-text-primary);
  cursor: pointer;
}
.wu-prof-stat-ic { font-size: 18px; line-height: 1; display: grid; place-items: center; }
.wu-prof-stat-ic img { width: 20px; height: 20px; }
.wu-prof-stat-n { font-family: var(--font-mono); font-weight: var(--font-weight-bold); font-size: 15px; }
.wu-prof-stat-zero { opacity: 0.55; }
.wu-prof-stat-alert { border-color: var(--colour-danger); }
.wu-prof-stat-alert::after {
  content: "";
  position: absolute;
  top: -2px;
  right: -2px;
  width: 10px;
  height: 10px;
  box-sizing: border-box;
  border-radius: 50%;
  background: var(--colour-danger);
  border: 2px solid var(--colour-surface);
}

/* Smaller tablets (owner, 2026-11-21: the child's tablet). The card was a flex
   column CENTRED with overflow — when it ran taller than the screen, centring
   pushed its top out of the scroll range, so "Who's warming up?" was cut off and
   could not be scrolled back. Content now starts at the top, the ✕ floats in the
   corner instead of taking a 44px row, and a short landscape screen tightens the
   spacing so the whole card fits without scrolling at 600px tall. */
@media (orientation: portrait), (min-height: 501px) {
  .wu-prof-slide > .wu-prof-sheet {
    justify-content: flex-start !important;
    /* No scrollbar (owner: "profile modal has vertical bar"). The blocks sit
       8px apart instead of 16 so the card fits beside the week window on a
       1024x768 tablet; where it still has to scroll, a finger scrolls it and
       the bar would only be a grey line down a child's card. */
    gap: var(--space-sm) !important;
    scrollbar-width: none;
  }
  .wu-prof-slide > .wu-prof-sheet::-webkit-scrollbar { display: none; }
  .wu-prof-slide > .wu-prof-sheet > .wu-sheet-cancel {
    position: absolute;
    top: var(--space-xs);
    right: var(--space-xs);
    margin: 0;
    z-index: 1;
  }
  .wu-prof-slide > .wu-prof-sheet > .wu-sheet-title { padding: 0 44px; }
}
/* Every size (#497, owner: "needs a small vertical reduction to fit without
   scrolling"): the card's blocks are already spaced by its gap, so the blocks'
   own margins were counted twice. Nothing goes below a 44px tap.
   Loosened in #511: the same padding on all four sides, and room round the
   avatar for its frame, which reaches 6px past the disc (avatar-kit.js) and
   was touching the selected child's border. */
@media (orientation: portrait), (min-height: 501px) {
  .wu-prof-slide > .wu-prof-sheet { padding: var(--space-md) !important; }
  .wu-prof-slide .wu-prof-pills,
  .wu-prof-slide .wu-prof-stats,
  .wu-prof-slide .wu-prof-levels { margin: 0; }
  .wu-prof-slide .wu-prof-levels { gap: var(--space-sm); }
  .wu-prof-slide .wu-prof-pill { padding: 12px 4px 6px; gap: 9px; }
  .wu-prof-slide .wu-prof-lvl { padding: var(--space-sm) var(--space-md); }
  .wu-prof-slide .wu-prof-lvl-bar { height: 8px; margin: 4px 0; }
  .wu-prof-slide .wu-prof-menu { padding-top: var(--space-sm); }
  .wu-prof-slide .wu-prof-row { min-height: 60px; }
  .wu-prof-slide .wu-prof-row-ic { font-size: 22px; }
}
@media (orientation: landscape) and (min-height: 501px) and (max-height: 780px) {
  .wu-prof-slide .wu-prof-levels { gap: 6px; }
  .wu-prof-slide .wu-prof-lvl { padding: 6px var(--space-md); }
  .wu-prof-slide .wu-prof-row { min-height: 60px; }
  .wu-prof-slide .wu-prof-row-ic { font-size: 22px; }
}

/* ⚙️ Parent settings as PAGES (#313, settings-pages.js; prototyped as #312).
   Tablet: the section list fixed on the LEFT edge, one page on the right, and
   each column scrolls on its own. Phone: list → page with a back row. */
.wu-pg-nav, .wu-pg-back { display: none; }
.wu-set-list.wu-dash.wu-dash-pages {
  width: 100%;
  overflow: hidden;
  padding: 0;
}
.wu-dash-pages .wu-dash-grid {
  flex: 1;
  min-height: 0;
  grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  align-items: stretch;
}
.wu-dash-pages .wu-pg-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  grid-column: 1;
  grid-row: 1;
  min-height: 0;
  overflow-y: auto;
  /* No top padding: the first grey group starts level with the page frame on
     the right (#392 — it sat 8px lower). */
  padding: 0 var(--space-xs) var(--space-md) 0;
}
.wu-dash-pages :is(.wu-dash-main, .wu-dash-settings) {
  grid-column: 2;
  grid-row: 1;
  min-height: 0;
  overflow-y: auto;
  align-self: stretch;
}
.wu-dash-pages .wu-dash-main { padding: var(--space-sm) var(--space-xs) var(--space-md); }
.wu-dash-pages .wu-dash-settings { padding-top: var(--space-sm); }
/* Only the open page's sections show. */
.wu-dash-pages :is(.wu-dash-main, .wu-set-sub) > :not(.wu-pg-on) { display: none !important; }
.wu-dash-pages .wu-dash-main:not(:has(.wu-pg-on)),
.wu-dash-pages .wu-dash-settings:not(:has(.wu-pg-on)) { display: none; }
.wu-dash-pages .wu-dash-set-head { display: none; }
/* A section on a page is a heading, not a fold. */
.wu-dash-pages details.wu-pg-on > summary { cursor: default; }
.wu-dash-pages details.wu-pg-on > summary::after { display: none; }
.wu-pg-head {
  margin: var(--space-sm) 0 2px;
  font-family: var(--font-display);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--colour-text-secondary);
}
.wu-pg-head:first-child { margin-top: 0; }
.wu-pg-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  min-height: var(--tap-target-min);
  padding: var(--space-xs) var(--space-md);
  border: 1px solid var(--colour-border);
  border-radius: var(--radius-button);
  background: var(--colour-surface);
  color: var(--colour-text-primary);
  font-family: var(--font-display);
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-bold);
  text-align: left;
  cursor: pointer;
}
.wu-pg-item > span { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; }
.wu-pg-item :is(img, .wu-set-icon) { width: 1.2em; height: 1.2em; }
.wu-pg-item .wu-sum-name { display: contents; }
.wu-pg-item > b {
  min-width: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--colour-danger);
  color: #fff;
  font-size: var(--font-size-sm);
  text-align: center;
}
.wu-pg-item.wu-on {
  border-color: var(--colour-accent);
  background: color-mix(in srgb, var(--colour-accent) 12%, var(--colour-surface));
}
/* Week plan's mix rows and the level row. */
.wu-mix-row .wu-set-label { display: flex; align-items: center; gap: 6px; }
.wu-mix-free .wu-set-value { min-width: 2.2em; text-align: center; font-weight: var(--font-weight-bold); }
.wu-names-head { display: flex; align-items: center; gap: 6px; margin-top: var(--space-md); }
.wu-lvl-row { flex-wrap: wrap; }
.wu-lvl-more { flex: none; }
.wu-lvl-more > summary {
  list-style: none;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid var(--colour-border);
  border-radius: 50%;
  font-weight: var(--font-weight-bold);
  color: var(--colour-accent);
  cursor: pointer;
}
.wu-lvl-more > summary::-webkit-details-marker { display: none; }
.wu-lvl-more[open] { flex-basis: 100%; }
.wu-lvl-more > p { margin: var(--space-xs) 0 0; font-size: var(--font-size-sm); color: var(--colour-text-secondary); }
@media (max-width: 900px) {
  .wu-dash-pages .wu-dash-grid { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .wu-dash-pages .wu-pg-nav,
  .wu-dash-pages :is(.wu-dash-main, .wu-dash-settings) { grid-column: 1; grid-row: 2; }
  .wu-dash-pages[data-pgstep="nav"] :is(.wu-dash-main, .wu-dash-settings) { display: none !important; }
  .wu-dash-pages[data-pgstep="page"] .wu-pg-nav { display: none; }
  .wu-dash-pages[data-pgstep="page"] .wu-pg-back {
    display: block;
    grid-row: 1;
    justify-self: start;
    min-height: var(--tap-target-min);
    padding: 0 var(--space-md);
    border: 1px solid var(--colour-border);
    border-radius: 999px;
    background: var(--colour-surface);
    color: var(--colour-accent);
    font-family: var(--font-display);
    font-weight: var(--font-weight-bold);
    cursor: pointer;
  }
}
/* The Children page (#314): the tabs, the week, what needs a grown-up
   (support first — rarer and more urgent), progress, then managing the
   children. DOM order is the old two-column dashboard's, so it is set here. */
.wu-dash-pages .wu-dash-main > [data-group="children"] { order: -7; }
.wu-dash-pages .wu-dash-main > .wu-dash-overview { order: -6; }
.wu-dash-pages .wu-dash-main > [data-group="support"] { order: -5; }
.wu-dash-pages .wu-dash-main > [data-group="confirm"] { order: -4; }
.wu-dash-pages .wu-dash-main > [data-group="tables"] { order: -3; }
.wu-dash-pages .wu-dash-main > [data-group="insights"] { order: -2; }
.wu-dash-pages .wu-dash-main > [data-group="profiles"] { order: -1; }
.wu-dash-pages [data-group="children"] > summary { display: none; }
.wu-kid-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: var(--space-sm);
  padding: var(--space-xs) 0 var(--space-sm);
}
.wu-kid-tab {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  min-height: 64px;
  padding: var(--space-sm) var(--space-md);
  border: 2px solid var(--colour-border);
  border-radius: var(--radius-card);
  background: var(--colour-surface);
  color: var(--colour-text-primary);
  font-family: var(--font-display);
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-bold);
  text-align: left;
  cursor: pointer;
}
.wu-kid-tab.wu-on { border-color: var(--colour-accent); background: color-mix(in srgb, var(--colour-accent) 10%, var(--colour-surface)); }
.wu-kid-tab .wu-prof-swatch { flex: none; }
.wu-kid-name { display: flex; flex-direction: column; min-width: 0; }
.wu-kid-name small { font-family: var(--font-body); font-weight: normal; font-size: var(--font-size-xs); color: var(--colour-text-secondary); }
.wu-kid-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  box-sizing: border-box;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--colour-danger);
  border: 2px solid var(--colour-surface);
  color: #fff;
  font-size: var(--font-size-sm);
}
.wu-kid-badge[hidden] { display: none; }
/* Names and colours as CARDS (#314: "half of the rows are empty"). */
.wu-name-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: var(--space-sm);
}
.wu-name-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  padding: var(--space-md);
  border: 1px solid var(--colour-border);
  border-radius: var(--radius-card);
  background: var(--colour-surface);
}
.wu-name-card .wu-names-head { margin: 0; font-family: var(--font-display); font-weight: var(--font-weight-bold); }
.wu-name-card .wu-set-row { min-height: 0; padding: 0; border: 0; background: none !important; }
.wu-name-card .wu-set-row .wu-set-label { display: none; }
.wu-name-card .wu-colour-row { padding: 0; border: 0; }
.wu-names-head { flex-direction: row; }

/* INVERTED on the page side (#313, owner: "on the right side it should invert
   the colours. grey for the frame and white for the cells / rows") — like
   Android's settings: a grey page, white rows on it. A section is no longer
   a box of its own there; its title is a heading and its rows sit on grey. */
.wu-dash-pages :is(.wu-dash-main, .wu-dash-settings) {
  background: var(--colour-bg);
  border: 1px solid var(--colour-border);
  border-radius: var(--radius-card);
  padding-left: var(--space-md);
  padding-right: var(--space-md);
}
.wu-dash-pages details.wu-pg-on {
  background: none;
  border: 0;
  padding: 0;
}
.wu-dash-pages :is(.wu-dash-main, .wu-dash-settings) :is(
  .wu-set-row, .wu-dash-row, .wu-q-sub, .wu-site-block, .wu-hw-tile,
  .wu-dash-stat, .wu-link-empty, .wu-set-iconpick, .wu-colour-row
) {
  background: var(--colour-surface);
}
/* SHORT TABLETS (#314: "this should make the left column fit without
   scrolling"). At 1024×600 the list was 663px in a 496px column. On a short
   screen the group titles become thin dividers and the rows lose 2px — the
   ten items then fit (measured 489px). */
@media (min-width: 901px) and (max-height: 700px) {
  .wu-dash-pages .wu-pg-nav { gap: 2px; }
  .wu-pg-head { font-size: 0; height: 0; margin: 4px 0; border-top: 1px solid var(--colour-border); }
  .wu-pg-head:first-child { display: none; }
  .wu-pg-item { min-height: 40px; padding-top: 0; padding-bottom: 0; }
  .wu-dash-pages .wu-pg-nav { padding-top: 0; padding-bottom: 0; }
}
/* All eight colours on ONE row of a name card (#314, owner: "reduce colours
   to fit in one row") — the swatches share the card's width instead of a
   fixed 34px that wrapped two onto a second line. */
.wu-name-card .wu-colour-row {
  display: grid !important;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 6px;
}
.wu-name-card .wu-colour-pick { width: 100%; height: auto; aspect-ratio: 1; max-width: 34px; justify-self: center; }
/* One grey frame per GROUP of the section list (#314, owner: "buttons on
   the left with the grey background", then "frame per grouping not the full
   height"): white buttons on grey, each group its own block. */
.wu-pg-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: var(--space-sm);
  background: var(--colour-bg);
  border: 1px solid var(--colour-border);
  border-radius: var(--radius-card);
}
.wu-dash-pages .wu-pg-nav { gap: var(--space-sm); margin-right: var(--space-xs); }
.wu-pg-group .wu-pg-head { margin: 0 0 2px; }
/* 📱 The settings list on a phone (#476, owner 2026-11-30: "parent settings padding
   at the top, can this be reduced. Its causing the menu to need to scroll on my
   mobile device. (about is cut half way through)"). On the list step the back
   row is hidden but its grid row and the 24px gap after it were not: the list
   now starts at the top, and the groups sit tighter, as on a short desktop. */
@media (max-width: 900px) {
  .wu-dash-pages[data-pgstep="nav"] .wu-dash-grid { row-gap: 0; grid-template-rows: 0 minmax(0, 1fr); }
  .wu-dash-pages .wu-pg-group { gap: 2px; padding: 4px 6px; }
}
@media (min-width: 901px) and (max-height: 700px) {
  .wu-dash-pages .wu-pg-nav { gap: 5px; }
  .wu-pg-group { gap: 2px; padding: 4px 6px; }
  .wu-pg-group .wu-pg-head { display: none; }
  .wu-pg-item { min-height: 38px; }
}
/* ── 👤 Children page as CARDS in two columns (#315, owner: "cards could be
   arranged across two columns … that would then stack on mobile"). Each
   section is a white card on the grey page; the tabs, the week numbers and
   the edit card span both columns. auto-fit stacks to one under ~720px. */
.wu-dash-pages .wu-dash-main:has(> [data-group="children"].wu-pg-on) {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: var(--space-md);
  align-content: start;
  align-items: start;
}
.wu-dash-pages .wu-dash-main:has(> [data-group="children"].wu-pg-on) > :is([data-group="children"], .wu-dash-overview, [data-group="profiles"]) {
  grid-column: 1 / -1;
}
.wu-dash-pages .wu-dash-main > details.wu-pg-on:is([data-group="support"], [data-group="confirm"], [data-group="tables"], [data-group="insights"], [data-group="profiles"]) {
  background: var(--colour-surface);
  border: 1px solid var(--colour-border);
  border-radius: var(--radius-card);
  padding: var(--space-md);
}
.wu-dash-pages .wu-dash-main > .wu-dash-overview { margin: 0; }
/* ➕ Add child — a card in the tab row. */
.wu-kid-add {
  border-style: dashed;
  background: transparent;
  padding: var(--space-xs) var(--space-sm);
  cursor: default;
}
.wu-kid-addbtn {
  flex: 1;
  align-self: stretch;
  border: 0;
  background: none;
  color: var(--colour-accent);
  font: inherit;
  cursor: pointer;
}
.wu-kid-add .wu-prof-input { flex: 1; min-width: 0; }
.wu-kid-add .wu-prof-add { flex: none; }
/* The edit card for the selected child (and any retired ones). */
.wu-kid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: var(--space-sm);
}
.wu-kid-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: var(--space-sm) var(--space-md);
  padding: var(--space-md);
  border: 1px solid var(--colour-border);
  border-radius: var(--radius-card);
  background: var(--colour-bg);
}
.wu-kid-card .wu-kid-big { width: 52px; height: 52px; font-size: 26px; }
.wu-kid-edit { display: flex; align-items: center; gap: var(--space-sm); flex-wrap: wrap; min-width: 0; }
.wu-kid-edit b { font-family: var(--font-display); font-size: var(--font-size-lg); }
.wu-kid-edit small { color: var(--colour-text-secondary); }
.wu-kid-edit .wu-prof-input { flex: 1; min-width: 0; }
.wu-kid-acts { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: var(--space-sm); align-items: center; }
.wu-kid-card button {
  min-height: var(--tap-target-min);
  padding: 0 var(--space-md);
  border: 1px solid var(--colour-border);
  border-radius: var(--radius-button);
  background: var(--colour-surface);
  color: var(--colour-text-primary);
  font: inherit;
  font-weight: var(--font-weight-bold);
  cursor: pointer;
}
.wu-kid-card .wu-kid-del { color: var(--colour-danger); }
.wu-kid-here { color: var(--colour-text-secondary); font-size: var(--font-size-sm); }
.wu-kid-retired { opacity: 0.75; }
/* Meters and bars for times tables and insights (#315). */
.wu-meter {
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(60px, 1fr) auto;
  align-items: center;
  gap: var(--space-sm);
  margin: var(--space-xs) 0;
  font-size: var(--font-size-sm);
}
.wu-meter-track, .wu-ins-track {
  height: 10px;
  border-radius: 999px;
  background: var(--colour-bg);
  overflow: hidden;
}
.wu-meter-track i, .wu-ins-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--colour-success);
}
.wu-meter b { font-family: var(--font-mono); }
.wu-tbl-bars {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 4px;
  height: 130px;
  margin: var(--space-sm) 0 var(--space-xs);
}
.wu-tbl-bar {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  justify-items: center;
  gap: 2px;
  min-width: 0;
}
.wu-tbl-bar i {
  align-self: end;
  width: 100%;
  max-width: 28px;
  height: max(4px, var(--h));
  border-radius: 4px 4px 0 0;
  background: var(--colour-accent);
}
.wu-tbl-bar.wu-tbl-none i { background: none; border: 1px dashed var(--colour-warning); border-bottom-width: 3px; height: 6px; }
.wu-tbl-bar.wu-tbl-off i { background: var(--colour-border); height: 4px; }
.wu-tbl-bar.wu-tbl-off b { color: var(--colour-text-secondary); font-weight: normal; }
.wu-tbl-bar b { font-family: var(--font-mono); font-size: var(--font-size-xs); }
.wu-tbl-c { font-family: var(--font-mono); font-size: var(--font-size-xs); color: var(--colour-text-secondary); min-height: 1.2em; }
.wu-tbl-how { margin-top: var(--space-xs); }
.wu-ins-rows { display: flex; flex-direction: column; gap: 6px; margin-top: var(--space-sm); }
.wu-ins-row {
  display: grid;
  grid-template-columns: minmax(90px, 9em) minmax(40px, 1fr) auto;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--font-size-sm);
}
.wu-ins-name { display: flex; align-items: center; gap: 4px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wu-ins-track i { background: var(--c); }
.wu-ins-val { font-family: var(--font-mono); font-size: var(--font-size-xs); color: var(--colour-text-secondary); white-space: nowrap; }
.wu-tbl-bar.wu-tbl-none, .wu-tbl-bar.wu-tbl-off { background: none; border: 0; }
.wu-tbl-bar.wu-tbl-off { opacity: 1; }
/* The edit card on ONE line where it fits: face · name + rename · actions. */
.wu-kid-cards { grid-template-columns: minmax(0, 1fr); }
.wu-kid-card { display: flex; flex-wrap: wrap; }
.wu-kid-card .wu-kid-edit { flex: 1 1 220px; }
.wu-kid-card .wu-kid-acts { flex: 0 1 auto; margin-left: auto; }
/* ❓ A card's (?) sits right after its title (#316); its long description
   shows only while the ? is on. */
.wu-dash-pages .wu-pg-on:not(.wu-help-show) .wu-help-text { display: none; }
.wu-sec-help {
  flex: none;
  width: 26px;
  height: 26px;
  margin-left: var(--space-xs);
  padding: 0;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--colour-border);
  border-radius: 50%;
  background: var(--colour-surface);
  color: var(--colour-accent);
  font: inherit;
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-sm);
  line-height: 1;
  vertical-align: middle;
  cursor: pointer;
}
.wu-help-show .wu-sec-help[aria-expanded="true"] { background: var(--colour-accent); border-color: var(--colour-accent); color: #fff; }
.wu-help-text { margin-top: var(--space-xs); }
.wu-help-head {
  display: flex;
  align-items: center;
  font-family: var(--font-display);
  font-weight: var(--font-weight-bold);
  padding-bottom: var(--space-xs);
  margin-bottom: var(--space-xs);
  border-bottom: 1px solid var(--colour-border);
}
.wu-dash-pages .wu-set-board.wu-help-host + .wu-set-board.wu-help-host { margin-top: var(--space-md); }
/* 🗺️ Quest slot cards and picker (#320). */
.wu-q-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr));
  gap: var(--space-sm);
  margin-top: var(--space-sm);
}
.wu-q-card { position: relative; display: flex; }
.wu-q-pick {
  flex: 1;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  min-height: 72px;
  padding: var(--space-sm) var(--space-md);
  border: 1px solid var(--colour-border);
  border-radius: var(--radius-card);
  background: var(--colour-surface);
  color: var(--colour-text-primary);
  font: inherit;
  font-family: var(--font-display);
  font-weight: var(--font-weight-bold);
  text-align: left;
  cursor: pointer;
}
.wu-q-pick:hover { border-color: var(--colour-accent); }
.wu-q-empty .wu-q-pick { border-style: dashed; background: transparent; color: var(--colour-accent); }
.wu-q-empty .wu-q-pick:disabled { opacity: 0.45; cursor: default; }
.wu-q-ic { font-size: 28px; line-height: 1; flex: none; display: inline-grid; place-items: center; min-width: 32px; }
.wu-q-icimg { width: 28px; height: 28px; }
.wu-q-name { min-width: 0; }
.wu-q-card .wu-q-badge { flex: none; }
.wu-q-clear {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1px solid var(--colour-border);
  border-radius: 50%;
  background: var(--colour-surface);
  color: var(--colour-danger);
  font-size: 12px;
  cursor: pointer;
}
.wu-q-sheet { width: min(640px, calc(100vw - 32px)); max-height: calc(var(--vh) - 32px); overflow-y: auto; box-sizing: border-box; }
.wu-q-pick-title { margin: 0 0 var(--space-sm); font-family: var(--font-display); }
.wu-q-pick-head {
  margin: var(--space-md) 0 var(--space-xs);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--colour-text-secondary);
}
.wu-q-pick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: var(--space-xs);
}
.wu-q-opt {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  min-height: var(--tap-target-min);
  padding: var(--space-xs) var(--space-sm);
  border: 1px solid color-mix(in srgb, var(--c) 45%, var(--colour-border));
  border-radius: var(--radius-button);
  background: color-mix(in srgb, var(--c) 8%, var(--colour-surface));
  color: var(--colour-text-primary);
  font: inherit;
  font-size: var(--font-size-sm);
  text-align: left;
  cursor: pointer;
}
.wu-q-opt .wu-q-ic { font-size: 20px; min-width: 24px; }
.wu-q-opt .wu-q-icimg { width: 20px; height: 20px; }
.wu-sheet.wu-q-sheet { align-items: stretch; text-align: left; }
.wu-q-sheet .wu-q-pick-grid, .wu-q-sheet .wu-q-pick-head { width: 100%; align-self: stretch; }
/* 📝🎵🏅 A dock tile is ONE ROW (#321): look · name · weekday · ✕. */
.wu-hw-tile.wu-hw-row {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-xs) var(--space-sm);
}
.wu-hw-look {
  flex: none;
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--colour-border);
  border-radius: var(--radius-button);
  background: var(--colour-surface);
  font-size: 22px;
}
button.wu-hw-look { cursor: pointer; }
button.wu-hw-look:hover { border-color: var(--colour-accent); }
.wu-hw-main { flex: 1 1 140px; min-width: 0; display: flex; align-items: center; gap: var(--space-sm); }
.wu-hw-main b { white-space: nowrap; }
.wu-hw-desc { flex: 1 1 90px; min-width: 0; max-width: 180px; }
.wu-hw-row .wu-dock-days { flex: none; }
.wu-hw-row .wu-hw-del { flex: none; margin-left: 0; }
.wu-look-picks { justify-content: center; }
.wu-q-tables { grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); }
.wu-q-tables .wu-q-any { grid-column: 1 / -1; }
.wu-q-tables .wu-q-opt { justify-content: center; }

/* 🔑 Reinstall steps (#328). */
.wu-reinstall-steps { margin: var(--space-sm) 0 var(--space-md); padding-left: 1.4em; text-align: left; display: grid; gap: var(--space-sm); line-height: 1.4; }
.wu-reinstall-get { display: block; text-align: center; text-decoration: none; }

/* 👪 Family account (#340) — the guardian tick and the create / sign-in switch. */
.wu-acct-tabs { margin-bottom: var(--space-sm); }
.wu-acct-tick {
  display: flex;
  gap: var(--space-sm);
  align-items: flex-start;
  margin: var(--space-sm) 0;
  font-size: var(--font-size-sm);
  color: var(--colour-text-secondary);
}
.wu-acct-tick input { width: 22px; height: 22px; flex: 0 0 auto; margin-top: 1px; accent-color: var(--colour-brand-deep, #fb8c00); }

/* 🔒 Parent lock choice (#341) — two chips inside the device row. */
.wu-lock-row { cursor: default; }
.wu-lock-opts { display: flex; flex-wrap: wrap; gap: var(--space-xs); margin-top: var(--space-sm); }

/* 👪 The account expands under its row (#344). */
.wu-dash-expand .wu-dash-chev { transition: transform .2s ease; }
.wu-dash-expand.wu-open .wu-dash-chev { transform: rotate(90deg); }
.wu-acct-panel { padding: 0 var(--space-md) var(--space-md); }
.wu-acct-inline { padding: 0; }
/* Change PIN is a chip like the lock choices above it, not a sheet button. */
.wu-lock-change { flex: 0 0 auto; }

/* After the emailed code: pick the lock (#345). */
.wu-pin-choice { display: grid; gap: var(--space-sm); width: 100%; margin-top: var(--space-sm); }
.wu-pin-choice[hidden], .wu-pin-pad[hidden], .wu-pin-dots[hidden] { display: none; }

/* ── 👪 The account card (#346) — it grows out of the boot splash: Mimi on her
   amber hex sits ON the card's top edge and the pair rises in, the same warm
   paper behind. Used by the welcome, the save step, the launch reminder and
   the sign-in card. ── */
.wu-acct-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(440px, calc(100% - var(--space-lg)));
  max-height: calc(var(--vv-h, var(--vh)) - var(--space-lg) * 2);
  animation: wu-acct-rise 0.45s cubic-bezier(.2, .9, .3, 1.15) both;
}
.wu-acct-stack > .wu-sheet {
  width: 100%;
  padding-top: calc(var(--space-xl) + 8px);
  max-height: none;
  min-height: 0;
  overflow-y: auto;
}
.wu-acct-mimi {
  width: 96px;
  height: 96px;
  margin-bottom: -44px;   /* half on the card's edge */
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  filter: drop-shadow(0 6px 12px rgba(122, 75, 0, 0.18));
}
@keyframes wu-acct-rise {
  from { opacity: 0; transform: translateY(24px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}
/* A card opened while the splash still covers the screen waits for it: the
   rise starts the moment the splash begins to fade, so the two read as one. */
body:has(.wu-boot:not(.wu-boot-out)) .wu-acct-stack { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) { .wu-acct-stack { animation: none; } }
.wu-acct-tabs2 {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: var(--colour-bg);
  align-self: stretch;
}
.wu-acct-tabs2 button {
  flex: 1;
  border: 0;
  border-radius: 999px;
  padding: 8px 10px;
  background: transparent;
  font: 600 var(--font-size-sm) var(--font-body, inherit);
  color: var(--colour-text-secondary);
  cursor: pointer;
}
.wu-acct-tabs2 button.wu-on { background: var(--colour-surface); color: var(--colour-text-primary); box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.wu-acct-field { display: grid; gap: 4px; align-self: stretch; font-size: var(--font-size-sm); font-weight: 600; color: var(--colour-text-secondary); }
.wu-acct-small { margin: 0; font-size: var(--font-size-xs, 12px); color: var(--colour-text-secondary); text-align: center; }
.wu-acct-link {
  background: none;
  border: 0;
  color: var(--colour-text-secondary);
  font-size: var(--font-size-sm);
  text-decoration: underline;
  cursor: pointer;
  padding: var(--space-xs);
}
.wu-acct-card .wu-acct-tick, .wu-onboard .wu-acct-tick { align-self: stretch; }
/* Compact account card (#376): no scroll on a phone — tighter rhythm, the
   tick sits flush, buttons full width, password with a 👁 toggle. */
.wu-acct-card { gap: var(--space-sm); }
.wu-acct-card .wu-acct-title { margin: 0; }
.wu-acct-card .wu-acct-tick { margin: 0; }
.wu-acct-card > .wu-sheet-btn { align-self: stretch; }
.wu-acct-card > .wu-acct-link { padding: 0; }
.wu-acct-pw { position: relative; display: block; }
.wu-acct-pw .wu-sheet-input { width: 100%; box-sizing: border-box; padding-right: 48px; }
.wu-acct-eye {
  position: absolute; right: 2px; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border: 0; background: none; cursor: pointer;
  font-size: 18px; opacity: .55;
}
.wu-acct-eye[aria-pressed="true"] { opacity: 1; }
@media (max-width: 599px), (max-height: 700px) {
  .wu-acct-stack > .wu-sheet { padding: calc(var(--space-lg) + 4px) var(--space-md) var(--space-md); }
  .wu-acct-mimi { width: 72px; height: 72px; margin-bottom: -32px; }
}

/* 🌟 The first-run welcome (#348): Mimi's word, then her, then two choices. */
.wu-welcome { align-items: center; text-align: center; }
.wu-welcome .wu-mi-word { height: 56px; font-size: 46px; }
.wu-welcome .wu-mi-fig { width: 96px; height: calc(96px * 1.1547); margin-top: 0; }
.wu-welcome .wu-mi-fig .wu-mascot { width: 88px; height: 88px; }
.wu-welcome .wu-sheet-actions-col { align-self: stretch; }
/* ⏭ Skip registration (#374) — the quietest thing on the card: a small link
   and the plain statement of what it costs. */
.wu-welcome-skip {
  display: flex; flex-direction: column; align-items: center; gap: 0;
  margin-top: var(--space-xs);
  color: var(--colour-text-secondary);
}
.wu-welcome-skip small { font-size: var(--font-size-xs, 0.75rem); }

/* 🔦 The home tour (#348): a spotlight over the real screen. */
.wu-tour { position: fixed; inset: 0; z-index: 450; }
.wu-tour-hole {
  position: fixed;
  border-radius: 18px;
  outline: 3px solid var(--colour-brand, #FFB74D);
  transition: left .35s ease, top .35s ease, width .35s ease, height .35s ease;
  pointer-events: none;
}
.wu-tour-dim { position: fixed; inset: 0; background: rgba(20, 16, 10, 0.62); transition: clip-path .35s ease; }
.wu-tour-card {
  position: fixed;
  display: flex; gap: var(--space-sm); align-items: flex-start;
  box-sizing: border-box;
  padding: var(--space-md);
  background: var(--colour-surface);
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  transition: left .35s ease, top .35s ease;
}
.wu-tour-mimi { width: 56px; height: 56px; flex: none; margin: -6px -4px 0 -8px; }
.wu-tour-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--space-xs); }
.wu-tour-title { margin: 0; font-family: var(--font-display); font-size: var(--font-size-lg, 18px); color: var(--colour-text-primary); }
.wu-tour-text { margin: 0; color: var(--colour-text-primary); line-height: 1.4; }
.wu-tour-actions { display: flex; align-items: center; gap: var(--space-sm); margin-top: var(--space-xs); }
.wu-tour-skip { padding-left: 0; }
.wu-tour-count { margin-left: auto; color: var(--colour-text-secondary); font-family: var(--font-mono, monospace); font-size: var(--font-size-sm); }
.wu-tour-next { width: auto; padding-inline: var(--space-md); }
@media (prefers-reduced-motion: reduce) {
  .wu-tour-hole, .wu-tour-card, .wu-tour-dim { transition: none; }
}

/* 🇬 Continue with Google (#352). Google draws its own button in the browser;
   these only frame it, plus the APK's native-route button. */
.wu-google-or {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  align-self: stretch;
  margin: var(--space-xs) 0;
  color: var(--colour-text-secondary);
  font-size: var(--font-size-xs);
}
.wu-google-or::before,
.wu-google-or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--colour-border);
}
.wu-google-host {
  display: flex;
  justify-content: center;
  align-self: stretch;
  min-height: 44px;
}
.wu-google-host[hidden] { display: none; }
.wu-google-native {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  min-height: 44px;
  width: min(320px, 100%);
  background: var(--colour-surface);
  border: 1px solid var(--colour-border);
  border-radius: var(--radius-pill);
  color: var(--colour-text-primary);
}
.wu-google-g {
  font-family: Arial, sans-serif;
  font-weight: 700;
  color: #4285F4;
}

/* The welcome, still (#354): Mimi on her hex, the wordmark under her, Google
   first with its consent line above it, email and school as quiet links. */
/* #375 (owner: "get mimi next to the WarmUp. remove the hi i'm mimi text"):
   Mimi and the wordmark on ONE line — her hex the height of the letters. The
   SVG draws its hex in the middle 60% of its box, hence the negative margins. */
.wu-welcome-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin: 0;
}
.wu-welcome-mimi { width: 76px; height: 76px; margin: -10px -6px -10px -14px; display: block; flex: none; }
.wu-welcome-brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 40px;
  line-height: 1;
  color: var(--colour-text-primary);
  margin: 0;
}
.wu-welcome-brand b { color: var(--colour-brand-deep, #fb8c00); }
.wu-welcome-consent { max-width: 34ch; margin: var(--space-sm) auto 0; text-align: center; }
/* Sign in first, New here after (#377, #378): a label over the three sign-in
   buttons, then a divider and "New here?" over Create an account. */
.wu-welcome-label { margin: var(--space-xs) 0 0; font-weight: 700; color: var(--colour-text-primary); }
.wu-welcome-have {
  display: flex; flex-direction: column; align-items: center; gap: var(--space-xs);
  align-self: stretch; padding-top: var(--space-sm);
  border-top: 1px solid var(--colour-border);
  font-size: var(--font-size-sm); color: var(--colour-text-secondary);
}

.wu-welcome-alt {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-xs) var(--space-md);
}
.wu-welcome-alt .wu-acct-link { min-height: 44px; }
/* 🏫 Pupil / Teacher before schools exist (#367): shown, labelled, not live. */
.wu-school-soon { display: flex; flex-direction: column; align-items: center; gap: 2px; opacity: 0.6; }
.wu-school-soon small { font-size: 12px; font-weight: 600; color: var(--colour-text-secondary); }

/* 🧾 Activities to approve INSIDE the profile card (#371). The card keeps its
   box; its own content steps aside while the list is up, and the list's ✕
   brings it back. */
.wu-prof-sub-on > :not(.wu-prof-sub) { display: none !important; }
.wu-prof-sub-on { justify-content: flex-start !important; }
.wu-prof-sub {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--space-sm);
  min-height: 0;
  width: 100%;
}
.wu-prof-sub .wu-sheet-title { padding-right: var(--space-xl); text-align: left; margin: 0; }
.wu-prof-sub .wu-sheet-cancel { top: 0; right: 0; }
.wu-confirm-lede { margin: 0; color: var(--colour-text-secondary); font-size: var(--font-size-sm); }
.wu-prof-sub .wu-confirm-host { display: flex; flex-direction: column; gap: var(--space-sm); }
.wu-prof-sub .wu-confirm-list { width: 100%; max-height: none; }

/* The welcome's other two ways in read EQUAL to Google's (#375, owner: "use
   email and school to get button like google so they read equal"): the same
   pill, width, height and border as the GIS large pill button above them. */
.wu-welcome-btns {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  align-self: stretch;
}
.wu-welcome-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  width: min(320px, 100%);
  min-height: 40px;
  padding: 0 var(--space-md);
  background: var(--colour-surface);
  border: 1px solid #dadce0; /* Google's own button border, so the three match */
  border-radius: var(--radius-pill);
  color: var(--colour-text-primary);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}
/* Google's layout: the mark pinned to the left edge, the words centred on the
   whole button, so the three labels line up down the middle. */
.wu-welcome-btn { position: relative; padding: 0 44px; }
.wu-welcome-btn-ic {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  line-height: 1;
}
/* All three in ONE column with one gap — the Google host at the button's own
   40px, not the 44px it reserves elsewhere, so the spacing is even. */
.wu-welcome-btns .wu-google-host { min-height: 40px; align-self: auto; width: min(320px, 100%); }
.wu-welcome-btn:hover { background: color-mix(in srgb, var(--colour-accent) 5%, var(--colour-surface)); }
.wu-welcome-btn:focus-visible { outline: 2px solid var(--colour-accent); outline-offset: 2px; }

/* 📋 The setup checklist (#406, setup-checklist.js): a Mimi head, a progress
   bar and one row per thing to set up; the open row shows what it is for and
   a "Show me" into its settings page. */
.wu-sc { align-items: stretch; gap: var(--space-sm); text-align: left; }
.wu-sc-head { display: flex; align-items: center; gap: var(--space-md); padding-right: 36px; }
.wu-sc-head .wu-sheet-title { margin: 0; }
.wu-sc-mimi { width: 52px; height: 52px; flex: none; }
.wu-sc-count { margin: 2px 0 0; font-size: var(--font-size-sm); color: var(--colour-text-secondary); }
.wu-sc-bar { height: 8px; border-radius: 999px; background: var(--colour-bg); border: 1px solid var(--colour-border); overflow: hidden; }
.wu-sc-bar > i { display: block; height: 100%; background: var(--colour-success); border-radius: inherit; transition: width .3s ease; }
.wu-sc-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.wu-sc-item { border: 1px solid var(--colour-border); border-radius: var(--radius-button); background: var(--colour-surface); }
.wu-sc-item.wu-sc-open { border-color: var(--colour-accent); }
.wu-sc-row {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  width: 100%;
  min-height: var(--tap-target-min);
  padding: var(--space-xs) var(--space-md);
  border: 0;
  background: none;
  color: var(--colour-text-primary);
  font-family: var(--font-display);
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-bold);
  text-align: left;
  cursor: pointer;
}
.wu-sc-ic { width: 1.4em; text-align: center; flex: none; }
.wu-sc-title { flex: 1; min-width: 0; }
.wu-sc-tick {
  flex: none;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 2px solid var(--colour-border);
  border-radius: 50%;
  color: #fff;
  font-size: var(--font-size-sm);
}
.wu-sc-done .wu-sc-tick { background: var(--colour-success); border-color: var(--colour-success); }
.wu-sc-done:not(.wu-sc-open) .wu-sc-title { color: var(--colour-text-secondary); }
.wu-sc-body { padding: 0 var(--space-md) var(--space-md); }
.wu-sc-body > p { margin: 0 0 var(--space-sm); font-size: var(--font-size-sm); line-height: 1.5; }
.wu-sc-acts { display: flex; flex-wrap: wrap; gap: var(--space-sm); }
.wu-sc-acts > .wu-sheet-btn { flex: 1 1 auto; }
.wu-sc-pill { border-color: var(--colour-accent); }
.wu-sc-pill > em {
  font-style: normal;
  padding: 0 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--colour-accent) 14%, var(--colour-surface));
  color: var(--colour-accent);
  font-size: var(--font-size-sm);
}
.wu-sc-pill-done { border-color: var(--colour-border); }
.wu-sc-pill-done > em { background: none; color: var(--colour-success); }

/* ⬇️ Get WarmUp (#414, install.js): one card per way to get the app. */
.wu-get { align-items: stretch; text-align: left; gap: var(--space-md); width: min(560px, calc(100% - var(--space-lg))); }
.wu-get-top { display: flex; align-items: center; gap: var(--space-md); padding-right: 36px; }
.wu-get-top .wu-sheet-title { margin: 0; text-align: left; }
.wu-get-icon { width: 56px; height: 56px; border-radius: 14px; flex: none; }
.wu-get-sub { margin: 2px 0 0; font-size: var(--font-size-sm); color: var(--colour-text-secondary); }
.wu-get-cards { display: flex; flex-direction: column; gap: var(--space-sm); }
.wu-get-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  padding: var(--space-md);
  border: 1px solid var(--colour-border);
  border-radius: var(--radius-card);
  background: var(--colour-surface);
}
.wu-get-card-best {
  border-color: var(--colour-accent);
  background: color-mix(in srgb, var(--colour-accent) 6%, var(--colour-surface));
}
.wu-get-card-muted { background: var(--colour-bg); }
.wu-get-card-muted h4, .wu-get-card-muted .wu-get-ic { opacity: .7; }
.wu-get-head { display: flex; align-items: center; gap: var(--space-sm); }
.wu-get-head h4 { margin: 0; flex: 1; font-family: var(--font-display); font-size: var(--font-size-md); }
.wu-get-head h4 small { font-weight: normal; color: var(--colour-text-secondary); }
.wu-get-ic { font-size: 1.4em; line-height: 1; }
.wu-get-best {
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--colour-accent);
  color: #fff;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  white-space: nowrap;
}
.wu-get-perks { margin: 0; padding-left: 1.2em; font-size: var(--font-size-sm); color: var(--colour-text-secondary); }
.wu-get-perks li { margin: 1px 0; }
.wu-get-how, .wu-get-note { margin: 0; font-size: var(--font-size-sm); }
.wu-get-note { color: var(--colour-text-secondary); }
.wu-get-steps { margin: 0; padding-left: 1.3em; font-size: var(--font-size-sm); }
.wu-get-link { text-align: center; text-decoration: none; }
.wu-get-card .wu-sheet-btn { margin-top: var(--space-xs); }

/* 💌 Mimi's wishing card (#419, wishing-card.js): her costume over a falling
   effect, the greeting, one button. Tinted per event. */
.wu-wish {
  position: relative;
  overflow: hidden;
  width: min(380px, calc(100% - var(--space-lg)));
  background: var(--wish-tint, var(--colour-surface));
  text-align: center;
  gap: var(--space-xs);
}
.wu-wish-fx { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.wu-wish-p { position: absolute; top: -24px; animation: wu-wish-fall linear infinite; will-change: transform; }
.wu-wish-p.wu-wish-up { top: auto; bottom: -24px; animation-name: wu-wish-rise; }
@keyframes wu-wish-fall { to { transform: translate(var(--dx, 0px), 520px) rotate(var(--rot, 0deg)); } }
@keyframes wu-wish-rise { to { transform: translate(var(--dx, 0px), -520px) scale(1.15); opacity: 0; } }
.wu-wish-rays {
  position: absolute; left: 50%; top: 34%; width: 420px; height: 420px; margin: -210px 0 0 -210px; border-radius: 50%;
  background: repeating-conic-gradient(#FFE08266 0 10deg, transparent 10deg 24deg);
  animation: wu-wish-spin 18s linear infinite;
  mask: radial-gradient(circle, #000 30%, transparent 70%);
}
@keyframes wu-wish-spin { to { transform: rotate(1turn); } }
.wu-wish-fig { position: relative; z-index: 1; width: 170px; height: 186px; animation: wu-wish-bob 2.6s ease-in-out infinite; }
.wu-wish-mimi { width: 100%; height: 100%; overflow: visible; }
@keyframes wu-wish-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
.wu-wish-wink { animation: wu-wish-wink 4s infinite; transform-origin: 50px 50px; }
@keyframes wu-wish-wink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(0.1); } }
.wu-wish-hat { animation: wu-wish-tilt 2.6s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 100%; }
@keyframes wu-wish-tilt { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(4deg); } }
.wu-wish-title { position: relative; z-index: 1; margin: 0; font-family: var(--font-display); font-size: var(--font-size-xl); }
.wu-wish-line { position: relative; z-index: 1; margin: 0; color: var(--colour-text-secondary); max-width: 30ch; }
.wu-wish-ok {
  position: relative; z-index: 1; margin-top: var(--space-sm);
  background: var(--colour-brand); border-color: var(--colour-brand-deep); color: var(--colour-text-primary); font-weight: var(--font-weight-bold);
}
@media (prefers-reduced-motion: reduce) {
  .wu-wish-fig, .wu-wish-wink, .wu-wish-hat, .wu-wish-rays, .wu-wish-p { animation: none; }
}

/* 🏠 Where you live (#447, components/home-country.js): one country per family. */
.wu-home-note { margin: 0 0 var(--space-xs); color: var(--colour-text-secondary); font-size: var(--font-size-sm); }
/* The current home is the button that changes it (#481). */
.wu-home-now { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; margin: 0 0 var(--space-xs); padding: 4px 14px 4px 6px; border: 2px solid var(--colour-border); border-radius: 999px; background: var(--colour-surface); color: var(--colour-text-primary); font: inherit; font-size: var(--font-size-md); cursor: pointer; }
.wu-home-now:hover { border-color: var(--colour-brand); }
.wu-home-now .wu-home-flag { width: 48px; }
.wu-home-edit { color: var(--colour-text-secondary); }
.wu-home-sheet { max-height: min(80vh, calc(var(--vh, 1vh) * 80)); display: flex; flex-direction: column; }
.wu-home-conts { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 var(--space-sm); }
.wu-home-cont { min-height: 36px; padding: 0 12px; border: 1px solid var(--colour-border); border-radius: 999px; background: var(--colour-surface); color: var(--colour-text-primary); font: var(--font-weight-semibold) var(--font-size-sm) var(--font-body); cursor: pointer; }
.wu-home-cont.wu-on { border-color: var(--colour-brand); background: color-mix(in srgb, var(--colour-brand) 18%, var(--colour-surface)); }
.wu-home-sheet .wu-home-hits { overflow-y: auto; min-height: 0; }
.wu-home-hit.wu-on { border-color: var(--colour-brand); }
.wu-home-unset { color: var(--colour-text-secondary); font-style: italic; }
.wu-home-q { box-sizing: border-box; width: 100%; max-width: 360px; min-height: 44px; padding: 0 16px; border: 2px solid var(--colour-brand); border-radius: 999px;
  background: var(--colour-surface); color: var(--colour-text-primary); font: inherit; font-size: var(--font-size-md); }
.wu-home-hits { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.wu-home-hit { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border: 2px solid var(--colour-border); border-radius: 999px;
  background: var(--colour-surface); color: var(--colour-text-primary); font-weight: var(--font-weight-bold); cursor: pointer; }
.wu-home-flag { width: 30px; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 4px; box-shadow: 0 0 0 1px var(--colour-border); }
span.wu-home-flag-none { display: inline-grid; place-items: center; background: color-mix(in srgb, var(--colour-brand) 45%, #fff); border: 1.5px solid var(--colour-brand); box-sizing: border-box; box-shadow: none; color: #fff; font-size: 12px; }
span.wu-home-flag-none::before { content: "★"; }

/* 🐞 A dashboard row hidden until unlocked (#455): the class's display:flex
   would otherwise beat the [hidden] attribute. */
.wu-dash-row[hidden] { display: none; }
/* 🔢 The build line at the foot of the About column (#455). */
.wu-dash-build {
  display: block;
  width: 100%;
  margin: var(--space-sm) 0 0;
  padding: var(--space-sm);
  border: 0;
  background: none;
  color: var(--colour-text-secondary);
  font: var(--font-weight-medium) var(--font-size-xs) var(--font-body);
  text-align: center;
  cursor: default;
  -webkit-user-select: none;
  user-select: none;
}

/* 💬 Send feedback, expanded in place under its row (#456, #459). */
.wu-fb-panel { padding: 0 var(--space-md) var(--space-md); }
.wu-fb-panel[hidden] { display: none; }
.wu-fb { text-align: left; }
.wu-fb-kinds {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin: 0 0 var(--space-sm);
}
.wu-fb-kind {
  min-height: var(--tap-target-min);
  padding: var(--space-xs) var(--space-md);
  border: 1px solid var(--colour-border);
  border-radius: var(--radius-pill);
  background: var(--colour-surface);
  color: var(--colour-text-primary);
  font: var(--font-weight-semibold) var(--font-size-sm) var(--font-body);
  cursor: pointer;
}
/* 📱 Two tidy rows on a phone (#476, owner: "feedback form on mobile pills can
   almost fit into two rows. Adjust to make it neater"): a 2 × 2 grid, the left
   column as wide as its longest label, the right one filling the rest. */
@media (max-width: 600px) {
  .wu-fb-kinds { display: grid; grid-template-columns: max-content minmax(0, 1fr); }
  .wu-fb-kind { padding: var(--space-xs) var(--space-sm); }
}
.wu-fb-kind.wu-on {
  border-color: var(--colour-brand);
  background: color-mix(in srgb, var(--colour-brand) 18%, var(--colour-surface));
}
.wu-fb-text {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: var(--space-sm) var(--space-md);
  border: 1px solid var(--colour-border);
  border-radius: var(--radius-button);
  background: var(--colour-surface);
  color: var(--colour-text-primary);
  font: var(--font-weight-regular) var(--font-size-md) var(--font-body);
}
.wu-fb-text { resize: vertical; min-height: 7em; }
.wu-fb-text:focus { outline: 2px solid var(--colour-brand); outline-offset: 1px; }
.wu-fb-note {
  margin: var(--space-xs) 0 var(--space-sm);
  font-size: var(--font-size-xs);
  color: var(--colour-text-secondary);
}
.wu-fb .wu-fb-send { width: 100%; margin-top: var(--space-md); }
/* ✍️ Characters used of 2000; ⏳ the cool-down note (#460). */
.wu-fb-count {
  margin: var(--space-xs) 0 0;
  text-align: right;
  font-size: var(--font-size-xs);
  font-variant-numeric: tabular-nums;
  color: var(--colour-text-secondary);
}
.wu-fb-count.wu-fb-count-near { color: var(--colour-warning); font-weight: var(--font-weight-bold); }
.wu-fb-wait { font-size: var(--font-size-sm); color: var(--colour-text-primary); }

/* 🔐 Mimi's gate on home (#475 games, #477 daily cap): the flower blurs, Mimi speaks, two
   buttons follow. No card: Mimi and her bubble stand on the blur. */
.wu-mgate-bd {
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  background: color-mix(in srgb, var(--colour-text-primary) 18%, transparent);
}
.wu-mgate {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  width: min(340px, calc(100vw - 32px));
  animation: wu-mgate-in 0.28s cubic-bezier(.5, 1.6, .5, 1);
}
.wu-mgate-say {
  position: relative;
  margin: 0 0 6px;
  padding: 12px 16px;
  background: var(--colour-surface);
  color: var(--colour-text-primary);
  border: 2px solid var(--colour-brand);
  border-radius: 16px;
  box-shadow: 0 6px 18px color-mix(in srgb, var(--colour-text-primary) 18%, transparent);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.1rem;
  line-height: 1.3;
  text-align: center;
}
.wu-mgate-say::after {
  content: "";
  position: absolute;
  left: calc(50% - 7px);
  bottom: -8px;
  width: 12px;
  height: 12px;
  background: var(--colour-surface);
  border: 2px solid var(--colour-brand);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.wu-mgate-mimi { width: 112px; height: calc(112px * 1.1547); display: grid; place-items: center; background: var(--colour-brand); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.wu-mgate-mimi .wu-mascot { width: 104px; height: 104px; }
.wu-mgate-btns { display: flex; flex-direction: column; gap: var(--space-sm); width: 100%; }
.wu-mgate-btns .wu-sheet-btn { width: 100%; }
/* The ★ progress pill, copied sharp onto the blur with a glowing ring. */
.wu-mgate-spot { position: fixed; pointer-events: none; display: grid; place-items: center; border-radius: 50%; box-shadow: 0 0 0 4px var(--colour-surface), 0 0 0 8px var(--colour-brand); animation: wu-mgate-glow 1.6s ease-in-out infinite; }
.wu-mgate-spot > .wu-rail-star { position: static; transform: none; margin: 0; }
.wu-mgate-hint { display: block; margin-top: 4px; font-size: 0.9rem; font-weight: 700; color: var(--colour-text-secondary); }
@keyframes wu-mgate-glow { 50% { box-shadow: 0 0 0 4px var(--colour-surface), 0 0 0 14px color-mix(in srgb, var(--colour-brand) 45%, transparent); } }
@keyframes wu-mgate-in { from { opacity: 0; transform: scale(0.92); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .wu-mgate, .wu-mgate-spot { animation: none; }
}
