/* Backlog — knihovna dohraných her. Tokeny dědí z jonbarson.cz stejně jako
   /mtg/ a /souls/: tenhle :root je tmavý základ, /account/theme.css ho
   přepíše na [data-theme=light]. */

* { box-sizing: border-box; }

:root {
  --bg: #14121a;
  --bg2: #191622;
  --panel: #1e1a28;
  --panel2: #272233;
  --text: #e9e4d8;
  --muted: #9c95a8;
  --accent: #7d8cf0;
  --accent2: #a3aefa;
  --border: #362f45;
  --border-soft: #2b2536;
  --radius: 10px;
  --good: #5cb884;
  --mid: #d9b34a;
  --bad: #d95c5c;
  --serif: "Eagle Lake", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  --data: "Cascadia Mono", "SF Mono", ui-monospace, Consolas, "Liberation Mono", monospace;
}

:root[data-theme="light"] {
  --accent: #4a55b8;
  --accent2: #6c78d6;
  --good: #2e7d54;
  --mid: #9a7526;
  --bad: #b5454c;
}

html, body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(1000px 480px at 85% -10%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 62%),
    var(--bg);
  color: var(--text);
  font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.55;
}

.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.hidden { display: none !important; }

/* ───────────── topbar ───────────── */

.topbar {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 18px;
  background: linear-gradient(180deg, var(--panel2), var(--panel));
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 40;
}
.topbar .back { color: var(--muted); display: flex; padding: 6px; border-radius: 8px; }
.topbar .back:hover { color: var(--accent); background: rgba(255,255,255,.04); }
.topbar .back .icon { width: 18px; height: 18px; }
.topbar h1 {
  font-family: var(--serif); font-size: 1.05rem; font-weight: 400; margin: 0;
  display: flex; align-items: center; gap: 10px;
}
.topbar h1 .icon { color: var(--accent); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 18px 70px; }

/* ───────────── hlavička se souhrnem ───────────── */

.hero { padding: 26px 0 4px; }

.stats {
  display: flex; flex-wrap: wrap; gap: 8px;
  padding: 16px 20px;
  background: linear-gradient(160deg,
    color-mix(in srgb, var(--panel2) 70%, transparent),
    color-mix(in srgb, var(--panel) 80%, transparent));
  border: 1px solid var(--border-soft);
  border-radius: 14px;
}
.stat {
  display: flex; align-items: baseline; gap: 7px;
  padding-right: 22px; margin-right: 14px;
  border-right: 1px solid var(--border-soft);
}
.stat:last-child { border-right: 0; margin-right: 0; padding-right: 0; }
.stat-n {
  font-family: var(--data); font-size: 1.5rem; font-variant-numeric: tabular-nums;
  color: var(--text); line-height: 1;
}
.stat-l { font-size: .76rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.stat--total .stat-n { color: var(--accent); font-size: 2rem; }
.stat--hours { cursor: help; }
.stat--hours .stat-n { color: var(--accent2); }
.stat-sub {
  display: block; margin-top: 2px;
  font-style: normal; font-size: .7rem; letter-spacing: .02em;
  text-transform: none; opacity: .75;
}

.dt-span { margin: 8px 0 0; font-size: .78rem; color: var(--muted); }

/* ───────────── ovládání ───────────── */

.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 22px 0 12px; }
.toolbar-spacer { flex: 1; }

.search { position: relative; flex: 1 1 240px; max-width: 340px; }
.search input {
  width: 100%; font: inherit; font-size: .9rem;
  background: var(--panel); color: var(--text);
  border: 1px solid var(--border); border-radius: 8px; padding: 7px 12px;
}
.search input:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: var(--accent); }

