/* ============================================================
   TIVILUX 2.1 — LIVE TV REBUILD
   New desktop command rail, premium guide, custom channel order,
   and full-screen player / mini-guide experience.
   ============================================================ */
:root{--lux-gold:#e7c58d;--lux-gold-strong:#f3d7a4;--lux-ink:#07090d;--lux-surface:#0d1118;--lux-surface-2:#131a24;--lux-blue:#82aee8}

@media(min-width:901px){
  body{padding-left:118px;background:radial-gradient(circle at 72% 0,#17202c 0,transparent 30%),#07090d}
  #header{position:fixed;inset:0 auto 0 0;width:118px;height:100dvh;padding:22px 13px 18px;display:flex;flex-direction:column;justify-content:flex-start;align-items:stretch;gap:26px;background:linear-gradient(180deg,#0c1118f7,#07090dfa);border:0;border-right:1px solid #ffffff0d;box-shadow:22px 0 70px #0005;backdrop-filter:blur(24px)}
  #header .brand-link{display:flex;flex-direction:column;align-items:center;gap:6px;overflow:hidden}
  #header .brand-link .brand{font-size:22px;transform:scale(.92)}
  #header .brand-link small{font-size:.48rem;letter-spacing:.22em;color:#6f7b88;font-weight:800}
  #header nav{display:flex;flex-direction:column;gap:8px;width:100%;height:auto;align-items:stretch}
  #header nav a{height:74px;padding:10px 5px;border-radius:17px;display:flex;flex-direction:column;justify-content:center;gap:6px;color:#75808d;font-size:.61rem;font-weight:650;letter-spacing:.02em;text-align:center}
  #header nav a svg{width:24px;height:24px}
  #header nav a:hover{background:#ffffff08;color:#fff}
  #header nav a.active{background:linear-gradient(180deg,#e7c58d18,#e7c58d0a);color:var(--lux-gold);box-shadow:inset 0 0 0 1px #e7c58d22}
  #header nav a.active:after{display:none}
  #header .header-right{margin-top:auto;width:100%;display:flex;flex-direction:column;gap:11px}
  #header .header-right .icon-button{width:100%;height:58px;display:flex;flex-direction:column;gap:4px;background:#ffffff05;border:1px solid #ffffff08;border-radius:16px;color:#8d98a5;font-size:.54rem}
  #header .header-right .icon-button span{display:block}
  #header .avatar{margin:auto;width:48px;height:48px;min-height:48px}
  .app-main{margin:0;max-width:none;width:100%;padding:34px clamp(26px,3.3vw,66px) 70px}
  .live-view .app-main{padding-top:24px}
}

/* NEW LIVE GUIDE STAGE */
.guide-v2-stage{display:grid;grid-template-columns:minmax(330px,520px) minmax(380px,1fr) minmax(220px,300px);gap:18px;align-items:stretch;margin:0 0 14px}
.guide-v2-preview{position:relative;aspect-ratio:16/9;min-height:230px;overflow:hidden;border-radius:22px;background:#020305;border:1px solid #ffffff12;box-shadow:0 28px 85px #0009,inset 0 0 0 1px #ffffff05}
.guide-v2-preview:after{content:'';position:absolute;inset:0;pointer-events:none;border-radius:inherit;box-shadow:inset 0 -70px 90px #0008}
.guide-v2-preview .preview-idle{inset:0;display:grid;grid-template-columns:auto 1fr auto;gap:16px;align-items:center;padding:28px;background:radial-gradient(circle at 70% 30%,#202c3a,#080c12 68%);text-align:left}
.guide-v2-preview .preview-idle>div{display:flex;flex-direction:column;gap:4px}
.guide-v2-preview .preview-idle strong{font-size:1.05rem}
.guide-v2-preview .preview-idle small{max-width:260px;line-height:1.4}
.guide-v2-live-dot{width:11px;height:11px;border-radius:50%;background:#ef4f58;box-shadow:0 0 0 7px #ef4f5815}
.guide-v2-preview .preview-play{width:54px;height:54px;border-color:#e7c58d66;background:#e7c58d10}
.guide-v2-focus{min-width:0;padding:18px 12px;display:flex;flex-direction:column;justify-content:center}
.guide-v2-status{display:flex;align-items:center;gap:12px;margin-bottom:10px;font-size:.62rem;font-weight:780;letter-spacing:.12em;color:#9da8b5}
.guide-v2-status span{display:flex;align-items:center;gap:7px;color:#fff}
.guide-v2-status i{width:7px;height:7px;border-radius:50%;background:#f14f58;box-shadow:0 0 18px #f14f58}
.guide-v2-status em{font-style:normal;color:var(--gold)}
.guide-v2-focus h1{font-size:clamp(1.8rem,2.7vw,3.25rem);line-height:1.03;letter-spacing:-.05em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.guide-v2-focus>p{max-width:780px;margin-top:10px;font-size:.82rem;line-height:1.55;color:#84909e;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.guide-v2-now{display:flex;align-items:center;gap:10px;margin-top:16px;font-size:.67rem}.guide-v2-now span{padding:5px 7px;border-radius:5px;background:#c62d38;color:#fff;font-weight:850;letter-spacing:.13em}.guide-v2-now b{font-weight:520;color:#ccd5df}
.guide-v2-actions{display:flex;gap:8px;margin-top:15px}.guide-v2-actions button{min-height:39px;padding:7px 11px;font-size:.68rem;background:#ffffff06}.guide-v2-actions svg{width:15px;height:15px}
.guide-v2-group{align-self:stretch;display:flex;flex-direction:column;justify-content:center;padding:20px;border:1px solid #ffffff0e;border-radius:20px;background:linear-gradient(160deg,#121924,#0b1017);box-shadow:0 20px 50px #0004}
.guide-v2-group .eyebrow{font-size:.58rem;margin-bottom:10px}.guide-v2-group select{min-height:48px;background:#080c12}.guide-v2-group small{margin-top:9px;color:#6f7c8a;font-size:.62rem}
.guide-v2-body{border:1px solid #ffffff0c;border-radius:22px;background:linear-gradient(180deg,#0e141d,#090d13);overflow:hidden;box-shadow:0 26px 80px #0005}

/* COMMAND BAR / ORDERING */
.guide-commandbar{min-height:72px;display:grid;grid-template-columns:auto minmax(180px,1fr) auto;gap:16px;align-items:center;padding:10px 12px 10px 14px;border-bottom:1px solid #ffffff0e;background:linear-gradient(180deg,#141c27,#0e141d);position:sticky;top:0;z-index:18}
.guide-time-nav{display:flex;gap:6px}.guide-time-nav button{min-height:40px;height:40px;padding:7px 13px;border-radius:10px}.guide-time-nav .guide-now-button{background:var(--gold);color:#17120b;border-color:var(--gold);font-size:.65rem;font-weight:800;letter-spacing:.08em}
.guide-command-meta{min-width:0;display:flex;flex-direction:column}.guide-command-meta strong{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:.78rem}.guide-command-meta span{color:#6f7c8c;font-size:.62rem;margin-top:2px}
.guide-command-controls{display:flex;align-items:end;gap:7px}.guide-command-controls label{gap:4px;font-size:.48rem;letter-spacing:.11em;font-weight:800;color:#657181}.guide-command-controls select{min-width:122px;min-height:40px;height:40px;padding:7px 28px 7px 9px;font-size:.68rem;border-radius:9px}.guide-edit-order{min-height:40px;height:40px;padding:7px 11px;font-size:.65rem;white-space:nowrap}

/* PREMIUM GUIDE GRID */
.guide-v2-body .guide-scroll{margin:0;max-height:calc(100dvh - 285px);min-height:440px;border:0;border-radius:0;background:#0a0f16;scrollbar-color:#384455 #0b1017}
.guide-v2-body .guide-grid{width:1325px;background:#0a0f16}
.guide-v2-body .guide-time{height:56px;background:#121a24;border-bottom:1px solid #ffffff10;box-shadow:0 8px 20px #0004}
.guide-v2-body .guide-time>strong{width:260px;padding:9px 16px;background:#121a24;display:flex;flex-direction:column;justify-content:center;gap:1px;border-right:1px solid #ffffff0d}
.guide-v2-body .guide-time>strong span{width:auto;padding:0;color:#c6cfda;font-size:.62rem;letter-spacing:.15em}
.guide-v2-body .guide-time>strong small{font-size:.5rem;letter-spacing:.08em;color:#647181}
.guide-v2-body .guide-time>div,.guide-v2-body .guide-programs{width:1065px}
.guide-v2-body .guide-time span{width:177.5px;padding:17px 11px;color:#8d99a8;font-size:.69rem;font-weight:650}
.guide-v2-body .guide-row{height:82px;background:#0b1017;border-bottom:1px solid #ffffff08;transition:background .15s}
.guide-v2-body .guide-row:hover{background:#101721}
.guide-v2-body .guide-channel{width:260px;padding:10px 13px;gap:10px;background:#101721;border-right:1px solid #ffffff10;box-shadow:12px 0 28px #0003}
.guide-channel-number{width:34px;flex:none;text-align:center;color:var(--gold);font-size:.65rem;font-weight:780}
.guide-v2-body .guide-channel>.art{width:42px;height:42px;border-radius:11px;background:#ffffff06;border:1px solid #ffffff08}
.guide-channel-name{min-width:0;flex:1!important;display:flex!important;flex-direction:column!important;gap:2px!important}.guide-channel-name strong{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:.75rem;font-weight:620;color:#edf2f8}.guide-channel-name small{font-size:.54rem!important;color:#627080!important}
.guide-tune-mark{width:24px!important;flex:none;color:#596677;font-size:.66rem!important;display:block!important;text-align:center}
.guide-v2-body .guide-programs{background:repeating-linear-gradient(90deg,#0b1017 0,#0b1017 176.5px,#ffffff08 176.5px,#ffffff08 177.5px)}
.guide-v2-body .guide-program{top:7px;bottom:7px;padding:10px 13px;border-radius:10px;background:linear-gradient(150deg,#182231,#121a25);border-color:#ffffff0b;box-shadow:inset 0 1px #ffffff05}
.guide-v2-body .guide-program:hover{background:linear-gradient(150deg,#223043,#172230);border-color:#ffffff1c}
.guide-v2-body .guide-program.on-air{background:linear-gradient(145deg,#392f22,#211d18);border-color:#e7c58d48;box-shadow:inset 3px 0 0 var(--gold)}
.guide-v2-body .guide-program strong{font-size:.75rem;font-weight:620}.guide-v2-body .guide-program span{font-size:.58rem;color:#738091}.guide-v2-body .now-line{width:2px;background:#f6d7a0;box-shadow:0 0 16px #e7c58d88}
.guide-density-compact .guide-row{height:62px}.guide-density-compact .guide-channel>.art{width:34px;height:34px}.guide-density-compact .guide-program{top:5px;bottom:5px}.guide-density-compact .guide-channel-name strong{font-size:.69rem}
.guide-density-large .guide-row{height:104px}.guide-density-large .guide-channel>.art{width:52px;height:52px}.guide-density-large .guide-program strong{font-size:.83rem}.guide-density-large .guide-program span{font-size:.64rem}

/* CHANNEL ORDER MANAGER */
#dialog:has(.channel-order-list){width:min(820px,calc(100vw - 28px));max-width:820px;padding-bottom:18px}
.order-heading{padding-right:50px}.order-tools{display:flex;align-items:center;gap:12px;margin:16px 0 10px}.order-tools label{position:relative;display:flex;flex-direction:row;align-items:center;gap:8px;flex:1;background:#090d13;border:1px solid #ffffff12;border-radius:11px;padding:0 12px}.order-tools label svg{width:18px;color:#6f7b89}.order-tools input{border:0!important;background:transparent!important;min-height:44px!important;padding:8px 2px!important}.order-tools>span{color:#7c8794;font-size:.68rem}
.channel-order-list{max-height:55dvh;overflow:auto;border:1px solid #ffffff0f;border-radius:14px;background:#0a0e14}
.channel-order-row{display:grid;grid-template-columns:28px 36px 42px minmax(0,1fr) 70px 38px 38px;align-items:center;gap:8px;min-height:62px;padding:8px 9px;border-bottom:1px solid #ffffff09;background:#0e141c;cursor:grab}.channel-order-row:last-child{border-bottom:0}.channel-order-row:hover{background:#141c27}.channel-order-row.dragging{opacity:.45;background:#2b251b}.channel-order-row[hidden]{display:none}.order-grip{color:#65717e;text-align:center}.order-rank{font-size:.62rem;color:var(--gold);font-weight:800;text-align:center}.channel-order-row img,.order-logo{width:38px;height:38px;border-radius:9px;object-fit:contain;background:#ffffff06;padding:5px}.order-logo{display:grid;place-items:center;font-size:.55rem;color:#8390a0}.channel-order-row strong{min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:.76rem}.channel-order-row small{color:#6e7b89;font-size:.58rem}.channel-order-row button{width:34px;min-height:34px;height:34px;padding:7px;border-radius:8px}.channel-order-row button svg{width:15px;height:15px}.order-footer{display:flex;justify-content:flex-end;gap:8px;padding-top:13px}

/* PLAYER 2.0.1 */
#player-panel{--player-edge:clamp(18px,3vw,38px)}
#player-panel.theater{background:#000}
#player-panel .video-stage{background:#000}
#player-panel .player-vignette{background:linear-gradient(180deg,#000b 0,transparent 25%,transparent 45%,#000e 100%)}
.osd-top{padding:var(--player-edge);justify-content:space-between}.osd-live-cluster{display:flex;gap:7px;align-items:center}.osd-top-actions{display:flex;align-items:center;gap:7px;margin-left:auto}.osd-top-actions button{margin-left:0}.osd-clock{color:#dbe1e8;font-size:.72rem;font-weight:650;padding-right:6px;text-shadow:0 2px 10px #000}
.live-pill{border-radius:999px;padding:6px 10px;font-size:.55rem;background:#d83944;box-shadow:0 0 24px #d8394440}.osd-quality,.osd-health{border-radius:999px;padding:6px 10px;background:#0b1017b8;border:1px solid #ffffff10;backdrop-filter:blur(15px);font-size:.58rem;font-weight:720;letter-spacing:.05em}.osd-health[data-health="great"]{color:#a9d890}.osd-health[data-health="good"]{color:#e7c58d}.osd-health[data-health="weak"]{color:#ef8a8f}
.osd-bottom{padding:54px var(--player-edge) 28px}.osd-identity{gap:16px;margin-bottom:20px}.osd-number{display:flex;flex-direction:column;justify-content:center;align-items:center;min-width:72px;min-height:68px;padding:8px 12px;border-radius:15px;background:#0a0e14b8;border:1px solid #ffffff14;backdrop-filter:blur(18px);font-size:1.65rem;font-weight:380;line-height:1;color:var(--gold)}.osd-number small{font-size:.48rem;letter-spacing:.16em;color:#6f7b88;margin-bottom:5px}.osd-now-label{display:block;margin-bottom:3px;color:var(--gold);font-size:.5rem;font-weight:820;letter-spacing:.16em}.osd-identity h2{font-size:clamp(1.4rem,2.4vw,2.55rem);font-weight:520;letter-spacing:-.04em}.osd-program{margin-top:7px;font-size:.72rem}.osd-program strong{font-size:.8rem}.osd-actions{gap:7px}.osd-actions button{min-width:50px;min-height:50px;border-radius:14px;background:#0b1119d4;border:1px solid #ffffff16;flex-direction:column;gap:2px}.osd-actions button span{font-size:.5rem;color:#9ba7b4}.osd-actions .osd-play{width:60px;height:60px;border-radius:50%;background:var(--gold);color:#19140e}.osd-actions .osd-play svg{width:24px;height:24px}.osd-progress{height:4px;margin-top:18px;background:#ffffff1e}

.player-mini-guide{position:absolute;z-index:18;top:0;right:0;bottom:0;width:min(420px,92vw);background:linear-gradient(180deg,#0c1118f7,#080c12f9);border-left:1px solid #ffffff12;box-shadow:-28px 0 70px #0008;backdrop-filter:blur(28px);overflow:hidden;display:flex;flex-direction:column}.player-mini-guide[hidden]{display:none!important}.mini-guide-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:22px 18px 16px;border-bottom:1px solid #ffffff0e}.mini-guide-head>div{min-width:0}.mini-guide-head strong{display:block;margin-top:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:.9rem}.mini-guide-head button{width:40px;min-height:40px;padding:9px}.mini-guide-list{overflow:auto;flex:1;padding:8px}.mini-guide-row{display:grid;grid-template-columns:42px 42px minmax(0,1fr) auto;align-items:center;gap:9px;width:100%;min-height:58px;padding:7px 9px;border:0;border-radius:10px;background:transparent;text-align:left}.mini-guide-row:hover{background:#ffffff08}.mini-guide-row.active{background:#e7c58d13;box-shadow:inset 3px 0 0 var(--gold)}.mini-guide-num{font-size:.58rem;color:var(--gold);text-align:center}.mini-guide-logo{width:36px;height:36px;border-radius:9px;background:#ffffff08;display:grid;place-items:center;color:#7f8b98;font-size:.55rem}.mini-guide-row strong{min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:.72rem}.mini-guide-row em{font-style:normal;font-size:.49rem;font-weight:800;letter-spacing:.09em;color:#647181}.mini-guide-row.active em{color:var(--gold)}.mini-guide-foot{padding:12px 16px;border-top:1px solid #ffffff0e;color:#667382;font-size:.58rem;text-align:center}.mini-guide-loading,.mini-guide-error{padding:30px;display:flex;gap:12px;align-items:center;color:#8c98a6;font-size:.72rem}.mini-guide-loading .spinner{width:19px;height:19px}

.command-center{background:radial-gradient(circle at 85% 10%,#26364a55,transparent 30%),linear-gradient(120deg,#080c12fa,#0b1119f5);padding:clamp(22px,3vw,42px)}.command-grid>section{background:linear-gradient(150deg,#ffffff08,#ffffff04);border-radius:20px}.stream-health-score{display:flex;align-items:end;gap:10px;margin:14px 0 8px}.stream-health-score strong{font-size:3rem;line-height:.9;font-weight:350;color:var(--gold)}.stream-health-score span{font-size:.52rem;letter-spacing:.12em;color:#74808d;padding-bottom:3px}

.settings-kicker{display:block;margin-bottom:8px;color:var(--gold);font-size:.52rem;font-weight:850;letter-spacing:.16em}.settings-select{margin:15px 0 0}.settings-select select{margin-top:5px}.system-heading p{margin-top:7px;max-width:630px}

@media(max-width:1100px) and (min-width:901px){
 .guide-v2-stage{grid-template-columns:minmax(300px,40vw) 1fr}.guide-v2-group{grid-column:1/-1;display:grid;grid-template-columns:160px 1fr auto;gap:12px;align-items:center}.guide-v2-group .eyebrow,.guide-v2-group small{margin:0}.guide-v2-group select{min-height:42px}
 .guide-commandbar{grid-template-columns:auto 1fr}.guide-command-controls{grid-column:1/-1}
}

@media(max-width:900px){
 body{padding-left:0}
 .guide-v2-stage{grid-template-columns:1fr 1fr}.guide-v2-preview{grid-column:1;min-height:0}.guide-v2-focus{grid-column:2}.guide-v2-group{grid-column:1/-1;display:grid;grid-template-columns:140px 1fr auto;gap:10px;align-items:center;padding:13px}.guide-v2-group .eyebrow,.guide-v2-group small{margin:0}.guide-v2-group select{min-height:42px}
 .guide-commandbar{grid-template-columns:auto 1fr}.guide-command-controls{grid-column:1/-1}
}

@media(max-width:700px){
 .guide-v2-stage{display:block;margin:0 0 8px}.guide-v2-preview{position:sticky;top:66px;z-index:34;border-radius:13px;min-height:0}.guide-v2-preview .preview-idle{padding:18px;grid-template-columns:auto 1fr}.guide-v2-preview .preview-play{display:none}.guide-v2-focus{padding:10px 2px 8px}.guide-v2-status{display:none}.guide-v2-focus h1{font-size:1.05rem;white-space:nowrap}.guide-v2-focus>p,.guide-v2-now,.guide-v2-actions{display:none}.guide-v2-group{display:block;padding:0;border:0;background:transparent;box-shadow:none}.guide-v2-group .eyebrow,.guide-v2-group small{display:none}.guide-v2-group select{min-height:42px;font-size:.72rem}
 .guide-v2-body{border-radius:12px;margin:0 -2px}.guide-commandbar{position:sticky;top:calc(66px + 56.25vw);min-height:0;grid-template-columns:auto 1fr;padding:7px;gap:7px}.guide-time-nav button{height:36px;min-height:36px;padding:6px 9px}.guide-time-nav .guide-now-button{font-size:.56rem}.guide-command-meta strong{font-size:.66rem}.guide-command-meta span{font-size:.52rem}.guide-command-controls{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr auto;width:100%}.guide-command-controls label span{display:none}.guide-command-controls select{width:100%;min-width:0;height:37px;min-height:37px;font-size:.61rem}.guide-edit-order{height:37px;min-height:37px;padding:5px 8px;font-size:.58rem}
 .guide-v2-body .guide-scroll{max-height:calc(100dvh - 66px - 56.25vw - 156px);min-height:300px}.guide-v2-body .guide-grid{width:1085px}.guide-v2-body .guide-time>strong,.guide-v2-body .guide-channel{width:190px}.guide-v2-body .guide-time>div,.guide-v2-body .guide-programs{width:895px}.guide-v2-body .guide-time span{width:149.1667px}.guide-v2-body .guide-programs{background:repeating-linear-gradient(90deg,#0b1017 0,#0b1017 148.1667px,#ffffff08 148.1667px,#ffffff08 149.1667px)}.guide-channel-number{width:25px}.guide-channel-name small{display:none}.guide-tune-mark{display:none!important}
 .channel-order-row{grid-template-columns:23px 30px 34px minmax(0,1fr) 32px 32px}.channel-order-row small{display:none}.channel-order-row img,.order-logo{width:32px;height:32px}.order-tools>span{display:none}.order-footer{display:grid;grid-template-columns:1fr 1fr}.order-footer button{width:100%;font-size:.68rem}
 .osd-top{padding:10px}.osd-health{display:none}.osd-clock{display:none}.osd-bottom{padding:20px 12px 11px}.osd-number{min-width:48px;min-height:46px;padding:5px 7px;font-size:1.1rem;border-radius:10px}.osd-number small,.osd-now-label{display:none}.osd-identity{margin-bottom:8px}.osd-identity h2{font-size:.9rem}.osd-program{font-size:.61rem;margin-top:3px}.osd-actions{overflow-x:auto;gap:4px}.osd-actions button{min-width:38px;width:38px;min-height:38px;height:38px;padding:7px;border-radius:10px}.osd-actions button span{display:none}.osd-actions .osd-play{width:43px;height:43px}.osd-progress{margin-top:8px;height:3px}.player-mini-guide{width:92vw}.mini-guide-head{padding:15px 12px}.mini-guide-list{padding:6px}.mini-guide-row{min-height:52px;grid-template-columns:34px 34px minmax(0,1fr) auto;padding:6px}.mini-guide-logo{width:31px;height:31px}
}

/* ============================================================
   TIVILUX 2.1 — LIVE TV REBUILD
   Unified docked player + guide. No floating player over guide.
   ============================================================ */

/* The entire live experience now reads as one surface. */
.guide-v21-stage{
  display:grid;
  grid-template-columns:minmax(500px, 44vw) minmax(0,1fr);
  gap:22px;
  align-items:stretch;
  margin:0 0 16px;
  min-height:300px;
}
.guide-v21-stage .guide-v2-preview{
  min-height:0;
  aspect-ratio:16/9;
  border-radius:18px;
  background:#010204;
  box-shadow:0 26px 90px #000a,inset 0 0 0 1px #ffffff08;
}
.guide-v21-info{
  min-width:0;
  display:flex;
  flex-direction:column;
  justify-content:center;
  padding:18px 4px 16px 2px;
}
.guide-v21-info h1{
  margin:4px 0 8px;
  font-size:clamp(2rem,3vw,3.85rem);
  line-height:.98;
  letter-spacing:-.055em;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.guide-v21-info>p{
  max-width:760px;
  margin:0 0 20px;
  color:#8793a2;
  font-size:.82rem;
  line-height:1.55;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}
.guide-v21-toolbar{
  display:grid;
  grid-template-columns:minmax(230px,1fr) auto auto auto;
  gap:8px;
  align-items:end;
}
.guide-v21-toolbar label{display:flex;flex-direction:column;gap:5px}
.guide-v21-toolbar label>span{font-size:.49rem;font-weight:850;letter-spacing:.15em;color:#687484}
.guide-v21-toolbar select{height:44px;min-height:44px;border-radius:10px;background:#0b1118;font-size:.72rem}
.guide-v21-toolbar button{height:44px;min-height:44px;padding:7px 12px;border-radius:10px;white-space:nowrap;font-size:.66rem;background:#ffffff06}
.guide-v21-toolbar button svg{width:15px;height:15px}
.guide-v21-hint{display:flex;justify-content:space-between;gap:16px;margin-top:10px;color:#566372;font-size:.56rem}

/* CRITICAL 2.0.1 FIX: the old selector targeted .tivimate-preview.
   The 2.x markup uses .guide-v2-preview. Keep the player physically inside it. */
.guide-v2-preview #player-panel.guide-preview-player{
  position:absolute!important;
  inset:0!important;
  width:100%!important;
  height:100%!important;
  max-width:none!important;
  max-height:none!important;
  min-width:0!important;
  border:0!important;
  border-radius:0!important;
  box-shadow:none!important;
  transform:none!important;
  z-index:5!important;
  background:#000!important;
}
.guide-v2-preview #player-panel.guide-preview-player .video-stage{
  position:absolute!important;
  inset:0!important;
  width:100%!important;
  height:100%!important;
  aspect-ratio:auto!important;
  border-radius:0!important;
}
.guide-v2-preview #player-panel.guide-preview-player video{width:100%;height:100%;object-fit:contain}

/* Embedded playback has a restrained TV info bar instead of a full player UI. */
.guide-v2-preview #player-panel.guide-preview-player .player-vignette{
  background:linear-gradient(180deg,#0008 0,transparent 25%,transparent 60%,#000d 100%);
}
.guide-v2-preview #player-panel.guide-preview-player .osd-top{padding:12px}
.guide-v2-preview #player-panel.guide-preview-player .osd-top .live-pill,
.guide-v2-preview #player-panel.guide-preview-player .osd-quality,
.guide-v2-preview #player-panel.guide-preview-player .osd-health{font-size:.47rem;padding:5px 7px}
.guide-v2-preview #player-panel.guide-preview-player .osd-clock{display:none}
.guide-v2-preview #player-panel.guide-preview-player .osd-top-actions .icon-button{width:34px;min-height:34px;height:34px;padding:7px;border-radius:9px;background:#05080ca8}
.guide-v2-preview #player-panel.guide-preview-player .osd-bottom{padding:40px 14px 12px}
.guide-v2-preview #player-panel.guide-preview-player .osd-identity{gap:9px;margin:0}
.guide-v2-preview #player-panel.guide-preview-player .osd-number{min-width:47px;min-height:45px;padding:6px 8px;border-radius:10px;font-size:1rem}
.guide-v2-preview #player-panel.guide-preview-player .osd-number small{font-size:.38rem}
.guide-v2-preview #player-panel.guide-preview-player .osd-now-label{font-size:.4rem}
.guide-v2-preview #player-panel.guide-preview-player .osd-identity h2{font-size:.9rem;letter-spacing:-.02em}
.guide-v2-preview #player-panel.guide-preview-player .osd-program{margin-top:3px;font-size:.55rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:360px}
.guide-v2-preview #player-panel.guide-preview-player .osd-program strong{font-size:.6rem}
.guide-v2-preview #player-panel.guide-preview-player .osd-program span{display:none}
.guide-v2-preview #player-panel.guide-preview-player .osd-actions,
.guide-v2-preview #player-panel.guide-preview-player .osd-progress{display:none!important}
.guide-v2-preview #player-panel.guide-preview-player .player-mini-guide,
.guide-v2-preview #player-panel.guide-preview-player .command-center{display:none!important}

/* Fullscreen restores the complete player interface. */
#player-panel.guide-preview-player:fullscreen{
  position:fixed!important;inset:0!important;width:100vw!important;height:100vh!important;z-index:9999!important;border-radius:0!important
}
#player-panel.guide-preview-player:fullscreen .osd-top{padding:var(--player-edge)}
#player-panel.guide-preview-player:fullscreen .osd-clock{display:inline-block}
#player-panel.guide-preview-player:fullscreen .osd-bottom{padding:54px var(--player-edge) 28px}
#player-panel.guide-preview-player:fullscreen .osd-identity{gap:16px;margin-bottom:20px}
#player-panel.guide-preview-player:fullscreen .osd-number{min-width:72px;min-height:68px;padding:8px 12px;border-radius:15px;font-size:1.65rem}
#player-panel.guide-preview-player:fullscreen .osd-identity h2{font-size:clamp(1.4rem,2.4vw,2.55rem)}
#player-panel.guide-preview-player:fullscreen .osd-program{margin-top:7px;font-size:.72rem;max-width:none}
#player-panel.guide-preview-player:fullscreen .osd-program strong{font-size:.8rem}
#player-panel.guide-preview-player:fullscreen .osd-program span{display:inline}
#player-panel.guide-preview-player:fullscreen .osd-actions{display:flex!important}
#player-panel.guide-preview-player:fullscreen .osd-progress{display:block!important}
#player-panel.guide-preview-player:fullscreen .player-mini-guide{display:flex!important}
#player-panel.guide-preview-player:fullscreen .player-mini-guide[hidden],
#player-panel.guide-preview-player:fullscreen .command-center[hidden]{display:none!important}
#player-panel.guide-preview-player:fullscreen .command-center:not([hidden]){display:block!important}

/* Guide: prioritize readability over squeezing too much time onto screen. */
.guide-v2-body{border-radius:16px;box-shadow:0 20px 70px #0006}
.guide-commandbar{min-height:64px;padding:9px 12px;gap:12px;background:#101720}
.guide-command-meta span{font-size:.58rem}
.guide-command-controls{gap:6px}
.guide-v2-body .guide-scroll{max-height:calc(100dvh - 410px);min-height:455px}
.guide-v2-body .guide-grid{width:1420px}
.guide-v2-body .guide-time>strong,.guide-v2-body .guide-channel{width:300px}
.guide-v2-body .guide-time>div,.guide-v2-body .guide-programs{width:1120px}
.guide-v2-body .guide-time span{width:280px;padding:17px 14px}
.guide-v2-body .guide-programs{background:repeating-linear-gradient(90deg,#0b1017 0,#0b1017 279px,#ffffff08 279px,#ffffff08 280px)}
.guide-v2-body .guide-row{height:78px}
.guide-v2-body .guide-channel{padding:9px 13px}
.guide-v2-body .guide-channel>.art{width:40px;height:40px}
.guide-channel-name strong{font-size:.78rem}
.guide-v2-body .guide-program{top:6px;bottom:6px;padding:9px 12px;border-radius:8px}
.guide-v2-body .guide-program strong{font-size:.78rem}
.guide-v2-body .guide-program span{font-size:.57rem}

/* Make guide controls feel like a TV toolbar, not a web form. */
.guide-command-controls label{display:flex;flex-direction:column;gap:4px}
.guide-command-controls select{background:#0a0f15;border-color:#ffffff11}
.guide-edit-order{background:#ffffff08}
.guide-time-nav button{background:#ffffff06}
.guide-time-nav .guide-now-button{box-shadow:0 6px 22px #e7c58d1d}

/* Better focus language for TV remotes / keyboard. */
.guide-v2-body .guide-channel:focus-visible,
.guide-v2-body .guide-program:focus-visible,
.guide-commandbar button:focus-visible,
.guide-commandbar select:focus-visible,
.guide-v21-toolbar button:focus-visible,
.guide-v21-toolbar select:focus-visible{outline:2px solid var(--gold);outline-offset:-2px;box-shadow:0 0 0 4px #e7c58d16}

@media(max-width:1180px) and (min-width:701px){
  .guide-v21-stage{grid-template-columns:minmax(410px,46vw) minmax(0,1fr)}
  .guide-v21-toolbar{grid-template-columns:1fr auto auto}.guide-v21-toolbar button[data-action="manage-channel-order"]{display:none}
  .guide-v2-body .guide-scroll{max-height:calc(100dvh - 390px)}
}

@media(max-width:700px){
  .guide-v21-stage{display:block;min-height:0;margin-bottom:8px}
  .guide-v21-stage .guide-v2-preview{position:sticky;top:66px;z-index:34;border-radius:12px}
  .guide-v21-info{padding:9px 1px 6px}
  .guide-v21-info .guide-v2-status,.guide-v21-info>p,.guide-v21-hint{display:none}
  .guide-v21-info h1{font-size:1rem;margin:0 0 7px}
  .guide-v21-toolbar{grid-template-columns:1fr auto auto;gap:5px}
  .guide-v21-toolbar label>span{display:none}
  .guide-v21-toolbar select,.guide-v21-toolbar button{height:38px;min-height:38px;font-size:.6rem;padding:6px 8px}
  .guide-v21-toolbar button[data-action="manage-channel-order"]{display:none}
  .guide-commandbar{top:calc(66px + 56.25vw);grid-template-columns:auto 1fr;padding:6px}
  .guide-v2-body .guide-scroll{max-height:calc(100dvh - 66px - 56.25vw - 128px);min-height:300px}
  .guide-v2-body .guide-grid{width:1030px}
  .guide-v2-body .guide-time>strong,.guide-v2-body .guide-channel{width:190px}
  .guide-v2-body .guide-time>div,.guide-v2-body .guide-programs{width:840px}
  .guide-v2-body .guide-time span{width:280px}
  .guide-v2-body .guide-programs{background:repeating-linear-gradient(90deg,#0b1017 0,#0b1017 279px,#ffffff08 279px,#ffffff08 280px)}
  .guide-v2-preview #player-panel.guide-preview-player .osd-health{display:none}
  .guide-v2-preview #player-panel.guide-preview-player .osd-bottom{padding:30px 8px 8px}
  .guide-v2-preview #player-panel.guide-preview-player .osd-number{min-width:38px;min-height:36px;font-size:.82rem}
  .guide-v2-preview #player-panel.guide-preview-player .osd-program{display:none}
}

/* ==========================================================
   TIVILUX 2.2 — GUIDE PRO
   Less chrome. More television. Real channel management.
   ========================================================== */
.live-view .app-main{padding-top:10px}
.guide-v22-stage{display:grid;grid-template-columns:minmax(320px,390px) minmax(0,1fr);gap:18px;align-items:stretch;margin:0 0 10px;min-height:204px;max-height:226px}
.guide-v22-preview{min-width:0}
.guide-v22-stage .guide-v2-preview{height:100%;min-height:204px;aspect-ratio:auto;border-radius:12px;background:#020304;border:1px solid #ffffff10;box-shadow:0 18px 55px #0008;overflow:hidden}
.guide-v22-now{min-width:0;display:flex;flex-direction:column;justify-content:center;padding:12px 8px 12px 2px}
.guide-v22-topline{display:flex;align-items:center;gap:10px;font-size:.64rem;font-weight:750;letter-spacing:.06em;color:#7f8b9a;text-transform:uppercase;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.guide-live-badge{display:inline-flex;align-items:center;gap:6px;color:#f1d29c}.guide-live-badge i{width:7px;height:7px;border-radius:99px;background:#e5414f;box-shadow:0 0 0 4px #e5414f18}
.guide-v22-now h1{margin:8px 0 4px;font-size:clamp(1.5rem,2.4vw,2.35rem);letter-spacing:-.045em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.guide-v22-now>p{margin:0;color:#758292;font-size:.72rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.guide-v22-actions{display:flex;gap:7px;align-items:end;margin-top:15px;min-width:0}.guide-v22-actions label{display:flex;flex-direction:column;gap:5px;min-width:190px;max-width:320px;flex:1}.guide-v22-actions label>span{font-size:.48rem;letter-spacing:.16em;font-weight:850;color:#657180}.guide-v22-actions select,.guide-v22-actions button{height:42px;min-height:42px;border-radius:9px;background:#0b1118;border:1px solid #ffffff11;font-size:.68rem}.guide-v22-actions button{display:flex;align-items:center;gap:6px;padding:7px 11px;white-space:nowrap}.guide-v22-actions button svg{width:15px;height:15px}

.guide-v22-body{border-radius:12px;overflow:hidden;border:1px solid #ffffff0d;background:#090d12;box-shadow:0 24px 70px #0007}
.guide-v22-body .guide-commandbar{min-height:54px;padding:7px 10px;background:#0d131b;border-bottom:1px solid #ffffff0d}
.guide-v22-body .guide-command-meta strong{font-size:.72rem}.guide-v22-body .guide-command-meta span{font-size:.52rem}
.guide-v22-body .guide-command-controls label>span{font-size:.43rem}.guide-v22-body .guide-command-controls select,.guide-v22-body .guide-command-controls button{height:34px;min-height:34px;font-size:.58rem;padding:5px 8px}
.guide-v22-body .guide-scroll{max-height:calc(100dvh - 310px);min-height:480px;border:0;border-radius:0;background:#090e14}
.guide-v22-body .guide-grid{width:1480px}
.guide-v22-body .guide-time>strong{width:280px;padding:13px 14px;background:#121923}
.guide-v22-body .guide-time>div,.guide-v22-body .guide-programs{width:1200px}
.guide-v22-body .guide-time span{width:300px;padding:13px 14px}
.guide-v22-body .guide-programs{background:repeating-linear-gradient(90deg,#0b1118 0,#0b1118 299px,#ffffff08 299px,#ffffff08 300px)}
.guide-v22-body .guide-row{height:72px;background:#090e14}
.guide-channel-shell{width:280px;flex:none;position:sticky;left:0;z-index:6;display:grid;grid-template-columns:minmax(0,1fr) 34px;background:#101720;border-right:1px solid #ffffff10}
.guide-v22-body .guide-channel{position:relative;left:auto;width:auto!important;min-width:0;background:transparent;border:0!important;padding:8px 6px 8px 10px;gap:9px}
.guide-v22-body .guide-channel>.art{width:38px;height:38px;border-radius:7px;background:#0a0e13}
.guide-v22-body .guide-channel-number{min-width:31px!important;width:31px!important;font-variant-numeric:tabular-nums;text-align:right;color:#dfc188!important;font-weight:800!important;font-size:.64rem!important;display:block!important;overflow:visible!important}
.guide-v22-body .guide-channel-name{min-width:0;display:block!important;overflow:hidden!important}.guide-v22-body .guide-channel-name strong{font-size:.74rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block}.guide-v22-body .guide-channel-name small{font-size:.48rem;color:#5e6b7b;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:2px}
.guide-v22-body .guide-tune-mark{display:none!important}
.guide-channel-more{width:34px;min-width:34px;min-height:100%;height:auto;border:0;border-radius:0;background:transparent;color:#536172;padding:0;font-size:.72rem;letter-spacing:1px;opacity:.22}.guide-channel-shell:hover .guide-channel-more,.guide-channel-more:focus-visible{opacity:1;color:#e3c38c;background:#ffffff05}
.guide-v22-body .guide-program{top:5px;bottom:5px;border-radius:6px;padding:8px 11px;background:#141c26;border:1px solid #ffffff08}.guide-v22-body .guide-program:hover{background:#1a2531;border-color:#ffffff18}.guide-v22-body .guide-program.on-air{background:linear-gradient(135deg,#392e1d,#211c16);border-color:#d9b97855}.guide-v22-body .guide-program.on-air:before{content:'LIVE';font-size:.39rem;font-weight:900;letter-spacing:.12em;color:#e4c587;margin-bottom:2px}.guide-v22-body .guide-program strong{font-size:.73rem}.guide-v22-body .guide-program span{font-size:.5rem;color:#707f90}

/* Channel editor */
#channel-edit-form{display:grid;gap:14px}#channel-edit-form label:not(.check){display:grid;gap:7px;color:#aab4c1;font-size:.72rem}#channel-edit-form input{min-height:48px;border-radius:10px;background:#0b1118}.channel-hide-check{padding:13px 14px;border:1px solid #ffffff0d;background:#0b1118;border-radius:10px}.channel-editor-note{font-size:.67rem;color:#647181;padding:2px 1px 6px}

/* Embedded preview should be almost invisible until the viewer asks for controls. */
.guide-v22-stage .guide-v2-preview #player-panel.guide-preview-player .osd-top{opacity:0;transition:opacity .18s}.guide-v22-stage .guide-v2-preview #player-panel.guide-preview-player:hover .osd-top,.guide-v22-stage .guide-v2-preview #player-panel.guide-preview-player.osd-visible .osd-top{opacity:1}.guide-v22-stage .guide-v2-preview #player-panel.guide-preview-player .osd-bottom{background:linear-gradient(transparent,#000c);padding:40px 12px 10px}.guide-v22-stage .guide-v2-preview #player-panel.guide-preview-player .osd-number{display:none}.guide-v22-stage .guide-v2-preview #player-panel.guide-preview-player .osd-now-label{display:none}.guide-v22-stage .guide-v2-preview #player-panel.guide-preview-player .osd-identity h2{font-size:.78rem}.guide-v22-stage .guide-v2-preview #player-panel.guide-preview-player .osd-program{display:none}.guide-v22-stage .guide-v2-preview #player-panel.guide-preview-player .osd-actions,.guide-v22-stage .guide-v2-preview #player-panel.guide-preview-player .osd-progress{display:none!important}

/* Fullscreen: cinematic, minimal OSD instead of a dashboard. */
#player-panel:fullscreen{background:#000!important}#player-panel:fullscreen .lux-osd{background:linear-gradient(180deg,#0008 0,transparent 24%,transparent 58%,#000d 100%)}#player-panel:fullscreen .osd-top{padding:24px 30px}#player-panel:fullscreen .osd-bottom{padding:100px 34px 28px}#player-panel:fullscreen .osd-identity{max-width:850px;margin-bottom:22px}#player-panel:fullscreen .osd-number{background:#0c1118d9;border-color:#ffffff18}#player-panel:fullscreen .osd-now-label{color:#d9b978}#player-panel:fullscreen .osd-actions{gap:9px}#player-panel:fullscreen .osd-actions button{background:#101720d9;border:1px solid #ffffff12;backdrop-filter:blur(12px)}#player-panel:fullscreen .osd-actions button:hover,#player-panel:fullscreen .osd-actions button:focus-visible{background:#e4c58d;color:#16120d}#player-panel:fullscreen .osd-play{transform:scale(1.08)}

@media(max-width:1180px) and (min-width:701px){.guide-v22-stage{grid-template-columns:minmax(300px,40vw) minmax(0,1fr)}.guide-v22-actions button span{display:none}.guide-v22-body .guide-scroll{max-height:calc(100dvh - 300px)}}
@media(max-width:700px){.guide-v22-stage{display:block;max-height:none;min-height:0;margin-bottom:7px}.guide-v22-stage .guide-v2-preview{position:sticky;top:66px;z-index:35;width:100%;min-height:0;aspect-ratio:16/9;border-radius:10px}.guide-v22-now{padding:7px 0 4px}.guide-v22-topline,.guide-v22-now>p{display:none}.guide-v22-now h1{font-size:.92rem;margin:2px 0 6px}.guide-v22-actions{margin:0;gap:5px}.guide-v22-actions label{min-width:0;max-width:none}.guide-v22-actions label>span{display:none}.guide-v22-actions select,.guide-v22-actions button{height:38px;min-height:38px;font-size:.58rem;padding:5px 7px}.guide-v22-actions button span{display:none}.guide-v22-actions button[data-action="manage-channel-order"]{display:none}.guide-v22-body .guide-commandbar{top:calc(66px + 56.25vw);min-height:44px}.guide-v22-body .guide-command-meta{display:none}.guide-v22-body .guide-scroll{max-height:calc(100dvh - 66px - 56.25vw - 100px);min-height:330px}.guide-v22-body .guide-grid{width:1120px}.guide-v22-body .guide-time>strong,.guide-channel-shell{width:200px}.guide-v22-body .guide-time>div,.guide-v22-body .guide-programs{width:920px}.guide-v22-body .guide-time span{width:230px}.guide-v22-body .guide-programs{background:repeating-linear-gradient(90deg,#0b1118 0,#0b1118 229px,#ffffff08 229px,#ffffff08 230px)}.guide-v22-body .guide-row{height:62px}.guide-v22-body .guide-channel>.art{width:31px;height:31px}.guide-v22-body .guide-channel-number{min-width:26px!important;width:26px!important;font-size:.57rem!important}.guide-v22-body .guide-channel-name strong{font-size:.64rem}.guide-v22-body .guide-program strong{font-size:.64rem}.guide-channel-shell{grid-template-columns:minmax(0,1fr) 28px}.guide-channel-more{width:28px;min-width:28px;opacity:.65}}
