/* Components — per-component styles (calendar cells, bars, cards, buttons). */

/* ── Calendar grid ───────────────────────────────────────── */

.wu-calendar {
  display: grid;
  grid-template-columns: minmax(230px, 1fr) minmax(0, 1.5fr);
  grid-template-areas:
    "head head"
    "grid panel";
  column-gap: var(--space-sm);
  align-items: start;
  min-height: 0;
}
.wu-cal-head { grid-area: head; }
.wu-cal-grid { grid-area: grid; }
.wu-cal-panel { grid-area: panel; }

/* Stack again on phones — details below the grid */
@media (max-width: 720px) {
  .wu-calendar {
    grid-template-columns: 1fr;
    grid-template-areas: "head" "grid" "panel";
  }
}

.wu-cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-sm) var(--space-md);
  border-bottom: 1px solid var(--colour-border);
  margin-right: 28px; /* clear room for the floating close X */
}

.wu-cal-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.04em;
  color: var(--colour-text-primary);
}

.wu-cal-nav {
  background: transparent;
  border: 1px solid var(--colour-border);
  color: var(--colour-text-secondary);
  border-radius: var(--radius-button);
  width: 32px;
  height: 32px;
  cursor: pointer;
  font-size: var(--font-size-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
/* "📍 This week" — wider text variant of the nav button, shown only while
   browsing another month */
.wu-cal-nav.wu-cal-thisweek {
  width: auto;
  padding: 0 10px;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  white-space: nowrap;
}
.wu-cal-nav:hover {
  color: var(--colour-text-primary);
  border-color: var(--colour-text-secondary);
}

.wu-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
  padding: var(--space-sm) var(--space-md) var(--space-md);
}

.wu-cal-dayname {
  text-align: center;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--colour-text-secondary);
  padding-bottom: var(--space-xs);
  font-family: var(--font-mono);
}

.wu-cal-cell {
  aspect-ratio: 4 / 5; /* taller than wide — room for day + icon on top, bars below */
  min-height: 58px;
  background: var(--colour-surface);
  border: 1px solid var(--colour-border);
  border-radius: var(--radius-cell);
  padding: 5px 5px 4px;
  position: relative;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  font-family: inherit;
  text-align: left;
  color: inherit;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
  overflow: hidden;
}

.wu-cal-cell:hover:not(.wu-cal-out) {
  transform: translateY(-1px);
  border-color: var(--colour-text-secondary);
}

.wu-cal-cell.wu-cal-out {
  opacity: 0.35;
  cursor: default;
}

.wu-cal-cell.wu-cal-today {
  border-color: var(--colour-accent);
  border-width: 2px;
  padding: calc(var(--space-xs) - 1px);
}

.wu-cal-cell.wu-cal-week-complete {
  background: color-mix(in srgb, var(--colour-success) 14%, var(--colour-surface));
  border-color: color-mix(in srgb, var(--colour-success) 45%, var(--colour-border));
}

.wu-cal-cell.wu-cal-week-partial {
  background: color-mix(in srgb, var(--colour-warning) 8%, var(--colour-surface));
}

.wu-cal-cell.wu-cal-today.wu-cal-week-complete,
.wu-cal-cell.wu-cal-today.wu-cal-week-partial {
  border-color: var(--colour-accent);
}

.wu-cal-daynum {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: var(--font-weight-medium);
  color: var(--colour-text-secondary);
  line-height: 1;
}

.wu-cal-cell.wu-cal-today .wu-cal-daynum {
  color: var(--colour-accent);
  font-weight: var(--font-weight-bold);
}

.wu-cal-cell.wu-cal-week-complete .wu-cal-daynum {
  color: var(--colour-success);
}

/* Top row: day number (left) + markers (right) on one flow line, so they can
   never overlap the number however small the cell gets. */
.wu-cal-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2px;
}

/* Day-cell markers: submission-day icons (🎒 homework / 📖 reading diary) and
   the streak badge (🔥 18 / 🚀 36 on completion day) */
.wu-cal-marks {
  display: flex;
  gap: 2px;
  font-size: 11px;
  line-height: 1;
  flex: none;
}

.wu-cal-marks .wu-cal-streak {
  font-size: 13px;
}

/* Stacked activity bars flow below the day row (margin-top:auto sits them at
   the bottom) so they never cut into the day number. */
.wu-cal-bars {
  margin-top: auto;
  padding-top: 3px;
  display: flex;
  flex-direction: column;
  gap: 1px;
  pointer-events: none;
}

.wu-cal-bar {
  height: 3px;
  border-radius: 1.5px;
  display: block;
}

.wu-cal-overflow {
  align-self: flex-end;
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: var(--font-weight-bold);
  color: var(--colour-text-secondary);
  line-height: 1;
  margin-top: 1px;
  letter-spacing: -0.02em;
}

.wu-cal-cell.wu-cal-out .wu-cal-bars {
  opacity: 0.6;
}

.wu-cal-cell.wu-cal-selected {
  border-color: var(--colour-accent);
  border-width: 2px;
  padding: calc(var(--space-xs) - 1px) 4px 3px;
}

/* ── Calendar summary panel ──────────────────────────────── */

.wu-cal-panel {
  border-left: 1px solid var(--colour-border);
  align-self: stretch;
}

@media (max-width: 720px) {
  .wu-cal-panel {
    border-left: none;
    border-top: 1px solid var(--colour-border);
  }
}

.wu-cal-tabs {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md) 0;
}

.wu-cal-tab {
  font-family: var(--font-body);
  font-size: var(--font-size-xs);
  letter-spacing: 0.04em;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--colour-border);
  background: transparent;
  color: var(--colour-text-secondary);
  cursor: pointer;
}

.wu-cal-tab:hover { color: var(--colour-text-primary); }

.wu-cal-tab-active {
  border-color: var(--colour-accent);
  color: var(--colour-accent);
  background: color-mix(in srgb, var(--colour-accent) 10%, var(--colour-surface));
}

.wu-cal-tab-day {
  cursor: default;
  font-family: var(--font-mono);
}

.wu-cal-panel-body {
  max-height: min(56vh, 420px);
  overflow-y: auto;
  padding: var(--space-sm) var(--space-md) var(--space-md);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.wu-cal-entry {
  display: flex;
  align-items: baseline;
  gap: var(--space-sm);
  font-size: var(--font-size-sm);
}

.wu-cal-entry-icon { flex: none; }

.wu-cal-entry-icon-img {
  width: 16px;
  height: 16px;
  object-fit: contain;
  vertical-align: -2px;
}

.wu-cal-entry-text {
  flex: 1;
  color: var(--colour-text-primary);
  line-height: var(--line-height-normal);
}

.wu-cal-entry-meta {
  font-family: var(--font-mono);
  font-size: var(--font-size-xs);
  color: var(--colour-text-secondary);
  white-space: nowrap;
}

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

/* ── Maths drill ─────────────────────────────────────────── */

.wu-drill-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-lg);
  background: var(--colour-surface);
}

.wu-drill-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 560px;
}

/* Native shell only: the system-info pill (battery/clock, ~32dp inset) overlays
   the top of the screen and lands on the full-screen drill header's title +
   timer. Push the header (and the running-timer overlay card) clear of it. */
.wu-native .wu-drill-head {
  margin-top: 44px;
}
.wu-native .wu-timer-overlay {
  padding-top: 44px;
}

.wu-drill-quit {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid var(--colour-border);
  color: var(--colour-text-secondary);
  cursor: pointer;
  font-size: var(--font-size-md);
}
.wu-drill-quit:hover {
  color: var(--colour-text-primary);
  border-color: var(--colour-danger);
}

.wu-drill-progress {
  font-family: var(--font-mono);
  font-size: var(--font-size-sm);
  color: var(--colour-text-secondary);
  letter-spacing: 0.08em;
}

.wu-drill-timer {
  font-family: var(--font-mono);
  font-size: var(--font-size-md);
  color: var(--colour-accent);
  min-width: 56px;
  text-align: right;
}

.wu-drill-timer.wu-timer-low {
  color: var(--colour-danger);
  font-weight: var(--font-weight-bold);
}

.wu-drill-q {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  font-family: var(--font-display);
  font-weight: var(--font-weight-bold);
  font-size: clamp(2rem, 6vw, 3.25rem);
  color: var(--colour-text-primary);
  text-align: center;
  min-height: 0;
}

.wu-q-written {
  font-size: clamp(1.1rem, 3vw, 1.6rem);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-loose);
  max-width: 28ch;
  margin: 0;
}

.wu-q-small {
  font-size: var(--font-size-lg);
  color: var(--colour-text-secondary);
  margin: 0;
}

.wu-dots {
  display: flex;
  gap: var(--space-md);
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  max-width: 480px;
}

.wu-dots-op {
  font-size: var(--font-size-2xl);
  color: var(--colour-text-secondary);
}

