/* ===================================================
   Společný vzhled celého webu
   Barvy jsou v proměnných, takže tmavý režim a
   "pan Chráska mode" jen přepíší proměnné.
   =================================================== */
* { box-sizing: border-box; }
[hidden] { display: none !important; }

/* ---------- Světlý vzhled (výchozí) ---------- */
:root {
  --bg: #f7f7f2;
  --text: #222222;
  --sub: #444444;
  --title: #1f4e5f;
  --card: #ffffff;
  --border: #dcdcd2;
  --accent: #1f4e5f;
  --btn-bg: #1f4e5f;
  --btn-fg: #ffffff;
  --btn-hover: #d99a00;
  --btn-hover-fg: #222222;
  --hero: #d99a00;
  --hi: #fff3c4;
  --hib: #d99a00;
  --tagc: #7a5a00;
  --head-bg: #1f4e5f;
  --head-line: #1f4e5f;
  --head-text: #ffffff;
  --menu-off: #d7e8ee;
  --menu-hover: #2b6178;
  --foot-bg: #e9e9e0;
  --foot-fg: #555555;
  --ok: #39ff88;
  --bad: #ff2e93;
}

/* ---------- Tmavý vzhled (tmavý režim + herní stránky) ---------- */
body.tmavy,
body.herni {
  --bg: #0d0f1a;
  --text: #e8eaf6;
  --sub: #b8bdd8;
  --title: #00e5ff;
  --card: #161a2e;
  --border: #2a2f4a;
  --accent: #00e5ff;
  --btn-bg: #00e5ff;
  --btn-fg: #0d0f1a;
  --btn-hover: #ff2e93;
  --btn-hover-fg: #0d0f1a;
  --hero: #ff2e93;
  --hi: #3a3115;
  --hib: #ffd23f;
  --tagc: #ffd23f;
  --head-bg: #161a2e;
  --head-line: #ff2e93;
  --head-text: #00e5ff;
  --menu-off: #8a90b0;
  --menu-hover: #232845;
  --foot-bg: #161a2e;
  --foot-fg: #8a90b0;
}

/* ---------- pan Chráska mode (terminál) ---------- */
body.chraska {
  --bg: #000000;
  --text: #33ff33;
  --sub: #2bd92b;
  --title: #33ff33;
  --card: #000000;
  --border: #1a8f1a;
  --accent: #33ff33;
  --btn-bg: #33ff33;
  --btn-fg: #000000;
  --btn-hover: #1a8f1a;
  --btn-hover-fg: #000000;
  --hero: #33ff33;
  --hi: #0a3d0a;
  --hib: #33ff33;
  --tagc: #33ff33;
  --head-bg: #000000;
  --head-line: #33ff33;
  --head-text: #33ff33;
  --menu-off: #1a8f1a;
  --menu-hover: #0a3d0a;
  --foot-bg: #000000;
  --foot-fg: #1a8f1a;
  --ok: #33ff33;
  --bad: #ff3333;
}
body.chraska,
body.chraska * { font-family: "Courier New", Courier, monospace !important; }

