/* Words — slice 8 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: Letter games, Balance, Spell it, study peek, times-table cover, verb table, Cross Words, reading library, reading sheet, audit fixes. */

/* ── Letter games (v267): 🔤 Guess the Letter · 🔡 Letter Sequence ────────
   Both answer from one A–Z strip — the input for the chain, and the
   "alphabet at the top" reference the sequence game asked for. */

.wu-alpha-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-lg);
  width: 100%;
  /* Wide enough for 13 keys per row (13 × 56px), so the 26 letters land as TWO
     EVEN ROWS on a tablet/desktop instead of a ragged 11/11/4. */
  max-width: 760px;
}

/* Reference row — deliberately plain and unclickable; the strip below answers. */
.wu-alpha-ref {
  font-family: var(--font-mono);
  font-size: clamp(11px, 2.6vw, 15px);
  letter-spacing: 0.18em;
  color: var(--colour-text-secondary);
  text-align: center;
  word-spacing: 0.1em;
}

/* The question sits on a card, like the flashcard — it's the thing being read,
   so it should look like a thing rather than floating text. */
.wu-alpha-q {
  text-align: center;
  width: 100%;
  padding: var(--space-lg) var(--space-md);
  background: var(--colour-surface);
  border: 1px solid var(--colour-border);
  border-radius: var(--radius-card);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

.wu-alpha-hint {
  margin: 0 0 var(--space-lg);
  color: var(--colour-text-secondary);
  font-size: var(--font-size-sm);
}

/* The word chain: two words, one shared blank. Each word gets its own chip so
   the pair reads as TWO words with a junction between them, rather than one
   run-on string — and each stays whole when the row wraps on a phone. */
.wu-chain {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-sm) var(--space-md);
  font-family: var(--font-display);
  font-size: clamp(28px, 9vw, 52px);
  font-weight: var(--font-weight-bold);
  line-height: 1.15;
  color: var(--colour-text-primary);
}

.wu-chain-word {
  display: inline-flex;
  align-items: baseline;
  white-space: nowrap;
  padding: 0.12em 0.3em;
  border-radius: var(--radius-card);
  background: color-mix(in srgb, var(--colour-accent) 7%, var(--colour-surface));
}

.wu-chain-link {
  color: var(--colour-text-secondary);
  opacity: 0.45;
  font-size: 0.6em;
}

/* The blank is an empty SQUARE, not a "?" (owner 2026-08-01). A question mark
   asks something; an empty slot says "put a letter here", which is the actual
   instruction — and it stops the two chain gaps reading as punctuation inside
   the words. Same treatment in both games. */
.wu-chain-gap,
.wu-seq-gap {
  display: inline-block;
  width: 0.82em;
  height: 0.82em;
  vertical-align: -0.06em;
  text-align: center;
  line-height: 0.82em;
  color: var(--colour-accent);
  border: 0.07em dashed color-mix(in srgb, var(--colour-accent) 70%, transparent);
  border-radius: 0.14em;
  background: color-mix(in srgb, var(--colour-accent) 8%, transparent);
}

/* Filled in — solid and green, so the answer visibly lands in the slot. */
.wu-chain-filled {
  color: var(--colour-success);
  border-style: solid;
  border-color: var(--colour-success);
  background: color-mix(in srgb, var(--colour-success) 14%, transparent);
}

/* The sequence row. */
.wu-seq {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  font-family: var(--font-mono);
  font-size: clamp(24px, 8vw, 44px);
  font-weight: var(--font-weight-bold);
  color: var(--colour-text-primary);
}

.wu-seq-cell {
  min-width: 1.1em;
  text-align: center;
}

/* A–Z answer keys. Wraps to as many rows as the width needs; ≥40px tall so it
   stays a real tap target on a phone (accessibility floor is 44px, and the
   26-key strip is the one place we sit just under it by necessity). */
/* Width is capped so the 26 keys land on EVEN rows instead of wrapping ragged:
   ~13 per row on desktop (exactly 2 rows), ~7 on a phone. Flex rather than a
   grid so the short final row centres itself. */
.wu-alpha-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  width: 100%;
  max-width: 740px;
  margin: 0 auto;
}

@media (max-width: 720px) {
  .wu-alpha-strip { max-width: 400px; }
}

.wu-alpha-key {
  min-width: 48px;
  min-height: 48px;
  padding: 0 6px;
  border: 1px solid var(--colour-border);
  border-radius: var(--radius-button);
  background: var(--colour-surface);
  font-family: var(--font-display);
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  color: var(--colour-text-primary);
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast),
              transform var(--transition-fast);
}

.wu-alpha-key:active:not(:disabled) {
  transform: translateY(1px);
}

.wu-alpha-key:disabled {
  opacity: 0.4;
  cursor: default;
}

.wu-alpha-key.wu-alpha-on {
  background: var(--colour-success);
  border-color: var(--colour-success);
  color: #fff;
}

/* Wrong key shakes rather than scolding — same treatment as a wrong Path tap. */
.wu-alpha-key.wu-alpha-wrong {
  animation: wu-alpha-shake 340ms ease;
  border-color: var(--colour-danger);
}

@keyframes wu-alpha-shake {
  0%, 100% { transform: translateX(0); }
  25%      { transform: translateX(-4px); }
  75%      { transform: translateX(4px); }
}

@media (prefers-reduced-motion: reduce) {
  .wu-alpha-key.wu-alpha-wrong { animation: none; }
}

/* ── ⚖️ Balance the equation (v270) ──────────────────────────────────────
   Two expressions either side of an equals, one operand blanked. The blank
   reuses the letter games' empty-square idea so "fill this in" looks the same
   everywhere in the app. */
.wu-balance {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.18em;
  font-family: var(--font-mono);
  font-size: clamp(26px, 8vw, 52px);
  font-weight: var(--font-weight-bold);
  color: var(--colour-text-primary);
  line-height: 1.2;
}

.wu-bal-n {
  min-width: 1.1em;
  text-align: center;
}

.wu-bal-op {
  color: var(--colour-text-secondary);
  padding: 0 0.1em;
}

/* The equals is the pivot the whole exercise turns on — give it weight. */
.wu-bal-eq {
  color: var(--colour-accent);
  padding: 0 0.28em;
}

.wu-bal-gap {
  display: inline-block;
  width: 1.05em;
  height: 0.9em;
  vertical-align: -0.06em;
  border: 0.07em dashed color-mix(in srgb, var(--colour-accent) 70%, transparent);
  border-radius: 0.12em;
  background: color-mix(in srgb, var(--colour-accent) 8%, transparent);
}

/* ── ✍️ Spell it (v276) ─────────────────────────────────────────────────
   The production drill. Reuses .wu-alpha-strip/.wu-alpha-key wholesale, so
   only the prompt card and the answer slots are new. Slots follow the letter
   games' convention the owner set: an empty SQUARE, never a "?" — a question
   mark asks something, an empty slot says "put a letter here". */
.wu-spell-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-lg);
  flex: 1;
  width: 100%;
  padding: var(--space-md);
}

/* ⚠️ TWO COLUMNS ON A SHORT SCREEN (owner, on a device: "vocab spell it hides
   the input on landscape. it should show two columns"). Stacked, the card and a
   26-key strip need ~470px of height and a sideways phone has ~340 once the
   header is out — so the strip, which is the only way to answer, went off the
   bottom. Height is the scarce axis there and width the plentiful one, which is
   exactly the trade a side column makes: the same call the crossword keys (#85),
   the games rail (#88) and the numpad drill (#172) each arrived at.
   6 across rather than the strip's own wrap: 26 keys land on 5 even rows of
   ~244px, where 5 across is 6 rows and does not fit. Keys go 48 → 44px, which
   is AT the tap floor rather than under it — the strip gives up its slack, never
   the target. */
@media (orientation: landscape) and (max-height: 500px) {
  .wu-spell-stage {
    flex-direction: row;
    align-items: center;
    gap: var(--space-lg);
    padding: var(--space-sm) var(--space-md);
  }
  .wu-spell-card {
    flex: 1 1 auto;
    /* A grid/flex item's floor is its content, and a long word's slot row would
       otherwise push the keys off the screen rather than wrapping (#170). */
    min-width: 0;
    width: auto;
    max-width: 460px;
    padding: var(--space-md);
  }
  .wu-spell-keys { flex: none; }
  /* Fixed tracks, not 1fr: 1fr divides the container and the key's own
     min-width then overflows the track it was given (#85's note). */
  .wu-spell-keys .wu-alpha-strip {
    display: grid;
    grid-template-columns: repeat(6, 44px);
    justify-content: center;
    gap: 6px;
    max-width: none;
  }
  .wu-spell-keys .wu-alpha-key {
    min-width: 44px;
    min-height: 44px;
    font-size: var(--font-size-md);
  }
}

.wu-spell-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
  width: min(560px, 100%);
  padding: var(--space-lg) var(--space-md);
  background: var(--colour-surface);
  border: 1px solid var(--colour-border);
  border-radius: var(--radius-card);
  text-align: center;
}

.wu-spell-lang,
.wu-spell-ask {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--font-size-sm);
  color: var(--colour-text-secondary);
}

.wu-spell-ask { margin-top: var(--space-sm); }

/* 🔊 Hear the word being spelled (owner, 2026-08-29). Sits under the
   "Spell it in <language>" line, because that line is what names the language
   the sound will be in — the button and its label say the same thing.
   44px min per the tap-target floor (#88–#90); the disc stays visually small
   so it does not compete with the slots, which are the thing to look at. */
.wu-spell-say {
  margin-top: var(--space-xs);
  min-width: 44px;
  min-height: 44px;
  border: 2px solid var(--colour-border);
  border-radius: 999px;
  background: var(--colour-surface);
  font-size: var(--font-size-md);
  line-height: 1;
  cursor: pointer;
}

.wu-spell-say:active { opacity: 0.6; }

/* The word to translate — the biggest thing on screen, since it's the whole
   question. */
.wu-spell-prompt {
  font-family: var(--font-display);
  font-size: clamp(30px, 6vw, 46px);
  font-weight: var(--font-weight-bold);
  color: var(--colour-text-primary);
  line-height: 1.1;
}

.wu-spell-slots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.17em;
  margin-top: var(--space-xs);
  font-family: var(--font-display);
  /* --fit (fit-slots.js, #421) scales the row when one word is wider than it */
  font-size: calc(var(--fit, 1) * clamp(24px, 5vw, 36px));
  font-weight: var(--font-weight-bold);
}
/* One word's slots: wraps only BETWEEN words, never inside one (#421). */
.wu-spell-word { display: inline-flex; flex-wrap: nowrap; align-items: center; gap: 0.17em; }

.wu-spell-slot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0.78em;
  height: 1em;
  padding: 0 0.06em;
  border: 0.07em dashed color-mix(in srgb, var(--colour-accent) 55%, transparent);
  border-radius: 0.14em;
  background: color-mix(in srgb, var(--colour-accent) 6%, transparent);
  color: var(--colour-text-primary);
}

/* Where the next letter lands. Without this the child has no idea which of
   eight identical squares they're filling. */
.wu-spell-active {
  border-style: solid;
  border-color: var(--colour-accent);
  background: color-mix(in srgb, var(--colour-accent) 16%, transparent);
}

.wu-spell-filled {
  border-color: transparent;
  background: color-mix(in srgb, var(--colour-success) 18%, transparent);
  color: var(--colour-success);
}

/* Spaces and hyphens are pre-filled — the child spells letters, not
   punctuation — so they render as plain text with no slot around them. */
.wu-spell-sep {
  display: inline-block;
  min-width: 0.3em;
  color: var(--colour-text-secondary);
}

.wu-spell-win .wu-spell-filled {
  animation: wu-spell-pop 0.35s ease;
}

@keyframes wu-spell-pop {
  0%   { transform: scale(1); }
  45%  { transform: scale(1.16); }
  100% { transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .wu-spell-win .wu-spell-filled { animation: none; }
}

/* ── Matching: 👀 study peek (v276) ─────────────────────────────────────
   The pairs shown ALIGNED before the target column shuffles — this is where
   Flashcard's study half went. Tinted so it reads as a different phase from
   the round proper, and the columns are joined by a faint rule so the pairing
   is legible at a glance rather than needing to be traced. */
.wu-match-study .wu-match-btn {
  cursor: default;
  border-color: color-mix(in srgb, var(--colour-accent) 40%, var(--colour-border));
  background: color-mix(in srgb, var(--colour-accent) 7%, var(--colour-surface));
}

.wu-match-ready {
  margin: 0 auto var(--space-md);
  display: block;
  flex: none;
  min-width: 180px;
}

/* ── Balance: letter variables (v276, hard tier) ────────────────────────
   A letter in the equation must not look like a number, or the child reads
   "A" as an operand and computes nothing. Coloured and italic, matching the
   key above. */
.wu-bal-var {
  color: var(--colour-accent);
  font-style: italic;
}

/* The key sits above the equation because it has to be read first. */
.wu-bal-key {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}

.wu-bal-keyitem {
  padding: 4px 14px;
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--colour-accent) 10%, var(--colour-surface));
  border: 1px solid color-mix(in srgb, var(--colour-accent) 40%, transparent);
  font-family: var(--font-mono);
  font-size: var(--font-size-md);
  color: var(--colour-text-primary);
}

.wu-bal-keyitem b {
  color: var(--colour-accent);
  font-style: italic;
}

/* Language chip flags (v279) — the flag emoji is the content, so it needs to
   carry at the HUD's small size rather than sit at label weight. */
.wu-lang-flag {
  font-size: 1.25em;
  line-height: 1;
  vertical-align: -0.08em;
}

/* ✓ confirms the language sheet (v279, owner: "replace the X on the top right
   with a Check symbol"). It replaced ✕ because the sheet no longer applies on
   selection — there IS something to confirm now, so the corner control is a
   commit, not a dismissal. Green to say "done", not "close". */
.wu-sheet-confirm {
  color: var(--colour-success);
  font-size: var(--font-size-lg);
  font-weight: 800;
}

/* ── 🔢 Times-table cover (v281) ────────────────────────────────────────
   A heat STRIP, not a list: the question the owner asked is about spread
   ("wide range cover of the numbers, not a repeat of always the same one"),
   and spread is something you see rather than count. The fill height carries
   the count so an untouched table is obvious at a glance. */
.wu-tbl-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: var(--space-sm) 0;
}

.wu-tbl-chip {
  position: relative;
  flex: 1 1 52px;
  min-width: 46px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  padding: 6px 2px;
  border: 1px solid var(--colour-border);
  border-radius: var(--radius-button);
  overflow: hidden;
  background: var(--colour-surface);
}

/* The fill rises from the bottom in proportion to the count. */
.wu-tbl-chip::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--fill, 0%);
  background: color-mix(in srgb, var(--colour-success) 42%, transparent);
  pointer-events: none;
}

