:root{--bg:#0a0e17;--nav:#111726;--surface:#1b2234;--surface2:#232c42;--stroke:#344057;--white:#f1f3fb;--muted:#9ca7bb;--blue:#2096ff;--blue2:#1687f8;--shadow:0 18px 55px #0008;font-family:Inter,Roboto,"Segoe UI",Arial,sans-serif;color-scheme:dark;font-synthesis:none}*{box-sizing:border-box}html,body{min-height:100%;margin:0;background:var(--bg);color:var(--white)}button,input{font:inherit}button{cursor:pointer}button:focus-visible,a:focus-visible,input:focus-visible{outline:2px solid var(--blue);outline-offset:3px}button:disabled{opacity:.5;cursor:not-allowed}a{color:inherit;text-decoration:none}.app-shell{min-height:100vh;display:grid;grid-template-columns:250px minmax(0,1fr)}.sidebar{background:linear-gradient(175deg,#111726,#0a0e17);border-right:1px solid #202638;min-height:100vh;padding:29px 14px 18px;position:sticky;top:0;align-self:start;height:100vh;display:flex;flex-direction:column}.brand{display:flex;gap:13px;align-items:center;justify-content:center;color:#f6f8ff;font-weight:800;letter-spacing:1.7px;font-size:15px;margin:5px 0 52px}.brand svg{width:41px;height:41px}.side-nav{display:flex;flex-direction:column;gap:10px}.nav-link{appearance:none;border:0;background:none;color:#939daf;display:flex;align-items:center;gap:15px;width:100%;min-height:53px;border-radius:12px;text-align:left;padding:0 14px;font-size:16px;font-weight:520;position:relative}.nav-link .nav-icon{font-size:22px;width:28px;flex:none;text-align:center;font-family:"Segoe UI Symbol",sans-serif}.nav-link:hover{color:white;background:#20293a}.nav-link.active{color:white;background:#192235;font-weight:700}.nav-link.active::before{content:"";position:absolute;left:12px;right:auto;bottom:3px;background:var(--blue);border-radius:3px;width:29px;height:4px}.sidebar-bottom{margin-top:auto;color:#8391aa;font-size:10px;letter-spacing:1.6px;padding-left:16px}.sidebar-bottom small{display:block;margin:8px 0 0 13px;letter-spacing:normal}.accent-dot{display:inline-block;width:6px;height:6px;background:var(--blue);border-radius:50%}.main-content{min-width:0;padding:26px clamp(20px,3.2vw,54px) 70px}.topbar{display:flex;align-items:center;gap:18px;margin-bottom:22px}.search-field{display:flex;align-items:center;gap:16px;border:1.7px solid var(--blue2);border-radius:17px;padding:0 19px;height:65px;flex:1;background:#121827;min-width:0}.search-field svg{width:27px;height:27px;fill:none;stroke:var(--blue);stroke-width:2;flex:none}.search-field input{min-width:0;width:100%;border:0;background:none;color:var(--white);outline:none;font-size:20px}.search-field input::placeholder{color:#cbd0dc}.account-button{white-space:nowrap;background:#202a3d;color:#dce6fb;border:1px solid #3d4960;border-radius:13px;padding:13px 15px}.account-button:hover{border-color:var(--blue)}.mobile-logo{display:none}.hero{min-height:310px;height:clamp(290px,31vw,410px);background:radial-gradient(circle at 75% 60%,#233854 0,#101724 65%);border-radius:30px;overflow:hidden;position:relative;display:flex;align-items:center;box-shadow:var(--shadow)}.hero-art{position:absolute;inset:0;background-size:cover;background-position:center 40%;opacity:.65}.hero::after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,#090d15 0%,#0c101de8 29%,#0e12248c 60%,#080b1726)}.hero-text{z-index:1;position:relative;width:min(67%,840px);padding:36px clamp(28px,4vw,68px)}.eyebrow{letter-spacing:3px;font-size:13px;color:#55b1ff;font-weight:700}.hero h1{font-size:clamp(24px,3.2vw,50px);line-height:1.13;margin:15px 0 12px;white-space:normal}.meta{color:#b4bcc9;font-size:15px}.summary{color:#bdc5d1;font-size:15px;line-height:1.45;max-width:750px;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;margin:16px 0}.actions{display:flex;flex-wrap:wrap;gap:11px}.primary,.outline{border:1.5px solid var(--blue);border-radius:13px;padding:12px 19px;color:white;background:transparent;font-weight:700}.primary{background:var(--blue);color:#06111f}.primary:hover{background:#55b3ff}.outline:hover{background:#233654}.section{margin-top:37px}.section-title{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:17px}.section-title h2{font-size:25px;margin:0;letter-spacing:-.6px}.section-title button,.tiny-button{border:1.5px solid var(--blue);border-radius:14px;color:var(--white);background:none;padding:9px 14px;white-space:nowrap}.section-title button:hover,.tiny-button:hover{background:#172c46}.poster-rail{display:flex;gap:17px;overflow-x:auto;scroll-snap-type:x proximity;padding:2px 1px 11px;scrollbar-color:#404b5d transparent}.poster-card{border:0;background:none;padding:0;flex:0 0 clamp(134px,13.5vw,191px);width:clamp(134px,13.5vw,191px);color:var(--white);text-align:left;scroll-snap-align:start}.poster-art{height:clamp(192px,19vw,270px);background:linear-gradient(145deg,#283e63,#151a27 75%);border:2px solid #283347;border-radius:15px;overflow:hidden;position:relative;display:grid;place-items:center}.poster-art img{width:100%;height:100%;object-fit:cover}.poster-card:hover .poster-art,.poster-card:focus-visible .poster-art{border-color:var(--blue)}.fallback-art{display:flex;align-items:center;text-align:center;justify-content:center;padding:18px;font-size:19px;font-weight:800;color:#bbc9df}.poster-title{margin-top:9px;font-size:14px;font-weight:650;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.poster-subtitle{color:var(--muted);font-size:12px;margin-top:4px}.progress{height:4px;background:#465066;position:absolute;bottom:0;left:0;right:0}.progress b{display:block;height:100%;background:var(--blue)}.grid-library{display:grid;grid-template-columns:repeat(auto-fill,minmax(145px,1fr));gap:23px 17px}.grid-library .poster-card{width:100%;max-width:none;flex:none}.grid-library .poster-art{height:auto;aspect-ratio:2/3}.grid-library .poster-title{white-space:normal;line-height:1.25}.blank-card{border:1px dashed #34425d;border-radius:20px;background:#141b2a;padding:34px 24px;color:#bdc7d7}.blank-card h2{margin:0 0 12px;color:white}.blank-card p{line-height:1.55}.empty-panel{border:1px solid #2b3549;background:#141c2c;border-radius:17px;padding:25px}.empty-panel h2{font-size:21px;margin:0 0 8px}.empty-panel p{color:var(--muted);line-height:1.5}.guide-banner{display:flex;align-items:center;justify-content:space-between;gap:15px;margin:6px 0 17px}.guide-banner h1{margin:0;font-size:27px}.guide-demo{border:1px solid #405373;border-radius:12px;color:#9bccff;padding:8px 12px;font-size:12px}.guide-layout{display:grid;grid-template-columns:230px minmax(0,1fr);gap:19px;align-items:start}.guide-categories{border-radius:20px;background:#151d2b;padding:20px 12px;border:1px solid #283448}.guide-categories h2{margin:0 8px 18px;font-size:18px}.guide-category{border:1px solid transparent;background:none;color:#b8c1d1;text-align:left;border-radius:12px;padding:12px 14px;width:100%;margin:4px 0}.guide-category.active{border-color:var(--blue);color:white;background:#232a45}.guide-main{min-width:0}.preview-window{height:240px;background:radial-gradient(circle at 50% 40%,#1b2941,#080e18 70%);border-radius:17px;display:flex;flex-direction:column;align-items:center;justify-content:center;border:1px solid #283141;color:#9eafc7;margin-bottom:16px}.preview-window .play-symbol{font-size:42px;color:var(--blue);margin-bottom:8px}.guide-scroll{overflow-x:auto;max-width:100%;padding-bottom:14px}.guide-table{min-width:870px}.guide-times{display:grid;grid-template-columns:210px repeat(4,minmax(155px,1fr));gap:6px;align-items:end;color:#a5afbf;margin-bottom:7px;font-size:14px}.guide-times span{padding:7px 12px}.guide-row{display:grid;grid-template-columns:210px repeat(4,minmax(155px,1fr));gap:6px;margin-bottom:6px}.guide-channel,.guide-program{background:#1d2536;border:1px solid #333d51;border-radius:10px;min-height:67px;display:flex;align-items:center;padding:12px;gap:11px}.guide-channel{font-weight:700;font-size:13px}.guide-channel .number{color:#96a2b7;font-weight:400;font-size:12px}.guide-channel .station{background:#2c354c;color:#dbe8fc;padding:11px 8px;border-radius:8px;min-width:55px;text-align:center}.guide-program{color:#aab5c5;font-size:14px}.guide-program:first-of-type{border-color:#3179cc}.now-line{color:#64b5ff!important}.bottom-nav{display:none}.toast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);background:#27374f;border:1px solid var(--blue);padding:12px 20px;border-radius:12px;color:white;z-index:50;box-shadow:var(--shadow);display:none;text-align:center;max-width:90vw}.toast.show{display:block}.overlay{position:fixed;inset:0;background:#02050bba;z-index:60;display:flex;align-items:center;justify-content:center;padding:18px}.dialog{width:min(480px,100%);border:1px solid #324666;background:#161e2c;border-radius:22px;padding:27px;box-shadow:var(--shadow)}.dialog h2{margin:0 0 8px;font-size:25px}.dialog p{color:#afbbce;line-height:1.5}.dialog label{display:block;color:#c5cfdd;font-size:14px;font-weight:700;margin-top:18px}.dialog input{display:block;width:100%;margin:8px 0;border:1px solid #46516a;background:#0c1320;color:white;border-radius:10px;padding:13px}.dialog .dialog-actions{display:flex;justify-content:flex-end;gap:12px;margin-top:24px}.dialog .error{color:#ffb0b0;min-height:20px;font-size:13px}.dialog .details{border-radius:12px;background:#1f2c41;padding:12px;font-size:13px}.hide{display:none!important}
@media(max-width:1050px){.app-shell{grid-template-columns:76px 1fr}.sidebar{padding:26px 9px}.brand{margin-bottom:43px}.brand svg{width:33px}.brand span,.nav-link .nav-label,.sidebar-bottom{display:none}.nav-link{justify-content:center;padding:0}.nav-link.active::before{left:15px}.hero-text{width:77%}.guide-layout{grid-template-columns:175px minmax(0,1fr)}}
@media(max-width:700px){.app-shell{display:block}.sidebar{display:none}.main-content{padding:0 14px 100px}.topbar{display:flex;flex-wrap:wrap;gap:11px;padding-top:16px;margin-bottom:14px}.mobile-logo{display:flex;align-items:center;gap:7px;font-size:21px;font-weight:850;letter-spacing:.3px;flex:1}.brand-mark{color:var(--blue);font-size:27px}.account-button{font-size:12px;padding:9px 11px;order:1}.search-field{height:48px;border-radius:12px;flex:0 0 100%;order:2;padding:0 13px}.search-field svg{width:22px;height:22px}.search-field input{font-size:14px}.hero{height:390px;min-height:0;border-radius:17px;align-items:flex-end}.hero-art{background-position:center top;opacity:.7}.hero::after{background:linear-gradient(0deg,#070b14 0%,#101626cf 40%,#10152120 100%)}.hero-text{width:100%;padding:22px 19px 24px}.eyebrow{font-size:10px;letter-spacing:2px}.hero h1{font-size:27px;margin:9px 0}.summary{font-size:13px;line-height:1.35;-webkit-line-clamp:2;margin:9px 0 15px}.meta{font-size:12px}.primary,.outline{padding:11px 13px;border-radius:10px;font-size:13px}.section{margin-top:28px}.section-title h2{font-size:19px}.section-title button{font-size:12px;padding:7px 9px;border-radius:10px}.poster-rail{gap:11px;margin-right:-14px}.poster-card{width:128px;flex-basis:128px}.poster-art{height:190px;border-radius:12px}.poster-title{font-size:12px}.grid-library{grid-template-columns:repeat(2,minmax(0,1fr));gap:18px 12px}.grid-library .poster-art{height:auto}.guide-banner h1{font-size:23px}.guide-demo{font-size:10px}.guide-layout{display:block}.guide-categories{display:flex;overflow-x:auto;gap:7px;border:0;background:transparent;padding:3px 0 11px;margin-bottom:6px}.guide-categories h2{display:none}.guide-category{width:auto;white-space:nowrap;border:1px solid #344055;padding:10px 12px;margin:0;font-size:13px}.preview-window{height:198px}.guide-table{min-width:745px}.guide-times,.guide-row{grid-template-columns:165px repeat(4,minmax(140px,1fr))}.guide-channel{font-size:12px}.guide-channel .station{min-width:38px;padding:11px 3px}.bottom-nav{display:flex;position:fixed;bottom:0;left:0;right:0;z-index:25;justify-content:space-around;gap:2px;background:#111928ef;backdrop-filter:blur(18px);border-top:1px solid #2d3b50;padding:10px 5px calc(10px + env(safe-area-inset-bottom))}.bottom-link{flex:1;display:flex;flex-direction:column;align-items:center;gap:4px;background:none;border:0;color:#95a2b4;font-size:10px;padding:0}.bottom-link .nav-icon{font-size:22px}.bottom-link.active{color:var(--blue)}.toast{bottom:82px}.dialog{padding:20px}}
@media(min-width:701px) and (max-width:900px){.main-content{padding:24px 20px 70px}.hero-text{width:90%}.hero h1{font-size:30px}.search-field input{font-size:16px}}

/* WebVision v0.2: live guide real channel data */
.guide-alert{border:1px solid #6b5a36;background:#332b1b;border-radius:14px;padding:15px;margin:12px 0;color:#f7dfad;overflow-wrap:anywhere}
.guide-count{color:#9eacc1;font-size:12px;margin:6px 0 10px}
.guide-selected-name{font-size:24px;color:#eaf3ff;font-weight:700;margin-bottom:9px;text-align:center}
.guide-selected-now{font-size:17px;color:#a7b6ce;text-align:center;margin-bottom:16px}
.preview-window .tiny-button{margin-top:20px}
.guide-channel{width:100%;text-align:left;cursor:pointer;color:white}
.guide-channel.selected{border-color:#249bff;background:#233953}
.channel-logo{max-width:54px;max-height:36px;object-fit:contain;flex-shrink:0}
.guide-channel .station{background:none!important;text-align:left!important;min-width:0!important;padding:0!important;overflow:hidden;text-overflow:ellipsis}
.guide-program{color:#c7d6e8;text-align:left;cursor:pointer;overflow:hidden;line-height:1.3}
.guide-program:hover,.guide-channel:hover{border-color:#288cf6}
.guide-more{padding:14px;text-align:center}
@media(max-width:700px){.guide-selected-name{font-size:20px}.guide-selected-now{font-size:14px}.guide-channel{gap:5px;padding:6px}.channel-logo{max-width:28px;max-height:23px}}

/* WebVision v0.3: responsive native HLS Live TV player */
.preview-window{height:clamp(255px,26vw,360px);position:relative;overflow:hidden;isolation:isolate;display:block;background:#050912}
.live-player-mount{position:absolute;inset:0;z-index:1;display:flex;align-items:center;justify-content:center}
.live-video{height:100%;width:100%;display:block;object-fit:contain;background:#000}
.live-preview-info{position:relative;z-index:2;padding:18px;min-height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:9px;background:linear-gradient(#101b2b96,#0c1727eb)}
.preview-window.is-playing .live-preview-info{pointer-events:none;min-height:auto;position:absolute;bottom:52px;left:0;right:0;background:linear-gradient(transparent,#0008);padding:8px}
.preview-window.is-playing .guide-selected-name,.preview-window.is-playing .guide-selected-now,.preview-window.is-playing .live-status,.preview-window.is-playing .live-preview-actions{display:none}
.preview-window.is-playing .live-error{font-size:13px;background:#2c1821c7}
.preview-window.is-playing:hover .guide-selected-name{display:block;font-size:13px;margin:0;text-shadow:0 2px 8px #000}
.guide-selected-now{margin:0}
.live-preview-actions{display:flex;gap:12px;justify-content:center;flex-wrap:wrap}
.live-status{color:#aac1da;font-size:13px}
.live-error{color:#ffb1b1;text-align:center;max-width:90%;line-height:1.4}
.live-error:empty{display:none}
@media(max-width:700px){.preview-window{height:auto;aspect-ratio:16/10;min-height:212px}.live-preview-info{padding:12px;gap:6px}.live-preview-actions .tiny-button{font-size:11px}.live-preview-actions{gap:7px}}

/* WebVision 0.4: local Jellyfin playback, responsive episode picker */
.video-dialog{width:min(1100px,96vw);max-height:94vh;overflow:auto;background:#111827;border:1px solid #35425a;border-radius:18px;padding:14px;box-shadow:0 22px 80px #000b}
.video-header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:2px 4px 12px}
.video-header strong{font-size:17px;line-height:1.3}
#jelly-player-message{font-size:14px;color:#c6d4e5;margin:8px 4px 12px}
#jelly-player-mount{background:#000;border-radius:10px;overflow:hidden;min-height:150px}
.jelly-video{width:100%;height:auto;max-height:76vh;aspect-ratio:16/9;object-fit:contain;background:#000;display:block}
.episodes-dialog{width:min(680px,100%);max-height:92vh;display:flex;flex-direction:column}
.episodes-list{overflow:auto;min-height:0;max-height:65vh;display:flex;flex-direction:column;gap:8px;margin-top:10px}
.episode-button{text-align:left;width:100%;background:#202b3f;color:#e6edf7;border:1px solid #354861;border-radius:10px;padding:12px;display:flex;justify-content:space-between;align-items:center;gap:12px}
.episode-button:hover,.episode-button:focus-visible{border-color:var(--blue)}
.episode-button small{color:#8eb8e2;white-space:nowrap}
@media(max-width:700px){.video-dialog{width:100%;padding:9px}.video-header strong{font-size:14px}.jelly-video{max-height:50vh}.episode-button{flex-direction:column;align-items:flex-start;gap:5px}}