.wu-dot-group {
  display: grid;
  grid-template-columns: repeat(3, 16px);
  gap: 5px;
  padding: var(--space-sm);
  border: 1px dashed var(--colour-border);
  border-radius: var(--radius-button);
}

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

.wu-dot.wu-dot-cross {
  background: var(--colour-danger);
  opacity: 0.35;
}

.wu-dots-hint {
  font-size: var(--font-size-sm);
  color: var(--colour-text-secondary);
  font-family: var(--font-body);
  font-weight: var(--font-weight-regular);
  margin: 0;
}

.wu-drill-feedback {
  height: 36px;
  font-family: var(--font-display);
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
}
.wu-fb-right { color: var(--colour-success); }
.wu-fb-wrong { color: var(--colour-danger); }

.wu-drill-answer {
  font-family: var(--font-mono);
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  color: var(--colour-accent);
  min-height: 44px;
  letter-spacing: 0.1em;
}

.wu-numpad {
  display: grid;
  grid-template-columns: repeat(3, 84px);
  gap: var(--space-sm);
  justify-content: center;
  /* Lift off the screen bottom so the drill reads more centred / higher */
  margin-bottom: 12vh;
  padding-bottom: var(--space-md);
}

.wu-numpad button {
  height: 66px;
  font-family: var(--font-mono);
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  background: var(--colour-bg);
  color: var(--colour-text-primary);
  border: 1px solid var(--colour-border);
  border-radius: var(--radius-button);
  cursor: pointer;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

.wu-numpad button:hover {
  border-color: var(--colour-accent);
}

.wu-numpad button:active {
  background: color-mix(in srgb, var(--colour-accent) 18%, var(--colour-bg));
}

.wu-numpad .wu-numpad-enter {
  background: color-mix(in srgb, var(--colour-success) 22%, var(--colour-bg));
  border-color: var(--colour-success);
  color: var(--colour-success);
}

/* ── Vocab — flashcards ──────────────────────────────────── */

.wu-fc-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-lg);
  width: 100%;
  min-height: 0;
}

.wu-flashcard {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  background: var(--colour-bg);
  border: 1px solid var(--colour-border);
  border-radius: var(--radius-card);
  padding: var(--space-xl) var(--space-2xl);
  width: min(480px, 100%);
}

.wu-fc-lang {
  font-size: var(--font-size-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--colour-text-secondary);
  margin: 0;
}

.wu-fc-word,
.wu-fc-translation {
  font-family: var(--font-display);
  font-weight: var(--font-weight-bold);
  font-size: clamp(1.75rem, 5vw, 2.75rem);
  line-height: var(--line-height-tight);
  text-align: center;
}

.wu-fc-translation {
  color: var(--colour-accent);
}

.wu-fc-translation.wu-fc-veiled {
  visibility: hidden;
}

/* Word + 🔊 speak button on one row */
.wu-fc-wordrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
}

.wu-fc-say {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
  padding: 4px;
  opacity: 0.65;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.wu-fc-say:hover {
  opacity: 1;
  transform: scale(1.1);
}

.wu-fc-divider {
  width: 60%;
  border: none;
  border-top: 1px solid var(--colour-border);
  margin: var(--space-sm) 0;
}

.wu-fc-controls {
  display: flex;
  gap: var(--space-md);
  min-height: 56px;
}

.wu-fc-btn {
  padding: var(--space-md) var(--space-xl);
  font-family: var(--font-display);
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-bold);
  background: var(--colour-bg);
  color: var(--colour-text-primary);
  border: 1px solid var(--colour-border);
  border-radius: var(--radius-button);
  cursor: pointer;
  min-height: var(--tap-target-min);
}

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

.wu-fc-yes {
  background: color-mix(in srgb, var(--colour-success) 22%, var(--colour-bg));
  border-color: var(--colour-success);
  color: var(--colour-success);
}

.wu-fc-no {
  background: color-mix(in srgb, var(--colour-danger) 16%, var(--colour-bg));
  border-color: var(--colour-danger);
  color: var(--colour-danger);
}

/* ── Vocab — matching ────────────────────────────────────── */

.wu-match-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 0;
}

.wu-match-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md) var(--space-xl);
  width: min(560px, 100%);
}

.wu-match-col {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.wu-match-btn {
  padding: var(--space-md);
  font-family: var(--font-body);
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  background: var(--colour-bg);
  color: var(--colour-text-primary);
  border: 1px solid var(--colour-border);
  border-radius: var(--radius-button);
  cursor: pointer;
  min-height: var(--tap-target-min);
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

.wu-match-btn:hover { border-color: var(--colour-text-secondary); }

.wu-match-btn.wu-selected {
  border-color: var(--colour-accent);
  background: color-mix(in srgb, var(--colour-accent) 18%, var(--colour-bg));
}

.wu-match-btn.wu-matched {
  border-color: var(--colour-success);
  background: color-mix(in srgb, var(--colour-success) 14%, var(--colour-bg));
  color: var(--colour-success);
  pointer-events: none;
  opacity: 0.75;
}

.wu-match-btn.wu-mismatch {
  border-color: var(--colour-danger);
  animation: wu-shake 300ms ease;
}

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

/* ── Verbs — tap-the-form conjugation drill ──────────────── */
.wu-verb-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-xl);
  width: 100%;
  min-height: 0;
}

.wu-verb-prompt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
  text-align: center;
}

.wu-verb-emoji {
  font-size: 2.5rem;
  line-height: 1;
}

.wu-verb-inf {
  font-family: var(--font-display);
  font-weight: var(--font-weight-bold);
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  color: var(--colour-text-primary);
}

.wu-verb-inf-tgt {
  color: var(--colour-accent);
}

.wu-verb-person {
  font-family: var(--font-body);
  font-size: var(--font-size-lg);
  color: var(--colour-text-secondary);
  text-transform: capitalize;
}

.wu-verb-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  width: min(440px, 90%);
}

/* Verb language sheet (decision #64) — two rows of flag pills: the learning
   language and the child-picked hint (gloss) language. */
.wu-lang-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.wu-lang-opt {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: var(--space-sm) var(--space-md);
  border: 2px solid var(--colour-border);
  border-radius: var(--radius-pill);
  background: var(--colour-surface);
  font-family: var(--font-display);
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-sm);
  color: var(--colour-text-primary);
  cursor: pointer;
}

.wu-lang-opt.wu-lang-on {
  border-color: var(--colour-accent);
  background: color-mix(in srgb, var(--colour-accent) 12%, var(--colour-surface));
}

.wu-verb-opt {
  padding: var(--space-md);
  font-family: var(--font-body);
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  background: var(--colour-surface);
  color: var(--colour-text-primary);
  border: 1px solid var(--colour-border);
  border-radius: var(--radius-button);
  cursor: pointer;
  min-height: var(--tap-target-min);
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

.wu-verb-opt:hover { border-color: var(--colour-accent); }

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

.wu-verb-opt.wu-verb-wrong {
  border-color: var(--colour-danger);
  color: var(--colour-danger);
  animation: wu-shake 300ms ease;
  opacity: 0.6;
}

/* Verb conjugation table (study/overview) */
.wu-verb-table {
  flex: 1;
  width: min(720px, 100%);
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-md);
  min-height: 0;
}
.wu-vt-head {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}
.wu-vt-inf {
  font-family: var(--font-display);
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  color: var(--colour-text-primary);
}
.wu-vt-inf small { color: var(--colour-text-secondary); font-weight: normal; }
/* Three-tense grid: pronoun column + Now / Before / Soon */
.wu-vt-grid {
  display: grid;
  grid-template-columns: auto repeat(3, 1fr);
  gap: var(--space-sm);
  align-items: stretch;
}
.wu-vt-col {
  font-family: var(--font-display);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  color: var(--colour-text-secondary);
  text-align: center;
  padding: 2px 0;
}
.wu-vt-pron {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: var(--space-sm);
  color: var(--colour-text-secondary);
  font-size: var(--font-size-md);
  white-space: nowrap;
}
.wu-vt-cell {
  padding: var(--space-md) var(--space-sm);
  background: var(--colour-bg);
  border: 1px solid var(--colour-border);
  border-radius: var(--radius-button);
  color: var(--colour-text-primary);
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-medium);
  cursor: pointer;
  text-align: center;
  min-width: 0;
  min-height: var(--tap-target-min);
  overflow-wrap: anywhere;
}
.wu-vt-cell:hover { border-color: var(--colour-accent); }
.wu-vt-nav {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  margin-top: var(--space-md);
}
.wu-vt-btn {
  padding: var(--space-sm) var(--space-lg);
  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-weight: var(--font-weight-bold);
  cursor: pointer;
}
.wu-vt-btn:hover { border-color: var(--colour-accent); }

