/* ───────────────────────────── tokens ───────────────────────────── */
:root {
  --bg-1: #454b54;
  --bg-2: #33383f;
  --bg-3: #262a30;
  --bg-4: #1b1e22;
  --ink: #f5f6f8;
  --ink-2: rgba(236, 239, 243, .74);
  --ink-3: rgba(236, 239, 243, .5);
  --ink-4: rgba(236, 239, 243, .32);
  --title: rgba(214, 219, 226, .78);
  --glass: rgba(255, 255, 255, .15);
  --glass-2: rgba(255, 255, 255, .22);
  --glass-line: rgba(255, 255, 255, .12);
  --panel: rgba(34, 38, 44, .78);
  --panel-solid: #2a2e35;
  --pill-on: #121417;
  --accent: #ff8a2e;
  --live: #ff453a;
  --ok: #34c759;
  --ring: #ffffff;
  --r-card: 18px;
  --r-poster: 14px;
  --shadow: 0 22px 44px -20px rgba(0, 0, 0, .7), 0 3px 8px rgba(0, 0, 0, .22);
  --shadow-up: 0 34px 60px -22px rgba(0, 0, 0, .8), 0 6px 14px rgba(0, 0, 0, .3);
  --pad: clamp(28px, 4.2vw, 84px);
  --gap: clamp(18px, 2.4vw, 50px);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --font: "SF Pro Display", "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { font-size: clamp(13px, .9vw, 20px); }
html, body { margin: 0; height: 100%; overflow: hidden; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: radial-gradient(130% 85% at 50% -12%, var(--bg-1) 0%, var(--bg-2) 34%, var(--bg-3) 66%, var(--bg-4) 100%) fixed var(--bg-3);
  -webkit-font-smoothing: antialiased;
  user-select: none;
  cursor: default;
}
button { font: inherit; color: inherit; border: 0; background: none; padding: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
img { display: block; }
svg.i { width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.hidden { display: none !important; }
::selection { background: rgba(255, 255, 255, .25); }
:focus { outline: none; }

/* ───────────────────────────── top bar ───────────────────────────── */
#top {
  position: fixed; inset: 0 0 auto 0; z-index: 20;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 1.15rem var(--pad) .9rem 3.3vw;
  transition: background .3s, backdrop-filter .3s;
}
#top.scrolled { background: rgba(38, 42, 48, .62); backdrop-filter: blur(22px) saturate(1.4); box-shadow: 0 1px 0 var(--glass-line); }
#top .left, #top .right { display: flex; gap: 1.4rem; align-items: center; }
#top .right { justify-content: flex-end; }
.pill {
  height: 2.3rem; min-width: 4.35rem; padding: 0 1.2rem; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  background: var(--glass); color: var(--ink);
  transition: background .2s, transform .25s var(--ease), box-shadow .25s;
}
.pill:hover, .pill:focus-visible, .pill.on { background: var(--glass-2); }
.pill:focus-visible { box-shadow: 0 0 0 2px var(--ring); }
.pill:active { transform: scale(.96); }
.pill .label { font-size: .9rem; font-weight: 600; max-width: 12rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
nav.main { display: flex; align-items: center; gap: .35rem; }
nav.main a, nav.main button {
  display: inline-flex; align-items: center; height: 2.3rem; padding: 0 1.05rem; border-radius: 999px;
  font-size: 1rem; font-weight: 600; color: var(--ink); text-decoration: none; letter-spacing: .005em;
  transition: background .2s, color .2s;
}
nav.main a:hover, nav.main a:focus-visible, nav.main button:hover, nav.main button:focus-visible { background: rgba(255, 255, 255, .1); }
nav.main a.on { background: var(--pill-on); box-shadow: 0 6px 16px -8px rgba(0, 0, 0, .6); }
nav.main a.on:focus-visible { box-shadow: 0 0 0 2px var(--ring); }
nav.main .ico { padding: 0 .8rem; }
nav.main .ico svg.i { width: 1.2rem; height: 1.2rem; }

/* ───────────────────────────── views ───────────────────────────── */
#view {
  position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden;
  padding: 5.4rem 0 4rem; scroll-behavior: smooth;
}
#view::-webkit-scrollbar, .row-scroll::-webkit-scrollbar, .scroll::-webkit-scrollbar { width: 0; height: 0; }
.scroll::-webkit-scrollbar { width: 8px; }
.scroll::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .14); border-radius: 8px; }
.fade-in { animation: fadeIn .35s var(--ease) both; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.section { margin-top: 1.6rem; }
.section:first-child { margin-top: .4rem; }
.section h2 {
  margin: 0 var(--pad) .1rem calc(var(--pad) + .1rem);
  font-size: 1.95rem; font-weight: 600; color: var(--title); letter-spacing: -.012em;
  display: flex; align-items: baseline; gap: 1rem;
}
.section h2 .more { font-size: .95rem; font-weight: 600; color: var(--ink-3); cursor: pointer; }
.section h2 .more:hover { color: var(--ink); }

.row-scroll {
  display: flex; gap: var(--gap); overflow-x: auto; overflow-y: hidden;
  padding: 1.6rem var(--pad) 2.2rem; scroll-padding-inline: var(--pad);
  scroll-behavior: smooth;
}

/* ───────────────────────────── cards ───────────────────────────── */
.card {
  position: relative; flex: none; border-radius: var(--r-card); overflow: hidden;
  background: #30353c; box-shadow: var(--shadow);
  transition: transform .32s var(--ease), box-shadow .32s var(--ease);
  cursor: pointer; isolation: isolate;
}
.card::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); transition: box-shadow .25s;
}
.card:hover, .card:focus-visible { transform: scale(1.06); box-shadow: var(--shadow-up); z-index: 2; }
.card:focus-visible::after, .card.sel::after { box-shadow: inset 0 0 0 3px var(--ring); }
.card:active { transform: scale(1.03); }
.card img.art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .4s; }
.card img.art.ok { opacity: 1; }
.card .dot {
  position: absolute; top: .75rem; right: .75rem; width: .78rem; height: .78rem; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 2px rgba(0, 0, 0, .12), 0 2px 6px rgba(0, 0, 0, .35); z-index: 2;
}

