/* Kinuvio Kids – placeholder design for the skeleton; the designer replaces it (docs/DESIGN-BRIEF.md).
   Colours only through the tokens set by js/themes.js (applyTheme); the defaults below = default look "Kinuvio",
   neutral background, light (BASE.neutral.light) – shown for a moment before the script runs. */
:root {
  --bg: #F3F7F5; --surface: #FFFFFF; --surface2: #E4EEEA; --text: #11231E; --muted: #485D57; --line: #D4E1DC;
  --primary: #1F6F5F; --on-primary: #FFFFFF; --accent: #F2B544; --on-accent: #2A1E04;
  --danger: #B3261E; --on-danger: #FFFFFF;
  --radius: 20px; --tap: 52px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.5 var(--font); min-height: 100dvh; }
h1 { font-size: 28px; line-height: 1.2; margin: 6px 0 14px; }
h2 { font-size: 19px; margin: 0 0 10px; display: flex; align-items: center; gap: 8px; }
h3 { font-size: 16px; margin: 4px 0; }
p { margin: 0 0 8px; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: default; opacity: .55; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
[hidden] { display: none !important; }
.icon { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.muted, .hint, .status, .empty, .loading { color: var(--muted); }
.hint, .status { font-size: 15px; }
.center { text-align: center; }
.lead { font-size: 18px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--primary); color: var(--on-primary); padding: 10px 14px; border-radius: 12px; z-index: 50; }
.skip:focus { left: 8px; }

/* header */
.top { position: sticky; top: 0; z-index: 10; display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px; background: var(--bg); }
.me-chip { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 700; min-height: 48px; }
.avatar { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--surface2); font-size: 24px; }
.avatar.big { width: 72px; height: 72px; font-size: 44px; }
.home-button { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 16px; border-radius: 999px;
  background: var(--accent); color: var(--on-accent); font-weight: 800; text-decoration: none; }

/* layout */
main:focus, main:focus-visible { outline: none; } /* focused after each screen change for screen readers only */
.screen { max-width: 560px; margin: 0 auto; padding: 8px 16px calc(150px + env(safe-area-inset-bottom)); }
.screen-parovani, .screen-vitej { padding-top: calc(24px + env(safe-area-inset-top)); padding-bottom: 40px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 0 0 14px; }
.stack { display: grid; gap: 12px; margin-bottom: 14px; }
.stack > h2, .stack > h3 { margin: 0; }

/* tabs */
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.tabs a { display: grid; justify-items: center; gap: 2px; padding: 8px 2px; min-height: 64px; text-decoration: none; font-size: 13px; font-weight: 700; color: var(--muted); }
.tabs a.active { color: var(--primary); }
.tabs a.active .icon { stroke-width: 2.6; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: var(--tap); padding: 0 18px;
  border-radius: 16px; border: 2px solid transparent; background: var(--surface2); font-weight: 700; text-decoration: none; text-align: center; }
.btn.primary { background: var(--primary); color: var(--on-primary); }
.btn.ghost { background: transparent; border-color: var(--line); }
.btn.big { width: 100%; min-height: 58px; font-size: 19px; }
.btn.huge { width: 100%; min-height: 80px; font-size: 21px; margin-bottom: 12px; }
.btn.huge .icon { width: 30px; height: 30px; }
.btn.small { min-height: 44px; padding: 0 14px; font-size: 15px; }
.call-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.btn.call { min-height: 84px; background: var(--surface); border-color: var(--line); flex-direction: column; gap: 2px; font-size: 19px; }
.call-sub { font-size: 14px; font-weight: 600; color: var(--muted); }
.btn.sos { width: 100%; min-height: 64px; background: var(--danger); color: var(--on-danger); font-size: 24px; }
.card.danger { border-color: var(--danger); margin-top: 16px; }
.fab { position: fixed; right: 16px; bottom: calc(80px + env(safe-area-inset-bottom)); z-index: 11; display: inline-flex; align-items: center; gap: 8px;
  min-height: 56px; padding: 0 22px; border-radius: 999px; background: var(--primary); color: var(--on-primary); font-weight: 800; text-decoration: none;
  box-shadow: 0 6px 18px rgb(0 0 0 / 22%); }
.back { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; text-decoration: none; font-weight: 700; color: var(--muted); }

