/* ═════════════════════════════════════════════════════════════════════════
 * STATISTIKY STANICE — /_statistiky/statistiky.css (sdílené všemi stanicemi)
 *
 * 1. ZÁKLAD — převzato ze stránky stanice (/mstest src/styles.css): barvy,
 *    4 styly (Aurora, Studio, Konzole, Papír), hustota, záře pozadí,
 *    společné záhlaví, karty, bublina grafů (.pm-tip), okno, patička.
 *    Při změně designu stanice/předpovědi upravit i tady.
 * 2. STATISTIKY — prvky jen této stránky (prefix st-).
 *
 * Pevné velikosti písma = calc(Npx * var(--fs)), zaoblení pod 40 px =
 * calc(Npx * var(--radius-scale)) — posuvníky ve Vzhledu pak škálují vše.
 * ═════════════════════════════════════════════════════════════════════════ */

:root {
  --font-scale: 1;
  --base: 16px;
  --radius-scale: 1;
  --fs: var(--font-scale, 1);

  --bg: #0b1020;
  --bg-grad: radial-gradient(ellipse 80% 50% at 70% 0%, rgba(56,189,248,.18), transparent 60%),
             radial-gradient(ellipse 60% 60% at 10% 100%, rgba(168,85,247,.14), transparent 60%),
             linear-gradient(180deg, #0b1020 0%, #0a0f1f 100%);
  --card: rgba(255,255,255,0.04);
  --card-strong: rgba(15,23,42,0.85);
  --card-hover: rgba(255,255,255,0.07);
  --border: rgba(255,255,255,0.10);
  --border-strong: rgba(255,255,255,0.18);
  --grid: rgba(255,255,255,0.07);
  --text: #e7ecf5;
  --muted: rgba(231,236,245,0.55);
  --dim: rgba(231,236,245,0.4);
  --accent: #38bdf8;
  --ok: #22c55e;
  --warn: #f59e0b;
  --bad: #ef4444;

  --sans: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --serif: 'Newsreader', ui-serif, Georgia, 'Times New Roman', serif;

  --r-sm: calc(6px * var(--radius-scale));
  --r-md: calc(12px * var(--radius-scale));
  --r-lg: calc(18px * var(--radius-scale));

  --grid-gap: 10px;
  --pad-card: 18px;
  --shadow-card: 0 1px 2px rgba(0,0,0,.04), 0 8px 24px rgba(0,0,0,.06);
  --t-fast: .15s cubic-bezier(.4,0,.2,1);
  --t-med:  .25s cubic-bezier(.4,0,.2,1);

  /* barvy veličin — stejné jako na stanici a v předpovědi */
  --c-rain: #3b82f6;
  --c-wind: #14b8a6;
  --c-press: #8b5cf6;
  --c-sun: #f59e0b;
  --c-light: #a855f7;
}
[data-theme="light"] {
  --bg: #f4f5f9;
  --bg-grad: radial-gradient(ellipse 70% 45% at 75% -5%, rgba(56,189,248,.16), transparent 60%),
             radial-gradient(ellipse 60% 55% at 5% 105%, rgba(168,85,247,.10), transparent 60%),
             linear-gradient(180deg, #f7f8fc 0%, #eef0f7 100%);
  --card: rgba(255,255,255,0.78);
  --card-strong: rgba(255,255,255,0.98);
  --card-hover: rgba(255,255,255,0.95);
  --border: rgba(15,23,42,0.09);
  --border-strong: rgba(15,23,42,0.16);
  --grid: rgba(15,23,42,0.07);
  --text: #0f172a;
  --muted: rgba(15,23,42,0.58);
  --dim: rgba(15,23,42,0.38);
  --shadow-card: 0 1px 2px rgba(15,23,42,.04), 0 8px 28px rgba(15,23,42,.06);
  --c-sun: #d97706;
}

[data-density="compact"]  { --grid-gap: 8px; --pad-card: 11px; }
[data-density="spacious"] { --grid-gap: 18px; --pad-card: 22px; }

/* ── AURORA — sklo a barevná záře ── */
[data-variant="aurora"] {
  --r-sm: calc(6px * var(--radius-scale));
  --r-md: calc(12px * var(--radius-scale));
  --r-lg: calc(18px * var(--radius-scale));
}
[data-variant="aurora"] body { background: var(--bg); }
[data-variant="aurora"] body::before {
  content: ""; position: fixed; inset: 0; z-index: -1;
  background: var(--bg-grad); pointer-events: none;
}

/* ── STUDIO — plné plochy, stíny ── */
[data-variant="studio"] {
  --r-sm: 0px; --r-md: 4px; --r-lg: 6px;
  --bg: #f3f1ec; --card: #ffffff; --card-strong: #ffffff; --card-hover: #fafaf6;
  --border: #1a1a1a; --border-strong: #1a1a1a; --grid: rgba(26,26,26,0.10);
  --text: #1a1a1a; --muted: rgba(26,26,26,0.6); --dim: rgba(26,26,26,0.4);
  --shadow-card: 4px 4px 0 #1a1a1a;
}
[data-variant="studio"][data-theme="dark"] {
  --bg: #14110d; --card: #1d1a15; --card-strong: #14110d; --card-hover: #25211b;
  --border: #f3f1ec; --border-strong: #f3f1ec; --grid: rgba(243,241,236,0.10);
  --text: #f3f1ec; --muted: rgba(243,241,236,0.6); --dim: rgba(243,241,236,0.4);
  --shadow-card: 4px 4px 0 #f3f1ec;
}
[data-variant="studio"] body { background: var(--bg); }

/* ── KONZOLE — terminál, strojové písmo ── */
[data-variant="console"] {
  --r-sm: 0; --r-md: 0; --r-lg: 0;
  --bg: #0a0e14; --card: #0f1419; --card-strong: #0a0e14; --card-hover: #131922;
  --border: rgba(125,225,167,0.22); --border-strong: rgba(125,225,167,0.4); --grid: rgba(125,225,167,0.12);
  --text: #c8d3e0; --muted: rgba(200,211,224,0.55); --dim: rgba(200,211,224,0.35);
  --accent: #7de1a7;
  --sans: 'JetBrains Mono', ui-monospace, monospace;
  --shadow-card: none;
}
[data-variant="console"][data-theme="light"] {
  --bg: #f4f1e8; --card: #faf8f1; --card-strong: #ffffff; --card-hover: #f0ecdf;
  --border: rgba(20,40,30,0.30); --border-strong: rgba(20,40,30,0.5); --grid: rgba(20,40,30,0.13);
  --text: #14241a; --muted: rgba(20,40,30,0.65); --dim: rgba(20,40,30,0.45);
  --accent: #166534;
}
[data-variant="console"] body { background: var(--bg); }
[data-variant="console"] body, [data-variant="console"] .app { font-family: var(--mono); }

/* ── PAPÍR — noviny, patkové písmo ── */
[data-variant="ledger"] {
  --r-sm: 2px; --r-md: 2px; --r-lg: 2px;
  --bg: #f6f0e2; --card: transparent; --card-strong: #fbf6ea; --card-hover: rgba(60,30,15,0.04);
  --border: rgba(60,30,15,0.16); --border-strong: rgba(60,30,15,0.32); --grid: rgba(60,30,15,0.10);
  --text: #2b1d12; --muted: rgba(43,29,18,0.62); --dim: rgba(43,29,18,0.42);
  --accent: #b9421a;
  --sans: var(--serif);
  --shadow-card: none;
}
[data-variant="ledger"][data-theme="dark"] {
  --bg: #1a130b; --card: transparent; --card-strong: #221a10; --card-hover: rgba(245,225,180,0.05);
  --border: rgba(245,225,180,0.16); --border-strong: rgba(245,225,180,0.32); --grid: rgba(245,225,180,0.10);
  --text: #f4e9d4; --muted: rgba(244,233,212,0.62); --dim: rgba(244,233,212,0.42);
  --accent: #f59e7a;
}
[data-variant="ledger"] body { background: var(--bg); }
[data-variant="ledger"] body, [data-variant="ledger"] .app { font-family: var(--serif); }

/* ── základ ── */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { color-scheme: dark light; scrollbar-gutter: stable; }   /* posuvník nemění šířku → grafy se nepřekreslují */
[data-theme="light"] { color-scheme: light; }
[data-theme="dark"] { color-scheme: dark; }
body {
  font-family: var(--sans);
  font-size: calc(var(--base) * var(--font-scale));
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background: var(--bg);
  min-height: 100vh; min-height: 100dvh;
  transition: background-color var(--t-med), color var(--t-med);
}
::selection { background: color-mix(in oklab, var(--accent) 35%, transparent); }
button { font: inherit; }
.app {
  max-width: 1840px;
  margin: 0 auto;
  padding: clamp(8px, 1.4vw, 18px);
  display: flex; flex-direction: column;
  gap: calc(var(--grid-gap) * 1.4);
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  ::view-transition-group(*) { animation: none; }
  *, *::before, *::after { animation-iteration-count: 1 !important; }
}

/* záře pozadí: akcent vlevo, akcent × teplota nahoře, teplota vpravo */
body::after {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(ellipse 55% 65% at 12% 35%, color-mix(in oklab, var(--accent) 55%, transparent) 0%, transparent 65%),
    radial-gradient(ellipse 80% 50% at 50% -5%, color-mix(in oklab, var(--accent) 50%, var(--temp-tint-color, var(--accent))) 0%, transparent 60%),
    radial-gradient(ellipse 55% 70% at 88% 25%, color-mix(in oklab, var(--temp-tint-color, var(--accent)) 75%, var(--accent)) 0%, transparent 65%);
  opacity: 0.55;
  transition: background 0.5s ease;
}
[data-temp="frost"] { --temp-tint-color: rgba(96, 165, 250, 0.55); }
[data-temp="cold"]  { --temp-tint-color: rgba(56, 189, 248, 0.50); }
[data-temp="cool"]  { --temp-tint-color: rgba(74, 222, 128, 0.45); }
[data-temp="warm"]  { --temp-tint-color: rgba(250, 204, 21, 0.55); }
[data-temp="hot"]   { --temp-tint-color: rgba(251, 146, 60, 0.65); }
[data-theme="light"] body::after { opacity: 0.32; }

/* načítání */
.boot {
  min-height: 70vh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; color: var(--muted); font-family: var(--mono); font-size: calc(12px * var(--fs)); letter-spacing: .05em;
}
.boot-spin {
  width: 28px; height: 28px; border-radius: 50%;
  border: 2px solid var(--border); border-top-color: var(--accent);
  animation: boot-spin .9s linear infinite;
}
@keyframes boot-spin { to { transform: rotate(360deg); } }

/* ═════════════════════════════════════════════════════════════
 * Záhlaví — stejné jako stanice a předpověď (blok „Záhlaví“)
 * ═════════════════════════════════════════════════════════════ */
.topbar {
  position: sticky; top: 8px; z-index: 800;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 8px 16px;
  min-height: 56px;
  padding: 8px 10px 8px 9px;
  border: 1px solid color-mix(in oklab, var(--accent) 12%, var(--border));
  border-radius: calc(var(--r-md) + calc(2px * var(--radius-scale)));
  background: var(--card);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  backdrop-filter: blur(20px) saturate(160%);
  box-shadow: 0 1px 0 color-mix(in oklab, var(--text) 6%, transparent) inset,
              0 12px 28px -16px rgba(0, 0, 0, .55);
  view-transition-name: zahlavi;
}
[data-theme="light"] .topbar { box-shadow: 0 1px 0 rgba(255, 255, 255, .7) inset, 0 10px 24px -16px rgba(15, 23, 42, .28); }
[data-variant="aurora"] .topbar {
  background: color-mix(in oklab, var(--card) 38%, transparent);
  -webkit-backdrop-filter: blur(30px) saturate(170%);
  backdrop-filter: blur(30px) saturate(170%);
}
.topbar .brand { display: flex; align-items: center; gap: 11px; min-width: 0; }
.topbar a.brand { color: inherit; text-decoration: none; }   /* logo = odkaz na mapu stanic /lokalita/ */
.topbar a.brand:hover .brand-title { color: var(--text); }
.topbar .brand-mark {
  width: 40px; height: 40px; flex-shrink: 0; display: grid; place-items: center; overflow: visible;
  color: var(--accent);
}
.topbar .brand-mark img { width: 40px; height: 40px; object-fit: contain; display: block; }
.topbar .brand-mark svg { width: 34px; height: 34px; }
.topbar .brand-text { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; line-height: 1.15; min-width: 0; overflow: hidden; }
.topbar .brand-title { font-size: calc(10px * var(--fs)); font-weight: 700; letter-spacing: .16em; color: var(--muted); }
.topbar .brand-locality {
  font-size: calc(16.5px * var(--fs)); font-weight: 700; letter-spacing: -.01em; color: var(--text);
  max-width: 100%; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* přepínač Stanice | Předpověď | Statistiky — jezdec pod aktivní položkou
   (view-transition-name: prepinac → při přechodu mezi stránkami se přesune) */
.topbar .site-nav {
  position: relative; isolation: isolate;
  justify-self: center; margin: 0; padding: 3px; gap: 2px;
  display: grid; grid-template-columns: repeat(var(--n, 3), 1fr);
  border-radius: calc(12px * var(--radius-scale)); border: 1px solid var(--border);
  background: color-mix(in oklab, var(--text) 5%, transparent);
}
.topbar .site-nav-item {
  position: relative; z-index: 1;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-width: 126px; height: 32px; padding: 0 16px;
  border-radius: calc(9px * var(--radius-scale));
  font-size: calc(13px * var(--fs)); font-weight: 600; line-height: 1.3;
  color: var(--muted); text-decoration: none; white-space: nowrap;
  transition: color .2s, background var(--t-fast);
}
.topbar a.site-nav-item:hover { color: var(--text); background: color-mix(in oklab, var(--text) 7%, transparent); }
.topbar .site-nav-item.active { color: var(--text); }
.topbar .site-nav-item .sn-ico { width: 18px; height: 18px; flex-shrink: 0; }
.topbar .site-nav-item.active .sn-ico { color: var(--accent); }
.topbar a.site-nav-item:hover .sn-ico { color: var(--text); }
.topbar .site-nav-locked { opacity: .45; cursor: not-allowed; }
.site-nav-thumb {
  position: absolute; z-index: 0; top: 3px; bottom: 3px;
  left: calc(3px + var(--i, 2) * (100% - 6px) / var(--n, 3));
  width: calc((100% - 6px) / var(--n, 3) - 2px);
  border-radius: calc(9px * var(--radius-scale));
  background: color-mix(in oklab, var(--accent) 22%, var(--card-strong));
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--accent) 50%, transparent),
              0 3px 10px -4px color-mix(in oklab, var(--accent) 55%, transparent);
  view-transition-name: prepinac; pointer-events: none;
}
::view-transition-group(prepinac) { animation-duration: .34s; animation-timing-function: cubic-bezier(.3, .7, .2, 1); }

/* vpravo: stav dat | akce */
.topbar-right { display: flex; align-items: center; justify-content: flex-end; gap: 10px; min-width: 0; }
.topbar-status {
  display: flex; align-items: center; justify-content: flex-end; gap: 6px; min-width: 0; overflow: hidden; flex-wrap: nowrap;
  font-family: var(--mono); font-size: calc(11px * var(--fs)); color: var(--muted);
}
.topbar-status > span { white-space: nowrap; }
.status-dot { width: 7px; height: 7px; display: inline-block; position: relative; flex-shrink: 0; }
.status-dot i { position: absolute; inset: 0; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px color-mix(in oklab, var(--ok) 22%, transparent); }
.status-dot.recent i { background: var(--warn); box-shadow: none; }
.status-dot.stale i { background: var(--bad); box-shadow: none; }
.topbar-actions { display: flex; align-items: center; gap: 2px; flex-shrink: 0; padding-left: 10px; border-left: 1px solid var(--border); }
.topbar-btn {
  appearance: none; width: 34px; height: 34px; display: inline-grid; place-items: center;
  border: 1px solid transparent; border-radius: calc(9px * var(--radius-scale));
  background: transparent; color: var(--muted); cursor: pointer; text-decoration: none;
  transition: all var(--t-fast);
}
.topbar-btn i { font-size: calc(15px * var(--fs)); line-height: 1; }
.topbar-btn:hover { color: var(--text); background: color-mix(in oklab, var(--text) 8%, transparent); }
.topbar-btn[aria-pressed="true"] {
  color: var(--accent); background: color-mix(in oklab, var(--accent) 15%, transparent);
  border-color: color-mix(in oklab, var(--accent) 35%, transparent);
}
.topbar-btn-wide, .topbar .topbar-btn.topbar-btn-wide { width: auto; padding: 0 10px; gap: 6px; grid-auto-flow: column; }
.topbar-btn-label { font-family: var(--mono); font-size: calc(11.5px * var(--fs)); font-weight: 600; letter-spacing: .01em; }
.topbar-btn-donate i { color: #f472b6; }
.topbar-btn-donate:hover { background: color-mix(in oklab, #f472b6 14%, transparent); }
[data-theme="light"] .topbar-btn-donate i { color: #db2777; }

[data-variant="studio"] .topbar { -webkit-backdrop-filter: none; backdrop-filter: none; border-radius: calc(6px * var(--radius-scale)); }
[data-variant="studio"] .topbar .site-nav { border-radius: calc(6px * var(--radius-scale)); }
[data-variant="studio"] .topbar .site-nav-item, [data-variant="studio"] .topbar-btn, [data-variant="studio"] .site-nav-thumb { border-radius: calc(4px * var(--radius-scale)); }
[data-variant="console"] .topbar { -webkit-backdrop-filter: none; backdrop-filter: none; border-radius: 0; box-shadow: none; }
[data-variant="console"] .topbar .site-nav, [data-variant="console"] .topbar .site-nav-item,
[data-variant="console"] .topbar-btn, [data-variant="console"] .site-nav-thumb { border-radius: 0; }
[data-variant="console"] .topbar .brand-locality, [data-variant="console"] .topbar .site-nav-item { font-family: var(--mono); font-weight: 500; letter-spacing: 0; }
[data-variant="ledger"] .topbar {
  -webkit-backdrop-filter: none; backdrop-filter: none;
  background: color-mix(in oklab, var(--bg) 94%, transparent);
  border: 0; border-bottom: 3px double var(--border-strong); border-radius: 0; box-shadow: none;
}
[data-variant="ledger"] .topbar .brand-title { font-family: var(--serif); letter-spacing: .22em; }
[data-variant="ledger"] .topbar .brand-locality { font-family: var(--serif); font-style: italic; font-weight: 600; font-size: calc(19px * var(--fs)); letter-spacing: 0; }
[data-variant="ledger"] .topbar .site-nav { background: transparent; border: 0; border-radius: 0; }
[data-variant="ledger"] .topbar .site-nav-item { border-radius: 0; font-family: var(--serif); font-style: italic; font-size: calc(14.5px * var(--fs)); font-weight: 500; }
[data-variant="ledger"] .site-nav-thumb { top: auto; height: 2px; bottom: 0; border-radius: 0; background: var(--text); box-shadow: none; }
[data-variant="ledger"] .topbar .site-nav-item.active .sn-ico { color: inherit; }
[data-variant="ledger"] .topbar-btn { border-radius: 0; }
[data-tiles="off"] .topbar {
  background: transparent !important; border-color: transparent !important; box-shadow: none !important;
  -webkit-backdrop-filter: blur(16px) !important; backdrop-filter: blur(16px) !important;
}

/* tablet: logo + akce / přepínač + stav */
@media (max-width: 880px) {
  .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "brand actions" "nav status";
    gap: 8px 10px; min-height: 0; padding: 8px;
  }
  .topbar .brand { grid-area: brand; }
  .topbar-right { display: contents; }
  .topbar .site-nav { grid-area: nav; justify-self: stretch; }
  .topbar .site-nav-item { min-width: 0; height: 30px; padding: 0 10px; font-size: calc(12.5px * var(--fs)); }
  .topbar-status { grid-area: status; justify-content: flex-end; font-size: calc(10.5px * var(--fs)); }
  .topbar-actions { grid-area: actions; padding-left: 0; border-left: 0; }
  .topbar-btn { width: 32px; height: 32px; }
  .topbar .brand-mark, .topbar .brand-mark img { width: 34px; height: 34px; }
  .topbar .brand-mark svg { width: 30px; height: 30px; }
  .topbar .brand-locality { font-size: calc(15px * var(--fs)); }
}
/* telefon: logo + akce / přepínač přes celou šířku / stav */
@media (max-width: 640px) {
  .topbar { grid-template-areas: "brand actions" "nav nav" "status status"; row-gap: 6px; }
  .topbar .site-nav-item { padding: 0 6px; gap: 5px; }
  .topbar-status { justify-content: center; min-height: 20px; }
  .topbar-btn, .topbar .topbar-btn.topbar-btn-donate { width: 30px; height: 30px; padding: 0; }
  .topbar-btn-donate .topbar-btn-label, .status-age { display: none; }
  .topbar .brand { gap: 8px; }
  .topbar .brand-mark, .topbar .brand-mark img { width: 30px; height: 30px; }
}
@media (max-width: 380px) {
  .topbar .brand-locality { font-size: calc(14px * var(--fs)); }
  .topbar .brand-title { letter-spacing: .12em; }
  .topbar-actions { gap: 0; }
  .topbar .site-nav-item .sn-ico { display: none; }
}

/* ═════════════════════════════════════════════════════════════
 * Přepínač Stanice | Předpověď | Statistiky — tři stejné díly, jezdec
 * pod aktivní položkou (--i = pořadí, --n = počet). Stejný blok je ve
 * styles.css stanice a styles-v2.css předpovědi — držet shodný.
 * ═════════════════════════════════════════════════════════════ */
.topbar .site-nav.is-multi { grid-template-columns: repeat(var(--n, 3), 1fr); }
.topbar .site-nav.is-multi .site-nav-thumb {
  left: calc(3px + var(--i, 0) * (100% - 6px) / var(--n, 3));
  width: calc((100% - 6px) / var(--n, 3) - 2px);
}
@media (max-width: 640px) { .topbar .site-nav.is-multi .site-nav-item { padding: 0 4px; gap: 4px; } }
@media (max-width: 400px) { .topbar .site-nav.is-multi .sn-ico { display: none; } }

/* plynulý přechod mezi stránkami (stanice ↔ předpověď ↔ statistiky) */
@view-transition { navigation: auto; }
::view-transition-group(*) { animation-duration: .28s; }

/* ═════════════════════════════════════════════════════════════
 * Karty = widgety předpovědi / karty stanice
 * ═════════════════════════════════════════════════════════════ */
.card {
  position: relative; min-width: 0;
  scroll-margin-top: calc(var(--hdr-h, 64px) + 18px);   /* skok na kartu nezajede pod přilepené záhlaví */
  border-radius: var(--r-md);
  padding: var(--pad-card);
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(255,255,255,0.02) inset, 0 2px 8px color-mix(in oklab, var(--accent) 4%, rgba(0,0,0,0.15));
  display: flex; flex-direction: column; gap: 12px;
  transition: border-color var(--t-fast);
}
[data-theme="light"] .card { box-shadow: 0 1px 0 rgba(255,255,255,0.6) inset, 0 2px 8px rgba(15,23,42,0.06); }
.card:hover { border-color: color-mix(in oklab, var(--accent) 22%, var(--border)); }
[data-variant="aurora"] .card {
  background: color-mix(in oklab, var(--card) 38%, transparent);
  -webkit-backdrop-filter: blur(30px) saturate(170%);
  backdrop-filter: blur(30px) saturate(170%);
}
[data-variant="studio"] .card { background: var(--card); border: 1.5px solid var(--border); border-radius: var(--r-md); box-shadow: var(--shadow-card); }
[data-variant="console"] .card { background: var(--card); border: 1px solid var(--border); border-radius: 0; box-shadow: none; }
[data-variant="console"] .card::before {
  content: ''; position: absolute; inset: 4px; border: 1px dashed var(--border); pointer-events: none; opacity: 0.4;
}
[data-variant="ledger"] .card { background: var(--card); border: none; border-top: 1px solid var(--border); border-radius: 0; box-shadow: none; }
[data-tiles="off"] .card {
  background: transparent !important; border-color: transparent !important; box-shadow: none !important;
  -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
}
[data-tiles="off"] .card::before { display: none !important; }

.card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; min-width: 0; }
.card-head h2 {
  display: flex; align-items: center; gap: 6px; margin: 0; min-width: 0;
  font-family: var(--sans); font-size: calc(11.5px * var(--fs)); font-weight: 600; letter-spacing: 0.01em;
  color: var(--text); text-transform: uppercase;
}
.card-head h2 > span { opacity: .85; }
.card-head h2 i {
  display: inline-grid; place-items: center; width: 20px; height: 20px;
  color: var(--accent); opacity: .8; font-size: calc(11px * var(--fs));
}
.card-head h2 small {
  font-family: var(--mono); font-size: calc(10px * var(--fs)); font-weight: 500;
  letter-spacing: .04em; color: var(--muted); text-transform: none; opacity: .9;
}
[data-variant="console"] .card-head h2 { letter-spacing: .12em; }
[data-variant="ledger"] .card-head h2 { font-family: var(--serif); text-transform: none; font-size: calc(15px * var(--fs)); font-style: italic; }
.card-tools { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-width: 0; }
.card-note { font-size: calc(11px * var(--fs)); color: var(--muted); line-height: 1.4; margin: 0; }

/* segmentový přepínač (jako výběr modelu / rychlosti v předpovědi) */
.seg {
  display: inline-flex; flex-wrap: wrap; padding: 2px; gap: 2px; max-width: 100%;
  border-radius: calc(10px * var(--radius-scale)); border: 1px solid var(--border);
  background: color-mix(in oklab, var(--text) 4%, transparent);
}
.seg button {
  appearance: none; border: 0; background: transparent; color: var(--muted);
  height: 26px; padding: 0 9px; border-radius: calc(8px * var(--radius-scale));
  font: 600 calc(11.5px * var(--fs)) var(--sans); cursor: pointer; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 5px;
  transition: color var(--t-fast), background var(--t-fast);
}
.seg button:hover { color: var(--text); background: color-mix(in oklab, var(--text) 6%, transparent); }
.seg button[aria-pressed="true"] {
  color: var(--text);
  background: color-mix(in oklab, var(--accent) 22%, var(--card-strong));
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--accent) 50%, transparent);
}
.seg button i { font-size: calc(12px * var(--fs)); }
.seg button .sw { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.seg button[aria-pressed="false"] .sw { opacity: .35; }
[data-variant="studio"] .seg, [data-variant="studio"] .seg button { border-radius: calc(3px * var(--radius-scale)); }
[data-variant="console"] .seg, [data-variant="console"] .seg button { border-radius: 0; font-family: var(--mono); }
[data-variant="ledger"] .seg { border: 0; background: transparent; }
[data-variant="ledger"] .seg button { border-radius: 0; font-family: var(--serif); font-style: italic; font-size: calc(13px * var(--fs)); }
[data-variant="ledger"] .seg button[aria-pressed="true"] { background: transparent; box-shadow: inset 0 -2px 0 var(--text); }

.btn {
  appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 28px; padding: 0 10px; border-radius: calc(8px * var(--radius-scale));
  border: 1px solid var(--border); background: transparent; color: var(--muted);
  font: 600 calc(11.5px * var(--fs)) var(--sans); cursor: pointer; white-space: nowrap; text-decoration: none;
  transition: all var(--t-fast);
}
.btn:hover { color: var(--text); border-color: var(--border-strong); background: var(--card-hover); }
.btn i { font-size: calc(12.5px * var(--fs)); }
.btn:disabled { opacity: .4; cursor: default; }

/* ═════════════════════════════════════════════════════════════
 * Bublina grafů — stejná jako stanice a předpověď (.pm-tip)
 * ═════════════════════════════════════════════════════════════ */
.pm-tip {
  position: absolute; z-index: 30; pointer-events: none; white-space: nowrap; min-width: 160px; text-align: left;
  padding: 8px 11px 9px; border-radius: 10px; border: 1px solid var(--border-strong);
  background: color-mix(in oklab, var(--card-strong) 95%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .28); color: var(--text);
  font: 400 calc(12px * var(--fs))/1.35 var(--sans);
}
[data-theme="light"] .pm-tip { box-shadow: 0 10px 28px rgba(15, 23, 42, .16); }
/* jediná bublina stránky: pevně v okně nad kartami i záhlavím (umisťuje placeTip) */
.pm-tip.pm-tip-fixed { position: fixed; z-index: 9600; display: none; max-width: calc(100vw - 16px); transition: none !important; }   /* ani „omezit pohyb“ (0,01 ms) ji nesmí animovat */
[data-variant="studio"] .pm-tip, [data-variant="ledger"] .pm-tip { background: var(--card-strong); }
.pm-tip .tip-time { font: 600 calc(12px * var(--fs)) var(--mono); color: var(--text); margin-bottom: 5px; }
.pm-tip .tip-time small { margin-left: 6px; font: 500 calc(10.5px * var(--fs)) var(--sans); color: var(--muted); }
.pm-tip .tip-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 2px 0; }
.pm-tip .tip-row .k { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: calc(11px * var(--fs)); }
.pm-tip .tip-row strong { display: inline-flex; align-items: center; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.pm-tip .tip-row strong small { margin-left: 6px; font-weight: 400; color: var(--muted); }
.pm-tip .tip-row.is-sel .k, .pm-tip .tip-row.is-sel strong { color: var(--text); font-weight: 700; }
.pm-tip .tip-sw { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.pm-tip .tip-foot { margin-top: 6px; padding-top: 5px; border-top: 1px solid var(--border); font-size: calc(10.5px * var(--fs)); color: var(--muted); white-space: nowrap; }
.pm-tip .tip-foot b { color: var(--text); font-weight: 600; }
[data-variant="console"] .pm-tip { border-radius: 0; }

/* ═════════════════════════════════════════════════════════════
 * Okno (Podpořit) a patička — jako stanice
 * ═════════════════════════════════════════════════════════════ */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.55);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  z-index: 9000; display: flex; align-items: center; justify-content: center;
  padding: clamp(8px, 2vw, 24px); animation: fadeIn .18s ease;
}
@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }
@keyframes slideUp { from { opacity: 0; transform: translateY(12px) } to { opacity: 1; transform: none } }
.modal {
  background: var(--bg); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--r-lg);
  width: 100%; max-width: 380px; max-height: 90vh; max-height: 90dvh; overflow-y: auto;
  padding: clamp(16px, 2.5vw, 24px);
  box-shadow: 0 24px 60px rgba(0,0,0,0.4);
  animation: slideUp .25s cubic-bezier(.4,0,.2,1);
}
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.modal-head h2 { margin: 0; font-size: clamp(16px, 2vw, 19px); font-weight: 600; letter-spacing: -0.01em; }
.modal-close {
  background: transparent; border: 1px solid var(--border); color: var(--text);
  width: 36px; height: 36px; border-radius: var(--r-sm); font-size: calc(20px * var(--fs)); cursor: pointer;
  display: grid; place-items: center; flex-shrink: 0; transition: all var(--t-fast);
}
.modal-close:hover { border-color: var(--accent); color: var(--accent); }
.donate-body { color: var(--muted); line-height: 1.55; }
.donate-body p { margin: 0 0 12px; }
.donate-account { text-align: center; font-size: calc(20px * var(--fs)); font-weight: 600; color: var(--text); font-family: var(--mono); letter-spacing: 0.02em; margin: 16px 0 !important; }
.donate-qr { display: block; margin: 16px auto 4px; max-width: 200px; width: 100%; height: auto; border-radius: var(--r-md); }
.donate-qr-popis { text-align: center; font-size: calc(13px * var(--fs)); margin: 10px 0 0 !important; }

