/* XtreamlyTV cross-platform type system.
   Arimo is metrically compatible with Arial and preserves the thinner,
   more traditional webOS typography while remaining redistributable. */
@font-face {
  font-family:'Arimo';
  src:url('../assets/fonts/arimo/Arimo-Regular.woff2') format('woff2');
  font-style:normal;
  font-weight:400;
  font-display:block;
}
@font-face {
  font-family:'Arimo';
  src:url('../assets/fonts/arimo/Arimo-Bold.woff2') format('woff2');
  font-style:normal;
  font-weight:700;
  font-display:block;
}

:root,
body[data-theme="teal"] {
  --bg: #071014;
  --bg-2: #08171d;
  --bg-3: #061014;
  --panel: #0e1d23;
  --panel-rgb: 14, 29, 35;
  --panel-strong: #10252c;
  --text: #f2f7f8;
  --muted: #8ea4aa;
  --zion-rating: #e6b325;
  --accent: #42e8c5;
  --accent-2: #55aaff;
  --accent-rgb: 66, 232, 197;
  --accent-ink: #05211d;
  --glow: rgba(66, 232, 197, .2);
  --danger: #ff6f7d;
  --focus: 0 0 0 4px rgba(66,232,197,.95), 0 16px 42px rgba(0,0,0,.48);
}

body[data-theme="gray"] {
  --bg: #101113;
  --bg-2: #181a1e;
  --bg-3: #0b0c0e;
  --panel: #202226;
  --panel-rgb: 32, 34, 38;
  --panel-strong: #2a2d32;
  --text: #f7f7f8;
  --muted: #a1a5ad;
  --accent: #e5e7eb;
  --accent-2: #9097a2;
  --accent-rgb: 229, 231, 235;
  --accent-ink: #17181a;
  --glow: rgba(229,231,235,.14);
  --focus: 0 0 0 4px rgba(229,231,235,.95), 0 16px 42px rgba(0,0,0,.52);
}

body[data-theme="purple"] {
  --bg: #10091b;
  --bg-2: #1a0d2a;
  --bg-3: #0b0712;
  --panel: #21142f;
  --panel-rgb: 33, 20, 47;
  --panel-strong: #2b193e;
  --text: #faf6ff;
  --muted: #ae9cbe;
  --accent: #b778ff;
  --accent-2: #6f8cff;
  --accent-rgb: 183, 120, 255;
  --accent-ink: #1b092d;
  --glow: rgba(183,120,255,.22);
  --focus: 0 0 0 4px rgba(183,120,255,.96), 0 16px 42px rgba(0,0,0,.5);
}

body[data-theme="pink"] {
  --bg: #170a13;
  --bg-2: #250d1c;
  --bg-3: #0e070c;
  --panel: #2d1625;
  --panel-rgb: 45, 22, 37;
  --panel-strong: #3b1b30;
  --text: #fff7fb;
  --muted: #c2a1b2;
  --accent: #ff76ba;
  --accent-2: #d66cff;
  --accent-rgb: 255, 118, 186;
  --accent-ink: #2e071b;
  --glow: rgba(255,118,186,.22);
  --focus: 0 0 0 4px rgba(255,118,186,.96), 0 16px 42px rgba(0,0,0,.5);
}

body[data-theme="blue"] {
  --bg: #07101d;
  --bg-2: #0a1930;
  --bg-3: #050b13;
  --panel: #10243b;
  --panel-rgb: 16, 36, 59;
  --panel-strong: #142e4b;
  --text: #f4f8ff;
  --muted: #91a8c2;
  --accent: #54b8ff;
  --accent-2: #6380ff;
  --accent-rgb: 84, 184, 255;
  --accent-ink: #061a2a;
  --glow: rgba(84,184,255,.22);
  --focus: 0 0 0 4px rgba(84,184,255,.96), 0 16px 42px rgba(0,0,0,.5);
}

* { box-sizing: border-box; }
html, body { width:100%; height:100%; margin:0; overflow:hidden; background:var(--bg); color:var(--text); }
body { font-family:'Arimo', Arial, Helvetica, sans-serif; font-feature-settings:'liga' 1; -webkit-font-smoothing:antialiased; }
button, input, select { font:inherit; }
button { color:inherit; }

#app {
  width:1920px;
  height:1080px;
  transform-origin:top left;
  overflow:hidden;
  background:
    radial-gradient(circle at 78% 12%, var(--glow), transparent 34%),
    radial-gradient(circle at 42% 92%, rgba(var(--accent-rgb),.09), transparent 34%),
    linear-gradient(135deg,var(--bg) 0%,var(--bg-2) 56%,var(--bg-3) 100%);
}

.screen { width:100%; height:100%; }
.focusable { outline:none; cursor:pointer; transition:transform .055s ease-out,background .055s ease-out,opacity .055s ease-out,border-color .055s ease-out; }
.focusable:focus,.focusable.is-focused { box-shadow:var(--focus); transform:scale(1.025); z-index:5; }

