/* =====================================================================
   Zabi Čas – dizajnový systém
   Koncept: trhací kalendár. Každý deň je nový lístok, hry a kvízy sú
   farebné lístky, hotové veci dostanú pečiatku „HOTOVO“.
   ===================================================================== */
:root {
  --kb-1: #F6F3EC; --kb-2: #E3DED3; --kb-check: rgba(23,32,54,.045); --kb-edge: rgba(23,32,54,.08); --kb-veil: rgba(23,32,54,.84);
  /* plocha stola, papier, atrament */
  --desk: #E7EBEF;
  --desk-2: #DCE2E8;
  --paper: #FFFFFF;
  --paper-2: #F4F6F9;
  --ink: #172036;
  --ink-2: #4B556B;
  --ink-3: #7A8399;
  --line: #D3DAE3;
  /* signálne farby kalendára */
  --red: #E2382B;
  --red-ink: #FFFFFF;
  --gold: #E8A600;
  --green: #17925F;
  --miss: #9AA3B5;
  /* kategórie */
  /* farby kategórií sú vzorkované z podkladu ilustrácií, preto sa v tmavom režime nemenia */
  --c-vseobecny: #324FCF;
  --c-filmy: #933AC9;
  --c-priroda: #2A7E4B;
  --c-zdravie: #D13066;
  --c-historia: #9E550C;
  --c-zemepis: #037085;
  --c-sport: #CF411D;
  --c-auta: #334155;
  --c-obec: #15294E;
  --c-rok: #D23527;
  --c-slova: #3B3F9F;
  --c-rebus: #0E6B5C;
  --c-puzzle: #5F7514;
  --c-sudoku: #A35A00;
  --c-kamienky: #24123F;
  --tile-ink: #FFFFFF;
  --shadow: 0 1px 0 rgba(23, 32, 54, .06), 0 10px 30px -12px rgba(23, 32, 54, .28);
  --shadow-sm: 0 1px 0 rgba(23, 32, 54, .06), 0 4px 12px -6px rgba(23, 32, 54, .25);
  /* typografia */
  --f-display: "Unbounded", "Arial Black", system-ui, sans-serif;
  --f-digits: "Unbounded", "Arial Black", system-ui, sans-serif;
  --f-body: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
  --step--1: .8125rem;
  --step-0: 1rem;
  --step-1: 1.1875rem;
  --step-2: 1.5rem;
  --step-3: clamp(1.75rem, 1.4rem + 1.6vw, 2.375rem);
  --r-sm: 10px;
  --r: 16px;
  --r-lg: 22px;
  --nav-h: 64px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
  --kb-1: #4E5A70; --kb-2: #2C3445; --kb-check: rgba(255,255,255,.05); --kb-edge: rgba(255,255,255,.08); --kb-veil: rgba(13,19,34,.86);

    --desk: #0D1322; --desk-2: #121A2D; --paper: #18213A; --paper-2: #1F2945;
    --ink: #EEF1F8; --ink-2: #B0B9CE; --ink-3: #8790A8; --line: #2C3756;
    --red: #FF5B4D; --red-ink: #1A0D0B; --gold: #FFC531; --green: #3BCB8C; --miss: #5C6684;
    --shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 12px 32px -14px rgba(0, 0, 0, .7);
    --shadow-sm: 0 1px 0 rgba(0, 0, 0, .3), 0 4px 14px -6px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --kb-1: #4E5A70; --kb-2: #2C3445; --kb-check: rgba(255,255,255,.05); --kb-edge: rgba(255,255,255,.08); --kb-veil: rgba(13,19,34,.86);

  --desk: #0D1322; --desk-2: #121A2D; --paper: #18213A; --paper-2: #1F2945;
  --ink: #EEF1F8; --ink-2: #B0B9CE; --ink-3: #8790A8; --line: #2C3756;
  --red: #FF5B4D; --red-ink: #1A0D0B; --gold: #FFC531; --green: #3BCB8C; --miss: #5C6684;
  --shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 12px 32px -14px rgba(0, 0, 0, .7);
  --shadow-sm: 0 1px 0 rgba(0, 0, 0, .3), 0 4px 14px -6px rgba(0, 0, 0, .6);
  color-scheme: dark;
}

/* ---------- základ ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--desk);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: var(--step-0);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100%;
}
body::before {
  content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px);
  z-index: 40; background: var(--desk);
}
h1, h2, h3 { font-family: var(--f-display); font-weight: 700; line-height: 1.15; margin: 0; text-wrap: balance; letter-spacing: -.02em; }
p { margin: 0; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

/* ---------- hlavička ---------- */
.top {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30;
  background: color-mix(in srgb, var(--desk) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.top .wrap { display: flex; align-items: center; gap: 12px; padding-block: 10px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; }
.brand-logo, .brand-pic img { height: 40px; width: auto; display: block; flex: none; }
.brand-pic { display: block; }
.lg-ink { fill: var(--ink); }
.lg-acc { fill: var(--red); }
@media (max-width: 420px) { .brand-logo { height: 34px; } }
.brand-word { font-family: var(--f-display); font-weight: 800; font-size: 1.25rem; letter-spacing: -.04em; line-height: 1; }
.brand-word em { font-style: normal; color: var(--red); }
.top-nav { display: none; gap: 4px; }
.top-nav a, .top-nav button {
  text-decoration: none; padding: 8px 14px; border-radius: 10px; font-weight: 600; font-size: .9375rem;
  color: var(--ink-2); background: none; border: 0;
}
.top-nav a[aria-current="page"] { background: var(--ink); color: var(--desk); }
.chip-streak {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px 6px 9px; border-radius: 10px;
  background: var(--paper); box-shadow: var(--shadow-sm); font-weight: 700; font-size: .9375rem;
  border: 0; text-decoration: none;
}
.chip-streak svg { width: 18px; height: 18px; color: var(--red); }
.chip-streak[data-zero="1"] svg { color: var(--ink-3); }

/* ---------- spodná navigácia (mobil) ---------- */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  background: var(--paper);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  padding-left: max(8px, env(safe-area-inset-left, 0px));
  padding-right: max(8px, env(safe-area-inset-right, 0px));
}
.bottom-nav ul { list-style: none; margin: 0 auto; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); max-width: 520px; }
.bottom-nav a {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 9px 4px 8px;
  text-decoration: none; font-size: .75rem; font-weight: 600; color: var(--ink-3); letter-spacing: .01em;
}
.bottom-nav a svg { width: 24px; height: 24px; }
.bottom-nav a[aria-current="page"] { color: var(--ink); }
.bottom-nav a[aria-current="page"] svg { color: var(--red); }
main { padding-bottom: calc(var(--nav-h) + 28px + env(safe-area-inset-bottom, 0px)); }

@media (min-width: 900px) {
  .top-nav { display: flex; }
  .bottom-nav { display: none; }
  main { padding-bottom: 56px; }
}

/* ---------- domovská obrazovka ---------- */
.home { display: grid; gap: 28px; padding-top: 20px; }
@media (min-width: 900px) {
  .home { grid-template-columns: 340px minmax(0, 1fr); align-items: start; gap: 40px; padding-top: 32px; }
  .home-side { position: sticky; top: calc(84px + env(safe-area-inset-top, 0px)); }
}
.home-side { display: grid; gap: 18px; }
.home-main { display: grid; gap: 34px; min-width: 0; }

