/* lepsi.tv v2 - spolecne styly pro login i aplikaci */

:root {
  --bg: #0d0f14;
  --bg-2: #11141b;
  --surface: #161a22;
  --surface-2: #1d222c;
  --surface-3: #252b37;
  --border: #262c38;
  --border-strong: #343b4a;
  --text: #eef0f4;
  --text-2: #a3abba;
  --text-3: #6d7586;
  --accent: #ff7a1a;
  --accent-2: #ff9447;
  --accent-ink: #ffffff;
  --accent-soft: rgba(255, 122, 26, .14);
  --live: #ff4d4f;
  --ok: #38c172;
  --warn: #f5b041;
  --radius-xl: 18px;
  --radius-lg: 14px;
  --radius: 10px;
  --radius-sm: 7px;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 18px 40px -20px rgba(0,0,0,.7);
  --topbar-h: 60px;
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f3f4f7;
  --bg-2: #eceef2;
  --surface: #ffffff;
  --surface-2: #f2f3f6;
  --surface-3: #e7e9ee;
  --border: #e2e5eb;
  --border-strong: #cfd4dd;
  --text: #171a20;
  --text-2: #586071;
  --text-3: #8a91a0;
  --accent-soft: rgba(255, 122, 26, .12);
  --shadow: 0 1px 2px rgba(20,24,32,.06), 0 18px 40px -22px rgba(20,24,32,.28);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: "Segoe UI Variable Text", "Segoe UI", -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px; line-height: 1.45;
  background: var(--bg); color: var(--text);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button { font: inherit; color: inherit; }
img { display: block; }
[hidden] { display: none !important; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- tlacitka a pole */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text);
  border-radius: var(--radius-sm); padding: .5rem .95rem; font-size: .87rem; font-weight: 600;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background .15s, border-color .15s, transform .08s;
}
.btn:hover { background: var(--surface-3); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: default; transform: none; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--surface-2); }
.btn-block { width: 100%; }
.btn-sm { padding: .32rem .65rem; font-size: .8rem; }

.icon-btn {
  display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  border: none; background: transparent; color: var(--text-2); cursor: pointer; text-decoration: none;
  transition: background .15s, color .15s;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }

input[type=text], input[type=password], input[type=search], select {
  font: inherit; font-size: .9rem; color: var(--text);
  background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: .5rem .7rem; outline: none; transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.field { display: block; margin-bottom: 1rem; }
.field > span { display: block; font-size: .78rem; color: var(--text-2); margin-bottom: .35rem; font-weight: 600; }
.field input { width: 100%; padding: .7rem .8rem; font-size: 1rem; }

.logo-mark {
  width: 28px; height: 28px; border-radius: 8px; flex: none;
  background: var(--accent) url("/static/icon.svg") center / cover;
  box-shadow: 0 4px 16px -4px rgba(255,122,26,.6);
}

/* ---------- login */

.login-page { min-height: 100vh; display: grid; place-items: center; padding: 16px;
  background: radial-gradient(1200px 600px at 50% -10%, rgba(255,122,26,.16), transparent 60%), var(--bg); }
.login-card { width: 100%; max-width: 360px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-xl); padding: 2rem 1.75rem 1.75rem; box-shadow: var(--shadow); }
.login-brand { display: flex; align-items: center; gap: .8rem; margin-bottom: 1.75rem; }
.login-brand .logo-mark { width: 44px; height: 44px; border-radius: 12px; }
.login-title { font-weight: 800; font-size: 1.25rem; letter-spacing: -.02em; }
.login-sub { color: var(--text-3); font-size: .85rem; }
.landing { width: 100%; max-width: 1040px; display: grid; grid-template-columns: 1.25fr 1fr; gap: 3rem; align-items: center; }
.landing-hero h1 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); line-height: 1.12; letter-spacing: -.035em; margin: 0 0 1rem; max-width: 18ch; }
.landing-lead { color: var(--text-2); font-size: 1.02rem; line-height: 1.6; margin: 0 0 1.75rem; max-width: 52ch; }
.landing-features { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.landing-features li { display: flex; gap: .7rem; align-items: flex-start; font-size: .86rem; color: var(--text-3); }
.landing-features svg { width: 34px; height: 34px; padding: 8px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); }
.landing-features b { display: block; color: var(--text); font-size: .92rem; }
.landing .login-card { justify-self: end; }
.login-h { margin: 0 0 1.2rem; font-size: 1.15rem; letter-spacing: -.01em; }
.login-note { margin: 1rem 0 0; font-size: .8rem; color: var(--text-3); text-align: center; }
@media (max-width: 820px) {
  .landing { grid-template-columns: 1fr; gap: 2rem; padding: 1rem 0; }
  .landing .login-card { justify-self: stretch; max-width: none; }
}
@media (max-width: 420px) { .landing-features { grid-template-columns: 1fr; } }

