/* Kids English. Ground, ink, accent and type come from ../css/tokens.css
   so this reads as the same product as the rest of beehoc; the playful
   part (oversized touch targets, thick outlines, chunky shadows, the sky
   and sun brights used in the card art) stays local to this file. */
:root {
  --card: var(--surface);
  --sky: #7ec8e3;
  --sun: #ffd166;
  --shadow: 0 10px 0 rgba(43, 43, 43, 0.12);
  --radius: 28px;
}

html, body { min-height: 100%; }

body {
  min-height: 100dvh;
  line-height: 1.4;
}

.app {
  max-width: 960px;
  margin: 0 auto;
  padding: 16px;
}

.screen {
  display: none;
  min-height: calc(100dvh - var(--header-h) - 32px);
  flex-direction: column;
}

.screen.is-active {
  display: flex;
}

.app-title {
  margin: 12px 0 28px;
  text-align: center;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 5vw, 2.4rem);
}

.mode-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
  flex: 1;
  align-content: center;
}

@media (min-width: 640px) {
  .mode-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }
}

.topic-grid {
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 14px;
  align-content: start;
}

.mode-card {
  appearance: none;
  border: 4px solid var(--ink);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
  padding: 24px 16px 18px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  animation: pop-in 0.35s ease backwards;
}

.mode-grid .mode-card:nth-child(1) { animation-delay: 0s; }
.mode-grid .mode-card:nth-child(2) { animation-delay: 0.08s; }
.mode-grid .mode-card:nth-child(3) { animation-delay: 0.16s; }

.mode-card:active {
  transform: translateY(4px);
  box-shadow: 0 4px 0 var(--k-shadow);
}

.mode-art {
  width: min(180px, 42vw);
}

.mode-art svg,
.mode-art img {
  width: 100%;
  height: auto;
  display: block;
}

.mode-art img {
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 28px;
}

.mode-label {
  font-size: 1.3rem;
  font-weight: 800;
}

.activities-grid .mode-card {
  padding: 28px 16px 22px;
}

.topic-tile {
  padding: 12px 8px 10px;
  gap: 8px;
}

.topic-tile .mode-art {
  width: min(72px, 60%);
}

.topic-tile .mode-label {
  font-size: 0.95rem;
  text-align: center;
  line-height: 1.15;
}

/* These three keep their pastel identity in both themes — the colours are
   how a child tells the three activities apart. Because the background is
   fixed, the text on them has to be fixed too: it was inheriting the theme's
   ink, which in dark mode is near-white, and near-white on pale cream is
   invisible. Anything drawn on these cards is pinned dark here. */
.card-memorize { background: var(--k-mode-memorize); }
.card-recall { background: var(--k-mode-recall); }
.card-shadowing { background: var(--k-mode-shadowing); }
.card-memorize, .card-recall, .card-shadowing,
.card-memorize .mode-label, .card-recall .mode-label, .card-shadowing .mode-label {
  color: var(--k-ink-classic);
}

@keyframes pop-in {
  0% {
    opacity: 0;
    transform: scale(0.75);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.top-bar {
  display: flex;
  justify-content: flex-start;
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--bg);
  padding: 8px 0;
  margin: -8px 0 0;
}

.icon-btn {
  appearance: none;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 4px solid var(--ink);
  background: var(--sun);
  color: var(--ink);
  font-size: 2.4rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow);
}

.icon-btn.speaker,
.icon-btn.replay {
  background: var(--sky);
}

.icon-btn:disabled {
  opacity: 0.35;
  cursor: default;
  box-shadow: none;
}

.icon-btn:not(:disabled):active {
  transform: translateY(4px);
  box-shadow: 0 4px 0 var(--k-shadow);
}

.flash-card {
  appearance: none;
  flex: 1;
  margin: 16px 0;
  border: 4px solid var(--ink);
  border-radius: 36px;
  background: var(--card);
  box-shadow: var(--shadow);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 20px;
}

.flash-card img {
  /* Bounded by viewport height as well as width so the word and its
     Vietnamese meaning below always stay on screen. */
  width: min(400px, 78vw, 44dvh);
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 22px;
}

.flash-word {
  margin: 0;
  font-size: clamp(2.4rem, 8vw, 4.2rem);
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: lowercase;
}

/* Vietnamese meaning, revealed only after the English has been said */
.flash-meaning {
  margin: 0;
  font-size: clamp(1.3rem, 4.5vw, 2rem);
  font-weight: 700;
  color: var(--accent);
  animation: meaning-in 0.3s ease;
}
.flash-meaning[hidden] { display: none; }

@keyframes meaning-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* "Already studied" star on a topic tile */
.topic-tile { position: relative; }
.topic-done {
  position: absolute;
  top: 6px;
  right: 8px;
  font-size: 1.1rem;
  line-height: 1;
  color: var(--honey-2);
}

.flash-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
}

.dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 18px 0 8px;
}

.dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--k-sand);
}

.dot.is-on {
  background: var(--accent);
  transform: scale(1.2);
}

.recall-board {
  flex: 1;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: flex-start;
  gap: 28px;
  /* Safety net for short screens: scroll rather than squash the tiles
     (they have aspect-ratio: 1, so vertical squashing also shrinks the
     picture horizontally until it's unrecognisable). */
  overflow-y: auto;
  /* Room for the selected tile's ring. `.tile.is-selected` draws a 6px
     outline 2px outside its own box, and the first tile in each column
     sits flush against this scroll container's top edge — so the top of
     the ring was being clipped away, and the very first tile a child taps
     looked like it had a broken highlight. 8px is the outline plus its
     offset; the sides get it too so the ring is never cut on a narrow
     screen either. */
  padding: 8px;
}

.tile-row {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  max-width: 200px;
}

.tile {
  appearance: none;
  /* The picture is the thing being matched — at the old 18vw the drawing
     was too small for a child to recognise on a phone. */
  width: min(170px, 36vw);
  min-width: 104px;
  flex-shrink: 0;
  aspect-ratio: 1;
  border: 4px solid var(--ink);
  border-radius: 22px;
  background: var(--card);
  box-shadow: var(--shadow);
  cursor: pointer;
  padding: 8px;
  display: grid;
  place-items: center;
}

.tile img {
  width: 92%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 14px;
}

.tile.speaker-tile {
  font-size: 2.2rem;
  background: var(--k-sky-soft);
}

.tile.is-selected {
  outline: 6px solid var(--accent);
  outline-offset: 2px;
}

.tile.is-wrong {
  animation: shake 0.35s ease;
}

.tile.is-matched {
  cursor: default;
  box-shadow: none;
}

