/* Layout: broadcast-control dark UI — player as the stage, channel guide as a rack beside it (stacked on phones). */
:root {
  --bg: #0B0C10;
  --surface: #14161C;
  --surface-2: #1C1F27;
  --line: #2A2E38;
  --fg: #ECEDF0;
  --muted: #8C92A1;
  --accent: #F2B705;
  --accent-ink: #1A1400;
  --live: #E5484D;
  --ok: #30A46C;
  --warn: #F5A623;
  --font-display: "Unbounded", "Arial Black", system-ui, sans-serif;
  --font-body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --radius: 10px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--fg); }
body {
  font: 15px/1.5 var(--font-body);
  -webkit-font-smoothing: antialiased;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

.app { max-width: 1440px; margin: 0 auto; }

/* Top bar */
.topbar {
  display: flex; align-items: center; gap: 16px;
  padding-block: 14px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--fg); text-decoration: none; flex-shrink: 0; }
.brand-mark {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px;
  background: var(--accent); color: var(--accent-ink);
  font: 700 13px/1 var(--font-display); letter-spacing: -0.02em;
}
.brand-name { font: 700 17px/1 var(--font-display); letter-spacing: -0.01em; }
.search {
  flex: 1; max-width: 420px; margin-left: auto;
  display: flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 14px;
}
.search:focus-within { border-color: var(--accent); }
.search { min-width: 0; }
.search input { width: 100%; }
.search svg { width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 2; flex-shrink: 0; }
.search input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--fg); font: inherit; }

/* Announcement */
.announcement {
  margin: 0 max(16px, env(safe-area-inset-right, 0px)) 14px max(16px, env(safe-area-inset-left, 0px));
  padding: 10px 14px; border-radius: var(--radius);
  background: var(--surface-2); border-left: 3px solid var(--accent);
  font-size: 14px;
}
.announcement.warning { border-left-color: var(--warn); }
.announcement.critical { border-left-color: var(--live); background: color-mix(in srgb, var(--live) 14%, var(--surface)); }

/* Main layout */
.layout {
  min-height: 70vh;
  display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 20px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-bottom: 24px;
  align-items: start;
}
.stage { min-width: 0; position: sticky; top: 12px; }