/* wide 16:9 cards (continue watching, channels) */
.card.wide { width: calc((100vw - 2 * var(--pad) - 3 * var(--gap)) / 3.55); aspect-ratio: 16 / 9; }
.card.wide .scrim { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 38%, rgba(0, 0, 0, .25) 58%, rgba(0, 0, 0, .78)); }
.card.wide .meta { position: absolute; left: 1.35rem; right: 1.35rem; bottom: 1.05rem; z-index: 1; }
.card.wide .ttl {
  font-size: 2.05rem; font-weight: 800; line-height: 1.02; letter-spacing: -.01em; text-shadow: 0 2px 14px rgba(0, 0, 0, .45);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card.wide .ttl.caps { text-transform: uppercase; letter-spacing: .14em; font-size: 1.7rem; }
.card.wide .sub { display: flex; align-items: center; gap: .7rem; margin-top: .55rem; font-size: 1.02rem; font-weight: 600; white-space: nowrap; }
.card.wide .sub svg.i { width: .95rem; height: .95rem; }
.card.wide .sub .txt { overflow: hidden; text-overflow: ellipsis; }
.bar { position: relative; height: 5px; border-radius: 5px; background: rgba(255, 255, 255, .32); overflow: hidden; flex: 0 0 6.6rem; }
.bar i { position: absolute; inset: 0 auto 0 0; background: #fff; border-radius: inherit; }

/* channel cards: logo on glass */
.card.chan { background: linear-gradient(160deg, #3d434b, #262a30); }
.card.chan .logo { position: absolute; inset: 14% 22% 40%; display: grid; place-items: center; }
.card.chan .logo img { max-width: 100%; max-height: 100%; object-fit: contain; filter: drop-shadow(0 4px 14px rgba(0, 0, 0, .45)); opacity: 0; transition: opacity .4s; }
.card.chan .logo img.ok { opacity: 1; }
.card.chan .logo .initials { font-size: 2.6rem; font-weight: 800; color: rgba(255, 255, 255, .85); letter-spacing: .02em; text-align: center; line-height: 1.05; }
.card.chan .ttl { font-size: 1.25rem; font-weight: 700; text-transform: none; letter-spacing: 0; }
.card.chan .now { margin-top: .35rem; font-size: .95rem; font-weight: 600; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card.chan .bar { flex: 1 1 auto; height: 4px; margin-top: .55rem; }
.live-tag {
  display: inline-flex; align-items: center; gap: .35rem; padding: .18rem .5rem; border-radius: 6px;
  background: var(--live); color: #fff; font-size: .72rem; font-weight: 800; letter-spacing: .08em;
}
.card .live-tag { position: absolute; top: .8rem; left: .8rem; z-index: 2; }
/* games that haven't started: a glass pill with the start time instead of the red LIVE */
.live-tag.soon { background: rgba(255, 255, 255, .16); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); letter-spacing: .04em; text-transform: uppercase; }
.card.event .ttl { font-size: 1.55rem; }

/* posters 2:3 */
.card.poster { width: calc((100vw - 2 * var(--pad) - 5 * var(--gap)) / 6); aspect-ratio: 2 / 3; border-radius: var(--r-poster); }
.card .fallback {
  position: absolute; inset: 0; display: flex; align-items: flex-end; padding: 1.1rem;
  font-size: 1.35rem; font-weight: 800; line-height: 1.08; letter-spacing: -.005em; color: rgba(255, 255, 255, .92);
  text-shadow: 0 2px 12px rgba(0, 0, 0, .35);
}
.card.wide .fallback { align-items: center; justify-content: center; text-align: center; font-size: 1.8rem; }

/* grids (library pages) */
.vgrid { position: relative; margin: 0 var(--pad); }
.vgrid > .card { position: absolute; }
.vgrid .card.poster { width: auto; }
.vgrid .card.wide { width: auto; }

/* sideways rows: arrow buttons at the ends (sidescroll.js) */
.hs-arrow {
  position: fixed; z-index: 1000; width: 3rem; height: 3rem; border-radius: 50%; border: 0; padding: 0;
  display: grid; place-items: center; cursor: pointer; color: var(--ink);
  background: rgba(30, 33, 38, .72); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .45), inset 0 0 0 1px rgba(255, 255, 255, .14);
  transition: opacity .18s, transform .18s var(--ease), background .18s;
}
.hs-arrow:hover { background: rgba(255, 255, 255, .9); color: #15171a; transform: scale(1.08); }
.hs-arrow svg.i { width: 1.35rem; height: 1.35rem; stroke-width: 2.6; }
.hs-arrow.small { width: 2rem; height: 2rem; }
.hs-arrow.small svg.i { width: 1rem; height: 1rem; }
.hs-arrow.off { opacity: 0; pointer-events: none; }
body.hs-dragging, body.hs-dragging * { cursor: grabbing !important; user-select: none; }
body.hs-dragging .card { pointer-events: none; }

/* ───────────────────────────── chips / tabs ───────────────────────────── */
.chips { display: flex; gap: .6rem; overflow-x: auto; padding: .4rem var(--pad) 1rem; scroll-padding-inline: var(--pad); }
.chips::-webkit-scrollbar { height: 0; }
.chip {
  flex: none; height: 2.2rem; padding: 0 1rem; border-radius: 999px; display: inline-flex; align-items: center; gap: .45rem;
  background: rgba(255, 255, 255, .09); color: var(--ink-2); font-size: .92rem; font-weight: 600; white-space: nowrap;
  transition: background .2s, color .2s, box-shadow .2s;
}
.chip:hover { background: rgba(255, 255, 255, .16); color: var(--ink); }
.chip:focus-visible { box-shadow: 0 0 0 2px var(--ring); color: var(--ink); }
.chip.on { background: #f2f3f5; color: #15171a; }
.chip .n { font-size: .78rem; opacity: .6; }
.toolbar { display: flex; align-items: center; gap: .8rem; padding: 0 var(--pad); margin: .2rem 0 .4rem; }
.toolbar h1 { margin: 0 auto 0 .1rem; font-size: 1.95rem; font-weight: 600; color: var(--title); letter-spacing: -.012em; }
.search-field {
  display: flex; align-items: center; gap: .6rem; height: 2.4rem; padding: 0 1rem; border-radius: 999px;
  background: rgba(255, 255, 255, .1); color: var(--ink-2); min-width: 16rem;
}
.search-field:focus-within { background: rgba(255, 255, 255, .16); box-shadow: 0 0 0 2px rgba(255, 255, 255, .55); }
.search-field input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font-size: .98rem; color: var(--ink); }
.search-field input::placeholder { color: var(--ink-3); }
select.pill { appearance: none; -webkit-appearance: none; padding: 0 1.1rem; font-size: .9rem; font-weight: 600; border: 0; outline: none; cursor: pointer; }
select.pill option { background: #2a2e35; }

/* ───────────────────────────── live TV ───────────────────────────── */
.live-wrap { display: grid; grid-template-columns: minmax(15rem, 21rem) 1fr; gap: 1.6rem; padding: 0 var(--pad); height: calc(100vh - 5.4rem - 1.4rem); }
.cats {
  background: rgba(255, 255, 255, .06); border-radius: 20px; padding: .6rem; overflow-y: auto;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .05);
}
.cats .grp { padding: .9rem .9rem .35rem; font-size: .74rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-4); }
.cat {
  display: flex; align-items: center; gap: .6rem; width: 100%; padding: .62rem .9rem; border-radius: 12px; text-align: left;
  font-size: .95rem; font-weight: 600; color: var(--ink-2); transition: background .15s, color .15s;
}
.cat span.name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat .n { font-size: .78rem; color: var(--ink-4); font-weight: 600; }
.cat:hover { background: rgba(255, 255, 255, .08); color: var(--ink); }
.cat:focus-visible { box-shadow: inset 0 0 0 2px var(--ring); color: var(--ink); }
.cat.on { background: #f2f3f5; color: #15171a; }
.cat.on .n { color: rgba(0, 0, 0, .45); }
.cat .sport-ico { width: .5rem; height: .5rem; border-radius: 50%; background: var(--accent); flex: none; }
.chan-pane { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.chan-pane .toolbar { padding: 0; margin: 0 0 1rem; }
.chan-list { position: relative; flex: 1; overflow-y: auto; border-radius: 20px; }
.chan-list .inner { position: relative; }
.chan-row {
  position: absolute; left: 0; right: 0; height: 4.6rem; display: grid; grid-template-columns: 3.2rem 5.6rem 1fr auto; align-items: center; gap: 1rem;
  padding: 0 1rem; border-radius: 16px; cursor: pointer; transition: background .15s;
}
.chan-row:hover { background: rgba(255, 255, 255, .07); }
.chan-row:focus-visible { background: rgba(255, 255, 255, .1); box-shadow: inset 0 0 0 2px var(--ring); }
.chan-row.playing { background: rgba(255, 255, 255, .12); }
.chan-row .num { font-size: .9rem; font-weight: 700; color: var(--ink-4); text-align: right; font-variant-numeric: tabular-nums; }
.chan-row .lg { height: 3.3rem; border-radius: 10px; background: rgba(255, 255, 255, .07); display: grid; place-items: center; overflow: hidden; }
.chan-row .lg img { max-width: 82%; max-height: 74%; object-fit: contain; }
.chan-row .lg b { font-size: .95rem; color: var(--ink-2); }
.chan-row .info { min-width: 0; }
.chan-row .nm { font-size: 1.05rem; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chan-row .ep { display: flex; align-items: center; gap: .7rem; margin-top: .3rem; font-size: .88rem; color: var(--ink-3); white-space: nowrap; overflow: hidden; }
.chan-row .ep .t { overflow: hidden; text-overflow: ellipsis; color: var(--ink-2); }
.chan-row .ep .bar { flex: 0 0 4.5rem; height: 3px; }
.chan-row .ep .nx { overflow: hidden; text-overflow: ellipsis; }
.chan-row .acts { display: flex; gap: .4rem; opacity: 0; transition: opacity .15s; }
.chan-row:hover .acts, .chan-row:focus-visible .acts, .chan-row .acts .on { opacity: 1; }
.chan-row .acts .on { color: var(--accent); }
.round {
  width: 2.3rem; height: 2.3rem; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .1);
  transition: background .15s, transform .2s var(--ease);
}
.round:hover, .round:focus-visible { background: rgba(255, 255, 255, .22); }
.round:focus-visible { box-shadow: 0 0 0 2px var(--ring); }
.round.on svg.i { fill: currentColor; }
.chan-row .acts .round.on { opacity: 1; }

/* ───────────────────────────── detail page ───────────────────────────── */
.detail { position: relative; min-height: calc(100vh - 9rem); }
.hero { position: fixed; inset: 0; z-index: -1; overflow: hidden; }
.hero img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .6s; }
.hero img.ok { opacity: .55; }
.hero img.blur { filter: blur(40px) saturate(1.2); transform: scale(1.2); }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(27, 30, 34, .96) 0%, rgba(27, 30, 34, .7) 45%, rgba(27, 30, 34, .2) 100%), linear-gradient(0deg, rgba(27, 30, 34, 1) 0%, transparent 45%); }
.detail .head { display: grid; grid-template-columns: minmax(12rem, 17rem) 1fr; gap: 2.6rem; padding: 2rem var(--pad) 1rem; align-items: end; }
.detail .head .card.poster { width: 100%; }
.detail h1 { margin: 0; font-size: 3.2rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.02; }
.detail .facts { display: flex; flex-wrap: wrap; gap: .5rem 1rem; margin: 1rem 0 0; font-size: 1rem; font-weight: 600; color: var(--ink-2); }
.detail .facts .badge { padding: .1rem .5rem; border-radius: 6px; box-shadow: inset 0 0 0 1.5px var(--ink-3); font-size: .85rem; }
.detail .plot { max-width: 52rem; margin: 1.1rem 0 0; font-size: 1.08rem; line-height: 1.55; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.detail .people { margin-top: .8rem; font-size: .92rem; color: var(--ink-3); max-width: 52rem; }
.actions { display: flex; gap: .9rem; margin-top: 1.6rem; flex-wrap: wrap; }
.btn {
  height: 3rem; padding: 0 1.6rem; border-radius: 14px; display: inline-flex; align-items: center; gap: .65rem;
  background: var(--glass); font-size: 1.02rem; font-weight: 700; transition: background .2s, transform .2s var(--ease), box-shadow .2s;
}
.btn:hover { background: var(--glass-2); }
.btn:focus-visible { box-shadow: 0 0 0 3px var(--ring); transform: scale(1.04); }
.btn.primary { background: #f4f5f7; color: #121417; }
.btn.primary:hover { background: #fff; }
.btn .sm { font-weight: 600; opacity: .62; }
.btn.danger { color: #ff6b61; }
.seasons { padding: 0 var(--pad); }

/* ───────────────────────────── player ───────────────────────────── */
#stage { position: fixed; inset: 0; z-index: 40; background: #000; }
#stage.hidden ~ * {}
.watch { position: absolute; inset: 0; overflow: hidden; }
.watch video, .tile video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.watch.fill video { object-fit: cover; }
.watch.idle { cursor: none; }
.watch .ov { position: absolute; inset: 0; opacity: 1; transition: opacity .35s; pointer-events: none; }
.watch.idle .ov { opacity: 0; }
.watch .ov > * { pointer-events: auto; }
.watch .ov::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(0, 0, 0, .55) 0%, transparent 22%, transparent 62%, rgba(0, 0, 0, .7) 100%); }
.watch .tl { position: absolute; top: 1.6rem; left: 1.8rem; right: 1.8rem; display: flex; align-items: center; gap: 1.1rem; }
.watch .tl .titles { min-width: 0; flex: 1; }
.watch .tl .t1 { font-size: 1.6rem; font-weight: 800; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 2px 12px rgba(0, 0, 0, .4); }
.watch .tl .t2 { margin-top: .2rem; font-size: 1rem; font-weight: 600; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.watch .tl .tr { display: flex; gap: .6rem; align-items: center; }
.glass { background: rgba(48, 52, 58, .55); backdrop-filter: blur(26px) saturate(1.5); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1), 0 18px 40px -18px rgba(0, 0, 0, .6); }
.watch .round { width: 2.9rem; height: 2.9rem; }
.watch .round svg.i { width: 1.25rem; height: 1.25rem; }
.controls {
  position: absolute; left: 50%; bottom: 2rem; transform: translateX(-50%); width: min(76rem, calc(100% - 3.6rem));
  border-radius: 22px; padding: .9rem 1.2rem; display: grid; grid-template-columns: auto 1fr auto; gap: 1.1rem; align-items: center;
}
.controls .grp { display: flex; align-items: center; gap: .5rem; }
.controls .round { background: transparent; }
.controls .round:hover, .controls .round:focus-visible { background: rgba(255, 255, 255, .14); }
.controls .round.big { width: 3.3rem; height: 3.3rem; background: rgba(255, 255, 255, .14); }
.controls .round.big svg.i { width: 1.45rem; height: 1.45rem; }
.timeline { display: flex; align-items: center; gap: .9rem; font-size: .92rem; font-weight: 650; font-variant-numeric: tabular-nums; color: var(--ink-2); min-width: 0; }
.seek { position: relative; flex: 1; height: 1.6rem; cursor: pointer; display: flex; align-items: center; }
.seek .track { position: relative; width: 100%; height: 6px; border-radius: 6px; background: rgba(255, 255, 255, .25); overflow: hidden; transition: height .15s; }
.seek:hover .track { height: 9px; }
.seek .buf { position: absolute; inset: 0 auto 0 0; background: rgba(255, 255, 255, .25); }
.seek .fill { position: absolute; inset: 0 auto 0 0; background: #fff; border-radius: inherit; }
.seek .hover-time { position: absolute; bottom: 1.9rem; transform: translateX(-50%); padding: .25rem .5rem; border-radius: 8px; background: rgba(0, 0, 0, .7); font-size: .8rem; display: none; }
.seek:hover .hover-time { display: block; }
.volume { width: 6rem; accent-color: #fff; }
.watch .status {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 1rem;
  font-size: 1.05rem; font-weight: 650; color: var(--ink-2); text-align: center; pointer-events: none; max-width: 34rem;
}
.watch .status.err { pointer-events: auto; }
.spinner { width: 3rem; height: 3rem; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .18); border-top-color: #fff; animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.zap {
  position: absolute; left: 1.8rem; bottom: 8.4rem; padding: 1rem 1.3rem; border-radius: 18px; display: flex; align-items: center; gap: 1rem;
  font-weight: 700; transition: opacity .3s, transform .3s var(--ease);
}
.zap .num { font-size: 1.9rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.zap .nm { font-size: 1.15rem; }
.zap .ep { font-size: .9rem; color: var(--ink-2); font-weight: 600; margin-top: .15rem; }
.side {
  position: absolute; top: 1rem; bottom: 1rem; left: 1rem; width: min(30rem, 42vw); border-radius: 24px; display: flex; flex-direction: column;
  padding: 1rem .6rem 1rem 1rem; transform: translateX(-110%); transition: transform .38s var(--ease); z-index: 3;
}
.side.open { transform: none; }
.side h3 { margin: .3rem .4rem 1rem; font-size: 1.25rem; display: flex; align-items: center; gap: .6rem; }
.side .chan-list .chan-row { grid-template-columns: 2.6rem 4.4rem 1fr; height: 4.1rem; }
.side .chan-list .chan-row .lg { height: 2.8rem; }
.side .chan-list .chan-row .acts { display: none; }
.stats { position: absolute; top: 6rem; right: 1.8rem; padding: .9rem 1.1rem; border-radius: 14px; font: 600 .82rem/1.6 ui-monospace, Consolas, monospace; color: var(--ink-2); }
.badge-fix { font-size: .75rem; font-weight: 700; padding: .25rem .55rem; border-radius: 999px; background: rgba(255, 138, 46, .2); color: #ffb37a; }
.upnext { position: absolute; right: 2rem; bottom: 9rem; width: 24rem; border-radius: 20px; padding: 1.1rem; display: flex; gap: 1rem; align-items: center; }
.upnext .t { font-size: .85rem; color: var(--ink-3); font-weight: 700; text-transform: uppercase; letter-spacing: .1em; }
.upnext .n { font-size: 1.1rem; font-weight: 700; margin-top: .2rem; }

/* ───────────────────────────── multiview wall ───────────────────────────── */
.wall-page { position: absolute; inset: 5.2rem var(--pad) 1.6rem; display: flex; flex-direction: column; gap: 1rem; }
.wall-page .toolbar { padding: 0; margin: 0; flex-wrap: wrap; }
.layouts { display: flex; gap: .4rem; padding: .3rem; border-radius: 999px; background: rgba(255, 255, 255, .08); }
.layouts button { width: 2.6rem; height: 2rem; border-radius: 999px; display: grid; place-items: center; color: var(--ink-2); }
.layouts button:hover { background: rgba(255, 255, 255, .12); color: var(--ink); }
.layouts button.on { background: #f2f3f5; color: #15171a; }
.layouts button:focus-visible { box-shadow: 0 0 0 2px var(--ring); }
.layouts svg { width: 1.5rem; height: 1rem; }
.wall { position: relative; flex: 1; display: grid; gap: 6px; border-radius: 18px; overflow: hidden; background: #000; min-height: 0; }
.wall.kiosk { position: fixed; inset: 0; border-radius: 0; gap: 4px; }
.tile { position: relative; background: #0d0e10; overflow: hidden; min-width: 0; min-height: 0; }
.tile.audio::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 0 3px #fff; pointer-events: none; z-index: 3; }
.tile .empty {
  position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: var(--ink-3); font-weight: 650; font-size: 1rem;
  background: radial-gradient(80% 80% at 50% 40%, #23272d, #16181b); cursor: pointer; transition: color .2s;
}
.tile .empty:hover, .tile .empty:focus-visible { color: var(--ink); }
.tile .empty:focus-visible { box-shadow: inset 0 0 0 3px var(--ring); }
.tile .empty .plus { width: 3.2rem; height: 3.2rem; border-radius: 50%; display: grid; place-items: center; margin: 0 auto .7rem; background: rgba(255, 255, 255, .1); }
.tile .hud { position: absolute; inset: 0; opacity: 0; transition: opacity .25s; z-index: 2; pointer-events: none; }
.tile:hover .hud, .tile.show-hud .hud { opacity: 1; }
.tile .hud::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .6), transparent 30%, transparent 70%, rgba(0, 0, 0, .55)); }
.tile .hud .nm { position: absolute; left: .9rem; bottom: .75rem; right: 40%; font-size: 1rem; font-weight: 750; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile .hud .nm small { display: block; font-size: .8rem; font-weight: 600; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; }
.tile .hud .btns { position: absolute; top: .7rem; right: .7rem; display: flex; gap: .4rem; pointer-events: auto; }
.tile .hud .btns .round { width: 2.2rem; height: 2.2rem; background: rgba(30, 33, 38, .6); backdrop-filter: blur(16px); }
.tile .hud .btns .round:hover { background: rgba(255, 255, 255, .25); }
.tile .mute-ico { position: absolute; left: .8rem; top: .8rem; z-index: 2; width: 2rem; height: 2rem; border-radius: 50%; display: grid; place-items: center; background: rgba(0, 0, 0, .45); color: var(--ink-2); }
.tile.audio .mute-ico { display: none; }
.tile .tstatus { position: absolute; inset: 0; display: grid; place-items: center; color: var(--ink-2); font-weight: 650; font-size: .95rem; text-align: center; padding: 1rem; pointer-events: none; }
.tile .tstatus .spinner { width: 2.2rem; height: 2.2rem; }
.warn { padding: .55rem .9rem; border-radius: 12px; background: rgba(255, 138, 46, .14); color: #ffbf8f; font-size: .9rem; font-weight: 600; }
.kiosk-bar { position: fixed; top: 1rem; left: 50%; transform: translateX(-50%); z-index: 30; border-radius: 999px; padding: .4rem; display: flex; gap: .4rem; align-items: center; transition: opacity .3s; }
.kiosk-bar .lbl { padding: 0 .8rem 0 .9rem; font-weight: 700; font-size: .95rem; }
.kiosk-bar.gone { opacity: 0; pointer-events: none; }

/* ───────────────────────────── screens diagram ───────────────────────────── */
.monitors { position: relative; height: 15rem; margin: .4rem 0 1.4rem; }
.monitor {
  position: absolute; border-radius: 10px; background: rgba(255, 255, 255, .08); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .14);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3rem; cursor: pointer; transition: background .2s, box-shadow .2s;
  font-weight: 700; text-align: center; padding: .4rem;
}
.monitor:hover { background: rgba(255, 255, 255, .13); }
.monitor.on { box-shadow: inset 0 0 0 3px #fff; }
.monitor .n { font-size: 1.6rem; font-weight: 800; }
.monitor .s { font-size: .78rem; color: var(--ink-3); font-weight: 600; }
.monitor .tag { font-size: .72rem; padding: .12rem .45rem; border-radius: 6px; background: var(--ok); color: #062; font-weight: 800; }
.monitor .tag.here { background: rgba(255, 255, 255, .85); color: #111; }

/* ───────────────────────────── sheets (modals) ───────────────────────────── */
#sheet-layer { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; background: rgba(12, 14, 17, .45); backdrop-filter: blur(14px); animation: fadeIn2 .25s both; }
@keyframes fadeIn2 { from { opacity: 0; } }
.sheet {
  width: min(44rem, calc(100vw - 2rem)); max-height: calc(100vh - 4rem); display: flex; flex-direction: column;
  border-radius: 28px; background: rgba(46, 50, 57, .82); backdrop-filter: blur(30px) saturate(1.5);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1), 0 40px 90px -30px rgba(0, 0, 0, .8);
  animation: pop .35s var(--ease) both;
}
.sheet.wide { width: min(64rem, calc(100vw - 2rem)); }
@keyframes pop { from { opacity: 0; transform: scale(.96) translateY(10px); } }
.sheet header { display: flex; align-items: center; gap: .8rem; padding: 1.4rem 1.6rem .6rem; }
.sheet header h2 { margin: 0; flex: 1; font-size: 1.6rem; font-weight: 750; letter-spacing: -.01em; }
.sheet .body { padding: .6rem 1.6rem 1.6rem; overflow-y: auto; }
.sheet .body::-webkit-scrollbar { width: 8px; }
.sheet .body::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .15); border-radius: 8px; }
.sheet .foot { display: flex; gap: .8rem; justify-content: flex-end; padding: 0 1.6rem 1.5rem; }
.field { display: block; margin: 0 0 1rem; }
.field > span { display: block; margin: 0 0 .4rem .2rem; font-size: .85rem; font-weight: 700; color: var(--ink-3); }
.field input, .field select, .field textarea {
  width: 100%; height: 2.9rem; padding: 0 1rem; border-radius: 14px; border: 0; outline: none;
  background: rgba(0, 0, 0, .22); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); font-size: 1rem; color: var(--ink);
}
.field textarea { height: 5rem; padding: .7rem 1rem; resize: vertical; font-size: .9rem; }
.field input:focus, .field select:focus, .field textarea:focus { box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .7); }
.field .hint { display: block; margin: .4rem 0 0 .2rem; font-size: .82rem; color: var(--ink-3); font-weight: 500; }
.seg { display: inline-flex; padding: .25rem; border-radius: 14px; background: rgba(0, 0, 0, .22); gap: .2rem; margin-bottom: 1.2rem; }
.seg button { height: 2.3rem; padding: 0 1.1rem; border-radius: 11px; font-weight: 700; font-size: .92rem; color: var(--ink-2); }
.seg button.on { background: #f2f3f5; color: #15171a; }
.seg button:focus-visible { box-shadow: 0 0 0 2px var(--ring); }
.list-item {
  display: flex; align-items: center; gap: 1rem; padding: .9rem 1rem; border-radius: 16px; background: rgba(255, 255, 255, .06); margin-bottom: .6rem;
}
.list-item .grow { flex: 1; min-width: 0; }
.list-item .a { font-weight: 700; font-size: 1.02rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-item .b { font-size: .85rem; color: var(--ink-3); margin-top: .2rem; font-weight: 600; }
.list-item.on { box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .7); }
.toggle-row { display: flex; align-items: center; gap: 1rem; padding: .8rem 0; border-bottom: 1px solid rgba(255, 255, 255, .06); }
.toggle-row .grow { flex: 1; }
.toggle-row .a { font-weight: 700; }
.toggle-row .b { font-size: .84rem; color: var(--ink-3); margin-top: .15rem; }
.switch { width: 3.1rem; height: 1.85rem; border-radius: 999px; background: rgba(255, 255, 255, .18); position: relative; transition: background .2s; flex: none; }
.switch::after { content: ""; position: absolute; top: .2rem; left: .2rem; width: 1.45rem; height: 1.45rem; border-radius: 50%; background: #fff; transition: transform .25s var(--ease); box-shadow: 0 2px 6px rgba(0, 0, 0, .3); }
.switch.on { background: var(--ok); }
.switch.on::after { transform: translateX(1.25rem); }
.switch:focus-visible { box-shadow: 0 0 0 2px var(--ring); }
h4.sub { margin: 1.4rem 0 .6rem .2rem; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-4); }
.picker-list { height: min(60vh, 34rem); position: relative; }

/* ───────────────────────────── misc ───────────────────────────── */
.empty-state { margin: 8vh auto 0; width: min(40rem, calc(100% - 2 * var(--pad))); text-align: center; }
.empty-state .badge-ico { width: 5rem; height: 5rem; border-radius: 26px; margin: 0 auto 1.5rem; display: grid; place-items: center; background: rgba(255, 255, 255, .1); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); }
.empty-state .badge-ico svg.i { width: 2.2rem; height: 2.2rem; }
.empty-state h1 { font-size: 2.4rem; margin: 0; letter-spacing: -.02em; }
.empty-state p { color: var(--ink-2); font-size: 1.1rem; line-height: 1.55; margin: .9rem 0 1.8rem; }
.empty-state .actions { justify-content: center; }
.muted { color: var(--ink-3); }
.note { padding: 0 var(--pad); color: var(--ink-3); font-weight: 600; margin: 2rem 0; }
#toast { position: fixed; left: 50%; bottom: 2rem; transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; gap: .6rem; align-items: center; pointer-events: none; }
.toast { padding: .85rem 1.3rem; border-radius: 16px; font-weight: 650; font-size: .98rem; display: flex; align-items: center; gap: .8rem; animation: pop .3s var(--ease) both; pointer-events: auto; }
.toast .spinner { width: 1.2rem; height: 1.2rem; border-width: 2px; }
.loading-line { display: flex; align-items: center; gap: .9rem; padding: 0 var(--pad); margin: 2rem 0; color: var(--ink-2); font-weight: 600; }
.loading-line .spinner { width: 1.4rem; height: 1.4rem; border-width: 2px; }
.kbd { font: 700 .75rem ui-monospace, Consolas, monospace; padding: .1rem .4rem; border-radius: 5px; background: rgba(255, 255, 255, .12); }

/* ───────────────────────────── page states ───────────────────────────── */
body.watching #top, body.kiosk #top, body.wall-fs #top { display: none; }
body.kiosk #view { padding: 0; overflow: hidden; }
body.wall-fs .wall-page { inset: 0; }
body.wall-fs .wall-page .toolbar, body.wall-fs .wall-page .warn { display: none; }
body.wall-fs .wall.kiosk { z-index: 30; }

/* episodes */
.ep-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(max(17rem, 22vw), 1fr)); gap: 2rem var(--gap); padding: .6rem var(--pad) 3rem; }
.ep-grid .card.wide { width: auto; }
.card.ep .eptitle { font-size: 1.15rem; font-weight: 750; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 2px 10px rgba(0, 0, 0, .5); }
.card.ep .sub { font-size: .9rem; color: var(--ink-2); }
.card .watched { position: absolute; top: .7rem; right: .7rem; z-index: 2; width: 1.8rem; height: 1.8rem; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .9); color: #111; }
.card .watched svg.i { width: 1rem; height: 1rem; stroke-width: 3; }
.detail .chips { padding-top: 1.4rem; }

/* game cards */
.card.event .match { position: absolute; inset: 12% 7% 30%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: .15rem; }
.card.event .team { max-width: 100%; font-size: 1.85rem; font-weight: 850; line-height: 1.04; letter-spacing: .01em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 3px 16px rgba(0, 0, 0, .45); }
.card.event .vs { font-size: .78rem; font-weight: 800; letter-spacing: .24em; text-transform: uppercase; color: rgba(255, 255, 255, .6); }
.card.event .league { position: absolute; top: .85rem; right: 1rem; z-index: 2; font-size: .74rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 255, 255, .78); }
.card.event .scrim { background: linear-gradient(180deg, transparent 62%, rgba(0, 0, 0, .55)); }
.card.event .now { color: var(--ink); font-size: 1rem; margin: 0; }

/* score cards: two teams with logos and the score, on the teams' colors */
.card.score .league { position: absolute; top: .85rem; right: 1rem; z-index: 2; max-width: 60%; font-size: .74rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 255, 255, .78); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card.score .teams { position: absolute; inset: 24% 7% 31%; z-index: 1; display: flex; flex-direction: column; justify-content: center; gap: .7rem; }
.card.score .tm { display: flex; align-items: center; gap: .85rem; min-width: 0; }
.card.score .tm.lost { opacity: .5; }
.card.score .lg { flex: none; width: 2.5rem; height: 2.5rem; display: grid; place-items: center; }
.card.score .lg img { max-width: 100%; max-height: 100%; object-fit: contain; filter: drop-shadow(0 3px 8px rgba(0, 0, 0, .45)); }
.card.score .tm.fighter .lg { width: 2rem; height: 1.4rem; }
.card.score .tm.fighter .lg img { border-radius: 3px; }
.card.score .lg b { width: 100%; height: 100%; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .14); font-size: .72rem; letter-spacing: .04em; }
.card.score .nm { flex: 1; min-width: 0; font-size: 1.45rem; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 2px 12px rgba(0, 0, 0, .45); }
.card.score .nm small { font-size: .8rem; font-weight: 700; color: var(--ink-3); }
.card.score .sc { flex: none; font-size: 2rem; font-weight: 850; font-variant-numeric: tabular-nums; text-shadow: 0 2px 12px rgba(0, 0, 0, .45); }
.card.score .scrim { background: linear-gradient(180deg, transparent 66%, rgba(0, 0, 0, .55)); }
.card.score .meta { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.card.score .now { font-size: 1rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card.score .where { flex: none; display: inline-flex; align-items: center; gap: .35rem; font-size: .88rem; font-weight: 700; color: var(--ink-2); }
.card.score .where svg.i { width: .85rem; height: .85rem; }
.card.score.nowatch .where { color: var(--ink-4); }

/* Scores page */
.scores-head { display: flex; align-items: center; gap: 1.4rem; padding: .6rem var(--pad) .4rem; }
.scores-head h1 { margin: 0; font-size: 2.2rem; letter-spacing: -.02em; }
.score-league { margin: 1.2rem var(--pad) 0; font-size: 1.35rem; color: var(--title); }
.score-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr)); gap: var(--gap); padding: 1.2rem var(--pad) 1rem; }
.score-cards .card.wide { width: auto; }
