:root{--ink:#10213a;--muted:#6b7a90;--line:#e3e9f1;--bg:#f4f7fb;--card:#fff;--accent:#f05232;--accent2:#ff7a45;--navy:#0c274b;--soft:#fff2ed;--green:#20a36a}*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;color:var(--ink);background:var(--bg)}a{color:inherit}.topbar{position:sticky;top:0;z-index:20;background:rgba(255,255,255,.94);backdrop-filter:blur(14px);border-bottom:1px solid var(--line)}.topinner{height:74px;max-width:1280px;margin:auto;padding:0 24px;display:flex;align-items:center;gap:28px}.brand{display:flex;align-items:center;text-decoration:none;font-size:20px;letter-spacing:-.6px}.brandmark{display:grid;place-items:center;background:var(--accent);color:#fff;border-radius:9px;padding:5px 6px;margin-right:3px;font-weight:900}.brand b{font-weight:900}.mainnav{display:flex;gap:5px;margin-left:auto}.mainnav a{text-decoration:none;padding:10px 15px;border-radius:11px;font-weight:750;color:#506079}.mainnav a:hover,.mainnav a.active{background:#eef3f9;color:var(--navy)}.clock{font-weight:800;color:var(--navy);padding-left:14px;border-left:1px solid var(--line)}main{min-height:80vh}.hero{max-width:1280px;margin:auto;padding:46px 24px 24px}.eyebrow{color:var(--accent);font-size:13px;font-weight:850;text-transform:uppercase;letter-spacing:.08em}.hero-row{display:flex;justify-content:space-between;align-items:end;gap:20px}.hero h1{font-size:clamp(34px,4.8vw,58px);letter-spacing:-2.4px;margin:6px 0 4px;line-height:1.05}.lead{margin:0 0 24px;color:var(--muted);font-size:17px}.fav-toggle{border:1px solid var(--line);background:#fff;border-radius:13px;padding:12px 16px;font-weight:800;color:var(--navy);cursor:pointer;white-space:nowrap}.fav-toggle.on{background:var(--navy);color:#fff}.days{display:flex;gap:8px;overflow:auto;padding:4px 0 12px;scrollbar-width:none}.days a{position:relative;min-width:88px;padding:11px 14px;border:1px solid var(--line);border-radius:14px;background:#fff;text-align:center;text-decoration:none;transition:.15s}.days a:hover{transform:translateY(-2px);box-shadow:0 8px 24px rgba(16,33,58,.08)}.days a.selected{border-color:var(--navy);box-shadow:inset 0 0 0 1px var(--navy)}.days b{display:block}.days span{font-size:12px;color:var(--muted)}.days em{position:absolute;top:-8px;right:-4px;background:var(--accent);color:#fff;border-radius:9px;padding:2px 6px;font-size:9px;font-style:normal;font-weight:850}.filters{display:flex;gap:8px;overflow:auto;padding-top:8px}.filter{border:1px solid var(--line);background:#fff;border-radius:999px;padding:9px 14px;color:#52627a;font-weight:750;cursor:pointer}.filter.active{background:var(--navy);color:#fff;border-color:var(--navy)}.now-list,.schedule{max-width:1280px;margin:0 auto;padding:0 24px 70px}.now-card{display:grid;grid-template-columns:190px minmax(320px,1fr) minmax(260px,.7fr);background:#fff;border:1px solid var(--line);border-radius:20px;margin:12px 0;overflow:hidden;box-shadow:0 5px 20px rgba(16,33,58,.04);transition:.18s}.now-card:hover,.channel-row:hover{box-shadow:0 12px 34px rgba(16,33,58,.08);transform:translateY(-1px)}.stationbox{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;padding:20px;border-right:1px solid var(--line);background:linear-gradient(145deg,#fff,#f8fafc)}.station-logo{width:58px;height:42px;border-radius:11px;background:#edf2f8;display:grid;place-items:center;font-weight:900;color:var(--navy);overflow:hidden}.station-logo img{max-width:90%;max-height:80%;object-fit:contain}.stationbox strong{text-align:center;font-size:14px}.star{position:absolute;top:10px;right:10px;border:0;background:transparent;font-size:21px;color:#9aa7b8;cursor:pointer}.star.saved{color:#f4a62a}.onair{padding:23px 28px}.onair-label,.next-label{font-size:11px;font-weight:900;letter-spacing:.1em;color:var(--accent)}.live-dot{display:inline-block;width:7px;height:7px;border-radius:50%;background:var(--accent);box-shadow:0 0 0 4px #fee5df;margin-right:5px}.onair h2{font-size:23px;margin:7px 0 4px;letter-spacing:-.4px}.meta{color:var(--muted);font-size:13px}.meta b{color:var(--ink)}.progress,.mini-progress{height:7px;border-radius:99px;background:#e8edf4;overflow:hidden;margin-top:17px}.progress i,.mini-progress i{display:block;height:100%;background:linear-gradient(90deg,var(--accent),var(--accent2));border-radius:99px}.progress-meta{display:flex;justify-content:space-between;margin-top:7px;font-size:11px;color:var(--muted)}.progress-meta strong{color:var(--accent)}.nextup{border-left:1px solid var(--line);padding:23px 26px;background:#fbfcfe}.next-item{display:grid;grid-template-columns:52px 1fr;gap:8px;padding:10px 0;border-bottom:1px solid var(--line);font-size:13px}.next-item:last-child{border:0}.next-item time{font-weight:900;color:var(--navy)}.next-item span{font-weight:700}.muted{display:block;color:var(--muted);font-size:13px;margin-top:14px}.schedule-head{display:grid;grid-template-columns:190px 1fr;padding:0 18px 7px;color:var(--muted);font-size:11px;font-weight:850;text-transform:uppercase;letter-spacing:.1em}.channel-row{display:grid;grid-template-columns:190px 1fr;background:#fff;border:1px solid var(--line);border-radius:20px;margin:12px 0;overflow:hidden;transition:.18s}.program-strip{display:flex;gap:10px;overflow-x:auto;padding:16px;scroll-snap-type:x proximity;scrollbar-width:thin}.program-card{min-width:210px;max-width:250px;min-height:120px;padding:14px;border-radius:14px;background:#f6f8fb;border:1px solid transparent;scroll-snap-align:start}.program-card:hover{background:#fff;border-color:#d9e1eb}.program-card.current{background:var(--soft);border-color:#ffd4c7}.program-time{font-size:12px;font-weight:850;color:var(--navy)}.program-time span{margin-left:7px;background:var(--accent);color:#fff;padding:2px 6px;border-radius:99px;font-size:9px}.program-card h3{font-size:15px;margin:7px 0 4px;line-height:1.25}.program-card p{font-size:11px;color:var(--muted);margin:0}.mini-progress{height:4px;margin-top:11px}.empty{max-width:760px;margin:30px auto 80px;text-align:center;background:#fff;border:1px solid var(--line);border-radius:24px;padding:50px 30px}.empty-icon{font-size:42px}.primary{display:inline-block;margin-top:12px;background:var(--navy);color:#fff;text-decoration:none;padding:11px 16px;border-radius:12px;font-weight:800}.hidden-card{display:none!important}footer{background:#fff;border-top:1px solid var(--line);padding:32px 24px;text-align:center;color:var(--muted)}footer b{color:var(--navy);margin-right:12px}@media(max-width:800px){.topinner{padding:0 14px;height:66px}.clock{display:none}.mainnav{gap:0}.mainnav a{padding:9px 8px;font-size:12px}.brand{font-size:16px}.hero{padding:30px 16px 18px}.hero-row{align-items:flex-start}.hero h1{font-size:36px}.lead{font-size:14px}.fav-toggle{font-size:12px;padding:10px}.now-list,.schedule{padding:0 12px 55px}.now-card{grid-template-columns:1fr}.stationbox{min-height:72px;flex-direction:row;justify-content:flex-start;border-right:0;border-bottom:1px solid var(--line);padding:12px 16px}.station-logo{width:46px;height:34px}.stationbox .star{top:20px}.onair{padding:18px}.nextup{border-left:0;border-top:1px solid var(--line);padding:17px 18px}.schedule-head{display:none}.channel-row{grid-template-columns:1fr}.channel-row .stationbox{position:sticky;left:0}.program-strip{padding:12px}.program-card{min-width:185px}.days a{min-width:74px}.filters{padding-bottom:4px}}@media(max-width:470px){.mainnav a:nth-child(2){display:none}.hero-row{display:block}.fav-toggle{margin-bottom:12px}.hero h1{font-size:32px}.now-card{border-radius:16px}.onair h2{font-size:20px}}
/* v0.6 timeline */
.hero,.now-list,.schedule{max-width:1500px}.jumpbar{display:flex;align-items:center;gap:7px;margin-top:14px;overflow:auto}.jumpbar span{font-size:12px;font-weight:850;color:var(--muted);margin-right:3px}.jumpbar button{border:1px solid var(--line);background:#fff;color:var(--navy);font-weight:800;border-radius:10px;padding:8px 11px;cursor:pointer}.jumpbar button:hover{border-color:#b8c5d5;background:#f8fafc}.epg-section{padding-bottom:80px}.epg-toolbar{display:flex;align-items:center;justify-content:space-between;margin:4px 0 10px;padding:0 4px}.epg-toolbar>div:first-child{display:flex;align-items:baseline;gap:10px}.epg-toolbar b{font-size:14px}.epg-toolbar span{font-size:12px;color:var(--muted)}.epg-legend{font-size:11px;color:var(--muted);display:flex;align-items:center;gap:6px}.epg-legend i{display:inline-block;width:2px;height:15px;background:var(--accent)}.epg-scroll{position:relative;overflow:auto;border:1px solid var(--line);border-radius:18px;background:#fff;box-shadow:0 8px 30px rgba(16,33,58,.05);scrollbar-color:#aeb9c7 transparent}.epg-canvas{position:relative;width:calc(176px + var(--day-width));min-height:200px}.time-ruler{position:sticky;top:0;z-index:12;height:42px;background:rgba(255,255,255,.97);border-bottom:1px solid var(--line);display:grid;grid-template-columns:176px var(--day-width)}.station-ruler{position:sticky;left:0;z-index:15;background:#fff;display:flex;align-items:center;padding-left:18px;font-size:10px;font-weight:900;text-transform:uppercase;letter-spacing:.1em;color:var(--muted);border-right:1px solid var(--line)}.ruler-track{position:relative}.ruler-track:before{content:"";position:absolute;inset:0;background:repeating-linear-gradient(to right,transparent 0,transparent 71px,#edf1f6 71px,#edf1f6 72px)}.ruler-track span{position:absolute;top:13px;transform:translateX(7px);font-size:10px;font-weight:800;color:#6c7a8d}.epg-row{height:112px;position:relative;border-bottom:1px solid var(--line)}.epg-row:last-child{border-bottom:0}.epg-station{position:sticky;left:0;z-index:9;width:176px;height:112px;border-right:1px solid var(--line);border-bottom:0;background:linear-gradient(145deg,#fff,#f8fafc);padding:14px}.epg-track{position:absolute;left:176px;top:0;width:var(--day-width);height:112px;background:repeating-linear-gradient(to right,#fbfcfe 0,#fbfcfe 71px,#edf1f6 71px,#edf1f6 72px)}.epg-program{position:absolute;top:9px;height:94px;text-align:left;border:1px solid #e5eaf1;background:#f3f6fa;border-radius:11px;padding:10px 10px 8px;overflow:hidden;color:var(--ink);cursor:pointer;font:inherit;transition:.15s;box-shadow:0 1px 0 rgba(16,33,58,.02)}.epg-program:hover{z-index:4;background:#fff;border-color:#cbd6e3;box-shadow:0 8px 22px rgba(16,33,58,.12);transform:translateY(-2px)}.epg-program.current{background:var(--soft);border-color:#ffb9a5}.epg-program .epg-time{display:block;font-size:9px;font-weight:900;color:var(--navy);white-space:nowrap}.epg-program strong{display:block;font-size:12px;line-height:1.2;margin-top:5px;white-space:normal}.epg-program small{display:block;font-size:9px;color:var(--muted);margin-top:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.epg-program em{position:absolute;right:7px;top:7px;background:var(--accent);color:#fff;border-radius:99px;padding:2px 5px;font-size:7px;font-weight:900;font-style:normal}.epg-progress{position:absolute;left:9px;right:9px;bottom:7px;height:3px;background:#e3e8ef;border-radius:9px;overflow:hidden}.epg-progress i{display:block;height:100%;background:var(--accent)}.now-line{position:absolute;top:42px;bottom:0;width:2px;background:var(--accent);z-index:8;pointer-events:none;box-shadow:0 0 0 1px rgba(240,82,50,.05)}.now-line span{position:sticky;top:45px;display:inline-block;transform:translate(-50%,-1px);background:var(--accent);color:#fff;border-radius:7px;padding:3px 6px;font-size:8px;font-weight:900;white-space:nowrap}.detail-sheet{position:fixed;right:24px;top:95px;width:min(430px,calc(100vw - 32px));z-index:51;background:#fff;border:1px solid var(--line);border-radius:22px;padding:28px;box-shadow:0 25px 80px rgba(16,33,58,.24);transform:translateX(calc(100% + 50px));opacity:0;transition:.22s;pointer-events:none}.detail-sheet.open{transform:none;opacity:1;pointer-events:auto}.sheet-close{position:absolute;right:14px;top:12px;border:0;background:#f0f3f7;width:32px;height:32px;border-radius:50%;font-size:21px;cursor:pointer}.sheet-kicker{color:var(--accent);font-size:11px;font-weight:900;text-transform:uppercase;letter-spacing:.08em;padding-right:35px}.detail-sheet h2{font-size:27px;letter-spacing:-.7px;margin:7px 35px 5px 0}.sheet-genre{font-size:12px;color:var(--muted);font-weight:700}.detail-sheet p{color:#4f5f74;line-height:1.55;font-size:14px}.sheet-save{border:1px solid var(--line);background:#fff;border-radius:11px;padding:10px 13px;font-weight:800;color:var(--navy)}.sheet-backdrop{display:none}.schedule .hidden-card{display:none!important}
@media(min-width:1500px){.topinner{max-width:1500px}}
@media(max-width:800px){.epg-section{padding-left:8px;padding-right:8px}.epg-toolbar span,.epg-legend{display:none}.epg-scroll{border-radius:14px}.epg-canvas{width:calc(128px + var(--day-width))}.time-ruler{grid-template-columns:128px var(--day-width)}.station-ruler{padding-left:12px}.epg-station{width:128px;height:104px;padding:10px}.epg-track{left:128px;height:104px}.epg-row{height:104px}.epg-program{top:8px;height:88px}.now-line{left:calc(128px + var(--line-x,0px))!important}.detail-sheet{right:16px;left:16px;top:auto;bottom:14px;width:auto;transform:translateY(calc(100% + 40px))}.detail-sheet.open{transform:none}.sheet-backdrop{position:fixed;inset:0;background:rgba(9,24,43,.25);z-index:50}.sheet-backdrop.open{display:block}}
/* v0.7 discovery, zoom and timeline polish */
.discovery{max-width:1500px;margin:0 auto;padding:0 24px 24px}.section-title{display:flex;justify-content:space-between;align-items:end;margin-bottom:12px}.section-title span{font-size:11px;text-transform:uppercase;letter-spacing:.09em;font-weight:900;color:var(--accent)}.section-title h2{margin:2px 0 0;font-size:24px;letter-spacing:-.6px}.section-title a{font-size:12px;font-weight:800;color:var(--navy);text-decoration:none}.highlight-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px}.highlight-card{text-align:left;min-height:112px;border:1px solid var(--line);border-radius:16px;background:linear-gradient(145deg,#fff,#f7f9fc);padding:14px;cursor:pointer;color:var(--ink);transition:.16s}.highlight-card:hover{transform:translateY(-2px);border-color:#cbd6e3;box-shadow:0 10px 26px rgba(16,33,58,.08)}.highlight-station{display:block;color:var(--accent);font-size:9px;font-weight:900;text-transform:uppercase;letter-spacing:.05em}.highlight-card strong{display:block;margin:8px 0 5px;font-size:14px;line-height:1.25}.highlight-card small{color:var(--muted);font-size:10px}.epg-actions{display:flex;align-items:center;gap:16px}.zoom-control{display:flex;align-items:center;gap:4px}.zoom-control span{font-size:10px!important;font-weight:850;color:var(--muted)}.zoom-control button{border:1px solid var(--line);background:#fff;border-radius:8px;padding:6px 8px;font-size:10px;font-weight:800;color:var(--navy);cursor:pointer}.zoom-control button.active{background:var(--navy);border-color:var(--navy);color:#fff}.epg-shell{position:relative}.scroll-arrow{position:absolute;z-index:30;top:52%;width:38px;height:54px;border:1px solid var(--line);background:rgba(255,255,255,.94);box-shadow:0 6px 18px rgba(16,33,58,.12);border-radius:12px;font-size:28px;color:var(--navy);cursor:pointer;opacity:.88}.scroll-arrow:hover{opacity:1}.scroll-arrow.left{left:-16px}.scroll-arrow.right{right:-16px}.time-ruler{top:74px}.epg-program[data-short="1"]{padding-left:6px;padding-right:6px}.epg-program[data-short="1"] small{display:none}.epg-program[data-short="1"] strong{font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.epg-program[data-short="1"] .epg-time{font-size:8px;overflow:hidden;text-overflow:ellipsis}.epg-program[data-short="1"] em{display:none}.now-line{z-index:10}.now-line span{font-size:9px;box-shadow:0 3px 10px rgba(240,82,50,.25)}
@media(max-width:1100px){.highlight-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.zoom-control span{display:none}}
@media(max-width:800px){.discovery{padding:0 16px 18px}.highlight-grid{display:flex;overflow:auto;scroll-snap-type:x proximity}.highlight-card{min-width:190px;scroll-snap-align:start}.epg-actions{gap:6px}.epg-legend{display:none}.zoom-control button{padding:6px}.scroll-arrow{display:none}.time-ruler{top:66px}}
/* v0.8 UI polish — programme grid is the primary product */
.epg-section{max-width:1560px;padding-left:18px;padding-right:18px}
.epg-toolbar{position:relative;z-index:18;margin-top:2px;margin-bottom:8px;min-height:36px}
.epg-actions{gap:10px}.timeline-nav{display:flex;align-items:center;gap:4px;padding-right:4px;border-right:1px solid var(--line)}
.timeline-nav button{height:30px;min-width:30px;border:1px solid var(--line);background:#fff;border-radius:9px;color:var(--navy);font-weight:900;cursor:pointer;padding:0 9px}
.timeline-nav button:nth-child(2){font-size:10px;min-width:46px}.timeline-nav button:hover{background:#f2f6fa;border-color:#c6d1df}
.scroll-arrow{display:none!important}
.epg-scroll{overscroll-behavior-x:contain;scroll-snap-type:none;border-radius:16px;box-shadow:0 10px 35px rgba(16,33,58,.07)}
.time-ruler{top:74px;height:44px;box-shadow:0 2px 7px rgba(16,33,58,.035)}
.station-ruler{z-index:25}.ruler-track span{top:14px}.ruler-track:before,.epg-track{background-size:auto}
.epg-row{height:118px}.epg-station{height:118px;z-index:16;padding:14px 16px}.epg-track{height:118px}
.epg-program{top:10px;height:98px;border-radius:10px;padding:10px 9px 9px;transition:box-shadow .14s,border-color .14s,background .14s,transform .14s}
.epg-program:hover{z-index:14;transform:translateY(-1px);box-shadow:0 10px 28px rgba(16,33,58,.15)}
.epg-program strong{font-size:12px;line-height:1.18;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.epg-program[data-short="1"]{padding:8px 5px}.epg-program[data-short="1"] strong{font-size:9px;line-height:1.12;-webkit-line-clamp:3;white-space:normal}.epg-program[data-short="1"] .epg-time{font-size:7px}.epg-program.micro{padding:0;border-radius:7px}.epg-program.micro>*{display:none!important}.epg-program.micro.current{box-shadow:inset 0 -4px 0 var(--accent)}
.epg-program.current{border-color:#ff9d82;background:#fff0ea;box-shadow:inset 0 0 0 1px rgba(240,82,50,.08)}
.epg-program.current strong{padding-right:30px}.epg-program.current em{z-index:2}.epg-progress{height:4px;bottom:7px;background:#f5d9d1}
.now-line{top:44px;z-index:13;width:2px;box-shadow:0 0 0 1px rgba(240,82,50,.08)}.now-line span{top:121px;padding:4px 7px;border-radius:999px}
.epg-station .station-logo{width:62px;height:42px}.epg-station strong{max-width:130px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.epg-station .star{top:14px;right:12px}
.epg-hover-tip{position:fixed;z-index:80;pointer-events:none;max-width:290px;background:#10213a;color:#fff;border-radius:11px;padding:9px 11px;box-shadow:0 12px 34px rgba(16,33,58,.28);font-size:11px;line-height:1.35;opacity:0;transform:translateY(4px);transition:opacity .1s,transform .1s}.epg-hover-tip.show{opacity:1;transform:none}.epg-hover-tip b{display:block;font-size:12px;margin-bottom:3px}.epg-hover-tip span{color:#cdd7e5}
@media(min-width:1200px){.hero,.discovery,.schedule{max-width:1560px}.epg-scroll{max-height:calc(100vh - 155px);min-height:400px}.time-ruler{position:sticky}.epg-station{position:sticky}}
@media(max-width:800px){.epg-section{padding-left:8px;padding-right:8px}.epg-toolbar{align-items:flex-end}.epg-toolbar>div:first-child span{display:none}.timeline-nav button:nth-child(2){display:none}.zoom-control button[data-zoom="large"]{display:none}.time-ruler{top:66px;height:42px}.epg-row,.epg-station,.epg-track{height:108px}.epg-program{top:8px;height:92px}.now-line{top:42px}.epg-hover-tip{display:none}}
/* v0.8.1 critical EPG layout correction */
/* The EPG has its own horizontal scroller. Its ruler must stick to the top of
   that scroller (not below the website header), otherwise programme row 1
   scrolls underneath it and becomes visible as a ghost/duplicate row. */
.time-ruler{top:0!important;z-index:40!important;background:#fff!important;box-shadow:0 2px 8px rgba(16,33,58,.06)}
.station-ruler{z-index:45!important;background:#fff!important}
/* Let the page own vertical scrolling; the guide itself scrolls horizontally. */
@media(min-width:1200px){.epg-scroll{max-height:none!important;min-height:0!important;overflow-x:auto;overflow-y:visible}}
/* Keep grid lines aligned at every zoom level. */
.ruler-track:before{background:linear-gradient(to right,transparent calc(100% - 1px),#edf1f6 calc(100% - 1px))!important;background-size:calc(60px * var(--ppm)) 100%!important}
.epg-track{background-color:#fbfcfe!important;background-image:linear-gradient(to right,transparent calc(100% - 1px),#edf1f6 calc(100% - 1px))!important;background-size:calc(60px * var(--ppm)) 100%!important}
/* Current-time marker belongs to the programme canvas below the ruler. */
.now-line{top:44px!important}
.now-line span{position:absolute!important;top:5px!important;left:0!important;transform:translate(-50%,-50%)!important}
/* Cleaner first row separation and sender column. */
.epg-row:first-of-type{border-top:0}.epg-station{background:#fff!important}.epg-program{isolation:isolate}
@media(max-width:800px){.time-ruler{top:0!important}.now-line{top:42px!important}}

/* v0.8.4 SAFE EPG POLISH — CSS ONLY, based directly on working v0.8.1 */
.epg-scroll{border-color:#dbe3ed;box-shadow:0 12px 32px rgba(16,33,58,.065)}
.time-ruler{height:46px!important;border-bottom:1px solid #d9e2ec!important}
.station-ruler{font-size:10px;letter-spacing:.12em;color:#718096;padding-left:20px}
.ruler-track span{top:15px!important;font-size:10px;color:#66758a;font-weight:850}
.epg-row{height:122px;border-bottom:1px solid #e8edf3}
.epg-row:nth-child(even) .epg-track{background-color:#f9fbfd!important}
.epg-station{height:122px!important;padding:15px 18px!important;box-shadow:5px 0 12px rgba(16,33,58,.025)}
.epg-station .station-logo{width:64px;height:43px;border-radius:12px;background:#edf3f9;font-size:15px}
.epg-station strong{font-size:13px;margin-top:7px;color:#12243e;max-width:126px}
.epg-station .star{top:14px;right:13px;font-size:18px;transition:transform .15s,color .15s}
.epg-station .star:hover{transform:scale(1.12);color:#f0a62d}
.epg-track{height:122px!important}
.epg-program{top:10px!important;height:102px!important;border:1px solid #dfe6ef!important;background:#f6f8fb!important;border-radius:11px!important;padding:10px 9px 10px!important;box-shadow:0 1px 2px rgba(16,33,58,.025);overflow:hidden}
.epg-program:hover{background:#fff!important;border-color:#bdcad9!important;box-shadow:0 9px 24px rgba(16,33,58,.13)!important;transform:translateY(-2px)!important}
.epg-program .epg-time{font-size:9px!important;line-height:1.15;color:#53657c;font-weight:900;letter-spacing:-.01em;margin-bottom:6px}
.epg-program strong{font-size:12px!important;line-height:1.2!important;letter-spacing:-.12px;color:#10213a;font-weight:800;-webkit-line-clamp:3}
.epg-program small{font-size:9px;color:#77869a;margin-top:5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.epg-program.current{background:#fff3ee!important;border-color:#ff9c7f!important;box-shadow:inset 0 0 0 1px rgba(240,82,50,.08),0 3px 10px rgba(240,82,50,.06)!important}
.epg-program.current:hover{border-color:#f05232!important;box-shadow:inset 0 0 0 1px rgba(240,82,50,.12),0 10px 26px rgba(240,82,50,.14)!important}
.epg-program.current em{background:#f05232!important;border-radius:999px!important;font-size:7px!important;padding:3px 6px!important;letter-spacing:.03em}
.epg-progress{height:4px!important;left:9px!important;right:9px!important;bottom:8px!important;background:#f2d8d0!important}
.epg-progress i{background:linear-gradient(90deg,#f05232,#ff7a45)!important}
.epg-program[data-short="1"]{padding:8px 6px!important}
.epg-program[data-short="1"] .epg-time{font-size:8px!important;margin-bottom:4px}
.epg-program[data-short="1"] strong{font-size:10px!important;line-height:1.13!important;-webkit-line-clamp:4!important}
.epg-program[data-short="1"] small{display:none!important}
.now-line{width:2px!important;background:#f05232!important;box-shadow:0 0 0 1px rgba(240,82,50,.07),0 0 12px rgba(240,82,50,.12)!important}
.now-line span{font-size:8px!important;font-weight:900!important;padding:4px 7px!important;box-shadow:0 4px 12px rgba(240,82,50,.25)!important}
.epg-toolbar{margin-bottom:10px}.epg-toolbar b{font-size:14px;color:#10213a}.epg-toolbar>div:first-child span{color:#7a889b}
.timeline-nav button,.zoom-control button{box-shadow:0 1px 2px rgba(16,33,58,.025)}
.timeline-nav button:hover,.zoom-control button:hover{border-color:#b8c6d6;background:#f8fafc}
.zoom-control button.active{box-shadow:0 3px 9px rgba(12,39,75,.14)}
@media(max-width:800px){
 .epg-row,.epg-station,.epg-track{height:110px!important}
 .epg-program{top:8px!important;height:94px!important;padding:8px 7px!important}
 .epg-station{padding:11px 10px!important}
 .epg-station .station-logo{width:52px;height:38px}
 .epg-station strong{font-size:11px;max-width:92px}
 .epg-program strong{font-size:11px!important}
}

/* v0.8.5 micro-program fix: never render very short broadcasts as empty boxes */
.epg-program.micro{padding:7px 3px!important;display:flex!important;align-items:center!important;justify-content:center!important;overflow:hidden!important}
.epg-program.micro>*{display:none!important}
.epg-program.micro strong{display:block!important;width:100%!important;font-size:8px!important;line-height:1.05!important;font-weight:850!important;text-align:center!important;white-space:normal!important;overflow:hidden!important;text-overflow:clip!important;word-break:normal!important;overflow-wrap:break-word!important;-webkit-line-clamp:4!important;-webkit-box-orient:vertical!important}
.epg-program.micro.current strong{padding-right:0!important}

/* v0.8.6 readability pass — fewer visual distractions, more readable programme widths */
.epg-track{background-image:linear-gradient(to right,transparent calc(100% - 1px),rgba(227,233,241,.62) calc(100% - 1px))!important}
.epg-row{border-bottom-color:#edf1f5!important}
.epg-program{border-color:#e2e8f0!important;background:#f8fafc!important;box-shadow:none!important}
.epg-program:hover{background:#fff!important;border-color:#c7d2df!important;box-shadow:0 8px 22px rgba(16,33,58,.11)!important}
.epg-program .epg-time{color:#718096!important;font-size:9px!important;margin-bottom:5px!important}
.epg-program strong{font-size:12px!important;line-height:1.22!important}
.epg-program.current{background:#fff1eb!important;border-color:#ff9b7d!important}
.epg-station{box-shadow:4px 0 12px rgba(16,33,58,.025)!important}
.zoom-control:after{content:"Mehr Breite = besser lesbar";font-size:9px;color:#8a97a8;margin-left:4px;white-space:nowrap}
@media(max-width:800px){.zoom-control:after{display:none}}

/* v0.9.2 EPG clarity pass — flatter broadcast lanes + selected jump marker */
.epg-row{height:108px!important;border-bottom:1px solid #e6ebf1!important;background:#fff!important}
.epg-station,.epg-track{height:108px!important}
.epg-station{padding:13px 16px!important;background:#fff!important;box-shadow:6px 0 14px rgba(16,33,58,.035)!important}
.epg-track{background-color:#fff!important}
.epg-row:nth-child(even) .epg-track{background-color:#fbfcfe!important}
.epg-program{top:8px!important;height:92px!important;margin:0!important;border:0!important;border-right:1px solid #dfe6ee!important;border-radius:5px!important;background:#f5f7fa!important;padding:11px 10px!important;box-shadow:none!important;outline:0!important}
.epg-program:hover{z-index:15!important;background:#eef4fb!important;border-color:#cad5e2!important;box-shadow:0 5px 16px rgba(16,33,58,.10)!important;transform:none!important}
.epg-program .epg-time{font-size:9px!important;line-height:1!important;color:#718096!important;font-weight:800!important;margin:0 0 7px!important;white-space:nowrap!important}
.epg-program strong{font-size:12px!important;line-height:1.22!important;font-weight:780!important;letter-spacing:-.08px!important;color:#10213a!important;-webkit-line-clamp:3!important}
.epg-program small{margin-top:5px!important;color:#8a97a8!important}
.epg-program.current{background:#fff0ea!important;border:1px solid #ff9c7f!important;border-radius:7px!important;box-shadow:inset 0 -3px 0 #f05232!important}
.epg-program.current:hover{background:#ffebe4!important;box-shadow:inset 0 -3px 0 #f05232,0 5px 16px rgba(240,82,50,.10)!important}
.epg-program.current .epg-time{color:#b9472f!important}
.epg-progress{display:none!important}
.epg-program[data-short="1"]{padding:9px 6px!important}
.epg-program[data-short="1"] strong{font-size:10px!important;line-height:1.14!important}
.epg-program.micro{padding:5px 2px!important;border-radius:3px!important;background:#eef2f6!important}
.epg-program.micro strong{font-size:8px!important;line-height:1.08!important}
/* Selected time jump: buttons + blue guide marker. Current time remains orange/red. */
[data-jump].jump-active{background:#0c274b!important;color:#fff!important;border-color:#0c274b!important;box-shadow:0 4px 12px rgba(12,39,75,.18)!important}
.jump-marker{position:absolute;top:46px;bottom:0;left:calc(176px + (var(--jump-min) * 1px * var(--ppm)));width:2px;background:#2563eb;z-index:12;pointer-events:none;box-shadow:0 0 0 1px rgba(37,99,235,.05)}
.jump-marker span{position:absolute;top:5px;left:0;transform:translate(-50%,-50%);background:#2563eb;color:#fff;border-radius:999px;padding:4px 7px;font-size:8px;line-height:1;font-weight:900;white-space:nowrap;box-shadow:0 4px 12px rgba(37,99,235,.20)}
.jump-marker.hidden{display:none}
@media(max-width:800px){
 .epg-row,.epg-station,.epg-track{height:102px!important}
 .epg-program{top:7px!important;height:88px!important;padding:9px 7px!important}
 .jump-marker{top:42px;left:calc(128px + (var(--jump-min) * 1px * var(--ppm)))}
}

/* v0.9.3: genuinely flatter EPG + unmistakable selected-time marker */
.epg-row{height:104px!important;background:#fff!important;border-bottom:1px solid #dfe6ee!important}
.epg-station,.epg-track{height:104px!important}
.epg-track{background-color:#fff!important;background-image:linear-gradient(to right,transparent calc(100% - 1px),rgba(210,220,231,.58) calc(100% - 1px))!important}
.epg-row:nth-child(even) .epg-track{background-color:#f8fafc!important}
.epg-program,.epg-program[data-short="1"],.epg-program.micro{top:0!important;height:104px!important;border:0!important;border-right:1px solid #dbe3ec!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;padding:15px 10px 10px!important}
.epg-program:hover,.epg-program[data-short="1"]:hover,.epg-program.micro:hover{background:#edf4fb!important;box-shadow:inset 0 0 0 1px #c9d7e6!important;transform:none!important;z-index:14!important}
.epg-program.current{background:#fff0e9!important;border:0!important;border-right:1px solid #ffb39d!important;box-shadow:inset 0 -4px 0 #f05232!important}
.epg-program.current:hover{background:#ffe9e0!important;box-shadow:inset 0 -4px 0 #f05232,inset 0 0 0 1px #ff9d82!important}
.epg-program .epg-time{font-size:9px!important;color:#748399!important;margin-bottom:7px!important;font-weight:800!important}
.epg-program strong{font-size:12px!important;line-height:1.25!important;font-weight:800!important;color:#10213a!important}
.epg-program[data-short="1"]{padding-left:7px!important;padding-right:7px!important}.epg-program[data-short="1"] strong{font-size:10px!important}
.epg-program.micro{padding:8px 2px!important;align-items:center!important}.epg-program.micro strong{font-size:8px!important}
.epg-station{background:#fff!important;border-right:1px solid #d8e1eb!important;box-shadow:7px 0 16px rgba(16,33,58,.045)!important}
/* active jump buttons */
.jumpbar [data-jump].jump-active,.timeline-nav [data-jump].jump-active{background:#0c274b!important;color:#fff!important;border-color:#0c274b!important;box-shadow:0 4px 12px rgba(12,39,75,.2)!important}
/* selected time is deliberately above sticky sender/ruler so 00:00 is visible too */
.jump-marker{position:absolute!important;top:0!important;bottom:0!important;left:calc(176px + (var(--jump-min) * 1px * var(--ppm)))!important;width:3px!important;background:#2563eb!important;z-index:60!important;pointer-events:none!important;box-shadow:0 0 0 1px rgba(255,255,255,.65),0 0 12px rgba(37,99,235,.18)!important}
.jump-marker span{position:absolute!important;top:22px!important;left:0!important;transform:translate(-50%,-50%)!important;background:#2563eb!important;color:#fff!important;border-radius:999px!important;padding:4px 8px!important;font-size:9px!important;font-weight:900!important;white-space:nowrap!important;box-shadow:0 4px 12px rgba(37,99,235,.22)!important}
.jump-marker.hidden{display:none!important}
@media(max-width:800px){.epg-row,.epg-station,.epg-track{height:98px!important}.epg-program,.epg-program[data-short="1"],.epg-program.micro{height:98px!important}.jump-marker{left:calc(128px + (var(--jump-min) * 1px * var(--ppm)))!important}}

/* v0.9.5 adaptive programme density + dark mode */
.header-tools{display:flex;align-items:center;gap:12px}
.theme-toggle{height:34px;display:inline-flex;align-items:center;gap:7px;padding:0 10px;border:1px solid var(--line);border-radius:10px;background:var(--card);color:var(--ink);font:inherit;font-size:11px;font-weight:800;cursor:pointer;box-shadow:0 1px 2px rgba(16,33,58,.04)}
.theme-toggle:hover{border-color:#b8c6d6}.theme-icon{font-size:14px;line-height:1}.theme-label{min-width:38px;text-align:left}

/* Width, not duration, decides how much information is shown. */
.epg-program{overflow:hidden!important}
.epg-program.size-xs{padding:0!important;background:rgba(230,236,243,.72)!important}
.epg-program.size-xs>*{display:none!important}
.epg-program.size-xs:after{content:"";position:absolute;left:50%;top:50%;width:5px;height:5px;border-radius:50%;background:#8fa0b4;transform:translate(-50%,-50%)}
.epg-program.size-xs.current:after{background:#f05232}
.epg-program.size-sm{padding:10px 5px 7px!important}
.epg-program.size-sm .epg-time{display:none!important}
.epg-program.size-sm small{display:none!important}
.epg-program.size-sm strong{font-size:9px!important;line-height:1.12!important;text-align:left!important;display:-webkit-box!important;-webkit-line-clamp:4!important;-webkit-box-orient:vertical!important;overflow:hidden!important;word-break:normal!important;overflow-wrap:break-word!important}
.epg-program.size-sm.current em{top:4px!important;right:3px!important;font-size:6px!important;padding:2px 4px!important}
.epg-program.size-md{padding:12px 8px 8px!important}
.epg-program.size-md .epg-time{font-size:8px!important;margin-bottom:6px!important}
.epg-program.size-md strong{font-size:11px!important;line-height:1.18!important;-webkit-line-clamp:3!important}
.epg-program.size-md small{display:none!important}
.epg-program.size-lg{padding:14px 11px 10px!important}
.epg-program.size-lg .epg-time{display:block!important}
.epg-program.size-lg strong{font-size:12px!important;line-height:1.24!important;-webkit-line-clamp:3!important}
.epg-program.size-lg small{display:block!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}

/* Dark palette. The live marker stays orange, selected-time marker stays blue. */
html[data-theme="dark"]{color-scheme:dark;--ink:#eef4fb;--muted:#9aa9bc;--line:#2b394b;--bg:#101722;--card:#17212e;--navy:#dbeafe;--soft:#2b1e1b}
html[data-theme="dark"] body{background:#101722;color:#eef4fb}
html[data-theme="dark"] .topbar{background:#111a25;border-color:#263445}
html[data-theme="dark"] .brand,html[data-theme="dark"] .mainnav a,html[data-theme="dark"] .clock,html[data-theme="dark"] h1,html[data-theme="dark"] h2,html[data-theme="dark"] .epg-toolbar b{color:#eef4fb}
html[data-theme="dark"] .mainnav a.active{background:#223149;color:#fff}
html[data-theme="dark"] .hero,html[data-theme="dark"] main{background:#101722}
html[data-theme="dark"] .days a,html[data-theme="dark"] .filter,html[data-theme="dark"] .jumpbar button,html[data-theme="dark"] .timeline-nav button,html[data-theme="dark"] .zoom-control button,html[data-theme="dark"] .fav-toggle,html[data-theme="dark"] .highlight-card,html[data-theme="dark"] .theme-toggle{background:#17212e;border-color:#2b394b;color:#e7eef8}
html[data-theme="dark"] .days a.selected,html[data-theme="dark"] .filter.active,html[data-theme="dark"] .zoom-control button.active,html[data-theme="dark"] [data-jump].jump-active{background:#dbeafe!important;color:#10213a!important;border-color:#dbeafe!important}
html[data-theme="dark"] .epg-scroll,html[data-theme="dark"] .time-ruler,html[data-theme="dark"] .station-ruler{background:#141e2a!important;border-color:#2a394b!important;color:#aebdd0!important}
html[data-theme="dark"] .ruler-track{background:#141e2a!important}
html[data-theme="dark"] .ruler-track:before{opacity:.35}
html[data-theme="dark"] .epg-row,html[data-theme="dark"] .epg-station,html[data-theme="dark"] .epg-track{background:#17212e!important;border-color:#2b394b!important}
html[data-theme="dark"] .epg-row:nth-child(even) .epg-track{background:#141d29!important}
html[data-theme="dark"] .epg-station{box-shadow:7px 0 16px rgba(0,0,0,.18)!important}
html[data-theme="dark"] .station-logo{background:#223149!important;color:#f3f7fc!important}
html[data-theme="dark"] .epg-program,html[data-theme="dark"] .epg-program[data-short="1"],html[data-theme="dark"] .epg-program.micro{color:#e9f0f8!important;border-color:#2b394b!important;background:transparent!important}
html[data-theme="dark"] .epg-program strong{color:#f0f5fb!important}
html[data-theme="dark"] .epg-program .epg-time,html[data-theme="dark"] .epg-program small{color:#91a2b8!important}
html[data-theme="dark"] .epg-program:hover{background:#223149!important;box-shadow:inset 0 0 0 1px #3b4d63!important}
html[data-theme="dark"] .epg-program.current{background:#39241f!important;border-color:#754032!important;box-shadow:inset 0 -4px 0 #f05232!important}
html[data-theme="dark"] .epg-program.current:hover{background:#432820!important}
html[data-theme="dark"] .epg-program.size-xs{background:#202c3b!important}
html[data-theme="dark"] .epg-program.size-xs:after{background:#708299}
html[data-theme="dark"] .epg-program.size-xs.current:after{background:#ff7659}
html[data-theme="dark"] .detail-sheet{background:#17212e!important;color:#eef4fb!important}
html[data-theme="dark"] .sheet-backdrop{background:rgba(0,0,0,.62)!important}
html[data-theme="dark"] footer{background:#111a25;border-color:#263445;color:#9fb0c4}
@media(max-width:800px){.theme-label{display:none}.theme-toggle{width:34px;padding:0;justify-content:center}.header-tools{gap:6px}}

/* v0.9.6 Focus EPG + simple two-state theme */
.theme-toggle{width:36px!important;min-width:36px!important;padding:0!important;justify-content:center!important;border-radius:999px!important}
.theme-toggle .theme-icon{font-size:16px!important}.theme-label{display:none!important}

/* The selected/current programme and its successor carry the visual hierarchy. */
.epg-program.focus-muted:not(.current){background:transparent!important;color:#526176!important;opacity:.72!important;box-shadow:none!important}
.epg-program.focus-muted:not(.current) .epg-time{color:#8996a7!important}
.epg-program.focus-muted:not(.current) strong{font-weight:650!important;color:#44546a!important}
.epg-program.focus-muted:not(.current) small{display:none!important}
.epg-program.focus-primary{z-index:8!important;background:#eef5ff!important;box-shadow:inset 0 -4px 0 #2563eb!important;opacity:1!important}
.epg-program.focus-primary strong{font-weight:850!important;color:#10213a!important}
.epg-program.focus-primary .epg-time{color:#315d98!important}
.epg-program.focus-next{z-index:7!important;background:#f7faff!important;box-shadow:inset 0 -2px 0 #a9bdd7!important;opacity:1!important}
.epg-program.focus-next strong{font-weight:780!important;color:#1d314c!important}
/* Live programme keeps orange identity even when it is the focus. */
.epg-program.current,.epg-program.current.focus-primary{background:#fff0e9!important;box-shadow:inset 0 -4px 0 #f05232!important;opacity:1!important}
.epg-program.current + .epg-program.focus-next{background:#fffaf7!important;box-shadow:inset 0 -2px 0 #e7b3a5!important}

/* Ultra-short broadcasts become quiet ticks instead of text collisions unless focused. */
.epg-program.size-xs.focus-muted>*{display:none!important}
.epg-program.size-xs.focus-muted:after{content:"";position:absolute;left:50%;top:50%;width:4px;height:18px;border-radius:3px;background:#b5c1cf;transform:translate(-50%,-50%)}
.epg-program.size-xs.focus-primary:after,.epg-program.size-xs.focus-next:after{display:none!important}
.epg-program.size-xs.focus-primary,.epg-program.size-xs.focus-next{padding:7px 3px!important}
.epg-program.size-xs.focus-primary strong,.epg-program.size-xs.focus-next strong{display:block!important;font-size:8px!important;line-height:1.05!important;overflow:hidden!important}

html[data-theme="dark"] .epg-program.focus-muted:not(.current){color:#8fa0b5!important;opacity:.64!important}
html[data-theme="dark"] .epg-program.focus-muted:not(.current) strong{color:#9bacc0!important}
html[data-theme="dark"] .epg-program.focus-primary{background:#18304f!important;box-shadow:inset 0 -4px 0 #4f8cff!important}
html[data-theme="dark"] .epg-program.focus-primary strong{color:#f2f7ff!important}
html[data-theme="dark"] .epg-program.focus-primary .epg-time{color:#9ec1f6!important}
html[data-theme="dark"] .epg-program.focus-next{background:#1b2939!important;box-shadow:inset 0 -2px 0 #627891!important}
html[data-theme="dark"] .epg-program.focus-next strong{color:#dbe7f5!important}
html[data-theme="dark"] .epg-program.current,html[data-theme="dark"] .epg-program.current.focus-primary{background:#3b241e!important;box-shadow:inset 0 -4px 0 #ff6b4b!important}
html[data-theme="dark"] .epg-program.size-xs.focus-muted:after{background:#52647a}

/* v0.9.7 production stabilization */
html{background:var(--bg)}
.header-tools{display:flex;align-items:center;gap:10px}
.now-line{left:calc(176px + (var(--now-min,0) * 1px * var(--ppm)))!important;transition:none!important}
.now-line.is-hidden{display:none!important}
.epg-progress{display:block!important;position:absolute!important;left:8px!important;right:8px!important;bottom:7px!important;height:4px!important;background:rgba(240,82,50,.16)!important;border-radius:999px!important;overflow:hidden!important;z-index:3!important}
.epg-progress i{display:block!important;height:100%!important;background:#f05232!important;border-radius:999px!important;transition:width .25s linear!important}
.epg-program.current{padding-bottom:16px!important}
.epg-program.current em{display:block!important}
/* Cleaner broadcast hierarchy */
.epg-program.focus-muted:not(.current){opacity:.82!important}
.epg-program.focus-muted:not(.current) strong{color:#526176!important;font-weight:680!important}
.epg-program.focus-primary:not(.current){background:#edf4fd!important;box-shadow:inset 0 -3px 0 #2563eb!important}
.epg-program.focus-next:not(.current){background:#f7f9fc!important;box-shadow:inset 0 -2px 0 #b7c5d6!important}
/* Complete dark surface pass */
html[data-theme="dark"]{background:#0d141e!important}
html[data-theme="dark"] body,html[data-theme="dark"] main,html[data-theme="dark"] .hero,html[data-theme="dark"] .schedule,html[data-theme="dark"] .discovery{background:#0d141e!important;color:#edf3fb!important}
html[data-theme="dark"] .topbar{background:rgba(14,22,33,.96)!important;border-color:#29384a!important}
html[data-theme="dark"] .topinner,html[data-theme="dark"] .hero-row,html[data-theme="dark"] .epg-toolbar{color:#edf3fb!important}
html[data-theme="dark"] .mainnav a{color:#aebed1!important}html[data-theme="dark"] .mainnav a:hover,html[data-theme="dark"] .mainnav a.active{background:#213044!important;color:#fff!important}
html[data-theme="dark"] .days a,html[data-theme="dark"] .filter,html[data-theme="dark"] .jumpbar button,html[data-theme="dark"] .timeline-nav button,html[data-theme="dark"] .zoom-control button,html[data-theme="dark"] .fav-toggle,html[data-theme="dark"] .theme-toggle,html[data-theme="dark"] .highlight-card{background:#172231!important;color:#e7eef8!important;border-color:#2b3b4f!important}
html[data-theme="dark"] .days a.selected,html[data-theme="dark"] .filter.active,html[data-theme="dark"] .zoom-control button.active{background:#dbeafe!important;color:#10213a!important;border-color:#dbeafe!important}
html[data-theme="dark"] [data-jump].jump-active{background:#3b82f6!important;color:#fff!important;border-color:#3b82f6!important}
html[data-theme="dark"] .epg-scroll,html[data-theme="dark"] .time-ruler,html[data-theme="dark"] .station-ruler,html[data-theme="dark"] .ruler-track{background:#111b28!important;color:#aebed1!important;border-color:#29394c!important}
html[data-theme="dark"] .epg-row,html[data-theme="dark"] .epg-station,html[data-theme="dark"] .epg-track{background-color:#162130!important;border-color:#29394c!important}
html[data-theme="dark"] .epg-row:nth-child(even) .epg-track{background-color:#131e2b!important}
html[data-theme="dark"] .epg-track,html[data-theme="dark"] .ruler-track:before{background-image:linear-gradient(to right,transparent calc(100% - 1px),#273649 calc(100% - 1px))!important}
html[data-theme="dark"] .station-logo{background:#223247!important;color:#f2f6fb!important}
html[data-theme="dark"] .epg-station strong,html[data-theme="dark"] .epg-program strong{color:#edf3fb!important}
html[data-theme="dark"] .epg-program .epg-time,html[data-theme="dark"] .epg-program small{color:#96a8bd!important}
html[data-theme="dark"] .epg-program:hover{background:#223249!important;box-shadow:inset 0 0 0 1px #40536b!important}
html[data-theme="dark"] .epg-program.focus-muted:not(.current){background:transparent!important;opacity:.78!important}html[data-theme="dark"] .epg-program.focus-muted:not(.current) strong{color:#a5b5c8!important}
html[data-theme="dark"] .epg-program.focus-primary:not(.current){background:#183353!important;box-shadow:inset 0 -3px 0 #4b91ff!important}html[data-theme="dark"] .epg-program.focus-next:not(.current){background:#1a293a!important;box-shadow:inset 0 -2px 0 #627891!important}
html[data-theme="dark"] .epg-program.current{background:#3a241f!important;box-shadow:inset 0 -4px 0 #ff6b4b!important}html[data-theme="dark"] .epg-progress{background:#5a332b!important}html[data-theme="dark"] .epg-progress i{background:#ff6b4b!important}
html[data-theme="dark"] .detail-sheet,html[data-theme="dark"] .now-card,html[data-theme="dark"] .channel-row,html[data-theme="dark"] .empty{background:#172231!important;color:#edf3fb!important;border-color:#2b3b4f!important}
html[data-theme="dark"] .detail-sheet p,html[data-theme="dark"] .muted{color:#a6b6c9!important}html[data-theme="dark"] .sheet-close,html[data-theme="dark"] .sheet-save{background:#223247!important;color:#edf3fb!important;border-color:#34475e!important}
html[data-theme="dark"] .onair,html[data-theme="dark"] .stationbox{background:#172231!important;border-color:#2b3b4f!important}html[data-theme="dark"] .nextup{background:#131e2b!important;border-color:#2b3b4f!important}html[data-theme="dark"] .next-item{border-color:#2b3b4f!important}
html[data-theme="dark"] footer{background:#0f1824!important;color:#98aabd!important;border-color:#29384a!important}
html[data-theme="dark"] .epg-hover-tip{background:#edf3fb!important;color:#10213a!important}html[data-theme="dark"] .epg-hover-tip span{color:#526176!important}
@media(max-width:800px){.now-line{left:calc(128px + (var(--now-min,0) * 1px * var(--ppm)))!important}}

/* v0.9.8 live polish: atomic theme switch + strict EPG clipping */
/* Theme changes are intentionally instant. This class exists only for two
   animation frames while data-theme changes, preventing mixed light/dark paints. */
html.theme-switching *,html.theme-switching *::before,html.theme-switching *::after{
  transition:none!important;
  animation:none!important;
}

/* A broadcast owns every pixel inside its time slot. No child may paint outside. */
.epg-program{
  overflow:hidden!important;
  contain:paint!important;
  min-width:0!important;
}
.epg-program>*{
  max-width:100%!important;
  min-width:0!important;
  box-sizing:border-box!important;
}
.epg-program .epg-time,
.epg-program strong,
.epg-program small{
  overflow:hidden!important;
  max-width:100%!important;
}
.epg-program strong{
  word-break:normal!important;
  overflow-wrap:normal!important;
  hyphens:none!important;
}

/* <48 px: deliberately no text. Full information remains available on hover/click. */
.epg-program.size-xs,
.epg-program.size-xs.focus-primary,
.epg-program.size-xs.focus-next{
  padding:0!important;
}
.epg-program.size-xs>*,
.epg-program.size-xs.focus-primary>*,
.epg-program.size-xs.focus-next>*{
  display:none!important;
}
.epg-program.size-xs::after,
.epg-program.size-xs.focus-primary::after,
.epg-program.size-xs.focus-next::after{
  content:""!important;
  display:block!important;
  position:absolute!important;
  left:50%!important;
  top:50%!important;
  width:4px!important;
  height:18px!important;
  border-radius:4px!important;
  background:#a8b5c5!important;
  transform:translate(-50%,-50%)!important;
}
.epg-program.size-xs.current::after{background:#f05232!important}

/* 48–91 px: one clean title line, never vertical/staggered text. */
.epg-program.size-sm{padding:10px 6px!important}
.epg-program.size-sm .epg-time,
.epg-program.size-sm small{display:none!important}
.epg-program.size-sm strong{
  display:block!important;
  width:100%!important;
  white-space:nowrap!important;
  text-overflow:ellipsis!important;
  font-size:9px!important;
  line-height:1.2!important;
}

/* 92–164 px: time + at most two title lines. */
.epg-program.size-md strong{
  display:-webkit-box!important;
  width:100%!important;
  white-space:normal!important;
  -webkit-box-orient:vertical!important;
  -webkit-line-clamp:2!important;
  line-clamp:2!important;
}

/* >=165 px: enough room for a normal card, still strictly clipped. */
.epg-program.size-lg strong{
  display:-webkit-box!important;
  width:100%!important;
  white-space:normal!important;
  -webkit-box-orient:vertical!important;
  -webkit-line-clamp:3!important;
  line-clamp:3!important;
}

/* Keep live UI inside the card as well. */
.epg-program.current em{max-width:44px!important;white-space:nowrap!important;overflow:hidden!important}
.epg-program .epg-progress{max-width:none!important}

html[data-theme="dark"] .epg-program.size-xs::after,
html[data-theme="dark"] .epg-program.size-xs.focus-primary::after,
html[data-theme="dark"] .epg-program.size-xs.focus-next::after{background:#61748b!important}
html[data-theme="dark"] .epg-program.size-xs.current::after{background:#ff6b4b!important}

/* v1.0 live-ready product pass */
.site-search{margin-left:auto;max-width:300px;flex:1}.site-search label{height:38px;display:flex;align-items:center;gap:8px;background:var(--card);border:1px solid var(--line);border-radius:12px;padding:0 11px;color:var(--muted)}.site-search input{width:100%;border:0;outline:0;background:transparent;color:var(--ink);font:inherit;font-size:13px}.site-search input::placeholder{color:var(--muted)}.mainnav{margin-left:0}.search-result-note{display:flex;align-items:center;justify-content:space-between;gap:14px;margin:8px 0 2px;padding:11px 14px;border-radius:12px;background:var(--card);border:1px solid var(--line);font-size:13px}.search-result-note a{color:var(--muted);text-decoration:none}.mobile-guide{display:none}.sheet-channel,.sheet-extra{font-size:12px;color:var(--muted);margin-top:5px}.sheet-channel{font-weight:800;color:var(--ink)}
.epg-remaining{position:absolute;right:7px;bottom:14px;z-index:4;font-size:8px;font-weight:900;color:var(--accent);white-space:nowrap}.epg-program.size-xs .epg-remaining,.epg-program.size-sm .epg-remaining{display:none!important}.epg-program.current.size-md strong{padding-right:2px}
/* calmer timeline: non-focus content remains readable, not washed out */
.epg-program.focus-muted:not(.current){opacity:1!important}.epg-program.focus-muted:not(.current) strong{color:var(--ink)!important;font-weight:740!important}.epg-program.focus-primary:not(.current){background:rgba(37,99,235,.065)!important}.epg-program.focus-next:not(.current){background:rgba(148,163,184,.06)!important}
html[data-theme="dark"] .site-search label,html[data-theme="dark"] .search-result-note{background:#172231;border-color:#2b3b4f;color:#edf3fb}html[data-theme="dark"] .site-search input{color:#edf3fb}html[data-theme="dark"] .sheet-channel{color:#edf3fb}html[data-theme="dark"] .epg-program.focus-muted:not(.current) strong{color:#d8e3ef!important}
/* Make theme changes atomic; transitions only exist for interaction, never palette swaps. */
html.theme-switching,html.theme-switching body{transition:none!important}html.theme-switching *,html.theme-switching *::before,html.theme-switching *::after{transition-property:none!important;transition-duration:0s!important;animation:none!important}
@media(max-width:980px){.site-search{display:none}.topinner{gap:12px}}
@media(max-width:800px){
 .epg-section{display:none!important}.discovery{display:none}.mobile-guide{display:block;padding:0 12px 55px;max-width:760px;margin:0 auto}.mobile-channel{background:var(--card);border:1px solid var(--line);border-radius:16px;margin:12px 0;overflow:hidden}.mobile-channel>header{position:relative;display:flex;align-items:center;gap:10px;padding:12px 14px;border-bottom:1px solid var(--line)}.mobile-channel>header .station-logo{width:44px;height:32px}.mobile-channel>header .star{top:14px;right:12px}.mobile-programs{display:block}.mobile-program{position:relative;width:100%;display:grid;grid-template-columns:52px minmax(0,1fr) auto;align-items:center;gap:10px;padding:12px 14px;border:0;border-bottom:1px solid var(--line);background:transparent;color:var(--ink);text-align:left;font:inherit}.mobile-program:last-child{border-bottom:0}.mobile-program time{font-size:12px;font-weight:900;color:var(--muted)}.mobile-program span{min-width:0}.mobile-program b{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:13px}.mobile-program small{display:block;margin-top:3px;color:var(--muted);font-size:10px}.mobile-program.current{background:var(--soft);box-shadow:inset 3px 0 0 var(--accent)}.mobile-live{font-size:8px;font-style:normal;font-weight:900;color:#fff;background:var(--accent);padding:3px 6px;border-radius:999px}.jumpbar{padding-bottom:4px}.filters{padding-bottom:5px}
 html[data-theme="dark"] .mobile-channel{background:#172231;border-color:#2b3b4f}html[data-theme="dark"] .mobile-channel>header,html[data-theme="dark"] .mobile-program{border-color:#2b3b4f}html[data-theme="dark"] .mobile-program{color:#edf3fb}html[data-theme="dark"] .mobile-program.current{background:#39241f}
}
@media(max-width:470px){.header-tools{margin-left:auto}.theme-toggle{width:36px;padding:0;justify-content:center}.hero{padding-top:22px}.days{margin-right:-16px}.search-result-note{align-items:flex-start;flex-direction:column}}
.mobile-search{display:none}.mobile-search input{min-width:0;flex:1;border:1px solid var(--line);background:var(--card);color:var(--ink);border-radius:11px;padding:11px 12px;font:inherit}.mobile-search button{border:0;background:var(--navy);color:#fff;border-radius:11px;padding:0 14px;font-weight:800}@media(max-width:800px){.mobile-search{display:flex;gap:7px;margin:0 0 12px}html[data-theme="dark"] .mobile-search input{background:#172231;border-color:#2b3b4f;color:#edf3fb}html[data-theme="dark"] .mobile-search button{background:#dbeafe;color:#10213a}}

/* v1.1 navigation + mobile usability */
.channel-strip{display:flex;align-items:center;gap:8px;margin:12px 0 8px}.channel-strip-scroll{display:flex;gap:7px;overflow-x:auto;scrollbar-width:none;flex:1;padding:2px}.channel-strip-scroll::-webkit-scrollbar{display:none}.channel-jump,.search-open{flex:0 0 auto;width:48px;height:42px;border:1px solid var(--line);background:var(--card);border-radius:11px;display:flex;align-items:center;justify-content:center;color:var(--ink);cursor:pointer}.channel-jump img{max-width:36px;max-height:24px;object-fit:contain}.channel-jump span{font-size:11px;font-weight:900}.channel-jump:hover,.search-open:hover{border-color:#a9b9cd;transform:translateY(-1px)}.search-open{font-size:22px;width:44px}.quick-search{display:none;gap:7px;margin:9px 0 4px}.quick-search.open{display:flex}.quick-search input{min-width:0;flex:1;border:1px solid var(--line);background:var(--card);color:var(--ink);border-radius:11px;padding:11px 12px;font:inherit}.quick-search button{border:0;background:var(--navy);color:#fff;border-radius:11px;padding:0 16px;font-weight:850}.filter-hidden{display:none!important}.filter-channel-hidden{display:none!important}
html[data-theme="dark"] .channel-jump,html[data-theme="dark"] .search-open,html[data-theme="dark"] .quick-search input{background:#172231;border-color:#2b3b4f;color:#edf3fb}html[data-theme="dark"] .quick-search button{background:#dbeafe;color:#10213a}

@media(max-width:800px){
 .jumpbar{display:none!important}.site-search{display:none!important}.mobile-search{display:none!important}.hero{padding-bottom:10px}.filters{overflow-x:auto;flex-wrap:nowrap;scrollbar-width:none}.filters::-webkit-scrollbar{display:none}.filter{flex:0 0 auto}.channel-strip{margin-top:10px}.channel-jump{width:46px;height:40px}.search-open{position:sticky;right:0;box-shadow:-8px 0 12px var(--bg)}
 .mobile-guide{display:block;padding:0 12px 55px;max-width:760px;margin:0 auto}.mobile-channel{scroll-margin-top:76px;background:var(--card);border:1px solid var(--line);border-radius:18px;margin:12px 0;overflow:hidden;box-shadow:0 5px 20px rgba(20,42,70,.05)}.mobile-channel>header{position:relative;display:flex;align-items:center;gap:10px;padding:12px 14px;border-bottom:1px solid var(--line)}.mobile-channel>header .station-logo{width:44px;height:32px}.mobile-channel>header>strong{font-size:14px}.mobile-star{margin-left:auto;border:0;background:transparent;font-size:20px;color:#8ba0b8;cursor:pointer}.mobile-star.saved{color:#f5a623}
 .mobile-current{display:block;width:100%;border:0;background:linear-gradient(135deg,rgba(240,82,50,.09),rgba(240,82,50,.025));color:var(--ink);padding:16px 14px 13px;text-align:left;font:inherit;cursor:pointer}.mobile-current-label,.mobile-section-label{display:block;font-size:9px;letter-spacing:.08em;font-weight:950;color:var(--accent);margin-bottom:6px}.mobile-current>b{display:block;font-size:18px;line-height:1.18}.mobile-current>small{display:block;margin-top:5px;color:var(--muted);font-size:11px}.mobile-current-progress{height:6px;border-radius:999px;background:rgba(240,82,50,.14);overflow:hidden;margin-top:13px}.mobile-current-progress i{display:block;height:100%;background:var(--accent);border-radius:999px}.mobile-current-meta{display:flex;justify-content:space-between;gap:10px;margin-top:6px;font-size:10px;color:var(--muted)}.mobile-current-meta strong{color:var(--accent);font-size:11px}
 .mobile-after{padding:12px 14px;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}.mobile-section-label{color:var(--muted);margin-bottom:3px}.mobile-after-item{width:100%;display:grid;grid-template-columns:48px minmax(0,1fr);gap:9px;border:0;background:transparent;color:var(--ink);padding:7px 0;text-align:left;font:inherit;cursor:pointer}.mobile-after-item time{font-size:11px;font-weight:900;color:var(--muted)}.mobile-after-item span{font-size:13px;font-weight:760;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 .mobile-full summary{cursor:pointer;padding:12px 14px;font-size:12px;font-weight:850;color:#24415f;list-style:none}.mobile-full summary::-webkit-details-marker{display:none}.mobile-full summary:after{content:'+';float:right;font-size:18px;line-height:12px}.mobile-full[open] summary:after{content:'−'}.mobile-programs{border-top:1px solid var(--line)}.mobile-program{position:relative;width:100%;display:grid;grid-template-columns:52px minmax(0,1fr);align-items:center;gap:10px;padding:11px 14px;border:0;border-bottom:1px solid var(--line);background:transparent;color:var(--ink);text-align:left;font:inherit}.mobile-program:last-child{border-bottom:0}.mobile-program time{font-size:11px;font-weight:900;color:var(--muted)}.mobile-program span{min-width:0}.mobile-program b{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:12px}.mobile-program small{display:block;margin-top:2px;color:var(--muted);font-size:9px}
 html[data-theme="dark"] .mobile-channel{background:#172231;border-color:#2b3b4f;box-shadow:none}html[data-theme="dark"] .mobile-channel>header,html[data-theme="dark"] .mobile-after,html[data-theme="dark"] .mobile-programs,html[data-theme="dark"] .mobile-program{border-color:#2b3b4f}html[data-theme="dark"] .mobile-current{background:linear-gradient(135deg,rgba(255,107,75,.16),rgba(255,107,75,.035));color:#edf3fb}html[data-theme="dark"] .mobile-after-item,html[data-theme="dark"] .mobile-program{color:#edf3fb}html[data-theme="dark"] .mobile-full summary{color:#c9d8e9}
}

/* v1.2 desktop polish — mobile guide intentionally unchanged */
@media(min-width:801px){
  /* Desktop already has the full search field in the header. */
  .channel-strip .search-open{display:none!important}
  .channel-strip{padding-right:0!important}

  /* Primetime is a compact discovery strip, not a second hero section. */
  .discovery{padding-top:2px!important;padding-bottom:16px!important}
  .discovery .section-title{margin-bottom:7px!important;align-items:center!important}
  .discovery .section-title>div{display:flex!important;align-items:baseline!important;gap:10px!important}
  .discovery .section-title span{font-size:9px!important}
  .discovery .section-title h2{font-size:16px!important;letter-spacing:-.25px!important;margin:0!important}
  .discovery .section-title a{font-size:10px!important}
  .highlight-grid{display:flex!important;gap:7px!important;overflow:hidden!important}
  .highlight-card{flex:0 1 245px!important;min-width:180px!important;min-height:58px!important;border-radius:10px!important;padding:9px 11px!important;box-shadow:none!important}
  .highlight-card:hover{transform:none!important;box-shadow:0 5px 16px rgba(16,33,58,.08)!important}
  .highlight-station{font-size:8px!important}
  .highlight-card strong{font-size:11px!important;line-height:1.15!important;margin:4px 0 2px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
  .highlight-card small{font-size:8px!important}

  /* More room for the actual EPG. */
  .schedule.epg-section{padding-top:0!important}
  .epg-toolbar{margin-top:0!important;margin-bottom:7px!important}
  .epg-toolbar>div:first-child span{font-size:10px!important}
  .zoom-control:after{display:none!important}

  /* Narrower sticky station column; programme area gets the space. */
  .epg-canvas{width:calc(136px + var(--day-width))!important}
  .time-ruler{grid-template-columns:136px var(--day-width)!important}
  .epg-station{width:136px!important;padding:13px 12px!important}
  .epg-track{left:136px!important}
  .station-ruler{padding-left:13px!important}
  .epg-station .station-logo{width:48px!important;height:36px!important;border-radius:9px!important}
  .epg-station strong{font-size:11px!important;max-width:100px!important;margin-top:5px!important}
  .epg-station .star{top:12px!important;right:9px!important;font-size:15px!important}

  /* Desktop should be browsable, not compressed: ~5–6 hours at normal zoom. */
  .epg-row,.epg-station,.epg-track{height:112px!important}
  .epg-program,.epg-program[data-short="1"],.epg-program.micro{height:112px!important;padding-top:14px!important}
  .epg-program .epg-time{font-size:9px!important;margin-bottom:7px!important}
  .epg-program strong{font-size:12px!important;line-height:1.22!important;-webkit-line-clamp:3!important}
  .epg-program small{display:block;font-size:9px!important;margin-top:5px!important}

  /* Current broadcast: calm card + one strong progress cue. */
  .epg-program.current,.epg-program.current.focus-primary{background:rgba(240,82,50,.075)!important;box-shadow:inset 0 -4px 0 #f05232!important;border-right:1px solid rgba(240,82,50,.25)!important}
  .epg-program.current:hover{background:rgba(240,82,50,.105)!important;box-shadow:inset 0 -4px 0 #f05232!important}
  .epg-program.current em{top:8px!important;right:7px!important;font-size:7px!important;padding:3px 6px!important}
  .epg-program.current .epg-remaining{position:absolute!important;right:8px!important;bottom:14px!important;font-size:8px!important;font-weight:900!important;color:#d84b2f!important;white-space:nowrap!important}
  .epg-progress{left:8px!important;right:8px!important;bottom:7px!important;height:4px!important}

  /* The rest stays readable instead of being washed out by focus mode. */
  .epg-program.focus-muted:not(.current){opacity:1!important;color:inherit!important}
  .epg-program.focus-muted:not(.current) strong{color:inherit!important}
  .epg-program.focus-primary:not(.current){background:rgba(37,99,235,.055)!important;box-shadow:inset 0 -3px 0 rgba(37,99,235,.7)!important}
  .epg-program.focus-next:not(.current){background:rgba(100,116,139,.04)!important;box-shadow:inset 0 -2px 0 rgba(100,116,139,.28)!important}

  /* Marker offsets must follow the narrower station column. */
  .now-line{left:calc(136px + (var(--now-min,0) * 1px * var(--ppm)))!important}
  .jump-marker{left:calc(136px + (var(--jump-min) * 1px * var(--ppm)))!important}

  html[data-theme="dark"] .highlight-card{background:#172333!important;border-color:#2a3a4d!important}
  html[data-theme="dark"] .epg-program.focus-muted:not(.current){opacity:1!important;color:#cbd7e6!important}
  html[data-theme="dark"] .epg-program.focus-muted:not(.current) strong{color:#e0e8f3!important}
  html[data-theme="dark"] .epg-program.focus-primary:not(.current){background:#18304a!important;box-shadow:inset 0 -3px 0 #4f8cff!important}
  html[data-theme="dark"] .epg-program.focus-next:not(.current){background:#182535!important;box-shadow:inset 0 -2px 0 #52667e!important}
  html[data-theme="dark"] .epg-program.current,html[data-theme="dark"] .epg-program.current.focus-primary{background:#2d211f!important;border-right-color:#704036!important;box-shadow:inset 0 -4px 0 #ff6545!important}
}