.sel {
  font: inherit; font-size: .84rem;
  background: var(--panel); color: var(--text);
  border: 1px solid var(--border); border-radius: 8px; padding: 7px 10px; cursor: pointer;
}
.sel:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.seg { display: flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.seg-btn {
  appearance: none; background: var(--panel); border: 0; color: var(--muted);
  padding: 7px 10px; cursor: pointer; display: flex;
}
.seg-btn.is-on { background: var(--accent); color: var(--bg); }
.seg-btn:not(.is-on):hover { color: var(--text); }

.btn {
  appearance: none; font: inherit; font-size: .84rem;
  border-radius: 8px; padding: 7px 14px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid var(--border); background: var(--panel); color: var(--text);
}
.btn .icon { width: 16px; height: 16px; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--bg); font-weight: 600; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { color: var(--muted); }
.btn-ghost:hover { color: var(--text); border-color: var(--accent); }
.btn-danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 50%, var(--border)); }
.btn-danger:hover { background: color-mix(in srgb, var(--panel) 82%, var(--bad) 18%); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn[disabled] { opacity: .5; cursor: default; }

/* platformy jako filtr */
.plats { display: flex; flex-wrap: wrap; gap: 6px; padding-bottom: 6px; }
.plat {
  appearance: none; font: inherit; font-size: .8rem;
  background: var(--panel); color: var(--muted);
  border: 1px solid var(--border); border-radius: 999px;
  padding: 4px 12px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 7px;
}
.plat:hover { color: var(--text); }
.plat[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--bg); font-weight: 600; }
.plat-n { font-family: var(--data); font-size: .72rem; font-variant-numeric: tabular-nums; opacity: .75; }
.plat:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.resultline { margin: 10px 0 14px; font-size: .8rem; color: var(--muted); font-family: var(--data); }

.progress {
  display: flex; align-items: center; gap: 12px;
  margin: 0 0 16px; font-size: .8rem; color: var(--muted); font-family: var(--data);
}
.progress-bar {
  flex: 1; height: 4px; border-radius: 2px;
  background: linear-gradient(90deg, var(--accent) var(--p, 0%), var(--border-soft) var(--p, 0%));
}

/* ───────────── mřížka ───────────── */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
}

.card {
  position: relative;
  /* Jednolitá barva, ne přechod. Přechod pod obrázkem dojíždí na --panel, jenže
     tělo dlaždice bylo v místě, kde obrázek končí, už o kus tmavší — vznikal
     tak světlý proužek přesně na hraně a zoom při najetí ho rozpohyboval. */
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-radius: 13px;
  overflow: hidden;
  display: flex; flex-direction: column;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0,0,0,.25);
  transition: transform .22s cubic-bezier(.2,.7,.3,1),
              border-color .22s ease, box-shadow .22s ease;
}
.card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--accent) 60%, var(--border));
  box-shadow: 0 14px 30px -14px rgba(0,0,0,.7),
              0 0 0 1px color-mix(in srgb, var(--accent) 22%, transparent);
}
.card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.card-art {
  aspect-ratio: 460 / 215;
  background: linear-gradient(135deg, var(--panel2), var(--bg2));
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.card-art img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .4s cubic-bezier(.2,.7,.3,1);
}
.card:hover .card-art img { transform: scale(1.045); }
/* Splynuti obrazku s telem dlazdice, at nekonci tvrdou hranou.
   Dole musi dojit az na plnou --panel: kdyz prechod skoncil na 88 %,
   zustal na hranici s telem dlazdice viditelny sev a zoom pri najeti ho
   rozpohyboval, takze to vypadalo jako mezera pod obrazkem. */
.card-art::after {
  content: ''; position: absolute; inset: auto 0 -1px 0; height: 46%;
  background: linear-gradient(180deg,
    transparent 0%,
    color-mix(in srgb, var(--panel) 40%, transparent) 52%,
    var(--panel) 100%);
  pointer-events: none;
}
/* upozornění, že napojení na Steam není jisté */
.flag {
  position: absolute; z-index: 2;
  margin: 8px; padding: 2px 8px;
  font-size: .66rem; letter-spacing: .04em;
  border-radius: 999px; white-space: nowrap;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border: 1px solid var(--border);
}
.flag--approx { color: var(--mid); border-color: color-mix(in srgb, var(--mid) 55%, var(--border)); }
.flag--none { color: var(--muted); }
.card-art { position: relative; }

.issue-n {
  font-family: var(--data); font-size: .72rem; font-variant-numeric: tabular-nums;
  border: 1px solid var(--border); border-radius: 999px; padding: 0 7px; margin-left: 2px;
}
#onlyIssues[aria-pressed="true"] {
  background: var(--mid); border-color: var(--mid); color: var(--bg); font-weight: 600;
}

.card-art .noart {
  font-family: var(--serif); font-size: 1.5rem; color: var(--border);
  letter-spacing: .1em;
}

.card-body { padding: 11px 13px 13px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.card-title { font-size: .95rem; line-height: 1.35; color: var(--text); }
.card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: auto; }

