:root{--bg: #0b0f14;--bg-2: #121923;--bg-3: #1a2431;--line: #243141;--fg: #e6edf3;--fg-2: #9fb0c0;--accent: #3ea6ff;--accent-2: #1f6fb2;--danger: #ff5d5d;--ok: #4cd964;--radius: 8px;--tile-past: #16202b;--tile-past-catchup: #1c2b3a;--tile-now: #1f3b58;--tile-future: #141c26;--row-h: 56px;--chan-w: 220px;--header-h: 52px;font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif;font-size:15px;color-scheme:dark}*{box-sizing:border-box}html,body,#app{height:100%;margin:0}body{background:var(--bg);color:var(--fg);overflow:hidden}button{font:inherit;color:inherit;background:var(--bg-3);border:1px solid var(--line);border-radius:var(--radius);padding:8px 14px;cursor:pointer}button:hover{border-color:var(--accent-2)}button.primary{background:var(--accent-2);border-color:var(--accent-2);color:var(--on-accent, #fff)}button.danger{border-color:var(--danger);color:var(--danger)}button:disabled{opacity:.5;cursor:default}input,select{font:inherit;color:inherit;background:var(--bg-2);border:1px solid var(--line);border-radius:var(--radius);padding:9px 12px;width:100%}input:focus,select:focus,button:focus-visible{outline:2px solid var(--accent);outline-offset:1px}a{color:var(--accent)}.muted{color:var(--fg-2)}.error{color:var(--danger)}.shell{display:flex;flex-direction:column;height:100%}.topbar{height:var(--header-h);display:flex;align-items:center;gap:18px;padding:0 16px;background:var(--bg-2);border-bottom:1px solid var(--line);flex:0 0 auto}.topbar .brand{font-weight:700;letter-spacing:.3px}.topbar nav{display:flex;gap:4px}.topbar nav a{color:var(--fg-2);text-decoration:none;padding:8px 12px;border-radius:var(--radius)}.topbar nav a.active,.topbar nav a:hover{color:var(--fg);background:var(--bg-3)}.topbar .spacer{flex:1}.page{flex:1;min-height:0;overflow:auto}.pad{padding:20px;max-width:980px;margin:0 auto}.toast{position:fixed;left:50%;bottom:28px;transform:translate(-50%);background:var(--bg-3);border:1px solid var(--line);padding:10px 16px;border-radius:var(--radius);box-shadow:0 6px 24px #00000080;z-index:50;max-width:90vw}.signin{max-width:400px;margin:10vh auto;padding:28px;background:var(--bg-2);border:1px solid var(--line);border-radius:12px;display:grid;gap:14px}.signin h1{margin:0 0 6px;font-size:22px}.signin .brand-logo{max-width:200px;max-height:80px;object-fit:contain;justify-self:start}.signin label{display:grid;gap:6px;font-size:13px;color:var(--fg-2)}.player{--fg: #e6edf3;--fg-2: #9fb0c0;--bg-2: #121923;--bg-3: #1a2431;--line: #243141;--tile-past: #16202b;--tile-past-catchup: #1c2b3a;--tile-now: #1f3b58;--tile-future: #141c26;--accent: var(--player-accent, #3ea6ff);--danger: #ff5d5d;color-scheme:dark;position:fixed;inset:0;background:#000;color:var(--fg);z-index:20}.player video{width:100%;height:100%;object-fit:contain;background:#000}.player .overlay{position:absolute;left:0;right:0;top:0;padding:14px 18px;display:flex;align-items:center;gap:14px;background:linear-gradient(#000c,#0000);transition:opacity .25s}.player .overlay.hidden{opacity:0;pointer-events:none}.player .overlay img{width:56px;height:38px;object-fit:contain;background:#0007;border-radius:4px}.player .overlay .title{font-weight:600}.player .overlay .sub{font-size:13px;color:var(--fg-2)}.player .overlay .spacer{flex:1}.player .overlay select{width:auto;background:#000a}.badge{font-size:11px;font-weight:700;letter-spacing:.5px;padding:2px 6px;border-radius:4px;background:#c62828;color:#fff}.badge.catchup{background:var(--accent-2);color:var(--on-accent, #fff)}.badge.rec{background:#6c4bd6}.player .message{position:absolute;inset:0;display:grid;place-items:center;text-align:center;padding:24px;background:#000a}.player .message .box{display:grid;gap:12px;justify-items:center;max-width:480px}.player .chanbtns{position:absolute;right:18px;top:50%;transform:translateY(-50%);display:grid;gap:8px;transition:opacity .25s}.player .chanbtns.hidden{opacity:0;pointer-events:none}.player .chanbtns button{background:#000a;width:44px;height:44px;padding:0;font-size:18px}.chan-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:10px}.chan-card{display:grid;justify-items:center;gap:6px;padding:12px 8px;background:var(--bg-2);border:1px solid var(--line);border-radius:var(--radius);color:var(--fg);text-decoration:none;text-align:center}.chan-card:hover{border-color:var(--accent)}.chan-card img{width:84px;height:56px;object-fit:contain;background:#0007;border-radius:6px}.chan-card .name{font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}.chan-card .num{font-size:11px;color:var(--fg-2)}.back{text-decoration:none}.hdr-logo{width:64px;height:42px;object-fit:contain;background:#0007;border-radius:6px}.day-chips{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:14px}.prog-list{display:grid;gap:6px}.prog{display:flex;gap:14px;align-items:center;padding:10px 12px;background:var(--bg-2);border:1px solid var(--line);border-radius:var(--radius);cursor:pointer}.prog:hover{border-color:var(--accent)}.prog.upcoming,.prog.expired{opacity:.55;cursor:default}.prog.live{background:var(--tile-now)}.prog .time{width:76px;flex:0 0 auto;font-variant-numeric:tabular-nums;font-size:14px}.prog .time .muted{font-size:12px}.prog .info{flex:1;min-width:0}.prog .info .t{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.prog .info .s{font-size:13px;color:var(--fg-2);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.prog .state{flex:0 0 auto;color:var(--fg-2);font-size:13px;min-width:60px;text-align:right}h2{font-size:17px;margin:22px 0 10px}.status{padding:24px;color:var(--fg-2);text-align:center}.pad.wide{max-width:1400px}.badge.small{font-size:9px;padding:1px 4px;margin-left:8px;vertical-align:middle}.img-fallback{display:grid;place-items:center;background:var(--bg-3);color:var(--fg-2);font-weight:700;border-radius:6px}.toolbar{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-bottom:16px}.toolbar select,.toolbar input{width:auto;min-width:220px}.browse{display:flex;height:100%}.cats{width:240px;flex:0 0 auto;overflow-y:auto;border-right:1px solid var(--line);background:var(--bg-2);padding:10px;display:flex;flex-direction:column;gap:2px}.cats input{margin-bottom:8px}.cat{text-align:left;background:transparent;border:1px solid transparent;padding:8px 10px;display:flex;justify-content:space-between;gap:8px;color:var(--fg-2)}.cat.on{background:var(--bg-3);color:var(--fg);border-color:var(--line)}.chan-list{flex:1;min-width:0;overflow-y:auto;position:relative}.chan-row{position:absolute;left:0;right:0;display:flex;align-items:center;gap:12px;padding:0 14px;border-bottom:1px solid var(--line);cursor:pointer}.chan-row:hover,.chan-row:focus-visible{background:var(--bg-2);outline:none}.chan-row .num{width:40px;color:var(--fg-2);font-size:13px;text-align:right;flex:0 0 auto}.chan-row .logo{width:56px;height:38px;object-fit:contain;flex:0 0 auto;background:#0007;border-radius:4px}.chan-row .info{flex:1;min-width:0;display:grid;gap:3px}.chan-row .name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:600;font-size:14px}.chan-row .now{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:13px}.progress{height:3px;background:var(--bg-3);border-radius:2px;overflow:hidden;max-width:320px}.progress div{height:100%;background:var(--accent)}.poster-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:14px}.poster{display:grid;gap:6px;padding:0;background:transparent;border:1px solid transparent;text-align:left;align-content:start}.poster:hover,.poster:focus-visible{border-color:var(--accent)}.poster .art{width:100%;aspect-ratio:2 / 3;object-fit:cover;border-radius:var(--radius);background:var(--bg-3)}.poster .img-fallback.art{font-size:34px}.poster .name{font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:0 4px}.poster .sub{font-size:12px;color:var(--fg-2);padding:0 4px 6px;min-height:1em}.modal{position:fixed;inset:0;background:#000b;display:grid;place-items:center;z-index:15;padding:16px}.sheet{background:var(--bg-2);border:1px solid var(--line);border-radius:12px;max-width:760px;width:100%;max-height:90vh;overflow:auto;display:flex;gap:18px;padding:18px}.sheet-art{width:200px;flex:0 0 auto;aspect-ratio:2 / 3;object-fit:cover;border-radius:var(--radius)}.sheet-body{display:grid;gap:8px;align-content:start;min-width:0}.sheet-body p{margin:4px 0;line-height:1.45}.series-head{display:flex;gap:18px;margin:14px 0 18px}.series-art{width:160px;flex:0 0 auto;aspect-ratio:2 / 3;object-fit:cover;border-radius:var(--radius)}.series-head p{line-height:1.45}.chan-card .img-fallback{width:84px;height:56px}.card{background:var(--bg-2);border:1px solid var(--line);border-radius:12px;padding:18px;display:grid;gap:12px;margin-bottom:16px}.kv{display:grid;grid-template-columns:160px 1fr;gap:6px 12px;font-size:14px}.kv dt{color:var(--fg-2)}.kv dd{margin:0;word-break:break-all}.radio{display:flex;gap:16px;flex-wrap:wrap}.radio label{display:flex;gap:6px;align-items:center}.radio input{width:auto}@media(max-width:720px){.topbar{gap:8px;padding:0 8px;overflow-x:auto}.topbar .brand,.topbar .user{display:none}.topbar nav a{padding:8px;white-space:nowrap}.browse{flex-direction:column}.cats{width:auto;max-height:34vh;border-right:0;border-bottom:1px solid var(--line)}.chan-row .num{display:none}.sheet{flex-direction:column}.sheet-art{width:140px}.series-head{flex-direction:column}.kv{grid-template-columns:1fr}.pad{padding:16px}}.sheet-art.img-fallback,.series-art.img-fallback{font-size:44px}.guide{display:flex;flex-direction:column;height:100%}.guide-bar{display:flex;gap:10px;align-items:center;padding:8px 12px;border-bottom:1px solid var(--line);background:var(--bg-2);flex-wrap:wrap}.guide-bar select{width:auto;min-width:180px}.guide-bar input{width:200px}.guide-bar .date{color:var(--fg-2);margin-left:auto;white-space:nowrap}.guide-head{display:flex;height:30px;border-bottom:1px solid var(--line);background:var(--bg-2);flex:0 0 auto}.guide-head .corner{width:var(--chan-w);flex:0 0 auto;border-right:1px solid var(--line)}.ruler{position:relative;flex:1;overflow:hidden}.ruler .tick{position:absolute;top:0;height:100%;border-left:1px solid var(--line);padding:6px 6px 0;font-size:12px;color:var(--fg-2);white-space:nowrap}.guide-body{flex:1;min-height:0;overflow-y:auto;position:relative}.guide-rows{position:relative}.row{position:absolute;left:0;right:0;height:var(--row-h);display:flex;border-bottom:1px solid var(--line)}.chan{width:var(--chan-w);flex:0 0 auto;display:flex;align-items:center;gap:10px;padding:0 10px;border-right:1px solid var(--line);background:var(--bg-2);cursor:pointer;overflow:hidden}.chan:hover{background:var(--bg-3)}.chan .num{width:40px;color:var(--fg-2);font-size:13px;text-align:right;flex:0 0 auto}.chan img{width:44px;height:30px;object-fit:contain;flex:0 0 auto;background:#0007;border-radius:4px}.chan .name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:14px}.lane{position:relative;flex:1;overflow:hidden}.tile{position:absolute;top:4px;bottom:4px;border-radius:6px;padding:5px 8px;overflow:hidden;background:var(--tile-future);border:1px solid transparent;cursor:pointer;display:flex;flex-direction:column;justify-content:center;gap:2px}.tile .t{font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tile .s{font-size:11px;color:var(--fg-2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tile.past{background:var(--tile-past);color:var(--fg-2);cursor:default}.tile.past.catchup{background:var(--tile-past-catchup);color:var(--fg);cursor:pointer}.tile.now{background:var(--tile-now)}.tile.gap{background:transparent;border-color:var(--line);color:var(--fg-2);cursor:default}.tile:hover:not(.gap):not(.past),.tile.past.catchup:hover{border-color:var(--accent)}.nowline{position:absolute;top:0;bottom:0;width:2px;background:var(--accent);pointer-events:none;z-index:2}.guide-status{padding:24px;color:var(--fg-2);text-align:center}.storage{display:grid;gap:6px;margin:8px 0 20px}.storage .bar{height:8px;background:var(--bg-3);border-radius:4px;overflow:hidden}.storage .bar div{height:100%;background:var(--accent)}.rec-list{display:grid;gap:8px}.rec{display:flex;align-items:center;gap:12px;padding:10px 12px;background:var(--bg-2);border:1px solid var(--line);border-radius:var(--radius)}.rec img{width:56px;height:38px;object-fit:contain;background:#0007;border-radius:4px;flex:0 0 auto}.rec .info{flex:1;min-width:0}.rec .info .t{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.rec .info .s{font-size:13px;color:var(--fg-2)}.rec .actions{display:flex;gap:6px;flex:0 0 auto}@media(max-width:720px){:root{--chan-w: 150px;--row-h: 50px}.chan .num{display:none}.guide-bar input{width:140px}}@media(max-width:480px){.signin{margin:6vh 16px;padding:22px}}.chooser{gap:16px}.chooser button.big{display:grid;gap:4px;text-align:left;padding:16px 18px;font-size:17px;font-weight:600}.chooser button.big span{font-size:13px;font-weight:400;opacity:.8}button.link{background:none;border:0;padding:0;color:var(--accent);cursor:pointer;justify-self:start}.signin .back{font-size:13px}
