:root {
  --bg: #000;
  --fg: #fff;
  --fg-dim: rgba(255, 255, 255, 0.78);
  --accent: #fe2c55;
  --accent-2: #25f4ee;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --gutter: 16px;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--fg);
  font-family: 'Rubik', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
  overscroll-behavior: none;
}

button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
/* A clear focus ring for keyboard users (accessibility), on every control. */
:focus-visible { outline: 3px solid #ffd166 !important; outline-offset: 2px; }
svg { display: block; }

/* ---------- Feed: one entry per screen, one swipe = one entry ---------- */

.feed {
  position: fixed;
  inset: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-snap-type: y mandatory;
  overscroll-behavior: contain;
  scrollbar-width: none;
  touch-action: pan-y;
}
.feed::-webkit-scrollbar { display: none; }

@media (min-width: 600px) {
  /* On desktop, show a phone-shaped column. */
  .feed { left: 50%; right: auto; width: min(480px, 100vw); transform: translateX(-50%); }
}

.card {
  position: relative;
  height: 100%;
  width: 100%;
  overflow: hidden;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  background: #111;
}

/* ---------- Reel: images and clips played like a video ---------- */

.card .reel {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: var(--card-gradient, linear-gradient(160deg, #1d2b64, #0b0b12));
}

.card .slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.9s ease;
}
.card .slide.on { opacity: 1; }

.card .shot,
.card .blur {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  will-change: transform;
}
.card .slide[data-fit="contain"] .shot { object-fit: contain; }
.card .blur {
  transform: scale(1.25);
  filter: blur(26px) brightness(0.5) saturate(1.2);
}

.card .letter {
  position: absolute;
  inset: 0 0 30% 0;
  display: grid;
  place-items: center;
  font-size: clamp(120px, 42vw, 220px);
  font-weight: 800;
  color: rgba(255, 255, 255, 0.14);
}

.card .shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(0, 0, 0, 0.45) 0%, transparent 18%),
    linear-gradient(to top, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.55) 32%, transparent 62%);
  pointer-events: none;
}

.card .paused {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 84px;
  height: 84px;
  margin: -42px 0 0 -42px;
  padding: 18px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.35);
  color: rgba(255, 255, 255, 0.9);
  opacity: 0;
  transform: scale(1.3);
  transition: opacity 0.15s, transform 0.15s;
  pointer-events: none;
}
.card.is-paused .paused { opacity: 1; transform: scale(1); }
.card .paused svg { width: 100%; height: 100%; transform: translateX(3px); }

/* ---------- Caption block (right side in RTL) ---------- */

.card .info {
  position: absolute;
  inset-inline-start: var(--gutter);
  inset-inline-end: 84px;
  bottom: calc(22px + var(--safe-bottom));
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.card .meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--fg-dim);
  margin-bottom: 6px;
}
.card .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.card.is-playing .dot { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.3; } }

