/* Bobří trénink – vzhled převzatý z původní stránky (reference/original-styles.css). */
:root {
  --bg: #E6F2EE;
  --surface: #FFFFFF;
  --surface-2: #F1F8F5;
  --ink: #1D3634;
  --muted: #587370;
  --line: #CFE2DC;
  --river: #2C88B0;
  --river-soft: #D3EBF4;
  --wood: #94592F;
  --wood-soft: #F3E3D4;
  --leaf: #2F8A50;
  --leaf-soft: #D8F0E0;
  --sun: #E9A72B;
  --bad: #C9503A;
  --bad-soft: #F9E0DA;
  --shadow: 0 2px 0 rgba(29,54,52,.08), 0 8px 24px rgba(29,54,52,.08);
  --f-display: "Baloo 2", "Trebuchet MS", system-ui, sans-serif;
  --f-body: "Nunito", "Segoe UI", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0F201E; --surface: #17302C; --surface-2: #1C3833; --ink: #E4F1ED; --muted: #9BB6B0; --line: #2A4A44;
    --river: #55B2DA; --river-soft: #173B4A; --wood: #D09363; --wood-soft: #3A2B1F; --leaf: #5CC07F; --leaf-soft: #1C3F2A;
    --sun: #F4C255; --bad: #EB7C64; --bad-soft: #452621; --shadow: 0 2px 0 rgba(0,0,0,.25), 0 8px 24px rgba(0,0,0,.3);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0F201E; --surface: #17302C; --surface-2: #1C3833; --ink: #E4F1ED; --muted: #9BB6B0; --line: #2A4A44;
  --river: #55B2DA; --river-soft: #173B4A; --wood: #D09363; --wood-soft: #3A2B1F; --leaf: #5CC07F; --leaf-soft: #1C3F2A;
  --sun: #F4C255; --bad: #EB7C64; --bad-soft: #452621; --shadow: 0 2px 0 rgba(0,0,0,.25), 0 8px 24px rgba(0,0,0,.3);
  color-scheme: dark;
}
* { box-sizing: border-box; }
body { background: var(--bg); color: var(--ink); font-family: var(--f-body); font-size: 17px; line-height: 1.55; }
.wrap { max-width: 760px; margin: 0 auto; padding-inline: 16px; padding-block: 20px 48px; }
h1, h2, h3 { font-family: var(--f-display); line-height: 1.1; text-wrap: balance; margin: 0; }
button { font: inherit; color: inherit; cursor: pointer; }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 3px solid var(--river); outline-offset: 2px; }
h1[tabindex="-1"]:focus { outline: none; }

/* top bar */
.bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: space-between; margin-bottom: 20px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--f-display); font-weight: 800; font-size: 22px; background: none; border: 0; padding: 0; }
.brand svg { width: 38px; height: 38px; }
.pill { display: inline-flex; align-items: center; gap: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums; }
.star { color: var(--sun); }

/* home */
.hero { display: grid; gap: 14px; padding-block: 8px 20px; }
.hero h1 { font-size: clamp(38px, 8vw, 60px); font-weight: 800; letter-spacing: -.5px; }
.hero h1 span { color: var(--river); }
.hero p { margin: 0; color: var(--muted); max-width: 52ch; font-size: 18px; }
.meter { height: 12px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--leaf); border-radius: 999px; transition: width .4s ease; }

/* sekce */
.map-head { display: grid; gap: 6px; margin-bottom: 18px; }
.map-head h1 { font-size: clamp(30px, 6vw, 42px); font-weight: 800; }
.map-head p { margin: 0; color: var(--muted); }
.summary { display: flex; gap: 10px; flex-wrap: wrap; margin: 6px 0 22px; }
.log { width: 74px; height: 74px; border-radius: 50%; display: grid; place-items: center; font-family: var(--f-display); font-weight: 800; font-size: 28px; background: var(--wood-soft); color: var(--wood); border: 4px solid var(--wood); box-shadow: inset 0 0 0 6px var(--wood-soft), inset 0 0 0 8px color-mix(in srgb, var(--wood) 35%, transparent); transition: transform .15s ease; }
.stars { font-size: 15px; letter-spacing: 1px; color: var(--line); }
.stars b { color: var(--sun); font-weight: 400; }
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 10px; }
.badge { background: var(--surface); border: 2px dashed var(--line); border-radius: 18px; padding: 12px; display: grid; gap: 4px; justify-items: start; }
.badge.got { border-style: solid; border-color: var(--sun); }
.badge .b-ico { width: 34px; height: 34px; }
.badge strong { font-family: var(--f-display); font-size: 17px; }
.badge span { font-size: 13px; color: var(--muted); line-height: 1.3; }
.section-title { font-size: 22px; margin: 28px 0 4px; }

