/* Silver Frost / Black Glass. Presentation only: original DOM, geometry,
   profile accents, station artwork, brand marks and playback handlers remain. */
html:root {
  --bg:#070708;--bg-deep:#030304;--surface:#171719;--surface-2:#212124;
  --text:#f3f3f5;--muted:#b0b0b7;--line:rgba(255,255,255,.16);--radius:12px;
  --sg-panel:rgba(12,12,14,.66);--sg-dialog:rgba(18,18,21,.94);
  --sg-control:rgba(255,255,255,.065);--sg-field:rgba(0,0,0,.24);
  --sg-hover:rgba(255,255,255,.12);--sg-highlight:rgba(255,255,255,.14);
  --sg-shadow:rgba(0,0,0,.24);--sg-wash:rgba(150,150,160,.16);
  --sg-glow:rgba(75,75,82,.16);--sg-opaque:#151517;--sg-blur:24px;
  --glass:var(--sg-panel);--glass-border:var(--line);
  --glass-shadow:0 12px 32px var(--sg-shadow);
  --glass-highlight:inset 0 1px 0 var(--sg-highlight);
  color-scheme:dark;
}
html:root[data-theme="light"] {
  --bg:#cbd1d4;--bg-deep:#bbc3c8;--surface:#edf0f2;--surface-2:#e2e7ea;
  --text:#202b33;--muted:#52616c;--line:rgba(68,83,95,.2);
  --sg-panel:rgba(247,250,252,.61);--sg-dialog:rgba(243,247,249,.95);
  --sg-control:rgba(255,255,255,.38);--sg-field:rgba(255,255,255,.44);
  --sg-hover:rgba(255,255,255,.7);--sg-highlight:rgba(255,255,255,.8);
  --sg-shadow:rgba(37,48,58,.1);--sg-wash:rgba(255,255,255,.68);
  --sg-glow:rgba(143,165,177,.2);--sg-opaque:#edf0f2;color-scheme:light;
}
html:root,html:root body{background-color:var(--bg)!important;color:var(--text)}
html:root body{background-image:radial-gradient(ellipse at 12% 0%,var(--sg-wash),transparent 55%),radial-gradient(ellipse at 90% 35%,var(--sg-glow),transparent 65%)!important;background-attachment:fixed}
/* Blur is on a few parent surfaces, never on each scrolling guide row. */
html:root body :is(.topbar,.sidebar,.guide-section,.player-info,.player-guide,.player-channel-controls,.channel-jump,.now-playing){
  background:var(--sg-panel)!important;color:var(--text);border-color:var(--line)!important;
  box-shadow:inset 0 1px 0 var(--sg-highlight),0 12px 32px var(--sg-shadow)!important;
  backdrop-filter:blur(var(--sg-blur)) saturate(105%)!important;
  -webkit-backdrop-filter:blur(var(--sg-blur)) saturate(105%)!important;
}
html:root body :is(.guide-section,.player-info,.player-guide,.player-channel-controls,.channel-jump){border-radius:18px!important}
html:root body.sl-guide-polish:not(.movies-view) #featured{
  background:var(--sg-panel)!important;border-color:var(--line)!important;border-radius:18px!important;
  box-shadow:inset 0 1px 0 var(--sg-highlight),0 12px 32px var(--sg-shadow)!important;
  backdrop-filter:blur(var(--sg-blur))!important;-webkit-backdrop-filter:blur(var(--sg-blur))!important;
}
html:root body.sl-guide-polish:not(.movies-view) #featured .featured-copy{background:transparent!important;box-shadow:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;color:var(--text)}
html:root body :is(.app-shell,.main-content,.browse-panel){background:transparent!important}
html:root body :is(.guide-head,.guide-toolbar,.preview-control-row){background:transparent!important;border-color:var(--line)!important;box-shadow:none!important}
html:root body #channelArea :is(.guide-row,.channel-cell){background:transparent!important;border-color:var(--line)!important;box-shadow:none!important;color:var(--text)}
html:root body #channelArea :is(.program-info,.guide-program-block){background:var(--sg-control)!important;border-color:var(--line)!important;box-shadow:none!important;color:var(--text);border-radius:10px!important}
html:root body #channelArea .program-on-now{border-left:2px solid rgba(var(--channel-rgb,150,150,160),.6)!important}
html:root body :is(.guide-row small,.guide-head,.program-info small,.program-copy small,#featuredMeta,#visibleGuideStatusV69797){color:var(--muted)!important}
html:root body :is(#featuredTitle,.channel-name,.program-copy strong){color:var(--text)!important}
/* Existing button dimensions, labels, icons, focus rings and visibility stay intact. */
html:root body :is(.nav-link,.sl-icon-button,.button.secondary,.guide-lineup-switch button,.view-switch button,.category-button,.channel-step,.channel-utility,.player-top-clock,.channel-key,.player-search-result,.player-guide-row,.guide-back-to-top){
  background:var(--sg-control)!important;color:var(--text)!important;border-color:var(--line)!important;
  border-radius:11px!important;box-shadow:inset 0 1px 0 var(--sg-highlight)!important;text-shadow:none;
}
html:root body :is(.nav-link,.button.secondary,.category-button,.channel-step,.channel-utility,.channel-key,.player-search-result,.player-guide-row):hover{background:var(--sg-hover)!important}
html:root body :is(.nav-link.is-active,.category-button.is-active,.view-switch button.is-active,.player-guide-row.is-current){background:rgba(var(--accent-rgb),.12)!important;border-color:rgba(var(--accent-rgb),.38)!important}
html:root body :is(.nav-link.is-active,.category-button.is-active,.view-switch button.is-active) svg{color:var(--accent)!important}
html:root body :is(.searchbox,.guide-lineup-switch,.view-switch,.country-filter,.movie-search-field,.movie-sort,.settings-organizer,.settings-tabs){background:var(--sg-field)!important;border-color:var(--line)!important;border-radius:12px!important;box-shadow:inset 0 1px 0 var(--sg-highlight)!important;color:var(--text)}
html:root body :is(.setting-field,.searchbox,.movie-search-field,.guide-lineup-switch,.country-filter,.channel-search-panel) :is(input,select,textarea){color:var(--text)!important}
html:root body :is(.setting-field,.channel-search-panel) :is(input,select,textarea){background:var(--sg-field)!important;border-color:var(--line)!important;border-radius:10px!important}
html:root body select option{background:var(--sg-opaque);color:var(--text)}
html:root body input::placeholder,html:root body textarea::placeholder{color:var(--muted)}
/* Dialogs use denser glass to keep long settings and source lists readable. */
html:root body :is(.details-dialog,.preferences-dialog,.playlist-dialog,.reconnect-test-dialog,.instance-center-dialog,.source-discovery-dialog,.channel-package-dialog,.profile-dialog,.scan-panel){
  background:var(--sg-dialog)!important;color:var(--text)!important;border-color:var(--line)!important;border-radius:20px!important;
  box-shadow:inset 0 1px 0 var(--sg-highlight),0 18px 60px var(--sg-shadow)!important;
  backdrop-filter:blur(24px)!important;-webkit-backdrop-filter:blur(24px)!important;
}
html:root body :is(.details-channel,.details-facts,.details-timebar,.preferences-header,.preferences-actions,.setting-section,.settings-panel,.settings-content,.preferences-body,.settings-organizer){color:var(--text)!important;border-color:var(--line)!important}
html:root body :is(.details-channel,.details-timebar,.preferences-header,.preferences-actions,.settings-panel,.settings-content,.preferences-body){background:transparent!important}
html:root body :is(.details-note,.details-facts dt,.setting-field small,.setting-toggle small,.setting-note,.settings-panel small,.preferences-header small){color:var(--muted)!important}
html:root body :is(.details-matching-sources,.details-source-row,.setting-section,.lineup-choice-row,.lineup-swap-option){background:var(--sg-control)!important;border-color:var(--line)!important;border-radius:12px!important}
/* Restyle only the overlay surface and text. Logo tiles, ghost logos, brand
   watermarks, loading animations and their positions are intentionally untouched. */
html:root body .player-info :is(.player-title-button,.player-program>strong){color:var(--text)!important}
html:root body .player-info :is(.player-program>span,#playerDescription){color:var(--muted)!important}
html:root body .player-info .player-program{border-color:var(--line)!important}
html:root body .channel-tile{border-radius:16px!important;border-color:var(--line)!important;box-shadow:0 8px 24px var(--sg-shadow)!important}
html:root body .topbar :is(.icon-button,.profile-button),html:root body .preview-control-grid :is(.icon-button,.sl-icon-button){background:var(--sg-control)!important;color:var(--text)!important;border-color:var(--line)!important;border-radius:11px!important;box-shadow:inset 0 1px 0 var(--sg-highlight)!important}
html:root body .topbar .nav-link.is-active svg{color:var(--text)!important;stroke:currentColor!important}
html:root body #featured :is(.icon-button,.sl-icon-button,.button.secondary){background:var(--sg-control)!important;color:var(--text)!important;border-color:var(--line)!important;border-radius:11px!important;box-shadow:inset 0 1px 0 var(--sg-highlight)!important}
html:root body .details-program{background:var(--sg-control)!important;color:var(--text)!important;border-color:var(--line)!important;border-radius:12px!important;box-shadow:none!important}
html:root body .details-program :is(strong,span,p){color:var(--text)!important}
html:root body .player-navigation-label{color:var(--muted)!important}
html:root body :is(.home-feature-panel,.home-team-row,.home-week,.youtube-add-panel){background:var(--sg-panel)!important;border-color:var(--line)!important;border-radius:18px!important;box-shadow:inset 0 1px 0 var(--sg-highlight),0 12px 32px var(--sg-shadow)!important}
html:root[data-theme="light"] body :is(.home-feature-panel,.home-team-row,.home-week){--text:#202b33;--muted:#52616c;color:var(--text)!important}
html:root[data-theme="light"] body :is(.home-feature-panel,.home-team-row,.home-week) :is(h2,h3,header strong){color:var(--text)!important}
html:root[data-theme="light"] body #homeWeather.home-feature-panel{--text:#202b33;--muted:#52616c;color:var(--text)!important}
html:root[data-theme="light"] body #homeWeather :is(h2,.weather-temp,.weather-temperature,.weather-condition,.weather-now strong,[data-weather-refresh],.home-panel-toggle){color:var(--text)!important}
html:root body .home-feature-panel :is(.weather-day,.calendar-month-panel,.calendar-agenda,.calendar-event,.espn-day){background:var(--sg-control)!important;border-color:var(--line)!important;color:var(--text)!important}
html:root[data-theme="light"] body .home-feature-panel :is(.calendar-agenda-heading h2,.calendar-event strong,.calendar-day strong,.espn-league-filters button:not(.is-active)){color:var(--text)!important}
/* Top-bar actions: original elements and handlers, compact icon presentation. */
html:root body .topbar :is(#pcOpen,#openPreferences,#arcadeBack,.household-tools>summary){
  width:44px!important;min-width:44px!important;height:44px!important;min-height:44px!important;
  padding:10px!important;gap:0!important;flex:0 0 44px!important;align-items:center;justify-content:center;
  border-radius:11px!important;
}
html:root body .topbar :is(#pcOpen,#openPreferences,#arcadeBack,.household-tools>summary):not([hidden]){display:inline-flex!important}
html:root body .topbar :is(#pcOpen,#openPreferences,#arcadeBack,.household-tools>summary)>svg{width:22px!important;height:22px!important;flex:none;fill:none;stroke:currentColor;stroke-width:1.8}
html:root body .topbar #activeProfileName,html:root body .topbar .nav-link>span{
  position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;
  overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important;
}
@media(max-width:800px){html:root body .topbar :is(#pcOpen,#openPreferences,#arcadeBack,.household-tools>summary){width:36px!important;min-width:36px!important;height:36px!important;min-height:36px!important;flex-basis:36px!important;padding:7px!important}html:root body .topbar :is(#pcOpen,#openPreferences,#arcadeBack,.household-tools>summary)>svg{width:20px!important;height:20px!important}}
/* Honor existing low-power playback modes and reduced-transparency preference. */
html.silk-lite body :is(.topbar,.sidebar,.guide-section,.player-info,.player-guide,.player-channel-controls,.channel-jump,#featured),html:root body.silk-browser :is(.topbar,.sidebar,.guide-section,.player-info,.player-guide,.player-channel-controls,.channel-jump,#featured){backdrop-filter:none!important;-webkit-backdrop-filter:none!important;background:var(--sg-opaque)!important}
@media(prefers-reduced-transparency:reduce){html:root body :is(.topbar,.sidebar,.guide-section,.player-info,.player-guide,.player-channel-controls,.channel-jump,.now-playing,#featured,.details-dialog,.preferences-dialog){backdrop-filter:none!important;-webkit-backdrop-filter:none!important;background:var(--sg-opaque)!important}}

/* A VOD library can be thousands of pixels tall. Keep its translucent fill,
   but do not allocate a page-sized blur surface when native playback returns. */
html:root body.movies-view .guide-section{
 backdrop-filter:none!important;-webkit-backdrop-filter:none!important;
}

/* Each listing carries its station's color through translucent light-to-dark glass. */
html:root body #channelArea .guide-row .program-info{
 background:linear-gradient(105deg,rgba(var(--channel-rgb,120,140,180),.34) 0%,rgba(var(--channel-rgb,120,140,180),.18) 55%,rgba(5,7,12,.48) 100%)!important;
 border-color:rgba(var(--channel-rgb,120,140,180),.27)!important;
 box-shadow:inset 0 1px 0 rgba(255,255,255,.09)!important;
}
html:root body #channelArea .guide-row .program-info strong{color:#f5f7fa!important}
html:root body #channelArea .guide-row .program-info small{color:#d3dbe6!important;opacity:1}
html:root[data-theme="light"] body #channelArea .guide-row .program-info{
 background:linear-gradient(105deg,rgba(var(--channel-rgb,120,140,180),.08) 0%,rgba(var(--channel-rgb,120,140,180),.16) 55%,rgba(var(--channel-rgb,120,140,180),.26) 100%),linear-gradient(105deg,rgba(255,255,255,.40),rgba(0,0,0,.04))!important;
 box-shadow:inset 0 1px 0 rgba(255,255,255,.32)!important;
}
html:root[data-theme="light"] body #channelArea .guide-row .program-info strong{color:#17212b!important}
html:root[data-theme="light"] body #channelArea .guide-row .program-info small{color:#25313d!important}