/* ── zápatí: jedno pro všechny stránky (stejný blok je v _statistiky/statistiky.css, predpoved/styles-v2.css
   a mstest/src/styles.css). Na střed: značka + lokalita, odkazy, údaje o datech stránky (Lukáš 8. 11. 2026). ── */
.pm-pata { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 24px 8px 8px;
           border-top: 1px solid var(--border); text-align: center; color: var(--muted); font-size: calc(13px * var(--fs)); }
.pm-pata-znacka { display: inline-flex; align-items: center; gap: 9px; color: var(--text); font-weight: 600; font-size: calc(14px * var(--fs)); }
.pm-pata-znacka img { width: 24px; height: 24px; border-radius: 6px; }
.pm-pata-znacka span { color: var(--muted); font-weight: 400; }
.pm-pata-odkazy { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 22px; }
.pm-pata-odkazy a { display: inline-flex; align-items: center; gap: 7px; color: inherit; text-decoration: none; }
.pm-pata-odkazy a:hover { color: var(--text); }
.pm-pata-odkazy i { opacity: .75; }
.pm-pata-data { font-family: var(--mono); font-size: calc(11px * var(--fs)); opacity: .8; text-wrap: balance; }

/* ═════════════════════════════════════════════════════════════
 * 2. STATISTIKY
 * ═════════════════════════════════════════════════════════════ */