.err { background: rgba(255,77,79,.12); color: #ff8587; border: 1px solid rgba(255,77,79,.3);
  border-radius: var(--radius-sm); padding: .55rem .75rem; font-size: .85rem; margin: 0 0 1rem; }

/* ---------- horni lista */

.topbar {
  position: sticky; top: 0; z-index: 30; height: var(--topbar-h);
  display: flex; align-items: center; gap: 1.25rem; padding: 0 20px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; font-weight: 800;
  letter-spacing: -.02em; font-size: 1.05rem; flex: none; }
.tabs { display: flex; gap: .2rem; min-width: 0; }
.tabs a {
  display: flex; align-items: center; gap: .45rem; padding: .45rem .8rem; border-radius: 999px;
  color: var(--text-2); text-decoration: none; font-weight: 600; font-size: .88rem; white-space: nowrap;
  transition: background .15s, color .15s;
}
.tabs a svg { width: 17px; height: 17px; }
.tabs a:hover { color: var(--text); background: var(--surface-2); }
.tabs a.active { color: var(--accent); background: var(--accent-soft); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: .4rem; }
.search { position: relative; display: flex; align-items: center; }
.search svg { position: absolute; left: .65rem; color: var(--text-3); width: 16px; height: 16px; pointer-events: none; }
.search input { width: 220px; padding-left: 2.1rem; border-radius: 999px; background: var(--surface); }

/* ---------- obsah */

