@import url('https://fonts.googleapis.com/css2?family=Michroma&family=Oswald:wght@400;600&family=Archivo+Narrow:wght@400;600;700&family=Barlow+Condensed:wght@400;600&family=VT323&family=Atkinson+Hyperlegible:wght@400;700&display=swap');
:root{
  --bg:#0a0e14;
  --panel:#121821;
  --panel-2:#1b2330;
  --accent:#ff6b35;
  --accent-2:#ffd166;
  --accent-contrast:#080500;
  --text:#e6e6e6;
  --muted:#8a93a3;
  --border:#1f2633;
  --button:#1b2330;
  --active-bg:#2a1f1a;
  --input-bg:#0a0e14;
  --topbar-bg:#121821;
  --guide-bg:#0d1622;
  --guide-panel:#121f2f;
  --guide-line:#1f3348;
  --guide-alt:#0f1d2c;
  --guide-hover:#16283b;
  --guide-active:#17324a;
  --guide-accent:#ffd166;
  --guide-text:#e6e6e6;
  --guide-muted:#8a93a3;
  --premium-num:#ffd166;
  --premium-name:#ffe9b0;
  --bezel:#202b3a;
  --bezel-size:10px;
  --frame-radius:8px;
  --tube-radius:30px / 22px;
  --button-radius:6px;
  --font:system-ui,sans-serif;
  --brand-font:system-ui,sans-serif;
  --guide-font:system-ui,sans-serif;
}