.wu-tbl-chip b,
.wu-tbl-chip small {
  position: relative;
  z-index: 1;
}

.wu-tbl-chip b {
  font-family: var(--font-mono);
  font-size: var(--font-size-md);
  color: var(--colour-text-primary);
}

.wu-tbl-chip small {
  font-family: var(--font-mono);
  font-size: var(--font-size-xs);
  color: var(--colour-text-secondary);
}

/* Offered at this level but never practised — amber outline so a genuine gap
   stands out from a table the level simply doesn't teach yet. */
.wu-tbl-none {
  border-color: color-mix(in srgb, var(--colour-warning) 60%, transparent);
  background: color-mix(in srgb, var(--colour-warning) 8%, var(--colour-surface));
}

/* Not in the child's current difficulty. Shown, not hidden: "not offered yet"
   is different information from "never done", and hiding these would make an
   easy-level child look like full coverage. */
.wu-tbl-off {
  opacity: 0.38;
}

/* ── Verb table: the heading IS the language toggle (v283) ─────────────
   No separate control (owner: "don't make another element… keep clean UI").
   The heading already reads "ser · to be", i.e. it already names both
   languages — so it carries a faint button affordance and a ⇄ hint, and a tap
   swaps which side the paradigm is written in. Local to this screen: a study
   flip must not silently re-configure every other vocab activity.

   v285: the faint outline + small ⇄ read as decoration, not as a control
   (owner: "the swap arrows are too subtle… maybe a pill outline to both verbs
   with a bolder arrow"). Both sides now sit in their own pill with a solid
   arrow between them, which also SHOWS the direction: the filled pill is the
   language the paradigm is written in, the outlined one is the gloss — so the
   control states the current setting instead of only hinting a tap. */
.wu-vt-inf-tap {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  border: none;
  background: transparent;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

/* Type is declared HERE, not inherited: `.wu-vt-inf-tap` carries `font: inherit`
   to reset the button, and being the later rule that beat `.wu-vt-inf`'s display
   type — so the heading had quietly been rendering at plain body 16px, part of
   why it read as a label rather than a control. */
.wu-vt-pill {
  border: 2px solid var(--colour-accent);
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--colour-accent) 12%, var(--colour-surface));
  color: var(--colour-text-primary);
  font-family: var(--font-display);
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  padding: 4px 16px;
  white-space: nowrap;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

/* The gloss side: same shape and SAME SIZE — a smaller font here made the two
   pills different heights, which reads as a mistake rather than a hierarchy.
   Weight and colour carry the difference instead. */
.wu-vt-pill-alt {
  border-color: var(--colour-border);
  background: var(--colour-surface);
  color: var(--colour-text-secondary);
  font-weight: normal;
}

.wu-vt-swap {
  color: var(--colour-accent);
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-2xl);
  line-height: 1;
  transition: transform var(--transition-fast);
}

.wu-vt-inf-tap:hover .wu-vt-pill,
.wu-vt-inf-tap:active .wu-vt-pill {
  background: color-mix(in srgb, var(--colour-accent) 22%, var(--colour-surface));
}

.wu-vt-inf-tap:hover .wu-vt-pill-alt,
.wu-vt-inf-tap:active .wu-vt-pill-alt {
  background: var(--colour-bg);
}

.wu-vt-inf-tap:active .wu-vt-swap {
  transform: scale(1.25);
}

@media (prefers-reduced-motion: reduce) {
  .wu-vt-swap { transition: none; }
  .wu-vt-inf-tap:active .wu-vt-swap { transform: none; }
}

/* 🔊 on the Path prompt (v283, owner). Reads the PROMPT, not the answer —
   speaking the target would just read out the tiles the child is hunting. */
.wu-path-say {
  flex: none;
  border: none;
  background: transparent;
  padding: 0 6px;
  font-size: var(--font-size-md);
  line-height: 1;
  cursor: pointer;
  /* 32 → 44px (v291 audit). 🔊 reads the prompt aloud — for a child who needs
     it, it is the most important control on the bar. */
  min-width: 44px;
  min-height: 44px;
}

.wu-path-say:active { opacity: 0.6; }

/* SHORT LANDSCAPE — compress the rail instead of scrolling it (owner, v289:
   "scrolling is not great, may need to make a call on compromise of information
   visible on mobile"). Measured at 851×393 the rail needed 398px in 336px, and
   the whole 62px excess sits in ONE card: the piece card stacks PLACE above
   NEXT at 149px. Laid side by side it is ~70px, which fits the column with room
   to spare — so nothing has to be hidden. That is the better call than dropping
   the legend, which is the only thing on screen that says which times table
   each colour is drilling, i.e. the game's actual subject.
   `overflow-y: auto` stays on the rail as a safety net: it shows a scrollbar
   only if a future card overflows again, which beats spilling over the board. */
@media (orientation: landscape) and (max-height: 560px) {
  .wu-game-rail .wu-stk-bar {
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    column-gap: var(--space-sm);
  }
  .wu-game-rail .wu-stk-lbl-next {
    margin-top: 0;
    margin-left: var(--space-sm);
  }
  /* …and the rail moves to the RIGHT, which is what actually buys the room.
     Its 86px top padding exists solely to clear the HUD — a quarter of the
     column on a 393px screen — and the HUD only occupies the LEFT. The v239
     reason for a left rail was that the Android status pill hid the ✕ pinned
     inside it; that ✕ moved into the HUD's game pill in v243, so the constraint
     is gone. On the right the rail needs no clearance at all, which is the 86px
     that lets everything fit with nothing hidden. Only in short landscape —
     tall screens keep the left rail, where the padding costs nothing. */
  .wu-game-layer:has(.wu-game-rail) {
    flex-direction: row-reverse;
  }
  .wu-game-rail {
    gap: var(--space-xs);
    /* On the right it needs no HUD clearance — but it does need the SYSTEM
       band. v242 dropped the reserve entirely on the reasoning that the ✕ had
       moved to the HUD; true for the ✕, not for the score card, which then sat
       under the Android pill. Same protected zone as the crossword keys, one
       token (owner, 2026-08-17).
       ⚠️ The BAND, not --support-top. That token bundles the band with
       --space-md, which is right for chrome floating in a pane and wrong here:
       the layer has already inset the rail, so the gutter was counted twice and
       the first card sat 40px from the top against a 24px gap on the right
       (owner, 2026-09-23: "not consistent padding from the top and right").
       Dropping the double count makes the two equal at every size and still
       clears a cluster-drawing shell, whose pill ends at 60px. */
    padding-top: calc(var(--safe-top) + var(--system-band));
  }
  /* The mirror of the games.css rule — here the rail is on the RIGHT, so the
     outer side it re-takes is that one. */
  .wu-game-layer:has(.wu-sdk-zone) .wu-game-rail,
  .wu-game-layer:has(.wu-ome-zone) .wu-game-rail {
    margin: var(--rail-regain-y) var(--rail-regain-x) var(--rail-regain-y) 0;
  }
  .wu-game-rail .wu-pop-status {
    font-size: 11px;
    line-height: 1.25;
  }
}

/* ── ✳️ Cross Words (v286, decision #85) ─────────────────────────────────
   A sparse criss-cross on the hex board. Three states carry the whole puzzle:
   cells not in any word are INERT comb, the active word is highlighted, and a
   solved word locks green. The letter strip sits under the board in the pane
   (not in the drill layer) so the board stays inside the hex fitter's box. */
/* Pane puzzles reserve room for their own clue bar (v287). Path's bar floats
   over the top of its board — measured as a real overlap at 1024×768 and
   851×393, where it sat across the top row of stones. The board is sized from
   the wrap minus padding, so reserving here shrinks it to fit instead.
   Excluded for Cross Words, which moves its clue into the right-hand column on
   a tall screen and reserves its own space (below). Note the :has() selector
   outranks `.wu-xw-open .wu-honeycomb-wrap`, hence the explicit :not(). */
.wu-honeycomb-pane:has(.wu-path-bar):not(.wu-xw-open) .wu-honeycomb-wrap {
  /* Derived from the bar, not guessed: 16px top offset + a 44px control + 8px
     of breathing room. It was 58px, sized against a 42px bar — then growing the
     ✕ to the 44px tap minimum took the bar to 54px and it clipped the board's
     top row again by 11px. Tying the number to the control's own minimum means
     the next change to the bar's contents cannot silently re-open this. Two
     --space-md, not one plus a --space-sm: the bar is positioned from the PANE
     and this padding from the WRAP, and the pane's own inset is the difference
     (it landed exactly 1px short otherwise). */
  padding-top: calc(var(--space-md) * 2 + 44px);
}

/* …and the bar itself sits at the TOP EDGE. Both clue bars always mount in a
   `.wu-honeycomb-pane`, so this is the only `top` that ever applies to them.
   (A max-width:1100px rule that dropped the bar below the old HUD pill stack
   lost to this on specificity every time; deleted v418.) */
.wu-honeycomb-pane:has(.wu-path-bar) .wu-path-bar {
  top: calc(var(--space-md) + var(--safe-top));
}

/* The key strip RESERVES its space in the flower's own container rather than
   floating over the board: createHoneycomb sizes the hex from
   stage.parentElement minus its padding, so padding the wrap is what makes the
   board shrink to fit instead of colliding with the keys.

   The layout splits on HEIGHT, not orientation (owner, v286: "the input is
   above the grid… maybe one to recommend doing vertically"). A 26-key block is
   ~330px as a column and ~105px as a two-row strip, so:
     • TALL (≥600px) — column down the right, clue above it. "What to type"
       directly above "where to type", and the board owns the whole left side.
     • SHORT — strip along the bottom. On a 393px-tall phone in landscape the
       column plus the clue is taller than the screen; the strip costs the board
       a third of the height the column would. */
.wu-xw-keys {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(var(--space-md) + var(--safe-bottom));
  padding: 0 var(--space-md);
  z-index: 5;
}

/* Derived from the key block's real height (vocab.js writes --xw-keys-h), plus
   the gap it is offset by. The 190px it replaces was ~200px short in phone
   portrait, where the strip wraps to six rows — the board simply rendered
   underneath the letters. The fallback keeps this sane for one frame before the
   first measurement lands. */
.wu-xw-open .wu-honeycomb-wrap {
  padding-bottom: calc(var(--xw-keys-h, 190px) + var(--space-md) * 2 + var(--safe-bottom));
  /* …and the same reserve Path keeps for ITS clue bar. In the strip layout the
     clue sits at the top edge, exactly like Path's, so it needs exactly Path's
     clearance — without it the bar drew across the board's top row (measured: 2
     tiles underneath at 1024×768). Derived from the control's own 44px minimum,
     not a measured constant, for the reasons in #89/#90. The column layout puts
     the clue UNDER the board instead and takes this back. */
  padding-top: calc(var(--space-md) * 2 + 44px);
}

/* (A max-width:699px rule used to anchor the Cross Words clue to the right
   edge, first to dodge the HUD pill stack and later with a max-width that
   subtracted --rail-w inside a pane that already sits right of the rail.
   Deleted v418: once `.wu-path-bar` centred with both insets, that cap was
   what cut long clues off, measured at 375×812 "the strawberries" 82px
   of text in a 59px box with it, fitting without it.) */

/* Short landscape, too narrow even for the key column (under 560px wide). The
   strip is the only option left and it is a poor one — the board pays heavily —
   but nothing may OVERLAP. The hardcoded `padding-bottom: 124px` that used to
   live here was the bug: the strip stands ~216px on a screen this shape, so the
   board simply rendered underneath the letters (measured at 667×375: all 24
   cells covered). It is gone; the derived --xw-keys-h reserve in the base rule
   is correct by construction and applies here too. */
@media (orientation: landscape) and (max-height: 599px) and (max-width: 559px) {
  .wu-xw-open .wu-honeycomb-wrap {
    padding-left: 76px;  /* clears the collapsed ★ only (HUD lite, v287) */
  }
}

/* The side column is gated on WIDTH ALONE (v292). It was `min-height: 600px`
   too, so a phone in landscape fell back to the bottom strip — which costs
   124px of the scarce axis and squeezed the board to 35px hexes, i.e. 9.6px
   letters. This is the same finding as Stack's rail: in landscape, height is
   what you have least of and width is what you have most of. A short screen
   just needs the key block laid wider and flatter (below) so the clue still
   fits beneath it. */
/* ⚠️ The side column is now the EXCEPTION, not the wide-screen default (owner,
   2026-08-28: "the spell it text input layout is so much cleaner than what we
   have on the crosswords — can it be adopted?").

   It can, nearly everywhere. ✏️ Spell it's band IS the base `.wu-alpha-strip`
   style — a wide flat A-Z, ~13 per row, two rows, centred. Cross Words only ever
   diverged because this media query swapped it for a column at ≥700px wide. The
   two exercises answer from the same strip by design (#85), so they should look
   the same wherever the geometry allows.

   The gate is therefore HEIGHT, not width: the strip costs vertical space, and
   only a SHORT screen can't pay. Measured at 851×393 the strip takes the board
   from 45px hexes to 27px even laid out wide and flat — in landscape height is
   what you have least of, which is the same finding as Stack's rail (#88). On a
   tall screen there is room to spare and the strip wins on consistency.

   (This is not a revert of v292, which read `min-height: 600px` and sent phone
   landscape to the NARROW strip — 6 rows deep, the worst of both. The column
   survives exactly where v292 needed it, and nowhere else.) */