/* ---------- Základ ---------- */
body {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

h1 { color: var(--title); font-size: 2rem; margin-top: 0; }
h2 { color: var(--title); }

main { max-width: 960px; margin: 0 auto; padding: 30px 20px; }

/* ---------- Záhlaví a menu ---------- */
.zahlavi {
  background-color: var(--head-bg);
  border-bottom: 2px solid var(--head-line);
  padding: 18px 20px 0;
}
.zahlavi-obsah { max-width: 960px; margin: 0 auto; }

.radek {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.logo { font-size: 1.5rem; font-weight: bold; margin: 0; }
.logo a { color: var(--head-text); text-decoration: none; }

.rezimy { display: flex; gap: 8px; flex-wrap: wrap; }

.pilulka {
  font-family: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  background: transparent;
  color: var(--head-text);
  border: 1px solid var(--head-text);
  border-radius: 16px;
  padding: 4px 14px;
}
.pilulka:hover,
.pilulka[aria-pressed="true"] {
  background: var(--head-text);
  color: var(--head-bg);
}

/* Herní zóna je vždy tmavá, přepínač tam nedává smysl */
body.herni #tlTmavy { display: none; }

.menu { display: flex; flex-wrap: wrap; gap: 4px; }
.menu a {
  color: var(--menu-off);
  text-decoration: none;
  padding: 10px 18px;
  border-radius: 6px 6px 0 0;
}
.menu a:hover { background-color: var(--menu-hover); color: var(--head-text); }
.menu a[aria-current="page"] {
  background-color: var(--bg);
  color: var(--title);
  font-weight: bold;
}

/* ---------- Úvodní stránka ---------- */
.uvod {
  background-color: var(--card);
  border-left: 8px solid var(--hero);
  padding: 22px 26px;
  margin-bottom: 28px;
}
.uvod p { margin-bottom: 0; }
.pozdrav { font-size: 1.2rem; }

.oweb {
  margin-top: 28px;
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 16px 22px;
}
.oweb h2 { margin-top: 0; font-size: 1.2rem; }

/* ---------- Karty a tlačítka ---------- */
.mrizka {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.karta {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-top: 6px solid var(--accent);
  border-radius: 6px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s, box-shadow 0.15s;
}
.karta:hover { transform: translateY(-4px); box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2); }
.karta h2 { margin-top: 0; }
.karta p { flex-grow: 1; }

.tlacitko {
  display: inline-block;
  align-self: flex-start;
  background-color: var(--btn-bg);
  color: var(--btn-fg);
  text-decoration: none;
  font-family: inherit;
  font-size: 1rem;
  padding: 9px 18px;
  border-radius: 4px;
  border: 0;
  cursor: pointer;
}
.tlacitko:hover,
.tlacitko:focus { background-color: var(--btn-hover); color: var(--btn-hover-fg); }
.tlacitko.vypnuto { opacity: 0.5; cursor: default; }

/* ---------- Herní zóna ---------- */
.herni-zona {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  background-color: var(--card);
  border: 2px solid var(--accent);
  border-radius: 8px;
  padding: 18px 24px;
  margin-bottom: 24px;
}
.herni-zona h1 { margin: 0; }
.herni-zona p { margin: 0; color: var(--sub); }
.pocet { text-align: center; }
.pocet strong { display: block; font-size: 1.8rem; color: var(--hero); }
.pocet span { font-size: 0.8rem; color: var(--sub); }

.barva-zelena { --barva: #39ff88; }
.barva-zluta { --barva: #ffd23f; }
.barva-fialova { --barva: #b388ff; }
.barva-ruzova { --barva: #ff2e93; }
.barva-azurova { --barva: #00e5ff; }
.barva-oranzova { --barva: #ff8a3d; }
body.chraska .hra { --barva: #33ff33; }

.hra {
  background-color: var(--card);
  border: 2px solid var(--barva, var(--accent));
  border-radius: 8px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s, box-shadow 0.15s;
}
.hra:hover { transform: translateY(-4px); box-shadow: 0 0 14px var(--barva, var(--accent)); }
.hra-hlava { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.ikona {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background-color: var(--barva, var(--accent));
  color: #0d0f1a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.4rem;
}
.hra h2 { margin: 0; font-size: 1.1rem; color: var(--text); }
.zanr { margin: 0; font-size: 0.8rem; color: var(--barva, var(--accent)); }
.popis { flex-grow: 1; color: var(--sub); font-size: 0.9rem; }
.uroven-popis { margin: 0 0 4px; font-size: 0.75rem; color: var(--sub); }

.uroven { margin-bottom: 14px; }
.uroven span {
  display: inline-block;
  width: 26px;
  height: 6px;
  margin-right: 4px;
  border-radius: 2px;
  background-color: var(--border);
}
.uroven-1 span:nth-child(-n+1),
.uroven-2 span:nth-child(-n+2),
.uroven-3 span:nth-child(-n+3) { background-color: var(--barva, var(--accent)); }

.hra .tlacitko {
  background-color: var(--barva, var(--btn-bg));
  color: #0d0f1a;
  font-weight: bold;
}
.hra .tlacitko:hover,
.hra .tlacitko:focus {
  background-color: var(--barva, var(--btn-hover));
  color: #0d0f1a;
  filter: brightness(1.25);
}

/* ---------- Bodová tabulka ---------- */
.tabulka-box {
  background-color: var(--card);
  border: 2px solid var(--hero);
  border-radius: 8px;
  padding: 18px 22px;
  margin-top: 28px;
}
.tabulka-box h2 { margin-top: 0; color: var(--hero); }
.tabulka-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-weight: normal; color: var(--sub); padding: 6px 10px; }
td { padding: 8px 10px; border-top: 1px solid var(--border); }
td.body-sloupec, th.body-sloupec { text-align: right; }
td.body-sloupec { color: var(--ok); font-weight: bold; }
.poznamka { font-size: 0.8rem; color: var(--sub); margin-bottom: 0; }

/* ---------- Kvíz ---------- */
.panel {
  background-color: var(--card);
  border: 2px solid var(--accent);
  border-radius: 8px;
  padding: 22px 24px;
}
#konec.panel { border-color: var(--hero); }
.panel h2 { margin-top: 0; color: var(--text); }

.obtiznosti { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }

.tl {
  font-family: inherit;
  font-size: 1rem;
  cursor: pointer;
  border-radius: 6px;
  padding: 10px 20px;
  border: 2px solid var(--c, var(--accent));
  background-color: transparent;
  color: var(--c, var(--accent));
}
.tl:hover,
.tl:focus { background-color: var(--c, var(--accent)); color: #0d0f1a; }
.lehka { --c: #39ff88; }
.stredni { --c: #ffd23f; }
.tezka { --c: #ff2e93; }
.maturita { --c: #b388ff; }
.pohadky { --c: #ff8fb8; }
body.chraska .tl { --c: #33ff33; }

.info {
  display: flex;
  justify-content: space-between;
  color: var(--sub);
  font-size: 0.95rem;
  margin-bottom: 8px;
}
.pruh { height: 8px; background-color: var(--border); border-radius: 4px; margin-bottom: 20px; }
.pruh div { height: 100%; width: 0; background-color: var(--hero); border-radius: 4px; }

#otazka { font-size: 1.3rem; font-weight: bold; color: var(--text); margin: 0 0 16px; }
#odpovedi { display: grid; gap: 10px; }
#odpovedi .odpoved { width: 100%; text-align: left; }
#odpovedi .spravne { background-color: var(--ok); border-color: var(--ok); color: #0d0f1a; }
#odpovedi .spatne { background-color: var(--bad); border-color: var(--bad); color: #0d0f1a; }

#zprava { min-height: 1.6em; margin: 14px 0 0; font-weight: bold; }
#dalsi { margin-top: 10px; }

.vysledek { font-size: 2.4rem; font-weight: bold; color: var(--hero); margin: 10px 0 0; }
.body-vysledek { font-size: 1.1rem; font-weight: bold; color: var(--ok); margin: 0 0 6px; }

.jmeno {
  font-family: inherit;
  font-size: 1rem;
  padding: 10px 12px;
  border-radius: 6px;
  border: 2px solid var(--border);
  background-color: var(--bg);
  color: var(--text);
  width: 220px;
  max-width: 100%;
}
.ulozit-radek { display: flex; flex-wrap: wrap; gap: 10px; }
.ulozeno { color: var(--ok); font-weight: bold; }
.ulozeno a { color: var(--title); }

/* ---------- Úkoly ---------- */
.stitek {
  display: inline-block;
  font-size: 0.8rem;
  padding: 2px 12px;
  border-radius: 12px;
  background-color: var(--hi);
  color: var(--tagc);
  margin-bottom: 8px;
}

.ovladani { margin: 16px 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tl-obrys {
  font-family: inherit;
  font-size: 1rem;
  cursor: pointer;
  background-color: var(--card);
  color: var(--title);
  border: 1px solid var(--accent);
  border-radius: 4px;
  padding: 8px 14px;
}
.tl-obrys:hover,
.tl-obrys:focus { background-color: var(--accent); color: var(--btn-fg); }

.mesto {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-left: 6px solid var(--accent);
  padding: 10px 18px;
  margin-bottom: 14px;
}
.mesto h2 { margin: 0 0 4px; font-size: 1.25rem; }
.mesto p { margin: 2px 0; }
.mesto.zvyrazneno { background-color: var(--hi); border-left-color: var(--hib); }

/* ---------- Terminál (pan Chráska mode) ---------- */
.terminal {
  background-color: #000000;
  color: #33ff33;
  border-bottom: 2px solid #33ff33;
  padding: 10px 20px;
  font-family: "Courier New", Courier, monospace;
}
.terminal[hidden] { display: none; }
.t-out {
  max-width: 960px;
  margin: 0 auto;
  height: 160px;
  overflow-y: auto;
  font-size: 0.9rem;
  line-height: 1.4;
}
.t-radek { max-width: 960px; margin: 6px auto 0; display: flex; gap: 8px; font-size: 0.9rem; }
.t-radek label { white-space: nowrap; }
.t-radek input {
  flex: 1;
  background: transparent;
  border: 0;
  outline: 0;
  color: #33ff33;
  font: inherit;
}

/* ---------- Patička ---------- */
.paticka {
  text-align: center;
  padding: 22px 20px;
  background-color: var(--foot-bg);
  color: var(--foot-fg);
  margin-top: 30px;
  border-top: 2px solid var(--head-line);
}
.paticka p { margin: 0; }
.paticka a { color: var(--title); }

/* ---------- Hry (společné prvky) ---------- */
.stav-radek {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--sub);
  font-size: 0.95rem;
  margin-bottom: 14px;
}
.herni-plocha { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.zprava-hry { min-height: 1.6em; margin: 14px 0 0; font-weight: bold; text-align: center; color: var(--text); }
.konec-box { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--border); }
.konec-box .obtiznosti { margin-top: 12px; }

.platno {
  display: block;
  max-width: 100%;
  height: auto;
  background-color: var(--bg);
  border: 2px solid var(--accent);
  border-radius: 6px;
}

.sipky {
  display: grid;
  grid-template-columns: repeat(3, 64px);
  grid-template-rows: repeat(2, 56px);
  grid-template-areas: ". nahoru ." "vlevo dolu vpravo";
  gap: 6px;
  justify-content: center;
}
.sipky .tl { padding: 0; font-size: 1.4rem; text-align: center; }
.sipky .nahoru { grid-area: nahoru; }
.sipky .vlevo { grid-area: vlevo; }
.sipky .dolu { grid-area: dolu; }
.sipky .vpravo { grid-area: vpravo; }

/* Piškvorky */
.deska-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: min(100%, 330px); }
.pole {
  aspect-ratio: 1;
  font-family: inherit;
  font-size: 3rem;
  font-weight: bold;
  line-height: 1;
  cursor: pointer;
  background-color: var(--card);
  color: var(--text);
  border: 2px solid var(--accent);
  border-radius: 8px;
  padding: 0;
}
.pole:hover:not(:disabled),
.pole:focus { background-color: var(--border); }
.pole.x { color: #ff2e93; }
.pole.o { color: #00e5ff; }
body.chraska .pole.x,
body.chraska .pole.o { color: #33ff33; }
.pole.vyhra { background-color: var(--hi); border-color: var(--hib); }
.pole:disabled { cursor: default; }

/* Pexeso */
.deska-pexeso { display: grid; gap: 8px; width: min(100%, 560px); }
.karticka {
  aspect-ratio: 1;
  font-family: inherit;
  font-size: 1.8rem;
  cursor: pointer;
  background-color: var(--card);
  color: var(--title);
  border: 2px solid var(--accent);
  border-radius: 8px;
  padding: 0;
}
.karticka:hover,
.karticka:focus { background-color: var(--border); }
.karticka.otocena { background-color: var(--accent); color: var(--btn-fg); }
.karticka.nalezena { background-color: var(--ok); border-color: var(--ok); color: #0d0f1a; cursor: default; }

/* Rychlé reakce */
.reakce-pole {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 240px;
  padding: 20px;
  text-align: center;
  font-family: inherit;
  font-size: 1.5rem;
  font-weight: bold;
  border-radius: 10px;
  border: 2px solid var(--accent);
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}
.stav-start { background-color: var(--card); color: var(--title); }
.stav-cekej { background-color: var(--bad); border-color: var(--bad); color: #0d0f1a; }
.stav-klikni { background-color: var(--ok); border-color: var(--ok); color: #0d0f1a; }
.casy { margin: 12px 0 0; padding: 0; list-style: none; text-align: center; color: var(--sub); }

/* ===================================================
   Vlastní hry: společné prvky
   =================================================== */
.zpet { margin: 0 0 18px; }
.zpet a { color: var(--title); }

.hra-plocha { text-align: center; }
.stav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 22px;
  color: var(--sub);
  margin: 8px 0 14px;
}
.stav strong { color: var(--text); }
.hlaska { min-height: 1.6em; font-weight: bold; margin: 10px 0; }
.volby { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 12px 0; }
.tl.aktivni { background-color: var(--c, var(--accent)); color: #0d0f1a; }
.ulozbox { margin-top: 20px; }
.ulozbox .ulozit-radek { margin-top: 6px; }

/* ---------- Piškvorky ---------- */
.deska3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  width: min(300px, 100%);
  margin: 0 auto;
}
.pole3 {
  aspect-ratio: 1;
  font-family: inherit;
  font-size: 2.6rem;
  font-weight: bold;
  background-color: var(--bg);
  color: var(--text);
  border: 2px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  padding: 0;
}
.pole3:hover:not(:disabled) { border-color: var(--accent); }
.pole3.x { color: #00e5ff; }
.pole3.o { color: #ff2e93; }
.pole3.vyherni { background-color: var(--hi); border-color: var(--hib); }
.pole3:disabled { cursor: default; }
body.chraska .pole3.x,
body.chraska .pole3.o { color: var(--text); }

/* ---------- Pexeso ---------- */
.deska-pex {
  display: grid;
  grid-template-columns: repeat(var(--sloupce, 4), 1fr);
  gap: 10px;
  width: min(440px, 100%);
  margin: 0 auto;
}
.pex {
  aspect-ratio: 1;
  font-family: inherit;
  font-size: 2rem;
  padding: 0;
  border-radius: 8px;
  border: 2px solid var(--accent);
  background-color: var(--accent);
  color: transparent;
  cursor: pointer;
}
.pex.otocena { background-color: var(--card); color: var(--text); }
.pex.nalezena { background-color: var(--hi); border-color: var(--ok); color: var(--text); cursor: default; }

/* ---------- Had a labyrint ---------- */
.platno {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  height: auto;
  border: 2px solid var(--accent);
  background-color: var(--card);
  touch-action: none;
}
.sipky {
  display: grid;
  grid-template-columns: repeat(3, 64px);
  grid-template-rows: repeat(2, 56px);
  gap: 8px;
  justify-content: center;
  margin: 14px auto 0;
}
.sipky button { padding: 0; font-size: 1.4rem; text-align: center; }
.sipky .hore { grid-column: 2; grid-row: 1; }
.sipky .vlevo { grid-column: 1; grid-row: 2; }
.sipky .dolu { grid-column: 2; grid-row: 2; }
.sipky .vpravo { grid-column: 3; grid-row: 2; }

/* ---------- Rychlé reakce ---------- */
.reakce-box {
  display: block;
  width: 100%;
  min-height: 220px;
  font-family: inherit;
  font-size: 1.5rem;
  font-weight: bold;
  border-radius: 10px;
  border: 2px solid var(--accent);
  background-color: var(--card);
  color: var(--text);
  cursor: pointer;
  padding: 20px;
}
.reakce-box.cekani { background-color: #7a1f2b; border-color: #ff2e93; color: #ffffff; }
.reakce-box.zelena { background-color: #1f7a3a; border-color: #39ff88; color: #ffffff; }
.reakce-box.pozde { background-color: #5c4710; border-color: #ffd23f; color: #ffffff; }
.casy {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 18px;
  margin: 12px 0;
  color: var(--sub);
}

/* ---------- Bodová tabulka po hrách ---------- */
.tabulka-box h3 { color: var(--text); margin: 20px 0 6px; font-size: 1.1rem; }
.tabulka-box h3:first-of-type { margin-top: 6px; }

/* ---------- V5: hodiny, boot, animace, motivy ---------- */
.hodiny { margin: 0; font-size: .8rem; color: var(--head-text); font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 600px) { .h-datum { display: none; } }
.tip { padding: 8px 12px; border: 1px dashed var(--hib); border-radius: 8px; background: var(--hi); color: var(--text); }
.pilulka.pulz { animation: pulz 1.4s infinite; }
@keyframes pulz { 0%, 100% { box-shadow: 0 0 0 0 var(--hero); } 50% { box-shadow: 0 0 0 8px transparent; } }
.boot { position: fixed; inset: 0; z-index: 10000; background: #000; color: #33ff33; font-family: "Courier New", monospace; padding: 24px; cursor: pointer; }
.boot pre { white-space: pre-wrap; font: inherit; margin: 0; }
.boot-skip { position: absolute; bottom: 16px; left: 24px; opacity: .6; font-size: .8rem; }
.tl-cela { margin-bottom: 8px; }
.tabulka-box.cela { position: fixed; inset: 0; z-index: 1000; margin: 0; padding: 16px; overflow: auto; border-radius: 0; background: var(--bg); font-size: 1.2rem; }
@keyframes kyv { 25% { transform: rotate(-12deg) scale(1.15); } 75% { transform: rotate(12deg) scale(1.15); } }
@media (prefers-reduced-motion: no-preference) {
  .hra:hover .ikona { animation: kyv .5s; }
  .hra, .karta, .tlacitko, .pilulka, .menu a { transition: transform .2s, box-shadow .2s, background .2s; }
  .tlacitko:hover, .pilulka:hover { transform: scale(1.06); }
  .menu a:hover { transform: translateY(-2px); }
  .hra::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 40%, rgba(255,255,255,.18) 50%, transparent 60%); transform: translateX(-100%); pointer-events: none; }
  .hra:hover::after { transform: translateX(100%); transition: transform .6s; }
}
.hra { position: relative; overflow: hidden; }
body.m-retro:not(.chraska) { --bg:#0b0f08; --text:#d6ff9a; --sub:#b4e070; --title:#ffb000; --card:#121a0c; --border:#5a7a2a; --accent:#ffb000; --btn-bg:#ffb000; --btn-fg:#0b0f08; --btn-hover:#d6ff9a; --btn-hover-fg:#0b0f08; --hero:#ffb000; --hi:#1d2a10; --hib:#ffb000; --tagc:#ffb000; --head-bg:#0b0f08; --head-line:#ffb000; --head-text:#ffb000; --menu-off:#b4e070; --menu-hover:#1d2a10; --foot-bg:#0b0f08; --foot-fg:#7a9a4a; --ok:#9aff4d; --bad:#ff5a3c; }
body.m-retro:not(.chraska)::after { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 9990; background: repeating-linear-gradient(rgba(0,0,0,0) 0 2px, rgba(0,0,0,.22) 2px 3px); }
body.m-retro:not(.chraska), body.m-retro:not(.chraska) * { font-family: "Courier New", Courier, monospace; }
body.m-neon:not(.chraska) { --bg:#0a0014; --text:#f2e8ff; --sub:#d6c4ff; --title:#00e5ff; --card:#150028; --border:#ff2bd6; --accent:#ff2bd6; --btn-bg:#ff2bd6; --btn-fg:#0a0014; --btn-hover:#00e5ff; --btn-hover-fg:#0a0014; --hero:#00e5ff; --hi:#2a0050; --hib:#00e5ff; --tagc:#00e5ff; --head-bg:#0a0014; --head-line:#ff2bd6; --head-text:#00e5ff; --menu-off:#d6c4ff; --menu-hover:#2a0050; --foot-bg:#0a0014; --foot-fg:#b48cff; --ok:#39ff88; --bad:#ff2e93; }
body.m-neon:not(.chraska) h1, body.m-neon:not(.chraska) h2, body.m-neon:not(.chraska) .logo a { text-shadow: 0 0 8px currentColor; }
body.m-neon:not(.chraska) .hra, body.m-neon:not(.chraska) .karta { box-shadow: 0 0 10px rgba(255,43,214,.5); }
body.m-pixel:not(.chraska) { --bg:#1b1b3a; --text:#ffffff; --sub:#e0e0ff; --title:#ffd23f; --card:#2a2a5a; --border:#000000; --accent:#ffd23f; --btn-bg:#ff5a3c; --btn-fg:#ffffff; --btn-hover:#ffd23f; --btn-hover-fg:#000000; --hero:#ffd23f; --hi:#3a3a7a; --hib:#ffd23f; --tagc:#ffd23f; --head-bg:#0f0f26; --head-line:#ffd23f; --head-text:#ffd23f; --menu-off:#e0e0ff; --menu-hover:#3a3a7a; --foot-bg:#0f0f26; --foot-fg:#aaaaee; --ok:#39ff88; --bad:#ff5a3c; }
body.m-pixel:not(.chraska), body.m-pixel:not(.chraska) * { font-family: "Courier New", Courier, monospace; font-weight: bold; }
body.m-pixel:not(.chraska) .hra, body.m-pixel:not(.chraska) .karta, body.m-pixel:not(.chraska) .tl, body.m-pixel:not(.chraska) .tlacitko, body.m-pixel:not(.chraska) .pilulka, body.m-pixel:not(.chraska) .panel { border-radius: 0; border: 3px solid #000; box-shadow: 4px 4px 0 #000; }

/* ---------- V6: terminál na celou obrazovku ---------- */
.terminal:not(.mala):not([hidden]) { position: fixed; inset: 0; z-index: 9000; display: flex; flex-direction: column; border: 0; padding: 14px 16px; }
.terminal:not(.mala) .t-out { flex: 1; height: auto; max-width: none; width: 100%; font-size: 1rem; }
.terminal:not(.mala) .t-radek { max-width: none; width: 100%; font-size: 1rem; }
.t-tl { position: absolute; top: 8px; right: 10px; display: flex; gap: 6px; }
.t-tl button { background: transparent; color: #33ff33; border: 1px solid #33ff33; border-radius: 6px; padding: 4px 10px; font: inherit; cursor: pointer; }

/* ---------- V7: coiny, obchod, historie ---------- */
.coiny { color: var(--head-text); font-weight: bold; text-decoration: none; font-size: .9rem; white-space: nowrap; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 9500; background: #000; color: #ffd23f; border: 2px solid #ffd23f; border-radius: 20px; padding: 8px 16px; font-weight: bold; animation: fade .3s; }
#fxcv { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; opacity: .6; }
#fxcp { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 800; }
.zahlavi, main, .paticka { position: relative; z-index: 1; }
.obch-mrizka { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.obch-karta { background: var(--card); border: 2px solid var(--border); border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 6px; }
.obch-karta p { margin: 0; flex-grow: 1; font-size: .9rem; }
.obch-ik { font-size: 2rem; }
.verze { background: var(--card); border: 2px solid var(--border); border-left: 6px solid var(--hero); border-radius: 8px; padding: 10px 14px; margin: 10px 0; }
.verze h2 { margin: 0 0 4px; font-size: 1.1rem; color: var(--hero); }
.verze p { margin: 0; }
.verze.nova { border-color: var(--hero); box-shadow: 0 0 10px var(--hero); }

/* ---------- V9: clicker a black jack ---------- */
.cookie { font-size: 6rem; background: none; border: 0; cursor: pointer; transition: transform .05s; line-height: 1; }
.cookie:active { transform: scale(.88); }
.obch-clicker { display: grid; gap: 6px; margin: 10px 0; }
.obch-clicker .tl { text-align: left; }
.zlata { position: absolute; font-size: 2.5rem; background: none; border: 0; cursor: pointer; animation: bob 1s ease-in-out infinite; filter: drop-shadow(0 0 8px gold); }
.bj-karta { display: inline-block; min-width: 44px; padding: 10px 6px; margin: 3px; border: 2px solid var(--border); border-radius: 6px; background: #fff; color: #000; font-weight: bold; text-align: center; }
.bj-karta.cer { color: #c00; }
.bj-karta.skr { background: #335; color: #fff; }
.bj-stav { font-size: 1.1rem; }

/* ---------- V10: historie (časová osa), menu pojistka ---------- */
.menu { position: relative; z-index: 5; }
.menu a { white-space: nowrap; }
.nadp { margin: 28px 0 4px; }
.napoveda { margin: 0 0 10px; font-size: .9rem; }
.osa { position: relative; margin-left: 10px; padding-left: 22px; border-left: 3px solid var(--border); }
.osa details.verze { position: relative; padding: 0; }
.osa details.verze::before { content: ""; position: absolute; left: -33px; top: 14px; width: 13px; height: 13px; border-radius: 50%; background: var(--card); border: 3px solid var(--hero); }
.osa details.aktualni::before { background: var(--hero); }
.osa details.verze summary { cursor: pointer; padding: 10px 14px; font-weight: bold; color: var(--hero); list-style: none; }
.osa details.verze summary::-webkit-details-marker { display: none; }
.osa details.verze summary::after { content: "▾"; float: right; transition: transform .2s; }
.osa details.verze[open] summary::after { transform: rotate(180deg); }
.vcis { display: inline-block; min-width: 2.4em; }
.zmeny { margin: 0; padding: 0 14px 12px 14px; list-style: none; }
.zmeny li { margin: 6px 0; }
.stit { display: inline-block; font-size: .72rem; font-weight: bold; padding: 1px 8px; border-radius: 10px; color: #fff; vertical-align: middle; }
.stit.nov { background: #1f8a3b; }
.stit.vyl { background: #1c6fb8; }
.stit.opr { background: #c26a00; }
.stit.akt { background: var(--hero); color: var(--bg); margin-left: 6px; }
.osa details.prog p { margin: 0; padding: 0 14px 8px; }
.kod { margin: 0 14px 12px; padding: 10px 12px; background: #0d1117; color: #c9f7c0; border-radius: 6px; overflow-x: auto; font-size: .85rem; }

/* ---------- V11: nové motivy, Plinko ---------- */
body.m-ocean:not(.chraska) { --bg:#04202e; --text:#e6f7ff; --sub:#b8e2f5; --title:#5be0ff; --card:#08334a; --border:#1e7fa8; --accent:#14b8e6; --btn-bg:#14b8e6; --btn-fg:#04202e; --btn-hover:#5be0ff; --btn-hover-fg:#04202e; --hero:#5be0ff; --hi:#0b4663; --hib:#5be0ff; --tagc:#5be0ff; --head-bg:#021824; --head-line:#14b8e6; --head-text:#5be0ff; --menu-off:#b8e2f5; --menu-hover:#0b4663; --foot-bg:#021824; --foot-fg:#6fb4d0; --ok:#3dffb0; --bad:#ff6b6b; }
body.m-zapad:not(.chraska) { --bg:#2a1030; --text:#fff0e0; --sub:#ffd9b8; --title:#ffb347; --card:#3d1a3f; --border:#ff6f61; --accent:#ff6f61; --btn-bg:#ff6f61; --btn-fg:#2a1030; --btn-hover:#ffb347; --btn-hover-fg:#2a1030; --hero:#ffb347; --hi:#55234f; --hib:#ffb347; --tagc:#ffb347; --head-bg:#1d0a22; --head-line:#ff6f61; --head-text:#ffb347; --menu-off:#ffd9b8; --menu-hover:#55234f; --foot-bg:#1d0a22; --foot-fg:#d89aa0; --ok:#8dff9a; --bad:#ff4d6d; }
body.m-mono:not(.chraska) { --bg:#121212; --text:#eaeaea; --sub:#c4c4c4; --title:#ffffff; --card:#1e1e1e; --border:#6a6a6a; --accent:#ffffff; --btn-bg:#eaeaea; --btn-fg:#121212; --btn-hover:#ffffff; --btn-hover-fg:#000000; --hero:#ffffff; --hi:#2c2c2c; --hib:#ffffff; --tagc:#ffffff; --head-bg:#000000; --head-line:#888888; --head-text:#ffffff; --menu-off:#bbbbbb; --menu-hover:#2c2c2c; --foot-bg:#000000; --foot-fg:#888888; --ok:#9aff9a; --bad:#ff8a8a; }
#pCanvas { display: block; margin: 8px auto; width: 100%; max-width: 440px; height: auto; border: 2px solid var(--border); border-radius: 10px; }

/* ---------- V12: nová úvodní stránka ---------- */
.uv { max-width: 960px; margin: 0 auto; padding: 48px 20px; display: flex; flex-direction: column; gap: 36px; }
.hero { display: flex; gap: 36px; align-items: stretch; flex-wrap: wrap; }
.hero-text { flex: 1 1 420px; display: flex; flex-direction: column; gap: 16px; justify-content: center; }
.hero-text h1 { margin: 0; font-size: clamp(2.2rem, 5vw, 4rem); line-height: 1.05; }
.uv-zv { color: var(--title); }
.uv-popis { margin: 0; color: var(--sub); font-size: 1.1rem; line-height: 1.5; }
.uv-pozdrav { margin: 0; color: var(--sub); font-size: 1.1rem; }
.uv-stitek { align-self: flex-start; border: 1px solid var(--border); color: var(--sub); padding: 4px 14px; border-radius: 14px; font-size: .85rem; }
.hero-panel { flex: 0 1 340px; display: flex; flex-direction: column; gap: 16px; }
.uv-karta { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 22px; display: flex; flex-direction: column; gap: 8px; }
.uv-karta h2 { margin: 0; font-size: 1.25rem; color: var(--title); }
.uv-karta p { margin: 0; color: var(--sub); line-height: 1.5; }
.uv-mala { color: var(--sub); font-size: .95rem; }
#uvDatum::first-letter { text-transform: uppercase; }
.uv-cas { font-size: 3rem; font-weight: bold; color: var(--title); font-variant-numeric: tabular-nums; line-height: 1.1; }
.uv-coiny { font-size: 3rem; font-weight: bold; color: var(--hib); line-height: 1.1; }
.uv-karta .tl-obrys:disabled { opacity: .55; cursor: default; }
.uv-info { display: flex; gap: 20px; flex-wrap: wrap; }
.uv-info .uv-karta { flex: 1 1 260px; }
.uv a.tl-obrys { text-decoration: none; }

/* ---------- V13: profil, úvod bez loga ---------- */
body.uvodni .logo { display: none; }
.uv-prof { display: flex; align-items: center; gap: 14px; }
.uv-av, .pr-av { font-size: 2.6rem; line-height: 1; }
.pr-av { font-size: 4rem; }
.pr-hlava { flex-direction: row; align-items: center; gap: 18px; }
.pr-jm { font-size: 1.6rem; color: var(--title); }
.pr-lab { display: flex; flex-direction: column; gap: 4px; color: var(--sub); }
.pr-pole { font-family: inherit; font-size: 1rem; padding: 10px 12px; background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: 8px; max-width: 100%; box-sizing: border-box; }
textarea.pr-pole { width: 100%; resize: vertical; }
.pr-mriz { display: flex; flex-wrap: wrap; gap: 10px; }
.pr-av-tl { font-size: 2rem; width: 58px; height: 58px; cursor: pointer; background: var(--bg); border: 2px solid var(--border); border-radius: 12px; }
.pr-av-tl[aria-pressed="true"] { border-color: var(--accent); background: var(--hi); }
.pr-av-tl:disabled { opacity: .35; cursor: not-allowed; }
.pr-tab { width: 100%; border-collapse: collapse; }
.pr-tab th, .pr-tab td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--border); }
.pr-tab th { color: var(--sub); font-weight: normal; width: 40%; }

/* ---------- V14: hodiny ve více vzhledech, rámeček avataru ---------- */
.hl { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.hodiny .h-cas { display: inline-block; vertical-align: middle; }
.hodiny svg, .uv-cas svg, .obch-hod svg { display: block; }
.st-cl-rimske { font-family: Georgia, "Times New Roman", serif; font-weight: bold; letter-spacing: .06em; }
.st-cl-neon, .st-cl-led, .st-cl-bin { background: #0a0a1c; border-radius: 8px; padding: 3px 10px; }
.st-cl-led, .st-cl-bin { line-height: 0; }
.st-cl-neon { color: #5be0ff; font-family: Consolas, "Courier New", monospace; font-weight: bold; text-shadow: 0 0 6px #5be0ff, 0 0 14px #2b9dff; }
.uv-cas.st-cl-neon, .uv-cas.st-cl-led, .uv-cas.st-cl-bin { display: inline-block; padding: 8px 18px; border-radius: 12px; }
.uv-cas.obch-ik.obch-hod { display: flex; justify-content: center; min-height: 58px; align-items: center; font-size: 1rem; }
.obch-hod .h-cas { display: inline-block; font-size: .85rem; }
@media (max-width: 600px) { .hl { gap: 10px; } }

@property --ang { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
.av-editor { display: inline-block; padding: 8px 10px; border-radius: 50%; border: 4px solid transparent; background: linear-gradient(#14110a, #14110a) padding-box, conic-gradient(from var(--ang), #ffd23f, #ff5bd6, #5be0ff, #ffd23f) border-box; animation: zar 2.4s ease-in-out infinite, otoc 4s linear infinite; }
.pr-av-tl.av-editor { padding: 0; border-radius: 12px; border: 3px solid transparent; background: linear-gradient(#14110a, #14110a) padding-box, conic-gradient(from var(--ang), #ffd23f, #ff5bd6, #5be0ff, #ffd23f) border-box; }
@keyframes zar { 0%, 100% { box-shadow: 0 0 6px 1px #ffd23f, 0 0 16px 3px rgba(255, 210, 63, .45); } 50% { box-shadow: 0 0 14px 4px #ff5bd6, 0 0 32px 8px rgba(91, 224, 255, .55); } }
@keyframes otoc { to { --ang: 360deg; } }
@media (prefers-reduced-motion: reduce) { .av-editor { animation: none; box-shadow: 0 0 12px 3px #ffd23f; } }

.obch-ik.obch-hod { min-height: 58px; }

/* ---------- V15: oblíbené hry ---------- */
.hvezda { position: absolute; top: 8px; right: 8px; z-index: 2; width: 34px; height: 34px; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .25); color: #c9c9c9; font-size: 1.25rem; line-height: 1; cursor: pointer; transition: transform .15s, color .15s; }
.hvezda:hover, .hvezda:focus-visible { transform: scale(1.15); color: #ffd23f; }
.hvezda.zap { color: #ffd23f; text-shadow: 0 0 8px #ffd23f; }
.ob-nadpis { margin: 22px 0 10px; font-size: 1.15rem; color: var(--text); }
.ob-nadpis[hidden], #oblibene[hidden] { display: none; }

/* ---------- V16: rozbalovací menu Obchod ---------- */
.zahlavi { z-index: 20; }
.menu-skup { position: relative; display: flex; }
.menu .menu-hl { display: inline-flex; align-items: center; gap: 6px; }
.menu-sip { font-size: .7rem; opacity: .75; transition: transform .2s; }
.menu-skup:hover .menu-sip, .menu-skup:focus-within .menu-sip, .menu-skup.otevrene .menu-sip { transform: rotate(180deg); }
.podmenu { position: absolute; top: 100%; left: 0; min-width: 270px; padding: 10px; background: #161a4d; border: 1px solid rgba(160, 175, 255, .25); border-radius: 12px; box-shadow: 0 14px 34px rgba(0, 0, 0, .45); opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .18s, transform .18s, visibility .18s; z-index: 50; }
.menu-skup:hover .podmenu, .menu-skup:focus-within .podmenu, .menu-skup.otevrene .podmenu { opacity: 1; visibility: visible; transform: translateY(0); }
.menu .podmenu a { display: block; padding: 10px 14px; border-radius: 8px; color: #f1f3ff; white-space: normal; background: transparent; font-weight: normal; }
.menu .podmenu a b { display: block; font-size: 1rem; }
.menu .podmenu a small { display: block; margin-top: 2px; color: #a9b2ff; font-size: .78rem; }
.menu .podmenu a:hover, .menu .podmenu a:focus-visible { background: rgba(255, 255, 255, .11); color: #fff; transform: none; }
.menu .podmenu a[aria-current="page"] { background: rgba(120, 140, 255, .22); box-shadow: inset 3px 0 0 #7d8cff; color: #fff; }
.menu .podmenu a + a { margin-top: 4px; }

/* ---------- V16: Zombie přežití a Herní obchod ---------- */
.obch-stat { color: var(--sub); font-size: .8rem; }
.zombie-plat { cursor: none; }
.perky { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 12px 0; }
.perky[hidden], #zbrane[hidden] { display: none; }
.tl.perk { display: flex; flex-direction: column; gap: 4px; max-width: 220px; text-align: left; }
.tl.perk span { font-size: .85rem; font-weight: normal; }

/* ---------- V17: Dungeon a Závody ---------- */
.volby-skup { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 8px 0; }
.stitek-volby { text-align: center; margin: 10px 0 0; font-size: .9rem; color: var(--sub); }

/* V20: filtr v Historii */
.filtr { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.osa details.verze[hidden], .osa li[hidden] { display: none; }

/* V22: celá obrazovka her */
.cela-tl { margin-bottom: 8px; }
.hra-plocha:fullscreen { background: #0b0e1a; display: flex; flex-direction: column; align-items: center; justify-content: center; overflow: auto; padding: 8px; border: 0; border-radius: 0; }
.hra-plocha:-webkit-full-screen { background: #0b0e1a; display: flex; flex-direction: column; align-items: center; justify-content: center; overflow: auto; padding: 8px; border: 0; border-radius: 0; }
.hra-plocha:fullscreen .platno { width: min(100%, calc((100vh - 130px) * 900 / 560)); height: auto; max-width: none; }
.hra-plocha:-webkit-full-screen .platno { width: min(100%, calc((100vh - 130px) * 900 / 560)); height: auto; max-width: none; }

/* V22: Nástroje (průměr, beat, časovač) */
.prm-tab { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; }
.pr-radek { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pr-radek .pr-pole { width: 90px; }
.pr-cil { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 10px; }
.cas-velky { font-size: clamp(3rem, 14vw, 6rem); font-weight: 800; font-variant-numeric: tabular-nums; margin: 10px 0; color: var(--accent); }
.beat-ovl { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: center; gap: 14px; margin-bottom: 12px; }
.beat-mrizka { display: flex; flex-direction: column; gap: 6px; overflow-x: auto; padding-bottom: 6px; }
.beat-radek { display: flex; align-items: center; gap: 4px; min-width: 640px; }
.beat-nazev { width: 78px; flex: none; text-align: left; font: inherit; font-size: 0.85rem; background: none; color: var(--text); border: 0; cursor: pointer; }
.beat-nazev.ticho { text-decoration: line-through; opacity: 0.5; }
.bunka { flex: 1; min-width: 30px; height: 36px; padding: 0; border: 1px solid var(--border); border-radius: 4px; background: var(--bg); cursor: pointer; }
.bunka.dob { border-color: var(--accent); }
.bunka.zap { background: var(--hero); border-color: var(--hero); }
.bunka.hraje { outline: 3px solid var(--accent); outline-offset: -1px; }

/* V22: Herní automat */
.automat { display: flex; justify-content: center; gap: 10px; position: relative; margin: 14px auto; padding: 14px; width: fit-content; background: #1a1230; border: 3px solid #ffd23f; border-radius: 14px; }
.valec { width: 96px; background: #0e0a1f; border-radius: 8px; overflow: hidden; }
.sym { height: 84px; display: flex; align-items: center; justify-content: center; font-size: 2.6rem; opacity: 0.45; }
.sym.stred { opacity: 1; background: rgba(255, 210, 63, 0.12); }
.valec.toci .sym { filter: blur(1.2px); }
.platba-cara { position: absolute; left: 6px; right: 6px; top: 50%; height: 2px; background: rgba(255, 46, 147, 0.7); pointer-events: none; }
.automat.vyhra { animation: aut-zar 0.4s 3; }
@keyframes aut-zar { 50% { box-shadow: 0 0 28px 6px #ffd23f; } }
@media (max-width: 520px) { .valec { width: 76px; } .sym { height: 68px; font-size: 2.1rem; } }
@media (prefers-reduced-motion: reduce) { .automat.vyhra { animation: none; } }

/* V23: úrovně */
.lv-chip { margin-left: 6px; }
.xpbar { width: 100%; max-width: 280px; height: 8px; background: var(--border); border-radius: 999px; overflow: hidden; margin: 6px 0 2px; }
.xpbar span { display: block; height: 100%; width: 0; background: var(--hero); transition: width 0.4s; }

/* V23: mazlíček */
.mz-scena { position: relative; max-width: 460px; margin: 0 auto; border-radius: 14px; overflow: hidden; border: 1px solid var(--border); background: #fde9d3; }
.mz-scena svg { display: block; width: 100%; height: auto; }
.mz-rec { text-align: center; min-height: 1.5em; margin: 10px 0; font-weight: 600; }
.mz-jm { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; margin-bottom: 10px; }
.mz-jm .pr-pole { width: 150px; }
.mz-staty { display: grid; gap: 8px; max-width: 460px; margin: 0 auto 12px; }
.mz-staty > div { display: grid; grid-template-columns: 110px 1fr; align-items: center; gap: 8px; }
.mz-bar { max-width: none; height: 12px; }
.mz-obchod { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); margin-top: 10px; }
.mz-pol { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); }
.mz-pol.zamceno { opacity: 0.55; }
.mz-ik { font-size: 1.8rem; width: 40px; text-align: center; flex: none; }
.mz-txt { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.mz-txt small { color: var(--sub); }
.mz-start { padding: 40px 16px; text-align: center; color: #3a2b1b; }
.mz-srdce { position: absolute; bottom: 45%; font-size: 1.6rem; pointer-events: none; animation: mz-nahoru 1.2s ease-out forwards; }
@keyframes mz-nahoru { from { transform: translateY(0); opacity: 1; } to { transform: translateY(-90px); opacity: 0; } }
.zv-dych { transform-box: fill-box; transform-origin: 50% 100%; animation: zv-dych 3.2s ease-in-out infinite; }
@keyframes zv-dych { 50% { transform: scale(1.015, 1.03); } }
.zv-oci { transform-box: fill-box; transform-origin: 50% 50%; animation: zv-mrk 4.6s infinite; }
@keyframes zv-mrk { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(0.1); } }
@media (prefers-reduced-motion: reduce) { .zv-dych, .zv-oci, .mz-srdce { animation: none; } }

/* ---- V25: Město ---- */
.mesto-scena { max-width: 640px; margin: 0 auto; border-radius: 14px; overflow: hidden; border: 1px solid var(--border); }
.mesto-scena svg { display: block; width: 100%; height: auto; }
.mesto-auto { animation: mesto-jizda 14s linear infinite; }
@keyframes mesto-jizda { from { transform: translateX(0); } to { transform: translateX(440px); } }
.mesto-souhrn { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin: 14px 0 10px; }
.mesto-dlazdice { display: flex; flex-direction: column; gap: 4px; padding: 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg); }
.mesto-dlazdice b { font-size: 1.35rem; }
.mesto-dlazdice small { color: var(--sub); }
.mesto-dlazdice .xpbar { max-width: none; height: 8px; }
.mesto-seznam { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); margin-top: 10px; }
.mesto-karta { display: flex; flex-direction: column; gap: 10px; padding: 12px; border: 1px solid var(--border); border-left: 6px solid var(--mesto-c); border-radius: 12px; background: var(--bg); }
.mesto-karta.zamceno { opacity: 0.55; }
.mesto-karta.nova { border-style: dashed; border-left-style: solid; }
.mesto-hlava { display: flex; align-items: center; gap: 10px; }
.mesto-hlava div { display: flex; flex-direction: column; }
.mesto-hlava small { color: var(--sub); }
.mesto-ik { font-size: 2rem; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 10px; background: var(--mesto-c); flex: none; }
.mesto-hodnoty { display: grid; gap: 3px; font-size: 0.92rem; }
.mesto-radek { display: flex; justify-content: space-between; gap: 8px; border-bottom: 1px dashed var(--border); padding: 2px 0; }
.mesto-radek span { color: var(--sub); }
.mesto-radek.plus b { color: #2e9e4f; }
.mesto-milnik small { color: var(--sub); font-size: 0.8rem; }
.mesto-milnik .xpbar { max-width: none; height: 7px; margin-bottom: 3px; }
.mesto-karta .tl { width: 100%; }
@media (prefers-reduced-motion: reduce) { .mesto-auto { animation: none; } }

/* ---- V25: sekce na stránce Hry ---- */
.hry-sekce-tl { display: flex; width: 100%; align-items: center; justify-content: space-between; margin: 22px 0 10px; padding: 10px 14px; font: inherit; font-size: 1.15rem; font-weight: 700; color: var(--text); background: var(--card); border: 1px solid var(--border); border-radius: 12px; cursor: pointer; text-align: left; }
.hry-sekce-tl:hover { border-color: var(--accent); }
.hry-sekce-tl[hidden], main .mrizka[hidden] { display: none; }
.mz-cely { grid-column: 1 / -1; margin: 4px 0 0; }

/* ---- V26: mazlíček ---- */
.mz-potreby { text-align: center; font-weight: 600; }
.mz-hra { max-width: 460px; margin: 10px auto 0; text-align: center; }
.mz-hra[hidden] { display: none; }
.mz-hra canvas { display: block; width: 100%; height: auto; border-radius: 14px; border: 2px solid var(--accent); touch-action: none; margin-bottom: 8px; }

/* ---- V26: Pasivní příjem, nastavení, tečka ---- */
.pp-vse { font-size: 1.1rem; padding: 12px 26px; }
.pp-upoz { margin: 0; padding-left: 0; list-style: none; display: grid; gap: 6px; }
.pp-upoz li a, .pp-upoz li { color: var(--text); }
.pp-karty { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); margin-top: 16px; }
.pp-karta .xpbar { max-width: none; margin: 10px 0; }
.ns-radek { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--border); cursor: pointer; }
.ns-radek input { width: 22px; height: 22px; margin-top: 2px; flex: none; }
.ns-radek span { display: flex; flex-direction: column; }
.ns-radek small { color: var(--sub); }
.upoz-tecka { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; margin-left: 4px; border-radius: 999px; background: #e63946; color: #fff; font-size: 0.75rem; font-weight: 700; text-decoration: none; vertical-align: middle; animation: upoz-puls 2s ease-in-out infinite; }
.upoz-tecka[hidden] { display: none; }
@keyframes upoz-puls { 50% { transform: scale(1.15); } }
html.bez-animaci *, html.bez-animaci *::before, html.bez-animaci *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }

/* ---- V26: Úvod – Tvůj den a novinky ---- */
.uv-den { margin: 18px 0; }
.uv-den h2 { margin: 0 0 10px; }
.uv-den-mrizka { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.uv-den-pol { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg); color: var(--text); text-decoration: none; }
.uv-den-pol:hover { border-color: var(--accent); }
.uv-den-pol.pozor { border-color: #e63946; box-shadow: 0 0 0 2px rgba(230, 57, 70, 0.2); }
.uv-den-pol span:last-child { display: flex; flex-direction: column; min-width: 0; }
.uv-den-pol small { color: var(--sub); }
.uv-den-ik { font-size: 1.6rem; flex: none; }
.uv-nov-seznam { margin: 6px 0 0; padding-left: 18px; font-size: 0.9rem; }

/* ---- V26: menší karty a hledání na stránce Hry ---- */
.hry-hledat { display: block; width: 100%; max-width: 420px; margin: 18px 0 4px; padding: 10px 14px; font: inherit; color: var(--text); background: var(--card); border: 1px solid var(--border); border-radius: 999px; }
.hry-hledat:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.hry-mala main .mrizka { grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 12px; }
.hry-mala .hra { padding: 12px; }
.hry-mala .hra[hidden] { display: none; }
.hry-mala .hra-hlava { flex-direction: column; align-items: flex-start; gap: 8px; margin-bottom: 8px; padding-right: 36px; }
.hry-mala .hra h2 { font-size: 1rem; }
.hry-mala .hra .popis, .hry-mala .hra .uroven-popis { display: none; }
.hry-mala .hra .uroven { margin-bottom: 10px; }
.hry-mala .hra .uroven span { width: 18px; }
.hry-mala .hra .tlacitko { margin-top: auto; text-align: center; }
@media (hover: hover) { .hry-mala .hra:hover .popis { display: block; margin: 0 0 8px; font-size: 0.8rem; } }

/* ---- V27: menu se 4 položkami, logo a ☰ na mobilu ---- */
.menu-logo { font-weight: 800; margin-right: 8px; }
.menu-burger { display: none; margin: 8px 0 0; padding: 8px 14px; font: inherit; font-weight: 700; color: var(--head-text, #fff); background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .25); border-radius: 10px; cursor: pointer; }
@media (max-width: 700px) {
  .menu-burger { display: inline-block; }
  .zahlavi .menu { display: none; flex-direction: column; align-items: stretch; margin-top: 8px; }
  .zahlavi .menu.menu-otevrene { display: flex; }
  .menu-skup { flex-direction: column; }
  .menu .podmenu { position: static; opacity: 1; visibility: visible; transform: none; min-width: 0; margin: 4px 0 8px 10px; box-shadow: none; display: none; }
  .menu-skup.otevrene .podmenu, .menu-skup:focus-within .podmenu { display: block; }
}

/* ---- V27: jednotná hlavička stránek ---- */
.str-zpet { display: inline-block; margin: 4px 0 10px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); color: var(--text); text-decoration: none; font-size: 0.9rem; background: var(--card); }
.str-zpet:hover { border-color: var(--accent); }
.str-hlava { display: flex; align-items: center; gap: 14px; margin: 6px 0 18px; }
.str-ik { font-size: 2.2rem; width: 60px; height: 60px; display: grid; place-items: center; border-radius: 16px; background: var(--card); border: 1px solid var(--border); flex: none; }
.str-txt h1 { margin: 0; }
.str-popis { margin: 4px 0 0; color: var(--sub); }
.str-coiny { margin: 4px 0 0; font-size: 0.9rem; font-weight: 600; color: var(--text); }
@media (max-width: 600px) { .str-ik { width: 46px; height: 46px; font-size: 1.7rem; } }

/* ---- V27: nápověda ---- */
.nap-otaznik { position: fixed; right: 16px; bottom: 16px; z-index: 60; width: 42px; height: 42px; border-radius: 50%; border: 0; font: inherit; font-size: 1.3rem; font-weight: 800; color: #fff; background: var(--accent); box-shadow: 0 4px 14px rgba(0, 0, 0, .35); cursor: pointer; }
.nap-pozadi { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 16px; background: rgba(5, 8, 20, .6); }
.nap-okno { width: 100%; max-width: 420px; padding: 20px; border-radius: 16px; background: var(--card); color: var(--text); border: 1px solid var(--border); box-shadow: 0 20px 50px rgba(0, 0, 0, .45); }
.nap-nadpis { display: block; font-size: 1.1rem; margin-bottom: 8px; }
.nap-text { margin: 0 0 14px; line-height: 1.5; }
.nap-tecky { display: flex; gap: 6px; margin-bottom: 14px; }
.nap-tecky span { width: 8px; height: 8px; border-radius: 50%; background: var(--border); }
.nap-tecky span.zap { background: var(--accent); }
.nap-tl { display: flex; justify-content: flex-end; gap: 8px; }
.nap-tl [hidden] { display: none; }

/* ---- V27: Úvod jako rozcestník ---- */
.uv-dlazdice { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); margin: 18px 0; }
.uv-dl { display: flex; flex-direction: column; gap: 4px; padding: 18px; border-radius: 16px; border: 1px solid var(--border); background: var(--card); color: var(--text); text-decoration: none; transition: transform .15s, border-color .15s; }
.uv-dl:hover { transform: translateY(-3px); border-color: var(--accent); }
.uv-dl span { font-size: 2rem; }
.uv-dl b { font-size: 1.2rem; }
.uv-dl small { color: var(--sub); }
.uv-napos { margin: 0 0 18px; }
.uv-napos[hidden] { display: none; }
.uv-napos h2, .uv-novinky h2 { margin: 0 0 10px; }
.uv-napos-rada { display: flex; flex-wrap: wrap; gap: 8px; }
.uv-novinky { margin-bottom: 18px; }
