/* Keep the whole library inside the TV viewport. Each rail scrolls independently. */html,body{width:100%;height:100%;min-height:0;overflow:hidden;}body{display:flex;flex-direction:column;background:var(--iptv-surface-1000);}.glow{position:fixed;background:radial-gradient(ellipse at 100% 0,var(--iptv-surface-333),transparent 65%),linear-gradient(135deg,var(--iptv-surface-1000),var(--iptv-surface-1000));}header{flex:0 0 104px;height:104px;gap:12px;padding:0 40px;min-width:0;}header nav{min-width:0;padding:4px;}header nav button{font-size:17px;padding:12px;}.brand{font-size:27px;}header>button{white-space:nowrap;}#unified-open{background:var(--iptv-surface-1000);color:var(--iptv-accent-1000);font-size:21px;font-weight:bold;padding:15px 24px;border-radius:15px;}main{flex:1;min-height:0;height:auto;padding:24px 40px 12px;grid-template-columns:310px minmax(0,1fr);gap:28px;direction:ltr;}main aside,main>section{min-height:0;min-width:0;}main aside{display:flex;flex-direction:column;border-radius:19px;background:var(--iptv-surface-702);padding:18px 14px;overflow:hidden;direction:inherit;}aside h1{font-size:22px;margin:8px 12px;}aside>.eyebrow,#account-note{font-size:13px;margin:6px 12px 12px;line-height:1.5;}#library-special{flex-shrink:0;padding:0 6px 12px;border-bottom:1px solid var(--iptv-border-125);margin-bottom:10px;}#library-special button{display:block;width:100%;text-align:start;min-height:54px;margin:4px 0;font-size:20px;border:1px solid transparent;background:transparent;border-radius:12px;padding:12px 14px;color:var(--iptv-text-1000);}#library-special .active{background:var(--iptv-surface-1000);color:var(--iptv-text-1000);border-color:var(--iptv-border-1000);}#categories{flex:1;min-height:0;max-height:none;overflow:auto;padding:8px;scroll-padding:12px;}#categories button{font-size:18px;line-height:1.45;border-bottom:1px solid var(--iptv-border-71);border-radius:10px;padding:15px 12px;}main>section{display:flex;flex-direction:column;direction:inherit;}.heading{flex:0 0 100px;height:100px;min-height:0;padding:0 10px 14px;margin:0 0 8px;}.heading h2{font-size:28px;margin:7px 0;}.heading .eyebrow{font-size:12px;letter-spacing:2px;}.search{flex:0 1 660px;min-width:0;gap:10px;}.search input{flex:1;min-width:120px;width:auto;font-size:23px;padding:18px 22px;border-radius:14px;background:var(--iptv-surface-1000);color:var(--iptv-accent-1000);border-color:var(--iptv-border-1000);}.search input::placeholder{color:var(--iptv-muted-1000);font-size:18px;}.search button{min-width:128px;border-radius:14px;padding:16px 22px;font-size:23px;background:var(--iptv-surface-1000);}#status{flex:0 0 auto;min-height:26px;margin:0 10px 9px;font-size:16px;}.items,body[data-density=compact]:not([data-kind=live]) .items,body[data-kind=live] .items{flex:1;min-height:0;max-height:none;overflow:auto;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));grid-auto-rows:var(--poster-row,340px);align-content:start;gap:22px;padding:8px 10px;scroll-padding:10px;}.item{height:100%;min-height:0;}.items .item .tile,body[data-kind] .items .item .tile,body[data-density] .items .item .tile{height:100%;padding:8px;gap:5px;border-radius:12px;display:flex;justify-content:flex-start;overflow:hidden;min-height:0;background:var(--iptv-surface-910);border:1px solid var(--iptv-border-208);}.items .item .tile img,body[data-kind] .items .item .tile img,body[data-density] .items .item .tile img{width:100%;height:0;flex:1;min-height:0;object-fit:contain;padding:0;border-radius:6px;background:var(--iptv-surface-1000);}.tile strong{flex:0 0 auto;max-height:52px;font-size:18px;line-height:1.4;padding:4px;overflow:hidden;}.tile .placeholder{flex:1;min-height:0;display:flex;align-items:center;justify-content:center;line-height:1;font-size:54px;}.tile .resume-tag{flex-shrink:0;font-size:14px;padding:0 4px 4px;color:var(--iptv-accent-1000);}.tile:focus{transform:none;outline:4px solid var(--iptv-accent-1000);outline-offset:1px;box-shadow:0 0 24px var(--iptv-glow-333);}.tile.favorite:after{content:"★";position:absolute;top:10px;right:10px;color:var(--iptv-accent-1000);background:var(--iptv-surface-808);padding:4px 7px;border-radius:8px;}.tile{position:relative;}.pagination{flex:0 0 46px;margin:8px 0 0;min-height:46px;}.pagination button{font-size:17px;padding:9px 20px;}footer{flex:0 0 34px;height:34px;padding:6px 42px;font-size:12px;}#dashboard{flex:1;height:auto;min-height:0;overflow:auto;padding:36px 75px;}.portal-grid button{height:240px;}#dashboard .welcome h2{font-size:54px;}.settings-dialog{max-height:88vh;width:85vw;}.details-dialog{width:91vw!important;max-height:86vh!important;min-height:0;padding:38px!important;display:flex;gap:38px;overflow:auto!important;align-items:stretch;}.details-dialog>img{width:24%!important;height:auto!important;max-height:74vh!important;object-fit:contain!important;margin:0!important;align-self:center;flex-shrink:0;}.detail-copy{flex:1;min-width:0;max-height:75vh;overflow:auto;padding:12px 14px!important;}.detail-copy h2{font-size:42px;line-height:1.3;}.detail-copy p{font-size:22px;line-height:1.7;}.detail-actions{display:flex;flex-wrap:wrap;gap:12px;}.detail-actions button{margin:0!important;min-height:62px;font-size:21px;}html[dir=rtl] main aside,html[dir=rtl] main>section{direction:rtl;}body[data-kind=live] .items{grid-template-columns:repeat(4,minmax(0,1fr));}body[data-kind=live] .tile img{padding:15px!important;}@media(max-width:1500px){header{padding:0 24px;gap:8px;}.brand{font-size:22px;}header nav button{font-size:14px;padding:10px 8px;}header>button{padding:11px;font-size:13px;}header nav #kind-live:before,header nav #kind-vod:before,header nav #kind-series:before{width:22px;height:22px;}#unified-open{font-size:16px;padding:12px;}main{padding:18px 28px 10px;grid-template-columns:245px minmax(0,1fr);gap:18px;}main{grid-template-columns:245px minmax(0,1fr);}.heading{flex-basis:86px;height:86px;}.heading h2{font-size:22px;}.search{flex-basis:510px;}.search input{font-size:19px;padding:14px;}.search button{min-width:95px;font-size:19px;padding:14px;}.items,body[data-density=compact]:not([data-kind=live]) .items{grid-template-columns:repeat(4,minmax(0,1fr));gap:18px;}#library-special button{font-size:17px;min-height:47px;}#categories button{font-size:16px;}.details-dialog{gap:24px;}.detail-copy h2{font-size:32px;}.detail-copy p{font-size:18px;}.tile strong{font-size:16px;}}@media(max-width:1050px){header nav button{font-size:12px;}#refresh,#epg-open{display:none;}main{grid-template-columns:210px minmax(0,1fr);}.heading{flex-wrap:wrap;flex-basis:120px;height:120px;}.heading>div:first-child{display:none;}.search{flex:1;}.items,body[data-kind=live] .items{grid-template-columns:repeat(3,minmax(0,1fr));}}.details-overlay,.settings-overlay{width:100%;height:100%;}#detail-plot{max-height:27vh;}#detail-cast{font-size:18px;color:var(--iptv-accent-1000);}#detail-director{font-size:18px;color:var(--iptv-muted-1000);}.items{grid-gap:22px;}.search{gap:0;}.search input{margin-right:10px;}html[dir=rtl] .search input{margin-right:0;margin-left:10px;}.details-dialog{gap:0!important;}.details-dialog>img{margin-right:38px!important;}.detail-actions button{margin:0 12px 12px 0!important;}#unified-open,.search button{background:var(--media-accent,#27c5ce);}body[data-kind=episode] #categories{display:none;}@media(max-width:1500px){.items{grid-gap:18px;}.details-dialog>img{margin-right:24px!important;}}/* Last-watched hero is independent of the catalog: no blocking provider fetch. */#dashboard{padding:22px 56px 12px;scroll-padding:20px;}.watch-hero{position:relative;isolation:isolate;height:38vh;min-height:230px;max-height:410px;margin-bottom:22px;border-radius:28px;overflow:hidden;background:radial-gradient(ellipse at 85% 35%,var(--iptv-surface-400),transparent 55%),linear-gradient(120deg,var(--iptv-surface-1000),var(--media-card,#163854));border:1px solid var(--iptv-border-141);}.watch-hero:after{content:"";position:absolute;inset:0;z-index:1;pointer-events:none;background:linear-gradient(90deg,var(--iptv-surface-933) 0%,var(--iptv-surface-741) 38%,var(--iptv-surface-78) 72%);}.watch-hero .welcome{position:relative;z-index:2;max-width:64%;padding:32px 44px;color:var(--iptv-text-1000);text-shadow:0 2px 12px var(--iptv-shadow-533);}.watch-hero .eyebrow{display:none;}#dashboard .watch-hero h2{font-size:48px;line-height:1.25;margin:12px 0;max-width:100%;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}.watch-label{font-size:18px;letter-spacing:1px;color:var(--iptv-text-1000);}.watch-hero p{font-size:23px;line-height:1.5;color:var(--iptv-text-1000);margin:10px 0 18px;}.watch-hero #watch-art{position:absolute;inset:0 0 0 auto;width:54%;height:100%;object-fit:contain;object-position:70% center;z-index:0;}.watch-hero #watch-resume{font-size:22px;padding:13px 26px;background:var(--iptv-surface-1000);color:var(--iptv-accent-1000);border-color:var(--iptv-border-1000);}.hero-orbits{position:absolute;width:580px;height:580px;border:2px solid var(--iptv-border-220);border-radius:50%;right:-20px;top:-130px;transform:rotate(-25deg);box-shadow:0 0 0 44px var(--iptv-glow-43),0 0 0 90px var(--iptv-glow-31),0 0 100px var(--iptv-glow-133);}.hero-orbits:after{content:"▶";position:absolute;left:210px;top:200px;font-size:130px;color:var(--iptv-text-208);transform:rotate(25deg);}.has-art .hero-orbits{opacity:.3;}#dashboard .portal-grid{margin-top:0;gap:22px;}#dashboard .portal-grid button{height:180px;padding:20px 28px;border-radius:22px;}#dashboard .portal-icon{width:64px;height:64px;margin-bottom:10px;}#dashboard .portal-grid button>span{font-size:52px;margin-bottom:10px;}#dashboard .portal-grid strong{font-size:28px;}#dashboard .portal-grid small{font-size:18px;margin-top:6px;}#dashboard .unified-bar{margin-top:18px;}#dashboard .unified-bar input{padding:12px 20px;font-size:21px;}#dashboard .unified-bar button{padding:12px 24px;font-size:21px;}#dashboard .portal-tools{margin-top:16px;}#dashboard .portal-tools button{font-size:19px;padding:13px 23px;}#dashboard-status{font-size:18px;min-height:0;margin:10px 0 0;}html[dir=rtl] .watch-hero:after{background:linear-gradient(270deg,var(--iptv-surface-933),var(--iptv-surface-741) 38%,var(--iptv-surface-78) 72%);}html[dir=rtl] .watch-hero #watch-art{left:0;right:auto;object-position:30% center;}html[dir=rtl] .hero-orbits{left:-20px;right:auto;}@media(max-height:800px){#dashboard{padding:14px 38px 10px;}.watch-hero{height:30vh;min-height:190px;margin-bottom:16px;}.watch-hero .welcome{padding:18px 28px;}#dashboard .watch-hero h2{font-size:32px;margin:8px 0;}.watch-label{font-size:15px;}.watch-hero p{font-size:18px;margin:7px 0 10px;}.watch-hero #watch-resume{font-size:17px;padding:9px 18px;}#dashboard .portal-grid button{height:138px;padding:14px 20px;}#dashboard .portal-icon{width:42px;height:42px;margin-bottom:7px;}#dashboard .portal-grid button>span{font-size:34px;margin-bottom:7px;}#dashboard .portal-grid strong{font-size:23px;}#dashboard .portal-grid small{font-size:15px;}#dashboard .unified-bar{margin-top:12px;}#dashboard .unified-bar input,#dashboard .unified-bar button{font-size:17px;padding:9px 16px;}#dashboard .portal-tools{margin-top:12px;}#dashboard .portal-tools button{font-size:16px;padding:10px 16px;}}#dashboard .portal-grid button>span{width:64px;height:64px;line-height:64px;display:block;}@media(max-height:800px){#dashboard .portal-grid button>span{width:42px;height:42px;line-height:42px;}}/* Anchor browsing controls at the bottom; let last-watched artwork use the rest. */#dashboard{display:flex;flex-direction:column;}.watch-hero{flex:1 0 260px;height:auto;max-height:none;min-height:260px;}#dashboard>.portal-grid,#dashboard>.unified-bar,#dashboard>.portal-tools,#dashboard>#dashboard-status{flex-shrink:0;}#dashboard-status:empty{display:none;}#dashboard .portal-tools{margin-bottom:0;}@media(max-height:800px){.watch-hero{flex-basis:190px;min-height:190px;height:auto;max-height:none;}}/* Compact floating section dock, matching the launcher rather than wide cards. */#dashboard .portal-grid{display:flex;justify-content:center;align-items:center;gap:32px;padding:8px 12px 0;}#dashboard .portal-grid button{flex:0 0 160px;width:160px;height:150px;padding:8px 10px;margin:0;text-align:center;background:transparent!important;border:0!important;border-radius:20px;box-shadow:none!important;transition:transform .1s ease-out;transform-origin:center bottom;}#dashboard .portal-grid button .portal-icon{display:block;width:88px;height:88px;margin:0 auto 12px;filter:drop-shadow(0 7px 12px #0005);}#dashboard .portal-grid button strong{font-size:24px;line-height:1.3;white-space:nowrap;}#dashboard .portal-grid button small{display:none;}#dashboard .portal-grid button:focus{transform:translateY(-8px) scale(1.1);outline:2px solid var(--media-accent,#9bd8f3);outline-offset:2px;box-shadow:none!important;background:transparent!important;}.reduce-motion #dashboard .portal-grid button{transition:none;}.reduce-motion #dashboard .portal-grid button:focus{transform:none;}@media(max-height:800px){#dashboard .portal-grid{gap:24px;padding-top:4px;}#dashboard .portal-grid button{flex-basis:130px;width:130px;height:116px;padding:4px 8px;}#dashboard .portal-grid button .portal-icon{width:68px;height:68px;margin-bottom:9px;}#dashboard .portal-grid button strong{font-size:20px;}}/* A compact last-watch card, prominent section dock, and one top-right search. */header{direction:ltr;}header nav{flex:0 0 auto;}header #kind-live,header #kind-vod,header #kind-series,header #only-favorites,header #unified-open{display:none!important;}header .unified-bar{order:10;display:flex;flex:0 1 540px;min-width:250px;gap:10px;margin:0 0 0 auto;direction:ltr;}header .unified-bar input{flex:1;min-width:100px;width:auto;margin:0;font-size:19px;padding:13px 16px;border-radius:14px;}header .unified-bar button{flex-shrink:0;font-size:19px;padding:13px 18px;border-radius:14px;}header>button{font-size:15px;padding:12px 15px;}#dashboard .watch-hero{flex:0 0 38vh;height:38vh;min-height:260px;max-height:400px;margin-bottom:12px;}#dashboard .watch-hero .welcome{height:100%;box-sizing:border-box;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;max-width:66%;padding:28px 48px;}#dashboard .watch-hero h2{font-size:50px;margin:12px 0;line-height:1.25;}#dashboard .watch-hero p{margin:10px 0 20px;}#dashboard .watch-hero #watch-art{top:20px;bottom:20px;right:24px;left:auto;width:30%;height:calc(100% - 40px);object-position:center;}html[dir=rtl] #dashboard .watch-hero #watch-art{left:24px;right:auto;}#dashboard .portal-grid{flex:1 0 240px;gap:36px;padding:18px 16px;box-sizing:border-box;}#dashboard .portal-grid button{flex:0 1 290px;width:23%;height:224px;padding:12px 18px;}#dashboard .portal-grid button .portal-icon{width:148px;height:148px;margin:0 auto 16px;}#dashboard .portal-grid button strong{font-size:30px;}#dashboard .portal-tools{justify-content:center;margin-top:10px;}#dashboard .portal-tools button{margin:0 10px;font-size:20px;}#dashboard .watch-label{font-size:20px;}@media(max-height:800px){header{gap:8px;padding:0 25px;}.brand{font-size:24px;}header .unified-bar{flex-basis:400px;gap:8px;}header .unified-bar input,header .unified-bar button{font-size:16px;padding:11px 12px;}header>button{font-size:13px;padding:11px 10px;}#dashboard .watch-hero{height:32vh;flex-basis:32vh;min-height:220px;max-height:260px;}#dashboard .watch-hero .welcome{padding:18px 28px;}#dashboard .watch-hero h2{font-size:34px;}#dashboard .watch-hero p{font-size:18px;margin:6px 0 12px;}#dashboard .watch-label{font-size:15px;}#dashboard .portal-grid{flex-basis:190px;gap:24px;padding:12px 14px;}#dashboard .portal-grid button{flex-basis:210px;height:174px;padding:8px 12px;}#dashboard .portal-grid button .portal-icon{width:108px;height:108px;margin-bottom:12px;}#dashboard .portal-grid button strong{font-size:24px;}#dashboard .portal-tools button{font-size:16px;}}/* Independent, account-scoped latest channel/movie/series cards. */#dashboard .watch-history-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px;grid-gap:24px;flex:0 0 260px;height:260px;min-height:0;max-height:none;margin:0 0 14px;padding:0;border:0;border-radius:0;background:none;overflow:visible;isolation:auto;}#dashboard .watch-history-grid:after{display:none;}.watch-card{position:relative;min-width:0;height:100%;overflow:hidden;border:1px solid var(--iptv-border-259);border-radius:22px;background:linear-gradient(120deg,var(--iptv-surface-918),var(--media-card,#163854));cursor:pointer;}.watch-card>img{position:absolute;top:14px;bottom:14px;right:14px;width:35%;height:calc(100% - 28px);object-fit:contain;pointer-events:none;}.watch-card .watch-copy{position:relative;z-index:1;height:100%;width:64%;padding:22px 18px;display:flex;flex-direction:column;justify-content:center;align-items:flex-start;min-width:0;}.watch-card .watch-label{font-size:17px;letter-spacing:0;color:var(--iptv-text-1000);}#dashboard .watch-history-grid h2{font-size:29px;line-height:1.3;margin:10px 0 6px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;max-width:100%;}.watch-card p{max-width:100%;font-size:18px;line-height:1.4;margin:0 0 12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--iptv-text-1000);}.watch-card p:empty{display:none;}#dashboard .watch-history-grid button{font-size:18px;padding:10px 16px;max-width:100%;white-space:normal;background:var(--iptv-surface-1000);color:var(--iptv-accent-1000);border-color:var(--iptv-border-1000);line-height:1.3;}.watch-card:focus-within{outline:3px solid var(--iptv-accent-1000);outline-offset:2px;}.watch-card.empty>img,.watch-card:not(.has-art)>img{width:26%;height:92px;top:50%;bottom:auto;transform:translateY(-50%);right:20px;}.watch-card.empty h2{color:var(--iptv-text-1000);}html[dir=rtl] .watch-card>img{left:14px;right:auto;}html[dir=rtl] .watch-card.empty>img,html[dir=rtl] .watch-card:not(.has-art)>img{left:20px;right:auto;}@media(max-height:800px){#dashboard .watch-history-grid{flex-basis:210px;height:210px;gap:16px;grid-gap:16px;margin-bottom:8px;}.watch-card{border-radius:16px;}.watch-card .watch-copy{padding:15px 13px;}.watch-card .watch-label{font-size:14px;}#dashboard .watch-history-grid h2{font-size:23px;margin:7px 0 5px;}.watch-card p{font-size:14px;margin-bottom:9px;}#dashboard .watch-history-grid button{font-size:15px;padding:8px 11px;}.watch-card>img{top:10px;bottom:10px;height:calc(100% - 20px);right:10px;}html[dir=rtl] .watch-card>img{left:10px;right:auto;}.watch-card.empty>img,.watch-card:not(.has-art)>img{height:68px;}}/* One global search on TV and phone; hidden legacy input retains section state. */main .heading .search{display:none!important;}