/* Fill-the-gap sentence */
.wu-fill-sentence {
  font-family: var(--font-display);
  font-size: var(--font-size-xl);
  text-align: center;
  color: var(--colour-text-primary);
  line-height: var(--line-height-relaxed, 1.5);
  padding: 0 var(--space-md);
}
.wu-fill-blank {
  color: var(--colour-accent);
  letter-spacing: 0.05em;
}

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

.wu-sheet-backdrop,
.wu-timer-overlay {
  position: fixed;
  inset: 0;
  z-index: 400;
  background: color-mix(in srgb, var(--colour-text-primary) 32%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.wu-sheet {
  position: relative;
  background: var(--colour-surface);
  border: 1px solid var(--colour-border);
  border-radius: var(--radius-card);
  padding: var(--space-xl);
  width: min(420px, calc(100% - var(--space-2xl)));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.18);
}

.wu-sheet-icon {
  font-size: 40px;
  line-height: 1;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

.wu-sheet-cancel {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--colour-text-secondary);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}

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

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

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

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

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

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

.wu-pin-card {
  max-width: 320px;
}

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

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

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

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

.wu-pin-pad {
  grid-template-columns: repeat(3, 64px);
  padding-bottom: 0;
}

.wu-pin-pad button {
  height: 52px;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

.wu-link-del {
  flex: none;
  border: none;
  background: none;
  color: var(--colour-danger);
  font-size: 18px;
  cursor: pointer;
  padding: var(--space-xs);
  border-radius: var(--radius-pill);
}

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

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

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

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

.wu-confirm-yes,
.wu-confirm-no {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-bold);
  flex: none;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

/* ── Games category (decision #66) ──────────────────────── */
/* Not-yet-built games in the launcher flower read as clearly greyed-out. */
.wu-hex-wrap.wu-game-soon { opacity: 0.5; filter: grayscale(1); }
.wu-hex-wrap.wu-game-soon .wu-hex-hit { cursor: default; }

/* Pre-game difficulty picker (shared, difficulty.js) — one coloured card per
   level, showing its best. Keeps the in-game UI clean. */
.wu-diff-select {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  padding: var(--space-lg);
  text-align: center;
}
.wu-diff-title {
  font-family: var(--font-display);
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}
.wu-diff-ic { font-size: 1.3em; }
.wu-diff-sub { color: var(--colour-text-secondary); }
.wu-diff-cards {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  width: min(320px, 92%);
}
.wu-diff-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) var(--space-lg);
  border: 2px solid var(--dc);
  border-left-width: 8px;
  border-radius: var(--radius-card);
  background: color-mix(in srgb, var(--dc) 10%, var(--colour-surface));
  cursor: pointer;
  font-family: var(--font-display);
  transition: transform 120ms ease, background 120ms ease;
}
.wu-diff-card:hover {
  background: color-mix(in srgb, var(--dc) 18%, var(--colour-surface));
  transform: translateY(-2px);
}
.wu-diff-name { font-size: var(--font-size-lg); font-weight: var(--font-weight-bold); color: var(--dc); }
.wu-diff-best { font-family: var(--font-mono); color: var(--colour-text-secondary); }

/* Hex Memory — a hex FLOWER (brand centre + card ring) in the drill-layer.
   Reuses the honeycomb; these rules restyle the card tiles for the flip states. */
.wu-mem-flower {
  flex: 1;
  position: relative;
  width: 100%;
  min-height: 0;
}
/* Flower size scales with difficulty: fewer rows → bigger hexes; the divisor
   tracks the row count so each tier fits under the header + difficulty bar.
   --hex-h + --hex-gap MUST be re-declared with --hex-w — a var() inside a custom
   property resolves where it's DECLARED (:root), so overriding --hex-w alone
   leaves --hex-h at the root height and the flower geometry breaks. */
.wu-mem-flower[data-size="easy"] {
  --hex-w: clamp(62px, calc((100vh - 230px) / 4.6), 132px);
  --hex-h: calc(var(--hex-w) * 1.1547);
  --hex-gap: 5px;
}
.wu-mem-flower[data-size="medium"] {
  --hex-w: clamp(44px, calc((100vh - 230px) / 6.6), 112px);
  --hex-h: calc(var(--hex-w) * 1.1547);
  --hex-gap: 5px;
}
.wu-mem-flower[data-size="hard"] {
  --hex-w: clamp(30px, calc((100vh - 230px) / 8.6), 82px);
  --hex-h: calc(var(--hex-w) * 1.1547);
  --hex-gap: 4px;
}
/* Cards use the SAME faint look as the main flower (the default honeycomb
   pending style — soft outline + ~8% fill over the ghost grid) so the games read
   as one family; only the special states override. Face-down vs face-up differ
   only by the glyph (❔ / emoji); a matched pair goes white. */