@media (min-width: 560px) and (max-height: 560px) {
  /* The key column's width is COMPUTED from the keys it has to hold, not typed
     in as a round number. It was 252px against five 48px keys and four 8px gaps
     — which need 272 — so every row overflowed its container by 10px and the
     lone Z on the last row poked out far enough to sit on the clue pill
     (measured at 768×1024). A column narrower than its own contents is a bug
     waiting on whichever row happens to reach the edge.

     Six across at 44px (still the tap floor, #88) rather than five at 48: five
     rows instead of six, which is what buys the top clearance on the only screen
     shape that gets here. */
  .wu-xw-open {
    --xw-key: 44px;
    --xw-gap: 8px;
    --xw-cols: 6;
    --xw-col-w: calc(var(--xw-cols) * var(--xw-key) + (var(--xw-cols) - 1) * var(--xw-gap));
    --xw-gutter: calc(var(--xw-col-w) + var(--space-md) + 4px);
  }
  .wu-xw-open .wu-honeycomb-wrap {
    padding-right: var(--xw-gutter);
    padding-left: 76px;  /* clears the collapsed ★ only (HUD lite, v287) */
    /* The clue is at the BOTTOM here, so the strip layout's top reserve is pure
       waste — and on a 393px-tall screen 76px of waste is most of a board row. */
    padding-top: var(--space-md);
    /* Reserve for the clue, which sits under the board at every side-column
       size now (below). Derived, not measured: two gaps + the gesture-bar inset
       + the 44px control minimum — the third time a hardcoded reserve here broke
       when a control's minimum changed (#89, #90). */
    padding-bottom: calc(var(--space-md) * 2 + var(--safe-bottom) + 44px);
  }
  /* The clue sits at the BOTTOM of the right column, not the top (v291, owner:
     "the crossword pad location and hint is hitting the android pill with the
     network and battery element"). CLAUDE.md §6 is explicit that the top band
     belongs to the Android system overlay and that the HUD side is the safe
     anchor — putting the clue top-right walked straight into it, and the
     browser cannot reproduce the overlay, which is why it shipped. The keys
     take the top of the column and the clue reads directly above the board's
     baseline, which is also where the eye already is. */
  /* Selector matches the v287 Path rule's specificity on purpose: that rule is
     `.wu-honeycomb-pane:has(.wu-path-bar) .wu-path-bar { top: … }`, and a plain
     `.wu-xw-bar` lost to it — leaving top AND bottom set, which stretched the
     bar into a 658px column down the whole right edge. */
  .wu-honeycomb-pane:has(.wu-path-bar) .wu-xw-bar {
    box-sizing: border-box;
    left: 76px;                 /* clears the collapsed rail, like the wrap */
    right: var(--xw-gutter);    /* stops short of the key column */
    top: auto;
    bottom: var(--support-bottom);
    transform: none;
    width: auto;
    max-width: none;
    justify-content: center;
  }
  /* The keys are ANCHORED TO THE BOTTOM of the column, not the top (owner,
     2026-08-28: "the text input is overlapping with the android pill… the
     letter pad on the right hand side does not work").

     Both halves of that report are one bug. v313 reserved --system-band (34px)
     to push a top-anchored block clear of the Android status overlay, but that
     is a GUESSED constant standing in for something the web platform will not
     tell us: env(safe-area-inset-top) reports the display CUTOUT, not the
     overlay, so any device whose status bar is taller than 34px puts the top
     row of keys underneath it — where they are both invisible AND inert,
     because the system takes those touches. Tapping A-E does nothing, and the
     pad "does not work".

     Growing the constant would only move the guess. Anchoring to the bottom
     removes it: the block grows UPWARD from an edge whose inset the platform
     does report honestly (--safe-bottom is a physical gesture bar, not an
     overlay drawn on top), so it cannot reach the top band at any key count, on
     any device, whatever the pill's height. Same principle as "the ✕ belongs on
     the HUD side" (#88) — pick the corner the system never occupies. It also
     survives immersive mode (#101) either way: with the bar hidden the reserve
     simply stops mattering, rather than becoming wrong in the other direction.

     Bonus, and not a small one on a tablet: the keys are now the closest thing
     on screen to where a child's thumbs already are. */
  .wu-xw-keys {
    left: auto;
    right: var(--space-md);
    top: auto;
    bottom: var(--support-bottom);
    transform: none;
    width: var(--xw-col-w);
    padding: 0;
  }
  /* Fixed-width columns, not 1fr: 1fr divides the container and a key's own
     min-width then overflows the track it was given. Sizing the track from the
     key means the two can never disagree. */
  .wu-xw-keys .wu-alpha-strip {
    display: grid;
    grid-template-columns: repeat(var(--xw-cols), var(--xw-key));
    justify-content: center;
    gap: var(--xw-gap);
    max-width: none;
  }
  .wu-xw-keys .wu-alpha-key {
    min-width: var(--xw-key);
    min-height: var(--xw-key);
  }
}

/* Short + wide: 6 keys across instead of 5, so the block is ~275px rather than
   328px and the clue clears it at the bottom of the same column. */
/* Short + wide: 6 keys across instead of 5, so the block is ~275px tall rather
   than 328px. Only the WIDTHS change now — the clue already sits under the board
   and both blocks are already bottom-anchored in the rule above, which is what
   collapsed this branch from five rules to three. */


/* NOTE: the ✓ badge is stripped from the DOM by crossword.js, not hidden here —
   honeycomb.css loads after this file, so `.wu-confirmed .wu-hex-check` wins any
   equal-specificity rule written at this end. */

/* Letters ride the ICON slot — display type, not caption type. A lone letter
   in the small label slot read as a footnote in the first build. */
.wu-xw-board .wu-hex-icon {
  font-family: var(--font-display);
  font-weight: var(--font-weight-bold);
}

.wu-xw-next {
  flex: none;
  border: none;
  background: transparent;
  color: var(--colour-accent);
  font-size: var(--font-size-lg);
  line-height: 1;
  cursor: pointer;
  /* 24 → 44px (v290 audit). It is how the child reaches the other clue, so it
     is a primary control despite looking like a chevron. */
  min-width: 44px;
  min-height: 44px;
  padding: 0;
}
.wu-xw-next:active { transform: scale(1.2); }

@media (prefers-reduced-motion: reduce) {
  .wu-hex-wrap.wu-xw-cursor .wu-hex { animation: none; }
  .wu-hex-wrap.wu-xw-just .wu-hex { animation: none; }
}

/* ── 📚 Reading library (decision #107) ─────────────────────────────────────
   Covers are GENERATED SVG, never photographs: a 150 KB JPEG would eat over
   half the sync blob's remaining headroom before the host WAF starts rejecting
   pushes, and a camera is the biggest change this app could make to its privacy
   posture. See src/data/books.js. */
.wu-lib { display: flex; flex-direction: column; gap: var(--space-lg); }
.wu-lib-shelf { display: flex; flex-direction: column; gap: var(--space-sm); }

/* GRID, not a row (owner, 2026-08-17). A horizontal strip was right when a shelf
   held two books; it is wrong the moment it holds twelve, because the ones that
   matter most — the finished pile the child is proud of — scroll off the edge
   and are never seen. A grid shows the whole shelf at once, which is the entire
   point of having one. auto-fill keeps the card size fixed and lets the COLUMN
   COUNT respond, so a phone gets 3 and a laptop 8 without a breakpoint. */
.wu-lib-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
  gap: var(--space-md);
  padding-bottom: var(--space-xs);
  justify-items: center;
}
.wu-lib-card {
  width: 108px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  font: inherit;
}
/* The cover and its ×N badge — the badge is positioned against THIS, not the
   card, so it rides the cover's hover lift instead of floating free of it. */
.wu-lib-cover {
  position: relative;
  display: block;
  line-height: 0;
}
/* Read count, from the second read only. Deliberately looks like a sticker on
   the book rather than a data field: it is the shelf's only status symbol and
   it is EARNED (see readCount in books.js — there is no favourite flag). */
.wu-lib-times {
  position: absolute;
  right: -6px;
  top: -6px;
  min-width: 26px;
  height: 26px;
  padding: 0 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--colour-brand-deep);
  color: #fff;
  border: 2px solid var(--colour-surface);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: var(--font-weight-bold);
  line-height: 1;
}
/* The library sheet is CHILD-accessible, and every `.wu-set-toggle` in it
   measured 36px — under the Phase 6 floor (#88-#90). Scoped rather than raising
   the class globally: its other home is the parent settings panels, where a
   change would reflow a lot of grown-up UI for no reported problem. That
   global 36px stands as a finding, not a fix. */
.wu-lib-sheet .wu-set-toggle {
  min-height: 44px;
}
.wu-lib-count {
  margin: 0 0 var(--space-sm);
  color: var(--colour-brand-deep);
  font-size: var(--font-size-sm);
}
.wu-lib-card .wu-bookcover {
  width: 108px;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.14);
  transition: transform var(--transition-fast);
}
.wu-lib-card:hover .wu-bookcover { transform: translateY(-3px); }
.wu-lib-meta {
  font-size: var(--font-size-xs);
  color: var(--colour-text-secondary);
  text-align: center;
  line-height: 1.25;
}
.wu-lib-add {
  justify-content: center;
  min-height: 154px;
}
.wu-lib-add .wu-lib-plus {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 108px;
  height: 154px;
  border: 2px dashed var(--colour-border);
  border-radius: 8px;
  font-size: 34px;
  color: var(--colour-text-secondary);
}
.wu-lib-add:hover .wu-lib-plus { border-color: var(--colour-accent); color: var(--colour-accent); }

/* Sheet — wider than the standard one: the cover-maker is a preview beside its
   controls, and stacking them would put the dials off-screen on a phone. */
/* ⚠️ 642, not 560, BECAUSE THE BASE SHEET IS NOW BORDER-BOX. This rule always
   meant 560px of CONTENT — the preview beside its controls — and content-box
   delivered it by letting the 40px padding either side sit outside the number.
   Under border-box the same 560 would have given 478 of content, and the motif
   grid below has a hard 494px floor at its 10-column desktop layout (10 x 44px
   swatches plus gaps), so the pickers overflowed the sheet by 15px each side.
   642 = 560 + the padding and border that used to be free. */
.wu-lib-sheet { max-width: 642px; width: min(92vw, 642px); }
.wu-lib-detail { display: flex; justify-content: center; margin-bottom: var(--space-sm); }
.wu-lib-detail .wu-bookcover { width: 132px; height: auto; border-radius: 8px; }
.wu-lib-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  justify-content: center;
  margin: var(--space-md) 0 var(--space-sm);
}
.wu-lib-edit { width: 100%; }
/* Logging is the DAILY act on a book detail and the status buttons are the
   occasional one, so this is a filled primary button rather than a fourth
   toggle. Full width and above 🎨 for the same reason. */
.wu-lib-read {
  width: 100%;
  margin-bottom: var(--space-sm);
  min-height: 44px;
}

/* Cover beside the fields that make it; pickers full-width beneath. */
.wu-lib-maker {
  display: flex; gap: var(--space-md); align-items: flex-start; text-align: left;
  margin-bottom: var(--space-md);
}
.wu-lib-preview { flex: 0 0 132px; }
.wu-lib-preview .wu-bookcover {
  width: 132px; height: auto; border-radius: 8px;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.16);
}
.wu-lib-fields {
  flex: 1; min-width: 0; display: flex; flex-direction: column;
  gap: var(--space-sm); align-self: stretch; justify-content: center;
}
.wu-lib-pickers { text-align: left; }

/* GRIDS, not wrapped flex rows. auto-fit with 1fr stretches the last row's
   items to fill the width, so a partial row never leaves a ragged gap — the
   thing the owner was seeing with 30 emoji in a flex wrap. The counts are
   chosen to divide evenly at the common column counts (30 motifs: 10/6/5;
   8 patterns: 4/8). */
.wu-lib-swatches {
  display: grid; gap: 6px;
  grid-template-columns: repeat(auto-fit, minmax(44px, 1fr));
}
.wu-lib-motifs {
  display: grid; gap: 6px;
  grid-template-columns: repeat(10, 1fr);
}
.wu-lib-patterns {
  display: grid; gap: 6px;
  grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 560px) {
  .wu-lib-motifs { grid-template-columns: repeat(6, 1fr); }
}
/* 44px targets throughout — the floor from the #88–#90 audit. */
.wu-lib-swatch {
  width: 100%; min-width: 44px; height: 44px; border-radius: var(--radius-btn);
  border: 3px solid transparent; cursor: pointer; padding: 0;
}
.wu-lib-motif {
  width: 100%; min-width: 44px; height: 44px; border-radius: var(--radius-btn);
  border: 2px solid var(--colour-border); background: var(--colour-surface);
  font-size: 22px; line-height: 1; cursor: pointer; padding: 0;
}
.wu-lib-swatch.wu-lib-on { border-color: var(--colour-text-primary); }
.wu-lib-motif.wu-lib-on {
  border-color: var(--colour-accent);
  background: color-mix(in srgb, var(--colour-accent) 12%, var(--colour-surface));
}
.wu-lib-patterns .wu-cal-tab { min-height: 36px; text-transform: capitalize; }

/* Phone: the maker stacks, and the preview shrinks rather than pushing the
   dials off-screen — same rule as every other reserve in this project. */
@media (max-width: 560px) {
  .wu-lib-maker { flex-direction: column; align-items: center; }
  .wu-lib-preview { position: static; flex: 0 0 auto; }
  .wu-lib-preview .wu-bookcover { width: 104px; }
  .wu-lib-fields { width: 100%; }
}

/* ── Audit fixes, v319 (first full re-run since v295) ────────────────────────
   All four are TAP TARGETS under the 44px Phase 6 floor — the same category
   that #88–#90 kept finding, which is why the audit tests for it directly.
   Hit area grown with a transparent ::after so the paint is unchanged. */
.wu-cal-nav,
.wu-debug-dl,
.wu-debug-help-toggle {
  position: relative;
}
.wu-cal-nav::after,
.wu-debug-dl::after,
.wu-debug-help-toggle::after {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  width: 44px;
  height: 44px;
  min-width: 100%;
  transform: translate(-50%, -50%);
}
/* The APK download is a <button> now, not an <a>: it runs the shared downloader
   so it can report progress (app-update.js). It keeps the link LOOK, because
   nothing about the action changed from the reader's side. */
button.wu-debug-dl {
  display: inline-block;
  min-height: 24px;
  padding: 10px 0;
  border: none;
  background: none;
  color: var(--colour-accent);
  font: inherit;
  text-align: left;
  text-decoration: underline;
  cursor: pointer;
}
button.wu-debug-dl[disabled] {
  color: var(--colour-text-secondary);
  text-decoration: none;
  cursor: default;
}
.wu-debug-dlstate {
  display: block;
}

/* Diagnostics links sit in prose, so they get height rather than a 44px box —
   a full square would overlap the line above and steal its taps. */
.wu-debug a {
  display: inline-block;
  min-height: 24px;
  padding: 10px 0;
}

/* 🔤 Variables letter pad — the answer IS a letter, so the pad holds letters
   rather than digits. One tap submits: there is nothing to type, so a ✓ would
   only add a way to get stuck. Sized to the same 44px floor as the numpad. */
/* ONE ROW, whatever the letter count (owner, 2026-08-17) — auto-flow column
   with 1fr auto-columns, so 5 letters and 6 letters both fill the width without
   the pad needing to know which. A 3-column grid wrapped them onto two rows and
   made the pad read as a keypad rather than a set of choices. */
.wu-varpad {
  display: grid;
  grid-auto-flow: column;
  grid-template-columns: none;
  /* SQUARE cells (owner, 2026-08-17). Plain 1fr columns inherit the numpad's
     narrow container and gave 37x88 slivers — tall, thin, and under the 44px
     tap floor on the axis that matters for a fingertip. A bounded auto-column
     plus aspect-ratio:1 keeps them square at any letter count, and the row
     centres rather than stretching to fill. */
  grid-auto-columns: minmax(56px, 92px);
  justify-content: center;
  gap: var(--space-sm);
  max-width: none;
}
.wu-varpad button {
  font-family: var(--font-display);
  font-weight: var(--font-weight-bold);
  aspect-ratio: 1;
  min-height: 56px;
  height: auto;
  font-size: clamp(22px, 4.5vmin, 34px);
}
.wu-bal-var {
  font-family: var(--font-display);
  font-weight: var(--font-weight-bold);
  color: var(--colour-accent);
}