/* kalendárový lístok */
.pad { position: relative; padding-top: 14px; }
.pad::before, .pad::after { /* listy pod lístkom */
  content: ""; position: absolute; left: 10px; right: 10px; bottom: -6px; height: 40px;
  background: var(--paper-2); border-radius: 0 0 var(--r) var(--r); box-shadow: var(--shadow-sm); z-index: 0;
}
.pad::after { left: 20px; right: 20px; bottom: -12px; z-index: -1; opacity: .7; }
.leaf {
  position: relative; z-index: 1;
  background: var(--paper);
  border-radius: 6px 6px var(--r) var(--r);
  box-shadow: var(--shadow);
  padding: 30px 22px 22px;
  text-align: center;
  overflow: hidden;
}
.leaf-rings {
  position: absolute; left: 0; right: 0; top: -14px; z-index: 3; height: 28px;
  display: flex; justify-content: center; gap: 46px; pointer-events: none;
}
.leaf-rings span {
  width: 12px; height: 28px; border-radius: 6px;
  background: linear-gradient(90deg, #8b93a6, #e6e9ef 45%, #8b93a6);
  box-shadow: 0 2px 2px rgba(0,0,0,.25);
}
.leaf-top {
  position: absolute; left: 0; right: 0; top: 0; height: 12px;
  background-image: radial-gradient(circle at 50% 0, var(--desk) 3.5px, transparent 4px);
  background-size: 14px 12px; background-position: 7px 0;
}
.leaf-dow { font-family: var(--f-display); font-weight: 600; text-transform: uppercase; letter-spacing: .16em; font-size: .75rem; color: var(--red); }
.leaf-day {
  font-family: var(--f-digits); font-weight: 800; font-size: clamp(6rem, 27vw, 8.25rem); line-height: .9;
  letter-spacing: -.06em; margin: 6px 0 4px; color: var(--ink);
  font-variant-numeric: lining-nums;
}
.leaf[data-sunday="1"] .leaf-day { color: var(--red); }
.leaf-month { font-family: var(--f-display); font-weight: 600; font-size: 1.0625rem; letter-spacing: -.01em; }
.leaf-names { margin-top: 12px; display: grid; gap: 2px; font-size: 1rem; color: var(--ink-2); }
.leaf-names p { margin: 0; }
.leaf-names b { color: var(--ink); font-weight: 700; }
.leaf-tomorrow { font-size: var(--step--1); color: var(--ink-3); }
.leaf-meta {
  margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line);
  display: flex; justify-content: center; gap: 14px; flex-wrap: wrap;
  font-size: var(--step--1); color: var(--ink-2); font-variant-numeric: tabular-nums;
}
.leaf-meta b { color: var(--ink); font-weight: 700; }
.leaf.old {
  position: absolute; inset: 14px 0 auto 0; z-index: 2;
  transform-origin: 8% 0;
  animation: tear 1.1s cubic-bezier(.55, 0, .7, .35) .45s forwards;
}
@keyframes tear {
  0% { transform: rotate(0) translateY(0); opacity: 1; }
  25% { transform: rotate(-7deg) translateY(4px); opacity: 1; }
  100% { transform: rotate(-24deg) translate(-40px, 120vh); opacity: .2; }
}

/* dnešná dávka */
.dose {
  background: var(--ink); color: var(--desk); border-radius: var(--r-lg); padding: 18px 20px 20px;
  display: grid; gap: 12px; box-shadow: var(--shadow);
}
.dose-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.dose-title { font-family: var(--f-display); font-weight: 600; font-size: .9375rem; }
.dose-score { font-family: var(--f-digits); font-weight: 800; font-size: 1.75rem; line-height: 1; letter-spacing: -.04em; }
.dose-score small { font-family: var(--f-body); font-size: .8125rem; font-weight: 600; opacity: .7; margin-left: 4px; }
.dose-bar { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; }
.dose-bar i { height: 8px; border-radius: 3px; background: color-mix(in srgb, var(--desk) 22%, transparent); }
.dose-bar i[data-on="1"] { background: var(--red); }
.dose-bar i[data-on="2"] { background: var(--gold); }
.dose-foot { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: var(--step--1); opacity: .85; }
.dose-foot b { font-variant-numeric: tabular-nums; }

.join {
  background: var(--paper); border-radius: var(--r-lg); padding: 18px 20px; box-shadow: var(--shadow-sm);
  display: grid; gap: 10px;
}
.join h3 { font-size: 1.0625rem; }
.join p { color: var(--ink-2); font-size: .9375rem; }

/* sekcie */
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.sec-head h2 { font-size: 1.375rem; font-weight: 700; }
.sec-head span { color: var(--ink-3); font-size: var(--step--1); font-weight: 600; }

/* herné karty */
.games { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 620px) { .games { grid-template-columns: 1fr 1fr; } }
.game-card {
  position: relative; display: grid; grid-template-rows: auto 1fr auto; gap: 10px;
  min-height: 230px; padding: 20px; border-radius: var(--r-lg);
  background: var(--tile); color: var(--tile-ink); text-decoration: none; overflow: hidden;
  box-shadow: var(--shadow); isolation: isolate;
  transition: transform .18s ease, box-shadow .18s ease;
}
.game-card:hover { transform: translateY(-3px) rotate(-.4deg); }
.game-card h3 { font-size: 1.625rem; font-weight: 800; letter-spacing: -.04em; text-shadow: 0 2px 14px rgba(0,0,0,.25); }
.game-card p { opacity: .85; max-width: 30ch; font-size: .9375rem; }
.game-card .art { position: absolute; right: -18px; bottom: -22px; width: 190px; height: 190px; z-index: -1; opacity: .95; }
.game-kicker { font-size: .75rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; opacity: .75; }
.game-card[data-game="obec"], .play-head[data-game="obec"] { --tile: var(--c-obec); --art: url("../img/art/obec.webp"); }
.game-card[data-game="rok"], .play-head[data-game="rok"] { --tile: var(--c-rok); --art: url("../img/art/rok.webp"); }
[data-cat="vseobecny"] { --art: url("../img/art/vseobecny.webp"); }
[data-cat="filmy"] { --art: url("../img/art/filmy.webp"); }
[data-cat="priroda"] { --art: url("../img/art/priroda.webp"); }
[data-cat="zdravie"] { --art: url("../img/art/zdravie.webp"); }
[data-cat="historia"] { --art: url("../img/art/historia.webp"); }
[data-cat="zemepis"] { --art: url("../img/art/zemepis.webp"); }
[data-cat="sport"] { --art: url("../img/art/sport.webp"); }
[data-cat="auta"] { --art: url("../img/art/auta.webp"); }
.game-card {
  min-height: 0; padding-top: 0; grid-template-rows: auto auto auto auto; gap: 8px;
  background: var(--tile);
}
.game-art {
  display: block; margin: 0 -20px 2px; aspect-ratio: 2 / 1;
  background: var(--art) 78% 38% / 128% auto no-repeat;
  -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent);
  mask-image: linear-gradient(180deg, #000 70%, transparent);
  transition: transform .4s ease;
}
.game-card:hover .game-art { transform: scale(1.03); }
.game-card .art { display: none; }
.game-card p { max-width: 40ch; }
.game-card .btn-play { margin-top: 6px; }