.wu-mem-flower .wu-hex-wrap:not(.wu-brand-tile) .wu-hex-label { display: none; }
.wu-mem-flower .wu-hex-icon { color: var(--colour-text-primary); }
.wu-mem-flower .wu-mem-matched .wu-hex::before { background: color-mix(in srgb, var(--colour-border) 70%, #fff); }
.wu-mem-flower .wu-mem-matched .wu-hex::after  { background: #fff; }
.wu-mem-flower .wu-mem-matched .wu-hex-icon    { opacity: 0.4; }

/* Shared game status line (Copy / Survivor shells) + the pop-blast keyframe
   every game's hit/merge feedback reuses. (Named after the retired Pop-up game,
   kept for the shared feedback language.) */
.wu-pop-status {
  text-align: center;
  font-family: var(--font-display);
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-md);
  min-height: 1.5em;
  color: var(--colour-text-secondary);
  padding-bottom: var(--space-xs);
}
@keyframes wu-pop-blast { 0% { transform: scale(1); } 45% { transform: scale(1.15); } 100% { transform: scale(1.06); } }

/* Copy the Flower — a pattern flashes, the child repaints it from memory.
   (Replaced Pop-up — Survivor covered the same reflex loop better.) */
.wu-cpy-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  min-height: 48px;
  padding-bottom: var(--space-xs);
}
.wu-cpy-chip {
  width: 38px;
  height: 44px;
  border: none;
  padding: 0;
  cursor: pointer;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  opacity: 0.55;
  transition: opacity 160ms ease, transform 160ms ease;
}
.wu-cpy-chip-sel {
  opacity: 1;
  transform: scale(1.18);
}
.wu-cpy-check { margin-left: var(--space-md); }
.wu-cpy-flower {
  flex: 1;
  position: relative;
  width: 100%;
  min-height: 0;
}
/* Size scales with difficulty (re-declare --hex-h/--hex-gap alongside --hex-w).
   easy [3,4,3] 3 rows / medium [3,4,5,4,3] 5 rows / hard [4,5,6,7,6,5,4] 7 rows.
   Offset 300 leaves room for the header + status + palette bar. */
.wu-cpy-flower[data-size="easy"] {
  --hex-w: clamp(56px, calc((100vh - 300px) / 4.6), 120px);
  --hex-h: calc(var(--hex-w) * 1.1547);
  --hex-gap: 5px;
}
.wu-cpy-flower[data-size="medium"] {
  --hex-w: clamp(44px, calc((100vh - 300px) / 6.6), 108px);
  --hex-h: calc(var(--hex-w) * 1.1547);
  --hex-gap: 5px;
}
.wu-cpy-flower[data-size="hard"] {
  --hex-w: clamp(30px, calc((100vh - 300px) / 8.6), 82px);
  --hex-h: calc(var(--hex-w) * 1.1547);
  --hex-gap: 4px;
}
.wu-cpy-flower .wu-hex-label { display: none; }
.wu-cpy-flower .wu-hex-icon { font-size: calc(var(--hex-w) * 0.44); }
/* Painted / shown-pattern cell — full colour, like a confirmed home tile. */
.wu-cpy-flower .wu-cpy-on .wu-hex::before { background: var(--tile-color); }
.wu-cpy-flower .wu-cpy-on .wu-hex::after  { background: color-mix(in srgb, var(--tile-color) 55%, var(--colour-surface)); }
/* Locked-in correct cell — solid, with a gentle settle pop. */
.wu-cpy-flower .wu-cpy-lock .wu-hex::after { background: var(--tile-color); }
.wu-cpy-flower .wu-cpy-lock .wu-hex { animation: wu-pop-blast 260ms ease; }
/* Wrong paint — red flash + shake before it clears. */
.wu-cpy-flower .wu-cpy-wrong .wu-hex::before { background: var(--colour-danger); }
.wu-cpy-flower .wu-cpy-wrong .wu-hex { animation: wu-srv-shake 450ms ease; }
/* Level-start button — the boot-splash mark: amber hex + spinning white ★. */
.wu-cpy-flower .wu-cpy-go .wu-hex::before { background: var(--colour-brand-deep); }
.wu-cpy-flower .wu-cpy-go .wu-hex::after  { background: var(--colour-brand); }
.wu-cpy-flower .wu-cpy-go .wu-hex-icon {
  color: #fff;
  animation: wu-boot-spin 2.4s ease-in-out infinite;
}

/* Honey Harvest — SameGame on a fixed 37-cell board (replaced Flow). Honey
   cells fill their colour; tap a group of 2+ to harvest, singles just shake. */
.wu-hvt-flower {
  flex: 1;
  position: relative;
  width: 100%;
  min-height: 0;
  --hex-w: clamp(30px, calc((100vh - 260px) / 8.6), 82px);
  --hex-h: calc(var(--hex-w) * 1.1547);
  --hex-gap: 4px;
}
.wu-hvt-flower .wu-hex-label { display: none; }
.wu-hvt-flower .wu-hvt-on .wu-hex::before { background: var(--tile-color); }
.wu-hvt-flower .wu-hvt-on .wu-hex::after  { background: color-mix(in srgb, var(--tile-color) 55%, var(--colour-surface)); }
.wu-hvt-flower .wu-hvt-pop .wu-hex { animation: wu-pop-blast 260ms ease; z-index: 3; }
.wu-hvt-flower .wu-hvt-no .wu-hex { animation: wu-srv-shake 400ms ease; }
/* 💥 Bee bomb — forged by a 5+ harvest; solid brand amber, pulsing glyph. */
.wu-hvt-flower .wu-hvt-bomb .wu-hex::before { background: var(--colour-brand-deep); }
.wu-hvt-flower .wu-hvt-bomb .wu-hex::after  { background: var(--colour-brand); }
.wu-hvt-flower .wu-hvt-bomb .wu-hex-icon {
  font-size: calc(var(--hex-w) * 0.34);
  animation: wu-stk-pulse 1100ms ease infinite;
}

/* 2048 Hex — merge game, swipe in 6 directions. No difficulty levels — one
   fixed 19-cell board; the challenge is the endless top-score climb. */
.wu-g2048-status {
  text-align: center;
  font-family: var(--font-display);
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-md);
  min-height: 1.5em;
  color: var(--colour-text-secondary);
  padding-bottom: var(--space-xs);
}
.wu-g2048-flower {
  flex: 1;
  position: relative;
  width: 100%;
  min-height: 0;
  touch-action: none; /* the board is a swipe surface — never scroll */
  /* Fixed 19-cell board (5 rows) — re-declare --hex-h/--hex-gap with --hex-w. */
  --hex-w: clamp(44px, calc((100vh - 260px) / 6.6), 108px);
  --hex-h: calc(var(--hex-w) * 1.1547);
  --hex-gap: 5px;
}
.wu-g2048-flower .wu-hex-label { display: none; }
/* Numbers in mono, dark on the light fill; big values (≥128) go solid + white. */
.wu-g2048-flower .wu-hex-icon {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--colour-text-primary);
}
.wu-g2048-flower .wu-g2048-on .wu-hex::before { background: var(--tile-color); }
.wu-g2048-flower .wu-g2048-on .wu-hex::after  { background: color-mix(in srgb, var(--tile-color) 40%, var(--colour-surface)); }
.wu-g2048-flower .wu-g2048-hi .wu-hex::after  { background: var(--tile-color); }
.wu-g2048-flower .wu-g2048-hi .wu-hex-icon    { color: #fff; }
.wu-g2048-flower .wu-g2048-pop .wu-hex { animation: wu-pop-blast 250ms ease; z-index: 3; }
.wu-g2048-flower .wu-g2048-new .wu-hex { animation: wu-g2048-in 220ms ease; }
@keyframes wu-g2048-in { from { transform: scale(0.55); opacity: 0.3; } to { transform: scale(1); opacity: 1; } }

/* Games layer — sits on the PANE tone, not the white drill surface. The home
   flower lives on --colour-grid-bg, so the ghost lattice blends into it; on
   white the same lattice has more contrast and the whole board reads darker
   than the main flower. Matching the backdrop restores the home look.
   touch-action none: no pinch or pan may START on a game surface — zooming
   mid-game compromised tap accuracy (owner report 2026-07-12). */
.wu-game-layer { background: var(--colour-grid-bg); }
.wu-game-layer .wu-mem-flower,
.wu-game-layer .wu-cpy-flower,
.wu-game-layer .wu-hvt-flower,
.wu-game-layer .wu-g2048-flower,
.wu-game-layer .wu-stk-flower,
.wu-game-layer .wu-srv-flower { touch-action: none; }

/* Stack / Hexa-sort — place colour piles, matching neighbours hop together,
   10 bursts. Fixed 19-cell board; hard mode adds TWO-LAYER pieces rendered as a
   split hex (top half = top layer, bottom half = the hidden layer beneath). */
.wu-stk-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  min-height: 56px;
  padding-bottom: var(--space-xs);
  font-family: var(--font-display);
  font-weight: var(--font-weight-bold);
  color: var(--colour-text-secondary);
}
.wu-stk-lbl-next { opacity: 0.7; margin-left: var(--space-md); }
.wu-stk-mini {
  width: 42px;
  height: 48px;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-evenly;
  color: #fff;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 15px;
  line-height: 1;
}
.wu-stk-piece-sm .wu-stk-mini {
  width: 30px;
  height: 35px;
  font-size: 11px;
  opacity: 0.75;
}
/* Colour → times-table legend (owner design: each colour is a different table). */
.wu-stk-legend {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding-bottom: var(--space-xs);
}
.wu-stk-key {
  width: 42px;
  height: 48px;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 12px;
  line-height: 1.15;
}
.wu-stk-key-t { font-size: 10px; opacity: 0.85; }
/* Tiny table tag under a pile's count. */
.wu-stk-tb {
  font-family: var(--font-mono);
  font-weight: 700;
  line-height: 1;
  color: var(--colour-text-secondary);
  font-size: calc(var(--hex-w) * 0.14);
}
.wu-stk-flower {
  flex: 1;
  position: relative;
  width: 100%;
  min-height: 0;
  /* Fixed 19-cell board (5 rows) — re-declare --hex-h/--hex-gap with --hex-w.
     Offset 340 leaves room for header + piece bar + legend + status line. */
  --hex-w: clamp(44px, calc((100vh - 340px) / 6.6), 108px);
  --hex-h: calc(var(--hex-w) * 1.1547);
  --hex-gap: 5px;
}
.wu-stk-flower .wu-hex-label { display: none; }
.wu-stk-flower .wu-hex-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.wu-stk-flower .wu-stk-dual .wu-hex-inner { justify-content: space-around; }
.wu-stk-n {
  font-family: var(--font-mono);
  font-weight: 700;
  line-height: 1;
  color: var(--colour-text-primary);
  font-size: calc(var(--hex-w) * 0.28);
}
.wu-stk-half { font-size: calc(var(--hex-w) * 0.22); }
/* Single-colour pile — the shared soft fill; outline carries the pile colour. */
.wu-stk-flower .wu-stk-on .wu-hex::before { background: var(--tile-color); }
.wu-stk-flower .wu-stk-on .wu-hex::after  { background: color-mix(in srgb, var(--tile-color) 45%, var(--colour-surface)); }
/* Two-layer pile — split surface: top half = top layer, bottom half = hidden layer. */
.wu-stk-flower .wu-stk-dual .wu-hex::after {
  background: linear-gradient(
    to bottom,
    color-mix(in srgb, var(--tile-color) 45%, var(--colour-surface)) 0 50%,
    color-mix(in srgb, var(--tile-color-2) 45%, var(--colour-surface)) 50% 100%
  );
}
/* Frozen pile — overshot its target; dead ice until a neighbouring burst
   shatters it. */
.wu-stk-flower .wu-stk-frozen .wu-hex::before { background: #90A4AE; }
.wu-stk-flower .wu-stk-frozen .wu-hex::after  { background: color-mix(in srgb, #90A4AE 25%, var(--colour-surface)); }
.wu-stk-ice { font-size: calc(var(--hex-w) * 0.34); line-height: 1; opacity: 0.9; }
/* Nearly full (3 from bursting) — the count pulses as a "so close!" cue. */
.wu-stk-flower .wu-stk-hot .wu-stk-n:first-child { animation: wu-stk-pulse 900ms ease infinite; }
@keyframes wu-stk-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.25); } }
.wu-stk-flower .wu-stk-pop .wu-hex { animation: wu-pop-blast 260ms ease; z-index: 3; }

/* Survivor — defend the centre ★; bugs march inward, tap to squash. */
.wu-srv-flower {
  flex: 1;
  position: relative;
  width: 100%;
  min-height: 0;
}
/* The flower GROWS with wave progression: s1 19 cells (waves 1–5) / s2 37
   (6–10) / s3 61 (11+) — re-declare --hex-h/--hex-gap alongside --hex-w. */