.view { max-width: 1480px; margin: 0 auto; padding: 24px 20px 96px; outline: none; }
.view-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.view-head h1 { margin: 0; font-size: 1.55rem; letter-spacing: -.025em; line-height: 1.2; }
.view-head .meta { color: var(--text-3); font-size: .87rem; margin-top: .2rem; }
.toolbar { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.section-title { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em;
  color: var(--text-3); margin: 2rem 0 .9rem; }

.chips { display: flex; gap: .4rem; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--border); background: var(--surface); color: var(--text-2);
  border-radius: 999px; padding: .36rem .8rem; font-size: .82rem; font-weight: 600; cursor: pointer;
  transition: border-color .15s, color .15s, background .15s; white-space: nowrap;
}
.chip:hover { color: var(--text); border-color: var(--border-strong); }
.chip.on { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.chip .count { color: var(--text-3); font-weight: 500; margin-left: .25rem; }

.empty { text-align: center; color: var(--text-3); padding: 3.5rem 1rem; border: 1px dashed var(--border);
  border-radius: var(--radius-lg); }
.error-box { background: rgba(255,77,79,.08); border: 1px solid rgba(255,77,79,.3); color: var(--text);
  border-radius: var(--radius-lg); padding: 1rem 1.2rem; }
.error-box b { color: #ff8587; }

/* skeleton */
.skel { background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%);
  background-size: 200% 100%; animation: shimmer 1.3s infinite linear; border-radius: var(--radius-lg); }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- karty kanalu */

.ch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.ch-card {
  position: relative; display: grid; grid-template-columns: 64px 1fr; gap: .9rem; align-items: start;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: .9rem .9rem .85rem; cursor: pointer; text-align: left; width: 100%;
  transition: border-color .15s, transform .15s, box-shadow .15s, background .15s;
}
.ch-card:hover { border-color: var(--border-strong); transform: translateY(-2px); box-shadow: var(--shadow); }
.ch-card.playing { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.ch-logo { width: 64px; height: 44px; border-radius: var(--radius-sm); background: var(--surface-2);
  display: grid; place-items: center; overflow: hidden; }
.ch-logo img { max-width: 52px; max-height: 32px; object-fit: contain; }
.ch-logo .ph { font-weight: 800; color: var(--text-3); font-size: .9rem; }
.ch-num { font-family: var(--mono); font-size: .7rem; color: var(--text-3); text-align: center; margin-top: .35rem; }
.ch-body { min-width: 0; }
.ch-name { display: flex; align-items: center; gap: .4rem; font-weight: 700; font-size: .92rem; padding-right: 3.6rem; }
.ch-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge { font-size: .62rem; font-weight: 800; letter-spacing: .04em; padding: .08rem .32rem; border-radius: 4px;
  background: var(--surface-3); color: var(--text-2); flex: none; }
.ch-now { margin-top: .3rem; font-size: .84rem; color: var(--text); display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden; min-height: 2.4em; }
.ch-now.unknown { color: var(--text-3); }
.progress { height: 4px; border-radius: 99px; background: var(--surface-3); overflow: hidden; margin: .55rem 0 .4rem; }
.progress > i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: inherit; }
.ch-times { display: flex; justify-content: space-between; gap: .5rem; font-size: .74rem; color: var(--text-3); }
.ch-next { font-size: .76rem; color: var(--text-3); margin-top: .3rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-next b { color: var(--text-2); font-weight: 600; }
.ch-tools { position: absolute; top: .55rem; right: .55rem; display: flex; gap: .1rem; }
.ch-tools .icon-btn { width: 30px; height: 30px; }
.ch-tools .icon-btn svg { width: 16px; height: 16px; }
.fav-on { color: var(--warn) !important; }
.fav-on svg { fill: currentColor; }

/* ---------- EPG mrizka */

.guide-head { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin-bottom: 1rem; }
.guide {
  --px-per-min: 4px; --name-w: 168px; --row-h: 58px;
  position: relative; border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--surface); overflow: auto; max-height: calc(100vh - var(--topbar-h) - 170px);
  overscroll-behavior: contain;
}
.guide-inner { position: relative; width: calc(var(--name-w) + var(--day-min, 1440) * var(--px-per-min)); }
.guide-ruler { position: sticky; top: 0; z-index: 4; display: flex; height: 34px; background: var(--surface);
  border-bottom: 1px solid var(--border); }
.guide-ruler .corner { position: sticky; left: 0; z-index: 5; width: var(--name-w); flex: none; background: var(--surface);
  border-right: 1px solid var(--border); }
.guide-ruler .hour { flex: none; width: calc(60 * var(--px-per-min)); font-size: .75rem; color: var(--text-3);
  padding: .55rem .5rem; border-left: 1px solid var(--border); font-family: var(--mono); }
.guide-row { display: flex; height: var(--row-h); border-bottom: 1px solid var(--border); }
.guide-row:last-child { border-bottom: none; }
.guide-name { position: sticky; left: 0; z-index: 3; width: var(--name-w); flex: none; display: flex; align-items: center;
  gap: .55rem; padding: 0 .7rem; background: var(--surface); border-right: 1px solid var(--border);
  font-weight: 650; font-size: .82rem; cursor: pointer; }
.guide-name:hover { background: var(--surface-2); }
.guide-name img { width: 34px; height: 24px; object-fit: contain; flex: none; }
.guide-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.guide-track { position: relative; flex: none; width: calc(var(--day-min, 1440) * var(--px-per-min)); }
.gp {
  position: absolute; top: 5px; bottom: 5px; border-radius: 8px; padding: .35rem .5rem; overflow: hidden;
  background: var(--surface-2); border: 1px solid var(--border); font-size: .76rem; cursor: pointer;
  transition: background .12s, border-color .12s; text-align: left; color: var(--text);
}
.gp:hover { background: var(--surface-3); border-color: var(--border-strong); z-index: 2; }
.gp b { display: block; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gp small { color: var(--text-3); font-family: var(--mono); font-size: .68rem; }
.gp.past { opacity: .62; }
.gp.live { background: var(--accent-soft); border-color: rgba(255,122,26,.45); }
.gp.live small { color: var(--accent); }
.gp.future { cursor: default; }
.now-line { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--live); z-index: 3; pointer-events: none;
  box-shadow: 0 0 10px var(--live); }
.now-line::before { content: ""; position: absolute; top: 0; left: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--live); }