.tile.is-matched[data-pair="0"] { background: var(--k-pair-0); }
.tile.is-matched[data-pair="1"] { background: var(--k-pair-1); }
.tile.is-matched[data-pair="2"] { background: var(--k-pair-2); }
.tile.is-matched[data-pair="3"] { background: var(--k-pair-3); }
.tile.is-matched[data-pair="4"] { background: var(--k-pair-4); }

.celebrate {
  position: fixed;
  inset: 0;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

.celebrate[hidden] {
  display: none;
}

.stars {
  margin: 0;
  font-size: clamp(3rem, 10vw, 5rem);
  color: var(--k-gold);
}

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

.sentence-list {
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  justify-content: center;
}

.sentence-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.sentence-main {
  appearance: none;
  flex: 1;
  min-width: 0;
  border: 4px solid var(--ink);
  border-radius: 22px;
  background: var(--card);
  box-shadow: var(--shadow);
  cursor: pointer;
  padding: 12px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  font-size: clamp(1.1rem, 4vw, 1.5rem);
  font-weight: 700;
  color: var(--ink);
}

.sentence-main:active {
  transform: translateY(4px);
  box-shadow: 0 4px 0 var(--k-shadow);
}

.sentence-mic-btn {
  appearance: none;
  flex-shrink: 0;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 4px solid var(--ink);
  background: var(--accent);
  color: var(--k-white);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow);
}

.sentence-mic-btn:active {
  transform: translateY(4px);
  box-shadow: 0 4px 0 var(--k-shadow);
}

.sentence-mic-btn.is-listening {
  animation: pulse 0.9s ease-in-out infinite;
}

.recall-progress {
  text-align: center;
  font-weight: 700;
  color: var(--ink);
  opacity: 0.7;
  margin: 0 0 10px;
}

.sayit-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 0 0 14px;
}

.sayit-progress {
  font-weight: 700;
  color: var(--ink);
  opacity: 0.7;
  min-width: 140px;
  text-align: center;
}

.icon-btn.nav-btn {
  width: 56px;
  height: 56px;
  font-size: 1.8rem;
  background: var(--sky);
}

.sentence-image {
  width: 52px;
  height: 52px;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 14px;
  border: 3px solid var(--ink);
  flex-shrink: 0;
}

.sentence-text {
  flex: 1;
  text-align: left;
}

.sentence-icon {
  font-size: 1.6rem;
  flex-shrink: 0;
}

.video-overlay {
  position: fixed;
  inset: 0;
  background: var(--k-scrim);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  /* Above the sticky site header (css/nav.css, z-index 40), which otherwise
     sits over the top of every popup here — the close button included. */
  z-index: 50;
}

.video-overlay[hidden] {
  display: none;
}

.video-panel {
  width: min(480px, 100%);
  border: 4px solid var(--ink);
  border-radius: var(--radius);
  background: var(--bg);
  box-shadow: var(--shadow);
  padding: 20px 24px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.video-toolbar {
  width: 100%;
  display: flex;
  justify-content: flex-end;
}

.video-sentence {
  margin: 0;
  text-align: center;
  font-size: clamp(1.4rem, 5vw, 2rem);
  font-weight: 800;
  cursor: pointer;
}

.mic-btn {
  background: var(--accent);
  color: var(--k-white);
}

.mic-btn.is-listening {
  animation: pulse 0.9s ease-in-out infinite;
}

.video-results {
  min-height: 64px;
  text-align: center;
}

.result-stars {
  margin: 0;
  font-size: 2rem;
  color: var(--k-gold);
}

.result-text {
  margin: 4px 0 0;
  font-weight: 700;
}

@keyframes pulse {
  0%,
  100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}

@media (max-width: 520px) {
  /* The 33.33% width here dated from an older layout that put three
     tiles side by side; against today's two vertical columns it resolved
     to ~65px, which is far too small to recognise the picture. */
  .tile {
    width: min(150px, 38vw);
    min-width: 96px;
  }

  .icon-btn {
    width: 72px;
    height: 72px;
  }
}

/* Attribution for the CC BY-SA artwork — required wherever the pictures
   are shown. Hidden inside a game, where nothing should compete with the
   card a child is looking at. */
.credit { margin: 28px auto 0; max-width: 640px; padding: 0 16px 20px;
  font-size: 11.5px; line-height: 1.7; text-align: center; color: var(--k-soft); }
.credit a { color: inherit; }
body.playing .credit, body.in-game .credit { display: none; }

/* Topic name on the activities screen — English above, Vietnamese below, the
   same pairing the flashcards use. */
.activity-topic { margin: 4px 0 18px; text-align: center; display: grid; gap: 2px; }
.activity-topic-en { font-size: 1.5rem; font-weight: 800; }
.activity-topic-vi { font-size: 1rem; font-weight: 600; opacity: .75; }
.activity-topic:empty { display: none; }

/* Shown only when the device has no Vietnamese voice at all. */
.vi-note { display: flex; gap: 10px; align-items: flex-start;
  max-width: 560px; margin: 0 auto 18px; padding: 11px 14px;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface-2); font-size: 13px; line-height: 1.6;
  text-align: left; }
.vi-note-text { flex: 1; }
.vi-note-close { flex: none; background: none; border: none; cursor: pointer;
  font-size: 14px; line-height: 1; padding: 2px 4px; color: inherit; opacity: .6; }
.vi-note-close:hover { opacity: 1; }

/* ---------- completion: stars and the "what next" panel ---------- */

/* A star on an activity the child has finished for this topic. Sits in the
   card's corner rather than in the label, so it reads as a sticker earned
   and does not push the label off-centre. The topic tile keeps its own
   separate star, which means "studied at least once" — not the same claim. */
.mode-card { position: relative; }
.activity-done {
  position: absolute;
  top: 6px;
  right: 10px;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--accent);
  text-shadow: 0 1px 0 var(--k-white), 0 0 4px var(--k-glow);
}
.mode-card.is-done { border-color: var(--accent); }

.done-panel { align-items: center; text-align: center; gap: 14px; }
.done-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
  line-height: 1.4;
}
.done-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}
/* [hidden] is only user-agent strength, and .done-btn sets its own display
   — without this the "next activity" button stays on screen after the last
   activity, offering a step that does not exist. */
.done-btn[hidden] { display: none; }
.done-btn {
  display: block;
  width: 100%;
  padding: 14px 18px;
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--ink);
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
}
.done-btn.primary { background: var(--accent); }
.done-btn:active { transform: translateY(2px); }

