/* Barvy Svobodné školy Přerov: #FFB436 (hlavní), #6FFBD2, #D88CFF, #5837FF */
:root {
  --bg: #fbf8f3;
  --surface: #ffffff;
  --surface-2: #f3eee6;
  --border: #e6dfd3;
  --text: #1d1a16;
  --muted: #625b52;
  --primary: #ffb436;
  --primary-hover: #f5a31a;
  --on-primary: #1a1200;
  --accent: #5837ff;
  --mint: #6ffbd2;
  --lilac: #d88cff;
  --mint-soft: #e2fbf3;
  --lilac-soft: #f6e9ff;
  --ok: #17784b;
  --ok-soft: #e3f5ea;
  --bad: #c2353b;
  --bad-soft: #fdecec;
  --radius: 18px;
  --shadow: 0 1px 2px rgb(40 30 10 / .06), 0 6px 24px rgb(40 30 10 / .06);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #131210;
    --surface: #1d1b18;
    --surface-2: #27241f;
    --border: #38342d;
    --text: #f1ede7;
    --muted: #a8a197;
    --primary-hover: #ffc35e;
    --accent: #a796ff;
    --mint-soft: #16332b;
    --lilac-soft: #2d2036;
    --ok: #4cc98a;
    --ok-soft: #173426;
    --bad: #f2676c;
    --bad-soft: #3b1d20;
    --shadow: 0 1px 2px rgb(0 0 0 / .3);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #131210; --surface: #1d1b18; --surface-2: #27241f; --border: #38342d;
  --text: #f1ede7; --muted: #a8a197; --primary-hover: #ffc35e; --accent: #a796ff;
  --mint-soft: #16332b; --lilac-soft: #2d2036; --ok: #4cc98a; --ok-soft: #173426;
  --bad: #f2676c; --bad-soft: #3b1d20; --shadow: 0 1px 2px rgb(0 0 0 / .3); color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.55 Nunito, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--accent); }
h1 { font-size: clamp(1.7rem, 4vw, 2.5rem); line-height: 1.15; margin: .2em 0 .4em; letter-spacing: -.01em; }
h2 { font-size: 1.25rem; margin: 0 0 .6em; }
.wrap { max-width: 1080px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 8px; z-index: 10; background: var(--surface); padding: 8px 12px; border-radius: 8px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }

/* Hlavička */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.top-inner { display: flex; align-items: center; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.brand img { height: 46px; width: auto; aspect-ratio: 480 / 279; max-width: none; flex: none; }
@media (max-width: 480px) { .brand img { height: 38px; } }
.brand span { display: flex; flex-direction: column; line-height: 1.15; }
.brand small { color: var(--muted); font-size: .78rem; }
.nav { display: flex; gap: 4px; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { padding: 8px 12px; border-radius: 999px; text-decoration: none; color: var(--text); font-weight: 600; white-space: nowrap; font-size: .95rem; }
.nav a:hover { background: var(--surface-2); }
.nav a[aria-current="page"] { background: var(--primary); color: var(--on-primary); }
@media (max-width: 760px) {
  .top-inner { padding-top: 8px; gap: 6px; }
  .nav { margin: 0 -16px; padding: 0 16px 8px; width: calc(100% + 32px); }
}

main { padding-top: 28px; padding-bottom: 40px; outline: none; }
.lead { font-size: 1.08rem; color: var(--muted); max-width: 64ch; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-weight: 800; font-size: .8rem; color: var(--accent); margin: 0; }
.section-title { margin-top: 2.2em; }
.note { color: var(--muted); font-size: .92rem; }

/* Tlačítka */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 11px 20px; border-radius: 999px; border: 2px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; }
.btn:hover { border-color: var(--muted); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn:disabled { opacity: .5; cursor: default; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); text-decoration: underline; cursor: pointer; }

/* Úvod */
.hero { display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; align-items: center; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
@media (max-width: 820px) { .hero { grid-template-columns: 1fr; } }
.countdowns { display: grid; gap: 12px; }
.count { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); display: flex; align-items: center; gap: 16px; }
.count:nth-child(1) { border-left: 6px solid var(--primary); }
.count:nth-child(2) { border-left: 6px solid var(--lilac); }
.count:nth-child(3) { border-left: 6px solid var(--mint); }
.count b { font-size: 2rem; line-height: 1; min-width: 3.2ch; text-align: right; font-variant-numeric: tabular-nums; }
.count div { display: flex; flex-direction: column; }
.count small { color: var(--muted); }
.tag { display: inline-block; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; background: var(--surface-2); color: var(--muted); padding: 1px 7px; border-radius: 999px; margin-left: 6px; vertical-align: middle; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; }
.stat b { display: block; font-size: 1.9rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: .92rem; }

.timeline { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.timeline li { display: grid; grid-template-columns: 170px 1fr; gap: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 18px; }
@media (max-width: 600px) { .timeline li { grid-template-columns: 1fr; gap: 4px; } }

/* Karty a mřížky */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); min-width: 0; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 16px; align-items: start; }

/* Výběr témat */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 18px; }
.chip { border: 2px solid var(--border); background: var(--surface); color: var(--text); padding: 6px 14px; border-radius: 999px; font: inherit; font-size: .92rem; font-weight: 700; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--lilac-soft); border-color: var(--lilac); }