/* 📚 Live-book picker in the reading sheet (#107 slice 2) — 1–2 covers, so a row
   rather than a grid. Picking fills the Book field; typing still works, because
   a book not yet on the shelf must never be un-loggable. */
.wu-bookpick { display: flex; gap: var(--space-sm); justify-content: center; margin-bottom: var(--space-sm); flex-wrap: wrap; }
.wu-bookpick-b {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  width: 84px; padding: 6px; border: 2px solid transparent; border-radius: var(--radius-card);
  background: none; cursor: pointer; font: inherit;
  font-size: var(--font-size-xs); color: var(--colour-text-secondary);
}
.wu-bookpick-b .wu-bookcover { width: 68px; height: auto; border-radius: 6px; }
.wu-bookpick-b span { line-height: 1.2; text-align: center; }
.wu-bookpick-on {
  border-color: var(--colour-accent);
  background: color-mix(in srgb, var(--colour-accent) 10%, transparent);
  color: var(--colour-text-primary);
}

/* ── Crossword cursor: which cell the next letter lands in ───────────────────
   Owner: "the next word selection is working nicely but it is difficult to read
   the highlight." The cursor cell was carried only by the tile's own tint —
   and on an ACTIVE word every cell is already tinted, so there was nothing
   separating "this word" from "this cell".

   A stylesheet cannot simply repaint it: createHoneycomb writes --tile-color as
   an INLINE style, which beats any class rule (the same trap noted in
   crossword.js). And .wu-hex is clip-path'd, so box-shadow and outline are
   clipped away too. filter + transform survive both. */
/* The selected WORD. Colour alone could not carry this: a pending hex fills at
   8% of its tile colour, so "active blue" and "rest blue" arrived as two pale
   washes the owner could not tell apart. Amber (set inline by crossword.js) plus
   a fill at the same 26% the board uses for a completed tile makes the run read
   as one object. Filled cells inside it stay at their own 55% `wu-confirmed`
   level — honeycomb.css loads after this file, so that rule wins at equal
   specificity, which is exactly the wanted order: filled > active > rest. */
.wu-hex-wrap.wu-xw-active .wu-hex::before { background: var(--tile-color); }
.wu-hex-wrap.wu-xw-active .wu-hex::after {
  background: color-mix(in srgb, var(--tile-color) 26%, var(--colour-surface));
}

.wu-hex-wrap.wu-xw-cursor { z-index: 3; }
.wu-hex-wrap.wu-xw-cursor .wu-hex {
  filter: saturate(1.7) brightness(0.9);
  transform: scale(1.07);
}
.wu-hex-wrap.wu-xw-cursor .wu-hex-label,
.wu-hex-wrap.wu-xw-cursor .wu-hex-icon {
  font-weight: 800;
  color: var(--colour-text-primary);
}
@media (prefers-reduced-motion: reduce) {
  .wu-hex-wrap.wu-xw-cursor .wu-hex { transform: none; }
}

/* Activity colour dot in a settings panel heading — answers "which colour is
   this on the flower?" without opening the panel (owner, 2026-08-17). */
.wu-set-dot {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}

/* 📚 The library door inside the reading sheet — same chip shape as a book so
   it reads as one more thing on the shelf, but outlined rather than filled so
   it is clearly not a book you can pick. */
.wu-bookpick-more { color: var(--colour-text-secondary); }
.wu-bookpick-plus {
  display: grid;
  place-items: center;
  width: 68px;
  height: 97px;
  border: 2px dashed var(--colour-border);
  border-radius: 6px;
  font-size: 26px;
}
.wu-bookpick-more:hover .wu-bookpick-plus {
  border-color: var(--colour-accent);
}

/* ── Reading sheet: book first, then progress (owner, 2026-08-17) ────────────
   "How far did you get?" cannot be answered before the book is known, so stage
   two stays hidden until a cover is picked. Class-driven, so nothing re-renders
   and no input loses focus mid-flow.
   The BOOK field itself is always hidden here — the covers ARE the input, and a
   text box beside them invites typing a title that already exists. It still
   holds the value that collect() reads. */
/* STEP 1 is the choice and NOTHING else — progress, the timer and Done are all
   absent until a book exists to attach them to (owner). Driven off the presence
   of .wu-book-chosen, so the two steps cannot both be on screen. */
.wu-sheet:has(.wu-bookpick):not(.wu-book-chosen) .wu-sheet-label,
.wu-sheet:has(.wu-bookpick):not(.wu-book-chosen) .wu-sheet-actions,
.wu-sheet:has(.wu-bookpick):not(.wu-book-chosen) .wu-timer-notes {
  display: none;
}
/* STEP 2 replaces the chooser rather than appending to it. */
.wu-sheet.wu-book-chosen .wu-bookpick { display: none; }

/* The picked book's own text field never shows — the cover IS the answer, and a
   text box beside the covers invites retyping a title that already exists. It
   still carries the value collect() reads. */
.wu-sheet .wu-sheet-label:has(.wu-sheet-input[data-key="book"]) {
  display: none !important;
}

/* The chosen book, standing in for the chooser it replaced. */
.wu-book-head {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm);
  margin-bottom: var(--space-sm);
  border: 1px solid var(--colour-border);
  border-radius: var(--radius-card);
  text-align: left;
}
.wu-book-head[hidden] { display: none; }
.wu-book-head .wu-bookcover { width: 44px; height: auto; border-radius: 4px; flex: 0 0 44px; }
.wu-book-head-t {
  flex: 1; min-width: 0;
  font-family: var(--font-display);
  font-weight: var(--font-weight-bold);
}
.wu-book-change {
  flex: none;
  width: 44px; height: 44px;
  border: 1px solid var(--colour-border);
  border-radius: var(--radius-btn);
  background: var(--colour-surface);
  font-size: 18px;
  cursor: pointer;
}
.wu-bookpick-more .wu-bookpick-plus { font-size: 30px; }

/* Add-a-book keeps the standard top-right ✕ and commits with a NAMED button at
   the foot — see library.js for why a bare ✓ is wrong for a create sheet.
   ⚠️ `.wu-sheet-go` NEVER HAD A RULE OF ITS OWN — this line, setting only width
   and margin, was the whole of it, so the button that commits a new book
   rendered as a bare UA default: **23px tall**, half the 44px floor (#88-#90),
   on the primary action of the sheet. It carries `.wu-sheet-btn
   .wu-sheet-primary` in the markup now and this stays as the width hook only.
   A class name that LOOKS like a component but matches no rule is invisible in
   review and only a measurement finds it. */
.wu-lib-sheet .wu-sheet-go { width: 100%; margin-top: var(--space-md); }

/* Unscramble (#201): the dealt letters sit in one row where they fit, so the
   mixed order reads as a word to rearrange rather than as an alphabet. A used
   tile stays in place, dimmed, so the remaining letters never jump. */
.wu-uk-tiles { max-width: 640px; }

/* ⌨️ Typing (#203). A real keyboard layout, three staggered rows. The
   keys share the row's width so ten fit across a phone; they keep the 44px
   height, and on a 375px phone come out about 30px wide, as a phone's own
   keyboard does. Ghost letters show the word being copied. */
.wu-typ-kbd {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 100%;
  max-width: 960px; /* #205 typing: the keyboard fills the screen (owner) */
  margin: 0 auto;
}
.wu-typ-row {
  display: flex;
  justify-content: center;
  gap: 6px;
  width: 100%;
}
.wu-typ-row:nth-child(2) { width: 90%; }
.wu-typ-row:nth-child(3) { width: 70%; }
.wu-typ-row .wu-alpha-key {
  flex: 1 1 0;
  min-width: 0;
  max-width: none;
  /* Tall keys where there is height to spare, never under the 44px floor. */
  min-height: clamp(48px, 9vh, 76px);
  font-size: clamp(var(--font-size-md), 3vh, 28px);
  padding: 0;
}
.wu-spell-slot.wu-typ-ghost {
  color: var(--colour-text-secondary);
  opacity: 0.5;
}
.wu-spell-slot.wu-typ-ghost.wu-spell-active { opacity: 0.8; }
.wu-alpha-key.wu-typ-next {
  border-color: var(--colour-accent);
  box-shadow: 0 0 0 2px var(--colour-accent);
}
@media (max-width: 720px), (orientation: landscape) and (max-height: 500px) {
  .wu-typ-kbd, .wu-typ-row { gap: 4px; }
  .wu-typ-row .wu-alpha-key { min-height: clamp(44px, 7vh, 64px); font-size: var(--font-size-md); }
}
/* Sideways phone: the keys column is flex: none (sized by its content), and a
   keyboard of shared-width keys has no content width of its own, so give it one. */
@media (orientation: landscape) and (max-height: 500px) {
  /* The keyboard takes every pixel the word card leaves, not a fixed 420px. */
  .wu-spell-keys:has(.wu-typ-kbd) { flex: 1 1 0; min-width: 0; width: auto; }
  .wu-spell-stage:has(.wu-typ-kbd) .wu-spell-card { flex: 0 1 auto; max-width: 40%; }
}

/* #205 typing, every screen: the keys column spans the full width it is given. */
.wu-spell-keys:has(.wu-typ-kbd) { width: 100%; }

/* ✳️ Cross Words: the answer language on the clue bar (#209). It moved off
   the letter strip so the keys get that row back. Below 420px the name drops
   and the flag stays, so the clue never gets squeezed off the bar. */
.wu-xw-barlang {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 0.25em;
  font-family: var(--font-body);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--colour-accent);
  white-space: nowrap;
}
@media (max-width: 420px) {
  .wu-xw-barlang-name { display: none; }
}

/* 🔗 Matching: the Ready bar sits above the table (#209). Once play starts its
   place is kept, invisibly, so the table does not move when the words mix. */
.wu-match-ready-gone { visibility: hidden; pointer-events: none; }

/* 🧩 Fill the gap / 🎯 Tap form mix (#210): a chip naming the kind of
   question and its language, so the switch between a verb in the learning
   language and an English word is said rather than sprung. */
.wu-mix-kind {
  display: inline-block;
  margin-bottom: var(--space-xs);
  padding: 2px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--colour-accent) 10%, transparent);
  font-family: var(--font-body);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--colour-text-secondary);
}
.wu-mix-ask {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(20px, 4vw, 28px);
  font-weight: var(--font-weight-bold);
  line-height: 1.25;
  color: var(--colour-text-primary);
}

/* ✍️ Conjugate (#210): the verb table with gaps. Smaller slots than Spell it,
   because a row can be a two-word form ("avrete mangiato"). */
.wu-cj-card { gap: var(--space-xs); }
.wu-cj-verb {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(20px, 4vw, 28px);
  color: var(--colour-text-primary);
}
.wu-cj-verb span { color: var(--colour-text-secondary); font-size: 0.75em; }
.wu-cj-tense {
  margin: 0;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--colour-accent);
}
.wu-cj-table {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px var(--space-sm);
  width: 100%;
  margin-top: var(--space-xs);
  text-align: left;
}
.wu-cj-row { display: contents; }
.wu-cj-pron {
  align-self: center;
  font-size: var(--font-size-sm);
  color: var(--colour-text-secondary);
  white-space: nowrap;
}
.wu-cj-on .wu-cj-pron { color: var(--colour-accent); font-weight: var(--font-weight-bold); }
.wu-cj-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 3px;
  min-width: 0;
  font-family: var(--font-display);
  font-size: clamp(18px, 3.4vw, 24px);
  font-weight: var(--font-weight-bold);
}
.wu-cj-done { color: var(--colour-success-ink); }
.wu-cj-given { color: var(--colour-text-primary); }
.wu-spell-win .wu-cj-done { animation: wu-spell-pop 0.35s ease; }
@media (prefers-reduced-motion: reduce) {
  .wu-spell-win .wu-cj-done { animation: none; }
}

/* ⌨️ Typing — the word's meaning under its slots (#219). Quiet, so the word
   stays the thing being typed; empty when a word has no definition. */
.wu-typ-def {
  max-width: 34ch;
  margin: var(--space-sm) auto 0;
  font-family: var(--font-body);
  font-size: var(--font-size-sm);
  line-height: 1.4;
  color: var(--colour-text-secondary);
  text-align: center;
  text-wrap: balance;
}
.wu-typ-def:empty { display: none; }

/* ── 📖 WORD BANK (#228) ──────────────────────────────────────────────────
   A side list and what it lists. Two columns on a tablet or laptop; on a
   phone the list becomes a scrolling row of chips above the content, so the
   words keep the full width. Both columns scroll on their own — a long verb
   list must not push the table off the screen. */
.wu-wb {
  flex: 1;
  min-height: 0;
  display: grid;
  /* The list is ANCHORED LEFT and only as wide as a verb needs; the content
     takes every pixel that is left (owner, 2026-11-10). It was a centred 960px
     block with a 240px list, which on a 960px tablet left the tense tables too
     narrow and cut "ajudaremos" off behind a sideways scroll. */
  grid-template-columns: clamp(150px, 20vw, 210px) minmax(0, 1fr);
  gap: var(--space-md);
  width: 100%;
}
.wu-wb-side {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  overflow-y: auto;
  min-height: 0;
  padding-right: var(--space-xs);
}
.wu-wb-head {
  margin: var(--space-sm) 0 0;
  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-wb-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-wb-item.wu-wb-on {
  border-color: var(--colour-accent);
  background: color-mix(in srgb, var(--colour-accent) 12%, var(--colour-surface));
}
.wu-wb-ic { flex: none; width: 1.4em; text-align: center; }
.wu-wb-main {
  overflow-y: auto;
  overflow-x: hidden;
  min-height: 0;
  padding: var(--space-md);
  background: var(--colour-surface);
  border: 1px solid var(--colour-border);
  border-radius: var(--radius-card);
}

/* Words with their meanings. */
.wu-wb-defs { margin: 0; display: grid; gap: var(--space-sm); }
.wu-wb-def {
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--colour-border);
}
.wu-wb-def:last-child { border-bottom: 0; }
/* 🔁 Same as: … (#336) — a quieter second line under the meaning. */
.wu-wb-def dd.wu-wb-syn {
  margin-top: 4px;
  font-size: var(--font-size-sm);
  color: var(--colour-text-secondary);
}
.wu-wb-syn em { font-style: normal; font-weight: var(--font-weight-semibold, 600); color: var(--colour-text-primary); }
.wu-wb-def dt {
  font-family: var(--font-display);
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  color: var(--colour-text-primary);
}
.wu-wb-def dd {
  margin: 2px 0 0;
  font-size: var(--font-size-md);
  line-height: 1.4;
  color: var(--colour-text-secondary);
}

