/* =====================================================================
   Výzva – vizuální styl
   Antracitová + „volt“ (zelenožlutý akcent) + aqua pro informace.
   Zaoblené karty, pilulky, velká čísla. Administrace používá horní
   záložky místo bočního panelu.
   ===================================================================== */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Space+Grotesk:wght@500;600;700&display=swap");

:root {
  --bg: #f5f4ee;
  --surface: #ffffff;
  --bar: #111418;
  --ink: #111418;
  --muted: #5b6472;
  --line: #e3e2d9;
  --volt: #c8f03c;
  --volt-ink: #13200a;
  --aqua: #0b8f8d;
  --aqua-soft: #d8f3f1;
  --coral: #e5482f;
  --coral-soft: #fde2dc;
  --ok: #17794a;
  --ok-soft: #dcf4e5;
  --warn: #7a5200;
  --warn-soft: #fff1c9;
  --danger: #c42b1c;

  --radius: 18px;
  --radius-sm: 10px;
  --shadow: 0 1px 0 rgba(17, 20, 24, .04), 0 12px 32px -16px rgba(17, 20, 24, .22);
  --display: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --text: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c0f12; --surface: #151a20; --bar: #1b2129; --ink: #eef1f4; --muted: #98a2b1; --line: #282f39;
    --aqua: #36c2bf; --aqua-soft: #0f3434; --coral-soft: #3a1d17; --ok-soft: #10301f; --warn-soft: #3a2d0c;
    --shadow: 0 12px 32px -16px rgba(0, 0, 0, .7);
  }
}
:root[data-theme="dark"] {
  --bg: #0c0f12; --surface: #151a20; --bar: #1b2129; --ink: #eef1f4; --muted: #98a2b1; --line: #282f39;
  --aqua: #36c2bf; --aqua-soft: #0f3434; --coral-soft: #3a1d17; --ok-soft: #10301f; --warn-soft: #3a2d0c;
  --shadow: 0 12px 32px -16px rgba(0, 0, 0, .7);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font: 16px/1.55 var(--text); color: var(--ink); background: var(--bg); min-height: 100vh;
  -webkit-text-size-adjust: 100%;
}
a { color: var(--aqua); text-decoration: none; font-weight: 500; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--aqua); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--display); line-height: 1.1; letter-spacing: -.02em; margin: 0 0 .5rem; font-weight: 700; }
h1 { font-size: clamp(1.9rem, 4.5vw, 2.7rem); }
h2 { font-size: 1.45rem; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 .8rem; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }

