/* ==========================================================================
   Online TV zdarma – hlavní stylopis
   Paleta vychází z historické verze webu: #3366CC (logo), #C5E5F4 (hlavička),
   tmavý horní pruh #636363 → #424242.
   ========================================================================== */

:root {
  /* barvy značky */
  --brand:            #3366CC;
  /* plocha (navigace, tlačítka) a text na ní – v tmavém režimu se liší od --brand */
  --brand-solid:      #3366CC;
  --brand-solid-hover:#24479a;
  --on-brand:         #ffffff;
  --brand-dark:       #24479a;
  --brand-darker:     #1a3474;
  --brand-light:      #e8f0fd;
  --brand-lighter:    #f4f8fe;
  --sky:              #C5E5F4;
  --sky-soft:         #e4f2fa;
  --topbar-from:      #636363;
  --topbar-to:        #424242;

  /* akcenty */
  --accent:           #e8590c;
  --accent-light:     #fff1e8;
  --live:             #d92b2b;
  --success:          #15803d;
  --success-light:    #e9f7ee;
  --warning:          #b45309;
  --warning-light:    #fff7e6;
  --danger:           #b91c1c;
  --danger-light:     #fdecec;

  /* neutrály */
  --bg:               #f4f7fb;
  --surface:          #ffffff;
  --surface-2:        #f8fafc;
  --surface-3:        #eef2f7;
  --border:           #dbe3ec;
  --border-strong:    #c3cfdd;
  --text:             #16202e;
  --text-soft:        #4a5768;
  --text-muted:       #74839a;

  /* rozměry */
  --radius:           10px;
  --radius-sm:        6px;
  --radius-lg:        16px;
  --shadow-sm:        0 1px 2px rgba(16,32,56,.06), 0 1px 3px rgba(16,32,56,.05);
  --shadow:           0 2px 4px rgba(16,32,56,.06), 0 8px 20px rgba(16,32,56,.07);
  --shadow-lg:        0 8px 16px rgba(16,32,56,.08), 0 24px 48px rgba(16,32,56,.10);
  --wrap:             1240px;
  --gap:              22px;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
          "Noto Sans", Arial, sans-serif;
  --font-num: "SF Mono", "Segoe UI Mono", "Roboto Mono", ui-monospace, monospace;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand:          #6fa0ff;
    --brand-solid:      #2f5fbd;
    --brand-solid-hover:#3d72d8;
    --on-brand:         #ffffff;
    --brand-dark:     #8ab4ff;
    --brand-darker:   #a8c8ff;
    --brand-light:    #1b2740;
    --brand-lighter:  #151d2e;
    --sky:            #24405c;
    --sky-soft:       #1a2b3d;
    --bg:             #0e141d;
    --surface:        #161e2a;
    --surface-2:      #1b2431;
    --surface-3:      #212c3b;
    --border:         #2b3746;
    --border-strong:  #3b4a5d;
    --text:           #e6edf6;
    --text-soft:      #b3c0d1;
    --text-muted:     #8494a8;
    --accent:         #ff9354;
    --accent-light:   #33231a;
    --live:           #ff6b6b;
    --success:        #4ade80;
    --success-light:  #14291d;
    --warning:        #fbbf24;
    --warning-light:  #2d2411;
    --danger:         #f87171;
    --danger-light:   #2d1616;
    --shadow-sm:      0 1px 2px rgba(0,0,0,.4);
    --shadow:         0 2px 4px rgba(0,0,0,.35), 0 8px 20px rgba(0,0,0,.3);
    --shadow-lg:      0 8px 16px rgba(0,0,0,.4), 0 24px 48px rgba(0,0,0,.4);
  }
}
:root[data-theme="dark"] {
  --brand:#6fa0ff; --brand-dark:#8ab4ff; --brand-darker:#a8c8ff;
  --brand-solid:#2f5fbd; --brand-solid-hover:#3d72d8; --on-brand:#ffffff;
  --brand-light:#1b2740; --brand-lighter:#151d2e; --sky:#24405c; --sky-soft:#1a2b3d;
  --bg:#0e141d; --surface:#161e2a; --surface-2:#1b2431; --surface-3:#212c3b;
  --border:#2b3746; --border-strong:#3b4a5d;
  --text:#e6edf6; --text-soft:#b3c0d1; --text-muted:#8494a8;
  --accent:#ff9354; --accent-light:#33231a; --live:#ff6b6b;
  --success:#4ade80; --success-light:#14291d; --warning:#fbbf24; --warning-light:#2d2411;
  --danger:#f87171; --danger-light:#2d1616;
  --shadow-sm:0 1px 2px rgba(0,0,0,.4);
  --shadow:0 2px 4px rgba(0,0,0,.35), 0 8px 20px rgba(0,0,0,.3);
  --shadow-lg:0 8px 16px rgba(0,0,0,.4), 0 24px 48px rgba(0,0,0,.4);
}