/* English beside the language being learned. */
.wu-wb-pairs { width: 100%; border-collapse: collapse; font-size: var(--font-size-lg); }
.wu-wb-pairs th {
  position: sticky;
  top: calc(-1 * var(--space-md));
  background: var(--colour-surface);
  padding: var(--space-xs) var(--space-sm);
  text-align: left;
  font-family: var(--font-display);
  font-size: var(--font-size-sm);
  color: var(--colour-text-secondary);
}
.wu-wb-pairs td {
  padding: var(--space-sm);
  border-top: 1px solid var(--colour-border);
  font-family: var(--font-display);
  font-weight: var(--font-weight-bold);
  color: var(--colour-text-primary);
  overflow-wrap: anywhere;
}

/* A verb: now, before, later, side by side when there is room. */
.wu-wb-verb {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--font-size-2xl);
  color: var(--colour-text-primary);
}
.wu-wb-gloss { margin: 2px 0 var(--space-md); color: var(--colour-text-secondary); }
.wu-wb-tenses {
  display: grid;
  /* A whole TENSE moves to the next row when the three do not fit side by
     side — never a word split or cut. 230px holds the longest pairs in the
     data ("eles/elas" + "ajudaremos", "loro" + "aiuteranno") at this type. */
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: var(--space-md);
}
.wu-wb-tense { border-collapse: collapse; width: 100%; }
.wu-wb-tense caption {
  text-align: left;
  padding-bottom: var(--space-xs);
  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-wb-tense th,
.wu-wb-tense td {
  padding: 6px var(--space-sm);
  border-top: 1px solid var(--colour-border);
  text-align: left;
}
.wu-wb-tense th { width: 1%; white-space: nowrap; font-weight: normal; color: var(--colour-text-secondary); }
.wu-wb-tense td {
  overflow-wrap: anywhere; /* last resort on the narrowest phone only */
  font-family: var(--font-display);
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-lg);
  color: var(--colour-text-primary);
}

@media (max-width: 720px) {
  .wu-wb { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); gap: var(--space-sm); }
  .wu-wb-side {
    flex-direction: row;
    align-items: center;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 0 var(--space-xs);
  }
  .wu-wb-item { flex: none; white-space: nowrap; }
  .wu-wb-head { flex: none; margin: 0 var(--space-xs); }
}

/* ══ THE INPUT RECORD'S PROPOSALS R1–R6 (#252, owner 2026-11-16: "agreed R1
   to R6, implement them all") ════════════════════════════════════════════
   The record measured every activity at 375×812 and found the typed-answer
   screens composed differently from the numpad and chip drills. These rules
   give every drill on a portrait phone ONE composition: the white band right
   under the progress row (question + what the child has typed), the input
   centred in what is left above the foot bar (#247).

   The band's full-width white is the shadow-and-clip trick (#247): three
   shadows — the white, then a 1px rule above and below drawn full width — and
   a clip that lets them out sideways but only 1px vertically. */
/* Two rows — the instruction, then ▶ Ready. While the round is played the
   button's place is HELD (#209, so the table does not jump) and the
   instruction spans both rows, centred, instead of sitting over a blank. */
.wu-match-band {
  display: grid;
  justify-items: center;
  align-items: center;
  gap: var(--space-sm);
  flex: none;
}
.wu-match-band > * { grid-column: 1; }
.wu-match-band .wu-match-ask { grid-row: 1; }
.wu-match-band .wu-match-ready { grid-row: 2; }
.wu-match-band:has(.wu-match-ready-gone) .wu-match-ask { grid-row: 1 / 3; }
.wu-match-band .wu-match-ready { margin: 0 auto; }
.wu-match-ask {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--font-size-sm);
  color: var(--colour-text-secondary);
  text-align: center;
}

@media (orientation: portrait) {
  /* R1 + R2 — the spell cards (⌨️ Typing, ⬜ Missing letters, ✏️ Spell it,
     🔀 Unscramble, ✍️ Conjugate): the card IS the band, at the top; the keys
     are centred below. They sat 100–130px lower, the card centred as a pair
     with a keyboard that hugged it. */
  .wu-drill-layer > :is(.wu-spell-stage, .wu-alpha-stage) {
    justify-content: flex-start;
    gap: 0;
    padding: 0;
    max-width: none;
  }
  .wu-spell-stage > .wu-spell-card,
  .wu-alpha-stage > .wu-alpha-q {
    flex: none;
    width: 100%;
    margin-top: var(--space-md);
    padding: var(--space-lg) 0;
    border: 0;
    border-radius: 0;
    background: var(--colour-surface);
    box-shadow:
      0 0 0 100vmax var(--colour-surface),
      0 -1px 0 100vmax var(--colour-border),
      0 1px 0 100vmax var(--colour-border);
    clip-path: inset(-1px -100vmax);
  }
  .wu-spell-stage > .wu-spell-keys,
  .wu-alpha-stage > #wu-lt-keys {
    margin-block: auto;
    padding-block: var(--space-md);
    width: 100%;
  }

  /* R1 — 🔤 Alphabet: the reference alphabet is the TOP of the band, the
     question its bottom, one white block instead of a strip floating above a
     card. */
  .wu-alpha-stage > .wu-alpha-ref {
    flex: none;
    width: 100%;
    margin-top: var(--space-md);
    padding-top: var(--space-lg);
    background: var(--colour-surface);
    box-shadow: 0 0 0 100vmax var(--colour-surface), 0 -1px 0 100vmax var(--colour-border);
    clip-path: inset(-1px -100vmax 0);
  }
  .wu-alpha-stage > .wu-alpha-ref + .wu-alpha-q {
    margin-top: 0;
    padding-top: var(--space-md);
    box-shadow: 0 0 0 100vmax var(--colour-surface), 0 1px 0 100vmax var(--colour-border);
    clip-path: inset(0 -100vmax -1px);
  }

  /* R3 — ONE KEYBOARD: the A–Z grid is the QWERTY board's width and key
     height (full bleed, 3px edge, keys clamp(44px, 7vh, 64px) = 57 at 812). */
  /* Six across, wrapping CENTRED — a grid left Y Z stranded at the left. */
  .wu-alpha-stage > #wu-lt-keys .wu-alpha-strip {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px 3px;
    width: calc(100% + 2 * var(--layer-pad-x));
    max-width: none;
    margin-inline: calc(-1 * var(--layer-pad-x));
    padding-inline: 3px;
    box-sizing: border-box;
  }
  .wu-alpha-stage > #wu-lt-keys .wu-alpha-key {
    flex: 0 0 calc((100% - 5 * 3px) / 6);
    min-width: 0;
    min-height: clamp(44px, 7vh, 64px);
    font-size: var(--font-size-md);
  }

  /* R3 — ✳️ Cross Words: its keys live in the PANE, which kept its frame
     (16px margin + a border) and gave the keyboard 341px of the 375. The
     pane goes frameless like any activity (#239), so the board is as wide as
     Typing's: 34px keys, 3px edge. */
  .wu-view-root > :has(> .wu-honeycomb-pane.wu-xw-open) { padding: 0; }
  .wu-honeycomb-pane.wu-xw-open {
    border: none;
    border-radius: 0;
    min-height: var(--vh);
  }
  .wu-xw-open .wu-xw-keys {
    padding-inline: 3px;
    /* R5 — clear of the exercise-name pill above the foot bar. */
    bottom: calc(var(--space-sm) + var(--foot-reserve) + var(--safe-bottom));
  }
  .wu-xw-open .wu-xw-keys .wu-typ-kbd { gap: 5px; }
  .wu-xw-open .wu-xw-keys .wu-typ-row { gap: 3px; }
  .wu-xw-open .wu-honeycomb-wrap {
    padding-bottom: calc(var(--xw-keys-h, 190px) + var(--space-md) + var(--space-sm)
      + var(--foot-reserve) + var(--safe-bottom));
  }

  /* R6 — 🔗 Matching / 🌐 Translate: the instruction and ▶ Ready are a band
     at the top like every other drill; the pair columns are centred below. */
  .wu-drill-layer > .wu-match-band {
    align-self: stretch;
    margin: var(--space-md) calc(-1 * var(--layer-pad-x)) 0;
    padding: var(--space-lg) var(--layer-pad-x);
    background: var(--colour-surface);
    border-block: 1px solid var(--colour-border);
  }
}

/* R4 — ⏳ Tenses deals three options (one per tense), and two across left the
   third alone on a row. Three stack as one column, every screen. */
.wu-verb-options:has(> :nth-child(3):last-child) {
  grid-template-columns: minmax(0, 1fr);
  width: min(320px, 90%);
}

/* ── ✳️ CROSS WORDS ON A SIDEWAYS TABLET: board left, clue + keys right (#305)
   Owner 2026-11-21: "vocab crosswords - needs a layout recheck to optimise
   screen use and position better mimi". Measured at 1024×600: the full-width
   QWERTY strip took the bottom half and the board was left ~38px hexes in the
   top-left with the right side empty. Sideways, WIDTH is what there is spare,
   so the keys go to a right-hand column with the clue directly above them —
   "what to type" over "where to type" — centred on the board's height, and the
   board takes the whole left side. The foot of the right column stays free,
   which is where Mimi waits. */
@media (orientation: landscape) and (min-height: 501px) {
  .wu-xw-open { --xw-col: min(46%, 520px); }
  .wu-xw-open .wu-honeycomb-wrap {
    padding: var(--space-md) calc(var(--xw-col) + var(--space-lg) * 2) var(--space-md) var(--space-md);
  }
  .wu-xw-open .wu-xw-keys {
    left: auto;
    right: var(--space-lg);
    width: var(--xw-col);
    padding: 0;
    top: calc(50% - var(--xw-keys-h, 190px) / 2 + 30px);
    bottom: auto;
  }
  .wu-honeycomb-pane:has(.wu-path-bar) .wu-xw-bar {
    box-sizing: border-box;
    left: auto;
    right: var(--space-lg);
    width: var(--xw-col);
    max-width: none;
    transform: none;
    top: calc(50% - var(--xw-keys-h, 190px) / 2 - 42px);
    bottom: auto;
    justify-content: center;
  }
}

/* 🔍 Find (#307) — a sheet opened from the 🔍 beside the ✕. One box, then the
   results; only the results scroll, so the box stays under the thumb. */
.wu-wb-find-sheet {
  width: min(560px, calc(100vw - 2 * var(--space-md)));
  max-height: calc(var(--vh, 100vh) - 2 * var(--space-lg));
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
/* It opens just BELOW the top bar (#512) and grows downwards, so the box does
   not move as results arrive; with the keyboard up it stays there and ends
   above it. A sideways phone has no top bar, only the safe area. */
.wu-wb-find-bd,
.wu-wb-find-bd[data-kb] {
  box-sizing: border-box;
  align-items: flex-start;
  padding-top: calc(var(--bar-top-h, var(--safe-top, 0px)) + var(--space-sm));
  padding-bottom: calc(var(--safe-bottom, 0px) + var(--space-sm));
}
.wu-wb-find-bd > .wu-wb-find-sheet { max-height: 100%; }
.wu-wb-find-bd[data-kb] > .wu-wb-find-sheet {
  max-height: calc(var(--vv-h, 55vh) - var(--bar-top-h, var(--safe-top, 0px)) - 2 * var(--space-sm));
}
/* The title clears the 44px ✕ on both sides, so a long one stays centred
   and never runs under it on a phone (#421). */
.wu-wb-find-sheet .wu-sheet-title { padding: 0 44px; text-wrap: balance; }
.wu-wb-find {
  flex: none;
  display: flex;
  align-items: center;
  margin: 0 0 var(--space-sm);
  padding: 0 var(--space-md);
  min-height: var(--tap-target-min);
  border: 2px solid var(--colour-border);
  border-radius: 999px;
  background: var(--colour-bg);
}
.wu-wb-find:focus-within { border-color: var(--colour-accent); }
.wu-wb-find input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: none;
  font-family: var(--font-display);
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  color: var(--colour-text-primary);
}
.wu-wb-find input::placeholder { color: var(--colour-text-secondary); font-weight: normal; }
.wu-wb-find-out { flex: 1 1 auto; min-height: 0; overflow-y: auto; text-align: left; }
.wu-wb-tr { margin-left: var(--space-sm); color: var(--colour-accent); font-weight: var(--font-weight-bold); }
.wu-wb-where {
  margin-left: var(--space-sm);
  font-family: var(--font-body);
  font-size: var(--font-size-xs);
  font-weight: normal;
  color: var(--colour-text-secondary);
  white-space: nowrap;
}
.wu-wb-found { display: flex; flex-direction: column; gap: var(--space-xs); }
.wu-wb-none { color: var(--colour-text-secondary); margin: var(--space-sm) 0; }

/* 📖 Word Bank — BOOKS · LISTS · CONTENT (#309). The old flower's tiles are
   the first column. A tablet shows all three; a phone shows the column its
   data-step names, with a back row (.wu-wb-crumb) above it. */
.wu-wb { grid-template-columns: 92px clamp(150px, 18vw, 200px) minmax(0, 1fr); }
.wu-wb-crumb { display: none; }
.wu-wb-books {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  overflow-y: auto;
  min-height: 0;
}
.wu-wb-book {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 64px;
  padding: var(--space-xs);
  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-sm);
  font-weight: var(--font-weight-bold);
  text-align: center;
  line-height: 1.15;
  cursor: pointer;
}
.wu-wb-book-ic { font-size: 1.6em; line-height: 1; }
.wu-wb-book.wu-wb-on {
  border-color: var(--colour-accent);
  background: color-mix(in srgb, var(--colour-accent) 12%, var(--colour-surface));
}
/* Swap and Library DO something rather than open a book — set apart. */
.wu-wb-book-tool { background: var(--colour-bg); border-style: dashed; }
.wu-wb-book-tool + .wu-wb-book-tool { margin-top: 0; }
.wu-wb-books > .wu-wb-book-tool:first-of-type { margin-top: var(--space-sm); }

@media (max-width: 720px) {
  .wu-wb { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .wu-wb-crumb {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    min-height: var(--tap-target-min);
  }
  .wu-wb-crumb-back {
    flex: none;
    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);
    font-size: var(--font-size-md);
    cursor: pointer;
  }
  .wu-wb-crumb-here {
    flex: 1;
    min-width: 0;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: var(--font-display);
    font-weight: var(--font-weight-bold);
    font-size: var(--font-size-lg);
    color: var(--colour-text-primary);
  }
  /* One column at a time. */
  .wu-wb > :is(.wu-wb-books, .wu-wb-side, .wu-wb-main) { display: none; }
  .wu-wb[data-step="books"] > .wu-wb-books { display: grid; }
  .wu-wb[data-step="lists"] > .wu-wb-side { display: flex; }
  .wu-wb[data-step="main"] > .wu-wb-main { display: block; }
  .wu-wb-books {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-content: start;
    gap: var(--space-sm);
  }
  .wu-wb-book { min-height: 96px; font-size: var(--font-size-md); }
  .wu-wb-books > .wu-wb-book-tool:first-of-type { margin-top: 0; }
  /* The list is a list again (it was a sideways chip row before #308). */
  .wu-wb-side {
    flex-direction: column;
    align-items: stretch;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 0;
  }
  .wu-wb-item { white-space: normal; }
  .wu-wb-head { margin: var(--space-sm) 0 0; }
  /* The back row names the book and the list, so the header's title would
     say it twice. */
  .wu-drill-layer:has(> .wu-wb) > .wu-drill-head .wu-drill-progress { display: none; }
}

