/* Dragon Eye – tmavý vzhled inspirovaný SteamDB (hustá data, infotabulka, boční navigace hry)
   a Google Analytics (karty s nadpisem, KPI dlaždice, vhled). Barvy podle značky Purple Dragon Studios
   (pd-studio/brand/brand.toml). Text systémovým bezpatkovým písmem (Segoe UI / SF / Roboto), číslice
   tabulkové. M PLUS Rounded 1c (OFL, podmnožina latinky s češtinou, 18 kB) jen ve značce „Dragon Eye“.
   CSP nepovoluje atribut style ani vložené styly – vše je tady. */

@font-face {
  font-family: "M PLUS Rounded 1c";
  src: url("/static/fonts/MPLUSRounded1c-Black-latin.woff2") format("woff2");
  font-weight: 700 900;
  font-display: swap;
}

:root {
  /* Vrstvy jako na Steamu: tmavá lišta, světlejší fialová stránka, tmavší panely, téměř černá pole.
     Mezi vrstvami je zřetelný skok jasu, aby se karty od stránky čitelně oddělily. */
  --bg-top: #15101f;
  --bg: #231b38;
  --bg-glow: #2f2450;
  --surface: #130f1f;
  --surface-2: #1c1630;
  --surface-3: #2c2349;
  --field: #08060e;
  --line: #352a52;
  --line-2: #4b3d73;
  /* text */
  --ink: #f4f0fd;
  --ink-2: #c6bedf;
  --ink-3: #978db6;
  /* značka a stavy */
  --accent: #8b5cf6;
  --accent-hover: #a07bff;
  --accent-ink: #c2adff;
  --accent-soft: rgba(139, 92, 246, 0.2);
  --accent-line: rgba(160, 123, 255, 0.55);
  --btn-top: #a173ff;
  --btn-bottom: #7543e2;
  --btn2: #3b2f60;
  --btn2-hover: #4c3d7a;
  --on-accent: #ffffff;
  --accent-2: #2dd4bf;
  --good: #4ade80;
  --mixed: #facc15;
  --warn: #fbbf24;
  --bad: #f87171;
  --radius: 8px;
  --radius-s: 5px;
  --font-brand: "M PLUS Rounded 1c", system-ui, sans-serif;
  --font-body: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "SF Pro Text", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg) linear-gradient(180deg, var(--bg-glow) 0, var(--bg) 420px) no-repeat;
  color: var(--ink);
  font: 400 14px/1.55 var(--font-body);
  font-feature-settings: "tnum" 1;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--accent); color: var(--on-accent); }
a { color: var(--accent-ink); text-decoration: none; }
a:hover { color: #e2d8ff; text-decoration: underline; }
h1, h2, h3 { font-weight: 600; line-height: 1.25; letter-spacing: -0.005em; color: var(--ink); }
h1 { font-size: 1.6rem; margin: 0 0 6px; }
h2 { font-size: 1.2rem; margin: 32px 0 12px; }
h3 { font-size: 0.95rem; margin: 18px 0 8px; }
p { margin: 6px 0 10px; }
b, strong { font-weight: 600; }
small, .muted { color: var(--ink-2); }
hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 20px; }

/* ikony (SVG z makra icon) */
.ico { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }

/* ---------- horní lišta (jako Google Analytics): logo, výběr hry, hledání, profil ---------- */
:root { --top-h: 56px; --rail-w: 60px; --rail-w-open: 248px; --sub-w: 236px; }
.top { position: sticky; top: 0; z-index: 30; height: var(--top-h); display: flex; align-items: center; gap: 14px;
  padding: 0 14px 0 12px; background: var(--bg-top); border-bottom: 1px solid #000; box-shadow: 0 1px 0 var(--line); }
.brand { display: flex; align-items: center; gap: 9px; color: var(--ink); font-family: var(--font-brand);
  font-weight: 800; font-size: 1.05rem; letter-spacing: 0.01em; white-space: nowrap; }
.brand:hover { text-decoration: none; color: var(--ink); }
.brand img { width: 30px; height: 30px; border-radius: 50%; }
.with-rail .brand { width: calc(var(--rail-w) + var(--sub-w) - 26px); }
.top-right { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.lang { font-weight: 600; font-size: 0.75rem; color: var(--ink-2); border: 1px solid var(--line-2);
  border-radius: var(--radius-s); padding: 2px 8px; letter-spacing: 0.04em; }
.lang:hover { color: var(--ink); border-color: var(--ink-3); text-decoration: none; }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; border: 0;
  background: transparent; color: var(--ink-2); cursor: pointer; }
.icon-btn:hover { background: var(--surface-3); color: var(--ink); text-decoration: none; }
.icon-btn .ico { width: 20px; height: 20px; }
.menu-btn { display: none; }

/* rozbalovací nabídky (details/summary bez JavaScriptu, app.js je jen zavírá) */
.dropdown { position: relative; }
.dropdown > summary { list-style: none; cursor: pointer; }
.dropdown > summary::-webkit-details-marker { display: none; }
.menu { position: absolute; top: calc(100% + 6px); z-index: 40; min-width: 260px; max-height: 70vh; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 6px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55); }
.menu-group { display: flex; align-items: center; gap: 8px; padding: 10px 10px 4px; font-size: 0.7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-3); }
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: var(--radius-s);
  background: transparent; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.menu-item:hover { background: var(--surface-3); color: var(--ink); text-decoration: none; }
.menu-item.on { background: var(--accent-soft); color: var(--accent-ink); }
.menu-item .src { margin-left: auto; }
.menu-item.add { color: var(--accent-ink); }
.menu-sep { height: 1px; background: var(--line); margin: 6px 0; }
.menu-sub { padding: 6px 10px 2px; font-size: 0.7rem; color: var(--ink-3); }
/* Správa (ozubené kolečko) jako „Admin“ v Google Analytics: popisek sekce, široká karta workspace s odkazy
   ve dvou sloupcích, karty hry ve dvou stejně širokých a stejně vysokých sloupcích. Platí i pro nastavení hry
   a Plánování. */
.admin-label { margin: 22px 0 8px; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--ink-3); }
.admin-grid { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch;
  margin-bottom: 16px; }
.admin-grid > .card { display: flex; flex-direction: column; }
.admin-grid > .card, .admin-grid > .card + .card { margin: 0; }
.admin-card { margin-bottom: 16px; }
.card > h2.admin-head:first-child { display: flex; align-items: center; gap: 8px; margin: 0 0 4px; font-size: 1.05rem; }
.admin-head + p.muted { margin-top: 0; }
.admin-grid .infotable { height: auto; } /* ve hlavičce hry se infotabulka natahuje na výšku obrázku, tady ne */
.admin-grid .infotable th { width: 48%; }
.card-foot { margin: auto 0 0; padding-top: 14px; }
.admin-links { list-style: none; margin: 8px 0 0; padding: 0; }
.admin-links li { border-top: 1px solid var(--line); }
.admin-links a { display: flex; align-items: center; gap: 10px; padding: 9px 2px; color: var(--ink); }
.admin-links a:hover { color: var(--accent-ink); text-decoration: none; }
.admin-links.cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; }
@media (max-width: 760px) {
  .admin-grid, .admin-links.cols { grid-template-columns: 1fr; }
}
/* Hvězdička zájmové hry (Trh, vyhledávání) */
.star-btn { display: inline-flex; align-items: center; margin-right: 6px; padding: 2px; border: 0; background: none;
  color: var(--ink-3); cursor: pointer; vertical-align: middle; }
