/* Učivo (agent/ucivo.py), redesign 25. 11. (plátno „Učivo · redesign“: téma varianta A, seznam varianta B).
   Styl Arény (agent/design.md): Paytone One + Nunito, obrysy 3 px, tvrdé stíny, málo textu, hra na prvním místě. */
:root { color-scheme: dark; --bg: #2A2478; --ink: #0B0F1A; --muted: #C3BEF0; --gold: #FFD12E; --green: #0A7F5B; --soft: #EDEBFF;
  --f: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif; --fa: "Paytone One", "Arial Black", system-ui, sans-serif; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background-color: var(--bg); background-image: radial-gradient(circle, rgba(255,255,255,.07) 2px, transparent 2.5px);
  background-size: 30px 30px; color: #fff; font: 600 16px/1.45 var(--f); }
.wrap { max-width: 1040px; margin: 0 auto; padding: calc(16px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px))
  calc(40px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); display: flex; flex-direction: column; gap: 18px; }
a { color: var(--gold); }
h1 { margin: 0; font: 400 clamp(28px, 7.4vw, 38px)/1.05 var(--fa); text-transform: uppercase; overflow-wrap: anywhere; }
h1.velky { color: #fff; -webkit-text-stroke: 1.5px var(--ink); paint-order: stroke fill; text-shadow: 0 3px 0 var(--ink); }
h2 { margin: 6px 0 -6px; font: 400 18px/1.2 var(--fa); text-transform: uppercase; color: var(--gold); }
.top { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; font-size: 14px; font-weight: 800; }
.zpet { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 14px 0 8px; background: var(--ink); color: #fff; text-decoration: none; border-radius: 10px; }
.kde { color: var(--muted); }
/* téma: karta s hrou a tlačítkem nad ohybem */
.hero { background: #fff; color: var(--ink); border: 3px solid var(--ink); border-radius: 18px; box-shadow: 0 6px 0 var(--ink); overflow: hidden; }
.hero-obr { position: relative; height: 130px; border-bottom: 3px solid var(--ink); display: flex; align-items: center; justify-content: center;
  background-image: radial-gradient(circle, rgba(255,255,255,.35) 2px, transparent 2.5px); background-size: 22px 22px; }
.hero-obr .hra { position: absolute; top: 10px; left: 10px; background: var(--ink); color: var(--gold); font-weight: 900; font-size: 13px; padding: 5px 9px; border-radius: 8px; }
.znak { min-width: 96px; height: 76px; padding: 0 16px; background: var(--gold); border: 3.5px solid var(--ink); border-radius: 16px; box-shadow: 0 5px 0 var(--ink);
  display: flex; align-items: center; justify-content: center; font: 400 34px var(--fa); white-space: nowrap; }
.hero-tx { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.hero-tx p { margin: 0; color: #3B3866; font-size: 16px; }
.btn { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 60px; padding: 8px 18px; background: var(--green); color: #fff;
  border: 3px solid var(--ink); border-radius: 14px; box-shadow: 0 5px 0 var(--ink); font: 400 22px var(--fa); text-transform: uppercase; text-decoration: none; text-align: center; }
.btn:active, .dlazdice a:active, .nej a:active, .rocniky a:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--ink); }
.stitky { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; font-weight: 800; }
.stitky span { background: var(--soft); border-radius: 8px; padding: 4px 9px; }
.slova { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.slova li { background: #fff; color: var(--ink); border: 3px solid var(--ink); border-radius: 10px; padding: 5px 10px; font-weight: 900; font-size: 17px; }
.kroky { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.kroky li { background: rgba(255,255,255,.1); border-radius: 12px; padding: 10px 6px; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; font-weight: 900; font-size: 13px; line-height: 1.2; }
details summary { min-height: 48px; display: flex; align-items: center; cursor: pointer; font-weight: 900; list-style: none; }
details summary::-webkit-details-marker { display: none; }
details summary::after { content: "+"; margin-left: auto; font: 400 22px var(--fa); }
details[open] summary::after { content: "–"; }
.tip { background: #FFF6D9; color: var(--ink); border: 3px solid var(--ink); border-radius: 14px; padding: 0 14px; }
.tip p { margin: 0 0 12px; }
.vice { border-top: 2px solid rgba(255,255,255,.18); color: var(--muted); }
.vice summary { font-size: 15px; font-weight: 800; }
.vice p { margin: 0 0 10px; font-size: 15px; }
.dlazdice { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 8px; }
.dlazdice a { display: flex; align-items: center; justify-content: center; min-height: 56px; background: #fff; color: var(--ink); border: 3px solid var(--ink);
  border-radius: 12px; box-shadow: 0 4px 0 var(--ink); font: 400 22px var(--fa); text-decoration: none; }
.dlazdice a[aria-current="page"] { background: var(--gold); }
.dalsi { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.dalsi a { display: inline-flex; align-items: center; min-height: 44px; padding: 6px 14px; background: rgba(255,255,255,.12); color: #fff; border-radius: 10px; font-weight: 900; text-decoration: none; }
.priklady { list-style: none; margin: 0 0 12px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 6px; }
.priklady li { background: #fff; color: var(--ink); border-radius: 10px; padding: 6px 10px; font-weight: 900; font-variant-numeric: tabular-nums; }
.vice .priklady li { background: rgba(255,255,255,.12); color: #fff; }
/* seznam: hledání, nejhledanější, ročníky */
.hledej { position: relative; }
.pole { display: flex; align-items: center; gap: 10px; min-height: 58px; background: #fff; border: 3px solid var(--ink); border-radius: 14px; box-shadow: 0 5px 0 var(--ink); padding: 0 14px; }
.pole input { border: 0; outline: 0; flex: 1; min-width: 0; font: 800 18px var(--f); color: var(--ink); background: transparent; }
.pole:focus-within { outline: 3px solid var(--gold); outline-offset: 2px; }
.vysl { list-style: none; margin: 8px 0 0; padding: 0; background: #fff; border: 3px solid var(--ink); border-radius: 14px; overflow: hidden; }
.vysl a { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 52px; padding: 6px 14px; color: var(--ink); text-decoration: none; font-weight: 900; border-top: 2px solid var(--soft); }
.vysl li:first-child a { border-top: 0; }
.vysl small { color: #5B5880; font-size: 13px; flex: none; }
.nic { margin: 8px 0 0; color: var(--muted); }
.nej { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.nej a { display: flex; flex-direction: column; gap: 4px; padding: 12px; color: var(--ink); border: 3px solid var(--ink); border-radius: 14px; box-shadow: 0 4px 0 var(--ink); text-decoration: none; }
.nej span { font: 400 26px var(--fa); white-space: nowrap; }
.nej b { font-size: 15px; line-height: 1.2; }
.rocniky { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.rocniky a { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 64px; background: #fff; color: var(--ink);
  border: 3px solid var(--ink); border-radius: 12px; box-shadow: 0 4px 0 var(--ink); text-decoration: none; }
.rocniky a[aria-current="true"] { background: var(--gold); }
.rocniky b { font: 400 22px var(--fa); } .rocniky span { font-size: 11px; font-weight: 900; }
.pravy, .karta-wrap { display: flex; flex-direction: column; gap: 16px; }
.rocnik { display: flex; flex-direction: column; gap: 12px; scroll-margin-top: 12px; }
.predmety { display: flex; flex-wrap: wrap; gap: 8px; }
.predmety button { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 4px 12px; background: rgba(255,255,255,.12); color: #fff;
  border: 3px solid transparent; border-radius: 12px; font: 900 14px var(--f); cursor: pointer; }
.predmety button[aria-pressed="true"] { background: var(--pb, var(--gold)); color: var(--ink); border-color: var(--ink); }
.karta { background: #fff; color: var(--ink); border: 3px solid var(--ink); border-radius: 16px; box-shadow: 0 5px 0 var(--ink); padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.k-hl { display: flex; align-items: center; gap: 10px; }
.k-zn { flex: none; width: 44px; height: 44px; border: 3px solid var(--ink); border-radius: 10px; display: flex; align-items: center; justify-content: center; }
.k-hl b { font: 400 16px var(--fa); text-transform: uppercase; }
.karta .dlazdice a { min-height: 48px; background: var(--soft); border-width: 2px; box-shadow: none; font-size: 20px; }
.radky { list-style: none; margin: 0; padding: 0; }
.radky li { display: flex; align-items: center; gap: 10px; padding: 4px 0; border-top: 2px solid var(--soft); }
.radky li:first-child { border-top: 0; }
.radky .t { flex: 1; font-weight: 900; color: var(--ink); }
.radky a.t { color: #0A6B4D; }
.hraj { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; background: var(--green); border: 3px solid var(--ink); border-radius: 12px; }
.meta { color: var(--muted); font-size: 14px; }
.pata { margin-top: 24px; font-size: 14px; color: var(--muted); line-height: 2.4; }
@media (min-width: 900px) {
  .stranka-tema { display: grid; grid-template-columns: 480px minmax(0, 1fr); gap: 18px 32px; align-items: start; }
  .nej { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .rocnik .karta-wrap { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