/* 🧭 The Path band on a portrait phone (#322, owner: "this activity top is all
   crammed up"). One pill held the count, a wrapping sentence, 🔊, the tally and
   the (?) side by side, so the sentence got ~150px and wrapped to three lines.
   Now it is the floating card of #272: a meta line (count · tally … 🔊 · (?))
   over the sentence at full width. The board's reserve grows to match. */
@media (max-width: 599px) and (orientation: portrait) {
  .wu-honeycomb-pane:has(.wu-path-bar) .wu-path-bar {
    display: grid;
    grid-template-columns: auto auto 1fr auto auto;
    grid-template-areas:
      "step err . say help"
      "prompt prompt prompt prompt prompt";
    align-items: center;
    column-gap: var(--space-sm);
    row-gap: 2px;
    left: var(--space-sm);
    right: var(--space-sm);
    width: auto;
    max-width: none;
    border-radius: 18px;
    padding: 2px var(--space-sm) var(--space-sm) var(--space-md);
  }
  .wu-path-bar > .wu-path-step { grid-area: step; }
  .wu-path-bar > .wu-path-errors { grid-area: err; }
  .wu-path-bar > .wu-path-say { grid-area: say; }
  .wu-path-bar > .wu-path-help { grid-area: help; margin: 0; }
  .wu-path-bar > .wu-path-quit { display: none; }
  .wu-path-bar > .wu-path-prompt {
    grid-area: prompt;
    font-size: var(--font-size-md);
    padding-inline: var(--space-xs);
  }
  /* Meta line 44px + a two-line sentence + the card's padding. */
  .wu-honeycomb-pane:has(.wu-path-bar):not(.wu-xw-open) .wu-honeycomb-wrap {
    padding-top: calc(var(--space-md) * 2 + 104px);
  }
}
/* 🗺️ World explorer (#423, components/atlas.js): the side (search, continents,
   card, list) beside the map; on a portrait phone the map sits on top. */
/* #442 the map fills the page; the find panel floats over its right side and
   folds away behind the 🔍 Find pill in the bar. */
.wu-atl {
  --atl-side: clamp(260px, 32vw, 340px);
  position: relative;
  flex: 1;
  min-height: 0;
  width: 100%;
}
.wu-atl > .wu-atl-zone { position: absolute; inset: 0; }
/* 🌌 Space also behind the bar's rounded corners and the safe area (#513):
   the layer's paper showed there. The same night as .wu-glb-space's edge. */