/* mřížka karet: 12 sloupců, karty přes ½ / ⅓ / ⅔ / celou šířku */
.st-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--grid-gap); }
.st-grid > .card { grid-column: span 12; }
.st-grid > .w4 { grid-column: span 4; }
.st-grid > .w5 { grid-column: span 5; }
.st-grid > .w6 { grid-column: span 6; }
.st-grid > .w7 { grid-column: span 7; }
.st-grid > .w8 { grid-column: span 8; }
@media (max-width: 1280px) {
  .st-grid > .w4, .st-grid > .w5, .st-grid > .w7, .st-grid > .w8 { grid-column: span 6; }
}
@media (max-width: 1000px) {
  .st-grid > .card { grid-column: span 12 !important; }
}

/* ── hlavní panel ── */
.st-hero { padding: clamp(12px, 1.6vw, 22px); gap: 14px; }
/* nadpis vlevo, ukazatele vpravo; když se nevejdou vedle sebe (velké písmo,
   strojové písmo Konzole), ukazatele se zalomí pod nadpis — nic se nemačká */
.st-hero-top { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; }
.st-hero-title { display: flex; flex-direction: column; gap: 6px; min-width: 0; flex: 1 1 calc(380px * var(--fs)); }
.st-eyebrow { font: 700 calc(10.5px * var(--fs)) var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 7px; }
.st-eyebrow i { color: var(--accent); font-size: calc(12px * var(--fs)); }
.st-hero h1 { margin: 0; font-size: clamp(calc(24px * var(--fs)), 2.6vw, calc(38px * var(--fs))); font-weight: 700; letter-spacing: -.02em; line-height: 1.08; }
[data-variant="ledger"] .st-hero h1 { font-family: var(--serif); font-style: italic; font-weight: 600; }
[data-variant="console"] .st-hero h1 { font-family: var(--mono); font-weight: 600; letter-spacing: -.01em; }
.st-hero-sub { font-size: calc(13px * var(--fs)); color: var(--muted); }
.st-hero-sub b { color: var(--text); font-weight: 600; }
.st-periods { margin-top: 4px; }
.st-periods .seg button { height: 30px; padding: 0 12px; font-size: calc(12.5px * var(--fs)); }