/* ---------- Horní lišta ---------- */
.topbar {
  position: sticky; top: 0; z-index: 10; display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center;
  justify-content: space-between; padding: .7rem clamp(1rem, 3vw, 2rem); background: var(--bar); color: #f5f7fa;
}
.brand { display: inline-flex; align-items: center; gap: .6rem; color: #f5f7fa; font-family: var(--display); font-weight: 700; font-size: 1.2rem; letter-spacing: -.01em; }
.brand:hover { text-decoration: none; color: #fff; }
.brand-mark {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px;
  background: var(--volt); color: var(--volt-ink); font-weight: 700; font-size: 1.15rem;
}
.nav { display: flex; flex-wrap: wrap; gap: .25rem; align-items: center; }
.nav a { color: #c9d2de; padding: .45rem .8rem; border-radius: 999px; font-weight: 500; }
.nav a:hover { color: #fff; background: rgba(255, 255, 255, .08); text-decoration: none; }
.nav a.active { color: var(--volt-ink); background: var(--volt); }

/* ---------- Rozložení ---------- */
.wrap { max-width: 1120px; margin: 0 auto; padding: 1.5rem clamp(1rem, 3vw, 2rem) 4.5rem; }
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }
.split { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 900px) { .split { grid-template-columns: 1.15fr .85fr; } }
.section { margin: 1.75rem 0; }
.actions { display: flex; flex-wrap: wrap; gap: .55rem; align-items: center; }

/* Úvodní blok – tmavý, s jemnou září */
.hero {
  position: relative; overflow: hidden; border-radius: var(--radius); padding: clamp(1.5rem, 4vw, 2.6rem);
  background:
    radial-gradient(60% 90% at 100% 0%, rgba(200, 240, 60, .28), transparent 60%),
    radial-gradient(50% 80% at 0% 100%, rgba(54, 194, 191, .32), transparent 60%),
    var(--bar);
  color: #f5f7fa; margin-bottom: 1.5rem;
}
.hero h1 { color: #fff; font-size: clamp(2rem, 5vw, 3.2rem); max-width: 18ch; }
.hero p { color: #c9d2de; max-width: 58ch; font-size: 1.08rem; }
.hero .muted { color: #aab5c4; }
.hero .btn.secondary { color: #fff; border-color: rgba(255, 255, 255, .3); background: transparent; }
.hero .btn.secondary:hover { border-color: #fff; }

/* ---------- Karty ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.15rem 1.2rem; box-shadow: var(--shadow);
}
.card.link { transition: transform .15s, border-color .15s; }
.card.link:hover { transform: translateY(-3px); border-color: var(--aqua); text-decoration: none; }
.card.section { margin: 1.5rem 0; }
.card h2, .card h3 { margin-top: 0; }
.empty { padding: 1.5rem; border: 2px dashed var(--line); border-radius: var(--radius); color: var(--muted); text-align: center; }

/* ---------- Štítky ---------- */
.badge {
  display: inline-flex; align-items: center; gap: .3rem; font-size: .75rem; font-weight: 600; padding: .2rem .6rem;
  border-radius: 999px; background: var(--line); color: var(--ink); letter-spacing: .01em;
}
.badge::before { content: ""; width: .45rem; height: .45rem; border-radius: 50%; background: currentColor; opacity: .8; }
.badge.open { background: var(--ok-soft); color: var(--ok); }
.badge.finished { background: var(--warn-soft); color: var(--warn); }
.badge.evaluated { background: var(--aqua-soft); color: var(--aqua); }
.badge.draft, .badge.warn { background: var(--coral-soft); color: #b42d17; }

/* ---------- Tlačítka ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem; border: 0; cursor: pointer;
  font: 600 .95rem/1.2 var(--text); padding: .65rem 1.1rem; border-radius: 999px;
  background: var(--volt); color: var(--volt-ink); transition: transform .08s, filter .15s, background-color .15s;
}
.btn:hover { filter: brightness(1.05); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn.secondary { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.btn.secondary:hover { box-shadow: inset 0 0 0 1px var(--ink); }
.btn.danger { background: var(--coral); color: #fff; }
.btn.small { padding: .32rem .8rem; font-size: .84rem; }
.btn:disabled { opacity: .5; cursor: not-allowed; filter: none; }

/* ---------- Formuláře ---------- */
.stack, form.stack { display: grid; gap: .9rem; }
label { display: grid; gap: .35rem; font-weight: 600; font-size: .9rem; }
label.inline, .inline { display: flex; align-items: center; gap: .5rem; font-weight: 500; }
input, select, textarea {
  font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: .6rem .75rem; width: 100%; min-height: 42px;
}
input[type="checkbox"] { width: 1.1rem; height: 1.1rem; min-height: 0; accent-color: var(--aqua); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--aqua); outline-offset: 0; border-color: transparent; }
textarea { min-height: 96px; resize: vertical; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; margin: 0; display: grid; gap: .7rem; background: var(--surface); }
legend { font-family: var(--display); font-weight: 700; padding: 0 .4rem; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.checks { display: flex; flex-wrap: wrap; gap: .5rem 1.1rem; }

/* Pravidla výzvy (kombinace kategorií, fáze) */
.combo-row, .phase-row { display: grid; gap: .7rem; }
.combo-name { font-family: var(--display); font-weight: 700; font-size: 1.1rem; }
.combo-sport { color: var(--muted); font-size: .9rem; }
.phase-from, .phase-to, .phase-mode, .phase-days { min-width: 0; }

/* ---------- Tabulky ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; font-size: .94rem; }
th, td { text-align: left; padding: .7rem .8rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
th { font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; background: var(--bg); }
tbody tr:hover td { background: color-mix(in srgb, var(--aqua) 6%, transparent); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table-wrap td input, .table-wrap td select { min-height: 36px; padding: .35rem .5rem; }

/* ---------- Záložky (admin i výzvy) ---------- */
.tabs {
  display: inline-flex; flex-wrap: wrap; gap: .25rem; margin: .4rem 0 1.4rem; padding: .3rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px; box-shadow: var(--shadow);
}
.tab {
  border: 0; background: transparent; color: var(--muted); padding: .48rem 1rem; border-radius: 999px;
  cursor: pointer; font: 600 .92rem var(--text); text-decoration: none;
}
.tab:hover { color: var(--ink); }
.tab.active { background: var(--ink); color: var(--bg); }

/* ---------- Statistiky a žebříček ---------- */
.stats { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); margin-bottom: 1.3rem; }
.stat {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem;
  position: relative; overflow: hidden;
}
.stat::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--volt); }
.stat b { display: block; font-family: var(--display); font-size: 1.9rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.rank { font-family: var(--display); font-weight: 700; color: var(--muted); }
.rank.top { color: var(--ink); background: var(--volt); color: var(--volt-ink); display: inline-block; min-width: 2rem; text-align: center; border-radius: 999px; padding: .05rem .5rem; }

/* ---------- Hlášky ---------- */
.notice { border-radius: var(--radius-sm); padding: .8rem 1rem; margin: .6rem 0; background: var(--warn-soft); color: var(--ink); border-left: 4px solid var(--warn); }
.notice.ok { background: var(--ok-soft); border-color: var(--ok); }
.notice.err { background: var(--coral-soft); border-color: var(--coral); }
.toast {
  position: fixed; bottom: 1.1rem; left: 50%; transform: translateX(-50%); background: var(--bar); color: #f5f7fa;
  padding: .7rem 1.1rem; border-radius: 999px; box-shadow: var(--shadow); opacity: 0; pointer-events: none;
  transition: opacity .2s; max-width: 90vw; font-weight: 500;
}
.toast.show { opacity: 1; }
.toast.err { background: var(--coral); color: #fff; }

/* ---------- Fotky a galerie ---------- */
.gallery-grid { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.gallery-grid.big { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.photo { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.photo img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; background: var(--line); }
.photo figcaption { padding: .6rem .75rem .75rem; display: grid; gap: .15rem; font-size: .88rem; }
.comment { padding: .75rem 0; border-bottom: 1px solid var(--line); }
.comment:last-child { border-bottom: 0; }

/* ---------- Mobil ---------- */
@media (max-width: 640px) {
  .row { grid-template-columns: 1fr; }
  .card { padding: 1rem; }
  .hero { border-radius: 14px; }
  th, td { padding: .5rem .4rem; font-size: .88rem; }
  .hide-sm { display: none; }
  .nav a { padding: .4rem .6rem; }
  .tabs { border-radius: var(--radius-sm); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
[hidden] { display: none !important; }

.site-footer { text-align: center; padding: .9rem 1rem; font-size: .8rem; color: var(--muted); border-top: 1px solid var(--line); background: var(--bg); }

/* ---------- Administrace: vždy světlá (ignoruje tmavý režim systému) ---------- */
body.admin-page {
  --bg: #f3f4f6; --surface: #ffffff; --bar: #111418; --ink: #111418; --muted: #5b6472; --line: #e2e4ea;
  --aqua: #0b8f8d; --aqua-soft: #d8f3f1; --coral-soft: #fde2dc; --ok-soft: #dcf4e5; --warn-soft: #fff1c9;
  --shadow: 0 1px 0 rgba(17, 20, 24, .04), 0 12px 32px -16px rgba(17, 20, 24, .18);
  background: var(--bg); color: var(--ink);
}
body.admin-page .admin-side { background: var(--surface); color: var(--ink); border-right: 1px solid var(--line); }
body.admin-page .admin-brand { color: var(--ink); }
body.admin-page .admin-brand:hover { color: var(--ink); }
body.admin-page .admin-side-group { color: var(--muted); }
body.admin-page .admin-side nav a { color: var(--ink); }
body.admin-page .admin-side nav a:hover { background: var(--bg); color: var(--ink); }
body.admin-page .admin-side nav a[aria-current="page"] { background: var(--volt); color: var(--volt-ink); }
body.admin-page .admin-me { border-top-color: var(--line); }
body.admin-page .admin-me span { color: var(--muted); }
body.admin-page .admin-me a { color: var(--ink); }
body.admin-page .admin-me a:hover { color: var(--aqua); }
body.admin-page .admin-main { background: var(--bg); }
body.admin-page .table-wrap th { background: var(--bg); }
body.admin-page .tab.active { background: var(--ink); color: #fff; }

/* =====================================================================
   Moderní navigace, přechody a animace
   ===================================================================== */
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes zoomIn { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }

/* Horní lišta: průhledná, rozmazaná, přilepená nahoru */
.topbar {
  background: color-mix(in srgb, var(--bar) 88%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(12px); backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.nav { margin-left: auto; }
.nav a { transition: background-color .2s, color .2s; }
.nav a.active { box-shadow: 0 0 0 1px rgba(200, 240, 60, .35); }
.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 999px; cursor: pointer;
  background: rgba(255, 255, 255, .08); color: #f5f7fa; font-size: 1.1rem; transition: background-color .2s, transform .15s;
}
.icon-btn:hover { background: rgba(255, 255, 255, .16); }
.icon-btn:active { transform: scale(.94); }
.menu-btn { display: none; }
.burger, .burger::before, .burger::after { display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px; transition: transform .3s, background-color .2s, top .3s; }
.burger { position: relative; }
.burger::before, .burger::after { content: ""; position: absolute; left: 0; }
.burger::before { top: -6px; }
.burger::after { top: 6px; }
.menu-open .burger { background: transparent; }
.menu-open .burger::before { top: 0; transform: rotate(45deg); }
.menu-open .burger::after { top: 0; transform: rotate(-45deg); }

@media (max-width: 820px) {
  .menu-btn { display: inline-grid; order: 1; margin-left: auto; }
  .theme-btn { order: 2; }
  .nav { display: none; order: 3; width: 100%; margin-left: 0; flex-direction: column; align-items: stretch; padding: .4rem 0 .6rem; }
  .topbar.menu-open .nav { display: flex; animation: fadeUp .3s both; }
  .nav a { padding: .75rem .9rem; }
}

/* Tlačítko Zpět na podstránkách */
.back-btn {
  display: inline-flex; align-items: center; gap: .3rem; margin: 0 0 .6rem -.5rem; padding: .35rem .75rem .35rem .55rem;
  border: 0; border-radius: 999px; background: none; color: var(--muted); font: 600 .92rem var(--text); cursor: pointer;
  transition: color .15s, background-color .15s;
}
.back-btn:hover { color: var(--ink); background: var(--surface); }

/* Přechody mezi stránkami a vstup prvků */
#app.page-enter { animation: fadeUp .45s cubic-bezier(.2, .7, .2, 1) both; }
.hero { animation: zoomIn .6s cubic-bezier(.2, .7, .2, 1) both; }
.grid > *, .news-list > *, .gallery-grid > *, .stats > * { animation: fadeUp .5s cubic-bezier(.2, .7, .2, 1) both; }
.grid > *:nth-child(2), .news-list > *:nth-child(2), .gallery-grid > *:nth-child(2), .stats > *:nth-child(2) { animation-delay: .05s; }
.grid > *:nth-child(3), .news-list > *:nth-child(3), .gallery-grid > *:nth-child(3), .stats > *:nth-child(3) { animation-delay: .1s; }
.grid > *:nth-child(4), .news-list > *:nth-child(4), .gallery-grid > *:nth-child(4), .stats > *:nth-child(4) { animation-delay: .15s; }
.grid > *:nth-child(5), .news-list > *:nth-child(5), .gallery-grid > *:nth-child(5), .stats > *:nth-child(5) { animation-delay: .2s; }
.grid > *:nth-child(n+6), .news-list > *:nth-child(n+6), .gallery-grid > *:nth-child(n+6), .stats > *:nth-child(n+6) { animation-delay: .25s; }

.btn { transition: transform .15s, filter .15s, background-color .15s, box-shadow .15s; }
.btn:hover { transform: translateY(-1px); }
.card.link { transition: transform .25s cubic-bezier(.2, .7, .2, 1), border-color .25s, box-shadow .25s; }
.card.link:hover { transform: translateY(-4px); box-shadow: 0 22px 44px -22px rgba(17, 20, 24, .4); }

.toast { transform: translate(-50%, 16px); transition: opacity .25s, transform .3s cubic-bezier(.2, .7, .2, 1); }
.toast.show { transform: translate(-50%, 0); }

/* Aktuality */
.news-list { display: grid; gap: 1rem; }
.news-item {
  display: grid; gap: .35rem; padding: 1.2rem 1.3rem; background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); text-decoration: none;
  transition: transform .25s cubic-bezier(.2, .7, .2, 1), border-color .25s, box-shadow .25s;
}
.news-item:hover { transform: translateY(-3px); border-color: var(--aqua); box-shadow: 0 22px 44px -22px rgba(17, 20, 24, .4); text-decoration: none; }
.news-item h3 { margin: 0; font-size: 1.3rem; }
.news-item p { margin: 0; }
.news-date { font-size: .76rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--aqua); }
.news-article { max-width: 760px; margin: 0 auto; }
.news-article h1 { margin: .45rem 0 1rem; }
.news-body { white-space: pre-wrap; font-size: 1.08rem; line-height: 1.7; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; margin: 1.8rem 0 .9rem; }
.section-head h2 { margin: 0; }
.page-head { margin-bottom: 1.3rem; }
.page-head h1 { margin-bottom: .25rem; }

/* Galerie: měkké karty, zoom při najetí, lightbox */
.gallery-grid.big { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.1rem; }
.photo {
  border: 0; border-radius: 20px; background: var(--surface); box-shadow: var(--shadow); overflow: hidden;
  transition: transform .3s cubic-bezier(.2, .7, .2, 1), box-shadow .3s;
}
.photo:hover { transform: translateY(-4px); box-shadow: 0 26px 50px -22px rgba(17, 20, 24, .45); }
.photo-link { display: block; overflow: hidden; cursor: zoom-in; }
.photo-link img { transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.photo-link:hover img { transform: scale(1.06); }
.photo figcaption { padding: .8rem .95rem 1rem; }

.lightbox {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 3.5rem 4.5rem;
  background: rgba(8, 10, 14, .9); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  animation: fadeIn .2s both;
}
body.lb-open { overflow: hidden; }
.lb-figure { margin: 0; display: grid; gap: .9rem; justify-items: center; max-width: 1100px; width: 100%; }
.lb-figure img { max-width: 100%; max-height: 76vh; border-radius: 16px; object-fit: contain; box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .8); animation: zoomIn .3s cubic-bezier(.2, .7, .2, 1) both; }
#lb-cap { color: #d9e0ea; text-align: center; }
#lb-cap a { color: var(--volt); }
.lb-close, .lb-nav {
  position: absolute; display: grid; place-items: center; width: 46px; height: 46px; border: 0; border-radius: 999px; cursor: pointer;
  background: rgba(255, 255, 255, .12); color: #fff; font-size: 1.7rem; line-height: 1; transition: background-color .2s, transform .15s;
}
.lb-close:hover, .lb-nav:hover { background: var(--volt); color: var(--volt-ink); }
.lb-close { top: 1rem; right: 1rem; }
.lb-nav { top: 50%; margin-top: -23px; }
.lb-prev { left: 1rem; }
.lb-next { right: 1rem; }

@media (max-width: 640px) {
  .lightbox { padding: 3.2rem .6rem 4rem; }
  .lb-nav { top: auto; bottom: 1rem; margin-top: 0; }
  .lb-prev { left: calc(50% - 56px); }
  .lb-next { right: calc(50% - 56px); }
  .gallery-grid.big { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
}

/* =====================================================================
   Výzva: přehled, pořadí, statistiky a administrace výzvy
   ===================================================================== */
.caps { text-transform: uppercase; letter-spacing: .06em; font-weight: 600; margin: 0 0 .5rem; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .6rem; }
.chip {
  display: inline-flex; align-items: center; padding: .35rem .8rem; border-radius: 999px; font-size: .88rem; font-weight: 600;
  color: var(--ink); background: var(--bg); border: 1px solid var(--line); text-decoration: none; transition: background-color .2s, color .2s, border-color .2s;
}
.chip:hover { border-color: var(--aqua); text-decoration: none; }
.chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.sort { color: var(--ink); text-decoration: none; font-weight: 700; white-space: nowrap; }
.sort:hover { color: var(--aqua); text-decoration: underline; }
.sort.on { color: var(--aqua); }
.table-wrap td.num { min-width: 4.5rem; }

.rank-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.rank-list li { display: flex; align-items: center; gap: .75rem; }
.rank-list li > div { display: grid; gap: .1rem; min-width: 0; }
.rank-no {
  display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: 999px; flex: none;
  font-family: var(--display); font-weight: 700; background: var(--bg); color: var(--muted); border: 1px solid var(--line);
}
.rank-no.top { background: var(--volt); color: var(--volt-ink); border-color: transparent; }

.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
.fact { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1rem; display: grid; gap: .15rem; box-shadow: var(--shadow); }
.fact b { font-family: var(--display); font-size: 1.25rem; line-height: 1.2; overflow-wrap: anywhere; }
@media (max-width: 640px) { .facts { grid-template-columns: 1fr; } }

.earth-card { display: flex; flex-wrap: wrap; gap: 1.4rem; align-items: center; }
.earth-ring {
  --p: 0; width: 170px; height: 170px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: conic-gradient(var(--aqua) calc(var(--p) * 1%), var(--line) 0);
  animation: fadeIn .6s both;
}
.earth-ring > div { width: 128px; height: 128px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; align-content: center; text-align: center; }
.earth-ring b { font-family: var(--display); font-size: 1.7rem; line-height: 1; }
.earth-ring span { display: block; color: var(--muted); font-size: .85rem; font-weight: 600; }
.earth-text { flex: 1; min-width: 200px; display: grid; gap: .25rem; }
.earth-text h3 { margin: 0 0 .3rem; }
.earth-text p { margin: 0; }

.bar-row { display: grid; gap: .3rem; padding: .7rem 0; border-bottom: 1px solid var(--line); }
.bar-row:last-child { border-bottom: 0; }
.bar-row p { margin: 0; }
.bar { height: 10px; border-radius: 999px; background: var(--bg); overflow: hidden; }
.bar span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--aqua), var(--volt)); transition: width .8s cubic-bezier(.2, .7, .2, 1); }

.chart { width: 100%; height: 170px; display: block; }
.chart rect { fill: var(--aqua); opacity: .55; transition: opacity .2s; }
.chart rect:hover { opacity: 1; }
.chart-legend { display: flex; justify-content: space-between; gap: 1rem; margin-top: .4rem; flex-wrap: wrap; }

.row-warn td { background: color-mix(in srgb, var(--coral) 10%, transparent); }
body.admin-page .row-warn td { background: var(--coral-soft); }

.tabs { margin: 1rem 0 1.2rem; }

/* ---------- Administrace: postranní panel ---------- */
body.admin-page .wrap { max-width: none; padding: 0; }
.admin-shell { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: calc(100vh - 62px); }
.admin-side {
  background: var(--bar); color: #c9d2de; padding: 1.2rem 1rem; display: flex; flex-direction: column; gap: .9rem;
  position: sticky; top: 62px; height: calc(100vh - 62px); overflow-y: auto;
}
.admin-brand { display: inline-flex; align-items: center; gap: .6rem; color: #f5f7fa; font-family: var(--display); font-weight: 700; font-size: 1.2rem; text-decoration: none; }
.admin-brand:hover { color: #fff; text-decoration: none; }
.admin-side-group { margin: .9rem 0 0 .7rem; font-size: .75rem; color: #8592a3; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }
.admin-side nav { display: grid; gap: .2rem; }
.admin-side nav a { color: #c9d2de; text-decoration: none; padding: .6rem .8rem; border-radius: var(--radius-sm); font-weight: 600; }
.admin-side nav a:hover { background: rgba(255, 255, 255, .08); color: #fff; text-decoration: none; }
.admin-side nav a[aria-current="page"] { background: var(--volt); color: var(--volt-ink); }
.admin-me { margin-top: auto; border-top: 1px solid rgba(255, 255, 255, .12); padding-top: 1rem; font-size: .9rem; }
.admin-me p { margin: 0 0 .4rem; }
.admin-me span { color: #8592a3; word-break: break-all; }
.admin-me a { color: #f5f7fa; font-weight: 600; }
.admin-me a:hover { color: var(--volt); }
.admin-main { padding: 1.6rem clamp(1rem, 3vw, 2.4rem) 4rem; min-width: 0; }
.admin-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.admin-head h1 { margin: 0; font-size: clamp(1.8rem, 3.6vw, 2.5rem); }
.admin-main h2 { font-size: 1.3rem; }
@media (max-width: 900px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-side { position: static; height: auto; padding: 1rem; }
  .admin-side nav { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
  .admin-side-group { display: none; }
  .admin-me { margin-top: 0; }
}
