:root{color-scheme:dark;--bg:#0e0e1b;--panel:#202035;--line:#353449;--muted:#acabc0;--purple:#9470ff;--green:#27c785}*{box-sizing:border-box}body{margin:0;background:radial-gradient(ellipse at 85% 0,#20183c 0,transparent 65%),var(--bg);color:#f6f4ff;font:15px/1.45 system-ui,-apple-system,sans-serif}button,input,select{font:inherit}button,select{cursor:pointer}button{color:inherit;background:var(--panel);border:1px solid transparent;border-radius:12px;padding:10px 16px}button:hover{background:#343047}button:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #cbb9ff;outline-offset:3px}button:disabled{opacity:.45;cursor:default}input,select{color:#fff;background:#242237;border:1px solid #414052;border-radius:24px;padding:11px 17px;min-width:0}select{max-width:100%;padding-right:30px}input::placeholder{color:#b0acc3}h1,h2,h3,p{margin:0}h1{font-size:32px;letter-spacing:-1px}h2{font-size:21px;font-weight:600}h3{font-size:18px}.muted{color:var(--muted)}.small{font-size:12px}.tag{display:inline-block;font-size:12px;border:1px solid #474057;background:#29243a;border-radius:16px;padding:4px 10px;margin:3px 5px 3px 0}.green{color:#66e3ab}.primary{background:#7650d8;color:white}.primary:hover{background:#9469ff}.quiet{background:transparent;color:var(--muted)}#sidebar{position:fixed;inset:0 auto 0 0;width:90px;background:#0c0c18d9;border-right:1px solid #272334;z-index:5;display:flex;align-items:center;flex-direction:column;padding:18px 7px;gap:30px}#sidebar button{padding:10px 3px;width:74px;background:transparent;color:#9893ae;display:flex;flex-direction:column;align-items:center;gap:3px;font-size:10px}#sidebar button b{font-size:24px;font-weight:400}#sidebar button.active{background:#392754;color:#c9afff}#sidebar .brand{color:#d4bcff;font-size:28px;font-weight:800;line-height:1}#sidebar .brand span{font-size:11px;letter-spacing:3px}#sidebar nav{display:grid;gap:8px;width:100%}#exit{margin-top:auto}#workspace{margin-left:90px}header{position:sticky;top:0;z-index:4;display:flex;align-items:center;gap:24px;height:84px;padding:16px 32px;background:#11101eea;backdrop-filter:blur(20px)}.wordmark{font-size:11px;letter-spacing:2px;color:#a7a1b8;white-space:nowrap}.wordmark strong{color:#d9c7ff;border-left:1px solid #55455f;padding-left:10px;margin-left:8px}#searchForm{position:relative;max-width:570px;width:65%;margin:auto}#search{width:100%;border:0;background:#28243c;padding-right:52px}#searchForm button{position:absolute;right:2px;top:0;background:transparent;font-size:25px;padding:3px 17px}.language{font-size:11px;border:1px solid #4c435d;padding:5px 9px;border-radius:12px;color:#bbb3cb}main{padding:22px 32px 50px;min-height:calc(100vh - 84px)}.welcome{display:flex;align-items:end;justify-content:space-between;margin-bottom:28px}.eyebrow{text-transform:uppercase;letter-spacing:2px;font-size:10px;color:#b498eb;margin-bottom:8px}.section{margin-bottom:32px}.section-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px}.rail{display:flex;overflow-x:auto;gap:18px;padding:5px 5px 14px;scroll-snap-type:x proximity;scrollbar-width:thin;scrollbar-color:#484057 transparent}.card{flex:0 0 139px;width:139px;background:transparent;padding:0;border-radius:10px;scroll-snap-align:start;text-align:center}.card:hover{background:transparent}.poster{aspect-ratio:2/3;background:linear-gradient(135deg,#3c2b57,#222637);position:relative;border-radius:10px;overflow:hidden}.poster img{width:100%;height:100%;object-fit:cover}.card .title{display:block;font-size:13px;line-height:1.3;margin:10px 0 3px;min-height:34px;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}.card .year{font-size:11px;color:#a5a0b9}.poster .score{position:absolute;top:8px;right:7px;background:#171325d9;padding:3px 6px;border-radius:6px;font-size:10px}.progress{position:absolute;bottom:8px;left:8px;right:8px;height:4px;background:#ffffff44;border-radius:4px}.progress i{display:block;background:#b992ff;height:4px}.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:25px 18px}.grid .card{width:100%}.filters{display:flex;flex-wrap:wrap;gap:12px;margin:18px 0 25px}.filters input{flex:1;min-width:130px}.status,.empty{padding:22px;background:#201b2b;border:1px solid #3a3049;border-radius:12px;color:#ccc3db;margin:12px 0}.empty{padding:32px}.empty button{margin-top:16px}.skeleton{background:linear-gradient(100deg,#201d2e,#302941,#201d2e);background-size:200%;animation:pulse 1.5s infinite;border-radius:12px;min-height:170px;width:100%}@keyframes pulse{to{background-position:-200%}}.loading:before{content:' ';display:inline-block;width:12px;height:12px;border:2px solid #59406d;border-top-color:#c49cff;border-radius:100%;animation:spin .8s linear infinite;margin-right:10px}@keyframes spin{to{transform:rotate(360deg)}}.detail{position:relative;margin:-22px -32px -50px;min-height:calc(100vh - 84px);isolation:isolate}.backdrop{position:absolute;inset:0;z-index:-2;overflow:hidden;background:#14111e}.backdrop img{width:100%;height:100%;object-fit:cover;opacity:.52}.detail:after{content:'';position:absolute;inset:0;background:linear-gradient(90deg,#11101ddd 0,#11101d44 65%,#11101d99),linear-gradient(0deg,#100e1c,transparent);z-index:-1}.back{margin:20px 26px;background:#14112099}.detail-columns{display:grid;grid-template-columns:minmax(0,1fr) minmax(290px,36%);gap:28px;padding:0 28px 30px}.synopsis{padding:28px 8px}.synopsis h1{font-size:40px;max-width:600px;line-height:1.12;margin-bottom:20px}.facts{display:flex;gap:18px;margin:20px 0;color:#ded7e9}.synopsis p{max-width:660px;margin:20px 0;line-height:1.8;font-size:14px}.synopsis h3{font-size:11px;text-transform:uppercase;color:#b4aabe;letter-spacing:1px;margin-top:25px}.source-panel{background:#11101eed;border:1px solid #302939;border-radius:18px;padding:16px;max-height:calc(100vh - 165px);min-height:300px;overflow-y:auto;scrollbar-width:thin}.source-toolbar{display:flex;align-items:center;gap:8px;position:sticky;top:-16px;background:#15111ffa;padding:10px 0;z-index:2}.source-toolbar select{flex:1}.source{display:flex;width:100%;gap:13px;padding:16px 10px;text-align:left;border-radius:10px;margin-bottom:5px;background:transparent;border-bottom:1px solid #2e283c}.source-brand{flex:0 0 83px;font-size:12px;color:#d6c4f0;white-space:pre-line;overflow-wrap:anywhere}.source-description{white-space:pre-line;font-size:12px;color:#e7e1ef;overflow-wrap:anywhere;min-width:0}.source-description small{display:block;color:#82dab2;margin-top:6px}.episode{display:flex;gap:13px;width:100%;background:transparent;text-align:left;padding:10px;margin:5px 0}.episode img{width:105px;aspect-ratio:16/9;object-fit:cover;border-radius:6px;background:#322840}.episode span{font-size:13px}.episode small{display:block;color:#a89fb8;margin-top:6px}.addon{display:flex;align-items:center;gap:22px;padding:24px;background:#242034;border:1px solid #3a314a;border-radius:14px;margin-bottom:14px}.addon-logo{font-size:40px;color:#bca1e6;width:60px;flex-shrink:0;text-align:center}.addon-info{flex:1;min-width:0}.addon-info p{font-size:13px;color:#c2bacf;margin:9px 0;overflow-wrap:anywhere}.addon-info h3 span{font-size:11px;color:#aaa1b8;margin-left:12px}.addon-actions{display:grid;gap:8px;min-width:130px}.addon-actions .install{background:#209b69}.settings-card{max-width:820px;background:#231e32;border:1px solid #3c304a;border-radius:16px;padding:24px;margin:20px 0}.settings-card label{display:block;margin:15px 0 6px}.settings-card input{width:100%;border-radius:9px}.settings-card p{margin:12px 0;color:#bfb5cd}.settings-card button{margin-top:14px}.footer{font-size:11px;color:#8f859f;margin:24px 0}#toast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);max-width:80%;background:#372a47;color:white;padding:14px 22px;border:1px solid #a77aea;border-radius:12px;z-index:30}dialog{border:1px solid #674985;border-radius:18px;background:#20192d;color:#fff;width:min(620px,90vw);padding:28px;box-shadow:0 24px 100px #000b}dialog::backdrop{background:#05030acc;backdrop-filter:blur(5px)}dialog input{width:100%;margin:20px 0;border-radius:9px}dialog p{color:#bdb1cb;margin:15px 0}dialog .actions{display:flex;gap:10px;justify-content:flex-end;margin-top:20px}.error{color:#ffc7c7}.addon-warning{color:#e9c48f}.center{text-align:center;margin:22px}.hidden{display:none!important}@media(min-width:1500px){.card{flex-basis:165px;width:165px}.grid{grid-template-columns:repeat(auto-fill,minmax(155px,1fr))}.rail{gap:23px}header{height:95px}}@media(max-width:900px){body{font-size:13px}#sidebar{width:70px;padding:10px 3px;gap:10px}#sidebar button{width:60px;padding:8px 2px}#workspace{margin-left:70px}header{height:64px;padding:10px 18px;gap:10px}.wordmark{display:none}#searchForm{width:90%}.language{display:none}main{padding:15px 20px 30px}.card{width:120px;flex-basis:120px}.detail{margin:-15px -20px -30px}.detail-columns{grid-template-columns:minmax(0,1fr) 330px;padding:0 18px 20px;gap:10px}.synopsis{padding:16px 0}.synopsis h1{font-size:29px}.source-panel{max-height:calc(100vh - 125px)}.back{margin:10px 18px}.addon{padding:16px;gap:14px}.addon-logo{width:40px}.synopsis p{font-size:12px}.facts{gap:12px}}@media(max-width:650px){.detail-columns{grid-template-columns:1fr}.source-panel{max-height:none}.addon{flex-wrap:wrap}.addon-actions{display:flex;width:100%}.addon-logo{display:none}.welcome h1{font-size:24px}.grid{grid-template-columns:repeat(auto-fill,minmax(110px,1fr))}}
/* Match the reference proportions, including short landscape Android screens. */
:root{--rail-width:clamp(62px,5.5vw,96px);--header-height:clamp(42px,9vh,88px);--poster-width:clamp(68px,8.65vw,166px);--gutter:clamp(12px,1.5vw,28px);--gap:clamp(10px,1.5vw,28px)}
body{font-size:clamp(10px,.86vw,16px);background:linear-gradient(110deg,#10101c,#15122c)}
#sidebar{width:var(--rail-width);padding:8px 3px;gap:clamp(4px,1vh,10px);border:0;background:#0e0d19;overflow-y:auto;scrollbar-width:none}
#sidebar .brand{padding:0;background:transparent;width:calc(var(--rail-width) - 12px);height:calc(var(--header-height) - 10px);flex-shrink:0}
#sidebar .brand img{width:100%;height:100%;object-fit:contain;border-radius:6px}
#sidebar nav{gap:clamp(2px,.4vh,6px)}
#sidebar button{width:100%;min-height:36px;height:clamp(36px,7.4vh,76px);padding:4px 2px;position:relative;border-radius:8px;justify-content:center;gap:3px;flex-shrink:0}
#sidebar button b{font-size:clamp(20px,1.7vw,32px);line-height:1}
#sidebar button span{display:block;font-size:clamp(8px,.65vw,11px);line-height:1.15;font-weight:500;text-transform:uppercase;white-space:nowrap}
#sidebar button.active{background:transparent;color:#9a78ff}
#sidebar button:focus-visible{background:#29223d;outline:2px solid #cbb9ff;outline-offset:-2px}
#exit{margin-top:auto;flex-shrink:0}
#workspace{margin-left:var(--rail-width)}
header{height:var(--header-height);padding:6px var(--gutter);background:#141126;backdrop-filter:none}
#searchForm{width:clamp(230px,25vw,480px);max-width:60%;margin:auto}
#search{font-size:clamp(10px,.83vw,16px);height:clamp(28px,4.8vh,48px);padding:5px 36px 5px 16px}
#searchForm button{height:100%;font-size:clamp(19px,1.5vw,26px);padding:0 12px}
main{padding:10px var(--gutter) 24px;min-height:calc(100vh - var(--header-height))}
h2{font-size:clamp(14px,1.3vw,25px);font-weight:500}
.section{margin-bottom:clamp(18px,4.5vh,46px)}
.section-head{margin-bottom:clamp(8px,1.4vh,16px)}
.section-head .quiet{font-size:clamp(10px,.85vw,16px);padding:4px 8px}
.rail{gap:var(--gap);padding:4px 3px 8px;scrollbar-width:none}
.card{width:var(--poster-width);flex:0 0 var(--poster-width);border-radius:6px}
.poster{border-radius:6px}
.card .title{font-size:clamp(9px,.85vw,16px);margin:clamp(5px,1vh,10px) 0 0;min-height:2.6em;line-height:1.3;font-weight:500}
.card .year{display:none}
.poster .score{font-size:clamp(8px,.65vw,12px);top:4px;right:4px;padding:2px 4px}
.grid{grid-template-columns:repeat(auto-fill,minmax(var(--poster-width),1fr));gap:18px var(--gap)}
.detail{margin:-10px calc(-1 * var(--gutter)) -24px;min-height:calc(100vh - var(--header-height))}
.detail-columns{grid-template-columns:minmax(0,1fr) minmax(240px,34%);gap:16px;padding:0 var(--gutter) 20px}
.back{margin:8px var(--gutter);padding:6px 12px}
.synopsis{padding:10px 0}.synopsis h1{font-size:clamp(24px,3vw,52px)}
.source-panel{max-height:calc(100vh - var(--header-height) - 55px);min-height:200px;border:0;border-radius:10px;padding:10px}
.source-toolbar{top:-10px}.source{padding:10px 6px;gap:10px}.source-brand{flex-basis:65px}
.source-description,.source-brand,.synopsis p{font-size:clamp(10px,.85vw,15px)}
.welcome{margin-bottom:12px}.welcome h1{font-size:24px}
@media(max-width:650px) and (orientation:portrait){:root{--poster-width:100px;--rail-width:46px}.detail-columns{grid-template-columns:1fr}.source-panel{max-height:none}#searchForm{max-width:95%;width:100%}.card .title{font-size:12px}}
#sidebar svg{width:clamp(18px,1.65vw,30px);height:clamp(18px,1.65vw,30px);stroke:currentColor;fill:none;stroke-width:1.6;stroke-linejoin:round;stroke-linecap:round}
.catalog-status{padding:18px 0;color:var(--muted);min-height:50px}.card,button,input,select{scroll-margin-top:calc(var(--header-height) + 14px);scroll-margin-bottom:18px}

/* Unified account, source preparation and live TV */
.auth{background:radial-gradient(ellipse at 0 100%,#43238b 0,transparent 48%),radial-gradient(ellipse at 95% 0,#302067 0,transparent 50%),#0d0c17}.auth #sidebar,.auth header{display:none}.auth #workspace{margin:0}.auth main{min-height:100vh;display:grid;place-items:center;padding:24px}.login-form{width:min(430px,85vw);display:grid;gap:12px}.login-brand{display:flex;align-items:center;justify-content:center;gap:14px;margin-bottom:12px;letter-spacing:4px}.login-brand img{width:48px;height:48px}.login-form h1{font-size:clamp(24px,3vw,38px);text-align:center;line-height:1.16;white-space:pre-line}.login-form>p.muted{text-align:center;margin-bottom:12px}.login-form label{display:grid;gap:4px;font-size:12px;color:var(--muted)}.login-form input{width:100%;border-radius:10px;padding:10px 14px}.login-form button{border-radius:28px;min-height:44px}.login-error{color:#eeb1c0;font-size:12px;min-height:16px}.sync-screen{width:min(680px,90vw);display:grid;gap:18px}.sync-screen h1{font-size:30px}.sync-source{background:#242038;border:1px solid #494057;border-radius:16px;padding:18px}.sync-source h2{margin-bottom:8px}.addon-logo svg{width:56px;height:56px;fill:currentColor;stroke:none}.addon-logo img{width:64px;height:64px;object-fit:contain}.tv-layout{display:grid;grid-template-columns:19% minmax(0,1fr) 25%;gap:16px;height:calc(100vh - var(--header-height) - 108px);min-height:260px}.tv-categories,.tv-right{overflow-y:auto;padding:4px}.tv-categories button{display:block;width:100%;text-align:left;margin-bottom:7px;font-size:12px;padding:10px}.tv-center{display:flex;flex-direction:column;gap:12px;min-height:0}.tv-preview{flex:0 0 42%;width:100%;background:#07060d;border:1px solid #3c3155;border-radius:10px;display:grid;place-content:center;text-align:center;min-height:120px;padding:12px}.tv-preview small{color:var(--muted);font-size:11px}.tv-center input{width:100%;padding:8px 14px}.tv-channels{overflow-y:auto;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;align-content:start;padding:4px}.tv-channel{display:flex;align-items:center;gap:10px;text-align:left;font-size:12px;padding:8px;min-height:48px}.tv-channel img{width:38px;height:32px;object-fit:contain}.tv-source{width:100%;display:grid;text-align:left;margin:8px 0;gap:4px;padding:10px}.tv-source small{color:var(--muted);font-size:11px}.selected{background:#3b2a62!important;border-color:#9c7cdd!important}.tv-right h3{font-size:14px;margin:4px 0 10px}.tv-guide{margin-top:8px}.epg-program{display:grid;gap:5px;padding:10px 0;border-top:1px solid var(--line)}.epg-program small{color:#bda5ea}.epg-program strong{font-size:12px}.epg-program p{font-size:11px;color:var(--muted);display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}@media(max-height:600px){.login-form{gap:7px;width:360px}.login-brand{margin-bottom:0}.login-form>p.muted{margin-bottom:4px}.login-brand img{width:36px;height:36px}.tv-layout{height:calc(100vh - var(--header-height) - 87px)}}

/* The login fits the TV viewport without document scrolling. */
body.auth{height:100dvh;overflow:hidden}.auth #workspace{height:100%}.auth main{height:100%;min-height:0;padding:clamp(8px,2vh,24px);overflow:hidden}.login-form{gap:clamp(5px,1.5vh,12px);width:min(430px,85vw);max-height:100%}.login-brand{margin:0 0 clamp(4px,2vh,16px);font-family:system-ui,sans-serif}.login-brand img{width:clamp(30px,8vh,48px);height:clamp(30px,8vh,48px)}.login-form input{padding:clamp(7px,1.8vh,12px) 14px}.login-form button{min-height:36px;padding:clamp(7px,1.8vh,12px) 16px}.login-error{min-height:0}.login-error:empty{display:none}.sync-screen{gap:clamp(7px,2vh,18px)}

/* TV follows the original two-column structure. */
.tv-page{height:100dvh;overflow:hidden}.tv-page header{display:none}.tv-page main{height:100dvh;min-height:0;padding:12px 14px;overflow:hidden}.tv-layout{height:100%;min-height:0;grid-template-columns:34% minmax(0,1fr);gap:16px}.tv-category-column{display:flex;flex-direction:column;min-height:0;background:#141122;border-radius:10px;padding:10px}.tv-category-column h2{font-size:20px;padding:6px 12px 16px}.tv-categories{flex:1;min-height:0;scrollbar-width:none}.tv-categories button{border-radius:6px;background:transparent;margin:0;padding:14px 12px;min-height:48px;font-size:14px}.tv-center{gap:10px}.tv-preview{flex:0 0 43%;min-height:0;border-radius:8px}.tv-lower{display:grid;grid-template-columns:1fr 1fr;gap:12px;flex:1;min-height:0}.tv-channel-column{display:flex;flex-direction:column;gap:8px;min-height:0}.tv-channels{display:flex;flex-direction:column;flex:1;min-height:0;gap:4px;scrollbar-width:none}.tv-channel{flex-shrink:0;background:transparent;border-radius:6px;padding:12px 8px;min-height:58px}.tv-channel img{width:30px;height:30px}.tv-right{border-left:1px solid #30283e;padding:4px 10px;scrollbar-width:none}.tv-source{padding:8px;font-size:12px}.tv-center input{font-size:12px;padding:7px 12px}.tv-preview p{font-size:14px}.tv-preview small{display:none}

.sync-screen{width:min(1100px,94vw)}.sync-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.sync-grid .sync-source{padding:18px 12px;background:linear-gradient(140deg,#352457,#211b34)}.sync-grid h2{font-size:16px;text-align:center}.sync-grid p{font-size:12px;margin:12px 0;color:#d1c7e7}.sync-message{text-align:center;margin-top:22px}.channel-labels{display:grid;gap:3px;min-width:0}.channel-labels small{color:#bab1cd;font-size:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tv-channel img{width:40px;height:35px;flex:0 0 40px;background:#e4dff0;border-radius:4px}.tv-guide p{font-size:12px;margin:8px 0}.tv-channel,.tv-source{scroll-margin:4px}.tv-channel:focus-visible,.tv-source:focus-visible{outline:2px solid #d3bcff;outline-offset:0}

.login-modes{display:flex;gap:24px;justify-content:center}.login-modes label{display:flex;align-items:center;gap:8px;color:#eee;cursor:pointer}.login-modes input[type=radio]{width:18px;height:18px;margin:0;accent-color:#9b73ff}.login-form label[hidden]{display:none}.playlist-mode header,.playlist-mode #sidebar nav button:not([data-nav=home]){display:none}.playlist-items{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:10px}.playlist-item{display:grid;grid-template-columns:48px 1fr;text-align:left;align-items:center;gap:8px;padding:12px;background:#242038}.playlist-item img{width:48px;height:40px;object-fit:contain;grid-row:span 2}.playlist-item small{color:var(--muted)}#dialog .actions{justify-content:flex-end;gap:12px}

/* Compact loading cards, using the application palette. */
.sync-screen{text-align:center}.sync-grid .sync-source{background:linear-gradient(110deg,#6941cf,#8c45db);border:1px solid #a779ed;border-radius:8px;padding:18px 12px;min-height:0}.sync-source h2{margin:0 0 10px}.sync-source p{margin:0;text-align:center}.sync-message{margin-top:30px}.filters select:disabled{opacity:1;color:var(--text,#fff);cursor:default}

/* Compact playback progress with readable text on TV. */
#dialog.playback-dialog{width:min(310px,calc(100vw - 32px));padding:20px;border-radius:16px;font-size:14px;max-height:85vh;overflow:auto}
#dialog.playback-dialog h2{font-size:18px;line-height:1.3;letter-spacing:0}
#dialog.playback-dialog p{font-size:14px;line-height:1.5;white-space:pre-line;margin:14px 0;color:#e8e1f3}
#dialog.playback-dialog .actions{margin-top:14px}
#dialog.playback-dialog button{font-size:14px;padding:9px 16px;min-height:44px}
#dialog.playback-dialog .source{font-size:14px;overflow-wrap:anywhere}
.source-chevron{display:block;width:8px;height:8px;border-top:2px solid currentColor;border-right:2px solid currentColor;transform:rotate(45deg);margin-right:3px}
.source-chevron.left{transform:rotate(-135deg);margin-right:0;margin-left:5px}
.source-brand{display:flex;flex-direction:column;align-items:flex-start;gap:10px;min-width:0;overflow-wrap:anywhere}
.source-play{display:grid;place-items:center;width:26px;height:26px;flex:0 0 26px;border-radius:50%;background:#8054e8;color:white;box-shadow:0 2px 8px #0003}
.source-play:before{content:'';width:0;height:0;border-top:5px solid transparent;border-bottom:5px solid transparent;border-left:8px solid currentColor;margin-left:2px}
.source:hover .source-play,.source:focus-visible .source-play{background:#a17aff}
.source-language-tags{display:flex;flex-wrap:wrap;gap:5px;margin-top:7px;white-space:normal}
.source-language-tag{display:inline-flex;align-items:center;padding:3px 9px;border-radius:999px;border:1px solid #73539f;background:#392752;color:#efe4ff;font-size:11px;line-height:1.4;font-weight:500}
.source-panel .source-brand,.source-panel .source-description,.source-panel .source-description small,.source-panel .source-language-tag{font-size:11px}
.source-toolbar select{appearance:none;padding-right:30px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='m2 4 4 4 4-4' fill='none' stroke='%23f6f4ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 12px center}

/* More visible sources without hiding provider or language information. */
@media(min-width:651px),(orientation:landscape){
 .detail-columns{grid-template-columns:minmax(0,1fr) minmax(270px,36%)}
 .detail-columns>.source-panel{position:relative;top:-38px;margin-bottom:-38px;height:calc(100vh - var(--header-height) - 18px);max-height:calc(100vh - var(--header-height) - 18px)}
}
.source-panel .source{padding:8px 5px;gap:8px;margin-bottom:2px;line-height:1.22}
.source-panel .source-brand{flex-basis:70px;gap:6px}
.source-panel .source-brand,.source-panel .source-description,.source-panel .source-description small{font-size:10px;letter-spacing:-.1px}
.source-panel .source-summary{display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden;white-space:pre-line}
.source-panel .source-description small{margin-top:3px}
.source-panel .source-language-tags{margin-top:4px;gap:4px}
.source-panel .source-language-tag{font-size:10px;padding:2px 7px;line-height:1.2}
.source-panel .source-play{width:23px;height:23px;flex-basis:23px}
.source-panel .source-toolbar{padding:5px 0;flex-direction:column;align-items:stretch;gap:8px}
.source-choice-label{font-size:12px;font-weight:600;line-height:1.4;color:#e6d7ff;margin:0}
.source-panel .source-toolbar select{padding-top:8px;padding-bottom:8px;font-size:11px}

#catalogTitle{position:absolute;left:var(--gutter);top:50%;transform:translateY(-50%);font-size:clamp(20px,2vw,32px);line-height:1.15;letter-spacing:-.6px;margin:0;max-width:28%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tv-category-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-shrink:0;padding-bottom:8px}.tv-category-heading h2{padding:6px 12px}.tv-reload{display:grid;place-items:center;width:32px;height:32px;padding:6px;flex-shrink:0;background:transparent;color:#b6a4d8}.tv-reload svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.tv-reload.spinning svg{animation:spin 1s linear infinite}
.tv-list-status{font-size:11px;padding:0 10px 8px;flex-shrink:0;overflow-wrap:anywhere;max-height:25vh;overflow-y:auto}.tv-list-status:empty{display:none}.tv-list-status p{margin:4px 0}.tv-list-status button{font-size:11px;padding:6px 10px}.tv-list-status .loading{display:flex;align-items:center;min-height:32px}.tv-list-status .loading:before{flex-shrink:0;width:16px;height:16px}
.catalog-page main{padding-top:4px}
.catalog-page .filters{margin:6px 0 16px}
@media(max-width:650px) and (orientation:portrait){.catalog-page #searchForm{margin-left:auto;margin-right:0;max-width:65%;width:65%}#catalogTitle{font-size:19px}}

.login-form .login-error.auth-progress{font-size:13.2px;color:#c7a4ff;min-height:1.5em;text-align:center;}

/* Series: compact metadata and horizontal season/episode navigation. */
header .detail-back{flex:0 0 auto;padding:6px 10px;font-size:12px;background:#242034}
.series-detail .detail-columns{padding-top:10px}
.series-detail .synopsis{padding:0 4px;min-width:0}
.series-detail .synopsis h1{font-size:clamp(23px,2.6vw,36px);margin:0 0 6px;line-height:1.12}
.series-detail .eyebrow{margin-bottom:4px}
.series-detail .facts{margin:6px 0 8px;gap:14px;font-size:12px}
.series-detail .synopsis h3{margin:8px 0 4px;font-size:11px}
.series-detail .tag{font-size:10px;padding:2px 8px;margin:0 4px 3px 0}
.series-detail .synopsis .series-description{margin:7px 0 9px;line-height:1.5;font-size:12px;max-width:none;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.series-detail .detail-columns>.source-panel{top:0;margin-bottom:0;align-self:start}
.source-panel.choosing-source:focus-within{border-color:#d8b9ff;box-shadow:0 0 0 1px #caa6ffcc,0 0 16px #b57bff55,inset 0 0 12px #b57bff14}
.source-panel .source:focus-visible,.source-panel .source-toolbar select:focus-visible{outline:3px solid #55ff99;outline-offset:3px;box-shadow:0 0 10px #39ff8866,inset 0 0 8px #39ff8814;animation:source-focus-neon 1.8s ease-in-out infinite}
@keyframes source-focus-neon{0%,100%{outline-color:#55ff99;box-shadow:0 0 8px #39ff8855,inset 0 0 6px #39ff8810}50%{outline-color:#a1ffc5;box-shadow:0 0 18px #39ff88aa,inset 0 0 12px #39ff8830}}
@media(prefers-reduced-motion:reduce){.source-panel .source:focus-visible,.source-panel .source-toolbar select:focus-visible{animation:none}}
.series-browser{min-width:0}
.series-rail-head{display:flex;align-items:center;justify-content:space-between;margin-top:6px}
.series-rail-arrows{display:flex;gap:5px}
.series-rail-arrows button{width:26px;height:24px;min-height:24px;padding:7px;background:#262036}
.series-rail-arrows .source-chevron{width:6px;height:6px}
.season-rail,.episode-rail{display:flex;gap:9px;overflow-x:auto;scroll-snap-type:x proximity;scrollbar-width:thin;padding:5px 4px 8px;scroll-padding:4px}
.season-card{flex:0 0 auto;font-size:12px;padding:6px 12px;border-radius:9px;scroll-snap-align:start}
.season-card.selected,.episode-card.selected{background:#392752;border-color:#8f6fc6}
.episode-card{flex:0 0 clamp(150px,15vw,210px);width:clamp(150px,15vw,210px);padding:5px;background:#171321aa;text-align:left;scroll-snap-align:start;display:flex;flex-direction:column;gap:5px;border-radius:9px}
.episode-card img{width:100%;aspect-ratio:16/9;object-fit:cover;background:#292037;border-radius:6px}
.episode-card strong{font-size:12px;line-height:1.35;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.episode-card .episode-description{font-size:11px;line-height:1.4;color:#c2b9ce;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
@media(max-width:650px) and (orientation:portrait){header{gap:8px}header .detail-back{padding:6px;font-size:11px}.series-detail .detail-columns{padding-top:8px}.episode-card{flex-basis:160px;width:160px}}

/* Streaming shortcuts keep the same remote-control rail behavior as title cards. */
.streaming-rail{gap:18px;padding:8px 6px 12px;scroll-snap-type:x proximity}
.streaming-card.card{width:132px;min-width:132px;scroll-snap-align:start}
.streaming-logo{height:88px;border-radius:16px;background:#252238;display:flex;align-items:center;justify-content:center;padding:12px;font-size:17px;font-weight:700;overflow:hidden}
.streaming-logo img{width:64px;height:64px;object-fit:contain;border-radius:12px}
.streaming-card .title{margin-top:8px;font-size:12px}

/* Fit the full series chooser on landscape TV screens without vertical scrolling. */
.series-detail .detail-columns{padding-top:4px;padding-bottom:6px}
.series-detail .eyebrow{font-size:9px;line-height:1.2;margin-bottom:2px}
.series-detail .synopsis h1{font-size:clamp(22px,2.4vw,32px);line-height:1.05;margin-bottom:3px}
.series-detail .facts{margin:3px 0 4px;font-size:11px;line-height:1.3}
.series-detail .synopsis h3{margin:3px 0;font-size:10px;line-height:1.3}
.series-detail .tag{font-size:10px;padding:1px 7px;margin-bottom:1px}
.series-detail .synopsis .series-description{font-size:11px;line-height:1.35;margin:5px 0;-webkit-line-clamp:2}
.series-rail-head{margin-top:3px}
.season-strip{position:relative;padding:0 12px}
.season-hint{position:absolute;top:50%;transform:translateY(-50%);color:#c3aedf;font-size:24px;line-height:1;pointer-events:none}
.season-hint.left{left:0}.season-hint.right{right:0}
.season-rail,.episode-rail{padding:5px 4px 6px;scrollbar-width:none}
.season-rail::-webkit-scrollbar,.episode-rail::-webkit-scrollbar{display:none}
.season-card{font-size:11px;padding:4px 10px;line-height:1.3}
.episode-card{flex-basis:clamp(135px,14vw,190px);width:clamp(135px,14vw,190px);gap:3px;padding:4px}
.episode-card img{height:clamp(54px,14vh,100px);aspect-ratio:auto}
.episode-card strong{font-size:11px;line-height:1.25}
.episode-card .episode-description{font-size:10px;line-height:1.3;-webkit-line-clamp:2}
@media(max-height:480px) and (orientation:landscape){.episode-card img{height:52px}.series-detail .synopsis .series-description{-webkit-line-clamp:1}.series-detail .synopsis h1{font-size:22px}}

/* Compact streaming logo carousel. */
.streaming-rail{gap:14px;padding:6px 4px 10px}
.streaming-card.card{flex:0 0 94px;width:94px;min-width:94px;padding:5px;border-radius:8px;background:transparent}
.streaming-logo{height:44px;padding:2px;border-radius:6px;background:transparent;font-size:12px;line-height:1.2}
.streaming-logo img{height:40px;width:68px;object-fit:contain;border-radius:5px}
/* Live TV: categories / channel grid / preview and sources. */
.tv-page main{padding:10px}
.tv-layout{grid-template-columns:minmax(125px,17%) minmax(0,1fr) minmax(225px,29%);gap:10px}
.tv-category-column{padding:5px;background:#141122}
.tv-category-column h2{font-size:14px;padding:4px}
.tv-category-heading{padding-bottom:3px}
.tv-list-status{font-size:9px;padding:2px 4px 5px;max-height:15vh}
.tv-categories{padding:2px}
.tv-categories button{font-size:11px;line-height:1.25;min-height:30px;padding:7px 6px;margin:1px 0;word-break:break-word}
.tv-center,.tv-channel-column{min-width:0;height:100%;min-height:0}
.tv-center input{font-size:11px;padding:7px 10px;width:100%}
.tv-channels{display:grid;grid-template-columns:repeat(auto-fill,minmax(125px,1fr));align-content:start;gap:8px;padding:4px;overflow-y:auto}
.tv-channel{display:flex;flex-direction:column;align-items:stretch;gap:4px;padding:5px;background:#1c1728;min-width:0;min-height:0;text-align:left}
.channel-logo{height:65px;display:flex;align-items:center;justify-content:center;background:#242031;border-radius:7px;color:#a596bb}
.tv-channel .channel-logo img{width:100%;height:100%;object-fit:contain;padding:4px}
.tv-channel .channel-labels{display:flex;flex-direction:column;gap:3px;min-width:0}
.tv-channel .channel-labels strong{font-size:10px;line-height:1.2;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:24px}
.tv-channel .channel-labels small{font-size:9px;line-height:1.25;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#c0b5cc}
.tv-right{display:flex;flex-direction:column;gap:7px;min-width:0;min-height:0;padding:0;border:0;overflow:hidden}
.tv-right .tv-preview{width:100%;aspect-ratio:16/9;flex:0 0 auto;min-height:0;padding:8px}
.tv-preview p{font-size:11px}
.tv-right h3{font-size:12px;margin:2px 0}
.tv-sources{overflow-y:auto;min-height:0;flex:1;padding:4px}
.tv-source{padding:7px;margin:0 0 6px;gap:3px;font-size:11px}
.tv-source small{font-size:10px}
@media(max-width:800px){.tv-layout{grid-template-columns:115px minmax(0,1fr) 205px}.tv-channels{grid-template-columns:repeat(auto-fill,minmax(110px,1fr))}.channel-logo{height:54px}}
.tv-channels{grid-auto-rows:140px}.tv-channel{height:140px}.channel-logo{flex:0 0 65px}.tv-channel .channel-labels{flex:1}@media(max-width:800px){.tv-channels{grid-auto-rows:128px}.tv-channel{height:128px}.channel-logo{flex-basis:54px}}

.streaming-card.card{flex:0 0 122px;width:122px;min-width:122px;height:52px;padding:7px 8px;display:flex;align-items:center;justify-content:center;border-radius:8px;background:linear-gradient(135deg,#17132588,#21193155)}
.streaming-card.card:hover,.streaming-card.card:focus-visible{background:#2b2045}
.streaming-wordmark{white-space:nowrap;font-size:16px;letter-spacing:-.6px;line-height:1;font-weight:700;color:#f5f0ff}
.brand-netflix{font-size:20px;font-weight:900;letter-spacing:-.8px;color:#e50914;transform:scaleX(.88)}
.brand-max{font-size:19px;letter-spacing:-1px}.brand-prime{color:#55c2ec;font-size:17px;letter-spacing:-.7px}
.brand-disney{font-family:Georgia,serif;font-style:italic;font-size:20px;font-weight:600}.brand-apple{font-size:19px;font-weight:600}
.brand-paramount{font-family:Georgia,serif;font-style:italic;font-size:16px}.brand-crunchyroll{color:#ff8739;font-size:16px;letter-spacing:-.8px}

.streaming-card img.streaming-wordmark{width:100%;height:32px;object-fit:contain;transform:none}.streaming-card img.brand-disney,.streaming-card img.brand-apple,.streaming-card img.brand-max,.streaming-card img.brand-paramount{filter:brightness(0) invert(1)}

.episode-rail{scroll-snap-type:none;scroll-behavior:auto;padding-left:7px;padding-right:7px}
.episode-card .episode-description{font-size:9px;line-height:1.35;-webkit-line-clamp:4}
@media(max-height:480px) and (orientation:landscape){.episode-card .episode-description{-webkit-line-clamp:3}}

.series-title-row{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 10px;margin-bottom:4px}
.series-detail .series-title-row h1{font-size:clamp(16.5px,1.8vw,24px);line-height:1.15;margin:0;letter-spacing:-.5px}
.series-detail .series-title-row .facts{margin:0;gap:8px;white-space:nowrap;font-size:10px}
.series-detail .detail-genres{line-height:1.15;margin:2px 0 4px}
.series-detail .detail-genres .tag{font-size:9px;padding:1px 6px;border-radius:9px;margin:0 4px 0 0}
.series-detail .synopsis .series-description{font-size:10px;line-height:1.4;min-height:2.8em;margin:5px 0;-webkit-line-clamp:2}

.tv-channel .channel-labels{gap:2px}.tv-channel .channel-labels .epg-label{font-size:5px;line-height:1.1;white-space:nowrap}.channel-now,.channel-next{font-size:9px;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tv-channel .channel-labels strong{font-weight:700;min-height:12px}.tv-channels{grid-auto-rows:155px}.tv-channel{height:155px}

/* Consistent live cards, independent of logo aspect ratio or title length. */
.tv-channel{height:166px;padding:6px;border:1px solid #30253f;background:linear-gradient(145deg,#211a30,#181322);border-radius:10px;gap:5px}
.tv-channels{grid-auto-rows:166px;gap:9px}
.tv-channel .channel-logo{height:65px;flex:0 0 65px;min-height:65px;overflow:hidden;background:#292236;border-radius:7px}
.tv-channel .channel-logo img{width:78px;height:57px;max-width:78px;max-height:57px;padding:2px;object-fit:contain;background:transparent}
.channel-logo-fallback{font-size:12px;font-weight:700;line-height:1.15;text-align:center;padding:7px;color:#d0bce8;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.tv-channel .channel-labels{display:grid;grid-template-rows:24px 6px 11px 6px 11px;gap:2px;flex:none}
.tv-channel .channel-labels strong{font-size:10px;line-height:12px;height:24px;min-height:24px;font-weight:700}
.tv-channel .channel-labels .epg-label{font-size:5px;line-height:6px}
.channel-now,.channel-next{font-size:9px;line-height:11px}

.tv-search{position:relative;flex-shrink:0;min-width:0}.tv-center .tv-search input{padding-right:42px}.tv-search-clear{position:absolute;right:5px;top:3px;bottom:3px;width:30px;padding:0;border-radius:50%;background:transparent;color:#ff5555;font-size:24px;line-height:1}.tv-search-clear[hidden]{display:none}.tv-search-clear:hover,.tv-search-clear:focus-visible{background:#493044}.tv-search-clear:focus-visible{outline:2px solid #cbb9ff;outline-offset:0}#profile{display:flex;align-items:center;gap:10px;min-width:0;margin-left:auto;margin-right:8px;flex:0 0 auto;padding:6px 12px 6px 8px;border:1px solid #3c3154;border-radius:999px;background:#211b34;color:#eee8fa;overflow:visible}#profile[hidden]{display:none}.profile-avatar{display:grid;place-items:center;width:30px;height:30px;flex:0 0 30px;border:1px solid #9c7cdd;border-radius:50%;background:#392754;color:#cbb9ff}.profile-avatar svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.profile-name{max-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;color:#e9e1f7}

.login-layout{position:relative;width:min(430px,85vw);max-height:100%}.login-layout .login-form{width:100%}.login-user-row{position:relative}.login-support{position:absolute;right:calc(100% + 32px);top:21.4px;width:144px;display:grid;justify-items:center;gap:12px;text-align:center}.login-support img{display:block;width:100%;height:auto;aspect-ratio:1;background:#eee7ff;border:1px solid #67518d;border-radius:8px}.login-support strong{font-size:10px;font-weight:600;letter-spacing:1.4px;color:#cbb9ff}@media(max-width:850px){.login-layout{width:min(430px,calc(100vw - 204px));margin-left:176px}.login-support{right:calc(100% + 24px)}}
