/* v3.2 stage 1 - Banana style: warm banana yellow + leaf green, rounded, calm (no alarm red). Phone and desktop are laid out SEPARATELY:
   <=720px = single column, swipe rows, big thumbs, thumb-reach; >=721px = multi-column grids, side-by-side blocks.  Uses theme variables from style.css. */
:root{--bn-yellow:#f2b705;--bn-yellow2:#ffd23f;--bn-cream:#fff6d6;--bn-leaf:#14532d;--bn-ink:#2b2100}
:root[data-theme=dark]{--bn-cream:#2a2410}
@media (prefers-color-scheme:dark){:root:not([data-theme=light]){--bn-cream:#2a2410}}
.live-dot{background:var(--bn-leaf)}
/* live status pills: banana yellow, never red */
.chan-badge.s-live{background:var(--bn-yellow);color:var(--bn-ink)}
.chan-badge.s-live::before{content:"";display:inline-block;width:7px;height:7px;border-radius:50%;background:var(--bn-leaf);margin-right:5px;vertical-align:1px}
.tile-thumb{display:block;aspect-ratio:16/9;border-radius:9px;overflow:hidden;background:var(--chip);margin:-2px -2px 4px}
.tile-thumb img{display:block;width:100%;height:100%;object-fit:cover}
.chshare{margin-left:6px}

/* ---------- Live TV (/watch/live) ---------- */
.wl2 .chan{border-radius:14px}
.wl2 .chan.on{border-color:var(--bn-yellow)}
.wl2 .chan.s-live{border-color:var(--bn-yellow)}
.wl-quiet{background:var(--bn-cream);border:1px solid var(--line);border-radius:16px;padding:22px 18px;text-align:center}
.wl-quiet-big{font:700 20px/1.3 var(--serif);margin:0 0 4px}
.wl-off{margin:10px 0;border:1px dashed var(--line);border-radius:12px;padding:0 12px;background:transparent}
.wl-off summary{cursor:pointer;min-height:40px;display:flex;align-items:center;color:var(--muted);font-size:14px;font-weight:600}
.off-row{list-style:none;margin:0 0 10px;padding:0;display:flex;flex-wrap:wrap;gap:6px}
.off-row .chan{min-height:0;flex-direction:row;align-items:center;gap:6px;padding:5px 10px;border-radius:999px;font-size:13px;opacity:.8}
.off-row .chan-name{font-size:13px;font-weight:600}
.off-row .chan-badge{display:none}
@media(max-width:720px){
  .wl2 .tiles{grid-template-columns:1fr 1fr;gap:10px}
  .wl2 .tiles .chan-meta{display:none}
  .wl2 .tiles .chan{min-height:0}
  .wl2 .wl-main{position:sticky;top:0;z-index:3;background:var(--bg);padding-bottom:6px}
  .wl-quiet{padding:16px 14px}
}
@media(min-width:721px){
  .wl2 .tiles{grid-template-columns:1fr;max-height:none;overflow:visible}
  .wl2 .tiles .chan{flex-direction:row;flex-wrap:wrap;align-items:center;gap:4px 10px}
  .wl2 .tiles .tile-thumb{flex:0 0 120px;margin:0}
  .wl2 .tiles .chan-name{flex:1 1 90px}
  .wl2 .tiles .chan-meta{flex:1 1 100%}
}
@media(min-width:900px){.wl2 .wl-side{max-height:calc(100vh - 160px);overflow:auto;padding-right:4px}}

/* ---------- Watch + channel pages ---------- */
.vgrid{list-style:none;margin:0 0 16px;padding:0;display:grid;gap:14px;grid-template-columns:repeat(auto-fill,minmax(250px,1fr))}
.vcard{display:flex;flex-direction:column;gap:5px;color:var(--ink)}
.vthumb{display:block;aspect-ratio:16/9;border-radius:12px;overflow:hidden;background:var(--chip);box-shadow:var(--shadow)}
.vthumb img{display:block;width:100%;height:100%;object-fit:cover;transition:transform .2s}
.vcard:hover .vthumb img{transform:scale(1.03)}
.vtitle{font-size:15px;line-height:1.3;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.vmeta{font-size:12.5px;color:var(--muted)}
.vpage .player{margin:10px 0}
.chhead h1{margin:6px 0 2px;font-size:28px}
.chver{display:inline-block;font:700 12px/1 var(--sans);padding:3px 8px;border-radius:999px;background:var(--bn-cream);border:1px solid var(--bn-yellow);color:var(--bn-leaf);vertical-align:middle;white-space:nowrap}
.chsec{margin:20px 0}.chsec h2{font-size:20px;margin:0 0 10px;display:flex;align-items:center;gap:8px}
.chempty{padding:18px;border:1px dashed var(--line);border-radius:12px}
.chgroup{margin:22px 0}.chgroup h2{font-size:20px;margin:0 0 10px}
.chlist{list-style:none;margin:0;padding:0;display:grid;gap:8px;grid-template-columns:repeat(auto-fill,minmax(210px,1fr))}
.chcard{display:flex;flex-direction:column;gap:3px;min-height:60px;padding:10px 12px;border:1px solid var(--line);border-radius:14px;background:var(--panel);color:var(--ink)}
.chcard:hover{border-color:var(--bn-yellow);box-shadow:var(--shadow)}
.chmeta{font-size:12.5px;color:var(--muted);display:flex;align-items:center;gap:6px;flex-wrap:wrap}
@media(max-width:720px){
  .vgrid{grid-template-columns:1fr;gap:18px}                                  /* phone: one big thumb per row */
  .vcard{flex-direction:column}.vtitle{font-size:16px}
  .chlist{grid-template-columns:1fr 1fr}.chcard{min-height:64px}
  .chhead h1{font-size:23px}
  .chsec .vgrid{grid-auto-flow:column;grid-auto-columns:78%;grid-template-columns:none;overflow-x:auto;scroll-snap-type:x mandatory;gap:12px;padding-bottom:6px}   /* channel sections: swipe rows */
  .chsec .vgrid>li{scroll-snap-align:start}
}
@media(min-width:721px){.vgrid{grid-template-columns:repeat(auto-fill,minmax(240px,1fr))}.chlist{grid-template-columns:repeat(auto-fill,minmax(230px,1fr))}}

/* v3.2.7 live hero: one random live stream at the top of / (replaces the red Breaking strip). Phone: full-width 16:9 player right under the header. */
.lhero{margin:0 0 14px;max-width:820px}
.lhero-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 0 6px;min-width:0}
.lhero-h{font:700 18px/1.25 var(--serif);margin:0;display:flex;align-items:center;gap:7px;min-width:0}
.lhero-h .chan-badge{flex:none}
.lhero-name{color:var(--ink);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
.lhero-player{margin:0;border-radius:14px}
.lhero-player .pg-cover{border-radius:14px}
.lhero-sub{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:4px 12px;margin:6px 0 0}
.lhero-title{flex:1 1 220px;min-width:0;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.lhero-next{white-space:nowrap;font-weight:600;color:var(--bn-leaf);min-height:32px;display:inline-flex;align-items:center}
:root[data-theme=dark] .lhero-next,:root[data-theme=dark] .lhero .hm-more{color:var(--bn-yellow2)}
@media (prefers-color-scheme:dark){:root:not([data-theme]) .lhero-next,:root:not([data-theme]) .hm-more{color:var(--bn-yellow2)}}
.lhero-off{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin:0 0 10px;padding:6px 10px;border:1px solid var(--line);border-radius:12px;background:var(--panel)}
.lhero-off a{font-weight:600;white-space:nowrap}
@media(max-width:720px){
  .lhero{margin:0 -2px 12px}.lhero-h{font-size:16.5px;width:100%}
  .lhero-name{flex:1 1 0;min-width:0}   /* v3.2.7.1: ellipsis needs a real flex shrink basis on phones */
  .lhero-title{flex:1 1 100%;max-width:100%;line-clamp:2;-webkit-line-clamp:2}  /* clamp actually bites at 360-414 */
  .lhero-player,.lhero-player .pg-cover{border-radius:12px}
}
/* ---------- Home ---------- */
.hm{margin:0 0 18px}
.hm-head{display:flex;align-items:baseline;justify-content:space-between;gap:10px;margin:0 0 8px}
.hm-head h2{font:700 20px/1.2 var(--serif);margin:0;display:flex;align-items:center;gap:8px}
.hm-more{font-size:13.5px;font-weight:600;color:var(--bn-leaf);white-space:nowrap}
:root[data-theme=dark] .hm-more{color:var(--bn-yellow2)}
.hm-cards,.hm-eps,.hm-chart{list-style:none;margin:0;padding:0}
.hm-card{display:flex;flex-direction:column;gap:5px;padding:8px;border:1px solid var(--line);border-radius:16px;background:var(--panel);color:var(--ink);height:100%;position:relative}
.hm-card:hover{border-color:var(--bn-yellow);box-shadow:var(--shadow)}
.hm-card .tile-thumb{margin:0}
.hm-card-body{display:flex;flex-direction:column;min-width:0}.hm-card-body b{font-size:14.5px;line-height:1.25}
.hm-sub{font-size:12.5px;color:var(--muted);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.hm-card .chan-badge{position:absolute;top:14px;left:14px}
.hm-genres{display:flex;gap:7px;flex-wrap:wrap}.hm-genres .pill{white-space:nowrap}
.hm-chart{margin-top:8px;font-size:14px}.hm-chart li{padding:3px 0}
.hm-subline{margin:-4px 0 8px}
.hm-ep{display:flex;flex-direction:column;gap:2px;padding:10px 12px;border:1px solid var(--line);border-radius:14px;background:var(--panel);color:var(--ink);min-height:56px}
.hm-ep:hover{border-color:var(--bn-yellow)}.hm-ep b{font-size:14.5px;line-height:1.3;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.hero32{padding-top:10px;padding-bottom:10px}
/* phone: compact title, swipe row of live cards, genre chips scroll sideways, episodes stack */
@media(max-width:720px){
  .hero32 .hero-art,.hero32 .statline,.hero32>p,.hero32 .hero-links{display:none}
  .hero32{min-height:0;margin-bottom:10px}.hero32 h1{font-size:23px;margin:0}
  .hm-cards{display:grid;grid-auto-flow:column;grid-auto-columns:72%;gap:10px;overflow-x:auto;scroll-snap-type:x mandatory;padding-bottom:6px;margin-inline:-2px}
  .hm-cards>li{scroll-snap-align:start}
  .hm-genres{flex-wrap:nowrap;overflow-x:auto;padding-bottom:4px;-webkit-overflow-scrolling:touch}
  .hm-eps{display:flex;flex-direction:column;gap:8px}
}
/* desktop: live cards in a 4-up grid, music and "new today" side by side */
@media(min-width:721px){
  .hm-cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
  .hm-music,.hm-today{display:inline-block;vertical-align:top;width:calc(50% - 10px);margin-right:16px}
  .hm-today{margin-right:0}
  .hm-eps{display:grid;grid-template-columns:1fr 1fr;gap:8px}
}
@media(min-width:721px) and (max-width:1000px){.hm-cards{grid-template-columns:repeat(2,minmax(0,1fr))}.hm-music,.hm-today{display:block;width:auto;margin-right:0}}
@media(prefers-reduced-motion:reduce){.vthumb img{transition:none}}
.since-banner.hidden{display:none}      /* the empty "since your last visit" banner used to show as a dark bar above the hero */

/* monkey counter: styled in style.css next to the token chip (v3.2.2 - it is in the header on every page, and here it was dark text on the dark-theme cream) */
@media(max-width:350px){.brand-text{display:none}.brand{min-width:0}}   /* very narrow phones: logo icon only so the chips never squeeze it */
/* v3.2.5 channel protocol: tab bar (only non-empty sections), per-item share */
.chtabs{display:flex;gap:6px;flex-wrap:wrap;margin:6px 0 4px;padding:6px 0}
.chtabs .pill{min-height:44px;display:inline-flex;align-items:center;gap:6px}
.chsub{font-size:15px;margin:14px 0 6px;color:var(--muted)}
.chstories li{overflow-wrap:anywhere}
.vgrid>li .chshare{margin-top:4px;align-self:flex-start}
/* v3.2.5 entertainment */
.entst-form{display:flex;flex-direction:column;gap:6px;margin:10px 0 14px;max-width:520px}
.entst-row{display:flex;gap:8px;flex-wrap:wrap}.entst-row input{flex:1 1 180px;min-width:0;min-height:44px}.entst-row .btn{min-height:44px}
.entst-links{list-style:none;margin:0;padding:0;display:grid;gap:8px;grid-template-columns:repeat(auto-fill,minmax(220px,1fr))}
.entst-links li{display:flex;flex-direction:column;gap:2px;padding:10px 12px;border:1px solid var(--line);border-radius:10px;overflow-wrap:anywhere}
.entst-links a{min-height:24px}
.chsec h2 .small-link{margin-left:auto;font-weight:600}