/* ---------- plakaty (videoteka, nahravky) */

.poster-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.poster { background: none; border: none; padding: 0; text-align: left; cursor: pointer; color: inherit; min-width: 0; }
.poster-img { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden;
  background: var(--surface-2); border: 1px solid var(--border); }
.poster-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.poster:hover .poster-img img { transform: scale(1.05); }
.poster-img .ph { position: absolute; inset: 0; display: grid; place-items: center; color: var(--text-3); }
.poster-img .ph svg { width: 34px; height: 34px; }
.poster-img .play-ov { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0;
  background: linear-gradient(transparent, rgba(0,0,0,.45)); transition: opacity .2s; }
.poster-img .play-ov span { width: 46px; height: 46px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; color: #fff; }
.poster-img .play-ov svg { fill: currentColor; stroke: none; margin-left: 3px; }
.poster:hover .play-ov { opacity: 1; }
.poster-tag { position: absolute; left: .5rem; top: .5rem; font-size: .68rem; font-weight: 700; padding: .15rem .45rem;
  border-radius: 5px; background: rgba(0,0,0,.65); color: #fff; backdrop-filter: blur(4px); }
.poster-tag.warn { background: rgba(245,176,65,.9); color: #1b1300; }
.poster-title { font-weight: 650; font-size: .9rem; margin-top: .55rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.poster-meta { font-size: .78rem; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.poster.upcoming { opacity: .55; }

/* ---------- radia */

.radio-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.radio-card { display: flex; align-items: center; gap: .8rem; padding: .75rem; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-lg); cursor: pointer; text-align: left; width: 100%;
  transition: border-color .15s, transform .15s; color: inherit; }
.radio-card:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.radio-card.playing { border-color: var(--accent); }
.radio-card img, .radio-card .ph { width: 52px; height: 52px; border-radius: var(--radius-sm); object-fit: cover; background: var(--surface-2); flex: none;
  display: grid; place-items: center; color: var(--text-3); }
.radio-card .rc-name { font-weight: 650; font-size: .9rem; }
.radio-card .rc-tags { font-size: .76rem; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.radio-card > div { min-width: 0; }

/* ---------- nastaveni */

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.1rem 1.2rem; min-width: 0; }
.panel h2 { margin: 0 0 .85rem; font-size: 1rem; letter-spacing: -.01em; display: flex; align-items: center; gap: .5rem; }
.panel p.hint { color: var(--text-3); font-size: .82rem; margin: -.3rem 0 .9rem; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: .45rem 1rem; font-size: .87rem; }
.kv dt { color: var(--text-3); }
.kv dd { margin: 0; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.copyfield { margin-bottom: .8rem; }
.copyfield label { display: block; font-size: .74rem; color: var(--text-3); margin-bottom: .3rem; font-weight: 600; }
.copyfield .row { display: flex; gap: .4rem; }
.copyfield input { flex: 1; min-width: 0; font-family: var(--mono); font-size: .76rem; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .3rem 0; }
.switch { position: relative; width: 44px; height: 26px; flex: none; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: var(--surface-3); transition: background .2s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.list { display: flex; flex-direction: column; }
.list-row { display: flex; align-items: center; gap: .7rem; padding: .55rem 0; border-bottom: 1px solid var(--border); font-size: .86rem; }
.list-row:last-child { border-bottom: none; }
.list-row .grow { flex: 1; min-width: 0; }
.list-row .sub { color: var(--text-3); font-size: .78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); flex: none; box-shadow: 0 0 8px var(--ok); }
.dot.bad { background: var(--live); box-shadow: 0 0 8px var(--live); }
.rename-list { max-height: 420px; overflow: auto; margin: 0 -.4rem; padding: 0 .4rem; }
.rename-list input { width: 100%; font-size: .84rem; padding: .38rem .55rem; }
.rename-list .orig { width: 38%; flex: none; font-size: .8rem; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
pre.log { font-family: var(--mono); font-size: .76rem; background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: .7rem; white-space: pre-wrap; margin: .8rem 0 0; max-height: 240px; overflow: auto; }

/* ---------- sheet (detail) */

.sheet-backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(5,7,10,.6); backdrop-filter: blur(3px);
  display: grid; place-items: center; padding: 16px; animation: fade .15s ease-out; }
.sheet { position: relative; width: 100%; max-width: 560px; max-height: calc(100vh - 32px); overflow: auto;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl); box-shadow: var(--shadow);
  animation: pop .18s ease-out; }
.sheet-close { position: absolute; top: .7rem; right: .7rem; z-index: 2; background: rgba(0,0,0,.35); color: #fff; }
.sheet-close:hover { background: rgba(0,0,0,.55); color: #fff; }
.sheet-hero { aspect-ratio: 16 / 7; background: var(--surface-2); overflow: hidden; }
.sheet-hero img { width: 100%; height: 100%; object-fit: cover; }
.sheet-content { padding: 1.2rem 1.35rem 1.35rem; }
.sheet-content h2 { margin: 0 2.2rem .3rem 0; font-size: 1.3rem; letter-spacing: -.02em; line-height: 1.25; }
.sheet-meta { display: flex; flex-wrap: wrap; gap: .35rem .9rem; color: var(--text-2); font-size: .84rem; margin-bottom: .9rem; }
.sheet-meta .live { color: var(--live); font-weight: 700; }
.sheet-desc { color: var(--text-2); font-size: .9rem; line-height: 1.6; margin: 0 0 1.1rem; white-space: pre-line; }
.sheet-actions { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.day-list { display: flex; flex-direction: column; margin: 0 -.3rem; }
.day-item { display: grid; grid-template-columns: 54px 1fr auto; gap: .7rem; align-items: center; padding: .55rem .4rem;
  border-radius: var(--radius-sm); cursor: pointer; font-size: .87rem; text-align: left; background: none; border: none; color: inherit; width: 100%; }
.day-item:hover { background: var(--surface-2); }
.day-item time { font-family: var(--mono); color: var(--text-3); font-size: .8rem; }
.day-item.live { background: var(--accent-soft); }
.day-item.live time { color: var(--accent); }
.day-item.future { opacity: .5; cursor: default; }
.day-item.future:hover { background: none; }
.day-item .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pill-live { font-size: .66rem; font-weight: 800; color: #fff; background: var(--live); padding: .1rem .4rem; border-radius: 4px; letter-spacing: .04em; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.985); } }

/* ---------- prehravac */

.player { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.88); display: grid; place-items: center;
  padding: 16px; animation: fade .15s ease-out; }
.player-inner { width: 100%; max-width: 1280px; }
.player-head { display: flex; align-items: center; gap: 1rem; margin-bottom: .6rem; color: #fff; }
.player-titles { flex: 1; min-width: 0; }
.player-title { font-weight: 700; font-size: 1.05rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-sub { color: rgba(255,255,255,.6); font-size: .84rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-actions { display: flex; gap: .15rem; }
.player-actions .icon-btn { color: rgba(255,255,255,.75); }
.player-actions .icon-btn:hover { background: rgba(255,255,255,.12); color: #fff; }
.player-stage { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: var(--radius-lg); overflow: hidden;
  max-height: calc(100vh - 110px); margin: 0 auto; }
.player-stage video { width: 100%; height: 100%; background: #000; }
.player-msg { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 2rem;
  color: #fff; background: rgba(0,0,0,.72); font-size: .95rem; line-height: 1.55; }
.player-msg .spinner { width: 38px; height: 38px; border-radius: 50%; border: 3px solid rgba(255,255,255,.2);
  border-top-color: var(--accent); animation: spin .8s linear infinite; margin: 0 auto .9rem; }
@keyframes spin { to { transform: rotate(360deg); } }

.radiobar { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 40;
  display: flex; align-items: center; gap: .7rem; padding: .5rem .6rem .5rem .5rem; width: min(440px, calc(100% - 32px));
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: 16px; box-shadow: var(--shadow); }
.radiobar img { width: 42px; height: 42px; border-radius: 10px; object-fit: cover; background: var(--surface-2); }
.rb-text { flex: 1; min-width: 0; }
.rb-name { font-weight: 700; font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rb-state { font-size: .76rem; color: var(--text-3); }

/* ---------- toasty */

.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 80; display: flex; flex-direction: column; gap: .5rem; align-items: flex-end; }
.toast { background: var(--surface-3); color: var(--text); border: 1px solid var(--border-strong); border-radius: var(--radius);
  padding: .6rem .9rem; font-size: .86rem; box-shadow: var(--shadow); animation: pop .2s ease-out; max-width: 360px; }
.toast.err { border-color: rgba(255,77,79,.5); }

/* ---------- mobil */

@media (max-width: 960px) {
  .tabs a span { display: none; }
  .tabs a { padding: .5rem .6rem; }
  .search input { width: 160px; }
}
@media (max-width: 680px) {
  :root { --topbar-h: 56px; }
  /* backdrop-filter by z .topbar udelal containing block pro fixed .tabs
     (spodni lista by se prilepila k horni liste misto ke spodku okna) */
  .topbar { gap: .6rem; padding: 0 16px; backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--bg); }
  .brand-name { display: none; }
  .tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; justify-content: space-around;
    background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(14px);
    border-top: 1px solid var(--border); padding: .35rem .25rem calc(.35rem + env(safe-area-inset-bottom)); }
  .tabs a { flex-direction: column; gap: .15rem; font-size: .66rem; padding: .35rem .3rem; border-radius: 10px; }
  .tabs a span { display: block; }
  .tabs a svg { width: 20px; height: 20px; }
  .search { flex: 1; }
  .search input { width: 100%; }
  .topbar-right { flex: 1; }
  .view { padding: 18px 16px 110px; }
  .view-head h1 { font-size: 1.3rem; }
  .ch-grid { grid-template-columns: 1fr; }
  .poster-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .guide { --name-w: 64px; --px-per-min: 3.2px; max-height: calc(100vh - var(--topbar-h) - 230px); }
  .guide-name span { display: none; }
  .cards { grid-template-columns: 1fr; }
  .radiobar { bottom: calc(76px + env(safe-area-inset-bottom)); }
  .toasts { bottom: calc(80px + env(safe-area-inset-bottom)); left: 16px; align-items: stretch; }
  .player { padding: 0; }
  .player-head { padding: 0 8px; }
  .player-stage { border-radius: 0; }
}
.dot.idle { background: var(--text-3); box-shadow: none; }
