/* Originale / Comoda preserve the approved layout and palette. */
:root[data-ui-theme=cinema]{--bg:#070b11;--surface:#101923;--surface-raised:#1b2838;--text:#f4f7fc;--muted:#b2bed0;--line:#35465b}
:root[data-ui-theme=contrast]{--bg:#080d14;--surface:#142235;--surface-raised:#21364e;--text:#fff;--muted:#d0dceb;--line:#8098b1}
:root[data-ui-theme=cinema] #player-app .sidebar,:root[data-ui-theme=contrast] #player-app .sidebar{background:var(--bg);border-color:var(--line)}
:root[data-ui-theme=cinema] #player-app .topbar,:root[data-ui-theme=contrast] #player-app .topbar{background:var(--bg);border-color:var(--line)}
:root[data-ui-theme=cinema] #player-app :is(.category-browser,.channel-row,.catalog-results,.live-preview),:root[data-ui-theme=contrast] #player-app :is(.category-browser,.channel-row,.catalog-results,.live-preview){background:var(--surface);border-color:var(--line)}
:root[data-ui-theme=contrast] :is(input,select,textarea,.button.subtle,.category-choice,.appearance-choice){border-color:var(--line)}
:root[data-ui-theme=contrast] #player-app :is(.channel-group,.channel-row-copy small,.category-choice small,.nav-item){color:var(--muted)}
:root[data-ui-theme=contrast] #player-app :is(.nav-item.selected,.category-choice[aria-pressed=true]){color:var(--accent);outline:1px solid var(--accent);outline-offset:-1px}
:root[data-ui-theme=contrast] :focus-visible{outline-width:4px;outline-offset:4px}
.appearance-label{font-size:12px;font-weight:700;margin:22px 0 10px;color:var(--muted)}
.appearance-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.appearance-choice{display:flex;flex-direction:column;gap:9px;min-width:0;padding:10px;border:1px solid var(--line);border-radius:14px;background:var(--surface-raised);color:var(--text);text-align:left;transition:border-color .15s,background .15s}
.appearance-choice[aria-pressed=true]{border-color:var(--accent);box-shadow:inset 0 0 0 1px var(--accent)}
.appearance-choice strong{font-size:13px}.appearance-description{font-size:11px;line-height:1.5;color:var(--muted)}
.appearance-sample{display:grid;grid-template-columns:12px repeat(3,minmax(0,1fr));grid-template-rows:28px 23px;gap:5px;width:100%;padding:8px;background:#10151c;border:1px solid #34485b;border-radius:8px;overflow:hidden}
.appearance-sample i{display:block;border-radius:3px}.sample-menu{grid-row:1/span 2;background:#b7f36b}.sample-feature{grid-column:2/span 3;background:linear-gradient(120deg,#21436a,#10283e)}.sample-poster{background:#365b85}
.sample-cinema{background:#070b11;border-color:#35465b}.sample-cinema .sample-feature{background:linear-gradient(120deg,#163148,#07131f)}
.sample-contrast{background:#080d14;border-color:#a4b9cf}.sample-contrast .sample-poster{background:#6a94c2;border:1px solid #bfd5ec}
.sample-compact{grid-template-rows:18px 15px;padding:7px;gap:3px}.sample-spacious{grid-template-rows:36px 30px;gap:6px}.appearance-feedback{font-size:12px;line-height:1.5;color:var(--muted);margin:14px 0 0;min-height:18px}
/* Density never fixes the height of wrapped category or live-channel names. */
:root[data-content-density=compact] #player-app .catalog-results .catalog-viewport>.channel-grid:not(.compact-channels):not(.guide-mode){grid-template-columns:repeat(auto-fill,minmax(min(100%,145px),1fr));gap:18px 12px}
:root[data-content-density=spacious] #player-app .catalog-results .catalog-viewport>.channel-grid:not(.compact-channels):not(.guide-mode){grid-template-columns:repeat(auto-fill,minmax(min(100%,190px),1fr));gap:26px 22px}
:root[data-content-density=compact] #player-app .category-track>.category-choice{height:auto;min-height:48px;padding:8px 10px}
:root[data-content-density=spacious] #player-app .category-track>.category-choice{height:auto;min-height:68px;padding:14px 12px;font-size:14px}
:root[data-content-density=spacious] #player-app .category-choice>span:first-child{font-size:14px}
:root[data-content-density=compact] #player-app .compact-channels .channel-row{height:auto;padding:3px}
:root[data-content-density=compact] #player-app .channel-row-play{min-height:60px;padding:7px 6px}
:root[data-content-density=spacious] #player-app .compact-channels .channel-row{height:auto;padding:8px}
:root[data-content-density=spacious] #player-app .channel-row-play{min-height:86px;gap:14px;padding:12px 8px}
:root[data-content-density=spacious] #player-app .channel-row-copy strong{font-size:16px;line-height:1.5}
:root[data-content-density=spacious] #player-app .channel-row-copy small{font-size:13px;line-height:1.5}
:root[data-content-density=spacious] #player-app .channel-info{height:auto;min-height:66px}
:root[data-content-density=spacious] #player-app .channel-name{font-size:15px}
:root[data-content-density=compact] #player-app .home-row>.channel-card{flex-basis:clamp(140px,11vw,195px)}
:root[data-content-density=spacious] #player-app .home-row>.channel-card{flex-basis:clamp(185px,16vw,260px)}
@media(max-width:700px){:root[data-content-density=compact] #player-app .home-row>.channel-card{flex-basis:40%}:root[data-content-density=spacious] #player-app .home-row>.channel-card{flex-basis:55%}}
@media(max-width:440px){.appearance-options{gap:6px}.appearance-choice{padding:7px;gap:7px}.appearance-choice strong{font-size:12px}.appearance-description{font-size:10px}.appearance-sample{padding:5px;gap:3px;grid-template-columns:8px repeat(3,minmax(0,1fr))}}
.tv .appearance-choice{min-height:180px;padding:14px}.tv .appearance-choice strong{font-size:17px}.tv .appearance-description{font-size:14px}
:root[data-content-density=compact] #player-app .detail-page .episode-row{height:166px;padding:12px;gap:16px}
:root[data-content-density=spacious] #player-app .detail-page .episode-row{height:210px;padding:22px;gap:24px}
:root[data-content-density=spacious] #player-app .episode-info h3{font-size:18px}
:root[data-content-density=spacious] #player-app .episode-description{font-size:14px}
@media(max-width:800px){:root[data-content-density=compact] #player-app .detail-page .episode-row{height:228px}:root[data-content-density=spacious] #player-app .detail-page .episode-row{height:280px;grid-template-columns:100px minmax(0,1fr);gap:16px}}