.wu-srv-flower[data-size="s1"] {
  --hex-w: clamp(44px, calc((100vh - 260px) / 6.6), 108px);
  --hex-h: calc(var(--hex-w) * 1.1547);
  --hex-gap: 5px;
}
.wu-srv-flower[data-size="s2"] {
  --hex-w: clamp(30px, calc((100vh - 260px) / 8.6), 82px);
  --hex-h: calc(var(--hex-w) * 1.1547);
  --hex-gap: 4px;
}
.wu-srv-flower[data-size="s3"] {
  --hex-w: clamp(24px, calc((100vh - 260px) / 10.6), 64px);
  --hex-h: calc(var(--hex-w) * 1.1547);
  --hex-gap: 3px;
}
.wu-srv-flower .wu-hex-label { display: none; }
.wu-srv-flower .wu-hex-icon { font-size: calc(var(--hex-w) * 0.36); }
/* An occupied cell — full-colour fill so the bug is unmissable. */
.wu-srv-flower .wu-srv-on .wu-hex::before { background: var(--tile-color); }
.wu-srv-flower .wu-srv-on .wu-hex::after  { background: color-mix(in srgb, var(--tile-color) 45%, var(--colour-surface)); }
/* Survivor header: bugs + coins tally on its own line under the wave count. */
.wu-srv-tally {
  font-family: var(--font-mono);
  font-size: var(--font-size-sm);
  color: var(--colour-text-secondary);
}
/* Vitals card (hearts/shields/⚔️/🐌) — slightly larger than the message line. */
.wu-srv-vitals { font-size: var(--font-size-md); }

/* The BOSS — bigger glyph, menacing glow. Every multi-tap enemy wears the
   .wu-srv-hp remaining-taps counter chip (the fill-strength fade didn't read). */
.wu-srv-flower .wu-srv-boss .wu-hex-icon { font-size: calc(var(--hex-w) * 0.48); }
.wu-srv-flower .wu-srv-boss .wu-hex {
  filter: drop-shadow(0 0 10px color-mix(in srgb, var(--tile-color) 60%, transparent));
  z-index: 2;
}
.wu-srv-hp {
  position: absolute;
  top: 16%;
  right: 14%;
  z-index: 3;
  min-width: 1.5em;
  padding: 1px 4px;
  border-radius: 999px;
  background: #fff;
  color: var(--colour-danger);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: clamp(9px, calc(var(--hex-w) * 0.16), 14px);
  text-align: center;
  pointer-events: none;
}
.wu-srv-flower .wu-srv-hit .wu-hex { animation: wu-pop-blast 260ms ease; z-index: 3; }
/* Waiting star — spins like the boot splash until the child pushes it. */
.wu-srv-flower .wu-srv-wait .wu-hex-icon {
  animation: wu-boot-spin 2.4s ease-in-out infinite;
}
/* After-boss upgrade pick — health vs attack, centred over the board. */
.wu-srv-pick {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  background: color-mix(in srgb, var(--colour-grid-bg) 82%, transparent);
  backdrop-filter: blur(3px);
}
.wu-srv-pick-title {
  margin: 0;
  font-family: var(--font-display);
  color: var(--colour-text-primary);
}
.wu-srv-pick-cards {
  display: flex;
  gap: var(--space-md);
}
.wu-srv-pick-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
  min-width: 130px;
  padding: var(--space-md);
  border: 2px solid var(--colour-border);
  border-radius: var(--radius-card, 12px);
  background: var(--colour-surface);
  font-family: var(--font-display);
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-md);
  color: var(--colour-text-primary);
  cursor: pointer;
}
.wu-srv-pick-card:disabled { opacity: 0.45; cursor: default; }
.wu-srv-pick-ic { font-size: 34px; line-height: 1; }
.wu-srv-price {
  font-family: var(--font-mono);
  font-size: var(--font-size-xs);
  color: var(--colour-text-secondary);
}
/* Current-level line on shop cards ("now ⚔️2", "3 slow waves left"). */
.wu-srv-have {
  font-size: 11px;
  font-weight: var(--font-weight-normal, 400);
  color: var(--colour-text-secondary);
}
/* Star hit — red flash + shake on the centre tile. */
.wu-srv-flower .wu-srv-ouch .wu-hex::before { background: var(--colour-danger); }
.wu-srv-flower .wu-srv-ouch .wu-hex { animation: wu-srv-shake 450ms ease; }
@keyframes wu-srv-shake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-6px); } 50% { transform: translateX(6px); } 75% { transform: translateX(-3px); } }

/* (Game boards get NO hover styles at all — their stages carry .wu-static and
   honeycomb.css scopes every :hover rule to :not(.wu-static) stages. This
   replaced the earlier transform-only suppression: on touch the stuck :hover
   also recoloured ::before/::after, leaving the last-tapped tile "active".) */

/* ── Game side rail (owner request 2026-07-12) ─────────────────────────────
   The info rows above the board (✕/score, status, piece bar, legend) were
   crunching the play area's height. On wide screens the whole info column
   moves to the LEFT as a rail so the board gets the pane's full height;
   narrow/portrait screens keep the stacked layout unchanged. */
.wu-game-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}
@media (min-width: 900px) {
  .wu-game-layer:has(.wu-game-rail) {
    flex-direction: row-reverse; /* rail sits on the RIGHT (owner call) */
    align-items: stretch;
    gap: var(--space-md);
  }
  .wu-game-rail {
    width: 224px;
    flex: none;
    align-items: stretch;
    gap: var(--space-sm);
    padding-top: var(--space-sm);
  }
  /* Rail redesign (v219, owner: "all on top of each other"): every info group
     is its own CARD, with a hierarchy — headline score card (✕ pinned in its
     corner, best beneath), then the status message, then game controls. */
  .wu-game-rail > * {
    background: var(--colour-surface);
    border: 1px solid var(--colour-border);
    border-radius: var(--radius-card, 12px);
    padding: var(--space-sm) var(--space-md);
  }
  .wu-game-rail .wu-drill-head {
    max-width: none;
    position: relative;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding-right: 48px; /* room for the pinned ✕ */
  }
  .wu-game-rail .wu-drill-quit {
    position: absolute;
    top: var(--space-sm);
    right: var(--space-sm);
    width: 32px;
    height: 32px;
  }
  /* Headline: the live score, big; best-so-far small beneath it. */
  .wu-game-rail .wu-drill-progress {
    font-family: var(--font-display);
    font-weight: var(--font-weight-bold);
    font-size: var(--font-size-lg);
    color: var(--colour-text-primary);
  }
  .wu-game-rail .wu-drill-timer {
    font-size: var(--font-size-xs);
    color: var(--colour-text-secondary);
  }
  .wu-game-rail .wu-pop-status,
  .wu-game-rail .wu-g2048-status {
    text-align: left;
    font-size: var(--font-size-sm);
    min-height: 0;
    padding-bottom: var(--space-sm);
  }
  /* Stack: piece + legend groups with small-caps section labels. */
  .wu-game-rail .wu-stk-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-xs);
    min-height: 0;
  }
  .wu-game-rail .wu-stk-lbl {
    font-size: 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }
  .wu-game-rail .wu-stk-lbl-next { margin-left: 0; margin-top: var(--space-sm); }
  .wu-game-rail .wu-stk-legend,
  .wu-game-rail .wu-cpy-bar {
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: var(--space-xs);
    min-height: 0;
  }
  .wu-game-rail .wu-cpy-check { margin-left: 0; width: 100%; }
  /* Re-run each board's sizing with the small side-rail offset (~140px of
     layer padding) instead of the stacked-header offsets — bigger tiles.
     --hex-h/--hex-gap stay valid: they're declared on the same element and
     recompute from the overridden --hex-w. */
  .wu-game-layer .wu-mem-flower[data-size="easy"]   { --hex-w: clamp(62px, calc((100vh - 140px) / 4.6), 150px); }
  .wu-game-layer .wu-mem-flower[data-size="medium"] { --hex-w: clamp(44px, calc((100vh - 140px) / 6.6), 124px); }
  .wu-game-layer .wu-mem-flower[data-size="hard"]   { --hex-w: clamp(30px, calc((100vh - 140px) / 8.6), 94px); }
  .wu-game-layer .wu-cpy-flower[data-size="easy"]   { --hex-w: clamp(56px, calc((100vh - 140px) / 4.6), 150px); }
  .wu-game-layer .wu-cpy-flower[data-size="medium"] { --hex-w: clamp(44px, calc((100vh - 140px) / 6.6), 124px); }
  .wu-game-layer .wu-cpy-flower[data-size="hard"]   { --hex-w: clamp(30px, calc((100vh - 140px) / 8.6), 94px); }
  .wu-game-layer .wu-hvt-flower { --hex-w: clamp(30px, calc((100vh - 140px) / 8.6), 94px); }
  .wu-game-layer .wu-g2048-flower { --hex-w: clamp(44px, calc((100vh - 140px) / 6.6), 124px); }
  .wu-game-layer .wu-stk-flower   { --hex-w: clamp(44px, calc((100vh - 140px) / 6.6), 124px); }
  .wu-game-layer .wu-srv-flower[data-size="s1"] { --hex-w: clamp(44px, calc((100vh - 140px) / 6.6), 124px); }
  .wu-game-layer .wu-srv-flower[data-size="s2"] { --hex-w: clamp(30px, calc((100vh - 140px) / 8.6), 94px); }
  .wu-game-layer .wu-srv-flower[data-size="s3"] { --hex-w: clamp(24px, calc((100vh - 140px) / 10.6), 74px); }
}

