/* Te Poutama o Te Rongopai: made for a 24" touch monitor (1920×1080),
   tapped by a 4-year-old. Big targets, calm colours, no tiny text. */

:root {
  --bg: #fdf8f0;
  --ink: #2d2a26;
  --muted: #6f675c;
  --card: #ffffff;
  --line: #e7dccb;
  --accent: #2e7d6b;      /* pounamu green */
  --accent-2: #c0392b;    /* kōkōwai red */
  --gold: #f2b705;
  --ata: #ffe2b8;
  --po: #cfd8f7;
  --ako: #d8f0dc;
  --radius: 28px;
  --shadow: 0 6px 0 rgba(0, 0, 0, 0.08), 0 10px 24px rgba(0, 0, 0, 0.06);
  font-size: clamp(14px, 1.15vw, 24px);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: "Segoe UI", system-ui, sans-serif;
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
  overscroll-behavior: none;
}

button {
  font: inherit;
  color: inherit;
  border: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

button:disabled { opacity: 0.35; cursor: default; }

#app { min-height: 100%; display: flex; flex-direction: column; }

.error { padding: 3rem; font-size: 1.5rem; }

/* ---------- Top bar ---------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  gap: 1rem;
}

.greet { display: flex; flex-direction: column; }
.hello { font-size: 2.2rem; font-weight: 700; }
.date { font-size: 1.3rem; color: var(--muted); }

.bar-right { display: flex; align-items: center; gap: 1rem; }
.clock { font-size: 1.6rem; font-weight: 600; color: var(--muted); }

.lang, .lock {
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: 999px;
  padding: 0.5rem 1.2rem;
  font-size: 1.1rem;
  font-weight: 600;
}
.lock { padding: 0.5rem 0.8rem; }

/* ---------- Home ---------- */

.home {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3rem;
  padding: 1rem 2rem 2rem;
}

.tiles { display: flex; gap: 2rem; flex-wrap: wrap; justify-content: center; }

.tile {
  width: 16rem;
  height: 16rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  font-size: 1.7rem;
  font-weight: 700;
  padding: 1rem;
  text-align: center;
  transition: transform 0.1s;
}
.tile:active { transform: scale(0.96); }
.tile-icon { font-size: 6rem; line-height: 1; }
.tile-ata { background: var(--ata); }
.tile-po { background: var(--po); }
.tile-ako { background: var(--ako); }

/* ---------- Star jar ---------- */

.jar { display: flex; flex-direction: column; align-items: center; gap: 0.4rem; }
.jar-glass {
  position: relative;
  width: 7rem;
  height: 10rem;
  border: 5px solid #b9a98f;
  border-top-width: 12px;
  border-radius: 1.2rem 1.2rem 2rem 2rem;
  background: rgba(255, 255, 255, 0.7);
  overflow: hidden;
}
.jar-big .jar-glass { width: 10rem; height: 14rem; }
.jar-fill {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  background: repeating-linear-gradient(45deg, #ffd34d 0 14px, #ffc61a 14px 28px);
  transition: height 0.6s ease;
}
.jar-count {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  font-weight: 800;
}
.jar-label { font-weight: 700; color: var(--muted); }

/* ---------- Shared rows ---------- */

.row { display: flex; align-items: center; gap: 1.5rem; }
.row.center { justify-content: center; flex-wrap: wrap; }
.row h1 { margin: 0; font-size: 2.4rem; }

.back {
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: 999px;
  padding: 0.7rem 1.5rem;
  font-size: 1.3rem;
  font-weight: 700;
}

.big-btn {
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  padding: 1rem 2.4rem;
  font-size: 1.6rem;
  font-weight: 700;
  box-shadow: var(--shadow);
}
.big-btn.yes { background: var(--accent); }
.big-btn.again { background: #8d8173; }

.progress-pill {
  margin-left: auto;
  background: var(--card);
  border-radius: 999px;
  padding: 0.5rem 1.2rem;
  font-size: 1.4rem;
  font-weight: 700;
}

/* ---------- Routines ---------- */

.routine, .learn, .question { flex: 1; padding: 0 2rem 2rem; display: flex; flex-direction: column; gap: 1.5rem; }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
  gap: 1.5rem;
}

.card {
  position: relative;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  min-height: 13rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 1rem;
  border: 4px solid transparent;
}
.card.kind-karakia, .card.kind-scripture { border-color: var(--gold); background: #fffaf0; }
.card-emoji { font-size: 5rem; line-height: 1; }
.card-label { font-size: 1.5rem; font-weight: 700; text-align: center; }
.tick {
  position: absolute;
  top: 0.6rem;
  right: 0.8rem;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  display: none;
  place-items: center;
  background: var(--accent);
  color: #fff;
  font-size: 1.5rem;
  font-weight: 800;
}
.card.done { background: #e9f6ef; }
.card.done .card-emoji { opacity: 0.55; }
.card.done .tick { display: grid; }

/* ---------- Learning ---------- */

.areas .tile { width: 18rem; height: 15rem; font-size: 1.5rem; }

.question { background: linear-gradient(var(--area), var(--bg) 60%); }

.pdots { display: flex; gap: 0.7rem; margin-left: auto; }
.pdot { width: 1.4rem; height: 1.4rem; border-radius: 50%; background: #d9cfbf; }
.pdot.on { background: var(--gold); }
.pdot.now { background: var(--accent); transform: scale(1.25); }

.prompt { display: flex; align-items: center; justify-content: center; gap: 1.5rem; }
.prompt h1 { margin: 0; font-size: 3rem; text-align: center; }
.say {
  width: 5rem;
  height: 5rem;
  border-radius: 50%;
  background: var(--card);
  box-shadow: var(--shadow);
  font-size: 2.4rem;
}

.say-hint { margin: -0.8rem 0 0; text-align: center; font-size: 1.6rem; color: var(--muted); font-weight: 600; }

.show { display: flex; justify-content: center; }
.show .swatch, .show .shape { width: 9rem; height: 9rem; }
.show .letter { font-size: 9rem; }
.numeral { font-size: 10rem; font-weight: 800; line-height: 1; color: var(--accent); }
.name { font-size: 5rem; font-weight: 800; letter-spacing: 0.3rem; }
.name .hl { color: var(--accent-2); text-decoration: underline; text-underline-offset: 0.6rem; }
.pattern { display: flex; gap: 1rem; align-items: center; }
.pattern .swatch { width: 6rem; height: 6rem; }
.swatch.blank {
  display: grid;
  place-items: center;
  background: transparent;
  border: 5px dashed #b9a98f;
  font-size: 3rem;
  font-weight: 800;
  color: var(--muted);
}

.choices { display: flex; gap: 2.5rem; justify-content: center; flex: 1; align-items: center; }
.choice {
  width: 17rem;
  height: 17rem;
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
  display: grid;
  place-items: center;
  border: 5px solid transparent;
  transition: transform 0.1s;
}
.choice:active { transform: scale(0.95); }
.choice.right { border-color: var(--accent); background: #e9f6ef; animation: pop 0.4s ease; }
.choice.wobble, .wobble { animation: wobble 0.45s ease; }

.adult-row { display: flex; flex-direction: column; align-items: center; gap: 1.2rem; flex: 1; justify-content: center; }
.adult-hint { font-size: 1.4rem; color: var(--muted); max-width: 40rem; text-align: center; margin: 0; }
.adult-row .big-btn { min-width: 20rem; }

.swatch { display: block; width: 10rem; height: 10rem; border-radius: 50%; border: 4px solid rgba(0, 0, 0, 0.12); }
.shape { width: 11rem; height: 11rem; }
.letter { font-size: 8rem; font-weight: 800; line-height: 1; }
.emoji { font-size: 8rem; line-height: 1; }
.emoji.big { font-size: 11rem; }

.dots { display: flex; flex-wrap: wrap; gap: 0.7rem; justify-content: center; align-content: center; max-width: 13rem; }
.dot { width: 2.4rem; height: 2.4rem; border-radius: 50%; }
.dots-1 .dot, .dots-2 .dot, .dots-3 .dot { width: 3.4rem; height: 3.4rem; }

/* ---------- Overlays ---------- */

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(45, 42, 38, 0.45);
  display: grid;
  place-items: center;
  z-index: 10;
}
.panel {
  background: var(--bg);
  border-radius: 36px;
  padding: 2.5rem 3rem;
  min-width: 34rem;
  max-width: 80vw;
  max-height: 90vh;
  overflow: auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}
.panel h2 { margin: 0; font-size: 2.4rem; }
.reading { font-size: 1.9rem; line-height: 1.6; max-width: 55rem; white-space: normal; }
.ref { margin: 0; color: var(--muted); font-size: 1.3rem; }
.celebrate { font-size: 7rem; animation: pop 0.6s ease; }
.stars-row { font-size: 3rem; margin: 0; }
.treat { font-size: 1.8rem; margin: 0; }

.pin-dots { display: flex; gap: 1rem; }
.pin-dots span { width: 1.6rem; height: 1.6rem; border-radius: 50%; border: 3px solid var(--muted); }
.pin-dots span.on { background: var(--ink); border-color: var(--ink); }
.pin-pad { display: grid; grid-template-columns: repeat(3, 5.5rem); gap: 1rem; }
.pin-pad button {
  height: 5.5rem;
  border-radius: 50%;
  background: var(--card);
  box-shadow: var(--shadow);
  font-size: 2rem;
  font-weight: 700;
}

.spark {
  position: fixed;
  z-index: 20;
  pointer-events: none;
  font-size: 2.4rem;
  animation: spark 0.9s ease-out forwards;
}

@keyframes spark {
  from { transform: translate(-50%, -50%) scale(0.6); opacity: 1; }
  to { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1.2); opacity: 0; }
}
@keyframes pop { 0% { transform: scale(0.8); } 60% { transform: scale(1.08); } 100% { transform: scale(1); } }
@keyframes wobble {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-14px); }
  40% { transform: translateX(12px); }
  60% { transform: translateX(-8px); }
  80% { transform: translateX(5px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Grown-ups area ---------- */

.admin {
  font-size: 1rem;
  padding: 1.5rem 2rem 4rem;
  max-width: 70rem;
  margin: 0 auto;
  width: 100%;
  -webkit-user-select: text;
  user-select: text;
}
.admin-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  background: var(--bg);
  padding: 0.8rem 0;
  z-index: 5;
  border-bottom: 2px solid var(--line);
}
.admin-head h1 { margin: 0; font-size: 1.8rem; }
.admin-head .big-btn { font-size: 1.2rem; padding: 0.7rem 1.6rem; }
.admin-section { background: var(--card); border-radius: 20px; padding: 1.2rem 1.5rem; margin-top: 1.2rem; border: 2px solid var(--line); }
.admin-section h2 { margin: 0 0 0.8rem; font-size: 1.4rem; }
.admin-section h3 { margin: 1.2rem 0 0.4rem; font-size: 1.1rem; color: var(--muted); }
.admin .note { color: var(--muted); margin: 0 0 0.8rem; }
.admin input, .admin textarea, .admin select {
  font: inherit;
  padding: 0.55rem 0.7rem;
  border: 2px solid var(--line);
  border-radius: 10px;
  background: #fff;
  width: 100%;
}
.admin textarea { resize: vertical; }
.admin button {
  background: #f1ebe1;
  border-radius: 10px;
  padding: 0.5rem 0.9rem;
  font-weight: 600;
  white-space: nowrap;
}
.admin button.recording { background: var(--accent-2); color: #fff; }
.admin .big-btn { background: var(--accent); color: #fff; }
.admin .add { margin-top: 0.6rem; }
.field { display: flex; flex-direction: column; gap: 0.3rem; margin-bottom: 0.8rem; }
.field span { font-weight: 600; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.step-row, .rec-row, .level-row {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  padding: 0.35rem 0;
  border-bottom: 1px solid #f1ebe1;
}
.step-row .emoji-in { width: 4rem; text-align: center; font-size: 1.3rem; flex: none; }
.step-row.fixed input { background: #faf6ef; }
.fixed-note { color: var(--muted); white-space: nowrap; font-size: 0.9rem; }
.rec-label { flex: 1; }
.rec-status { width: 7rem; color: var(--muted); font-size: 0.9rem; }
.rec-row.has .rec-status { color: var(--accent); font-weight: 600; }
.level-area { width: 18rem; font-weight: 600; }
.level-now { flex: 1; }
.level-stat { color: var(--muted); font-size: 0.9rem; width: 12rem; }
.level-row select { width: 14rem; }
.groups { color: var(--muted); margin: 0.6rem 0 0; }
.big-count { font-size: 1.3rem; font-weight: 700; margin: 0 0 0.8rem; }

@media (max-width: 900px) {
  .two { grid-template-columns: 1fr; }
  .home { flex-direction: column; }
  .tile { width: 11rem; height: 11rem; font-size: 1.2rem; }
  .tile-icon { font-size: 4rem; }
  .choice { width: 10rem; height: 10rem; }
  .choices { gap: 1rem; }
}

/* Grown-ups tabs */
.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0 1.5rem;
  padding-bottom: 0.8rem;
  border-bottom: 2px solid var(--line);
}
.admin-tab {
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: 999px;
  padding: 0.55rem 1.1rem;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.admin-tab:hover {
  border-color: var(--accent);
}
.admin-tab.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* Settings and cards */
.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
  gap: 1.2rem;
}
.admin-card {
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 16px;
  padding: 1.2rem;
}
.admin-card.full-width {
  grid-column: 1 / -1;
}
.field-checkbox {
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
  margin-bottom: 1rem;
  cursor: pointer;
}
.field-checkbox input[type="checkbox"] {
  width: 1.4rem;
  height: 1.4rem;
  margin-top: 0.2rem;
  flex: none;
  cursor: pointer;
}
.field-label {
  font-weight: 700;
  display: block;
}
.field-hint {
  color: var(--muted);
  font-size: 0.85rem;
  display: block;
  margin-top: 0.15rem;
}

/* Whose voice & recording styles */
.voices-panel {
  background: #fbf9f4;
  border: 2px solid var(--line);
  border-radius: 16px;
  padding: 1.2rem;
  margin-bottom: 1.2rem;
}
.voice-current-row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.8rem;
}
.voice-current-row select {
  width: auto;
  min-width: 12rem;
  font-weight: 700;
}
.voices-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0.8rem 0;
}
.voice-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.voice-idx {
  width: 1.6rem;
  font-weight: 700;
  color: var(--muted);
}
.voice-row input {
  max-width: 16rem;
}
.admin-divider {
  border: 0;
  border-top: 2px dashed var(--line);
  margin: 1.5rem 0;
}

.teaka-link {
  font-size: 0.82rem;
  font-weight: 700;
  color: #1565c0;
  text-decoration: none;
  padding: 0.25rem 0.55rem;
  border-radius: 8px;
  background: #e3f2fd;
  white-space: nowrap;
}
.teaka-link:hover {
  text-decoration: underline;
  background: #bbdefb;
}

.upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: #f1ebe1;
  border-radius: 10px;
  padding: 0.5rem 0.85rem;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  white-space: nowrap;
}
.upload-btn:hover {
  background: #e6dfd4;
}

.voice-tag {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: #e8f5e9;
  color: #2e7d32;
  white-space: nowrap;
}
.voice-tag.current {
  background: var(--accent);
  color: #fff;
}
.voice-tag.legacy {
  background: #efebe9;
  color: #5d4037;
}
.rec-empty {
  color: var(--muted);
  font-size: 0.9rem;
}

/* School readiness page */
.school-page {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}
.school-summary {
  font-size: 1.1rem;
  margin: 0.4rem 0 0.8rem;
}
.school-bar-wrap {
  width: 100%;
  height: 1.1rem;
  background: #eae2d5;
  border-radius: 999px;
  overflow: hidden;
}
.school-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
  transition: width 0.3s ease;
}
.school-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(24rem, 1fr));
  gap: 1.2rem;
}
.school-list {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}
.school-item {
  background: #faf7f0;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.7rem 0.9rem;
}
.school-item-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}
.school-skill {
  font-weight: 700;
  font-size: 1.05rem;
}
.school-note {
  color: var(--muted);
  font-size: 0.88rem;
  display: block;
}
.status-pill {
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
}
.status-pill.met {
  background: #e8f5e9;
  color: #2e7d32;
}
.status-pill.learning {
  background: #fff3e0;
  color: #e65100;
}
.status-pill.not-yet {
  background: #eeeeee;
  color: #757575;
}

