:root { --ink:#f4f6ef; --muted:#91978c; --lime:#c7ff35; --panel:#151714; --line:#292c27; }
* { box-sizing:border-box; }
html { background:#0a0b09; }
body { margin:0; color:var(--ink); background:radial-gradient(circle at 76% 12%,#1b2415 0,transparent 26%),#0a0b09; font-family:Arial,Helvetica,sans-serif; }
button,a { font:inherit; }
button { color:inherit; }
svg { width:22px; height:22px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.is-hidden { display:none!important; }
.topbar { height:76px; border-bottom:1px solid #20221e; display:flex; align-items:center; justify-content:space-between; padding:0 5vw; background:#0a0b09d9; backdrop-filter:blur(14px); position:sticky; top:0; z-index:10; }
.brand { display:flex; gap:11px; align-items:center; color:#fff; text-decoration:none; font-weight:900; font-size:18px; letter-spacing:-.6px; }
.brand>span:last-child span { color:var(--lime); }
.brand-mark { width:36px; height:36px; border-radius:10px; display:grid; place-items:center; color:#0a0b09; background:var(--lime); transform:rotate(-3deg); box-shadow:0 0 28px #c7ff3530; }
.brand-mark svg { width:21px; stroke-width:2.2; }
.top-actions,.signal { display:flex; align-items:center; gap:13px; }
.signal { color:#a2a79d; font:700 10px/1 monospace; letter-spacing:1.3px; }
.signal i,.channel small i,.live-badge i { width:6px;height:6px;border-radius:50%;background:var(--lime);box-shadow:0 0 10px var(--lime); }
.avatar { border:1px solid #33362f;background:#181a17;border-radius:50%;width:34px;height:34px;font-size:10px;font-weight:800; }
.shell { width:min(1180px,92vw); margin:46px auto 80px; display:grid; grid-template-columns:220px minmax(0,1fr); gap:42px; }
.sidebar { border-right:1px solid var(--line); padding-right:25px; min-height:690px; }
.side-heading { display:flex; justify-content:space-between; align-items:center; font:800 10px monospace; letter-spacing:1.6px; color:#777d72; margin-bottom:16px; }
.side-heading small { background:#22251f;padding:3px 6px;border-radius:5px; }
.channel { width:100%;border:1px solid #34382f;background:linear-gradient(130deg,#20231e,#141613);border-radius:14px;padding:10px;display:flex;align-items:center;gap:10px;text-align:left;box-shadow:0 12px 28px #0005;position:relative;overflow:hidden;color:inherit;text-decoration:none;cursor:pointer;margin-bottom:8px;opacity:.72;transition:opacity .2s ease,border-color .2s ease,transform .2s ease; }
.channel:hover { opacity:1;transform:translateY(-1px); }
.channel.active { opacity:1;border-color:#6b7a54; }
.channel:after { content:"";position:absolute;inset:0 0 auto;height:1px;background:linear-gradient(90deg,transparent,var(--lime),transparent);opacity:.6; }
.channel-logo { flex:0 0 42px;height:42px;border-radius:10px;display:grid;place-items:center;background:var(--lime);color:#111;font-size:16px;font-weight:950; }
.channel strong { display:block;font-size:12px; }
.channel small { display:flex;align-items:center;gap:5px;color:var(--lime);font:700 8px monospace;margin-top:6px;letter-spacing:.7px; }
.side-line { height:1px;background:var(--line);margin:25px 0; }
.side-label { color:#656a62;font:800 9px monospace;letter-spacing:1.3px;margin:0 0 10px; }
.side-link { border:0;background:transparent;width:100%;padding:10px 7px;display:flex;align-items:center;gap:11px;color:#9ba096;text-align:left;font-size:12px;border-radius:8px; }
.side-link:hover { background:#171916;color:#fff; }
.side-link svg { width:17px; }
.broadcast-card { margin-top:160px;border:1px solid var(--line);border-radius:13px;padding:16px;background:#11130f; }
.waves { color:var(--lime);display:block;margin-bottom:12px; }
.broadcast-card strong { font-size:11px; }
.broadcast-card p { color:#6f756a;font-size:9px;line-height:1.55;margin:7px 0 0; }
.content { min-width:0; }
.eyebrow { display:flex;align-items:center;gap:8px;color:var(--lime);font:800 9px monospace;letter-spacing:2px;margin-bottom:10px; }
.eyebrow span { width:21px;height:1px;background:var(--lime); }
.title-row { display:flex;justify-content:space-between;align-items:end;margin-bottom:23px; }
h1 { font-size:clamp(32px,4vw,48px);line-height:1;margin:0;letter-spacing:-2.5px; }
h1 em { font:400 italic 1em Georgia,serif;color:var(--lime); }
.title-row p { color:#858b80;margin:9px 0 0;font-size:12px; }
.refresh { border:1px solid #30342d;background:#151714;border-radius:9px;padding:9px 12px;display:flex;align-items:center;gap:7px;font-size:10px;font-weight:700;color:#adb2a8;cursor:pointer; }
.refresh:hover { border-color:#65704e;color:#fff; }
.refresh svg { width:15px; }
.video-frame { aspect-ratio:16/9;background:#050604;border:1px solid #30332d;border-radius:18px;overflow:hidden;position:relative;box-shadow:0 28px 70px #0009,0 0 0 5px #ffffff05; }
.video-frame video { width:100%;height:100%;object-fit:contain;background:#050604; }
.video-frame:after { content:"";position:absolute;inset:0;pointer-events:none;background:linear-gradient(180deg,transparent 65%,#000c); }
.video-state { position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;background:radial-gradient(circle,#181d13,#080908 70%); }
.video-state[hidden] { display:none; }
.video-state strong { font-size:13px; }
.video-state small { color:#62685e;font:700 8px monospace;letter-spacing:1.5px; }
.loader { width:38px;height:38px;border:2px solid #2e3328;border-top-color:var(--lime);border-radius:50%;animation:spin 1s linear infinite; }
@keyframes spin { to { transform:rotate(360deg); } }
.live-badge { position:absolute;top:16px;left:16px;z-index:2;background:#161a13dd;border:1px solid #32382c;border-radius:7px;padding:7px 9px;display:flex;align-items:center;gap:7px;font:800 9px monospace;letter-spacing:1px; }
.controls { position:absolute;z-index:3;left:17px;right:17px;bottom:14px;display:flex;align-items:center;gap:5px; }
.controls button { width:39px;height:39px;border:1px solid #ffffff17;background:#11130fcc;backdrop-filter:blur(8px);border-radius:11px;display:grid;place-items:center;cursor:pointer;transition:.2s; }
.controls button:first-child { color:#10120e;background:var(--lime); }
.controls button:hover { transform:translateY(-2px);border-color:#ffffff35; }
.controls svg { width:18px;height:18px; }
.controls button:first-child svg { fill:currentColor; stroke:none; }
.control-spacer { flex:1; }
.quality { display:flex;align-items:center;font:800 9px monospace;color:#0d1009;margin-right:7px; }
.quality b { min-width:42px;text-align:center;color:#0d1009;background:var(--lime);padding:5px 7px;border-radius:6px;letter-spacing:.2px;box-shadow:0 0 14px #c7ff3518; }
.now-playing { margin-top:18px;border:1px solid var(--line);border-radius:13px;background:#121411;display:flex;align-items:center;padding:13px 16px;gap:13px; }
.np-icon { width:38px;height:38px;display:grid;place-items:center;border-radius:10px;background:#20251a;color:var(--lime); }
.np-icon svg { width:19px; }
.now-playing span { display:block;color:#697063;font:700 8px monospace;letter-spacing:1.2px;margin-bottom:5px; }
.now-playing strong { font-size:11px; }
.latency { margin-left:auto;text-align:right; }
.latency div { display:flex;align-items:end;justify-content:flex-end;gap:2px;height:10px; }
.latency i { width:3px;background:var(--lime);border-radius:2px; }
.latency i:nth-child(1){height:3px}.latency i:nth-child(2){height:5px}.latency i:nth-child(3){height:7px}.latency i:nth-child(4){height:9px}
.footnote { color:#50554d;font-size:9px;line-height:1.6;text-align:center;margin:18px auto;max-width:620px; }
@media(max-width:780px){.shell{grid-template-columns:1fr;margin-top:28px}.sidebar{display:none}.topbar{padding:0 4vw}.title-row{align-items:start}.refresh{font-size:0;padding:9px}.video-frame{border-radius:12px}.shell{width:94vw}.signal{display:none}}


/* Optional player health diagnostics. Hidden by default; enable with ?debug=1 or Ctrl+Shift+D. */
.health-panel { position:absolute;z-index:4;top:15px;right:15px;width:min(260px,calc(100% - 30px));padding:11px 12px;border:1px solid #ffffff1f;border-radius:11px;background:#0c0e0bde;backdrop-filter:blur(12px);box-shadow:0 12px 35px #0008;font:700 9px/1.25 monospace;color:#9ca294; }
.health-panel[hidden] { display:none!important; }
.health-head { display:flex;align-items:center;justify-content:space-between;gap:10px;padding-bottom:8px;margin-bottom:7px;border-bottom:1px solid #ffffff12;letter-spacing:1px; }
.health-head span { color:#6f766a; }
.health-head b { color:var(--lime);font-size:8px;letter-spacing:.8px; }
.health-grid { display:grid;grid-template-columns:1fr auto;gap:5px 14px;align-items:center; }
.health-grid span { color:#737a6e; }
.health-grid strong { color:#e6e9e1;text-align:right;font-weight:700; }
.health-panel>small { display:block;margin-top:8px;padding-top:7px;border-top:1px solid #ffffff0d;color:#555c51;font-size:7px;letter-spacing:.5px; }
@media(max-width:620px){.health-panel{top:12px;right:12px;width:210px;padding:9px 10px}.health-grid{gap:4px 10px}.health-panel>small{display:none}}


/* Live upstream stream-health indicator. Uses real data progress + buffer state. */
.upstream-indicator { position:absolute;top:15px;right:15px;z-index:4;display:flex;align-items:center;gap:8px;min-width:112px;padding:7px 9px;border:1px solid #ffffff1a;border-radius:9px;background:#10120fda;backdrop-filter:blur(10px);box-shadow:0 8px 24px #0005;font-family:monospace;pointer-events:none; }
.upstream-bars { height:18px;display:flex;align-items:flex-end;gap:2px; }
.upstream-bars i { display:block;width:3px;border-radius:2px;background:#3d433a;transition:height .2s,background .2s,opacity .2s; }
.upstream-bars i:nth-child(1){height:5px}.upstream-bars i:nth-child(2){height:8px}.upstream-bars i:nth-child(3){height:12px}.upstream-bars i:nth-child(4){height:16px}
.upstream-copy { display:flex;flex-direction:column;gap:1px;line-height:1; }
.upstream-copy small { color:#697064;font-size:6px;font-weight:700;letter-spacing:1px; }
.upstream-copy strong { color:#dadfd5;font-size:8px;letter-spacing:.7px; }
.upstream-indicator[data-level="0"] .upstream-bars i { background:#5a3b39;opacity:.45; }
.upstream-indicator[data-level="0"] .upstream-copy strong { color:#ba7771; }
.upstream-indicator[data-level="1"] .upstream-bars i:nth-child(1) { background:var(--lime); }
.upstream-indicator[data-level="2"] .upstream-bars i:nth-child(-n+2) { background:var(--lime); }
.upstream-indicator[data-level="3"] .upstream-bars i:nth-child(-n+3) { background:var(--lime); }
.upstream-indicator[data-level="4"] .upstream-bars i { background:var(--lime); }
.upstream-indicator[data-level="4"] { box-shadow:0 8px 24px #0005,0 0 20px #c7ff3512; }
.health-panel { top:54px; }
@media(max-width:620px){.upstream-indicator{top:11px;right:11px;min-width:96px;padding:6px 8px;gap:6px}.upstream-copy small{display:none}.upstream-copy strong{font-size:7px}.health-panel{top:49px}}

/* Always-visible compact player-health HUD. */
.health-overlay {
  position:absolute;
  z-index:4;
  top:54px;
  left:15px;
  right:15px;
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:5px;
  pointer-events:none;
}
.health-overlay>span {
  min-width:74px;
  padding:6px 8px;
  border:1px solid #ffffff18;
  border-radius:8px;
  background:#0d0f0ccb;
  backdrop-filter:blur(9px);
  box-shadow:0 6px 18px #0004;
  font-family:monospace;
  line-height:1.05;
}
.health-overlay small {
  display:block;
  margin-bottom:3px;
  color:#656c61;
  font-size:6px;
  font-weight:800;
  letter-spacing:.8px;
}
.health-overlay strong {
  display:block;
  color:#e6e9e1;
  font-size:8px;
  font-weight:800;
  white-space:nowrap;
}
.health-overlay>span:first-child strong { color:var(--lime); }
/* Keep the optional full diagnostics panel clear of the always-visible HUD. */
.health-panel { top:100px; }
@media(max-width:620px){
  .health-overlay{top:48px;left:10px;right:10px;gap:4px}
  .health-overlay>span{min-width:58px;padding:5px 6px}
  .health-overlay small{font-size:5px}
  .health-overlay strong{font-size:7px}
  .health-panel{top:96px}
}


/* HUD visibility hardening — build 20260718-hudfix1 */
.video-frame > .upstream-indicator {
  display:flex !important;
  visibility:visible !important;
  opacity:1 !important;
  position:absolute !important;
  top:14px !important;
  right:14px !important;
  z-index:50 !important;
  min-width:132px;
  padding:9px 11px;
  background:rgba(8,11,7,.92);
  border-color:rgba(199,255,53,.28);
  box-shadow:0 8px 28px rgba(0,0,0,.7),0 0 0 1px rgba(255,255,255,.03);
}
.video-frame > .upstream-indicator .upstream-copy small { font-size:7px; }
.video-frame > .upstream-indicator .upstream-copy strong { font-size:10px; }

.video-frame > .health-overlay {
  display:flex !important;
  visibility:visible !important;
  opacity:1 !important;
  position:absolute !important;
  left:14px !important;
  right:auto !important;
  top:auto !important;
  bottom:66px !important;
  z-index:50 !important;
  max-width:calc(100% - 28px);
  flex-wrap:wrap;
  gap:6px;
}
.video-frame > .health-overlay > span {
  min-width:82px;
  padding:7px 9px;
  background:rgba(8,11,7,.9);
  border-color:rgba(255,255,255,.14);
  box-shadow:0 7px 22px rgba(0,0,0,.65);
}
.video-frame > .health-overlay small { font-size:7px; color:#81887b; }
.video-frame > .health-overlay strong { font-size:10px; }

@media(max-width:620px){
  .video-frame > .upstream-indicator{top:9px !important;right:9px !important;min-width:104px;padding:7px 8px}
  .video-frame > .upstream-indicator .upstream-copy strong{font-size:8px}
  .video-frame > .health-overlay{left:9px !important;bottom:58px !important;max-width:calc(100% - 18px);gap:4px}
  .video-frame > .health-overlay > span{min-width:64px;padding:5px 6px}
  .video-frame > .health-overlay small{font-size:5px}
  .video-frame > .health-overlay strong{font-size:7px}
}


/* Player status bar — metrics below video, upstream on the right. */
.player-status-bar {
  margin-top:12px;
  display:flex;
  align-items:stretch;
  gap:10px;
  width:100%;
}
.player-status-bar > .health-overlay {
  position:static !important;
  inset:auto !important;
  z-index:auto !important;
  display:flex !important;
  visibility:visible !important;
  opacity:1 !important;
  flex:1 1 auto;
  min-width:0;
  max-width:none;
  flex-wrap:wrap;
  align-items:stretch;
  gap:6px;
  pointer-events:none;
  padding:8px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#11130f;
  box-shadow:0 10px 28px #0004;
}
.player-status-bar > .health-overlay > span {
  min-width:82px;
  flex:1 1 82px;
  padding:7px 9px;
  border:1px solid #ffffff10;
  border-radius:8px;
  background:#171a15;
  box-shadow:none;
  font-family:monospace;
  line-height:1.05;
}
.player-status-bar > .health-overlay small {
  display:block;
  margin-bottom:3px;
  color:#6f766a;
  font-size:6px;
  font-weight:800;
  letter-spacing:.8px;
}
.player-status-bar > .health-overlay strong {
  display:block;
  color:#e6e9e1;
  font-size:9px;
  font-weight:800;
  white-space:nowrap;
}
.player-status-bar > .health-overlay > span:first-child strong { color:var(--lime); }

.player-status-bar > .upstream-indicator {
  position:static !important;
  inset:auto !important;
  z-index:auto !important;
  display:flex !important;
  visibility:visible !important;
  opacity:1 !important;
  flex:0 0 auto;
  align-items:center;
  justify-content:center;
  gap:10px;
  min-width:150px;
  padding:10px 14px;
  border:1px solid rgba(199,255,53,.22);
  border-radius:12px;
  background:#11130f;
  backdrop-filter:none;
  box-shadow:0 10px 28px #0004;
  font-family:monospace;
  pointer-events:none;
}
.player-status-bar > .upstream-indicator .upstream-copy small { font-size:7px; }
.player-status-bar > .upstream-indicator .upstream-copy strong { font-size:10px; }

/* Optional detailed debug panel remains on the video only when enabled. */
.video-frame > .health-panel { top:15px; right:15px; }

@media(max-width:760px) {
  .player-status-bar { align-items:stretch; }
  .player-status-bar > .health-overlay { padding:6px; gap:4px; }
  .player-status-bar > .health-overlay > span { min-width:68px; flex-basis:68px; padding:6px 7px; }
  .player-status-bar > .health-overlay small { font-size:5px; }
  .player-status-bar > .health-overlay strong { font-size:8px; }
  .player-status-bar > .upstream-indicator { min-width:116px; padding:8px 10px; gap:7px; }
  .player-status-bar > .upstream-indicator .upstream-copy small { font-size:6px; }
  .player-status-bar > .upstream-indicator .upstream-copy strong { font-size:8px; }
}

@media(max-width:520px) {
  .player-status-bar { flex-wrap:wrap; }
  .player-status-bar > .health-overlay { flex-basis:100%; }
  .player-status-bar > .upstream-indicator { margin-left:auto; min-width:132px; }
}


/* V11 Professional player controls, clean metrics, and live latency. */
.video-frame { cursor:default; }
.controls {
  z-index:60;
  padding:8px;
  left:12px;
  right:12px;
  bottom:10px;
  border:1px solid #ffffff12;
  border-radius:14px;
  background:linear-gradient(180deg,rgba(14,16,12,.58),rgba(9,10,8,.9));
  backdrop-filter:blur(14px);
  box-shadow:0 12px 34px rgba(0,0,0,.42);
  transition:opacity .22s ease,transform .22s ease;
}
.video-frame.controls-hidden .controls { opacity:0;transform:translateY(10px);pointer-events:none; }
.video-frame.controls-hidden { cursor:none; }
.controls button { width:38px;height:38px;background:#171a15e8;border-color:#ffffff14; }
.controls button:first-child { background:var(--lime); }
.controls .live-control {
  width:auto;
  min-width:105px;
  padding:0 11px;
  display:flex;
  grid-template-columns:none;
  align-items:center;
  justify-content:center;
  gap:7px;
  color:#f0f4ea;
  font:800 9px/1 monospace;
  letter-spacing:.25px;
}
.live-control i { width:7px;height:7px;border-radius:50%;background:#ff4f52;box-shadow:0 0 10px #ff4f5299; }
.live-control.is-live-edge { border-color:#c7ff3545;background:#192016e8;color:var(--lime); }
.live-control.is-live-edge i { background:var(--lime);box-shadow:0 0 10px #c7ff3599; }
.volume-wrap { width:78px;padding:0 5px;display:flex;align-items:center; }
.volume-wrap input { width:100%;accent-color:var(--lime);cursor:pointer; }
.quality { margin:0 3px 0 0; }
.quality b { min-width:48px;padding:7px 8px;background:#22271d;color:var(--lime);border:1px solid #c7ff3530; }

.player-status-bar { align-items:center; }
.status-summary {
  flex:1 1 auto;
  min-width:0;
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:6px;
  padding:8px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#11130f;
  box-shadow:0 10px 28px #0004;
}
.status-summary>span {
  min-height:38px;
  padding:7px 10px;
  border:1px solid #ffffff0d;
  border-radius:8px;
  background:#171a15;
  display:flex;
  flex-direction:column;
  justify-content:center;
  min-width:78px;
}
.status-summary small { color:#6f766a;font:800 6px/1 monospace;letter-spacing:.8px;margin-bottom:4px; }
.status-summary strong { color:#e6e9e1;font:800 9px/1 monospace;white-space:nowrap; }
.status-summary .summary-live { min-width:auto;flex-direction:row;align-items:center;gap:7px;color:var(--lime); }
.status-summary .summary-live i { width:7px;height:7px;border-radius:50%;background:var(--lime);box-shadow:0 0 10px var(--lime); }
.status-summary .summary-live strong { color:var(--lime); }
.player-status-bar > .upstream-indicator { min-height:56px; }
.stats-toggle {
  min-height:56px;
  min-width:78px;
  padding:0 13px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#11130f;
  color:#9ea59a;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  font:800 9px/1 monospace;
  cursor:pointer;
}
.stats-toggle svg { width:16px;height:16px; }
.stats-toggle:hover,.stats-toggle.active { color:var(--lime);border-color:#c7ff3538;background:#171c13; }
.health-details { margin-top:8px; }
.health-details[hidden] { display:none!important; }
.health-details > .health-overlay {
  position:static!important;
  inset:auto!important;
  display:grid!important;
  grid-template-columns:repeat(6,minmax(90px,1fr));
  gap:6px;
  padding:8px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#0f110e;
  box-shadow:0 10px 28px #0003;
  pointer-events:none;
  max-width:none;
}
.health-details > .health-overlay > span {
  min-width:0;
  padding:8px 9px;
  border:1px solid #ffffff0d;
  border-radius:8px;
  background:#171a15;
  box-shadow:none;
  font-family:monospace;
}
.health-details > .health-overlay small { display:block;margin-bottom:4px;color:#6f766a;font-size:6px;font-weight:800;letter-spacing:.8px; }
.health-details > .health-overlay strong { display:block;color:#e6e9e1;font-size:9px;font-weight:800;white-space:nowrap; }
.health-details > .health-overlay > span:first-child strong { color:var(--lime); }

.latency { min-width:86px; }
.latency span { margin-bottom:4px; }
.latency strong { color:var(--lime);font:800 11px/1 monospace; }

@media(max-width:760px){
  .volume-wrap{width:58px}
  .controls .live-control{min-width:90px;padding:0 8px;font-size:8px}
  .health-details > .health-overlay{grid-template-columns:repeat(3,minmax(78px,1fr))}
  .status-summary>span{min-width:65px;padding:6px 8px}
  .stats-toggle{min-width:66px;padding:0 9px}
}
@media(max-width:560px){
  .controls{left:7px;right:7px;bottom:7px;padding:6px;gap:3px}
  .controls button{width:34px;height:34px;border-radius:9px}
  .volume-wrap{display:none}
  .controls .live-control{min-width:82px;padding:0 6px;font-size:7px}
  .quality b{min-width:42px;padding:6px;font-size:8px}
  .player-status-bar{flex-wrap:wrap;gap:7px}
  .status-summary{flex-basis:100%}
  .player-status-bar > .upstream-indicator{margin-left:0;min-width:132px;min-height:48px}
  .stats-toggle{margin-left:auto;min-height:48px}
  .health-details > .health-overlay{grid-template-columns:repeat(2,minmax(76px,1fr))}
}


/* V12 Mobile Landscape + Stretch Wide + Live Seek -------------------------- */
.video-frame > video {
  position:relative;
  z-index:1;
  display:block;
  object-fit:contain;
  background:#050604;
  transition:object-fit .12s ease;
}
.video-frame.wide-stretch > video {
  width:100%;
  height:100%;
  object-fit:fill;
}
.video-frame:after { z-index:2; }
.video-state { z-index:20; }
.live-badge { z-index:25; }
.health-panel { z-index:70; }

/* Timeline sits on its own first row inside the professional control bar. */
.controls { flex-wrap:wrap; }
.seek-row {
  flex:0 0 100%;
  min-width:0;
  display:grid;
  grid-template-columns:42px minmax(70px,1fr) 42px;
  align-items:center;
  gap:8px;
  padding:0 4px 2px;
  user-select:none;
}
.seek-time {
  color:#d9ddd4;
  font:800 8px/1 monospace;
  letter-spacing:.15px;
  text-align:left;
  white-space:nowrap;
  font-variant-numeric:tabular-nums;
}
.seek-duration { text-align:right;color:#a5ad9d; }
.seek-bar {
  width:100%;
  height:16px;
  margin:0;
  padding:0;
  cursor:pointer;
  accent-color:var(--lime);
  background:transparent;
}
.seek-bar:disabled { cursor:default;opacity:.55; }
.seek-bar::-webkit-slider-runnable-track {
  height:4px;
  border-radius:999px;
  background:linear-gradient(to right,var(--lime) 0 var(--seek-progress,100%),#ffffff2a var(--seek-progress,100%) 100%);
}
.seek-bar::-webkit-slider-thumb {
  -webkit-appearance:none;
  width:13px;height:13px;
  margin-top:-4.5px;
  border:2px solid #14170f;
  border-radius:50%;
  background:var(--lime);
  box-shadow:0 0 0 2px #c7ff3535,0 0 12px #c7ff3540;
}
.seek-bar::-moz-range-track { height:4px;border-radius:999px;background:#ffffff2a; }
.seek-bar::-moz-range-progress { height:4px;border-radius:999px;background:var(--lime); }
.seek-bar::-moz-range-thumb { width:11px;height:11px;border:2px solid #14170f;border-radius:50%;background:var(--lime); }

/* Distinct from the square fullscreen button: a small horizontal WIDE pill. */
.controls button.wide-toggle {
  display:none;
  width:auto;
  min-width:72px;
  padding:0 10px;
  grid-template-columns:auto auto;
  align-items:center;
  justify-content:center;
  gap:6px;
  border-radius:999px;
  border-color:#7c8b6929;
  background:#1b2018e8;
  color:#aeb8a4;
  font:800 8px/1 monospace;
  letter-spacing:.55px;
}
.controls button.wide-toggle svg { width:16px;height:16px; }
.controls button.wide-toggle:hover,
.controls button.wide-toggle.active {
  color:var(--lime);
  border-color:#c7ff3550;
  background:#1b2416ef;
  box-shadow:inset 0 0 0 1px #c7ff3512,0 0 18px #c7ff350d;
}

/* Mobile/coarse-pointer only. It remains visible in landscape fullscreen. */
@media (hover:none) and (pointer:coarse) {
  .controls button.wide-toggle { display:flex; }
  .video-frame:fullscreen,
  .video-frame:-webkit-full-screen {
    width:100vw;
    height:100vh;
    max-width:none;
    max-height:none;
    aspect-ratio:auto;
    border:0;
    border-radius:0;
    background:#000;
  }
  .video-frame:fullscreen > video,
  .video-frame:-webkit-full-screen > video { width:100%;height:100%; }
}

@media (hover:none) and (pointer:coarse) and (orientation:landscape) {
  .controls {
    left:max(8px,env(safe-area-inset-left));
    right:max(8px,env(safe-area-inset-right));
    bottom:max(8px,env(safe-area-inset-bottom));
  }
  .seek-row { grid-template-columns:40px minmax(90px,1fr) 40px; }
}

@media(max-width:560px){
  .controls button.wide-toggle{min-width:58px;padding:0 7px;gap:4px;font-size:7px}
  .controls button.wide-toggle svg{width:14px;height:14px}
  .seek-row{grid-template-columns:38px minmax(52px,1fr) 38px;gap:5px;padding:0 2px 1px}
  .seek-time{font-size:7px}
}


/* V13 Mobile controls: no seek bar, bold playing time, responsive layout. */
.playing-time {
  flex:0 0 auto;
  min-width:52px;
  padding:0 7px;
  color:#f2f5ee;
  font:900 10px/1 monospace;
  letter-spacing:.2px;
  text-align:center;
  white-space:nowrap;
  font-variant-numeric:tabular-nums;
  text-shadow:0 1px 8px #000;
}

/* Seek UI removed in V13. */
.seek-row,.seek-bar,.seek-time,.seek-duration { display:none!important; }
.controls { flex-wrap:nowrap; }

/* On touch devices, do not let a sticky :hover state impersonate WIDE active. */
@media (hover:none) and (pointer:coarse) {
  .controls button.wide-toggle:not(.active):hover,
  .controls button.wide-toggle:not(.active):focus {
    color:#aeb8a4;
    border-color:#7c8b6929;
    background:#1b2018e8;
    box-shadow:none;
  }
  .controls button.wide-toggle.active,
  .controls button.wide-toggle.active:hover,
  .controls button.wide-toggle.active:focus {
    color:var(--lime);
    border-color:#c7ff3550;
    background:#1b2416ef;
    box-shadow:inset 0 0 0 1px #c7ff3512,0 0 18px #c7ff350d;
  }
}

/* Mobile control bar stays on one row and scales by available width. */
@media (hover:none) and (pointer:coarse) and (max-width:900px) {
  .controls {
    left:max(6px,env(safe-area-inset-left));
    right:max(6px,env(safe-area-inset-right));
    bottom:max(6px,env(safe-area-inset-bottom));
    padding:5px;
    gap:4px;
    min-width:0;
    overflow:hidden;
  }
  .controls button {
    flex:0 0 34px;
    width:34px;
    height:34px;
    min-width:0;
    border-radius:9px;
  }
  .volume-wrap { display:none; }
  .playing-time { min-width:46px;padding:0 4px;font-size:9px; }
  .controls .live-control {
    flex:0 1 auto;
    width:auto;
    min-width:78px;
    height:34px;
    padding:0 7px;
    gap:5px;
    font-size:7px;
  }
  .control-spacer { flex:1 1 6px;min-width:0; }
  .quality { flex:0 0 auto;margin:0; }
  .quality b { min-width:40px;padding:6px 5px;font-size:8px; }
  .controls button.wide-toggle {
    flex:0 0 auto;
    min-width:56px;
    height:34px;
    padding:0 7px;
    gap:4px;
    font-size:7px;
  }
}

@media (hover:none) and (pointer:coarse) and (max-width:520px) {
  .controls { padding:4px;gap:2px; }
  .controls button { flex-basis:30px;width:30px;height:30px;border-radius:8px; }
  .controls svg { width:15px;height:15px; }
  .playing-time { min-width:40px;padding:0 2px;font-size:8px; }
  .controls .live-control { min-width:64px;height:30px;padding:0 5px;gap:4px;font-size:6.5px; }
  .live-control i { width:6px;height:6px; }
  .quality b { min-width:35px;padding:5px 4px;font-size:7px; }
  .controls button.wide-toggle { min-width:48px;height:30px;padding:0 5px;font-size:6.5px; }
  .controls button.wide-toggle svg { width:13px;height:13px; }
  #pip { display:none; }
}

@media (hover:none) and (pointer:coarse) and (orientation:landscape) and (max-height:520px) {
  .controls {
    left:max(7px,env(safe-area-inset-left));
    right:max(7px,env(safe-area-inset-right));
    bottom:max(6px,env(safe-area-inset-bottom));
    padding:5px 6px;
  }
  .playing-time { font-size:9px; }
}


/* V16 fully dynamic channel directory */
.channel-nav { display:block; }
.home-page { min-height:100vh; background:#0a0b09; color:var(--ink); }
.home-main { min-height:100vh; }
.home-topbar { position:sticky; top:0; z-index:100; }
.channel-directory { width:min(1280px,calc(100% - 40px)); margin:0 auto; padding:52px 0 70px; }
.directory-head { display:flex; align-items:flex-end; justify-content:space-between; gap:24px; margin-bottom:28px; }
.directory-head h1 { margin:8px 0 7px; font-size:clamp(30px,5vw,54px); line-height:1; letter-spacing:-1.5px; }
.directory-head p { margin:0; color:var(--muted); font-size:13px; }
.channel-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:18px; }
.channel-card { display:block; min-width:0; overflow:hidden; border:1px solid var(--line); border-radius:18px; background:#11130f; color:inherit; text-decoration:none; box-shadow:0 18px 40px #0003; transition:transform .2s ease,border-color .2s ease,box-shadow .2s ease; }
.channel-card:hover { transform:translateY(-3px); border-color:#c7ff3550; box-shadow:0 22px 50px #0006,0 0 28px #c7ff3508; }
.channel-card-media { position:relative; aspect-ratio:16/9; overflow:hidden; background:linear-gradient(135deg,#11150d,#252e19); }
.channel-card-media img { position:absolute; inset:0; z-index:1; width:100%; height:100%; object-fit:cover; }
.channel-card-fallback { position:absolute; inset:0; display:grid; place-items:center; color:#c7ff351d; font:900 clamp(70px,10vw,140px)/1 monospace; }
.channel-card-media::after { content:""; position:absolute; inset:0; z-index:2; background:linear-gradient(180deg,transparent 45%,#070907bb 100%); }
.stream-status-badge { position:absolute; z-index:4; top:13px; left:13px; display:inline-flex; align-items:center; gap:7px; min-height:29px; padding:0 10px; border:1px solid #ffffff20; border-radius:999px; background:#11140ee8; backdrop-filter:blur(9px); font:800 9px/1 monospace; letter-spacing:.7px; box-shadow:0 8px 22px #0006; }
.stream-status-badge i { width:7px; height:7px; border-radius:50%; background:#7b8176; }
.stream-status-badge.is-checking i { animation:statusPulse 1s infinite; }
.stream-status-badge.is-live { color:var(--lime); border-color:#c7ff3548; }
.stream-status-badge.is-live i { background:var(--lime); box-shadow:0 0 10px #c7ff35a0; }
.stream-status-badge.is-offline { color:#ff8a83; border-color:#ff655740; }
.stream-status-badge.is-offline i { background:#ff6557; box-shadow:0 0 9px #ff655770; }
.channel-card-play { position:absolute; z-index:4; right:14px; bottom:14px; display:grid; place-items:center; width:42px; height:42px; border:1px solid #ffffff20; border-radius:50%; background:#c7ff35; color:#0a0c08; box-shadow:0 10px 24px #0007; }
.channel-card-play svg { width:19px; fill:currentColor; }
.channel-card-body { display:grid; gap:5px; padding:16px 17px 18px; }
.channel-card-body span { color:var(--lime); font:800 8px/1 monospace; letter-spacing:1.1px; }
.channel-card-body strong { font-size:17px; }
.channel-card-body small { color:var(--muted); font-size:10px; }
.channel-grid-loading,.channel-grid-empty { grid-column:1/-1; min-height:220px; display:flex; align-items:center; justify-content:center; gap:12px; border:1px dashed var(--line); border-radius:18px; color:var(--muted); background:#10120e; }
.directory-footnote { margin:22px 0 0; color:#5f665a; font-size:10px; text-align:center; }
.signal.is-live { color:var(--lime); }
.signal.is-live i { background:var(--lime); box-shadow:0 0 10px #c7ff3590; }
.signal.is-offline { color:#ff8a83; }
.signal.is-offline i { background:#ff6557; box-shadow:0 0 10px #ff655770; }
.refresh:disabled { opacity:.55; cursor:wait; }

@media(max-width:960px){
  .channel-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:680px){
  .channel-directory{width:min(100% - 24px,1280px);padding:30px 0 50px}
  .directory-head{align-items:flex-start;flex-direction:column}
  .directory-head .refresh{width:100%;justify-content:center}
  .channel-grid{grid-template-columns:1fr;gap:14px}
}

@keyframes statusPulse { 0%,100%{opacity:.35;transform:scale(.8)} 50%{opacity:1;transform:scale(1.15)} }

/* SQLite admin-enabled public components */
.avatar{display:grid;place-items:center;text-decoration:none}
.site-notice{display:flex;align-items:center;gap:12px;margin:14px auto;padding:12px 16px;max-width:1400px;border:1px solid #2f3a28;border-radius:10px;background:#151a13;color:#dfe5d8;font-size:13px}.site-notice strong{white-space:nowrap}.site-notice span{color:#aeb6a7}.notice-warning{border-color:#645126;background:#241e10}.notice-danger{border-color:#663030;background:#261414}.notice-success{border-color:#2e5e3c;background:#132218}.ad-slot{position:relative;width:min(1180px,calc(100% - 32px));margin:16px auto;padding:10px;border:1px solid #272e23;border-radius:12px;background:#10130f;text-align:center;overflow:hidden}.ad-slot>small{display:block;margin-bottom:7px;color:#596153;font-size:7px;font-weight:900;letter-spacing:1.2px}.ad-slot img{display:block;max-width:100%;max-height:220px;margin:auto;object-fit:contain}.ad-slot a{display:block}.ad-text{display:block;padding:18px;color:#e8ede2;font-weight:800}.video-frame>.ad-player-overlay{position:absolute;z-index:34;left:50%;bottom:76px;transform:translateX(-50%);width:min(520px,calc(100% - 34px));margin:0;background:rgba(10,13,9,.94);box-shadow:0 14px 45px #0009}.video-frame>.ad-player-overlay img{max-height:90px}.site-footer{display:flex;justify-content:space-between;gap:20px;padding:20px 2px 34px;color:#71796b;font-size:12px}.content-page{max-width:980px;margin:42px auto;padding:32px;border:1px solid var(--line);border-radius:16px;background:#11140f}.content-page h1{margin-top:0;font-size:38px}.prose{color:#c9cec4;line-height:1.75}.prose a{color:var(--lime)}.prose img{max-width:100%}.maintenance-page{min-height:100vh;display:grid;place-items:center;padding:24px;background:#0b0e0a}.maintenance-card{width:min(620px,100%);padding:42px;border:1px solid #2b3326;border-radius:18px;background:#121610;text-align:center}.maintenance-card h1{font-size:40px;margin:0 0 12px}.maintenance-card p{color:#a8b0a1;line-height:1.6}.maintenance-card small{display:block;margin-top:18px;color:var(--lime)}
@media(max-width:700px){.site-notice{align-items:flex-start;flex-direction:column}.site-footer{flex-direction:column}.content-page{margin:22px 12px;padding:22px}.video-frame>.ad-player-overlay{bottom:62px}.ad-slot{width:calc(100% - 20px)}}
.player-watermark{position:absolute;z-index:33;max-width:140px;max-height:70px;object-fit:contain;pointer-events:none;opacity:.82}.watermark-top-left{top:18px;left:18px}.watermark-top-right{top:18px;right:18px}.watermark-bottom-left{bottom:78px;left:18px}.watermark-bottom-right{bottom:78px;right:18px}.ad-close{position:absolute;top:6px;right:6px;padding:5px 8px;border:1px solid #ffffff24;border-radius:7px;background:#090b08dd;color:#fff;font-size:10px;cursor:pointer}.ad-close:disabled{opacity:.55;cursor:not-allowed}
.brand-image{display:block;max-width:150px;max-height:42px;object-fit:contain}.brand picture{display:flex;align-items:center}.brand-name{white-space:nowrap}.footer-links{display:flex;flex-wrap:wrap;gap:12px}.footer-links a{color:#90998a;text-decoration:none}.footer-links a:hover{color:var(--lime)}
.ad-video{display:block;width:min(100%,720px);max-height:280px;margin:auto;background:#000}.video-frame>.ad-player-preroll,.video-frame>.ad-player-pause,.video-frame>.ad-player-postroll{position:absolute;z-index:35;inset:50% auto auto 50%;transform:translate(-50%,-50%);width:min(620px,calc(100% - 30px));margin:0;background:rgba(8,10,7,.96);box-shadow:0 20px 60px #000c}.sidebar>.ad-sidebar{width:100%;margin:16px 0}.ad-mobile-sticky{display:none}.ad-desktop-floating{position:fixed;z-index:80;right:18px;bottom:18px;width:min(340px,calc(100% - 36px));margin:0;box-shadow:0 18px 55px #000b}.ad-footer{margin-top:20px}@media(max-width:700px){.ad-desktop-floating{display:none}.ad-mobile-sticky{display:block;position:fixed;z-index:80;left:8px;right:8px;bottom:8px;width:auto;margin:0;box-shadow:0 15px 45px #000c}.video-frame>.ad-player-preroll,.video-frame>.ad-player-pause,.video-frame>.ad-player-postroll{width:calc(100% - 18px)}}
