/* One saved appearance across documents and embedded routes. Media retains its original colors. */
html[data-appearance='light'],html[data-appearance='light'] body {
  color-scheme:light; background:#F2F4F1!important;color:#142630!important;
  --uno-background:#F2F4F1;--uno-surface:#FAFCFA;--uno-white:#142630;--uno-muted:#516670;
  --bg:#F2F4F1;--bg-soft:#EAF0ED;--surface:#FAFCFA;--surface-strong:#E3ECE7;--panel:#FAFCFA;--panel-strong:#E3ECE7;
  --text:#142630;--text-white:#142630;--text-muted:#516670;--muted:#516670;--text-main:#142630;--text-dim:#516670;
  --primary:#377D70;--accent:#377D70;--uno-cyan:#377D70;--uno-highlight:#377D70;--border-color:#CCD9D3;--card-bg:#FAFCFA;
}
html[data-appearance='light'] body :is(.tv-dashboard,.livetv-viewport,.library-page,.library-app,.settings-shell-stage,.detail-app,.setup-app,.connect-dialog,.setup-loader,.welcome-page,.app-splash,.portal-card,.admin-app,.main-content) {background:#F2F4F1!important;color:#142630!important}
html[data-appearance='light'] :is(.bg-room-layer,.vignette-layer,.welcome-background,.ambient-orb){opacity:.06!important}
html[data-appearance='light'] body :is(.nav-capsule,.app-settings-header,.detail-header,.uno-settings-menu,.uno-settings-brand,.setting-help,.group-card,.form-card,.language-card,.setting-options-card,.setting-option,.channel-card,.connect-choice,.method-card,.file-choice,.pair-panel,.pair-code-card,.demo-start-panel,.search-panel,.search-field-wrap,.modal-card,.confirmation-card,.profile-card,.source-manager-card,.panel,.drawer,.portal-card,.category-card,.icon-circle-btn,.round-control,.home-control,.rail-btn,.flag-wrap,.badge-tag,.setting-row,.netflix-select-button,.netflix-profile-editor,.profile-editor-card) {background:#FAFCFA!important;color:#142630!important;border-color:#D2DED8!important;box-shadow:none!important}
html[data-appearance='light'] body :is(h1,h2,h3,h4,label,.category-name,.channel-title,.stream-title,.library-tab,.row-title,.row-value,.card-title,.timeshift-label,.clock-display,.city-name,.temp-display,.today-label,.detail-title,.group-label,.setting-option,.step-back,.pair-back,.connect-settings,.shelf-title,.media-title,.demo-clock,.header-clock,.portal-header) {color:#142630!important}
html[data-appearance='light'] body :is(.row-subtitle,.channel-views,.category-count,.stream-description,.stream-info-content,.step-heading p,.connect-heading p,.source-help p,.pair-instructions li,.pair-countdown,.pair-phone-help p,.pair-status,.step-disclaimer,.connect-footer,.portal-footer,.portal-header p,.shelf-note,.media-subtitle,.welcome-subtitle,.welcome-status,.setting-help p,.uno-settings-heading p,.setting-options-card p,.card-description,.update-text,.humidity-label,.demo-start-panel p) {color:#516670!important}
html[data-appearance='light'] body :is(.channel-card.active,.category-item.active,.connect-choice:hover,.setting-option[aria-pressed='true'],.language-card.active,.uno-settings-menu a[aria-current],.rail-btn.active) {background:#DBEAE5!important;color:#142630!important;border-color:#70B8A5!important}
html[data-appearance='light'] body :is(button,a,input,select,textarea,[tabindex]):focus-visible {outline:3px solid #245E53!important;outline-offset:2px!important}
html[data-appearance='light'] body.uno-settings .setting-row:focus-within {background:#DBEAE5!important;box-shadow:inset 0 0 0 2px #245E53!important}
html[data-appearance='light'] body :is(input,select,textarea) {background:#FFF!important;color:#142630!important;border-color:#B7C9C0!important}
html[data-appearance='light'] input::placeholder,html[data-appearance='light'] textarea::placeholder {color:#61736B!important}
html[data-appearance='light'] body :is(.connect-button,.submit-btn,.primary-action) {background:#377D70!important;color:#FFF!important}
html[data-appearance='light'] .hero-tiger-container {background:#F2F4F1!important;border-color:#D2DED8!important}
html[data-appearance='light'] .hero-tiger-fade-bottom {background:linear-gradient(0deg,#F2F4F1 0%,#F2F4F1 34%,transparent 64%)!important}
html[data-appearance='light'] .hero-tiger-fade-left {display:none!important}
html[data-appearance='light'] body .stream-info-col {color:#142630!important}
html[data-appearance='light'] body :is(.timeline-times,.stream-subtitle,.stream-now-playing){color:#516670!important}
html[data-appearance='light'] body :is(.uno-logo,.welcome-logo,.portal-logo,.uno-settings-brand img){background:transparent!important;border:0!important;border-radius:0!important;padding:0!important;box-shadow:none!important;object-fit:contain;filter:url("#uno-light-logo-filter")!important}
html[data-appearance='light'] body .demo-preview-card :is(h3,p),html[data-appearance='light'] body :is(.hero-live-chip,.hero-live-chip strong){color:#F2F4F1!important}
html[data-appearance='light'] body .pair-portal-link{color:#245E53}
.appearance-toggle{font:inherit;border:1px solid #70B8A5;border-radius:24px;background:#18312A;color:#F2F4F1;padding:10px 18px;cursor:pointer;min-height:44px}
html[data-appearance='light'] .appearance-toggle{background:#DFEBE5;color:#142630}
.portal-header .appearance-toggle,.welcome-page .appearance-toggle{display:block;margin:18px auto}
html[data-appearance='light'] body :is(.stream-now-playing-tag,.timeline-labels,.timeline-labels span,#shellDate time,.stat-count,.card-metrics,.footer-right,.feature-title,.feature-description,.feature-meta) {color:#142630!important}
html[data-appearance='light'] body .hero-live-chip{background:#132320!important;color:#F2F4F1!important;box-shadow:none!important}
html[data-appearance='light'] body :is(.library-shell,.library-content,.content-shelves,.feature-hero,.card-glass-surface){background:#F2F4F1!important;color:#142630!important}
html[data-appearance='light'] body .card-glass-surface{background:#E4EEEA!important;border-color:#B8CEC3!important}
html[data-appearance='light'] body .custom-card-icon{color:#245E53}
html[data-appearance='light'] body .custom-card-icon [stroke='white'],html[data-appearance='light'] body .custom-card-icon [stroke='#fff']{stroke:#245E53}
html[data-appearance='light'] body .category-item .flag-wrap{background:#E1E9E5!important;color:#142630!important}
html[data-appearance='light'] body .nav-capsule{border-radius:40px}
/* Catalogue sections and their backdrop must inherit the same appearance as the shell. */
html[data-appearance='light'] body[data-library] :is(.library-main,.latest-toolbar,.media-shelf,.category-shelf,#shelves,.filter-bar,.filter-chips) {
  background:#F2F4F1!important;color:#142630!important;
}
html[data-appearance='light'] body[data-library] :is(.library-main,.feature-hero,.latest-toolbar)::before,
html[data-appearance='light'] body[data-library] :is(.library-main,.feature-hero,.latest-toolbar)::after {
  background:none!important;box-shadow:none!important;
}
html[data-appearance='light'] body[data-library] :is(.filter-chip,.filter-label,.library-count,.filter-summary,.search-status,.search-close) {
  background:transparent!important;color:#516670!important;border-color:#CDDAD3!important;
}
html[data-appearance='light'] body[data-library] .filter-chip.active {
  background:#DBEAE5!important;color:#245E53!important;border-color:#70B8A5!important;
}
html[data-appearance='light'] body[data-library] :is(.media-title,.section-title-wrap h2,.shelf-title,.search-result-title) {color:#142630!important}
html[data-appearance='light'] body[data-library] :is(.media-subtitle,.shelf-note,.empty-state) {color:#516670!important}
html[data-appearance='light'] body[data-library] .media-card:focus-visible .poster {outline-color:#245E53!important}

/* Settings navigation and contextual help have their own dark-theme colors. */
html[data-appearance='light'] body :is(.uno-settings-menu a,.uno-settings-rail a,.row-icon,.row-chevron) {
  color:#516670!important;
}
html[data-appearance='light'] body .uno-settings-menu a {color:#142630!important}
html[data-appearance='light'] body :is(.uno-help-eyebrow,.uno-help-description,.uno-help-value,.language-card .card-copy small) {
  color:#516670!important;
}
html[data-appearance='light'] body :is(.uno-settings-menu a:hover,.uno-settings-menu a:focus-visible) {
  background:#DBEAE5!important;
}
html[data-appearance='light'] body .uno-settings-rail a[aria-current] {color:#377D70!important}
html[data-appearance='light'] body :is(.app-settings-back,.back-pill) {
  background:#FAFCFA!important;color:#142630!important;border-color:#D2DED8!important;
}

.live-catalogue-empty{padding:24px;line-height:1.6;color:inherit}.live-catalogue-empty :is(a,button){display:inline-block;margin:16px 12px 0 0;padding:12px 18px;border:1px solid #70B8A5;border-radius:10px;background:transparent;color:inherit;font:inherit;cursor:pointer}.hero-tiger-container[hidden],.stream-info-col[hidden]{display:none!important}

.live-catalogue-empty a{text-decoration:none}.live-catalogue-unavailable :is(#searchToggleBtn,#settingsButton,#avatarBtn){display:none!important}

html[data-appearance='light'] body :is(.source-manager-main,.source-manager-copy strong,.source-mini-btn,.source-icon-btn){color:#142630!important}html[data-appearance='light'] body :is(.source-manager-copy>span,.source-manager-note){color:#516670!important}html[data-appearance='light'] body .source-icon-btn.danger{color:#AD3434!important}

/* Keep Home controls and profile labels legible on light surfaces. */
html[data-appearance='light'] :is(.custom-card-icon,.timeshift-icon,.top-controls .icon-svg) [stroke='#F2F4F1'] {stroke:#245E53!important}
html[data-appearance='light'] :is(.timeshift-icon,.top-controls .icon-svg) [fill='#F2F4F1'] {fill:#142630!important}
html[data-appearance='light'] :is(.profile-picker-card,.profile-picker-card:hover,.profile-picker-card:focus-visible) {color:#142630!important}
html[data-appearance='light'] :is(.profile-picker-card>small,.profile-security-note,.profiles-heading p) {color:#516670!important}
html[data-appearance='light'] .profiles-heading h2 {text-shadow:none!important}
html[data-appearance='light'] .profile-picker-add .profile-face {color:#245E53!important;background:#DFEBE5!important;border-color:#B7C9C0!important;box-shadow:none!important}

html[data-appearance='light'] body.home-reference .tv-dashboard .top-controls #settingsBtn {background:#FAFCFA!important;color:#142630!important;border-color:#D2DED8!important}
html[data-appearance='light'] .clock-display .ampm {color:#516670!important}

/* The navigation sits on the page background instead of a separate panel. */
html[data-appearance] body .nav-capsule,
html[data-appearance] body .nav-capsule .library-tabs,
html[data-appearance] body .nav-capsule .library-tab,
html[data-appearance] body .nav-capsule .home-control {
  background:transparent!important;
  box-shadow:none!important;
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
}
html[data-appearance] body .nav-capsule,
html[data-appearance] body .nav-capsule .library-tabs {border-color:transparent!important}

/* Missing provider artwork uses readable symbols/brand names in both themes. */
.artwork-group { font-size: 15px !important; letter-spacing: -.5px; }
.artwork-placeholder { color: var(--text-secondary, #71b9aa); font-size: 48px; }

.flag-wrap .artwork-brand { width: 70%; height: 70%; object-fit: contain; filter: brightness(0) invert(1); }

.flag-wrap .artwork-catalogue-group { width: 80%; height: 80%; object-fit: contain; }

/* Shared icon menu: the page remains its own backdrop; only the active tab is filled. */
html[data-appearance] body .nav-capsule .library-tabs {
  gap: clamp(6px, 1vw, 20px);
  padding: 4px;
}
html[data-appearance] body .nav-capsule .library-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 1vw, 18px);
  border: 0 !important;
  border-radius: 18px !important;
  font-weight: 600;
  text-decoration: none;
  overflow: visible;
  transition: background-color 180ms ease, color 180ms ease;
}
html[data-appearance] body .nav-capsule .library-tab::before {
  content: '';
  position: static;
  inset: auto;
  display: block;
  flex: 0 0 clamp(20px, 2vw, 32px);
  width: clamp(20px, 2vw, 32px);
  height: clamp(20px, 2vw, 32px);
  border-radius: 0;
  background: currentColor;
  opacity: 1;
  mask: var(--menu-icon) center / contain no-repeat;
  -webkit-mask: var(--menu-icon) center / contain no-repeat;
}
html body .nav-capsule .tv-tab { --menu-icon: url('../images/navigation/tv.svg'); }
html body .nav-capsule .movies-tab { --menu-icon: url('../images/navigation/movies.svg'); }
html body .nav-capsule .series-tab { --menu-icon: url('../images/navigation/series.svg'); }
html[data-appearance] body .nav-capsule .library-tab[aria-current="page"] {
  background: rgba(112,184,165,.18) !important;
  color: #91D8C5 !important;
  box-shadow: none !important;
}
html[data-appearance='light'] body .nav-capsule .library-tab[aria-current="page"] {
  background: #DFECE8 !important;
  color: #124D50 !important;
}
html[data-appearance] body .nav-capsule .library-tab:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}
@media(max-width:600px) {
  html[data-appearance] body .nav-capsule .library-tabs { gap: 4px; }
  html[data-appearance] body .nav-capsule .library-tab { gap: 5px; padding-inline: 6px; border-radius: 10px !important; }
  html[data-appearance] body .nav-capsule .library-tab::before { flex-basis: 16px; width: 16px; height: 16px; }
}

/* Settings keeps its category menu, without the global icon rail. */
html body.uno-settings .uno-settings-rail { display: none !important; }
html body.uno-settings .detail-app {
  grid-template-columns: minmax(180px,.8fr) minmax(350px,2fr) minmax(210px,1fr);
}
@media(max-width:1150px) {
  html body.uno-settings .detail-app { grid-template-columns: 190px minmax(0,1fr); }
}
@media(max-width:700px) {
  html body.uno-settings .detail-app { grid-template-columns: minmax(0,1fr); }
}

/* Keep the remote-focus ring inside the selected tab's rounded shape. */
html[data-appearance] body .nav-capsule .library-tab {
  box-sizing: border-box;
  border: 2px solid transparent !important;
  outline: none !important;
  outline-offset: 0 !important;
}
html[data-appearance] body .nav-capsule .library-tab:focus-visible {
  border-color: #91D8C5 !important;
  outline: none !important;
  box-shadow: none !important;
}
html[data-appearance='light'] body .nav-capsule .library-tab:focus-visible {
  border-color: #377D70 !important;
}

/* Preserve the welcome artwork in light mode instead of covering it with a solid page. */
html[data-appearance='light'] body .welcome-background {
  z-index: 0;
  opacity: 1 !important;
  background: linear-gradient(90deg,rgba(242,244,241,.86),rgba(242,244,241,.68),rgba(242,244,241,.86)),url('../images/bg-room.jpg') center/cover;
  filter: blur(4px);
  pointer-events: none;
}
html[data-appearance='light'] body .welcome-page {
  position: relative;
  z-index: 1;
  background: transparent !important;
  border-color: rgba(112,184,165,.25);
}
html[data-appearance='light'] body .welcome-page .language-card {
  background: rgba(250,252,250,.82) !important;
}
html[data-appearance='light'] body .welcome-page .language-card:is(:hover,:focus-visible) {
  background: rgba(219,234,229,.95) !important;
  border-color: #377D70 !important;
}

/* Scrolling must not expose the dark iframe canvas in the light theme. */
html,
body.player-app-shell,
html.playbox-embedded body {
  overscroll-behavior-y: none;
}
html[data-appearance='light'] :is(.player-content-stage, .player-content-frame) {
  background: #F2F4F1 !important;
}
html[data-appearance='light'].playbox-shell-handoff,
html[data-appearance='light'].playbox-shell-handoff body {
  background: #F2F4F1 !important;
}
