/* BLOFY STREAM Web — ports visual tokens from STREAM 56.0.4 / CinemaStyle.kt.
 * Exact reference: app/src/main/java/tv/blofy/player/ui/common/CinemaStyle.kt
 * This is STREAM (ocean/cyan), not BLOFY PLAYER (violet) and not the old gold preview.
 */
:root{
 --bg:#06161d;--surface:#10303b;--surface-deep:#09242e;--raised:#154250;
 --focus:#126c73;--focus-strong:#46e4d0;--accent:#46e4d0;--cyan:#1baeae;
 --white:#f2fcfb;--muted:#aacbd0;--soft:#daf6f4;--divider:rgba(255,255,255,.24);
 --danger:#ff768c;--rail:150px;--radius:16px;--panel:22px;
 --ease:cubic-bezier(.24,.78,.25,1);--fast:95ms;--out:75ms;--section:135ms;
}
*{box-sizing:border-box}html,body{height:100%;margin:0}
body{font-family:"IBM Plex Sans Arabic",Tahoma,Arial,sans-serif;background:var(--bg);color:var(--white);
 background-image:radial-gradient(ellipse at 25% -30%,rgba(30,143,145,.16),transparent 65%),linear-gradient(140deg,#06161d,#071720)}
button,input{font:inherit}button{cursor:pointer;-webkit-tap-highlight-color:transparent}
button,input,[tabindex]{transition:transform var(--fast) var(--ease),background var(--section) ease,border-color var(--fast),box-shadow var(--fast);outline:none}
button:focus-visible,input:focus-visible,[tabindex]:focus-visible,.remote-focus{outline:2px solid #e8fffc!important;outline-offset:2px;box-shadow:0 0 0 5px #46e4d02b,0 8px 25px #0007;transform:scale(1.024)}
a{color:var(--accent)}img{object-fit:cover}button:disabled{opacity:.55;cursor:not-allowed}
.app{height:100vh;display:flex;direction:rtl;overflow:hidden}.rail{flex:none;width:var(--rail);padding:19px 9px;background:linear-gradient(180deg,#10303b,#08222d 65%,#06171e);border-left:1px solid #e8fffa25;overflow:auto;scrollbar-width:none}
.brand{display:block;margin:5px auto 21px;text-align:center;color:var(--accent);font-weight:900;letter-spacing:1.5px;font-size:23px}.brand em{display:block;color:var(--soft);font-style:normal;font-weight:500;letter-spacing:2.5px;font-size:10px;margin-top:-2px}
.rail-link{height:48px;display:flex;align-items:center;gap:8px;width:100%;text-align:right;color:var(--white);border:1px solid transparent;border-radius:13px;padding:0 10px;background:transparent;font-size:13px;margin-bottom:7px}
.rail-link .symbol{font-size:21px;width:27px;flex:none;color:#addfdc;text-align:center}
.rail-link.active,.rail-link:focus-visible{background:linear-gradient(100deg,#1a6470,#0e3a46);border-color:#e8fffc85;color:#fff}
.rail-link.active .symbol{color:#47ebd8}.rail-foot{margin:25px 3px;color:#74a6aa;text-align:center;font-size:10px}
.workspace{flex:1;min-width:0;overflow-y:auto;padding:20px 24px 48px;scrollbar-color:#2d6f75 transparent;scrollbar-width:thin;position:relative}
.workspace::-webkit-scrollbar{width:7px}.workspace::-webkit-scrollbar-thumb{background:#2d6f75;border-radius:6px}
.toolbar{display:flex;justify-content:space-between;align-items:center;gap:20px;margin:0 0 14px;min-height:46px}
.toolbar h1{margin:0;font-weight:750;font-size:28px;letter-spacing:-.5px}.toolbar-note{color:var(--muted);font-size:12px}
.row{display:flex;gap:10px;align-items:center}.space-between{justify-content:space-between}.muted{color:var(--muted)}.accent{color:var(--accent)}.small{font-size:12px}
.btn{min-height:35px;border-radius:14px;background:linear-gradient(90deg,#46e4d0,#1baeae);border:1px solid #31bfbd;color:#06161d;font-weight:750;font-size:13px;padding:8px 18px}
.btn.secondary{color:var(--white);background:linear-gradient(130deg,#174d5c,#10303b);border-color:#7ac9cd5c}
.btn.danger{background:#421e2b;color:#ffd4df;border-color:#a04960}
.btn.icon{display:inline-flex;justify-content:center;align-items:center;width:42px;padding:0;font-size:18px}
.input{background:#09242e;color:var(--white);border:1px solid #8ccac75a;border-radius:14px;padding:13px 17px;font-size:16px;min-height:49px}
.input:focus{border-color:#dffbf6;box-shadow:0 0 0 3px #46e4d02f}
.info{border:1px solid #58b3b44f;border-radius:15px;background:linear-gradient(130deg,#123744,#09242e);padding:17px 20px;line-height:1.8;color:var(--soft)}
.info.error{color:#ffd2d9;border-color:#ec829077;background:#321a24}
.chip{display:inline-block;color:var(--soft);border:1px solid #659e9c6b;background:#0c3039;padding:5px 10px;border-radius:12px;font-size:11px}
.chip.primary{background:#1baeae;color:#06161d;border-color:#46e4d0}
.skeleton{background:linear-gradient(100deg,#10303b,#1b505a,#10303b);background-size:200% 100%;animation:skeleton 1.5s infinite ease}
@keyframes skeleton{to{background-position:-200% 0}}
.screen-appear{animation:appear var(--section) ease both}@keyframes appear{from{opacity:.55;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}
/* APK HOME: 150dp right rail, 274dp hero, carousel shelves, source order */
.home-hero{height:274px;border:1px solid #e3fffa32;border-radius:22px;overflow:hidden;background:radial-gradient(circle at 70% 18%,#278f9159,transparent 53%),linear-gradient(115deg,#154250,#081e27);position:relative;display:flex;align-items:center;margin-bottom:17px}
.hero-art{position:absolute;inset:0;width:100%;height:100%;opacity:.38;filter:saturate(.9);object-position:center}
.hero-shade{position:absolute;inset:0;background:linear-gradient(90deg,#06171d16 8%,#06161df7 91%)}
.hero-copy{z-index:1;position:relative;padding:26px 33px;max-width:70%}
.hero-kicker{color:var(--accent);font-weight:650;font-size:12px;margin-bottom:7px}
.hero-title{font-size:36px;line-height:1.3;margin:2px 0 8px;font-weight:850;max-width:600px;text-shadow:0 3px 18px #0009;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.hero-description{color:#daf6f4;font-size:14px;line-height:1.8;max-height:3.6em;overflow:hidden}
.hero-actions{margin-top:17px;display:flex;gap:9px}
.hero-dots{display:flex;gap:6px;margin-top:15px}.hero-dots span{height:4px;width:7px;border-radius:5px;background:#438487}.hero-dots span.current{width:18px;background:#46e4d0}
.shelf{margin-bottom:24px}.shelf-title{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 0 12px}.shelf-title h2{font-size:20px;margin:0}.shelf-title small{font-size:11px;color:var(--muted)}
.h-scroll{display:flex;direction:rtl;overflow-x:auto;overflow-y:visible;gap:12px;padding:6px 2px 18px;scrollbar-width:thin;scrollbar-color:#2d6f75 transparent}
.poster{flex:0 0 155px;background:linear-gradient(160deg,#10303b,#09242e);border:1px solid rgba(255,255,255,.25);border-radius:16px;color:var(--white);text-align:right;padding:0;overflow:hidden;min-width:0}
.poster-art{position:relative;height:215px;background:radial-gradient(circle at 30% 15%,#1b5764,#0b222d);display:flex;align-items:center;justify-content:center;overflow:hidden}
.poster-art img{display:block;width:100%;height:100%;position:absolute;inset:0}
.poster-art .no-poster{max-height:100%;overflow:hidden;padding:10px;text-align:center;color:#bcf1e8;font-weight:750;font-size:13px}
.poster-art .poster-badge{position:absolute;left:6px;top:6px;border-radius:9px;background:#06161ddc;color:#c3faf1;font-size:10px;border:1px solid #91e2d378;padding:2px 6px}
.poster-caption{padding:9px 8px 11px;min-height:55px}.poster-caption strong{display:block;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.poster-caption span{display:block;color:var(--muted);font-size:10px;margin-top:5px}.poster:hover{border-color:var(--accent);transform:translateY(-3px)}
.story-row{display:flex;gap:12px}.story{flex:1;min-height:91px;background:linear-gradient(140deg,#154250,#09242e);border:1px solid #6aaca866;border-radius:16px;color:var(--white);text-align:right;padding:13px 14px;font-size:14px}.story strong,.story small{display:block}.story small{font-size:11px;color:var(--muted);margin-top:8px}
/* Live browser: right categories, center channels, left preview like the Android Activity */
.catalog{display:flex;flex-direction:row;direction:rtl;gap:16px;height:calc(100vh - 115px);min-height:420px}
.cat-rail,.channels,.preview,.poster-panel{border-radius:16px;border:1px solid #def9f438;background:linear-gradient(140deg,#10303b,#09242e);min-width:0;overflow:hidden;display:flex;flex-direction:column}
.cat-rail{width:19%;flex:none;min-width:145px}.channels{width:31%;flex:none;min-width:225px}.preview{flex:1}
.pane-head{padding:14px;border-bottom:1px solid #91ddd733;background:#133744}.pane-head strong{font-size:17px;display:block}.pane-head small{color:var(--muted);font-size:11px}
.pane-scroll{overflow-y:auto;flex:1;scrollbar-color:#307f82 transparent;scrollbar-width:thin}
.cat-item{width:100%;text-align:right;background:transparent;color:var(--white);padding:13px 12px;min-height:53px;border:1px solid transparent;border-bottom-color:#ddfff312;font-size:13px}
.cat-item.selected,.cat-item:focus-visible{background:#174d5c;border-color:#e8fffc88}
.channel-item{min-height:67px;width:100%;border:1px solid transparent;border-bottom-color:#ddfff317;background:transparent;display:flex;gap:11px;padding:9px 11px;align-items:center;text-align:right;color:var(--white)}
.channel-item.selected{background:#164550;border-color:#68dfd85b}.channel-item:focus-visible{border-color:#e7fff9}
.channel-image{width:50px;height:44px;flex:none;border-radius:9px;background:#09242e;object-fit:contain}
.channel-name{overflow:hidden;flex:1}.channel-name strong{font-size:13px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;display:block}.channel-name small{font-size:11px;color:var(--muted)}
.preview-video-wrap{position:relative;flex:1;min-height:205px;background:#000;display:flex;align-items:center;justify-content:center}
.preview-video-wrap video{height:100%;width:100%;position:absolute;inset:0;background:#000;object-fit:contain}
.preview-empty{position:relative;color:#b9ddd9;text-align:center;padding:20px}.preview-empty span{display:block;font-size:51px;color:var(--accent)}
.preview-controls{padding:17px 20px;background:#0c2933}.preview-controls h3{margin:0 0 8px;font-size:19px}.preview-controls p{color:var(--muted);font-size:12px;line-height:1.7;min-height:34px}
.preview-status{font-size:11px;color:#bcebe1;margin:10px 0 0}
.pane-bottom{border-top:1px solid #83c9c42e;padding:10px 12px}
/* Movies / series: category rail + adaptive poster grid from PosterCatalogActivity */
.catalog.posters{gap:16px}.poster-panel{flex:1;overflow-y:auto;padding:14px 16px;display:block}
.poster-panel-header{padding:9px 2px 17px;display:flex;gap:11px;align-items:center;justify-content:space-between}
.poster-panel-header h2{margin:0;font-size:24px}.poster-panel-header small{color:var(--muted)}
.poster-grid{display:grid;grid-template-columns:repeat(6,minmax(110px,1fr));gap:14px}.poster-grid .poster{width:100%;min-width:0}.poster-grid .poster-art{height:auto;aspect-ratio:2/3}
.poster-grid .poster-caption{min-height:56px}
.sort-bar{display:flex;align-items:center;gap:9px}
/* Details: backplate + poster + synopsis + cast + episode/related shelves */
.detail-backdrop{height:230px;border-radius:22px;position:relative;overflow:hidden;background:linear-gradient(100deg,#10303b,#06161d)}
.detail-backdrop img{height:100%;width:100%;opacity:.42;position:absolute;inset:0}
.detail-backdrop:after{content:"";position:absolute;inset:0;background:linear-gradient(0deg,#06161d,#06161d00 90%)}
.detail-content{position:relative;margin-top:-95px;padding:0 24px 30px;display:flex;gap:24px;align-items:flex-start}
.detail-poster{width:196px;height:294px;flex:none;object-fit:cover;border-radius:15px;border:1px solid #ffffff4d;box-shadow:0 20px 40px #000a;background:#10303b}
.detail-body{flex:1;min-width:0}.detail-title{font-size:37px;line-height:1.3;margin:6px 0 12px}.detail-subtitle{font-size:13px;color:var(--muted);margin-bottom:12px}
.detail-plot{font-size:14px;line-height:1.85;color:var(--soft);max-width:930px}.detail-actions{display:flex;flex-wrap:wrap;gap:9px;margin:20px 0 19px}.detail-stat{color:var(--muted);font-size:12px;margin:12px 0}
.related{margin:21px 0}.related h3{font-size:20px}
.episode-layout{display:flex;gap:15px;min-height:420px}.season-rail{width:165px;flex:none}.episode-list{flex:1}.episode-row{width:100%;display:flex;gap:15px;align-items:center;background:linear-gradient(100deg,#10303b,#09242e);border:1px solid #8ccac755;color:var(--white);border-radius:14px;padding:14px;text-align:right;margin:7px 0}
.episode-art{height:75px;width:140px;flex:none;object-fit:cover;background:#09242e;border-radius:10px}.episode-name{display:block;font-weight:730}.episode-meta{display:block;color:var(--muted);font-size:12px;margin-top:7px}
.episode-progress,.progress-meter{display:block;height:4px;border-radius:4px;background:#26545b;overflow:hidden;margin-top:9px}.episode-progress>i,.progress-meter>i{height:100%;display:block;background:var(--accent);width:0}
/* Full-screen player uses native-like HUD with VOD seek/progress. Live is not seekable. */
.player-overlay{position:fixed;inset:0;z-index:200;background:#000;display:flex;flex-direction:column}
.player-overlay>video{width:100%;height:100%;background:#000;object-fit:contain}
.player-hud{position:absolute;left:0;right:0;bottom:0;padding:22px 37px 25px;background:linear-gradient(0deg,#071016f5,#071016d0 60%,transparent);display:flex;flex-direction:column;gap:13px}
.player-hud .player-title{font-size:21px;font-weight:800}.player-actions{display:flex;gap:11px;flex-wrap:wrap;align-items:center}.player-actions .btn{min-height:39px}
.seek-line{width:100%;accent-color:var(--accent);cursor:pointer}.player-time{display:flex;justify-content:space-between;font-size:12px;color:#d5eded}
.player-error{padding:13px;border-radius:12px;background:#3b1a24;color:#ffdce4;border:1px solid #b44d6a}
.player-loading{position:absolute;left:50%;top:36%;transform:translate(-50%,-50%);color:#e1fff8;font-size:14px;background:#07171ddd;border-radius:15px;padding:13px 20px;max-width:85%;text-align:center}
/* login matching code-only STREAM build */
.login-screen{min-height:100vh;display:grid;place-items:center;padding:25px;background:radial-gradient(ellipse at 50% 10%,#1a777a4f,transparent 50%),var(--bg)}
.login-panel{width:490px;max-width:100%;padding:35px;border-radius:22px;background:linear-gradient(145deg,#154250,#071a21);border:1px solid #60dbc68c;box-shadow:0 22px 70px #0008;text-align:center}
.login-brand{font-size:40px;color:var(--accent);font-weight:900;line-height:1.1}.login-brand small{font-size:13px;letter-spacing:7px;color:var(--soft);display:block;margin-top:8px}
.login-panel p{color:var(--soft);font-size:13px;margin:25px 0 12px}.login-panel .input{width:100%;text-align:center;letter-spacing:3px;font-size:20px;margin:0 0 16px}
.login-panel .btn{width:100%;min-height:47px}.login-status{font-size:12px;color:var(--muted);margin-top:17px;line-height:1.7}
.search-screen .input{width:100%;margin-bottom:15px}.search-tabs{display:flex;gap:8px;margin-bottom:19px}
.search-result-grid{display:grid;grid-template-columns:repeat(6,minmax(115px,1fr));gap:13px}
.empty-state{background:linear-gradient(120deg,#10303b,#09242e);border-radius:18px;border:1px solid #a6ddd452;padding:30px;margin-top:10px;text-align:center;color:var(--muted);line-height:1.9}
.settings-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px}.setting-panel{padding:20px;border:1px solid #a2ddd44a;border-radius:16px;background:#10303b}
.setting-panel h3{font-size:17px;margin:0 0 12px}.setting-panel p{font-size:12px;color:var(--muted);line-height:1.7}
.no-display{display:none!important}
@media(max-width:1240px){.poster-grid,.search-result-grid{grid-template-columns:repeat(5,minmax(100px,1fr))}.channels{width:30%}.cat-rail{width:21%}}
@media(max-width:1040px){.workspace{padding:15px}.poster-grid,.search-result-grid{grid-template-columns:repeat(4,minmax(95px,1fr))}.rail{width:142px}.cat-rail{width:21%;min-width:137px}.channels{width:34%;min-width:190px}.preview-controls{padding:11px}.hero-title{font-size:30px}}
@media(max-width:730px){.app{min-width:0}.rail{width:96px;padding:9px 4px}.brand{font-size:15px}.brand em{font-size:7px;letter-spacing:1px}.rail-link{gap:2px;font-size:10px;padding:4px;height:42px}.rail-link .symbol{font-size:16px;width:16px}.workspace{padding:12px}.toolbar h1{font-size:22px}.home-hero{height:240px}.hero-copy{max-width:95%;padding:20px}.hero-title{font-size:24px}.story-row{flex-wrap:wrap}.story{min-width:45%}.catalog{height:auto;flex-wrap:wrap}.cat-rail{width:42%;height:450px}.channels{width:calc(58% - 16px);height:450px}.preview{width:100%;height:400px;flex:none}.catalog.posters .cat-rail{width:100%;height:180px}.catalog.posters .poster-panel{width:100%}.poster-grid,.search-result-grid{grid-template-columns:repeat(2,minmax(95px,1fr))}.detail-content{margin-top:-30px;padding:0 9px;gap:10px}.detail-poster{width:115px;height:173px}.detail-title{font-size:25px}.detail-backdrop{height:180px}.episode-layout{flex-wrap:wrap}.season-rail{width:100%}.episode-list{width:100%}.settings-grid{grid-template-columns:1fr}.player-hud{padding:13px}.player-actions{gap:5px}.player-actions .btn{font-size:11px;padding:5px 8px}}
@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}

/* Exact native STREAM vector icon, ported from stream_app_icon.xml */
.brand:before{content:"";display:block;width:45px;height:45px;background:url('/stream-icon.svg') center/contain no-repeat;margin:0 auto 4px}
.login-brand:before{content:"";display:block;width:83px;height:83px;background:url('/stream-icon.svg') center/contain no-repeat;margin:0 auto 14px}


/* BLOFY STREAM quick navigation: TV-safe focus, touch-friendly responsive layout. */
button,input,[tabindex]{touch-action:manipulation}
button:focus-visible,input:focus-visible,[tabindex]:focus-visible,.remote-focus{
 transform:scale(1.008);outline-offset:2px;
}
.rail-link:focus-visible,.cat-item:focus-visible,.channel-item:focus-visible,.episode-row:focus-visible{
 transform:none;border-color:var(--accent);
}
.poster:hover{transform:translateY(-1px)}
.h-scroll{scroll-snap-type:x proximity;overscroll-behavior-inline:contain}
.h-scroll .poster{scroll-snap-align:start}
.workspace{overscroll-behavior:contain}
.toolbar{isolation:isolate}
.back-nav{white-space:nowrap}
.cat-item,.channel-item,.episode-row,.rail-link{transition:background-color 95ms ease,border-color 95ms ease}
.btn{min-height:42px}
@media(max-width:730px){
 .app{height:100vh;height:100dvh;flex-direction:column;overflow:hidden}
 .workspace{order:0;flex:1;width:100%;height:auto;min-height:0;padding:10px 13px 20px;overflow-y:auto}
 .rail{order:1;display:flex;align-items:center;gap:5px;flex-direction:row;width:100%;height:76px;min-height:76px;
  padding:4px 8px;overflow-x:auto;overflow-y:hidden;border:0;border-top:1px solid #e8fffa25;
  background:#09242e;scrollbar-width:none}
 .rail::-webkit-scrollbar{display:none}
 .brand,.rail-foot{display:none}
 .rail-link{width:auto;min-width:69px;max-width:84px;flex:0 0 69px;height:61px;min-height:61px;
  display:flex;justify-content:center;align-items:center;flex-direction:column;gap:1px;padding:4px 3px;
  font-size:10px;margin:0;border-radius:11px;text-align:center}
 .rail-link .symbol{font-size:20px;line-height:1.25;width:auto}
 .toolbar{position:sticky;top:-10px;z-index:30;background:#06161df2;padding:10px 0;margin-bottom:10px;gap:7px}
 .toolbar h1{font-size:20px;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 .toolbar .row{gap:5px;flex-shrink:0}
 .toolbar .btn{font-size:11px;padding:7px 10px;min-height:37px}
 .home-hero{height:228px;margin-bottom:12px}
 .hero-copy{max-width:100%;padding:17px}
 .hero-title{font-size:22px}
 .hero-description{font-size:12px}
 .home-hero .hero-actions{flex-wrap:wrap}
 .story-row{gap:7px}
 .story{min-width:calc(50% - 5px);min-height:81px;padding:10px;font-size:12px}
 .story small{font-size:10px}
 .shelf-title h2{font-size:17px}
 .h-scroll .poster{flex-basis:132px}
 .h-scroll .poster-art{height:185px}
 .catalog,.catalog.posters{height:auto;min-height:0;display:flex;flex-direction:column;gap:10px;overflow:visible}
 .cat-rail,.catalog.posters .cat-rail{display:block;width:100%;min-width:0;height:auto;min-height:0;flex:none;overflow:hidden;border-radius:12px}
 .cat-rail .pane-head{display:none}
 .cat-rail .pane-scroll{display:flex;gap:6px;overflow-x:auto;overflow-y:hidden;padding:9px;max-height:70px}
 .cat-item{width:auto;min-width:78px;min-height:40px;flex-shrink:0;white-space:nowrap;border:1px solid #6ea6a65c;
  border-radius:999px;text-align:center;padding:8px 12px;font-size:12px}
 .channels{width:100%;min-width:0;height:330px;flex:none}
 .preview{width:100%;min-width:0;height:275px;flex:none}
 .preview-video-wrap{min-height:154px}
 .preview-controls{padding:10px 13px}
 .preview-controls h3{font-size:16px}
 .preview-controls p{min-height:auto;margin:6px 0}
 .catalog.posters .poster-panel{width:100%;min-width:0;flex:none;overflow:visible;border:0;background:transparent;padding:7px 1px}
 .poster-panel-header h2{font-size:18px}
 .poster-panel-header{padding:7px 0 11px}
 .poster-panel-header small{font-size:10px}
 .poster-grid,.search-result-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
 .player-hud{padding:12px 10px 17px;gap:9px;max-height:53vh;overflow-y:auto}
 .player-hud .player-title{font-size:15px;line-height:1.3}
 .player-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
 .player-actions .btn{min-width:0;min-height:40px;padding:6px 5px;font-size:11px}
 .seek-line{height:27px}
 .search-screen .input{font-size:16px}
 .detail-content{gap:11px}
 .episode-art{width:88px;height:62px}
 .episode-row{padding:10px}
 .settings-grid{grid-template-columns:1fr}
}
@media(max-width:370px){
 .rail-link{flex-basis:61px;min-width:61px}
 .toolbar h1{font-size:18px}
 .back-nav{padding:7px!important}
 .poster-grid{gap:7px}
 .player-actions .btn{font-size:10px}
}


/* BLOFY AI: separate chat screen, with real verified catalog search links. */
.ai-chat-screen{max-width:1050px;margin:0 auto;display:flex;flex-direction:column;
 min-height:min(79vh,780px);gap:13px}
.ai-note{font-size:12px;line-height:1.85;color:var(--soft);padding:12px 16px;
 border:1px solid #60bebb60;background:#123745;border-radius:14px}
.ai-thread{flex:1;min-height:240px;max-height:calc(100vh - 290px);overflow-y:auto;overflow-x:hidden;
 display:flex;flex-direction:column;gap:13px;padding:17px;
 background:linear-gradient(150deg,#06191f,#0e2e3a);
 border:1px solid #8ccac738;border-radius:18px;scrollbar-color:#397981 transparent}
.ai-bubble{border-radius:18px;padding:12px 17px;max-width:83%;line-height:1.8;
 border:1px solid #6bc2c454;background:#123d4b;align-self:flex-start;
 overflow-wrap:anywhere;box-shadow:0 5px 24px #0002}
.ai-bubble.mine{background:#16727a;color:#f0fffc;align-self:flex-end;border-color:#66ebda88}
.ai-bubble strong{font-weight:850;font-size:12px;color:#65ebdc}
.ai-bubble.mine strong{color:#fff}
.ai-bubble p{font-size:14px;margin:6px 0 0}
.ai-links,.ai-prompts{display:flex;flex-wrap:wrap;gap:8px}
.ai-links{margin-top:13px}
.ai-links .chip,.ai-prompts .chip{cursor:pointer;font-size:12px;min-height:36px}
.ai-compose{display:flex;gap:9px;align-items:stretch}
.ai-compose .input{flex:1;min-width:0}
.ai-compose .btn{min-width:98px}
@media(max-width:730px){
 .ai-chat-screen{height:calc(100dvh - 192px);min-height:0;max-height:unset;gap:8px}
 .ai-thread{flex:1;min-height:110px;max-height:none;padding:10px}
 .ai-note{font-size:11px;padding:8px 10px}
 .ai-bubble{max-width:95%;padding:10px 12px}
 .ai-bubble p{font-size:13px}
 .ai-compose .btn{min-width:72px;padding:7px;font-size:12px}
 .ai-chat-screen>.muted{display:none}
}

/* Search parity: real filters, quick recent searches, responsive controls. */
.search-compose{display:flex;gap:9px;align-items:stretch;margin-bottom:12px}
.search-compose .input{min-width:0;flex:1;margin-bottom:0}
.search-compose .btn{min-width:94px}
.search-tabs{flex-wrap:wrap}
.search-tabs .chip{min-height:38px;min-width:74px;font-size:12px;cursor:pointer}
.search-recent{margin:5px 0 14px}
.search-recent .row{justify-content:space-between;margin-bottom:7px}
.search-recent-items{display:flex;gap:7px;flex-wrap:wrap}
.search-recent-items .chip{cursor:pointer;min-height:36px}
@media(max-width:730px){
 .search-compose{gap:5px}
 .search-compose .btn{min-width:69px;padding:7px;font-size:11px}
 .search-tabs .chip{min-width:60px}
}


/* Fullscreen cinematic playback: controls disappear after inactivity and reappear
 * on touch, mouse or TV D-pad. Keep error/loading messages visible. */
.player-overlay .player-hud{
 transition:opacity 180ms ease,transform 180ms ease;
 will-change:opacity,transform
}
.player-overlay.controls-hidden .player-hud:not(:focus-within){
 opacity:0;visibility:hidden;pointer-events:none;transform:translateY(18px)
}
.player-overlay.controls-hidden .player-hud:focus-within{
 opacity:1;visibility:visible;pointer-events:auto;transform:none
}
.player-overlay>video{cursor:default}
@media(prefers-reduced-motion:reduce){
 .player-overlay .player-hud{transition:none;will-change:auto}
}


/* Visual truth: the badge reflects the active VOD/direct/temporary pipeline. */
.player-mode-badge{display:inline-flex;vertical-align:middle;white-space:normal;
 margin-inline-start:10px;padding:4px 9px;border:1px solid #7cdbd684;
 border-radius:999px;color:#aefff0;background:#0e555bde;
 font:600 11px/1.5 system-ui,sans-serif;letter-spacing:0}
@media(max-width:730px){.player-mode-badge{font-size:10px;margin-inline-start:4px;padding:3px 6px}}


/* Authorized Xtream short EPG – compact guide alongside the live preview. */
.epg-panel{margin-top:12px;padding-top:10px;border-top:1px solid #86d6d54a;min-width:0}
.epg-heading{display:block;font-size:13px;color:#e2fff8;margin:0 0 7px}
.epg-content{max-height:134px;overflow-y:auto;scrollbar-width:thin;font-size:12px;color:#d7eeeb}
.epg-entry{display:flex;gap:8px;align-items:baseline;border-bottom:1px solid #d7ffff14;
 padding:6px 1px;line-height:1.5;text-align:right;min-width:0}
.epg-entry:last-child{border-bottom:0}
.epg-time{color:#9bcfd2;white-space:nowrap;flex:none;font-size:11px;direction:ltr}
.epg-program{min-width:0;overflow-wrap:anywhere;flex:1}
.epg-program em{display:inline-block;color:#0c252e;background:#a2f9d6;
 font-style:normal;font-weight:700;border-radius:5px;padding:0 5px;margin-inline-end:4px;font-size:10px}
.epg-empty{display:block;color:#a5c5c6;line-height:1.7;padding:5px 0}
@media(max-width:730px){.catalog .preview{height:auto;min-height:440px}
 .catalog .preview .preview-video-wrap{min-height:200px;height:210px;flex:none}
 .epg-content{max-height:120px}}


/* Live TV schedule in the full-screen player (uses the same safe EPG renderer). */
.player-live-guide{background:rgba(8,26,32,.88);border:1px solid #89d6cc47;
 border-radius:12px;padding:9px 12px;max-height:150px;overflow:auto;max-width:600px}
.player-live-guide .small{display:block;color:#a7e6de;font-size:11px;margin-bottom:4px}
.player-live-guide .epg-entry{padding:4px 0}
.player-live-guide .epg-content{max-height:110px}
@media(max-width:730px){.player-live-guide{max-height:112px;padding:5px 9px}
 .player-live-guide .epg-entry:nth-of-type(n+4){display:none}}


/* Opt-in playback status: hidden until opened by the viewer. */
.player-health-panel{max-width:100%;padding:9px 13px;border:1px solid #70e6d77a;border-radius:11px;
 background:rgba(7,32,40,.95);color:#d9fff7;font-size:12px;line-height:1.7;
 overflow-wrap:anywhere;word-break:normal}
.player-health-panel[hidden]{display:none!important}
@media(max-width:730px){.player-health-panel{padding:7px 9px;font-size:11px}}


/* Numeric seek works without Xtream duration metadata; keyboard and TV remote. */
.player-jump-panel{display:flex;align-items:center;gap:10px;flex-wrap:wrap;
 border:1px solid #61ebd37a;border-radius:12px;background:rgba(9,36,46,.95);
 padding:10px 12px;max-width:760px}
.player-jump-panel[hidden]{display:none!important}
.player-jump-panel label{color:#e1fff9;font-weight:700;font-size:13px}
.player-jump-panel input{direction:ltr;text-align:center;width:105px;min-height:40px;
 background:#071b25;border:1px solid #64d6c998;color:#f2fcfb;border-radius:8px}
.player-jump-panel small{width:100%;font-size:11px;line-height:1.5;color:#a8d9d6}
@media(max-width:730px){.player-jump-panel{padding:8px;gap:6px}
 .player-jump-panel .btn{min-height:35px}.player-jump-panel label{font-size:12px}}


/* Compact BLOFY STREAM cinematic controls: readable and remote/touch navigable. */
.player-info-panel{
 max-width:min(100%,850px);padding:13px 16px;background:rgba(8,30,38,.96);
 border:1px solid rgba(100,224,205,.6);border-radius:14px;color:var(--soft);
 font-size:13px;line-height:1.8;max-height:30vh;overflow-y:auto;overscroll-behavior:contain
}
.player-info-panel[hidden]{display:none!important}
.player-info-panel strong{display:block;color:var(--accent);font-weight:800}
.player-info-panel p{margin:7px 0 0;white-space:pre-wrap}
.player-info-meta{margin-top:5px;color:var(--muted);font-size:12px}
.player-actions .btn{white-space:nowrap}
#player-toggle{min-width:132px}
@media(max-width:730px){
 .player-hud{max-height:49dvh;padding:10px 10px max(12px,env(safe-area-inset-bottom));gap:7px}
 .player-hud .player-title{font-size:15px}
 .player-actions{display:flex;flex-wrap:nowrap;gap:7px;overflow-x:auto;overflow-y:hidden;
  padding:3px 2px 9px;scroll-snap-type:x proximity;overscroll-behavior-x:contain;scrollbar-width:thin}
 .player-actions .btn{flex:0 0 auto;width:auto;min-width:92px;min-height:44px;
  padding:8px 10px;font-size:12px;scroll-snap-align:start}
 #player-toggle{min-width:115px}
 .player-info-panel{max-height:25vh;padding:9px 11px;font-size:12px}
 .player-time{font-variant-numeric:tabular-nums}
 .seek-line{min-height:32px;touch-action:pan-x}
}


/* Episode art and controls aligned with the BLOFY STREAM TV library. */
.episode-art{position:relative;display:flex;align-items:center;justify-content:center;overflow:hidden;
 background:linear-gradient(135deg,#14505c,#071d28);border:1px solid #66b3ad4d}
.episode-art .episode-cover{position:absolute;inset:0;z-index:1;display:block;width:100%;height:100%;object-fit:cover}
.episode-placeholder{font-size:34px;color:#7be5d8}
.episode-copy{display:block;flex:1;min-width:0;line-height:1.55}
.episode-row{min-height:94px;scroll-margin:100px}
.episode-row:hover{border-color:var(--accent);background:linear-gradient(100deg,#174d5c,#10303b)}
.episode-meta{line-height:1.6}
.player-title #player-title-text{overflow-wrap:anywhere}
@media(max-width:730px){
 .episode-art{width:104px;height:72px}
 .episode-row{min-height:89px}
 .episode-name{font-size:13px;line-height:1.4}
 .episode-meta{font-size:11px}
}


/* Android STREAM PlayerActivity HUD parity (native dock, 52dp focus controls,
   uncluttered 10s transport, subtitle/audio/quality/favorite actions).
   Optional web-only diagnostics live behind the ⋯ menu, not in the dock. */
.player-hud.native-stream-hud{
 padding:clamp(12px,2.4vh,30px) clamp(13px,3.2vw,37px) max(17px,env(safe-area-inset-bottom));
 gap:9px;max-height:72dvh;overflow-y:auto;overscroll-behavior:contain;
 background:linear-gradient(0deg,rgba(4,10,15,.98) 0%,rgba(5,14,20,.9) 57%,transparent 100%);
 scrollbar-width:thin
}
.native-player-topline{display:flex;gap:12px;justify-content:space-between;align-items:center;min-height:37px}
.native-player-eyebrow{color:var(--accent);font-size:11px;font-weight:850;letter-spacing:.13em;direction:ltr}
.native-player-back,.native-player-more{color:var(--white);background:#123340e0;border:1px solid #7abeb86b;
 border-radius:13px;min-height:38px;padding:6px 13px;font-size:12px;font-weight:700;font-family:inherit;cursor:pointer}
.native-player-more{font-size:22px;font-weight:800;line-height:1;padding:0 13px}
.native-stream-hud .player-title{font-size:clamp(15px,1.65vw,20px);font-weight:800;line-height:1.45;
 overflow-wrap:anywhere}
.native-player-timeline{display:flex;gap:11px;align-items:center;width:100%;min-height:34px}
.native-player-timeline>span{display:block;flex:0 0 58px;direction:ltr;text-align:center;
 font-size:12px;font-variant-numeric:tabular-nums;color:#d9e9e8}
.native-player-timeline .seek-line{flex:1;min-width:0;margin:0;min-height:29px;cursor:pointer}
.native-player-hint{min-height:21px;text-align:center;color:#aae9e3;font-size:11px;line-height:1.6}
.native-stream-hud .native-player-dock{display:flex;direction:ltr;align-items:center;justify-content:center;
 align-self:center;width:max-content;max-width:100%;gap:8px;flex-wrap:nowrap;
 overflow-x:auto;overflow-y:hidden;scroll-snap-type:x proximity;
 border:1px solid #91c3c058;background:rgba(12,19,25,.92);
 border-radius:23px;padding:8px 10px;scrollbar-width:thin;overscroll-behavior-inline:contain}
.native-player-control{display:inline-flex;flex:0 0 52px;align-items:center;justify-content:center;
 width:52px;height:52px;padding:11px;color:#fff;cursor:pointer;
 background:rgba(31,41,49,.8);border:1px solid #8aa7a64f;border-radius:18px;
 scroll-snap-align:center;transition:background-color 95ms ease,border-color 95ms ease,transform 95ms ease}
.native-player-control.native-player-primary{background:linear-gradient(125deg,#13777f,#0d4757);
 border-color:#6ccfc2a6;flex-basis:60px;width:60px}
.native-player-control:hover,.native-player-control:focus-visible,.native-player-control.remote-focus{
 background:linear-gradient(135deg,#20717c,#103c47);border:2px solid #e8fffc;outline:0;
 transform:scale(1.035);box-shadow:0 0 0 2px #42decd2f}
.native-player-control:focus-visible .native-player-icon{color:#fff}
.native-player-control.native-player-liked .native-player-icon{fill:#46e4d048;color:#69f3db}
.native-player-icon{display:block;width:25px;height:25px;flex:none;pointer-events:none}
.native-player-control.native-player-primary .native-player-icon{width:29px;height:29px}
.native-player-more:focus-visible,.native-player-back:focus-visible{
 outline:2px solid #e8fffc;outline-offset:2px;background:#165967}
.player-more-panel{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;
 gap:7px;padding:12px;max-width:min(100%,880px);margin:1px auto;
 background:#0b2530e8;border:1px solid #62c9ba70;border-radius:15px}
.player-more-panel[hidden]{display:none!important}
.player-more-panel .btn{font-size:12px;min-height:38px}
.player-retry{position:absolute;z-index:204;top:43%;left:50%;transform:translate(-50%,-50%);
 background:#10303b;border:1px solid var(--accent)}
.native-stream-hud .player-live-guide{background:#0a2533d9;border:1px solid #72b9b36a;
 max-width:min(100%,650px)}
.native-stream-hud .player-info-panel,.native-stream-hud .player-health-panel{
 max-width:min(100%,900px);margin-inline:auto}
.native-stream-hud .player-jump-panel{margin-inline:auto}
@media(max-width:730px){
 .player-hud.native-stream-hud{max-height:70dvh;gap:6px;padding:8px 9px max(10px,env(safe-area-inset-bottom))}
 .native-player-topline{min-height:29px}
 .native-player-back,.native-player-more{min-height:32px}
 .native-player-eyebrow{font-size:10px}
 .native-stream-hud .player-title{font-size:14px}
 .native-stream-hud .native-player-dock{gap:5px;padding:5px 6px;border-radius:17px;
  max-width:100%;justify-content:flex-start}
 .native-player-control{flex-basis:43px;width:43px;height:43px;padding:9px;border-radius:13px}
 .native-player-control.native-player-primary{flex-basis:49px;width:49px}
 .native-player-icon{width:21px;height:21px}
 .native-player-control.native-player-primary .native-player-icon{width:25px;height:25px}
 .native-player-timeline>span{flex-basis:46px;font-size:10px}
 .native-player-hint{min-height:17px;font-size:10px}
 .player-more-panel{padding:8px;gap:5px}
}
@media(max-height:440px) and (orientation:landscape){
 .player-hud.native-stream-hud{max-height:86dvh;padding:5px 12px;gap:4px}
 .native-stream-hud .player-live-guide{max-height:61px}
 .native-player-hint{display:none}
}
@media(prefers-reduced-motion:reduce){.native-player-control{transition:none!important}}


/* STREAM full-screen live channel browser — original player's OK-to-channels flow. */
.native-player-channels{min-height:36px;padding:5px 14px;font-size:12px;font-weight:800;
 border:1px solid #7abeb86b;color:var(--white);background:#123340e0;border-radius:13px;
 cursor:pointer}
.native-player-channels:focus-visible{outline:2px solid #e8fffc;outline-offset:2px}
.native-channel-panel{position:absolute;z-index:209;top:0;bottom:0;inset-inline-start:0;
 width:min(460px,90vw);display:flex;flex-direction:column;gap:10px;
 background:linear-gradient(120deg,rgba(6,22,29,.98),rgba(9,36,46,.98));
 border-inline-end:1px solid #64cfc26b;box-shadow:0 0 54px #0009;
 padding:clamp(13px,3vh,26px);color:var(--white)}
.native-channel-panel[hidden]{display:none!important}
.native-channel-heading{display:flex;justify-content:space-between;gap:12px;align-items:center;
 border-bottom:1px solid #76d4c74a;padding-bottom:11px}
.native-channel-heading strong{font-size:21px;color:#dbfff8}
.native-channel-close{cursor:pointer;border-radius:11px;color:#fff;font-size:12px;
 background:#123642;border:1px solid #6dcbbd7a;padding:9px 12px}
.native-channel-items{overflow-y:auto;min-height:0;flex:1;display:flex;flex-direction:column;
 gap:6px;overscroll-behavior:contain;scrollbar-color:#397b7a transparent}
.native-channel-item{width:100%;min-height:62px;display:flex;align-items:center;gap:11px;
 border:1px solid #8ccac742;border-radius:12px;background:#10303b;color:var(--white);
 text-align:start;padding:7px 10px;cursor:pointer;font-size:13px}
.native-channel-item.selected{background:#175564;border-color:#46e4d0}
.native-channel-item:hover,.native-channel-item:focus-visible,.native-channel-close:focus-visible{
 outline:2px solid #e8fffc;outline-offset:0;background:#1b6471}
.native-channel-item>span:nth-child(2){flex:1;min-width:0;overflow-wrap:anywhere}
.native-channel-art{width:48px;height:48px;flex:0 0 48px;object-fit:contain;border-radius:8px;background:#09232f}
.native-channel-empty{display:grid;place-items:center;color:#60d9cc}
.native-channel-now{font-size:10px;color:#a9f5e6;white-space:nowrap}
@media(max-width:730px){
 .native-channel-panel{width:min(360px,93vw);padding:12px}
 .native-channel-item{min-height:55px}
 .native-channel-art{width:40px;height:40px;flex-basis:40px}
 .native-player-channels{font-size:11px;padding:5px 8px;min-height:32px}
}


/* Android-style track-selection dialog with D-pad focus and TV-safe dimensions. */
.native-player-choice-panel{position:absolute;inset:0;z-index:213;background:rgba(2,9,13,.78);
 display:grid;place-items:center;padding:16px}
.native-player-choice-panel[hidden]{display:none!important}
.native-player-choice-card{width:min(510px,96vw);max-height:85dvh;display:flex;flex-direction:column;
 background:linear-gradient(145deg,#154250,#071a22);color:var(--white);
 border:1px solid #78d8cc87;border-radius:21px;padding:15px;box-shadow:0 24px 80px #000a}
.native-player-choice-head{display:flex;justify-content:space-between;align-items:center;gap:12px;
 padding:3px 3px 13px;border-bottom:1px solid #73c3b74a}
.native-player-choice-head strong{font-size:17px}
.native-player-choice-head button{font-size:14px;border:1px solid #85dfd077;border-radius:11px;
 min-width:39px;min-height:38px;background:#0c3441;color:var(--white);cursor:pointer}
.native-player-choice-items{min-height:0;overflow-y:auto;display:flex;flex-direction:column;gap:7px;padding-top:12px}
.native-player-choice-item{text-align:start;cursor:pointer;border-radius:12px;border:1px solid #8fdfd04d;
 padding:12px 15px;min-height:44px;color:var(--white);font-size:14px;background:#0b303c}
.native-player-choice-item.selected{background:#166577;border-color:#46e4d0}
.native-player-choice-item:hover,.native-player-choice-item:focus-visible,.native-player-choice-head button:focus-visible{
 background:#177580;outline:2px solid #e8fffc;outline-offset:1px}


/* Toshiba/VIDAA-compatible fullscreen entry: visible without opening More.
 * Legacy viewport properties precede modern safe-area/dvh so old Chromium TVs work. */
.player-overlay{
 top:0;right:0;bottom:0;left:0;width:100vw;height:100vh;height:100dvh;
 overflow:hidden;background:#000
}
.player-overlay:fullscreen,.player-overlay:-webkit-full-screen,
.player-overlay:-moz-full-screen,.player-overlay.tv-immersive{
 position:fixed!important;top:0!important;right:0!important;bottom:0!important;left:0!important;
 width:100vw!important;height:100vh!important;height:100dvh!important;
 margin:0!important;padding:0!important;background:#000!important;z-index:2147483000!important
}
.player-overlay:fullscreen>video,.player-overlay:-webkit-full-screen>video,
.player-overlay.tv-immersive>video{width:100%;height:100%;object-fit:contain}
html.blofy-tv-immersive,body.blofy-tv-immersive{
 margin:0!important;padding:0!important;overflow:hidden!important;
 height:100%!important;width:100%!important
}
.native-player-topline{flex-wrap:wrap;justify-content:flex-start}
.native-player-topline .native-player-eyebrow{margin-inline:auto}
.native-player-fullscreen{
 display:inline-flex;align-items:center;justify-content:center;
 min-height:40px;padding:7px 15px;border:1px solid #70cfc4b0;
 border-radius:12px;background:linear-gradient(110deg,#0e5e69,#123846);
 color:#efffff;font:800 13px Arial,sans-serif;cursor:pointer;
 white-space:nowrap;letter-spacing:0;direction:rtl
}
.native-player-fullscreen:hover,.native-player-fullscreen:focus-visible{
 outline:2px solid #e8fffc;outline-offset:2px;background:#1a7781
}
.native-player-fullscreen[aria-pressed="true"]{
 border-color:#78ebd3;background:#124b55
}
.native-stream-hud{max-height:75vh;max-height:75dvh}
.player-overlay:fullscreen .native-stream-hud,.player-overlay:-webkit-full-screen .native-stream-hud,
.player-overlay.tv-immersive .native-stream-hud{max-height:80vh;max-height:80dvh}
@media(max-width:730px){
 .native-player-fullscreen{min-height:37px;font-size:12px;padding:5px 9px}
 .native-player-topline{gap:7px}
 .native-stream-hud .native-player-topline{min-height:37px}
}
@media(max-height:540px) and (orientation:landscape){
 .native-player-fullscreen{min-height:32px;padding:4px 9px;font-size:11px}
 .native-player-topline{gap:7px}
}


/* In-app confirmation replaces window.confirm, which is unsuitable for VIDAA apps. */
.settings-inline-confirm{padding:13px;border:1px solid #61ebd39e;border-radius:12px;background:#0c3541;margin-top:10px}
.settings-inline-confirm p{color:#e1fff8;margin:0 0 12px;font-size:13px;line-height:1.8}
.settings-inline-confirm .btn{min-height:39px;margin-bottom:5px}
#tv-capabilities-result{line-height:1.9;overflow-wrap:anywhere}


/* Independent TV catalog pages: hide the app-wide navigation, let the only
 * category list span the right side and give the preview the freed-up width. */
.app.catalog-app{width:100%;max-width:none}
.catalog-app .workspace{flex:1;width:100%;max-width:none;min-width:0}
.catalog-app .toolbar{padding-inline:3px}
.catalog-app .catalog{height:calc(100vh - 115px);height:calc(100dvh - 115px)}
.catalog-app .catalog .cat-rail{width:18%;min-width:170px}
.catalog-app .catalog .channels{width:30%;min-width:245px}
.catalog-app .catalog .preview{min-width:0;flex:1}
.catalog-app .catalog.posters .poster-panel{flex:1;min-width:0}
.catalog-app .catalog.posters .poster-grid{grid-template-columns:repeat(auto-fill,minmax(145px,1fr))}
.catalog-app .toolbar .row{flex-wrap:wrap}
.catalog-inline-empty{margin:18px 12px;padding:18px 13px;color:var(--muted);
 border:1px dashed #65c5c268;border-radius:12px;text-align:center;font-size:13px}
#catalog-update-status:not([hidden]){border:1px solid #38bfbc6d;background:#10343bf0;
 color:#d6fff4;position:absolute;z-index:4;top:76px;left:32px;max-width:50%;
 padding:8px 13px;border-radius:10px;font-size:12px;pointer-events:none}
#catalog-update-status[hidden]{display:none}
@media(max-width:1080px){
 .catalog-app .catalog .cat-rail{width:22%;min-width:135px}
 .catalog-app .catalog .channels{width:33%;min-width:185px}
 .catalog-app .catalog.posters .poster-grid{grid-template-columns:repeat(auto-fill,minmax(120px,1fr))}
}
@media(max-width:730px){
 .app.catalog-app{height:100vh;height:100dvh;display:flex;flex-direction:column}
 .catalog-app .workspace{width:100%;min-height:0;order:0;padding:10px 12px 22px}
 .catalog-app .catalog,.catalog-app .catalog.posters{height:auto;min-height:0}
 .catalog-app .catalog .cat-rail,.catalog-app .catalog.posters .cat-rail{
  width:100%;min-width:0;height:auto
 }
 .catalog-app .catalog .channels{width:100%;min-width:0;height:330px}
 .catalog-app .catalog .preview{width:100%;height:auto;min-height:360px}
 .catalog-app .catalog.posters .poster-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 .catalog-app .catalog-home{display:inline-flex}
 #catalog-update-status:not([hidden]){top:60px;left:16px;right:16px;max-width:none}
}


/* Display the actual decoded resolution; channel labels like "8K" or "LQ"
 * must not be mistaken for a measurement of pixels delivered to the TV. */
.player-resolution-badge{
 display:inline-flex;align-items:center;vertical-align:middle;
 border:1px solid #53cabf88;background:#0b3943e0;color:#c0f7ef;
 margin-inline-start:7px;padding:4px 8px;border-radius:9px;
 font-size:11px;font-weight:750;white-space:nowrap
}
.player-resolution-badge[hidden]{display:none!important}
@media(max-width:730px){.player-resolution-badge{font-size:10px;white-space:normal;line-height:1.45}}

/* Actual decoded resolution inside the selected live-channel preview. */
.live-preview-quality{color:#b8f4ed;font-size:12px;font-weight:700;margin:8px 0 10px;padding:6px 9px;background:#062e38;border:1px solid #53b5ad66;border-radius:9px;direction:rtl}

/* Source-verified quality console: readable at a distance on TV, responsive on phones. */
.playback-health-head{display:flex;gap:8px;align-items:baseline;justify-content:space-between;flex-wrap:wrap;margin-bottom:11px}
.playback-health-head strong{color:#e7fffb;font-size:14px;letter-spacing:.01em}
.playback-health-head small{color:#b0d6d7;font-size:11px;line-height:1.6}
.playback-health-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;direction:rtl}
.playback-health-metric{min-height:62px;padding:9px 10px;border:1px solid #4eaca067;border-radius:10px;background:linear-gradient(145deg,#092f39,#061d27);display:flex;flex-direction:column;gap:6px}
.playback-health-metric span{color:#b2d6d6;font-size:11px;font-weight:650}
.playback-health-metric strong{color:#f0fffd;font-weight:850;font-size:12px;overflow-wrap:anywhere;direction:auto}
.playback-health-note{font-size:11px;color:#b8f4ed;margin:7px 0 0}
#player-health-shortcut{border-color:#4ff2cb90;background:#0a4b53}
@media(max-width:1050px){.playback-health-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:640px){.playback-health-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.playback-health-head strong{font-size:12px}.playback-health-metric{min-height:54px;padding:7px}}

/* TV-safe stream health: readable and screenshot-friendly without source URLs. */
.player-diagnostic-panel{
 direction:rtl;white-space:pre-wrap;overflow-wrap:anywhere;
 max-width:100%;max-height:42vh;overflow-y:auto;
 padding:12px 16px;margin:6px 0;border:1px solid #74dfd389;
 border-radius:12px;background:rgba(3,23,31,.96);
 color:#e1fff8;font:650 12px/1.9 system-ui,Arial,sans-serif;
 box-shadow:0 15px 35px rgba(0,0,0,.3)
}
.player-diagnostic-panel[hidden]{display:none!important}
#player-diagnostic-toggle:focus-visible{outline:2px solid #7fffe7;outline-offset:2px}
@media(max-width:700px){
 .player-diagnostic-panel{max-height:38vh;font-size:11px;line-height:1.7;padding:10px}
}