/* Procvičování */
.practice { max-width: 760px; }
.qmeta { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: .9rem; font-weight: 700; margin-bottom: 8px; flex-wrap: wrap; }
.question { font-size: 1.3rem; font-weight: 700; margin: 4px 0 18px; line-height: 1.45; }
.answer-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.answer-row input { font: inherit; font-size: 1.2rem; padding: 10px 14px; border-radius: 12px; border: 2px solid var(--border); background: var(--bg); color: var(--text); width: 200px; max-width: 100%; }
.answer-row input:focus { border-color: var(--accent); outline: none; }
.unit { font-weight: 700; }
.options { display: grid; gap: 8px; }
.option { text-align: left; font: inherit; padding: 12px 16px; border-radius: 12px; border: 2px solid var(--border); background: var(--bg); color: var(--text); cursor: pointer; }
.option:hover:not(:disabled) { border-color: var(--accent); }
.option:disabled { cursor: default; }
.option.correct { border-color: var(--ok); background: var(--ok-soft); }
.option.wrong { border-color: var(--bad); background: var(--bad-soft); }
.option.chosen { border-color: var(--accent); }
.feedback { margin-top: 16px; border-radius: 12px; padding: 12px 16px; }
.feedback:empty { display: none; }
.feedback.ok { background: var(--ok-soft); }
.feedback.bad { background: var(--bad-soft); }
.feedback strong { display: block; margin-bottom: 4px; }
.steps { margin: 6px 0 0; padding-left: 1.2em; }
.next-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 18px; flex-wrap: wrap; }
.score { color: var(--muted); font-weight: 700; }

.frac { display: inline-flex; flex-direction: column; align-items: center; vertical-align: middle; font-size: .9em; line-height: 1.05; margin: 0 .1em; }
.frac > span:first-child { border-bottom: 2px solid currentColor; padding: 0 .2em; }
.frac > span:last-child { padding: 0 .2em; }

/* Témata */
.topic-list { list-style: none; padding: 0; margin: 0; }
.topic-list li { border-top: 1px solid var(--border); }
.topic-list label { display: flex; align-items: center; gap: 12px; padding: 9px 2px; cursor: pointer; }
.topic-list input { width: 22px; height: 22px; accent-color: var(--ok); flex: none; }
.progress { height: 10px; background: var(--surface-2); border-radius: 999px; overflow: hidden; margin: 6px 0 14px; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), var(--lilac)); border-radius: inherit; transition: width .3s; }

/* Taháky */
.sheet { width: 100%; border-collapse: collapse; font-size: .96rem; }
.sheet th, .sheet td { text-align: left; vertical-align: top; padding: 7px 6px; border-top: 1px solid var(--border); }
.sheet th { width: 36%; font-weight: 700; }
.vyjm { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 0; }
.vyjm dt { font-weight: 800; background: var(--primary); color: var(--on-primary); border-radius: 8px; width: 30px; height: 30px; display: grid; place-items: center; }
.vyjm dd { margin: 0; padding-top: 2px; }
.checklist, .links, .dates { padding-left: 1.2em; margin: 0; }
.checklist li, .links li, .dates li { margin: 6px 0; }