/* Result + lock panels — both fill the drill-layer, centred. */
.wu-game-result,
.wu-game-lock {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  text-align: center;
  padding: var(--space-lg);
}
.wu-game-result-emoji,
.wu-game-lock-emoji { font-size: 48px; }
.wu-game-result-title,
.wu-game-lock-title { font-family: var(--font-display); font-size: var(--font-size-xl); }
.wu-game-result-stats { color: var(--colour-text-secondary); font-family: var(--font-mono); }
.wu-game-result-score { font-weight: var(--font-weight-bold); }
.wu-game-result-actions {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-md);
  flex-wrap: wrap;
  justify-content: center;
}
.wu-game-lock-sub { color: var(--colour-text-secondary); max-width: 34ch; }
.wu-game-lock-count { font-family: var(--font-mono); font-weight: var(--font-weight-bold); }

.wu-set-heading {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: var(--space-sm);
  font-family: var(--font-display);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  color: var(--colour-text-primary);
}

.wu-set-heading small {
  font-family: var(--font-body);
  font-weight: normal;
  font-size: var(--font-size-xs);
  color: var(--colour-text-secondary);
}

/* Reading diary + activity log read views (child Settings flower) */
.wu-log-week {
  margin-bottom: var(--space-sm);
}

/* Calendar page (Settings → 📅) — calendar left (static), activity list right
   (scrolls). Click a day filters the list. Stacks below 900px. */
.wu-calpage {
  flex: 1;
  min-height: 0;
  width: 100%;
  max-width: 1100px;
  display: grid;
  grid-template-columns: minmax(300px, 1fr) 1fr;
  gap: var(--space-lg);
  padding-top: var(--space-md);
  align-items: start;
}
.wu-calpage-cal {
  min-width: 0;
}
.wu-calpage-list {
  min-width: 0;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.wu-calpage-list .wu-set-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}
.wu-calpage-head {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
  min-height: 36px;
}
.wu-calpage-day {
  font-family: var(--font-display);
  font-weight: var(--font-weight-bold);
}
@media (max-width: 900px) {
  .wu-calpage {
    grid-template-columns: 1fr;
    overflow-y: auto;
    align-content: start;
  }
  .wu-calpage-list {
    height: auto;
  }
  .wu-calpage-list .wu-set-list {
    overflow: visible;
  }
}

.wu-log-row {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--colour-border);
  font-size: var(--font-size-sm);
}

.wu-log-icon {
  flex: 0 0 auto;
  display: inline-flex;
}

.wu-log-when {
  flex: 0 0 5.5em;
  font-family: var(--font-mono);
  font-size: var(--font-size-xs);
  color: var(--colour-text-secondary);
}

.wu-log-what {
  flex: 1 1 auto;
  min-width: 0;
  color: var(--colour-text-primary);
}

.wu-log-what small {
  color: var(--colour-text-secondary);
}

.wu-log-val {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: var(--font-size-xs);
  color: var(--colour-text-secondary);
}

.wu-log-diaryday {
  background: color-mix(in srgb, var(--colour-accent) 8%, transparent);
  border-radius: var(--radius-cell);
}

.wu-log-practice {
  font-size: var(--font-size-xs);
  color: var(--colour-warning);
  border: 1px solid var(--colour-warning);
  border-radius: var(--radius-pill);
  padding: 0 6px;
}

/* Parent dashboard (decision #55, Slice B) — at-a-glance stats + section list */
.wu-dash-overview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.wu-dash-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: var(--space-sm) var(--space-md);
  background: var(--colour-bg);
  border: 1px solid var(--colour-border);
  border-radius: var(--radius-card);
}

.wu-dash-num {
  font-family: var(--font-mono);
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  color: var(--colour-text-primary);
}

.wu-dash-name {
  font-family: var(--font-display);
  font-size: var(--font-size-md);
}

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

.wu-dash-row {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  width: 100%;
  padding: var(--space-md);
  background: var(--colour-surface);
  border: 1px solid var(--colour-border);
  border-radius: var(--radius-card);
  margin-bottom: var(--space-sm);
  cursor: pointer;
  text-align: left;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

.wu-dash-row:hover {
  border-color: var(--colour-brand);
  background: color-mix(in srgb, var(--colour-brand) 8%, var(--colour-surface));
}

.wu-dash-ic {
  flex: 0 0 auto;
  display: inline-flex;
  font-size: 20px;
}

.wu-dash-text {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.wu-dash-title {
  font-family: var(--font-display);
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-bold);
  color: var(--colour-text-primary);
}

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

.wu-dash-chev {
  flex: 0 0 auto;
  font-size: var(--font-size-lg);
  color: var(--colour-text-secondary);
}

.wu-dash-badge {
  flex: 0 0 auto;
  min-width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  background: var(--colour-danger);
  color: #fff;
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
}

/* Dashboard is wider than a normal settings list — it carries two columns */
.wu-set-list.wu-dash {
  width: min(940px, 100%);
}

/* Widen the drill header to match the dashboard so the ✕ lines up */
.wu-drill-layer:has(.wu-dash) .wu-drill-head {
  max-width: 940px;
}

.wu-dash-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: var(--space-lg);
  align-items: start;
}

/* Stack the columns when the pane is too narrow for two */
@media (max-width: 900px) {
  .wu-dash-grid {
    grid-template-columns: 1fr;
  }
}

/* Phones: the dashboard/settings live inside .wu-drill-layer (centred, padded).
   Tighten the side padding and clip any sub-pixel overflow so the settings list
   sits flush with no stray horizontal scroll. */
@media (max-width: 720px) {
  .wu-drill-layer {
    padding: var(--space-md) var(--space-sm);
    overflow-x: hidden;
  }
  .wu-set-list,
  .wu-set-list.wu-dash {
    width: 100%;
  }
}

.wu-dash-main {
  display: flex;
  flex-direction: column;
}

.wu-dash-settings {
  border: 1px solid var(--colour-border);
  border-radius: var(--radius-card);
  background: var(--colour-surface);
  padding: 0 var(--space-md) var(--space-sm);
}

.wu-dash-set-head {
  margin-top: var(--space-sm);
}

.wu-set-slider {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex: 1;
  max-width: 280px;
}

.wu-set-slider input[type="range"] {
  flex: 1;
  accent-color: var(--colour-accent);
  min-height: 36px;
}

.wu-set-stepper {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex: none;
}

.wu-set-stepper button {
  width: 36px;
  font-size: var(--font-size-md);
}

.wu-set-value {
  font-family: var(--font-mono);
  font-size: var(--font-size-md);
  color: var(--colour-text-primary);
  min-width: 1.5ch;
  text-align: center;
}

/* ── Profiles ────────────────────────────────────────────── */

.wu-profile-chip {
  font-family: var(--font-display);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  color: var(--colour-text-primary);
}

.wu-prof-dot {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  margin-right: var(--space-sm);
  flex: none;
}

/* Big avatar disc — the child identity sheet (future avatar picker) */
.wu-avatar-big {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  color: #fff;
  font-family: var(--font-display);
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
}

/* Code-link sync view (decision #58) */
.wu-sync-wrap {
  max-width: 420px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}
.wu-sync-note {
  color: var(--colour-text-secondary);
  font-size: var(--font-size-sm);
  line-height: var(--line-height-relaxed, 1.5);
  margin: 0;
}
.wu-sync-code {
  font-family: var(--font-mono);
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.12em;
  text-align: center;
  padding: var(--space-md);
  background: var(--colour-bg);
  border: 1px dashed var(--colour-border);
  border-radius: var(--radius-card);
  color: var(--colour-text-primary);
  user-select: all;
}
.wu-sync-go { background: var(--colour-accent); color: #fff; border-color: transparent; }
.wu-sync-go:hover { filter: brightness(1.05); }
.wu-sync-go:disabled { opacity: 0.6; cursor: default; }
.wu-sync-secondary:disabled { opacity: 0.6; cursor: default; }
.wu-sync-or {
  text-align: center;
  color: var(--colour-text-secondary);
  font-size: var(--font-size-sm);
}
.wu-sync-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  font-size: var(--font-size-sm);
  color: var(--colour-text-secondary);
}
.wu-sync-input {
  font-family: var(--font-mono);
  font-size: var(--font-size-lg);
  text-align: center;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: var(--space-sm) var(--space-md);
  border: 1px solid var(--colour-border);
  border-radius: var(--radius-button);
  background: var(--colour-surface);
  color: var(--colour-text-primary);
}
.wu-sync-input:focus { outline: 2px solid var(--colour-accent); outline-offset: 1px; }
.wu-sync-role {
  font-size: var(--font-size-sm);
  color: var(--colour-text-secondary);
  text-align: center;
}
.wu-sync-rolechg {
  background: none;
  border: none;
  padding: 0 0 0 var(--space-xs);
  color: var(--colour-accent);
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.wu-prof-pick {
  display: flex;
  align-items: center;
  justify-content: center;
}

.wu-prof-swatch {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--colour-surface);
  box-shadow: 0 0 0 1px var(--colour-border);
  cursor: pointer;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  line-height: 1;
  color: #fff;
}

