/* PatchTV 3.8.1 design pass ("wood chipper"). Loaded LAST on every page.
   Rules: no inline styles (CSP), no layout animation (CLS 0), fixed footprints for async content,
   system fonts only, one accent (lime) for play actions, brand colours for channel art. */
:root{--ptv-live:#ff4d5e;--ptv-ink-2:#c9d2df;--ptv-ink-3:#8f99ab;--ptv-plate:#f4f6f9}

/* ---------- Motion budget: no continuous repaint work during first paint ---------- */
/* The aurora keeps its look but no longer animates (an animated blurred 1400 px layer repainted every frame on phones without GPU raster). */
.home-page main::before{animation:none!important;opacity:.9}
/* The 280 ms page fade-in on <main> hid the hero headline (the LCP element) for ~300 ms after first paint. */
.home-page main#main-content{animation:none!important}
/* Skeleton shimmer animated background-position on ~28 tiles (a full repaint per frame); now a cheap opacity breathe on the first rail only. */
.home-page .rail-track>.rail-skeleton{animation:none!important}
@media(prefers-reduced-motion:no-preference){.home-page #rail-live .rail-track>.rail-skeleton{animation:ptv381-breathe 1.4s ease-in-out infinite alternate!important}}
@keyframes ptv381-breathe{from{opacity:.55}to{opacity:1}}

/* ---------- Header: one primary action per screen; Import is secondary ---------- */
.header-actions .add-channel-link{background:transparent!important;color:#dfe6ee!important;border:1px solid rgba(255,255,255,.18)!important;box-shadow:none!important;font-weight:700!important}
.header-actions .add-channel-link:hover{border-color:rgba(255,255,255,.4)!important;filter:none!important}
/* Help launcher never covers tiles, CTAs or the player: a quiet 44 px circle everywhere */
.assistant-launcher{width:44px!important;height:44px!important;padding:0!important;border-radius:50%!important;font-size:0!important;opacity:.85;right:16px!important;background:#16201e!important;border-color:rgba(143,216,195,.45)!important}
.assistant-launcher::before{content:"?";font-size:19px;font-weight:800;line-height:42px}
/* Phones: smaller and parked in the gap above the tab bar, clear of the first channel row */
@media(max-width:680px){.assistant-launcher{right:8px!important;width:36px!important;height:36px!important;bottom:calc(75px + env(safe-area-inset-bottom))!important}.assistant-launcher::before{font-size:16px;line-height:34px}}

/* ---------- Hero: tighter, readable, one obvious play target ---------- */
#free-tv-hero h1 span{display:inline}
#free-tv-hero .free-hero-lede{font-size:15px;color:#c3d0c7}
#free-tv-hero .free-hero-primary{display:inline-flex;align-items:center}
#free-tv-hero .free-hero-actions a.free-hero-primary{width:270px}
#free-tv-hero [data-hero-watch-label]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#free-tv-hero .free-play-ico{width:16px;height:16px;flex:0 0 16px}
#free-tv-hero .free-live-badge{display:inline-flex;align-items:center;gap:6px;color:#ffd7a3;animation:none}
#free-tv-hero .free-live-badge i{position:relative;width:7px;height:7px;border-radius:50%;background:var(--ptv-live)}
#free-tv-hero .free-live-badge i::after{content:"";position:absolute;inset:0;border-radius:50%;background:var(--ptv-live);opacity:0}
/* Compositor-only pulse (transform + opacity), never box-shadow repaint inside the blurred glass panel */
@media(prefers-reduced-motion:no-preference){#free-tv-hero .free-live-badge i::after{animation:ptv381-pulse 2.4s ease-out infinite}}
@keyframes ptv381-pulse{0%{transform:scale(1);opacity:.6}80%,100%{transform:scale(2.6);opacity:0}}
#free-tv-hero .free-hero-logo{background:linear-gradient(150deg,var(--brand,#2d3b33),color-mix(in srgb,var(--brand,#2d3b33) 40%,#070910))}
#free-tv-hero .free-hero-logo.logo-ready{background:var(--ptv-plate)}
#free-tv-hero .free-hero-logo>span{color:var(--brand-ink,#fff)!important;letter-spacing:-.03em}
#free-tv-hero .free-hero-logo>span.is-long{font-size:22px!important}
#free-tv-hero .free-slide-copy{gap:6px}
#free-tv-hero .free-slide-progress{display:block;height:3px;border-radius:3px;background:rgba(255,255,255,.14);overflow:hidden}
#free-tv-hero .free-slide-progress i{display:block;height:100%;width:100%;background:linear-gradient(90deg,#c5ef80,#edb564);transform-origin:left;transform:scaleX(0)}
#free-tv-hero .free-slide-progress.is-empty{visibility:hidden}
#free-tv-hero .free-slide-play{width:56px;height:56px;border:0;background:#c5ef80;color:#16200d;box-shadow:0 10px 26px -10px rgba(197,239,128,.8)}
#free-tv-hero .free-slide-play svg{width:22px;height:22px;margin-left:3px}
#free-tv-hero .free-hero-slide:hover .free-slide-play,#free-tv-hero .free-hero-slide:focus-visible .free-slide-play{background:#d6f79c}
#free-tv-hero .free-hero-stats{color:#9fb3a5;font-size:11px}
#free-tv-hero .free-panel-chrome{font-size:11px}
#free-tv-hero .free-panel-dots{font-size:11px}
#free-tv-hero .free-hero-stats b{color:#eef5e6}
#free-tv-hero [data-hero-now]{font-size:13px;color:#d6e2d2}
#free-tv-hero [data-hero-now].is-muted{color:#93a492}
@media(max-width:600px){
  .home-page #free-tv-hero{height:404px;grid-template-rows:164px 200px;gap:12px;padding:14px}
  #free-tv-hero .free-hero-top{height:32px}
  #free-tv-hero .free-hero-top>.eyebrow{display:none}
  #free-tv-hero h1{font-size:26px;line-height:1.1;height:86px;margin:8px 0 0;letter-spacing:-.03em}
  #free-tv-hero .free-hero-lede{height:22px;font-size:13px;line-height:20px;margin:4px 0 0}
  #free-tv-hero .free-hero-actions{height:42px;margin-top:6px;gap:8px}
  #free-tv-hero .free-hero-actions a,#free-tv-hero .free-hero-actions a:first-child{font-size:13px;border-radius:11px;padding:0 12px}
  #free-tv-hero .free-hero-actions a.free-hero-primary{width:auto;flex:1 1 auto;min-width:0}
  #free-tv-hero .free-hero-actions a.free-hero-secondary{width:auto;flex:0 0 auto}
  #free-tv-hero .free-hero-panel{height:164px}
  #free-tv-hero .free-panel-chrome{height:28px;padding:6px 12px;font-size:11px}
  #free-tv-hero .free-panel-dots{display:none}
  #free-tv-hero .free-hero-slide{height:84px;padding:10px 12px;gap:12px}
  #free-tv-hero .free-hero-logo{width:72px;height:62px}
  #free-tv-hero .free-hero-logo>span{font-size:20px!important}
  #free-tv-hero .free-hero-logo>span.is-long{font-size:14px!important}
  #free-tv-hero [data-hero-channel]{font-size:17px}
  #free-tv-hero [data-hero-now]{font-size:12px;height:17px;-webkit-line-clamp:1}
  #free-tv-hero .free-slide-play{width:44px;height:44px}
  #free-tv-hero .free-slide-play svg{width:18px;height:18px}
  #free-tv-hero .free-hero-steps{height:18px}
  #free-tv-hero .free-hero-steps button{height:18px;min-height:18px}
  #free-tv-hero .free-hero-steps button::before,#free-tv-hero .free-hero-steps button::after{top:7px}
  #free-tv-hero .free-hero-stats{height:34px;font-size:11px;padding:3px 8px;line-height:1.25}
  #free-tv-hero .free-hero-stats b{font-size:13px}
}

/* ---------- Rails: brand-coloured channel art, logo plates, honest now/next ---------- */
/* One tile size per breakpoint for every live rail (Popular used to be smaller than the rest). */
@media(min-width:901px){
  .home-page .home-rail:not(.movies-rail) .rail-track{grid-auto-columns:236px!important}
  .home-page #rail-live>.rail-track{height:216px}
}
@media(max-width:600px){.home-page .home-rail:not(.movies-rail) .rail-track{grid-auto-columns:158px!important}}
.home-page .home-rail h2{font-weight:800}
.home-page .rail-art[data-brand]{background:radial-gradient(120% 100% at 50% 0%,rgba(255,255,255,.2),transparent 62%),linear-gradient(150deg,var(--brand),color-mix(in srgb,var(--brand) 36%,#070910))!important}
.home-page .rail-art[data-brand] i{color:var(--brand-ink)!important;font-weight:850;font-size:clamp(28px,14cqw,50px)!important;letter-spacing:-.035em;text-shadow:0 3px 14px rgba(0,0,0,.25)}
.home-page .rail-art[data-brand] i.is-long{font-size:clamp(20px,9.5cqw,34px)!important}
.home-page .rail-art.has-logo:not(.logo-ready) i{opacity:1}
.home-page .rail-art.has-logo.logo-ready i{opacity:0}
.home-page .rail-art[data-brand] img{inset:17% 22%!important;width:56%!important;height:66%!important;box-sizing:border-box;padding:6% 7%;border-radius:12px!important;background:var(--ptv-plate);object-fit:contain!important;filter:none!important;box-shadow:0 12px 26px -14px rgba(0,0,0,.7);opacity:0;transition:opacity .25s ease}
.home-page .rail-art.logo-ready img{opacity:1}
.home-page .rail-art em.is-live-badge{display:none}
.home-page .rail-art em::before{animation:none!important}
.home-page .rail-art .rail-left{position:absolute;right:8px;bottom:10px;z-index:2;padding:3px 8px;border-radius:999px;background:rgba(8,10,16,.74);color:#fff;font-size:11px;font-weight:700;letter-spacing:.01em;line-height:1.3}
.home-page .rail-card>small.rail-now{color:#dfe6ee!important;display:block}
.home-page .rail-card>small.rail-now::before{content:"";display:inline-block;width:7px;height:7px;margin-right:6px;border-radius:50%;background:var(--ptv-live);vertical-align:1px}
.home-page .rail-card>small.no-listing380{color:var(--ptv-ink-3)!important}
.home-page .rail-card>.rail-progress{height:3px!important}
.home-page .rail-star{width:32px!important;height:32px!important;top:8px!important;right:8px!important;background:rgba(8,10,16,.55)!important}
.home-page .rail-item:not(.upnext-item)>.rail-card:hover,.home-page .rail-item:not(.upnext-item)>.rail-card:focus-visible{transform:translateY(-3px)}
@media(prefers-reduced-motion:reduce){.home-page .rail-art[data-brand] img{transition:none}.home-page .rail-item>.rail-card:hover{transform:none}}

/* ---------- Lower home: one story (free TV), quieter directory ---------- */
.home-page .home-why381 .home-proof-points article span{color:#c5ef80}
.home-page .home-browse{background:transparent;border:0;border-top:1px solid rgba(255,255,255,.08);border-radius:0;padding:22px 0 8px;font-size:14px}
.home-page .home-browse h2{font-size:1rem;color:#dfe6ee}
.home-page .home-browse>p,.home-page .home-browse h3{font-size:.85rem}
.home-page .home-browse a{color:#c9d2df;text-decoration:none}
.home-page .home-browse a:hover{color:#fff;text-decoration:underline}
.home-page .home-final-cta .home-existing-route{margin-top:14px;color:var(--ptv-ink-3);font-size:14px}
.home-page .home-final-cta .home-existing-route a{color:#dfe6ee}

/* ---------- Guide: live-without-schedule reads as live, not "upcoming" ---------- */
/* The local chooser collapses to one line, so channels start higher (expanded form still wraps below). */
/* guide.html loads local-guide380.css at the end of <body>; these rules are !important so its late arrival changes nothing. */
.guide-shell>.local-guide380{display:flex!important;flex-wrap:wrap;align-items:center;gap:4px 14px;padding:6px 14px!important;margin:0 0 10px!important}
.guide-shell>.local-guide380>header{flex:1 1 0;min-width:0;margin:0;flex-wrap:nowrap;overflow:hidden}
.guide-shell>.local-guide380>header strong{white-space:nowrap;flex:0 0 auto}
.guide-shell>.local-guide380>header span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
.guide-shell>.local-guide380>details{flex:0 0 auto}
.guide-shell>.local-guide380>details[open]{flex:1 1 100%}
.guide-shell>.local-guide380>small{display:none}
/* The filter fields' parking spot is hidden after hydration on every width; hide it from first paint so the grid doesn't jump up ~180 px. */
.guide-shell #guide-filter-home{display:none}
.guide-shell>.local-guide380:not(:has(details[open])){height:53px;box-sizing:border-box}
.guide-shell>.local-guide380>details>summary{min-height:38px;box-sizing:border-box;padding:8px 0;cursor:pointer}
.guide-shell #mobile-now-list .mobile-now-copy>small.is-live-only{color:#ffb4bc}
.guide-shell #mobile-now-list .mobile-now-copy>small.is-live-only::before{content:"";display:inline-block;width:6px;height:6px;margin-right:5px;border-radius:50%;background:var(--ptv-live);vertical-align:1px}
.guide-shell .guide-mini-next.is-empty{visibility:hidden}
/* Channels now start ~40 px higher, so on tall phones the A–Z directory peeked into the first viewport and jumped away when rows loaded. */
@media(max-width:680px){.guide-shell:not(:has(#mobile-now-list .mobile-now-card)) #all-channels{visibility:hidden}}
.guide-shell .no-listing380{color:#a8b3c3!important;background:linear-gradient(90deg,rgba(255,255,255,.06),rgba(255,255,255,.02))!important;border-radius:10px}
.guide-shell #mobile-now-list .no-listing380{font-size:12px}
.guide-live-tile .channel-initials img.guide-logo381{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;background:var(--ptv-plate);padding:3px;box-sizing:border-box;border-radius:inherit}
.timeline-channel img.guide-logo381{background:var(--ptv-plate)!important;object-fit:contain!important;padding:3px;box-sizing:border-box}
.channel-initials[data-brand]{background:linear-gradient(150deg,var(--brand),color-mix(in srgb,var(--brand) 40%,#070910))!important;color:var(--brand-ink)!important}
.channel-initials.is-wide{letter-spacing:-.04em;font-size:11px}

/* ---------- Watch page: the video is the page ---------- */
.watch-shell .watch-source381{margin:4px 0 12px;color:var(--ptv-ink-3);font-size:13px}
.watch-shell .channel-about381{margin:10px 0;border:1px solid rgba(255,255,255,.08);border-radius:12px;padding:0 14px}
.watch-shell .channel-about381>summary{cursor:pointer;padding:12px 0;color:#dfe6ee;font-weight:700;font-size:14px}
.watch-shell .channel-about381>p{color:var(--ptv-ink-2);font-size:14px;line-height:1.55;margin:0 0 12px}
.watch-shell .watch-copy>small{color:#6f7a8c;font-size:11px}
.watch-shell .schedule-empty h3{font-size:16px}
@media(max-width:680px){
  .watch-shell .back{display:none!important}
  .watch-shell .watch-card{margin-inline:-12px}
  .watch-shell .watch-poster{border-radius:0!important}
  .watch-shell .watch-copy{padding-inline:12px}
  .watch-shell .watch-copy h1{font-size:22px;margin:6px 0 2px}
}

/* ---------- TV mode: readable remote labels ---------- */
.tv-remote button span{font-size:12px}
@media(max-width:600px){.tv-remote button span{font-size:11px;line-height:1.15}}
/* Pre-roll countdown: "Your channel starts in 3s" -> "Skip ad · 2s" used to shrink the right-anchored button (CLS ~0.003 on /watch). Fixed footprint. */
.patchtv-preroll:not(.patchtv-sponsor)>button{min-width:13.5em;box-sizing:border-box;text-align:center;font-variant-numeric:tabular-nums}

/* WO2 continuation: bounded presentation-only corrections. Help stays available
   after the footer in normal flow; it cannot obscure body text or player controls. */
body .assistant-launcher{position:static!important;display:block;margin:18px 20px 100px auto!important;opacity:1}
.watch-shell nav.channel-browse-links{display:block;width:100%;box-sizing:border-box;word-break:normal;overflow-wrap:normal;line-height:1.7}
.watch-shell nav.channel-browse-links a,.watch-shell nav.channel-browse-links>span{display:inline-block;max-width:100%;word-break:normal;overflow-wrap:break-word;vertical-align:top}
.home-page .rail-track>.rail-skeleton{position:relative;border:1px solid #273246;background:#121a27}
.home-page .rail-track>.rail-skeleton::after{content:"Loading channels…";position:absolute;left:12px;right:12px;bottom:16px;color:#aab4c6;font-size:12px;line-height:1.4}
@media(max-width:600px){
  #free-tv-hero .free-hero-panel{height:174px}
  #free-tv-hero .free-hero-stats{height:42px;font-size:10px;line-height:1.3}
  #free-tv-hero .free-hero-stats>span{white-space:normal;overflow:visible;text-overflow:clip}
}