body[data-era="90s"]{
  --bg:#0a0a5e;
  --panel:#1e1e8c;
  --panel-2:#2a2ab0;
  --accent:#ffd700;
  --accent-2:#5fb8ff;
  --accent-contrast:#0a0a5e;
  --text:#ffffff;
  --muted:#c0c0ff;
  --border:#3a3ad0;
  --button:#1e1e8c;
  --active-bg:#2a2ab0;
  --input-bg:#05054a;
  --topbar-bg:linear-gradient(180deg,#1e1e8c,#0a0a5e 65%,#0a0a5e);
  --guide-bg:#0a0a5e;
  --guide-panel:#1e1e8c;
  --guide-line:#3a3ad0;
  --guide-alt:#0d0d6e;
  --guide-hover:#2a2ab0;
  --guide-active:#3a3ad0;
  --guide-accent:#ffd700;
  --guide-text:#ffffff;
  --guide-muted:#c0c0ff;
  --premium-num:#5fb8ff;
  --premium-name:#ffffff;
  --bezel:#3a3ad0;
  --bezel-size:8px;
  --tube-radius:26px / 20px;
  --button-radius:2px;
  --font:Arial,Helvetica,sans-serif;
  --brand-font:Arial,Helvetica,sans-serif;
  --guide-font:Arial,Helvetica,sans-serif;
  background:radial-gradient(circle at 50% 0%,#1e1e8c 0%,#0a0a5e 62%);
}

body[data-era="80s"]{
  --bg:#000000;
  --panel:#0a0a0a;
  --panel-2:#141414;
  --accent:#ffffff;
  --accent-2:#00e5ff;
  --accent-contrast:#000000;
  --text:#ffffff;
  --muted:#b0b0b0;
  --border:#333333;
  --button:#0a0a0a;
  --active-bg:#1a1a1a;
  --input-bg:#000000;
  --topbar-bg:#0a0a0a;
  --guide-bg:#000000;
  --guide-panel:#0a0a0a;
  --guide-line:#2a2aff;
  --guide-alt:#050505;
  --guide-hover:#1a1a1a;
  --guide-active:#222222;
  --guide-accent:#ffffff;
  --guide-text:#ffffff;
  --guide-muted:#b0b0b0;
  --premium-num:#5fb8ff;
  --premium-name:#ffffff;
  --bezel:#333333;
  --bezel-size:8px;
  --tube-radius:26px / 20px;
  --button-radius:2px;
  --font:"PrevueGrid","Amiga Topaz","VT323",monospace;
  --brand-font:"PrevueGrid","Amiga Topaz","VT323",monospace;
  --guide-font:"PrevueGrid","Amiga Topaz","VT323",monospace;
  background:#000000;
}
body[data-era="80s"] .guide-banner{background:#000000}
body[data-era="80s"] .guide-ch{color:#ffffff} body[data-era="80s"] .guide-call{color:#ffffff}

body[data-era="midnight"]{
  --bg:#0000a0;
  --panel:#0a0a8a;
  --panel-2:#1e40c8;
  --accent:#ffd800;
  --accent-2:#ff7f9e;
  --accent-contrast:#0000a0;
  --text:#ffffff;
  --muted:#b0b0ff;
  --border:#2a2ad0;
  --button:#0a0a8a;
  --active-bg:#1e40c8;
  --input-bg:#000060;
  --topbar-bg:linear-gradient(180deg,#1e40c8,#0000a0 65%,#000060);
  --guide-bg:#0000a0;
  --guide-panel:#0a0a8a;
  --guide-line:#2a2ad0;
  --guide-alt:#000088;
  --guide-hover:#1e40c8;
  --guide-active:#2a2ad0;
  --guide-accent:#ffd800;
  --guide-text:#ffffff;
  --guide-muted:#b0b0ff;
  --premium-num:#ff7f9e;
  --premium-name:#ffffff;
  --bezel:#2a2ad0;
  --bezel-size:8px;
  --tube-radius:24px / 18px;
  --button-radius:10px;
  --font:"Eurostile","Michroma","Segoe UI",sans-serif;
  --brand-font:"Eurostile","Michroma","Segoe UI",sans-serif;
  --guide-font:"Eurostile","Michroma",Arial,sans-serif;
  background:radial-gradient(circle at 50% 0%,#1e40c8 0%,#0000a0 62%);
}
body[data-era="midnight"] .guide-banner{background:linear-gradient(100deg,#1e40c8,#0000a0 55%,#000060)}
body[data-era="midnight"] .guide-ch{color:#ffd800} body[data-era="midnight"] .guide-call{color:#ffffff}

body[data-era="2000s"]{
  --bg:#2e2600;
  --panel:#3a2f00;
  --panel-2:#4a3d00;
  --accent:#ffd800;
  --accent-2:#d00000;
  --accent-contrast:#2e2600;
  --text:#f5e9c8;
  --muted:#c8b880;
  --border:#5a4a00;
  --button:#3a2f00;
  --active-bg:#4a3d00;
  --input-bg:#1a1400;
  --topbar-bg:linear-gradient(180deg,#4a3d00,#2e2600 65%,#1a1400);
  --guide-bg:#ffd800;
  --guide-panel:#f5c800;
  --guide-line:#c8a800;
  --guide-alt:#ffe34d;
  --guide-hover:#ffe34d;
  --guide-active:#ffd34d;
  --guide-accent:#d00000;
  --guide-text:#111111;
  --guide-muted:#555555;
  --premium-num:#d00000;
  --premium-name:#f5e9c8;
  --bezel:#5a4a00;
  --bezel-size:8px;
  --tube-radius:26px / 20px;
  --button-radius:8px;
  --font:"Arial Narrow",Arial,sans-serif;
  --brand-font:"Arial Narrow",Arial,sans-serif;
  --guide-font:"Arial Narrow",Arial,sans-serif;
  background:radial-gradient(circle at 50% 0%,#3a2f00 0%,#2e2600 62%);
}

/* Four new themes (2026-11-03, fonts picked from Nick's
   satellite / digital-cable / scrolling-guide / international
   lists). Each theme's --font/--brand-font/--guide-font
   stacks name the listed font first, then the free web
   equivalent loaded above, then a system fallback — so if
   you have the listed font installed it is used, otherwise
   the closest web/system match is. */
/* Satellite — legacy DirecTV (RCA/Hughes): Eurostile Bold
   for numbers/headers, Futura Condensed for grid rows. */
body[data-era="satellite"]{
  --bg:#2e6da4;
  --panel:#1a4a7a;
  --panel-2:#2a5d8f;
  --accent:#ffd800;
  --accent-2:#37b24d;
  --accent-contrast:#1a4a7a;
  --text:#ffffff;
  --muted:#b0c8e0;
  --border:#4a7ab0;
  --button:#1a4a7a;
  --active-bg:#2a5d8f;
  --input-bg:#123a5e;
  --topbar-bg:linear-gradient(180deg,#2a5d8f,#1a4a7a 65%,#123a5e);
  --guide-bg:#2e6da4;
  --guide-panel:#1a4a7a;
  --guide-line:#4a7ab0;
  --guide-alt:#255a85;
  --guide-hover:#2a5d8f;
  --guide-active:#3a6da0;
  --guide-accent:#ffd800;
  --guide-text:#ffffff;
  --guide-muted:#b0c8e0;
  --premium-num:#ffd800;
  --premium-name:#ffffff;
  --bezel:#4a7ab0;
  --bezel-size:8px;
  --tube-radius:26px / 20px;
  --button-radius:6px;
  --font:Arial,Helvetica,sans-serif;
  --brand-font:Arial,Helvetica,sans-serif;
  --guide-font:Arial,Helvetica,sans-serif;
  background:radial-gradient(circle at 50% 0%,#2a5d8f 0%,#1a4a7a 62%);
}
body[data-era="satellite"] .guide-banner{background:linear-gradient(100deg,#2a5d8f,#2e6da4 55%,#123a5e)}
body[data-era="satellite"] .guide-ch{color:#ffd800}
body[data-era="satellite"] .guide-call{color:#ffffff}
/* Digital Cable — Gemstar / TV Guide Interactive i-Guide
   on Motorola boxes: Giles Sans, with Swiss 721 Condensed
   (Passport Echo) / Helvetica Condensed (SARA) for the
   tight grid blocks. */
body[data-era="cable"]{
  --bg:#001a4d;
  --panel:#0a2f7a;
  --panel-2:#1f4e9c;
  --accent:#ffd700;
  --accent-2:#9db8e8;
  --accent-contrast:#001a4d;
  --text:#ffffff;
  --muted:#9db8e8;
  --border:#2a4a8a;
  --button:#0a2f7a;
  --active-bg:#1f4e9c;
  --input-bg:#001033;
  --topbar-bg:linear-gradient(180deg,#0a2f7a,#001a4d 65%,#001033);
  --guide-bg:#001a4d;
  --guide-panel:#0a2f7a;
  --guide-line:#2a4a8a;
  --guide-alt:#00205e;
  --guide-hover:#1f4e9c;
  --guide-active:#2a5db0;
  --guide-accent:#ffd700;
  --guide-text:#ffffff;
  --guide-muted:#9db8e8;
  --premium-num:#ffd700;
  --premium-name:#ffffff;
  --bezel:#2a4a8a;
  --bezel-size:8px;
  --tube-radius:26px / 20px;
  --button-radius:4px;
  --font:"Helvetica Neue",Arial,sans-serif;
  --brand-font:"Helvetica Neue",Arial,sans-serif;
  --guide-font:"Helvetica Neue",Arial,sans-serif;
  background:radial-gradient(circle at 50% 0%,#0a2f7a 0%,#001a4d 62%);
}
body[data-era="cable"] .guide-banner{background:linear-gradient(100deg,#0a2f7a,#001a4d 55%,#001033)}
body[data-era="cable"] .guide-ch{color:#ffd700}
body[data-era="cable"] .guide-call{color:#ffffff}
/* Prevue — scrolling guide channel: PrevueGrid / PrevueC
   bitmap, Amiga Topaz, with VCR OSD Mono (Dish) as the
   readable terminal face for the same hardware look. */
body[data-era="prevue"]{
  --bg:#0a0a5e;
  --panel:#1e1e8c;
  --panel-2:#2a2ab0;
  --accent:#ffe34d;
  --accent-2:#00e5ff;
  --accent-contrast:#0a0a5e;
  --text:#ffffff;
  --muted:#c0c0ff;
  --border:#3a3ad0;
  --button:#1e1e8c;
  --active-bg:#2a2ab0;
  --input-bg:#05054a;
  --topbar-bg:#1e1e8c;
  --guide-bg:#0a0a5e;
  --guide-panel:#1e1e8c;
  --guide-line:#3a3ad0;
  --guide-alt:#0d0d6e;
  --guide-hover:#2a2ab0;
  --guide-active:#3a3ad0;
  --guide-accent:#ffe34d;
  --guide-text:#ffffff;
  --guide-muted:#c0c0ff;
  --premium-num:#5fb8ff;
  --premium-name:#ffffff;
  --bezel:#3a3ad0;
  --bezel-size:8px;
  --tube-radius:26px / 20px;
  --button-radius:2px;
  --font:"PrevueGrid","Amiga Topaz","VT323",monospace;
  --brand-font:"PrevueGrid","Amiga Topaz","VT323",monospace;
  --guide-font:"PrevueGrid","Amiga Topaz","VT323",monospace;
  background:#0a0a5e;
}
body[data-era="prevue"] .guide-banner{background:#0a0a5e}
body[data-era="prevue"] .guide-ch{color:#ffe34d}
body[data-era="prevue"] .guide-call{color:#ffffff}
body[data-era="prevue"] .guide-program{font-size:15px}
body[data-era="prevue"] .guide-program-title{font-size:15px}
/* Freeview / Teletext — Tiresias Screenfont (UK Freeview
   legibility standard) and Ceefax/Monoskop teletext, with
   Segoe TV and Gill Sans (BBC) as the other international
   faces in the same stack. */
body[data-era="freeview"]{
  --bg:#000000;
  --panel:#141414;
  --panel-2:#1e1e1e;
  --accent:#ffe600;
  --accent-2:#009600;
  --accent-contrast:#000000;
  --text:#ffffff;
  --muted:#b0b0b0;
  --border:#333333;
  --button:#141414;
  --active-bg:#009600;
  --input-bg:#000000;
  --topbar-bg:#111111;
  --guide-bg:#000000;
  --guide-panel:#009600;
  --guide-line:#006400;
  --guide-alt:#007a00;
  --guide-hover:#00b000;
  --guide-active:#00c800;
  --guide-accent:#ffe600;
  --guide-text:#ffffff;
  --guide-muted:#b0b0b0;
  --premium-num:#ffe600;
  --premium-name:#ffffff;
  --bezel:#333333;
  --bezel-size:8px;
  --tube-radius:26px / 20px;
  --button-radius:6px;
  --font:"Tiresias Screenfont","Atkinson Hyperlegible","Segoe TV","Segoe UI",sans-serif;
  --brand-font:"Tiresias Screenfont","Atkinson Hyperlegible","Segoe UI",sans-serif;
  --guide-font:"Tiresias Screenfont","Atkinson Hyperlegible","Gill Sans","Segoe UI",sans-serif;
  background:#000000;
}
body[data-era="freeview"] .guide-banner{background:linear-gradient(100deg,#009600,#000000 55%,#000000)}
body[data-era="freeview"] .guide-ch{color:#ffe600}
body[data-era="freeview"] .guide-call{color:#ffffff}

/* Provider themes (2026-11-04, Nick): 10 cable providers, Canadian first then US, in his list order.
   Each is a full variable set like the existing eras, so no variable falls back to another theme.
   Colours are inspired by each provider's on-screen digital-cable look (Rogers red, Shaw blue, etc.),
   not official brand guidelines. Era button cycles them after Freeview, in this order. */
body[data-era="rogers"]{
  --bg:#001a4d; --panel:#0a2f7a; --panel-2:#1f4e9c; --accent:#ffd700; --accent-2:#da291c; --accent-contrast:#001a4d;
  --text:#ffffff; --muted:#9db8e8; --border:#2a4a8a; --button:#0a2f7a; --active-bg:#1f4e9c; --input-bg:#001033;
  --topbar-bg:linear-gradient(180deg,#0a2f7a,#001a4d 65%,#001033);
  --guide-bg:#001a4d; --guide-panel:#0a2f7a; --guide-line:#2a4a8a; --guide-alt:#00205e; --guide-hover:#1f4e9c; --guide-active:#2a5db0;
  --guide-accent:#ffd700; --guide-text:#ffffff; --guide-muted:#9db8e8;
  --premium-num:#ffd700; --premium-name:#ffffff; --bezel:#2a4a8a; --bezel-size:6px; --tube-radius:18px / 14px; --button-radius:2px;
  --font:"Barlow Condensed",Arial,sans-serif; --brand-font:"Oswald",Arial,sans-serif; --guide-font:"Barlow Condensed",Arial,sans-serif;
  background:radial-gradient(circle at 50% 0%,#0a2f7a 0%,#001a4d 62%);
}
body[data-era="rogers"] .guide-banner{background:linear-gradient(100deg,#0a2f7a,#001a4d 55%,#001033)}
body[data-era="rogers"] .guide-ch{color:#ffd700} body[data-era="rogers"] .guide-call{color:#ffffff}
body[data-era="rogers"] .brand{color:#ff3b2e;text-shadow:1px 1px 0 #000;letter-spacing:3px} body[data-era="rogers"] .controls button{text-transform:uppercase;letter-spacing:.4px;border-radius:2px} body[data-era="rogers"] .badge{border-radius:1px} body[data-era="rogers"] .player-frame{box-shadow:0 0 0 1px #da291c,0 10px 30px rgba(0,0,0,.55)}
body[data-era="shaw"]{
  --bg:#0a2463; --panel:#122f6e; --panel-2:#2a5db0; --accent:#ffd800; --accent-2:#0090d4; --accent-contrast:#0a2463;
  --text:#ffffff; --muted:#a8c0e8; --border:#2a4a8a; --button:#122f6e; --active-bg:#2a5db0; --input-bg:#061633;
  --topbar-bg:linear-gradient(180deg,#122f6e,#0a2463 65%,#061633);
  --guide-bg:#0a2463; --guide-panel:#122f6e; --guide-line:#2a4a8a; --guide-alt:#0d2a70; --guide-hover:#2a5db0; --guide-active:#3a6dc0;
  --guide-accent:#ffd800; --guide-text:#ffffff; --guide-muted:#a8c0e8;
  --premium-num:#7a3fd0; --premium-name:#ffffff; --bezel:#2a4a8a; --bezel-size:10px; --tube-radius:34px / 26px; --button-radius:999px;
  --font:"Atkinson Hyperlegible",Arial,sans-serif; --brand-font:"Oswald",Arial,sans-serif; --guide-font:"Atkinson Hyperlegible",Arial,sans-serif;
  background:radial-gradient(circle at 50% 0%,#122f6e 0%,#0a2463 62%);
}
body[data-era="shaw"] .guide-banner{background:linear-gradient(100deg,#122f6e,#0a2463 55%,#061633)}
body[data-era="shaw"] .guide-ch{color:#ffd800} body[data-era="shaw"] .guide-call{color:#ffffff}
body[data-era="shaw"] .brand{color:#7fd0ff;text-shadow:0 0 14px rgba(0,144,212,.6);letter-spacing:3px} body[data-era="shaw"] .controls button{border-radius:999px} body[data-era="shaw"] .badge{border-radius:999px} body[data-era="shaw"] .player-frame{box-shadow:0 0 0 1px #0090d4,0 18px 40px rgba(0,0,0,.55)}
body[data-era="videotron"]{
  --bg:#001a4d; --panel:#0a2f7a; --panel-2:#1f4e9c; --accent:#ffd700; --accent-2:#e2001a; --accent-contrast:#001a4d;
  --text:#ffffff; --muted:#9db8e8; --border:#2a4a8a; --button:#0a2f7a; --active-bg:#1f4e9c; --input-bg:#001033;
  --topbar-bg:linear-gradient(180deg,#0a2f7a,#001a4d 65%,#001033);
  --guide-bg:#001a4d; --guide-panel:#0a2f7a; --guide-line:#2a4a8a; --guide-alt:#00205e; --guide-hover:#1f4e9c; --guide-active:#2a5db0;
  --guide-accent:#ffd700; --guide-text:#ffffff; --guide-muted:#9db8e8;
  --premium-num:#ffd700; --premium-name:#ffffff; --bezel:#2a4a8a; --bezel-size:6px; --tube-radius:8px / 6px; --button-radius:0;
  --font:"Archivo Narrow",Arial,sans-serif; --brand-font:"Archivo Narrow",Arial,sans-serif; --guide-font:"Archivo Narrow",Arial,sans-serif;
  background:#001a4d;
}
body[data-era="videotron"] .guide-banner{background:linear-gradient(100deg,#0a2f7a,#001a4d 55%,#001033)}
body[data-era="videotron"] .guide-ch{color:#ffd700} body[data-era="videotron"] .guide-call{color:#ffffff}
body[data-era="videotron"] .brand{color:#ffffff;text-shadow:none;letter-spacing:2px;text-transform:uppercase} body[data-era="videotron"] .controls button{border-radius:0;text-transform:uppercase} body[data-era="videotron"] .badge{border-radius:0} body[data-era="videotron"] .player-frame{box-shadow:0 0 0 1px #e2001a,0 10px 30px rgba(0,0,0,.55)}
body[data-era="cogeco"]{
  --bg:#0a2463; --panel:#122f6e; --panel-2:#2a5db0; --accent:#ffd800; --accent-2:#00a9a5; --accent-contrast:#0a2463;
  --text:#ffffff; --muted:#a8c0e8; --border:#2a4a8a; --button:#122f6e; --active-bg:#2a5db0; --input-bg:#061633;
  --topbar-bg:linear-gradient(180deg,#122f6e,#0a2463 65%,#061633);
  --guide-bg:#0a2463; --guide-panel:#122f6e; --guide-line:#2a4a8a; --guide-alt:#0d2a70; --guide-hover:#2a5db0; --guide-active:#3a6dc0;
  --guide-accent:#ffd800; --guide-text:#ffffff; --guide-muted:#a8c0e8;
  --premium-num:#7a3fd0; --premium-name:#ffffff; --bezel:#2a4a8a; --bezel-size:8px; --tube-radius:30px / 22px; --button-radius:12px;
  --font:Verdana,sans-serif; --brand-font:"Archivo Narrow",Arial,sans-serif; --guide-font:Verdana,sans-serif;
  background:radial-gradient(circle at 50% 0%,#122f6e 0%,#0a2463 62%);
}
body[data-era="cogeco"] .guide-banner{background:linear-gradient(100deg,#122f6e,#0a2463 55%,#061633)}
body[data-era="cogeco"] .guide-ch{color:#ffd800} body[data-era="cogeco"] .guide-call{color:#ffffff}
body[data-era="cogeco"] .brand{color:#7fe7e0;letter-spacing:2px} body[data-era="cogeco"] .controls button{border-radius:12px} body[data-era="cogeco"] .badge{border-radius:12px} body[data-era="cogeco"] .player-frame{box-shadow:0 0 0 1px #00a9a5,0 14px 34px rgba(0,0,0,.55)}
body[data-era="comcast"]{
  --bg:#0a2463; --panel:#122f6e; --panel-2:#2a5db0; --accent:#ffd800; --accent-2:#0067b9; --accent-contrast:#0a2463;
  --text:#ffffff; --muted:#a8c0e8; --border:#2a4a8a; --button:#122f6e; --active-bg:#2a5db0; --input-bg:#061633;
  --topbar-bg:linear-gradient(180deg,#122f6e,#0a2463 65%,#061633);
  --guide-bg:#0a2463; --guide-panel:#122f6e; --guide-line:#2a4a8a; --guide-alt:#0d2a70; --guide-hover:#2a5db0; --guide-active:#3a6dc0;
  --guide-accent:#ffd800; --guide-text:#ffffff; --guide-muted:#a8c0e8;
  --premium-num:#7a3fd0; --premium-name:#ffffff; --bezel:#2a4a8a; --bezel-size:12px; --tube-radius:28px / 20px; --button-radius:999px;
  --font:"Segoe UI",Arial,sans-serif; --brand-font:"Michroma",Arial,sans-serif; --guide-font:"Segoe UI",Arial,sans-serif;
  background:#0a2463;
}
body[data-era="comcast"] .guide-banner{background:linear-gradient(100deg,#122f6e,#0a2463 55%,#061633)}
body[data-era="comcast"] .guide-ch{color:#ffd800} body[data-era="comcast"] .guide-call{color:#ffffff}
body[data-era="comcast"] .brand{color:#8ec8ff;letter-spacing:1px} body[data-era="comcast"] .controls button{border-radius:999px} body[data-era="comcast"] .badge{border-radius:999px} body[data-era="comcast"] .player-frame{box-shadow:0 0 0 1px #0067b9,0 18px 40px rgba(0,0,0,.55)}
body[data-era="twc"]{
  --bg:#000080; --panel:#1e40c8; --panel-2:#2a50d8; --accent:#ffd700; --accent-2:#0057a8; --accent-contrast:#000080;
  --text:#ffffff; --muted:#a8b8e8; --border:#2a3a9a; --button:#1e40c8; --active-bg:#2a50d8; --input-bg:#000050;
  --topbar-bg:linear-gradient(180deg,#1e40c8,#000080 65%,#000050);
  --guide-bg:#000080; --guide-panel:#1e40c8; --guide-line:#2a3a9a; --guide-alt:#00006e; --guide-hover:#2a50d8; --guide-active:#3a60e8;
  --guide-accent:#ffd700; --guide-text:#ffffff; --guide-muted:#a8b8e8;
  --premium-num:#800080; --premium-name:#ffffff; --bezel:#2a3a9a; --bezel-size:6px; --tube-radius:20px / 16px; --button-radius:2px;
  --font:Verdana,sans-serif; --brand-font:"Arial Black",Arial,sans-serif; --guide-font:Verdana,sans-serif;
  background:#000080;
}
body[data-era="twc"] .guide-banner{background:linear-gradient(100deg,#1e40c8,#000080 55%,#000050)}
body[data-era="twc"] .guide-ch{color:#ffd700} body[data-era="twc"] .guide-call{color:#ffffff}
body[data-era="twc"] .brand{color:#ffc72c;text-shadow:1px 1px 0 #000;letter-spacing:1px} body[data-era="twc"] .controls button{text-transform:uppercase;border-radius:2px} body[data-era="twc"] .badge{border-radius:1px} body[data-era="twc"] .player-frame{box-shadow:0 0 0 1px #0057a8,0 10px 30px rgba(0,0,0,.55)}
body[data-era="cox"]{
  --bg:#000080; --panel:#1e40c8; --panel-2:#2a50d8; --accent:#ffd700; --accent-2:#0067a6; --accent-contrast:#000080;
  --text:#ffffff; --muted:#a8b8e8; --border:#2a3a9a; --button:#1e40c8; --active-bg:#2a50d8; --input-bg:#000050;
  --topbar-bg:linear-gradient(180deg,#1e40c8,#000080 65%,#000050);
  --guide-bg:#000080; --guide-panel:#1e40c8; --guide-line:#2a3a9a; --guide-alt:#00006e; --guide-hover:#2a50d8; --guide-active:#3a60e8;
  --guide-accent:#ffd700; --guide-text:#ffffff; --guide-muted:#a8b8e8;
  --premium-num:#800080; --premium-name:#ffffff; --bezel:#2a3a9a; --bezel-size:8px; --tube-radius:24px / 18px; --button-radius:8px;
  --font:"Archivo Narrow",Arial,sans-serif; --brand-font:"Oswald",Arial,sans-serif; --guide-font:"Archivo Narrow",Arial,sans-serif;
  background:#000080;
}
body[data-era="cox"] .guide-banner{background:linear-gradient(100deg,#1e40c8,#000080 55%,#000050)}
body[data-era="cox"] .guide-ch{color:#ffd700} body[data-era="cox"] .guide-call{color:#ffffff}
body[data-era="cox"] .brand{color:#ff8a50;letter-spacing:2px} body[data-era="cox"] .controls button{border-radius:8px} body[data-era="cox"] .badge{border-radius:8px} body[data-era="cox"] .player-frame{box-shadow:0 0 0 1px #0067a6,0 14px 34px rgba(0,0,0,.55)}
body[data-era="charter"]{
  --bg:#0a2463; --panel:#122f6e; --panel-2:#2a5db0; --accent:#ffd800; --accent-2:#00b8a9; --accent-contrast:#0a2463;
  --text:#ffffff; --muted:#a8c0e8; --border:#2a4a8a; --button:#122f6e; --active-bg:#2a5db0; --input-bg:#061633;
  --topbar-bg:linear-gradient(180deg,#122f6e,#0a2463 65%,#061633);
  --guide-bg:#0a2463; --guide-panel:#122f6e; --guide-line:#2a4a8a; --guide-alt:#0d2a70; --guide-hover:#2a5db0; --guide-active:#3a6dc0;
  --guide-accent:#ffd800; --guide-text:#ffffff; --guide-muted:#a8c0e8;
  --premium-num:#7a3fd0; --premium-name:#ffffff; --bezel:#2a4a8a; --bezel-size:10px; --tube-radius:16px / 12px; --button-radius:3px;
  --font:"Segoe UI",Arial,sans-serif; --brand-font:"Michroma",Arial,sans-serif; --guide-font:"Segoe UI",Arial,sans-serif;
  background:#0a2463;
}
body[data-era="charter"] .guide-banner{background:linear-gradient(100deg,#122f6e,#0a2463 55%,#061633)}
body[data-era="charter"] .guide-ch{color:#ffd800} body[data-era="charter"] .guide-call{color:#ffffff}
body[data-era="charter"] .brand{color:#00e5d0;letter-spacing:1px} body[data-era="charter"] .controls button{border-radius:3px} body[data-era="charter"] .badge{border-radius:3px} body[data-era="charter"] .player-frame{box-shadow:0 0 0 1px #003a70,0 14px 34px rgba(0,0,0,.55)}
body[data-era="adelphia"]{
  --bg:#001a4d; --panel:#0a2f7a; --panel-2:#1f4e9c; --accent:#ffd700; --accent-2:#b01e24; --accent-contrast:#001a4d;
  --text:#ffffff; --muted:#9db8e8; --border:#2a4a8a; --button:#0a2f7a; --active-bg:#1f4e9c; --input-bg:#001033;
  --topbar-bg:linear-gradient(180deg,#0a2f7a,#001a4d 65%,#001033);
  --guide-bg:#001a4d; --guide-panel:#0a2f7a; --guide-line:#2a4a8a; --guide-alt:#00205e; --guide-hover:#1f4e9c; --guide-active:#2a5db0;
  --guide-accent:#ffd700; --guide-text:#ffffff; --guide-muted:#9db8e8;
  --premium-num:#ffd700; --premium-name:#ffffff; --bezel:#2a4a8a; --bezel-size:14px; --tube-radius:36px / 28px; --button-radius:2px;
  --font:"Trebuchet MS",Verdana,sans-serif; --brand-font:"Courier New",monospace; --guide-font:"Courier New",monospace;
  background:#001a4d;
}
body[data-era="adelphia"] .guide-banner{background:linear-gradient(100deg,#0a2f7a,#001a4d 55%,#001033)}
body[data-era="adelphia"] .guide-ch{color:#ffd700} body[data-era="adelphia"] .guide-call{color:#ffffff}
body[data-era="adelphia"] .brand{color:#e8e8e8;text-shadow:1px 1px 0 #000;letter-spacing:2px} body[data-era="adelphia"] .controls button{text-transform:uppercase;border-radius:2px} body[data-era="adelphia"] .badge{border-radius:1px} body[data-era="adelphia"] .player-frame{box-shadow:0 0 0 1px #b01e24,0 10px 30px rgba(0,0,0,.55)}
body[data-era="cablevision"]{
  --bg:#001a4d; --panel:#0a2f7a; --panel-2:#1f4e9c; --accent:#ffd700; --accent-2:#7b2d8e; --accent-contrast:#001a4d;
  --text:#ffffff; --muted:#9db8e8; --border:#2a4a8a; --button:#0a2f7a; --active-bg:#1f4e9c; --input-bg:#001033;
  --topbar-bg:linear-gradient(180deg,#0a2f7a,#001a4d 65%,#001033);
  --guide-bg:#001a4d; --guide-panel:#0a2f7a; --guide-line:#2a4a8a; --guide-alt:#00205e; --guide-hover:#1f4e9c; --guide-active:#2a5db0;
  --guide-accent:#ffd700; --guide-text:#ffffff; --guide-muted:#9db8e8;
  --premium-num:#7b2d8e; --premium-name:#ffffff; --bezel:#2a4a8a; --bezel-size:10px; --tube-radius:32px / 24px; --button-radius:999px;
  --font:"Barlow Condensed",Arial,sans-serif; --brand-font:"Oswald",Arial,sans-serif; --guide-font:"Barlow Condensed",Arial,sans-serif;
  background:#001a4d;
}
body[data-era="cablevision"] .guide-banner{background:linear-gradient(100deg,#0a2f7a,#001a4d 55%,#001033)}
body[data-era="cablevision"] .guide-ch{color:#ffd700} body[data-era="cablevision"] .guide-call{color:#ffffff}
body[data-era="cablevision"] .brand{color:#d0a0ff;text-shadow:0 0 14px rgba(123,45,142,.6);letter-spacing:3px} body[data-era="cablevision"] .controls button{border-radius:999px} body[data-era="cablevision"] .badge{border-radius:999px} body[data-era="cablevision"] .player-frame{box-shadow:0 0 0 1px #7b2d8e,0 18px 40px rgba(0,0,0,.55)}
/* Spelunkr (2026-11-10, Nick): the spelunkr.tv look — deep purple
   page, dark navy panels with blue borders, yellow channel names
   and numbers, orange highlights, retro terminal guide font.
   Accent is the site's yellow (#ffd700); accent-2 is its orange. */
body[data-era="spelunkr"]{
  --bg:#1a0a2e; --panel:#16205a; --panel-2:#1e2a6e; --accent:#ffd700; --accent-2:#ff8c00; --accent-contrast:#1a0a2e;
  --text:#ffffff; --muted:#a0b0d8; --border:#3a5a9c; --button:#1a2450; --active-bg:#2a1a4e; --input-bg:#0a0a1f;
  --topbar-bg:linear-gradient(180deg,#4a1a6e,#2a0a3a 65%,#1a0a2e);
  --guide-bg:#0a1030; --guide-panel:#101a45; --guide-line:#243a75; --guide-alt:#0c1435; --guide-hover:#162a5e; --guide-active:#1e3a7a;
  --guide-accent:#ffd700; --guide-text:#ffffff; --guide-muted:#a0b0d8;
  --premium-num:#ffd700; --premium-name:#ffe9b0; --bezel:#3a5a9c; --bezel-size:8px; --tube-radius:26px / 20px; --button-radius:2px;
  --font:"Trebuchet MS",Verdana,sans-serif; --brand-font:"Courier New",monospace; --guide-font:"Courier New",monospace;
  background:radial-gradient(circle at 50% 0%,#3d1a5c 0%,#1a0a2e 55%,#0d0618 100%);
}
body[data-era="spelunkr"] .guide-banner{background:linear-gradient(100deg,#2a0a3a,#1e2a6e 55%,#12081f)}
body[data-era="spelunkr"] .guide-ch{color:#ffd700} body[data-era="spelunkr"] .guide-call{color:#ffd700}
body[data-era="spelunkr"] .brand{color:#ffd700;text-shadow:1px 1px 0 #000;letter-spacing:2px} body[data-era="spelunkr"] .controls button{text-transform:uppercase;letter-spacing:.4px;border-radius:2px} body[data-era="spelunkr"] .badge{border-radius:2px} body[data-era="spelunkr"] .player-frame{box-shadow:0 0 0 1px #3a5a9c,0 10px 30px rgba(0,0,0,.55)}

*{box-sizing:border-box}
body{
  margin:0;
  font-family:var(--font);
  background:var(--bg);
  color:var(--text);
  color-scheme:dark;
  transition:background .3s ease,color .3s ease;
}
.app{display:flex;flex-direction:column;height:100vh;isolation:isolate}

.topbar{
  display:flex;
  align-items:center;
  gap:.75rem;
  padding:.65rem 1rem;
  background:var(--topbar-bg);
  border-bottom:1px solid var(--border);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.05);
  position:relative;
  z-index:5;
}
.brand{font-family:var(--brand-font);font-weight:700;letter-spacing:2px;white-space:nowrap}
body[data-era="90s"] .brand{color:#ffd34d;text-shadow:1px 1px 0 #000}
body[data-era="2000s"] .brand{color:#e5f9ff;letter-spacing:2.5px;text-shadow:0 0 14px rgba(91,209,255,.5)}
.badge{
  background:var(--accent);
  color:var(--accent-contrast);
  padding:2px 6px;
  border-radius:4px;
  font-size:11px;
  margin-left:6px;
  letter-spacing:1px;
}
body[data-era="90s"] .badge{border:1px solid #fff2aa;border-radius:1px;box-shadow:1px 1px 0 #000}
body[data-era="2000s"] .badge{border:1px solid rgba(160,235,255,.8);border-radius:999px;box-shadow:0 0 10px rgba(91,209,255,.35)}
.now-playing{flex:1;color:var(--muted);font-size:14px;min-width:140px}
.controls{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:6px}
.controls button{
  background:var(--button);
  color:var(--text);
  border:1px solid var(--border);
  padding:6px 10px;
  border-radius:var(--button-radius);
  cursor:pointer;
  font:inherit;
  font-size:12px;
  transition:background .18s,border-color .18s,color .18s,box-shadow .18s;
}
.controls button:hover{border-color:var(--accent);color:var(--accent)}
.controls button.on{background:var(--accent);color:var(--accent-contrast);border-color:var(--accent)}
body[data-era="90s"] .controls button{text-transform:uppercase;letter-spacing:.4px;box-shadow:1px 1px 0 #000}
body[data-era="90s"] .controls button.on{box-shadow:inset 0 0 0 1px rgba(255,255,255,.45),1px 1px 0 #000}
body[data-era="2000s"] .controls button{
  background:linear-gradient(180deg,#183049,#0c1928);
  border-color:#2a4e6b;
  border-radius:7px;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.16),0 1px 2px rgba(0,0,0,.5);
}
body[data-era="2000s"] .controls button:hover{color:#dff8ff;border-color:#5bd1ff}
body[data-era="2000s"] .controls button.on{
  background:linear-gradient(180deg,#74ddff,#168ecc);
  color:#00131f;
  border-color:#8be7ff;
  box-shadow:0 0 12px rgba(91,209,255,.4),inset 0 1px 0 rgba(255,255,255,.55);
}

.main{display:grid;grid-template-columns:260px 1fr;flex:1;overflow:hidden}
.sidebar{background:var(--panel);border-right:1px solid var(--border);display:grid;grid-template-rows:auto minmax(0,1fr);overflow:hidden}
#search{
  grid-row:1;
  box-sizing:border-box;
  width:calc(100% - 16px);
  height:32px;
  margin:8px;
  padding:6px 8px;
  font-size:13px;
  line-height:1.3;
  border-radius:var(--button-radius);
  border:1px solid var(--border);
  background:var(--input-bg);
  color:var(--text);
  font:inherit;
  outline:none;
}
#search:focus{border-color:var(--accent);box-shadow:0 0 0 2px color-mix(in srgb,var(--accent) 22%,transparent)}
.group-btn{
  background:var(--button);
  color:var(--muted);
  border:1px solid var(--border);
  padding:4px 8px;
  border-radius:var(--button-radius);
  cursor:pointer;
  font:inherit;
  font-size:11px;
}
.group-btn:hover{color:var(--text);border-color:var(--accent)}
body[data-era="90s"] .group-btn{text-transform:uppercase;letter-spacing:.3px;border-radius:1px}
body[data-era="2000s"] .group-btn{border-radius:999px;background:linear-gradient(180deg,#14263a,#0b1724)}
.channel-list{grid-row:2;list-style:none;margin:0;padding:4px 0 0;border-top:1px solid var(--border);overflow:auto;min-height:0}
.channel-list li{display:grid;grid-template-columns:44px 1fr;grid-template-rows:auto auto;gap:2px 12px;padding:8px 10px;border-bottom:1px solid var(--border);cursor:pointer}
.channel-list li:hover{background:var(--panel-2)}
.channel-list li.active{background:var(--active-bg);border-left:3px solid var(--accent)}
.channel-list li.premium .ch-num{color:var(--premium-num)}
.channel-list li.premium .ch-name{color:var(--premium-name)}
body[data-era="90s"] .channel-list li.premium .ch-num{text-shadow:1px 1px 0 #000}
body[data-era="2000s"] .channel-list li.premium .ch-num{text-shadow:0 0 8px rgba(255,209,102,.45)}
body[data-era="2000s"] .channel-list li.active{box-shadow:inset 3px 0 0 var(--accent),0 0 18px rgba(53,182,255,.08)}
/* Channel numbers everywhere (sidebar + guide station) use the
   theme font, so the digits match the real system (Prevue bitmap
   on Prevue/80s, Eurostile on DirecTV/midnight, bold sans on
   SARA/i-Guide/Passport/Dish). 13px keeps a 4-digit number inside
   the 44px column in every theme font; the column, the 12px gap
   and the right alignment are the same in all 19 themes and no
   theme overrides them. */
.ch-num{font-size:13px;font-weight:700;color:var(--accent);font-family:var(--font);letter-spacing:.5px;text-align:right;white-space:nowrap}
.guide-ch{font-family:var(--guide-font);letter-spacing:.5px}
.ch-name{font-size:13px}
.ch-cat{grid-column:2;font-size:11px;color:var(--muted)}

.player-area{display:flex;flex-direction:column;padding:12px;gap:12px;overflow:auto}
.player-frame{
  position:relative;
  background:#000;
  border-radius:var(--frame-radius);
  overflow:hidden;
  aspect-ratio:16/9;
  isolation:isolate;
  transition:border-radius .3s ease,box-shadow .3s ease;
}
body[data-era="90s"] .player-frame{box-shadow:0 0 0 1px var(--border),0 10px 30px rgba(0,0,0,.55)}
body[data-era="2000s"] .player-frame{box-shadow:0 0 0 1px #28445f,0 18px 40px rgba(0,0,0,.55)}
body.tube-on .player-frame{
  border-radius:var(--tube-radius);
  box-shadow:inset 0 0 60px rgba(0,0,0,.68),0 0 0 var(--bezel-size) var(--bezel),0 18px 50px rgba(0,0,0,.6);
}
.player-frame video,.player-frame iframe{width:100%;height:100%;display:block;background:#000}
.player-frame iframe{position:absolute;inset:0;border:0;z-index:0}
.player-overlay{
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  color:var(--muted);
  background:#000;
  z-index:4;
  text-align:center;
  padding:20px;
}
.player-overlay.error{color:#ff6b6b;background:rgba(0,0,0,.85)}
.vaughn-play-btn{
  position:absolute;
  left:50%;
  bottom:18px;
  transform:translateX(-50%);
  z-index:6;
  padding:10px 18px;
  border-radius:999px;
  border:1px solid var(--accent);
  background:var(--accent);
  color:#000;
  font:inherit;
  font-weight:bold;
  cursor:pointer;
  box-shadow:0 4px 18px rgba(0,0,0,.6);
}
.player-msg{
  position:absolute;
  inset:0;
  z-index:4;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:12px;
  color:var(--muted);
  background:#05070a;
  text-align:center;
  padding:24px;
}
.player-msg a{color:var(--accent);font-weight:600}
.meta h2{margin:0 0 4px}
.meta p{color:var(--muted);margin:0 0 8px}
.meta a{color:var(--accent)}

.epg{
  --station-w:160px;
  --guide-slot-w:90px;
  display:none;
  position:fixed;
  left:0;
  right:0;
  bottom:0;
  height:min(62vh,620px);
  z-index:30;
  flex-direction:column;
  overflow:hidden;
  background:var(--guide-bg);
  color:var(--guide-text);
  border-top:2px solid var(--guide-accent);
  box-shadow:0 -18px 55px rgba(0,0,0,.65);
}
.epg.open{display:flex}
body[data-era="90s"] .epg{background:#0a0a5e;border-top-color:#3a3ad0;box-shadow:inset 0 1px 0 rgba(255,255,255,.05),0 -18px 55px rgba(0,0,0,.72)}
body[data-era="2000s"] .epg{background:#ffd800;border-top-color:#d00000;box-shadow:inset 0 1px 0 rgba(255,255,255,.12),0 -18px 55px rgba(0,0,0,.7)}
.guide-banner{
  position:relative;
  flex:none;
  display:flex;
  align-items:center;
  gap:26px;
  min-height:76px;
  padding:10px 18px;
  overflow:hidden;
  border-bottom:2px solid rgba(0,0,0,.55);
}
body[data-era="90s"] .guide-banner{background:linear-gradient(100deg,#1e1e8c,#0a0a5e 55%,#0a0a5e)}
body[data-era="2000s"] .guide-banner{background:linear-gradient(100deg,#ffe34d,#ffd800 55%,#f5c800)}
.guide-banner::before{
  content:"";
  position:absolute;
  left:0;
  top:0;
  bottom:0;
  width:210px;
  opacity:.55;
  background-image:radial-gradient(circle,rgba(255,255,255,.55) 2px,transparent 2.4px);
  background-size:9px 9px;
  -webkit-mask-image:linear-gradient(90deg,#000 0%,#000 60%,transparent 100%);
  mask-image:linear-gradient(90deg,#000 0%,#000 60%,transparent 100%);
  pointer-events:none;
}
.guide-logo{
  position:relative;
  z-index:1;
  display:flex;
  align-items:baseline;
  gap:4px;
  flex:none;
  transform:rotate(-2deg);
  font-family:"Arial Black","Impact",sans-serif;
  line-height:.8;
  text-shadow:2px 2px 0 #16082d,4px 4px 0 rgba(0,0,0,.35);
}
.guide-logo span{font-size:34px;color:#ffe34d}
.guide-logo b{font-size:19px;color:#ffd34d;letter-spacing:1px}
body[data-era="2000s"] .guide-logo{transform:none;text-shadow:0 0 16px rgba(91,209,255,.55),2px 2px 0 #00101d}
body[data-era="2000s"] .guide-logo span{color:#dff8ff;font-size:31px}
body[data-era="2000s"] .guide-logo b{color:#5bd1ff;font-size:17px}
.guide-banner-copy{position:relative;z-index:1;min-width:0;flex:1}
.epg-kicker{font-size:9px;letter-spacing:2.5px;color:var(--guide-accent);font-weight:700}
.guide-banner h3{margin:2px 0 2px;font-size:18px;letter-spacing:1px;font-family:var(--guide-font)}
.guide-banner-sub{font-size:11px;color:rgba(255,255,255,.78);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body[data-era="90s"] .guide-banner h3{color:#ffe34d;text-transform:uppercase;text-shadow:2px 2px 0 #16082d}
body[data-era="2000s"] .guide-banner h3{color:#e9f8ff;font-weight:600;text-shadow:0 0 12px rgba(91,209,255,.4)}
.guide-banner-side{position:relative;z-index:1;display:flex;align-items:center;gap:10px;flex:none}
.epg-clock{font-size:12px;color:rgba(255,255,255,.85);text-align:right;white-space:nowrap;font-family:var(--guide-font)}
body[data-era="90s"] .epg-clock{text-transform:uppercase;letter-spacing:.5px;color:#ffe34d}
.guide-close{
  background:rgba(0,0,0,.28);
  color:#fff;
  border:1px solid rgba(255,255,255,.4);
  border-radius:2px;
  padding:5px 10px;
  cursor:pointer;
  font:inherit;
  font-size:11px;
}
.guide-close:hover{background:rgba(255,255,255,.16)}
.guide-zoom-label{font-size:12px;font-weight:700;min-width:42px;text-align:center;color:#fff}
/* Gamepad on-screen cursor (2026-11-04, Nick): driven by
   the right analog stick. It lives inside #playerMount
   so it is still visible in real browser fullscreen
   (the frame is the fullscreen element, so only its
   descendants show there). Fixed to the viewport, so it
   moves over the sidebar, guide, menu and player alike,
   in normal, in-page and real fullscreen. pointer-events
   none, so it never blocks clicks — A clicks the element
   underneath it (see clickGamepadCursor in app.js). */
#gamepadCursor{
  position:fixed;
  left:50%;
  top:50%;
  width:28px;
  height:28px;
  margin:-14px 0 0 -14px;
  border:2px solid #fff;
  border-radius:50%;
  background:rgba(255,255,255,.12);
  box-shadow:0 0 0 2px #000,0 0 14px rgba(0,0,0,.85);
  z-index:9999;
  pointer-events:none;
  display:none;
}
#gamepadCursor::after{
  content:"";
  position:absolute;
  left:50%;
  top:50%;
  width:4px;
  height:4px;
  margin:-2px 0 0 -2px;
  background:#fff;
  border-radius:50%;
  box-shadow:0 0 0 1px #000;
}
body[data-era="2000s"] .guide-close{border-radius:999px;border-color:rgba(120,220,255,.5);background:rgba(8,29,46,.6)}
.guide-timebar-wrap{
  flex:none;
  display:flex;
  border-bottom:2px solid var(--guide-line);
  background:#0a3554;
  font-family:var(--guide-font);
}
/* Time at the farthest left, before the channel list:
   the NOW clock is a fixed 160px pane, aligned above the
   station column, and it never scrolls. Only the time
   labels to its right scroll, in sync with the programs. */
.guide-time-now{
  flex:none;
  width:var(--station-w);
  padding:5px 8px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:6px;
  white-space:nowrap;
  background:rgba(0,0,0,.22);
  font-size:12px;
}
.guide-timebar{
  flex:1;
  display:flex;
  /* Full-day timeline: 48 half-hour slots at 90px each =
     4320px of programs. The bar scrolls horizontally in
     sync with the grid (JS), so the time labels stay
     aligned with the programs below. */
  overflow-x:auto;
  overflow-y:hidden;
  background:#0a3554;
  font-family:var(--guide-font);
}
body[data-era="90s"] .guide-timebar{background:#0b3a5c}
body[data-era="2000s"] .guide-timebar{background:linear-gradient(180deg,#0c3550,#082439);border-bottom-color:#2b5d7d}
.guide-timebar > div{
  flex:none;
  width:var(--guide-slot-w,90px);
  min-width:0;
  padding:5px 8px;
  border-left:1px solid rgba(255,255,255,.18);
  color:#dff8ff;
  font-size:12px;
  letter-spacing:.4px;
  display:flex;
  align-items:center;
  gap:6px;
  white-space:nowrap;
}

.guide-timebar > div:first-child{border-left:0}
.guide-now-label{font-size:9px;letter-spacing:1.5px;color:#ffd34d}
#guideNowTime{font-weight:700;color:#fff;letter-spacing:1px}
body[data-era="90s"] .guide-timebar > div{text-shadow:1px 1px 0 #000}
body[data-era="90s"] .guide-timebar > div:nth-child(2){color:#9fe8ff}
body[data-era="90s"] .guide-now-label{color:#ffd34d}
body[data-era="2000s"] .guide-timebar > div{color:#bfeaff;border-left-color:rgba(120,220,255,.2)}
body[data-era="2000s"] .guide-now-label{color:#5bd1ff}
.epg-body{flex:1;display:flex;min-height:0;overflow:hidden}
/* Channel listing, always on the left: a fixed 160px pane
   with NO horizontal scroll, so it moves up and down with
   the rows (vertical scroll is synced with the program
   grid in JS) but never slides off the page to the left.
   Programs scroll horizontally underneath / past it, and
   the station pane stays where it is. */
.epg-stations{
  flex:none;
  width:var(--station-w);
  min-height:0;
  overflow-y:auto;
  overflow-x:hidden;
  scrollbar-width:none;
  background:var(--guide-panel);
}
.epg-stations::-webkit-scrollbar{display:none}
.epg-grid{flex:1;min-height:0;overflow:auto;background:var(--guide-bg);position:relative}
body[data-era="90s"] .epg-grid{background:#0a0a5e}
body[data-era="2000s"] .epg-grid{background:#ffd800}
.epg-row{
  display:block;
  position:relative;
  width:calc(var(--guide-slot-w,90px) * 48);
  height:52px;
  border-bottom:1px solid var(--guide-line);
  cursor:pointer;
  font-family:var(--guide-font);
}
.epg-row:nth-child(even){background:rgba(255,255,255,.025)}
.epg-row:hover{background:var(--guide-hover)}
.epg-row.active{background:var(--guide-active)}
body[data-era="90s"] .epg-row:nth-child(even){background:#0d0d6e}
body[data-era="90s"] .epg-row:hover{background:#2a2ab0}
body[data-era="90s"] .epg-row.active{background:#3a3ad0;box-shadow:inset 3px 0 0 #ffd700}
body[data-era="2000s"] .epg-row{border-bottom-color:rgba(120,90,0,.25)}
body[data-era="2000s"] .epg-row:nth-child(even){background:#ffe34d}
body[data-era="2000s"] .epg-row:hover{background:#ffec80}
body[data-era="2000s"] .epg-row.active{background:#ffd34d;box-shadow:inset 3px 0 0 #d00000}
.guide-station{
  display:flex;
  flex-direction:column;
  justify-content:center;
  height:52px;
  padding:4px 9px;
  border-right:2px solid var(--guide-line);
  border-bottom:1px solid var(--guide-line);
  min-width:0;
  background:var(--guide-panel);
  cursor:pointer;
  font-family:var(--guide-font);
}
.guide-station.active{background:var(--guide-active);box-shadow:inset 3px 0 0 var(--guide-accent)}
body[data-era="90s"] .guide-station{background:#1e1e8c;border-right-color:#3a3ad0}
body[data-era="2000s"] .guide-station{background:#f5c800;border-right-color:#c8a800}
.guide-ch{font-size:14px;font-weight:700;line-height:1;color:#7cff7c;text-shadow:1px 1px 0 #000}
.guide-call{font-size:10px;line-height:1.15;color:#ffe66d;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body[data-era="90s"] .guide-ch{color:#ffd700;text-shadow:1px 1px 0 #000}
body[data-era="90s"] .guide-call{color:#ffffff}
body[data-era="2000s"] .guide-ch{color:#111111;text-shadow:none}
body[data-era="2000s"] .guide-call{color:#111111}

/* 2000s is the TV Guide Channel yellow grid — the page chrome is dark
   olive now, but the guide itself (banner + grid) is still the bright
   yellow grid, so the elements that hardcode white text get dark ink
   on the yellow banner, and premium guide rows get dark text too. */
body[data-era="2000s"] .guide-banner-sub{color:rgba(17,17,17,.78)}
body[data-era="2000s"] .epg-clock{color:rgba(17,17,17,.85)}
body[data-era="2000s"] .guide-zoom-label{color:#111111}
body[data-era="2000s"] .guide-close{background:rgba(17,17,17,.08);color:#111111;border-color:rgba(17,17,17,.4)}
body[data-era="2000s"] .guide-close:hover{background:rgba(17,17,17,.16)}
body[data-era="2000s"] .guide-banner h3{color:#111111;text-shadow:none}
body[data-era="2000s"] .guide-logo span{color:#111111}
body[data-era="2000s"] .guide-logo b{color:#d00000}
body[data-era="2000s"] .guide-logo{transform:none;text-shadow:none}
body[data-era="2000s"] .epg-row.premium .guide-ch{color:#d00000}
body[data-era="2000s"] .epg-row.premium .guide-call{color:#111111}
body[data-era="2000s"] .guide-station.premium .guide-ch{color:#d00000}
body[data-era="2000s"] .guide-station.premium .guide-call{color:#111111}
.epg-row.premium .guide-ch{color:var(--premium-num)}
.epg-row.premium .guide-call{color:var(--premium-name)}
.guide-station.premium .guide-ch{color:var(--premium-num)}
.guide-station.premium .guide-call{color:var(--premium-name)}
.guide-programs{
  position:relative;
  width:100%;
  height:100%;
  min-width:0;
  overflow:hidden;
  background-image:linear-gradient(to right,var(--guide-line) 1px,transparent 1px);
  background-size:calc(100% / 48) 100%;
  /* Program data rows use the condensed faces from the
     cable/satellite lists (Helvetica Condensed / Swiss 721
     Condensed) in every theme, not just the cable theme —
     that tight squeezing is what fits program titles into
     30-minute blocks, and into the 90px slots of a full day. */
  font-family:"Helvetica Condensed","Swiss 721 Condensed","Archivo Narrow","Barlow Condensed",sans-serif;
}
.guide-program{
  position:absolute;
  top:0;
  bottom:0;
  min-width:0;
  padding:7px 10px;
  display:flex;
  align-items:center;
  overflow:hidden;
  border-right:1px solid var(--guide-line);
  color:var(--guide-text);
  background:var(--guide-panel);
  font-size:13px;
  line-height:1.2;
}
.guide-program.current{background:var(--guide-active);outline:3px solid var(--guide-accent);outline-offset:-3px;box-shadow:inset 0 0 0 1px rgba(126,231,255,.35);z-index:2}
.guide-program.current .guide-program-title{font-weight:700;color:var(--guide-text)}
.guide-program-title{min-width:0;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.guide-program.continues-left::before,
.guide-program.continues-right::after{
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  color:#7ee7ff;
  font-size:16px;
  font-weight:700;
  text-shadow:0 0 5px #000;
}
.guide-program.continues-left::before{content:"‹";left:1px}
.guide-program.continues-right::after{content:"›";right:1px}
.guide-program.continues-left{padding-left:12px}
.guide-program.continues-right{padding-right:16px}
.guide-show{color:#eaf6ff}
.epg-show{color:inherit}
body[data-era="90s"] .epg-show{color:#fff}
body[data-era="2000s"] .epg-show{color:#111111}

/* CRT: scanlines only (see the fx-on block below) */
.ca-control{display:inline-flex;align-items:center;gap:6px;font-size:12px;color:var(--muted);flex:0 0 auto}
.ca-control input[type="range"]{width:130px;flex:0 0 auto;accent-color:var(--accent)}
/* Slider value spans are fixed-width, right-aligned, tabular:
   without this, "5" -> "10" (or "30" -> "100") widens the
   label, the wrapping topbar reflows, and the slider moves
   out from under the mouse mid-drag — the "panel goes
   crazy" while sliding. Fixed width = the panel never
   moves while you drag, at any value. */
#crtValue,#caValue,#noiseValue{display:inline-block;min-width:32px;text-align:right;font-variant-numeric:tabular-nums}
.ca-control input[type="range"]:disabled{opacity:.4}
/* CRT = scanlines ONLY (2026-11-03, Nick): no glare,
   no vignette, no aperture grille, no flicker, no
   page-wide overlay. The old fx-on rules had all of
   those — inset vignette shadow on the frame, a glass
   glare + radial vignette ::before, an RGB aperture
   grille striped into ::after, a flicker animation,
   and a second scanline overlay over the whole page
   (.app::after). All of that is removed. What is left
   is one layer: .player-frame::after, dark horizontal
   lines only, density still controlled by the CRT
   slider (--scan-h / --scan-period). Tube (rounded
   corners/bezel) is a separate toggle and is untouched. */
body.fx-on .player-frame::after{
  content:"";
  position:absolute;
  inset:0;
  z-index:3;
  pointer-events:none;
  /* CRT amount slider: --scan-h is the dark line height, --scan-period
     is the line-to-line distance. Higher slider = smaller lines and a
     smaller period = more, finer scanlines. Defaults match the old
     1px / 3px look when the slider is at 5. */
  background:
    repeating-linear-gradient(to bottom,rgba(0,0,0,.22) 0 var(--scan-h,1.25px),transparent var(--scan-h,1.25px) var(--scan-period,3.75px));
  mix-blend-mode:multiply;
  opacity:var(--scan-opacity,.5);
}

/* CRT Options panel + overlay (2026-11-04, Nick): the
   panel is fixed, z-index 300, so it shows over in-page
   fullscreen (player-area 200, guide 210/220) as well as
   normal mode. In real browser fullscreen it cannot show
   (only the frame's descendants do), same as the guide —
   exit real fullscreen to adjust, or use in-page fullscreen. */
.crt-panel{
  position:fixed;
  top:64px;
  right:12px;
  width:320px;
  max-width:calc(100vw - 24px);
  max-height:calc(100vh - 80px);
  overflow:auto;
  background:var(--panel);
  color:var(--text);
  border:1px solid var(--border);
  border-radius:8px;
  box-shadow:0 10px 40px rgba(0,0,0,.65);
  z-index:300;
  padding:14px;
}
.crt-panel[hidden]{display:none}
.crt-panel-head{display:flex;justify-content:space-between;align-items:flex-start;gap:10px}
.crt-panel-kicker{font-size:9px;letter-spacing:2px;color:var(--accent);font-weight:700}
.crt-panel h2{margin:2px 0 0;font-size:18px}
.crt-panel h3{margin:14px 0 8px;font-size:12px;letter-spacing:1px;text-transform:uppercase;color:var(--muted)}
.crt-panel-note{font-size:12px;line-height:1.4;color:var(--muted);margin:8px 0 0}
.crt-panel section{display:flex;flex-direction:column;gap:8px;align-items:flex-start}
.crt-panel button{background:var(--button);color:var(--text);border:1px solid var(--border);padding:6px 10px;border-radius:var(--button-radius);cursor:pointer;font:inherit;font-size:12px}
.crt-panel button.on{background:var(--accent);color:var(--accent-contrast);border-color:var(--accent)}
.crt-panel-row{display:flex;align-items:center;gap:8px;font-size:12px}
#crtAdvanced[hidden]{display:none}
#crtAdvanced section{display:flex;flex-direction:column;gap:8px;align-items:flex-start}
.crt-presets{display:flex;align-items:center;gap:6px;flex-wrap:wrap;font-size:12px}
.crt-presets button{flex:1}
.crt-panel select{background:var(--input-bg);color:var(--text);border:1px solid var(--border);border-radius:4px;padding:5px;font:inherit;font-size:12px;max-width:210px}
/* CRT overlay: mask / grille / slot / damping wires /
   glare / vignette layers, built by JS in applyCrtOptions
   (backgroundImage + backgroundSize). Above the video,
   below noise/OSD/scanlines, so scanlines stay on top. */
#crtOverlay{
  position:absolute;
  inset:0;
  z-index:2;
  pointer-events:none;
}
/* CRT electron beams + phosphor triads + line pulse
   (2026-11-04, Nick, opt-in one by one in CRT Options):
   - Beams: three SEPARATE beams, red / green / blue, each
     a row of super-small 1px pixels (dotted, not a solid
     line), sweeping down together like a real CRT gun
     group. Slowed to a visible sweep — a real 60Hz sweep
     is 16ms, under one browser frame, so it would just
     flicker, not read as beams.
   - Triads: tiny RGB phosphor dots, 1px each, R-G-B
     repeating, that the beams target. Static, low
     opacity, mix-blend screen so they add light like
     phosphor, not a dark mask.
   - Pulse: a 1px white line that flashes lightning
     quick — two sharp 1-frame flashes, then dark for
     7s. No fade, no regular strobe rhythm, brighter
     for that one frame, then gone. Off by default.
   All inside #playerMount, so they show in real
   fullscreen too, pointer-events none, above video and
   CRT overlay, below noise/OSD. */
#crtBeams{position:absolute;inset:0;width:100%;height:100%;z-index:3;pointer-events:none;overflow:hidden;isolation:isolate;background:none;contain:strict;clip-path:inset(0)}
#crtBeams > div{display:none}
#crtBeams > .crt-triads{position:absolute;inset:0;opacity:var(--triads-opacity,.25);
  /* VIDEO FRAME ONLY (2026-11-04, Nick: "thats not the
     video frame now is it"): triads / beams / pulse live
     ONLY inside #playerMount, clipped by its overflow
     hidden, and triads NO LONGER use mix-blend screen —
     that blend was washing the whole page, not just the
     video. Normal blending, sparse dots (one R-G-B triad
     per 12px x 6px tile, 1px dots with black gaps), so
     sidebar / topbar / guide / CRT panel are untouched. */
  background-image:
    radial-gradient(circle at 1px 1px, rgba(255,0,0,.9) 0.5px, transparent 0.6px),
    radial-gradient(circle at 2px 1px, rgba(0,255,0,.9) 0.5px, transparent 0.6px),
    radial-gradient(circle at 3px 1px, rgba(0,0,255,.9) 0.5px, transparent 0.6px);
  background-size:6px 3px;background-repeat:repeat}
#crtBeams > .crt-beam-group{position:absolute;left:0;right:0;height:3px;overflow:hidden;animation:crt-beam-sweep 0.025s linear infinite}
#crtBeams .crt-beam{position:absolute;left:0;right:0;height:1px;opacity:1;
  background-repeat:repeat-x;background-size:2px 1px}
/* FIX (2026-11-04, Nick: beams didnt look like they did
   anything): the old beams were faint dotted lines at
   .55 opacity with screen blend — over bright video, and
   over iframes (where screen blend does not blend with
   the video at all), they vanished. Now: no screen blend
   (so they show over video AND iframes), dots are 3px
   wide and touching (a solid line of tiny pixels, still
   2px tall, still super small), full opacity, with a
   matching-color glow, and a slower 2.5s sweep so the
   sweep is actually visible instead of flashing past. */
#crtBeams .crt-beam-red{top:0;background-image:radial-gradient(circle at 0.5px 0.5px, rgba(255,0,0,1) 0.5px, transparent 0.6px);filter:none}
#crtBeams .crt-beam-green{top:1px;background-image:radial-gradient(circle at 0.5px 0.5px, rgba(0,255,0,1) 0.5px, transparent 0.6px);filter:none}
#crtBeams .crt-beam-blue{top:2px;background-image:radial-gradient(circle at 0.5px 0.5px, rgba(0,0,255,1) 0.5px, transparent 0.6px);filter:none}
@keyframes crt-beam-sweep{from{top:-10px}to{top:100%}}
#crtBeams > .crt-pulse{position:absolute;left:0;right:0;top:50%;height:1px;max-height:1px;overflow:hidden;opacity:0;
  background-color:transparent;background-repeat:no-repeat;background-size:100% 1px;
  background-image:linear-gradient(to right, rgba(0,255,128,1), rgba(0,255,128,1));
  line-height:0;font-size:0;filter:none;mix-blend-mode:normal;
  animation:crt-line-pulse 7s linear infinite}
/* Lightning quick, not a strobe: two sharp 1-frame flashes
   (lightning double-strike, ~14ms each) then dark for 7s.
   No fade, no regular 3s strobe rhythm — instant on/off,
   brighter for that one frame, then gone. */
/* Pulse flash dimmed too: .35 white on top of the old
   dense triads pushed the frame to white. Now .18 / .12,
   still lightning-quick, still visible as a flicker,
   never a white page. */
@keyframes crt-line-pulse{0%{opacity:0}0.2%{opacity:1}0.4%{opacity:0}0.7%{opacity:.85}1%,100%{opacity:0}}
body.crt-beams #crtBeams > .crt-beam-group{display:block}
body.crt-triads #crtBeams > .crt-triads{display:block}
body.crt-pulse #crtBeams > .crt-pulse{display:block}
/* Flicker, gated — only when body.crt-flicker is on.
   The keyframes were removed when CRT became scanlines
   only; they are back, but only as an opt-in option.
   The swing is deliberately WIDE (2026-11-09 fix): the old
   keyframes only moved the scanline opacity by +/-20% a
   couple of times per 7s, which a live render check showed
   is invisible against a moving picture. Now the scanlines
   punch dark and nearly vanish several times per cycle, so
   the whole picture texture visibly pulses. */
@keyframes crt-flicker{
  0%,100%{opacity:var(--scan-opacity,.5)}
  12%{opacity:calc(var(--scan-opacity,.5) * 1.7)}
  13%{opacity:calc(var(--scan-opacity,.5) * .35)}
  14%{opacity:var(--scan-opacity,.5)}
  38%{opacity:calc(var(--scan-opacity,.5) * 1.5)}
  39%{opacity:calc(var(--scan-opacity,.5) * .5)}
  40%{opacity:var(--scan-opacity,.5)}
  61%{opacity:calc(var(--scan-opacity,.5) * 1.9)}
  62%{opacity:calc(var(--scan-opacity,.5) * .3)}
  63%{opacity:var(--scan-opacity,.5)}
  85%{opacity:calc(var(--scan-opacity,.5) * 1.4)}
  86%{opacity:calc(var(--scan-opacity,.5) * .6)}
  87%{opacity:var(--scan-opacity,.5)}
}
body.crt-flicker .player-frame::after{animation:crt-flicker 7s infinite steps(1)}
/* Picture knobs + bloom live on the media itself, as plain
   filter functions only — never a url() here. A url() in the
   same declaration gets the whole filter dropped on
   cross-origin iframes (YouTube/Bongo), which also killed
   the picture knobs on those streams, and Chromium skips
   url() filters on hardware video. The SVG chroma filter
   lives on the frame instead (below). The fallback is an
   identity chain, never empty: an empty var() fallback
   makes the whole declaration invalid and drops the filter. */
.player-frame > video,
.player-frame > iframe{
  /* Direct children only: media wrapped in .player-media-wrap gets
     its picture filter from the wrapper's inline style instead
     (a filter on the wrapper forces the video into the wrapper's
     texture, so it lands even when the video element's own filter
     is bypassed in a hosted/iframe context). Every media mount
     now wraps (makeVideo, mountIframe, mountBongo, playYoutubeItem),
     so this var filter is only a fallback for any unwrapped frame. */
  filter:var(--pic-filter, brightness(1) contrast(1) saturate(1));
}
body.crt-bloom .player-frame > video,
body.crt-bloom .player-frame > iframe{
  filter:brightness(var(--bloom-brightness,1.1)) saturate(var(--bloom-saturate,1.1)) blur(var(--bloom-blur,0px)) var(--pic-filter, brightness(1) contrast(1) saturate(1));
}
/* Media wrapper (2026-11-09 fix): the picture filter lives on this
   wrapper as an inline style, not on the video/iframe itself. A
   filter on the wrapper forces the video into the wrapper's texture,
   so the knobs land on the picture even when the video element's
   own filter is bypassed (hosted page inside the Blockbuster
   iframe). z-index 0 keeps it below the scanlines/overlay/beams
   (z 2-3). */
.player-media-wrap{position:absolute;inset:0;z-index:0;overflow:hidden}
/* Curved glass: stronger tube radius than the Tube
   toggle alone. Fullscreen rules still win there, so
   curvature only applies in normal mode. */
body.crt-curve .player-frame{border-radius:28px / 22px}
/* Overscan: scale the media slightly, clipped by the
   frame's overflow:hidden. Bongo is excluded — its
   iframe already carries its own crop scale, and
   overscan must not break that fit. */
body.crt-overscan .player-frame video,
body.crt-overscan .player-frame iframe:not(.bongo-frame){
  transform:scale(var(--overscan-scale,1));
}

/* Real CA, on the FRAME (2026-11-09 fix): the SVG filter in
   index.html splits the channels. It used to sit on the
   video/iframe itself, where Chromium strips url() filters
   from cross-origin iframes (YouTube/Bongo) and skips them
   on hardware video — that's why chroma never showed on
   some streams, and why the picture knobs died with it
   there (one bad url() drops the whole filter list). On the
   frame it filters the composited picture, video and
   iframes alike, in normal, in-page fullscreen and real
   fullscreen alike (no mode overrides it). The scanlines
   and overlay inside get a 1-2px fringe too, which just
   reads as more CRT. Text CA is kept too, on the player
   meta text where it is actually visible. */
body.ca-on .player-frame{
  filter:url(#caFilter);
}
body.ca-on #channelTitle,
body.ca-on #channelDesc,
body.ca-on #nowPlaying,
body.ca-on .brand,
body.ca-on .epg-head h3,
body.ca-on .epg-row.active .epg-name{
  text-shadow:var(--ca,1.2px) 0 rgba(255,0,0,.35),var(--ca-neg,-1.2px) 0 rgba(0,255,255,.3);
}
body.ca-on .brand,
body.ca-on .epg-head h3,
body.ca-on .epg-row.active .epg-name{
  text-shadow:var(--ca,1.2px) 0 rgba(255,0,0,.35),var(--ca-neg,-1.2px) 0 rgba(0,255,255,.3);
}
/* TV static noise, REAL animated noise (2026-11-03, Nick):
   the old version was a still image (your uploaded
   static photo) with background-position jumps
   to fake animation — sliding one photo around, which
   is exactly why it looked still, especially in a 600ms
   burst. That image is no longer used at all. The noise
   is now drawn fresh every frame on a <canvas>: random
   black/white pixels, sized to the frame itself (~1
   screen pixel per noise pixel), at ~20fps, so every
   frame is genuinely different static,
   like a real TV. Opacity is still the slider value, so
   0 = invisible even with Noise on, 100 = full static.
   No reduced-motion guard on noise: Nick explicitly
   wants animated noise, so it animates even if the OS
   has reduced motion on. The CRT flicker guard further
   down is untouched. */
.tv-noise{
  position:absolute;
  inset:0;
  z-index:5;
  pointer-events:none;
  opacity:0;
  display:none;
}
.tv-noise canvas{
  width:100%;
  height:100%;
  display:block;
  /* No pixelated upscale: the canvas is sized to the
     frame itself (see drawNoiseFrame), so each noise
     pixel is ~1 screen pixel, not a big block. */
  image-rendering:auto;
}
body.noise-on .tv-noise{
  display:block;
  opacity:var(--noise-opacity,.3);
}
/* Channel-change static burst (2026-11-03, Nick): on every
   channel change the noise flashes on at high opacity for
   600ms, even if Noise is Off, like a real TV tuning —
   then it drops back to the Noise toggle/slider setting.
   The burst is the same canvas noise, not a still image;
   !important so it wins over both the Noise Off
   (display:none) and Noise On (slider opacity) rules. */
.tv-noise.burst{
  display:block !important;
  opacity:.9 !important;
}
/* Channel number display: big, themed, autohides (JS adds .show
   for 3s on channel/volume change). Era theming comes from the
   body[data-era] rules below, so it changes with the theme.
   Digital OSD fonts (2026-11-03, from onlinewebfonts.com
   search?q=digital, picked for a real TV readout look):
   DS-Digital is the main OSD font — classic thin
   seven-segment LCD, the most recognizable digital-clock
   face on that search page. Loaded remotely from
   OnlineWebFonts' own font CDN (db.onlinewebfonts.com),
   so no font files need shipping in the zip; if the CDN
   is unreachable the stack falls back to monospace, then
   Arial Black, so the number still reads. Other good
   picks from the same search, in case Nick wants a swap:
   Digital808 (bold, high-contrast, most readable),
   WW Digital (classic, slightly bolder seven-segment),
   DigitalICG (slanted LCD/calculator style),
   Digital-Mdm (bold seven-segment). */
@font-face{
  font-family:"DS-Digital";
  src:url("https://db.onlinewebfonts.com/t/63f874d192fb3892d88d5e26f942b5e2.eot");
  src:url("https://db.onlinewebfonts.com/t/63f874d192fb3892d88d5e26f942b5e2.eot?#iefix") format("embedded-opentype"),
      url("https://db.onlinewebfonts.com/t/63f874d192fb3892d88d5e26f942b5e2.woff2") format("woff2"),
      url("https://db.onlinewebfonts.com/t/63f874d192fb3892d88d5e26f942b5e2.woff") format("woff"),
      url("https://db.onlinewebfonts.com/t/63f874d192fb3892d88d5e26f942b5e2.ttf") format("truetype");
  font-weight:400;
  font-style:normal;
  font-display:swap;
}
.channel-osd{
  position:absolute;
  top:18px;
  left:18px;
  z-index:7;
  display:flex;
  align-items:baseline;
  gap:10px;
  padding:8px 14px;
  border-radius:8px;
  background:rgba(0,0,0,.65);
  color:var(--text);
  border:1px solid var(--accent);
  opacity:0;
  pointer-events:none;
  transition:opacity .25s ease;
}
.channel-osd.show{opacity:1}
.channel-osd .osd-num{font-size:48px;font-weight:400;line-height:1;color:var(--accent);font-family:"DS-Digital","Courier New",monospace;letter-spacing:2px;text-shadow:0 0 14px currentColor}
.channel-osd .osd-name{font-size:18px;font-weight:700}
.channel-osd .osd-vol{font-size:16px;color:var(--muted);font-family:"DS-Digital","Courier New",monospace;letter-spacing:1px}
body[data-era="90s"] .channel-osd{border-radius:2px;background:#000;border:2px solid #ffd34d}
body[data-era="90s"] .channel-osd .osd-num{color:#ffd34d}
body[data-era="2000s"] .channel-osd{border-radius:12px;background:rgba(8,25,40,.8);border-color:#5bd1ff;box-shadow:0 0 18px rgba(91,209,255,.35)}
body[data-era="2000s"] .channel-osd .osd-num{color:#5bd1ff}
body[data-era="80s"] .channel-osd{border-radius:4px;background:#12001f;border:2px solid #ff2e88;box-shadow:0 0 18px rgba(255,46,136,.45)}
body[data-era="80s"] .channel-osd .osd-num{color:#ff2e88}
body[data-era="midnight"] .channel-osd{border-radius:14px;background:rgba(10,10,35,.8);border-color:#a78bfa}
body[data-era="midnight"] .channel-osd .osd-num{color:#a78bfa}
/* In-page fullscreen: the player area fills the viewport (not the
   browser fullscreen API, so the page itself stays in control).
   Sidebar, guide and meta are hidden unless the EPG bar calls them. */
body.page-fullscreen .player-area{
  position:fixed;
  inset:0;
  z-index:200;
  padding:0;
  background:#000;
}
body.page-fullscreen .player-frame{
  width:100%;
  height:100%;
  aspect-ratio:auto;
  border-radius:0;
}
body.page-fullscreen .player-area .meta{display:none}
/* In-page fullscreen, the guide comes from the BOTTOM,
   not the right (2026-11-03, Nick): same bottom sheet as
   normal mode, overlaid on the fullscreen player, so the
   player stays full-width above it and the guide reads
   the same way in both modes. */
body.page-fullscreen .epg{
  position:fixed;
  left:0;
  right:0;
  top:auto;
  bottom:0;
  height:min(62vh,620px);
  width:auto;
  max-width:none;
  z-index:210;
  display:none;
  border-top:2px solid var(--guide-accent);
  border-left:0;
}
body.page-fullscreen .epg.open{display:flex}
/* Cable/satellite box look in in-page fullscreen (2026-11-03,
   Nick): when the guide is open, the video is NOT full
   screen behind it — it shrinks to a small window in the
   top-left corner, like a real cable/satellite box, and
   the guide fills the rest of the screen behind it. The
   guide banner is pushed right of the video window so its
   title, clock and Close button are not covered by it;
   the video window itself overlays the top-left corner
   of the guide grid, exactly like a box guide does. */
/* Guide goes AROUND the player, nothing hidden behind it
   (2026-11-03, Nick): the guide panel is full height, but
   its content is pushed down by exactly the video window's
   height + margins (padding-top = video height + 24px),
   so the banner, timebar and grid all start BELOW the
   video window. The grid scrolls inside its own box below
   the video, so no row ever scrolls under the video
   window — the guide flows around it instead of hiding
   behind it. */
body.page-fullscreen:has(.epg.open) .epg{
  height:100vh;
  padding-top:calc(min(360px,40vw) * 9 / 16 + 24px);
  box-sizing:border-box;
}
body.page-fullscreen:has(.epg.open) .player-area{
  background:transparent;
  z-index:220;
  pointer-events:none;
}
body.page-fullscreen:has(.epg.open) .player-frame{
  position:fixed;
  top:12px;
  left:12px;
  width:min(360px,40vw);
  height:auto;
  aspect-ratio:16/9;
  border-radius:8px;
  box-shadow:0 0 0 2px var(--guide-accent),0 8px 30px rgba(0,0,0,.8);
  pointer-events:auto;
  z-index:1;
}
.fs-bar{
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  z-index:8;
  display:none;
  justify-content:center;
  gap:10px;
  padding:10px;
  background:linear-gradient(180deg,transparent,rgba(0,0,0,.75));
  transition:opacity .25s ease;
}
body.page-fullscreen .fs-bar{display:flex}
body.page-fullscreen .fs-bar.hidden{opacity:0;pointer-events:none}
.fs-bar button{
  padding:8px 16px;
  border-radius:999px;
  border:1px solid var(--accent);
  background:rgba(0,0,0,.7);
  color:var(--text);
  font:inherit;
  cursor:pointer;
}
.fs-show-bar{
  position:absolute;
  right:12px;
  bottom:12px;
  z-index:9;
  display:none;
  padding:6px 12px;
  border-radius:999px;
  border:1px solid var(--accent);
  background:rgba(0,0,0,.7);
  color:var(--text);
  font:inherit;
  cursor:pointer;
}
body.page-fullscreen .fs-show-bar{display:block}
/* Real browser fullscreen: fullscreen the FRAME, not just the video,
   so every effect that lives inside the frame stays on — CRT
   scanlines (::after), TV noise,
   channel OSD, and the bottom bar are all descendants of
   .player-frame, so the browser's top layer includes them. Effects
   are still gated by their own toggles (body.fx-on / .ca-on /
   .noise-on): fullscreen does not force any effect on, it only
   keeps the ones you already have on. The video's own native
   fullscreen button cannot do this — it fullscreens only the
   video element, leaving the frame (and its effects) behind, so
   use the Real Fullscreen button for effects-on fullscreen. */
.player-frame:fullscreen{
  width:100vw;
  height:100vh;
  aspect-ratio:auto;
  border-radius:0;
  background:#000;
}
.player-frame:fullscreen video,
.player-frame:fullscreen iframe{
  width:100%;
  height:100%;
}
.player-frame:fullscreen .fs-bar{display:flex}
.player-frame:fullscreen .fs-bar.hidden{opacity:0;pointer-events:none}
.player-frame:fullscreen .fs-show-bar{display:block}
/* The page-wide CRT overlay (.app::after) lives outside the frame,
   so true fullscreen cannot show it — the frame's own scanlines
   (::after) are the ones that carry CRT in fullscreen, which is
   why they are kept identical in both modes. */
/* Bongo trick, inside the frame itself (corrected 2026-11-03:
   NO whole-page zoom, NO page fullscreen): the iframe is
   given Bongo's exact measured viewport (1919x998, see
   DEPLOY.md) and offset so the frame's window lands exactly
   on Bongo's player rectangle — left 460px, top 96px,
   1000x563px, 16:9 — and ONLY that rectangle is shown.
   The header (64px) + gap (32px) above it and the
   channel/about boxes below it fall outside the frame and
   are clipped by the frame's overflow:hidden. The player
   rectangle is then fitted to the frame with a uniform
   scale set in JS (--bongo-scale = min(frame width / 1000,
   frame height / 563), centered): fit, not fill, so the
   ENTIRE player is always visible and no edge is ever cut
   off, even when the frame's aspect is not 16:9 (fullscreen
   viewports). The player keeps its exact proportions with
   no stretching. This is NOT the
   old whole-page zoom: that scaled all of Bongo's page
   (header, margins and all). This crops to the player
   first, then fits only the player. Percentages were NOT
   used for the crop: Bongo's central column is capped at
   ~1000px, so the player's percentage changes with viewport
   width — a fixed measured viewport is the only geometry
   that reproduces the player rectangle exactly. Scroll
   lock, Bongo only: no scrollbars, no scrolling the framed
   Bongo page away from the player. */
.player-frame iframe.bongo-frame{
  width:1919px;
  height:998px;
  left:-460px;
  top:-96px;
  right:auto;
  bottom:auto;
  transform:scale(var(--bongo-scale,1));
  transform-origin:460px 96px;
  overflow:hidden;
  scrollbar-width:none;
}
.player-frame:has(iframe.bongo-frame){overflow:hidden}
/* Lock the frame on the player, Bongo only: the frame cannot
   be scrolled or panned off the player, and in normal mode it
   sticks to the top of the player area (so scrolling the guide
   below does not scroll the player away). Fullscreen modes are
   excluded — their fixed/:fullscreen rules own positioning
   there, and the lock class is cleared on any channel change. */
.player-frame.bongo-locked{
  overflow:hidden;
  overscroll-behavior:none;
}
body:not(.page-fullscreen) .player-frame.bongo-locked:not(:fullscreen){
  position:sticky;
  top:12px;
  z-index:5;
}
.player-frame.bongo-locked iframe.bongo-frame{
  /* Pinned, NOT inset:0 — inset:0 would override the
     crop offset (-460px/-96px) and un-crop the player. */
  position:absolute;
}
@media (max-width:1200px){
  .main{grid-template-columns:240px 1fr}
}
@media (max-width:900px){
  /* Narrow layout (tablet + phone): the player is the hero, not an
     afterthought. Single column, player FIRST at the top in 16:9,
     channel list BELOW taking the rest of the screen and scrolling.
     (The old layout stacked the sidebar on top and capped it at
     40vh, so the player was squeezed into a strip.) */
  .app{height:100vh;height:100dvh}
  .main{display:flex;flex-direction:column;grid-template-columns:none}
  .player-area{order:1;flex:none;padding:10px;gap:8px;overflow:visible}
  .player-frame{flex:none}
  .sidebar{order:2;flex:1;min-height:0;max-height:none;border-right:0;border-top:1px solid var(--border)}
  /* Topbar: one compact row, not three wrapped rows. The controls
     become a horizontal scroll strip (swipe through them) instead
     of wrapping and eating the screen. */
  .topbar{flex-wrap:nowrap;align-items:center;padding:8px 10px;gap:8px}
  .brand{font-size:15px}
  .now-playing{font-size:12px;min-width:0}
  .controls{flex:1;flex-wrap:nowrap;overflow-x:auto;justify-content:flex-start;scrollbar-width:none}
  .controls::-webkit-scrollbar{display:none}
  .controls button,.controls .ca-control{flex:none;min-height:40px}
  /* Guide: near full-screen sheet, wider station column. */
  .epg{--station-w:120px;height:92vh;height:92dvh}
  .epg.open{display:flex;inset:auto 0 0 0;border:0;border-top:2px solid var(--guide-accent)}
  .guide-banner{min-height:56px;padding:8px 10px;gap:10px}
  .guide-banner::before{width:120px}
  .guide-logo span{font-size:25px}
  .guide-logo b{font-size:14px}
  .guide-banner h3{font-size:15px}
  .guide-banner-sub{display:none}
  .guide-banner-side{gap:6px}
  .epg-clock{display:none}
  .guide-timebar{grid-template-columns:var(--station-w) repeat(48,var(--guide-slot-w,90px))}
  .guide-timebar > div{padding:4px 5px;font-size:10px}
  .guide-now-label{display:none}
  #guideNowTime{font-size:10px;letter-spacing:0}
  .guide-program{font-size:12px;padding:6px 8px}
}

/* Premium lineup manager */
.menu-btn{display:inline-flex;align-items:center;gap:6px}
.menu-lines{display:inline-flex;flex-direction:column;justify-content:center;gap:3px;width:14px}
.menu-lines i{display:block;height:2px;background:currentColor;border-radius:1px}
body[data-era="90s"] .menu-lines i{border-radius:0}
.menu-scrim{
  position:fixed;
  inset:0;
  z-index:60;
  background:rgba(0,0,0,.62);
  backdrop-filter:blur(2px);
}
.lineup-menu{
  position:fixed;
  top:0;
  right:0;
  bottom:0;
  z-index:61;
  width:min(430px,100vw);
  display:flex;
  flex-direction:column;
  gap:14px;
  overflow:auto;
  padding:16px;
  background:var(--panel);
  color:var(--text);
  border-left:1px solid var(--border);
  box-shadow:-18px 0 55px rgba(0,0,0,.55);
  transform:translateX(105%);
  transition:transform .24s ease;
}
body[data-era="90s"] .lineup-menu{background:linear-gradient(180deg,#241f17,#12100c);border-left-color:#5a4f3c}
body[data-era="2000s"] .lineup-menu{background:linear-gradient(180deg,#102235,#070e17);border-left-color:#2a4e6b}
.lineup-menu.open{transform:none}
body.menu-open{overflow:hidden}
.lineup-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.lineup-kicker{font-size:9px;letter-spacing:2px;color:var(--accent);font-weight:700}
.lineup-head h2{margin:3px 0 0;font-size:20px;letter-spacing:.4px}
.lineup-close,.lineup-premium,.lineup-actions button{
  background:var(--button);
  color:var(--text);
  border:1px solid var(--border);
  border-radius:var(--button-radius);
  padding:7px 10px;
  cursor:pointer;
  font:inherit;
  font-size:12px;
}
.lineup-close:hover,.lineup-premium:hover,.lineup-actions button:hover{border-color:var(--accent);color:var(--accent)}
.lineup-premium.on{background:var(--accent);color:var(--accent-contrast);border-color:var(--accent)}
.lineup-summary{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:10px 12px;
  border:1px solid var(--border);
  border-radius:var(--button-radius);
  background:var(--panel-2);
}
.lineup-count{display:flex;align-items:baseline;gap:4px;color:var(--muted);font-size:12px}
.lineup-count strong{font-size:20px;color:var(--accent);font-family:var(--brand-font)}
.lineup-note{margin:0;color:var(--muted);font-size:11px;line-height:1.45}
.lineup-section{display:flex;flex-direction:column;gap:7px}
.lineup-section-head{display:flex;align-items:baseline;justify-content:space-between;gap:8px}
.lineup-section-head h3{margin:0;font-size:11px;letter-spacing:1.4px;text-transform:uppercase;color:var(--text)}
.lineup-section-head span{font-size:10px;color:var(--muted)}
.package-list{display:flex;flex-direction:column;gap:6px}
.package-option{
  display:flex;
  align-items:flex-start;
  gap:9px;
  padding:8px 10px;
  border:1px solid var(--border);
  border-radius:var(--button-radius);
  background:var(--input-bg);
  cursor:pointer;
  transition:border-color .15s,background .15s;
}
.package-option:hover{border-color:var(--accent)}
.package-option.selected{border-color:color-mix(in srgb,var(--accent) 65%,var(--border));background:var(--active-bg)}
.package-option input,.cat-chip input{accent-color:var(--accent);margin:2px 0 0}
.package-copy{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1}
.package-copy b{font-size:12px;font-weight:600}
.package-copy small{font-size:10px;color:var(--accent)}
.package-copy em{font-size:10px;color:var(--muted);font-style:normal;line-height:1.35}
.category-list{display:flex;flex-wrap:wrap;gap:5px}
.cat-chip{
  display:inline-flex;
  align-items:center;
  gap:5px;
  padding:5px 7px;
  border:1px solid var(--border);
  border-radius:999px;
  background:var(--input-bg);
  color:var(--muted);
  font-size:10px;
  cursor:pointer;
}
.cat-chip:hover{border-color:var(--accent);color:var(--text)}
.cat-chip input{margin:0}
.cat-chip:has(input:checked){color:var(--text);border-color:var(--border)}
.cat-chip:has(input:not(:checked)){opacity:.62;text-decoration:line-through}
.daypart-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px}
.daypart-pill{
  display:flex;
  flex-direction:column;
  gap:2px;
  padding:7px 9px;
  border:1px solid var(--border);
  border-radius:var(--button-radius);
  background:var(--input-bg);
  font-size:10px;
}
.daypart-pill b{font-size:11px;color:var(--text)}
.daypart-pill small{font-size:9px;color:var(--muted)}
.daypart-pill.active{border-color:var(--accent);background:var(--active-bg);box-shadow:inset 2px 0 0 var(--accent)}
.lineup-actions{display:flex;justify-content:flex-end;gap:8px;padding-top:2px}
.lineup-actions #lineupApply{background:var(--accent);color:var(--accent-contrast);border-color:var(--accent);font-weight:700}
.guide-program.has-daypart{box-shadow:inset 0 -2px 0 rgba(255,255,255,.1)}
.guide-program[data-daypart="morning"]{box-shadow:inset 0 -2px 0 #ffd166}
.guide-program[data-daypart="daytime"]{box-shadow:inset 0 -2px 0 #8ee08a}
.guide-program[data-daypart="evening"]{box-shadow:inset 0 -2px 0 #ff9b54}
.guide-program[data-daypart="night"]{box-shadow:inset 0 -2px 0 #7ea8ff}
.guide-program[data-daypart="late"]{box-shadow:inset 0 -2px 0 #c39bff}
.guide-program[data-daypart="overnight"]{box-shadow:inset 0 -2px 0 #65dfe6}
.guide-daypart-tag{
  position:absolute;
  right:5px;
  bottom:1px;
  font-size:6.5px;
  letter-spacing:.7px;
  text-transform:uppercase;
  color:var(--guide-muted);
  opacity:.72;
  pointer-events:none;
}
@media (max-width:900px){
  .lineup-menu{width:min(390px,100vw);padding:12px}
  .guide-daypart-tag{display:none}
}
@media (max-width:600px){
  .lineup-menu{width:100vw;border-left:0}
  .daypart-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  /* Phones: the now-playing line lives below the player already
     (channel title + desc), so it doesn't need a topbar slot. */
  .now-playing{display:none}
  .brand{font-size:14px;letter-spacing:1px}
  /* Channel rows are thumb-sized: 48px minimum, roomier text. */
  .channel-list li{padding:12px 12px;min-height:48px;align-items:center}
  .ch-name{font-size:14px}
  .ch-cat{font-size:11px}
  #search{min-height:44px;font-size:16px;padding:10px 12px}
  /* Channel info below the player stays short so the list keeps
     most of the screen. */
  .meta h2{font-size:16px}
  .meta p{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
  .player-area{padding:8px}
  /* Guide station column narrower on a small phone, still readable. */
  .epg{--station-w:104px}
  .guide-ch{font-size:12px}
  .guide-call{font-size:12px}
  /* CRT panel goes full-width instead of a 320px card. */
  .crt-panel{left:12px;right:12px;width:auto;top:56px;max-height:calc(100vh - 72px);max-height:calc(100dvh - 72px)}
}

/* PIN lock (2026-11-04, Nick): dialog sits above
   everything except the gamepad cursor (9999), so the
   on-screen keypad is clickable with the right-stick
   cursor too. PIN is stored as a SHA-256 hash, never
   as plain text — this is a household lock, not
   encryption, and clearing site data resets it. */
.pin-dialog{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.75);
  z-index:400;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:16px;
}
.pin-dialog[hidden]{display:none}
.pin-box{
  background:var(--panel);
  color:var(--text);
  border:1px solid var(--border);
  border-radius:10px;
  padding:20px;
  width:min(320px,100%);
  box-shadow:0 10px 40px rgba(0,0,0,.7);
  text-align:center;
}
.pin-kicker{font-size:10px;letter-spacing:2px;color:var(--accent);font-weight:700}
.pin-box h2{margin:4px 0 6px;font-size:20px}
.pin-box p{font-size:13px;color:var(--muted);line-height:1.4}
#pinInput{
  width:120px;
  font-size:28px;
  letter-spacing:8px;
  text-align:center;
  background:var(--input-bg);
  color:var(--text);
  border:1px solid var(--border);
  border-radius:6px;
  padding:8px 6px 8px 14px;
  margin:10px 0;
}
.pin-keypad{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin:6px 0 10px}
.pin-keypad button,.pin-actions button{
  background:var(--button);color:var(--text);border:1px solid var(--border);
  border-radius:var(--button-radius);cursor:pointer;font:inherit;font-size:16px;padding:10px 6px;
}
.pin-actions{display:flex;gap:8px;justify-content:center}
.pin-actions button.primary,.pin-box button.primary{background:var(--accent);color:var(--accent-contrast);border-color:var(--accent)}
.pin-error{color:#ff6b6b !important}
.channel-locked{opacity:.65}
.channel-locked .ch-name{font-style:italic}