/* Avatar disc in the profile switcher rows */
.wu-prof-av {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  margin-right: var(--space-sm);
  flex: none;
  font-size: 17px;
  line-height: 1;
  color: #fff;
  font-family: var(--font-display);
  font-weight: var(--font-weight-bold);
}

/* Avatar picker grid (child Settings → Avatar) */
.wu-av-grid {
  display: grid;
  /* 5 columns — 24 avatars + the initial tile = a clean 5×5 */
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-sm);
  width: min(380px, 100%);
  margin: var(--space-sm) auto 0;
}
.wu-av-opt {
  position: relative;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  background: var(--colour-surface);
  border: 2px solid var(--colour-border);
  border-radius: var(--radius-card);
  cursor: pointer;
}
.wu-av-initial {
  font-size: var(--font-size-lg);
  font-family: var(--font-display);
  font-weight: var(--font-weight-bold);
  color: var(--colour-text-secondary);
}
.wu-av-opt:hover {
  border-color: var(--colour-accent);
}
.wu-av-opt.wu-av-on {
  border-color: var(--colour-accent);
  background: color-mix(in srgb, var(--colour-accent) 12%, var(--colour-surface));
}
/* Locked avatar — dimmed with a ⭐ price badge; affordable ones glow gently. */
.wu-av-locked {
  filter: grayscale(0.7);
  opacity: 0.55;
}
.wu-av-locked.wu-av-afford {
  filter: none;
  opacity: 1;
  border-style: dashed;
  border-color: color-mix(in srgb, var(--colour-warning) 60%, var(--colour-border));
}
.wu-av-price {
  position: absolute;
  bottom: -6px;
  right: -4px;
  background: var(--colour-surface);
  border: 1px solid var(--colour-border);
  border-radius: var(--radius-pill);
  padding: 0 5px;
  font-size: 11px;
  font-family: var(--font-mono);
  line-height: 1.5;
  color: var(--colour-text-secondary);
}
.wu-av-credits {
  text-align: center;
  margin: 0 0 var(--space-xs);
  font-family: var(--font-display);
  font-weight: var(--font-weight-bold);
  color: var(--colour-text-primary);
}
.wu-av-star {
  font-size: 1.1em;
}

.wu-prof-actions {
  display: flex;
  gap: var(--space-xs);
  flex: none;
}

.wu-prof-actions button,
.wu-prof-add {
  padding: var(--space-xs) var(--space-sm);
  min-height: 36px;
  background: var(--colour-surface);
  border: 1px solid var(--colour-border);
  border-radius: var(--radius-button);
  color: var(--colour-text-primary);
  font-size: var(--font-size-sm);
  font-family: var(--font-body);
  cursor: pointer;
}

.wu-prof-actions button:hover,
.wu-prof-add:hover {
  border-color: var(--colour-accent);
}

.wu-prof-input {
  flex: 1;
  min-height: 36px;
  padding: var(--space-xs) var(--space-sm);
  background: var(--colour-surface);
  border: 1px solid var(--colour-border);
  border-radius: var(--radius-button);
  font-size: var(--font-size-sm);
  font-family: var(--font-body);
  color: var(--colour-text-primary);
}

/* ── Path puzzle ─────────────────────────────────────────── */

.wu-path-bar {
  position: absolute;
  top: var(--space-md);
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  background: var(--colour-surface);
  border: 1px solid var(--colour-border);
  border-radius: var(--radius-pill);
  padding: var(--space-xs) var(--space-md);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  max-width: min(92%, 600px);
}

/* Below ~1100px the centred bar would collide with the HUD chip — drop it
   underneath instead. */
@media (max-width: 1100px) {
  .wu-path-bar {
    top: calc(var(--space-md) + 44px + var(--space-sm));
  }
}

.wu-path-quit {
  background: none;
  border: none;
  cursor: pointer;
  font-size: var(--font-size-md);
  color: var(--colour-text-secondary);
  min-width: 32px;
  min-height: 32px;
}

.wu-path-prompt {
  font-family: var(--font-display);
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-sm);
  color: var(--colour-text-primary);
  /* Wrap long instructions onto multiple lines instead of truncating —
     the pill grows taller and the quit/errors stay vertically centred. */
  white-space: normal;
  line-height: var(--line-height-tight);
  text-align: center;
}

.wu-path-prompt::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--path-color, var(--colour-accent));
  margin-right: 6px;
}

.wu-path-errors {
  font-family: var(--font-mono);
  font-size: var(--font-size-sm);
  color: var(--colour-danger);
  flex: none;
}

.wu-path-wrong .wu-hex {
  animation: wu-path-shake 320ms;
}

@keyframes wu-path-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  50% { transform: translateX(5px); }
  75% { transform: translateX(-3px); }
}

.wu-path-start .wu-hex {
  animation: wu-path-pulse 1.4s ease-in-out infinite;
}

@keyframes wu-path-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.07); }
}

/* ── Drill results ───────────────────────────────────────── */

.wu-results {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  width: 100%;
}

.wu-results-emoji {
  font-size: 64px;
  line-height: 1;
}

.wu-results-score {
  font-family: var(--font-mono);
  font-size: var(--font-size-3xl);
  margin: 0;
  color: var(--colour-text-primary);
}

.wu-results-time {
  font-family: var(--font-mono);
  font-size: var(--font-size-lg);
  color: var(--colour-text-secondary);
  margin: 0;
}

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

.wu-results-actions button {
  padding: var(--space-md) var(--space-xl);
  font-family: var(--font-display);
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-bold);
  background: var(--colour-bg);
  color: var(--colour-text-primary);
  border: 1px solid var(--colour-border);
  border-radius: var(--radius-button);
  cursor: pointer;
  min-height: var(--tap-target-min);
}

.wu-results-actions button:hover {
  border-color: var(--colour-accent);
}

.wu-results-actions .wu-results-done {
  background: color-mix(in srgb, var(--colour-success) 22%, var(--colour-bg));
  border-color: var(--colour-success);
  color: var(--colour-success);
}

/* ── Times Table summary (replaces the mixed Path tile) ───────── */
.wu-tt-pick {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-lg);
  margin-top: var(--space-xl);
}
.wu-tt-prompt {
  font-family: var(--font-display);
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  color: var(--colour-text-primary);
}
.wu-tt-pickgrid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-sm);
  width: min(360px, 100%);
}
.wu-tt-pickbtn {
  aspect-ratio: 1;
  font-family: var(--font-mono);
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  background: var(--colour-surface);
  border: 2px solid var(--colour-border);
  border-radius: var(--radius-card);
  color: var(--colour-text-primary);
  cursor: pointer;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}
.wu-tt-pickbtn:hover {
  border-color: var(--colour-accent);
  background: color-mix(in srgb, var(--colour-accent) 8%, var(--colour-surface));
}
.wu-tt-pickbtn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}
.wu-tt-pickbtn:disabled:hover {
  border-color: var(--colour-border);
  background: var(--colour-surface);
}

/* The full table — one column of 12 rows on phones, two columns when wide. */
.wu-tt-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xs);
  width: min(440px, 100%);
  margin: var(--space-md) auto 0;
}
@media (min-width: 760px) {
  .wu-tt-grid {
    grid-template-columns: 1fr 1fr;
    column-gap: var(--space-lg);
    width: min(640px, 100%);
  }
}
.wu-tt-row {
  display: flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
  width: fit-content;
  gap: var(--space-sm);
  padding: var(--space-xs) var(--space-md);
  background: var(--colour-bg);
  border: 1px solid var(--colour-border);
  border-radius: var(--radius-button);
}
.wu-tt-q {
  font-family: var(--font-mono);
  font-size: var(--font-size-md);
  color: var(--colour-text-primary);
  min-width: 5ch;
  text-align: right;
}
.wu-tt-eq {
  color: var(--colour-text-secondary);
}
.wu-tt-input {
  width: 3.2em;
  flex: none;
  text-align: center;
  font-family: var(--font-mono);
  font-size: var(--font-size-md);
  padding: var(--space-xs) var(--space-xs);
  background: var(--colour-surface);
  border: 1px solid var(--colour-border);
  border-radius: var(--radius-button);
  color: var(--colour-text-primary);
}
.wu-tt-input:focus {
  outline: none;
  border-color: var(--colour-accent);
}
.wu-tt-input.wu-tt-right {
  border-color: var(--colour-success);
  background: color-mix(in srgb, var(--colour-success) 14%, var(--colour-surface));
  color: var(--colour-success);
}
.wu-tt-input.wu-tt-wrong {
  border-color: var(--colour-danger);
  background: color-mix(in srgb, var(--colour-danger) 12%, var(--colour-surface));
  color: var(--colour-danger);
}
.wu-tt-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}
.wu-tt-score {
  font-family: var(--font-display);
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  color: var(--colour-text-primary);
}

