/* Vučkov svet: the kids' area. Big, bright and round, made for small fingers: every target is at
   least 64px, pictures are pixel art scaled up crisp, and nothing a child needs is text. */
html.is-kids, html.is-kids body { overflow: hidden; }
html.is-kids .app { visibility: hidden; }

#kidsView {
  position: fixed;
  inset: 0;
  z-index: 25;
  background: var(--paper);
}

.kd {
  --sky: #cfe9ff;
  --grass: #bfe3a5;
  --ink: #2f4435;
  --sun: #ffd45a;
  --card: #ffffff;
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #d6eeff 0%, #eaf7ff 42%, #f4fbe9 72%, #e1f3cf 100%);
  color: var(--ink);
  padding: calc(var(--safe-top) + 8px) 0 calc(var(--safe-bottom) + 8px);
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
.kd img { image-rendering: pixelated; -webkit-user-drag: none; }
.kd-scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 4px 16px 24px; display: flex; flex-direction: column; gap: 16px; width: 100%; max-width: 760px; margin: 0 auto; }

/* ---------- top of the yard ---------- */
.kd-top { display: flex; align-items: center; gap: 10px; padding: 0 16px 8px; width: 100%; max-width: 760px; margin: 0 auto; }
.kd-top__who { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1; }
.kd-top__name { font-family: var(--serif); font-weight: 800; font-size: var(--fs-h1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kd-top__stars { display: inline-flex; align-items: center; gap: 4px; padding: 6px 12px; border-radius: 999px; background: var(--white); font-weight: 800; font-size: var(--fs-body); box-shadow: 0 4px 0 color-mix(in srgb, var(--moss) 12%, transparent); }
.kd-top__stars span { display: inline-grid; width: 22px; height: 22px; color: #f2b01e; }
.kd-top__stars svg { width: 100%; height: 100%; }
.kd-avatar { flex: none; width: 52px; height: 52px; border-radius: 50%; background: var(--white); display: grid; place-items: center; box-shadow: 0 4px 0 color-mix(in srgb, var(--moss) 12%, transparent); overflow: hidden; }
.kd-avatar img { width: 82%; height: 82%; }
.kd-avatar--big { width: 72px; height: 72px; }

.kd-round {
  flex: none;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 5px 0 color-mix(in srgb, var(--moss) 16%, transparent);
  transition: transform 0.1s;
}
.kd-round:active { transform: translateY(3px); box-shadow: 0 2px 0 color-mix(in srgb, var(--moss) 16%, transparent); }
.kd-round svg { width: 26px; height: 26px; }
.kd-round img { width: 36px; height: 36px; }
.kd-round--lock { width: 48px; height: 48px; opacity: 0.75; }
.kd-round--lock svg { width: 20px; height: 20px; }
.kd-round--big { width: 84px; height: 84px; }
.kd-round--big svg { width: 38px; height: 38px; }
.kd-round--go { background: #4caf50; color: var(--white); box-shadow: 0 6px 0 #2e7d32; animation: kd-pulse 1.6s ease-in-out infinite; }

/* ---------- baka's yard ---------- */
.kd-yard { container-type: inline-size; position: relative; width: 100%; aspect-ratio: 400 / 224; border-radius: var(--r-card); overflow: hidden; box-shadow: 0 8px 0 color-mix(in srgb, var(--moss) 12%, transparent); flex: none; }
.kd-yard__bg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.kd-yard__thing { position: absolute; transform: translate(-50%, -100%); display: block; aspect-ratio: 1; }
.kd-yard__thing img, .kd-yard__thing svg { width: 100%; height: 100%; display: block; }
.kd-yard__thing.is-new { animation: kd-drop 0.9s cubic-bezier(0.3, 1.6, 0.5, 1) both, kd-glow 1.6s 0.9s ease-in-out 3; }
.kd-yard__balloons { display: flex; aspect-ratio: auto; height: auto; }
.kd-yard__balloons .kd-balloon { width: 34%; margin: 0 -2%; animation: kd-bob 3s ease-in-out infinite; }
.kd-yard__balloons .kd-balloon:nth-child(2) { animation-delay: -1s; margin-top: -10%; }
.kd-yard__plums { display: flex; flex-wrap: wrap; justify-content: center; aspect-ratio: auto; }
.kd-yard__plums img { width: 30%; height: auto; margin: -4%; }
.kd-yard__pup { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); display: flex; justify-content: center; }
/* Vučko grows with the yard: his frame width (--fw) follows the scene's width, so the strip still
   shows exactly one frame at a time on a big tablet. */
.kd-yard__pup .mascot { --fw: 22cqw !important; width: 22cqw !important; height: calc(22cqw * 1.03) !important; image-rendering: pixelated; }
.is-bounce { animation: kd-bounce 0.5s cubic-bezier(0.3, 1.8, 0.5, 1); }
.kd-yard__thing.is-bounce { animation: kd-bounce-yard 0.5s cubic-bezier(0.3, 1.8, 0.5, 1); }

/* ---------- the big play button and the path ---------- */
.kd-bigplay {
  align-self: center;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px 10px 10px;
  border-radius: 999px;
  background: linear-gradient(180deg, #6cc56f, #43a047);
  color: var(--white);
  box-shadow: 0 8px 0 #2e7d32;
  animation: kd-pulse 1.8s ease-in-out infinite;
  position: relative;
}
.kd-bigplay:active { transform: translateY(5px); box-shadow: 0 3px 0 #2e7d32; animation: none; }
.kd-bigplay__pic { width: 76px; height: 76px; border-radius: 50%; background: var(--white); display: grid; place-items: center; overflow: hidden; }
.kd-bigplay__pic .kd-pic { width: 82%; height: 82%; }
.kd-bigplay__pic img { width: 82%; height: 82%; }
.kd-bigplay__go { width: 64px; height: 64px; display: grid; place-items: center; }
.kd-bigplay__go svg { width: 54px; height: 54px; }
.kd-bigplay__dots { display: flex; flex-direction: column; gap: 6px; padding-right: 6px; }
.kd-bigplay__dots i { width: 12px; height: 12px; border-radius: 50%; background: rgba(255, 255, 255, 0.4); }
.kd-bigplay__dots i.is-done { background: var(--sun); }
.kd-bigplay__dots i.is-now { background: var(--white); }
.kd-bigplay--done { background: linear-gradient(180deg, #ffd45a, #f2b01e); box-shadow: 0 8px 0 #c88a0f; }

.kd-path { display: flex; flex-direction: column; gap: 10px; }
.kd-unit { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-card); background: rgba(255, 255, 255, 0.78); box-shadow: 0 4px 0 color-mix(in srgb, var(--moss) 8%, transparent); }
.kd-unit.is-locked { opacity: 0.55; }
.kd-unit.is-done { background: rgba(255, 246, 214, 0.95); }
.kd-unit__pic { flex: none; width: 64px; height: 64px; border-radius: var(--r-card); background: var(--white); display: grid; place-items: center; }
.kd-unit.is-locked .kd-unit__pic { filter: grayscale(0.8); }
.kd-unitpic { width: 52px; height: 52px; }
.kd-unit__advs { flex: 1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.kd-adv { height: 64px; border-radius: var(--r-card); background: var(--white); display: grid; place-items: center; color: var(--muted); box-shadow: 0 4px 0 color-mix(in srgb, var(--moss) 10%, transparent); }
.kd-adv:disabled { opacity: 0.6; box-shadow: none; }
.kd-adv svg { width: 24px; height: 24px; }
.kd-adv.is-next { background: #4caf50; color: var(--white); box-shadow: 0 5px 0 #2e7d32; animation: kd-pulse 1.8s ease-in-out infinite; }
.kd-adv.is-next svg { width: 30px; height: 30px; }
.kd-adv.is-done { background: #fff6d6; }
.kd-adv__stars { display: flex; gap: 1px; }
.kd-adv__stars i { width: 18px; height: 18px; color: #d9d2c0; }
.kd-adv__stars i.is-on { color: #f2b01e; }
.kd-adv__stars svg { width: 100%; height: 100%; }

/* ---------- pictures ---------- */
.kd-pic { display: block; width: 100%; height: 100%; object-fit: contain; }
.kd-color svg { width: 100%; height: 100%; display: block; }
.kd-plums { display: flex; flex-wrap: wrap; align-content: center; justify-content: center; gap: 0; }
.kd-plums img { width: 33%; height: auto; margin: -1%; }
.kd-plums--two img { width: 20%; }
.kd-plums--single img { width: 84%; margin: 0; }
.kd-plums--few img { width: 46%; }
.kd-balloon { display: block; }
.kd-balloon svg { width: 100%; height: auto; display: block; }

/* ---------- playing ---------- */
.kd-bar { display: flex; align-items: center; gap: 12px; padding: 0 16px 6px; width: 100%; max-width: 760px; margin: 0 auto; }
.kd-bar__count { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: var(--fs-title); }
.kd-bar__count img { width: 30px; height: 30px; }
.kd-progress { flex: 1; height: 18px; border-radius: 999px; background: rgba(255, 255, 255, 0.85); overflow: hidden; box-shadow: inset 0 2px 0 color-mix(in srgb, var(--moss) 8%, transparent); }
.kd-progress i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #ffd45a, #f2b01e); transition: width 0.5s; }

.kd--play { gap: 8px; }
.kd-guide { display: flex; align-items: flex-end; gap: 6px; padding: 0; align-self: flex-start; max-width: calc(100% - 32px); margin: 0 0 0 max(16px, calc((100% - 760px) / 2 + 16px)); text-align: left; }
.kd-guide .mascot { flex: none; }
.kd-guide.is-hidden-pup .mascot { visibility: hidden; }
.kd-bubble {
  position: relative;
  margin-bottom: 26px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px 10px 12px;
  border-radius: var(--r-card);
  background: var(--white);
  font-weight: 800;
  font-size: var(--fs-title);
  line-height: 1.2;
  box-shadow: 0 4px 0 color-mix(in srgb, var(--moss) 10%, transparent);
  min-width: 0;
}
.kd-bubble::before { content: ''; position: absolute; left: -9px; bottom: 14px; border: 9px solid transparent; border-right-color: var(--white); border-left: 0; }
.kd-bubble__icon { flex: none; display: grid; width: 26px; height: 26px; color: var(--fern); }
.kd-bubble__icon svg { width: 100%; height: 100%; }
.kd-bubble__text { min-width: 0; overflow-wrap: break-word; hyphens: none; }

.kd-board { flex: 1; min-height: 0; width: 100%; max-width: 760px; margin: 0 auto; padding: 8px 16px 12px; display: grid; gap: 14px; align-content: center; justify-items: center; }
.kd-board--choices { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.kd-board--n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 420px) {
  .kd-board--n3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kd-board--n3 .kd-choice:last-child { grid-column: 1 / -1; width: calc(50% - 7px); }
}
.kd-choice {
  position: relative;
  width: 100%;
  max-width: 220px;
  aspect-ratio: 1;
  border-radius: var(--r-card);
  background: var(--card);
  display: grid;
  place-items: center;
  padding: 12%;
  box-shadow: 0 7px 0 color-mix(in srgb, var(--moss) 14%, transparent);
  transition: transform 0.12s;
}
.kd-choice:active { transform: translateY(4px) scale(0.98); box-shadow: 0 3px 0 color-mix(in srgb, var(--moss) 14%, transparent); }
.kd-choice:disabled { opacity: 1; }
.kd-choice.is-wrong { animation: kd-wiggle 0.5s; }
.kd-choice.is-right { box-shadow: 0 0 0 6px #6cc56f, 0 7px 0 color-mix(in srgb, var(--moss) 14%, transparent); animation: kd-bounce 0.55s cubic-bezier(0.3, 1.8, 0.5, 1); }
.kd-choice.is-review { background: var(--paper); }
.kd-choice__sound { position: absolute; top: 8px; right: 12px; font-size: var(--fs-title); color: var(--fern-bright); }
.kd-choice.is-eaten { animation: kd-eaten 0.7s ease-in forwards; }

.kd-board--feed .kd-choice { background: #fff4e0; }
.kd-board--plates .kd-choice { border-radius: 50%; background: radial-gradient(circle at 50% 50%, #ffffff 58%, var(--line) 59%, #ffffff 64%); padding: 18%; }

/* meeting a word */
.kd-board--meet, .kd-board--say, .kd-board--count { grid-template-columns: minmax(0, 1fr); gap: 18px; }
.kd-meet { width: min(78vw, 300px); aspect-ratio: 1; border-radius: 36px; background: var(--card); box-shadow: 0 8px 0 color-mix(in srgb, var(--moss) 14%, transparent); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 10%; animation: kd-pop-in 0.6s cubic-bezier(0.3, 1.6, 0.5, 1) both; }
.kd-meet__pic { width: 78%; height: auto; aspect-ratio: 1; }
.kd-meet__word { font-family: var(--serif); font-weight: 800; font-size: var(--fs-display); line-height: 1; }
.kd-next { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; background: #4caf50; color: var(--white); box-shadow: 0 6px 0 #2e7d32; transition: opacity 0.3s, transform 0.1s; }
.kd-next svg { width: 40px; height: 40px; }
.kd-next.is-waiting { opacity: 0.35; }
/* In a speaking game the arrow is for a grown-up who wants to move on: small and quiet. */
.kd-next--quiet { width: 56px; height: 56px; background: rgba(255, 255, 255, 0.9); color: var(--muted); box-shadow: 0 4px 0 color-mix(in srgb, var(--moss) 12%, transparent); animation: none !important; }
.kd-next--quiet svg { width: 26px; height: 26px; }
.kd-next:not(.is-waiting) { animation: kd-pulse 1.4s ease-in-out infinite; }

/* balloons */
.kd-board--sky { display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-end; align-content: center; gap: 10px 14px; }
.kd-choice--balloon { background: none; box-shadow: none; padding: 0; aspect-ratio: 60 / 96; width: clamp(84px, 21vw, 150px); max-width: none; animation: kd-float 3.2s ease-in-out infinite; animation-delay: calc(var(--i) * -0.8s); }
.kd-choice--balloon:active { transform: none; box-shadow: none; }
.kd-choice--balloon .kd-balloon { width: 100%; }
.kd-choice--balloon.is-right { box-shadow: none; }
.kd-choice--balloon.is-popped .kd-balloon { animation: kd-popped 0.35s ease-out forwards; }


/* counting plums */
.kd-count { display: grid; grid-template-columns: repeat(var(--cols, 5), minmax(0, 104px)); justify-content: center; gap: 10px; width: 100%; max-width: 560px; }
.kd-plum { position: relative; aspect-ratio: 1; border-radius: var(--r-card); background: rgba(255, 255, 255, 0.7); display: grid; place-items: center; box-shadow: 0 4px 0 color-mix(in srgb, var(--moss) 10%, transparent); }
.kd-plum img { width: 86%; height: 86%; opacity: 0.55; transition: opacity 0.2s; }
.kd-plum.is-counted { background: #f1e6ff; animation: kd-bounce 0.45s cubic-bezier(0.3, 1.8, 0.5, 1); }
.kd-plum.is-counted img { opacity: 1; }
.kd-plum.is-counted::after { content: attr(data-n); position: absolute; top: -8px; right: -6px; min-width: 28px; height: 28px; border-radius: 999px; background: #7e57c2; color: var(--white); font-weight: 800; display: grid; place-items: center; font-size: var(--fs-body); }

/* memory */
.kd-board--memory { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kd-card { width: 100%; max-width: 170px; aspect-ratio: 3 / 4; position: relative; perspective: 600px; }
.kd-card__back, .kd-card__face { position: absolute; inset: 0; border-radius: var(--r-card); display: grid; place-items: center; backface-visibility: hidden; -webkit-backface-visibility: hidden; transition: transform 0.4s; box-shadow: 0 6px 0 color-mix(in srgb, var(--moss) 14%, transparent); }
.kd-card__back { background: linear-gradient(160deg, #ffd45a, #fcbb9b); }
.kd-card__back img { width: 52%; opacity: 0.85; }
.kd-card__face { background: var(--card); transform: rotateY(180deg); padding: 14%; }
.kd-card.is-open .kd-card__back { transform: rotateY(180deg); }
.kd-card.is-open .kd-card__face { transform: rotateY(360deg); }
.kd-card.is-matched .kd-card__face { box-shadow: 0 0 0 5px #6cc56f, 0 6px 0 color-mix(in srgb, var(--moss) 14%, transparent); }

/* peekaboo */
.kd-board--peek { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; }
.kd-peek { padding: 0; overflow: visible; background: none; box-shadow: none; }
.kd-peek__behind { position: absolute; inset: 10% 10% 0; display: flex; align-items: flex-end; justify-content: center; }
.kd-peek__cover { position: absolute; inset: 0; border-radius: var(--r-card); background: var(--card); padding: 12%; display: grid; place-items: center; box-shadow: 0 7px 0 color-mix(in srgb, var(--moss) 14%, transparent); transition: transform 0.45s cubic-bezier(0.3, 1.4, 0.5, 1); }
.kd-peek.is-lifted .kd-peek__cover { transform: translateY(-62%) rotate(-6deg); }

/* speaking */
.kd-mic { width: 104px; height: 104px; border-radius: 50%; display: grid; place-items: center; background: #e0453a; color: var(--white); box-shadow: 0 8px 0 #a92e25; }
.kd-mic svg { width: 48px; height: 48px; }
.kd-mic.is-starting { opacity: 0.7; }
.kd-mic.is-listening { animation: kd-listen 1s ease-in-out infinite; }

/* Čika Vuk opens a unit */
.kd--intro .kd-intro { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 16px; margin: 0 16px 12px; border-radius: var(--r-card); }
.kd-intro__pic { width: 96px; height: 96px; border-radius: var(--r-card); background: var(--white); display: grid; place-items: center; box-shadow: 0 6px 0 color-mix(in srgb, var(--moss) 12%, transparent); }
.kd-intro__pic .kd-pic { width: 78%; height: 78%; }
.kd-bubble--vuk { margin: 0; font-size: var(--fs-title); text-align: center; }
.kd-bubble--vuk::before { left: 50%; top: -9px; bottom: auto; transform: translateX(-50%); border: 9px solid transparent; border-bottom-color: var(--white); border-top: 0; }

/* the end of an adventure */
.kd--done { align-items: center; justify-content: center; gap: 18px; padding-left: 16px; padding-right: 16px; text-align: center; }
.kd-done__cast { display: flex; align-items: flex-end; gap: 8px; }
.kd-done__stars { display: flex; gap: 10px; }
.kd-done__stars i { width: 64px; height: 64px; color: #e2dccb; animation: kd-star 0.6s cubic-bezier(0.3, 1.8, 0.5, 1) both; animation-delay: var(--d); }
.kd-done__stars i.is-on { color: #f2b01e; filter: drop-shadow(0 4px 0 #c88a0f); }
.kd-done__stars svg { width: 100%; height: 100%; }
.kd-done__stickers { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; max-width: 520px; }
.kd-done__stickers .kd-sticker { width: 84px; }
.kd-done__ms { margin: 0; padding: 8px 14px; border-radius: var(--r-card); background: rgba(255, 255, 255, 0.85); font-weight: 800; color: var(--fern); }
.kd-done__actions { display: flex; gap: 20px; margin-top: 6px; }

/* stickers */
.kd-album__page { display: flex; flex-direction: column; gap: 8px; }
.kd-album__title { margin: 0; font-family: var(--serif); font-size: var(--fs-title); }
.kd-album__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 560px) { .kd-album__grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.kd-sticker { position: relative; aspect-ratio: 1; border-radius: var(--r-card); background: var(--white); padding: 12%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; transform: rotate(var(--tilt, 0deg)); box-shadow: 0 5px 0 color-mix(in srgb, var(--moss) 14%, transparent); border: 3px solid #fff; outline: 2px dashed color-mix(in srgb, var(--moss) 8%, transparent); outline-offset: -8px; }
.kd-sticker .kd-pic { flex: 1; min-height: 0; }
.kd-sticker__word { font-weight: 800; font-size: var(--fs-small); line-height: 1; }
.kd-sticker.is-missing { background: rgba(255, 255, 255, 0.5); box-shadow: none; }
.kd-sticker.is-missing .kd-pic { filter: brightness(0) opacity(0.12); }
.kd-sticker.is-new { animation: kd-sticker-in 0.6s cubic-bezier(0.3, 1.6, 0.5, 1) both; animation-delay: var(--d, 0ms); }

/* time's up */
.kd--sleep { background: linear-gradient(180deg, #1d2a4a 0%, #31406b 60%, #4b5a86 100%); color: #f4efe0; align-items: center; justify-content: center; gap: 14px; text-align: center; padding-left: 20px; padding-right: 20px; }
.kd-sleep__lock { position: absolute; top: calc(var(--safe-top) + 12px); right: 16px; }
.kd-sleep__sky { display: flex; gap: 24px; align-items: center; }
.kd-sleep__sky img { width: 72px; height: 72px; animation: kd-bob 4s ease-in-out infinite; }
.kd-sleep__sky img:nth-child(2) { width: 40px; height: 40px; animation-delay: -1.3s; }
.kd-sleep__sky img:nth-child(3) { width: 30px; height: 30px; animation-delay: -2.4s; }
.kd-sleep__pup { position: relative; }
.kd-zzz { position: absolute; right: -26px; top: -4px; font-weight: 800; font-size: var(--fs-h1); }
.kd-zzz i { display: block; font-style: normal; opacity: 0; animation: kd-zzz 3s linear infinite; }
.kd-zzz i:nth-child(2) { animation-delay: 1s; }
.kd-zzz i:nth-child(3) { animation-delay: 2s; }
.kd-sleep__line { margin: 0; font-family: var(--serif); font-size: var(--fs-h1); font-weight: 800; }
.kd-sleep__parent { margin: 0; opacity: 0.75; max-width: 340px; }

/* the parent question */
.kd-gate { position: absolute; inset: 0; z-index: 5; background: rgba(29, 42, 36, 0.55); display: grid; place-items: center; padding: calc(var(--safe-top) + 16px) 16px calc(var(--safe-bottom) + 16px); }
.kd-gate__card { position: relative; width: 100%; max-width: 360px; max-height: 100%; overflow-y: auto; background: var(--paper); color: var(--moss); border-radius: var(--r-card); padding: 20px 18px 18px; display: flex; flex-direction: column; gap: 12px; box-shadow: var(--shadow); }
.kd-gate__card--menu .btn { width: 100%; }
.kd-gate__close { position: absolute; top: 6px; right: 6px; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; }
.kd-gate__close svg { width: 22px; height: 22px; }
.kd-gate__kicker { margin: 0; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; font-size: var(--fs-label); color: var(--muted); }
.kd-gate__q { margin: 0; font-weight: 800; font-size: var(--fs-title); padding-right: 36px; }
.kd-gate__typed { display: block; height: 56px; border-radius: var(--r-card); background: var(--white); border: 1.5px solid var(--line); font-family: var(--serif); font-size: var(--fs-display); font-weight: 800; text-align: center; line-height: 52px; letter-spacing: 0.1em; }
.kd-gate__pad { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.kd-gate__key { min-height: 52px; border-radius: var(--r-btn); background: var(--white); border: 1.5px solid var(--line); font-weight: 800; font-size: var(--fs-title); }
.kd-gate__key--soft { color: var(--muted); }
.kd-gate__key--ok { background: var(--fern); border-color: var(--fern); color: var(--white); font-size: var(--fs-body); }
.kd-gate__note { margin: 0; min-height: 1.3em; color: var(--rust); font-weight: 800; text-align: center; }
.kd-gate__key--blank { visibility: hidden; }
.kd-gate__forgot { align-self: center; min-height: 48px; padding: 0 12px; font-weight: 800; color: var(--fern-dark, #2f6b43); text-decoration: underline; text-underline-offset: 3px; }
/* the parent PIN: four dots over the number pad */
.kd-pin { display: flex; flex-direction: column; gap: 12px; }
.kd-pin__dots { display: flex; justify-content: center; gap: 16px; padding: 6px 0; }
.kd-pin__dots i { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid var(--moss); transition: background 0.12s; }
.kd-pin__dots i.is-on { background: var(--moss); }
.kd-pin__dots.is-wrong { animation: kd-shake 0.4s; }
@keyframes kd-shake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-10px); } 40% { transform: translateX(9px); } 60% { transform: translateX(-6px); } 80% { transform: translateX(3px); } }
.kd-pin__live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.kd-pin__why { margin: 0; }
.kd-pw { display: flex; flex-direction: column; gap: 10px; }
.kd-pw .btn { width: 100%; }
.kd-pw__field { -webkit-text-security: disc; text-security: disc; }

/* confetti */
.kd-confetti { position: fixed; inset: 0; pointer-events: none; z-index: 60; overflow: hidden; }
.kd-confetti i { position: absolute; width: 10px; height: 14px; border-radius: 3px; animation: kd-confetti 1.2s cubic-bezier(0.2, 0.7, 0.4, 1) forwards; }

/* ---------- the Parent corner ---------- */
.kp { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--paper); color: var(--moss); }
.kp-top { display: flex; align-items: center; gap: 10px; padding: calc(var(--safe-top) + 10px) 12px 8px; width: 100%; max-width: 640px; margin: 0 auto; }
.kp-top__title { margin: 0; font-family: var(--serif); font-weight: 800; font-size: var(--fs-h1); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kp-scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 4px 16px calc(var(--safe-bottom) + 28px); display: flex; flex-direction: column; gap: 16px; width: 100%; max-width: 640px; margin: 0 auto; }
.kp-scroll > .btn { width: 100%; }
.kp-hero { display: flex; align-items: flex-end; gap: 12px; padding: 14px; border-radius: var(--r-card); background: var(--sunrise-soft); border: 1.5px solid var(--edge); }
.kp-hero__art { flex: none; display: flex; align-items: flex-end; }
.kp-hero__title { margin: 0 0 4px; font-family: var(--serif); font-size: var(--fs-title); }
.kp-hero__body { margin: 0; font-size: var(--fs-body); }
@media (max-width: 380px) { .kp-hero { flex-direction: column; align-items: flex-start; } }
.kp-kid { display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: var(--r-card); background: var(--white); border: 1.5px solid var(--edge); }
.kp-kid__main { display: flex; align-items: center; gap: 12px; text-align: left; min-height: 72px; }
.kp-kid__text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.kp-kid__text strong { font-size: var(--fs-title); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kp-kid__text span { color: var(--muted); font-size: var(--fs-small); }
.kp-chev { width: 24px; height: 24px; color: var(--muted); transform: rotate(180deg); }
.kp-kid__play { width: 100%; }
.kp-kid__play span, .kp-head__play span { display: inline-grid; width: 22px; height: 22px; }
.kp-hint { text-align: center; }
.kp-leave { width: 100%; }
.kp-head { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 12px; }
.kp-head__name { margin: 0; font-family: var(--serif); font-size: var(--fs-h1); overflow-wrap: anywhere; }
.kp-head__play { grid-column: 1 / -1; width: 100%; }
.kp-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.kp-stat { padding: 12px 8px; border-radius: var(--r-card); background: var(--white); border: 1.5px solid var(--edge); text-align: center; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.kp-stat strong { font-family: var(--serif); font-size: var(--fs-h1); line-height: 1; color: var(--fern); }
.kp-stat span { font-size: var(--fs-label); color: var(--muted); font-weight: 800; overflow-wrap: anywhere; }
.kp-sec { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: var(--r-card); background: var(--white); border: 1.5px solid var(--edge); }
.kp-sec__title { margin: 0; font-size: var(--fs-body); font-weight: 800; }
.kp-sec .btn { width: 100%; }
.kp-text { margin: 0; }
.kp-text--muted { color: var(--muted); font-size: var(--fs-small); }
/* Speaking games waiting for the parent's OK by email */
.kp-consent { display: grid; gap: 6px; justify-items: start; }
.kp-consent:empty { display: none; }
.kp-email { overflow-wrap: anywhere; word-break: break-word; }
.kp-next { margin: 0; color: var(--muted); font-size: var(--fs-small); }
.kp-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.kp-can { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 8px; align-items: start; font-weight: 800; }
.kp-can__icon { width: 26px; height: 26px; border-radius: 50%; background: var(--mint); color: var(--fern); display: grid; place-items: center; }
.kp-can__icon svg { width: 16px; height: 16px; }
.kp-can__date { color: var(--muted); font-weight: 600; font-size: var(--fs-small); }
.kp-mission.is-done .kp-mission__text { color: var(--muted); text-decoration: line-through; }
.kp-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; height: 96px; align-items: end; }
.kp-week__day { height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; font-size: var(--fs-label); color: var(--muted); font-weight: 800; }
.kp-week__day i { width: 70%; min-height: 4px; border-radius: 8px 8px 3px 3px; background: var(--line); }
.kp-week__day i.is-on { background: var(--sage); }
.kp-words { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.kp-word { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 6px; border-radius: var(--r-card); background: var(--paper); border: 1.5px solid var(--edge); min-width: 0; }
.kp-word__pic { width: 44px; height: 44px; image-rendering: pixelated; }
.kp-word__sr { font-weight: 800; font-family: var(--serif); font-size: var(--fs-body); }
.kp-word__mean { color: var(--muted); font-size: var(--fs-label); text-align: center; overflow-wrap: anywhere; }
.kp-word__tag { margin-top: 2px; padding: 1px 8px; border-radius: 999px; background: var(--line); font-size: var(--fs-label); font-weight: 800; }
.kp-word.is-known .kp-word__tag { background: var(--mint-deep); color: var(--moss); }
.kp-word.is-said .kp-word__tag { background: var(--wheat); color: var(--ochre); }
.kp-cards { display: flex; flex-direction: column; gap: 8px; }
.kp-cards:empty { display: none; }
.kp-post { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto 44px; gap: 8px; align-items: center; padding: 6px; border-radius: var(--r-card); background: var(--paper); border: 1.5px solid var(--edge); }
.kp-post .kd-round { width: 48px; height: 48px; box-shadow: none; border: 1.5px solid var(--edge); }
.kp-post__text { display: flex; flex-direction: column; min-width: 0; }
.kp-post__text span { color: var(--muted); font-size: var(--fs-small); }
.kp-post__send { min-height: 44px; padding: 8px 14px; font-size: var(--fs-body); }
.kp-faces { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.kp-face { aspect-ratio: 1; border-radius: var(--r-card); background: var(--white); border: 2px solid var(--line); display: grid; place-items: center; min-height: 48px; }
.kp-face img { width: 78%; height: 78%; image-rendering: pixelated; }
.kp-face.is-on { border-color: var(--fern); background: var(--mint); }
@media (max-width: 360px) { .kp-faces { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.kp-lines { display: flex; flex-direction: column; gap: 8px; }
.kp-line { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px 14px; border-radius: var(--r-card); background: var(--white); border: 1.5px solid var(--edge); text-align: left; min-height: 56px; }
.kp-line strong { font-family: var(--serif); font-size: var(--fs-title); }
.kp-line span { color: var(--muted); font-size: var(--fs-small); }
.kp-rec { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.kp-rec__line { margin: 0; font-family: var(--serif); font-weight: 800; font-size: var(--fs-h1); }
.kp-rec__btn { width: 104px; height: 104px; border-radius: 50%; display: grid; place-items: center; background: #e0453a; color: var(--white); box-shadow: 0 8px 0 #a92e25; }
.kp-rec__btn svg { width: 46px; height: 46px; }
.kp-rec__btn.is-recording { animation: kd-listen 1s ease-in-out infinite; }
.kp-rec__status { margin: 0; min-height: 1.4em; font-weight: 800; color: var(--rust); }
.kp-rec__after { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; width: 100%; }
.kp-rec__after .btn { padding: 10px 8px; font-size: var(--fs-body); min-width: 0; }
.kp-notice { padding: 12px 14px; border-radius: var(--r-card); background: var(--mint); font-size: var(--fs-small); display: flex; flex-direction: column; gap: 6px; }
.kp-notice p { margin: 0; }
.kp-notice a { color: var(--fern); font-weight: 800; display: inline-flex; align-items: center; min-height: 44px; align-self: flex-start; }
.kp-check, .kp-mission label { position: relative; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; align-items: start; font-weight: 800; cursor: pointer; min-height: 48px; padding: 10px 4px; }
/* The real checkbox covers the whole row (a big target); the box is drawn. */
.kp-check input, .kp-mission input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.kp-box { width: 26px; height: 26px; border-radius: 8px; border: 2px solid var(--sage); background: var(--white); display: grid; place-items: center; color: var(--white); }
.kp-box svg { width: 16px; height: 16px; opacity: 0; }
input:checked + .kp-box { background: var(--fern); border-color: var(--fern); }
input:checked + .kp-box svg { opacity: 1; }
input:focus-visible + .kp-box { outline: 3px solid var(--fern-bright); outline-offset: 2px; }
.kp-why { padding: 10px 12px; border-radius: var(--r-card); background: var(--paper); }
.kp-why p { margin: 0; }
.kp-why__src { margin-top: 4px !important; font-size: var(--fs-label); color: var(--muted); }
.kp .btn span[aria-hidden], .kp .btn > span:first-child:empty { display: none; }
.kp .btn > span:first-child { display: inline-grid; width: 22px; height: 22px; }

/* ---------- motion ---------- */
@keyframes kd-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
@keyframes kd-bounce { 0% { transform: scale(1); } 40% { transform: scale(1.14); } 100% { transform: scale(1); } }
@keyframes kd-bounce-yard { 0% { transform: translate(-50%, -100%) scale(1); } 40% { transform: translate(-50%, -112%) scale(1.15); } 100% { transform: translate(-50%, -100%) scale(1); } }
@keyframes kd-wiggle { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(-7deg); } 40% { transform: rotate(6deg); } 60% { transform: rotate(-4deg); } 80% { transform: rotate(2deg); } }
@keyframes kd-pop-in { 0% { transform: scale(0.4); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes kd-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@keyframes kd-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes kd-popped { 0% { transform: scale(1); opacity: 1; } 60% { transform: scale(1.35); opacity: 0.6; } 100% { transform: scale(0.2); opacity: 0; } }
@keyframes kd-eaten { 0% { transform: none; } 100% { transform: translate(var(--fx, 0), var(--fy, -200px)) scale(0.2); opacity: 0; } }
@keyframes kd-listen { 0%, 100% { box-shadow: 0 8px 0 #a92e25, 0 0 0 0 rgba(224, 69, 58, 0.5); } 50% { box-shadow: 0 8px 0 #a92e25, 0 0 0 18px rgba(224, 69, 58, 0); } }
@keyframes kd-star { 0% { transform: scale(0) rotate(-90deg); } 100% { transform: scale(1) rotate(0); } }
@keyframes kd-sticker-in { 0% { transform: translateY(40px) scale(0.3) rotate(0); opacity: 0; } 100% { transform: rotate(var(--tilt, 0deg)); opacity: 1; } }
@keyframes kd-drop { 0% { transform: translate(-50%, -260%); opacity: 0; } 100% { transform: translate(-50%, -100%); opacity: 1; } }
@keyframes kd-glow { 0%, 100% { filter: drop-shadow(0 0 0 rgba(255, 212, 90, 0)); } 50% { filter: drop-shadow(0 0 8px rgba(255, 212, 90, 1)); } }
@keyframes kd-confetti { 0% { transform: translate(0, 0) rotate(0); opacity: 1; } 100% { transform: translate(var(--dx), calc(var(--dy) + 160px)) rotate(var(--r)); opacity: 0; } }
@keyframes kd-zzz { 0% { opacity: 0; transform: translate(0, 0) scale(0.6); } 20% { opacity: 1; } 100% { opacity: 0; transform: translate(18px, -40px) scale(1.2); } }
@media (prefers-reduced-motion: reduce) {
  .kd *, .kd *::before, .kd *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* ---------- tablets: everything a bit bigger ---------- */
@media (min-width: 700px) and (min-height: 700px) {
  .kd-guide { zoom: 1.35; }
  .kd-choice { max-width: 280px; }
  .kd-meet { width: 380px; }
  .kd-board { gap: 22px; }
  .kd-bigplay { zoom: 1.2; }
}

/* ---------- the doors into Vučko's world (Home and Learn) ---------- */
.action--kids { background: linear-gradient(135deg, #eaf7ff 0%, #f4fbe9 100%); border-color: #cfe6c2; }
.action__icon--kids { background: #fff; overflow: hidden; align-items: end; }
.action__icon--kids img { width: 74%; height: auto; image-rendering: pixelated; }
.lgame--kids { justify-content: flex-start; background: linear-gradient(180deg, #d6eeff 0%, #eef8ff 50%, #e1f3cf 100%); border-color: #c4dfee; box-shadow: 0 14px 24px -18px rgba(40, 90, 120, 0.7); transition: transform 0.15s ease; }
.lgame--kids:active { transform: scale(0.98); }
.lgame--kids .lgame__kicker { color: #2f6a86; text-transform: none; letter-spacing: 0; font-size: var(--fs-label); }
.lgame--kids .lgame__sub { color: #3d6275; padding-right: 72px; }
.lgame--kids .lgame__word { padding-right: 72px; }
.lgame__pup { position: absolute; right: 12px; bottom: 8px; }

/* ---------- Vučko ide u školu (6–8) ---------- */
.kd-class .kd-yard__bg { image-rendering: pixelated; }
/* the chalk board in classroom.png: letters the child has met, in chalk */
.kd-chalk { position: absolute; left: 30%; top: 17%; width: 44%; height: 35%; display: flex; flex-wrap: wrap; align-content: center; justify-content: center; gap: 0 2.6cqw; padding: 1cqw 2cqw; border-radius: 6px; }
.kd-chalk__l.is-on { color: #ffe58a; }
.kd-chalk__l, .kd-chalk__hi { display: inline-block; text-align: center; font-family: 'Comic Sans MS', 'Chalkboard SE', var(--serif); font-weight: 800; font-size: 6cqw; line-height: 1.15; color: rgba(255, 255, 255, 0.92); text-shadow: 0 0 2px rgba(255, 255, 255, 0.5); min-width: 4.4cqw; min-height: 6.4cqw; }
.kd-chalk__l.is-bounce { animation: kd-bounce 0.5s; }
.kd-class__pup { left: 84%; }
.kd-lbadge { display: grid; place-items: center; font-family: var(--serif); font-weight: 800; font-size: var(--fs-title); letter-spacing: 0.02em; line-height: 1; color: var(--ink); text-align: center; padding: 0 2px; }
.kd-lbadge--big { font-size: var(--fs-h1); }
.kd-unit__pic .kd-lbadge { width: 100%; height: 100%; border-radius: var(--r-card); background: #2f5b3f; color: #fff; font-size: var(--fs-body); }
.kd-unit.is-locked .kd-unit__pic .kd-lbadge { background: #5f6b62; }
.kd-bigplay__pic .kd-lbadge, .kd-intro__pic .kd-lbadge { width: 100%; height: 100%; background: #2f5b3f; color: #fff; }
.kd-letter { font-family: var(--serif); font-weight: 800; font-size: clamp(3rem, 14vw, 5.2rem); line-height: 1; color: var(--ink); }
.kd-choice--letter { padding: 6%; }
.kd-board--stack { grid-template-columns: 1fr; align-content: center; gap: 12px; }
.kd-board--stack > .kd-board { padding: 0; flex: none; width: 100%; }
.kd-round--sound { width: 60px; height: 60px; color: var(--fern); }
.kd-lmeet { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; }
.kd-lmeet__big { width: min(44vw, 190px); aspect-ratio: 1; border-radius: 32px; background: #2f5b3f; color: #fff; font-family: var(--serif); font-weight: 800; font-size: clamp(3.4rem, 16vw, 5.6rem); line-height: 1; box-shadow: 0 8px 0 #1f3d2a; display: grid; place-items: center; }
.kd-lmeet__word { width: min(40vw, 170px); aspect-ratio: 1; border-radius: var(--r-card); background: var(--card); box-shadow: 0 7px 0 color-mix(in srgb, var(--moss) 14%, transparent); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 10px; font-family: var(--serif); font-weight: 800; font-size: var(--fs-h1); }
.kd-lmeet__pic { width: 72%; height: auto; aspect-ratio: 1; }
.kd-lmeet__spelled { display: flex; gap: 0.02em; }
.kd-lmeet__spelled .is-on { color: #c0392b; text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 4px; }
.kd-board--lmeet { grid-template-columns: 1fr; }
.kd-meet--small { width: min(42vw, 170px); padding: 10px; }
/* building a word from tiles */
.kd-slots { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.kd-slot { width: 52px; height: 60px; border-radius: var(--r-btn); border: 3px dashed color-mix(in srgb, var(--moss) 35%, transparent); display: grid; place-items: center; font-family: var(--serif); font-weight: 800; font-size: var(--fs-display); color: var(--ink); background: rgba(255, 255, 255, 0.6); }
.kd-slot.is-filled { border-style: solid; border-color: #4caf50; background: var(--white); animation: kd-bounce 0.4s; }
.kd-tiles { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; max-width: 420px; }
.kd-tile { width: 60px; height: 64px; border-radius: var(--r-card); background: #fff6d6; box-shadow: 0 5px 0 #d9c37a; font-family: var(--serif); font-weight: 800; font-size: var(--fs-display); color: var(--ink); }
.kd-tile.is-used { visibility: hidden; }
.kd-tile.is-wrong { animation: kd-wiggle 0.5s; }
/* a written word to read */
.kd-written { display: flex; justify-content: center; gap: 0.04em; padding: 10px 22px; border-radius: var(--r-card); background: var(--white); box-shadow: 0 6px 0 color-mix(in srgb, var(--moss) 12%, transparent); font-family: var(--serif); font-weight: 800; font-size: clamp(2.2rem, 11vw, 3.4rem); line-height: 1.1; color: var(--ink); max-width: 100%; overflow-wrap: anywhere; }
.kd-written__l { border-radius: 8px; transition: background 0.15s; }
.kd-written__l.is-on { background: #ffe58a; }
.kd-written--still { margin: 0; }
.kd-written--word { font-size: clamp(1.9rem, 9vw, 2.8rem); }
/* a picture story */
.kd-board--story { grid-template-columns: 1fr; gap: 10px; }
.kd-story__title { margin: 0; font-family: var(--serif); font-weight: 800; font-size: var(--fs-h1); }
.kd-story__pics { display: flex; justify-content: center; align-items: flex-end; gap: 12px; min-height: 140px; }
.kd-story__pic, .kd-story__cover { width: min(34vw, 140px); aspect-ratio: 1; border-radius: var(--r-card); background: var(--card); box-shadow: 0 6px 0 color-mix(in srgb, var(--moss) 12%, transparent); display: grid; place-items: center; padding: 10px; }
.kd-story__pic .kd-pic, .kd-story__cover .kd-pic { width: 90%; height: 90%; }
.kd-story__text { margin: 0; max-width: 520px; text-align: center; font-family: var(--serif); font-weight: 800; font-size: clamp(1.35rem, 6vw, 1.8rem); line-height: 1.25; min-height: 2.6em; }
/* the letter album */
.kd-album__grid--letters { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); }
.kd-lcard { gap: 2px; padding: 8%; }
.kd-lcard__letter { font-family: var(--serif); font-weight: 800; font-size: var(--fs-h1); line-height: 1; color: var(--ink); }
.kd-lcard__pic { width: 54%; height: auto; aspect-ratio: 1; }
.kd-lcard.is-missing .kd-lcard__letter { color: color-mix(in srgb, var(--moss) 30%, transparent); }
.kd-lcard__star { position: absolute; top: 3px; right: 3px; width: 16px; height: 16px; color: #f2b01e; }
.kd-lcard.is-known .kd-lcard__letter { padding: 0 8px; }
.kd-lcard__star svg { width: 100%; height: 100%; }
.kd-done__stickers .kd-lcard { width: 84px; }

/* ---------- Putujemo Srbijom (9–12) ---------- */
.kt-mapbox { aspect-ratio: auto; background: linear-gradient(180deg, #e6f3ff, #f6fbef); padding: 4px 4px 0; }
.kt-map { display: block; width: 100%; height: auto; max-height: 52vh; }
.kt-route { fill: none; stroke: #a2483a; stroke-width: 4; stroke-dasharray: 2 10; stroke-linecap: round; opacity: 0.75; }
.kt-town circle { fill: #ffffff; stroke: var(--moss); stroke-width: 4; }
.kt-town text { font: 800 24px var(--serif, serif); fill: var(--moss); paint-order: stroke; stroke: rgba(255, 250, 240, 0.95); stroke-width: 6px; stroke-linejoin: round; }
.kt-town.is-done circle { fill: #4caf50; stroke: #2e7d32; }
.kt-check { fill: none; stroke: #ffffff; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.kt-town.is-now circle { fill: #ffd45a; stroke: #c88a0f; animation: kt-ping 1.6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes kt-ping { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.25); } }
.kt-mapbox__pup { left: auto; right: 2%; transform: none; }
.kt-mapbox__pup .mascot { --fw: 16cqw !important; width: 16cqw !important; height: calc(16cqw * 1.03) !important; }
.kt-bigplay { gap: 10px; }
.kt-bigplay__pic { border-radius: var(--r-card); }
.kt-bigplay__pic img { width: 100%; height: 100%; object-fit: cover; }
.kt-bigplay__name { font-family: var(--serif); font-weight: 800; font-size: var(--fs-title); color: var(--white); text-shadow: 0 2px 0 rgba(0, 0, 0, 0.2); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; text-align: left; }
.kt-unit__pic { position: relative; overflow: hidden; width: 86px; }
.kt-unit__pic img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--r-card); }
.kt-unit__name { position: absolute; left: 0; right: 0; bottom: 0; padding: 2px 4px; font-size: var(--fs-label); font-weight: 800; text-align: center; color: #fff; background: var(--moss); border-radius: 0 0 18px 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kd-unit.is-locked .kt-unit__pic img { filter: grayscale(0.9); }
/* the passport */
.kt-passport__title { margin: 0; font-family: var(--serif); font-size: var(--fs-h1); text-align: center; }
.kt-passport { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 14px; padding: 14px; border-radius: var(--r-card); background: #2d4a7a; box-shadow: 0 8px 0 #1d3157; }
.kd-stamp { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px; border-radius: var(--r-btn); background: var(--paper); border: 3px dashed #a2483a; transform: rotate(var(--tilt, 0deg)); }
.kd-stamp img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; }
.kd-stamp__name { font-weight: 800; font-size: var(--fs-small); color: #a2483a; text-transform: uppercase; letter-spacing: 0.04em; }
.kd-stamp.is-missing { background: rgba(255, 250, 240, 0.25); border-color: rgba(255, 255, 255, 0.45); }
.kd-stamp.is-missing img { filter: grayscale(1) opacity(0.25); }
.kd-stamp.is-missing .kd-stamp__name { color: rgba(255, 255, 255, 0.7); }
.kd-stamp.is-new { width: 150px; animation: kd-sticker-in 0.7s cubic-bezier(0.3, 1.6, 0.5, 1) both; animation-delay: var(--d, 0ms); }
.kd-bar__count--soft { font-size: var(--fs-body); color: var(--muted); margin-left: auto; }
/* the town's postcard and a new word */
.kt-postcard { width: min(86vw, 420px); border-radius: var(--r-card); background: var(--white); box-shadow: 0 8px 0 color-mix(in srgb, var(--moss) 14%, transparent); padding: 10px 10px 14px; display: flex; flex-direction: column; gap: 6px; align-items: center; }
.kt-postcard img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r-btn); }
.kt-postcard__name { font-family: var(--serif); font-weight: 800; font-size: var(--fs-h1); line-height: 1; }
.kt-postcard__title { font-weight: 800; color: var(--muted); }
.kt-word { width: min(78vw, 300px); border-radius: var(--r-card); background: var(--card); box-shadow: 0 8px 0 color-mix(in srgb, var(--moss) 14%, transparent); padding: 18px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.kt-word__pic { width: 50%; height: auto; aspect-ratio: 1; }
.kt-word__sr { font-family: var(--serif); font-weight: 800; font-size: clamp(2rem, 10vw, 2.8rem); line-height: 1.05; text-align: center; }
.kt-word__mean { margin: 0; font-weight: 800; color: var(--muted); font-size: var(--fs-body); text-align: center; }
.kd-board--texts { grid-template-columns: 1fr; gap: 10px; width: 100%; max-width: 440px; }
.kd-board--texts .kd-choice:last-child { grid-column: auto; width: 100%; }
.kd-choice--text { aspect-ratio: auto; max-width: none; min-height: 64px; padding: 12px 16px; border-radius: var(--r-card); }
.kt-mean { font-weight: 800; font-size: var(--fs-title); line-height: 1.2; text-align: center; }
/* a line of Serbian with "?" for what it means */
.kd-line { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; text-align: left; }
.kd-line__sr { font-weight: 800; font-size: var(--fs-title); line-height: 1.3; }
.kd-line__help { flex: none; width: 32px; height: 32px; border-radius: 50%; background: rgba(70, 93, 75, 0.12); color: var(--fern); font-weight: 800; }
.kd-line__mean { flex-basis: 100%; font-size: var(--fs-body); color: var(--muted); font-weight: 800; }
/* the conversation */
.kd-board--talk { grid-template-columns: 1fr; align-content: stretch; gap: 10px; }
.kt-talk__head { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-weight: 800; font-size: var(--fs-title); justify-self: start; }
.kt-talk__head img { width: 56px; height: 42px; object-fit: cover; border-radius: 8px; }
.kt-chat { width: 100%; min-height: 0; max-height: 42vh; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 4px 2px; }
.kt-msg { display: flex; align-items: flex-end; gap: 8px; max-width: 92%; }
.kt-msg__body { background: var(--white); border-radius: 18px 18px 18px 6px; padding: 8px 12px; box-shadow: 0 3px 0 color-mix(in srgb, var(--moss) 10%, transparent); }
.kt-msg__name { display: block; font-size: var(--fs-label); font-weight: 800; color: var(--muted); }
.kt-msg--me { align-self: flex-end; background: #dff3d2; border-radius: 18px 18px 6px 18px; padding: 8px 12px; box-shadow: 0 3px 0 color-mix(in srgb, var(--moss) 10%, transparent); }
.kt-face { flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--white); display: grid; place-items: center; overflow: hidden; box-shadow: 0 2px 0 color-mix(in srgb, var(--moss) 12%, transparent); }
.kt-face img { width: 90%; height: 90%; }
.kt-picks { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.kt-pick { min-height: 56px; padding: 10px 16px; border-radius: var(--r-card); background: #fff6d6; box-shadow: 0 5px 0 #d9c37a; font-weight: 800; font-size: var(--fs-body); text-align: left; color: var(--ink); }
.kt-pick.is-wrong { animation: kd-wiggle 0.5s; }
/* the secret word */
.kt-code { gap: 10px; }
.kt-secret { margin: 0; padding: 8px 20px; border-radius: var(--r-card); background: #2d4a7a; color: #fff; font-family: var(--serif); font-weight: 800; font-size: clamp(2rem, 10vw, 2.8rem); letter-spacing: 0.12em; box-shadow: 0 6px 0 #1d3157; }
.kt-key { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; font-size: var(--fs-title); color: var(--muted); }
.kt-key__pair b { color: var(--ink); font-family: var(--serif); font-size: var(--fs-title); }
.kt-reveal { margin: 0; font-size: var(--fs-title); font-weight: 800; text-align: center; }
.kt-reveal strong { font-family: var(--serif); font-size: var(--fs-h1); }
.kt-reveal__mean { color: var(--muted); }
/* Čika Vuk's story and the quiz question */
.kt-story { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 100%; max-width: 480px; }
.kt-story__card { width: min(70vw, 300px); aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r-card); box-shadow: 0 6px 0 color-mix(in srgb, var(--moss) 12%, transparent); }
.kt-story__line { background: var(--white); padding: 12px 14px; border-radius: var(--r-card); box-shadow: 0 4px 0 color-mix(in srgb, var(--moss) 10%, transparent); width: 100%; }
.kt-story__line .kd-line__sr { font-family: var(--serif); font-size: var(--fs-title); }
.kt-story__dots { display: flex; gap: 6px; }
.kt-story__dots i { width: 10px; height: 10px; border-radius: 50%; background: color-mix(in srgb, var(--moss) 20%, transparent); }
.kt-story__dots i.is-on { background: var(--fern); }
.kt-q { background: var(--white); padding: 12px 14px; border-radius: var(--r-card); box-shadow: 0 4px 0 color-mix(in srgb, var(--moss) 10%, transparent); width: 100%; max-width: 440px; }

/* the Parent corner: ages, worlds, letters */
.seg--ages { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.seg--stack { flex-direction: column; }
.seg--stack .seg__opt { text-align: left; justify-content: flex-start; }
.kp-letters { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 6px; }
.kp-letter { height: 44px; border-radius: var(--r-btn); display: grid; place-items: center; font-family: var(--serif); font-weight: 800; font-size: var(--fs-title); background: color-mix(in srgb, var(--moss) 6%, transparent); color: color-mix(in srgb, var(--moss) 35%, transparent); }
.kp-letter.is-met { background: var(--white); color: var(--moss); box-shadow: 0 2px 0 color-mix(in srgb, var(--moss) 10%, transparent); }
.kp-letter.is-known { background: #fff1c2; box-shadow: 0 2px 0 #e2c35e; }
.kp-word__pic--text { display: grid; place-items: center; border-radius: var(--r-btn); background: rgba(70, 93, 75, 0.1); font-family: var(--serif); font-weight: 800; font-size: var(--fs-title); color: var(--fern); }