/* Test */
.test-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; position: sticky; top: 72px; z-index: 2; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 8px 8px 8px 20px; margin-bottom: 16px; box-shadow: var(--shadow); }
@media (max-width: 760px) { .test-head { top: 104px; } }
.timer { font-size: 1.3rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.timer.low { color: var(--bad); }
.test-q { margin-bottom: 14px; }
.test-q .question { font-size: 1.1rem; }
.result-big { font-size: 3rem; font-weight: 800; line-height: 1; }
.review li { margin: 10px 0; }
.review .ok { color: var(--ok); font-weight: 700; }
.review .bad { color: var(--bad); font-weight: 700; }
.history { list-style: none; padding: 0; }
.history li { display: flex; justify-content: space-between; border-top: 1px solid var(--border); padding: 6px 0; }

.foot { color: var(--muted); font-size: .9rem; padding-bottom: 32px; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
label.option { display: flex; gap: 8px; align-items: center; }
label.option input { accent-color: var(--accent); width: 18px; height: 18px; flex: none; }
label.option:has(input:checked) { border-color: var(--accent); background: var(--lilac-soft); }
fieldset.test-q { margin: 0 0 14px; }

/* Testy CERMAT */
.cermat { display: flex; gap: 24px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-top: 32px; background: var(--mint-soft); border-color: color-mix(in srgb, var(--mint) 60%, var(--border)); }
.cermat > div { flex: 1 1 420px; min-width: 0; }
.cermat p { margin-top: 0; }
.steps-list { margin: 0; padding-left: 1.3em; display: grid; gap: 4px; }
.form-grid { display: grid; gap: 12px; margin-bottom: 16px; }
.form-grid label { display: grid; gap: 4px; font-weight: 700; font-size: .95rem; }
.form-grid input, .form-grid select { font: inherit; font-weight: 400; padding: 9px 12px; border-radius: 10px; border: 2px solid var(--border); background: var(--bg); color: var(--text); width: 100%; }
.form-grid input:focus, .form-grid select:focus { border-color: var(--accent); outline: none; }
#cermat-log h3 { margin: 0 0 8px; font-size: 1.05rem; }
#cermat-log h3:not(:first-child) { margin-top: 18px; }
.bars { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.bars li { display: grid; grid-template-columns: minmax(0, 1.3fr) 1fr auto auto; gap: 10px; align-items: center; }
.bar-label { display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; font-size: .92rem; line-height: 1.25; }
.bar-label small { color: var(--muted); }
.bar { height: 12px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.bar > span { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), var(--lilac)); border-radius: inherit; }
.bars b { font-variant-numeric: tabular-nums; min-width: 2ch; text-align: right; }
.del { font-size: .85rem; color: var(--muted); }
@media (max-width: 480px) { .bars li { grid-template-columns: 1fr auto auto; } .bar { grid-column: 1 / -1; grid-row: 2; } }

.cermat-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.btn-small { padding: 6px 14px; font-size: .9rem; }
.next-test { margin: 0 0 14px; }
.years { display: grid; gap: 10px; }
.year { padding: 0; box-shadow: none; }
.year summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 20px; cursor: pointer; font-weight: 800; font-size: 1.15rem; list-style: none; }
.year summary::-webkit-details-marker { display: none; }
.year summary::before { content: '▸'; color: var(--muted); margin-right: -4px; transition: transform .15s; }
.year[open] summary::before { transform: rotate(90deg); }
.year summary span:first-of-type { flex: 1; }
.year summary .note { font-weight: 600; font-size: .9rem; }
.test-rows { list-style: none; margin: 0; padding: 0 20px 10px; }
.test-rows li { display: grid; grid-template-columns: 170px 1fr auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--border); }
.tname { font-weight: 700; }
.pdfs { display: flex; flex-wrap: wrap; gap: 6px; }
.pdf { font-size: .88rem; font-weight: 700; text-decoration: none; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); color: var(--text); }
.pdf:hover { background: var(--lilac-soft); }
.pdf:first-child { background: var(--primary); color: var(--on-primary); }
.done-badge { font-weight: 800; color: var(--ok); background: var(--ok-soft); padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { .year summary::before { transition: none; } }
@media (max-width: 640px) { .test-rows li { grid-template-columns: 1fr auto; } .pdfs { grid-column: 1 / -1; grid-row: 2; } }

/* Obtížnost a náročnější úlohy */
.segmented { display: inline-flex; flex-wrap: nowrap; max-width: 100%; gap: 4px; padding: 4px; background: var(--surface-2); border-radius: 999px; margin-top: 4px; }
.seg { border: 0; background: transparent; color: var(--text); font: inherit; font-weight: 700; padding: 8px 16px; border-radius: 999px; cursor: pointer; }
.seg[aria-pressed="true"] { background: var(--primary); color: var(--on-primary); }
#math-level-note { margin: 8px 0 0; }
.answer-row input.wide { width: 320px; }
.hint { margin: 10px 0 0; }
.frac.big { font-size: 1em; margin: 0 .2em; }
.frac.big > span { padding: .15em .35em; }
.question { overflow-wrap: anywhere; }
@media (max-width: 480px) { .seg { padding: 8px 12px; font-size: .92rem; white-space: nowrap; } .answer-row input.wide { width: 100%; } }

/* Větné členy */
#cz-tabs { margin: 4px 0 12px; flex-wrap: wrap; border-radius: 20px; }
#vc-mode { margin-bottom: 16px; }
.vc-task { margin: 4px 0 14px; }
.vc-pens { margin-bottom: 14px; }
.vc-sentence { font-size: 1.35rem; font-weight: 700; line-height: 2.4; margin: 6px 0 14px; display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: flex-end; }
.vc-w { display: inline-block; }
.vc-click { font: inherit; color: var(--text); background: var(--bg); border: 2px solid var(--border); border-radius: 10px; padding: 0 10px; line-height: 2; cursor: pointer; text-underline-offset: 6px; text-decoration-thickness: 3px; }
.vc-click:hover:not(:disabled) { border-color: var(--accent); }
.vc-click:disabled { cursor: default; }
.vc-click[data-mark="Po"] { text-decoration: underline solid var(--accent); background: var(--lilac-soft); border-color: var(--lilac); }
.vc-click[data-mark="Př"] { text-decoration: underline wavy var(--primary-hover); background: color-mix(in srgb, var(--primary) 22%, var(--surface)); border-color: var(--primary); }
.vc-target { background: var(--primary); color: var(--on-primary); border-radius: 8px; padding: 0 8px; line-height: 2; }
.vc-nev { display: flex; gap: 8px; align-items: center; font-weight: 700; margin-bottom: 14px; cursor: pointer; }
.vc-nev input { width: 20px; height: 20px; accent-color: var(--accent); }
.vc-analysis { font-size: 1.05rem; line-height: 1.3; gap: 8px 10px; margin: 6px 0; }
.vc-analysis .vc-w { display: inline-flex; flex-direction: column; align-items: center; }
.vc-analysis small { font-size: .75rem; font-weight: 800; color: var(--accent); min-height: 1em; }
.vc-analysis .vc-Po > span { text-decoration: underline solid var(--accent); text-underline-offset: 4px; }
.vc-analysis .vc-Př > span { text-decoration: underline wavy var(--primary-hover); text-underline-offset: 4px; }
.feedback p { margin: 6px 0; }
@media (max-width: 480px) { .vc-sentence { font-size: 1.15rem; } }

/* Práce s textem */
.texty-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.texty-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.ukazka { position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow: auto; }
.ukazka h2 { margin-top: 4px; }
.ukazka p { line-height: 1.7; max-width: 65ch; }
.ukazka.basen p { font-style: italic; line-height: 1.9; }
.texty-q { display: grid; gap: 12px; }
.tq .question { font-size: 1.05rem; margin-bottom: 12px; }
.texty-score { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; font-weight: 700; }
@media (max-width: 860px) { .texty-grid { grid-template-columns: 1fr; } .ukazka { position: static; max-height: none; } }

/* Účet a instalace aplikace */
.account { display: flex; align-items: center; }
.account:empty { display: none; }
.acc-menu { position: relative; }
.acc-chip { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; background: var(--surface-2); font-weight: 700; font-size: .92rem; max-width: 180px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acc-chip::-webkit-details-marker { display: none; }
.acc-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); flex: none; }
.acc-dot.warn { background: var(--primary); }
.acc-pop { position: absolute; right: 0; top: calc(100% + 8px); width: min(320px, calc(100vw - 32px)); z-index: 20; }
.acc-pop p { margin: 0 0 10px; overflow-wrap: anywhere; }
.acc-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
#acc-status.bad { color: var(--bad); }
.install-card { display: flex; gap: 20px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-top: 24px; background: var(--lilac-soft); border-color: color-mix(in srgb, var(--lilac) 50%, var(--border)); }
.install-card > div:first-child { flex: 1 1 380px; min-width: 0; }
.install-card h2 { margin-bottom: 4px; }
.install-card p { margin: 0; }
.install-how { flex: 0 1 auto; max-width: 420px; }
@media (max-width: 760px) { .account { margin-left: auto; } .top-inner .nav { order: 3; } }