/* ---------- Round 1 (18 Nov 2026) ---------- */

/* Te reo big, English small underneath (or the other way round after a swap). */
.bi { display: inline-flex; flex-direction: column; align-items: center; line-height: 1.15; }
.bi-main { display: block; }
.bi-sub { display: block; font-size: 0.55em; font-weight: 500; color: var(--muted); margin-top: 0.15em; }
.bi-inline { display: inline-flex; vertical-align: middle; }
.greet .bi, .date .bi { align-items: flex-start; }
.date .bi-sub { font-size: 0.8em; }
.big-btn .bi-sub { color: rgba(255, 255, 255, 0.85); }
.back .bi-sub { font-size: 0.6em; }
.card-label .bi-sub { font-size: 0.65em; }
.hidden { display: none !important; }

/* The poutama: a tukutuku-style stairway. */
.poutama .step { fill: #efe6d6; }
.poutama .step.done { fill: #2d2a26; }
.poutama .tread { fill: #d9c7a7; }
.poutama .tread.done { fill: var(--accent-2); }
.poutama .me { font-size: 22px; }
.poutama-tile { width: 9rem; height: 6.5rem; }
.tile-poutama { background: #fff7e8; }
.poutama-screen { flex: 1; padding: 0 2rem 2rem; display: flex; flex-direction: column; gap: 1.5rem; }
.poutama-wrap { display: flex; justify-content: center; }
.poutama-big { width: min(70vw, 60rem); max-height: 45vh; }
.climbs { display: grid; gap: 0.8rem; max-width: 50rem; width: 100%; margin: 0 auto; }
.climb-row { display: flex; align-items: center; gap: 1rem; font-size: 1.3rem; }
.climb-icon { font-size: 2rem; }
.climb-name { width: 18rem; }
.climb-name .bi { align-items: flex-start; }
.climb-bar { flex: 1; height: 1.2rem; border-radius: 999px; background: #eadfcd; overflow: hidden; }
.climb-bar i { display: block; height: 100%; background: var(--accent); }
.tile-steps { font-size: 1rem; letter-spacing: 0.15rem; color: var(--accent); }

.toast {
  position: fixed; left: 50%; top: 1.5rem; transform: translateX(-50%); z-index: 30;
  background: var(--accent); color: #fff; font-size: 1.6rem; font-weight: 700;
  padding: 0.8rem 2rem; border-radius: 999px; box-shadow: var(--shadow); animation: pop 0.4s ease;
}
.toast .bi-sub { color: rgba(255, 255, 255, 0.85); }
.banner { background: #e9f6ef; border-radius: 20px; padding: 0.8rem 1.5rem; font-size: 1.4rem; font-weight: 700; text-align: center; }

/* Number pictures: dice, ten frames, rods, tallies, objects. */
.dice { display: grid; grid-template-columns: repeat(3, 2.6rem); grid-template-rows: repeat(3, 2.6rem); gap: 0.3rem; padding: 0.6rem; border: 4px solid #2d2a26; border-radius: 1rem; background: #fff; }
.dice .pip { display: grid; place-items: center; }
.dice .pip i { width: 2rem; height: 2rem; border-radius: 50%; }
.frame { display: grid; grid-template-columns: repeat(5, 2.4rem); gap: 0.25rem; padding: 0.3rem; border: 3px solid #2d2a26; background: #2d2a26; }
.frame .cell { width: 2.4rem; height: 2.4rem; background: #fff; display: grid; place-items: center; }
.frame .cell i { width: 1.8rem; height: 1.8rem; border-radius: 50%; }
.rod { display: flex; border: 3px solid rgba(0, 0, 0, 0.35); border-radius: 0.4rem; overflow: hidden; }
.rod .unit { width: 1.3rem; height: 3rem; background: var(--rod); border-right: 2px solid rgba(0, 0, 0, 0.18); }
.rod .unit:last-child { border-right: 0; }
.tallies { display: flex; gap: 0.8rem; }
.tally { width: 4.2rem; height: 4.6rem; stroke: #2d2a26; stroke-width: 4.5; stroke-linecap: round; }
.objects { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.2rem; max-width: 14rem; font-size: 2.4rem; line-height: 1.1; }
.objects-1, .objects-2, .objects-3 { font-size: 3.4rem; }
.choice .rod .unit { width: 1.2rem; }

.numeral.small { font-size: 3.5rem; }
.num-choice { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; }
.num-choice .dots .dot { width: 1.2rem; height: 1.2rem; }
.track { display: flex; gap: 0.4rem; }
.track-cell { width: 4.2rem; height: 4.2rem; display: grid; place-items: center; font-size: 2.2rem; font-weight: 800; background: #fff; border: 3px solid var(--line); border-radius: 0.8rem; }
.track-cell.here { background: #fff3cd; border-color: var(--gold); }
.track-cell.gap { border-style: dashed; color: var(--muted); }
.same-card { display: flex; flex-direction: column; align-items: center; font-size: 5rem; font-weight: 800; line-height: 1; }
.same-card small { font-size: 1.1rem; font-weight: 600; color: var(--muted); text-align: center; }
.sum { display: flex; align-items: center; gap: 1.5rem; }
.sum b { font-size: 4rem; color: var(--accent); }
.sounds { display: flex; gap: 1.2rem; }
.sounds span { font-size: 6rem; font-weight: 800; padding: 0 1.2rem; border-bottom: 6px solid var(--line); }
.pic { display: flex; flex-direction: column; align-items: center; gap: 0.3rem; }
.pic .emoji { font-size: 6.5rem; }
.pic-label { font-size: 1.1rem; color: var(--muted); font-weight: 600; }
.show .pic .emoji { font-size: 7rem; }
.show .emoji.big + .swatch, .show .swatch + .emoji.big, .show .frame + .emoji.big { margin-left: 2rem; }
.show { align-items: center; gap: 1rem; }

/* Counting by tapping each thing. */
.count-area { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; max-width: 70rem; margin: 0 auto; }
.count-item { position: relative; width: 8rem; height: 8rem; font-size: 4.5rem; background: var(--card); border-radius: 1.5rem; box-shadow: var(--shadow); }
.count-item.counted { background: #e9f6ef; }
.count-num { position: absolute; top: 0.2rem; right: 0.5rem; font-size: 1.8rem; font-weight: 800; color: var(--accent); }

/* The note for grown-ups. */
.adult-note { max-width: 60rem; margin: 0 auto; width: 100%; background: #fffdf7; border: 2px dashed var(--line); border-radius: 16px; padding: 0.5rem 1rem; font-size: 1rem; color: var(--ink); }
.adult-note summary { cursor: pointer; font-weight: 700; color: var(--muted); }
.adult-note div { margin-top: 0.4rem; }
.note-hint { font-weight: 700; color: var(--accent); }
.prompt h1 .bi-sub { font-size: 0.45em; }

/* ---------- Round 2 and 3 (18 Nov 2026) ---------- */

/* Ngā rākau: rods, one colour per length. */
.rakau { display: inline-flex; height: 3.2rem; border-radius: 0.35rem; overflow: hidden; box-shadow: inset 0 0 0 3px rgba(0, 0, 0, 0.25); }
.rakau.light { box-shadow: inset 0 0 0 3px rgba(0, 0, 0, 0.35); }
.rakau .ru { width: 2.6rem; height: 100%; background: var(--rk); }
.rakau .ru.marked { box-shadow: inset -2px 0 0 rgba(0, 0, 0, 0.22); }
.rakau .ru.marked:last-child { box-shadow: none; }
.choice .rakau .ru { width: 1.45rem; }
.train { display: inline-flex; gap: 0; }
.train.ten { width: calc(10 * 2.6rem); }
.train.ref { opacity: 0.35; margin-top: 0.4rem; }
.rakau-gap { display: inline-block; width: calc(var(--gap) * 2.6rem); height: 3.2rem; border: 4px dashed #b9a98f; border-radius: 0.35rem; }
.show:has(.train.ten) { flex-direction: column; }

/* Toi: mixing colours. */
.mix { display: flex; align-items: center; gap: 1.2rem; }
.mix b { font-size: 3.5rem; color: var(--muted); }
.mix .swatch { width: 7rem; height: 7rem; }

/* Feelings check-in and story cards. */
.feelings { display: grid; grid-template-columns: repeat(3, 10rem); gap: 1.2rem; }
.feeling { background: var(--card); border-radius: 1.5rem; box-shadow: var(--shadow); padding: 0.8rem; display: flex; flex-direction: column; align-items: center; gap: 0.3rem; font-size: 1.3rem; font-weight: 700; }
.feeling .emoji { font-size: 4.5rem; }
.story-card { background: #fffdf7; border: 2px dashed var(--line); border-radius: 18px; padding: 1rem 1.5rem; text-align: left; max-width: 46rem; font-size: 1.25rem; }
.story-card p { margin: 0.5rem 0; }
.story-lead { color: var(--muted); font-weight: 700; }

/* Photos added by the whānau. */
.photo-big { max-width: 34rem; max-height: 40vh; border-radius: 1.5rem; box-shadow: var(--shadow); object-fit: cover; }

/* Her companion (layered SVG; colours come from --c-body and --c-accent). */
.companion .c-body, .companion .c-tail { fill: var(--c-body); }
.companion .c-accent { fill: var(--c-accent); }
.companion .c-beak { stroke: #d99a4e; stroke-width: 6; fill: none; stroke-linecap: round; }
.companion .c-beak-fill { fill: #d99a4e; }
.companion .c-leg { stroke: #d99a4e; stroke-width: 6; stroke-linecap: round; fill: none; }
.companion .c-eye { fill: #1f1b16; }
.companion .c-eye-shine { fill: #fff; }
.companion .c-brow { stroke: #fff; stroke-width: 6; fill: none; stroke-linecap: round; }
.companion .o-hat { fill: #fdd835; stroke: #c9a400; stroke-width: 2; }
.companion .o-scarf { fill: #e53935; }
.companion .o-glasses { fill: none; stroke: #1f1b16; stroke-width: 3; }
.companion .o-flower-0, .companion .o-flower-2 { fill: #f06292; }
.companion .o-flower-1, .companion .o-flower-3 { fill: #fff176; }
.companion-tiny { width: 5rem; }
.companion-small { width: 8rem; }
.companion-big { width: 16rem; }
.companion-huge { width: min(30rem, 40vw); }
.home-side { display: flex; flex-direction: column; align-items: center; gap: 1.5rem; }
.hoa-home { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 0.6rem 1rem; display: flex; flex-direction: column; align-items: center; font-weight: 700; }
.hoa-screen { flex: 1; padding: 0 2rem 2rem; display: flex; flex-direction: column; gap: 1rem; }
.hoa-layout { display: flex; gap: 2rem; align-items: flex-start; justify-content: center; flex-wrap: wrap; }
.hoa-stage { display: flex; flex-direction: column; align-items: center; background: #fff7e8; border-radius: 2rem; padding: 1.5rem 2rem; }
.hoa-name { font-size: 2rem; font-weight: 800; }
.hoa-tools { display: flex; flex-direction: column; gap: 0.6rem; max-width: 46rem; }
.hoa-tools h3 { margin: 0.4rem 0 0; font-size: 1.4rem; }
.hoa-row { display: flex; flex-wrap: wrap; gap: 0.8rem; align-items: center; }
.hoa-pick, .hoa-outfit, .hoa-part { background: var(--card); border: 3px solid var(--line); border-radius: 1.2rem; padding: 0.5rem 0.9rem; display: flex; flex-direction: column; align-items: center; font-size: 1.1rem; font-weight: 700; }
.hoa-pick.on, .hoa-outfit.on, .hoa-part.on { border-color: var(--accent); background: #e9f6ef; }
.hoa-pick small, .hoa-outfit small { color: var(--muted); }
.paint { width: 4rem; height: 4rem; border-radius: 50%; border: 4px solid rgba(0, 0, 0, 0.15); box-shadow: var(--shadow); }
.hoa-tip { color: var(--muted); font-size: 1rem; margin: 0; }
.celebrate .companion { width: 9rem; }

/* Grown-ups: songs, photos, diary, starting check, printables, backup. */
.song-edit { margin-bottom: 1rem; }
.song-head { display: flex; gap: 0.8rem; align-items: center; margin-bottom: 0.6rem; }
.song-head input[type="text"], .song-head input:not([type]) { flex: 1; font-size: 1.1rem; font-weight: 700; }
.check-inline { display: inline-flex; align-items: center; gap: 0.4rem; white-space: nowrap; }
.check-inline input { width: auto; }
.check-line { display: flex; padding: 0.25rem 0; }
.photo-row { display: flex; gap: 1rem; align-items: flex-start; padding: 0.8rem 0; border-bottom: 1px solid #f1ebe1; }
.photo-row img { width: 9rem; height: 9rem; object-fit: cover; border-radius: 1rem; }
.photo-fields { flex: 1; display: flex; flex-direction: column; gap: 0.4rem; }
.big-upload { display: inline-block; margin-top: 1rem; font-size: 1.1rem; padding: 0.7rem 1.2rem; }
.diary { border-collapse: collapse; width: 100%; margin-bottom: 1rem; }
.diary th, .diary td { text-align: left; padding: 0.35rem 0.6rem; border-bottom: 1px solid #f1ebe1; }
.print-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 0.7rem 0; border-bottom: 1px solid #f1ebe1; }
.backup-msg { font-weight: 700; color: var(--accent); }

/* More companions (Round 4). */
.companion .c-ring { fill: #ffd54f; }
.companion .c-red, .companion .c-hook { fill: #e53935; }
.companion[data-kind="kea"] .c-hook { fill: #616161; }
.companion .c-red-leg { stroke: #e53935; stroke-width: 7; stroke-linecap: round; fill: none; }
.companion .c-leg-thick { stroke: var(--c-body); stroke-width: 12; stroke-linecap: round; fill: none; }
.companion .c-tail-line { stroke: var(--c-body); stroke-width: 12; stroke-linecap: round; fill: none; }
.companion .c-nose { fill: #f48fb1; }
.companion .c-nose-dot { fill: #3e2723; }
.companion .c-whisker { stroke: #5d4037; stroke-width: 2; fill: none; }
.companion .c-ear { fill: var(--c-body); filter: brightness(0.8); }
.companion .c-wing { fill: var(--c-body); filter: brightness(0.75); }
.companion .o-cape { fill: #c62828; }
.companion .o-bow { fill: #ec407a; }
.companion .o-bow-knot { fill: #ad1457; }
.companion .o-beanie { fill: #5e35b1; }
.companion .o-beanie-band { fill: #7e57c2; }
.companion .o-beanie-pom { fill: #ede7f6; }
.companion .o-crown { fill: #fbc02d; stroke: #c49000; stroke-width: 2; }
.companion .o-band { stroke: #283593; stroke-width: 5; fill: none; }
.companion .o-star { fill: #fff59d; stroke: #fbc02d; stroke-width: 1.5; }
.companion .o-shades { fill: #212121; }
.hoa-tools .hoa-row { max-width: 46rem; }
.hoa-pick { min-width: 7rem; }

/* ---------- Companion animation (Round 4) ----------
   Calm by default: breathing and blinking on the home and companion screens,
   bobbing while the question is being asked, still while she decides, a hop
   when she's right, and a bigger dance for learning she hasn't done before.
   Turned off by the "Animations" setting or the computer's reduced-motion setting. */

@keyframes c-breathe { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(1.03); } }
@keyframes c-blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(0.1); } }
@keyframes c-bob { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-6px) rotate(-3deg); } }
@keyframes c-hop {
  0% { transform: translateY(0) scale(1, 1); }
  20% { transform: translateY(0) scale(1.15, 0.85); }
  50% { transform: translateY(-28px) scale(0.9, 1.12); }
  80% { transform: translateY(0) scale(1.08, 0.92); }
  100% { transform: translateY(0) scale(1, 1); }
}
@keyframes c-dance {
  0% { transform: translateY(0) rotate(0) scale(1); }
  20% { transform: translateY(-30px) rotate(-12deg) scale(1.1); }
  40% { transform: translateY(0) rotate(10deg) scale(0.95, 1.05); }
  60% { transform: translateY(-36px) rotate(360deg) scale(1.12); }
  80% { transform: translateY(0) rotate(370deg) scale(1.05, 0.95); }
  100% { transform: translateY(0) rotate(360deg) scale(1); }
}

body.animated .companion .c-all { transform-box: fill-box; transform-origin: 50% 100%; }
body.animated .companion .c-eyes { transform-box: fill-box; transform-origin: center; animation: c-blink 4.3s infinite; }
body.animated .hoa-home .companion .c-all,
body.animated .hoa-stage .companion .c-all { animation: c-breathe 3s ease-in-out infinite; }
body.animated .q-companion.talking .companion { animation: c-bob 0.6s ease-in-out infinite; }
body.animated .companion.hop { animation: c-hop 0.7s ease; }
body.animated .companion.dance { animation: c-dance 1.4s ease; }

.q-companion { position: fixed; right: 1.5rem; bottom: 1.2rem; z-index: 5; pointer-events: none; }
.q-companion .companion { width: 9rem; }
.fresh-badge { position: fixed; left: 50%; top: 40%; transform: translate(-50%, -50%); z-index: 25; background: var(--gold); color: #2d2a26; font-size: 2.6rem; font-weight: 800; padding: 1rem 2.4rem; border-radius: 999px; box-shadow: var(--shadow); animation: pop 0.5s ease; pointer-events: none; }

/* Numbers past ten: two ten frames side by side. */
.frames { display: inline-flex; gap: 0.6rem; }
.frames .frame { grid-template-columns: repeat(5, 1.5rem); }
.frames .frame .cell { width: 1.5rem; height: 1.5rem; }
.frames .frame .cell i { width: 1.1rem; height: 1.1rem; }

/* Sentences: on top / underneath scenes. */
.scene { display: flex; flex-direction: column; align-items: center; font-size: 4.5rem; line-height: 1; }
.scene.below { flex-direction: column-reverse; }
.scene .scene-box { font-size: 5rem; }

/* Time and days. */
.time-card { display: flex; flex-direction: column; align-items: center; font-size: 5rem; }
.time-card b { font-size: 2rem; }
.day-card { display: flex; flex-direction: column; align-items: center; font-size: 2rem; }
.day-card small { font-size: 1rem; color: var(--muted); }
.week { display: flex; gap: 0.4rem; flex-wrap: wrap; justify-content: center; }
.day-cell { padding: 0.6rem 0.9rem; background: #fff; border: 3px solid var(--line); border-radius: 0.8rem; font-size: 1.3rem; font-weight: 700; }
.day-cell.here { background: #fff3cd; border-color: var(--gold); }
.day-cell.gap { border-style: dashed; color: var(--muted); }

/* Money. */
.coin { width: var(--size); height: var(--size); border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff8, transparent 45%), var(--coin); border: 4px solid rgba(0, 0, 0, 0.18); display: grid; place-items: center; box-shadow: inset 0 0 0 6px rgba(255, 255, 255, 0.25); }
.coin span { font-size: 1.5rem; font-weight: 800; color: #3e2b14; }
.coins { display: flex; gap: 0.8rem; flex-wrap: wrap; justify-content: center; }

/* The natural world. */
.sky { width: 11rem; height: 9rem; }
.choice .companion { width: 11rem; }

/* Turning round (front, sides, back). */
@keyframes c-turn-out { from { transform: scaleX(1); } to { transform: scaleX(0.05); } }
@keyframes c-turn-in { from { transform: scaleX(0.05); } to { transform: scaleX(1); } }
body.animated .companion.turn-out { animation: c-turn-out 0.16s ease-in forwards; }
body.animated .companion.turn-in { animation: c-turn-in 0.2s ease-out; }
.hoa-turn-holder { background: transparent; padding: 0; }
.hoa-turns { display: flex; gap: 1rem; margin-top: 0.6rem; }
.hoa-turn { background: var(--card); border: 3px solid var(--line); border-radius: 999px; padding: 0.5rem 1.2rem; font-size: 1.2rem; font-weight: 700; }
.hoa-home-pic { display: block; }

/* Companion actions: floating notes, z z z and food. */
@keyframes c-float-up { from { transform: translate(-50%, 0) scale(0.8); opacity: 0; } 20% { opacity: 1; } to { transform: translate(-50%, -70px) scale(1.2); opacity: 0; } }
.c-float { position: fixed; z-index: 30; pointer-events: none; font-size: 2.4rem; font-weight: 800; color: var(--accent); animation: c-float-up 1.6s ease-out forwards; }
.c-float.c-z { color: #5c6bc0; font-size: 2rem; animation-duration: 1.8s; }
.c-float.c-food { animation: none; transform: translate(-50%, 0); font-size: 2.2rem; }
.hoa-action { background: var(--card); border: 3px solid var(--line); border-radius: 1.2rem; padding: 0.5rem 0.9rem; display: flex; flex-direction: column; align-items: center; font-size: 1.1rem; font-weight: 700; }
.hoa-action small { color: var(--muted); }
.hoa-action.cant { color: var(--muted); border-style: dashed; }
/* Parts turn about their own pivot points. */
.companion [class^="p-"] { transform-box: view-box; }

/* Colouring every part (Round 6). */
.companion .c-wing { fill: var(--c-wing, var(--c-body)); }
.companion .o-hat { fill: var(--o-hat, #fdd835); }
.companion .o-cape { fill: var(--o-cape, #c62828); }
.companion .o-scarf { fill: var(--o-scarf, #e53935); }
.paint.on { outline: 4px solid var(--accent); outline-offset: 2px; }
.paint-locked { color: var(--muted); font-size: 0.95rem; padding: 0.3rem 0.6rem; border: 2px dashed var(--line); border-radius: 999px; }
.palette { display: inline-flex; gap: 0; border-radius: 999px; overflow: hidden; border: 3px solid var(--line); padding: 0; }
.palette span { width: 2rem; height: 2.4rem; }
.routine-hoa { margin-left: auto; display: inline-flex; }
.routine-hoa .companion { width: 140px; height: 140px; }
.jar-hoa { display: inline-flex; vertical-align: middle; }
.jar-hoa .companion { width: 120px; height: 120px; }

/* ATLAS preview: accessible controls and one switch for optional motion. */
body:not(.animated) *, body:not(.animated) *::before, body:not(.animated) *::after { animation: none !important; transition: none !important; }
body[data-presentation="playful"] .spark { display: none; }
button, input, select { min-height: 48px; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 4px solid #006c70; outline-offset: 3px; }
.learning-modes, .question-tools, .friend-actions { display:flex; gap:12px; flex-wrap:wrap; margin:16px 0; }
.learning-modes [aria-pressed="true"] { outline:3px solid #006c70; }
.adventures { padding:16px; border:2px solid #b8d8ce; border-radius:16px; }
.adventures .big-btn { margin:8px; font-size:1.1rem; }
.adventures small { display:block; font-size:.9rem; }
.support-note { max-width:800px; padding:12px; background:#f1f8ee; border-radius:12px; }
.support-note:empty { display:none; }
.choice.demonstrated { outline:5px solid #006c70; }
.save-status { max-width:280px; font-size:.85rem; color:#653a00; }
.workshop-area { display:flex; gap:12px; flex-wrap:wrap; align-items:center; padding:8px; border-bottom:1px solid #ccc; }
.workshop-area b { width:180px; }
.review-list { max-height:360px; overflow:auto; }
.review-list > div { padding:8px; border-bottom:1px solid #ccc; }
.review-list small { display:block; }
#pack-choices label, #pack-preview label { display:block; }
.preview-banner { position:fixed; left:0; top:0; width:100%; z-index:1000; padding:8px; background:#ffe499; color:#111; text-align:center; }
body:has(.preview-banner) { padding-top:75px; }
.recording-preview { max-width:min(90vw,650px); border-radius:18px; padding:24px; }
.recording-preview::backdrop { background:#0008; }

.creative { padding:24px; max-width:1000px; margin:auto; }
.creative-tools { display:flex; gap:8px; flex-wrap:wrap; }
.creative-tools button { min-width:48px; }
.creative-board { position:relative; border:3px solid #8bbbaa; border-radius:16px; margin:16px 0; background:#fff; }
.creative-board svg { width:100%; display:block; touch-action:manipulation; }
.creative-board > div { position:absolute; right:5px; bottom:5px; pointer-events:none; }
.creative label { display:block; margin:16px 0; }
.creative textarea, .creative input { display:block; width:100%; }

/* Life-learning activities: large controls and persistent communication choices. */
.life-screen{max-width:1100px;margin:auto;padding:24px 24px 130px;width:100%;}
.life-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:16px;margin:20px 0;}
.life-card{min-height:100px;white-space:normal;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;}
.life-card>span[aria-hidden]{font-size:2.4rem;}
.life-field{display:block;margin:18px 0;font-size:1.25rem;}
.life-field input,.life-field textarea,.life-field select{display:block;width:100%;margin-top:8px;padding:12px;font:inherit;}
.life-field textarea{min-height:110px;}
.life-guide{display:block;padding:16px;border-radius:12px;background:#edf6ee;line-height:1.5;}
.life-photo{width:100%;max-height:240px;object-fit:contain;}
.memory-sequence{font-size:3rem;padding:24px;text-align:center;}
.life-message{font-size:1.2rem;padding:12px;}
.life-comparison{border:2px solid #579e8c;border-radius:14px;padding:18px;}
.portfolio-card{padding:16px;border:2px solid #bdd4c8;border-radius:14px;}
.communication-board{position:fixed;right:12px;bottom:12px;z-index:80;max-width:min(94vw,620px);}
.communication-choices{padding:12px;background:#fff;border:3px solid #31796b;border-radius:16px;box-shadow:0 4px 18px #0003;max-height:65vh;overflow:auto;display:flex;gap:10px;flex-wrap:wrap;}
.communication-choices .big-btn{min-height:84px;flex:1 1 130px;}
.question-tools .big-btn,.creative-tools .big-btn{min-height:78px;font-size:1.15rem;}
.help-nudge{outline:5px solid #087f7b;outline-offset:6px;}
.draft-warning{background:#fff2c6;padding:12px;}
/* Seven home tiles: four across so Te Poutama stays on screen. */
.home .tiles { gap: 1.5rem; max-width: calc(4 * 14rem + 3 * 1.5rem); }
.home .tile { width: 14rem; height: 14rem; }
/* The help button sits bottom-left, away from the star jar and her companion. */
.communication-board { right: auto; left: 12px; }
.communication-board { max-width: min(94vw, 1100px); }
.communication-choices { flex-wrap: wrap; }
.communication-choices .big-btn { flex: 0 1 140px; min-height: 84px; }
.cmd-panel { margin-top: 1rem; padding: 1rem; border: 3px dashed var(--line); border-radius: 1.2rem; }
.cmd-strip { min-height: 4.5rem; display: flex; align-items: center; justify-content: center; font-size: 2rem; font-weight: 800; background: var(--card); border-radius: 1rem; margin: 0.5rem 0 1rem; padding: 0.5rem 1rem; text-align: center; }
.cmd-empty { color: var(--muted); font-size: 1.3rem; }
.cmd-word { font-size: 1.5rem; font-weight: 800; padding: 0.6rem 1.1rem; border-radius: 999px; border: 3px solid var(--accent); background: var(--card); }
.cmd-word:disabled { opacity: 0.4; }
/* Her friend stays in view while she scrolls through colours and outfits. */
.hoa-stage { position: sticky; top: 1rem; align-self: flex-start; }
.cmd-panel { margin-top: 0; }
.cmd-panel .hoa-row { flex-wrap: wrap; }
/* Room at the bottom so the floating help button never hides a control. */
body:has(#communication-root) main { padding-bottom: 110px; }
/* Today's three */
.three { margin: 0 0 1.5rem; }
.three-row { display: flex; gap: 1.5rem; flex-wrap: wrap; justify-content: center; }
.three-card { position: relative; width: 17rem; min-height: 13rem; border-radius: var(--radius); box-shadow: var(--shadow); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.4rem; font-size: 1.5rem; border: none; }
.three-kind { position: absolute; top: 0.6rem; left: 0.8rem; font-size: 1rem; font-weight: 800; background: #ffffffcc; border-radius: 999px; padding: 0.2rem 0.7rem; }
.three-card .tick { display: none; position: absolute; top: 0.4rem; right: 0.8rem; font-size: 2rem; color: #2e7d32; }
.three-card.done { opacity: 0.75; }
.three-card.done .tick { display: block; }
.three-next { font-size: 1.6rem; margin: 0.5rem 0 1rem; }
.three-kind { position: static; margin-bottom: 0.3rem; }
/* Printing her book: just the portfolio pages, one card per block. */
@media print {
  body.printing-book .topbar, body.printing-book #communication-root, body.printing-book .life-screen > .row,
  body.printing-book .life-screen button, body.printing-book .life-screen label, body.printing-book .life-message { display: none !important; }
  body.printing-book .portfolio-card { break-inside: avoid; border: 2px solid #999; margin: 0 0 1rem; padding: 1rem; }
  body.printing-book .life-photo { max-width: 100%; max-height: 10cm; }
}
.reo-list .reo-text { font-weight: 700; font-size: 1.1rem; }

/* Body parts that move (0.9): beaks that open, mouths, wings for flying, new friends. */
.companion .c-foot { fill: #f4a7a0; }
.companion[data-kind="toroa"] .c-foot { fill: #c9b8b0; }
.companion .c-leg-dark { stroke: #4e4444; stroke-width: 8; stroke-linecap: round; fill: none; }
.companion .c-comb { fill: #e53935; }
.companion .c-stripe { fill: none; stroke: var(--c-accent); stroke-width: 4; stroke-linecap: round; }
.companion .c-wing-dot { fill: #fff8e1; }
.companion .c-mouth { fill: #5d2b2b; }
.companion .c-low { filter: brightness(0.8); }
.companion .p-mouth { transform: scaleY(0.14); }
.companion .p-flywing, .companion .p-flywing2 { opacity: 0; }
.companion[data-kind="korora"] .c-beak-fill, .companion[data-kind="kotare"] .c-beak-fill { fill: #3b3b3b; }
.companion[data-kind="toroa"] .c-beak-fill { fill: #f0c6a0; }
.companion[data-kind="kaka"] .c-hook { fill: #7d7d7d; }
/* Naming a body part: it glows while it moves. */
.companion .part-glow { filter: drop-shadow(0 0 6px #ffd54f) drop-shadow(0 0 2px #ffb300); }
.hoa-body-parts { max-width: min(30rem, 40vw); margin-top: 0.8rem; }
.hoa-body-parts h3 { margin: 0 0 0.4rem; font-size: 1.2rem; }
.hoa-body-parts .hoa-row { gap: 0.5rem; }

/* Flying and pointing reach outside the drawing's box. */
svg.companion { overflow: visible; }

/* Mōhiotanga: where her friend lives. */
.hoa-fact { display: flex; gap: 0.8rem; align-items: center; max-width: min(30rem, 40vw); margin-top: 0.8rem; background: #fff; border-radius: 1.2rem; padding: 0.6rem 1rem; box-shadow: var(--shadow); font-size: 1.3rem; font-weight: 700; }
.hoa-fact-icon { font-size: 2.6rem; }
.hoa-fact-note { margin: 0.3rem 0 0; font-size: 0.95rem; font-weight: 400; color: var(--muted); }

/* Kōrero tahi: building sentences, filling the gap, singing together (0.11). */
.talk-screen { padding: 0 2rem 2rem; }
.talk-layout { display: flex; gap: 2rem; align-items: flex-start; }
.talk-friend { position: sticky; top: 1rem; background: #fff7e8; border-radius: 2rem; padding: 1rem; }
.talk-friend .companion { width: 14rem; }
.talk-main { flex: 1; display: flex; flex-direction: column; gap: 0.6rem; }
.talk-main h3 { margin: 0.4rem 0 0; font-size: 1.3rem; }
.talk-strip { min-height: 6rem; background: #fff; border: 4px dashed var(--line); border-radius: 1.5rem; display: flex; align-items: center; gap: 0.8rem; padding: 0.6rem 1.2rem; flex-wrap: wrap; }
.talk-strip-card { font-size: 3.4rem; }
.talk-strip-empty { font-size: 2.6rem; opacity: 0.5; }
.talk-sentence { font-size: 2.4rem; font-weight: 800; margin-left: 0.6rem; }
.talk-row { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.talk-card { background: var(--card); border: 4px solid var(--line); border-radius: 1.2rem; width: 7rem; padding: 0.4rem; display: flex; flex-direction: column; align-items: center; }
.talk-card.on { border-color: var(--accent); background: #e9f6ef; }
.talk-card-pic { font-size: 3rem; line-height: 1.1; }
.talk-card-word { font-size: 1.1rem; font-weight: 700; }
.talk-rec.on { background: #e53935; color: #fff; }
.talk-more { margin-top: 0.8rem; }
.tile-talk { background: #e1f5fe; }
.talk-pic { font-size: 5rem; }
.whole-sentence { color: var(--accent); }
.where-scene { position: relative; display: inline-block; width: 9rem; height: 9rem; }
.where-box { position: absolute; left: 1rem; width: 7rem; height: 5.6rem; top: 3.2rem; z-index: 1; }
.where-cat { position: absolute; font-size: 3.2rem; left: 2.8rem; z-index: 0; }
.where-in .where-cat { top: 1.4rem; }
.where-on .where-cat { top: 0.4rem; z-index: 2; }
.where-on .where-box { top: 3.6rem; }
.where-under .where-box { top: 0.8rem; }
.where-under .where-cat { top: 5.1rem; z-index: 0; }
/* "I want… / I feel… / Look at…" in the help panel. */
.frame-row { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-top: 0.4rem; grid-column: 1 / -1; }
.frame-btn { background: #fff; border: 3px solid var(--line); border-radius: 999px; padding: 0.3rem 0.8rem; font-size: 1.1rem; font-weight: 700; }
.frame-btn.on { border-color: var(--accent); background: #e9f6ef; }
.frame-items { display: flex; gap: 0.4rem; flex-wrap: wrap; grid-column: 1 / -1; }
.frame-item { background: #fff; border: 3px solid var(--line); border-radius: 1rem; width: 5.2rem; padding: 0.2rem; display: flex; flex-direction: column; align-items: center; font-size: 2rem; }
.frame-item small { font-size: 0.75rem; }
/* Singing together. */
.sing-line { font-size: 2.6rem; font-weight: 800; min-height: 4rem; text-align: center; }
.sing-gap { display: inline-block; min-width: 4rem; border-bottom: 5px solid var(--gold); color: var(--accent); margin: 0 0.4rem; }
.sing-friend { display: flex; justify-content: center; }
.sing-friend .companion { width: 9rem; }
.sing-friend.waiting .companion { filter: drop-shadow(0 0 10px #ffd54f); }
.song-pauses { margin-top: 0.6rem; font-size: 0.95rem; display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
@media (max-width: 1100px) { .talk-layout { flex-direction: column; } .talk-friend { position: static; } }

/* The help panel, compact (0.11): icon and a short word on each button, so the
   open panel stays small and never covers what she's doing. */
.communication-board { max-width: min(94vw, 760px); }
.communication-choices { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; padding: 8px; }
.communication-choices .big-btn { min-height: 0; flex: none; padding: 6px 4px; border-radius: 14px; font-size: 0.95rem; display: flex; flex-direction: column; align-items: center; line-height: 1.1; }
.communication-choices .big-btn > span[aria-hidden] { font-size: 1.6rem; }
.communication-choices .big-btn .bi-sub { font-size: 0.7rem; }
.communication-choices [role="status"] { grid-column: 1 / -1; margin: 0; font-weight: 700; font-size: 1.2rem; }
.frame-row, .frame-items { grid-column: 1 / -1; margin: 0; }

/* More subjects (0.12). */
.subj-pic { font-size: 5.4rem; }
.subj-pic.subj-big { font-size: 6.8rem; }
.subj-pic.subj-mid { font-size: 4.4rem; }
.subj-pic.subj-small { font-size: 2.6rem; }
.subj-svg { width: 8rem; height: 8rem; }
.subj-svg.wide { width: 9.5rem; height: 3rem; }
.subj-card { font-size: 3.6rem; letter-spacing: 0.2rem; }
.subj-dots { font-size: 2.6rem; }
.subj-updown { display: flex; justify-content: center; width: 6.5rem; height: 8rem; font-size: 3.6rem; border-bottom: 6px solid #8bc34a; }
.subj-updown.is-up { align-items: flex-start; }
.subj-updown.is-down { align-items: flex-end; }
/* First, next, last: each picture she puts in order gets its number. */
.choice.ordered { border-color: var(--accent); background: #e9f6ef; position: relative; }
.choice.ordered::after { content: attr(data-n); position: absolute; top: 0.4rem; left: 0.6rem; background: var(--accent); color: #fff; font-weight: 800; font-size: 1.6rem; width: 2.4rem; height: 2.4rem; border-radius: 50%; display: grid; place-items: center; }
/* Te ara: the grid, her friend, and the arrows she lines up. */
.ara-wrap { display: flex; flex-direction: column; align-items: center; gap: 0.8rem; }
.ara { position: relative; display: grid; grid-template-columns: repeat(var(--w), 5rem); grid-template-rows: repeat(var(--h), 5rem); gap: 4px; background: #c5e1a5; padding: 4px; border-radius: 1rem; }
.ara-cell { background: #f1f8e9; border-radius: 0.6rem; display: grid; place-items: center; font-size: 2.8rem; }
.ara-friend { position: absolute; left: 4px; top: 4px; width: 5rem; height: 5rem; display: grid; place-items: center; transform: translate(calc(var(--x) * (5rem + 4px)), calc(var(--y) * (5rem + 4px))); transition: transform 0.45s ease; pointer-events: none; }
.ara-friend .companion { width: 4.4rem; }
.ara-prog { min-height: 3.4rem; display: flex; gap: 0.3rem; align-items: center; font-size: 2.4rem; background: #fff; border: 3px dashed var(--line); border-radius: 1rem; padding: 0.2rem 1rem; min-width: 20rem; justify-content: center; }
.ara-buttons { display: flex; gap: 0.6rem; flex-wrap: wrap; justify-content: center; }
.ara-dir { font-size: 2.6rem; padding: 0.4rem 1.1rem; }
/* Tōku whānau. */
.whanau-screen { padding: 0 2rem 2rem; }
.whanau-row h3 { margin: 1rem 0 0.4rem; }
.whanau-people { display: flex; gap: 1rem; flex-wrap: wrap; }
.whanau-card { background: var(--card); border: 4px solid var(--line); border-radius: 1.4rem; padding: 0.6rem; display: flex; flex-direction: column; align-items: center; width: 11rem; }
.whanau-card img { width: 9.5rem; height: 9.5rem; object-fit: cover; border-radius: 1rem; }
.whanau-name { font-size: 1.3rem; font-weight: 800; }
.pepeha { margin-top: 1.4rem; background: #fff; border-radius: 1.4rem; padding: 1rem 1.4rem; box-shadow: var(--shadow); font-size: 1.4rem; }

/* The help button sits in the top bar (0.12.1), so it never covers anything;
   its choices drop down under the bar, over the screen, until she closes them. */
#communication-root.in-topbar { position: relative; }
#communication-root.in-topbar .communication-board { position: static; max-width: none; }
#communication-root.in-topbar .communication-board > .big-btn { padding: 0.5rem 1.3rem; font-size: 1.35rem; }
#communication-root.in-topbar .communication-choices { position: absolute; top: calc(100% + 8px); right: 0; z-index: 80; width: min(94vw, 760px); }
body:has(#communication-root.in-topbar) main { padding-bottom: 2rem; }
.bar-right { position: relative; }

/* Her friend's screen: no more sticky stage covering the pickers. Scrolled
   down, her friend docks small at the side (0.12.2). */
.hoa-stage { position: static; }
body.hoa-docked .hoa-stage { position: fixed; left: 1rem; top: 6rem; z-index: 20; padding: 0.6rem; border-radius: 1.4rem; box-shadow: var(--shadow); width: 11rem; }
body.hoa-docked .hoa-stage .companion { width: 9.5rem; }
body.hoa-docked .hoa-stage .hoa-name { font-size: 1.2rem; }
body.hoa-docked .hoa-stage .hoa-turns, body.hoa-docked .hoa-stage .hoa-fact, body.hoa-docked .hoa-stage .hoa-body-parts { display: none; }
body.hoa-docked.hoa-stacked .hoa-tools { margin-left: 12.5rem; }

/* The web app (0.13): first start, quick voice tools, family sync. */
.boot-status { text-align: center; font-size: 1.4rem; margin-top: 30vh; color: var(--muted); }
.voice-tool .panel { max-width: 56rem; }
.many-list { max-height: 55vh; overflow: auto; display: flex; flex-direction: column; gap: 0.4rem; margin: 0.8rem 0; }
.many-row { display: flex; gap: 0.6rem; align-items: center; }
.many-file { flex: 1; font-weight: 700; overflow-wrap: anywhere; }
.many-row select { flex: 1.4; font-size: 1rem; }
.guided { text-align: center; }
.guided-count { color: var(--muted); }
.guided-phrase { font-size: 3.4rem; font-weight: 800; margin: 1rem 0 0.2rem; }
.guided-sub { font-size: 1.4rem; color: var(--muted); margin-bottom: 1.2rem; }
.guided-rec.on { background: #e53935; color: #fff; }
.guided-tip { color: var(--muted); }
.quick-voices .row { display: flex; gap: 0.8rem; flex-wrap: wrap; align-items: center; }
.family-key { font-size: 1.6rem; font-weight: 800; letter-spacing: 0.15rem; background: #fff; border: 3px solid var(--accent); border-radius: 1rem; padding: 0.6rem 1rem; display: inline-block; user-select: all; }
.family-sync h4 { margin: 0.8rem 0 0.3rem; }
/* iPad: room for the home indicator and notch when it runs full screen. */
html.web-app body { padding-bottom: env(safe-area-inset-bottom); padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