.chip {
  font-family: var(--data); font-size: .64rem; letter-spacing: .06em; text-transform: uppercase;
  border: 1px solid var(--border); border-radius: 4px; padding: 2px 6px; color: var(--muted);
  white-space: nowrap;
}
.chip--plat { color: var(--accent2); border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
.chip--status { color: var(--muted); }

.score {
  font-family: var(--data); font-size: .72rem; font-weight: 700;
  border-radius: 4px; padding: 2px 7px; color: var(--bg);
  font-variant-numeric: tabular-nums;
}
.score--good { background: var(--good); }
.score--mid  { background: var(--mid); }
.score--bad  { background: var(--bad); }
.score--user { background: none; color: var(--muted); border: 1px solid var(--border); font-weight: 400; }
/* skóre z IGDB není Metacritic — odlišené prstencem místo plné výplně */
.score--igdb { background: none; border: 1px solid currentColor; font-weight: 600; }
.score--igdb.score--good { color: var(--good); }
.score--igdb.score--mid  { color: var(--mid); }
.score--igdb.score--bad  { color: var(--bad); }

.mine {
  margin-left: auto; font-family: var(--data); font-size: .78rem;
  color: var(--accent2); font-variant-numeric: tabular-nums; white-space: nowrap;
}
.card-note { font-size: .76rem; color: var(--muted); }
.card-by {
  margin: -3px 0 0; font-size: .73rem; color: var(--muted);
  letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ───────────── tabulka ───────────── */

.tbl { width: 100%; border-collapse: collapse; font-size: .88rem; }
.tbl th {
  text-align: left; font-weight: 600; font-size: .72rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted);
  padding: 8px 10px; border-bottom: 1px solid var(--border);
  position: sticky; top: 53px; background: var(--bg); z-index: 5;
}
.tbl td { padding: 8px 10px; border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
.tbl tr { cursor: pointer; }
.tbl tbody tr:hover td { background: var(--panel); }
.tbl .c-num { font-family: var(--data); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.tbl .c-thumb { width: 68px; }
.tbl .c-thumb img { width: 60px; height: 28px; object-fit: cover; border-radius: 3px; display: block; }
.tbl-wrap { overflow-x: auto; }

/* ───────────── prázdný stav ───────────── */

.empty { padding: 50px 0; text-align: center; color: var(--muted); }
.empty h3 { font-family: var(--serif); font-weight: 400; color: var(--text); margin: 0 0 6px; }

/* ───────────── formulář ───────────── */

.modal {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(0,0,0,.6);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 40px 16px; overflow-y: auto;
  backdrop-filter: blur(3px);
}
.modal-card {
  position: relative; width: 100%; max-width: 520px;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 14px; padding: 24px;
}
.modal-card h2 { font-family: var(--serif); font-weight: 400; font-size: 1.25rem; margin: 0 0 18px; }
.modal-x {
  position: absolute; top: 14px; right: 14px;
  appearance: none; background: none; border: 0; color: var(--muted); cursor: pointer; padding: 4px;
}
.modal-x:hover { color: var(--text); }

.fld { display: flex; flex-direction: column; gap: 5px; margin-bottom: 13px; }
.fld > span { font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.fld input, .fld select {
  font: inherit; font-size: .9rem;
  background: var(--bg2); color: var(--text);
  border: 1px solid var(--border); border-radius: 8px; padding: 8px 11px;
}
.fld input:focus, .fld select:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.fld-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fld-adv { margin: 4px 0 16px; }
.fld-adv summary {
  cursor: pointer; font-size: .78rem; color: var(--muted);
  padding: 6px 0; list-style: none;
}
.fld-adv summary::before { content: "▸ "; }
.fld-adv[open] summary::before { content: "▾ "; }
.fld-adv summary:hover { color: var(--text); }

/* ───────────── našeptávač ───────────── */

.fld-ac { position: relative; }
.fld-hint { margin: -6px 0 12px; font-size: .76rem; color: var(--muted); }

.ac {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 5;
  margin-top: 4px; max-height: 320px; overflow-y: auto;
  background: var(--panel2); border: 1px solid var(--border);
  border-radius: 10px; box-shadow: 0 14px 36px -14px rgba(0,0,0,.7);
}
.ac-item {
  appearance: none; width: 100%; text-align: left;
  display: flex; align-items: center; gap: 11px;
  background: none; border: 0; border-bottom: 1px solid var(--border-soft);
  padding: 8px 11px; cursor: pointer; color: var(--text); font: inherit;
}
.ac-item:last-child { border-bottom: 0; }
.ac-item:hover { background: var(--panel); }
.ac-item img, .ac-noimg {
  flex: none; width: 32px; height: 44px; object-fit: cover;
  border-radius: 4px; background: var(--bg2); display: block;
}
.ac-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ac-name { font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ac-meta { font-size: .72rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ac-score {
  flex: none; font-family: var(--data); font-size: .74rem;
  color: var(--accent2); font-variant-numeric: tabular-nums;
}
.ac-empty { padding: 12px; font-size: .82rem; color: var(--muted); }

.linked {
  display: flex; align-items: center; gap: 10px;
  margin: -4px 0 14px; padding: 7px 11px;
  font-size: .78rem; color: var(--muted);
  background: color-mix(in srgb, var(--panel2) 70%, var(--accent) 12%);
  border: 1px solid color-mix(in srgb, var(--border) 50%, var(--accent) 40%);
  border-radius: 8px;
}
.linked b { color: var(--text); font-weight: 600; }
.linked button {
  margin-left: auto; appearance: none; background: none; border: 0;
  color: var(--accent2); font: inherit; font-size: .76rem; cursor: pointer;
  text-decoration: underline;
}

.modal-actions { display: flex; align-items: center; gap: 8px; margin-top: 18px; }

.foot { margin-top: 50px; padding-top: 18px; border-top: 1px solid var(--border); font-size: .8rem; color: var(--muted); max-width: 78ch; }
.foot p { margin: 0 0 7px; }

@media (max-width: 640px) {
  .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
  .search { max-width: none; }
  .fld-row { grid-template-columns: 1fr; }
  .tbl th { position: static; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ───────────── detail hry ───────────── */

/* Modal ma dva rezimy. V detailu se schova formular, v editaci detail. */
.modal[data-mode="detail"] #gameForm,
.modal[data-mode="detail"] #modalTitle { display: none; }
.modal[data-mode="form"] #detailPane,
.modal[data-mode="form"] .modal-edit,
.modal[data-mode="form"] .modal-del { display: none; }
.modal[data-mode="detail"] .modal-card { max-width: 620px; padding: 0; overflow: hidden; }

.modal-edit {
  position: absolute; top: 14px; right: 50px; z-index: 2;
  appearance: none; border: 0; cursor: pointer; padding: 7px;
  border-radius: 9px;
  /* Lezi na obrazku, tedy vzdy svetle na tmavem — var(--text) je ve svetlem
     motivu tmavy a na te plose by zmizel. */
  color: #fff;
  background: rgba(0,0,0,.5); backdrop-filter: blur(6px);
  transition: background .18s ease, color .18s ease;
}
.modal-edit:hover { background: var(--accent); color: #fff; }

.modal-del {
  position: absolute; top: 14px; right: 86px; z-index: 2;
  appearance: none; border: 0; cursor: pointer; padding: 7px;
  border-radius: 9px; color: #fff;
  background: rgba(0,0,0,.5); backdrop-filter: blur(6px);
  transition: background .18s ease;
}
.modal-del:hover { background: var(--bad); }
.modal[data-mode="detail"] .modal-x {
  z-index: 2; color: #fff; padding: 7px; border-radius: 9px;
  background: rgba(0,0,0,.5); backdrop-filter: blur(6px);
}
.modal[data-mode="detail"] .modal-x:hover { background: var(--bad); color: #fff; }

.dt-art {
  position: relative; aspect-ratio: 16 / 7;
  background: linear-gradient(135deg, var(--panel2), var(--bg2));
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.dt-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dt-art::after {
  content: ''; position: absolute; inset: auto 0 -1px 0; height: 65%;
  background: linear-gradient(180deg, transparent, var(--panel) 96%, var(--panel));
}
.dt-body { position: relative; margin-top: -46px; padding: 0 26px 26px; z-index: 1; }
.dt-title {
  font-family: var(--serif); font-weight: 400; font-size: 1.5rem;
  line-height: 1.25; margin: 0 0 10px;
  text-shadow: 0 2px 14px rgba(0,0,0,.6);
}
.dt-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }

.dt-scores { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.sc {
  display: flex; flex-direction: column; gap: 2px; align-items: center;
  min-width: 74px; padding: 9px 12px;
  background: var(--panel2); border: 1px solid var(--border-soft); border-radius: 10px;
}
.sc b {
  font-family: var(--data); font-size: 1.25rem; font-weight: 600; line-height: 1;
  font-variant-numeric: tabular-nums;
  background: none; padding: 0; border-radius: 0;
}
.sc b.score--good { color: var(--good); }
.sc b.score--mid  { color: var(--mid); }
.sc b.score--bad  { color: var(--bad); }
.sc i { font-style: normal; font-size: .8rem; opacity: .5; }
.sc span {
  font-size: .64rem; letter-spacing: .07em; text-transform: uppercase;
  color: var(--muted); text-align: center; line-height: 1.3;
}
.sc--mine { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
.sc--mine b { color: var(--accent2); }

.dt-len { margin-bottom: 18px; }
.dt-len h4 {
  margin: 0 0 8px; font-size: .7rem; font-weight: 600;
  letter-spacing: .09em; text-transform: uppercase; color: var(--muted);
}
.dt-len h4 i { font-style: normal; font-weight: 400; opacity: .7; text-transform: none; letter-spacing: 0; }
.dt-len .dt-scores { margin-bottom: 0; }
.sc--len b { color: var(--text); font-size: 1.1rem; }

/* Obal na vysku v siroke dlazdici: misto orezu ho ukazeme cely a prazdno po
   stranach vyplni rozmazana kopie tehoz obrazku. */
.card-art.is-portrait::before,
.dt-art.is-portrait::before {
  content: ''; position: absolute; inset: -8%;
  background: var(--shot) center / cover no-repeat;
  filter: blur(22px) saturate(.7) brightness(.55);
}
.card-art.is-portrait img,
.dt-art.is-portrait img {
  position: relative; width: auto; max-width: 100%;
  object-fit: contain; margin: 0 auto;
}
.card:hover .card-art.is-portrait img { transform: none; }

/* ───────────── výběr obrázku ───────────── */

.pick-box { min-height: 30px; }
.pick-note { margin: 0 0 8px; font-size: .76rem; color: var(--muted); }
.pick-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 8px; max-height: 260px; overflow-y: auto; padding-right: 2px;
}
.pick {
  appearance: none; padding: 0; cursor: pointer; overflow: hidden;
  background: var(--bg2); border: 1px solid var(--border); border-radius: 9px;
  display: flex; flex-direction: column;
  transition: border-color .16s ease, transform .16s ease;
}
.pick img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.pick span {
  padding: 4px 6px; font-size: .62rem; letter-spacing: .05em;
  text-transform: uppercase; color: var(--muted);
}
.pick:hover { border-color: var(--accent); transform: translateY(-2px); }
.pick[aria-pressed="true"] {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 45%, transparent);
}
.pick[aria-pressed="true"] span { color: var(--accent2); }
.pick.is-busy { opacity: .5; }

.chip--len {
  color: var(--muted);
  border-color: var(--border);
  font-variant-numeric: tabular-nums;
}

.dt-sum { margin: 0 0 18px; color: color-mix(in srgb, var(--text) 82%, var(--muted)); max-width: 62ch; }

.dt-facts { margin: 0; display: grid; gap: 1px; background: var(--border-soft);
  border: 1px solid var(--border-soft); border-radius: 10px; overflow: hidden; }
.fact { display: grid; grid-template-columns: 128px 1fr; gap: 12px;
  padding: 9px 13px; background: var(--panel); }
.fact dt { font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.fact dd { margin: 0; font-size: .88rem; }

/* ───────────── vlastní dialogy ───────────── */

.dlg {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(0,0,0,.6); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.dlg-card {
  width: 100%; max-width: 400px; padding: 22px;
  background: var(--panel); border: 1px solid var(--border); border-radius: 14px;
  box-shadow: 0 24px 60px -20px rgba(0,0,0,.8);
  animation: dlg-in .16s ease-out;
}
@keyframes dlg-in { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.dlg-card h3 { font-family: var(--serif); font-weight: 400; font-size: 1.1rem; margin: 0 0 8px; }
.dlg-card p { margin: 0 0 16px; font-size: .87rem; color: var(--muted); }
.dlg-card input {
  width: 100%; margin-bottom: 16px; padding: 9px 11px;
  background: var(--bg2); color: var(--text);
  border: 1px solid var(--border); border-radius: 9px; font: inherit;
}
.dlg-card input:focus { outline: none; border-color: var(--accent); }
.dlg-actions { display: flex; justify-content: flex-end; gap: 8px; }

@media (max-width: 640px) {
  .modal[data-mode="detail"] .modal-card { max-width: none; }
  .dt-body { padding: 0 18px 20px; }
  .fact { grid-template-columns: 1fr; gap: 2px; }
  .stat { border-right: 0; padding-right: 0; margin-right: 0; }
  .stats { gap: 14px 22px; }
}