/* Obrázky v úlohách */
.fig { margin: 4px 0 14px; max-width: 420px; }
.fig svg { width: 100%; height: auto; display: block; overflow: visible; }
.fig-line { fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linejoin: round; }
.fig-fill { fill: color-mix(in srgb, var(--primary) 35%, var(--surface)); stroke: currentColor; stroke-width: 2.5; stroke-linejoin: round; }
.fig-grid { stroke: var(--border); stroke-width: 1; }
.fig-arc { fill: none; stroke: var(--accent); stroke-width: 2; }
.fig-zero { stroke: var(--muted); stroke-width: 1.5; }
.fig-bar { fill: var(--primary); }
.fig-plot { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linejoin: round; }
.fig-dot { fill: var(--accent); }
.fig-t { fill: currentColor; font: 700 15px Nunito, system-ui, sans-serif; }
.fig-s { font-size: 12px; font-weight: 600; fill: var(--muted); }
.fig-v { fill: var(--accent); }
.fig-q { fill: var(--bad); font-size: 18px; }
.fig-table { border-collapse: collapse; margin: 6px 0 14px; font-size: 1rem; font-weight: 600; max-width: 100%; display: block; overflow-x: auto; }
.fig-table th, .fig-table td { border: 1px solid var(--border); padding: 6px 12px; text-align: center; }
.fig-table th { text-align: left; background: var(--surface-2); font-weight: 700; }
.question .fig, .question .fig-table { font-size: 1rem; }