.player {
  position: relative; aspect-ratio: 16 / 9; max-width: 100%;
  background: #000; border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 0 0 1px var(--line);
}
.player video { width: 100%; height: 100%; display: block; background: #000; }

/* ---------- On-screen overlays (logo bug, lower third, ticker, L-shape, frame) ---------- */
.video-box {
  position: absolute; left: 0; top: 0; width: 100%; height: 100%; z-index: 1;
  container-type: inline-size; overflow: hidden;
  transition: left .6s cubic-bezier(.2,.7,.2,1), top .6s cubic-bezier(.2,.7,.2,1), width .6s cubic-bezier(.2,.7,.2,1), height .6s cubic-bezier(.2,.7,.2,1);
}
.player { container-type: inline-size; }
.player.sq-l .video-box { width: var(--sq, 78%); height: var(--sq, 78%); }
.player.sq-frame .video-box { width: var(--sq, 78%); height: var(--sq, 78%); left: calc((100% - var(--sq, 78%)) / 2); top: calc((100% - var(--sq, 78%)) / 2); box-shadow: 0 0 2cqw rgba(0,0,0,.5); }
.ov-back, .ov-in { position: absolute; inset: 0; pointer-events: none; }
.ov-back { z-index: 0; }
.ov-in { z-index: 2; }
.ov-back > *, .ov-in > * { pointer-events: auto; }
.ov-link { cursor: pointer; }
.ov-el { transition: opacity .5s ease, transform .5s cubic-bezier(.2,.7,.2,1); }

.ov-bug { position: absolute; height: auto; max-height: 30%; object-fit: contain; filter: drop-shadow(0 .2cqw .6cqw rgba(0,0,0,.4)); }
.ov-bug.top-left { top: 4cqw; left: 3cqw; } .ov-bug.top-right { top: 4cqw; right: 3cqw; }
.ov-bug.bottom-left { bottom: 13cqw; left: 3cqw; } .ov-bug.bottom-right { bottom: 13cqw; right: 3cqw; }
.ov-bug.enter { opacity: 0; transform: scale(.9); }

.ov-l3 {
  position: absolute; left: 4cqw; bottom: 12cqw; max-width: 76cqw;
  display: flex; align-items: stretch; border-radius: .6cqw; overflow: hidden;
  box-shadow: 0 1cqw 3cqw rgba(0,0,0,.35); font-family: var(--font-body);
}
.ov-l3.enter { opacity: 0; transform: translateX(-6cqw); }
.ov-l3 .l3-bar { width: 1cqw; flex-shrink: 0; }
.ov-l3 .l3-logo { height: auto; width: 9cqw; object-fit: contain; padding: 1cqw; background: rgba(255,255,255,.06); }
.ov-l3 .l3-text { padding: 1.3cqw 2.4cqw 1.4cqw; min-width: 0; }
.ov-l3 .l3-title { font: 700 max(13px, 3.1cqw)/1.15 var(--font-display); letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ov-l3 .l3-sub { font-size: max(11px, 2.1cqw); line-height: 1.3; opacity: .85; margin-top: .4cqw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ov-l3.img-only { background: none !important; box-shadow: none; }
.ov-l3.img-only img { width: 60cqw; height: auto; display: block; }

.ov-ticker {
  position: absolute; left: 0; right: 0; bottom: 7cqw; height: max(22px, 4.6cqw);
  display: flex; align-items: center; font: 600 max(11px, 2.3cqw)/1 var(--font-body); overflow: hidden;
}
.ov-ticker.enter { opacity: 0; transform: translateY(100%); }
.ov-ticker.from-top.enter { transform: translateY(-100%); }
.ov-ticker .tk-label { align-self: stretch; display: flex; align-items: center; padding: 0 2cqw; font-family: var(--font-display); font-weight: 700; letter-spacing: .04em; flex-shrink: 0; z-index: 1; }
.ov-ticker .tk-track { flex: 1; overflow: hidden; position: relative; align-self: stretch; }
.ov-ticker .tk-move { position: absolute; top: 50%; translate: 0 -50%; white-space: nowrap; will-change: transform; animation: tk-scroll linear infinite; }
.ov-ticker .tk-move span { padding: 0 2.4cqw; }
.ov-ticker .tk-move span::after { content: "•"; padding-left: 4.8cqw; opacity: .6; }
@keyframes tk-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.ov-lside { position: absolute; top: 0; right: 0; height: 100%; display: grid; place-items: center; overflow: hidden; }
.ov-lside img { width: 100%; height: 100%; object-fit: cover; }
.ov-lbottom { position: absolute; left: 0; bottom: 0; display: flex; align-items: center; gap: 2cqw; padding: 0 3cqw; overflow: hidden; }
.ov-lbottom img { height: 100%; width: 100%; object-fit: cover; position: absolute; inset: 0; }
.ov-lbottom .lb-title { font: 700 max(12px, 3cqw)/1.1 var(--font-display); position: relative; }
.ov-lbottom .lb-sub { font-size: max(10px, 2cqw); opacity: .85; position: relative; }
.ov-lside.enter { transform: translateX(100%); } .ov-lbottom.enter { transform: translateY(100%); }
.ov-frame { position: absolute; inset: 0; background-size: cover; background-position: center; }
.ov-frame.enter { opacity: 0; }

.fs-btn {
  position: absolute; top: 10px; left: 10px; z-index: 6; width: 36px; height: 36px; border-radius: 8px;
  display: grid; place-items: center; border: 0; cursor: pointer; background: rgba(0,0,0,.45); opacity: 0; transition: opacity .25s;
}
.fs-btn svg { width: 20px; height: 20px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.player:hover .fs-btn, .player.show-ui .fs-btn, .fs-btn:focus-visible { opacity: 1; }
.live-badge { transition: left .25s; }
.player:hover .live-badge, .player.show-ui .live-badge { left: 54px; }
.player:fullscreen { border-radius: 0; box-shadow: none; aspect-ratio: 16 / 9; width: min(100vw, 177.78vh); height: min(100vh, 56.25vw); margin: auto; }
.player::backdrop { background: #000; }

.ov-l3.waiting, .ov-ticker.waiting { visibility: hidden; }
.ov-l3 .l3-text { transition: opacity .25s ease; }
.ov-l3 .l3-text.swap { opacity: 0; }

/* Shoppable product panel */
.ov-shop {
  position: absolute; right: 2.5cqw; top: 50%; translate: 0 -50%; width: max(150px, 24cqw); max-height: 86%;
  background: color-mix(in srgb, var(--shop-bg, #111318) 92%, transparent); color: var(--shop-fg, #fff);
  border-radius: 1.2cqw; overflow: hidden; box-shadow: 0 1cqw 3cqw rgba(0,0,0,.4); font-family: var(--font-body);
  display: flex; flex-direction: column; backdrop-filter: blur(6px);
}
.ov-shop.enter { opacity: 0; transform: translateX(4cqw); }
.ov-shop .shop-head { display: flex; align-items: center; gap: .8cqw; width: 100%; border: 0; background: var(--shop-accent, #F2B705); color: #111318; font: 700 max(11px, 1.7cqw)/1 var(--font-body); padding: 1cqw 1.4cqw; cursor: pointer; text-align: left; }
.ov-shop .shop-title { flex: 1; }
.ov-shop .shop-bag { width: 1.1em; height: 1.1em; border: 2px solid currentColor; border-radius: 2px 2px 4px 4px; position: relative; flex-shrink: 0; }
.ov-shop .shop-bag::before { content: ""; position: absolute; left: 25%; right: 25%; top: -.45em; height: .5em; border: 2px solid currentColor; border-bottom: 0; border-radius: .5em .5em 0 0; }
.ov-shop .shop-chev { width: .5em; height: .5em; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; rotate: 45deg; margin-top: -.25em; transition: rotate .2s; }
.ov-shop.collapsed .shop-chev { rotate: -135deg; margin-top: .2em; }
.ov-shop.collapsed .shop-list { display: none; }
.ov-shop .shop-list { overflow-y: auto; display: grid; gap: 1px; background: rgba(255,255,255,.08); }
.ov-shop .shop-item { display: grid; grid-template-columns: max(40px, 6cqw) minmax(0, 1fr); gap: 1cqw; align-items: center; padding: .9cqw 1.2cqw; background: var(--shop-bg, #111318); color: inherit; text-decoration: none; }
.ov-shop .shop-item:hover { background: color-mix(in srgb, var(--shop-bg, #111318) 80%, #fff); }
.ov-shop .shop-img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: .6cqw; background: rgba(255,255,255,.1); }
.ov-shop .shop-tx { display: grid; gap: .2cqw; min-width: 0; }
.ov-shop .shop-name { font-size: max(11px, 1.5cqw); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ov-shop .shop-price { font-size: max(10px, 1.35cqw); opacity: .8; font-variant-numeric: tabular-nums; }
.ov-shop .shop-cta { font-size: max(10px, 1.2cqw); font-weight: 700; color: var(--shop-accent, #F2B705); }

/* ---------- VOD ---------- */
.vod-main { min-height: 85vh; padding-block: 8px 40px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.vod-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px 32px; flex-wrap: wrap; margin: 12px 0 18px; }
.vod-head-text { min-width: 0; max-width: 70ch; }
.eyebrow { margin: 0 0 6px; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.vod-head h1 { font: 700 clamp(26px, 4vw, 40px)/1.1 var(--font-display); letter-spacing: -.02em; margin: 0; text-wrap: balance; }
.vod-intro { margin: 10px 0 0; color: var(--muted); font-size: 16px; }
.vod-chips { padding: 0 0 18px; border: 0; margin: 0; flex-wrap: nowrap; }
.vod-chips .chip { text-decoration: none; }
.vod-chips .chip[aria-current="page"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }

.vod-hero { position: relative; border-radius: 14px; overflow: hidden; min-height: clamp(220px, 34vw, 420px); display: flex; align-items: flex-end; margin-bottom: 28px; background: var(--surface); }
.vod-hero .hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center; }
.vod-hero .hero-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(11,12,16,.95) 0%, rgba(11,12,16,.55) 45%, rgba(11,12,16,.05) 100%); }
.vod-hero .hero-text { position: relative; padding: clamp(18px, 3vw, 36px); max-width: 640px; display: grid; gap: 10px; justify-items: start; }
.vod-hero h2 { font: 700 clamp(22px, 3.4vw, 36px)/1.1 var(--font-display); margin: 0; letter-spacing: -.02em; }
.vod-hero .hero-desc { margin: 0; color: #D7D9DF; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.vod-hero .hero-play { text-decoration: none; padding: 11px 22px; }
.vod-hero .hero-dur { font: 500 13px var(--font-mono); color: #C9CCD3; }

.vod-row { margin-bottom: 28px; }
.vod-row-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.vod-row-head h2 { font: 700 19px/1.2 var(--font-display); margin: 0; letter-spacing: -.01em; }
.vod-row-head h2 a { color: inherit; text-decoration: none; }
.see-all { color: var(--muted); font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.see-all:hover { color: var(--fg); }
.vod-track { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 280px); gap: 14px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x proximity; scrollbar-width: thin; }
.vod-track > * { scroll-snap-align: start; }
.vod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px 14px; }

.vod-card { display: grid; gap: 8px; color: var(--fg); text-decoration: none; min-width: 0; }
.vod-thumb { position: relative; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: var(--surface-2); }
.vod-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s ease; }
.vod-card:hover .vod-thumb img { transform: scale(1.04); }
.vod-thumb.no-poster { background: linear-gradient(135deg, var(--surface-2), color-mix(in srgb, var(--accent) 22%, var(--surface))); }
.vod-dur { position: absolute; right: 6px; bottom: 6px; background: rgba(0,0,0,.75); color: #fff; font: 500 11px/1 var(--font-mono); padding: 4px 6px; border-radius: 4px; }
.vod-progress { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--accent); }
.vod-card-text { display: grid; gap: 3px; min-width: 0; }
.vod-card-title { font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.vod-card-sub { font-size: 13px; color: var(--muted); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.sponsored-tag { font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 50%, transparent); border-radius: 3px; padding: 1px 5px; }
.vod-empty { padding: 48px 0; }

.vod-watch { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; margin-top: 8px; }
.vod-watch-main { min-width: 0; }
.vod-details { padding: 16px 2px 0; }
.vod-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--muted); align-items: center; }
.vod-meta .meta-cat { color: var(--accent); font-weight: 700; text-decoration: none; text-transform: uppercase; letter-spacing: .06em; font-size: 12px; }
.vod-details h1 { font: 700 clamp(20px, 2.6vw, 28px)/1.2 var(--font-display); margin: 8px 0 10px; letter-spacing: -.01em; text-wrap: balance; }
.vod-desc { color: var(--muted); max-width: 70ch; margin: 0; white-space: pre-line; }
.vod-sponsor { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 12px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.vod-sponsor .sp-label { font-size: 12px; color: var(--muted); }
.vod-sponsor .sp-brand { color: var(--fg); font-weight: 700; text-decoration: none; display: inline-flex; }
.vod-sponsor img { height: 28px; width: auto; max-width: 140px; object-fit: contain; }
.vod-side { min-width: 0; display: grid; gap: 14px; position: sticky; top: 12px; }
.side-title { font: 700 16px/1.2 var(--font-display); margin: 6px 0 0; }
.more-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.more-list .vod-card { grid-template-columns: 150px minmax(0, 1fr); align-items: start; }
.more-list .vod-thumb { border-radius: 8px; }
.big-play { width: 72px; height: 72px; border-radius: 50%; border: 0; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; cursor: pointer; box-shadow: 0 8px 28px rgba(0,0,0,.45); transition: transform .15s; }
.big-play:hover { transform: scale(1.06); }
.big-play svg { width: 30px; height: 30px; fill: currentColor; margin-left: 4px; }
.vod-page .player-overlay { cursor: pointer; }
.vod-page .player { border-radius: var(--radius); }

@media (max-width: 1000px) {
  .vod-watch { grid-template-columns: minmax(0, 1fr); }
  .vod-side { position: static; }
}
@media (max-width: 900px) {
  .vod-main { padding-top: 0; }
  .vod-watch { margin-left: calc(-1 * max(16px, env(safe-area-inset-left, 0px))); margin-right: calc(-1 * max(16px, env(safe-area-inset-right, 0px))); }
  .vod-watch .player { border-radius: 0; }
  .vod-watch .vod-details, .vod-watch .vod-side, .vod-watch .ad-mid-slot { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .vod-track { grid-auto-columns: 72%; }
  .more-list .vod-card { grid-template-columns: 130px minmax(0, 1fr); }
}


/* Content pages: article plus an ad column on wide screens */
.page-grid { display: grid; grid-template-columns: minmax(0, 680px); justify-content: center; gap: 40px; }
.page-grid .prose { margin: 0; }
.page-side { display: none; align-content: start; }
@media (min-width: 1100px) {
  .page-grid { grid-template-columns: minmax(0, 680px) 300px; }
  .page-side { display: grid; position: sticky; top: 16px; }
}

/* ---------- Site ads ---------- */
.ad-slot { display: none; flex-direction: column; align-items: center; gap: 4px; margin: 14px auto; max-width: 100%; }
.ad-slot::before { content: var(--ad-label, none); font: 600 10px/14px var(--font-body); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); height: 14px; }
.ad-slot::after { content: ""; display: block; max-width: 100%; background: var(--surface); border-radius: 4px; }
.ad-slot.filled::after { display: none; }
.sponsor-slot::after { content: none; }
.ad-slot .ad-box, .ad-sticky .ad-box { position: relative; overflow: hidden; max-width: 100%; background: var(--surface); border-radius: 4px; }
.ad-box .ad-link, .ad-box .ad-frame, .ad-box .ad-gpt { display: block; width: 100%; height: 100%; border: 0; }
.ad-box img { display: block; width: 100%; height: 100%; object-fit: contain; }
.ad-label { font: 600 10px/14px var(--font-body); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.ad-top-slot { margin: 4px auto 14px; }
.ad-footer-slot { margin: 24px auto 8px; }
.side-col { min-width: 0; display: grid; gap: 0; align-content: start; }
.side-col .ad-slot { margin: 14px auto 0; }
.ad-mid-slot { margin: 22px auto 6px; }

.ad-sticky { position: fixed; left: 0; right: 0; z-index: 40; display: flex; justify-content: center; padding: 4px max(44px, env(safe-area-inset-right, 0px)) 4px max(44px, env(safe-area-inset-left, 0px)); background: color-mix(in srgb, var(--bg) 94%, transparent); backdrop-filter: blur(6px); box-shadow: 0 0 24px rgba(0,0,0,.4); }
.ad-sticky-top { top: 0; padding-top: calc(4px + env(safe-area-inset-top, 0px)); border-bottom: 1px solid var(--line); }
.ad-sticky-bottom { bottom: 0; padding-bottom: calc(4px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); }
.ad-sticky-inner { display: grid; justify-items: center; gap: 2px; width: 100%; }
.ad-close { position: absolute; top: 50%; translate: 0 -50%; right: max(8px, env(safe-area-inset-right, 0px)); width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface-2); color: var(--fg); cursor: pointer; font-size: 13px; }

.ad-interstitial { position: fixed; inset: 0; z-index: 100; background: rgba(5,6,9,.94); display: grid; grid-template-rows: auto minmax(0, 1fr); padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px); }
.ad-interstitial .int-bar { display: flex; align-items: center; gap: 14px; padding: 12px 16px; color: #C9CCD3; font-size: 13px; }
.ad-interstitial .int-label { font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: 11px; }
.ad-interstitial .int-count { margin-left: auto; font-variant-numeric: tabular-nums; }
.ad-interstitial .int-close { border: 0; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font: 700 14px/1 var(--font-body); padding: 10px 16px; cursor: pointer; }
.ad-interstitial .int-box { place-self: center; width: min(100vw - 32px, (100vh - 90px) * 16 / 9); max-height: calc(100vh - 90px); background: transparent; }

.skin-gutter { position: fixed; top: 0; bottom: 0; z-index: 0; display: none; cursor: pointer; }
.skin-left { left: 0; width: calc((100vw - var(--skin-safe, 1100px)) / 2); }
.skin-right { right: 0; width: calc((100vw - var(--skin-safe, 1100px)) / 2); }
.app { position: relative; z-index: 1; }

.sponsor-slot { display: none; margin: 0; flex-direction: row; align-items: center; gap: 10px; }
.sponsor-slot::before { content: none; }
.sponsor-label { font-size: 12px; color: inherit; opacity: .75; white-space: nowrap; }
.sponsor-logo { display: inline-flex; background: #fff; border-radius: 6px; padding: 3px; }
.sponsor-logo img { height: 34px; width: auto; max-width: 140px; object-fit: contain; display: block; }
.topbar .sponsor-slot { margin-left: 8px; }
@media (max-width: 700px) { .topbar .sponsor-slot { display: none !important; } }

.ad-native .native-body { font-size: 13px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ad-native .native-cta { font-size: 13px; font-weight: 700; color: var(--accent); }
.ad-native .vod-thumb::after { content: "Ad"; position: absolute; left: 6px; top: 6px; background: rgba(0,0,0,.7); color: #fff; font: 700 10px/1 var(--font-body); padding: 4px 6px; border-radius: 3px; letter-spacing: .06em; }
.ad-preview-note { position: fixed; left: 50%; top: 8px; translate: -50% 0; z-index: 120; background: var(--warn); color: #1A1400; font: 700 13px/1 var(--font-body); padding: 8px 14px; border-radius: 999px; box-shadow: 0 6px 20px rgba(0,0,0,.4); }

/* ---------- Video ads ---------- */
.ad-layer { position: absolute; inset: 0; z-index: 7; background: #000; display: block; }
.ad-layer .ad-video { width: 100%; height: 100%; object-fit: contain; display: block; background: #000; }
.ad-top { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; gap: 8px; pointer-events: none; }
.ad-badge { background: rgba(0,0,0,.65); color: #fff; font: 700 12px/1 var(--font-body); padding: 6px 9px; border-radius: 4px; letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.ad-badge::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 2px; background: var(--accent); margin-right: 6px; vertical-align: 0; }
.ad-btn { position: absolute; border: 0; cursor: pointer; font: 700 13px/1 var(--font-body); padding: 10px 14px; border-radius: 6px; }
.ad-visit { left: 10px; bottom: 16px; background: rgba(0,0,0,.65); color: #fff; }
.ad-skip { right: 0; bottom: 16px; background: rgba(0,0,0,.78); color: #fff; border-radius: 6px 0 0 6px; padding: 12px 16px; min-width: 110px; border: 1px solid rgba(255,255,255,.35); border-right: 0; }
.ad-skip:disabled { cursor: default; opacity: .85; font-weight: 600; }
.ad-sound { right: 10px; top: 10px; background: var(--accent); color: var(--accent-ink); }
.ad-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255,255,255,.2); }
.ad-progress > div { height: 100%; background: var(--accent); width: 0; transition: width .25s linear; }
.player.ad-on .ov-in, .player.ad-on .ov-back { visibility: hidden; }
.player.ad-on .fs-btn, .player.ad-on .live-badge { display: none; }

.pause-ad { position: absolute; z-index: 6; inset: 0; display: grid; place-items: center; background: rgba(0,0,0,.55); padding: 6%; }
.pause-ad-link { display: block; max-width: min(70%, 640px); max-height: 70%; border-radius: 8px; overflow: hidden; box-shadow: 0 10px 40px rgba(0,0,0,.5); }
.pause-ad-link img { display: block; width: 100%; height: auto; max-height: 100%; object-fit: contain; }
.pause-ad-label { position: absolute; top: 12px; left: 12px; background: rgba(0,0,0,.65); color: #fff; font: 700 11px/1 var(--font-body); padding: 5px 8px; border-radius: 4px; letter-spacing: .06em; text-transform: uppercase; }
.pause-ad-close { position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgba(0,0,0,.65); color: #fff; font-size: 15px; cursor: pointer; }
.pause-ad-resume { position: absolute; bottom: 16px; left: 50%; translate: -50% 0; border: 0; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font: 700 14px/1 var(--font-body); padding: 11px 20px; cursor: pointer; }

/* Companion banner beside the player */
.companion { display: grid; justify-items: center; gap: 4px; margin-top: 14px; }
.companion-link { display: block; max-width: 100%; }
.companion-link img { width: 100%; height: 100%; object-fit: contain; display: block; border-radius: 4px; }

@media (prefers-reduced-motion: reduce) { .ov-ticker .tk-move { animation-duration: 0s !important; } }
.player-overlay {
  z-index: 4;
  position: absolute; inset: 0; display: grid; place-items: center; text-align: center;
  background: radial-gradient(ellipse at center, rgba(11,12,16,.55), rgba(11,12,16,.9));
  padding: 16px;
}
.player-overlay.clear { background: none; pointer-events: none; }
.overlay-inner { display: grid; gap: 12px; justify-items: center; max-width: 36ch; }
.overlay-inner p { margin: 0; color: var(--muted); }
.spinner {
  width: 36px; height: 36px; border-radius: 50%;
  border: 3px solid var(--line); border-top-color: var(--accent);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.live-badge {
  z-index: 5;
  position: absolute; top: 12px; left: 12px;
  background: var(--live); color: #fff; font: 700 11px/1 var(--font-body); letter-spacing: .1em;
  padding: 5px 8px; border-radius: 4px; display: flex; align-items: center; gap: 6px;
}
.live-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #fff; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .3; } }

.btn {
  background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 999px;
  padding: 9px 18px; font-weight: 700; cursor: pointer;
}

/* Now playing */
.now { display: flex; gap: 14px; align-items: flex-start; padding: 16px 2px 0; }
.now-logo {
  width: 56px; height: 56px; flex-shrink: 0; border-radius: 10px; overflow: hidden;
  display: grid; place-items: center; font: 700 16px/1 var(--font-display);
}
.now-logo img, .ch-logo img { width: 100%; height: 100%; object-fit: contain; background: var(--surface-2); }
.now-text { flex: 1; min-width: 0; }
.now-meta { display: flex; gap: 10px; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.now-meta .mono { color: var(--accent); }
.now h1 { font: 700 clamp(18px, 2.4vw, 24px)/1.2 var(--font-display); margin: 4px 0 6px; text-wrap: balance; letter-spacing: -0.01em; }
.now p { margin: 0; color: var(--muted); max-width: 65ch; }
.now-actions { display: flex; gap: 8px; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line);
}
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: var(--fg); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn[aria-pressed="true"] svg { fill: var(--accent); stroke: var(--accent); }

/* Programme guide under the player */
.schedule {
  display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 20px;
  margin-top: 16px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
}
.epg-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); display: flex; gap: 8px; }
.epg-label .mono { color: var(--accent); letter-spacing: 0; }
.epg-title { font-weight: 700; font-size: 17px; margin: 4px 0 8px; }
.epg-track { height: 3px; background: var(--line); border-radius: 2px; overflow: hidden; }
.epg-bar { height: 100%; background: var(--accent); }
.epg-desc { margin: 10px 0 0; color: var(--muted); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.epg-later ul { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 6px; }
.epg-later li { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 8px; font-size: 14px; }
.epg-later li span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.epg-later .mono { color: var(--muted); font-size: 13px; }
.rating { border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; font-size: 11px; letter-spacing: .04em; }

/* Guide */
.guide {
  min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  max-height: calc(100vh - 110px); display: flex; flex-direction: column; overflow: hidden;
}
.chips {
  display: flex; gap: 6px; padding: 12px; overflow-x: auto; border-bottom: 1px solid var(--line);
  scrollbar-width: none; flex-shrink: 0;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0; border: 1px solid var(--line); background: transparent; border-radius: 999px;
  padding: 6px 12px; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer;
}
.chip[aria-pressed="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.channel-list { list-style: none; margin: 0; padding: 6px; overflow-y: auto; }
.ch {
  display: grid; grid-template-columns: 38px 44px minmax(0, 1fr) auto; gap: 12px; align-items: center;
  width: 100%; padding: 8px; border-radius: 8px; border: 0; background: none; text-align: left; cursor: pointer;
}
.ch:hover { background: var(--surface-2); }
.ch[aria-current="true"] { background: var(--surface-2); box-shadow: inset 3px 0 0 var(--accent); }
.ch-num { font-family: var(--font-mono); font-size: 13px; color: var(--muted); text-align: right; }
.ch[aria-current="true"] .ch-num { color: var(--accent); }
.ch-logo {
  width: 44px; height: 44px; border-radius: 8px; overflow: hidden;
  display: grid; place-items: center; font: 700 13px/1 var(--font-display);
}
.ch-text { min-width: 0; }
.ch-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-cat { font-size: 12px; color: var(--muted); }
.ch-fav { width: 16px; height: 16px; fill: var(--accent); }
.empty { color: var(--muted); padding: 24px 16px; margin: 0; text-align: center; }

.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  transform: translate(-50%, 20px); opacity: 0; transition: .2s;
  background: var(--fg); color: var(--bg); padding: 10px 16px; border-radius: 999px; font-weight: 600; font-size: 14px;
  pointer-events: none; max-width: calc(100% - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Phone / tablet portrait */
@media (max-width: 900px) {
  .layout { grid-template-columns: minmax(0, 1fr); gap: 14px; padding-left: 0; padding-right: 0; }
  .stage { position: sticky; top: 0; z-index: 5; background: var(--bg); padding-bottom: 4px; }
  .player { border-radius: 0; box-shadow: none; }
  .now { padding: 12px max(16px, env(safe-area-inset-right, 0px)) 4px max(16px, env(safe-area-inset-left, 0px)); }
  .now p { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 14px; }
  .now-logo { width: 44px; height: 44px; }
  .schedule { grid-template-columns: minmax(0, 1fr); gap: 14px; margin: 12px max(16px, env(safe-area-inset-right, 0px)) 0 max(16px, env(safe-area-inset-left, 0px)); }
  .stage { position: static; }
  .guide { max-height: none; border-radius: 0; border-left: 0; border-right: 0; }
  .brand-name { display: none; }
}
@media (max-width: 900px) and (min-width: 520px) { .brand-name { display: inline; } }


/* ---------- Site menu, footer and CMS pages ---------- */
.site-nav { display: flex; gap: 2px; align-items: center; min-width: 0; }
.site-nav a {
  color: var(--muted); text-decoration: none; font-weight: 600; font-size: 14px;
  padding: 7px 11px; border-radius: 999px; white-space: nowrap;
}
.site-nav a:hover { color: var(--fg); background: var(--surface); }
.site-nav a[aria-current="page"] { color: var(--fg); background: var(--surface-2); }
.menu-btn { display: none; flex-shrink: 0; }
.menu-btn svg { fill: none; }
.watch-btn { text-decoration: none; margin-left: auto; flex-shrink: 0; }
.topbar { position: relative; }

.site-footer {
  border-top: 1px solid var(--line); margin-top: 8px;
  padding-block: 22px calc(22px + env(safe-area-inset-bottom, 0px));
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
  display: flex; justify-content: space-between; align-items: center; gap: 12px 24px; flex-wrap: wrap;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.footer-links a { color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 500; }
.footer-links a:hover, .footer-links a[aria-current="page"] { color: var(--fg); }
.footer-copy { margin: 0; color: var(--muted); font-size: 13px; }

.page-wrap {
  padding-block: 28px 56px;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
  min-height: 60vh;
}
.prose { max-width: 680px; margin: 0 auto; }
.prose h1 { font: 700 clamp(26px, 4vw, 38px)/1.15 var(--font-display); letter-spacing: -0.02em; margin: 0 0 18px; text-wrap: balance; }
.prose h2 { font: 700 20px/1.25 var(--font-display); margin: 32px 0 10px; letter-spacing: -0.01em; }
.prose h3 { font-size: 17px; margin: 24px 0 8px; }
.prose p, .prose li { color: color-mix(in srgb, var(--fg) 84%, var(--muted)); font-size: 16px; line-height: 1.7; }
.prose p { margin: 0 0 14px; }
.prose ul, .prose ol { padding-left: 22px; margin: 0 0 16px; display: grid; gap: 6px; }
.prose strong { color: var(--fg); }
.prose a { color: var(--accent); text-underline-offset: 3px; }
.muted-text { color: var(--muted); }
.draft-note { background: var(--surface-2); border-left: 3px solid var(--warn); padding: 10px 14px; border-radius: 8px; font-size: 14px; }

.contact-form {
  margin-top: 24px; padding: 22px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface);
  display: grid; gap: 16px;
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field label { font-size: 13px; font-weight: 600; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; background: var(--bg); color: var(--fg); border: 1px solid var(--line); border-radius: 8px;
  padding: 11px 12px; font: inherit; font-size: 15px;
}
.field textarea { resize: vertical; min-height: 140px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); }
.contact-form .btn { justify-self: start; padding: 11px 22px; }
.contact-form .btn:disabled { opacity: .6; cursor: progress; }
.form-error, .prose .form-error { color: #FF8B8E; margin: 0; font-size: 14px; }
.gotcha { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.sent { margin-top: 24px; padding: 22px; border-radius: 14px; background: var(--surface); border: 1px solid color-mix(in srgb, var(--ok) 50%, var(--line)); }
.sent h2 { margin-top: 0; }
.ghost-btn { background: transparent; color: var(--fg); border: 1px solid var(--line); }

@media (max-width: 900px) {
  .menu-btn { display: grid; }
  .site-nav {
    display: none; position: absolute; z-index: 30; top: calc(100% - 4px);
    right: max(16px, env(safe-area-inset-right, 0px)); min-width: 200px;
    flex-direction: column; align-items: stretch; padding: 6px;
    background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(0,0,0,.45);
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 11px 14px; border-radius: 8px; font-size: 15px; }
  .site-footer { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 560px) {
  .field-row { grid-template-columns: 1fr; }
  .site-page .watch-btn { padding: 8px 14px; font-size: 14px; }
}

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