/* Câu trước / câu sau, dưới nút mic — nơi tay bé đang ở sẵn. */
.video-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  width: 100%;
  margin-top: 4px;
}
.video-nav .icon-btn {
  width: 64px;
  height: 64px;
  font-size: 2rem;
}
.video-progress {
  min-width: 68px;
  margin: 0;
  text-align: center;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
}

/* A topic's own video from the beehoc YouTube channel: the first card in
   the activities grid, drawn like the other three (see renderTopicVideos). */
.card-video { background: var(--k-rose-soft); }
.card-video, .card-video .mode-label { color: var(--k-ink-classic); }
.mode-grid .mode-card:nth-child(4) { animation-delay: 0.24s; }
/* Square like the other cards' drawings, so all four labels line up. */
.card-video .mode-art {
  position: relative;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
}
@media (min-width: 640px) {
  /* Four cards in one row rather than three plus a lonely fourth. */
  .activities-grid:has(.card-video) { grid-template-columns: repeat(4, 1fr); gap: 14px; }
  .activities-grid:has(.card-video) .mode-art { width: min(180px, 100%); }
  .activities-grid:has(.card-video) .mode-label { font-size: 1.15rem; }
}
.card-video .mode-art img {
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  border: 3px solid var(--k-ink-classic);
}
.card-video .mode-art::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 44px;
  height: 44px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--k-sun) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 6l10 6-10 6z' fill='%232b2b2b'/%3E%3C/svg%3E") center / 22px no-repeat;
  border: 3px solid var(--k-ink-classic);
}

/* No video for this topic yet: the cover, faded, with a label where the
   play button would be. */
.card-video.is-soon { cursor: default; background: var(--k-rose-grey); }
.card-video.is-soon:active { transform: none; box-shadow: var(--shadow); }
.card-video.is-soon .mode-art img { object-fit: cover; filter: grayscale(0.6); opacity: 0.55; background: var(--k-white); }
.card-video.is-soon .mode-art::after { content: none; }
.video-soon {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  white-space: nowrap;
  padding: 6px 12px;
  border-radius: 999px;
  border: 3px solid var(--k-ink-classic);
  background: var(--k-sun);
  color: var(--k-ink-classic);
  font-size: 0.9rem;
  font-weight: 800;
}

.yt-panel { width: min(860px, 100%); padding: 14px 14px 18px; gap: 10px; }
.yt-frame { width: 100%; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: var(--video-bg); }
.yt-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.yt-subscribe {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 14px;
  background: var(--k-cream-2);
  color: var(--k-ink-classic);
  font-size: 0.95rem;
  line-height: 1.35;
  text-decoration: none;
}
.yt-subscribe:hover b { text-decoration: underline; }
.yt-subscribe-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 30px;
  height: 22px;
  border-radius: 6px;
  background: var(--k-red);
  color: var(--k-white);
}
.yt-subscribe-icon svg { width: 18px; height: 18px; }

/* =====================================================================
   Kids world (GUI plan 2.1 + 2.2, approved on the mock 2026-10-02).
   The kids page has its own top bar, Baloo 2, and five colour groups.
   Tiles are a soft tint of their group colour with the picture straight
   on it, no drop shadows; in dark mode the tiles stay light cards on a
   warm dark page, because the drawings have thick dark outlines.
   ===================================================================== */