.star-btn:hover { color: var(--mixed); }
.star-btn.on { color: var(--mixed); }
.star-btn.on .ico { fill: currentColor; }
tr.own td { background: var(--accent-soft); }

/* výběr hry (instance) */
.picker > summary { display: flex; flex-direction: column; justify-content: center; padding: 3px 10px; border-radius: var(--radius-s);
  line-height: 1.25; max-width: 280px; }
.picker > summary:hover, .picker[open] > summary { background: var(--surface-3); }
.picker-ws { font-size: 0.72rem; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.picker-game { display: flex; align-items: center; gap: 4px; font-weight: 600; color: var(--ink); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; }
.picker-game .ico { width: 14px; height: 14px; color: var(--ink-2); }
.picker-menu { left: 0; min-width: 300px; }

/* globální hledání */
.search { flex: 0 1 560px; display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 14px; margin: 0 auto 0 8px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; color: var(--ink-3); }
.search:focus-within { border-color: var(--accent); background: var(--field); box-shadow: 0 0 0 3px var(--accent-soft); }
.search input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--ink); font: inherit; outline: none;
  padding: 0; min-height: 0; box-shadow: none; }
.search input:focus { box-shadow: none; }
.search .ico { width: 18px; height: 18px; }

/* profil */
.profile > summary { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; }
.profile > summary:hover, .profile[open] > summary { background: var(--surface-3); }
.avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; background: var(--accent);
  border: 1px solid var(--line-2); }
.avatar.initial { display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 0.95rem;
  background: linear-gradient(180deg, var(--btn-top), var(--btn-bottom)); }
.avatar.big { width: 44px; height: 44px; font-size: 1.2rem; }
.profile-menu { right: 0; min-width: 280px; }
.profile-head { display: flex; align-items: center; gap: 12px; padding: 10px; }
.profile-head b { display: block; }

/* ---------- dvě menu jako v Google Analytics ----------
   Úzká lišta s hlavními částmi (Domovská stránka, Přehledy, Laboratoř, dole Správa) se po najetí rozbalí přes obsah.
   Vedle ní podmenu vybrané části se skupinami přehledů (details/summary, sbalitelné); celé podmenu jde sbalit. */
