/* TiviLux 2.5 MAX — phone experience. This is intentionally not a compressed desktop layout. */
@media (max-width:700px){
 body{--phone-bar:72px;background:#05070a;padding:0 0 calc(var(--phone-bar) + env(safe-area-inset-bottom))!important}
 #header{height:58px!important;left:0!important;right:0!important;top:0!important;padding:env(safe-area-inset-top) 16px 0!important;display:flex!important;flex-direction:row!important;border:0!important;border-bottom:1px solid #1b2028!important;background:rgba(5,7,10,.94)!important;backdrop-filter:blur(24px)}
 #header .brand-link{font-size:21px!important;min-height:auto!important;padding:0!important}#header .brand-link small,#header>nav{display:none!important}.header-right{margin-left:auto!important;display:flex!important;gap:8px}.header-right .icon-button span{display:none}.header-right .icon-button{width:38px;height:38px;border-radius:50%}.header-right .avatar{width:38px;height:38px}
 #main{margin:0!important;padding:calc(68px + env(safe-area-inset-top)) 12px 14px!important;min-height:100vh!important}
 #mobile-nav{position:fixed!important;left:10px!important;right:10px!important;bottom:calc(8px + env(safe-area-inset-bottom))!important;height:62px!important;border:1px solid #252b35!important;border-radius:22px!important;background:rgba(12,15,20,.94)!important;backdrop-filter:blur(24px);padding:5px!important;z-index:9000;display:grid!important;grid-template-columns:repeat(6,minmax(0,1fr))!important;gap:2px!important;box-shadow:0 20px 50px #0009;overflow:hidden!important}
 #mobile-nav a{min-width:0!important;width:100%!important;border-radius:15px!important;display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:2px!important;padding:3px 1px!important;font-size:9px!important;color:#87909f!important;overflow:hidden!important}#mobile-nav a span{max-width:100%!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}#mobile-nav a svg{width:19px!important;height:19px!important;flex:none!important}#mobile-nav a.active{background:var(--gold,#d4af7a)!important;color:var(--theme-on-accent,#090a0d)!important}
 .guide-v22-stage{display:block!important;margin:0!important;padding:0!important}.guide-v22-preview{position:sticky!important;top:calc(58px + env(safe-area-inset-top))!important;z-index:45!important;width:100%!important;aspect-ratio:16/9!important;border-radius:18px!important;overflow:hidden!important;background:#090c11!important;box-shadow:0 12px 36px #000b!important}.guide-v22-now{padding:15px 2px 8px!important}.guide-v22-now h1{font-size:25px!important;margin:6px 0!important}.guide-v22-now p{font-size:13px!important;margin:0 0 12px!important}.guide-v22-actions{display:grid!important;grid-template-columns:1fr auto auto!important;gap:7px!important}.guide-v22-actions button{min-height:44px!important;padding:0 12px!important}.guide-v22-actions button span{display:none}.guide-group-select{grid-column:1/-1!important}.guide-group-select select{height:46px!important;width:100%!important;font-size:15px!important}
 .guide-commandbar{position:relative!important;top:auto!important;z-index:20!important;display:flex!important;flex-wrap:wrap!important;padding:10px!important;border-radius:16px!important;background:#0b0e13f2!important;backdrop-filter:blur(18px)}.guide-command-meta{order:-1;width:100%!important}.guide-command-meta strong{font-size:17px!important}.guide-command-meta span{font-size:10px!important}.guide-command-controls{display:none!important}.guide-time-nav{width:100%;display:grid!important;grid-template-columns:48px 1fr 48px!important;gap:7px}.guide-time-nav button{height:42px!important}.guide-time-nav .guide-now-button{position:static!important;inset:auto!important;transform:none!important;margin:0!important}
 .guide-scroll{height:auto!important;max-height:none!important;overflow:visible!important;background:transparent!important;border:0!important}.guide-grid{min-width:0!important;width:100%!important}.guide-time{display:none!important}.guide-row{display:block!important;margin:8px 0!important;border:1px solid #1f2630!important;border-radius:17px!important;overflow:hidden!important;background:#0c1016!important;min-height:0!important}.guide-channel-shell{width:100%!important;display:grid!important;grid-template-columns:minmax(0,1fr) 44px 44px!important;border:0!important}.guide-channel{height:68px!important;width:100%!important;padding:8px 10px!important}.guide-channel-number{width:42px!important;color:#d4af7a!important}.guide-channel img{width:38px!important;height:38px!important}.guide-channel-name strong{font-size:14px!important}.guide-channel-favorite,.guide-channel-more{width:44px!important;border-left:1px solid #202733!important;display:grid!important;place-items:center!important}.guide-channel-favorite{font-size:26px!important;color:#9aa5b4!important}.guide-channel-favorite.is-favorite{color:#efc986!important}.guide-programs{position:relative!important;left:auto!important;width:840px!important;height:64px!important;overflow:hidden!important;border-top:1px solid #1e2530!important;background:#080b10!important}.guide-row{overflow-x:auto!important;scrollbar-width:none}.guide-row::-webkit-scrollbar{display:none}.guide-program{top:6px!important;height:52px!important;border-radius:10px!important}.guide-program strong{font-size:12px!important}.guide-program span{font-size:9px!important}
 #player-panel.guide-preview-player{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;z-index:3!important;border-radius:0!important}.guide-preview-player .lux-osd{display:block!important}.guide-preview-player .osd-top{padding:8px!important}.guide-preview-player .osd-top .live-pill,.guide-preview-player .osd-quality,.guide-preview-player .osd-health,.guide-preview-player .osd-clock{display:none!important}.guide-preview-player .osd-top-actions{margin-left:auto!important}.guide-preview-player .osd-top-actions .icon-button{display:grid!important;width:38px!important;height:38px!important;min-height:38px!important}.guide-preview-player .osd-bottom{padding:0 8px 8px!important}.guide-preview-player .osd-identity{display:none!important}.guide-preview-player .osd-actions{display:flex!important;justify-content:center!important;gap:6px!important;overflow:visible!important}.guide-preview-player .osd-actions button{display:grid!important;place-items:center!important;min-width:38px!important;width:38px!important;height:38px!important;min-height:38px!important;padding:8px!important;border-radius:12px!important;background:#070a0ed9!important;pointer-events:auto!important}.guide-preview-player .osd-actions button span{display:none!important}.guide-preview-player .osd-actions .osd-play{width:44px!important;height:44px!important}.guide-preview-player .osd-progress{display:block!important;margin-top:5px!important}.guide-preview-player:not(.osd-visible) .lux-osd{opacity:0!important}.guide-preview-player.osd-visible .lux-osd{opacity:1!important}.guide-preview-player .player-message{font-size:12px!important}.guide-preview-player video{object-fit:contain!important}
 #player-panel.live-player:not(.guide-preview-player){position:fixed!important;inset:0!important;width:100vw!important;height:100dvh!important;z-index:12000!important;background:#000!important}.live-player .osd-top{padding:calc(12px + env(safe-area-inset-top)) 14px 0!important}.live-player .osd-bottom{padding:0 12px calc(18px + env(safe-area-inset-bottom))!important}.live-player .osd-identity h2{font-size:24px!important}.live-player .osd-actions{display:grid!important;grid-template-columns:repeat(6,1fr)!important;gap:5px!important}.live-player .osd-actions button{min-width:0!important;padding:9px 4px!important}.live-player .osd-actions button span{font-size:8px!important}.live-player .command-center{inset:auto 8px calc(8px + env(safe-area-inset-bottom))!important;max-height:72dvh!important;border-radius:24px!important;overflow:auto!important}.command-grid{grid-template-columns:1fr!important}
 .auth-layout{display:block!important}.auth-story{display:none!important}.auth-card{width:100%!important;max-width:none!important;border-radius:26px!important;padding:26px 20px!important}.auth-wordmark{margin:10vh auto 28px!important;text-align:center!important}.auth-footer{display:none!important}
 .home-hero,.hero{border-radius:22px!important}.rail{overflow-x:auto!important;scroll-snap-type:x proximity}.media-card{min-width:72vw!important;scroll-snap-align:start}
 dialog{width:calc(100vw - 16px)!important;max-width:none!important;max-height:82dvh!important;margin:auto 8px 8px!important;border-radius:26px 26px 18px 18px!important;align-self:end!important}.provider-presets{display:grid;gap:8px;margin:10px 0 16px}.provider-preset{display:flex!important;align-items:center;gap:10px;padding:13px;border:1px solid #252c36;border-radius:15px;background:#0c1015}.provider-preset input{accent-color:#d4af7a}.provider-preset span{display:grid}.provider-preset small{color:#8b95a4}
}
@media (max-width:700px) and (orientation:landscape){body.fullscreen-landscape #header,body.fullscreen-landscape #mobile-nav{display:none!important}body.fullscreen-landscape #main{padding:0!important}body.fullscreen-landscape .guide-v22-stage{display:none!important}body.fullscreen-landscape #player-panel.live-player{position:fixed!important;inset:0!important;width:100vw!important;height:100dvh!important;z-index:12000!important}}

/* 2.8.4 — make Favorites impossible to miss on touch layouts */
@media(max-width:700px){
 .guide-channel-shell{grid-template-columns:minmax(0,1fr) 68px 38px!important}
 .guide-channel-favorite{width:68px!important;min-width:68px!important;display:flex!important;flex-direction:column!important;gap:1px!important;align-items:center!important;justify-content:center!important;font-size:22px!important;font-weight:800!important}
 .guide-channel-favorite .fav-glyph{line-height:1!important}
 .guide-channel-favorite .fav-label{display:block!important;font-size:8px!important;letter-spacing:.12em!important;color:#8895a6!important}
 .guide-channel-favorite.is-favorite .fav-label{color:#efc986!important}
 .guide-favorites-link{height:44px!important;min-width:48px!important;display:flex!important;align-items:center!important;justify-content:center!important;gap:5px!important;padding:0 11px!important;border:1px solid #ffffff16!important;border-radius:10px!important;background:#0b1118!important;color:#d7dde7!important;text-decoration:none!important}
 .guide-favorites-link svg{width:17px!important;height:17px!important;color:#efc986!important}
 .guide-favorites-link span{display:none!important}
}


/* ============================================================
   TiviLux 2.8.5 — MOBILE PLAYER DOCK
   Keep the live preview in the viewport while the guide scrolls.
   The old sticky preview was constrained by .guide-v22-stage,
   so iOS correctly "unstuck" it when that short parent scrolled out.
   ============================================================ */
@media (max-width:700px){
  /* Remove the short containing block that was ejecting the sticky player. */
  .guide-v22-stage{
    display:contents!important;
  }

  /* The video is now docked to the application header for the whole guide. */
  .guide-v22-preview{
    position:sticky!important;
    top:calc(58px + env(safe-area-inset-top))!important;
    z-index:80!important;
    width:100%!important;
    aspect-ratio:16/9!important;
    margin:0 0 8px!important;
    border:1px solid #ffffff12!important;
    border-radius:14px!important;
    overflow:hidden!important;
    background:#020407!important;
    box-shadow:0 14px 38px #000c!important;
    isolation:isolate!important;
    transform:translateZ(0);
    -webkit-transform:translateZ(0);
  }

  .guide-v22-preview .guide-v2-preview{
    position:absolute!important;
    inset:0!important;
    width:100%!important;
    height:100%!important;
    min-height:0!important;
    aspect-ratio:auto!important;
    border:0!important;
    border-radius:0!important;
  }

  /* Channel/category controls remain normal document content beneath the dock. */
  .guide-v22-now{
    position:relative!important;
    z-index:12!important;
    padding:7px 0 6px!important;
    background:#05070a!important;
  }

  /* The guide itself scrolls normally underneath the persistent player. */
  .guide-v22-body{
    position:relative!important;
    z-index:10!important;
  }

  /* LIVE NOW was a desktop time-navigation control and became a floating
     obstruction in the phone card guide. Remove it from the phone UI. */
  .guide-time-nav .guide-now-button{
    display:none!important;
  }
  .guide-time-nav{
    grid-template-columns:1fr 1fr!important;
  }

  /* Never let bottom navigation cover the last guide rows. */
  .guide-v22-body .guide-scroll{
    padding-bottom:calc(86px + env(safe-area-inset-bottom))!important;
  }

  /* iOS compositor stability for HLS video inside a sticky element. */
  #player-panel.guide-preview-player,
  #player-panel.guide-preview-player video{
    -webkit-transform:translateZ(0);
    transform:translateZ(0);
    backface-visibility:hidden;
  }
}

@media(max-width:700px){
  .search-channel-favorite{
    top:8px!important;
    right:8px!important;
    width:40px!important;
    height:40px!important;
    min-height:40px!important;
    border-radius:50%!important;
  }
  .search-channel-favorite .fav-glyph{
    font-size:24px!important;
  }
}


/* TiviLux 3.2.5.3 — six-slot mobile navigation */
@media(max-width:390px){
 #mobile-nav{left:6px!important;right:6px!important;padding:4px!important;gap:1px!important}
 #mobile-nav a{font-size:8px!important;gap:1px!important}
 #mobile-nav a svg{width:18px!important;height:18px!important}
}