/* Login */
.login-screen { display:grid; grid-template-columns:1.08fr .92fr; padding:72px; gap:54px; align-items:center; }
.login-brand { padding:38px 42px; }
.brand-lockup { display:flex; align-items:center; gap:28px; }
.brand-lockup img { width:126px; height:126px; border-radius:31px; box-shadow:0 25px 80px var(--glow); }
.brand-lockup h1 { font-size:82px; margin:0; letter-spacing:-4px; line-height:.95; }
.brand-lockup span { display:block; margin-top:14px; color:var(--accent); font-weight:800; font-size:18px; letter-spacing:2px; text-transform:uppercase; }
.login-brand > p { color:var(--muted); font-size:29px; line-height:1.42; max-width:740px; margin:38px 0 0; }
.feature-pills { display:flex; flex-wrap:wrap; gap:13px; margin-top:35px; }
.feature-pill { background:rgba(255,255,255,.055); border:1px solid rgba(255,255,255,.08); padding:12px 18px; border-radius:999px; color:#d6e0e4; font-size:19px; }
.login-card { background:rgba(var(--panel-rgb),.94); border:1px solid rgba(255,255,255,.095); border-radius:32px; padding:45px; box-shadow:0 35px 100px rgba(0,0,0,.4); }
.login-card h2 { margin:0 0 9px; font-size:37px; }
.login-card .sub { color:var(--muted); font-size:19px; margin-bottom:30px; }
.form-error { color:#ff9ca5; margin-bottom:18px; font-size:18px; }
.field { display:block; margin-bottom:20px; }
.field span { display:block; color:#c1cdd2; font-size:16px; margin:0 0 8px 4px; }
.field input,.field select { width:100%; height:63px; border-radius:16px; border:1px solid rgba(255,255,255,.11); background:rgba(0,0,0,.25); color:var(--text); padding:0 20px; outline:none; font-size:20px; }
.field input:focus,.field select:focus { box-shadow:var(--focus); border-color:transparent; }
.field-row { display:grid; grid-template-columns:1fr 1fr; gap:18px; }
.primary-button,.secondary-button,.danger-button { min-height:62px; padding:0 24px; border:0; border-radius:16px; font-size:20px; font-weight:800; }
.primary-button { background:linear-gradient(135deg,var(--accent),var(--accent-2)); color:var(--accent-ink); }
.secondary-button { background:rgba(255,255,255,.08); color:var(--text); border:1px solid rgba(255,255,255,.05); }
.danger-button { background:rgba(255,111,125,.16); color:#ff9ca5; }
.button-row { display:flex; gap:16px; margin-top:11px; }
.button-row > * { flex:1; }
.login-note { margin-top:21px; color:var(--muted); opacity:.82; font-size:14px; line-height:1.45; }

/* Shell */
.shell { --sidebar:278px; display:grid; grid-template-columns:var(--sidebar) 1fr; width:100%; height:100%; }
.sidebar { padding:31px 22px 26px; background:rgba(2,5,8,.62); border-right:1px solid rgba(255,255,255,.065); display:flex; flex-direction:column; }
.logo { display:flex; align-items:center; gap:14px; padding:5px 15px 28px; font-size:30px; font-weight:900; letter-spacing:-1px; }
.logo img { width:47px; height:47px; border-radius:14px; }
.nav-list { display:flex; flex-direction:column; gap:9px; }
.nav-item { width:100%; height:61px; border:0; border-radius:17px; background:transparent; color:#a3b0b6; display:flex; align-items:center; gap:15px; padding:0 18px; text-align:left; font-size:19px; }
.nav-item.active { background:rgba(var(--accent-rgb),.13); color:var(--accent); }
.nav-icon { width:29px; text-align:center; font-size:23px; }
.sidebar-footer { margin-top:auto; color:var(--muted); opacity:.65; font-size:14px; padding:15px; line-height:1.5; }
.main { min-width:0; height:100%; padding:31px 40px 40px; overflow:hidden; }
.topbar { height:70px; display:flex; align-items:center; justify-content:space-between; margin-bottom:20px; }
.topbar h1 { font-size:34px; margin:0; letter-spacing:-1px; }
.topbar-right { display:flex; align-items:center; gap:17px; color:var(--muted); font-size:17px; }
.status-dot { width:10px; height:10px; border-radius:50%; background:var(--accent); box-shadow:0 0 14px rgba(var(--accent-rgb),.8); }
.view { height:calc(100% - 90px); overflow:hidden; }
.scroll-view { height:100%; overflow-y:auto; padding:4px 8px 72px 4px; scrollbar-width:none; }
.scroll-view::-webkit-scrollbar,.category-list::-webkit-scrollbar,.channel-grid::-webkit-scrollbar,.poster-grid::-webkit-scrollbar { display:none; }

/* Home */
.hero { position:relative; height:326px; border-radius:30px; overflow:hidden; background:linear-gradient(110deg,var(--panel-strong) 0%,rgba(var(--accent-rgb),.18) 48%,rgba(var(--panel-rgb),.82) 100%); border:1px solid rgba(255,255,255,.08); margin-bottom:28px; }
.hero-art { position:absolute; inset:0 0 0 40%; background:radial-gradient(circle at 58% 42%,rgba(var(--accent-rgb),.34),transparent 23%),linear-gradient(90deg,var(--panel-strong) 0%,transparent 44%),linear-gradient(135deg,rgba(var(--accent-rgb),.08),rgba(255,255,255,.03)); opacity:.9; }
.hero-lines { position:absolute; inset:0; opacity:.28; background-image:linear-gradient(rgba(255,255,255,.06) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.06) 1px,transparent 1px); background-size:55px 55px; -webkit-mask-image:linear-gradient(90deg,transparent,black); mask-image:linear-gradient(90deg,transparent,black); }
.hero-content { position:relative; z-index:2; padding:43px 49px; max-width:870px; }
.eyebrow { color:var(--accent); font-weight:900; text-transform:uppercase; letter-spacing:2px; font-size:15px; }
.hero h2 { font-size:47px; margin:14px 0 12px; max-width:760px; line-height:1.05; }
.hero p { color:#b5c2c8; font-size:20px; max-width:690px; line-height:1.4; margin:0 0 24px; }
.hero-actions,.detail-actions { display:flex; gap:14px; }
.hero-actions button { min-width:184px; }
.section { margin:0 0 29px; }
.section-head { display:flex; justify-content:space-between; align-items:end; margin-bottom:15px; }
.section h2 { margin:0; font-size:26px; }
.section-meta { color:var(--muted); font-size:15px; }
.shortcut-row { display:grid; grid-template-columns:repeat(3,1fr); gap:18px; padding:4px 8px 12px 4px; }
.shortcut-card { height:102px; border:1px solid rgba(255,255,255,.07); border-radius:21px; background:rgba(var(--panel-rgb),.88); display:grid; grid-template-columns:56px 1fr auto; align-items:center; gap:17px; padding:18px 22px; text-align:left; }
.shortcut-icon { width:54px; height:54px; display:grid; place-items:center; border-radius:16px; background:linear-gradient(135deg,rgba(var(--accent-rgb),.32),rgba(var(--accent-rgb),.1)); color:var(--accent); font-size:26px; }
.shortcut-card strong { display:block; font-size:22px; }
.shortcut-card small { display:block; color:var(--muted); margin-top:5px; font-size:15px; }
.shortcut-card b { color:var(--accent); font-size:34px; }
.channel-row,.poster-row,.mixed-row { display:flex; gap:18px; overflow:hidden; padding:5px 8px 14px 4px; }
.channel-card { flex:0 0 281px; min-height:182px; border:1px solid rgba(255,255,255,.065); border-radius:21px; background:rgba(var(--panel-rgb),.94); padding:18px; text-align:left; position:relative; }
.channel-top { display:flex; align-items:center; gap:15px; }
.channel-logo { width:63px; height:63px; border-radius:17px; background:#e7eef0; object-fit:contain; padding:7px; }
.channel-logo-fallback { width:63px; height:63px; border-radius:17px; background:linear-gradient(135deg,rgba(var(--accent-rgb),.24),rgba(255,255,255,.04)); display:grid; place-items:center; font-size:20px; font-weight:900; color:var(--accent); }
.channel-name { font-size:19px; font-weight:900; line-height:1.15; max-height:46px; overflow:hidden; }
.channel-number { color:var(--muted); font-size:13px; margin-top:6px; }
.now-line { margin-top:17px; color:#bfccd0; font-size:15px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.progress { height:5px; border-radius:5px; background:rgba(255,255,255,.08); margin-top:12px; overflow:hidden; }
.progress > i,.poster-progress > i,.episode-progress > i,.player-progress > i { display:block; height:100%; background:linear-gradient(90deg,var(--accent),var(--accent-2)); }
.favorite-badge { position:absolute; right:15px; top:14px; z-index:3; font-size:20px; color:#ff7b9b; text-shadow:0 2px 12px rgba(0,0,0,.5); }

/* Poster cards */
.poster-card { flex:0 0 198px; height:310px; border:1px solid rgba(255,255,255,.065); border-radius:20px; background:rgba(var(--panel-rgb),.94); padding:0; overflow:hidden; text-align:left; position:relative; }
.poster-art { height:230px; position:relative; overflow:hidden; background:linear-gradient(135deg,rgba(var(--accent-rgb),.22),rgba(255,255,255,.035)); }
.poster-art img { width:100%; height:100%; object-fit:cover; display:block; }
.poster-fallback { position:absolute; inset:0; display:none; place-items:center; background:radial-gradient(circle at 70% 20%,rgba(var(--accent-rgb),.36),transparent 34%),linear-gradient(145deg,var(--panel-strong),var(--bg)); }
.image-failed .poster-fallback { display:grid; }
.poster-fallback span { width:82px; height:82px; border-radius:25px; display:grid; place-items:center; background:rgba(var(--accent-rgb),.15); border:1px solid rgba(var(--accent-rgb),.3); color:var(--accent); font-size:27px; font-weight:900; }
.poster-copy { height:79px; padding:12px 14px 10px; }
.poster-copy strong { display:block; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; font-size:16px; }
.poster-copy span { display:block; color:var(--muted); font-size:13px; margin-top:7px; }
.poster-favorite { top:10px; right:11px; width:33px; height:33px; border-radius:50%; display:grid; place-items:center; background:rgba(0,0,0,.6); }
.poster-progress { position:absolute; height:5px; left:0; right:0; bottom:0; background:rgba(255,255,255,.1); }
.mixed-row .channel-card { flex-basis:281px; }
.mixed-row .poster-card { flex-basis:198px; }

/* Browser layouts */
.library-layout { height:100%; display:grid; grid-template-columns:294px 1fr; gap:26px; }
.category-list { background:rgba(var(--panel-rgb),.72); border:1px solid rgba(255,255,255,.065); border-radius:24px; padding:15px; overflow-y:auto; scrollbar-width:none; }
.category-button { width:100%; min-height:56px; border:0; border-radius:15px; padding:11px 16px; background:transparent; text-align:left; color:#9baeb5; font-size:17px; margin:3px 0; }
.category-button.active { background:rgba(var(--accent-rgb),.13); color:var(--accent); }
.library-browser { min-width:0; overflow:hidden; display:flex; flex-direction:column; }
.browser-tools { display:flex; gap:15px; margin-bottom:17px; align-items:center; }
.search-box { flex:1; height:59px; border:1px solid rgba(255,255,255,.09); background:rgba(var(--panel-rgb),.86); border-radius:17px; padding:0 20px; color:var(--text); outline:none; font-size:18px; }
.search-box:focus { box-shadow:var(--focus); }
.result-count { min-width:145px; text-align:right; color:var(--muted); font-size:16px; }
.channel-grid { flex:1; display:grid; grid-template-columns:repeat(4,1fr); grid-auto-rows:154px; gap:16px; overflow-y:auto; padding:4px 8px 65px 4px; scrollbar-width:none; }
.channel-tile { border:1px solid rgba(255,255,255,.065); border-radius:19px; background:rgba(var(--panel-rgb),.94); padding:16px; text-align:left; overflow:hidden; }
.channel-tile .channel-logo,.channel-tile .channel-logo-fallback { width:51px; height:51px; border-radius:14px; }
.channel-tile .channel-name { margin-top:12px; white-space:nowrap; text-overflow:ellipsis; overflow:hidden; font-size:17px; }
.channel-tile .channel-number { margin-top:5px; }
.poster-grid { flex:1; display:grid; grid-template-columns:repeat(5,1fr); grid-auto-rows:326px; gap:18px; overflow-y:auto; padding:4px 8px 65px 4px; scrollbar-width:none; }
.poster-grid .poster-card { width:100%; height:326px; min-width:0; }
.poster-grid .poster-art { height:244px; }
.empty-state { min-height:510px; border:1px dashed rgba(255,255,255,.13); border-radius:26px; display:grid; place-items:center; color:var(--muted); text-align:center; padding:40px; font-size:21px; line-height:1.5; }
.empty-state span { font-size:16px; }
.empty-state h2 { color:var(--text); margin:0 0 10px; }
.empty-state p { margin:0 0 22px; }
.grid-empty { grid-column:1/-1; height:100%; min-height:420px; }
.empty-icon { font-size:54px; margin-bottom:18px; color:var(--accent); }
.loading { height:100%; display:grid; place-items:center; color:var(--muted); font-size:22px; text-align:center; }
.spinner { width:54px; height:54px; border-radius:50%; border:5px solid rgba(255,255,255,.08); border-top-color:var(--accent); animation:spin .8s linear infinite; margin:0 auto 18px; }
@keyframes spin { to { transform:rotate(360deg); } }

/* Details */
.detail-scroll { padding-top:4px; }
.detail-hero,.series-hero { position:relative; min-height:650px; border-radius:28px; overflow:hidden; background:var(--panel); border:1px solid rgba(255,255,255,.08); }
.detail-backdrop,.series-hero-art { position:absolute; inset:0; opacity:.38; overflow:hidden; }
.detail-backdrop-art { width:100%; height:100%; position:relative; overflow:hidden; background:linear-gradient(135deg,var(--panel-strong),var(--bg)); }
.detail-backdrop-art img { width:100%; height:100%; object-fit:cover; filter:blur(2px); transform:scale(1.03); }
.detail-backdrop-art .poster-fallback { display:grid; }
.detail-backdrop-art .poster-fallback span { width:140px; height:140px; font-size:42px; }
.detail-gradient { position:absolute; inset:0; background:linear-gradient(90deg,rgba(4,7,10,.96) 0%,rgba(4,7,10,.86) 48%,rgba(4,7,10,.45) 78%,rgba(4,7,10,.7) 100%),linear-gradient(0deg,rgba(4,7,10,.8),transparent 45%); }
.detail-layout { position:relative; z-index:2; display:grid; grid-template-columns:335px 1fr; gap:42px; padding:53px; align-items:center; min-height:650px; }
.detail-poster,.series-poster { width:315px; height:470px; border-radius:22px; position:relative; overflow:hidden; background:var(--panel-strong); box-shadow:0 28px 70px rgba(0,0,0,.55); }
.detail-poster img,.series-poster img { width:100%; height:100%; object-fit:cover; }
.detail-poster .poster-fallback,.series-poster .poster-fallback { display:grid; }
.detail-copy h2,.series-summary h2 { font-size:54px; line-height:1.02; margin:15px 0 16px; max-width:900px; }
.metadata-row { display:flex; flex-wrap:wrap; gap:10px; margin-bottom:20px; }
.meta-chip { padding:8px 12px; border-radius:999px; background:rgba(255,255,255,.09); color:#d3dce0; font-size:15px; }
.detail-plot { color:#bdc8cd; font-size:20px; line-height:1.5; max-width:920px; margin:0 0 25px; }
.detail-warning { color:#ffb7c0; background:rgba(255,111,125,.12); border-radius:13px; padding:12px 15px; max-width:800px; }
.detail-facts { display:grid; gap:12px; margin-top:26px; max-width:900px; }
.detail-facts div { display:grid; grid-template-columns:100px 1fr; gap:18px; font-size:16px; }
.detail-facts span { color:var(--muted); }
.detail-facts strong { font-weight:600; color:#d8e0e4; }
.series-hero { min-height:405px; }
.series-summary { position:relative; z-index:2; display:grid; grid-template-columns:220px 1fr; align-items:center; gap:32px; padding:35px 43px; min-height:405px; }
.series-poster { width:205px; height:306px; border-radius:18px; }
.series-summary h2 { font-size:45px; }
.series-summary .detail-plot { font-size:18px; max-width:1000px; margin-bottom:20px; }
.episode-section { padding:27px 3px 70px; }
.season-row { display:flex; gap:12px; margin-bottom:22px; overflow:hidden; padding:5px; }
.season-button { min-width:133px; height:54px; border:1px solid rgba(255,255,255,.06); border-radius:15px; background:rgba(var(--panel-rgb),.88); color:var(--muted); padding:0 18px; }
.season-button.active { background:rgba(var(--accent-rgb),.17); color:var(--accent); }
.episode-grid { display:grid; grid-template-columns:1fr 1fr; gap:15px; }
.episode-card { min-height:115px; border:1px solid rgba(255,255,255,.065); border-radius:19px; background:rgba(var(--panel-rgb),.9); display:grid; grid-template-columns:54px 1fr 38px; align-items:center; gap:17px; text-align:left; padding:17px 20px; position:relative; overflow:hidden; }
.episode-number { width:49px; height:49px; display:grid; place-items:center; border-radius:15px; background:rgba(var(--accent-rgb),.13); color:var(--accent); font-weight:900; }
.episode-card strong { display:block; font-size:18px; }
.episode-card p { color:var(--muted); margin:7px 0 0; font-size:14px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:600px; }
.episode-play { color:var(--accent); font-size:21px; }
.episode-progress { position:absolute; left:0; right:0; bottom:0; height:5px; background:rgba(255,255,255,.08); }

/* Settings and skins */
.settings-grid { display:grid; grid-template-columns:1fr 1fr; gap:21px; }
.settings-card { background:rgba(var(--panel-rgb),.88); border:1px solid rgba(255,255,255,.07); border-radius:23px; padding:28px; }
.settings-card h3 { margin:0 0 8px; font-size:23px; }
.settings-card p { color:var(--muted); font-size:16px; line-height:1.45; margin:0 0 21px; }
.settings-card .field { margin-bottom:14px; }
.theme-card-wide { grid-column:1/-1; }
.theme-picker { display:grid; grid-template-columns:repeat(5,1fr); gap:14px; }
.theme-choice { min-height:93px; border:1px solid rgba(255,255,255,.07); border-radius:18px; background:rgba(255,255,255,.045); display:grid; grid-template-columns:48px 1fr 22px; gap:13px; align-items:center; padding:15px; text-align:left; }
.theme-choice.active { border-color:rgba(var(--accent-rgb),.45); background:rgba(var(--accent-rgb),.11); }
.theme-choice span { font-size:17px; font-weight:800; }
.theme-choice b { color:var(--accent); font-size:20px; }
.theme-preview { width:48px; height:48px; border-radius:15px; display:block; box-shadow:inset 0 0 0 1px rgba(255,255,255,.18); }
.theme-teal { background:linear-gradient(135deg,#42e8c5,#55aaff); }
.theme-gray { background:linear-gradient(135deg,#e5e7eb,#626975); }
.theme-purple { background:linear-gradient(135deg,#b778ff,#6f8cff); }
.theme-pink { background:linear-gradient(135deg,#ff76ba,#d66cff); }
.theme-blue { background:linear-gradient(135deg,#54b8ff,#6380ff); }

/* Player */
.player { position:absolute; inset:0; background:#000; z-index:50; }
.player video { width:100%; height:100%; object-fit:contain; background:#000; }
.player-shade { position:absolute; inset:0; background:linear-gradient(180deg,rgba(0,0,0,.58),transparent 28%,transparent 57%,rgba(0,0,0,.88)); opacity:0; transition:opacity .2s; pointer-events:none; }
.player.overlay .player-shade { opacity:1; }
.player-top { position:absolute; top:40px; left:54px; right:54px; display:flex; justify-content:space-between; align-items:center; opacity:0; transform:translateY(-10px); transition:.2s; }
.player.overlay .player-top { opacity:1; transform:none; }
.player-brand { display:flex; align-items:center; gap:12px; font-size:25px; font-weight:900; }
.player-brand img { width:40px; height:40px; border-radius:12px; }
.player-clock { font-size:20px; }
.player-bottom { position:absolute; left:54px; right:54px; bottom:45px; opacity:0; transform:translateY(12px); transition:.2s; }
.player.overlay .player-bottom { opacity:1; transform:none; }
.player-timeline { display:none; grid-template-columns:70px 1fr 70px; align-items:center; gap:14px; margin-bottom:22px; color:#d7dce0; font-size:14px; }
.player-progress { height:7px; border-radius:9px; background:rgba(255,255,255,.18); overflow:hidden; }
.player-info { display:grid; grid-template-columns:82px 1fr auto; align-items:center; gap:20px; }
.player-info .channel-logo,.player-info .channel-logo-fallback { width:82px; height:82px; border-radius:20px; }
.player-poster { width:72px; height:98px; border-radius:13px; overflow:hidden; position:relative; background:var(--panel); }
.player-poster img { width:100%; height:100%; object-fit:cover; }
.player-poster .poster-fallback { display:grid; }
.player-poster .poster-fallback span { width:45px; height:45px; border-radius:14px; font-size:16px; }
.player-channel { font-size:32px; font-weight:900; }
.player-program { color:#c6d0d5; font-size:19px; margin-top:7px; }
.player-program-description { color:#9eabb2; max-width:920px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; margin-top:7px; font-size:15px; }
.player-hints { text-align:right; color:#b2bec4; font-size:15px; line-height:1.85; }
.key { display:inline-grid; place-items:center; min-width:28px; height:24px; padding:0 6px; border-radius:7px; background:rgba(255,255,255,.16); color:white; margin:0 4px; }
.player-error { position:absolute; inset:0; display:grid; place-items:center; background:radial-gradient(circle at center,var(--panel-strong),#050608); text-align:center; padding:80px; }
.player-error h2 { font-size:36px; margin:0 0 12px; }
.player-error p { color:var(--muted); font-size:20px; max-width:800px; line-height:1.5; }

.toast { position:fixed; z-index:100; left:50%; bottom:43px; transform:translate(-50%,24px); background:var(--panel-strong); border:1px solid rgba(255,255,255,.1); padding:16px 23px; border-radius:15px; color:var(--text); font-size:17px; opacity:0; transition:.2s; pointer-events:none; box-shadow:0 18px 50px rgba(0,0,0,.35); }
.toast.show { opacity:1; transform:translate(-50%,0); }

@media (max-width:1500px) {
  .channel-grid { grid-template-columns:repeat(3,1fr); }
  .poster-grid { grid-template-columns:repeat(4,1fr); }
}

/* v0.3 performance architecture */
.category-button small { display:block; color:var(--muted); font-size:12px; margin-top:4px; opacity:.75; }
.catalog-status:empty { display:none; }
.catalog-status { flex:1; min-height:0; }
.catalog-loading,.catalog-error { height:100%; min-height:420px; border:1px dashed rgba(255,255,255,.12); border-radius:24px; display:grid; place-items:center; align-content:center; gap:14px; color:var(--muted); text-align:center; padding:40px; }
.catalog-loading { grid-template-columns:auto auto; }
.catalog-error h2 { margin:0; color:var(--text); font-size:29px; }
.catalog-error p { margin:0 0 8px; max-width:780px; font-size:18px; line-height:1.5; }
.small-spinner { width:36px; height:36px; border-width:4px; margin:0; }
.virtual-grid-host { display:block !important; position:relative; overflow-y:auto; overflow-x:hidden; padding:4px 8px 65px 4px; scrollbar-width:none; }
.virtual-grid-host::-webkit-scrollbar { display:none; }
.virtual-grid-inner { position:relative; width:100%; min-height:1px; }
.virtual-grid-host .channel-tile,.virtual-grid-host .poster-card { margin:0; }
.settings-secondary { margin-top:12px; width:100%; }
.diagnostic-pill { display:inline-block; padding:8px 11px; margin:4px 7px 0 0; border-radius:999px; background:rgba(var(--accent-rgb),.12); color:var(--accent); font-size:14px; }

#app.player-active .shell { visibility:hidden; }
.player { position:absolute; inset:0; width:1920px; height:1080px; overflow:hidden; background:#000; z-index:9999; isolation:isolate; }
.player-blackout { position:absolute; inset:0; background:#000; z-index:0; }
.player video { position:absolute; inset:0; width:100%; height:100%; object-fit:contain; background:#000; z-index:1; }
.player-shade { z-index:2; }
.player-top,.player-bottom { z-index:3; }
.player-loading { position:absolute; inset:0; z-index:4; display:grid; place-items:center; align-content:center; gap:14px; background:rgba(0,0,0,.32); color:#fff; transition:opacity .18s; }
.player-loading.hidden { opacity:0; pointer-events:none; }
.player-loading strong { font-size:23px; }
.player-loading span { color:#aeb8c0; font-size:15px; padding:7px 10px; border-radius:999px; background:rgba(255,255,255,.1); }
.player-error { z-index:6; }
#playerArtwork { width:82px; display:grid; place-items:center; }
#playerArtwork .player-poster { width:72px; }

/* v0.3.1 webOS video-plane and legacy layout compatibility */
.player-host {
  display:none;
  position:fixed;
  left:0;
  top:0;
  width:1920px;
  height:1080px;
  overflow:hidden;
  z-index:2147483000;
  background:transparent;
}
.player-host.active { display:block; }
html.video-mode,
body.video-mode { background:transparent !important; }
body.video-mode #app,
#app.player-active {
  visibility:hidden;
  background:transparent !important;
}

/* The video element must occupy the full logical FHD viewport at 0,0.
   Do not apply transform, border, opacity, or offsets to it or its host. */
.player-host .player {
  position:absolute;
  left:0;
  top:0;
  width:1920px;
  height:1080px;
  overflow:hidden;
  z-index:1;
  isolation:auto;
  background:transparent;
  transform:none !important;
  border:0;
}
.player-host .player video {
  position:absolute;
  left:0;
  top:0;
  width:1920px;
  height:1080px;
  z-index:0;
  display:block;
  object-fit:contain;
  background:#000;
  border:0;
  transform:none !important;
  opacity:1 !important;
}
.player-blackout { display:none !important; }
.player-shade {
  display:none;
  z-index:2;
  opacity:1;
  transition:none;
}
.player.overlay .player-shade { display:block; opacity:1; }
.player-top,
.player-bottom {
  display:none;
  z-index:3;
  opacity:1;
  transform:none;
  transition:none;
}
.player.overlay .player-top,
.player.overlay .player-bottom {
  display:flex;
  opacity:1;
  transform:none;
}
.player.overlay .player-bottom { display:block; }
.player-loading {
  position:absolute;
  left:50%;
  top:50%;
  right:auto;
  bottom:auto;
  width:420px;
  min-height:150px;
  margin-left:-210px;
  margin-top:-75px;
  z-index:4;
  display:grid;
  place-items:center;
  align-content:center;
  gap:14px;
  padding:24px;
  border-radius:24px;
  background:rgba(5,8,12,.88);
  box-shadow:0 24px 70px rgba(0,0,0,.55);
  color:#fff;
  transition:none;
}
.player-loading.hidden { display:none; }
.player-error { z-index:6; }
.toast { z-index:2147483647; }

/* Older webOS Chromium builds do not consistently support flexbox gap. */
.topbar-right { gap:0; white-space:nowrap; }
.status-cluster { display:flex; align-items:center; min-width:0; }
.status-cluster .status-dot { flex:0 0 auto; margin-right:10px; }
.status-text { display:inline-block; line-height:1.2; }
.topbar-clock { display:inline-block; min-width:92px; margin-left:20px; padding-left:2px; text-align:right; color:var(--text); }

.hero-actions,
.detail-actions,
.button-row {
  flex-wrap:wrap;
  gap:0;
}
.hero-actions > *,
.detail-actions > * { margin:7px 14px 7px 0; }
.button-row { margin:4px -7px -7px; }
.button-row > * { flex:1 1 190px; min-width:190px; margin:7px; }
.detail-actions button { min-width:180px; max-width:100%; }
.browser-tools { gap:0; }
.browser-tools > * + * { margin-left:15px; }
.player-brand { gap:0; }
.player-brand img { margin-right:12px; }
.player-info { min-width:0; }
.player-info > div:nth-child(2) { min-width:0; }
.player-hints { min-width:245px; margin-left:22px; }

/* Reduce focus growth where controls sit close together. */
.nav-item:focus,
.category-button:focus,
.season-button:focus,
.theme-choice:focus,
.hero-actions .focusable:focus,
.detail-actions .focusable:focus,
.button-row .focusable:focus,
.browser-tools .focusable:focus {
  transform:scale(1.012);
}


/* v0.3.2 interaction and spacing polish */
.sidebar-footer { display:none !important; }

/* Keep focus changes immediate on TV hardware and avoid expensive scaling/clipping. */
.channel-card:focus,
.channel-tile:focus,
.poster-card:focus,
.shortcut-card:focus,
.channel-card.is-focused,
.channel-tile.is-focused,
.poster-card.is-focused,
.shortcut-card.is-focused {
  transform:none;
}

/* Give home rows a real horizontal viewport and enough breathing room for focus rings. */
.scroll-view { padding:8px 18px 84px 10px; }
.channel-row,
.poster-row,
.mixed-row {
  overflow-x:auto;
  overflow-y:hidden;
  padding:10px 14px 22px 10px;
  scroll-behavior:auto;
  -webkit-overflow-scrolling:auto;
}
.channel-row::-webkit-scrollbar,
.poster-row::-webkit-scrollbar,
.mixed-row::-webkit-scrollbar { display:none; }
.section { padding:0 2px; }
.section-head { padding:0 10px 0 6px; }

/* Legacy webOS does not reliably implement flex gap; use margins as a fallback. */
.channel-top { gap:0; min-width:0; }
.channel-top > * + * { margin-left:18px; }
.channel-top > div:last-child { min-width:0; flex:1 1 auto; }
.channel-card .channel-name {
  display:block;
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
}
.channel-tile .channel-top > * + * { margin-left:14px; }
.channel-tile .channel-name { margin-top:14px; }

/* Slightly roomier cards prevent logos, titles and progress bars from crowding. */
.channel-card { padding:20px; min-height:190px; }
.channel-card .now-line { margin-top:20px; }
.channel-grid { padding:8px 14px 72px 8px; }
.channel-tile { padding:18px; }
.virtual-grid-host { padding:8px 14px 72px 8px; }

/* Keep headers and counts away from the panel edges. */
.browser-tools { padding:2px 10px 2px 4px; }
.result-count { padding-right:4px; }
.topbar { padding-right:8px; }

/* Reduce GPU-heavy glow while preserving a clear remote focus target. */
.focusable:focus,
.focusable.is-focused {
  box-shadow:0 0 0 4px rgba(var(--accent-rgb),.96), 0 8px 22px rgba(0,0,0,.38);
}


/* v0.3.3 safe-area, Home navigation, and focus polish */
.shell { --sidebar:310px; }
.sidebar { padding:36px 28px 44px 34px; }
.main { padding:34px 64px 60px 50px; }
.topbar { margin-bottom:22px; padding:0 10px 0 4px; }
.view { height:calc(100% - 92px); }

/* Reserve a consistent television-safe area on every scrollable edge. */
.scroll-view { padding:12px 34px 122px 14px; scroll-padding:28px 34px 96px 14px; }
.section { padding:0 8px 0 4px; margin-bottom:34px; }
.section-head { padding:0 18px 0 8px; margin-bottom:18px; }
.channel-row,
.poster-row,
.mixed-row {
  padding:12px 26px 30px 12px;
  scroll-padding-left:12px;
  scroll-padding-right:26px;
}

/* Use an inset focus ring on cards so no edge can be clipped by a scrolling row. */
.channel-card:focus,
.channel-tile:focus,
.poster-card:focus,
.shortcut-card:focus,
.channel-card.is-focused,
.channel-tile.is-focused,
.poster-card.is-focused,
.shortcut-card.is-focused {
  border-color:rgba(var(--accent-rgb),.92);
  box-shadow:inset 0 0 0 4px rgba(var(--accent-rgb),.96), 0 7px 18px rgba(0,0,0,.28);
}

/* Catalog browser safe area. */
.library-layout { gap:30px; padding:8px 10px 18px 8px; }
.category-list { padding:18px 16px 28px; }
.library-browser { padding:0 12px 18px 0; }
.browser-tools { flex:0 0 auto; padding:8px 14px 10px 8px; margin-bottom:14px; }
.search-box { min-width:0; }
.result-count { min-width:130px; padding-right:8px; }
.channel-grid,
.poster-grid,
.virtual-grid-host { padding:10px 20px 100px 10px; }
.virtual-grid-inner { max-width:100%; }

/* Maintain explicit logo-to-copy separation on every channel presentation. */
.channel-card .channel-top > * + *,
.channel-tile .channel-top > * + * { margin-left:20px; }

/* v0.3.4 media-specific grids, integrated branding, and settings polish */
.ui-icon,
.nav-svg,
.shortcut-svg { display:block; width:100%; height:100%; overflow:visible; }

/* Use the app mark as the X in XtreamlyTV rather than showing a second X in text. */
.logo { gap:3px; padding-left:10px; white-space:nowrap; }
.logo img { width:43px; height:43px; border-radius:0; object-fit:contain; }
.logo span { margin-left:-1px; letter-spacing:-1.25px; }
.nav-icon { display:grid; place-items:center; width:29px; height:29px; }
.nav-svg { width:25px; height:25px; }

/* The Home hero now starts directly with the title. */
.hero-content > h2:first-child { margin-top:0; }

/* Shortcut cards use clear media icons without trailing chevrons. */
.shortcut-card { grid-template-columns:58px minmax(0,1fr); gap:18px; }
.shortcut-card b { display:none !important; }
.shortcut-icon { width:56px; height:56px; }
.shortcut-svg { width:31px; height:31px; }

/* Provider and About sections. */
.provider-card-wide { grid-column:1/-1; }
.provider-settings-grid {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:0 18px;
}
.provider-settings-grid .provider-server { grid-column:1/-1; }
.settings-actions { display:flex; flex-wrap:wrap; margin:-5px; }
.settings-actions > * { min-width:220px; margin:5px; }
.about-list { display:grid; gap:0; border-top:1px solid rgba(255,255,255,.07); }
.about-list > div {
  display:grid;
  grid-template-columns:145px minmax(0,1fr);
  gap:18px;
  padding:13px 0;
  border-bottom:1px solid rgba(255,255,255,.07);
  align-items:start;
}
.about-list span { color:var(--muted); }
.about-list strong { color:var(--text); font-weight:700; overflow-wrap:anywhere; }

/* Make the category and content panes share the same bottom edge. */
.library-layout {
  grid-template-columns:304px minmax(0,1fr);
  gap:28px;
  padding:8px 16px 26px 8px;
  align-items:stretch;
  min-height:0;
}
.category-list,
.library-browser { height:100%; min-height:0; }
.category-list { padding:18px 16px 22px; }
.library-browser { padding:0; }
.browser-tools {
  min-height:78px;
  padding:8px 12px 12px 8px;
  margin:0;
  flex:0 0 auto;
}
.search-box { height:62px; padding:0 23px; }
.result-count { min-width:142px; padding-right:6px; }
.catalog-status { min-height:0; }

/* Focus rings are inset, so catalog viewports no longer need oversized hidden padding. */
.channel-grid,
.poster-grid,
.virtual-grid-host {
  flex:1 1 auto;
  min-height:0;
  width:100%;
  padding:8px 10px 8px 8px;
  scroll-padding:8px 10px 8px 8px;
}
.virtual-grid-inner { width:100%; max-width:100%; }

/* Live TV: exactly four columns and four measured visible rows. */
.catalog-live .channel-tile {
  display:flex;
  align-items:stretch;
  justify-content:center;
  flex-direction:column;
  padding:20px 20px;
}
.catalog-live .channel-top { width:100%; align-items:center; }
.catalog-live .channel-logo,
.catalog-live .channel-logo-fallback {
  flex:0 0 60px;
  width:60px;
  height:60px;
  border-radius:16px;
}
.catalog-live .channel-top > * + * { margin-left:20px; }
.channel-tile-copy { min-width:0; flex:1 1 auto; }
.catalog-live .channel-name {
  margin:0;
  font-size:18px;
  line-height:1.2;
  max-height:44px;
  white-space:normal;
  display:block;
  overflow:hidden;
}
.catalog-live .channel-number { margin-top:8px; font-size:13px; }

/* Movies and Series: five tall posters across and two measured rows high. */
.catalog-movies .poster-card,
.catalog-series .poster-card {
  display:flex;
  flex-direction:column;
  width:100%;
  min-width:0;
}
.catalog-movies .poster-art,
.catalog-series .poster-art {
  flex:1 1 auto;
  height:auto;
  min-height:0;
}
.catalog-movies .poster-copy,
.catalog-series .poster-copy {
  flex:0 0 78px;
  height:78px;
  padding:12px 14px 10px;
}

@media (max-width:1500px) {
  /* The logical app canvas remains 1920px on TV; keep the intended virtual-grid geometry. */
  .catalog-live .channel-grid { grid-template-columns:repeat(4,1fr); }
  .catalog-movies .poster-grid,
  .catalog-series .poster-grid { grid-template-columns:repeat(5,1fr); }
}

/* v0.3.5 deterministic catalog windows, settings entry state, and modern playback controls */
.category-list {
  display:grid;
  grid-template-rows:repeat(13,minmax(0,1fr));
  gap:2px;
  overflow:hidden;
  padding:12px 14px;
  box-sizing:border-box;
}
.category-button {
  min-height:0;
  height:auto;
  margin:0;
  padding:7px 14px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  overflow:hidden;
  line-height:1.15;
  white-space:nowrap;
  text-overflow:ellipsis;
}
.category-button small {
  flex:0 0 auto;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  margin-top:3px;
}

.virtual-grid-host {
  box-sizing:border-box;
  overscroll-behavior:contain;
  scroll-behavior:auto;
}
.virtual-grid-inner { box-sizing:border-box; }
.virtual-grid-host .channel-tile,
.virtual-grid-host .poster-card {
  box-sizing:border-box;
  scroll-snap-align:start;
}

.provider-summary {
  display:grid;
  grid-template-columns:1.4fr 1fr .7fr;
  gap:14px;
  margin:0 0 20px;
}
.provider-summary > div {
  min-width:0;
  padding:15px 17px;
  border:1px solid rgba(255,255,255,.07);
  border-radius:16px;
  background:rgba(255,255,255,.035);
}
.provider-summary span {
  display:block;
  color:var(--muted);
  font-size:13px;
  margin-bottom:6px;
}
.provider-summary strong {
  display:block;
  overflow:hidden;
  white-space:nowrap;
  text-overflow:ellipsis;
  font-size:16px;
}
.provider-summary-actions { margin-bottom:0; }
.provider-editor {
  margin-top:22px;
  padding-top:22px;
  border-top:1px solid rgba(255,255,255,.08);
}
.provider-editor[hidden], #playlistFields[hidden], #xtreamFields[hidden] { display:none !important; }

.player-brand {
  display:flex;
  align-items:center;
  gap:0;
  white-space:nowrap;
}
.player-brand img {
  width:43px;
  height:43px;
  margin-right:2px;
  border-radius:0;
  object-fit:contain;
}
.player-brand span {
  margin-left:-2px;
  letter-spacing:-1px;
}
.player-timeline {
  grid-template-columns:76px minmax(0,1fr) 76px 112px;
  gap:14px;
  margin-bottom:16px;
  align-items:center;
}
.player-progress {
  position:relative;
  overflow:visible;
  height:8px;
}
.player-progress > i {
  border-radius:9px;
  overflow:hidden;
}
.player-progress > b {
  position:absolute;
  top:50%;
  width:18px;
  height:18px;
  margin-left:-9px;
  margin-top:-9px;
  border-radius:50%;
  background:#fff;
  box-shadow:0 0 0 4px rgba(var(--accent-rgb),.3),0 3px 10px rgba(0,0,0,.45);
}
.go-live-button,
.player-transport button {
  border:1px solid rgba(255,255,255,.14);
  border-radius:12px;
  background:rgba(0,0,0,.48);
  color:#fff;
  height:42px;
  padding:0 17px;
  font-size:15px;
  font-weight:800;
}
.go-live-button:disabled { opacity:.48; }
.go-live-button.behind-live {
  color:var(--accent);
  border-color:rgba(var(--accent-rgb),.55);
  background:rgba(var(--accent-rgb),.13);
}
.player-transport {
  display:flex;
  align-items:center;
  justify-content:center;
  margin:0 0 18px;
}
.player-transport button { min-width:78px; margin:0 6px; }
.player-transport .play-pause-button {
  min-width:118px;
  background:rgba(var(--accent-rgb),.22);
  border-color:rgba(var(--accent-rgb),.58);
}
.player.paused .play-pause-button { color:var(--accent); }
.green-key { color:#66f08c; }

@media (max-width:1500px) {
  .provider-summary { grid-template-columns:1fr; }
}

/* v0.3.7 menu favorites, Home copy spacing, and reconnect focus polish */
.menu-hint {
  position:absolute;
  right:68px;
  bottom:24px;
  z-index:40;
  display:flex;
  align-items:center;
  gap:11px;
  min-height:38px;
  padding:7px 13px;
  border:1px solid rgba(255,255,255,.1);
  border-radius:12px;
  background:rgba(3,8,11,.82);
  color:#d9e4e8;
  font-size:14px;
  font-weight:700;
  opacity:0;
  transform:translateY(8px);
  transition:opacity .12s ease-out,transform .12s ease-out;
  pointer-events:none;
}
.menu-hint.visible { opacity:1; transform:none; }
.menu-key {
  display:inline-grid;
  place-items:center;
  min-width:42px;
  height:24px;
  padding:0 7px;
  border-radius:7px;
  color:#fff;
  font-size:11px;
  font-weight:900;
  letter-spacing:.45px;
}
.menu-key-red { background:#cf354b; box-shadow:0 0 12px rgba(207,53,75,.28); }

/* Give every shortcut card balanced interior space, including its category count. */
.shortcut-row { gap:20px; padding:8px 18px 18px 8px; }
.shortcut-card {
  height:126px;
  min-height:126px;
  grid-template-columns:62px minmax(0,1fr);
  align-items:center;
  gap:20px;
  padding:22px 26px;
  overflow:hidden;
}
.shortcut-icon { width:60px; height:60px; border-radius:18px; }
.shortcut-copy {
  min-width:0;
  min-height:66px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  padding:3px 0;
}
.shortcut-card strong { margin:0; font-size:23px; line-height:1.16; }
.shortcut-card small { margin:8px 0 0; font-size:15px; line-height:1.2; }

.favorites-group + .favorites-group { margin-top:34px; }
.favorites-groups .section-head h2 { font-size:29px; }
#app { position:relative; }

/* v0.4.1 favorite collections and living-room typography polish */
.topbar h1 { font-size:38px; }
.logo { font-size:32px; }
.nav-item {
  height:65px;
  gap:0;
  font-size:21px;
  padding:0 20px;
}
.nav-item .nav-icon {
  width:31px;
  height:31px;
  margin-right:22px;
  flex:0 0 31px;
}
.nav-svg { width:27px; height:27px; }
.section h2 { font-size:29px; }
.section-meta { font-size:16px; }
.category-button { font-size:18px; }
.search-box { font-size:19px; }
.result-count { font-size:17px; }
.channel-name { font-size:20px; }
.poster-copy strong { font-size:17px; }

/* Older webOS Chromium versions do not consistently honor flex gap. */
.menu-hint { gap:0; }
.menu-hint > * + * { margin-left:14px; }
.red-key {
  color:#ff687b !important;
  background:rgba(207,53,75,.24) !important;
  border:1px solid rgba(255,104,123,.48);
  box-shadow:0 0 12px rgba(207,53,75,.18);
}

.favorites-home { padding-top:4px; }
.favorites-intro {
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 18px 10px 8px;
}
.favorites-intro p {
  margin:0;
  color:#b3c1c6;
  font-size:21px;
  line-height:1.4;
}
.favorites-intro-actions { display:flex; align-items:center; }
.favorites-intro-actions > * + * { margin-left:12px; }
.favorites-intro-actions .primary-button,
.favorites-intro-actions .secondary-button {
  min-height:52px;
  height:52px;
  font-size:17px;
  border-radius:14px;
}
.favorite-filter-row {
  display:flex;
  align-items:center;
  min-height:58px;
  padding:4px 14px 14px 8px;
  overflow:hidden;
}
.favorite-filter-chip {
  min-width:92px;
  height:45px;
  padding:0 22px;
  border:1px solid rgba(255,255,255,.065);
  border-radius:999px;
  background:rgba(255,255,255,.065);
  color:#c0cbd0;
  font-size:17px;
  font-weight:800;
}
.favorite-filter-chip + .favorite-filter-chip { margin-left:12px; }
.favorite-filter-chip.active {
  color:var(--accent-ink);
  border-color:transparent;
  background:linear-gradient(135deg,var(--accent),var(--accent-2));
}
.favorite-onboarding {
  display:flex;
  align-items:center;
  margin:2px 18px 26px 8px;
  padding:20px 24px;
  border:1px solid rgba(var(--accent-rgb),.22);
  border-radius:20px;
  background:rgba(var(--accent-rgb),.08);
}
.favorite-onboarding-icon {
  width:58px;
  height:58px;
  display:grid;
  place-items:center;
  margin-right:20px;
  border-radius:18px;
  color:var(--accent);
  background:rgba(var(--accent-rgb),.13);
  font-size:31px;
}
.favorite-onboarding strong { display:block; font-size:21px; }
.favorite-onboarding p { margin:6px 0 0; color:var(--muted); font-size:16px; }
.favorite-empty-strip { margin-bottom:27px; }
.favorite-empty-copy {
  margin:0 18px 0 8px;
  padding:24px;
  border:1px dashed rgba(255,255,255,.11);
  border-radius:18px;
  color:var(--muted);
  font-size:17px;
}
.favorite-groups-section { margin-bottom:8px; }
.favorite-groups-row {
  display:flex;
  overflow-x:auto;
  overflow-y:hidden;
  padding:9px 24px 22px 9px;
  scrollbar-width:none;
}
.favorite-groups-row::-webkit-scrollbar { display:none; }
.favorite-group-card {
  --group-a:#7f4bd8;
  --group-b:#4e2d96;
  flex:0 0 214px;
  width:214px;
  height:150px;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  justify-content:space-between;
  padding:20px;
  border:1px solid rgba(255,255,255,.1);
  border-radius:21px;
  background:linear-gradient(145deg,var(--group-a),var(--group-b));
  color:#fff;
  text-align:left;
  overflow:hidden;
  position:relative;
}
.favorite-group-card + .favorite-group-card { margin-left:16px; }
.favorite-group-card::after {
  content:"";
  position:absolute;
  width:120px;
  height:120px;
  right:-40px;
  top:-50px;
  border-radius:50%;
  background:rgba(255,255,255,.1);
}
.favorite-group-icon {
  width:54px;
  height:54px;
  display:grid;
  place-items:center;
  border-radius:17px;
  background:rgba(255,255,255,.16);
  position:relative;
  z-index:1;
}
.favorite-group-svg { width:29px; height:29px; display:block; }
.favorite-group-copy { position:relative; z-index:1; min-width:0; width:100%; }
.favorite-group-copy strong {
  display:block;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  font-size:20px;
  line-height:1.1;
}
.favorite-group-copy small { display:block; margin-top:7px; color:rgba(255,255,255,.78); font-size:14px; }
.favorite-add-group {
  --group-a:#202a33;
  --group-b:#131b22;
  border-style:dashed;
  color:#d7e0e4;
}
.favorite-color-purple { --group-a:#8653dd; --group-b:#4b2c92; }
.favorite-color-blue { --group-a:#2774b9; --group-b:#17466e; }
.favorite-color-teal { --group-a:#288b7c; --group-b:#175448; }
.favorite-color-orange { --group-a:#b76b28; --group-b:#6f3c16; }
.favorite-color-rose { --group-a:#a94a63; --group-b:#642b3b; }
.favorite-color-lime { --group-a:#778f32; --group-b:#45551d; }
.favorite-color-slate { --group-a:#576574; --group-b:#303942; }

.favorites-browser {
  height:100%;
  min-height:0;
  display:grid;
  grid-template-columns:310px minmax(0,1fr);
  gap:28px;
  padding:7px 14px 12px 8px;
}
.favorite-group-rail {
  min-height:0;
  display:flex;
  flex-direction:column;
  padding:18px 14px 14px;
  border:1px solid rgba(255,255,255,.065);
  border-radius:23px;
  background:rgba(var(--panel-rgb),.76);
  overflow:hidden;
}
.favorite-rail-title { padding:3px 10px 15px; }
.favorite-rail-title strong { display:block; font-size:22px; }
.favorite-rail-title span { display:block; margin-top:5px; color:var(--muted); font-size:14px; }
.favorite-rail-list {
  min-height:0;
  flex:1 1 auto;
  overflow-y:auto;
  scrollbar-width:none;
}
.favorite-rail-list::-webkit-scrollbar { display:none; }
.favorite-group-button {
  width:100%;
  min-height:70px;
  display:grid;
  grid-template-columns:43px minmax(0,1fr);
  align-items:center;
  padding:10px 13px;
  border:0;
  border-radius:15px;
  background:transparent;
  color:#b2c0c6;
  text-align:left;
}
.favorite-group-button + .favorite-group-button { margin-top:5px; }
.favorite-group-button.active { background:rgba(var(--accent-rgb),.14); color:var(--accent); }
.favorite-rail-icon {
  width:36px;
  height:36px;
  display:grid;
  place-items:center;
  margin-right:11px;
}
.favorite-rail-icon .favorite-group-svg { width:23px; height:23px; }
.favorite-group-button > span:last-child { min-width:0; }
.favorite-group-button strong { display:block; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; font-size:17px; }
.favorite-group-button small { display:block; margin-top:4px; color:var(--muted); font-size:13px; }
.favorite-rail-add {
  min-height:54px;
  display:flex;
  align-items:center;
  justify-content:center;
  margin-top:10px;
  border:1px dashed rgba(255,255,255,.13);
  border-radius:14px;
  background:rgba(255,255,255,.045);
  color:#d8e1e4;
  font-size:16px;
  font-weight:800;
}
.favorite-rail-add .favorite-group-svg { width:21px; height:21px; margin-right:10px; }
.favorite-group-browser {
  min-width:0;
  min-height:0;
  display:flex;
  flex-direction:column;
  overflow:hidden;
}
.favorite-group-header {
  min-height:103px;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  padding:0 8px 8px 4px;
}
.favorite-group-header h2 { margin:5px 0 0; font-size:35px; line-height:1.05; }
.favorite-group-header p { margin:7px 0 0; color:var(--muted); font-size:15px; }
.favorite-back-button {
  min-height:30px;
  padding:0 3px;
  border:0;
  background:transparent;
  color:var(--accent);
  font-size:16px;
  font-weight:800;
}
.favorite-group-actions { display:flex; padding-top:15px; }
.favorite-group-actions > * + * { margin-left:11px; }
.favorite-group-actions .primary-button,
.favorite-group-actions .secondary-button { min-height:50px; height:50px; font-size:17px; }
.favorite-group-browser > .favorite-filter-row { flex:0 0 60px; padding-left:4px; }
.favorite-grid-status:empty { display:none; }
.favorite-grid-status:not(:empty) { flex:1 1 auto; min-height:0; display:grid; place-items:center; }
.favorite-grid-empty { text-align:center; color:var(--muted); }
.favorite-grid-empty > span { display:block; color:var(--accent); font-size:48px; margin-bottom:10px; }
.favorite-grid-empty strong { display:block; color:var(--text); font-size:23px; }
.favorite-grid-empty p { margin:8px 0 0; font-size:16px; }
.favorite-grid {
  flex:1 1 auto;
  min-height:0;
  width:100%;
  overflow:hidden;
}
.favorite-grid.virtual-grid-host,
.favorite-editor-grid.virtual-grid-host { padding:8px 12px 8px 8px; }
.favorite-grid .channel-tile,
.favorite-grid .poster-card,
.favorite-grid .favorite-mixed-card { height:100%; }
.favorite-grid-live .channel-tile { display:flex; flex-direction:column; justify-content:center; }

.favorite-mixed-card,
.favorite-selection-card {
  width:100%;
  height:100%;
  display:flex;
  flex-direction:column;
  padding:0;
  border:1px solid rgba(255,255,255,.07);
  border-radius:20px;
  background:rgba(var(--panel-rgb),.94);
  overflow:hidden;
  position:relative;
  text-align:left;
}
.favorite-mixed-art,
.favorite-live-art {
  flex:1 1 auto;
  min-height:0;
  position:relative;
  overflow:hidden;
  background:radial-gradient(circle at 72% 20%,rgba(var(--accent-rgb),.28),transparent 36%),linear-gradient(145deg,var(--panel-strong),var(--bg));
}
.favorite-mixed-art img { width:100%; height:100%; display:block; object-fit:cover; }
.favorite-mixed-art .poster-fallback { display:grid; }
.favorite-live-art { display:grid; place-items:center; padding:24px; }
.favorite-live-logo,
.favorite-live-art .channel-logo-fallback {
  width:105px;
  height:105px;
  border-radius:25px;
  object-fit:contain;
  padding:12px;
  background:#e8eff1;
}
.favorite-live-art .channel-logo-fallback {
  display:grid;
  place-items:center;
  padding:0;
  color:var(--accent-ink);
  font-size:28px;
  font-weight:900;
}
.favorite-live-label {
  position:absolute;
  right:12px;
  top:12px;
  padding:5px 8px;
  border-radius:7px;
  background:#d83e50;
  color:#fff;
  font-size:11px;
  font-weight:900;
  letter-spacing:.5px;
}
.favorite-mixed-copy {
  flex:0 0 78px;
  min-height:78px;
  padding:13px 14px 10px;
}
.favorite-mixed-copy strong { display:block; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; font-size:17px; }
.favorite-mixed-copy span { display:block; margin-top:7px; color:var(--muted); font-size:14px; }

.favorite-editor {
  height:100%;
  min-height:0;
  display:grid;
  grid-template-columns:420px minmax(0,1fr);
  gap:27px;
  padding:7px 14px 12px 8px;
}
.favorite-editor-settings,
.favorite-editor-content {
  min-height:0;
  border:1px solid rgba(255,255,255,.065);
  border-radius:23px;
  background:rgba(var(--panel-rgb),.78);
}
.favorite-editor-settings { padding:22px 24px; overflow-y:auto; scrollbar-width:none; }
.favorite-editor-settings::-webkit-scrollbar { display:none; }
.favorite-editor-heading h2 { margin:12px 0 0; font-size:31px; }
.favorite-editor-heading p { margin:8px 0 22px; color:var(--muted); font-size:15px; line-height:1.4; }
.favorite-editor-label { margin:20px 0 10px 3px; color:#c5d0d4; font-size:15px; font-weight:800; }
.favorite-icon-picker { display:grid; grid-template-columns:repeat(4,1fr); gap:10px; }
.favorite-icon-choice {
  height:57px;
  display:grid;
  place-items:center;
  border:1px solid rgba(255,255,255,.08);
  border-radius:15px;
  background:rgba(255,255,255,.05);
  color:#c9d3d7;
}
.favorite-icon-choice .favorite-group-svg { width:26px; height:26px; }
.favorite-icon-choice.active { color:var(--accent); background:rgba(var(--accent-rgb),.15); border-color:rgba(var(--accent-rgb),.55); }
.favorite-color-picker { display:grid; grid-template-columns:repeat(7,1fr); gap:9px; }
.favorite-color-choice {
  --group-a:#8653dd;
  --group-b:#4b2c92;
  height:39px;
  padding:4px;
  border:2px solid transparent;
  border-radius:999px;
  background:transparent;
}
.favorite-color-choice span { display:block; width:100%; height:100%; border-radius:999px; background:linear-gradient(135deg,var(--group-a),var(--group-b)); }
.favorite-color-choice.active { border-color:#fff; }
.favorite-editor-summary { display:flex; align-items:baseline; margin-top:20px; padding:14px 16px; border-radius:15px; background:rgba(255,255,255,.055); }
.favorite-editor-summary strong { color:var(--accent); font-size:27px; }
.favorite-editor-summary span { margin-left:9px; color:var(--muted); font-size:14px; }
.favorite-editor-actions { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:18px; }
.favorite-editor-actions .danger-button { grid-column:1/-1; }
.favorite-editor-actions .primary-button,
.favorite-editor-actions .secondary-button,
.favorite-editor-actions .danger-button { min-height:52px; height:52px; font-size:16px; padding:0 13px; }
.favorite-editor-content { display:flex; flex-direction:column; padding:20px 14px 12px; overflow:hidden; }
.favorite-editor-content > header { padding:0 9px; }
.favorite-editor-content h3 { margin:0; font-size:28px; }
.favorite-editor-content header p { margin:7px 0 0; color:var(--muted); font-size:15px; }
.favorite-editor-content > .favorite-filter-row { flex:0 0 66px; padding-left:7px; }
.favorite-editor-grid { flex:1 1 auto; min-height:0; overflow:hidden; }
.favorite-selection-card.selected { border-color:rgba(var(--accent-rgb),.9); box-shadow:inset 0 0 0 4px rgba(var(--accent-rgb),.84); }
.selection-check {
  position:absolute;
  right:11px;
  top:11px;
  width:34px;
  height:34px;
  display:grid;
  place-items:center;
  border-radius:50%;
  background:rgba(0,0,0,.58);
  color:transparent;
  font-size:18px;
  font-weight:900;
}
.favorite-selection-card.selected .selection-check { background:var(--accent); color:var(--accent-ink); }
.favorite-editor-empty { height:100%; display:grid; place-items:center; color:var(--muted); font-size:18px; }

.favorite-group-card:focus,
.favorite-group-button:focus,
.favorite-filter-chip:focus,
.favorite-mixed-card:focus,
.favorite-selection-card:focus,
.favorite-icon-choice:focus,
.favorite-color-choice:focus,
.favorite-rail-add:focus {
  box-shadow:inset 0 0 0 4px rgba(var(--accent-rgb),.96),0 8px 22px rgba(0,0,0,.35);
}
.favorite-color-choice.favorite-color-purple { --group-a:#8653dd; --group-b:#4b2c92; }
.favorite-color-choice.favorite-color-blue { --group-a:#2774b9; --group-b:#17466e; }
.favorite-color-choice.favorite-color-teal { --group-a:#288b7c; --group-b:#175448; }
.favorite-color-choice.favorite-color-orange { --group-a:#b76b28; --group-b:#6f3c16; }
.favorite-color-choice.favorite-color-rose { --group-a:#a94a63; --group-b:#642b3b; }
.favorite-color-choice.favorite-color-lime { --group-a:#778f32; --group-b:#45551d; }
.favorite-color-choice.favorite-color-slate { --group-a:#576574; --group-b:#303942; }
.selection-check { border:1px solid rgba(255,255,255,.13); background:rgba(0,0,0,.36); }

/* v0.6.0 unified Favorites workspace */
.favorites-hub {
  height:100%;
  min-height:0;
  display:flex;
  flex-direction:column;
  overflow:hidden;
  padding:0 8px 4px 4px;
}
.favorite-groups-static {
  flex:0 0 auto;
  min-height:0;
  margin:0 0 12px;
}
.favorite-groups-heading {
  min-height:60px;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  padding:0 4px 10px;
}
.favorite-groups-heading h2 {
  margin:0;
  font-size:29px;
  line-height:1.08;
}
.favorite-groups-heading p {
  margin:7px 0 0;
  color:var(--muted);
  font-size:15px;
}
.favorite-groups-heading-actions {
  display:flex;
  align-items:center;
  min-height:50px;
}
.favorite-groups-heading-actions > * + * { margin-left:16px; }
.favorite-groups-heading-actions .secondary-button {
  min-width:138px;
  min-height:48px;
  height:48px;
  padding:0 20px;
  border-radius:14px;
  font-size:16px;
}
.favorite-groups-row {
  width:100%;
  display:flex;
  align-items:stretch;
  gap:16px;
  overflow-x:auto;
  overflow-y:hidden;
  padding:5px 4px 10px;
  scroll-snap-type:x mandatory;
  scroll-padding-left:4px;
  scrollbar-width:none;
  overscroll-behavior-x:contain;
}
.favorite-groups-row::-webkit-scrollbar { display:none; }
.favorite-group-card {
  flex:0 0 calc((100% - 64px) / 5);
  width:calc((100% - 64px) / 5);
  min-width:0;
  height:128px;
  padding:17px 18px;
  border-radius:19px;
  scroll-snap-align:start;
  scroll-snap-stop:always;
  transition:transform .12s ease-out,box-shadow .12s ease-out,border-color .12s ease-out,filter .12s ease-out;
}
.favorite-group-card + .favorite-group-card { margin-left:0; }
.favorite-group-card .favorite-group-icon {
  width:46px;
  height:46px;
  border-radius:14px;
}
.favorite-group-card .favorite-group-svg { width:25px; height:25px; }
.favorite-group-card .favorite-group-copy strong { font-size:19px; }
.favorite-group-card .favorite-group-copy small { margin-top:5px; font-size:13px; }
.favorite-group-card.active {
  border-color:rgba(var(--accent-rgb),.95);
  box-shadow:inset 0 0 0 3px rgba(var(--accent-rgb),.92),0 10px 28px rgba(0,0,0,.28);
}
.favorite-group-card.moving {
  filter:saturate(1.12) brightness(1.08);
  box-shadow:inset 0 0 0 4px #fff,0 18px 44px rgba(0,0,0,.5);
  transform:translateY(-5px) scale(1.025);
  z-index:8;
}
.favorite-group-card:focus {
  transform:translateY(-2px);
  box-shadow:inset 0 0 0 4px rgba(var(--accent-rgb),.98),0 14px 34px rgba(0,0,0,.42);
}
.favorite-group-card.active:focus {
  box-shadow:inset 0 0 0 4px #fff,0 14px 34px rgba(0,0,0,.42);
}
.favorite-recent-section {
  flex:0 0 auto;
  margin:0 0 12px;
  overflow:hidden;
}
.favorite-recent-section .section-head,
.favorite-content-section > .section-head {
  margin:0 4px 9px;
}
.favorite-recent-section .section-head h2,
.favorite-content-section > .section-head h2 {
  margin:0;
  font-size:25px;
}
.favorite-recent-grid {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:16px;
  padding:4px 4px 8px;
  overflow:hidden;
}
.favorite-recent-grid .favorite-mixed-card {
  height:118px;
  min-height:118px;
}
.favorite-content-section {
  flex:1 1 auto;
  min-height:0;
  display:flex;
  flex-direction:column;
  overflow:hidden;
}
.favorite-content-section > .section-head { flex:0 0 auto; }
.favorite-grid-status:empty { display:none; }
.favorite-grid-status:not(:empty) {
  flex:1 1 auto;
  min-height:0;
  display:grid;
  place-items:center;
}
.favorite-grid {
  flex:1 1 auto;
  min-height:0;
  overflow-y:auto;
  overflow-x:hidden;
  scroll-behavior:smooth;
  scrollbar-width:none;
}
.favorite-grid::-webkit-scrollbar { display:none; }
.favorite-grid.virtual-grid-host {
  padding:4px 4px 4px;
  scroll-snap-type:y mandatory;
}
.favorite-grid .virtual-grid-inner > * { scroll-snap-align:start; }
.favorite-mixed-card {
  display:grid;
  grid-template-columns:92px minmax(0,1fr);
  grid-template-rows:1fr;
  align-items:center;
  min-width:0;
  padding:14px;
  border-radius:18px;
  background:linear-gradient(145deg,rgba(var(--panel-rgb),.98),rgba(var(--panel-rgb),.82));
  transition:transform .12s ease-out,box-shadow .12s ease-out,border-color .12s ease-out,background .12s ease-out;
}
.favorite-mixed-card .favorite-live-art,
.favorite-mixed-card .favorite-mixed-art {
  width:76px;
  height:76px;
  min-height:76px;
  align-self:center;
  border-radius:16px;
  overflow:hidden;
}
.favorite-mixed-card .favorite-live-art { padding:8px; }
.favorite-mixed-card .favorite-live-logo,
.favorite-mixed-card .favorite-live-art .channel-logo-fallback {
  width:60px;
  height:60px;
  border-radius:13px;
  padding:6px;
}
.favorite-mixed-card .favorite-live-art .channel-logo-fallback { padding:0; font-size:17px; }
.favorite-mixed-card .favorite-live-label {
  right:4px;
  top:4px;
  padding:3px 5px;
  border-radius:5px;
  font-size:8px;
}
.favorite-mixed-card .favorite-mixed-copy {
  min-width:0;
  min-height:0;
  height:auto;
  padding:0 32px 0 2px;
  align-self:center;
}
.favorite-mixed-card .favorite-mixed-copy strong {
  display:-webkit-box;
  max-height:46px;
  white-space:normal;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
  font-size:18px;
  line-height:1.24;
}
.favorite-mixed-card .favorite-mixed-copy span {
  margin-top:7px;
  font-size:13px;
}
.favorite-card-heart {
  position:absolute;
  right:14px;
  top:50%;
  transform:translateY(-50%);
  color:#ff7b9d;
  font-size:20px;
  line-height:1;
}
.favorite-mixed-card:focus {
  transform:none;
  border-color:rgba(var(--accent-rgb),.95);
  box-shadow:inset 0 0 0 4px rgba(var(--accent-rgb),.96),0 10px 26px rgba(0,0,0,.34);
}
.favorite-mixed-card.moving {
  border-color:#fff;
  background:linear-gradient(145deg,rgba(var(--accent-rgb),.27),rgba(var(--panel-rgb),.96));
  box-shadow:inset 0 0 0 4px #fff,0 16px 38px rgba(0,0,0,.5);
  transform:scale(.985);
  z-index:8;
}
.favorite-manager {
  height:100%;
  min-height:0;
  display:flex;
  flex-direction:column;
  overflow:hidden;
  padding:2px 8px 8px 4px;
}
.favorite-manager-header {
  flex:0 0 auto;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  padding:0 4px 18px;
}
.favorite-manager-header h2 { margin:0; font-size:31px; }
.favorite-manager-header p { margin:8px 0 0; color:var(--muted); font-size:16px; }
.favorite-manager-header > div:last-child { display:flex; align-items:center; }
.favorite-manager-header > div:last-child > * + * { margin-left:12px; }
.favorite-manager-header .primary-button,
.favorite-manager-header .secondary-button {
  min-height:50px;
  height:50px;
  border-radius:14px;
  font-size:16px;
}
.favorite-manager-list {
  flex:1 1 auto;
  min-height:0;
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  grid-auto-rows:92px;
  gap:14px 16px;
  align-content:start;
  overflow-y:auto;
  padding:5px 5px 8px;
  scroll-snap-type:y mandatory;
  scrollbar-width:none;
}
.favorite-manager-list::-webkit-scrollbar { display:none; }
.favorite-manager-row {
  width:100%;
  height:92px;
  display:grid;
  grid-template-columns:58px minmax(0,1fr) auto;
  align-items:center;
  padding:14px 18px;
  border:1px solid rgba(255,255,255,.08);
  border-radius:18px;
  background:rgba(var(--panel-rgb),.9);
  color:var(--text);
  text-align:left;
  scroll-snap-align:start;
}
.favorite-manager-row[disabled] { opacity:.78; cursor:default; }
.favorite-manager-icon {
  width:48px;
  height:48px;
  display:grid;
  place-items:center;
  border-radius:14px;
  background:linear-gradient(145deg,var(--group-a),var(--group-b));
}
.favorite-manager-icon .favorite-group-svg { width:25px; height:25px; }
.favorite-manager-copy { min-width:0; padding:0 14px; }
.favorite-manager-copy strong { display:block; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; font-size:19px; }
.favorite-manager-copy small { display:block; margin-top:6px; color:var(--muted); font-size:14px; }
.favorite-manager-action { color:var(--accent); font-size:15px; font-weight:800; }
.favorite-manager-row.system .favorite-manager-action { color:var(--muted); }
.favorite-manager-row:focus {
  transform:none;
  box-shadow:inset 0 0 0 4px rgba(var(--accent-rgb),.96),0 10px 28px rgba(0,0,0,.35);
}


/* v0.6.0 Favorites stabilization: deterministic focus, uniform cards, and explicit reordering. */
.favorites-hub,
.favorite-manager,
.favorite-item-manager {
  padding-right:18px;
}
.favorites-hub .focusable,
.favorite-manager .focusable,
.favorite-item-manager .focusable,
.favorite-editor .focusable {
  transition:none !important;
}
.favorite-groups-heading-actions {
  justify-content:flex-end;
  padding-right:4px;
  white-space:nowrap;
}
.favorite-groups-heading-actions > * + * { margin-left:12px; }
.favorite-groups-heading-actions .primary-button,
.favorite-groups-heading-actions .secondary-button {
  min-width:132px;
  height:48px;
  min-height:48px;
  padding:0 20px;
  border-radius:14px;
  font-size:16px;
}
.favorite-groups-row {
  gap:0;
  scroll-behavior:auto !important;
  scroll-snap-type:none !important;
}
.favorite-group-card + .favorite-group-card { margin-left:16px; }
.favorite-group-card {
  scroll-snap-align:none !important;
  transition:none !important;
}
.favorite-group-card .favorite-group-icon,
.favorite-manager-icon {
  color:#fff;
  background:rgba(0,0,0,.2);
}
.favorite-group-card.active .favorite-group-icon {
  background:rgba(0,0,0,.3);
  box-shadow:inset 0 0 0 2px rgba(255,255,255,.24);
}
.favorite-group-svg {
  display:block;
  width:28px;
  height:28px;
  overflow:visible;
  color:inherit;
}
.favorite-group-svg path,
.favorite-group-svg rect,
.favorite-group-svg circle {
  vector-effect:non-scaling-stroke;
}
.favorite-grid,
.favorite-grid.virtual-grid-host {
  scroll-behavior:auto !important;
  scroll-snap-type:none !important;
  overscroll-behavior:contain;
  padding:8px 12px 12px 8px;
}
.favorite-grid .virtual-grid-inner > * { scroll-snap-align:none !important; }
.favorite-grid .favorite-standard-card,
.favorite-grid .favorite-mixed-card {
  transition:none !important;
}
.favorite-layout-live .channel-tile {
  display:flex;
  flex-direction:column;
  justify-content:center;
  width:100%;
  height:100%;
  padding:20px;
}
.favorite-layout-live .channel-top { width:100%; align-items:center; }
.favorite-layout-live .channel-logo,
.favorite-layout-live .channel-logo-fallback {
  flex:0 0 60px;
  width:60px;
  height:60px;
  border-radius:16px;
}
.favorite-layout-live .channel-name {
  margin:0;
  font-size:18px;
  line-height:1.2;
  max-height:44px;
  white-space:normal;
}
.favorite-layout-poster .poster-card {
  display:flex;
  flex-direction:column;
  width:100%;
  height:100%;
  min-width:0;
}
.favorite-layout-poster .poster-art {
  flex:1 1 auto;
  height:auto;
  min-height:0;
}
.favorite-layout-poster .poster-copy {
  flex:0 0 78px;
  height:78px;
}
.favorite-layout-mixed .favorite-mixed-card {
  min-height:160px;
  height:100%;
}
.favorite-recent-grid .favorite-mixed-card {
  transition:none !important;
}
.favorite-content-section > .section-head {
  padding-right:8px;
}

/* Clean single-column group manager with compact, consistent actions. */
.favorite-manager-header { padding-right:4px; }
.favorite-manager-list {
  display:flex;
  flex-direction:column;
  grid-template-columns:none;
  grid-auto-rows:auto;
  gap:0;
  overflow-y:auto;
  scroll-behavior:auto;
  scroll-snap-type:none;
  padding:4px 6px 20px 4px;
}
.favorite-manager-row {
  flex:0 0 88px;
  width:100%;
  height:88px;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  padding:12px 14px 12px 16px;
  border:1px solid rgba(255,255,255,.075);
  border-radius:18px;
  background:rgba(var(--panel-rgb),.9);
  scroll-snap-align:none;
}
.favorite-manager-row + .favorite-manager-row { margin-top:12px; }
.favorite-manager-summary {
  min-width:0;
  display:flex;
  align-items:center;
}
.favorite-manager-icon {
  flex:0 0 52px;
  width:52px;
  height:52px;
  border-radius:15px;
  background:linear-gradient(145deg,var(--group-a),var(--group-b));
}
.favorite-manager-copy {
  min-width:0;
  padding:0 14px;
}
.favorite-manager-badge {
  flex:0 0 auto;
  margin-left:8px;
  padding:6px 10px;
  border-radius:999px;
  background:rgba(255,255,255,.065);
  color:var(--muted);
  font-size:12px;
  font-weight:800;
}
.favorite-manager-actions {
  display:flex;
  align-items:center;
  justify-content:flex-end;
  margin-left:16px;
}
.favorite-manager-actions > * + * { margin-left:9px; }
.favorite-manager-button {
  height:44px;
  min-height:44px;
  padding:0 15px;
  border:1px solid rgba(255,255,255,.075);
  border-radius:12px;
  background:rgba(255,255,255,.065);
  color:var(--text);
  font-size:14px;
  font-weight:800;
}
.favorite-manager-button.move-button { min-width:96px; }
.favorite-manager-button:disabled { opacity:.3; }
.favorite-manager-button:focus {
  transform:none;
  border-color:rgba(var(--accent-rgb),.95);
  box-shadow:inset 0 0 0 3px rgba(var(--accent-rgb),.95),0 8px 20px rgba(0,0,0,.3);
}

/* Explicit item-order manager. It avoids long-press and virtual-grid re-render churn. */
.favorite-item-manager {
  height:100%;
  min-height:0;
  display:flex;
  flex-direction:column;
  overflow:hidden;
  padding:2px 18px 8px 4px;
}
.favorite-item-manager-header {
  flex:0 0 auto;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  padding:0 4px 16px;
}
.favorite-item-manager-header h2 { margin:0; font-size:31px; }
.favorite-item-manager-header p { margin:8px 0 0; color:var(--muted); font-size:16px; }
.favorite-item-manager-header .secondary-button {
  min-width:112px;
  min-height:50px;
  height:50px;
  border-radius:14px;
  font-size:16px;
}
.favorite-item-manager-list {
  flex:1 1 auto;
  min-height:0;
  overflow-y:auto;
  scroll-behavior:auto;
  scrollbar-width:none;
  padding:4px 6px 24px 4px;
}
.favorite-item-manager-list::-webkit-scrollbar { display:none; }
.favorite-item-manager-row {
  min-height:82px;
  display:grid;
  grid-template-columns:48px 58px minmax(0,1fr) auto;
  align-items:center;
  padding:10px 12px;
  border:1px solid rgba(255,255,255,.075);
  border-radius:17px;
  background:rgba(var(--panel-rgb),.9);
}
.favorite-item-manager-row + .favorite-item-manager-row { margin-top:10px; }
.favorite-item-position {
  color:var(--muted);
  font-size:15px;
  font-weight:900;
  text-align:center;
}
.favorite-reorder-art {
  width:52px;
  height:58px;
  display:grid;
  place-items:center;
  overflow:hidden;
  border-radius:12px;
  background:rgba(255,255,255,.055);
}
.favorite-reorder-art.favorite-reorder-live { height:52px; }
.favorite-reorder-logo,
.favorite-reorder-live .channel-logo-fallback {
  width:46px;
  height:46px;
  padding:5px;
  border-radius:10px;
  object-fit:contain;
}
.favorite-reorder-live .channel-logo-fallback { display:grid; padding:0; font-size:14px; }
.favorite-reorder-poster {
  width:52px;
  height:58px;
  position:relative;
  overflow:hidden;
}
.favorite-reorder-poster img { width:100%; height:100%; object-fit:cover; }
.favorite-reorder-poster .poster-fallback { display:grid; }
.favorite-reorder-poster .poster-fallback span {
  width:34px;
  height:34px;
  border-radius:10px;
  font-size:12px;
}
.favorite-item-manager-copy {
  min-width:0;
  padding:0 16px;
}
.favorite-item-manager-copy strong {
  display:block;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  font-size:18px;
}
.favorite-item-manager-copy small { display:block; margin-top:6px; color:var(--muted); font-size:13px; }
.favorite-item-manager-actions { display:flex; align-items:center; }
.favorite-item-manager-actions > * + * { margin-left:9px; }

@media (max-width:1500px) {
  .favorite-manager-button { padding:0 11px; }
  .favorite-manager-button.move-button { min-width:86px; }
}

/* v0.6.0 Favorites regression cleanup: safe areas, uniform cards, and reachable controls. */
.favorites-hub,
.favorite-manager,
.favorite-item-manager {
  padding:12px 28px 14px 12px;
}
.favorite-editor {
  padding:12px 28px 14px 12px;
}
.favorite-groups-heading {
  min-height:74px;
  align-items:center;
  padding:6px 4px 14px;
}
.favorite-groups-heading-actions {
  flex:0 0 auto;
  padding:4px 2px 0 20px;
}
.favorite-groups-heading-actions .primary-button,
.favorite-groups-heading-actions .secondary-button {
  min-height:50px;
  height:50px;
}
.favorite-recent-grid {
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:16px;
  padding:8px 12px 12px 8px;
}
.favorite-recent-grid .favorite-mixed-card {
  width:100%;
  height:160px;
  min-height:160px;
}
.favorite-content-section > .section-head,
.favorite-recent-section .section-head {
  padding-right:12px;
}
.favorite-manager-header,
.favorite-item-manager-header {
  padding:4px 4px 18px;
}
.favorite-manager-select {
  width:100%;
  min-width:0;
  min-height:60px;
  padding:4px;
  border:0;
  border-radius:13px;
  background:transparent;
  color:inherit;
  text-align:left;
}
.favorite-manager-select:focus {
  transform:none;
  box-shadow:inset 0 0 0 3px rgba(var(--accent-rgb),.96);
  background:rgba(var(--accent-rgb),.09);
}
.favorite-editor-grid.favorite-mixed-grid {
  padding:8px 12px 12px 8px;
}
.favorite-editor-grid .favorite-selection-card.favorite-mixed-card {
  width:100%;
  height:100%;
  min-height:160px;
}
.favorite-editor-grid .favorite-selection-card .selection-check {
  right:10px;
  top:10px;
}
.favorite-editor-grid .favorite-selection-card .favorite-mixed-copy {
  padding-right:44px;
}


/* v0.6.0 Favorites follow-up: identical recent cards, deterministic toolbar focus, and aligned editor cards. */
.favorite-recent-grid .favorite-standard-card,
.favorite-recent-grid .favorite-mixed-card {
  width:100%;
  min-width:0;
  margin:0;
}
.favorite-recent-grid.favorite-layout-live .channel-tile {
  display:flex;
  flex-direction:column;
  justify-content:center;
  width:100%;
  padding:20px;
}
.favorite-recent-grid.favorite-layout-live .channel-top {
  width:100%;
  align-items:center;
}
.favorite-recent-grid.favorite-layout-live .channel-logo,
.favorite-recent-grid.favorite-layout-live .channel-logo-fallback {
  flex:0 0 60px;
  width:60px;
  height:60px;
  border-radius:16px;
}
.favorite-recent-grid.favorite-layout-live .channel-name {
  margin:0;
  font-size:18px;
  line-height:1.2;
  max-height:44px;
  white-space:normal;
}
.favorite-recent-grid.favorite-layout-poster .poster-card {
  display:flex;
  flex-direction:column;
  width:100%;
  min-width:0;
}
.favorite-recent-grid.favorite-layout-poster .poster-art {
  flex:1 1 auto;
  height:auto;
  min-height:0;
}
.favorite-recent-grid.favorite-layout-poster .poster-copy {
  flex:0 0 78px;
  height:78px;
}
.favorite-groups-heading-actions .secondary-button:disabled,
.favorite-manager-button:disabled {
  cursor:default;
}
.favorite-manager-button.edit-button {
  min-width:72px;
  color:var(--accent);
  border-color:rgba(var(--accent-rgb),.28);
  background:rgba(var(--accent-rgb),.09);
}
.favorite-editor-grid .favorite-selection-card.favorite-mixed-card {
  display:grid;
  grid-template-columns:72px minmax(0,1fr);
  grid-template-rows:1fr;
  align-items:center;
  padding:14px 46px 14px 14px;
}
.favorite-editor-grid .favorite-selection-card .favorite-live-art,
.favorite-editor-grid .favorite-selection-card .favorite-mixed-art {
  width:64px;
  height:64px;
  min-height:64px;
  align-self:center;
  border-radius:14px;
}
.favorite-editor-grid .favorite-selection-card .favorite-live-art {
  padding:5px;
}
.favorite-editor-grid .favorite-selection-card .favorite-live-logo,
.favorite-editor-grid .favorite-selection-card .favorite-live-art .channel-logo-fallback {
  width:54px;
  height:54px;
  border-radius:12px;
  padding:5px;
}
.favorite-editor-grid .favorite-selection-card .favorite-live-art .channel-logo-fallback {
  padding:0;
  font-size:16px;
}
.favorite-editor-grid .favorite-selection-card .favorite-mixed-copy {
  min-width:0;
  min-height:64px;
  height:64px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  padding:0 4px 0 10px;
}
.favorite-editor-grid .favorite-selection-card .favorite-mixed-copy strong {
  display:-webkit-box;
  min-height:40px;
  max-height:40px;
  overflow:hidden;
  white-space:normal;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  font-size:16px;
  line-height:1.25;
}
.favorite-editor-grid .favorite-selection-card .favorite-mixed-copy span {
  margin-top:5px;
  font-size:13px;
  line-height:1.1;
}
.favorite-editor-grid .favorite-selection-card .selection-check {
  right:12px;
  top:12px;
}


/* v0.6.0 Favorites regression pass: bottom safe area, editable built-ins, and deterministic selection-card alignment. */
.favorites-hub {
  padding-bottom:16px;
}
.favorite-content-section {
  padding-bottom:8px;
}
.favorite-content-section .favorite-grid.virtual-grid-host {
  padding-top:8px;
  padding-right:12px;
  padding-bottom:32px;
  padding-left:8px;
}

/* Every group row exposes the same Edit affordance. */
.favorite-manager-actions {
  flex:0 0 auto;
}
.favorite-manager-button.edit-button {
  display:inline-flex;
  align-items:center;
  justify-content:center;
}

/* The custom-group chooser uses a dedicated card layout instead of inheriting mixed-card geometry. */
.favorite-editor-grid .favorite-selection-card {
  width:100%;
  height:100%;
  min-width:0;
  min-height:0;
  display:flex !important;
  flex-direction:column !important;
  align-items:stretch;
  justify-content:flex-start;
  padding:12px 14px 13px;
  border:1px solid rgba(255,255,255,.08);
  border-radius:18px;
  background:rgba(var(--panel-rgb),.94);
  overflow:hidden;
  position:relative;
  text-align:left;
}
.favorite-editor-grid .favorite-selection-art {
  flex:0 0 64px;
  width:100%;
  height:64px;
  min-height:64px;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
}
.favorite-editor-grid .favorite-selection-live {
  border-radius:13px;
  background:radial-gradient(circle at 72% 20%,rgba(var(--accent-rgb),.25),transparent 42%),linear-gradient(145deg,var(--panel-strong),var(--bg));
}
.favorite-editor-grid .favorite-selection-logo,
.favorite-editor-grid .favorite-selection-art .channel-logo-fallback {
  flex:0 0 54px;
  width:54px;
  height:54px;
  border-radius:12px;
  object-fit:contain;
  padding:5px;
  background:#e8eff1;
}
.favorite-editor-grid .favorite-selection-art .channel-logo-fallback {
  display:grid;
  place-items:center;
  padding:0;
  color:var(--accent-ink);
  font-size:16px;
  font-weight:900;
}
.favorite-editor-grid .favorite-selection-poster {
  width:48px;
  height:64px;
  min-height:64px;
  border-radius:9px;
  position:relative;
  overflow:hidden;
}
.favorite-editor-grid .favorite-selection-poster img {
  width:100%;
  height:100%;
  object-fit:cover;
}
.favorite-editor-grid .favorite-selection-poster .poster-fallback {
  display:grid;
}
.favorite-editor-grid .favorite-selection-poster .poster-fallback span {
  width:36px;
  height:36px;
  border-radius:10px;
  font-size:13px;
}
.favorite-editor-grid .favorite-selection-copy {
  flex:1 1 auto;
  min-width:0;
  min-height:0;
  width:100%;
  display:flex;
  flex-direction:column;
  padding-top:8px;
}
.favorite-editor-grid .favorite-selection-copy strong {
  flex:0 0 38px;
  height:38px;
  min-height:38px;
  max-height:38px;
  display:-webkit-box;
  overflow:hidden;
  white-space:normal;
  text-overflow:ellipsis;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  font-size:15px;
  line-height:19px;
}
.favorite-editor-grid .favorite-selection-copy span {
  flex:0 0 auto;
  margin-top:auto;
  padding-top:4px;
  color:var(--muted);
  font-size:12px;
  line-height:14px;
}
.favorite-editor-grid .favorite-selection-card .selection-check {
  right:10px;
  top:10px;
}

/* Built-in groups can be customized without changing their automatic membership rules. */
.favorite-system-editor-note {
  display:flex;
  flex-direction:column;
  margin-top:20px;
  padding:15px 16px;
  border:1px solid rgba(var(--accent-rgb),.2);
  border-radius:15px;
  background:rgba(var(--accent-rgb),.07);
}
.favorite-system-editor-note strong {
  color:var(--accent);
  font-size:16px;
}
.favorite-system-editor-note span {
  margin-top:5px;
  color:var(--muted);
  font-size:13px;
  line-height:1.35;
}
.favorite-system-editor-content {
  display:flex;
  align-items:center;
  justify-content:center;
  padding:32px;
}
.favorite-system-preview {
  --group-a:#8653dd;
  --group-b:#4b2c92;
  width:520px;
  min-height:220px;
  display:flex;
  align-items:center;
  padding:34px;
  border:1px solid rgba(255,255,255,.12);
  border-radius:26px;
  background:linear-gradient(145deg,var(--group-a),var(--group-b));
  box-shadow:0 24px 64px rgba(0,0,0,.32);
}
.favorite-system-preview .favorite-group-icon {
  flex:0 0 76px;
  width:76px;
  height:76px;
  margin-right:24px;
  border-radius:21px;
  color:#fff;
  background:rgba(0,0,0,.22);
}
.favorite-system-preview .favorite-group-svg {
  width:40px;
  height:40px;
}
.favorite-system-preview > div {
  min-width:0;
}
.favorite-system-preview strong {
  display:block;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  color:#fff;
  font-size:30px;
}
.favorite-system-preview span {
  display:block;
  margin-top:10px;
  color:rgba(255,255,255,.78);
  font-size:16px;
}

/* v0.6.0 Favorites polish pass: exact grid window and shared catalog cards. */
/* With two declared visible rows, the virtual grid measures both rows to the
   available viewport. Keep only normal inset padding so no third row peeks in. */
.favorite-content-section .favorite-grid.virtual-grid-host {
  padding:8px 12px 8px 8px;
  scroll-padding:8px 12px 8px 8px;
}

/* The Choose Favorites surface reuses the same channel and poster components
   as Live TV, Movies, and Series. Only the selection indicator is additive. */
.favorite-editor-grid .favorite-selection-card {
  width:100%;
  min-width:0;
  height:100%;
  min-height:0;
  position:relative;
  overflow:hidden;
  text-align:left;
}
.favorite-editor-grid.catalog-live .favorite-selection-card.channel-tile,
.favorite-editor-grid.favorite-editor-standard-mixed .favorite-selection-card.channel-tile {
  display:flex !important;
  flex-direction:column !important;
  align-items:stretch !important;
  justify-content:center !important;
  padding:20px !important;
}
.favorite-editor-grid.catalog-live .favorite-selection-card.channel-tile .channel-top,
.favorite-editor-grid.favorite-editor-standard-mixed .favorite-selection-card.channel-tile .channel-top {
  width:100%;
  align-items:center;
}
.favorite-editor-grid.catalog-live .favorite-selection-card.channel-tile .channel-logo,
.favorite-editor-grid.catalog-live .favorite-selection-card.channel-tile .channel-logo-fallback,
.favorite-editor-grid.favorite-editor-standard-mixed .favorite-selection-card.channel-tile .channel-logo,
.favorite-editor-grid.favorite-editor-standard-mixed .favorite-selection-card.channel-tile .channel-logo-fallback {
  flex:0 0 60px;
  width:60px;
  height:60px;
  border-radius:16px;
}
.favorite-editor-grid.catalog-live .favorite-selection-card.channel-tile .channel-name,
.favorite-editor-grid.favorite-editor-standard-mixed .favorite-selection-card.channel-tile .channel-name {
  margin:0;
  font-size:18px;
  line-height:1.2;
  max-height:44px;
  white-space:normal;
  overflow:hidden;
}
.favorite-editor-grid.catalog-movies .favorite-selection-card.poster-card,
.favorite-editor-grid.catalog-series .favorite-selection-card.poster-card,
.favorite-editor-grid.favorite-editor-standard-mixed .favorite-selection-card.poster-card {
  display:flex !important;
  flex-direction:column !important;
  align-items:stretch !important;
  justify-content:flex-start !important;
  padding:0 !important;
}
.favorite-editor-grid.catalog-movies .favorite-selection-card.poster-card .poster-art,
.favorite-editor-grid.catalog-series .favorite-selection-card.poster-card .poster-art,
.favorite-editor-grid.favorite-editor-standard-mixed .favorite-selection-card.poster-card .poster-art {
  flex:1 1 auto;
  width:100%;
  height:auto;
  min-height:0;
}
.favorite-editor-grid.catalog-movies .favorite-selection-card.poster-card .poster-copy,
.favorite-editor-grid.catalog-series .favorite-selection-card.poster-card .poster-copy,
.favorite-editor-grid.favorite-editor-standard-mixed .favorite-selection-card.poster-card .poster-copy {
  flex:0 0 78px;
  width:100%;
  height:78px;
  padding:12px 14px 10px;
}
.favorite-editor-grid .favorite-selection-card .favorite-badge {
  display:none;
}
.favorite-editor-grid .favorite-selection-card .selection-check {
  display:grid;
  right:11px;
  top:11px;
  z-index:7;
}
.favorite-editor-grid .favorite-selection-card.selected {
  border-color:rgba(var(--accent-rgb),.95);
  box-shadow:inset 0 0 0 4px rgba(var(--accent-rgb),.9);
}
.favorite-editor-grid .favorite-selection-card:focus {
  transform:none;
  border-color:rgba(var(--accent-rgb),.98);
  box-shadow:inset 0 0 0 4px rgba(var(--accent-rgb),.98),0 10px 24px rgba(0,0,0,.34);
}

/* Built-in membership is automatic, so its editor is appearance-only.
   Keep the editor panel in the same left column and at the same width as a
   custom group editor so both workflows have identical visual alignment. */
.favorite-editor.favorite-editor-system {
  grid-template-columns:420px minmax(0,1fr);
  justify-content:stretch;
  gap:27px;
}
.favorite-editor.favorite-editor-system .favorite-editor-settings {
  width:auto;
}
.favorite-system-editor-note,
.favorite-system-editor-content {
  display:none !important;
}

/* v0.6.0 living-room scale, hidden groups, and navigation polish. */
/* Increase legibility without changing catalog column counts or virtual-grid row counts. */
.topbar h1 { font-size:42px; }
.logo { font-size:35px; }
.nav-item {
  height:70px;
  font-size:23px;
  border-radius:18px;
}
.nav-item .nav-icon {
  width:33px;
  height:33px;
  flex-basis:33px;
}
.nav-svg { width:29px; height:29px; }
.section h2,
.favorite-groups-heading h2 { font-size:32px; }
.section-meta { font-size:18px; }
.favorite-groups-heading p { font-size:17px; }
.primary-button,
.secondary-button,
.danger-button {
  min-height:64px;
  padding-left:28px;
  padding-right:28px;
  border-radius:17px;
  font-size:21px;
}
.field span { font-size:17px; }
.field input,
.field select {
  height:66px;
  font-size:21px;
}
.category-button { font-size:20px; }
.search-box { font-size:21px; }
.result-count { font-size:18px; }
.channel-name { font-size:21px; }
.channel-number { font-size:15px; }
.poster-copy strong { font-size:19px; }
.poster-copy span { font-size:15px; }
.shortcut-card strong { font-size:25px; }
.shortcut-card small { font-size:17px; }
.hero h2 { font-size:52px; }
.hero p { font-size:22px; }
.settings-card h3 { font-size:26px; }
.settings-card p { font-size:18px; }
.detail-plot { font-size:22px; }
.meta-chip { font-size:17px; }
.episode-card strong { font-size:20px; }
.episode-card p { font-size:16px; }

.favorite-groups-heading-actions .primary-button,
.favorite-groups-heading-actions .secondary-button {
  min-width:142px;
  min-height:54px;
  height:54px;
  padding:0 22px;
  font-size:18px;
}
.favorite-group-card .favorite-group-copy strong { font-size:21px; }
.favorite-group-card .favorite-group-copy small { font-size:15px; }
.favorite-content-section > .section-head h2 { font-size:29px; }
.favorite-manager-header h2,
.favorite-item-manager-header h2 { font-size:34px; }
.favorite-manager-header p,
.favorite-item-manager-header p { font-size:18px; }
.favorite-manager-row {
  flex-basis:94px;
  height:94px;
}
.favorite-manager-copy strong { font-size:21px; }
.favorite-manager-copy small { font-size:15px; }
.favorite-manager-button {
  min-height:48px;
  height:48px;
  padding:0 15px;
  font-size:16px;
}
.favorite-manager-button.move-button { min-width:104px; }
.favorite-manager-button.visibility-button { min-width:82px; }
.favorite-manager-row.hidden-group {
  border-style:dashed;
  opacity:.74;
}
.favorite-manager-row.hidden-group:focus-within { opacity:1; }
.favorite-manager-badge.hidden-badge {
  color:var(--accent);
  background:rgba(var(--accent-rgb),.14);
  border:1px solid rgba(var(--accent-rgb),.28);
}
.favorite-all-hidden {
  display:grid;
  place-items:center;
}
.favorite-editor-heading h2 { font-size:34px; }
.favorite-editor-heading p { font-size:17px; }
.favorite-editor-label { font-size:17px; }
.favorite-editor-content h3 { font-size:31px; }
.favorite-editor-content header p { font-size:17px; }
.favorite-filter-chip {
  min-width:100px;
  height:49px;
  font-size:18px;
}

/* Preserve the existing five-card group shelf and all catalog grid geometry. */
.favorite-group-card { height:128px; }
.catalog-live .channel-name,
.favorite-layout-live .channel-name { font-size:20px; }
.catalog-movies .poster-copy,
.catalog-series .poster-copy,
.favorite-layout-poster .poster-copy { flex-basis:80px; height:80px; }

/* v0.6.0 Home history polish and stable manager focus. */

/* v0.6.0 Home/category navigation regression cleanup. */
/* v0.6.0 poster focus DOM overlay correction. */
/* A real final-child overlay is promoted above poster artwork by the legacy
   webOS compositor. It is visual-only and does not affect layout or input. */
.poster-focus-ring {
  position:absolute;
  top:0;
  right:0;
  bottom:0;
  left:0;
  z-index:30;
  display:block;
  box-sizing:border-box;
  border:4px solid transparent;
  border-radius:inherit;
  pointer-events:none;
  opacity:0;
  -webkit-transform:translateZ(0);
  transform:translateZ(0);
}

.poster-card:focus,
.poster-card.is-focused {
  border-color:transparent;
  outline:none;
  box-shadow:0 7px 18px rgba(0,0,0,.28);
}

.poster-card:focus > .poster-focus-ring,
.poster-card.is-focused > .poster-focus-ring {
  border-color:rgba(var(--accent-rgb),.98);
  opacity:1;
}

/* v0.6.0 transparent in-app brand lockup. */
.logo .brand-wordmark,
.player-brand .brand-wordmark,
.brand-lockup .brand-wordmark {
  display:block;
  object-fit:contain;
  border-radius:0;
  background:transparent;
  box-shadow:none;
}
.logo .brand-wordmark {
  width:196px;
  height:47px;
  margin:0;
}
.player-brand .brand-wordmark {
  width:190px;
  height:43px;
  margin:0;
}
.brand-lockup {
  flex-direction:column;
  align-items:flex-start;
  gap:18px;
}
.brand-lockup .brand-wordmark {
  width:560px;
  height:auto;
}
.brand-lockup > span {
  margin:0;
}

/* v0.6.0 exact app-icon mark and poster-fit correction. */
/* Preserve the complete provider artwork inside Movie and Series cards.
   The surrounding card geometry and focus overlay remain unchanged. */
.poster-art img,
.favorite-mixed-art img,
.favorite-reorder-poster img,
.favorite-selection-poster img {
  object-fit:contain;
  background:rgba(var(--panel-rgb),.45);
}

/* Live channel browser. The dimming is only the panel background.
   Text, logos and the focus ring stay fully opaque. No blur. */
.live-browser {
  position:absolute;
  left:0;
  top:0;
  width:720px;
  height:1080px;
  z-index:5;
  pointer-events:auto;
}
.live-browser-panel {
  width:100%;
  height:100%;
  box-sizing:border-box;
  display:flex;
  flex-direction:column;
  padding:36px 28px 28px;
  background:rgba(5,11,18,.72);
  color:#fff;
  opacity:1;
}
.live-browser-head p,
.live-browser-head h2,
.live-browser-head strong,
.live-browser-copy strong,
.live-browser-copy em,
.live-browser-num,
.live-browser-hint,
.live-browser-empty {
  opacity:1;
}
.live-browser-head { display:flex; flex-direction:column; gap:6px; margin-bottom:18px; }
.live-browser-head p { margin:0; color:#d5e4ea; font-size:18px; }
.live-browser-head h2 { margin:0; font-size:34px; line-height:1.1; }
.live-browser-head strong { color:#fff; font-size:20px; }
.live-browser-list { flex:1; min-height:0; overflow-y:auto; display:flex; flex-direction:column; gap:8px; scrollbar-width:none; }
.live-browser-list::-webkit-scrollbar { display:none; }
.live-browser-item {
  display:grid;
  grid-template-columns:72px minmax(0,1fr) auto;
  gap:14px;
  align-items:center;
  width:100%;
  min-height:84px;
  padding:10px 12px;
  border:0;
  border-radius:16px;
  background:transparent;
  color:#fff;
  text-align:left;
  opacity:1;
}
.live-browser-item:focus,
.live-browser-item.is-focused {
  background:rgba(255,255,255,.16);
  box-shadow:inset 0 0 0 3px #fff;
  transform:none;
}
.live-browser-item.is-current .live-browser-copy strong { color:#9be7ff; }
.live-browser-logo { width:72px; height:54px; display:grid; place-items:center; opacity:1; }
.live-browser-logo img,
.live-browser-logo .logo-fallback { width:64px; height:48px; object-fit:contain; opacity:1; }
.live-browser-copy { min-width:0; display:flex; flex-direction:column; gap:4px; }
.live-browser-copy strong,
.live-browser-copy em {
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-style:normal;
}
.live-browser-copy strong { font-size:22px; }
.live-browser-copy em { color:#d5e4ea; font-size:16px; min-height:1.2em; }
.live-browser-num { color:#fff; font-size:16px; }
.live-browser-hint,
.live-browser-empty { margin:12px 0 0; color:#d5e4ea; font-size:16px; line-height:1.35; }