.card .title {
  margin: 0 0 8px;
  font-size: clamp(22px, 6.4vw, 30px);
  font-weight: 800;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

/* ---------- Subtitles and photo credit ---------- */

.card .subs {
  position: absolute;
  inset-inline: var(--gutter) 80px;
  top: 50%;
  margin: 0;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.2s, transform 0.2s;
}
.card .subs.show { opacity: 1; transform: none; }
.card .subs span {
  display: inline;
  padding: 0.1em 0.35em;
  font-size: clamp(19px, 5.4vw, 24px);
  font-weight: 800;
  line-height: 1.55;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  border-radius: 6px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  text-wrap: balance;
}

/* Small and quiet, on its own line under the entry's name. */
.card .credit[hidden] { display: none; }
.card .credit {
  display: block;
  margin-top: 3px;
  max-width: 100%;
  font-size: 10.5px;
  line-height: 1.3;
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- Action rail (left side in RTL) ---------- */

.card .rail {
  position: absolute;
  inset-inline-end: 10px;
  bottom: calc(30px + var(--safe-bottom));
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: center;
}

.rail-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 56px;
  color: var(--fg);
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}
.rail-btn svg {
  width: 48px;
  height: 48px;
  padding: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.rail-btn:active svg { transform: scale(0.9); }

/* Likes and dislikes: two small, quiet thumbs above the buttons. */
.rate { display: flex; flex-direction: column; gap: 8px; align-items: center; }
.rate-btn {
  width: 34px;
  height: 34px;
  padding: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: color 0.15s, background 0.15s, transform 0.15s;
}
.rate-btn svg { width: 100%; height: 100%; display: block; }
.rate-btn.dislike svg { transform: rotate(180deg); }
.rate-btn:active { transform: scale(0.88); }
.rate-btn.like.on { color: #fff; background: #fe2c55; }
.rate-btn.dislike.on { color: #1b1b1b; background: rgba(255, 255, 255, 0.85); }
body.kids .rate-btn.like.on { background: #ff9f1c; }

/* ---------- Progress ---------- */

.card .progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: var(--safe-bottom);
  height: 3px;
  background: rgba(255, 255, 255, 0.18);
}
.card .bar {
  height: 100%;
  width: 100%;
  background: var(--fg);
  transform-origin: right center;
  transform: scaleX(0);
}

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

.topbar {
  position: fixed;
  z-index: 5;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(480px, 100vw);
  padding: calc(10px + var(--safe-top)) var(--gutter) 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  pointer-events: none;
}
@media (max-width: 599px) { .topbar { width: 100vw; } }
.topbar > * { pointer-events: auto; }

.brand {
  white-space: nowrap;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.3px;
  text-shadow: -1.5px 0 var(--accent-2), 1.5px 0 var(--accent), 0 1px 4px rgba(0, 0, 0, 0.5);
}

.icon-btn {
  width: 44px;
  height: 44px;
  padding: 10px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.3);
}
.icon-btn svg { width: 100%; height: 100%; }

/* ---------- Start overlay ---------- */

.start {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  padding: var(--gutter);
  background: radial-gradient(120% 80% at 50% 0%, #2a1030 0%, #000 60%);
  text-align: center;
  transition: opacity 0.3s;
}
.start.hidden { opacity: 0; pointer-events: none; }
.start-inner { width: 100%; max-width: 380px; display: grid; gap: 18px; justify-items: center; }
.start-brand { display: flex; align-items: center; justify-content: center; gap: 14px; }
.start .logo { width: 64px; height: 64px; border-radius: 18px; }
.start h1 { margin: 0; font-size: 44px; font-weight: 800; letter-spacing: -0.5px; white-space: nowrap; }
.start .start-tagline { margin: 0 0 6px; font-size: 18px; line-height: 1.55; color: var(--fg-dim); text-wrap: balance; }
.start-choices { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.start-btn {
  aspect-ratio: 1;
  border-radius: 24px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 12px;
  padding: 12px;
  background: linear-gradient(145deg, var(--accent), #b3123a);
  box-shadow: 0 10px 30px rgba(254, 44, 85, 0.25);
  font-size: 19px;
  font-weight: 800;
  line-height: 1.25;
  transition: transform 0.15s, opacity 0.2s;
}
.start-btn svg { width: 46px; height: 46px; }
.start-btn:active:not(:disabled) { transform: scale(0.96); }
.start-btn:disabled { opacity: 0.45; }
.start .start-note { margin: 0; max-width: 340px; margin-inline: auto; font-size: 13px; line-height: 1.5; color: var(--fg-dim); text-wrap: balance; }

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  z-index: 20;
  left: 50%;
  bottom: calc(90px + var(--safe-bottom));
  transform: translate(-50%, 20px);
  max-width: calc(100vw - 32px);
  padding: 10px 16px;
  border-radius: 10px;
  background: rgba(40, 40, 40, 0.95);
  font-size: 14px;
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- End / empty card ---------- */

.card.end {
  display: grid;
  place-items: center;
  text-align: center;
  padding: var(--gutter);
  color: var(--fg-dim);
  background: #0b0b0b;
}
.card.end h2 { color: var(--fg); margin: 0 0 8px; }

@media (prefers-reduced-motion: reduce) {
  .feed { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

.card.end .pack-review { display: block; margin: 22px auto 0; min-height: 52px; padding: 0 26px; border-radius: 14px; background: #ffd166; color: #13163a; font-size: 18px; font-weight: 800; }
/* A gift or a teacher's pack on the start screen replaces the two buttons. */
.start-choices[hidden] { display: none !important; }
.card.end .rewatch {
  margin-top: 22px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.14);
  color: var(--fg);
  font-weight: 700;
}

/* ---------- Reader sheet (full article text) ---------- */

.reader {
  position: fixed;
  inset: 0;
  z-index: 15;
}
.reader[hidden] { display: none; }

.reader-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.25s;
}

.reader-sheet {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: min(480px, 100vw);
  height: 86%;
  display: flex;
  flex-direction: column;
  border-radius: 18px 18px 0 0;
  background: #161616;
  color: var(--fg);
  transform: translate(-50%, 100%);
  transition: transform 0.25s ease-out;
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.5);
}

.reader.open .reader-backdrop { opacity: 1; }
.reader.open .reader-sheet { transform: translate(-50%, 0); }

.reader-head {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px var(--gutter) 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.reader-grip {
  position: absolute;
  top: 7px;
  left: 50%;
  width: 40px;
  height: 4px;
  margin-left: -20px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.25);
}
.reader-head h2 {
  flex: 1;
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.25;
}
.reader-close { flex: none; background: rgba(255, 255, 255, 0.1); }

.reader-body {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 8px var(--gutter) calc(28px + var(--safe-bottom));
  font-size: 17px;
  line-height: 1.75;
  user-select: text;
  -webkit-user-select: text;
}
.reader-body p { margin: 0 0 14px; color: rgba(255, 255, 255, 0.88); }
.reader-body h3 { margin: 26px 0 8px; font-size: 19px; font-weight: 700; }
.reader-body h4 { margin: 20px 0 6px; font-size: 17px; font-weight: 700; color: rgba(255, 255, 255, 0.8); }
.reader-body .reader-status { color: var(--fg-dim); text-align: center; margin-top: 40px; }
.reader-body .reader-credit { margin-top: 28px; font-size: 13px; color: rgba(255, 255, 255, 0.5); }
.reader-body .reader-link {
  display: block;
  padding: 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--fg);
  text-align: center;
  font-weight: 700;
  text-decoration: none;
}
.reader-body .reader-link + .reader-link { margin-top: 10px; }

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

.topbar-actions { display: flex; gap: 8px; min-width: 0; }

/* ---------- Start screen: second button for the kids' version ---------- */

.start-btn.kids {
  background: linear-gradient(145deg, #ffb800, #ff6a3d);
  box-shadow: 0 10px 30px rgba(255, 140, 40, 0.25);
  color: #2a1400;
  font-family: 'Varela Round', 'Rubik', system-ui, sans-serif;
}

/* ---------- Kids' version ---------- */

body.kids {
  --accent: #ff8a00;
  --accent-2: #7ce0ff;
}
body.kids,
body.kids .card .title,
body.kids .card .subs span {
  font-family: 'Varela Round', 'Rubik', system-ui, sans-serif;
}
body.kids .brand-kids { color: #ffd166; }
body.kids .card .subs span {
  background: rgba(20, 20, 60, 0.72);
  border-radius: 12px;
  font-size: clamp(20px, 5.8vw, 26px);
}
body.kids .card .dot { background: #ffd166; }
body.kids .rail-btn svg { background: rgba(255, 209, 102, 0.28); }
body.kids .card .reel { background: linear-gradient(160deg, #3a86ff, #8338ec); }

/* ---------- Kids: game and learning buttons ---------- */

.rail-btn.game { display: none; }
body.kids .rail-btn.game { display: flex; }

.learn-btn {
  height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255, 209, 102, 0.9);
  color: #2a1400;
  font-family: 'Varela Round', 'Rubik', system-ui, sans-serif;
  font-size: 14px;
  font-weight: 700;
}

/* ---------- Kids: overlay for games and progress ---------- */

.kids-overlay {
  --k-bg: #13163a;
  --k-card: #1f2459;
  --k-ink: #ffffff;
  --k-dim: rgba(255, 255, 255, 0.75);
  --k-yellow: #ffd166;
  --k-green: #3ddc97;
  --k-red: #ff6b6b;
  position: fixed;
  inset: 0;
  z-index: 17;
  display: flex;
  flex-direction: column;
  width: min(480px, 100vw);
  margin-inline: auto;
  background: var(--k-bg);
  color: var(--k-ink);
  font-family: 'Varela Round', 'Rubik', system-ui, sans-serif;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.2s, transform 0.2s;
}
.kids-overlay.open { opacity: 1; transform: none; }

.kids-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: calc(12px + var(--safe-top)) var(--gutter) 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.kids-back {
  flex: none;
  height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--k-yellow);
  color: #2a1400;
  font-weight: 700;
  font-size: 14px;
}
.kids-title { margin: 0; font-size: 19px; line-height: 1.25; text-wrap: balance; }

.kids-body {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px var(--gutter) calc(28px + var(--safe-bottom));
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.kids-lead { margin: 0; color: var(--k-dim); line-height: 1.6; }
.kids-note {
  margin: 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 209, 102, 0.15);
  color: var(--k-yellow);
  font-size: 14px;
}
.kids-sub { margin: 6px 0 0; font-size: 18px; }
.kids-label { margin: 4px 0 0; font-weight: 700; }
.kids-list, .kids-steps { margin: 0; padding-inline-start: 22px; line-height: 1.7; }
.kids-steps label { display: flex; gap: 8px; align-items: flex-start; }
.kids-steps input { flex: none; width: 20px; height: 20px; margin-top: 3px; accent-color: var(--k-green); }
.kids-science { margin: 0; line-height: 1.7; color: var(--k-dim); }

.kids-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.kids-tile {
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 18px 10px;
  border-radius: 18px;
  background: var(--k-card);
  font-weight: 700;
  font-size: 15px;
  text-align: center;
}
.kids-tile:active { transform: scale(0.97); }
.kids-tile-icon { font-size: 38px; line-height: 1; }

.kids-btn {
  align-self: stretch;
  min-height: 50px;
  padding: 0 18px;
  border-radius: 14px;
  background: var(--k-yellow);
  color: #2a1400;
  font-weight: 700;
  font-size: 17px;
  display: grid;
  place-items: center;
  text-decoration: none;
}
.kids-btn:disabled { opacity: 0.5; }

.kids-progress { margin: 0; font-size: 13px; color: var(--k-dim); }
.kids-question { margin: 0; font-size: 21px; line-height: 1.5; font-weight: 700; }
.kids-question[dir="ltr"] { text-align: right; }
.kids-answers { display: grid; gap: 10px; }
.kids-answers.two { grid-template-columns: 1fr 1fr; }
.kids-answer {
  min-height: 52px;
  padding: 10px 14px;
  border-radius: 14px;
  background: var(--k-card);
  border: 2px solid transparent;
  font-size: 17px;
  text-align: center;
}
.kids-answer.right { border-color: var(--k-green); background: rgba(61, 220, 151, 0.18); }
.kids-answer.wrong { border-color: var(--k-red); background: rgba(255, 107, 107, 0.16); }
.kids-feedback { margin: 0; line-height: 1.6; }
.kids-feedback.right { color: var(--k-green); }
.kids-feedback.wrong { color: #ffb4b4; }

.kids-puzzle {
  /* Pieces are numbered left to right like the picture; RTL would mirror the board
     so a picture that looks whole would never count as solved. */
  direction: ltr;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  width: 100%;
  aspect-ratio: 1;
  max-width: 100%;
}
.kids-piece {
  width: 100%;
  height: 100%;
  border-radius: 6px;
  background-size: 300% 300%;
  background-color: var(--k-card);
  outline: 3px solid transparent;
  transition: outline-color 0.15s;
}
.kids-piece.selected { outline-color: var(--k-yellow); }
/* Dragging a piece: it follows the finger, above the others; the spot it would land on is marked. */
.kids-puzzle { touch-action: none; user-select: none; -webkit-user-select: none; }
.kids-piece { touch-action: none; }
.kids-piece.dragging { position: relative; z-index: 2; transition: none; box-shadow: 0 10px 24px rgba(0, 0, 0, 0.55); outline-color: var(--k-yellow); }
.kids-piece.target { outline-color: var(--k-green); }
.kids-puzzle.solved { gap: 0; }
.kids-puzzle.solved .kids-piece { border-radius: 0; }

.kids-memory { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.kids-card {
  position: relative;
  min-height: 92px;
  border-radius: 14px;
  background: var(--k-card);
  font-size: 14px;
  line-height: 1.35;
  padding: 8px;
}
.kids-card-back { font-size: 30px; color: var(--k-yellow); }
.kids-card-face { display: none; }
.kids-card.up .kids-card-back { display: none; }
.kids-card.up .kids-card-face { display: block; }
.kids-card-face.a { font-weight: 700; }
.kids-card.up { background: #2d3480; }
.kids-card.matched { background: rgba(61, 220, 151, 0.2); outline: 2px solid var(--k-green); }

.kids-done {
  display: grid;
  place-items: center;
  gap: 10px;
  padding: 18px;
  border-radius: 18px;
  background: var(--k-card);
  text-align: center;
}
.kids-done-icon { font-size: 44px; }
.kids-done-text { margin: 0; font-size: 18px; font-weight: 700; }

/* ---------- Kids: "how much did I learn today?" ---------- */

.stats-ring { position: relative; width: 190px; max-width: 100%; aspect-ratio: 1; margin: 4px auto 0; }
.stats-ring svg { width: 100%; height: 100%; }
.ring-track { fill: none; stroke: rgba(255, 255, 255, 0.1); stroke-width: 16; }
.ring-fill { fill: none; stroke: var(--k-yellow); stroke-width: 16; stroke-linecap: round; transition: stroke-dasharray 0.6s ease; }
.ring-center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring-value { font-size: 44px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ring-label { font-size: 14px; color: var(--k-dim); }
.stats-goal { margin: 0; text-align: center; color: var(--k-dim); }

.stats-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stats-tile { display: grid; gap: 2px; padding: 12px 14px; border-radius: 14px; background: var(--k-card); }
.stats-value { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; }
.stats-label { font-size: 13px; color: var(--k-dim); }

.stats-week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  height: 150px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  padding-bottom: 22px;
  position: relative;
}
.stats-col { position: relative; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; height: 100%; }
.stats-day { position: absolute; bottom: -22px; }
.stats-bar {
  width: 70%;
  max-width: 28px;
  border-radius: 4px 4px 0 0;
  background: rgba(255, 209, 102, 0.45);
}
.stats-col.today .stats-bar { background: var(--k-yellow); }
.stats-bar-value { font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.stats-day { font-size: 12px; color: var(--k-dim); }
.stats-streak { margin: 0; text-align: center; font-weight: 700; color: var(--k-yellow); }

/* ---------- No long-press menu (save image, copy, etc.) ---------- */

html, body {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}
input, textarea {
  -webkit-touch-callout: default;
  -webkit-user-select: text;
  user-select: text;
}
img, video {
  -webkit-user-drag: none;
  user-drag: none;
}
.card img, .card video { pointer-events: none; }
.reader-body { -webkit-user-select: none; user-select: none; }

/* ---------- Kids: YouTube player ---------- */

.kids-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  max-width: 100%;
  border: 0;
  border-radius: 14px;
  background: #000;
}
.kids-video-title { margin: 0; font-weight: 700; line-height: 1.5; }
.kids-video-channel { margin: 0; font-size: 13px; color: var(--k-dim); }

.topbar-start { flex: none; display: flex; align-items: center; gap: 10px; }

/* ---------- Kids: success ---------- */

.kids-fireworks { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2; }
.kids-done-title { margin: 0; font-size: 26px; font-weight: 700; color: var(--k-yellow); }
.kids-done-actions { display: grid; gap: 10px; width: 100%; }
.kids-btn.secondary { background: rgba(255, 255, 255, 0.12); color: var(--k-ink); }
.kids-done { animation: kids-pop 0.45s cubic-bezier(0.2, 1.4, 0.4, 1); }
@keyframes kids-pop { from { transform: scale(0.8); opacity: 0; } to { transform: none; opacity: 1; } }
.kids-puzzle.solved { outline: 3px solid var(--k-green); outline-offset: 3px; border-radius: 6px; }

.kids-picture {
  width: 100%;
  max-width: 100%;
  max-height: 42vh;
  object-fit: contain;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
}

/* ---------- Kids: word search ---------- */

.kids-ws {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 4px;
  width: 100%;
  max-width: 420px;
  margin-inline: auto;
}
.kids-ws-cell {
  aspect-ratio: 1;
  border-radius: 8px;
  background: var(--k-card);
  color: var(--k-ink);
  font: 700 clamp(16px, 5vw, 22px)/1 'Varela Round', 'Rubik', system-ui, sans-serif;
  transition: background 0.15s, transform 0.15s;
}
.kids-ws-cell.selected { background: var(--k-yellow); color: #2a1400; transform: scale(1.08); }
.kids-ws-cell.found { background: var(--k-green); color: #06281a; }
.kids-ws-cell.miss { background: var(--k-red); }
.kids-ws-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.kids-ws-word { display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px; background: var(--k-card); }
.kids-ws-name { font-weight: 700; font-size: 17px; }
.kids-ws-word.found .kids-ws-name { color: var(--k-green); text-decoration: line-through; }
.kids-ws-clue { color: var(--k-dim); font-size: 14px; line-height: 1.5; }
.kids-ws-clue:empty { display: none; }

/* ---------- Kids: sticker album ---------- */

.album-open {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas: 'icon title' 'icon count';
  align-items: center;
  column-gap: 14px;
  row-gap: 2px;
  width: 100%;
  padding: 16px 18px;
  border-radius: 20px;
  background: linear-gradient(135deg, #ffd166, #ff8a00);
  color: #2a1400;
  text-align: start;
  box-shadow: 0 10px 26px rgba(255, 138, 0, 0.3);
}
.album-open:active { transform: scale(0.98); }
.album-open-icon { grid-area: icon; font-size: 40px; line-height: 1; }
.album-open-title { grid-area: title; font-size: 20px; font-weight: 800; }
.album-open-count { grid-area: count; font-size: 14px; opacity: 0.85; }

.album-count { display: grid; gap: 8px; }
.album-count-text { margin: 0; text-align: center; color: var(--k-yellow); font-size: 17px; font-weight: 700; }
.album-meter { height: 12px; border-radius: 999px; background: var(--k-card); overflow: hidden; }
.album-meter-fill { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #ff8a00, #ffd166); }
.album-book { touch-action: pan-y; }
.album-page {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 26px 14px;
  padding: 26px 16px 22px;
  border-radius: 8px 22px 22px 8px;
  background:
    radial-gradient(circle at 1px 1px, rgba(42, 20, 0, 0.13) 1.2px, transparent 0) 0 0 / 18px 18px,
    linear-gradient(160deg, #fffaf0, #ffeccc);
  box-shadow:
    inset 10px 0 12px -8px rgba(42, 20, 0, 0.25),
    inset 0 0 0 3px #f5dca6,
    0 14px 34px rgba(0, 0, 0, 0.4);
  transform-origin: right center;
}
/* Doodles in the page corners. */
.album-page::before,
.album-page::after {
  position: absolute;
  font-size: 22px;
  opacity: 0.55;
  pointer-events: none;
}
.album-page::before { content: '⭐'; inset-block-start: 6px; inset-inline-end: 10px; transform: rotate(14deg); }
.album-page::after { content: '🌈'; inset-block-end: 6px; inset-inline-start: 10px; transform: rotate(-10deg); }
.album-page.turn-next { animation: album-turn-next 0.45s ease-out; }
.album-page.turn-prev { animation: album-turn-prev 0.45s ease-out; }
@keyframes album-turn-next { from { transform: perspective(900px) rotateY(-70deg); opacity: 0.2; } }
@keyframes album-turn-prev { from { transform: perspective(900px) rotateY(70deg); opacity: 0.2; } }

.album-sticker {
  position: relative;
  margin: 0;
  display: grid;
  justify-items: center;
  gap: 8px;
  transform: rotate(var(--tilt, 5deg));
  animation: album-stick 0.45s cubic-bezier(0.2, 1.4, 0.4, 1) var(--delay, 0ms) both;
  cursor: pointer;
}
/* Slapped onto the page: drops in big, then settles at its tilt. */
@keyframes album-stick {
  from { transform: rotate(calc(var(--tilt, 5deg) * -2)) scale(1.35); opacity: 0; }
  to { transform: rotate(var(--tilt, 5deg)) scale(1); opacity: 1; }
}
.album-sticker.wiggle { animation: album-wiggle 0.5s ease-in-out; }
@keyframes album-wiggle {
  0%, 100% { transform: rotate(var(--tilt, 5deg)) scale(1); }
  25% { transform: rotate(calc(var(--tilt, 5deg) - 10deg)) scale(1.08); }
  50% { transform: rotate(calc(var(--tilt, 5deg) + 8deg)) scale(1.08); }
  75% { transform: rotate(calc(var(--tilt, 5deg) - 4deg)) scale(1.04); }
}
.album-face {
  position: relative;
  width: min(100%, 124px);
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  border: 6px solid #fff;
  box-shadow: 0 1px 0 1px rgba(42, 20, 0, 0.08), 3px 6px 12px rgba(42, 20, 0, 0.35);
  background: var(--sticker-color, #ff8a00);
  display: grid;
  place-items: center;
}
/* Glossy sticker shine. */
.album-face::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0) 38%, rgba(255, 255, 255, 0) 70%, rgba(255, 255, 255, 0.18) 100%);
  pointer-events: none;
}
.album-face img { width: 100%; height: 100%; object-fit: cover; }
.album-face.no-img { color: #fff; font: 800 44px/1 'Varela Round', 'Rubik', system-ui, sans-serif; text-shadow: 0 2px 0 rgba(0, 0, 0, 0.2); }
/* A strip of tape holding the sticker down. */
.album-tape {
  position: absolute;
  z-index: 2;
  inset-block-start: -8px;
  inset-inline-end: 22%;
  width: 46px;
  height: 16px;
  background: rgba(255, 255, 255, 0.6);
  border-inline: 2px dotted rgba(42, 20, 0, 0.08);
  box-shadow: 0 1px 3px rgba(42, 20, 0, 0.2);
  transform: rotate(-24deg);
}
.album-name {
  max-width: 100%;
  padding: 4px 10px;
  border-radius: 8px;
  background: #fff;
  color: #2a1400;
  font-family: 'Varela Round', 'Rubik', system-ui, sans-serif;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  text-wrap: balance;
  box-shadow: 0 2px 5px rgba(42, 20, 0, 0.25);
  transform: rotate(calc(var(--tilt, 5deg) * -0.6));
}
.album-number {
  position: absolute;
  inset-block-start: -2px;
  inset-inline-start: 2px;
  z-index: 3;
  min-width: 26px;
  padding: 3px 7px;
  border-radius: 999px;
  background: #2a1400;
  color: #ffd166;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}
.album-new {
  position: absolute;
  z-index: 3;
  inset-block-start: 30%;
  inset-inline-end: -6px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #ff3d7f;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  transform: rotate(14deg);
  box-shadow: 0 2px 6px rgba(255, 61, 127, 0.5);
  animation: album-pulse 1.4s ease-in-out infinite;
}
@keyframes album-pulse { 50% { transform: rotate(14deg) scale(1.12); } }
.album-slot {
  width: min(100%, 124px);
  aspect-ratio: 1;
  justify-self: center;
  border-radius: 50%;
  border: 3px dashed rgba(42, 20, 0, 0.22);
  display: grid;
  place-items: center;
  color: rgba(42, 20, 0, 0.25);
  font: 800 38px/1 'Varela Round', 'Rubik', system-ui, sans-serif;
}
@media (prefers-reduced-motion: reduce) {
  .album-sticker, .album-sticker.wiggle, .album-new, .album-page.turn-next, .album-page.turn-prev { animation: none; }
}

.album-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.album-turn {
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--k-card);
  color: var(--k-ink);
  font-weight: 700;
}
.album-turn:disabled { opacity: 0.35; }
.album-page-label { color: var(--k-dim); font-size: 14px; font-variant-numeric: tabular-nums; }
.album-empty { display: grid; justify-items: center; gap: 10px; padding-block: 24px; text-align: center; }
.album-empty-icon { font-size: 64px; }

/* ---------- Reader: folding sections, like Wikipedia on a phone ---------- */

.reader-sec { border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
.reader-sec:first-of-type { margin-top: 10px; border-top: 1px solid rgba(255, 255, 255, 0.1); }
.reader-sec summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  padding-block: 10px;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.35;
  cursor: pointer;
  list-style: none;
}
.reader-sec summary::-webkit-details-marker { display: none; }
.reader-sec summary::after {
  content: '';
  flex: none;
  width: 10px;
  height: 10px;
  border-right: 2.5px solid currentColor;
  border-bottom: 2.5px solid currentColor;
  transform: translateY(-3px) rotate(45deg);
  opacity: 0.6;
  transition: transform 0.2s;
}
.reader-sec[open] summary::after { transform: translateY(3px) rotate(-135deg); }
.reader-sec[open] summary { color: #fff; }
.reader-sec > p:last-child { margin-bottom: 18px; }

/* ---------- Kids: send a sticker to a friend ---------- */

.album-send {
  padding: 4px 12px;
  border-radius: 999px;
  background: #2a1400;
  color: #ffd166;
  font-family: 'Varela Round', 'Rubik', system-ui, sans-serif;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
  transform: rotate(calc(var(--tilt, 5deg) * -0.6));
}
.album-send::before { content: '📨 '; }
.album-send:active { transform: scale(0.94); }

.gift {
  width: 100%;
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 22px 18px;
  border-radius: 24px;
  background: linear-gradient(160deg, rgba(255, 184, 0, 0.18), rgba(255, 106, 61, 0.14));
  border: 2px solid rgba(255, 184, 0, 0.45);
  font-family: 'Varela Round', 'Rubik', system-ui, sans-serif;
}
.gift-icon { font-size: 54px; line-height: 1; animation: gift-bounce 1.6s ease-in-out infinite; }
@keyframes gift-bounce { 50% { transform: translateY(-6px) rotate(-6deg); } }
.start .gift-lead { margin: 0; font-size: 18px; font-weight: 700; color: #ffd166; }
.start .gift-title { margin: 0; font-size: 26px; font-weight: 800; color: #fff; text-wrap: balance; }
.start .gift-note { margin: 0 0 6px; font-size: 14px; }
.gift.main { background: linear-gradient(160deg, rgba(254, 44, 85, 0.18), rgba(37, 244, 238, 0.1)); border-color: rgba(254, 44, 85, 0.45); font-family: inherit; }
.gift.main .gift-icon { display: none; }
.gift.main .gift-lead { color: #ff8fa6; }
.gift.main .gift-btn { background: linear-gradient(145deg, var(--accent), #b3123a); color: #fff; font-family: inherit; }
.gift .gift-btn { aspect-ratio: auto; width: 100%; min-height: 56px; display: grid; place-items: center; }
.gift-skip { padding: 6px 12px; color: var(--fg-dim); font-size: 14px; text-decoration: underline; }
@media (prefers-reduced-motion: reduce) { .gift-icon { animation: none; } }
.gift[hidden], .start-choices[hidden], .start-btn[hidden] { display: none; }
/* Only the kids' button (the main version is hidden for now): a plain "התחילו" button,
   centred, instead of the square tiles. */
.start-choices.solo { display: flex; justify-content: center; }
.start-choices.solo .start-btn.kids {
  aspect-ratio: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 220px;
  padding: 16px 44px;
  border-radius: 999px;
  font-size: 22px;
}
.start-choices.solo .start-btn.kids svg { display: none; }
html.desktop .start-choices.solo .start-btn.kids { min-width: 280px; padding: 20px 60px; font-size: 26px; border-radius: 999px; }

/* ---------- Waiting for the viewer after a few automatic moves ---------- */

.next-hint {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: calc(150px + var(--safe-bottom, 0px));
  margin: 0;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 10px);
  transition: opacity 0.3s, transform 0.3s;
}
.next-hint::before { content: '↑ '; }
.card.waiting .next-hint { opacity: 1; transform: translate(-50%, 0); animation: hint-bob 1.6s ease-in-out 0.3s infinite; }
@keyframes hint-bob { 50% { transform: translate(-50%, -8px); } }
@media (prefers-reduced-motion: reduce) { .card.waiting .next-hint { animation: none; } }

/* ---------- Kids: two top buttons, album and daily goal ---------- */

body.kids .topbar-actions { gap: 6px; align-items: center; }
/* Three buttons next to the name: compact tiles, the emoji above a short label. */
body.kids .learn-btn {
  flex: 0 1 76px;
  min-width: 0;
  height: 52px;
  padding: 4px 4px 5px;
  border-radius: 16px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 2px;
  font-size: 11px;
  line-height: 1.1;
  white-space: normal;
  text-align: center;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
}
body.kids .learn-btn[hidden] { display: none; }
body.kids .learn-btn > span[aria-hidden] { font-size: 18px; line-height: 1; }
body.kids .parents-top { background: linear-gradient(135deg, #8b3fe0, #5b1fc0); color: #fff; }
body.kids .topbar-actions { flex: 1 1 auto; justify-content: flex-end; min-width: 0; }
body.kids .topbar .icon-btn#home-btn { flex: none; }
body.kids .album-top { background: linear-gradient(135deg, #ffd166, #ff8a00); }
/* Room for both buttons on a phone: the name gets smaller ("לילדים" under it) and the
   sound button moves down, under the top row. */
body.kids .topbar .brand { font-size: 17px; line-height: 1.05; }
body.kids .topbar .brand-kids { display: block; font-size: 13px; }
body.kids .topbar .brand-kids[hidden] { display: none; }
body.kids .topbar-start { gap: 8px; }
#mute {
  position: absolute;
  top: calc(10px + var(--safe-top) + 52px);
  inset-inline-end: var(--gutter);
}
body.kids #mute { top: calc(10px + var(--safe-top) + 60px); }
body.kids #topics-open { top: calc(10px + var(--safe-top) + 112px); }

/* The album fits one screen: page turns are always in view. */
.album-sticker { gap: 6px; }
.album-face, .album-slot { width: min(100%, 104px, 12.5dvh); }
.album-page { gap: 18px 12px; padding: 20px 14px 16px; }
.album-nav {
  position: sticky;
  bottom: 0;
  z-index: 4;
  padding-block: 10px calc(10px + var(--safe-bottom, 0px));
  background: linear-gradient(to top, var(--k-bg) 70%, transparent);
}
.rail-btn span { max-width: 72px; text-align: center; line-height: 1.2; }

/* ---------- Main feed: timeline and map ---------- */

.topbar-actions { align-items: center; gap: 6px; }
.learn-btn.timeline-top, .learn-btn.map-top {
  height: 44px;
  padding: 0 14px;
  color: #fff;
  font-family: inherit;
  font-size: 14px;
}
.timeline-top { background: linear-gradient(135deg, #d6123f, #8a1fd6); }
.map-top { background: linear-gradient(135deg, #0a6fb3, #0f766e); }

.explore {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  background: #0d0d10;
  color: var(--fg);
  opacity: 0;
  transition: opacity 0.2s;
}
.explore.open { opacity: 1; }
.explore-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: calc(14px + var(--safe-top)) var(--gutter) 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.explore-title { margin: 0; font-size: 22px; font-weight: 800; }
.explore-sub { margin: 4px 0 0; color: var(--fg-dim); font-size: 14px; line-height: 1.5; }
.explore-close { flex: none; width: 44px; height: 44px; padding: 10px; border-radius: 50%; background: rgba(255, 255, 255, 0.1); }
.explore-close svg { width: 100%; height: 100%; }
.explore-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.explore-note, .explore-hint { margin: 8px var(--gutter); color: var(--fg-dim); font-size: 14px; line-height: 1.5; }
.explore-hint { text-align: center; }

.tl-scroller {
  flex: 1;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  display: flex;
  align-items: stretch;
}
.tl-track { position: relative; display: flex; min-height: 420px; padding-inline: 24px; }
.tl-rail {
  position: absolute;
  inset-inline: 0;
  top: 50%;
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(to left, #a02cfe, #fe2c55, #ffb800, #25f4ee);
}
.tl-era {
  position: relative;
  flex: none;
  border-inline-start: 1px dashed rgba(255, 255, 255, 0.18);
}
.tl-era-label {
  position: absolute;
  top: 14px;
  inset-inline-start: 14px;
  display: grid;
  gap: 2px;
}
.tl-era-name { font-size: 17px; font-weight: 800; }
.tl-era-span { color: var(--fg-dim); font-size: 12px; }
.tl-empty {
  position: absolute;
  top: calc(50% + 22px);
  inset-inline: 14px;
  margin: 0;
  color: rgba(255, 255, 255, 0.35);
  font-size: 13px;
  text-align: center;
}
.tl-item {
  position: absolute;
  width: 88px;
  margin-inline-start: -44px;
  display: grid;
  justify-items: center;
  gap: 3px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: center;
  cursor: pointer;
}
.tl-item:active .tl-face { transform: scale(0.94); }
.tl-item.picked .tl-face { box-shadow: 0 0 0 3px #fe2c55; }
/* A tapped entry: its name and a button to watch it, on the other side of the line. */
.tl-pop {
  position: absolute;
  z-index: 2;
  width: 150px;
  margin-inline-start: -75px;
  display: grid;
  justify-items: center;
  gap: 2px;
  padding: 10px;
  border-radius: 14px;
  background: #fff;
  color: #111;
  text-align: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  font-family: 'Rubik', system-ui, sans-serif;
}
.tl-pop.above { top: calc(50% + 14px); }
.tl-pop.below { bottom: calc(50% + 14px); }
.tl-pop strong { font-size: 14px; line-height: 1.25; }
.tl-pop span { color: #555; font-size: 12px; }
.tl-item.above { bottom: calc(50% + 14px); }
.tl-item.below { top: calc(50% + 14px); }
.tl-item::after {
  content: '';
  position: absolute;
  inset-inline-start: 50%;
  width: 2px;
  height: 14px;
  background: rgba(255, 255, 255, 0.4);
}
.tl-item.above::after { bottom: -14px; }
.tl-item.below::after { top: -14px; }
.tl-item.below .tl-face { order: -1; }
.tl-face, .map-face {
  display: grid;
  place-items: center;
  border-radius: 50%;
  overflow: hidden;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
}
.tl-face { width: 58px; height: 58px; border: 3px solid #fff; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5); font-size: 22px; }
/* Leaflet sizes marker images to their natural size; keep the thumbnail whole. */
.tl-face, .map-face { position: relative; }
.tl-face img, .map-face img, .leaflet-container .map-face img {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
}
.thumb-whole { object-fit: contain; }
.thumb-back { object-fit: cover; filter: blur(4px) brightness(0.8); transform: scale(1.2); }
.tl-name { font-size: 12px; font-weight: 700; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tl-year { color: #ffd166; font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; }

.map-box { flex: 1; min-height: 0; background: #aad3df; }
.map-pin { background: none; border: none; }
.map-face { width: 46px; height: 46px; border: 3px solid #fff; box-shadow: 0 3px 10px rgba(0, 0, 0, 0.45); font-size: 18px; }
.map-pop { display: grid; gap: 2px; font-family: 'Rubik', system-ui, sans-serif; direction: rtl; text-align: right; }
.map-pop strong { font-size: 14px; }
.map-pop span { color: #555; font-size: 12px; }
.map-watch {
  margin-top: 8px;
  padding: 8px 12px;
  border: 0;
  border-radius: 999px;
  background: #fe2c55;
  color: #fff;
  font: 700 13px/1.2 'Rubik', system-ui, sans-serif;
  cursor: pointer;
}

/* ---------- Main feed: "joining the timeline / map" in an entry's last seconds ---------- */

.finale-box {
  position: absolute;
  z-index: 3;
  inset-inline: var(--gutter);
  top: calc(118px + var(--safe-top));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}
.finale-chip {
  padding: 8px 16px;
  border-radius: 999px;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transform: translateY(-10px) scale(0.9);
}
.finale-chip.time { background: linear-gradient(135deg, #fe2c55, #a02cfe); }
.finale-chip.place { background: linear-gradient(135deg, #1fb6ff, #0f766e); }
.card.finale .finale-chip { animation: finale-in 0.45s cubic-bezier(0.2, 1.4, 0.4, 1) forwards; }
.card.finale .finale-chip + .finale-chip { animation-delay: 0.25s; }
@keyframes finale-in { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .card.finale .finale-chip { animation: none; opacity: 1; transform: none; } }

/* ---------- Topics: picked on first launch, like choosing artists in a music app ---------- */

/* Under the sound button, which sits under the top row. */
#topics-open {
  position: absolute;
  top: calc(10px + var(--safe-top) + 104px);
  inset-inline-end: var(--gutter);
}
#topics-open[hidden] { display: none; }

.topics {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  width: min(480px, 100vw);
  margin: 0 auto;
  padding: calc(14px + var(--safe-top)) var(--gutter) 0;
  background: radial-gradient(120% 60% at 50% 0%, #2a0f1a 0%, #0d0d10 60%);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.25s, transform 0.25s;
}
.topics[hidden] { display: none; }
.topics.open { opacity: 1; transform: none; }
@media (min-width: 600px) { .topics { box-shadow: 0 0 0 100vmax #000; } }

.topics-head { position: relative; padding-top: 34px; }
.topics-head h2 { margin: 0; font-size: 30px; font-weight: 800; letter-spacing: -0.3px; text-wrap: balance; }
.topics-sub { margin: 6px 0 14px; color: var(--fg-dim); font-size: 15px; line-height: 1.5; }
.topics-skip {
  position: absolute;
  top: 0;
  inset-inline-end: 0;
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--fg-dim);
  font-size: 15px;
  font-weight: 500;
}
.topics-skip:hover { color: #fff; }

.topics-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 10px;
  padding: 4px 0 24px;
  scrollbar-width: none;
}
.topics-list::-webkit-scrollbar { display: none; }

.topic-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 18px 0 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1.5px solid rgba(255, 255, 255, 0.16);
  font-size: 16px;
  font-weight: 500;
  transition: background 0.18s, border-color 0.18s, color 0.18s;
}
.topic-emoji { font-size: 20px; line-height: 1; }
.topic-chip[aria-pressed='true'] {
  background: var(--accent);
  border-color: var(--accent);
  font-weight: 700;
}
.topic-chip[aria-pressed='true']::after { content: '✓'; font-weight: 800; margin-inline-start: 2px; }
.topic-chip.pop { animation: chip-pop 0.28s ease-out; }
@keyframes chip-pop { 40% { transform: scale(1.1); } }
@media (hover: hover) { .topic-chip:hover { border-color: rgba(255, 255, 255, 0.4); } }

.topics-foot {
  padding: 14px 0 calc(16px + var(--safe-bottom));
  background: linear-gradient(to top, #0d0d10 70%, transparent);
}
.topics-done {
  width: 100%;
  min-height: 56px;
  border-radius: 999px;
  background: #fff;
  color: #000;
  font-size: 18px;
  font-weight: 800;
  transition: opacity 0.2s, transform 0.1s;
}
.topics-done:active:not(:disabled) { transform: scale(0.97); }
.topics-done:disabled { opacity: 0.35; cursor: default; }

/* Kids: rounder letters and the version's yellow. */
.topics.kids { background: radial-gradient(120% 60% at 50% 0%, #3b2a66 0%, #14102a 65%); font-family: 'Varela Round', 'Rubik', system-ui, sans-serif; }
.topics.kids .topics-foot { background: linear-gradient(to top, #14102a 70%, transparent); }
.topics.kids .topic-chip[aria-pressed='true'] { background: #ffd166; border-color: #ffd166; color: #2a1400; }
.topics.kids .topics-done:not(:disabled) { background: linear-gradient(135deg, #ffd166, #ff8a00); color: #2a1400; }

@media (prefers-reduced-motion: reduce) {
  .topics { transition: none; }
  .topic-chip.pop { animation: none; }
}

/* ---------- Read-along subtitles ---------- */
/* Each word lights up as it's spoken; the words still to come are plain white. */

.card .subs span i {
  font-style: normal;
  color: #fff;
  transition: color 0.12s;
}
.card .subs span i.said { color: #7ce0ff; }
body.kids .card .subs span i.said { color: #ffd166; }

/* ---------- Kids: daily review ("זוכרים את...?") ---------- */

.review-head { display: flex; align-items: center; gap: 12px; }
.review-pic { width: 56px; height: 56px; flex: none; border-radius: 50%; object-fit: cover; border: 3px solid #fff; }
.review-from { margin: 0; color: var(--k-dim); font-size: 15px; line-height: 1.4; }

/* ---------- Kids: explorer ranks per topic ---------- */

.ranks { display: grid; gap: 12px; }
.rank-row { display: grid; gap: 5px; padding: 10px 12px; border-radius: 14px; background: var(--k-card); }
.rank-top { display: flex; justify-content: space-between; gap: 8px; font-size: 15px; }
.rank-topic { font-weight: 700; }
.rank-name { color: var(--k-yellow); font-weight: 700; white-space: nowrap; }
.rank-bar { flex: none; height: 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.14); overflow: hidden; }
.rank-fill { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #3ddc97, #ffd166); }
.rank-next { color: var(--k-dim); font-size: 12px; }

/* ---------- Kids: sticker series ---------- */

.album-series {
  /* A sideways scroller in the panel's flex column: never squeezed in height. */
  flex: none;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 4px;
  margin-inline: calc(-1 * var(--gutter));
  padding-inline: var(--gutter);
  scrollbar-width: none;
}
.album-series::-webkit-scrollbar { display: none; }
.album-chip {
  flex: none;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--k-card);
  color: var(--k-ink);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}
.album-chip.on { background: var(--k-yellow); color: #2a1400; }
.album-chip.done:not(.on) { box-shadow: inset 0 0 0 2px var(--k-yellow); }
.album-series-note { flex: none; margin: 0; min-height: 1.2em; text-align: center; color: var(--k-dim); font-size: 14px; }
.album-series-note.complete { color: var(--k-yellow); font-weight: 700; }
.album-face, .album-slot { width: min(100%, 104px, 11dvh); }

/* A shiny sticker, earned with a perfect quiz: a glow that cycles through the rainbow. */
.album-sticker.shiny .album-face { animation: sticker-shine 3s linear infinite; }
@keyframes sticker-shine {
  0%, 100% { box-shadow: 0 0 0 3px #ff6b6b, 0 0 18px 4px rgba(255, 107, 107, 0.75); }
  25% { box-shadow: 0 0 0 3px #ffd166, 0 0 18px 4px rgba(255, 209, 102, 0.75); }
  50% { box-shadow: 0 0 0 3px #3ddc97, 0 0 18px 4px rgba(61, 220, 151, 0.75); }
  75% { box-shadow: 0 0 0 3px #7ce0ff, 0 0 18px 4px rgba(124, 224, 255, 0.75); }
}
.album-sticker.shiny .album-name::after { content: ' ✨'; }
@media (prefers-reduced-motion: reduce) {
  .album-sticker.shiny .album-face { animation: none; box-shadow: 0 0 0 3px #ffd166, 0 0 18px 4px rgba(255, 209, 102, 0.75); }
}

/* ---------- Kids: parents' area ---------- */

.parents-note { margin: 4px 0 0; color: var(--k-dim); font-size: 14px; line-height: 1.5; }
.parents-topics { display: flex; flex-wrap: wrap; gap: 8px; }
.parents-topic { padding: 6px 12px; border-radius: 999px; background: var(--k-card); font-size: 14px; font-weight: 700; }
.parents-talk { display: grid; gap: 12px; }
.talk-card { display: grid; gap: 6px; padding: 14px; border-radius: 16px; background: var(--k-card); }
.talk-title { margin: 0 0 2px; color: var(--k-yellow); font-weight: 800; font-size: 16px; }
.talk-q { margin: 6px 0 0; font-size: 17px; font-weight: 700; line-height: 1.45; }
.talk-hint { margin: 0; color: var(--k-dim); font-size: 14px; line-height: 1.5; }

/* ---------- Kids: a page design for each sticker series ---------- */
/* A series page gets its own paper, frame color and corner doodles. Dark pages switch
   the "?" slots to light ink. */

.album-page {
  --pg-slot: rgba(42, 20, 0, 0.22);
  --pg-slot-ink: rgba(42, 20, 0, 0.25);
}
.album-page[data-theme] .album-slot { border-color: var(--pg-slot); color: var(--pg-slot-ink); }
.album-page[data-theme]::before { content: var(--pg-a, '⭐'); opacity: 0.8; font-size: 26px; }
.album-page[data-theme]::after { content: var(--pg-b, '🌈'); opacity: 0.8; font-size: 26px; }
.album-page[data-theme] {
  background: var(--pg-bg);
  box-shadow:
    inset 10px 0 12px -8px rgba(0, 0, 0, 0.3),
    inset 0 0 0 3px var(--pg-edge, #f5dca6),
    0 14px 34px rgba(0, 0, 0, 0.4);
}
.album-page.dark {
  --pg-slot: rgba(255, 255, 255, 0.35);
  --pg-slot-ink: rgba(255, 255, 255, 0.45);
}
.album-banner {
  grid-column: 1 / -1;
  justify-self: center;
  margin: -8px 0 -8px;
  padding: 5px 16px;
  border-radius: 999px;
  background: var(--pg-edge, #f5dca6);
  color: var(--pg-banner-ink, #2a1400);
  font: 800 15px/1.2 'Varela Round', 'Rubik', system-ui, sans-serif;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
  transform: rotate(-1.5deg);
}

.album-page[data-theme='space'] {
  --pg-a: '🪐'; --pg-b: '☄️'; --pg-edge: #8c7bff; --pg-banner-ink: #fff;
  --pg-bg:
    radial-gradient(circle at 20% 30%, #fff 0.8px, transparent 1.6px) 0 0 / 46px 46px,
    radial-gradient(circle at 70% 60%, rgba(255, 255, 255, 0.7) 0.6px, transparent 1.4px) 0 0 / 31px 31px,
    radial-gradient(ellipse at 85% 15%, rgba(140, 90, 255, 0.45), transparent 45%),
    radial-gradient(ellipse at 10% 90%, rgba(40, 140, 255, 0.35), transparent 50%),
    linear-gradient(160deg, #0b1030, #1b1250);
}
.album-page[data-theme='tech'] {
  --pg-a: '🤖'; --pg-b: '💾'; --pg-edge: #2ee6a6; --pg-banner-ink: #032b20;
  --pg-bg:
    repeating-linear-gradient(0deg, rgba(46, 230, 166, 0.12) 0 1px, transparent 1px 22px),
    repeating-linear-gradient(90deg, rgba(46, 230, 166, 0.12) 0 1px, transparent 1px 22px),
    linear-gradient(160deg, #0d2a2c, #123d44);
}
.album-page[data-theme='science'] {
  --pg-a: '🧪'; --pg-b: '🔭'; --pg-edge: #7cc4ff;
  --pg-bg:
    repeating-linear-gradient(0deg, rgba(40, 120, 200, 0.14) 0 1px, transparent 1px 16px),
    repeating-linear-gradient(90deg, rgba(40, 120, 200, 0.14) 0 1px, transparent 1px 16px),
    linear-gradient(160deg, #f4faff, #dcefff);
}
.album-page[data-theme='animals'] {
  --pg-a: '🐾'; --pg-b: '🦁'; --pg-edge: #e9a64a;
  --pg-bg:
    radial-gradient(circle at 50% 50%, rgba(160, 100, 30, 0.12) 3px, transparent 4px) 0 0 / 28px 28px,
    radial-gradient(ellipse at 20% 100%, rgba(120, 170, 60, 0.25), transparent 50%),
    linear-gradient(160deg, #fff5da, #ffdea0);
}
.album-page[data-theme='nature'] {
  --pg-a: '🌿'; --pg-b: '🌻'; --pg-edge: #7fcf62;
  --pg-bg:
    radial-gradient(ellipse at 0% 0%, rgba(120, 200, 90, 0.35), transparent 40%),
    radial-gradient(ellipse at 100% 100%, rgba(80, 170, 70, 0.3), transparent 45%),
    linear-gradient(160deg, #f2fbe9, #cfeebd);
}
.album-page[data-theme='sea'] {
  --pg-a: '🐠'; --pg-b: '🐚'; --pg-edge: #5fd3ff; --pg-banner-ink: #04324a;
  --pg-bg:
    radial-gradient(circle at 30% 40%, rgba(255, 255, 255, 0.35) 2px, transparent 3px) 0 0 / 40px 60px,
    radial-gradient(ellipse at 50% 0%, rgba(255, 255, 255, 0.35), transparent 55%),
    linear-gradient(180deg, #58c6f0, #1a6fb0 70%, #124e86);
}
.album-page[data-theme='history'] {
  --pg-a: '🏺'; --pg-b: '📜'; --pg-edge: #c9a25c;
  --pg-bg:
    radial-gradient(ellipse at 50% 50%, transparent 55%, rgba(120, 80, 20, 0.25)),
    linear-gradient(160deg, #f6e7c1, #e4c98c);
}
.album-page[data-theme='people'] {
  --pg-a: '🎩'; --pg-b: '🌟'; --pg-edge: #ff9ec4;
  --pg-bg:
    radial-gradient(circle at 50% 50%, rgba(255, 120, 170, 0.14) 2px, transparent 3px) 0 0 / 24px 24px,
    linear-gradient(160deg, #fff2f7, #ffd9e8);
}
.album-page[data-theme='places'] {
  --pg-a: '🧭'; --pg-b: '🗺️'; --pg-edge: #d8b26a;
  --pg-bg:
    repeating-radial-gradient(circle at 80% 20%, transparent 0 18px, rgba(150, 110, 40, 0.1) 18px 19px),
    linear-gradient(160deg, #fbf3dc, #eadcae);
}
.album-page[data-theme='israel'] {
  --pg-a: '🕊️'; --pg-b: '🌾'; --pg-edge: #2f6fe0; --pg-banner-ink: #fff;
  --pg-bg:
    linear-gradient(180deg, transparent 4%, #2f6fe0 4% 7.5%, transparent 7.5% 92.5%, #2f6fe0 92.5% 96%, transparent 96%),
    linear-gradient(160deg, #ffffff, #eef4ff);
}
.album-page[data-theme='transport'] {
  --pg-a: '✈️'; --pg-b: '🚂'; --pg-edge: #ffb347;
  --pg-bg:
    linear-gradient(180deg, transparent 88%, #555 88% 100%),
    repeating-linear-gradient(90deg, transparent 0 18px, #ffd166 18px 34px) 0 94.5% / 100% 3px no-repeat,
    radial-gradient(ellipse at 25% 20%, #fff, transparent 30%),
    linear-gradient(180deg, #bfe6ff, #eaf7ff 85%);
}
.album-page[data-theme='sports'] {
  --pg-a: '⚽'; --pg-b: '🏆'; --pg-edge: #ffffff;
  --pg-bg:
    radial-gradient(circle at 50% 50%, transparent 58px, rgba(255, 255, 255, 0.6) 58px 61px, transparent 61px),
    linear-gradient(90deg, transparent calc(50% - 1.5px), rgba(255, 255, 255, 0.6) calc(50% - 1.5px) calc(50% + 1.5px), transparent calc(50% + 1.5px)),
    repeating-linear-gradient(180deg, #3fae5a 0 36px, #379e50 36px 72px);
}
.album-page[data-theme='music'] {
  --pg-a: '🎵'; --pg-b: '🎸'; --pg-edge: #ff7ad9; --pg-banner-ink: #3a0030;
  --pg-bg:
    repeating-linear-gradient(180deg, transparent 0 22px, rgba(255, 255, 255, 0.12) 22px 23px, transparent 23px 30px),
    radial-gradient(ellipse at 90% 10%, rgba(255, 120, 220, 0.4), transparent 45%),
    linear-gradient(160deg, #2b0f4d, #4d1a6e);
}
.album-page[data-theme='film'] {
  --pg-a: '🎬'; --pg-b: '🍿'; --pg-edge: #ffd166;
  --pg-bg:
    repeating-linear-gradient(180deg, #111 0 8px, #f2f2f2 8px 16px, #111 16px 24px) left / 12px 100% no-repeat,
    repeating-linear-gradient(180deg, #111 0 8px, #f2f2f2 8px 16px, #111 16px 24px) right / 12px 100% no-repeat,
    radial-gradient(ellipse at 50% 0%, rgba(255, 209, 102, 0.3), transparent 60%),
    linear-gradient(160deg, #1b1b1f, #2c2530);
}
.album-page[data-theme='books'] {
  --pg-a: '📚'; --pg-b: '✏️'; --pg-edge: #9ab8ff;
  --pg-bg:
    linear-gradient(90deg, transparent 34px, rgba(230, 70, 70, 0.45) 34px 36px, transparent 36px),
    repeating-linear-gradient(180deg, transparent 0 25px, rgba(70, 120, 220, 0.25) 25px 26px),
    #fffdf6;
}
.album-page[data-theme='art'] {
  --pg-a: '🎨'; --pg-b: '🖌️'; --pg-edge: #ff9f6b;
  --pg-bg:
    radial-gradient(circle at 15% 20%, rgba(255, 107, 107, 0.3), transparent 22%),
    radial-gradient(circle at 85% 30%, rgba(124, 224, 255, 0.35), transparent 24%),
    radial-gradient(circle at 30% 85%, rgba(255, 209, 102, 0.4), transparent 24%),
    radial-gradient(circle at 80% 80%, rgba(199, 125, 255, 0.3), transparent 22%),
    #fffaf3;
}
.album-page[data-theme='architecture'] {
  --pg-a: '📐'; --pg-b: '🏗️'; --pg-edge: #bfe0ff; --pg-banner-ink: #0d2f5c;
  --pg-bg:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.12) 0 1px, transparent 1px 20px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.12) 0 1px, transparent 1px 20px),
    linear-gradient(160deg, #1d4e89, #163c6c);
}
.album-page[data-theme='health'] {
  --pg-a: '🩺'; --pg-b: '❤️'; --pg-edge: #6fdcb8;
  --pg-bg:
    linear-gradient(90deg, transparent 12px, rgba(60, 190, 150, 0.16) 12px 16px, transparent 16px) 0 0 / 28px 28px,
    linear-gradient(0deg, transparent 12px, rgba(60, 190, 150, 0.16) 12px 16px, transparent 16px) 0 0 / 28px 28px,
    linear-gradient(160deg, #f1fffa, #d4f5ea);
}
.album-page[data-theme='math'] {
  --pg-a: '🔢'; --pg-b: '➗'; --pg-edge: #a0a8ff;
  --pg-bg:
    repeating-linear-gradient(0deg, rgba(90, 100, 220, 0.16) 0 1px, transparent 1px 14px),
    repeating-linear-gradient(90deg, rgba(90, 100, 220, 0.16) 0 1px, transparent 1px 14px),
    #fbfbff;
}
.album-page[data-theme='religion'] {
  --pg-a: '🐉'; --pg-b: '🏰'; --pg-edge: #f5c86b; --pg-banner-ink: #3a2000;
  --pg-bg:
    radial-gradient(circle at 80% 18%, rgba(255, 220, 130, 0.55), transparent 16%),
    radial-gradient(circle at 30% 60%, rgba(255, 255, 255, 0.5) 0.8px, transparent 1.6px) 0 0 / 38px 38px,
    linear-gradient(180deg, #2d1b5a, #6b3a7a 60%, #c46a5a);
}
.album-page[data-theme='food'] {
  --pg-a: '🍕'; --pg-b: '🍎'; --pg-edge: #ff8a80;
  --pg-bg:
    repeating-conic-gradient(rgba(240, 80, 80, 0.16) 0 25%, transparent 0 50%) 0 0 / 36px 36px,
    #fffaf5;
}
.album-page[data-theme='games'] {
  --pg-a: '🎮'; --pg-b: '🧸'; --pg-edge: #ffd166;
  --pg-bg:
    radial-gradient(circle at 20% 30%, #ff6b6b 2.5px, transparent 3.5px) 0 0 / 50px 50px,
    radial-gradient(circle at 60% 70%, #3ddc97 2.5px, transparent 3.5px) 0 0 / 44px 44px,
    radial-gradient(circle at 80% 20%, #7ce0ff 2.5px, transparent 3.5px) 0 0 / 38px 38px,
    linear-gradient(160deg, #fffbe6, #ffeec2);
}

/* ---------- Kids: the daily review card in the feed ---------- */
/* Looks like an entry: full screen, title at the bottom, the questions in the middle. */

.card.review-card {
  --k-card: rgba(255, 255, 255, 0.14);
  --k-ink: #fff;
  --k-dim: rgba(255, 255, 255, 0.8);
  --k-yellow: #ffd166;
  --k-green: #3ddc97;
  --k-red: #ff6b6b;
  background:
    radial-gradient(ellipse at 80% 10%, rgba(255, 209, 102, 0.25), transparent 45%),
    radial-gradient(ellipse at 10% 80%, rgba(124, 224, 255, 0.25), transparent 50%),
    linear-gradient(160deg, #6a2cf5, #2a1470 70%, #1a0f4a);
  color: #fff;
  font-family: 'Varela Round', 'Rubik', system-ui, sans-serif;
  user-select: none;
}
/* Floating thought bubbles in the background. */
.review-sky {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 15% 22%, rgba(255, 255, 255, 0.14) 0 18px, transparent 19px),
    radial-gradient(circle at 85% 38%, rgba(255, 255, 255, 0.1) 0 26px, transparent 27px),
    radial-gradient(circle at 25% 70%, rgba(255, 255, 255, 0.08) 0 34px, transparent 35px),
    radial-gradient(circle at 78% 82%, rgba(255, 255, 255, 0.12) 0 14px, transparent 15px);
}
.review-stage {
  position: absolute;
  inset: calc(120px + var(--safe-top)) var(--gutter) calc(130px + var(--safe-bottom));
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
}
.review-stage .kids-btn { align-self: stretch; }
.review-stage .kids-question { font-size: 22px; }
.review-intro { display: grid; justify-items: center; gap: 18px; text-align: center; }
.review-brain { font-size: 96px; line-height: 1; animation: review-think 2.6s ease-in-out infinite; }
@keyframes review-think { 50% { transform: translateY(-8px) rotate(-6deg) scale(1.05); } }
.review-lead { margin: 0; font-size: 20px; font-weight: 700; line-height: 1.5; text-wrap: balance; }
.review-intro .kids-btn { justify-self: stretch; font-size: 19px; }
.review-card .kids-done { display: grid; justify-items: center; gap: 12px; text-align: center; }
.review-card .kids-done .kids-btn { justify-self: stretch; }
.card.review-card .dot { background: #c77dff; }
@media (prefers-reduced-motion: reduce) { .review-brain { animation: none; } }
/* Narrow phones: the name keeps its room, the three buttons get a little smaller. */
body.kids .topbar-start { flex: none; }
@media (max-width: 380px) {
  body.kids .topbar .brand { font-size: 15px; }
  body.kids .learn-btn { flex-basis: 66px; font-size: 10.5px; }
  body.kids .learn-btn > span[aria-hidden] { font-size: 16px; }
}
.album-series-note:empty { display: none; }

/* ---------- Kids: "what do you guess?" before a video ---------- */

.guess-box {
  position: absolute;
  z-index: 4;
  inset-inline: var(--gutter);
  top: 30%;
  display: grid;
  gap: 12px;
  padding: 20px 16px;
  border-radius: 22px;
  background: rgba(20, 16, 60, 0.9);
  border: 2px solid #ffd166;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
  font-family: 'Varela Round', 'Rubik', system-ui, sans-serif;
  text-align: center;
  animation: kids-pop 0.45s cubic-bezier(0.2, 1.4, 0.4, 1);
}
.guess-label { margin: 0; color: #ffd166; font-size: 17px; font-weight: 800; }
.guess-q { margin: 0; font-size: 21px; font-weight: 700; line-height: 1.45; }
.guess-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.guess-option {
  min-height: 56px;
  padding: 8px 10px;
  border-radius: 16px;
  background: linear-gradient(135deg, #7ce0ff, #3a86ff);
  color: #04203f;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.25;
}
.guess-option:last-child { background: linear-gradient(135deg, #ffd166, #ff8a00); color: #2a1400; }
.guess-option:active { transform: scale(0.96); }
.guess-chip,
.guess-result {
  position: absolute;
  z-index: 3;
  inset-inline: var(--gutter) 84px;
  top: calc(126px + var(--safe-top));
  margin: 0;
  padding: 8px 12px;
  border-radius: 14px;
  background: rgba(20, 16, 60, 0.78);
  font: 700 14px/1.4 'Varela Round', 'Rubik', system-ui, sans-serif;
  pointer-events: none;
}
.guess-chip { transition: opacity 0.5s; animation: kids-pop 0.45s cubic-bezier(0.2, 1.4, 0.4, 1); }
.guess-chip.gone { opacity: 0; }
/* The answer: a big card in the middle of the video. */
.guess-result {
  top: 34%;
  inset-inline: var(--gutter);
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 18px 16px;
  border-radius: 22px;
  background: rgba(20, 16, 60, 0.9);
  text-align: center;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  animation: kids-pop 0.45s cubic-bezier(0.2, 1.4, 0.4, 1);
}
.guess-result.right { border: 3px solid #3ddc97; }
.guess-result.wrong { border: 3px solid #ffd166; }
.guess-result-icon { font-size: 52px; line-height: 1; }
.guess-result.right .guess-result-icon { animation: guess-cheer 0.9s ease-in-out 2; }
.guess-result.wrong .guess-result-icon { animation: guess-wobble 0.6s ease-in-out 2; }
.guess-result-title { margin: 0; font-size: 26px; color: #ffd166; }
.guess-result.right .guess-result-title { color: #3ddc97; }
.guess-result-text { margin: 0; font-size: 17px; font-weight: 400; }
.guess-result-note { margin: 0; font-size: 14px; font-weight: 400; opacity: 0.8; }
@keyframes guess-cheer { 50% { transform: scale(1.25) rotate(-8deg); } }
@keyframes guess-wobble { 25% { transform: rotate(-12deg); } 75% { transform: rotate(12deg); } }
@media (prefers-reduced-motion: reduce) { .guess-result-icon { animation: none !important; } }

/* ---------- Kids: empty sticker slots with a teaser ---------- */
/* In a series, an empty slot shows the hook line of the entry it waits for, over a faint "?". */

.album-slot.teaser {
  position: relative;
  padding: 7%;
  font: inherit;
}
.album-slot-mark {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font: 800 60px/1 'Varela Round', 'Rubik', system-ui, sans-serif;
  opacity: 0.35;
}
.album-slot-hook {
  position: relative;
  font: 700 11.5px/1.2 'Varela Round', 'Rubik', system-ui, sans-serif;
  text-align: center;
  text-wrap: balance;
  color: var(--pg-teaser-ink, #5a3a10);
}
/* Never cut off with "...": a longer line gets a smaller font instead. */
.album-slot-hook.long { font-size: 10.5px; }
.album-page.dark .album-slot-hook { color: rgba(255, 255, 255, 0.92); }

/* ---------- Icebreakers (main) and facts for class (kids): surprise cards in the feed ---------- */
/* A big designed title and one short paragraph, then a nudge to keep scrolling. */

.card.ice-card {
  --ice-a: #25f4ee;
  --ice-b: #fe2c55;
  background:
    radial-gradient(ellipse at 90% 5%, rgba(37, 244, 238, 0.28), transparent 45%),
    radial-gradient(ellipse at 0% 100%, rgba(254, 44, 85, 0.35), transparent 55%),
    linear-gradient(165deg, #10243a, #0b1422 60%, #1d0b1c);
  color: #fff;
}
.ice-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 24%, rgba(255, 255, 255, 0.07) 0 40px, transparent 41px),
    radial-gradient(circle at 82% 70%, rgba(255, 255, 255, 0.05) 0 60px, transparent 61px);
}
.ice-stage {
  position: absolute;
  inset: calc(118px + var(--safe-top)) var(--gutter) calc(110px + var(--safe-bottom));
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
}
.ice-badge {
  align-self: flex-start;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  font-size: 14px;
  font-weight: 700;
}
/* The title takes the stage: big, heavy, in a two-color gradient with a quote mark behind it. */
.ice-title {
  position: relative;
  margin: 0;
  font-size: clamp(34px, 10.5vw, 48px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.5px;
  text-wrap: balance;
  overflow-wrap: anywhere; /* a very long word wraps instead of running off the screen */
  background: linear-gradient(120deg, var(--ice-a), #fff 45%, var(--ice-b));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.35));
}
.ice-title::before {
  content: '”';
  position: absolute;
  inset-inline-start: -6px;
  top: -0.55em;
  font-size: 2.6em;
  line-height: 1;
  color: rgba(255, 255, 255, 0.1);
  -webkit-text-fill-color: rgba(255, 255, 255, 0.1);
  pointer-events: none;
}
.ice-text { margin: 0; font-size: 19px; line-height: 1.6; color: rgba(255, 255, 255, 0.9); }
.ice-scroll {
  position: absolute;
  inset-inline: 0;
  bottom: calc(64px + var(--safe-bottom));
  margin: 0;
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
  animation: ice-bob 1.6s ease-in-out infinite;
  pointer-events: none;
}
@keyframes ice-bob { 50% { transform: translateY(-6px); } }
.ice-scroll::before { content: '↑ '; }
.ice-meta {
  position: absolute;
  inset-inline: var(--gutter);
  bottom: calc(24px + var(--safe-bottom));
  margin: 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
}
@media (prefers-reduced-motion: reduce) { .ice-scroll { animation: none; } }

/* Kids: brighter, rounder. */
.card.ice-card.kids-fact {
  --ice-a: #ffd166;
  --ice-b: #7ce0ff;
  background:
    radial-gradient(ellipse at 90% 5%, rgba(255, 209, 102, 0.35), transparent 45%),
    radial-gradient(ellipse at 0% 100%, rgba(61, 220, 151, 0.3), transparent 55%),
    linear-gradient(165deg, #1f6fd1, #2a2f8a 60%, #3b1c7a);
  font-family: 'Varela Round', 'Rubik', system-ui, sans-serif;
}
.kids-fact .ice-badge { background: linear-gradient(135deg, #ffd166, #ff8a00); color: #2a1400; border: 0; }

/* ---------- Kids: "ציירו מה למדתם" ---------- */

.draw-lead { margin-bottom: 8px; }
/* The board shrinks on short screens so the colors, tools and save button all fit. */
.draw-board {
  display: block;
  width: min(100%, 520px, calc(100dvh - 385px));
  min-width: 220px;
  aspect-ratio: 1;
  margin: 0 auto;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
  touch-action: none;
  cursor: crosshair;
}
.draw-colors {
  display: grid;
  grid-template-columns: repeat(8, 30px);
  justify-content: center;
  gap: 7px;
  margin: 0 0 10px;
}
.draw-color {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--c);
  border: 2px solid rgba(255, 255, 255, 0.35);
  transition: transform 0.12s;
}
.draw-color.on { border: 3px solid #ffd166; transform: scale(1.18); }
.draw-tools { margin: 10px 0 8px; }
.draw-bar {
  position: sticky;
  bottom: 0;
  padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
  background: linear-gradient(transparent, var(--k-bg, #141338) 30%);
}
.draw-tools { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; margin: 12px 0; }
.draw-sizes { display: flex; gap: 6px; }
.draw-size {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
}
.draw-size span { width: var(--d); height: var(--d); border-radius: 50%; background: #fff; }
.draw-size.on, .draw-tool.on { background: rgba(255, 209, 102, 0.9); }
.draw-size.on span { background: #2a1400; }
.draw-tool {
  width: 44px;
  height: 40px;
  padding: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  color: inherit;
  font: inherit;
  font-size: 20px;
}
.draw-tool.on { color: #2a1400; }
.draw-done { display: block; width: min(100%, 520px); margin: 0 auto; }
.draw-saved { display: block; width: min(70%, 320px); margin: 0 auto 12px; border-radius: 14px; box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35); transform: rotate(-3deg); }

/* In the album: a sticker with a drawing has a small palette badge, and a tap opens the drawing. */
.album-drawn {
  position: absolute;
  z-index: 3;
  inset-block-start: -2px;
  inset-inline-end: 2px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  font-size: 15px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}
.drawing-view {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(10, 8, 30, 0);
  transition: background 0.25s;
}
.drawing-view.open { background: rgba(10, 8, 30, 0.82); }
.drawing-frame {
  margin: 0;
  width: min(92vw, 460px);
  padding: 12px 12px 8px;
  border-radius: 20px;
  background: #fff;
  color: #1b1b1f;
  text-align: center;
  font: 700 16px/1.4 'Varela Round', 'Rubik', system-ui, sans-serif;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.5);
  transform: translate(var(--from-x), var(--from-y)) scale(0.2) rotate(-6deg);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.2, 1.2, 0.4, 1), opacity 0.2s;
}
.drawing-view.open .drawing-frame { transform: none; opacity: 1; }
.drawing-frame img { display: block; width: 100%; aspect-ratio: 1; border-radius: 12px; }
.drawing-frame figcaption { padding: 8px 4px 2px; }
@media (prefers-reduced-motion: reduce) { .drawing-frame { transition: opacity 0.2s; transform: none; } }

/* ---------- Kids: read aloud, levels ---------- */

.speak-btn {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-inline-start: 8px;
  vertical-align: middle;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  font-size: 17px;
  line-height: 1;
}
.speak-btn.on { background: #ffd166; animation: speak-pulse 0.8s ease-in-out infinite; }
@keyframes speak-pulse { 50% { transform: scale(1.12); } }
.kids-level {
  justify-self: start;
  margin: 0;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(255, 209, 102, 0.16);
  color: var(--k-yellow);
  font-size: 13px;
  font-weight: 700;
}

/* Word search by swipe: the letters under the finger light up. */
.kids-ws { touch-action: none; user-select: none; -webkit-user-select: none; }
.kids-ws-cell.path { background: var(--k-yellow); color: #2a1400; }

/* ---------- Kids: Sakrani the squirrel ---------- */

.owl-btn { display: grid; place-items: center; padding: 0; font-size: 24px; line-height: 1; }
.owl-btn[hidden] { display: none; }
.owl-btn-face, .owl-face, .owl-big { position: relative; display: inline-block; line-height: 1; }
/* Smaller and sitting on the head, which is on the left of the squirrel emoji (it faces left in every direction of the page). */
.owl-hat { position: absolute; top: -0.04em; left: 0.17em; transform: rotate(-18deg); font-size: 0.42em; line-height: 1; }
.owl-btn.bump, #album-open.bump { animation: owl-bump 0.5s cubic-bezier(0.2, 1.6, 0.4, 1); }
@keyframes owl-bump { 40% { transform: scale(1.3); } }

.owl-cheer {
  position: fixed;
  z-index: 40;
  inset-inline: 12px;
  bottom: calc(96px + env(safe-area-inset-bottom, 0px));
  display: flex;
  align-items: flex-end;
  gap: 8px;
  max-width: 440px;
  margin-inline: auto;
  pointer-events: none;
  font-family: 'Varela Round', 'Rubik', system-ui, sans-serif;
  opacity: 0;
  transform: translateY(24px) scale(0.9);
  transition: opacity 0.3s, transform 0.35s cubic-bezier(0.2, 1.4, 0.4, 1);
}
.owl-cheer.show { opacity: 1; transform: none; }
.owl-cheer .owl-face { font-size: 52px; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.4)); animation: owl-hop 0.9s ease-in-out 2; }
.owl-cheer.proud .owl-face { animation: owl-spin 0.8s ease-in-out; }
.owl-bubble {
  position: relative;
  margin-bottom: 18px;
  padding: 10px 14px;
  border-radius: 18px 18px 18px 4px;
  background: #fff;
  color: #1b1f4a;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
@keyframes owl-hop { 30% { transform: translateY(-10px); } 60% { transform: none; } }
@keyframes owl-spin { 50% { transform: scale(1.2) rotate(-10deg); } }
@media (prefers-reduced-motion: reduce) { .owl-cheer .owl-face { animation: none !important; } }

.owl-hero { position: relative; display: grid; place-items: center; min-height: 170px; }
.owl-big { font-size: 110px; animation: owl-hop 2.4s ease-in-out infinite; }
.owl-decos { position: absolute; inset: 0; pointer-events: none; }
.owl-deco { position: absolute; font-size: 28px; }
.owl-deco:nth-child(1) { top: 6%; inset-inline-start: 18%; }
.owl-deco:nth-child(2) { top: 6%; inset-inline-end: 18%; }
.owl-deco:nth-child(3) { bottom: 8%; inset-inline-start: 12%; }
.owl-deco:nth-child(4) { bottom: 8%; inset-inline-end: 12%; }
.owl-deco:nth-child(5) { top: 42%; inset-inline-start: 4%; }
.owl-deco:nth-child(6) { top: 42%; inset-inline-end: 4%; }
.owl-deco:nth-child(n + 7) { display: none; }
.owl-stage { margin: 0; text-align: center; font-size: 22px; font-weight: 800; color: var(--k-yellow); }

/* ---------- Kids: a golden sticker, and a sticker flying into the album ---------- */

.album-sticker.gold .album-face {
  box-shadow: 0 0 0 4px #f5c542, 0 0 22px 6px rgba(245, 197, 66, 0.8);
  background: linear-gradient(135deg, #fff3b0, #f5c542 45%, #b8860b);
}
.album-sticker.gold .album-face img { mix-blend-mode: luminosity; opacity: 0.85; }
.album-sticker.gold .album-face::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.75) 45%, transparent 60%);
  background-size: 250% 100%;
  animation: gold-glint 2.6s linear infinite;
}
.album-sticker.gold .album-name::after { content: ' 🌟'; }
@keyframes gold-glint { from { background-position: 150% 0; } to { background-position: -100% 0; } }
@media (prefers-reduced-motion: reduce) { .album-sticker.gold .album-face::after { animation: none; } }

.fly-sticker {
  position: fixed;
  z-index: 45;
  top: 50%;
  left: 50%;
  width: 120px;
  height: 120px;
  border-radius: 18px;
  border: 5px solid #fff;
  background: #ffd166 center / cover no-repeat;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
  pointer-events: none;
}

/* ---------- Kids: two doors to the next video ---------- */

.card.doors-card {
  display: grid;
  place-items: center;
  background:
    radial-gradient(ellipse at 85% 10%, rgba(255, 209, 102, 0.3), transparent 45%),
    radial-gradient(ellipse at 10% 90%, rgba(124, 224, 255, 0.25), transparent 50%),
    linear-gradient(160deg, #3b1c7a, #1a1250 70%);
  color: #fff;
}
.doors {
  width: calc(100% - 2 * var(--gutter));
  max-width: 460px;
  display: grid;
  gap: 12px;
  padding: 18px 14px;
  border-radius: 24px;
  background: rgba(20, 16, 60, 0.6);
  border: 2px solid #ffd166;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4);
  font-family: 'Varela Round', 'Rubik', system-ui, sans-serif;
  text-align: center;
}
.doors-sub { margin: -6px 0 0; color: rgba(255, 255, 255, 0.8); font-size: 15px; }
.doors-title { margin: 0; color: #ffd166; font-size: 21px; font-weight: 800; }
.doors-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 4px 6px 0; }
.door-wrap { display: grid; justify-items: center; gap: 10px; }
/* A door in its frame: two raised panels, a brass handle and a keyhole. */
.door {
  --wood: #8b4a1f;
  --wood-dark: #5c2e10;
  position: relative;
  width: 100%;
  max-width: 170px;
  aspect-ratio: 1 / 1.9;
  max-height: 46vh;
  padding: 0;
  border: 7px solid #d9b382;
  border-bottom-width: 4px;
  border-radius: 70px 70px 6px 6px;
  background: #120a05;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.5), inset 0 0 0 2px rgba(0, 0, 0, 0.35);
  perspective: 700px;
  overflow: hidden;
}
.door-wrap:last-child .door { --wood: #1f6f8b; --wood-dark: #0f3d4f; }
.door-behind {
  position: absolute;
  inset: 0;
  background: #ffd166 center / cover no-repeat;
}
.door-leaf {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: 1fr auto auto 1.3fr;
  justify-items: center;
  gap: 8px;
  padding: 16% 13% 12%;
  border-radius: 62px 62px 2px 2px;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.05) 0 3px, transparent 3px 11px),
    linear-gradient(90deg, var(--wood-dark), var(--wood) 30%, var(--wood) 70%, var(--wood-dark));
  transform-origin: right center;
  transition: transform 0.8s cubic-bezier(0.3, 0.1, 0.2, 1);
  backface-visibility: hidden;
}
.door-panel {
  width: 100%;
  border-radius: 8px;
  box-shadow: inset 3px 3px 0 rgba(0, 0, 0, 0.35), inset -2px -2px 0 rgba(255, 255, 255, 0.18);
}
.door-panel:first-child { border-radius: 40px 40px 8px 8px; }
/* The keyhole: a close-up of the picture through it. */
.door-keyhole {
  width: 60px;
  height: 86px;
  background: #000 center / 380% no-repeat;
  clip-path: path('M30 3 A24 24 0 0 1 43 47 L52 86 L8 86 L17 47 A24 24 0 0 1 30 3 Z');
  filter: drop-shadow(0 0 2px #000);
  animation: keyhole-peek 6s ease-in-out infinite alternate;
}
@keyframes keyhole-peek { from { background-position: 35% 40%; } to { background-position: 65% 60%; } }
.door-knob {
  justify-self: start;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff3c4, #e0a526 45%, #7a5208);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}
.door.open .door-leaf { transform: rotateY(-105deg); }
.door:active:not(.open) .door-leaf { filter: brightness(1.15); }
.door-hook {
  min-height: 2.7em;
  padding: 6px 10px;
  border-radius: 12px;
  background: rgba(255, 209, 102, 0.14);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
}
@media (prefers-reduced-motion: reduce) { .door-keyhole { animation: none; } .door-leaf { transition: none; } }
.doors-games { justify-self: center; padding: 8px 16px; border-radius: 999px; background: rgba(255, 255, 255, 0.14); color: #fff; font-size: 15px; font-weight: 700; }

/* ---------- Kids: who's watching? ---------- */

.profile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 14px; margin-top: 8px; }
.profile-pick {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 18px 8px;
  border-radius: 22px;
  background: var(--k-card);
  color: var(--k-ink);
}
.profile-pick.on { box-shadow: inset 0 0 0 3px var(--k-yellow); }
.profile-pick:active { transform: scale(0.96); }
.profile-avatar { font-size: 56px; line-height: 1; }
.profile-avatar.small { font-size: 30px; }
.profile-name { font-size: 18px; font-weight: 800; }
.parents-profiles { display: grid; gap: 10px; margin-bottom: 18px; padding-bottom: 18px; border-bottom: 1px solid rgba(255, 255, 255, 0.12); }
.profile-row { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 16px; background: var(--k-card); }
.profile-row .profile-name { flex: 1; font-size: 16px; }
.kids-btn.small { padding: 6px 12px; font-size: 14px; }
.profile-form { display: grid; gap: 10px; padding: 12px; border-radius: 16px; background: var(--k-card); }
.profile-input { padding: 10px 12px; border-radius: 12px; border: 0; font: inherit; font-size: 17px; background: #fff; color: #1b1f4a; }
.profile-avatars { display: flex; flex-wrap: wrap; gap: 6px; }
.profile-avatar-btn { width: 44px; height: 44px; border-radius: 12px; background: rgba(255, 255, 255, 0.1); font-size: 26px; }
.profile-avatar-btn.on { background: var(--k-yellow); }

/* ---------- Kids: the parents' weekly story ---------- */
/* One idea per card, like a year-in-review: bold colors, big numbers, a tap to go on. */

.kids-body.story { padding: 10px var(--gutter) calc(14px + var(--safe-bottom)); gap: 10px; overflow: hidden; }
.story-progress { flex: none; display: flex; gap: 4px; }
.story-step { flex: 1; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.25); }
.story-step.done { background: #fff; }
.story-stage { flex: 1; min-height: 0; display: flex; cursor: pointer; user-select: none; -webkit-user-select: none; }
.story-slide {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  padding: 26px 20px;
  border-radius: 26px;
  text-align: center;
  color: #fff;
  font-family: 'Rubik', 'Varela Round', system-ui, sans-serif;
}
.story-slide.in > * { animation: story-rise 0.55s cubic-bezier(0.2, 1.2, 0.4, 1) both; }
.story-slide.in > *:nth-child(2) { animation-delay: 80ms; }
.story-slide.in > *:nth-child(3) { animation-delay: 160ms; }
.story-slide.in > *:nth-child(4) { animation-delay: 240ms; }
.story-slide.in > *:nth-child(n + 5) { animation-delay: 320ms; }
@keyframes story-rise { from { opacity: 0; transform: translateY(26px) scale(0.96); } }
.s-intro { background: radial-gradient(circle at 20% 15%, #ff6bcb, transparent 55%), linear-gradient(160deg, #7b2ff7, #2b0b6e); }
.s-empty, .s-end { background: linear-gradient(160deg, #1e3a8a, #0b1640); }
.s-numbers { background: radial-gradient(circle at 85% 10%, #a3e635, transparent 50%), linear-gradient(160deg, #0f9d58, #064e3b); }
.s-topics { background: radial-gradient(circle at 15% 85%, #ffd166, transparent 55%), linear-gradient(160deg, #ff8a00, #b91c1c); }
.s-learned { background: radial-gradient(circle at 80% 85%, #7ce0ff, transparent 55%), linear-gradient(160deg, #3a86ff, #1e1b6e); }
.s-grow { background: radial-gradient(circle at 20% 10%, #ff9fd6, transparent 50%), linear-gradient(160deg, #e11d74, #5b0b3a); }
.s-talk { background: radial-gradient(circle at 85% 15%, #ffd166, transparent 45%), linear-gradient(160deg, #14b8a6, #134e4a); justify-content: flex-start; }
.story-kicker { margin: 0; font-size: 15px; font-weight: 700; letter-spacing: 0.5px; opacity: 0.85; }
.story-big { margin: 0; font-size: 38px; font-weight: 800; line-height: 1.15; }
.story-title { margin: 0; font-size: 30px; font-weight: 800; line-height: 1.2; }
.story-text { margin: 0; font-size: 17px; line-height: 1.5; opacity: 0.92; }
.story-hint { margin: 0; font-size: 13px; opacity: 0.7; }
.story-emoji { font-size: 84px; line-height: 1; }
.story-kids { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.story-kid { padding: 8px 14px; border-radius: 999px; background: rgba(255, 255, 255, 0.16); color: #fff; font-size: 15px; font-weight: 700; }
.story-kid.on { background: #fff; color: #2b0b6e; }

.story-nums { display: grid; gap: 14px; }
.story-stat { display: grid; animation: story-rise 0.6s cubic-bezier(0.2, 1.2, 0.4, 1) var(--d) both; }
.story-num { font-size: 64px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.story-label { font-size: 17px; font-weight: 700; opacity: 0.9; }

.story-bars-chart { display: grid; gap: 10px; text-align: start; }
.story-bar-row { display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto 12px; column-gap: 8px; animation: story-rise 0.5s ease var(--d) both; }
.story-bar-label { font-size: 15px; font-weight: 700; }
.story-bar-n { font-size: 15px; font-weight: 800; }
.story-bar-fill { grid-column: 1 / -1; width: var(--w); border-radius: 6px; background: #fff; transform-origin: right; animation: story-grow 0.9s cubic-bezier(0.2, 0.9, 0.3, 1) var(--d) both; }
@keyframes story-grow { from { transform: scaleX(0); } }

.story-cloud { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.story-chip { padding: 8px 14px; border-radius: 999px; background: rgba(255, 255, 255, 0.18); font-size: 15px; font-weight: 700; animation: kids-pop 0.45s cubic-bezier(0.2, 1.4, 0.4, 1) var(--d) both; }
.story-chip:nth-child(3n) { background: rgba(255, 209, 102, 0.9); color: #2a1400; }
.story-chip.more { background: transparent; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.5); }

.story-ring {
  --p: 0;
  justify-self: center;
  align-self: center;
  display: grid;
  place-items: center;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background: radial-gradient(closest-side, #8a1650 78%, transparent 79% 100%), conic-gradient(#fff calc(var(--p) * 1%), rgba(255, 255, 255, 0.22) 0);
}
.story-ring .story-num { font-size: 48px; }
.story-badge { align-self: center; margin: 0; padding: 8px 16px; border-radius: 999px; background: rgba(255, 255, 255, 0.18); font-size: 17px; font-weight: 800; }

.story-talk { display: grid; gap: 10px; text-align: start; }
.story-q {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.95);
  color: #0f2e2b;
  text-align: start;
  animation: story-rise 0.5s ease var(--d) both;
}
.story-q-about { font-size: 12px; font-weight: 800; color: #0f766e; }
.story-q-text { font-size: 17px; font-weight: 700; line-height: 1.4; }
.story-q-hint { display: none; font-size: 14px; line-height: 1.45; color: #335; }
.story-q.open .story-q-hint { display: block; animation: story-rise 0.35s ease both; }
.s-end .kids-btn { align-self: stretch; }
@media (prefers-reduced-motion: reduce) {
  .story-slide.in > *, .story-stat, .story-bar-row, .story-bar-fill, .story-chip, .story-q { animation: none !important; }
}
.story-kids-btn { flex: none; align-self: flex-start; padding: 6px 14px; border-radius: 999px; background: rgba(255, 255, 255, 0.14); color: #fff; font-size: 14px; font-weight: 700; }
.kids-body.profiles .story-emoji { text-align: center; }

/* "מסלול למידה" (web/track.js): the settings per child in the parents' area. */
.story-tops { display: flex; flex-wrap: wrap; gap: 8px; }
.story-tune-btn { background: rgba(255, 209, 102, 0.2); color: var(--k-yellow); }
.kids-body.track-settings { gap: 14px; }
.track-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.track-choice { display: flex; flex-direction: column; gap: 4px; padding: 12px; border-radius: 16px; background: var(--k-card); color: var(--k-ink); text-align: start; border: 2px solid transparent; }
.track-choice.on { border-color: var(--k-yellow); background: rgba(255, 209, 102, 0.12); }
.track-emoji { font-size: 26px; }
.track-name { font-size: 17px; font-weight: 800; }
.track-text { font-size: 13px; line-height: 1.4; color: var(--k-dim); }
.track-options { display: flex; flex-direction: column; gap: 6px; }
.track-row { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--k-card); cursor: pointer; }
.track-row input, .track-game input { flex: none; width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--k-yellow); }
.track-row-text { display: flex; flex-direction: column; gap: 2px; }
.track-row-label { font-size: 16px; font-weight: 800; color: var(--k-ink); }
.track-row-hint { font-size: 13px; line-height: 1.4; color: var(--k-dim); }
.track-rate { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; border-radius: 14px; background: var(--k-card); }
.track-seg { display: flex; gap: 6px; }
.track-seg-btn { flex: 1; padding: 8px 4px; border-radius: 10px; background: rgba(255, 255, 255, 0.1); color: var(--k-ink); font-size: 14px; font-weight: 700; }
.track-seg-btn.on { background: var(--k-yellow); color: #13163a; }
.track-games { padding: 10px 12px; border-radius: 14px; background: var(--k-card); color: var(--k-ink); }
.track-games summary { font-size: 16px; font-weight: 800; cursor: pointer; }
.track-games-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 6px; margin: 10px 0 6px; }
.track-game { display: flex; align-items: center; gap: 8px; font-size: 15px; cursor: pointer; }
/* "למידה בלי טעויות": a wrong option fades away, and a gentle hint shows. */
.kids-answer.faded { opacity: 0.25; transform: scale(0.96); transition: opacity 0.4s ease, transform 0.4s ease; }
.kids-hint { margin: 6px 0 0; font-size: 15px; font-weight: 700; color: var(--k-yellow, #ffd166); text-align: center; }
/* "לוח היום": the chip at the top, the board, and the countdown before the next video. */
.day-chip { position: fixed; z-index: 16; top: calc(var(--safe-top, 0px) + 74px); left: 50%; transform: translateX(-50%); padding: 6px 14px; border-radius: 999px; background: rgba(19, 22, 58, 0.82); color: #fff; font-size: 14px; font-weight: 800; white-space: nowrap; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3); }
.kids-body.day-board { align-items: center; justify-content: center; gap: 18px; text-align: center; }
.day-say { margin: 0; font-size: 20px; font-weight: 800; line-height: 1.4; color: var(--k-ink); }
.day-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.day-step { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 58px; padding: 10px 8px; border-radius: 16px; background: var(--k-card); color: var(--k-dim); border: 2px solid transparent; }
.day-step.done { color: var(--k-ink); opacity: 0.75; }
.day-step.now { color: var(--k-ink); border-color: var(--k-yellow); background: rgba(255, 209, 102, 0.14); }
.day-icon { font-size: 30px; line-height: 1; }
.day-label { font-size: 13px; font-weight: 700; }
.day-go { min-width: 200px; max-width: 360px; width: 100%; }
.next-countdown { position: absolute; z-index: 6; left: 50%; bottom: calc(var(--safe-bottom, 0px) + 120px); transform: translateX(-50%); padding: 8px 18px; border-radius: 999px; background: rgba(19, 22, 58, 0.8); color: #fff; font-size: 17px; font-weight: 800; pointer-events: none; }
/* "שאלת עומק": an open question after a video (explorers). */
.break-deep .deep-about { margin: 0; font-size: 14px; font-weight: 700; opacity: 0.75; }
.break-deep .deep-q { margin: 0; font-size: clamp(24px, 6.6vw, 34px); font-weight: 800; line-height: 1.35; }
.break-deep .deep-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.break-deep .deep-actions .kids-btn { flex: 1 1 200px; }
/* "מסלול חוקר" (web/quest.js). */
.kids-body.quest { gap: 12px; }
.quest-about { margin: 0; font-size: 14px; font-weight: 700; color: var(--k-dim); }
.quest-choice { padding: 14px 16px; border-radius: 16px; background: rgba(255, 209, 102, 0.14); border: 2px solid var(--k-yellow); color: var(--k-ink); font-size: 18px; font-weight: 800; line-height: 1.4; text-align: start; }
.quest-q { margin: 0; font-size: 22px; font-weight: 800; line-height: 1.35; color: var(--k-ink); }
.quest-saved { margin: 0; font-size: 13px; color: var(--k-green); font-weight: 700; }
.quest-step { margin: 6px 0 0; font-size: 16px; font-weight: 800; color: var(--k-yellow); }
.quest-list { display: flex; flex-direction: column; gap: 6px; }
.quest-item { display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; border-radius: 14px; background: var(--k-card); color: var(--k-ink); font-size: 16px; font-weight: 700; text-align: start; }
.quest-saved-t { font-size: 13px; font-weight: 600; color: var(--k-dim); }
.quest-mine { align-self: flex-start; }
/* The reader opened at a section from the explorer path. */
.reader-sec.focus > summary, .reader h4.focus { background: rgba(255, 209, 102, 0.18); border-radius: 8px; }
/* Big subtitles, for a child who needs them. */
body.kids.big-subs .card .subs span { font-size: clamp(26px, 7.6vw, 36px); line-height: 1.35; }
.kids-body.profiles .profile-pick { cursor: default; }

/* "Buy me a coffee" (grown-ups only). */
.support-link { display: inline-block; padding: 8px 16px; border-radius: 999px; background: rgba(255, 209, 102, 0.14); color: #ffd166; font-size: 15px; font-weight: 700; text-decoration: none; }
/* (Its own class names: ".reader" and ".end" are taken by the reader sheet and the end card.) */
.support-link.at-end { margin-top: 18px; }
.support-link.in-reader { display: block; width: fit-content; margin: 4px 0 14px; font-size: 14px; }
.support-link.in-story { align-self: center; background: rgba(255, 255, 255, 0.12); color: #fff; }

/* ---------- Games that break the routine (web/breaks.js) ---------- */
/* A card of its own in the feed, like the facts: a badge, a question, big tappable answers. */

.card.break-card {
  --k-card: rgba(255, 255, 255, 0.14);
  --k-ink: #fff;
  --k-dim: rgba(255, 255, 255, 0.82);
  --k-yellow: #ffd166;
  --k-green: #3ddc97;
  --k-red: #ff6b6b;
  background:
    radial-gradient(ellipse at 85% 8%, var(--br-a, rgba(255, 209, 102, 0.3)), transparent 45%),
    radial-gradient(ellipse at 5% 95%, var(--br-b, rgba(124, 224, 255, 0.28)), transparent 55%),
    var(--br-bg, linear-gradient(160deg, #0f766e, #134e4a 65%, #0b2e2b));
  color: #fff;
  font-family: 'Varela Round', 'Rubik', system-ui, sans-serif;
  user-select: none;
}
.break-who { --br-bg: linear-gradient(160deg, #4c1d95, #2e1065 65%, #1e0b45); }
.break-tof { --br-bg: linear-gradient(160deg, #b91c1c, #7f1d1d 65%, #450a0a); }
.break-time { --br-bg: linear-gradient(160deg, #1d4ed8, #1e3a8a 65%, #0f1d4a); }
.break-emoji { --br-bg: linear-gradient(160deg, #c2410c, #9a3412 65%, #4a1505); }
.break-mission { --br-bg: linear-gradient(160deg, #15803d, #14532d 65%, #072b16); }
.break-year, .break-quote { font-family: inherit; --br-a: rgba(37, 244, 238, 0.25); --br-b: rgba(254, 44, 85, 0.3); --br-bg: linear-gradient(165deg, #10243a, #0b1422 60%, #1d0b1c); }
.break-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  /* A soft light, with no edges: the round "bubbles" that were here looked like places
     where something was missing. */
  background:
    radial-gradient(ellipse 70% 45% at 20% 15%, rgba(255, 255, 255, 0.07), transparent 70%),
    radial-gradient(ellipse 60% 40% at 85% 90%, rgba(255, 255, 255, 0.05), transparent 70%);
}
.break-stage {
  position: absolute;
  inset: calc(96px + var(--safe-top)) var(--gutter) calc(96px + var(--safe-bottom));
  display: flex;
  flex-direction: column;
  justify-content: safe center;
  gap: 12px;
  /* No scrolling of its own: a swipe anywhere on the card moves the feed. The content
     steps down to fit instead (fitToScreen in web/breaks.js). */
  overflow: hidden;
}
.break-badge {
  align-self: flex-start;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.25);
  font-size: 15px;
  font-weight: 700;
}
.break-title { margin: 0; font-size: clamp(21px, 6vw, 27px); font-weight: 800; line-height: 1.3; text-wrap: balance; overflow-wrap: anywhere; }
.break-pic { width: 100%; max-height: 22vh; object-fit: cover; border-radius: 18px; border: 3px solid rgba(255, 255, 255, 0.85); }
.break-stage .kids-answers { gap: 8px; }
.break-stage .kids-answer { min-height: 48px; padding: 8px 12px; font-size: 17px; font-weight: 700; color: #fff; }
.break-stage .tof-answers .kids-answer { text-align: start; font-size: 16px; font-weight: 600; line-height: 1.45; }
.break-stage .kids-btn { min-height: 46px; }
.break-stage .kids-btn.secondary { background: rgba(255, 255, 255, 0.16); color: #fff; }
.break-stage .kids-feedback { font-size: 17px; font-weight: 700; color: #fff; }
.break-stage .kids-feedback.right { color: #86efac; }
.break-stage .speak-btn { align-self: flex-start; }
.break-card .ice-scroll { bottom: calc(40px + var(--safe-bottom)); }

/* מי אני? */
.who-clues { margin: 0; padding-inline-start: 26px; display: grid; gap: 8px; font-size: 19px; font-weight: 700; line-height: 1.45; }
.who-clue { animation: kids-pop 0.4s cubic-bezier(0.2, 1.4, 0.4, 1); }
.who-clue::marker { color: #ffd166; }

/* מכונת זמן */
.time-items { display: grid; gap: 10px; }
.time-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 60px;
  padding: 8px 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.14);
  border: 2px solid transparent;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  text-align: start;
  line-height: 1.35;
}
.time-item.picked { border-color: #ffd166; }
.time-item.done { animation: kids-pop 0.4s cubic-bezier(0.2, 1.4, 0.4, 1); }
.time-pic { width: 48px; height: 48px; flex: none; border-radius: 12px; object-fit: cover; }
.time-text { flex: 1; }
.time-n { flex: none; min-width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: #ffd166; color: #2a1400; font-weight: 800; }
.time-n:empty { background: rgba(255, 255, 255, 0.18); }
.time-year { flex: none; color: #ffd166; font-size: 15px; }

/* חידת אימוג'י */
.emoji-big { margin: 4px 0; font-size: clamp(54px, 17vw, 76px); line-height: 1.2; text-align: center; letter-spacing: 6px; direction: ltr; }

/* משימה מהבית */
.mission-emoji { margin: 0; font-size: 64px; line-height: 1; text-align: center; }
.mission-text { margin: 0; font-size: 21px; font-weight: 800; line-height: 1.5; text-align: center; text-wrap: balance; }
.parent-check { display: grid; gap: 10px; }

/* נחשו את השנה */
.year-lead { margin: 0; color: rgba(255, 255, 255, 0.85); font-size: 16px; }
.year-value { margin: 0; font-size: 40px; font-weight: 800; text-align: center; color: #25f4ee; }
.year-range { width: 100%; height: 36px; accent-color: #fe2c55; direction: ltr; touch-action: none; }
/* The window's two ends, under the slider (left to right, like it). */
.year-ends { display: flex; justify-content: space-between; direction: ltr; margin: -8px 2px 0; font-size: 14px; font-weight: 700; color: rgba(255, 255, 255, 0.7); }
.year-answer { margin: 0; font-size: 21px; font-weight: 800; }
.year-off { margin: 0; color: rgba(255, 255, 255, 0.85); }

/* מי אמר? */
.quote-text { margin: 0; font-size: clamp(21px, 6vw, 26px); font-weight: 700; line-height: 1.5; text-wrap: balance; }
.break-year .kids-btn, .break-quote .kids-btn { background: #fe2c55; color: #fff; }
.break-year .kids-btn.break-watch, .break-quote .kids-btn.break-watch { background: #25f4ee; color: #04222a; }
@media (prefers-reduced-motion: reduce) { .who-clue, .time-item.done { animation: none; } }
/* Kids: "נחשו את השנה" in the kids' colors and font. */
body.kids .break-year {
  --br-a: rgba(255, 209, 102, 0.3);
  --br-b: rgba(124, 224, 255, 0.28);
  --br-bg: linear-gradient(160deg, #0e7490, #155e75 65%, #082f3a);
  font-family: 'Varela Round', 'Rubik', system-ui, sans-serif;
}
body.kids .break-year .kids-btn { background: #ffd166; color: #2a1400; }
body.kids .break-year .year-value { color: #ffd166; }

/* ---------- Kids: the daily goal, on Sakrani's page ---------- */
.goal-box { display: grid; gap: 10px; padding: 14px; border-radius: 18px; background: var(--k-card); border: 2px solid rgba(124, 224, 255, 0.35); }
.goal-box .kids-sub { margin: 0; }
.goal-row { display: grid; gap: 6px; }
.goal-status { margin: 0; font-weight: 700; color: var(--k-dim); }
.goal-status.done { color: var(--k-green); }
.goal-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.goal-day { display: grid; gap: 2px; padding: 4px 0; border-radius: 10px; }
.goal-day.today { background: rgba(255, 255, 255, 0.1); }
.goal-mark { font-size: 20px; line-height: 1.2; min-height: 24px; display: grid; place-items: center; }
.goal-mark.empty::before { content: ''; width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.35); }
.goal-label { font-size: 12px; color: var(--k-dim); }

/* ---------- Kids: interview, sound, zoom and map games ---------- */
.break-interview { --br-bg: linear-gradient(160deg, #db2777, #9d174d 65%, #4a0726); }
.break-sound { --br-bg: linear-gradient(160deg, #7c3aed, #4c1d95 65%, #1e0b45); }
.break-zoom { --br-bg: linear-gradient(160deg, #0891b2, #155e75 65%, #082f3a); }
.break-world { --br-bg: linear-gradient(160deg, #16a34a, #166534 65%, #052e16); }
.break-compare { --br-bg: linear-gradient(160deg, #db2777, #9d174d 65%, #3b0820); }
.break-credit { margin: 0; font-size: 12px; color: rgba(255, 255, 255, 0.65); }

.iv-hero { display: flex; align-items: flex-start; gap: 10px; }
.iv-face { width: 72px; height: 72px; flex: none; border-radius: 50%; object-fit: cover; border: 3px solid #fff; animation: iv-talk 2.4s ease-in-out infinite; }
@keyframes iv-talk { 50% { transform: rotate(-4deg) scale(1.04); } }
.iv-bubble {
  position: relative;
  flex: 1;
  margin: 0;
  padding: 12px 14px;
  border-radius: 18px;
  border-start-start-radius: 4px;
  background: #fff;
  color: #2a1030;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.5;
}
.iv-bubble.pop { animation: kids-pop 0.35s cubic-bezier(0.2, 1.4, 0.4, 1); }
.iv-questions { display: grid; gap: 8px; }
.iv-q { min-height: 46px; padding: 8px 12px; border-radius: 14px; background: rgba(255, 255, 255, 0.14); border: 2px solid transparent; color: #fff; font-size: 16px; font-weight: 700; text-align: start; }
.iv-q.asked { opacity: 0.75; }
.iv-q.on { opacity: 1; border-color: #ffd166; }

.sound-play { min-height: 64px; border-radius: 20px; background: #ffd166; color: #2a1400; font-size: 21px; font-weight: 800; }
.sound-play.on { animation: speak-pulse 0.8s ease-in-out infinite; }

.zoom-box { position: relative; width: 100%; aspect-ratio: 4 / 3; max-height: 34vh; overflow: hidden; border-radius: 18px; border: 3px solid rgba(255, 255, 255, 0.85); background: rgba(0, 0, 0, 0.3); }
.zoom-pic { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s cubic-bezier(0.3, 0, 0.2, 1); }

.world-map { width: 100%; height: 36vh; min-height: 220px; border-radius: 18px; overflow: hidden; border: 3px solid rgba(255, 255, 255, 0.85); background: #aad3df; touch-action: none; }
.world-pin { font-size: 26px; line-height: 30px; text-align: center; background: none; border: 0; }
.world-pin.right { filter: drop-shadow(0 0 6px #ffd166); }
@media (prefers-reduced-motion: reduce) { .iv-face, .sound-play.on { animation: none; } .zoom-pic { transition: none; } }

/* ---------- Kids: shake for a secret fact ---------- */
.shake-hint {
  position: absolute;
  z-index: 6;
  inset-inline: var(--gutter);
  top: 30%;
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 16px 14px;
  border-radius: 22px;
  background: rgba(20, 16, 60, 0.9);
  border: 2px dashed #ffd166;
  color: #fff;
  font-family: 'Varela Round', 'Rubik', system-ui, sans-serif;
  text-align: center;
  cursor: pointer;
  animation: kids-pop 0.45s cubic-bezier(0.2, 1.4, 0.4, 1), shake-glow 1.6s ease-in-out 0.45s infinite;
}
@keyframes shake-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 209, 102, 0.55); transform: scale(1); }
  50% { box-shadow: 0 0 0 14px rgba(255, 209, 102, 0); transform: scale(1.04); }
}
.shake-icon { font-size: 52px; line-height: 1; animation: shake-it 1.1s ease-in-out infinite; }
@keyframes shake-it { 0%, 50%, 100% { transform: rotate(0); } 10%, 30% { transform: rotate(-14deg); } 20%, 40% { transform: rotate(14deg); } }
.shake-text { font-size: 19px; font-weight: 800; color: #ffd166; }
.shake-sub { font-size: 13px; color: rgba(255, 255, 255, 0.75); }
.shake-sub:empty { display: none; }
.secret-fact {
  position: absolute;
  z-index: 6;
  inset-inline: var(--gutter);
  top: 26%;
  display: grid;
  gap: 8px;
  padding: 18px 16px;
  border-radius: 22px;
  background: linear-gradient(160deg, #7c3aed, #4c1d95);
  border: 2px solid #ffd166;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5);
  color: #fff;
  font-family: 'Varela Round', 'Rubik', system-ui, sans-serif;
  animation: kids-pop 0.5s cubic-bezier(0.2, 1.4, 0.4, 1);
}
.secret-badge { justify-self: start; padding: 4px 12px; border-radius: 999px; background: #ffd166; color: #2a1400; font-size: 14px; font-weight: 800; }
.secret-text { margin: 0; font-size: 19px; font-weight: 700; line-height: 1.55; }
.secret-next { font-size: 13px; color: rgba(255, 255, 255, 0.75); }
@media (prefers-reduced-motion: reduce) { .shake-icon, .shake-hint { animation: none; } }

/* After answering, the explanation in green (in place of the options). */
.break-stage .kids-feedback, .break-stage .year-answer, .break-stage .year-off { color: #86efac; }
.break-stage .kids-feedback { font-size: 18px; line-height: 1.55; animation: kids-pop 0.4s cubic-bezier(0.2, 1.4, 0.4, 1); }

/* A card that doesn't fit steps down (fitToScreen in web/breaks.js). */
.break-stage.fit-1 { gap: 8px; }
.break-stage.fit-1 .break-title { font-size: 20px; }
.break-stage.fit-1 .kids-answer, .break-stage.fit-1 .iv-q { min-height: 40px; padding: 6px 10px; font-size: 15px; }
.break-stage.fit-1 .kids-lead, .break-stage.fit-1 .year-lead { font-size: 14px; }
.break-stage.fit-1 .break-pic { max-height: 15vh; }
.break-stage.fit-1 .zoom-box, .break-stage.fit-1 .world-map { max-height: 28vh; min-height: 0; }
.break-stage.fit-1 .time-item { min-height: 48px; }
.break-stage.fit-1 .mission-emoji { font-size: 44px; }
.break-stage.fit-1 .emoji-big { font-size: 48px; }
.break-stage.fit-2 { gap: 6px; }
.break-stage.fit-2 .break-title { font-size: 18px; }
.break-stage.fit-2 .kids-feedback, .break-stage.fit-2 .iv-bubble, .break-stage.fit-2 .mission-text, .break-stage.fit-2 .quote-text { font-size: 15px; }
.break-stage.fit-2 .who-clues { font-size: 16px; gap: 4px; }
.break-stage.fit-2 .tof-answers .kids-answer { font-size: 14px; }
.break-stage.fit-2 .break-pic, .break-stage.fit-2 .time-pic { display: none; }
.break-stage.fit-2 .iv-face { width: 52px; height: 52px; }
.break-stage.fit-2 .zoom-box, .break-stage.fit-2 .world-map { max-height: 22vh; }
.break-stage.fit-2 .year-value { font-size: 30px; }
.break-stage.fit-3 .break-badge, .break-stage.fit-3 .kids-lead, .break-stage.fit-3 .kids-progress { display: none; }
.break-stage.fit-3 .iv-face { display: none; }
.break-stage.fit-3 .kids-btn { min-height: 40px; }

/* Sakrani's progress to the next stage, under the squirrel. */
.owl-meter { flex: none; width: 100%; height: 16px; margin-top: 4px; background: rgba(255, 255, 255, 0.16); }
.owl-meter-ends { display: flex; justify-content: space-between; width: 100%; font-size: 13px; color: var(--k-dim); }
.owl-next { margin: 0; text-align: center; font-size: 14px; }

/* ⚖️ מי יותר? */
.cmp-pair { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; }
.cmp-or { font-size: 18px; font-weight: 800; color: #ffd166; }
.cmp-pick {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 6px;
  padding: 10px 8px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.14);
  border: 3px solid transparent;
  color: #fff;
  font: inherit;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.3;
  text-align: center;
}
.cmp-pic { width: 100%; aspect-ratio: 1; border-radius: 14px; object-fit: cover; }
.cmp-val { font-size: 15px; color: #86efac; }
.cmp-val:empty { display: none; }
.cmp-pick.right { border-color: var(--k-green); background: rgba(61, 220, 151, 0.18); animation: kids-pop 0.4s cubic-bezier(0.2, 1.4, 0.4, 1); }
.cmp-pick.wrong { border-color: var(--k-red); background: rgba(255, 107, 107, 0.16); }
.break-stage.fit-1 .cmp-pic { width: 75%; }
.break-stage.fit-2 .cmp-pic { width: 50%; }
.break-stage.fit-3 .cmp-pic { display: none; }

/* Into the keyhole: the picture, seen through a keyhole that grows to fill the screen. */
.keyhole-zoom {
  position: fixed;
  inset: 0;
  z-index: 1000;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  pointer-events: none;
}
.keyhole-pic { position: absolute; inset: 0; background: #000 center / cover no-repeat; transform: scale(3.8); }
.keyhole-zoom.grow {
  transition:
    -webkit-mask-size 1.1s cubic-bezier(0.7, 0, 0.3, 1), -webkit-mask-position 1.1s cubic-bezier(0.7, 0, 0.3, 1),
    mask-size 1.1s cubic-bezier(0.7, 0, 0.3, 1), mask-position 1.1s cubic-bezier(0.7, 0, 0.3, 1), opacity 0.6s ease;
}
.keyhole-zoom.grow .keyhole-pic { transform: scale(1); transition: transform 1.3s cubic-bezier(0.4, 0, 0.2, 1); }
.keyhole-zoom.gone { opacity: 0; }
@media (prefers-reduced-motion: reduce) { .keyhole-zoom.grow, .keyhole-zoom.grow .keyhole-pic { transition: opacity 0.4s; } }

/* ======================================================================================
   Computer layout (html.desktop: a mouse and a wide screen, set in index.html).
   The video gets a wide stage instead of a phone column; buttons, text and games grow to
   fit a screen seen from further away, with hover states; up/down buttons beside the
   video move between entries; the kids' windows open as a wide panel over the feed.
   ====================================================================================== */
.desk-nav { display: none; }
html.desktop {
  --app-w: min(1180px, calc(100vw - 230px));
  --gutter: 28px;
}
html.desktop body { background: radial-gradient(120% 90% at 50% 0%, #1a1424 0%, #060608 70%); }
html.desktop .feed { left: 50%; right: auto; width: var(--app-w); transform: translateX(-50%); box-shadow: 0 0 80px rgba(0, 0, 0, 0.6); }
html.desktop .topbar { width: var(--app-w); padding-top: calc(18px + var(--safe-top)); }
html.desktop .brand { font-size: 26px; }
html.desktop .icon-btn { width: 54px; height: 54px; padding: 14px; }
html.desktop #mute { top: calc(18px + var(--safe-top) + 64px); }
html.desktop body.kids #mute { top: calc(18px + var(--safe-top) + 72px); }
html.desktop body.kids #topics-open { top: calc(18px + var(--safe-top) + 136px); }
html.desktop .learn-btn.timeline-top, html.desktop .learn-btn.map-top { height: 50px; padding: 0 20px; font-size: 16px; }
html.desktop body.kids .topbar .brand { font-size: 22px; }
html.desktop body.kids .topbar .brand-kids { font-size: 16px; }

/* The entry */
html.desktop .card .info { inset-inline-end: 150px; bottom: 40px; }
html.desktop .card .meta { font-size: 15px; }
html.desktop .card .title { font-size: clamp(32px, 2.8vw, 44px); max-width: 30ch; }
html.desktop .card .credit { font-size: 12.5px; }
html.desktop .card .subs { inset-inline: 14% 14%; top: 56%; }
html.desktop .card .subs span { font-size: clamp(26px, 2.3vw, 36px); }
html.desktop .card .rail { inset-inline-end: 28px; bottom: 44px; gap: 24px; }
html.desktop .rail-btn { min-width: 84px; font-size: 14px; }
html.desktop .rail-btn span { max-width: 96px; }
html.desktop .rail-btn svg { width: 62px; height: 62px; padding: 16px; transition: background 0.15s, transform 0.15s; }
html.desktop .rail-btn:hover svg { background: rgba(255, 255, 255, 0.28); transform: scale(1.06); }
html.desktop .rate { gap: 10px; }
html.desktop .rate-btn { width: 46px; height: 46px; padding: 12px; }
html.desktop .rate-btn:hover { background: rgba(255, 255, 255, 0.24); color: #fff; }
html.desktop .card .paused { width: 112px; height: 112px; }
html.desktop .card .progress { height: 4px; }
html.desktop .card .reel { cursor: pointer; }
html.desktop .guess-box { inset-inline: max(var(--gutter), calc(50% - 360px)); }

/* Up / down beside the video */
html.desktop .desk-nav {
  position: fixed;
  z-index: 6;
  top: 50%;
  right: max(14px, calc((100vw - var(--app-w)) / 2 - 92px));
  transform: translateY(-50%);
  display: grid;
  justify-items: center;
  gap: 14px;
  width: 78px;
}
.desk-nav-btn {
  width: 60px;
  height: 60px;
  padding: 14px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  transition: background 0.15s, transform 0.15s;
}
.desk-nav-btn:hover { background: rgba(255, 255, 255, 0.26); transform: scale(1.06); }
.desk-nav-btn svg { width: 100%; height: 100%; }
.desk-keys { margin: 4px 0 0; font-size: 12px; line-height: 1.5; text-align: center; color: rgba(255, 255, 255, 0.5); }

/* The start screen */
html.desktop .start-inner { max-width: 640px; gap: 26px; }
html.desktop .start .logo { width: 96px; height: 96px; border-radius: 26px; }
html.desktop .start h1 { font-size: 76px; }
html.desktop .start .start-tagline { font-size: 24px; }
html.desktop .start-choices { gap: 22px; }
html.desktop .start-btn { font-size: 28px; border-radius: 32px; transition: transform 0.18s, box-shadow 0.18s, opacity 0.2s; }
html.desktop .start-btn svg { width: 66px; height: 66px; }
html.desktop .start-btn:hover:not(:disabled) { transform: translateY(-4px); box-shadow: 0 18px 44px rgba(254, 44, 85, 0.35); }
html.desktop .start .start-note { max-width: 520px; font-size: 15px; }
html.desktop .toast { font-size: 17px; padding: 14px 22px; bottom: 60px; }

/* Windows as panels over the feed */
html.desktop .kids-overlay {
  inset: 28px 0;
  width: min(1080px, calc(100vw - 64px));
  border-radius: 26px;
  overflow: hidden;
  box-shadow: 0 0 0 100vmax rgba(0, 0, 0, 0.62), 0 30px 80px rgba(0, 0, 0, 0.6);
}
html.desktop .kids-head { padding: 18px 32px; }
html.desktop .kids-title { font-size: 26px; }
html.desktop .kids-back { height: 46px; padding: 0 20px; font-size: 16px; }
html.desktop .kids-body { padding: 24px 32px 36px; gap: 18px; font-size: 18px; }
html.desktop .kids-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; }
html.desktop .kids-tile { padding: 26px 12px; font-size: 18px; transition: transform 0.15s, background 0.15s; }
html.desktop .kids-tile:hover { transform: translateY(-3px); background: #2a3170; }
html.desktop .kids-tile-icon { font-size: 50px; }
html.desktop .kids-btn:hover, html.desktop .kids-answer:hover:not(:disabled) { filter: brightness(1.12); }
html.desktop .album-face, html.desktop .album-slot { width: min(100%, 132px, 13dvh); }
html.desktop .reader-sheet { width: min(860px, calc(100vw - 64px)); height: 92%; }
html.desktop .topics { width: min(880px, 100vw); }

/* Games between the videos */
html.desktop .break-stage { inset: calc(100px + var(--safe-top)) max(var(--gutter), calc(50% - 400px)) calc(96px + var(--safe-bottom)); gap: 18px; }
html.desktop .break-badge { font-size: 18px; padding: 8px 18px; }
html.desktop .break-title { font-size: clamp(30px, 2.6vw, 40px); }
html.desktop .break-pic { max-height: 32vh; }
html.desktop .break-stage .kids-answer { min-height: 62px; font-size: 21px; }
html.desktop .break-stage .kids-feedback { font-size: 22px; }
html.desktop .cmp-pair { max-width: 640px; margin-inline: auto; width: 100%; gap: 18px; }
html.desktop .cmp-pick { font-size: 21px; }
html.desktop .cmp-pick:hover:not(:disabled) { background: rgba(255, 255, 255, 0.24); }
html.desktop .doors { max-width: 760px; padding: 26px 24px; }
html.desktop .doors-title { font-size: 30px; }
html.desktop .doors-sub { font-size: 18px; }
html.desktop .door { max-width: 250px; cursor: pointer; }
html.desktop .door:hover:not(.open) .door-leaf { filter: brightness(1.12); }
html.desktop .door-hook { font-size: 18px; }
html.desktop .door-keyhole { transform: scale(1.25); }
html.desktop .ice-scroll { font-size: 16px; }
html.desktop body.kids .learn-btn { flex-basis: 104px; height: 64px; font-size: 13.5px; border-radius: 18px; }
html.desktop body.kids .learn-btn > span[aria-hidden] { font-size: 24px; }
html.desktop .learn-btn:hover { filter: brightness(1.1); }
html.desktop .icon-btn:hover { background: rgba(255, 255, 255, 0.22); }
/* The activities fit the panel's height. */
html.desktop .kids-puzzle { width: min(100%, calc(100dvh - 300px)); margin-inline: auto; }
html.desktop .draw-board { width: min(100%, 560px, calc(100dvh - 540px)); }
html.desktop .kids-memory { grid-template-columns: repeat(4, 1fr); gap: 12px; }
html.desktop .kids-ws { max-width: min(100%, calc(100dvh - 460px)); margin-inline: auto; }
/* The words beside each other, not one under the other: the board and the list fit the panel. */
html.desktop .kids-ws-list { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }

/* 📜 שיר קצר */
.break-poem { --br-bg: linear-gradient(160deg, #7c2d12, #431407 65%, #1c0a03); --br-a: rgba(255, 209, 102, 0.28); }
.poem-author { margin: 0; color: rgba(255, 255, 255, 0.8); font-size: 15px; line-height: 1.5; }
.poem-text {
  margin: 0;
  padding: 12px 16px;
  border-inline-start: 3px solid #ffd166;
  background: rgba(0, 0, 0, 0.18);
  border-radius: 12px;
  white-space: pre-line;
  font-size: 19px;
  line-height: 1.7;
  font-weight: 600;
}
.poem-box { position: relative; display: flex; flex-direction: column; gap: 10px; }
.poem-play { align-self: flex-start; display: inline-flex; flex-direction: row; align-items: center; justify-content: center; white-space: nowrap; }
.break-stage.fit-1 .poem-text { font-size: 17px; line-height: 1.55; }
.break-stage.fit-2 .poem-text { font-size: 15px; line-height: 1.45; padding: 8px 12px; }
html.desktop .poem-text { font-size: 22px; line-height: 1.55; columns: 2; column-gap: 40px; padding: 14px 22px; }
.break-stage.fit-3 .poem-author { display: none; }
.break-stage.fit-3 .poem-text { font-size: 14px; line-height: 1.25; padding: 6px 10px; padding-inline-start: 50px; }
.break-stage.fit-3 .poem-play { position: absolute; top: 4px; inset-inline-start: 6px; min-height: 0; width: 40px; height: 40px; padding: 0; border-radius: 50%; }
.break-stage.fit-3 .poem-play-label { display: none; }
/* The question is the card's point: keep it (fit-3 hides the lead line on other cards). */
.break-poem .break-stage.fit-3 .kids-lead { display: block; font-size: 15px; margin: 0; }
/* On a computer the card is wide: two columns keep the whole poem readable without shrinking it. */
html.desktop .break-stage.fit-3 .poem-text { font-size: 17px; padding-inline-start: 60px; }
/* 🔤 מאיפה באה המילה? */
.break-word { --br-bg: linear-gradient(160deg, #134e4a, #0f2f3a 65%, #071419); --br-a: rgba(94, 234, 212, 0.25); }
.word-big { margin: 0; font-size: 44px; font-weight: 800; line-height: 1.2; text-align: center; letter-spacing: 1px; }
.word-quote { margin: 0; padding: 8px 12px; border-inline-start: 3px solid #5eead4; background: rgba(0, 0, 0, 0.2); border-radius: 10px; font-size: 15px; line-height: 1.5; color: rgba(255, 255, 255, 0.85); }
.break-stage.fit-1 .word-big { font-size: 36px; }
.break-stage.fit-2 .word-big { font-size: 30px; }
.break-stage.fit-3 .word-big { font-size: 26px; }
.break-word .break-stage.fit-3 .kids-lead { display: block; font-size: 15px; margin: 0; }
.break-stage.fit-3 .word-quote { font-size: 13px; padding: 5px 10px; }
html.desktop .word-big { font-size: 64px; }
/* 🧪 נסו בעצמכם (PhET) */
.kids-sim { width: 100%; aspect-ratio: 4 / 3; max-height: 62vh; border: 0; border-radius: 14px; background: #fff; }
.kids-sim-open { display: inline-flex; align-self: center; text-decoration: none; }
.kids-sim-credit { display: block; text-align: center; color: inherit; opacity: 0.75; font-size: 13px; }
html.desktop .kids-sim { max-height: 70vh; }
/* 🏛️ פריט מהמוזיאון */
.break-museum { --br-bg: linear-gradient(160deg, #3f2d12, #2a1d0b 60%, #120c04); --br-a: rgba(250, 204, 21, 0.22); }
.museum-source { margin: 0 0 -6px; font-size: 13px; font-weight: 700; letter-spacing: 0.3px; color: rgba(255, 235, 180, 0.85); }
.museum-pic { display: block; max-height: 42vh; width: 100%; object-fit: contain; background: rgba(0, 0, 0, 0.25); border-radius: 14px; flex-shrink: 0; cursor: zoom-in; }
.museum-facts { margin: 0; padding-inline-start: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 16px; line-height: 1.5; }
.museum-q { margin: 0; font-weight: 700; }
.break-stage.fit-1 .museum-pic { max-height: 36vh; }
.break-stage.fit-1 .museum-facts { font-size: 15px; }
.break-stage.fit-2 .museum-pic { max-height: 30vh; }
.break-stage.fit-2 .museum-facts { font-size: 14px; gap: 3px; }
.break-stage.fit-3 .museum-pic { max-height: 22vh; }
/* A small phone: two of the sentences (the speak button still reads all three). */
.break-stage.fit-3 .museum-facts li:nth-child(n + 3) { display: none; }
.break-museum .break-stage.fit-3 .break-title { font-size: 20px; }
.break-stage.fit-3 .museum-source { font-size: 12px; }
.break-stage.fit-3 .museum-facts { font-size: 13px; line-height: 1.35; }
.break-museum .break-stage.fit-3 .kids-lead { display: block; font-size: 15px; margin: 0; }
html.desktop .museum-pic { max-height: 44vh; }
/* A wide screen: the answers in one row from the start. */
html.desktop .break-museum .kids-answers { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); }
html.desktop .museum-facts { font-size: 19px; }
.break-museum .break-stage.fit-3 .kids-answer { min-height: 40px; padding: 6px 10px; font-size: 15px; }
.break-museum .break-stage.fit-3 .kids-answers { gap: 6px; }
.break-museum .break-stage.fit-3 .museum-q { font-size: 15px; line-height: 1.35; }
/* The smallest step: the answers side by side, in one row. */
.break-museum .break-stage.fit-3 .kids-answers { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); }
.break-museum .break-stage.fit-3 .kids-answer { font-size: 14px; padding: 6px; line-height: 1.25; }
html.desktop .break-museum .break-stage .museum-facts { font-size: 18px; }
html.desktop .break-museum .break-stage .museum-q { font-size: 20px; }
html.desktop .break-museum .break-stage .break-title { font-size: 30px; }
html.desktop .break-museum .break-stage .museum-source { font-size: 15px; }

/* 🧊 תלת-ממד: the button on the video screen and the model's own full screen (web/viewer3d.js) */
.card .model-btn {
  /* Centred in the space beside the side buttons (the rail is on the left, about 62px wide). */
  position: absolute; left: calc(50% + 31px); bottom: calc(var(--model-btn-bottom, 168px) + var(--safe-bottom)); z-index: 5;
  transform: translateX(-50%); display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 52px; padding: 10px 22px; border: 2px solid rgba(255, 255, 255, 0.9); border-radius: 999px;
  background: linear-gradient(135deg, #22d3ee, #6366f1); color: #fff; font: inherit; font-size: 18px; font-weight: 800;
  white-space: nowrap; cursor: pointer; box-shadow: 0 6px 22px rgba(0, 0, 0, 0.45), 0 0 0 4px rgba(99, 102, 241, 0.25);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35); animation: model-btn-glow 2.4s ease-in-out infinite;
}
@media (max-width: 360px) { .card .model-btn { --model-btn-bottom: 128px; min-height: 46px; padding: 8px 14px; font-size: 15.5px; } }
@keyframes model-btn-glow { 50% { box-shadow: 0 6px 22px rgba(0, 0, 0, 0.45), 0 0 0 9px rgba(99, 102, 241, 0.12); } }
.card .model-btn:active { transform: translateX(-50%) scale(0.96); }
.model-screen {
  position: fixed; inset: 0; z-index: 1100; display: flex; flex-direction: column;
  background: radial-gradient(circle at 50% 40%, #2a3350, #0b0f1c 70%); color: #fff;
  padding: calc(10px + var(--safe-top, 0px)) 16px calc(12px + var(--safe-bottom, 0px));
}
.model-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.model-title { margin: 0; font-size: 20px; line-height: 1.3; }
.model-back {
  flex-shrink: 0; min-height: 44px; padding: 8px 16px; border: 0; border-radius: 999px;
  background: #ffd166; color: #2a1a00; font: inherit; font-weight: 800; cursor: pointer;
}
.model-stage { position: relative; flex: 1; min-height: 0; margin: 10px 0; }
.model-viewer { width: 100%; height: 100%; --poster-color: transparent; background: transparent; }
/* Over the poster while the model loads: a label and a bar, on a dark pill so they read on any picture. */
.model-status { position: absolute; z-index: 2; left: 50%; bottom: 18px; transform: translateX(-50%); width: min(260px, calc(100% - 32px)); padding: 10px 14px; border-radius: 14px; background: rgba(0, 0, 0, 0.6); color: #fff; text-align: center; pointer-events: none; }
.model-status-text { margin: 0 0 8px; font-size: 15px; font-weight: 600; }
.model-progress { height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.2); overflow: hidden; }
.model-progress > i { display: block; width: 0; height: 100%; background: #ffd166; transition: width 0.2s; }
.model-controls { display: flex; justify-content: center; gap: 10px; margin-bottom: 8px; }
.model-ctl {
  min-width: 48px; min-height: 44px; padding: 6px 14px; border: 1px solid rgba(255, 255, 255, 0.3); border-radius: 999px;
  background: rgba(255, 255, 255, 0.1); color: #fff; font: inherit; font-size: 16px; font-weight: 700; cursor: pointer;
}
.model-ctl[aria-pressed='true'] { background: #ffd166; color: #2a1a00; border-color: #ffd166; }
.model-hint { margin: 0; text-align: center; font-size: 13px; color: rgba(255, 255, 255, 0.7); }
.model-credit { display: block; margin-top: 6px; text-align: center; font-size: 12px; color: rgba(255, 255, 255, 0.65); }
html.model-on { overflow: hidden; }
html.desktop .model-screen { padding: 24px 10vw 20px; }
html.desktop .model-title { font-size: 28px; }
html.desktop .card .model-btn { left: 50%; font-size: 20px; padding: 12px 28px; --model-btn-bottom: 150px; }

/* ---------- "דווחו על טעות" (web/report.js) ---------- */

/* Small and quiet: under the rail on a video, in the corner of a game card. */
.report-btn,
.rail-btn.report .report-flag {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.7);
  font-size: 15px;
  line-height: 1;
}
.rail-btn.report { min-width: 0; margin-top: -6px; }
.report-btn {
  position: absolute;
  z-index: 3;
  inset-inline-end: 12px;
  bottom: calc(16px + var(--safe-bottom));
  border: 0;
  cursor: pointer;
}
.report-btn:active,
.rail-btn.report:active .report-flag { transform: scale(0.9); }
.report-types { display: grid; gap: 10px; margin: 18px 0 8px; }
.report-type {
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
  font: inherit;
  font-size: 17px;
  font-weight: 600;
  text-align: start;
  cursor: pointer;
}
.report-type.chosen { border-color: var(--accent, #ffd166); background: rgba(255, 209, 102, 0.2); }
.report-type:disabled:not(.chosen) { opacity: 0.45; }
.report-status { min-height: 1.5em; margin: 8px 0 0; font-weight: 700; }
.report-note { margin: 14px 0 0; font-size: 13px; opacity: 0.65; }

/* ---------- "🙋 בקשו נושא" (web/ask.js, kids) ---------- */

.ask-btn span { font-size: 21px; line-height: 1; }
.ask-row { display: flex; gap: 8px; margin: 16px 0 10px; }
.ask-input {
  flex: 1;
  min-width: 0;
  padding: 14px 16px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.1);
  color: inherit;
  font: inherit;
  font-size: 19px;
}
.ask-input:focus { outline: none; border-color: #ffd166; }
.ask-mic {
  flex: none;
  width: 54px;
  border: 0;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.14);
  font-size: 24px;
  cursor: pointer;
}
.ask-mic.on { background: #ef476f; animation: ask-pulse 1s ease-in-out infinite; }
@keyframes ask-pulse { 50% { transform: scale(1.08); } }
.ask-list { display: grid; gap: 8px; }
.ask-pick {
  padding: 12px 16px;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.12);
  color: inherit;
  font: inherit;
  font-size: 18px;
  font-weight: 600;
  text-align: start;
  cursor: pointer;
}
.ask-pick:disabled { opacity: 0.5; }
.ask-status { min-height: 1.4em; margin: 10px 0 0; font-weight: 700; }
.ask-done { margin: 18px 0; font-size: 21px; font-weight: 700; line-height: 1.5; }

/* ---------- A computer: the cards that break the routine ---------- */

/* The card's badge and title stay, however tight it gets (on a phone fit-3 hides the badge). */
html.desktop .break-stage.fit-3 .break-badge { display: block; }
html.desktop .break-stage .break-title, html.desktop .break-stage.fit-1 .break-title, html.desktop .break-stage.fit-2 .break-title, html.desktop .break-stage.fit-3 .break-title { font-size: max(24px, 2.2vw); }
html.desktop .break-poem .break-stage.fit-3 .poem-author { display: block; }
/* Short answers in one row: a wide screen has room across, not down (not the true-or-made-up sentences). */
html.desktop .break-stage .kids-answers:not(.tof-answers) { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); }

/* The museum picture, as large as the screen (a tap on it in the card). */
.museum-zoom { position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 16px; background: rgba(0, 0, 0, 0.92); cursor: zoom-out; }
.museum-zoom img { max-width: 100%; max-height: calc(100dvh - 70px); object-fit: contain; border-radius: 10px; }
.museum-zoom-close { margin: 0; color: rgba(255, 255, 255, 0.75); font-size: 14px; }

/* ---------- A computer: activities that step down to fit the panel (fitPanel in web/kids.js) ---------- */

html.desktop .kids-body.ov-fit-1 { gap: 10px; padding: 14px 28px 18px; }
html.desktop .kids-body.ov-fit-1 .kids-lead { font-size: 16px; line-height: 1.45; }
html.desktop .kids-body.ov-fit-1 .kids-picture { max-height: 34vh; }
html.desktop .kids-body.ov-fit-1 .kids-answer { min-height: 46px; padding: 8px 12px; }
html.desktop .kids-body.ov-fit-1 .kids-card { min-height: 72px; }
html.desktop .kids-body.ov-fit-1 .kids-tile { padding: 16px 10px; }
html.desktop .kids-body.ov-fit-1 .kids-tile-icon { font-size: 40px; }
html.desktop .kids-body.ov-fit-2 { gap: 8px; padding: 10px 24px 14px; }
html.desktop .kids-body.ov-fit-2 .kids-picture { max-height: 26vh; }
html.desktop .kids-body.ov-fit-2 .kids-progress { font-size: 12px; }
html.desktop .kids-body.ov-fit-2 .kids-puzzle { width: min(100%, calc(100dvh - 360px)); }
html.desktop .kids-body.ov-fit-2 .kids-ws { max-width: min(100%, calc(100dvh - 520px)); }
html.desktop .kids-body.ov-fit-2 .draw-board { width: min(100%, 560px, max(180px, calc(100dvh - 600px))); }
html.desktop .kids-body.ov-fit-2 .kids-card { min-height: 56px; font-size: 13px; }
html.desktop .kids-body.ov-fit-2 .kids-memory { gap: 6px; }
html.desktop .kids-body.ov-fit-3 .kids-lead { display: none; }
html.desktop .kids-body.ov-fit-3 .kids-picture { max-height: 20vh; }
html.desktop .kids-body.ov-fit-3 .kids-answer { min-height: 40px; font-size: 15px; }
html.desktop .kids-body.ov-fit-3 .kids-puzzle { width: min(100%, calc(100dvh - 420px)); }
html.desktop .kids-body.ov-fit-3 .kids-ws { max-width: min(100%, calc(100dvh - 570px)); }
html.desktop .kids-body.ov-fit-3 .kids-ws-list { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 6px; }
html.desktop .kids-body.ov-fit-3 .draw-board { width: min(100%, 560px, max(140px, calc(100dvh - 680px))); }
html.desktop .kids-body.ov-fit-3 .kids-card { min-height: 46px; }