/* forms */
.label { font-weight: 700; }
.label.small { font-size: 15px; font-weight: 600; }
.input { width: 100%; min-height: 54px; padding: 0 14px; border-radius: 14px; border: 2px solid var(--line); background: var(--surface); color: var(--text); font: 18px var(--font); }
.input:focus { outline: 3px solid var(--primary); outline-offset: 1px; }
.input.code { text-align: center; font-size: 26px; letter-spacing: .25em; text-transform: uppercase; font-weight: 800; }
.big-input { text-align: center; font-size: 30px; font-weight: 800; }
.segmented { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; }
.segmented button { min-height: 50px; border-radius: 14px; border: 2px solid var(--line); background: var(--surface); font-weight: 700; padding: 0 8px; }
.segmented button[aria-pressed="true"] { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.kinds { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.kind { display: grid; justify-items: center; gap: 4px; min-height: 76px; padding: 10px; border-radius: 16px; border: 2px solid var(--line); background: var(--surface); font-weight: 700; }
.kind.on { border-color: var(--primary); background: var(--surface2); }
.kind .icon { width: 28px; height: 28px; }

/* chips, lists */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.stack .chips { margin-bottom: 0; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 6px 14px; border-radius: 999px; background: var(--surface2); border: 0; font-size: 15px; }
.chip.pick { min-height: 44px; font-weight: 600; }
.items { list-style: none; margin: 0; padding: 0; }
.item { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.item:last-child { border-bottom: 0; }
.item-text { display: grid; flex: 1; min-width: 0; }
.item-title { font-weight: 650; overflow-wrap: anywhere; }
.item-meta { font-size: 14px; color: var(--muted); }
.item.done .item-title { text-decoration: line-through; color: var(--muted); }
.tick { display: inline-grid; place-items: center; width: 46px; height: 46px; flex: none; border-radius: 50%; border: 2.5px solid var(--primary); background: var(--surface); color: transparent; }
.tick[aria-pressed="true"] { background: var(--primary); color: var(--on-primary); }
.tick.passive { border: 0; background: var(--surface2); color: var(--text); }
.lessons { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.lessons li { display: flex; gap: 14px; font-size: 18px; }
.time { color: var(--muted); font-variant-numeric: tabular-nums; min-width: 3.4em; }
.big-line { font-size: 22px; margin: 0; }
.points-card { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; background: var(--accent); color: var(--on-accent); border-color: transparent; }
details summary { min-height: 44px; display: flex; align-items: center; font-weight: 700; cursor: pointer; }
.plain { margin: 0; padding-left: 20px; display: grid; gap: 4px; }

/* looks */
.looks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.look { position: relative; display: grid; justify-items: center; gap: 6px; padding: 14px 6px; border-radius: 18px; border: 2px solid var(--line); background: var(--surface); }
.look.selected { border: 3px solid var(--primary); background: var(--surface2); }
.look.wide { grid-template-columns: auto 1fr auto; justify-items: start; align-items: center; padding: 14px 16px; width: 100%; }
.look-emoji { font-size: 30px; line-height: 1; }
.look-name { font-weight: 800; }
.look-check { position: absolute; top: 6px; right: 6px; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--primary); color: var(--on-primary); }
.look-check .icon { width: 16px; height: 16px; }
.swatches { display: flex; gap: 4px; }
.sw { display: inline-block; width: 22px; height: 22px; border-radius: 50%; background: var(--sw, var(--line)); border: 1px solid rgb(0 0 0 / 15%); }
.sw.big { width: 44px; height: 44px; padding: 0; }
.sw.on { outline: 3px solid var(--text); outline-offset: 2px; }
.palette { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; justify-items: center; }
.avatars { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 8px; }
.avatar-pick { aspect-ratio: 1; min-width: 0; min-height: 48px; padding: 0; border-radius: 14px; border: 2px solid var(--line); background: var(--surface); font-size: 28px; }
.avatar-pick.on { border: 3px solid var(--primary); background: var(--surface2); }

/* pairing */
.hero { text-align: center; margin: 10px 0 18px; }
.hero-art { font-size: 64px; line-height: 1.1; }
.hero-logo img { display: block; width: min(280px, 78%); height: auto; margin: 0 auto 18px; }
.steps { padding-left: 38px; display: grid; gap: 8px; }

/* learning */
.set-list { display: grid; gap: 10px; }
.set { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; min-height: 64px; }
.set-emoji { font-size: 30px; }
.set-text { display: grid; flex: 1; }
.set-text .muted { font-size: 14px; }
.meter { width: 64px; height: 10px; border-radius: 999px; background: var(--surface2); overflow: hidden; flex: none; }
.meter-fill { display: block; height: 100%; width: var(--pct, 0%); background: var(--primary); }
.timer { font-size: 52px; font-weight: 800; text-align: center; font-variant-numeric: tabular-nums; margin: 0; }
.flash { text-align: center; display: grid; gap: 16px; padding: 22px 16px; }
.flash-front { font-size: 34px; font-weight: 800; letter-spacing: .02em; margin: 6px 0; }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.btn.choice { min-height: 68px; font-size: 22px; background: var(--surface2); border-color: var(--line); }
.flash-back { display: grid; gap: 8px; }
.flash-answer { font-size: 28px; font-weight: 800; margin: 0; }
.ok, .ko { font-weight: 800; font-size: 19px; margin: 0; }
.guide { padding-left: 40px; display: grid; gap: 10px; font-size: 18px; }
.done-card { text-align: center; display: grid; gap: 12px; }

/* rewards, me */
.points-big { text-align: center; display: grid; justify-items: center; gap: 4px; }
.points-big .icon { width: 44px; height: 44px; color: var(--primary); }
.points-big strong { font-size: 32px; }
.rewards { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.reward { display: flex; align-items: center; gap: 12px; margin: 0; }
.reward-emoji { font-size: 34px; }
.reward-text { display: grid; flex: 1; }
.badge { padding: 6px 12px; border-radius: 999px; background: var(--surface2); font-size: 14px; font-weight: 700; }
.me-card { display: flex; align-items: center; gap: 16px; }
.me-card h1 { margin: 0; }
.row-link { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.row-link > span { display: grid; }

/* toast */
#toast { position: fixed; left: 50%; bottom: calc(150px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); z-index: 20; max-width: calc(100% - 32px);
  padding: 12px 20px; border-radius: 20px; background: var(--text); color: var(--bg); font-weight: 700; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
  white-space: pre-line; text-align: center; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
@media (min-width: 700px) { .tabs { left: 50%; right: auto; width: 560px; transform: translateX(-50%); border: 1px solid var(--line); border-bottom: 0; border-radius: 20px 20px 0 0; } }

/* Angličtina s obrázky (Memorary style) – pictures are emoji placeholders until the designer draws them */
.feature-card { display: flex; align-items: center; gap: 14px; text-decoration: none; background: var(--surface2); }
.feature-card > span:last-child { display: grid; }
.feature-pic { font-size: 30px; letter-spacing: -4px; }
.topic-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.topic { display: grid; justify-items: center; gap: 4px; padding: 16px 8px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; text-align: center; }
.topic-pic { font-size: 48px; line-height: 1.1; }
.small { font-size: 14px; }
.word-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-bottom: 18px; }
.word { display: grid; justify-items: center; gap: 4px; padding: 14px 8px 12px; border-radius: 18px; border: 2px solid var(--line); background: var(--surface); }
.word-pic { font-size: 56px; line-height: 1.15; }
.word-pic.big { font-size: 96px; text-align: center; }
.word-en { font-size: 21px; font-weight: 800; }
.word.pop, .speak.pop { animation: pop .35s ease; }
@keyframes pop { 50% { transform: scale(1.08); } }
.mode-list { display: grid; gap: 10px; }
.speak { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--accent); color: var(--on-accent); vertical-align: middle; }
.word-ask { font-size: 34px; font-weight: 800; margin: 4px 0; display: flex; justify-content: center; align-items: center; gap: 12px; }
.pic-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pic-choice { min-height: 110px; border-radius: 18px; border: 2px solid var(--line); background: var(--surface2); font-size: 60px; }
.pic-choice.right, .btn.choice.right { border: 3px solid var(--primary); }
.pic-choice.wrong, .btn.choice.wrong { opacity: .55; }

/* ---- Kids 1: default look, welcome, shop, badges, album, pexeso (placeholders – the designer replaces them) ---- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.hero-logo .logo-dark { display: none; }
:root[data-mode="dark"] .hero-logo .logo-light { display: none; }
:root[data-mode="dark"] .hero-logo .logo-dark { display: block; }
.avatar.huge { width: 112px; height: 112px; font-size: 68px; margin: 0 auto 10px; }
.welcome-list { list-style: none; display: grid; gap: 14px; }
.welcome-list li { display: flex; gap: 12px; align-items: flex-start; font-size: 18px; }
.welcome-list .icon { color: var(--primary); margin-top: 3px; }

/* avatar frames – bought in the shop (frame:gold, frame:rainbow, frame:leaves) */
.avatar.frame { margin: 4px; box-shadow: 0 0 0 3px var(--surface), 0 0 0 6px var(--frame, var(--primary)); }
.avatar.frame-gold { --frame: #C9971C; }
.avatar.frame-leaves { --frame: #3A9A55; }
.avatar.frame-rainbow { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px #E0453C, 0 0 0 7px #F2B544, 0 0 0 9px #3A9A55, 0 0 0 11px #3B7DD8; margin: 8px; }

/* level and shop */
.level-card { display: grid; gap: 8px; }
.level-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.level-badge, .points-pill { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 20px; }
.level-badge .icon, .points-pill .icon { color: var(--primary); width: 26px; height: 26px; }
.meter.wide { display: block; width: 100%; height: 14px; }
.level-card p { margin: 0; }
.tabs-inline { margin-bottom: 16px; }
.tabs-inline a { display: grid; place-items: center; min-height: 52px; padding: 4px 6px; border-radius: 14px; border: 2px solid var(--line);
  background: var(--surface); font-weight: 700; font-size: 15px; line-height: 1.2; text-align: center; text-decoration: none; }
.tabs-inline a[aria-current="page"] { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.shop-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.shop-item { display: flex; align-items: center; gap: 12px; margin: 0; padding: 12px; }
.shop-pic { display: grid; place-items: center; gap: 4px; width: 64px; min-height: 56px; flex: none; font-size: 34px; line-height: 1; }
.shop-pic .swatches .sw { width: 14px; height: 14px; }
.shop-pic.big { width: auto; font-size: 64px; margin: 0 auto; }
.shop-pic.big .avatar { width: 72px; height: 72px; font-size: 44px; }
.shop-item.state-need_level .shop-pic { filter: grayscale(1); opacity: .6; }
.shop-text { display: grid; flex: 1; min-width: 0; }
.shop-action { flex: none; display: flex; max-width: 50%; }
.shop-action .btn.small { white-space: normal; line-height: 1.2; padding: 6px 12px; }
.chip.on { font-weight: 700; }
.chip .icon { width: 18px; height: 18px; }
.locked-row { min-height: 48px; color: var(--muted); font-weight: 600; }
.set.locked .icon { color: var(--muted); }
.sheet { width: 100%; max-width: 560px; margin: auto auto 0; padding: 22px 16px calc(22px + env(safe-area-inset-bottom)); border: 0;
  border-radius: 24px 24px 0 0; background: var(--surface); color: var(--text); }
.sheet::backdrop { background: rgb(0 0 0 / 45%); }
.sheet h2 { justify-content: center; text-align: center; }

/* badges and the sticker album */
.badge-grid, .album { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.badge-tile { display: grid; justify-items: center; align-content: start; gap: 4px; padding: 14px 10px; border-radius: 18px; border: 2px dashed var(--line);
  background: var(--surface); text-align: center; }
.badge-tile.earned { border: 2px solid var(--primary); background: var(--surface2); }
.badge-pic { font-size: 40px; line-height: 1.1; filter: grayscale(1); opacity: .45; }
.badge-tile.earned .badge-pic { filter: none; opacity: 1; }
.album { grid-template-columns: repeat(3, 1fr); }
.sticker { display: grid; justify-items: center; gap: 2px; padding: 10px 4px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface);
  font-size: 40px; line-height: 1.1; text-align: center; }
.sticker .small { font-size: 14px; line-height: 1.3; }
.sticker.empty { border: 2px dashed var(--line); color: var(--muted); font-size: 30px; }

/* pexeso */
.memo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.memo { display: grid; place-items: center; aspect-ratio: 4 / 5; min-height: 88px; padding: 4px; border-radius: 16px; border: 2px solid var(--primary);
  background: var(--primary); color: var(--on-primary); }
.memo.up { background: var(--surface); color: var(--text); border-color: var(--line); }
.memo.found { background: var(--surface2); border-color: var(--primary); }
.memo-back { font-size: 30px; }
.memo-pic { font-size: 48px; line-height: 1; }
.memo-word { font-size: 19px; font-weight: 800; overflow-wrap: anywhere; }

/* "Hvězdičky při splnění" – bought in the shop */
.celebrate { position: fixed; left: 50%; top: 45%; z-index: 30; pointer-events: none; }
.celebrate span { position: absolute; left: 0; top: 0; font-size: 26px; color: var(--accent); animation: burst 1.2s ease-out forwards; }
@keyframes burst {
  from { opacity: 1; transform: translate(-50%, -50%) rotate(var(--a)) translateY(0) scale(.6); }
  to { opacity: 0; transform: translate(-50%, -50%) rotate(var(--a)) translateY(calc(-1 * var(--d))) scale(1.1); }
}
@media (prefers-reduced-motion: reduce) {
  .celebrate span { animation: none; opacity: 0; }
  .celebrate span:first-child { opacity: 1; font-size: 64px; transform: translate(-50%, -50%); }
}