.rail { position: fixed; z-index: 26; top: var(--top-h); bottom: 0; left: 0; width: var(--rail-w); display: flex;
  flex-direction: column; justify-content: space-between; gap: 12px; padding: 10px 8px; overflow-x: hidden; overflow-y: auto;
  background: var(--bg-top); border-right: 1px solid #000; transition: width 0.15s ease, box-shadow 0.15s ease; }
.rail-top, .rail-bottom { display: flex; flex-direction: column; gap: 4px; }
.rail a { display: flex; align-items: center; gap: 14px; height: 40px; padding: 0 12px; border-radius: 20px;
  color: var(--ink-2); font: 500 0.9rem var(--font-body); white-space: nowrap; }
.rail a:hover { background: var(--surface-3); color: var(--ink); text-decoration: none; }
.rail a.on { background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
.rail .ico { width: 20px; height: 20px; }
.rail span { opacity: 0; transition: opacity 0.1s; }
.rail-scrim { display: none; }
/* rozbalená lišta po najetí myší (přes podmenu i obsah) */
.rail:hover { width: var(--rail-w-open); box-shadow: 8px 0 24px rgba(0, 0, 0, 0.45); }
.rail:hover span { opacity: 1; }

.subnav { position: fixed; z-index: 25; top: var(--top-h); bottom: 0; left: var(--rail-w); width: var(--sub-w);
  display: flex; flex-direction: column; padding: 14px 10px 10px; overflow-y: auto; background: var(--surface);
  border-right: 1px solid var(--line); }
.subnav-head { padding: 0 10px 12px; font-size: 1rem; font-weight: 600; color: var(--ink); }
.subnav-head span { display: block; margin-top: 2px; font-size: 0.78rem; font-weight: 400; color: var(--ink-3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.subnav a { display: block; padding: 7px 12px 7px 22px; border-radius: 0 18px 18px 0; margin-left: -10px;
  color: var(--ink-2); font-size: 0.88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.subnav a:hover { background: var(--surface-3); color: var(--ink); text-decoration: none; }
.subnav a.on { background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
.subnav-top { padding-bottom: 6px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.subnav-group { border-bottom: 1px solid var(--line); padding: 2px 0 6px; margin-bottom: 6px; }
.subnav-group > summary { display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px 10px; list-style: none; cursor: pointer; color: var(--ink); font-size: 0.86rem; font-weight: 600; }
.subnav-group > summary::-webkit-details-marker { display: none; }
.subnav-group > summary .ico { color: var(--ink-3); transform: rotate(180deg); transition: transform 0.12s; }
.subnav-group:not([open]) > summary .ico { transform: none; }
.subnav-collapse { align-self: flex-end; margin-top: auto; display: grid; place-items: center; width: 34px; height: 34px;
  flex: none; border: 0; border-radius: 50%; background: transparent; color: var(--ink-2); cursor: pointer; }
.subnav-collapse:hover { background: var(--surface-3); color: var(--ink); }
.subnav-collapse .ico { width: 18px; height: 18px; transition: transform 0.12s; }
/* sbalené podmenu: zůstane úzký proužek s tlačítkem pro rozbalení */
.sub-collapsed .subnav { width: 44px; padding: 10px 4px; overflow: hidden; }
.sub-collapsed .subnav > :not(.subnav-collapse) { display: none; }
.sub-collapsed .subnav-collapse { align-self: center; }
.sub-collapsed .subnav-collapse .ico { transform: rotate(180deg); }

.shell { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.with-rail .shell { margin-left: var(--rail-w); transition: margin-left 0.15s ease; }
.with-sub .shell { margin-left: calc(var(--rail-w) + var(--sub-w)); }
.with-sub.sub-collapsed .shell { margin-left: calc(var(--rail-w) + 44px); }
.with-rail .wrap { max-width: 1440px; padding: 0 28px; }
main { flex: 1; padding: 24px 0 64px; }
footer { border-top: 1px solid var(--line); padding: 18px 0; color: var(--ink-3); font-size: 0.8rem; }
footer .wrap { display: flex; gap: 18px; flex-wrap: wrap; }
footer a { color: var(--ink-2); }
body:not(.with-rail) footer { background: var(--bg-top); border-top-color: #000; }

/* ---------- hlavička stránky ---------- */
.crumbs { display: flex; gap: 6px; align-items: center; color: var(--ink-3); font-size: 0.82rem; margin-bottom: 8px;
  flex-wrap: wrap; }
.crumbs a { color: var(--ink-2); }
.page-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin-bottom: 6px; }
.page-bar .crumbs { margin-bottom: 0; }
.range-picker > summary { display: flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 18px;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font-size: 0.85rem; }
.range-picker > summary:hover, .range-picker[open] > summary { border-color: var(--accent-line); }
.range-picker .range-name { color: var(--ink-3); font-size: 0.78rem; }
.range-picker .range-dates { font-weight: 600; font-variant-numeric: tabular-nums; }
.range-picker > summary > .ico:last-child { color: var(--ink-3); }
.range-menu { right: 0; min-width: 300px; }
.range-custom { padding: 4px 10px 8px; }
.range-custom .row { display: flex; gap: 10px; margin: 4px 0 10px; }
.range-custom .row > div { flex: 1; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  margin-bottom: 20px; }
.page-head h1 { margin: 0; }
.page-head p { margin: 4px 0 0; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------- karty a mřížky ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35); }
.card + .card { margin-top: 16px; }
.card > h2:first-child, .card > h3:first-child, .card-head h2, .card-head h3 {
  font-size: 0.98rem; font-weight: 600; margin: 0 0 12px; color: var(--accent-ink); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin: -2px 0 12px; }
.card-head h2, .card-head h3 { margin: 0; }
.card h3 { font-size: 0.9rem; }
.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.narrow { max-width: 720px; }
.grid.four { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }

/* Zarovnané boxy jako v Google Analytics: v řádku stejně vysoké, nadpis nahoře, odkaz na celý přehled dole. */
.boxes { display: grid; gap: 16px; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: stretch; }
.boxes.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.box { display: flex; flex-direction: column; min-width: 0; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 20px 14px; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35); }
.box.span2 { grid-column: span 2; }
.box.span3 { grid-column: 1 / -1; }
.box-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.box-head h2 { margin: 0; font-size: 0.98rem; font-weight: 600; color: var(--ink); }
.box-foot { margin-top: auto; padding-top: 14px; display: flex; justify-content: flex-end; }
.box-link { display: inline-flex; align-items: center; gap: 6px; font-size: 0.86rem; font-weight: 600; color: var(--accent-ink); }
.box-link:hover { text-decoration: none; color: var(--accent-hover); }
.box-img { width: 100%; aspect-ratio: 460 / 215; object-fit: cover; border-radius: var(--radius-s); margin-bottom: 10px;
  border: 1px solid var(--line); }
.box .tiles { flex: none; margin-bottom: 10px; }
.box-table { width: 100%; }
.box-table th { text-align: left; color: var(--ink-2); font-weight: 500; }
.box > .steps { border: 0; box-shadow: none; background: transparent; }
/* přehled: graf a pod ním řádky (oddělené čarou jako tabulka pod grafem v GA) */
.report-rows { margin: 16px -20px 0; padding: 0 20px; border-top: 1px solid var(--line); }
.report-rows table { margin-top: 4px; }
.report-rows tfoot th, .report-rows tfoot td { font-weight: 600; border-top: 1px solid var(--line-2); }
.spark-cell { width: 110px; }
.spark-cell svg { width: 100px; height: 28px; }
@media (max-width: 1100px) {
  .boxes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .box.span2 { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .boxes, .boxes.two { grid-template-columns: 1fr; }
}

/* KPI dlaždice */
.kpis { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px 13px;
  display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.stat .label { color: var(--ink-2); font-size: 0.72rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.06em; }
.stat .value { font-size: 1.75rem; font-weight: 600; line-height: 1.2; letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.stat .delta { font-size: 0.82rem; font-weight: 600; }
.stat .src { margin-top: 2px; }
.card .stat { background: var(--surface-2); }
.up { color: var(--good); }
.down { color: var(--bad); }
.delta.up::before { content: "▲ "; font-size: 0.7em; vertical-align: 1px; }
.delta.down::before { content: "▼ "; font-size: 0.7em; vertical-align: 1px; }

/* ---------- vhled (verdikt) a kroky ---------- */
.verdict { position: relative; border: 1px solid var(--accent-line); border-radius: var(--radius); padding: 14px 18px;
  margin: 0 0 16px; background: linear-gradient(100deg, rgba(139, 92, 246, 0.16), rgba(139, 92, 246, 0.04) 60%),
  var(--surface); }
.verdict.good { border-color: rgba(74, 222, 128, 0.4);
  background: linear-gradient(100deg, rgba(74, 222, 128, 0.12), rgba(74, 222, 128, 0.02) 60%), var(--surface); }
.verdict.warn { border-color: rgba(251, 191, 36, 0.42);
  background: linear-gradient(100deg, rgba(251, 191, 36, 0.12), rgba(251, 191, 36, 0.02) 60%), var(--surface); }
.verdict .k { display: flex; align-items: center; gap: 7px; font-size: 0.72rem; text-transform: uppercase;
  letter-spacing: 0.07em; color: var(--accent-ink); font-weight: 700; }
.verdict.good .k { color: var(--good); }
.verdict.warn .k { color: var(--warn); }
.verdict p { font-size: 1.05rem; line-height: 1.5; margin: 6px 0 2px; color: var(--ink); }
.verdict .src { margin-top: 6px; }

.steps { list-style: none; padding: 0; margin: 0; counter-reset: step; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.steps li { counter-increment: step; position: relative; padding: 14px 18px 14px 58px; }
.steps li + li { border-top: 1px solid var(--line); }
.steps li::before { content: counter(step); position: absolute; left: 18px; top: 13px; width: 26px; height: 26px;
  border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); border: 1px solid var(--accent-line);
  display: grid; place-items: center; font-weight: 700; font-size: 0.8rem; }
.steps .t { font-weight: 600; margin-bottom: 2px; }
.steps li > div:not(.t):not(.src) { color: var(--ink-2); }

.src { font-size: 0.78rem; color: var(--ink-3); }
.src a { color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 2px; }
.src a:hover { color: var(--accent-ink); }
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 0.7rem; font-weight: 600; line-height: 1.5;
  padding: 1px 7px; border-radius: 4px; background: var(--surface-3); color: var(--ink-2); vertical-align: 1px;
  border: 1px solid var(--line-2); white-space: nowrap; }
.badge.ok { background: rgba(74, 222, 128, 0.1); color: var(--good); border-color: rgba(74, 222, 128, 0.3); }
.badge.err { background: rgba(248, 113, 113, 0.1); color: var(--bad); border-color: rgba(248, 113, 113, 0.3); }
.badge.acc { background: var(--accent-soft); color: var(--accent-ink); border-color: var(--accent-line); }
.chip { display: inline-block; font-size: 0.78rem; padding: 2px 9px; border-radius: 4px; background: var(--surface-2);
  border: 1px solid var(--line-2); color: var(--ink); margin: 0 4px 4px 0; }

/* ---------- hra: hlavička ve stylu SteamDB ---------- */
.game-title { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  margin-bottom: 14px; }
.game-title h1 { margin: 0; font-size: 1.55rem; }
.game-hero { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; margin-bottom: 28px; }
.infotable { width: 100%; border: 1px solid var(--line); border-radius: var(--radius); border-collapse: separate;
  border-spacing: 0; overflow: hidden; background: var(--surface); height: 100%; }
.infotable th, .infotable td { padding: 8px 14px; border-bottom: 1px solid var(--line); font-size: 0.9rem;
  vertical-align: middle; }
.infotable tr:last-child th, .infotable tr:last-child td { border-bottom: 0; }
.infotable th { width: 34%; color: var(--ink-2); font-weight: 500; text-transform: none; letter-spacing: 0;
  background: var(--surface); border-right: 1px solid var(--line); }
.infotable tr:hover td, .infotable tr:hover th { background: var(--surface-2); }
.infotable .chip { margin-bottom: 2px; }
.game-media { display: flex; flex-direction: column; gap: 10px; }
.game-media > img { width: 100%; aspect-ratio: 460 / 215; object-fit: cover; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--surface-2); }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; flex: 1; }
/* dlaždice vyplní zbytek výšky sloupce, aby končil zároveň s infotabulkou */
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px;
  text-align: center; display: flex; flex-direction: column; justify-content: center; }
.tile .v { font-size: 1.45rem; font-weight: 600; line-height: 1.2; font-variant-numeric: tabular-nums; }
.tile .l { font-size: 0.75rem; color: var(--ink-2); }
.score-good { color: var(--good); }
.score-mixed { color: var(--mixed); }
.score-bad { color: var(--bad); }

.section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin: 32px 0 12px; }
.section-title h2 { margin: 0; }

/* přepínač období (jako „Zoom“ v grafech SteamDB) */
.seg { display: inline-flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.seg .seg-label { color: var(--ink-3); font-size: 0.8rem; margin-right: 4px; }
.seg a { padding: 3px 10px; border-radius: var(--radius-s); border: 1px solid var(--line-2); color: var(--accent-ink);
  font-weight: 600; font-size: 0.82rem; background: var(--surface-2); }
.seg a:hover { text-decoration: none; border-color: var(--accent-line); }
.seg a.on { background: var(--accent-soft); border-color: var(--accent-line); color: var(--ink); }

/* ---------- přehled her ---------- */
.ws-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin: 28px 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.ws-head h2 { margin: 0; display: flex; align-items: center; gap: 10px; }
.game-cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.game-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; color: var(--ink); transition: border-color 0.12s, transform 0.12s; }
.game-card:hover { border-color: var(--accent-line); text-decoration: none; color: var(--ink); transform: translateY(-1px); }
.game-card img, .game-card .ph { width: 100%; aspect-ratio: 460 / 215; object-fit: cover; display: block;
  background: linear-gradient(135deg, var(--surface-3), var(--surface-2)); }
.game-card .body { padding: 12px 14px 14px; }
.game-card h3 { margin: 0 0 4px; font-size: 1rem; }
.game-card .metric { font-size: 0.88rem; color: var(--ink); }
.game-card .metric.up { color: var(--good); }
.game-card.add { align-items: center; justify-content: center; min-height: 200px; border-style: dashed; color: var(--ink-2);
  gap: 8px; font-weight: 500; }
.game-card.add .ico { width: 26px; height: 26px; }

/* ---------- tabulky ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
th, td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { color: var(--ink-2); font-weight: 600; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em;
  background: var(--surface-2); border-bottom: 1px solid var(--line-2); white-space: nowrap; }
tbody tr:hover td { background: rgba(255, 255, 255, 0.045); }
tbody tr:last-child td { border-bottom: 0; }
td.n, th.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
thead th:first-child { border-top-left-radius: var(--radius-s); }
thead th:last-child { border-top-right-radius: var(--radius-s); }
.card table + .src, .card table + p { margin-top: 12px; }
/* řazení kliknutím na záhlaví (app.js, table[data-sortable]) */
.sort-btn { all: inherit; display: inline-flex; align-items: center; gap: 4px; padding: 0; border: 0; background: none;
  cursor: pointer; }
.sort-btn::after { content: "↕"; opacity: 0.35; font-size: 0.85em; }
.sort-btn:hover, .sort-btn:focus-visible { color: var(--ink); }
.sort-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
th[aria-sort="ascending"] .sort-btn::after { content: "▲"; opacity: 0.9; }
th[aria-sort="descending"] .sort-btn::after { content: "▼"; opacity: 0.9; }

/* ---------- formuláře a tlačítka ---------- */
form.inline { display: inline; }
label { display: block; font-weight: 600; font-size: 0.82rem; color: var(--ink); margin: 12px 0 5px; }
input[type=text], input[type=email], input[type=url], input[type=number], input[type=date], input[type=password],
input[type=file], select, textarea {
  width: 100%; padding: 7px 10px; min-height: 34px; border: 1px solid var(--line-2); border-radius: var(--radius-s);
  background: var(--field); color: var(--ink); font: inherit; font-size: 0.9rem;
}
input::placeholder, textarea::placeholder { color: var(--ink-3); }
input:hover, select:hover, textarea:hover { border-color: var(--ink-3); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
select { cursor: pointer; }
select.compact { width: auto; min-height: 30px; padding: 4px 8px; font-size: 0.85rem; }
input[type=file] { padding: 5px; }
input[type=file]::file-selector-button { font: inherit; font-size: 0.82rem; margin-right: 10px; padding: 4px 10px;
  border-radius: 4px; border: 1px solid var(--line-2); background: var(--surface-3); color: var(--ink); cursor: pointer; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.row > * { flex: 1 1 160px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 34px; padding: 6px 14px;
  border-radius: var(--radius-s); border: 1px solid var(--btn-bottom); color: var(--on-accent);
  background: linear-gradient(180deg, var(--btn-top) 5%, var(--btn-bottom) 95%); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset;
  font: 600 0.88rem var(--font-body); cursor: pointer; white-space: nowrap; }
.btn:hover { background: linear-gradient(180deg, #b590ff 5%, #8657f0 95%); border-color: var(--btn-top); color: var(--on-accent); text-decoration: none; }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.btn.ghost { background: var(--btn2); color: #e8e0ff; border-color: var(--btn2); box-shadow: none; }
.btn.ghost:hover { background: var(--btn2-hover); border-color: var(--btn2-hover); color: #fff; }
.btn.danger { background: transparent; box-shadow: none; color: var(--bad); border-color: rgba(248, 113, 113, 0.5); }
.btn.danger:hover { background: rgba(248, 113, 113, 0.12); border-color: var(--bad); }
.btn.small { min-height: 28px; padding: 3px 10px; font-size: 0.8rem; }
.btn[disabled], .btn[disabled]:hover { cursor: not-allowed; background: var(--surface-2); border-color: var(--line-2);
  color: var(--ink-3); box-shadow: none; }
.check { display: flex; gap: 8px; align-items: center; font-weight: 400; color: var(--ink); font-size: 0.9rem; }
.check input { width: auto; accent-color: var(--accent); }
/* nastavení kohorty: skupiny polí, volba podobnosti, zaškrtávací režimy hry */
.cohort-form fieldset { border: 1px solid var(--line); border-radius: var(--radius-s); padding: 4px 14px 12px; margin: 14px 0 0; }
.cohort-form input[type=number] { max-width: 200px; }
.cohort-form legend { padding: 0 6px; font-weight: 700; font-size: 0.8rem; color: var(--accent-ink); text-transform: uppercase; letter-spacing: 0.05em; }
.choice { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 10px; }
.choice label { display: flex; align-items: center; gap: 7px; margin: 0; font-weight: 400; font-size: 0.9rem; }
.choice input, .checks input { width: auto; accent-color: var(--accent); }
.field-label { font-weight: 600; font-size: 0.82rem; color: var(--ink); margin: 12px 0 5px; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px 14px; }
.checks .check { margin: 0; font-size: 0.86rem; }
.chip.mode { border-style: dashed; }
.chip.acc { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-ink); }
.chip .ico { width: 12px; height: 12px; vertical-align: -1px; margin-right: 4px; }
.form-actions { margin-top: 16px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
/* srovnání se zájmovými hrami v Přehledu */
.peer-list { list-style: none; margin: 0; padding: 0; }
.peer-list li { display: flex; gap: 10px; align-items: flex-start; padding: 7px 0; border-top: 1px solid var(--line); }
.peer-list li:first-child { border-top: 0; }
.peer-list li > .ico { flex: none; margin-top: 2px; color: var(--ink-3); }
.peer-list li.gap > .ico { color: var(--accent-2); }
.peer-list .chip { margin-left: 6px; }
ul.plain { margin: 6px 0 10px; padding-left: 18px; color: var(--ink-2); font-size: 0.88rem; }
ul.plain li { margin: 3px 0; }
.provider-list { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; }
.provider-list > div { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ---------- hlášky ---------- */
.flash { padding: 10px 14px; border-radius: var(--radius-s); margin-bottom: 16px; background: var(--surface);
  border: 1px solid var(--accent-line); border-left: 3px solid var(--accent); }
.flash.error { border-color: rgba(248, 113, 113, 0.45); border-left-color: var(--bad); }
.note { background: var(--surface-2); border: 1px solid var(--line-2); border-radius: var(--radius-s); padding: 10px 14px;
  font-size: 0.88rem; color: var(--ink-2); margin: 0 0 16px; }
.empty { text-align: center; padding: 32px 16px; color: var(--ink-2); }
.danger-zone { border-color: rgba(248, 113, 113, 0.35); }

/* ---------- grafy (SVG ze serveru) ---------- */
.chart { width: 100%; height: auto; display: block; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis { fill: var(--ink-3); font-size: 11px; font-family: var(--font-body); }
.grid.two .chart .axis { font-size: 18px; } /* graf v polovině šířky se zmenší zhruba na polovinu */
.chart .line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .area { fill: var(--accent); fill-opacity: 0.12; stroke: none; }
.chart .s1, .spark .s1 { stroke: #c4b0ff; }
.chart .s2 { stroke: var(--ink-3); stroke-width: 1.2; stroke-opacity: 0.8; }
.chart .dot.s1 { fill: #c4b0ff; }
.chart .dot.s2 { fill: var(--ink-3); }
.chart .bar { fill: var(--accent); fill-opacity: 0.6; }
.chart .bar:hover { fill-opacity: 0.85; }
.chart .bar.hl { fill: var(--accent-2); fill-opacity: 0.9; }
.chart .marker line { stroke: var(--accent-2); stroke-width: 1.2; stroke-dasharray: 3 3; stroke-opacity: 0.8; }
.chart .marker circle { fill: var(--accent-2); }
.spark { width: 120px; height: 32px; vertical-align: middle; }
.spark .line { fill: none; stroke-width: 2; }
.legend { display: flex; gap: 18px; font-size: 0.8rem; color: var(--ink-2); margin-top: 8px; flex-wrap: wrap; }
.legend i { display: inline-block; width: 16px; height: 3px; vertical-align: middle; margin-right: 6px; border-radius: 2px; }
.legend .l1 { background: #c4b0ff; }
.legend .l2 { background: var(--ink-3); }
.legend .lm { background: var(--accent-2); }
/* ---------- interaktivní graf (static/app.js): přepínače řad, dvě osy, bublina s hodnotami dne ---------- */
.explorer.ready .explorer-fallback { display: none; }
.explorer-controls { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.explorer-group { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.explorer-group-label { min-width: 92px; font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--ink-3); }
.series-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px;
  border: 1px solid var(--line-2); background: transparent; color: var(--ink-2); font: 500 0.8rem var(--font-body);
  cursor: pointer; }
.series-chip:hover { border-color: var(--ink-3); color: var(--ink); }
.series-chip[aria-pressed="true"] { background: var(--surface-3); border-color: var(--accent-line); color: var(--ink); }
.series-chip[aria-pressed="false"] .sw { opacity: 0.35; }
.series-chip[disabled] { cursor: not-allowed; opacity: 0.45; }
.series-chip:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.sw { display: inline-block; width: 12px; height: 3px; border-radius: 2px; flex: none; }
.explorer-stage { position: relative; }
.explorer-stage .chart { touch-action: pan-y; }
.chart .guide { stroke: var(--ink-3); stroke-width: 1; stroke-dasharray: 2 3; }
.chart .axis.unit { font-weight: 700; fill: var(--ink-2); }
.explorer-tip { position: absolute; top: 8px; z-index: 5; min-width: 180px; max-width: 280px; padding: 8px 10px;
  background: var(--bg-top); border: 1px solid var(--line-2); border-radius: var(--radius-s);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45); font-size: 0.8rem; pointer-events: none; }
.explorer-tip .tip-day { font-weight: 700; margin-bottom: 4px; }
.explorer-tip .tip-row { display: flex; align-items: center; gap: 7px; }
.explorer-tip .tip-row span { flex: 1; color: var(--ink-2); }
.explorer-tip .tip-event { margin-top: 4px; color: var(--accent-2); }
/* barvy řad: stejné pořadí jako řady v datech grafu */
.chart .line.c0 { stroke: #c4b0ff; } .sw.c0, .chart .dot.c0 { background: #c4b0ff; fill: #c4b0ff; }
.chart .line.c1 { stroke: #2dd4bf; } .sw.c1, .chart .dot.c1 { background: #2dd4bf; fill: #2dd4bf; }
.chart .line.c2 { stroke: #f87171; } .sw.c2, .chart .dot.c2 { background: #f87171; fill: #f87171; }
.chart .line.c3 { stroke: #fbbf24; } .sw.c3, .chart .dot.c3 { background: #fbbf24; fill: #fbbf24; }
.chart .line.c4 { stroke: #60a5fa; } .sw.c4, .chart .dot.c4 { background: #60a5fa; fill: #60a5fa; }
.chart .line.c5 { stroke: #a3e635; } .sw.c5, .chart .dot.c5 { background: #a3e635; fill: #a3e635; }
.chart .line.c6 { stroke: #f472b6; } .sw.c6, .chart .dot.c6 { background: #f472b6; fill: #f472b6; }
.chart .line.c7 { stroke: #fb923c; } .sw.c7, .chart .dot.c7 { background: #fb923c; fill: #fb923c; }
.follow { display: flex; align-items: center; gap: 10px; color: var(--ink-2); font-size: 0.88rem; }
.follow b { color: var(--ink); font-size: 1.05rem; }

/* ---------- úvodní stránka ---------- */
.hero { position: relative; padding: 56px 0 36px; display: grid; gap: 32px;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); align-items: center; }
.hero::before { content: ""; position: absolute; inset: -24px -20px auto; height: 420px; z-index: -1; pointer-events: none;
  background: radial-gradient(600px 300px at 75% 40%, rgba(139, 92, 246, 0.22), transparent 70%),
  radial-gradient(400px 200px at 20% 10%, rgba(45, 212, 191, 0.08), transparent 70%); }
.hero h1 { font-size: clamp(2rem, 4.2vw, 3rem); font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.hero .lead { font-size: 1.12rem; color: var(--ink-2); max-width: 36em; }
.hero img { width: 240px; max-width: 60vw; justify-self: center; filter: drop-shadow(0 20px 60px rgba(139, 92, 246, 0.35)); }
.hero .form-actions { margin-top: 22px; }
.features { margin-top: 28px; }
.feature h3 { margin-top: 0; font-size: 1rem; }
.feature p { color: var(--ink-2); margin-bottom: 0; }
.login-box { max-width: 420px; margin: 48px auto; padding: 28px; }
.google-btn, .steam-btn { width: 100%; min-height: 40px; }
.steam-btn { margin-top: 10px; }
.login-methods { list-style: none; margin: 0 0 8px; padding: 0; }
.login-methods li { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 8px 0; border-bottom: 1px solid var(--line-2); }
.login-methods form { margin: 0; }
.dev-login { margin-top: 20px; border-top: 1px dashed var(--line-2); padding-top: 14px; }

.prose { max-width: 780px; font-size: 0.95rem; }
.prose h2 { margin-top: 1.8rem; }
.prose p, .prose li { color: var(--ink-2); }
.prose li { margin-bottom: 4px; }
ol, ul { padding-left: 22px; }

@media (max-width: 1100px) {
  .with-rail .brand { width: auto; }
}
@media (max-width: 900px) {
  .game-hero { grid-template-columns: 1fr; }
  .game-media { order: -1; max-width: 460px; }
  /* lišta (a vedle ní podmenu) se vysouvá tlačítkem v horní liště, obsah má celou šířku */
  .menu-btn { display: inline-grid; }
  .with-rail .shell, .with-sub .shell, .with-sub.sub-collapsed .shell { margin-left: 0; }
  .rail { width: var(--rail-w-open); transform: translateX(-100%); transition: transform 0.18s ease; }
  .rail span { opacity: 1; }
  .rail:hover { box-shadow: none; }
  .with-sub .rail, .with-sub .rail:hover { width: var(--rail-w); }
  .with-sub .rail span { opacity: 0; }
  .subnav, .sub-collapsed .subnav { width: var(--sub-w); padding: 14px 10px 10px;
    transform: translateX(calc(-100% - var(--rail-w))); transition: transform 0.18s ease; }
  .sub-collapsed .subnav > :not(.subnav-collapse) { display: revert; }
  .subnav-collapse { display: none; }
  .rail-open .rail, .rail-open .subnav { transform: none; box-shadow: 8px 0 24px rgba(0, 0, 0, 0.5); }
  .rail-open .rail-scrim { display: block; position: fixed; inset: var(--top-h) 0 0 0; z-index: 24; background: rgba(0, 0, 0, 0.5); }
  .search { flex-basis: 320px; }
}
@media (max-width: 640px) {
  .wrap, .with-rail .wrap { padding: 0 16px; }
  .top { gap: 6px; padding: 0 8px; }
  .brand span, .search { display: none; }
  .picker > summary { max-width: 52vw; }
  h1, .game-title h1 { font-size: 1.35rem; }
  .card { padding: 14px 16px; }
  .stat .value { font-size: 1.45rem; }
  .kpis { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
  .hidden-sm { display: none; }
}

/* rozbalovací karta (nastavení kohorty) */
.disclosure { margin-bottom: 16px; }
.disclosure summary { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; cursor: pointer; list-style: none;
  margin: -4px 0; padding: 4px 0; }
.disclosure summary::-webkit-details-marker { display: none; }
.disclosure summary::before { content: "▸"; color: var(--ink-3); font-size: 0.9rem; transition: transform 0.12s; }
.disclosure[open] summary::before { transform: rotate(90deg); }
.disclosure summary h2 { font-size: 0.95rem; margin: 0; }
.disclosure[open] summary { margin-bottom: 12px; }
.summary-tags { display: flex; flex-wrap: wrap; }
.summary-tags .chip { margin-bottom: 0; }
.row > .grow { flex: 3 1 260px; }
.row > .shrink { flex: 0 0 auto; }
h1 + p.muted { margin: -2px 0 20px; }
main .wrap > h1:first-child, main .wrap > .flash + h1 { margin-bottom: 16px; }

/* pomocné třídy (CSP nepovoluje atribut style) */
.mt { margin-top: 24px; }
.mt0 { margin-top: 0; }
.right { text-align: right; }
.hidden { display: none; }

/* moduly za MVP: festivaly, tvůrci, laboratoř stránky, veřejné testy a nástroje */
.badge.warn { background: rgba(250, 204, 21, 0.1); color: var(--warn, #facc15); border-color: rgba(250, 204, 21, 0.3); }
.warn-text { color: var(--warn, #facc15); }
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 0.9rem; }
.checklist li:last-child { border-bottom: 0; }
.checklist li.done { color: var(--ink-2); }
input.copy { font-family: ui-monospace, Consolas, monospace; font-size: 0.78rem; color: var(--ink-2); min-width: 240px; }
input.copy.key { font-size: 1.1rem; color: var(--ink); text-align: center; }
pre.mail { white-space: pre-wrap; font: inherit; font-size: 0.85rem; color: var(--ink-2); background: var(--field);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; }
img.thumb { height: 34px; width: auto; vertical-align: middle; border-radius: 3px; margin-right: 6px; }
.test-row { padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.test-row:last-of-type { border-bottom: 0; }
.capsule-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin: 16px 0; }
.capsule-cell { display: block; border-radius: 4px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.capsule-cell img { display: block; width: 100%; height: auto; aspect-ratio: 460 / 215; object-fit: cover; }
.capsule-cell:hover { border-color: var(--accent-line); }
.hook { text-align: center; }
.hook-img { max-width: 100%; border-radius: var(--radius); margin-bottom: 12px; }
.hero.small { text-align: center; padding: 8px 0 16px; }
.hero.small img.capsule { max-width: 460px; width: 100%; border-radius: var(--radius); }

/* Plánovač: kalendář vlevo, plán a cíle vpravo (game_planner.html) */
[hidden] { display: none !important; }
.planner { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.planner .card + .card { margin-top: 0; }
.planner-side { display: flex; flex-direction: column; gap: 16px; }
.planner-side .infotable { height: auto; }
.planner-side .infotable th { width: 46%; }
.cal-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.cal-head h2 { margin: 0 6px; font-size: 1.05rem; min-width: 150px; text-align: center; }
.cal-head h2::first-letter { text-transform: uppercase; }
.cal-head .cal-new { margin-left: auto; }
.cal-layers { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-bottom: 10px; font-size: 0.8rem; color: var(--ink-2); }
.cal-layer { display: inline-flex; align-items: center; gap: 6px; margin: 0; cursor: pointer; }
.cal-layer input { margin: 0; width: auto; min-height: 0; }
.cal-layer::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--cal-c, var(--line-2)); }
.cal-layer.best { cursor: default; }
.cal { --cal-milestone: var(--accent); --cal-own: var(--accent-2); --cal-steam: #60a5fa; --cal-rivals: var(--warn); }
.cal-layer.milestone { --cal-c: var(--accent); }
.cal-layer.own { --cal-c: var(--accent-2); }
.cal-layer.steam { --cal-c: #60a5fa; }
.cal-layer.rivals { --cal-c: var(--warn); }
.cal-layer.best { --cal-c: rgba(74, 222, 128, 0.35); }
.cal-row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-left: 1px solid var(--line); }
.cal-row + .cal-row { border-top: 0; }
.cal-dow > div { padding: 4px 6px; font-size: 0.72rem; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.05em;
  border-right: 1px solid var(--line); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cal-day { min-height: 96px; padding: 4px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cal-day[data-cal-day] { cursor: pointer; }
.cal-day[data-cal-day]:hover { background: var(--surface-2); }
.cal-day.out { background: rgba(0, 0, 0, 0.18); }
.cal-day.out .cal-num { color: var(--ink-3); opacity: 0.6; }
.cal-row.best .cal-day { background: rgba(74, 222, 128, 0.07); }
.cal-row.best .cal-day:first-child { box-shadow: inset 3px 0 0 rgba(74, 222, 128, 0.55); }
.cal-num { font-size: 0.78rem; color: var(--ink-2); line-height: 1; }
.cal-num button { background: none; border: 0; padding: 3px 5px; margin: 0; min-height: 0; color: inherit; font: inherit;
  border-radius: 4px; cursor: pointer; }
.cal-num button:hover { background: var(--accent-soft); color: var(--accent-ink); }
.cal-day.today .cal-num button, .cal-day.today .cal-num { color: var(--on-accent); }
.cal-day.today .cal-num button { background: var(--accent); font-weight: 700; }
.cal .chip { display: block; font-size: 0.7rem; line-height: 1.35; padding: 1px 5px; border-radius: 3px; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; color: var(--ink); background: var(--surface-3);
  border-left: 3px solid var(--line-2); }
.cal a.chip:hover { text-decoration: none; filter: brightness(1.25); }
.cal .chip.milestone { background: var(--accent-soft); border-left-color: var(--cal-milestone); font-weight: 600; }
.cal .chip.milestone.planned { border-left-style: dashed; }
.cal .chip.own { background: rgba(45, 212, 191, 0.13); border-left-color: var(--cal-own); }
.cal .chip.steam { background: rgba(96, 165, 250, 0.13); border-left-color: var(--cal-steam); }
.cal .chip.rivals { background: rgba(251, 191, 36, 0.1); border-left-color: var(--cal-rivals); color: var(--ink-2); }
.cal .chip::first-letter { text-transform: uppercase; }
.cal .chip.deadline::before { content: "⏰ "; }
.cal-day.past .chip { opacity: 0.75; }
.cal .chip.cont { color: transparent; }
.cal .chip.cont.deadline::before { content: none; }
.cal.hide-milestone .chip.milestone, .cal.hide-own .chip.own, .cal.hide-steam .chip.steam,
.cal.hide-rivals .chip.rivals { display: none; }
.link-btn { background: none; border: 0; padding: 0 4px; margin-left: 4px; min-height: 0; color: var(--ink-3); cursor: pointer;
  font: inherit; font-size: 1rem; line-height: 1; }
.link-btn:hover { color: var(--bad); }
.cal-dialog { width: min(560px, calc(100vw - 32px)); background: var(--surface); color: var(--ink); border: 1px solid var(--line-2);
  border-radius: var(--radius); padding: 18px 20px; }
.cal-dialog::backdrop { background: rgba(8, 6, 14, 0.7); }
.cal-dialog h2 { margin-top: 0; font-size: 1.05rem; color: var(--accent-ink); }
.dialog-actions { display: flex; gap: 8px; margin-top: 16px; }
@media (max-width: 1100px) {
  .planner { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .cal-card { padding: 12px 8px; }
  .cal-day { min-height: 64px; padding: 2px; }
  .cal .chip { font-size: 0; padding: 0; height: 6px; border-left-width: 0; background: var(--cal-c, var(--line-2)); }
  .cal .chip.milestone { background: var(--cal-milestone); }
  .cal .chip.own { background: var(--cal-own); }
  .cal .chip.steam { background: var(--cal-steam); }
  .cal .chip.rivals { background: var(--cal-rivals); }
  .cal .chip.deadline::before { content: none; }
}

/* ---------- přestavba 9. 11. 2026: Laboratoř, Propagace, propojení služeb, nahrání dat ---------- */

/* záložky na stránce (Festivaly) */
.tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--line); }
.tabs a { padding: 8px 14px; color: var(--ink-2); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a:hover { color: var(--ink); text-decoration: none; }
.tabs a.on { color: var(--accent-ink); border-bottom-color: var(--accent); font-weight: 600; }

/* katalog festivalů v kartách */
.fest-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.fest-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px;
  display: flex; flex-direction: column; gap: 8px; }
.fest-card.soon { border-color: var(--warn); box-shadow: 0 0 0 1px rgba(251, 191, 36, 0.25); }
.fest-card.valve { border-color: rgba(96, 165, 250, 0.45); }
.fest-card.hidden-card { opacity: 0.55; }
.fest-card h3 { margin: 0; font-size: 1.05rem; }
.fest-card .new { color: var(--accent-2); font-size: 0.75rem; font-style: italic; font-weight: 600; }
.fest-deadline { margin: 0; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.fest-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip.ok { background: rgba(74, 222, 128, 0.1); border-color: rgba(74, 222, 128, 0.3); color: var(--good); }
.fest-desc summary { cursor: pointer; color: var(--ink-3); font-size: 0.88rem; }
.fest-desc p { color: var(--ink-2); font-size: 0.88rem; margin: 6px 0 0; }
.fest-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: auto; padding-top: 6px; }
.fest-meta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* propojení služeb jako v Google Analytics */
.services-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.svc-list { list-style: none; margin: 8px 0 0; padding: 0; }
.svc-row { display: flex; gap: 14px; align-items: flex-start; padding: 14px 0; border-top: 1px solid var(--line); }
.svc-row.soon { opacity: 0.6; }
.svc-logo { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 700;
  color: #fff; background: var(--surface-3); }
.svc-steamworks { background: #1b2838; } .svc-youtube { background: #e62117; } .svc-instagram { background: #c13584; }
.svc-facebook { background: #1877f2; } .svc-tiktok { background: #111; box-shadow: inset 0 0 0 2px #25f4ee; }
.svc-reddit { background: #ff4500; } .svc-x { background: #000; } .svc-discord { background: #5865f2; }
.svc-main { flex: 1; min-width: 0; }
.svc-name { font-weight: 600; }
.svc-conn { margin-top: 6px; font-size: 0.9rem; }
.svc-conn-actions { margin-left: 8px; }
.svc-action { flex: none; }
.svc-key { margin-top: 8px; }
.svc-key summary { cursor: pointer; color: var(--accent-ink); }

/* nahrání dat jedním oknem */
.dropzone { border-style: dashed; border-color: var(--line-2); }
.step-card { border-color: var(--accent-line); }

/* vodorovné pruhy (rozložení odpovědí, ceny, zájmové hry) – šířka třídou w0…w100, CSP nepovolí style */
.dist { display: grid; gap: 6px; }
.dist-row { display: grid; grid-template-columns: minmax(80px, 34%) 1fr auto; gap: 10px; align-items: center; font-size: 0.88rem; }
.dist-row.own .dist-label { color: var(--accent-ink); font-weight: 600; }
.dist-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.dist-bar { height: 10px; background: var(--surface-2); border-radius: 5px; overflow: hidden; }
.dist-fill { display: block; height: 100%; background: var(--accent); border-radius: 5px; width: 0; }
.dist-row.own .dist-fill { background: var(--accent-2); }
.dist-n { font-variant-numeric: tabular-nums; color: var(--ink-2); min-width: 3ch; text-align: right; }
.w5 { width: 5%; } .w10 { width: 10%; } .w15 { width: 15%; } .w20 { width: 20%; } .w25 { width: 25%; }
.w30 { width: 30%; } .w35 { width: 35%; } .w40 { width: 40%; } .w45 { width: 45%; } .w50 { width: 50%; }
.w55 { width: 55%; } .w60 { width: 60%; } .w65 { width: 65%; } .w70 { width: 70%; } .w75 { width: 75%; }
.w80 { width: 80%; } .w85 { width: 85%; } .w90 { width: 90%; } .w95 { width: 95%; } .w100 { width: 100%; }

/* Laboratoř: co kdyby, položky plánu, řetěz kalkulačky */
.whatif { border-color: var(--accent-line); }
.whatif table { width: 100%; }
.effects { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.effects li { border-left: 3px solid var(--line-2); padding-left: 10px; }
.effects li.counted { border-left-color: var(--accent-2); }
.effect-head { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.row.tight { gap: 6px; align-items: center; margin-top: 4px; }
.row.tight > * { flex: 0 1 auto; }
.row.tight > input { flex: 1 1 90px; }
.waterfall th { font-weight: 400; }
.waterfall tr.sum th, .waterfall tr.sum td { font-weight: 700; border-top: 1px solid var(--line-2); }
.chain { display: grid; gap: 14px; }
.chain-step { display: flex; gap: 12px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 10px 14px; position: relative; }
.chain-step + .chain-step::before { content: "\2193"; position: absolute; top: -15px; left: 22px; color: var(--ink-3); font-size: 0.8rem; }
.chain-n { flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink);
  display: grid; place-items: center; font-size: 0.8rem; font-weight: 700; }
.chain-label { color: var(--ink-2); font-size: 0.88rem; }
.chain-value { font-size: 1.15rem; font-weight: 700; font-variant-numeric: tabular-nums; }
tr.on td { background: var(--accent-soft); }

/* dotazníky pro testery */
.q-rows { display: grid; gap: 6px; }
.q-row { display: grid; grid-template-columns: 24px 150px minmax(0, 2fr) minmax(0, 1.2fr); gap: 8px; align-items: center; }
.q-num { color: var(--ink-3); text-align: right; font-size: 0.85rem; }
.survey-form .survey-q { border: 0; border-top: 1px solid var(--line); padding: 14px 0 6px; margin: 0; }
.survey-form legend { font-weight: 600; padding: 0; margin-bottom: 8px; }
.scale { display: flex; gap: 8px; }
.scale label { margin: 0; position: relative; }
.scale input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.scale span { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid var(--line-2); border-radius: 50%;
  cursor: pointer; font-weight: 600; }
.scale input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.scale input:focus-visible + span { box-shadow: 0 0 0 3px var(--accent-soft); }
.scale-ends { display: flex; justify-content: space-between; max-width: 250px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.answers { margin: 8px 0 0; padding-left: 18px; color: var(--ink-2); }
.answers li { margin-bottom: 6px; }
@media (max-width: 640px) {
  .q-row { grid-template-columns: 24px 1fr; }
  .q-row > input { grid-column: 2; }
}

/* graf: barva podle sítě (řady, příspěvky) a přepínače značek */
.chart .line.n-youtube { stroke: #ff4e45; } .sw.n-youtube, .chart .dot.n-youtube, .mk.n-youtube { background: #ff4e45; fill: #ff4e45; }
.chart .line.n-instagram { stroke: #e1306c; } .sw.n-instagram, .chart .dot.n-instagram, .mk.n-instagram { background: #e1306c; fill: #e1306c; }
.chart .line.n-facebook { stroke: #4b8cf7; } .sw.n-facebook, .chart .dot.n-facebook, .mk.n-facebook { background: #4b8cf7; fill: #4b8cf7; }
.chart .line.n-tiktok { stroke: #25f4ee; } .sw.n-tiktok, .chart .dot.n-tiktok, .mk.n-tiktok { background: #25f4ee; fill: #25f4ee; }
.chart .line.n-discord { stroke: #7b86ff; } .sw.n-discord, .chart .dot.n-discord, .mk.n-discord { background: #7b86ff; fill: #7b86ff; }
.chart .line.n-newsletter { stroke: #fbbf24; } .sw.n-newsletter, .chart .dot.n-newsletter, .mk.n-newsletter { background: #fbbf24; fill: #fbbf24; }
.chart .marker.n-youtube line { stroke: #ff4e45; } .chart .marker.n-youtube circle { fill: #ff4e45; }
.chart .marker.n-instagram line { stroke: #e1306c; } .chart .marker.n-instagram circle { fill: #e1306c; }
.chart .marker.n-facebook line { stroke: #4b8cf7; } .chart .marker.n-facebook circle { fill: #4b8cf7; }
.chart .marker.n-tiktok line { stroke: #25f4ee; } .chart .marker.n-tiktok circle { fill: #25f4ee; }
.mk { display: inline-block; width: 9px; height: 9px; border-radius: 50%; flex: none; }
.mk.m-events { background: var(--accent-2); }
.series-chip[aria-pressed="false"] .mk { opacity: 0.35; }
.filter-card summary h2 { display: flex; align-items: center; gap: 8px; }
.search-main input { font-size: 1.05rem; }