.wu-drill-layer.wu-jrnpage-full:has(.wu-atl) { background: #0B1026; }
.wu-atl-side {
  position: absolute;
  z-index: 3;
  top: var(--space-sm);
  right: var(--space-sm);
  bottom: var(--space-sm);
  width: var(--atl-side);
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  min-height: 0;
  padding: var(--space-sm);
  border-radius: var(--radius-card, 16px);
  background: color-mix(in srgb, var(--colour-surface) 94%, transparent);
  box-shadow: 0 8px 24px #0006;
}
.wu-atl.wu-atl-closed .wu-atl-side { display: none; }
/* the 🔍 Find chip in the top bar, lit while the panel is open */
.wu-rail-extra .wu-hud-chip.wu-atl-pill-on { background: var(--colour-brand); border-color: var(--colour-brand-deep); }
/* edge to edge in the full-bleed layer: no frame of its own */
.wu-atl > .wu-atl-zone { border-radius: 0; box-shadow: none; }
/* 💬 Mimi in the map's corner, her bubble beside her (#442) */
.wu-atl-mimi {
  position: absolute;
  z-index: 2;
  left: var(--space-sm);
  bottom: var(--space-sm);
  right: var(--space-sm);
  display: flex;
  align-items: flex-end;
  gap: 10px;
  pointer-events: none;
}
.wu-atl:not(.wu-atl-closed) .wu-atl-mimi { right: calc(var(--atl-side) + 2 * var(--space-sm)); }
/* Mimi in her own hex, her animated self (owner: "mimi lives in her hex") */
.wu-atl-mimi-hex {
  flex: none;
  position: relative;
  display: grid;
  place-items: center;
  width: 68px;
  height: 78px;
  background: var(--colour-brand);
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  filter: drop-shadow(0 3px 6px #0008);
}
.wu-atl-mimi-fig { width: 100%; height: 100%; display: grid; place-items: center; }
.wu-atl-mimi-fig .wu-mascot { width: 60px; height: 60px; }
.wu-atl-mimi-talk { animation: wu-mimi-talk 0.5s ease; }
@media (prefers-reduced-motion: reduce) { .wu-atl-mimi-talk { animation: none; } }
.wu-atl-say {
  position: relative;
  min-width: 0;
  max-width: 320px;
  margin-bottom: 18px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  border: 2px solid var(--colour-brand);
  border-radius: 16px;
  background: var(--colour-surface);
  color: var(--colour-text-primary);
  box-shadow: 0 6px 18px #0006;
  pointer-events: auto;
}
.wu-atl-say:has(.wu-atl-x) { padding-right: 40px; }
.wu-atl-say::after {
  content: "";
  position: absolute;
  left: -8px;
  bottom: 14px;
  width: 12px;
  height: 12px;
  background: var(--colour-surface);
  border: 2px solid var(--colour-brand);
  border-width: 0 0 2px 2px;
  transform: rotate(45deg);
}
.wu-atl-say-pop { animation: wu-mimi-say-in 0.28s cubic-bezier(.5, 1.6, .5, 1); }
.wu-atl-line { margin: 0; font-family: var(--font-display); font-weight: 700; line-height: 1.3; text-wrap: pretty; }
.wu-atl-line b { font-weight: 800; }
.wu-atl-sayflag { display: block; width: 72px; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 6px; box-shadow: 0 0 0 1px var(--colour-border); }
.wu-atl-say .wu-atl-deep { padding: 0 14px; }
.wu-atl-sayhead { display: flex; align-items: center; gap: 10px; }
.wu-atl-getmini { min-height: 36px; padding: 0 12px; border: 2px dashed color-mix(in srgb, var(--colour-brand-deep) 60%, var(--colour-border));
  border-radius: 999px; background: color-mix(in srgb, var(--colour-brand) 14%, var(--colour-surface)); color: var(--colour-text-primary);
  font-family: var(--font-display); font-weight: var(--font-weight-bold); font-size: var(--font-size-sm); white-space: nowrap; cursor: pointer; }
@media (prefers-reduced-motion: reduce) { .wu-atl-say-pop { animation: none; } }
/* 🌊 ocean names, quiet italic in the water (#442) */
.wu-glb-sea { font-family: var(--font-display); font-style: italic; font-weight: 700; font-size: calc(var(--glb-u, 1) * 1.9px); letter-spacing: 0.08em;
  fill: #1E5A8C; fill-opacity: 0.55; text-anchor: middle; dominant-baseline: middle; pointer-events: none; }
.wu-glb-zoomed .wu-glb-sea { font-size: calc(var(--glb-u, 1) * 2.2px); }
/* the Arctic's band is too thin on the whole globe: named once zoomed in */
.wu-atl-map:not(.wu-glb-zoomed) .wu-glb-sea-z { display: none; }
/* 🧊 Antarctica is tappable: named by Mimi, never asked in the game */
.wu-glb-ant { pointer-events: none; }
.wu-glb-ant.wu-glb-ant-tap { pointer-events: auto; cursor: pointer; }
.wu-glb-ant.wu-glb-ant-on { fill: #E3F2FD; stroke: var(--colour-brand-deep); stroke-width: 2; stroke-opacity: 1; }
/* ⭐ A flag not downloaded yet: the WarmUp amber tile with a white star (#442) */
span.wu-atl-flag, button.wu-atl-sayflag, span.wu-atl-bigflag,
span.wu-wld-flag, span.wu-wld-flag-big, span.wu-wld-flag-sm, span.wu-wld-flag-xs, span.wu-wld-flag-ring {
  display: inline-grid;
  place-items: center;
  padding: 0;
  /* a lighter amber ground, the brand amber as its edge (owner) */
  background: color-mix(in srgb, var(--colour-brand) 45%, #fff);
  border: 1.5px solid var(--colour-brand);
  box-sizing: border-box;
  color: #fff;
  line-height: 1;
  font-size: 14px;
}
span.wu-atl-flag::before, button.wu-atl-sayflag::before, span.wu-atl-bigflag::before,
span.wu-wld-flag::before, span.wu-wld-flag-big::before, span.wu-wld-flag-sm::before, span.wu-wld-flag-xs::before, span.wu-wld-flag-ring::before {
  content: "★";
  text-shadow: 0 0 2px color-mix(in srgb, var(--colour-brand-deep) 70%, transparent);
}
button.wu-atl-sayflag { cursor: pointer; }
button.wu-atl-sayflag::after { content: "⬇"; position: absolute; right: 3px; bottom: 1px; font-size: 12px; color: var(--colour-brand-deep); }
button.wu-atl-sayflag { position: relative; }
span.wu-wld-flag-xs { font-size: 11px; }
button.wu-atl-sayflag, span.wu-wld-flag-ring { font-size: 26px; }
span.wu-wld-flag-big { font-size: 64px; }
.wu-atl-find {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 0 var(--space-sm);
  border: 2px solid var(--colour-brand);
  border-radius: 999px;
  background: var(--colour-surface);
}
.wu-atl-find input {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  border: 0;
  background: transparent;
  font: inherit;
  color: var(--colour-text-primary);
  outline: none;
}
.wu-atl-conts {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.wu-atl-chip {
  flex: none;
  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-family: var(--font-display);
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-sm);
  white-space: nowrap;
}
.wu-atl-chip[aria-selected="true"] {
  background: color-mix(in srgb, var(--atl-c, var(--colour-brand)) 35%, var(--colour-surface));
  border-color: var(--atl-c, var(--colour-brand-deep));
}
.wu-atl-card {
  position: relative;
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: var(--space-xs) var(--space-sm);
  align-items: center;
  padding: var(--space-sm);
  border: 1px solid var(--colour-border);
  border-radius: var(--radius-card, 16px);
  background: var(--colour-surface);
}
.wu-atl-bigflag { width: 76px; border-radius: 6px; box-shadow: 0 0 0 1px var(--colour-border); }
.wu-atl-facts p { margin: 0; color: var(--colour-text-secondary); font-size: var(--font-size-sm); }
.wu-atl-title { margin: 0 32px 2px 0; font-family: var(--font-display); font-size: var(--font-size-lg); line-height: 1.15; }
.wu-atl-dot { display: inline-block; width: 10px; height: 10px; margin-right: 6px; border-radius: 50%; background: var(--atl-c); }
.wu-atl-deep {
  grid-column: 1 / -1;
  min-height: 44px;
  border: 1px solid var(--colour-brand-deep);
  border-radius: var(--radius-button);
  background: var(--colour-brand);
  color: var(--colour-text-primary);
  font-family: var(--font-display);
  font-weight: var(--font-weight-bold);
}
.wu-atl-x {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--colour-text-secondary);
}
.wu-atl-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-bottom: var(--space-md);
}
.wu-atl-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas: "flag name tick" "flag sub tick";
  column-gap: var(--space-sm);
  align-items: center;
  min-height: 48px;
  padding: 6px var(--space-sm);
  border: 1px solid var(--colour-border);
  border-radius: var(--radius-button);
  background: var(--colour-surface);
  color: var(--colour-text-primary);
  text-align: left;
}
.wu-atl-row.wu-atl-on { border-color: var(--colour-brand-deep); background: color-mix(in srgb, var(--colour-brand) 18%, var(--colour-surface)); }
.wu-atl-flag { grid-area: flag; width: 32px; height: 22px; object-fit: cover; border-radius: 3px; box-shadow: 0 0 0 1px var(--colour-border); }
.wu-atl-name { grid-area: name; font-weight: var(--font-weight-bold); line-height: 1.2; }
.wu-atl-name small, .wu-atl-sub small { font-weight: 400; color: var(--colour-text-secondary); }
.wu-atl-sub { grid-area: sub; font-size: var(--font-size-sm); color: var(--colour-text-secondary); line-height: 1.2; }
.wu-atl-tick { grid-area: tick; color: #2E7D32; font-weight: var(--font-weight-bold); }
.wu-atl-more { font-size: 0.8em; }
.wu-atl-count, .wu-atl-empty { margin: 4px 2px; color: var(--colour-text-secondary); font-size: var(--font-size-sm); }
.wu-atl-h { margin: var(--space-sm) 2px 2px; font-family: var(--font-display); font-size: var(--font-size-md); }
.wu-atl-h small { color: var(--colour-text-secondary); font-weight: 400; }
.wu-atl-back {
  align-self: flex-start;
  min-height: 40px;
  padding: 0 var(--space-sm);
  border: 1px solid var(--colour-border);
  border-radius: 999px;
  background: var(--colour-surface);
  color: var(--colour-text-primary);
  font-weight: var(--font-weight-bold);
}
.wu-atl-zone {
  position: relative;
  min-height: 0;
  border-radius: var(--radius-card, 16px);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px var(--colour-border);
}
/* 🌌 SPACE beyond the globe (#441, shared #445): a deep night with a few
   stars, so the map no longer bleeds to the frame's edge. */
.wu-glb-space {
  background:
    radial-gradient(1px 1px at 12% 18%, #ffffffcc 99%, transparent),
    radial-gradient(1px 1px at 78% 12%, #ffffffaa 99%, transparent),
    radial-gradient(1.5px 1.5px at 64% 84%, #ffffffbb 99%, transparent),
    radial-gradient(1px 1px at 33% 92%, #ffffff99 99%, transparent),
    radial-gradient(1px 1px at 90% 58%, #ffffffaa 99%, transparent),
    radial-gradient(1.5px 1.5px at 6% 66%, #ffffffbb 99%, transparent),
    radial-gradient(1px 1px at 48% 6%, #ffffff88 99%, transparent),
    radial-gradient(ellipse at 50% 45%, #1F2A5A 0%, #0B1026 75%);
}
/* #438: the map pans and zooms under the finger, so the browser keeps out of it */
.wu-atl-map { width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
/* Borders a shade darker than the land (owner: "hard to read the borders when
   zoned to continents"); a little heavier once zoomed in. */
.wu-atl-c {
  fill: color-mix(in srgb, var(--atl-c, #bbb) 30%, var(--colour-surface));
  stroke: color-mix(in srgb, var(--atl-c, #bbb) 45%, var(--colour-text-primary));
  stroke-opacity: 0.55;
  stroke-width: 0.6;
  vector-effect: non-scaling-stroke;
  stroke-linejoin: round;
  cursor: pointer;
  transition: fill 0.25s ease, opacity 0.25s ease;
}
.wu-atl-c.wu-atl-known { fill: color-mix(in srgb, var(--atl-c, #bbb) 65%, var(--colour-surface)); }
.wu-atl-c.wu-atl-dim { opacity: 0.35; }
/* 🌍 the globe (#441): ocean inside its edge, the 30° lines, Antarctica as
   scenery, a soft rim, and the degrees outside the edge */
.wu-glb-ocean { fill: color-mix(in srgb, #4FC3F7 26%, var(--colour-surface)); }
.wu-glb-rim { fill: none; stroke: #9FD3F0; stroke-width: 2; vector-effect: non-scaling-stroke; pointer-events: none; }
.wu-glb-grat { fill: none; stroke: #2B6CB0; stroke-opacity: 0.22; stroke-width: 0.8; vector-effect: non-scaling-stroke; pointer-events: none; }
.wu-glb-grat-main { stroke-opacity: 0.4; stroke-dasharray: 4 3; }
.wu-glb-ant { fill: #F4F8FB; stroke: color-mix(in srgb, #90A4AE 70%, var(--colour-text-primary)); stroke-opacity: 0.5; stroke-width: 0.6; vector-effect: non-scaling-stroke; }
.wu-glb-deg { font-family: var(--font-body); font-size: calc(var(--glb-u, 1) * 1.4px); font-weight: 700; fill: #CFE3FF; dominant-baseline: middle; pointer-events: none; }
.wu-glb-zoomed .wu-atl-c { stroke-width: 1.1; stroke-opacity: 0.8; }
/* the degrees: small on the whole world, the comfortable size once zoomed */
.wu-glb-zoomed .wu-glb-deg { font-size: calc(var(--glb-u, 1) * 1.6px); }
/* ✨ stars that glow gently (#441, owner: "can the space have animated stars
   that gently glow?") — behind the map, each on its own slow clock */
.wu-glb-stars { position: absolute; inset: 0; pointer-events: none; }
.wu-glb-star { position: absolute; width: 2px; height: 2px; border-radius: 50%; background: #fff; box-shadow: 0 0 4px 1px #ffffffaa;
  opacity: 0.25; animation: wu-glb-twinkle 4s ease-in-out infinite; }
.wu-glb-star.wu-glb-star-b { width: 3px; height: 3px; box-shadow: 0 0 6px 2px #cfe3ffaa; }
.wu-atl-zone > .wu-atl-map { position: relative; }
@keyframes wu-glb-twinkle { 0%, 100% { opacity: 0.2; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .wu-glb-star { animation: none; opacity: 0.6; } }
/* 🗺️ Region outlines (#438): soft tints so neighbours differ, a clear edge,
   the picked one in the brand colour. Drawn under scale(.01). */
.wu-atl-reg { stroke: color-mix(in srgb, var(--colour-text-primary) 70%, transparent); stroke-width: 1; vector-effect: non-scaling-stroke; stroke-linejoin: round; cursor: pointer; }
.wu-atl-reg-0 { fill: #FFE0B2; } .wu-atl-reg-1 { fill: #C8E6C9; } .wu-atl-reg-2 { fill: #BBDEFB; }
.wu-atl-reg-3 { fill: #F8BBD0; } .wu-atl-reg-4 { fill: #E1BEE7; } .wu-atl-reg-5 { fill: #FFF59D; }
.wu-atl-reg.wu-atl-reg-on { fill: var(--colour-brand); stroke: var(--colour-brand-deep); stroke-width: 2.4; }
.wu-atl-reglbl { font-family: var(--font-display); font-weight: 700; fill: var(--colour-text-primary); text-anchor: middle; pointer-events: none;
  stroke: var(--colour-surface); stroke-width: 2.5px; paint-order: stroke; vector-effect: non-scaling-stroke; opacity: 0.85; }
.wu-atl-call { pointer-events: none; }
.wu-atl-call line { stroke: var(--colour-text-primary); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.wu-atl-call circle { fill: #E53935; stroke: var(--colour-surface); stroke-width: 2; vector-effect: non-scaling-stroke; }
.wu-atl-call rect { fill: var(--colour-surface); stroke: var(--colour-text-primary); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.wu-atl-call text { font-family: var(--font-display); font-weight: 800; fill: var(--colour-text-primary); }
.wu-atl-call .wu-atl-call-sub { font-weight: 600; fill: var(--colour-text-secondary); }
/* ⬇️ a one-off pack, offered in the list */
.wu-atl-get { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; min-height: 48px; margin: 0 0 var(--space-xs); padding: 8px 12px;
  border: 2px dashed color-mix(in srgb, var(--colour-brand-deep) 60%, var(--colour-border)); border-radius: var(--radius-button); background: color-mix(in srgb, var(--colour-brand) 12%, var(--colour-surface));
  color: var(--colour-text-primary); font-weight: var(--font-weight-bold); text-align: left; cursor: pointer; }
.wu-atl-get small { font-weight: 400; color: var(--colour-text-secondary); }
.wu-pack-ic { font-size: 56px; line-height: 1; }
.wu-atl-c.wu-atl-home { stroke: var(--colour-brand-deep); stroke-width: 1.6; }
.wu-atl-c.wu-atl-pick { fill: var(--colour-brand); stroke: var(--colour-brand-deep); stroke-width: 2; opacity: 1; }
.wu-atl-pin circle {
  r: calc(var(--glb-u, 1) * 0.55);
  fill: var(--colour-surface);
  stroke: var(--colour-text-primary);
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}
.wu-atl-pin text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: calc(var(--glb-u, 1) * 2.6px);
  fill: var(--colour-text-primary);
  stroke: var(--colour-surface);
  stroke-width: 3px;
  paint-order: stroke;
  vector-effect: non-scaling-stroke;
  transform: translate(calc(var(--glb-u, 1) * 0.6px), calc(var(--glb-u, 1) * 0.9px));
}
.wu-atl-pin-reg circle { r: calc(var(--glb-u, 1) * 0.35); fill: var(--colour-text-secondary); stroke: none; }
.wu-atl-pin-cap circle { fill: var(--colour-brand); stroke: var(--colour-brand-deep); r: calc(var(--glb-u, 1) * 0.8); }
.wu-atl-pin-on circle { fill: #E53935; stroke: var(--colour-surface); r: calc(var(--glb-u, 1) * 1); }
.wu-atl-pin-on text { font-size: calc(var(--glb-u, 1) * 3.4px); }
/* ⛶ whole world: a small full-screen icon, quiet until needed (#442) */
.wu-glb-fit {
  position: absolute;
  z-index: 1;
  left: var(--space-sm);
  top: var(--space-sm);
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  opacity: 0.85;
  border: 1px solid var(--colour-border);
  border-radius: 999px;
  background: var(--colour-surface);
  color: var(--colour-text-primary);
  font-weight: var(--font-weight-bold);
  box-shadow: 0 2px 8px #0000001f;
}
.wu-glb-fit svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
@media (orientation: portrait) and (max-width: 767px) {
  /* a phone: the panel rises from the bottom over the map */
  .wu-atl-side { top: auto; left: var(--space-sm); width: auto; height: 62%; }
  .wu-atl:not(.wu-atl-closed) .wu-atl-mimi { right: var(--space-sm); }
}
@media (prefers-reduced-motion: reduce) {
  .wu-atl-c { transition: none; }
}
/* ── 🏆 THE BOOKCASE (#418, #424, library.js): covers face out on wooden
   shelves, 3 a shelf on a phone and 5 wider (the count comes from the script,
   as --bkc-n); objects stand in free slots. Skins swap the wood tokens. */
.wu-bkc {
  --bkc-wood: #B07A4F; --bkc-wood-dark: #7E5233; --bkc-back: #EAD9C4; --bkc-lip: #9A6A42; --bkc-lip-dark: #7E5233;
  display: flex; flex-direction: column; gap: var(--space-sm);
}
/* #431: three parts, each its own class on .wu-bkc (oak is the default above) */
.wu-bkc-fr-paint { --bkc-wood: #E9E4DA; --bkc-wood-dark: #C9C1B3; }
.wu-bkc-fr-mint { --bkc-wood: #80CBC4; --bkc-wood-dark: #4DB6AC; }
.wu-bkc-fr-rainbow { --bkc-wood: #7E57C2; --bkc-wood-dark: #4527A0; }
.wu-bkc-fr-space { --bkc-wood: #283593; --bkc-wood-dark: #1A237E; }
.wu-bkc-fr-gold { --bkc-wood: #E0A526; --bkc-wood-dark: #B07D12; }
.wu-bkc-bd-paint { --bkc-lip: #D7D0C3; --bkc-lip-dark: #B8AFA0; }
.wu-bkc-bd-green { --bkc-lip: #66BB6A; --bkc-lip-dark: #388E3C; }
.wu-bkc-bd-rainbow { --bkc-lip: linear-gradient(90deg, #EF5350, #FFCA28, #66BB6A, #42A5F5, #AB47BC); --bkc-lip-dark: #6A1B9A; }
.wu-bkc-bd-space { --bkc-lip: #5C6BC0; --bkc-lip-dark: #283593; }
.wu-bkc-bd-gold { --bkc-lip: #FFC107; --bkc-lip-dark: #C79100; }
.wu-bkc-bk-paint { --bkc-back: #FBF8F2; }
.wu-bkc-bk-rainbow { --bkc-back: #FFF3E0; }
.wu-bkc-bk-dots { --bkc-back: #FFF8E1; }
.wu-bkc-bk-stripes { --bkc-back: #E8F5E9; }
.wu-bkc-bk-sky { --bkc-back: #BBDEFB; }
.wu-bkc-bk-space { --bkc-back: #0D1440; }
.wu-bkc-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-sm); flex-wrap: wrap; }
.wu-bkc-head .wu-set-heading { margin: 0; }
.wu-bkc-case {
  background: var(--bkc-wood);
  border-radius: 14px;
  padding: 4px 12px 22px;
  box-shadow: inset 0 0 0 4px var(--bkc-wood-dark), 0 8px 24px rgba(0, 0, 0, 0.14);
}
.wu-bkc-shelf {
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--bkc-n, 3), minmax(0, 1fr));
  align-items: end;
  gap: clamp(8px, 2vw, 14px);
  margin-top: 14px;
  padding: 14px 10px 0;
  background: var(--bkc-back);
  border-radius: 6px 6px 0 0;
  box-shadow: inset 0 12px 18px rgba(0, 0, 0, 0.13);
}
.wu-bkc-bk-dots .wu-bkc-shelf { background: radial-gradient(circle, #F48FB1 0 3px, transparent 4px) 0 0 / 28px 28px, var(--bkc-back); }
.wu-bkc-bk-stripes .wu-bkc-shelf { background: repeating-linear-gradient(90deg, #C8E6C9 0 14px, #E8F5E9 14px 28px); }
.wu-bkc-bk-sky .wu-bkc-shelf {
  background:
    radial-gradient(ellipse 30px 12px at 20% 30%, #ffffffdd 98%, transparent),
    radial-gradient(ellipse 40px 14px at 70% 55%, #ffffffcc 98%, transparent),
    var(--bkc-back);
  background-size: 160px 120px, 220px 140px, auto;
}
.wu-bkc-bk-space .wu-bkc-shelf {
  background:
    radial-gradient(circle at 20% 30%, #ffffff88 0 1px, transparent 2px),
    radial-gradient(circle at 70% 60%, #ffffff66 0 1px, transparent 2px),
    var(--bkc-back);
  background-size: 60px 50px, 80px 70px, auto;
}
.wu-bkc-shelf::after {
  content: "";
  position: absolute;
  left: -8px; right: -8px; bottom: -14px;
  height: 14px;
  background: var(--bkc-lip);
  border-radius: 3px;
  box-shadow: 0 4px 0 var(--bkc-lip-dark);
}
.wu-bkc-slot {
  position: relative;
  aspect-ratio: 140 / 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.wu-bkc-book {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  filter: drop-shadow(0 4px 3px rgba(0, 0, 0, 0.2));
  transform-origin: 50% 100%;
  transition: transform 0.15s ease;
}
.wu-bkc-book:hover { transform: translateY(-3px) rotate(-1deg); }
.wu-bkc-book .wu-bookcover { display: block; width: 100%; height: auto; }
.wu-bkc-times {
  position: absolute;
  top: -8px; right: -8px;
  z-index: 1;
  padding: 4px 7px;
  border-radius: 999px;
  background: var(--colour-text-primary);
  color: #FFFFFF;
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-xs, 12px);
  line-height: 1;
  box-shadow: 0 0 0 2px var(--bkc-back);
}
.wu-bkc-obj {
  width: 84%;
  padding: 0;
  border: 0;
  background: none;
  filter: drop-shadow(0 4px 3px rgba(0, 0, 0, 0.2));
  pointer-events: none;
}
.wu-bkc-obj svg { display: block; width: 100%; height: auto; }
.wu-bkc-obj { transform-origin: 50% 100%; }
@keyframes wu-bkc-wiggle { 0%, 100% { transform: rotate(-2deg); } 50% { transform: rotate(2deg); } }
.wu-bkc-target { cursor: pointer; }
.wu-bkc-target::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px dashed var(--colour-brand-deep);
  border-radius: 8px;
  background: color-mix(in srgb, var(--colour-brand) 14%, transparent);
}
/* 🎨 Decorate (#427): a ＋ in every free space; the sheet comes from the bottom. */
.wu-bkc-btns { display: flex; gap: 6px; }
.wu-bkc-hint { margin: 0; color: var(--colour-text-secondary); font-size: var(--font-size-sm); }
.wu-bkc-link { border: 0; background: none; padding: 0 4px; color: var(--colour-brand-deep); font-weight: var(--font-weight-bold); text-decoration: underline; }
.wu-bkc-stars { flex: none; font-weight: var(--font-weight-bold); color: var(--colour-text-primary); }
button.wu-bkc-slot { padding: 0; border: 0; background: none; cursor: pointer; font: inherit; }
.wu-bkc-plus::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px dashed color-mix(in srgb, var(--colour-text-secondary) 45%, transparent);
  border-radius: 8px;
}
.wu-bkc-plus span {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(22px, 5vw, 34px);
  color: color-mix(in srgb, var(--colour-text-secondary) 70%, transparent);
}
.wu-bkc-bk-space .wu-bkc-plus span, .wu-bkc-bk-space .wu-bkc-plus::before { color: #ffffffaa; border-color: #ffffff66; }
.wu-bkc-obj { pointer-events: auto; cursor: pointer; }
.wu-bkc-moving { animation: wu-bkc-wiggle 0.9s ease-in-out infinite; outline: 2px dashed var(--colour-brand-deep); outline-offset: 4px; border-radius: 8px; }
/* the next reading award, one line (phone) */
.wu-bkc-award { margin: 0; display: flex; align-items: center; gap: var(--space-sm); font-size: var(--font-size-sm); }
.wu-bkc-award-ic { flex: none; width: 34px; height: 34px; }
.wu-bkc-award-ic svg { width: 100%; height: 100%; }
.wu-bkc-award-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.wu-bkc-bar { display: block; height: 8px; border-radius: 99px; background: var(--colour-border); overflow: hidden; }
.wu-bkc-bar > span { display: block; height: 100%; border-radius: 99px; background: var(--colour-brand); }
/* the sheet from the bottom: a third of the screen, the shelves stay visible */
.wu-bkc-pick-bd { position: fixed; inset: 0; z-index: 80; background: rgba(43, 41, 38, 0.18); display: flex; align-items: flex-end; justify-content: center; }
.wu-bkc-pick {
  width: min(720px, 100%);
  max-height: 46vh;
  max-height: calc(var(--vh, 1vh) * 46);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-md) calc(var(--space-md) + var(--safe-bottom, 0px));
  border-radius: 20px 20px 0 0;
  background: var(--colour-surface);
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.18);
  animation: wu-bkc-rise 0.25s ease-out;
}
@keyframes wu-bkc-rise { from { transform: translateY(40px); opacity: 0; } }
.wu-bkc-pick-top { display: flex; align-items: center; gap: var(--space-sm); flex-wrap: wrap; }
/* #436: title · ⭐ · ✕ on one bar; the ✕ is in the flow, never over a button */
.wu-bkc-pick-bar { display: flex; align-items: center; gap: var(--space-sm); margin: -6px -6px 0 0; }
.wu-bkc-pick-name { flex: 1; min-width: 0; font-family: var(--font-display); font-weight: var(--font-weight-bold); font-size: var(--font-size-md); }
.wu-bkc-pick-bar .wu-bkc-pick-x { position: static; flex: none; }
.wu-bkc-short { display: none; }
/* #436 a tablet: the two add buttons (short labels, the bar says "Add to the
   shelf") and the three tabs share ONE row (owner: "on tablet mode both the
   add a book and rewards could fit on the same row") */
@media (min-width: 600px) {
  .wu-bkc-pick-adds .wu-bkc-long { display: none; }
  .wu-bkc-pick-adds .wu-bkc-short { display: inline; }
  .wu-bkc-pick-bd .wu-bkc-pick .wu-bkc-pick-top { flex-wrap: nowrap; }
  .wu-bkc-pick-bd .wu-bkc-pick .wu-bkc-pick-adds { flex: none; display: flex; gap: 6px; }
  .wu-bkc-pick-bd .wu-bkc-pick .wu-bkc-pick-adds .wu-av-tab { white-space: nowrap; padding: 0 12px; font-size: var(--font-size-sm); }
  .wu-bkc-pick-bd .wu-bkc-pick .wu-bkc-tabs { flex-wrap: nowrap; margin-left: auto; }
  .wu-bkc-pick-bd .wu-bkc-pick .wu-bkc-tabs .wu-av-tab { flex: none; white-space: nowrap; padding: 0 14px; }
}
.wu-bkc-pick-t { margin: 0; font-family: var(--font-display); font-size: var(--font-size-lg); }
.wu-bkc-pick-sub { margin: 2px 0 0; color: var(--colour-text-secondary); font-size: var(--font-size-sm); }
.wu-bkc-pick-obj { display: flex; align-items: center; gap: var(--space-sm); }
.wu-bkc-pick-big { flex: none; width: 64px; height: 64px; }
.wu-bkc-pick-big svg { width: 100%; height: 100%; }
.wu-bkc-pick-acts { flex: 1 0 100%; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.wu-bkc-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.wu-bkc-pick .wu-bkc-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; overflow: visible; }
.wu-bkc-pick-buy .wu-sheet-btn { width: 100%; }
.wu-bkc-pick-adds { flex: none; grid-template-columns: repeat(2, 1fr); }
@media (max-width: 599px) {
  /* #436 a phone: the two add buttons share the width and wrap their words;
     the three tabs are equal thirds on ONE line (owner: "should fit in a single row") */
  /* short labels on a phone, so every button reads whole on one line */
  .wu-bkc-pick-bd .wu-bkc-long { display: none; }
  .wu-bkc-pick-bd .wu-bkc-short { display: inline; }
  .wu-bkc-pick-bd .wu-bkc-pick .wu-bkc-pick-adds { flex: 1 0 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wu-bkc-pick-bd .wu-bkc-pick .wu-bkc-pick-acts .wu-av-tab { min-height: 52px; padding: 0 8px; white-space: nowrap; font-size: var(--font-size-sm); }
  .wu-bkc-pick-bd .wu-bkc-pick .wu-bkc-tabs { flex: 1 0 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .wu-bkc-pick-bd .wu-bkc-pick .wu-bkc-tabs .wu-av-tab { min-height: 44px; padding: 0 4px; white-space: nowrap; font-size: var(--font-size-sm); }
  .wu-bkc-pick { max-height: calc(var(--vh, 1vh) * 60); padding: var(--space-sm) var(--space-sm) calc(var(--space-sm) + var(--safe-bottom, 0px)); }
}
/* #429: child-sized targets in the ＋ sheet (owner: "all buttons too small") */
/* #439 one shape language, the avatar shop's: every button in the sheet is
   its pill (.wu-av-tab, 2px edge, accent when on), every pick its card. */
.wu-bkc-pick .wu-bkc-pick-acts .wu-av-tab { min-height: 52px; font-size: var(--font-size-sm); color: var(--colour-text-primary); }
.wu-bkc-pick .wu-bkc-items .wu-bkc-item { border: 2px solid var(--colour-border); border-radius: var(--radius-card); }
.wu-bkc-pick .wu-bkc-items .wu-bkc-item.wu-bkc-picked { border-color: var(--colour-accent); background: color-mix(in srgb, var(--colour-accent) 12%, var(--colour-surface)); }
.wu-bkc-pick .wu-bkc-items .wu-bkc-item.wu-bkc-afford { border-style: dashed; border-color: color-mix(in srgb, var(--colour-warning) 60%, var(--colour-border)); }
.wu-bkc-pick .wu-bkc-tabs .wu-av-tab { flex: none; min-height: 44px; padding: 0 16px; }
/* #430: ONE row that scrolls sideways (owner: "lets keep the display as a
   single row that can be scrollable"), so the sheet stays low over the shelves
   and the lists can grow without adding height. */
.wu-bkc-pick .wu-bkc-items {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  padding-bottom: 6px;
  scrollbar-width: thin;
}
.wu-bkc-pick .wu-bkc-item { flex: 0 0 100px; scroll-snap-align: start; }
/* one fixed tile height on every tab, so the sheet never changes height (#432) */
.wu-bkc-pick .wu-bkc-items .wu-bkc-item { height: 130px; min-height: 0; overflow: hidden; justify-content: flex-start; }
@media (min-width: 700px) { .wu-bkc-pick { width: min(900px, 100%); } }
/* 🪵 Frame / Boards / Back wall as labels standing in the one row (#432) */
.wu-bkc-sep { flex: 0 0 22px; scroll-snap-align: start; display: flex; align-items: center; justify-content: center; border-left: 2px solid var(--colour-border); }
.wu-bkc-sep:first-child { border-left: 0; }
.wu-bkc-sep span { writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; font-size: var(--font-size-xs); font-weight: var(--font-weight-bold); letter-spacing: 0.06em; text-transform: uppercase; color: var(--colour-text-secondary); }
/* #433 buying as in the avatar shop: a ⭐N tag (.wu-av-price, profiles.css)
   in the corner, a dashed edge when the stars cover it, faded when not. */
.wu-bkc-pick .wu-bkc-item { position: relative; }
.wu-bkc-pick .wu-bkc-item .wu-av-price { top: 4px; right: 4px; bottom: auto; }
.wu-bkc-item.wu-bkc-afford { border-style: dashed; border-color: color-mix(in srgb, var(--colour-warning) 60%, var(--colour-border)); }
.wu-bkc-spend-ic { display: inline-block; width: 96px; height: 96px; }
.wu-bkc-spend-ic svg { width: 100%; height: 100%; }
.wu-bkc-spend-sw { display: inline-block; width: 96px; height: 72px; border-radius: 10px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15); }
.wu-bkc-spend-sw.wu-bkc-sw-board { height: 28px; }
.wu-bkc-pick .wu-bkc-sw-frame { width: 46px; height: 46px; background-clip: border-box; box-shadow: inset 0 0 0 10px rgba(0, 0, 0, 0.12), inset 0 0 0 1px rgba(0, 0, 0, 0.15); }
.wu-bkc-pick .wu-bkc-sw-board { width: 52px; height: 14px; border-radius: 3px; }
.wu-bkc-pick .wu-bkc-sw-back { width: 46px; height: 46px; }
.wu-bkc-pick .wu-bkc-item { min-height: 112px; padding: 8px 4px; font-size: var(--font-size-md); }
.wu-bkc-pick .wu-bkc-item small { font-size: var(--font-size-sm); }
.wu-bkc-pick .wu-bkc-item-ic { width: 56px; height: 56px; }
.wu-bkc-pick .wu-bkc-swatch { width: 48px; height: 34px; }
.wu-bkc-pick .wu-bkc-pick-x { width: 44px; height: 44px; }
.wu-lib-remove { margin-top: var(--space-xs); color: var(--colour-text-secondary); }
.wu-lib-remove-sure { color: var(--colour-text-primary); border-color: var(--colour-text-primary); font-weight: var(--font-weight-bold); }
/* 📖 Reading now and 🏅 the award card side by side; stacked on a phone. */
.wu-lib-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "h1" "row" "h2" "card";
  gap: var(--space-sm);
}
.wu-lib-top-h1 { grid-area: h1; margin: 0; }
.wu-lib-top-row { grid-area: row; }
/* #439 the empty note stands beside ＋ Add, so no gap opens above the bookcase */
.wu-lib-top-row > .wu-lib-top-empty { grid-column: 2 / -1; align-self: center; justify-self: start; margin: 0; max-width: 36ch; }
.wu-lib-top-h2 { grid-area: h2; margin: var(--space-sm) 0 0; }
.wu-lib-top > .wu-bkc-awardcard { grid-area: card; }
@media (min-width: 700px) {
  .wu-lib-top {
    grid-template-columns: minmax(0, 1.5fr) minmax(240px, 1fr);
    grid-template-areas: "h1 h2" "row card";
    column-gap: var(--space-md);
    align-items: stretch;
  }
  .wu-lib-top-h2 { margin: 0; }
  /* the card runs from the covers' top to their bottom, content centred */
  .wu-lib-top > .wu-bkc-awardcard { justify-content: center; }
}
.wu-bkc-awardcard {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-card, 16px);
  background: color-mix(in srgb, var(--colour-brand) 14%, var(--colour-surface));
}
.wu-bkc-awardcard .wu-set-heading { margin: 0; }
.wu-bkc-awardcard .wu-bkc-award-ic { width: 56px; height: 56px; }
.wu-bkc-awardcard .wu-bkc-award { font-size: var(--font-size-md); }
.wu-bkc-awrow { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px 6px; }
.wu-bkc-awmini { display: block; aspect-ratio: 1; filter: grayscale(1); opacity: 0.35; }
.wu-bkc-awmini svg { display: block; width: 100%; height: 100%; }
.wu-bkc-awmini-got { filter: none; opacity: 1; }
.wu-bkc-item { flex: 0 0 82px; }
.wu-bkc-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-height: 88px;
  padding: 6px 4px;
  border: 1px solid var(--colour-border);
  border-radius: var(--radius-button);
  background: var(--colour-surface);
  color: var(--colour-text-primary);
  font-size: var(--font-size-sm);
  line-height: 1.15;
  text-align: center;
}
.wu-bkc-item small { color: var(--colour-text-secondary); font-size: 11px; }
.wu-bkc-item-ic { display: flex; align-items: flex-end; justify-content: center; width: 40px; height: 40px; }
.wu-bkc-item-ic svg { width: 100%; height: 100%; }
.wu-bkc-swatch { display: block; width: 34px; height: 24px; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15); }
.wu-bkc-locked { opacity: 0.55; }
.wu-bkc-picked { border-color: var(--colour-brand-deep); background: color-mix(in srgb, var(--colour-brand) 20%, var(--colour-surface)); }

/* ── The cover workshop (#426, #428): title position + colour as one compact
   row under the title, and pickers packed so a tablet needs no scroll. */
.wu-lib-titlectl { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; }
.wu-lib-titlepos { display: inline-flex; border: 1px solid var(--colour-border); border-radius: 999px; overflow: hidden; }
.wu-lib-posbtn { min-height: 36px; padding: 0 12px; border: 0; background: var(--colour-surface); color: var(--colour-text-primary); font-size: var(--font-size-sm); cursor: pointer; }
.wu-lib-posbtn + .wu-lib-posbtn { border-left: 1px solid var(--colour-border); }
.wu-lib-posbtn.wu-lib-on { background: var(--colour-brand); font-weight: var(--font-weight-bold); }
.wu-lib-titleink { display: inline-flex; gap: 6px; }
.wu-lib-inkdot { width: 30px; height: 30px; padding: 0; border-radius: 50%; border: 2px solid var(--colour-surface); box-shadow: 0 0 0 1px var(--colour-border); cursor: pointer; }
.wu-lib-inkdot.wu-lib-on { box-shadow: 0 0 0 3px var(--colour-text-primary); }
@media (min-width: 561px) {
  .wu-lib-sheet .wu-lib-swatches { grid-template-columns: repeat(10, 1fr); }
  .wu-lib-sheet .wu-lib-swatch { height: 36px; min-width: 0; }
  .wu-lib-sheet .wu-lib-motif { height: 40px; }
  .wu-lib-sheet .wu-lib-patterns { grid-template-columns: repeat(8, 1fr); }
  .wu-lib-sheet .wu-lib-patterns .wu-cal-tab { min-height: 34px; padding: 0 2px; font-size: var(--font-size-sm); }
  .wu-lib-sheet .wu-set-heading { margin: var(--space-xs) 0 4px; }
}
@media (prefers-reduced-motion: reduce) {
  .wu-bkc-moving { animation: none; }
  .wu-bkc-book { transition: none; }
}
/* The library uses the screen (owner: "its about utilising the screen
   effectively"): the settings-width column (560px) left a tablet's bookcase
   tiny, so the page widens like the dashboard does. */
.wu-set-list.wu-lib { width: min(940px, 100%); }
/* Tighter to the bar (owner 2026-11-29: "check the padding on the main page.
   can be tighter to the top bar"): the header row is empty here (its ✕ is the
   bar's, the book count left in #427), so it goes, and the list pads less. */
.wu-drill-layer:has(.wu-lib) .wu-drill-head { display: none; }
.wu-set-list.wu-lib { padding-top: var(--space-xs); }