.btn-play {
  justify-self: start; display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px; border-radius: 999px; font-weight: 700; font-size: .9375rem;
  background: var(--paper); color: var(--ink);
}
.btn-play svg { width: 16px; height: 16px; }

/* kvízové lístky */
.tiles { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 620px) { .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tile {
  position: relative; display: grid; grid-template-rows: 1fr auto auto; gap: 6px; min-height: 0; aspect-ratio: 1 / 1.08;
  padding: 14px 14px 13px; border-radius: var(--r); text-decoration: none;
  background: var(--art) center top / 100% auto no-repeat, var(--tile); color: var(--tile-ink); overflow: hidden; isolation: isolate;
  box-shadow: var(--shadow-sm); transition: transform .18s ease, box-shadow .18s ease;
}
.tile:hover { box-shadow: var(--shadow); }
.tile[data-cat="obec"], .tile[data-cat="rok"] { background-size: auto 100%; background-position: right center; }
.tile[data-cat="obec"] { --art: url("../img/art/obec.webp"); --tile: var(--c-obec); }
.tile[data-cat="rok"] { --art: url("../img/art/rok.webp"); --tile: var(--c-rok); }
.tile:hover { transform: translateY(-2px); }
.tile svg.ico { display: none; }
.tile h3 { font-size: .9375rem; font-weight: 700; align-self: end; letter-spacing: -.02em; line-height: 1.2; text-shadow: 0 1px 10px rgba(0,0,0,.3); }
.tile .meta { font-size: .75rem; font-weight: 600; opacity: .85; display: flex; justify-content: space-between; gap: 6px; }
.tile::before, .tile::after { /* výrezy lístka ako na vstupenke */
  content: ""; position: absolute; top: calc(50% - 9px); width: 18px; height: 18px; border-radius: 50%;
  background: var(--desk);
}
.tile::before { left: -9px; }
.tile::after { right: -9px; }
.tile-cat { --tile: var(--c-vseobecny); }
.tile[data-cat="filmy"] { --tile: var(--c-filmy); }
.tile[data-cat="priroda"] { --tile: var(--c-priroda); }
.tile[data-cat="zdravie"] { --tile: var(--c-zdravie); }
.tile[data-cat="historia"] { --tile: var(--c-historia); }
.tile[data-cat="zemepis"] { --tile: var(--c-zemepis); }
.tile[data-cat="sport"] { --tile: var(--c-sport); }
.tile[data-cat="auta"] { --tile: var(--c-auta); }

/* pečiatka HOTOVO */
.stamp {
  position: absolute; right: 10px; top: 12px; z-index: 2;
  font-family: var(--f-digits); font-weight: 800; font-size: .8125rem; letter-spacing: .08em;
  color: var(--paper); border: 3px solid var(--paper); border-radius: 8px; padding: 2px 8px 0;
  transform: rotate(9deg); background: rgba(0,0,0,.18);
  box-shadow: inset 0 0 0 2px rgba(0,0,0,.08);
}
.stamp b { font-size: .8em; margin-left: 4px; letter-spacing: 0; }
.game-card .stamp { font-size: 1rem; top: 18px; right: 16px; }
.stamp.pop { animation: stamp .45s cubic-bezier(.2, 1.6, .4, 1) both; }
@keyframes stamp { from { transform: rotate(-10deg) scale(2.2); opacity: 0; } to { transform: rotate(9deg) scale(1); opacity: 1; } }

/* ---------- herné obrazovky ---------- */
.play { padding-top: 16px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; max-width: 720px; margin: 0 auto; }
.play-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.back {
  display: inline-flex; align-items: center; gap: 6px; text-decoration: none; font-weight: 700;
  padding: 8px 12px 8px 8px; border-radius: 999px; background: var(--paper); box-shadow: var(--shadow-sm); font-size: .9375rem;
}
.back svg { width: 18px; height: 18px; }
.tries { font-weight: 700; font-size: .9375rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }

.play-head {
  border-radius: var(--r-lg); padding: 22px 20px 20px; color: var(--tile-ink); background: var(--tile);
  position: relative; overflow: hidden; isolation: isolate; box-shadow: var(--shadow);
}
.play-head .art { display: none; }
.play-head { min-height: 200px; display: flex; flex-direction: column; justify-content: flex-end;
  background: linear-gradient(90deg, var(--tile) 0, color-mix(in srgb, var(--tile) 80%, transparent) 30%, transparent 62%), var(--art) right center / auto 100% no-repeat, var(--tile); }
.play-head.quiz-head { background: linear-gradient(90deg, var(--tile) 0, color-mix(in srgb, var(--tile) 80%, transparent) 38%, transparent 66%), var(--art) right -10px top 0 / auto 150% no-repeat, var(--tile); }
.play-head p { max-width: 34ch; text-shadow: 0 1px 10px rgba(0,0,0,.3); }
.play-head .kicker { font-size: .75rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; opacity: .8; }
.play-head h1 { font-size: clamp(1.625rem, 1.3rem + 1.6vw, 2.25rem); font-weight: 800; letter-spacing: -.04em; margin-top: 6px; text-shadow: 0 2px 14px rgba(0,0,0,.25); }
.play-head p { margin-top: 8px; opacity: .9; max-width: 46ch; }

.card { background: var(--paper); border-radius: var(--r-lg); padding: 18px; box-shadow: var(--shadow-sm); }
.event-card { padding: 24px 20px; text-align: center; }
.event-card .label { font-size: .75rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.event-card p { font-family: var(--f-display); font-weight: 700; font-size: clamp(1.375rem, 1.1rem + 1.4vw, 1.875rem); line-height: 1.2; margin-top: 10px; text-wrap: balance; }

.hints { display: flex; gap: 8px; flex-wrap: wrap; }
.hint {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
  background: var(--paper); border: 1.5px dashed var(--line); font-size: .875rem; color: var(--ink-3); font-weight: 600;
}
.hint[data-open="1"] { border-style: solid; border-color: var(--gold); color: var(--ink); background: color-mix(in srgb, var(--gold) 14%, var(--paper)); }

/* vstup + našepkávač */
.guess-form { display: flex; gap: 8px; position: relative; }
.field {
  flex: 1; min-width: 0; height: 54px; padding: 0 16px; border-radius: 14px;
  border: 2px solid var(--line); background: var(--paper); font-size: 1.0625rem; font-weight: 600;
}
.field:focus { outline: none; border-color: var(--ink); }
.btn {
  height: 54px; padding: 0 20px; border-radius: 14px; border: 0; font-weight: 700; font-size: 1rem;
  background: var(--ink); color: var(--desk); display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: transform .12s ease;
}
.btn:active { transform: scale(.97); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn-red { background: var(--red); color: var(--red-ink); }
.btn-ghost { background: var(--paper); color: var(--ink); box-shadow: inset 0 0 0 2px var(--line); }
.btn-sm { height: 42px; padding: 0 16px; border-radius: 12px; font-size: .9375rem; }
.btn svg { width: 18px; height: 18px; }
.suggest {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 20; list-style: none; margin: 0; padding: 6px;
  background: var(--paper); border-radius: 14px; box-shadow: var(--shadow); max-height: 260px; overflow-y: auto;
}
.suggest li { padding: 10px 12px; border-radius: 10px; display: flex; justify-content: space-between; gap: 10px; cursor: pointer; font-weight: 600; }
.suggest li small { color: var(--ink-3); font-weight: 500; }
.suggest li[aria-selected="true"], .suggest li:hover { background: var(--paper-2); }

/* riadky tipov */
.guesses { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.guess {
  display: grid; grid-template-columns: minmax(0, 1fr) auto 44px; align-items: center; gap: 10px;
  background: var(--paper); border-radius: 14px; padding: 10px 10px 10px 14px; box-shadow: var(--shadow-sm);
  position: relative; overflow: hidden; animation: slidein .35s ease both;
}
.guess .name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.guess .name small { display: block; font-weight: 500; color: var(--ink-3); font-size: .75rem; }
.guess .dist { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--ink-2); font-size: .9375rem; }
.guess .dir {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--paper-2);
}
.guess .dir svg { width: 24px; height: 24px; transition: transform .6s cubic-bezier(.2, 1.4, .4, 1); }
.guess .heat { position: absolute; left: 0; bottom: 0; height: 4px; background: var(--heat, var(--miss)); }
.guess[data-hit="1"] { box-shadow: inset 0 0 0 2px var(--green), var(--shadow-sm); }
.guess[data-hit="1"] .dir { background: var(--green); color: #fff; }
.guess.empty { background: transparent; box-shadow: none; border: 2px dashed var(--line); min-height: 52px; animation: none; }
@keyframes slidein { from { transform: translateY(-6px); opacity: 0; } to { transform: none; opacity: 1; } }

/* výsledok */
.result { display: grid; gap: 14px; text-align: center; padding: 24px 20px; position: relative; overflow: hidden; }
.result .big { font-family: var(--f-digits); font-weight: 800; font-size: 3.5rem; line-height: .95; letter-spacing: -.05em; }
.result h2 { font-size: var(--step-2); }
.result p { color: var(--ink-2); }
.result .grid-emoji { font-size: 1.5rem; letter-spacing: 3px; }
.result .actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.mini-map { width: 100%; max-width: 420px; justify-self: center; aspect-ratio: 16 / 7; }
.next-up { display: grid; gap: 10px; }
.next-up h3 { font-size: 1.0625rem; text-align: left; }

/* ---------- kvíz ---------- */
.quiz-head { padding-bottom: 18px; }
.qdots { display: flex; gap: 6px; margin-top: 14px; }
.qdots i { flex: 1; height: 6px; border-radius: 3px; background: rgba(255,255,255,.28); }
.qdots i[data-s="cur"] { background: rgba(255,255,255,.95); }
.qdots i[data-s="ok"] { background: #7CF0B8; }
.qdots i[data-s="bad"] { background: #FFB0A8; }
.question { font-family: var(--f-display); font-weight: 700; font-size: clamp(1.25rem, 1.05rem + 1vw, 1.625rem); line-height: 1.25; text-wrap: balance; }
.options { display: grid; gap: 10px; margin-top: 18px; }
.opt {
  display: flex; align-items: center; gap: 12px; text-align: left; width: 100%;
  min-height: 56px; padding: 12px 14px; border-radius: 14px; background: var(--paper-2);
  border: 2px solid transparent; font-weight: 600; font-size: 1.0313rem; color: var(--ink);
  transition: transform .1s ease, border-color .15s ease, background .15s ease;
}
.opt:hover:not([disabled]) { border-color: var(--line); }
.opt:active:not([disabled]) { transform: scale(.99); }
.opt .key {
  flex: none; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  background: var(--paper); font-weight: 800; font-size: .875rem; color: var(--ink-2); box-shadow: var(--shadow-sm);
}
.opt[disabled] { cursor: default; }
.opt[data-state="ok"] { background: color-mix(in srgb, var(--green) 16%, var(--paper)); border-color: var(--green); }
.opt[data-state="ok"] .key { background: var(--green); color: #fff; }
.opt[data-state="bad"] { background: color-mix(in srgb, var(--red) 13%, var(--paper)); border-color: var(--red); }
.opt[data-state="bad"] .key { background: var(--red); color: #fff; }
.opt[data-state="dim"] { opacity: .55; }
.explain {
  margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: var(--paper-2); color: var(--ink-2);
  font-size: .9375rem; border-left: 4px solid var(--gold);
}
.explain b { color: var(--ink); }
.quiz-next { margin-top: 16px; display: flex; justify-content: flex-end; }
.recap { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; text-align: left; }
.recap li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; font-size: .9375rem; }
.recap li .m { font-weight: 800; }
.recap li .m.ok { color: var(--green); }
.recap li .m.bad { color: var(--red); }
.recap li small { display: block; color: var(--ink-3); }

/* ---------- profil a rebríček ---------- */
.page { padding-top: 20px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; max-width: 860px; margin: 0 auto; }
.page h1 { font-size: var(--step-3); font-weight: 800; }
.stats { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 620px) { .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stat { background: var(--paper); border-radius: var(--r); padding: 14px 16px; box-shadow: var(--shadow-sm); }
.stat b { display: block; font-family: var(--f-digits); font-weight: 800; font-size: 1.875rem; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.stat span { font-size: .8125rem; color: var(--ink-2); font-weight: 600; }
.bars { display: grid; gap: 10px; }
.bar-row { display: grid; grid-template-columns: 120px minmax(0, 1fr) 48px; gap: 10px; align-items: center; font-size: .9375rem; }
.bar-row .track { height: 12px; border-radius: 6px; background: var(--paper-2); overflow: hidden; }
.bar-row .fill { height: 100%; border-radius: 6px; background: var(--tile, var(--ink)); }
.bar-row .pct { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.bar-row .lbl { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.history li { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; padding: 10px 14px; background: var(--paper); border-radius: 12px; font-size: .9375rem; }
.history li .d { font-weight: 700; }
.history li .n { color: var(--ink-3); font-size: .8125rem; }
.history li .p { font-weight: 800; font-variant-numeric: tabular-nums; }
.history li.locked { opacity: .55; }
.tabs { display: inline-flex; padding: 4px; background: var(--paper); border-radius: 999px; box-shadow: var(--shadow-sm); gap: 2px; }
.tabs button { border: 0; background: none; padding: 8px 16px; border-radius: 999px; font-weight: 700; font-size: .9375rem; color: var(--ink-2); }
.tabs button[aria-selected="true"] { background: var(--ink); color: var(--desk); }
.form { display: grid; gap: 12px; }
.form label { display: grid; gap: 6px; font-weight: 600; font-size: .9375rem; }
.form .note { font-size: .8125rem; color: var(--ink-3); }
.form .err { color: var(--red); font-weight: 600; font-size: .9375rem; }
.board { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; counter-reset: rank; }
.board li { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; padding: 10px 14px; background: var(--paper); border-radius: 12px; }
.board li .rk { font-family: var(--f-digits); font-weight: 800; font-size: 1.125rem; color: var(--ink-3); }
.board li:nth-child(-n+3) .rk { color: var(--red); }
.board li .nm { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board li .pt { font-weight: 800; font-variant-numeric: tabular-nums; }
.board li[data-me="1"] { box-shadow: inset 0 0 0 2px var(--red); }
.empty-state { text-align: center; padding: 34px 20px; color: var(--ink-2); display: grid; gap: 8px; justify-items: center; }
.empty-state svg { width: 64px; height: 64px; color: var(--ink-3); }
.empty-state h3 { color: var(--ink); font-size: 1.125rem; }
.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.seg button { border: 2px solid var(--line); background: var(--paper); border-radius: 999px; padding: 6px 14px; font-weight: 600; font-size: .875rem; }
.seg button[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: var(--desk); }

/* ---------- pätička, toast ---------- */
.foot { margin-top: 40px; padding-block: 22px; border-top: 1px solid var(--line); color: var(--ink-3); font-size: .8125rem; display: flex; gap: 14px; flex-wrap: wrap; justify-content: space-between; }
.foot a { color: var(--ink-2); }
.toast {
  position: fixed; left: 50%; bottom: calc(var(--nav-h) + 20px + env(safe-area-inset-bottom, 0px)); z-index: 60;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--ink); color: var(--desk); padding: 12px 18px; border-radius: 999px; font-weight: 700; font-size: .9375rem;
  box-shadow: var(--shadow); transition: opacity .2s ease, transform .2s ease; max-width: calc(100% - 32px); text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (min-width: 900px) { .toast { bottom: 28px; } }

/* konfety pri výhre */
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 70; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .leaf.old { display: none; }
}

/* hlavičky hier: ilustrácia vpravo hore, text pod ňou */
.play-head[data-game] {
  padding-top: clamp(150px, 46vw, 200px);
  background: var(--art) right -10px top -8px / min(80%, 400px) auto no-repeat, var(--tile);
}
@media (min-width: 700px) {
  .play-head[data-game] { padding-top: 22px; min-height: 230px; background: linear-gradient(90deg, var(--tile) 0, color-mix(in srgb, var(--tile) 85%, transparent) 40%, transparent 62%), var(--art) right -10px center / auto 112% no-repeat, var(--tile); }
}

/* ---------- archív a nedostupný obsah ---------- */
.bottom-nav ul { grid-template-columns: repeat(4, 1fr); }
.tile[data-off], .game-card[data-off] { filter: grayscale(.85); opacity: .55; cursor: default; }
.tile[data-off]:hover, .game-card[data-off]:hover { transform: none; }
.arch-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.arch-day {
  display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 14px; align-items: center;
  padding: 10px 14px 10px 10px; border-radius: 14px; background: var(--paper-2); text-decoration: none;
  transition: background .15s ease;
}
.arch-day:hover { background: color-mix(in srgb, var(--ink) 7%, var(--paper-2)); }
.arch-date { display: grid; place-items: center; height: 56px; border-radius: 12px; background: var(--paper); box-shadow: var(--shadow-sm); line-height: 1.05; }
.arch-date b { font-family: var(--f-digits); font-size: 1.25rem; letter-spacing: -.04em; }
.arch-date span { font-size: .6875rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--red); }
.arch-info { display: grid; gap: 6px; min-width: 0; }
.arch-dow { font-weight: 700; text-transform: capitalize; }
.arch-dots { display: flex; gap: 4px; flex-wrap: wrap; }
.arch-dots i { width: 14px; height: 14px; border-radius: 4px; background: var(--tile); opacity: .28; }
.arch-dots i[data-done="1"] { opacity: 1; }
.arch-dots i[data-has="0"] { background: var(--line); opacity: 1; }
.arch-done { font-weight: 700; color: var(--ink-2); font-size: .875rem; }

/* ---------- spoločné drobnosti ---------- */
.hint-txt { font-size: .8125rem; color: var(--ink-3); }
.row-sb { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.btn-xs { height: 34px; padding: 0 12px; border-radius: 10px; font-size: .8125rem; }
.tabs a { text-decoration: none; padding: 7px 14px; border-radius: 999px; font-weight: 700; font-size: .875rem; color: var(--ink-2); white-space: nowrap; }
.tabs a[aria-selected="true"] { background: var(--ink); color: var(--desk); }
.rankbar { position: relative; height: 10px; border-radius: 5px; background: var(--paper-2); overflow: hidden; margin: 8px 0 6px; }
.rankbar span { position: absolute; inset: 0 auto 0 0; border-radius: 5px; background: linear-gradient(90deg, var(--gold), var(--red)); transition: width .4s ease; }
.rankbar i { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--paper); }

/* ---------- Slovotvorba ---------- */
.game-card[data-game="slova"], .play-head[data-game="slova"] { --tile: var(--c-slova); --art: url("../img/art/slova.svg"); }
.game-card[data-game="rebus"], .play-head[data-game="rebus"] { --tile: var(--c-rebus); --art: url("../img/art/rebus.svg"); }
.tile[data-cat="rebus"] { --tile: var(--c-rebus); --art: url("../img/art/rebus.svg"); background-size: auto 100%; background-position: right center; }
.tile[data-cat="slova"] { --tile: var(--c-slova); --art: url("../img/art/slova.svg"); background-size: auto 100%; background-position: right center; }
@media (min-width: 620px) {
  .game-card[data-game="slova"], .game-card[data-game="rebus"] { grid-column: 1 / -1; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto auto 1fr auto; padding-top: 20px; column-gap: 20px; }
  .game-card[data-game="slova"] .game-art, .game-card[data-game="rebus"] .game-art { grid-column: 2; grid-row: 1 / span 4; margin: -20px -20px -20px 0; aspect-ratio: auto; min-height: 220px; background-position: right center; background-size: cover; -webkit-mask-image: linear-gradient(90deg, transparent, #000 30%); mask-image: linear-gradient(90deg, transparent, #000 30%); }
  .game-card[data-game="slova"] > :not(.game-art):not(.stamp), .game-card[data-game="rebus"] > :not(.game-art):not(.stamp) { grid-column: 1; }
}
.rankcard .rank { font-family: var(--f-display); font-size: 1.125rem; letter-spacing: -.02em; }
.rankcard .ptsl { color: var(--ink-2); font-size: .9375rem; }
.wboard { display: grid; gap: 16px; justify-items: center; }
.wcurrent { min-height: 52px; display: flex; gap: 4px; align-items: center; justify-content: center; flex-wrap: wrap; text-align: center; }
.wcurrent span { font-family: var(--f-display); font-weight: 800; font-size: 1.75rem; text-transform: uppercase; letter-spacing: .02em; animation: slidein .15s ease both; }
.wcurrent em { font-style: normal; color: var(--ink-3); font-size: .9375rem; }
.wmsg { font-family: var(--f-display); font-size: 1.125rem; color: var(--green); animation: slidein .2s ease both; }
.wmsg[data-kind="bad"] { color: var(--red); }
.wmsg[data-kind="full"] { color: var(--gold); font-size: 1.375rem; }
.rack { display: grid; grid-template-columns: repeat(7, minmax(0, 56px)); justify-content: center; width: 100%; gap: 6px; padding: 10px; border-radius: 18px; background: color-mix(in srgb, var(--c-slova) 14%, var(--paper-2)); }
.ltile {
  width: 100%; aspect-ratio: 1; border: 0; border-radius: 10px; padding: 0;
  background: linear-gradient(180deg, #FFF8E7, #F1DFB6); color: #2A2F7A;
  font-family: var(--f-display); font-weight: 800; font-size: clamp(1.125rem, 4.6vw, 1.5rem);
  box-shadow: 0 4px 0 #C9A96A, 0 8px 14px -6px rgba(0,0,0,.35); transition: transform .12s ease, opacity .12s ease;
}
.ltile:active { transform: translateY(3px); box-shadow: 0 1px 0 #C9A96A; }
.ltile[data-used="1"] { opacity: .3; transform: translateY(3px); box-shadow: 0 1px 0 #C9A96A; }
.wactions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.wgroup { display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 10px; padding: 8px 0; border-top: 1px dashed var(--line); }
.wgroup:first-of-type { border-top: 0; }
.wlen { font-size: .75rem; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; padding-top: 5px; }
.wchips { display: flex; flex-wrap: wrap; gap: 6px; }
.wchip { padding: 4px 10px; border-radius: 999px; background: var(--paper-2); font-weight: 600; font-size: .9375rem; color: var(--ink-3); }
.wchip[data-found="1"] { background: color-mix(in srgb, var(--c-slova) 16%, var(--paper)); color: var(--ink); }
.wchip[data-full="1"] { box-shadow: inset 0 0 0 2px var(--gold); }

/* ---------- Kamienky ---------- */
.tile[data-cat="kamienky"] { --tile: var(--c-kamienky); --art: url("../img/art/kamienky.svg"); background-size: auto 100%; background-position: right center; }
.relax-card {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr); border-radius: var(--r-lg); overflow: hidden;
  background: var(--c-kamienky); color: #fff; box-shadow: var(--shadow); isolation: isolate;
}
.relax-art { display: block; aspect-ratio: 2 / 1; background: url("../img/art/kamienky.svg") 70% center / cover no-repeat; -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent); mask-image: linear-gradient(180deg, #000 70%, transparent); }
.relax-txt { padding: 0 20px 20px; display: grid; gap: 8px; }
.relax-txt h3 { font-size: 1.625rem; font-weight: 800; letter-spacing: -.04em; }
.relax-txt p { opacity: .88; max-width: 52ch; }
.relax-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.relax-btns .btn-play { text-decoration: none; }
.btn-play.ghost { background: rgba(255,255,255,.14); color: #fff; box-shadow: inset 0 0 0 2px rgba(255,255,255,.35); }
.relax-card .stamp { top: 16px; right: 16px; }
@media (min-width: 620px) {
  .relax-card { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .relax-art { order: 2; aspect-ratio: auto; min-height: 220px; background-size: cover; -webkit-mask-image: linear-gradient(90deg, transparent, #000 30%); mask-image: linear-gradient(90deg, transparent, #000 30%); }
  .relax-txt { padding: 22px; align-content: center; }
}
.kplay .play-bar { flex-wrap: wrap; }
.khud { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.khud div { background: var(--paper); border-radius: 14px; padding: 10px 12px; box-shadow: var(--shadow-sm); display: grid; }
.khud span { font-size: .75rem; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; }
.khud b { font-family: var(--f-digits); font-size: 1.375rem; letter-spacing: -.04em; }
.kboard-wrap { position: relative; width: 100%; max-width: 520px; justify-self: center; }
.kboard {
  position: relative; width: 100%; aspect-ratio: 1; border-radius: 20px; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none;
  background:
    repeating-conic-gradient(var(--kb-check) 0 25%, transparent 0 50%) 0 0 / 25% 25%,
    linear-gradient(180deg, var(--kb-1), var(--kb-2));
  box-shadow: inset 0 0 0 1px var(--kb-edge), var(--shadow);
}
.gem { position: absolute; left: 0; top: 0; padding: 0; transition: transform .22s cubic-bezier(.3, .9, .4, 1.15), opacity .22s ease; cursor: pointer; will-change: transform; }
.gem svg { width: 90%; height: 90%; margin: 5%; display: block; overflow: visible; filter: drop-shadow(0 4px 3px rgba(0,0,0,.45)); transition: transform .15s ease; }
.gem.sel svg { transform: scale(1.14); filter: drop-shadow(0 0 6px #fff) drop-shadow(0 3px 2px rgba(0,0,0,.35)); }
.gem.gone { opacity: 0; }
.gem.gone svg { transform: scale(.2) rotate(40deg); transition: transform .24s ease; }
.gem.born svg { animation: born .35s cubic-bezier(.2, 1.6, .4, 1); }
.gem.hint svg { animation: wiggle 1s ease-in-out infinite; }
.gem .gfx { fill: none; stroke: #fff; stroke-width: 6; stroke-linecap: round; filter: drop-shadow(0 0 3px #fff) drop-shadow(0 0 6px rgba(255,255,255,.8)); opacity: .9; }
.gem .gstar { animation: gstar 2.4s ease-in-out infinite; }
@keyframes gstar { 0%, 100% { filter: drop-shadow(0 0 4px rgba(255,255,255,.7)) drop-shadow(0 3px 2px rgba(0,0,0,.35)); } 50% { filter: drop-shadow(0 0 12px rgba(255,240,200,1)) drop-shadow(0 3px 2px rgba(0,0,0,.35)); } }
@keyframes born { from { transform: scale(.3); } to { transform: scale(1); } }
@keyframes wiggle { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-9deg) scale(1.06); } 75% { transform: rotate(9deg) scale(1.06); } }
.kpop { position: absolute; transform: translate(-50%, -50%); font-family: var(--f-display); font-weight: 800; color: #fff; text-shadow: 0 2px 8px rgba(0,0,0,.6); pointer-events: none; animation: kpop .8s ease-out forwards; z-index: 5; white-space: nowrap; }
@keyframes kpop { from { opacity: 0; transform: translate(-50%, -30%) scale(.8); } 20% { opacity: 1; } to { opacity: 0; transform: translate(-50%, -160%) scale(1.1); } }
.kend { position: absolute; inset: 0; display: grid; place-items: center; padding: 16px; background: var(--kb-veil); border-radius: 20px; backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); color: #fff; text-align: center; z-index: 10; }
.kend-in { display: grid; gap: 10px; justify-items: center; }
.kend .big { font-family: var(--f-digits); font-size: 3rem; font-weight: 800; letter-spacing: -.05em; }
.kend .kicker { font-size: .75rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; opacity: .8; }
.kend .actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.kend .btn-ghost { background: rgba(255,255,255,.14); color: #fff; box-shadow: inset 0 0 0 2px rgba(255,255,255,.35); text-decoration: none; }
.kmsg { text-align: center; }

/* ---------- úroveň v profile ---------- */
.levelcard { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; align-items: center; }
.lvl-badge {
  width: 72px; height: 72px; border-radius: 22px; display: grid; place-items: center; transform: rotate(-6deg);
  background: linear-gradient(135deg, var(--gold), var(--red)); color: #fff; font-family: var(--f-digits); font-size: 2rem; font-weight: 800;
  box-shadow: var(--shadow-sm);
}
.lvl-info { display: grid; }
.lvl-info b { font-family: var(--f-display); font-size: 1.25rem; letter-spacing: -.02em; }

.linklike { background: none; border: 0; padding: 0; color: var(--ink-2); text-decoration: underline; font-weight: 600; font-size: .875rem; justify-self: start; cursor: pointer; }

/* ---------- Hádaj obec: zašifrovaný názov ---------- */
.cipher { background: var(--paper); border-radius: var(--r); box-shadow: var(--shadow-sm); padding: 14px 14px 16px; display: grid; gap: 10px; }
.cipher-head { display: flex; justify-content: space-between; gap: 10px; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); }
.cipher-tiles { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 14px; }
.cw-word { display: flex; gap: 4px; }
.cw-gap { display: none; }
.cipher-tiles i {
  width: clamp(24px, 7.4vw, 34px); aspect-ratio: 4 / 5; border-radius: 8px; display: grid; place-items: center;
  font-style: normal; font-family: var(--f-display); font-weight: 800; font-size: clamp(.95rem, 3.6vw, 1.25rem);
  background: var(--paper-2); box-shadow: inset 0 0 0 2px var(--line); color: var(--ink);
}
.cipher-tiles i.cw-open { background: var(--ink); color: var(--paper); box-shadow: none; animation: cw-flip .45s cubic-bezier(.3, 1.4, .5, 1); }
.cipher-tiles i.cw-sep { background: none; box-shadow: none; width: 10px; }
@keyframes cw-flip { from { transform: rotateX(90deg); } to { transform: rotateX(0); } }
@media (prefers-reduced-motion: reduce) { .cipher-tiles i.cw-open { animation: none; } }

/* ---------- Rébus ---------- */
.rbx { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; min-width: 0; }
.rbx .guess-form { min-width: 0; }
.rbx-head { display: flex; align-items: center; gap: 10px; font-size: .8125rem; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; }
.rb-kat { background: color-mix(in srgb, var(--c-rebus) 14%, var(--paper-2)); color: var(--c-rebus); padding: 3px 9px; border-radius: 8px; }
.rb-left, .rb-pts { margin-left: auto; text-transform: none; letter-spacing: 0; }
.rbx[data-state="ok"] .rb-pts { color: var(--green); }
.rb-emoji { font-size: clamp(2.4rem, 11vw, 3.4rem); line-height: 1.2; text-align: center; letter-spacing: .12em; padding: 14px 6px; border-radius: 14px; background: var(--paper-2); font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; overflow-wrap: anywhere; }
.rbx-locked { opacity: .55; }
.rbx-locked .rb-emoji { color: var(--ink-3); font-family: var(--f-display); font-weight: 800; letter-spacing: .3em; }
.rb-cipher { justify-content: center; }
.rb-hint { margin: 0; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--gold) 20%, var(--paper)); font-weight: 600; }
.rb-steps { margin: 0; font-size: var(--step--1); color: var(--ink-3); text-align: center; }
.rb-wrong { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.rb-wrong li { padding: 4px 10px; border-radius: 8px; background: var(--paper-2); color: var(--ink-3); text-decoration: line-through; font-size: .9375rem; }
.rb-answer { margin: 0; display: grid; gap: 2px; text-align: center; font-size: 1.0625rem; }
.rb-answer b { font-family: var(--f-display); font-size: 1.25rem; }
.rb-answer small { color: var(--ink-3); font-size: var(--step--1); }
.rbx[data-state="miss"] .rb-answer b { color: var(--red); }
.rb-give { justify-self: center; font-size: var(--step--1); color: var(--ink-3); }


/* ---------- Puzzle ---------- */
.game-card[data-game="puzzle"], .play-head[data-game="puzzle"] { --tile: var(--c-puzzle); --art: url("../img/art/puzzle.svg"); }
.tile[data-cat="puzzle"] { --tile: var(--c-puzzle); --art: url("../img/art/puzzle.svg"); background-size: auto 100%; background-position: right center; }
.game-card[data-game="puzzle"][style*="--photo"] .game-art { background: var(--photo) center / cover no-repeat; }
.pz-pick { display: grid; gap: 14px; }
.pz-note { font-weight: 600; }
.pz-thumb, .pz-full { display: block; width: 100%; height: auto; border-radius: 14px; box-shadow: var(--shadow-sm); }
.pz-thumb { max-height: 38vh; object-fit: cover; }
.pz-q { font-size: 1.125rem; }
.pz-levels { display: grid; gap: 10px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pz-level {
  display: grid; gap: 2px; justify-items: center; padding: 12px 6px; border-radius: 14px; border: 2px solid var(--line);
  background: var(--paper); color: var(--ink); font: inherit; cursor: pointer; transition: border-color .15s ease, transform .15s ease;
}
.pz-level:hover, .pz-level:focus-visible { border-color: var(--c-puzzle); transform: translateY(-2px); }
.pz-level b { font-family: var(--f-display); font-size: 1rem; letter-spacing: -.02em; }
.pz-level span { font-size: .8125rem; color: var(--ink-2); }
.pz-level span.num { color: var(--c-puzzle); font-weight: 700; }
.pz-credit { font-size: .75rem; color: var(--ink-3); margin: 0; }
.pz-credit a { color: inherit; }
.pz-card { display: grid; gap: 12px; }
.pz-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pz-lv { font-weight: 700; margin-right: auto; font-size: .9375rem; }
.pz-help { font-size: .8125rem; color: var(--ink-3); margin: 0; }
.pz-board {
  position: relative; display: grid; width: 100%; gap: 2px; padding: 2px; border-radius: 12px; overflow: hidden;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); grid-template-rows: repeat(var(--rows), minmax(0, 1fr));
  max-width: calc(72vh * var(--ar, 1.5)); margin-inline: auto;
  background: var(--line); touch-action: none; user-select: none; -webkit-user-select: none; transition: gap .4s ease, padding .4s ease;
}
.pz-cell {
  position: relative; display: block; width: 100%; height: 100%; min-width: 0; min-height: 0; padding: 0; border: 0; border-radius: 3px; cursor: grab;
  background-image: var(--img); background-size: calc(var(--cols) * 100%) calc(var(--rows) * 100%); background-repeat: no-repeat;
  -webkit-tap-highlight-color: transparent; transition: box-shadow .12s ease, opacity .12s ease;
}
.pz-cell:focus-visible { outline: 3px solid var(--gold); outline-offset: -3px; z-index: 2; }
.pz-cell.sel { box-shadow: inset 0 0 0 3px var(--gold), 0 0 0 2px var(--gold); z-index: 2; }
.pz-cell.over { box-shadow: inset 0 0 0 3px #fff; opacity: .75; }
.pz-cell.drag { z-index: 5; cursor: grabbing; box-shadow: 0 10px 24px -6px rgba(0,0,0,.55); transition: none; }
.pz-cell.ok { cursor: default; }
.pz-cell.ok::after { content: ""; position: absolute; inset: 0; border-radius: 3px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.25); pointer-events: none; }
.pz-cell.pop { animation: pzpop .35s ease; }
@keyframes pzpop { 50% { transform: scale(1.08); z-index: 3; } }
.pz-peek { position: absolute; inset: 0; background: var(--img) center / cover no-repeat; opacity: 0; pointer-events: none; transition: opacity .2s ease; border-radius: 12px; }
.pz-board.peek .pz-peek { opacity: 1; }
.pz-board.solved { gap: 0; padding: 0; }
.pz-board.solved .pz-cell { border-radius: 0; }
.pz-board.solved .pz-cell.ok::after { display: none; }
.pz-result { text-align: left; }
.pz-result h2 { margin-top: 4px; }
.pz-sum { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.pz-sum span { display: grid; gap: 2px; padding: 10px; border-radius: 12px; background: var(--paper-2); font-size: .8125rem; color: var(--ink-2); text-align: center; }
.pz-sum b { font-family: var(--f-display); font-size: 1.0625rem; color: var(--ink); }

/* ---------- Sudoku ---------- */
.game-card[data-game="sudoku"], .play-head[data-game="sudoku"] { --tile: var(--c-sudoku); --art: url("../img/art/sudoku.svg"); }
.tile[data-cat="sudoku"] { --tile: var(--c-sudoku); --art: url("../img/art/sudoku.svg"); background-size: auto 100%; background-position: right center; }
.sd-level { padding: 14px 6px; }
.sd-card { display: grid; gap: 12px; }
.sd-board {
  display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); width: 100%; max-width: min(520px, 62vh); margin-inline: auto; aspect-ratio: 1;
  border: 3px solid var(--ink); border-radius: 10px; overflow: hidden; background: var(--paper); user-select: none; -webkit-user-select: none;
}
.sd-cell {
  position: relative; display: grid; place-items: center; min-width: 0; padding: 0; border: 0; border-radius: 0;
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--paper); color: var(--c-sudoku);
  font-family: var(--f-display); font-weight: 700; font-size: clamp(1rem, 5.2vw, 1.5rem); line-height: 1; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.sd-cell[data-c="2"], .sd-cell[data-c="5"] { border-right: 2px solid var(--ink); }
.sd-cell[data-c="8"] { border-right: 0; }
.sd-cell[data-r="2"], .sd-cell[data-r="5"] { border-bottom: 2px solid var(--ink); }
.sd-cell[data-r="8"] { border-bottom: 0; }
.sd-cell.given { color: var(--ink); font-weight: 800; }
.sd-cell.peer { background: color-mix(in srgb, var(--c-sudoku) 9%, var(--paper)); }
.sd-cell.same { background: color-mix(in srgb, var(--c-sudoku) 24%, var(--paper)); }
.sd-cell.sel { background: color-mix(in srgb, var(--gold) 45%, var(--paper)); box-shadow: inset 0 0 0 3px var(--gold); }
.sd-cell.bad { color: var(--red); background: color-mix(in srgb, var(--red) 12%, var(--paper)); }
.sd-cell:focus-visible { outline: 3px solid var(--gold); outline-offset: -3px; z-index: 1; }
.sd-cell.pop { animation: pzpop .3s ease; }
.sd-cell.shake { animation: sdshake .35s ease; }
@keyframes sdshake { 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }
.sd-notes { position: absolute; inset: 2px; display: grid; grid-template-columns: repeat(3, 1fr); font-family: var(--f-body); font-size: clamp(.5rem, 2vw, .6875rem); font-weight: 600; color: var(--ink-2); }
.sd-notes i { font-style: normal; display: grid; place-items: center; }
.sd-board.solved .sd-cell { animation: sdwin .6s ease both; }
@keyframes sdwin { 50% { background: color-mix(in srgb, var(--green) 30%, var(--paper)); } }
.sd-pad { display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); gap: 6px; max-width: 620px; width: 100%; margin-inline: auto; }
@media (max-width: 560px) {
  .sd-pad { grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 4px; }
  .sd-key b { font-size: 1.1875rem; }
  .sd-tool { grid-column: span 5; grid-auto-flow: column; justify-content: center; gap: 8px; padding: 10px 0; }
  .sd-tool + .sd-tool { grid-column: span 4; }
}
.sd-key {
  display: grid; place-items: center; gap: 0; padding: 8px 0 6px; border: 0; border-radius: 12px; cursor: pointer;
  background: var(--paper-2); color: var(--ink); font: inherit; box-shadow: inset 0 -2px 0 var(--line); -webkit-tap-highlight-color: transparent;
}
.sd-key:focus-visible { outline: 3px solid var(--gold); outline-offset: 1px; }
.sd-key b { font-family: var(--f-display); font-size: 1.375rem; line-height: 1.1; }
.sd-key small { font-size: .6875rem; color: var(--ink-3); min-height: 1em; }
.sd-key:active { transform: translateY(1px); }
.sd-key:disabled { opacity: .3; cursor: default; }
.sd-tool { font-size: 1.25rem; }
.sd-tool[aria-pressed="true"] { background: var(--c-sudoku); color: #fff; }
.sd-tool[aria-pressed="true"] small { color: #fff; }
.sd-mini { max-width: 260px; font-size: .9rem; pointer-events: none; margin-bottom: 6px; }
.sd-mini .sd-cell { font-size: .9375rem; cursor: default; }
.sd-result { text-align: left; }

/* ---------- lišta cookies (len ak je zapnutý Google Analytics) ---------- */
.cb-link { display: none; }
:root[data-ga="1"] .cb-link { display: inline; }
.linklike-a { color: inherit; }
.cookiebar {
  position: fixed; z-index: 80; left: 12px; right: 12px; bottom: calc(var(--nav-h) + 12px + env(safe-area-inset-bottom, 0px));
  max-width: 880px; margin-inline: auto; padding: 16px 18px; border-radius: var(--r-lg);
  background: var(--paper); color: var(--ink); box-shadow: 0 18px 50px -12px rgba(0,0,0,.45), 0 0 0 1px var(--line);
  animation: slidein .25s ease both;
}
@media (min-width: 900px) { .cookiebar { bottom: 18px; } }
.cb-in { display: grid; gap: 14px; }
@media (min-width: 760px) { .cb-in { grid-template-columns: minmax(0, 1fr) auto; align-items: end; } }
.cookiebar h2 { font-size: 1.0625rem; margin-bottom: 4px; }
.cookiebar p { font-size: .875rem; color: var(--ink-2); margin: 0; }
.cookiebar a { color: var(--ink); }
.cb-detail { display: grid; gap: 8px; margin-top: 10px; }
.cb-opt { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: start; font-size: .875rem; color: var(--ink-2); }
.cb-opt input { width: 20px; height: 20px; margin-top: 1px; accent-color: var(--ink); }
.cb-opt b { color: var(--ink); margin-right: 4px; }
.cb-btns { display: grid; gap: 8px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (min-width: 760px) { .cb-btns { grid-template-columns: 1fr; min-width: 190px; } }
/* všetky tri voľby rovnako výrazné (požiadavka úradu: žiadne zvýhodnenie súhlasu) */
.cb-btn {
  min-height: 44px; padding: 8px 12px; border-radius: 12px; border: 2px solid var(--ink);
  background: var(--paper); color: var(--ink); font: inherit; font-weight: 700; font-size: .875rem; cursor: pointer;
}
.cb-btn:hover, .cb-btn:focus-visible { background: var(--ink); color: var(--paper); }
:root.has-cookiebar main { padding-bottom: 220px; }