.st-kpis { flex: 1 1 auto; max-width: 100%; display: grid; grid-template-columns: repeat(4, minmax(min-content, 1fr)); gap: 4px 0; }
.st-kpi:first-child { border-left: 0; padding-left: 0; }
.st-kpi { display: flex; flex-direction: column; gap: 2px; padding: 4px 18px; border-left: 1px solid var(--border); min-width: 0; }
.st-kpi-k { display: flex; align-items: center; gap: 6px; font-size: calc(10.5px * var(--fs)); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); line-height: 1.25; }
.st-kpi-k i { color: var(--accent); font-size: calc(12px * var(--fs)); }
.st-kpi-v { font-size: calc(28px * var(--fs)); font-weight: 700; letter-spacing: -.02em; line-height: 1.1; white-space: nowrap; font-variant-numeric: tabular-nums; }
.st-kpi-v small { font-size: .5em; font-weight: 600; color: var(--muted); margin-left: 3px; letter-spacing: 0; }
.st-kpi-s { font-size: calc(11.5px * var(--fs)); color: var(--muted); line-height: 1.35; }
.st-kpi-s b { font-weight: 600; }
.st-kpi-s .up { color: #f97316; } .st-kpi-s .down { color: #38bdf8; }
[data-theme="light"] .st-kpi-s .up { color: #c2410c; } [data-theme="light"] .st-kpi-s .down { color: #0369a1; }
[data-variant="aurora"] .st-kpi:first-child .st-kpi-v {
  background: linear-gradient(135deg, var(--text) 30%, var(--accent) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
[data-variant="ledger"] .st-kpi-v { font-family: var(--serif); font-style: italic; font-weight: 600; }
[data-variant="console"] .st-kpi-v { font-family: var(--mono); font-weight: 600; }
@media (max-width: 900px) {
  .st-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 0; }
  .st-kpi:nth-child(3) { border-left: 0; padding-left: 0; }
  .st-kpi { padding: 2px 12px; }
}
@media (max-width: 720px) {
  .st-kpi-v { font-size: calc(24px * var(--fs)); }
}

/* teplotní pás celého měření (každý den jeden proužek) */
.st-stripe { position: relative; }
.st-stripe svg { display: block; width: 100%; cursor: pointer; touch-action: pan-y; }
.st-stripe-legend { display: flex; justify-content: space-between; gap: 10px; margin-top: 4px; font: 500 calc(10.5px * var(--fs)) var(--mono); color: var(--muted); }

/* ── plochy grafů ── */
.plot { position: relative; width: 100%; min-width: 0; }
.plot > svg { display: block; overflow: visible; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.plot text { font-family: var(--mono); fill: var(--muted); }
.plot .ax { font-size: calc(10.5px * var(--fs)); }
.plot .ax-strong { fill: var(--text); font-weight: 600; }
.plot .lane-name { font: 600 calc(10.5px * var(--fs)) var(--sans); fill: var(--text); letter-spacing: .05em; text-transform: uppercase; opacity: .85; }
.plot .lane-sum { font-size: calc(10.5px * var(--fs)); fill: var(--muted); }
.plot .lane-sum tspan.v { fill: var(--text); font-weight: 600; }
[data-variant="studio"] .plot line.g { stroke: var(--muted); stroke-opacity: .5; stroke-dasharray: 2 4; }
.plot-empty { padding: 30px 10px; text-align: center; color: var(--muted); font: calc(12px * var(--fs)) var(--mono); }

.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: calc(11px * var(--fs)); color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 14px; height: 3px; border-radius: 2px; display: inline-block; }
.legend i.dot { width: 8px; height: 8px; border-radius: 50%; }
.legend i.band { height: 8px; opacity: .55; }
.legend i.dash { background: none !important; border-top: 2px dashed currentColor; height: 0; }

/* navigátor pod průběhem (výřez období) */
.nav-strip { position: relative; margin-top: 2px; }
.nav-strip svg { display: block; width: 100%; touch-action: none; user-select: none; -webkit-user-select: none; }
.nav-strip .win { fill: color-mix(in oklab, var(--accent) 10%, transparent); stroke: var(--accent); stroke-width: 1.5; cursor: grab; }
.nav-strip .win:active { cursor: grabbing; }
.nav-strip .grip { fill: var(--accent); cursor: ew-resize; }
.nav-strip .shade { fill: var(--bg); opacity: .62; pointer-events: none; }
.zoom-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; font: 500 calc(11px * var(--fs)) var(--mono); color: var(--muted); }
.zoom-bar b { color: var(--text); font-weight: 600; }

/* ── klimatické dny ── */
.cd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 168px), 1fr)); gap: 8px; }
.cd {
  display: flex; flex-direction: column; gap: 2px; min-width: 0;
  padding: 9px 11px 8px; border-radius: var(--r-sm);
  background: color-mix(in oklab, var(--c, var(--accent)) 6%, transparent);
  border: 1px solid color-mix(in oklab, var(--c, var(--accent)) 16%, var(--border));
}
.cd-k { display: flex; align-items: center; gap: 6px; font-size: calc(10.5px * var(--fs)); color: var(--muted); text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cd-k i { color: var(--c, var(--accent)); font-size: calc(13px * var(--fs)); }
.cd-v { display: flex; align-items: baseline; gap: 6px; font-size: calc(24px * var(--fs)); font-weight: 700; line-height: 1.15; font-variant-numeric: tabular-nums; }
.cd-v small { font-size: calc(11px * var(--fs)); font-weight: 500; color: var(--muted); }
.cd-def { font: 500 calc(10px * var(--fs)) var(--mono); color: var(--muted); }
.cd-bars { display: flex; align-items: flex-end; gap: 3px; height: 30px; margin-top: 4px; }
.cd-bar { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: stretch; justify-content: flex-end; height: 100%; position: relative; }
.cd-bar i { display: block; border-radius: 2px 2px 0 0; background: color-mix(in oklab, var(--c, var(--accent)) 38%, transparent); min-height: 1px; }
.cd-bar.sel i { background: var(--c, var(--accent)); }
.cd-bar.part i { background: repeating-linear-gradient(135deg, color-mix(in oklab, var(--c, var(--accent)) 38%, transparent) 0 3px, transparent 3px 5px); }
.cd-bar.sel.part i { background: repeating-linear-gradient(135deg, var(--c, var(--accent)) 0 3px, color-mix(in oklab, var(--c, var(--accent)) 45%, transparent) 3px 5px); }
.cd-years { display: flex; gap: 3px; font: 500 calc(9px * var(--fs)) var(--mono); color: var(--dim); }
.cd-years span { flex: 1; text-align: center; min-width: 0; overflow: hidden; }

/* ── rekordy ── */
.rec-groups { columns: auto 250px; column-gap: 18px; }
.rec-groups > .rec-group { break-inside: avoid; margin-bottom: 12px; }
.rec-group h3 { margin: 0 0 4px; display: flex; align-items: center; gap: 6px; font: 700 calc(10.5px * var(--fs)) var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.rec-group h3 i { color: var(--accent); font-size: calc(12px * var(--fs)); }
.rec {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 0 10px;
  padding: 6px 2px; border-bottom: 1px dashed var(--border);
}
.rec:last-child { border-bottom: 0; }
.rec-k { font-size: calc(12.5px * var(--fs)); color: var(--text); min-width: 0; }
.rec-v { font-size: calc(15px * var(--fs)); font-weight: 700; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rec-v small { font-size: calc(11px * var(--fs)); font-weight: 500; color: var(--muted); margin-left: 2px; }
.rec-d { grid-column: 1 / -1; font: 500 calc(10.5px * var(--fs)) var(--mono); color: var(--muted); }
.rec-d button, .linkish {
  appearance: none; border: 0; padding: 0; background: none; color: inherit; font: inherit; cursor: pointer;
  text-decoration: underline; text-decoration-color: color-mix(in oklab, var(--accent) 45%, transparent); text-underline-offset: 2px;
}
.rec-d button:hover, .linkish:hover { color: var(--accent); }

/* ── kalendář ── */
.cal-legend { display: flex; align-items: center; gap: 4px 8px; font: 500 calc(10.5px * var(--fs)) var(--mono); color: var(--muted); flex-wrap: wrap; }
.cal-legend .ramp { width: min(320px, 38vw); height: 8px; border-radius: 4px; }

/* ── tabulky ── */
.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
table.tbl { width: 100%; border-collapse: collapse; font-size: calc(12.5px * var(--fs)); font-variant-numeric: tabular-nums; }
.tbl th, .tbl td { padding: 6px 8px; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--border); }
.tbl th:first-child, .tbl td:first-child { text-align: left; padding-left: 14px; }
/* na úzké obrazovce se tabulka posouvá do strany — první sloupec zůstane stát */
@media (max-width: 1000px) {
  .tbl td:first-child { position: sticky; left: 0; z-index: 1; background: color-mix(in oklab, var(--card-strong) 92%, transparent); }
  .tbl thead th:first-child { left: 0; z-index: 2; }
}
.tbl thead th {
  position: sticky; top: 0; z-index: 1;
  font: 600 calc(10.5px * var(--fs)) var(--sans); letter-spacing: .05em; text-transform: uppercase; color: var(--muted);
  background: color-mix(in oklab, var(--card-strong) 92%, transparent);
  cursor: pointer; user-select: none;
}
.tbl thead th:hover { color: var(--text); }
.tbl thead th .ar { font-size: calc(9px * var(--fs)); margin-left: 3px; color: var(--accent); }
.tbl thead th small { display: block; font: 500 calc(9.5px * var(--fs)) var(--mono); letter-spacing: 0; text-transform: none; color: var(--dim); }
.tbl tbody tr.row { cursor: pointer; transition: background var(--t-fast); }
.tbl tbody tr.row:hover { background: color-mix(in oklab, var(--accent) 7%, transparent); }
.tbl tbody tr.row.open { background: color-mix(in oklab, var(--accent) 10%, transparent); }
.tbl td.m { font-weight: 600; color: var(--text); }
.tbl td.m i { color: var(--muted); font-size: calc(10px * var(--fs)); margin-right: 6px; transition: transform var(--t-fast); display: inline-block; }
.tbl tr.open td.m i { transform: rotate(90deg); color: var(--accent); }
.tbl td.m small { font: 500 calc(10px * var(--fs)) var(--mono); color: var(--warn); margin-left: 6px; }
.tbl .t { font-weight: 600; }
.tbl .an { display: block; font: 500 calc(10px * var(--fs)) var(--mono); }
.tbl .an.up { color: #f97316; } .tbl .an.down { color: #38bdf8; } .tbl .an.eq { color: var(--muted); }
[data-theme="light"] .tbl .an.up { color: #c2410c; } [data-theme="light"] .tbl .an.down { color: #0369a1; }
.tbl .bar { position: relative; }
.tbl .bar::before {
  content: ''; position: absolute; right: 8px; bottom: 3px; height: 3px; border-radius: 2px;
  width: calc(var(--w, 0) * (100% - 16px)); background: var(--bc, var(--c-rain)); opacity: .55;
}
.tbl .muted { color: var(--dim); }
.tbl tr.sub td { background: color-mix(in oklab, var(--text) 2.5%, transparent); font-size: calc(11.5px * var(--fs)); padding-top: 4px; padding-bottom: 4px; }
.tbl tr.sub td:first-child { padding-left: 34px; color: var(--muted); font-family: var(--mono); }
.tbl tr.sub.we td:first-child { color: var(--text); }
/* svislá čárka u prvního sloupce = poslední měsíc s daty / vybraný rok / tento měsíc
   (vysvětlení v poznámce pod tabulkou a v bublině řádku) */
.tbl tr.cur td:first-child { box-shadow: inset 4px 0 0 var(--accent); }
.tbl .yr { font: 500 calc(10px * var(--fs)) var(--mono); color: var(--muted); display: block; }
.tbl tbody tr.foot td { font-weight: 700; border-top: 2px solid var(--border-strong); border-bottom: 0; }
.tbl-more { display: flex; justify-content: center; padding-top: 8px; }

/* ── vítr ── */
.wind-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: center; }
@media (max-width: 1500px) { .w4 .wind-wrap { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) { .wind-wrap { grid-template-columns: minmax(0, 1fr); } }
.bf-list { display: flex; flex-direction: column; gap: 4px; }
.bf { display: grid; grid-template-columns: 112px minmax(0, 1fr) 40px; align-items: center; gap: 8px; font-size: calc(11.5px * var(--fs)); }
.bf-k { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bf-k b { color: var(--text); font-weight: 600; margin-right: 4px; font-family: var(--mono); }
.bf-t { height: 10px; border-radius: 5px; background: color-mix(in oklab, var(--text) 6%, transparent); overflow: hidden; }
.bf-t i { display: block; height: 100%; border-radius: 5px; }
.bf-n { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }

/* ── histogram ── */
.hist-sum { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: calc(11.5px * var(--fs)); color: var(--muted); }
.hist-sum b { color: var(--text); }

/* ── panel Vzhled ── */
.vz-backdrop { position: fixed; inset: 0; z-index: 9400; background: transparent; }
.vz-panel {
  position: fixed; top: 72px; right: max(12px, calc((100vw - 1840px) / 2 + 12px)); z-index: 9500;
  width: 340px; max-width: calc(100vw - 24px); max-height: calc(100vh - 90px); max-height: calc(100dvh - 90px);
  display: flex; flex-direction: column;
  background: color-mix(in oklab, var(--card-strong) 94%, transparent); color: var(--text);
  border: 1px solid color-mix(in oklab, var(--accent) 20%, var(--border)); border-radius: var(--r-md);
  box-shadow: 0 18px 50px rgba(0,0,0,.32), 0 1px 0 rgba(255,255,255,.04) inset;
  -webkit-backdrop-filter: blur(24px) saturate(160%); backdrop-filter: blur(24px) saturate(160%);
  font: calc(12.5px * var(--fs))/1.45 var(--sans);
  animation: slideUp .2s cubic-bezier(.4,0,.2,1);
}
[data-variant="studio"] .vz-panel, [data-variant="ledger"] .vz-panel { background: var(--card-strong); }
.vz-hd { display: flex; align-items: center; justify-content: space-between; padding: 10px 8px 9px 16px; border-bottom: 1px solid var(--border); }
.vz-hd b { font-size: calc(13px * var(--fs)); font-weight: 700; }
.vz-x { appearance: none; border: 0; background: transparent; color: var(--muted); width: 32px; height: 32px; border-radius: calc(8px * var(--radius-scale)); cursor: pointer; font-size: calc(15px * var(--fs)); display: grid; place-items: center; }
.vz-x:hover { background: var(--card-hover); color: var(--text); }
.vz-body { padding: 12px 16px 16px; display: flex; flex-direction: column; gap: 12px; overflow-y: auto; scrollbar-color: var(--border-strong) transparent; }
.vz-sect { display: flex; flex-direction: column; gap: 9px; padding-top: 12px; border-top: 1px solid var(--border); }
.vz-sect:first-child { padding-top: 0; border-top: 0; }
.vz-sect-h { display: flex; align-items: center; gap: 7px; font-size: calc(11px * var(--fs)); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.vz-sect-h i { color: var(--accent); font-size: calc(12px * var(--fs)); }
.vz-hint { font-size: calc(11px * var(--fs)); color: var(--muted); margin-top: -5px; line-height: 1.35; }
.vz-choices { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: 6px; }
.vz-choice {
  appearance: none; position: relative; min-width: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  padding: 7px 4px; border-radius: var(--r-sm); border: 1px solid var(--border);
  background: color-mix(in oklab, var(--card) 70%, transparent);
  color: var(--muted); font: 600 calc(11.5px * var(--fs))/1.2 var(--sans); cursor: pointer;
  transition: color var(--t-fast), border-color var(--t-fast), background var(--t-fast);
}
.vz-choice > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.vz-choice i { font-size: calc(15px * var(--fs)); }
.vz-choice small { font-weight: 500; font-size: calc(10px * var(--fs)); opacity: .75; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.vz-choice:hover { color: var(--text); border-color: var(--border-strong); }
.vz-choice[aria-checked="true"] { color: var(--text); border-color: var(--accent); background: color-mix(in oklab, var(--accent) 16%, transparent); box-shadow: inset 0 0 0 1px var(--accent); }
.vz-choice[aria-checked="true"] i { color: var(--accent); }
.vz-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.vz-row > span { font-weight: 500; }
.vz-row output { font-family: var(--mono); font-size: calc(11px * var(--fs)); color: var(--muted); }
.vz-toggle { appearance: none; width: 34px; height: 20px; border-radius: 10px; border: 0; padding: 0; position: relative; cursor: pointer; background: var(--grid); box-shadow: inset 0 0 0 1px var(--border); flex-shrink: 0; }
.vz-toggle::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform var(--t-fast); }
.vz-toggle[aria-checked="true"] { background: var(--accent); box-shadow: none; }
.vz-toggle[aria-checked="true"]::after { transform: translateX(14px); }
.vz-swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.vz-sw { appearance: none; width: 26px; height: 26px; border-radius: 50%; border: 0; cursor: pointer; box-shadow: 0 0 0 1px var(--border); }
.vz-sw[aria-checked="true"] { box-shadow: 0 0 0 2px var(--card-strong), 0 0 0 4px var(--text); }
.vz-slider { -webkit-appearance: none; appearance: none; width: 100%; margin: 6px 0; height: 4px; border-radius: 2px; background: var(--grid); cursor: pointer; }
.vz-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 15px; height: 15px; border-radius: 50%; background: var(--accent); border: 2px solid var(--card-strong); box-shadow: 0 1px 4px rgba(0,0,0,.3); }
.vz-slider::-moz-range-thumb { width: 13px; height: 13px; border-radius: 50%; background: var(--accent); border: 2px solid var(--card-strong); }
@media (max-width: 640px) {
  .vz-backdrop { background: rgba(0, 0, 0, .45); }
  .vz-panel {
    left: 0; right: 0; bottom: 0; top: auto; width: auto; max-width: none;
    max-height: 85vh; max-height: 85dvh;
    border-radius: calc(18px * var(--radius-scale)) calc(18px * var(--radius-scale)) 0 0;
  }
  .vz-x { width: 40px; height: 40px; font-size: calc(18px * var(--fs)); }
}

/* zvýraznění karty po skoku z rekordu / kalendáře */
.card.flash { animation: flash 1.2s ease; }
@keyframes flash { 0%, 40% { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 30%, transparent); } }

/* tisk: bez záhlaví a ovládání */
@media print {
  body::after, body::before { display: none; }
  .topbar, .vz-panel, .seg, .nav-strip, .zoom-bar .btn { display: none !important; }
  .card { break-inside: avoid; }
}

/* Odznak podporovatele na rohu loga: window.PM_PODPORA = {uroven, nazev} vkládá server
   (routes.py podpora_js) jen u stanice s darem (Lukáš 22. 10. 2026). Kresba a barva úrovně jako
   hlavní stránka /lokalita/: u1 srdce, u2 srdce s jiskrou, u3 koruna. Stejný blok je na stanici,
   v Počasí i ve statistikách — držet shodný. */
.topbar .brand-mark { position: relative; }
.topbar .brand-mark:has(.podpora-odznak) { overflow: visible; }
.podpora-odznak {
  position: absolute; right: -6px; bottom: -5px; z-index: 2;
  width: 17px; height: 17px; border-radius: 50%;
  display: grid; place-items: center;
  background: #ec4899; color: #fff; font-style: normal;
  box-shadow: 0 0 0 2px var(--card-strong, #0b1020), 0 2px 6px rgba(0, 0, 0, .35);
  cursor: help;
}
.podpora-odznak.u2 { background: #8b5cf6; }
.podpora-odznak.u3 { background: #f59e0b; }
.topbar .brand-mark .podpora-odznak svg { display: block; width: 11px; height: 11px; }