/* ---------- základ ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font: 16px/1.65 var(--font);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, video { max-width: 100%; height: auto; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-dark); text-decoration: underline; }
h1, h2, h3, h4, h5 { margin: 0 0 .5em; line-height: 1.25; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: clamp(1.6rem, 1.1rem + 1.9vw, 2.35rem); }
h2 { font-size: clamp(1.3rem, 1.05rem + 1vw, 1.7rem); }
h3 { font-size: 1.2rem; }
p  { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.4em; }
hr { border: 0; border-top: 1px solid var(--border); margin: 2rem 0; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--brand); color: #fff; padding: 12px 20px; border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

.wrap { width: min(100% - 32px, var(--wrap)); margin-inline: auto; }
@media (max-width: 640px) { .wrap { width: calc(100% - 24px); } }

/* ---------- horní tmavý pruh ---------- */
.topbar {
  background: linear-gradient(to bottom, var(--topbar-from), var(--topbar-to));
  color: #e6e6e6;
  font-size: 13px;
  border-bottom: 1px solid rgba(0,0,0,.25);
}
.topbar .wrap { display: flex; align-items: center; gap: 18px; min-height: 34px; flex-wrap: wrap; }
.topbar a { color: #f0f0f0; }
.topbar a:hover { color: #fff; }
.topbar__date { color: #b9b9b9; }
.topbar__spacer { margin-left: auto; }
.topbar__links { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.theme-toggle {
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18);
  color: #f0f0f0; border-radius: 999px; padding: 3px 12px; font-size: 12px;
  cursor: pointer; font-family: inherit; line-height: 1.7;
}
.theme-toggle:hover { background: rgba(255,255,255,.22); }
@media (max-width: 720px) { .topbar__date, .topbar__links .is-optional { display: none; } }

/* ---------- hlavička ---------- */
.masthead {
  background: linear-gradient(to bottom, var(--sky) 0%, var(--sky-soft) 45%, var(--surface) 100%);
  border-bottom: 1px solid var(--border);
}
.masthead .wrap {
  display: flex; align-items: center; gap: 28px;
  padding: 18px 0 16px; flex-wrap: wrap;
}
/* Logo je pozadím, aby šlo v tmavém režimu vyměnit za světlou variantu. */
.logo {
  display: block; flex-shrink: 0; width: 259px; height: 70px;
  background: url('/assets/img/logo@2x.png') no-repeat center / contain;
}
.logo:hover { text-decoration: none; opacity: .9; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo { background-image: url('/assets/img/logo-dark@2x.png'); }
}
:root[data-theme="dark"] .logo { background-image: url('/assets/img/logo-dark@2x.png'); }
@media (max-width: 480px) { .logo { width: 200px; height: 54px; } }

.masthead__search { flex: 1 1 320px; max-width: 520px; }
.search-form { display: flex; position: relative; }
.search-form input[type="search"] {
  flex: 1; min-width: 0; font: inherit; font-size: 15px;
  padding: 11px 46px 11px 16px;
  border: 1px solid var(--border-strong); border-radius: 999px;
  background: var(--surface); color: var(--text);
  box-shadow: var(--shadow-sm);
}
.search-form input[type="search"]::placeholder { color: var(--text-muted); }
.search-form button {
  position: absolute; right: 4px; top: 4px; bottom: 4px; width: 40px;
  border: 0; border-radius: 999px; background: var(--brand-solid); color: var(--on-brand);
  cursor: pointer; display: grid; place-items: center;
}
.search-form button:hover { background: var(--brand-solid-hover); }

.masthead__actions { display: flex; gap: 10px; align-items: center; margin-left: auto; }
@media (max-width: 900px) { .masthead__actions { display: none; } }

/* ---------- hlavní navigace ---------- */
.nav {
  background: var(--brand-solid);
  position: sticky; top: 0; z-index: 60;
  box-shadow: 0 2px 10px rgba(16,32,56,.14);
}
.nav .wrap { display: flex; align-items: stretch; gap: 2px; }
.nav__list {
  display: flex; list-style: none; margin: 0; padding: 0; gap: 2px;
  flex: 1; overflow-x: auto; scrollbar-width: none;
}
.nav__list::-webkit-scrollbar { display: none; }
.nav__list a {
  display: flex; align-items: center; gap: 7px; white-space: nowrap;
  padding: 13px 15px; color: #fff; font-weight: 600; font-size: 14.5px;
  border-bottom: 3px solid transparent;
}
.nav__list a:hover { background: rgba(255,255,255,.14); text-decoration: none; }
.nav__list a.is-active { background: rgba(0,0,0,.16); border-bottom-color: #fff; }
.nav__list .nav-icon { width: 17px; height: 17px; flex-shrink: 0; opacity: .92; }
/* tlačítko menu vedle loga – jen na mobilu */
.burger {
  display: none; align-items: center; gap: 8px; margin-left: auto;
  background: var(--brand-solid); color: var(--on-brand);
  border: 0; border-radius: 999px; padding: 10px 16px;
  font: inherit; font-size: 14.5px; font-weight: 700; cursor: pointer;
  box-shadow: var(--shadow-sm);
}
.burger:hover { background: var(--brand-solid-hover); }

/* záhlaví a zavírací křížek se ukazují jen v mobilní zásuvce */
.nav__head, .nav__close { display: none; }
.nav__backdrop {
  position: fixed; inset: 0; z-index: 70; background: rgba(8, 16, 30, .55);
  opacity: 0; transition: opacity .22s ease;
}
.nav__backdrop.is-open { opacity: 1; }

@media (max-width: 900px) {
  .burger { display: inline-flex; }

  /* modrý pruh na mobilu mizí, menu se z něj stává zásuvka */
  .nav { position: static; background: transparent; box-shadow: none; }
  .nav .wrap { width: auto; margin: 0; }

  .nav__list {
    position: fixed; top: 0; bottom: 0; left: 0; z-index: 80;
    width: min(86vw, 380px); flex-direction: column; gap: 0;
    background: var(--brand-solid); box-shadow: 6px 0 30px rgba(0, 0, 0, .35);
    padding: 0 0 24px; overflow-y: auto; overscroll-behavior: contain;
    transform: translateX(-100%); transition: transform .26s ease;
  }
  .nav__list.is-open { transform: none; }
  @media (prefers-reduced-motion: reduce) {
    .nav__list, .nav__backdrop { transition: none; }
  }

  .nav__head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 18px; color: #fff; font-weight: 700; font-size: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, .18);
  }
  .nav__close {
    display: grid; place-items: center; width: 38px; height: 38px;
    background: rgba(255, 255, 255, .14); border: 0; border-radius: 50%;
    color: #fff; cursor: pointer;
  }
  .nav__close:hover { background: rgba(255, 255, 255, .26); }

  .nav__list a {
    padding: 14px 18px; font-size: 15.5px;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
    border-left: 3px solid transparent;
  }
  .nav__list a.is-active { border-bottom-color: rgba(255, 255, 255, .1); border-left-color: #fff; }
}

/* zamkne pozadí, aby se pod otevřenou zásuvkou neposouvalo */
body.has-nav-open { overflow: hidden; }

/* ---------- rozvržení ---------- */
main { display: block; padding: 26px 0 40px; }
.layout { display: grid; grid-template-columns: minmax(0,1fr) 320px; gap: 30px; align-items: start; }
/* minmax(0,…) i v jednosloupcovém rozvržení: prostý 1fr má minimum
   min-content, takže jediný nezalomitelný text roztáhne celou stránku */
@media (max-width: 1060px) { .layout { grid-template-columns: minmax(0, 1fr); } }
.sidebar { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
@media (max-width: 1060px) {
  .sidebar { flex-direction: row; flex-wrap: wrap; }
  /* min-width: 0 přebíjí výchozí auto, jinak se položka nesmrskne pod obsah */
  .sidebar > * { flex: 1 1 300px; min-width: 0; }
}

/* ---------- drobečková navigace ---------- */
.breadcrumb { font-size: 13.5px; color: var(--text-muted); margin-bottom: 16px; }
.breadcrumb ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.breadcrumb li::after { content: "›"; margin-left: 6px; color: var(--border-strong); }
.breadcrumb li:last-child::after { content: ""; }
.breadcrumb a { color: var(--text-soft); }

/* ---------- karty / panely ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; }
.panel__head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 13px 18px; border-bottom: 1px solid var(--border);
  background: linear-gradient(to bottom, var(--surface-2), var(--surface));
}
.panel__head h2, .panel__head h3 { margin: 0; font-size: 1.02rem; letter-spacing: -.005em; }
.panel__head .more { font-size: 13.5px; font-weight: 600; }
.panel__body { padding: 18px; }
.panel__body > :last-child { margin-bottom: 0; }

.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 14px; margin: 0 0 16px; flex-wrap: wrap;
}
.section-head h2 { margin: 0; }
.section-head .more { font-size: 14px; font-weight: 600; white-space: nowrap; }

/* ---------- tlačítka ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-size: 14.5px; font-weight: 600; line-height: 1.2;
  padding: 10px 18px; border-radius: var(--radius-sm); cursor: pointer;
  border: 1px solid transparent; background: var(--brand-solid); color: var(--on-brand);
  transition: background .15s, border-color .15s, transform .05s;
  text-align: center;
}
.btn:hover { background: var(--brand-solid-hover); color: var(--on-brand); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn--ghost { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn--ghost:hover { background: var(--surface-2); color: var(--text); border-color: var(--brand); }
.btn--sm { padding: 6px 12px; font-size: 13px; }
.btn--lg { padding: 13px 26px; font-size: 16px; }
.btn--danger { background: var(--danger); }
.btn--danger:hover { background: #8f1414; }
.btn--accent { background: var(--accent); }
.btn--accent:hover { background: #c2410c; }
.btn[disabled], .btn.is-loading { opacity: .6; pointer-events: none; }

/* ---------- štítky ---------- */
.tag {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px;
  background: var(--brand-light); color: var(--brand-dark); border: 1px solid transparent;
  white-space: nowrap;
}
.tag--live { background: var(--live); color: #fff; }
.tag--accent { background: var(--accent-light); color: var(--accent); }
.tag--muted { background: var(--surface-3); color: var(--text-soft); }
.tag--success { background: var(--success-light); color: var(--success); }
.tag--warning { background: var(--warning-light); color: var(--warning); }
.tag--danger { background: var(--danger-light); color: var(--danger); }
/* dlouhé názvy rubrik („Dětské / Mládežnické pořady: …“) se na jeden řádek
   nevejdou a přetékaly z karty – tenhle štítek se smí zalomit */
.tag--wrap {
  display: inline-block; white-space: normal; max-width: 100%;
  border-radius: 10px; line-height: 1.35; text-align: left;
  overflow-wrap: anywhere;
}
.tag-row { display: flex; flex-wrap: wrap; gap: 7px; }

.dot-live {
  width: 8px; height: 8px; border-radius: 50%; background: currentColor;
  animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .dot-live { animation: none; } * { scroll-behavior: auto !important; } }

/* ---------- přepínač řazení výpisu ---------- */
.sortbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin-bottom: 16px; font-size: 13.5px;
}
.sortbar__label { color: var(--text-muted); font-weight: 600; }
.sortbar__opt {
  padding: 4px 11px; border-radius: 999px; border: 1px solid var(--border);
  color: var(--text-soft); background: var(--surface);
}
.sortbar__opt:hover { border-color: var(--border-strong); text-decoration: none; color: var(--text); }
.sortbar__opt.is-active {
  background: var(--brand-solid); border-color: var(--brand-solid);
  color: var(--on-brand); font-weight: 600;
}

/* ---------- výpis článků ---------- */
.article-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: var(--gap); }
.article-card {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
  transition: box-shadow .18s, transform .18s, border-color .18s;
}
.article-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: var(--border-strong); }
.article-card__media {
  display: block; aspect-ratio: 16/10; background: var(--surface-3); overflow: hidden;
}
.article-card--noimage { border-top: 3px solid var(--brand); }
.article-card--noimage .article-card__body { padding-top: 17px; }
.article-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.article-card__body { padding: 15px 16px 17px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.article-card__title { margin: 0; font-size: 1.05rem; line-height: 1.35; }
.article-card__title a { color: var(--text); }
.article-card__title a:hover { color: var(--brand); text-decoration: none; }
.article-card__perex { margin: 0; font-size: 14px; color: var(--text-soft); }
.article-card__meta {
  margin-top: auto; padding-top: 6px; display: flex; gap: 10px; flex-wrap: wrap;
  font-size: 12.5px; color: var(--text-muted);
}

.article-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.article-list li { border-bottom: 1px solid var(--border); }
.article-list li:last-child { border-bottom: 0; }
.article-list a {
  display: flex; gap: 13px; align-items: flex-start; padding: 12px 0; color: var(--text);
}
.article-list a:hover { text-decoration: none; }
.article-list a:hover .t { color: var(--brand); }
.article-list img { width: 74px; height: 52px; object-fit: cover; border-radius: var(--radius-sm); flex-shrink: 0; background: var(--surface-3); }
.article-list .t { font-weight: 600; font-size: 14.5px; line-height: 1.35; display: block; }
.article-list .s { font-size: 12.5px; color: var(--text-muted); margin-top: 3px; display: block; }

/* ---------- obsah článku ---------- */
.article-header { margin-bottom: 22px; }
.article-header h1 { margin-bottom: 12px; }
.article-meta {
  display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center;
  font-size: 13.5px; color: var(--text-muted); margin-bottom: 4px;
}
.article-perex {
  font-size: 1.1rem; line-height: 1.6; color: var(--text-soft);
  border-left: 4px solid var(--sky); padding-left: 16px; margin: 18px 0 24px;
}
.article-featured { margin: 0 0 24px; }
.article-featured img { width: 100%; border-radius: var(--radius); display: block; }
.article-featured figcaption { font-size: 13px; color: var(--text-muted); margin-top: 8px; }

.content { font-size: 16.5px; line-height: 1.75; }
.content > :first-child { margin-top: 0; }
.content h2 { margin: 1.8em 0 .6em; font-size: 1.42rem; }
.content h3 { margin: 1.5em 0 .5em; font-size: 1.18rem; }
.content ul, .content ol { margin: 0 0 1.2em; padding-left: 1.5em; }
.content li { margin-bottom: .4em; }
.content img { border-radius: var(--radius); margin: 1em 0; }
.content figure { margin: 1.6em 0; }
.content figcaption { font-size: 13.5px; color: var(--text-muted); text-align: center; margin-top: 8px; }
.content blockquote {
  margin: 1.6em 0; padding: 14px 20px; border-left: 4px solid var(--brand);
  background: var(--brand-lighter); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-soft); font-style: italic;
}
.content blockquote > :last-child { margin-bottom: 0; }
.content table { width: 100%; border-collapse: collapse; margin: 1.4em 0; font-size: 15px; }
.content th, .content td { border: 1px solid var(--border); padding: 9px 12px; text-align: left; }
.content th { background: var(--surface-2); font-weight: 600; }
.content pre {
  background: var(--surface-3); padding: 14px 16px; border-radius: var(--radius-sm);
  overflow-x: auto; font-family: var(--font-num); font-size: 14px;
}
.content code { font-family: var(--font-num); font-size: .92em; background: var(--surface-3); padding: 2px 5px; border-radius: 4px; }
.content pre code { background: none; padding: 0; }
.content a { text-decoration: underline; text-underline-offset: 2px; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.embed-responsive { position: relative; padding-bottom: 56.25%; height: 0; margin: 1.6em 0; border-radius: var(--radius); overflow: hidden; background: #000; }
.embed-responsive iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- odkaz na živé vysílání ---------- */
.watch-box {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 18px 20px; margin: 24px 0;
  background: linear-gradient(135deg, var(--brand-lighter), var(--brand-light));
  border: 1px solid var(--sky); border-radius: var(--radius);
}
.watch-box__text { flex: 1 1 240px; }
.watch-box strong { display: block; font-size: 1.05rem; margin-bottom: 3px; }
.watch-box span { font-size: 14px; color: var(--text-soft); }

/* ---------- sdílení ---------- */
.share { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 26px 0 0; padding-top: 20px; border-top: 1px solid var(--border); }
.share b { font-size: 14px; color: var(--text-soft); margin-right: 4px; }
.share a {
  display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600;
  padding: 7px 13px; border-radius: 999px; border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text-soft);
}
.share a:hover { border-color: var(--brand); color: var(--brand); text-decoration: none; }

/* ---------- stránkování ---------- */
.pagination { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin: 34px 0 0; }
.pagination a, .pagination span {
  min-width: 40px; padding: 9px 13px; text-align: center; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface); font-size: 14.5px; font-weight: 600;
  color: var(--text-soft);
}
.pagination a:hover { border-color: var(--brand); color: var(--brand); text-decoration: none; }
.pagination .is-current { background: var(--brand-solid); border-color: var(--brand-solid); color: var(--on-brand); }
.pagination .is-gap { border: 0; background: none; color: var(--text-muted); }

/* ---------- prázdný stav / hlášky ---------- */
.empty { text-align: center; padding: 46px 20px; color: var(--text-muted); }
.empty h3 { color: var(--text-soft); }
.alert { padding: 13px 16px; border-radius: var(--radius-sm); margin-bottom: 18px; font-size: 14.5px; border: 1px solid; }
.alert--info    { background: var(--brand-lighter); border-color: var(--sky); color: var(--brand-dark); }
.alert--success { background: var(--success-light); border-color: var(--success); color: var(--success); }
.alert--warning { background: var(--warning-light); border-color: var(--warning); color: var(--warning); }
.alert--danger  { background: var(--danger-light); border-color: var(--danger); color: var(--danger); }

/* ---------- patička ---------- */
/* ---------- reklamní pozice ---------- */
.ad { margin: 20px 0; max-width: 100%; overflow: hidden; }
.ad > * { max-width: 100%; }
.ad--sidebar-top { margin-top: 0; }
.ad--footer-top { margin: 28px 0 0; }
.ad--home-hero, .ad--category-top, .ad--program-top { margin-top: 0; }

/* měřicí obrázky 1×1 px – nesmí v patičce vytvořit mezeru */
.counters { line-height: 0; font-size: 0; height: 0; overflow: hidden; }
.footer { background: #1e2733; color: #b6c2d2; margin-top: 40px; padding: 40px 0 0; font-size: 14.5px; }
.footer a { color: #dbe5f0; }
.footer a:hover { color: #fff; }
.footer__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 30px; padding-bottom: 32px; }
.footer h3 { color: #fff; font-size: 15px; margin-bottom: 12px; letter-spacing: .02em; text-transform: uppercase; }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { margin-bottom: 7px; }
.footer__bottom {
  border-top: 1px solid rgba(255,255,255,.12); padding: 18px 0; font-size: 13px;
  display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; color: #8b9aae;
}
.footer__logo img { width: 200px; height: 54px; opacity: .95; margin-bottom: 12px; }

/* ==========================================================================
   TV PROGRAM
   ========================================================================== */

/* --- lišta s dny a ovládáním --- */
.program-toolbar {
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 12px 14px; margin-bottom: 20px; box-shadow: var(--shadow-sm);
}
.daybar { display: flex; gap: 6px; overflow-x: auto; flex: 1 1 340px; scrollbar-width: thin; padding-bottom: 2px; }
.daybar a {
  flex-shrink: 0; text-align: center; padding: 7px 13px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text-soft);
  font-size: 13px; line-height: 1.35; min-width: 62px;
}
.daybar a b { display: block; font-size: 14.5px; color: var(--text); font-weight: 700; }
.daybar a:hover { border-color: var(--brand); text-decoration: none; }
.daybar a.is-active { background: var(--brand-solid); border-color: var(--brand-solid); color: var(--on-brand); }
.daybar a.is-active b { color: #fff; }
.daybar a.is-today::after { content: "dnes"; display: block; font-size: 10px; letter-spacing: .04em; text-transform: uppercase; opacity: .75; }

.view-switch { display: flex; gap: 2px; background: var(--surface-3); padding: 3px; border-radius: var(--radius-sm); }
.view-switch a, .view-switch button {
  padding: 6px 12px; font-size: 13px; font-weight: 600; border-radius: 4px;
  color: var(--text-soft); border: 0; background: transparent; cursor: pointer; font-family: inherit;
}
.view-switch .is-active { background: var(--surface); color: var(--brand); box-shadow: var(--shadow-sm); }
.view-switch a:hover, .view-switch button:hover { text-decoration: none; color: var(--text); }

/* --- mřížka časové osy --- */
.tvgrid { position: relative; overflow-x: auto; overflow-y: visible; -webkit-overflow-scrolling: touch;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.tvgrid__inner { position: relative; min-width: max-content; }
/* Lišta s hodinami zůstává nahoře uvnitř posuvné mřížky.
   `top: 0` je záměrné – scroll kontejnerem je .tvgrid, ne stránka. */
.tvgrid__hours { position: sticky; top: 0; z-index: 25; display: flex; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.tvgrid__corner {
  position: sticky; left: 0; z-index: 30; width: 168px; flex-shrink: 0;
  background: var(--surface-2); border-right: 1px solid var(--border);
  display: flex; align-items: center; padding: 0 12px; font-size: 12px; font-weight: 700;
  color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em;
}
.tvgrid__hour {
  flex-shrink: 0; border-right: 1px solid var(--border); font-size: 12px; font-weight: 700;
  color: var(--text-soft); padding: 7px 8px; font-variant-numeric: tabular-nums;
}
.tvgrid__row { display: flex; border-bottom: 1px solid var(--border); }
.tvgrid__row:last-child { border-bottom: 0; }
.tvgrid__chan {
  position: sticky; left: 0; z-index: 20; width: 168px; flex-shrink: 0;
  background: var(--surface); border-right: 1px solid var(--border);
  display: flex; align-items: center; gap: 9px; padding: 8px 10px;
}
.tvgrid__chan img { width: 40px; height: 26px; object-fit: contain; flex-shrink: 0; }
.tvgrid__chan .n { font-size: 13px; font-weight: 600; line-height: 1.25; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.tvgrid__chan a { color: var(--text); }
.tvgrid__track { position: relative; flex: 1; min-height: 54px; }
.tvgrid__item {
  position: absolute; top: 4px; bottom: 4px; overflow: hidden;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 6px 9px; font-size: 12.5px; line-height: 1.3; color: var(--text);
  display: flex; flex-direction: column; justify-content: center; gap: 2px;
}
.tvgrid__item:hover { background: var(--brand-light); border-color: var(--brand); text-decoration: none; z-index: 5; }
.tvgrid__item .tm { font-size: 11px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.tvgrid__item .ti { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tvgrid__item.is-live { background: var(--brand-light); border-color: var(--brand); }
.tvgrid__item.is-live .ti { color: var(--brand-dark); }
.tvgrid__item.is-past { opacity: .55; }
.tvgrid__now { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--live); z-index: 15; pointer-events: none; }
.tvgrid__now::before { content: ""; position: absolute; top: -4px; left: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--live); }

/* --- sloupcové zobrazení --- */
.tvcols { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: var(--gap); }
.tvcol { display: flex; flex-direction: column; overflow: hidden; }
.tvcol__head {
  display: flex; align-items: center; gap: 10px; padding: 11px 14px;
  background: linear-gradient(to bottom, var(--surface-2), var(--surface));
  border-bottom: 1px solid var(--border);
}
.tvcol__head img { width: 44px; height: 28px; object-fit: contain; }
.tvcol__head a { font-weight: 700; font-size: 14.5px; color: var(--text); }
.tvcol__head a:hover { color: var(--brand); text-decoration: none; }
.tvcol__list { list-style: none; margin: 0; padding: 0; max-height: 480px; overflow-y: auto; }
.tvcol__list li { border-bottom: 1px solid var(--border); }
.tvcol__list li:last-child { border-bottom: 0; }
.tvcol__list a { display: flex; gap: 10px; padding: 9px 14px; align-items: baseline; color: var(--text); font-size: 14px; }
.tvcol__list a:hover { background: var(--surface-2); text-decoration: none; }
.tvcol__list .tm { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--text-muted); font-size: 13px; flex-shrink: 0; width: 42px; }
.tvcol__list li.is-live { background: var(--brand-lighter); }
.tvcol__list li.is-live .tm { color: var(--live); }
.tvcol__list li.is-live .ti { font-weight: 600; }
.tvcol__list li.is-past { opacity: .5; }

/* --- seznam (kompaktní) --- */
.tvlist { list-style: none; margin: 0; padding: 0; }
.tvlist > li { border-bottom: 1px solid var(--border); }
.tvlist > li:last-child { border-bottom: 0; }
.tvlist__row { display: flex; gap: 14px; padding: 12px 16px; align-items: flex-start; color: var(--text); }
.tvlist__row:hover { background: var(--surface-2); text-decoration: none; }
.tvlist__time { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 15px; width: 52px; flex-shrink: 0; color: var(--brand); }
.tvlist__chan { width: 118px; flex-shrink: 0; display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-soft); }
.tvlist__chan img { width: 34px; height: 22px; object-fit: contain; }
.tvlist__main { flex: 1; min-width: 0; }
.tvlist__main .ti { font-weight: 600; font-size: 15px; display: block; }
.tvlist__main .su { font-size: 13.5px; color: var(--text-muted); display: block; margin-top: 2px; }
.tvlist li.is-live .tvlist__time { color: var(--live); }
@media (max-width: 640px) {
  .tvlist__chan { width: auto; }
  .tvlist__row { flex-wrap: wrap; gap: 6px 12px; }
  .tvlist__main { flex: 1 1 100%; }
}

/* --- právě běží --- */
.now-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.now-card { display: flex; gap: 12px; padding: 14px; align-items: flex-start; }
.now-card__logo { width: 52px; height: 34px; object-fit: contain; flex-shrink: 0; }
.now-card__body { flex: 1; min-width: 0; }
.now-card__chan { font-size: 12px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .03em; }
.now-card__title { font-size: 15px; font-weight: 600; margin: 3px 0 5px; line-height: 1.3; }
.now-card__title a { color: var(--text); }
.now-card__title a:hover { color: var(--brand); }
.now-card__next { font-size: 13px; color: var(--text-muted); }
.progress { height: 4px; border-radius: 999px; background: var(--surface-3); overflow: hidden; margin: 7px 0 5px; }
.progress > i { display: block; height: 100%; background: var(--live); border-radius: 999px; }

/* --- výběr stanic --- */
.chan-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 8px; }
.chan-pick {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; cursor: pointer;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface);
  font-size: 14px; transition: border-color .15s, background .15s;
}
.chan-pick:hover { border-color: var(--brand); background: var(--brand-lighter); }
.chan-pick input { width: 17px; height: 17px; accent-color: var(--brand); flex-shrink: 0; cursor: pointer; }
.chan-pick img { width: 36px; height: 24px; object-fit: contain; flex-shrink: 0; }
.chan-pick span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chan-pick.is-checked { border-color: var(--brand); background: var(--brand-lighter); }

/* --- karta stanice --- */
.channel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.channel-card {
  display: flex; flex-direction: column; align-items: center; gap: 9px; padding: 16px 12px;
  text-align: center; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); transition: box-shadow .18s, transform .18s, border-color .18s;
}
.channel-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: var(--brand); text-decoration: none; }
.channel-card img { width: 74px; height: 48px; object-fit: contain; }
.channel-card .n { font-weight: 600; font-size: 14px; color: var(--text); line-height: 1.3; }
.channel-card .p { font-size: 12.5px; color: var(--text-muted); }

/* --- detail pořadu --- */
.show-header { display: flex; gap: 22px; flex-wrap: wrap; align-items: flex-start; margin-bottom: 24px; }
.show-header__main { flex: 1 1 320px; }
.airings { list-style: none; margin: 0; padding: 0; }
.airings li { display: flex; gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--border); align-items: center; flex-wrap: wrap; }
.airings li:last-child { border-bottom: 0; }
.airings .d { font-weight: 600; font-size: 14px; width: 128px; flex-shrink: 0; }
.airings .t { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--brand); width: 52px; flex-shrink: 0; }
.airings .c { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.airings .c img { width: 34px; height: 22px; object-fit: contain; }

/* --- boční panel: TV --- */
.mini-now { list-style: none; margin: 0; padding: 0; }
.mini-now li { display: flex; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--border); }
.mini-now li:last-child { border-bottom: 0; }
.mini-now img { width: 38px; height: 25px; object-fit: contain; flex-shrink: 0; }
.mini-now .b { min-width: 0; flex: 1; }
.mini-now .ti { font-size: 13.5px; font-weight: 600; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.mini-now .tm { font-size: 12px; color: var(--text-muted); }
.mini-now a:hover .ti { color: var(--brand); }

/* --- statistiky --- */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; }
.stat { padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.stat b { display: block; font-size: 1.5rem; font-weight: 700; color: var(--brand); font-variant-numeric: tabular-nums; line-height: 1.2; }
.stat span { font-size: 13px; color: var(--text-muted); }

/* --- přehled dílů seriálu --- */
.episodes { list-style: none; margin: 0; padding: 0; }
.episodes > li { border-bottom: 1px solid var(--border); }
.episodes > li:last-child { border-bottom: 0; }
.episodes__row { display: flex; gap: 14px; padding: 13px 18px; align-items: flex-start; color: var(--text); }
.episodes__row:hover { background: var(--surface-2); text-decoration: none; }
.episodes__row:hover .ti { color: var(--brand); }
.episodes__no {
  flex-shrink: 0; width: 40px; text-align: right; font-variant-numeric: tabular-nums;
  font-weight: 700; font-size: 15px; color: var(--text-muted); padding-top: 1px;
}
.episodes__main { flex: 1; min-width: 0; }
.episodes__main .ti { display: block; font-weight: 600; font-size: 15px; line-height: 1.35; }
.episodes__main .su { display: block; font-size: 13.5px; color: var(--text-soft); margin-top: 4px; line-height: 1.5; }
.episodes__air { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.episodes__air .tag { font-weight: 500; }
@media (max-width: 560px) {
  .episodes__row { padding: 12px 14px; gap: 10px; }
  .episodes__no { width: 30px; }
}

/* --- stav stanice --- */
.watch-box--warn { background: linear-gradient(135deg, var(--warning-light), var(--surface)); border-color: var(--warning); }
.watch-box--off  { background: var(--surface-2); border-color: var(--border); }
.watch-box .tag { align-self: flex-start; }

/* --- právě běží u článku --- */
.now-strip { display: flex; gap: 14px; align-items: flex-start; }
.now-strip img { width: 56px; height: 36px; object-fit: contain; flex-shrink: 0; }
.now-strip__body { flex: 1; min-width: 0; }
.now-strip__body h3 { margin: 7px 0 5px; font-size: 1.15rem; }
.now-strip__body h3 a { color: var(--text); }
.now-strip__body h3 a:hover { color: var(--brand); }
.now-strip__body p { margin: 0 0 8px; font-size: 14px; color: var(--text-soft); }
.now-strip__body .progress { max-width: 340px; }
.now-strip__time { font-size: 13px; color: var(--text-muted); font-variant-numeric: tabular-nums; }

.upnext { list-style: none; margin: 0; padding: 0; }
.upnext li { border-bottom: 1px solid var(--border); }
.upnext li:last-child { border-bottom: 0; }
.upnext a { display: flex; gap: 14px; padding: 9px 0; align-items: baseline; color: var(--text); }
.upnext a:hover { text-decoration: none; }
.upnext a:hover .n { color: var(--brand); }
.upnext .t { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--text-muted); width: 44px; flex-shrink: 0; font-size: 14px; }
.upnext .n { font-size: 14.5px; }

/* --- osnova článku --- */
.toc {
  background: var(--surface-2); border: 1px solid var(--border);
  border-left: 4px solid var(--brand); border-radius: var(--radius-sm);
  padding: 16px 20px; margin: 0 0 26px;
}
.toc__title { font-size: .95rem; margin: 0 0 10px; color: var(--text-soft); }
.toc__list { list-style: none; margin: 0; padding: 0; counter-reset: toc; }
.toc__item { margin: 0 0 6px; line-height: 1.45; }
.toc__item:last-child { margin-bottom: 0; }
.toc__item a { font-size: 14.5px; }
.toc__item--h2 { counter-increment: toc; }
.toc__item--h2 a::before { content: counter(toc) ". "; color: var(--text-muted); font-weight: 600; }
.toc__item--h3 { padding-left: 22px; }
.toc__item--h3 a { font-size: 13.5px; color: var(--text-soft); }
.toc__item--h3 a:hover { color: var(--brand); }
.content h2[id], .content h3[id] { scroll-margin-top: 70px; }

/* datum poslední úpravy článku */
.article-meta__updated { color: var(--text-muted); }
.article-meta__updated time { font-weight: 600; }

/* náhledy pořadů z podrobnějších zdrojů programu */
.episodes__img {
  width: 96px; height: 54px; object-fit: cover; border-radius: var(--radius-sm);
  flex-shrink: 0; background: var(--surface-3);
}
@media (max-width: 560px) { .episodes__img { display: none; } }
.show-poster { float: right; width: 220px; margin: 0 0 16px 20px; border-radius: var(--radius); }
@media (max-width: 560px) { .show-poster { float: none; width: 100%; margin: 0 0 16px; } }