body.kids-world {
  --k-bg: #FFF6DC; --k-ink: #3B2F25; --k-soft: #5F5040; --k-card: #FFFFFF;
  --k-dash: #D9CBA8; --k-home: #FFD45C; --k-tile-base: #FFFFFF; --k-paper: #FFFFFF; --k-tile-mix: 16%;
  --header-h: 0px;
  background: var(--k-bg); color: var(--k-ink);
  font-family: "Baloo 2", var(--font-body);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) body.kids-world {
    --k-bg: #221C2B; --k-ink: #F6EFDD; --k-soft: #BDB2C9; --k-card: #322A3E;
    --k-dash: #54486A; --k-home: #E9B949; --k-tile-base: #E8E0D2; --k-paper: #F3ECDD; --k-tile-mix: 22%;
  }
}
:root[data-theme="dark"] body.kids-world {
  --k-bg: #221C2B; --k-ink: #F6EFDD; --k-soft: #BDB2C9; --k-card: #322A3E;
  --k-dash: #54486A; --k-home: #E9B949; --k-tile-base: #E8E0D2; --k-paper: #F3ECDD; --k-tile-mix: 22%;
}
.kids-world .g-people { --c: #F07A5A; } .kids-world .g-nature { --c: #3FA866; }
.kids-world .g-food { --c: #EE9A1F; } .kids-world .g-places { --c: #4E8FE0; }
.kids-world .g-ideas { --c: #8E62D4; }
/* [hidden] is only user-agent strength; components here set display:flex
   or grid, which would otherwise win (the empty "Học tiếp" button). */
.kids-world [hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* top bar */
.k-top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; display: flex; align-items: center;
  justify-content: space-between; max-width: 1180px; margin: 0 auto; padding: 12px 16px; background: var(--k-bg); }
.k-home { width: 56px; height: 56px; border-radius: 50%; border: 0; background: var(--k-home); display: grid; place-items: center; cursor: pointer; }
.k-home svg { width: 32px; height: 32px; }
.k-parent { position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; gap: 1px;
  border: 2px dashed var(--k-dash); border-radius: 16px; padding: 5px 12px; background: transparent; color: var(--k-soft);
  font: 600 13px/1.15 var(--font-body); cursor: pointer; touch-action: none; -webkit-user-select: none; user-select: none; isolation: isolate; }
.k-parent small { font-size: 10.5px; font-weight: 500; opacity: .85; }
.k-parent-fill { position: absolute; inset: 0; width: 0; background: color-mix(in srgb, var(--k-home) 45%, transparent); z-index: -1; }
.k-parent.is-holding .k-parent-fill { width: 100%; transition: width 2s linear; }
.k-home:focus-visible, .k-parent:focus-visible, .k-tile:focus-visible, .t-mode:focus-visible, .k-continue:focus-visible {
  outline: 3px solid var(--k-link); outline-offset: 3px; }

.kids-world .app { max-width: 1180px; padding: 4px 16px 32px; }
.kids-world .screen { min-height: calc(100dvh - 90px); }

/* hello row */
.k-hello { display: grid; grid-template-columns: 108px 1fr; align-items: center; gap: 4px 8px; }
.k-bee { width: 108px; height: 108px; }
.k-bubble { position: relative; margin: 0; background: var(--k-card); border-radius: 22px; padding: 10px 16px;
  font-size: 20px; font-weight: 800; line-height: 1.2; }
.k-bubble::before { content: ""; position: absolute; left: -10px; top: 24px; border: 8px solid transparent;
  border-right-color: var(--k-card); border-left: 0; }
.k-bubble small { display: block; font-size: 14.5px; font-weight: 600; color: var(--k-soft); margin-top: 2px; }
.k-continue { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; margin-top: 8px; padding: 10px 14px;
  border: 0; border-radius: 20px; background: var(--k-card); color: var(--k-ink); font: 800 17px/1.2 "Baloo 2", var(--font-body);
  text-align: left; cursor: pointer; }
.k-continue-star { color: var(--k-star); font-size: 20px; }
.k-go { margin-left: auto; width: 38px; height: 38px; border-radius: 50%; background: var(--k-green); display: grid; place-items: center; }
.k-go svg { width: 22px; height: 22px; }

/* groups and tiles */
.k-groups { display: grid; gap: 4px; }
.k-group { padding-top: 16px; }
.k-ghead { display: flex; align-items: center; gap: 9px; margin: 0 0 12px; font: 800 20px/1.2 "Baloo 2", var(--font-body); }
.k-ghead i { width: 16px; height: 16px; border-radius: 6px; background: var(--c); }
.k-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.k-tile { --tint: color-mix(in srgb, var(--c) var(--k-tile-mix), var(--k-tile-base));
  display: flex; flex-direction: column; align-items: center; padding: 12px 8px 10px; border-radius: 26px; cursor: pointer;
  background: var(--tint); color: var(--k-ink-warm); border: 2px solid color-mix(in srgb, var(--c) 40%, var(--tint));
  font: inherit; transition: transform .12s ease; }
.k-tile:active { transform: scale(.97); }
.k-art { width: 104px; height: 104px; display: block; }
.k-art svg, .k-art img { width: 100%; height: 100%; display: block; }
.k-art.is-photo img { object-fit: cover; border-radius: 22px; }
.k-en { margin-top: 4px; font-size: 18px; font-weight: 800; line-height: 1.1; text-align: center; }
.k-vi { font-size: 13.5px; font-weight: 700; line-height: 1.2; text-align: center; color: var(--k-soft-warm); }
.k-stars { margin-top: 4px; font-size: 15px; letter-spacing: 2px; line-height: 1; color: color-mix(in srgb, var(--c) 85%, var(--video-bg)); }

/* a topic's page */
.t-wrap { display: grid; gap: 16px; padding-top: 4px; }
.t-head { --tint: color-mix(in srgb, var(--c) var(--k-tile-mix), var(--k-tile-base));
  display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 28px; background: var(--tint); color: var(--k-ink-warm);
  border: 2px solid color-mix(in srgb, var(--c) 40%, var(--tint)); }
.t-head .k-art { width: 112px; height: 112px; flex: none; }
.t-title { margin: 0; font: 800 32px/1 "Baloo 2", var(--font-body); }
.t-title span { display: block; }
.t-title .activity-topic-vi { font-size: 18px; font-weight: 700; color: var(--k-soft-warm); margin-top: 4px; }
.t-head .k-stars { display: block; font-size: 20px; margin-top: 6px; }
.t-modes { display: grid; gap: 12px; }
.t-mode { position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 22px;
  background: var(--k-card); color: var(--k-ink); border: 2px solid color-mix(in srgb, var(--m) 38%, var(--k-card));
  font: 800 21px/1.15 "Baloo 2", var(--font-body); text-align: left; cursor: pointer; }
.t-mode i { font-style: normal; width: 52px; height: 52px; flex: none; border-radius: 16px; display: grid; place-items: center; background: var(--m); }
.t-mode i svg { width: 34px; height: 34px; }
.t-mode-text small { display: block; font-size: 13.5px; font-weight: 600; color: var(--k-soft); line-height: 1.25; }
.t-mode.is-soon { opacity: .6; cursor: default; }
.t-mode .activity-done { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-size: 24px; color: var(--k-star); }
.t-bee { display: flex; align-items: flex-end; }
.t-bee .k-bee { width: 100px; height: 100px; flex: none; }
.t-bee .k-bubble { font-size: 17px; }
.t-bee .k-bubble::before { top: 18px; }

/* parent panel */
.parent-panel { text-align: left; }
.parent-panel h2 { margin: 0 0 8px; font: 800 24px/1.2 "Baloo 2", var(--font-body); }
.parent-panel p { margin: 0 0 14px; color: var(--ink-soft); font-family: var(--font-body); }
.parent-panel .auth-widget { margin-bottom: 16px; }
.parent-links { display: flex; flex-wrap: wrap; gap: 8px 16px; font-family: var(--font-body); }

@media (min-width: 600px) {
  .k-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .k-hello { grid-template-columns: 128px auto minmax(0, 320px); }
  .k-bee { width: 128px; height: 128px; }
  .k-continue { grid-column: auto; margin: 0 0 0 16px; }
}
@media (min-width: 780px) {
  .k-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .t-wrap { grid-template-columns: 1fr 1fr; align-items: start; gap: 20px 28px; }
  .t-head { grid-row: 1; }
  .t-bee { grid-column: 1; grid-row: 2; }
  .t-modes { grid-column: 2; grid-row: 1 / span 2; }
}
@media (min-width: 1100px) {
  .k-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .t-modes { grid-template-columns: 1fr 1fr; }
  .t-mode { flex-direction: column; text-align: center; padding: 20px 14px; }
  .t-mode i { width: 72px; height: 72px; }
  .t-mode i svg { width: 46px; height: 46px; }
  .t-mode .activity-done { top: 14px; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .k-tile { transition: none; }
  .k-parent.is-holding .k-parent-fill { transition: none; }
}

/* =====================================================================
   Rewards (GUI plan 2.4, approved on the mock 2026-10-03): the star
   meter on Match, the flying star, the done panel with Bee, the sticker
   and the sticker book. Sounds live in js/rewards.js.
   ===================================================================== */
.k-left { display: flex; align-items: center; gap: 10px; }
.k-book { position: relative; width: 56px; height: 56px; border-radius: 50%; border: 0; background: var(--k-pink-soft);
  display: grid; place-items: center; cursor: pointer; }
.k-book svg { width: 32px; height: 32px; }
/* The games button beside home: the games page's own lilac (css/game-kids.css). */
.k-game { width: 56px; height: 56px; border-radius: 50%; background: var(--k-purple-soft); display: grid; place-items: center; text-decoration: none; }
.k-game svg { width: 34px; height: 34px; }
.k-game:focus-visible { outline: 3px solid var(--k-link); outline-offset: 3px; }
/* The button for where the child is now wears a ring in its own colour:
   home on the kids page, the gamepad on the games page, the book on the
   sticker book (app.js and game.html set aria-current). */
.k-home[aria-current="page"], .k-game[aria-current="page"], .k-book[aria-current="page"] {
  box-shadow: 0 0 0 4px var(--k-bg), 0 0 0 7px var(--k-ring); }
.k-home { --k-ring: #D99B1F; }
.k-game { --k-ring: #8E62D4; }
.k-book { --k-ring: #E0607E; }
a.k-book { text-decoration: none; }
.k-book-count { position: absolute; right: -4px; top: -2px; min-width: 24px; height: 24px; padding: 0 5px; border-radius: 999px;
  background: var(--k-pink); color: var(--k-white); font: 800 13px/20px var(--font-body); text-align: center; border: 2px solid var(--k-bg); }
.k-book.is-new .k-book-count { animation: k-badge 1.4s ease-out 2; }
@keyframes k-badge { 0%, 60%, 100% { transform: scale(1); } 20% { transform: scale(1.4); } }
.k-book:focus-visible, .al-slot:focus-visible, .k-switch:focus-visible { outline: 3px solid var(--k-link); outline-offset: 3px; }

/* Match: one star per pair in the round */
.k-meter { display: flex; justify-content: center; gap: 4px; margin: 0 0 10px; font-size: 30px; line-height: 1; }
.k-meter:empty { display: none; }
.k-meter i { font-style: normal; color: color-mix(in srgb, var(--k-ink) 16%, transparent); }
.k-meter i.on { color: var(--k-star); -webkit-text-stroke: 1.5px var(--k-star-edge); animation: k-land .45s ease-out; }
@keyframes k-land { 50% { transform: scale(1.6); } }

.k-fly { position: fixed; z-index: 60; margin: -20px 0 0 -16px; font-size: 34px; line-height: 1; color: var(--k-star);
  -webkit-text-stroke: 1.5px var(--k-star-edge); pointer-events: none; animation: k-fly .85s cubic-bezier(.3, .7, .4, 1) forwards; }
@keyframes k-fly {
  0% { transform: translate(0, 0) scale(.4); }
  20% { transform: translate(0, -14px) scale(1.4); }
  100% { transform: translate(var(--dx), var(--dy)) scale(.8) rotate(360deg); }
}
.k-burst { position: fixed; z-index: 60; width: 0; height: 0; pointer-events: none; }
.k-burst i { position: absolute; width: 9px; height: 9px; margin: -4px; border-radius: 50%; background: var(--k-star);
  animation: k-spark .6s ease-out forwards; }
.k-burst i:nth-child(1) { --sx: 38px; --sy: -6px; } .k-burst i:nth-child(2) { --sx: -34px; --sy: -14px; background: var(--k-pink-2); }
.k-burst i:nth-child(3) { --sx: 10px; --sy: -40px; background: var(--k-blue); } .k-burst i:nth-child(4) { --sx: -12px; --sy: 34px; }
.k-burst i:nth-child(5) { --sx: 30px; --sy: 28px; background: var(--k-green-2); } .k-burst i:nth-child(6) { --sx: -36px; --sy: 18px; background: var(--k-purple); }
@keyframes k-spark { to { opacity: 0; transform: translate(var(--sx), var(--sy)) scale(.4); } }

/* the done panel */
.kids-world .done-panel { position: relative; z-index: 1; border: 0; box-shadow: none; border-radius: 30px; background: var(--k-card);
  color: var(--k-ink); gap: 10px; padding: 18px 20px 22px; max-height: 100%; overflow-y: auto; font-family: "Baloo 2", var(--font-body); }
.done-bee { width: 150px; height: 150px; }
.done-bee.is-dancing { animation: k-dance 1.2s ease-in-out infinite; transform-origin: 50% 90%; }
@keyframes k-dance {
  0%, 100% { transform: rotate(-8deg); } 25% { transform: translateY(-12px); }
  50% { transform: rotate(8deg); } 75% { transform: translateY(-12px); }
}
.kids-world .done-title { margin: 0; color: var(--k-ink); font: 800 34px/1.05 "Baloo 2", var(--font-body); }
.done-title small { display: block; margin-top: 4px; font-size: 18px; font-weight: 700; color: var(--k-soft); }
.done-stars { display: flex; gap: 6px; margin: 0; font-size: 44px; line-height: 1; }
.done-stars i { font-style: normal; color: transparent; -webkit-text-stroke: 2px color-mix(in srgb, var(--k-ink) 25%, transparent); }
.done-stars i.on { color: var(--k-star); -webkit-text-stroke: 2px var(--k-star-edge); }
.is-new .done-stars i.on { animation: k-pop .45s both; }
.is-new .done-stars i.on:nth-child(2) { animation-delay: .2s; } .is-new .done-stars i.on:nth-child(3) { animation-delay: .4s; }
@keyframes k-pop { 0% { transform: scale(0) rotate(-40deg); } 70% { transform: scale(1.3); } 100% { transform: scale(1); } }
.done-note { margin: 0; font: 600 15px/1.4 var(--font-body); color: var(--k-soft); }
.done-note b { color: var(--k-ink); }
.kids-world .done-btn { border: 0; border-radius: 20px; padding: 14px; background: color-mix(in srgb, var(--k-ink) 7%, var(--k-card));
  color: var(--k-ink); font: 800 19px/1.2 "Baloo 2", var(--font-body); }
.kids-world .done-btn.primary { background: var(--k-blue); color: var(--k-white); }
.kids-world .done-btn.is-book { background: var(--k-pink); }

/* a sticker: the cover on a white die-cut edge, slightly turned */
.k-sticker { display: block; padding: 6px; background: var(--k-white); border-radius: 18px; box-shadow: 0 4px 10px var(--k-sticker-shadow);
  transform: rotate(var(--r, -6deg)); }
.k-sticker img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 13px; }
.done-sticker { width: 150px; }
.done-sticker .k-sticker { position: relative; overflow: hidden; padding: 8px; border-radius: 22px; }
.is-new .done-sticker .k-sticker { animation: k-slap .7s cubic-bezier(.2, 1.6, .4, 1) both; }
@keyframes k-slap { 0% { transform: scale(2.2) rotate(-25deg); opacity: 0; } 100% { transform: scale(1) rotate(-6deg); opacity: 1; } }
.done-sticker .k-sticker::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 35%, var(--k-sheen) 50%, transparent 65%);
  transform: translateX(-120%); animation: k-shine 2.6s 1s ease-in-out infinite; }
@keyframes k-shine { 0% { transform: translateX(-120%); } 40%, 100% { transform: translateX(120%); } }

.k-confetti { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.k-confetti i { position: absolute; top: -16px; width: 10px; height: 14px; border-radius: 3px; animation: k-fall 3s linear forwards; }
.k-confetti i:nth-child(5n + 1) { background: var(--k-star); } .k-confetti i:nth-child(5n + 2) { background: var(--k-pink-2); }
.k-confetti i:nth-child(5n + 3) { background: var(--k-blue); } .k-confetti i:nth-child(5n + 4) { background: var(--k-green-2); }
.k-confetti i:nth-child(5n) { background: var(--k-purple); }
@keyframes k-fall { to { transform: translateY(110vh) rotate(540deg); } }

/* the sticker book */
.al-head { display: flex; align-items: center; gap: 12px; }
.al-text { flex: 1; display: grid; gap: 4px; max-width: 420px; }
.al-title { margin: 0; font: 800 28px/1.05 "Baloo 2", var(--font-body); }
.al-count { margin: 0; font-size: 16px; font-weight: 700; color: var(--k-soft); }
.al-bar { display: block; height: 12px; border-radius: 999px; background: color-mix(in srgb, var(--k-ink) 10%, transparent); overflow: hidden; }
.al-bar i { display: block; height: 100%; width: 0; border-radius: 999px; background: var(--k-pink); }
.al-group { padding-top: 18px; }
.al-group .k-ghead small { margin-left: auto; white-space: nowrap; font-size: 14px; font-weight: 700; color: var(--k-soft); }
.al-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 10px; }
.al-slot { display: grid; justify-items: center; align-content: start; gap: 5px; padding: 0; border: 0; background: none;
  color: var(--k-soft); cursor: pointer; font: inherit; }
.al-slot .k-sticker { width: 100%; padding: 5px; border-radius: 16px; }
.al-slot .k-sticker img { border-radius: 11px; }
.al-slot .k-sticker.is-locked { transform: none; box-shadow: none; background: transparent; border: 2px dashed var(--k-dash); padding: 3px; }
.al-slot .k-sticker.is-locked img { filter: grayscale(1); opacity: .16; }
.al-slot.is-earned { color: var(--k-ink); }
.al-slot:active .k-sticker { transform: scale(.95) rotate(var(--r)); }
.al-name { font: 700 12px/1.2 var(--font-body); text-align: center; }

/* the parent panel's sound switch */
.pp-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0; padding: 10px 0;
  border-top: 1px solid var(--line); font: 600 15px/1.3 var(--font-body); cursor: pointer; }
.pp-row small { display: block; font-weight: 400; font-size: 13px; color: var(--ink-soft); }
.pp-row b { font-size: 18px; color: var(--k-pink); }
.pp-stickers { cursor: default; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.k-switch { appearance: none; -webkit-appearance: none; flex: none; position: relative; width: 52px; height: 30px; margin: 0;
  border-radius: 999px; background: var(--k-switch-off); cursor: pointer; transition: background .15s; }
.k-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%;
  background: var(--k-white); transition: transform .15s; }
.k-switch:checked { background: var(--k-green); }
.k-switch:checked::after { transform: translateX(22px); }

@media (min-width: 600px) {
  .al-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .al-head .k-bee { width: 128px; height: 128px; }
}
@media (min-width: 1100px) {
  .al-grid { grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 18px 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .k-book.is-new .k-book-count, .k-meter i.on, .done-bee.is-dancing, .is-new .done-stars i.on,
  .is-new .done-sticker .k-sticker, .done-sticker .k-sticker::after { animation: none; }
  .k-switch, .k-switch::after { transition: none; }
}

/* =====================================================================
   Activity screens (GUI plan 2.5, approved on the mock 2026-10-03):
   Memorize, Match and Say It in the kids world style. No black rings or
   shadows; each screen carries its activity's colour (--m on the
   section); flat round buttons. The cards a picture sits on are
   --k-paper — white, or a light card in dark mode like the home tiles,
   because the drawings have thick dark outlines.
   ===================================================================== */
.kids-world .k-act { --edge: color-mix(in srgb, var(--m) 38%, #FFFFFF); gap: 14px; min-height: 0; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .kids-world .k-act { --edge: color-mix(in srgb, var(--m) 50%, var(--k-paper)); }
}
:root[data-theme="dark"] .kids-world .k-act { --edge: color-mix(in srgb, var(--m) 50%, var(--k-paper)); }

.a-bar { display: flex; align-items: center; gap: 12px; padding: 8px 14px 8px 8px; border-radius: 22px;
  background: color-mix(in srgb, var(--m) 20%, var(--k-card)); }
.a-back { width: 48px; height: 48px; flex: none; display: grid; place-items: center; border-radius: 50%; cursor: pointer;
  background: var(--k-card); color: var(--k-ink); border: 2px solid var(--edge); }
.a-back svg { width: 26px; height: 26px; }
.a-name { min-width: 0; margin: 0; white-space: nowrap; font: 800 22px/1.05 "Baloo 2", var(--font-body); }
/* long topic names ("Action Verbs: Play & School") end in … rather than
   pushing the progress off the bar */
.a-name small { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 14px; font-weight: 700; color: var(--k-soft); }
.a-right { margin: 0 0 0 auto; font: 800 18px/1 "Baloo 2", var(--font-body); color: var(--k-soft); white-space: nowrap; }
.a-bar .k-meter { margin-left: auto; font-size: 24px; gap: 2px; }
.a-hint { margin: 0; text-align: center; font: 600 14px/1.3 var(--font-body); color: var(--k-soft); }
.said { color: var(--k-star); -webkit-text-stroke: 1px var(--k-star-edge); }
.a-back:focus-visible, .kids-world .icon-btn:focus-visible, .kids-world .tile:focus-visible, .flash-card:focus-visible,
.sentence-main:focus-visible, .sentence-mic-btn:focus-visible { outline: 3px solid var(--k-link); outline-offset: 3px; }

/* round buttons: flat colour, white glyph */
.kids-world .icon-btn { width: 76px; height: 76px; display: grid; place-items: center; padding: 0; border: 0; box-shadow: none;
  background: var(--k-star); color: var(--k-white); }
.kids-world .icon-btn svg { width: 40px; height: 40px; }
.kids-world .icon-btn.speaker { width: 88px; height: 88px; background: var(--k-blue); }
.kids-world .icon-btn.speaker svg { width: 46px; height: 46px; }
.kids-world .icon-btn.replay { background: var(--k-green-2); }
.kids-world .icon-btn:disabled { opacity: .4; }
.kids-world .icon-btn:not(:disabled):active { transform: scale(.94); box-shadow: none; }
.kids-world .icon-btn.close-btn { width: 44px; height: 44px; background: color-mix(in srgb, var(--k-ink) 8%, var(--k-card)); color: var(--k-ink); }
.kids-world .icon-btn.close-btn svg { width: 22px; height: 22px; }

/* Memorize */
.flash-stage { perspective: 1200px; }
.kids-world .flash-card { flex: none; width: 100%; margin: 0; padding: 18px 16px 20px; gap: 4px; border: 3px solid var(--edge);
  border-radius: 34px; background: var(--k-paper); color: var(--k-ink-warm); box-shadow: none; font-family: "Baloo 2", var(--font-body); }
.kids-world .flash-card img { width: min(280px, 72vw, 40dvh); border-radius: 22px; }
.flash-text { display: grid; justify-items: center; gap: 2px; }
.kids-world .flash-word { margin-top: 6px; font-size: clamp(40px, 12vw, 58px); line-height: 1; letter-spacing: 0; }
.kids-world .flash-meaning { color: var(--k-amber); font-size: clamp(22px, 6vw, 30px); }
.flash-card.is-flipping { animation: k-flip .45s ease both; }
@keyframes k-flip { 0% { transform: rotateY(-90deg); } 100% { transform: rotateY(0); } }
.flash-card.is-bouncing { animation: k-bounce .35s ease; }
@keyframes k-bounce { 40% { transform: scale(.95); } 75% { transform: scale(1.03); } }
.kids-world .flash-nav { gap: 22px; }
.kids-world .dots { flex-wrap: wrap; gap: 7px; margin: 4px 0 0; }
.kids-world .dot { width: 11px; height: 11px; background: color-mix(in srgb, var(--k-ink) 14%, transparent); }
.kids-world .dot.is-seen { background: color-mix(in srgb, var(--m) 55%, transparent); }
.kids-world .dot.is-on { background: var(--m); transform: scale(1.35); }

/* Match */
.kids-world .recall-board { flex: none; gap: 28px; padding: 6px; }
.kids-world .tile-row { flex: none; gap: 12px; max-width: none; }
.kids-world .tile { width: min(124px, 34vw); min-width: 0; padding: 7px; border: 3px solid var(--edge); border-radius: 22px;
  background: var(--k-paper); box-shadow: none; position: relative; transition: transform .15s ease; }
.kids-world .tile img { width: 100%; border-radius: 14px; }
.kids-world .tile.speaker-tile { background: var(--k-blue-soft); border-color: var(--k-blue-line); }
.kids-world .tile.speaker-tile svg { width: 52%; height: 52%; }
.kids-world .tile.is-selected { outline: 0; border-color: var(--k-star); box-shadow: 0 0 0 4px color-mix(in srgb, var(--k-star) 45%, transparent);
  transform: scale(1.04); animation: k-bounce .35s ease; }
.kids-world .tile.is-wrong { border-color: var(--k-wrong); background: var(--k-wrong-soft); animation: k-shake .4s ease; }
@keyframes k-shake { 20% { transform: translateX(-8px) rotate(-2deg); } 40% { transform: translateX(7px) rotate(2deg); }
  60% { transform: translateX(-5px); } 80% { transform: translateX(3px); } }
.kids-world .tile.is-matched { border-color: var(--k-green); animation: k-okpop .45s ease; }
@keyframes k-okpop { 50% { transform: scale(1.1); } }
.kids-world .picture-tile.is-matched::after { content: "✓"; position: absolute; right: -7px; top: -7px; width: 28px; height: 28px;
  border-radius: 50%; background: var(--k-green); color: var(--k-white); display: grid; place-items: center; font: 800 16px/1 var(--font-body); }
.kids-world .recall-progress { margin: 0; color: var(--k-soft); opacity: 1; font: 800 16px/1 "Baloo 2", var(--font-body); }
.kids-world .celebrate { background: color-mix(in srgb, var(--k-bg) 92%, transparent); }

/* Say It */
.kids-world .sentence-list { flex: none; justify-content: flex-start; gap: 12px; }
.kids-world .sentence-item { position: relative; }
.kids-world .sentence-main { padding: 8px 12px 8px 8px; gap: 10px; border: 3px solid var(--edge); border-radius: 20px;
  background: var(--k-paper); color: var(--k-ink-warm); box-shadow: none; font: 700 18px/1.2 "Baloo 2", var(--font-body); }
.kids-world .sentence-main:active, .kids-world .sentence-mic-btn:active { transform: scale(.97); box-shadow: none; }
.kids-world .sentence-image { width: 54px; height: 54px; border: 0; border-radius: 12px; }
.kids-world .sentence-icon svg { width: 30px; height: 30px; display: block; }
.kids-world .sentence-mic-btn { width: 58px; height: 58px; display: grid; place-items: center; padding: 0; border: 0; box-shadow: none;
  background: var(--k-blue); }
.kids-world .sentence-mic-btn svg { width: 32px; height: 32px; }
.kids-world .sentence-item.is-cleared .sentence-main { background: color-mix(in srgb, var(--k-green) 14%, var(--k-paper)); }
.kids-world .sentence-item.is-cleared::before { content: "★"; position: absolute; left: -4px; top: -8px; z-index: 1; font-size: 22px;
  line-height: 1; color: var(--k-star); -webkit-text-stroke: 1.5px var(--k-star-edge); }
.kids-world .sayit-nav { margin: 0; gap: 18px; }
.kids-world .icon-btn.nav-btn { width: 52px; height: 52px; background: var(--k-blue); }
.kids-world .icon-btn.nav-btn svg { width: 28px; height: 28px; }
.kids-world .sayit-progress { min-width: 0; margin: 0; color: var(--k-soft); opacity: 1; font: 800 16px/1 "Baloo 2", var(--font-body); }

/* the popups: the kids card instead of the black-ringed panel */
.kids-world .video-panel { border: 0; box-shadow: none; border-radius: 30px; background: var(--k-card); color: var(--k-ink); }
.kids-world .parent-panel a { color: var(--k-link); font-weight: 600; }
.kids-world .say-panel { position: relative; gap: 12px; padding: 20px 20px 22px; font-family: "Baloo 2", var(--font-body); }
.kids-world .say-panel .video-toolbar { position: absolute; right: 14px; top: 14px; width: auto; }
.say-image { width: 150px; height: 150px; object-fit: cover; border-radius: 22px; }
.kids-world .video-sentence { font: 800 clamp(22px, 7vw, 30px)/1.15 "Baloo 2", var(--font-body); }
.kids-world .mic-btn { position: relative; width: 104px; height: 104px; background: var(--k-pink); }
.kids-world .mic-btn svg { width: 54px; height: 54px; position: relative; z-index: 1; }
.kids-world .mic-btn i { position: absolute; inset: 0; border-radius: 50%; border: 4px solid var(--k-pink); opacity: 0; pointer-events: none; }
.kids-world .mic-btn.is-listening { animation: none; }
.kids-world .mic-btn.is-listening i { animation: k-ring 1.6s ease-out infinite; }
.kids-world .mic-btn.is-listening i + i { animation-delay: .8s; }
@keyframes k-ring { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(1.7); opacity: 0; } }
.kids-world .video-results { min-height: 56px; }
.kids-world .result-text { color: var(--k-soft); font-size: 18px; }
.kids-world .result-stars { color: var(--k-star); }
.kids-world .video-nav .icon-btn { width: 52px; height: 52px; background: var(--k-blue); }
.kids-world .video-nav .icon-btn svg { width: 28px; height: 28px; }
.kids-world .video-progress { color: var(--k-soft); font-family: "Baloo 2", var(--font-body); }

@media (min-width: 600px) {
  .kids-world .k-act { max-width: 760px; width: 100%; margin: 0 auto; }
  .kids-world .flash-card { padding: 26px; }
  .kids-world .flash-card img { width: min(400px, 40dvh); }
  .kids-world .flash-word { font-size: 72px; }
  .kids-world .flash-meaning { font-size: 34px; }
  /* Match: sounds in one row, pictures in the next, so all four pairs
     are in view without scrolling */
  .kids-world .recall-board { flex-direction: column; align-items: center; gap: 16px; }
  .kids-world .tile-row { flex-direction: row; justify-content: center; gap: 16px; }
  .kids-world .tile { width: 150px; }
}
/* Laptop: wide but not tall, so the flashcard turns sideways (picture
   left, word right) and Say It lists its sentences in two columns. */
@media (min-width: 1000px) {
  .kids-world .k-act { max-width: 1040px; }
  .kids-world .flash-card { flex-direction: row; justify-content: center; gap: 48px; padding: 24px 40px; }
  .kids-world .flash-card img { width: min(430px, 52dvh); }
  .kids-world .flash-word { font-size: 84px; margin: 0; }
  .kids-world .flash-meaning { font-size: 38px; }
  .kids-world .tile { width: 190px; }
  .kids-world .tile-row { gap: 22px; }
  .kids-world .sentence-list { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 28px; }
  .kids-world .sentence-main { padding: 12px 16px 12px 12px; gap: 14px; font-size: 23px; }
  .kids-world .sentence-image { width: 96px; height: 96px; }
  .kids-world .sentence-mic-btn { width: 72px; height: 72px; }
  .kids-world .sentence-mic-btn svg { width: 40px; height: 40px; }
  .kids-world .say-panel { width: min(540px, 100%); padding: 28px; }
  .say-image { width: 200px; height: 200px; }
  .kids-world .video-sentence { font-size: 34px; }
}
@media (prefers-reduced-motion: reduce) {
  .flash-card.is-flipping, .flash-card.is-bouncing, .kids-world .tile.is-selected, .kids-world .tile.is-wrong,
  .kids-world .tile.is-matched, .kids-world .mic-btn.is-listening i { animation: none; }
  .kids-world .tile { transition: none; }
}

/* Memorize's last card: Next becomes a green ✓, and the done panel waits
   for that tap instead of covering the last word. */
.kids-world .flash-nav .icon-btn { flex: none; }
.kids-world .icon-btn.is-finish { background: var(--k-green); }
.kids-world .icon-btn.is-finish svg { width: 44px; height: 44px; }

/* "Học lại" and "Chủ đề khác" side by side under the main button */
.done-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kids-world .done-row .done-btn { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 12px 6px;
  font-size: 17px; white-space: nowrap; }
.done-row .done-btn svg { width: 22px; height: 22px; flex: none; }

/* Word pictures show whole (fix 2026-10-03). 154 of the 337 photos are not
   square, and object-fit: cover cut the sides off to fill a square — the
   mouse lost its nose and mouth. Where a child has to recognise the word,
   the photo is shown entire on the white card instead; topic covers and
   stickers keep filling their tile. Drawn cards are square either way. */
.kids-world .flash-card img, .kids-world .tile img, .kids-world .sentence-image, .say-image {
  object-fit: contain; background: transparent; border-radius: 14%; }
/* No backing colour: a white one showed in the corners of the drawn cards,
   whose own ground is rounded at 14% of their size — more than the old
   fixed radius clipped — and turned into four white corners on the cream
   card of dark mode (the dinosaurs). Clipping at the same 14% keeps the
   drawn ground's corners whole. */

/* Topic covers that are photos, and stickers: the whole photo, never
   cropped (11 of the 27 photo covers are not square — the Sea Animals
   shark lost its head and tail, the Birds owl the top of its head). The
   space around it is the same photo, enlarged and blurred, so a tile is
   still full of colour. --cover is set by coverArt / stickerArt. */
.k-art.is-photo, .k-sticker-pic { position: relative; display: block; overflow: hidden; isolation: isolate;
  border-radius: 22px; }
.k-art.is-photo::before, .k-sticker-pic::before { content: ""; position: absolute; inset: -14%; z-index: -1;
  background: var(--cover) center / cover no-repeat; filter: blur(9px) saturate(1.1); opacity: .9; }
.k-art.is-photo img { position: relative; object-fit: contain; border-radius: 0; }
.k-sticker-pic { aspect-ratio: 1; border-radius: 13px; }
.k-sticker-pic img { display: block; width: 100%; height: 100%; object-fit: contain; border-radius: 0; }
.al-slot .k-sticker-pic { border-radius: 11px; }
/* a sticker not earned yet: the whole picture faded, the blurred fill too */
.al-slot .k-sticker.is-locked .k-sticker-pic { filter: grayscale(1); opacity: .16; }
.al-slot .k-sticker.is-locked .k-sticker-pic img { filter: none; opacity: 1; }

/* Redesign story 7: the three activity buttons are big on every screen,
   icon above the name, at least 160 px tall. */
.t-mode { min-height: 160px; flex-direction: column; justify-content: center; text-align: center; padding: 20px 14px; }
.t-mode i { width: 72px; height: 72px; }
.t-mode i svg { width: 46px; height: 46px; }
.t-mode .activity-done { top: 14px; transform: none; }