/* task */
.task { background: var(--surface); border: 2px solid var(--line); border-radius: 26px; padding: 22px; box-shadow: var(--shadow); display: grid; gap: 16px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; padding: 3px 10px; border-radius: 999px; background: var(--river-soft); color: var(--river); }
.task h1 { font-size: clamp(26px, 5vw, 34px); font-weight: 800; }
.task .text { max-width: 62ch; }
.task .text p { margin: 0 0 10px; }
.visual { background: var(--surface-2); border-radius: 18px; padding: 14px; overflow-x: auto; display: flex; justify-content: center; }
.visual svg, .visual img { max-width: 100%; height: auto; display: block; }
.visual table { border-collapse: collapse; font-variant-numeric: tabular-nums; }
.plan { border-collapse: collapse; margin: 0 0 10px; font-variant-numeric: tabular-nums; }
.plan td { padding: 6px 12px 6px 0; border-bottom: 1px solid var(--line); }
.plan td:last-child { color: var(--muted); font-weight: 700; }
.code { font-family: ui-monospace, "Cascadia Mono", Menlo, monospace; font-size: 17px; background: var(--surface-2); border-left: 4px solid var(--river); border-radius: 10px; padding: 10px 14px; margin: 0 0 10px; white-space: pre; overflow-x: auto; }
.visual th, .visual td { padding: 6px 14px; border-bottom: 1px solid var(--line); text-align: left; }
.visual th { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.question { font-weight: 800; font-size: 19px; }
.options { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.opt { text-align: left; padding: 12px 14px; border-radius: 16px; border: 2px solid var(--line); background: var(--surface); font-weight: 700; display: flex; gap: 10px; align-items: center; }
.options.pics { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.options.pics .opt svg, .options.pics .opt img { display: block; max-width: 100%; height: auto; border-radius: 6px; }
.options.pics .opt > span:last-child { display: grid; gap: 6px; min-width: 0; flex: 1; }
.options.pics .opt img { width: 100%; }
.opt .k { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); font-family: var(--f-display); font-weight: 800; }
.opt.sel { border-color: var(--river); background: var(--river-soft); }
.opt.sel .k { background: var(--river); color: var(--surface); }
.answer-input { font: inherit; font-weight: 800; font-size: 22px; padding: 10px 16px; border-radius: 16px; border: 2px solid var(--line); background: var(--surface); color: var(--ink); width: 100%; max-width: 260px; }
.answer-input.word { text-transform: uppercase; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.btn { border: 0; border-radius: 16px; padding: 12px 22px; font-weight: 800; font-size: 17px; background: var(--river); color: #fff; box-shadow: 0 4px 0 color-mix(in srgb, var(--river) 60%, #000); transition: transform .1s ease, box-shadow .1s ease; }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 color-mix(in srgb, var(--river) 60%, #000); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.green { background: var(--leaf); box-shadow: 0 4px 0 color-mix(in srgb, var(--leaf) 60%, #000); }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: none; border: 2px solid var(--line); }
.back { background: none; border: 0; font-weight: 800; color: var(--muted); padding: 4px 0; display: inline-flex; gap: 6px; align-items: center; }
.feedback { border-radius: 18px; padding: 14px 16px; display: grid; gap: 8px; }
.feedback.ok { background: var(--leaf-soft); }
.feedback.no { background: var(--bad-soft); }
.feedback.info { background: var(--surface-2); }
.feedback h3 { font-size: 22px; }
.feedback.ok h3 { color: var(--leaf); }
.feedback.no h3 { color: var(--bad); }
.feedback p { margin: 0; }
.big-stars { font-size: 30px; letter-spacing: 4px; color: var(--line); }
.big-stars b { color: var(--sun); font-weight: 400; display: inline-block; animation: pop .5s ease both; }
.big-stars b:nth-child(2) { animation-delay: .12s; } .big-stars b:nth-child(3) { animation-delay: .24s; }
@keyframes pop { 0% { transform: scale(0); } 70% { transform: scale(1.3); } 100% { transform: scale(1); } }
.tries { font-size: 14px; color: var(--muted); font-weight: 700; }
footer { margin-top: 36px; font-size: 13px; color: var(--muted); max-width: 70ch; }
footer a { color: var(--river); }
.reset { background: none; border: 0; color: var(--muted); text-decoration: underline; font-size: 13px; padding: 0; }
.confirm { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 14px; }
#confetti { position: fixed; inset: 0; pointer-events: none; z-index: 10; }
.shake { animation: shake .35s ease; }
@keyframes shake { 0%,100% { transform: none; } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
@media (max-width: 480px) { .task { padding: 16px; } }
/* sekce a úlohy */
.stats-row { display: flex; gap: 10px; flex-wrap: wrap; margin: 4px 0 6px; }
.topics { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; margin-top: 8px; }
.topic { text-align: left; background: var(--surface); border: 2px solid var(--line); border-radius: 22px; padding: 18px; display: grid; gap: 8px; align-content: start; box-shadow: var(--shadow); transition: transform .15s ease, border-color .15s ease; }
.topic:hover { transform: translateY(-3px); border-color: var(--river); }
.topic .t-ico { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--wood-soft); color: var(--wood); font-family: var(--f-display); font-weight: 800; font-size: 22px; }
.topic h2 { font-size: 23px; }
.topic .t-desc { color: var(--muted); font-size: 15px; line-height: 1.4; }
.topic .meta { display: flex; justify-content: space-between; font-weight: 700; font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.topic.complete { border-color: var(--leaf); }
.diff { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; padding: 2px 9px; border-radius: 999px; }
.diff.d1 { background: var(--leaf-soft); color: var(--leaf); }
.diff.d2 { background: var(--river-soft); color: var(--river); }
.diff.d3 { background: var(--wood-soft); color: var(--wood); }
.diff.d4 { background: color-mix(in srgb, var(--sun) 22%, var(--surface)); color: color-mix(in srgb, var(--sun) 70%, var(--ink)); }
.tasklist { display: grid; gap: 10px; }
.trow { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; text-align: left; background: var(--surface); border: 2px solid var(--line); border-radius: 18px; padding: 12px 14px; box-shadow: var(--shadow); }
.trow:hover { border-color: var(--river); }
.trow .log { width: 52px; height: 52px; font-size: 22px; }
.trow.done .log { background: var(--leaf-soft); border-color: var(--leaf); color: var(--leaf); box-shadow: none; }
.trow.revealed .log { background: var(--surface-2); border-color: var(--muted); color: var(--muted); box-shadow: none; }
.trow .tr-main { display: grid; gap: 4px; min-width: 0; }
.trow .tr-title { font-family: var(--f-display); font-weight: 800; font-size: 19px; line-height: 1.15; }
.trow .tr-sub { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: 13px; color: var(--muted); font-weight: 700; }
.ladder { display: flex; gap: 4px; align-items: flex-end; }
.ladder i { width: 6px; border-radius: 3px; background: var(--line); }
.ladder i.on { background: var(--wood); }
.explain { background: var(--surface-2); border-radius: 18px; padding: 14px 16px; display: grid; gap: 10px; }
.explain h3 { font-size: 20px; }
.explain ol { margin: 0; padding-left: 22px; display: grid; gap: 6px; }
.explain ol li::marker { font-family: var(--f-display); font-weight: 800; color: var(--river); }
.explain .note { border-left: 4px solid var(--sun); padding: 4px 0 4px 12px; }
.explain .note b { color: color-mix(in srgb, var(--sun) 60%, var(--ink)); }
.explain .why { border-left: 4px solid var(--river); padding: 4px 0 4px 12px; color: var(--muted); }
.trap { background: color-mix(in srgb, var(--sun) 18%, var(--surface)); border-radius: 12px; padding: 8px 12px; }
.newbadge { display: flex; gap: 10px; align-items: center; background: color-mix(in srgb, var(--sun) 20%, var(--surface)); border: 2px solid var(--sun); border-radius: 16px; padding: 10px 14px; color: var(--sun); }
.newbadge strong { color: var(--ink); font-family: var(--f-display); font-size: 18px; }
.newbadge span { color: var(--ink); }
.big { font-family: var(--f-display); font-size: 24px; letter-spacing: 3px; }
.newbadge .b-ico { width: 30px; height: 30px; flex: none; }


/* odkazy místo tlačítek */
.brand, .topic, .trow, .back { text-decoration: none; color: inherit; }
.back { color: var(--muted); }
.back:hover { color: var(--river); }
.btn { display: inline-block; text-decoration: none; }

/* nové prvky */
.source { font-size: 13px; color: var(--muted); margin: 10px 6px 0; }
.next-topic { margin-top: 18px; }
.notfound { margin-top: 10px; }
.notfound p { margin: 0; }
#app > .feedback { margin-top: 10px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