/* In-app APK update banner (native shell only) — fixed bottom pill */
.wu-update-banner {
  position: fixed;
  left: 50%;
  bottom: var(--space-md);
  transform: translateX(-50%);
  z-index: 220;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  max-width: calc(100vw - 2 * var(--space-md));
  padding: var(--space-sm) var(--space-sm) var(--space-sm) var(--space-md);
  background: var(--colour-surface);
  border: 1px solid var(--colour-accent);
  border-radius: var(--radius-pill);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
  font-size: var(--font-size-sm);
  color: var(--colour-text-primary);
}
.wu-update-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wu-update-go {
  flex: 0 0 auto;
  padding: var(--space-xs) var(--space-md);
  background: var(--colour-accent);
  color: #fff;
  border-radius: var(--radius-pill);
  font-weight: var(--font-weight-bold);
  text-decoration: none;
}
.wu-update-x {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  color: var(--colour-text-secondary);
  font-size: var(--font-size-md);
  cursor: pointer;
}

/* Parent dashboard → 📊 Insights (last-30-day usage) */
.wu-insight-overview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}
.wu-insight-acc {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
  font-family: var(--font-mono);
  font-size: var(--font-size-sm);
  color: var(--colour-text-secondary);
}

/* Help panels (child Settings flower → ❓ Help) */
.wu-help-text {
  margin: 0;
  padding: 0 var(--space-xs) var(--space-sm);
  color: var(--colour-text-secondary);
  font-size: var(--font-size-sm);
  line-height: 1.5;
}

/* ── Boot splash — animated WarmUp mark shown until app.js mounts the first view.
   The WHITE star spins at an UNEVEN pace (bursts then hangs) inside a gently
   breathing AMBER hex — matching the flower's centre tile; the wordmark pulses.
   Fixed + full-screen so it's centred to the whole viewport. Respects
   reduced-motion. */
.wu-boot {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  background: var(--colour-bg);
  z-index: 1;
}
.wu-boot-logo {
  width: clamp(84px, 18vh, 132px);
  height: auto;
  filter: drop-shadow(0 6px 14px rgba(122, 75, 0, 0.22));
}
.wu-boot-hex {
  fill: var(--colour-brand, #ffb74d);
  transform-box: view-box;
  transform-origin: 54px 54px;
  animation: wu-boot-breathe 2.4s ease-in-out infinite;
}
.wu-boot-star {
  fill: #fff;
  transform-box: view-box;
  transform-origin: 54px 53px;
  animation: wu-boot-spin 2.4s ease-in-out infinite;
}
.wu-boot-text {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--colour-brand-deep, #fb8c00);
  animation: wu-boot-fade 2.4s ease-in-out infinite;
}
/* Uneven angular velocity: quick to 150°, hang near the half-turn, quick again,
   settle — the ease-in-out per segment makes it feel playful, not mechanical. */
@keyframes wu-boot-spin {
  0%   { transform: rotate(0deg); }
  20%  { transform: rotate(150deg); }
  45%  { transform: rotate(185deg); }
  70%  { transform: rotate(330deg); }
  100% { transform: rotate(360deg); }
}
@keyframes wu-boot-breathe {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.05); }
}
@keyframes wu-boot-fade {
  0%, 100% { opacity: 0.55; }
  50%      { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .wu-boot-hex,
  .wu-boot-star,
  .wu-boot-text {
    animation: none;
  }
}

/* ── Fill-the-gaps drill row (replaces Missing Number) ── */
.wu-q-gaps {
  margin: 0;
  font-family: var(--font-mono, "JetBrains Mono", monospace);
  font-size: clamp(1.4rem, 4.5vw, 2.4rem);
  letter-spacing: 0.04em;
  font-weight: 600;
}

/* ── 🎧 Study Timer — full-screen calm timer (was "Focus time") ── */
.wu-focus-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--colour-bg) 88%, #000);
}
.wu-focus-card {
  position: relative;
  background: var(--colour-surface);
  border-radius: var(--radius-card, 12px);
  padding: var(--space-lg);
  width: min(420px, 92vw);
  text-align: center;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}
.wu-focus-choices {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  justify-content: center;
  margin-top: var(--space-md);
}
.wu-focus-choice {
  padding: var(--space-sm) var(--space-md);
  border: 2px solid var(--colour-border);
  border-radius: var(--radius-button, 8px);
  background: var(--colour-surface);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  cursor: pointer;
}
.wu-focus-choice:hover {
  border-color: var(--colour-brand);
}

/* Custom-duration HH:MM wheel — looping scroll-snap columns, no browser
   prompt. Viewport = 5 rows (selected ± two, for the spin effect); vertical
   padding = two item heights so the snap centre is the middle row; item
   height must match WHEEL_ITEM_H in focus.js. Edges fade via mask. */
.wu-wheel-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  margin: var(--space-md) 0;
}

.wu-wheel-col {
  display: flex;
  align-items: center;
  gap: 4px;
}

.wu-wheel-unit {
  font-family: var(--font-display);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  color: var(--colour-text-secondary);
}

.wu-wheel {
  box-sizing: border-box; /* 220px INCLUDES the 2×88px padding → exactly 5 rows visible */
  height: 220px;
  width: 84px;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  padding: 88px 0;
  border: 1px solid var(--colour-border);
  border-radius: var(--radius-card);
  background: var(--colour-surface);
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(transparent, #000 28%, #000 72%, transparent);
  mask-image: linear-gradient(transparent, #000 28%, #000 72%, transparent);
}

.wu-wheel::-webkit-scrollbar {
  display: none;
}

.wu-wheel-item {
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  scroll-snap-align: center;
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--colour-text-secondary);
  opacity: 0.4;
}

/* Centre row = the selection: black, slightly larger, level with the h/m unit */
.wu-wheel-item.wu-wheel-on {
  color: var(--colour-text-primary);
  font-size: 1.7rem;
  opacity: 1;
}

.wu-wheel-sep {
  font-family: var(--font-mono);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--colour-text-secondary);
}
.wu-focus-stage {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  overflow: hidden;
  background: var(--colour-bg);
}
.wu-focus-sky {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.wu-focus-drift {
  position: absolute;
  bottom: -100px;
  color: color-mix(in srgb, var(--colour-brand) 38%, transparent);
  animation: wu-focus-rise linear infinite;
}
/* The child's avatar drifting along — rides the profile-colour disc (inline
   background from ambience()) like the HUD chip, so it's unmistakably this
   child's even when the avatar is just an initial letter. */
.wu-focus-drift-av {
  opacity: 0.75;
  width: 1.5em;
  height: 1.5em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
  font-family: var(--font-display);
  font-weight: var(--font-weight-bold);
}
@keyframes wu-focus-rise {
  from { transform: translateY(0) rotate(0deg); }
  to   { transform: translateY(-120vh) rotate(160deg); }
}
.wu-focus-clock {
  font-family: var(--font-mono, "JetBrains Mono", monospace);
  font-size: clamp(4rem, 16vw, 9rem);
  font-weight: 600;
  color: var(--colour-text-primary);
  z-index: 1;
}
.wu-focus-donemark {
  font-size: 4rem;
  z-index: 1;
}
.wu-focus-note {
  margin: 0;
  color: var(--colour-text-secondary);
  z-index: 1;
}
.wu-focus-actions {
  display: flex;
  gap: var(--space-md);
  z-index: 1;
}
.wu-focus-btn2 {
  padding: var(--space-sm) var(--space-lg);
  border: 2px solid var(--colour-border);
  border-radius: var(--radius-button, 8px);
  background: var(--colour-surface);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
}
.wu-focus-stop {
  color: var(--colour-danger);
}
@media (prefers-reduced-motion: reduce) {
  .wu-focus-drift { animation: none; }
}

/* ── Animated premium avatars (8⭐ tier) ── */
.wu-av-anim {
  display: inline-block;
  animation: wu-av-bob 2.2s ease-in-out infinite;
}
@keyframes wu-av-bob {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50%      { transform: translateY(-9%) rotate(4deg); }
}
@media (prefers-reduced-motion: reduce) {
  .wu-av-anim { animation: none; }
}