/* ANO/NE a přiřazování */
.anone { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.anone li { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding: 8px 0; border-top: 1px solid var(--border); }
.anone-btns { display: flex; gap: 6px; }
.anone-btns .option { padding: 6px 14px; font-weight: 700; }
.prirazeni { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 10px; }
.prirazeni li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px 12px; align-items: center; }
.prirazeni select { font: inherit; padding: 8px 10px; border-radius: 10px; border: 2px solid var(--border); background: var(--bg); color: var(--text); width: 100%; }
.pr-res { grid-column: 1 / -1; font-weight: 700; font-size: .92rem; }
.pr-res:empty { display: none; }
.pr-res.ok { color: var(--ok); } .pr-res.bad { color: var(--bad); }
@media (max-width: 560px) { .anone li, .prirazeni li { grid-template-columns: 1fr; } }

/* Doplňovačky */
.dopl-text { font-size: 1.2rem; line-height: 2.6; margin: 10px 0 18px; }
.gap { display: inline-flex; gap: 2px; padding: 2px; margin: 0 2px; border-radius: 10px; background: var(--surface-2); vertical-align: baseline; }
.gap button { font: inherit; font-weight: 800; font-size: 1rem; line-height: 1.6; min-width: 2em; padding: 0 8px; border: 2px solid transparent; border-radius: 8px; background: var(--surface); color: var(--text); cursor: pointer; }
.gap button:hover:not(:disabled) { border-color: var(--accent); }
.gap button.sel { background: var(--accent); color: var(--surface); }
.gap button:disabled { cursor: default; opacity: .55; }
.gap button.right { opacity: 1; background: var(--ok-soft); color: var(--ok); border-color: var(--ok); }
.gap.gap-bad { background: var(--bad-soft); outline: 2px solid var(--bad); }
.gap.gap-ok { background: var(--ok-soft); }
.gap-bad button.sel:not(.right) { background: var(--bad); color: #fff; opacity: 1; }

/* Denní výzva a odznaky */
.vyzva-card { background: color-mix(in srgb, var(--primary) 18%, var(--surface)); border-color: color-mix(in srgb, var(--primary) 55%, var(--border)); }
.vyzva-card .eyebrow { margin-bottom: 2px; }
.vyzva-done { text-align: center; }
.vyzva-done .hero-actions { justify-content: center; }
.badges { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.badge { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; padding: 14px 10px; border-radius: var(--radius); border: 1px dashed var(--border); background: var(--surface); color: var(--muted); }
.badge-ico { font-size: 2rem; line-height: 1.2; filter: grayscale(1); opacity: .35; }
.badge b { color: var(--text); font-size: .95rem; }
.badge small { font-size: .8rem; }
.badge.have { border: 1px solid color-mix(in srgb, var(--primary) 60%, var(--border)); background: color-mix(in srgb, var(--primary) 12%, var(--surface)); }
.badge.have .badge-ico { filter: none; opacity: 1; }
.badge.have small { color: var(--ok); font-weight: 700; }

/* QR na stránce */
.qr-box { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.qr-box img { background: #fff; padding: 6px; border-radius: 10px; flex: none; }
.qr-box .links { flex: 1 1 220px; }

/* Pracovní listy */
#listy-form .form-grid { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.print-sheet { background: #fff; color: #111; border: 1px solid var(--border); border-radius: 12px; padding: 28px 32px; margin-top: 20px; max-width: 820px; font-size: 15px; }
.print-sheet .frac > span:first-child { border-color: #111; }
.ls-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-bottom: 2px solid #111; padding-bottom: 10px; margin-bottom: 16px; }
.ls-head h2 { margin: 0; }
.ls-head p { margin: 2px 0 0; color: #555; }
.ls-fill { display: grid; gap: 8px; min-width: 240px; }
.ls-fill span { display: flex; gap: 6px; }
.ls-fill i { flex: 1; border-bottom: 1px solid #111; }
.ls-tasks { padding-left: 1.4em; margin: 0; }
.ls-tasks > li { margin: 0 0 22px; break-inside: avoid; line-height: 1.6; }
.ls-answer { margin-top: 10px; display: flex; align-items: flex-end; gap: 6px; }
.ls-line { display: inline-block; width: 180px; border-bottom: 1px solid #111; height: 1.2em; }
.ls-opts { margin: 6px 0 0; padding-left: 1.6em; }
.ls-key { columns: 2; column-gap: 32px; padding-left: 1.4em; }
.ls-key li { margin-bottom: 6px; break-inside: avoid; }
.ls-foot { color: #777; font-size: 12px; margin-top: 18px; }
.print-sheet .fig { max-width: 300px; color: #111; }
.print-sheet .fig-bar { fill: #bbb; } .print-sheet .fig-plot { stroke: #111; } .print-sheet .fig-dot { fill: #111; }
.print-sheet .fig-v, .print-sheet .fig-q { fill: #111; } .print-sheet .fig-arc { stroke: #111; }
.print-sheet .fig-fill { fill: #eee; } .print-sheet .fig-grid { stroke: #ccc; } .print-sheet .fig-s { fill: #444; }
.print-sheet .fig-table th { background: #eee; }
@media print {
  @page { size: A4; margin: 14mm; }
  body { background: #fff; }
  .top, .foot, .skip, .no-print, main > section:not([data-page="listy"]) { display: none !important; }
  main { padding: 0; }
  .print-sheet { border: 0; padding: 0; margin: 0; max-width: none; }
  .print-key { break-before: page; }
}
