/* web_templates/iptv/css/iptv_viewer.css — the IPTV viewer (iptv_viewer.js), laid out like the operator's old IPTV Guide on
 * a wide screen and like the YouTube app on a phone (WebBoss's spec, 2026-10-10). Sizes come from the viewer's own width:
 * .iv-l >= 1100px, .iv-m 700-1099px, .iv-s < 700px. Colours: the site's theme tokens (--sdui-c-*); Juice TV's are dark
 * with a purple primary. */

/* ── the frame ── */
.iv{display:flex;flex-direction:column;height:640px;max-width:100%;overflow:hidden;background:var(--sdui-c-background);color:var(--sdui-c-text);
  font-family:var(--sdui-f-body);border:1px solid var(--sdui-c-border);border-radius:12px;box-sizing:border-box}
.iv *{box-sizing:border-box}
.iv.iv-full-window{height:calc(100vh - 24px);min-height:560px}
.iv.iv-fullscreen,.iv:fullscreen{height:100vh;border-radius:0;border:none}
.iv button{font-family:inherit}

/* ── top bar ── */
.iv-top{display:flex;align-items:center;gap:14px;padding:10px 16px;border-bottom:1px solid var(--sdui-c-border);background:var(--sdui-c-surface)}
.iv-brand{font-weight:700;font-size:1.05rem;margin-inline-end:auto;white-space:nowrap}
.iv-count{font-weight:400;font-size:.8rem;opacity:.6;margin-inline-start:8px}
.iv-tools{display:flex;align-items:center;gap:12px}
.iv input.iv-filter,.iv input.iv-gfilter,.iv-gsel{background:var(--sdui-c-background);color:var(--sdui-c-text);border:1px solid var(--sdui-c-border);border-radius:8px;padding:6px 10px;font-size:.85rem}
.iv input.iv-filter{width:220px}
.iv-gsel{display:none}
.iv-sbtn{display:none;background:none;border:none;color:var(--sdui-c-text);font-size:1.3rem;cursor:pointer;min-width:44px;min-height:44px}
.iv-epg{font-size:.82rem;opacity:.85;display:flex;align-items:center;gap:6px;cursor:pointer;white-space:nowrap}
.iv-epg .ico{display:none}
.iv-keys{font-size:.72rem;opacity:.55;white-space:nowrap}
.iv-keys kbd{border:1px solid var(--sdui-c-border);border-radius:4px;padding:0 4px;margin:0 1px;font-family:inherit}
.iv-fs{background:var(--sdui-c-primary);color:var(--sdui-c-onPrimary);border:none;border-radius:8px;padding:6px 12px;font-size:.82rem;font-weight:600;cursor:pointer;white-space:nowrap}

/* ── body: rail + main ── */
.iv-body{display:flex;flex:1;min-height:0}
.iv-rail{width:250px;flex:none;border-inline-end:1px solid var(--sdui-c-border);display:flex;flex-direction:column;min-height:0}
.iv-rail .iv-gfilter{margin:10px;width:calc(100% - 20px)}
.iv-groups{overflow-y:auto;flex:1}
.iv-g{display:flex;justify-content:space-between;width:100%;background:none;border:none;color:var(--sdui-c-text);padding:7px 14px;font-size:.84rem;cursor:pointer;text-align:start}
.iv-g .n{opacity:.5;font-variant-numeric:tabular-nums}
.iv-g:hover{background:var(--sdui-c-surface)}
.iv-g.on{background:var(--sdui-c-primary);color:var(--sdui-c-onPrimary)}
.iv-g.on .n{opacity:.8}
.iv-main{flex:1;display:flex;flex-direction:column;min-width:0;min-height:0}
/* Wide and medium: the list on top, the player docked in the bottom half, recently played at the foot. */
.iv-list{order:1;flex:1;overflow-y:auto;outline:none}
.iv-dock{order:2}
.iv-recent{order:3}
.iv-chips{display:none}
.iv.docked .iv-list{flex:1 1 50%}

/* ── channel rows ── */
.iv-row{display:grid;grid-template-columns:48px minmax(160px,1.1fr) minmax(160px,1.6fr) minmax(140px,1.2fr) 110px;gap:12px;align-items:center;
  padding:8px 14px;border-bottom:1px solid var(--sdui-c-border);cursor:pointer}
.iv-row:hover{background:var(--sdui-c-surface)}
.iv-row.sel{background:color-mix(in srgb, var(--sdui-c-primary) 22%, transparent)}
.iv-row.playing .iv-name b{color:var(--sdui-c-primary)}
.iv-logo{width:48px;height:32px;border-radius:5px;background:#fff;color:#000;display:flex;align-items:center;justify-content:center;font-size:.62rem;font-weight:700;overflow:hidden}
.iv-logo img,.iv-rlogo img{width:100%;height:100%;object-fit:contain}
.iv-name{min-width:0}
.iv-name b{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:.9rem}
.iv-name span{font-size:.75rem;opacity:.55}
.iv-nowc,.iv-nextc{font-size:.82rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
.iv-nextc{opacity:.65}
.iv .t{opacity:.55;font-size:.75rem}
.iv-nowc .dot{display:inline-block;width:7px;height:7px;border-radius:50%;background:#ff4d5e;margin-inline-end:6px;vertical-align:middle}
.iv-prog .bar{height:3px;background:var(--sdui-c-border);border-radius:2px;overflow:hidden}
.iv-prog .bar span{display:block;height:100%;background:var(--sdui-c-primary)}
.iv-prog .left{font-size:.7rem;opacity:.55;margin-top:3px;text-align:right}
.iv-empty{padding:30px;opacity:.6;font-style:italic}

/* ── Playlists (sources, own playlists, devices) ── */
.iv-pls{padding:6px 0 20px}
.iv-pl{display:flex;flex-wrap:wrap;align-items:center;gap:6px 12px;padding:10px 14px;border-bottom:1px solid var(--sdui-c-border);font-size:.86rem}
.iv-pl-kind{min-width:64px;font-size:.7rem;text-transform:uppercase;letter-spacing:.04em;opacity:.55}
.iv-pl-meta{flex:1;min-width:140px;opacity:.8}
.iv-pl .bad,.iv-pl.bad{color:#ff6b78}
.iv-pl-acts{display:flex;align-items:center;gap:6px}
.iv-pls button{background:none;border:1px solid var(--sdui-c-border);color:var(--sdui-c-text);border-radius:6px;padding:4px 10px;font-size:.8rem;cursor:pointer;min-height:32px}
.iv-pls input{background:var(--sdui-c-background);color:var(--sdui-c-text);border:1px solid var(--sdui-c-border);border-radius:8px;padding:6px 10px;font-size:.85rem;min-width:0}
.iv-pl-on{display:flex;align-items:center;gap:4px;font-size:.8rem}
.iv-pl-on input{min-width:auto}
.iv-pl-add{display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:14px}
.iv-pl-add b{width:100%}
.iv-pl-add input{flex:1 1 180px}
.iv-pls .iv-pl-go{background:var(--sdui-c-primary);color:var(--sdui-c-onPrimary);border:none;font-weight:600}
.iv-pl-tabs{display:flex;gap:4px;width:100%}
.iv-pls .iv-pl-tabs button.on{background:var(--sdui-c-primary);color:var(--sdui-c-onPrimary);border-color:var(--sdui-c-primary)}
.iv-pl-msg{width:100%;font-size:.8rem}
.iv-pl-head{padding:16px 14px 4px;font-size:.75rem;text-transform:uppercase;letter-spacing:.04em;opacity:.6}
/* The top of the guide: the playlists as cards, and their headings in the rail (operator 2026-10-29: start at a playlist, drill down). */
.iv-rh{padding:12px 14px 4px;font-size:.72rem;text-transform:uppercase;letter-spacing:.04em;opacity:.6;min-height:4px}
.iv-g[disabled]{opacity:.5;cursor:default}
.iv-at-playlists .iv-gfilter{display:none}
.iv-plcards{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:12px;padding:14px}
.iv-plcard{display:flex;flex-direction:column;align-items:flex-start;gap:6px;text-align:start;background:var(--sdui-c-surface);border:1px solid var(--sdui-c-border);color:var(--sdui-c-text);border-radius:10px;padding:16px;cursor:pointer;font-size:.86rem;min-height:96px}
.iv-plcard:hover,.iv-plcard:focus-visible{border-color:var(--sdui-c-primary)}
.iv-plcard b{font-size:1.1rem}
.iv-plcard .iv-pl-meta{opacity:.75}
.iv-plcard .bad{color:#ff6b78}
.iv-plcard[disabled]{cursor:default}

/* ── the player dock ── */
.iv-dock{flex:1 1 50%;display:flex;flex-direction:column;border-top:1px solid var(--sdui-c-border);background:#000;min-height:0}
.iv-dock[hidden]{display:none}
.iv-dock-top{display:flex;justify-content:space-between;align-items:flex-start;padding:8px 14px;background:var(--sdui-c-surface)}
.iv-dock-ch{font-weight:700}
.iv-dock-now{font-size:.82rem;opacity:.8}
.iv-dock-top button{background:none;border:1px solid var(--sdui-c-border);color:var(--sdui-c-text);border-radius:6px;padding:3px 10px;margin-inline-start:6px;cursor:pointer;font-size:.8rem}
.iv-player{flex:1;display:flex;align-items:center;justify-content:center;min-height:0}
.iv-player .iptvp{width:100%;height:100%;display:flex;align-items:center;justify-content:center}
.iv-player .iptvp-stage{height:100%;width:auto;max-width:100%;border-radius:0}
.iv-dock-line{display:none}

/* ── recently played ── */
.iv-recent{display:flex;align-items:center;gap:10px;padding:8px 14px;border-top:1px solid var(--sdui-c-border);background:var(--sdui-c-surface)}
.iv-recent-tiles{display:flex;gap:8px;overflow-x:auto;flex:1}
.iv-recent-empty{font-size:.78rem;opacity:.5}
.iv-rt{display:flex;flex-direction:column;align-items:center;gap:4px;width:84px;flex:none;background:none;border:1px solid transparent;border-radius:8px;padding:5px;color:var(--sdui-c-text);cursor:pointer}
.iv-rt span{font-size:.68rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
.iv-rt.on{border-color:var(--sdui-c-primary)}
.iv-rlogo{width:56px;height:34px;border-radius:5px;background:#fff;color:#000;display:flex;align-items:center;justify-content:center;font-size:.6rem;font-weight:700;overflow:hidden}
.iv-clear{background:none;border:none;color:var(--sdui-c-text);opacity:.6;cursor:pointer;font-size:.8rem;min-height:44px}

/* ── MEDIUM 700-1099px: groups in a menu, no 'Next', no key hints ── */
.iv.iv-m .iv-rail,.iv.iv-m .iv-keys,.iv.iv-m .iv-nextc{display:none}
.iv.iv-m .iv-gsel{display:block}
.iv.iv-m .iv-row{grid-template-columns:48px minmax(140px,1fr) minmax(160px,1.6fr) 100px}
.iv.iv-m input.iv-filter{width:170px}

/* ── PHONE < 700px: YouTube-like ── */
.iv.iv-s{height:auto;border-radius:0;border-left:none;border-right:none;overflow:visible;
  padding-left:env(safe-area-inset-left);padding-right:env(safe-area-inset-right);padding-bottom:env(safe-area-inset-bottom)}
.iv.iv-s.iv-full-window{height:auto;min-height:0}
.iv.iv-s .iv-top{gap:6px;padding:4px 8px 4px 12px;position:relative}
.iv.iv-s .iv-count,.iv.iv-s .iv-keys,.iv.iv-s .iv-gsel,.iv.iv-s .iv-rail,.iv.iv-s .iv-epg .txt{display:none}
.iv.iv-s .iv-sbtn{display:inline-flex;align-items:center;justify-content:center}
.iv.iv-s input.iv-filter{display:none;position:absolute;left:8px;right:8px;top:calc(100% + 4px);width:auto;z-index:3;padding:10px 12px;font-size:1rem}
.iv.iv-s.iv-search-open input.iv-filter{display:block}
.iv.iv-s .iv-epg{min-height:44px;opacity:1}
.iv.iv-s .iv-epg input{display:none}
.iv.iv-s .iv-epg .ico{display:inline-block;border:1px solid var(--sdui-c-border);border-radius:999px;padding:3px 9px;font-size:.72rem;font-weight:700;opacity:.7}
.iv.iv-s .iv-epg input:checked + .txt + .ico{background:var(--sdui-c-primary);color:var(--sdui-c-onPrimary);border-color:var(--sdui-c-primary);opacity:1}
.iv.iv-s .iv-fs{display:none}
.iv.iv-s .iv-body{display:block}
.iv.iv-s .iv-main{display:flex;flex-direction:column}
/* The player first, full width 16:9, sticky while the list scrolls under it. */
.iv.iv-s .iv-dock{order:0;position:sticky;top:0;z-index:2;flex:none;border-top:none}
.iv.iv-s .iv-dock-top{display:none}
.iv.iv-s .iv-player{flex:none;aspect-ratio:16/9;width:100%}
.iv.iv-s .iv-player .iptvp-stage{width:100%;height:100%}
.iv.iv-s .iv-dock-line{display:flex;align-items:center;gap:4px;padding:2px 4px 2px 12px;background:var(--sdui-c-surface);font-size:.85rem}
.iv.iv-s .iv-line-t{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:600}
.iv.iv-s .iv-dock-line button{background:none;border:none;color:var(--sdui-c-text);font-size:1.15rem;min-width:44px;min-height:44px;cursor:pointer}
/* Group chips under the player. */
.iv.iv-s .iv-chips{order:1;display:flex;gap:8px;overflow-x:auto;padding:8px 12px;scrollbar-width:none;border-bottom:1px solid var(--sdui-c-border)}
.iv.iv-s .iv-chips::-webkit-scrollbar{display:none}
.iv-chip{flex:none;background:var(--sdui-c-surface);border:1px solid var(--sdui-c-border);color:var(--sdui-c-text);border-radius:999px;padding:0 14px;min-height:36px;font-size:.85rem;cursor:pointer;white-space:nowrap}
.iv-chip.on{background:var(--sdui-c-text);color:var(--sdui-c-background);border-color:var(--sdui-c-text)}
/* Recently played: a chip row that hides when empty. */
.iv.iv-s .iv-recent{order:2;border-top:none;border-bottom:1px solid var(--sdui-c-border);padding:6px 12px}
.iv.iv-s .iv-recent.none{display:none}
.iv.iv-s .iv-rt{flex-direction:row;width:auto;min-height:44px;padding:4px 10px 4px 4px;border:1px solid var(--sdui-c-border);border-radius:999px;gap:6px}
.iv.iv-s .iv-rt.on{border-color:var(--sdui-c-primary)}
.iv.iv-s .iv-rlogo{width:36px;height:24px}
.iv.iv-s .iv-rt span{font-size:.78rem;max-width:120px}
/* Simple rows: logo, name, now on one muted line, a thin bar. */
.iv.iv-s .iv-list{order:3;overflow:visible;flex:none}
.iv.iv-s .iv-row{grid-template-columns:40px minmax(0,1fr);grid-template-areas:"logo name" "logo now" "logo prog";column-gap:12px;row-gap:2px;
  padding:10px 12px;min-height:var(--iv-row-h)}
.iv.iv-s .iv-logo{grid-area:logo;width:40px;height:28px;align-self:center}
.iv.iv-s .iv-name{grid-area:name}
.iv.iv-s .iv-name span{display:none}
.iv.iv-s .iv-nowc{grid-area:now;opacity:.65;font-size:.8rem}
.iv.iv-s .iv-nowc .dot,.iv.iv-s .iv-nowc .t{display:none}
.iv.iv-s .iv-nextc{display:none}
.iv.iv-s .iv-prog{grid-area:prog}
.iv.iv-s .iv-prog .left{display:none}
.iv.iv-s .iv-prog .bar{height:2px}
/* 'Guide is loading' rows: the guide's frame before (or without) a lineup. */
.iv-row.iv-loading{cursor:default;opacity:.55}
.iv-row.iv-loading .iv-logo{background:var(--sdui-c-surface)}
.iv-row.iv-loading .sk{display:inline-block;width:70%;height:9px;border-radius:5px;background:var(--sdui-c-surface);animation:iv-pulse 1.4s ease-in-out infinite}
@keyframes iv-pulse{50%{opacity:.4}}
.iv-star{background:none;border:none;color:var(--sdui-c-text);opacity:.45;cursor:pointer;font-size:1rem;padding:0 6px 0 0;min-width:28px}
.iv-star.on{color:#f5b942;opacity:1}
.iv.iv-s .iv-star{min-width:36px;min-height:36px;font-size:1.15rem}
.iv-resume{order:0;margin:10px 14px 0;align-self:flex-start;background:var(--sdui-c-primary);color:var(--sdui-c-onPrimary);border:none;border-radius:999px;
  padding:8px 16px;font-weight:600;font-size:.88rem;cursor:pointer;min-height:40px;max-width:calc(100% - 28px);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.iv-resume[hidden]{display:none}
.iv.iv-s .iv-resume{order:1;margin:8px 12px 0}
.iv-dock-ch .iv-star,.iv-line-t .iv-star{font-size:1.05rem}
/* Movies: a category picker, a poster grid, a series' seasons and episodes. */
.iv-vodbar{padding:10px 14px;border-bottom:1px solid var(--sdui-c-border)}
.iv-vodbar select{background:var(--sdui-c-background);color:var(--sdui-c-text);border:1px solid var(--sdui-c-border);border-radius:8px;padding:6px 10px;font-size:.85rem;max-width:100%}
.iv-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:14px;padding:14px}
.iv-poster{display:flex;flex-direction:column;gap:4px;background:none;border:none;color:var(--sdui-c-text);text-align:start;cursor:pointer;padding:0}
.iv-poster img,.iv-poster .ph{width:100%;aspect-ratio:2/3;object-fit:cover;border-radius:8px;background:var(--sdui-c-surface);display:flex;align-items:center;justify-content:center;font-weight:700;font-size:1.3rem}
.iv-poster:hover img{outline:2px solid var(--sdui-c-primary)}
.iv-poster .nm{font-size:.82rem;font-weight:600;line-height:1.25;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.iv-poster.np{opacity:.5;cursor:default}
.iv-series{padding:14px}
.iv-series h3{margin:6px 0}
.iv-plot{opacity:.75;font-size:.85rem;max-width:70ch}
.iv-back{background:none;border:none;color:var(--sdui-c-primary);cursor:pointer;padding:0;font-size:.85rem;min-height:36px}
.iv-season{font-weight:700;margin:14px 0 6px;font-size:.85rem;opacity:.8}
.iv-ep{display:block;width:100%;text-align:start;background:none;border:none;border-bottom:1px solid var(--sdui-c-border);color:var(--sdui-c-text);padding:10px 4px;cursor:pointer;min-height:44px;font-size:.88rem}
.iv-ep:hover{background:var(--sdui-c-surface)}
.iv-ep.np{opacity:.5;cursor:default}
.iv.iv-s .iv-grid{grid-template-columns:repeat(auto-fill,minmax(105px,1fr));gap:10px;padding:10px}
/* Phone, YouTube-style (operator via ITShop_3 and WebBoss, 2026-10-11): the player box is ALWAYS on top at 16:9 and
   never grows; under it the now-playing block, then the chips, then the guide list.
   Operator via ITShop_3, 2026-10-12 ("the guide panels seem to go forever ... a max of 5 lines or so ... we scroll in
   that box ... the footer disappears"): the viewer is only as tall as its parts, and the guide list is a box about five
   channel rows tall with its own scroll, so the page under the viewer, footer included, is reached by a page scroll.
   The half row past five shows there is more to scroll. Desktop and medium are untouched. */
.iv-np{display:none}
.iv.iv-s{--iv-row-h:60px}
.iv.iv-s .iv-body{display:flex;flex:1;min-height:0}
.iv.iv-s .iv-main{flex:1;min-height:0}
.iv.iv-s .iv-dock,.iv.iv-s .iv-dock[hidden]{display:flex;position:static;flex:none;order:0}
.iv.iv-s .iv-player:empty{background:#000;position:relative}
.iv.iv-s .iv-player:empty::before{content:'▶';position:absolute;inset:0;display:flex;align-items:center;justify-content:center;color:#fff;opacity:.35;font-size:2.4rem}
.iv.iv-s .iv-dock-line{display:none}
.iv.iv-s .iv-np{display:block;order:1;flex:none;padding:10px 12px 6px;background:var(--sdui-c-background)}
.iv.iv-s .iv-np-title{font-weight:700;font-size:1.02rem;line-height:1.3;margin-bottom:8px}
.iv.iv-s .iv-np-ch{display:flex;align-items:center;gap:10px;font-weight:600;font-size:.9rem}
.iv.iv-s .iv-np-ch:empty{display:none}
.iv.iv-s .iv-np-ch span{flex:1}
.iv.iv-s .iv-np-logo{width:36px;height:36px;border-radius:50%;background:#fff;color:#000;display:flex;align-items:center;justify-content:center;font-size:.55rem;font-weight:700;overflow:hidden;flex:none}
.iv.iv-s .iv-np-logo img{width:100%;height:100%;object-fit:contain}
.iv.iv-s .iv-np-card{margin-top:8px;background:var(--sdui-c-surface);border-radius:12px;padding:10px 12px;font-size:.84rem;line-height:1.45}
.iv.iv-s .iv-np-card:empty{display:none}
.iv.iv-s .iv-chips{order:2;flex:none}
.iv.iv-s .iv-resume{order:3;flex:none}
.iv.iv-s .iv-recent{order:4;flex:none}
.iv.iv-s .iv-list{order:5;flex:none;max-height:calc(5.5 * var(--iv-row-h));overflow-y:auto;-webkit-overflow-scrolling:touch}
/* Movies draws posters in the same box; five guide rows would show one poster row, so it gets most of the screen. */
.iv.iv-s .iv-list:has(.iv-vodbar){max-height:70dvh}
/* Phone, compact (operator 2026-11-04 via ITShop_3, on Android Chrome: "too bubbly and large, doesn't fit on a screen,
   nothing like how YouTube does it"; rules after ITShop_3's prototype). The channel's logo is a 36px circle (it is a span,
   so the row's span{flex:1} stretched it into an oval); Now/Next is plain small text, not a card; chips and recent tiles are
   flat 32px; rows are a 64x36 logo, the name and one line of what is on. In the full-window modal the viewer is the
   screen's real height (dvh: 100vh is taller than the visible part of a phone's browser, which cut the top bar off): the
   top bar, the player and the line under it stay, and only the channel list scrolls, under them. */
.iv.iv-s .iv-np-ch .iv-np-logo{flex:0 0 36px;width:36px;height:36px}
.iv.iv-s .iv-np{padding:8px 12px 4px}
.iv.iv-s .iv-np-title{font-size:.95rem;font-weight:600;margin-bottom:6px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.iv.iv-s .iv-np-ch{font-size:.85rem}
.iv.iv-s .iv-np-card{margin-top:4px;background:none;border-radius:0;padding:0;font-size:.78rem;line-height:1.4;color:var(--sdui-c-textMuted)}
.iv.iv-s .iv-np-card b,.iv.iv-s .iv-np-card strong{color:var(--sdui-c-text);font-weight:600}
.iv.iv-s .iv-chips{padding:6px 12px;border-bottom:none}
.iv.iv-s .iv-chip{min-height:32px;padding:0 12px;border-radius:8px;border-color:transparent;font-size:.85rem;font-weight:500}
.iv.iv-s .iv-chip.on{border-color:var(--sdui-c-text)}
.iv.iv-s .iv-recent{padding:2px 12px 6px}
.iv.iv-s .iv-rt{min-height:32px;padding:2px 10px 2px 2px;border-radius:8px;border-color:transparent;background:var(--sdui-c-surface)}
.iv.iv-s .iv-rlogo{width:36px;height:24px;border-radius:6px}
.iv.iv-s .iv-row{grid-template-columns:64px minmax(0,1fr);row-gap:1px;padding:8px 12px;border-bottom:none;min-height:0}
.iv.iv-s .iv-logo{width:64px;height:36px;border-radius:6px;object-fit:contain}
.iv.iv-s .iv-name{font-size:.9rem;font-weight:600;line-height:1.25}
.iv.iv-s .iv-nowc{font-size:.78rem;line-height:1.35;color:var(--sdui-c-textMuted);opacity:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.iv.iv-s .iv-prog{margin-top:3px}
.iv.iv-s .iv-row.sel{background:var(--sdui-c-surface)}
.iv.iv-s.iv-full-window{height:100dvh;min-height:0;border:none;border-radius:0}
.iv.iv-s.iv-full-window .iv-top{flex:none}
.iv.iv-s.iv-full-window .iv-dock{aspect-ratio:16/9;height:auto}
.iv.iv-s.iv-full-window .iv-list{flex:1 1 auto;min-height:0;max-height:none}
/* The inline viewer too (My TV; operator 2026-11-04 via ITShop_3: "that view ... becomes the locked in top to bottom div on
   a phone"): the screen's real height, the top bar and the player stay, only the list scrolls, inside it. This replaces the
   2026-10-12 five-row list for phones. */
.iv.iv-s{height:100dvh;min-height:0;overflow:hidden}
.iv.iv-s .iv-top{flex:none}
.iv.iv-s .iv-dock{aspect-ratio:16/9;height:auto}
.iv.iv-s .iv-list{flex:1 1 auto;min-height:0;max-height:none}
.iv.iv-s .iv-list:has(.iv-vodbar){max-height:none}
/* In a page's full-screen modal (Juice TV's Watch): the modal's own × sits at the top right, so the top bar keeps clear
   of it, at every width. */
dialog .iv .iv-top,dialog .iv.iv-s .iv-top{padding-inline-end:56px}
/* The account's shared settings in Manage (thread player-sync-2026-11-02). */
.iv-set-n{width:70px;min-width:0}
.iv-set-msg{display:block;padding:6px 14px;font-size:.8rem;opacity:.75}
/* Wide and medium while a channel plays: YouTube's watch page (operator 2026-11-04 via ITShop_3: "its so ugly. make it look
   good", "nothing like how youtube does it"). The video large on the left with the programme under it; on the right the
   groups as one chip row over a compact channel list that scrolls by itself. The guide (nothing playing) is unchanged. */
.iv.iv-l.docked .iv-rail,.iv.iv-m.docked .iv-rail,.iv.iv-m.docked .iv-gsel,.iv.docked:not(.iv-s) .iv-resume,.iv.docked:not(.iv-s) .iv-recent,
.iv.docked:not(.iv-s) .iv-dock-top{display:none}
.iv.docked:not(.iv-s) .iv-main{display:grid;grid-template-columns:minmax(0,1fr) 400px;grid-template-rows:auto auto minmax(0,1fr);
  grid-template-areas:"video chips" "video list" "np list";column-gap:16px;padding:16px 0 0 16px}
.iv.iv-m.docked .iv-main{grid-template-columns:minmax(0,1fr) 320px}
.iv.docked:not(.iv-s) .iv-dock{grid-area:video;border-top:none;border-radius:12px;overflow:hidden;min-height:0}
.iv.docked:not(.iv-s) .iv-player{flex:none;width:100%;aspect-ratio:16/9;max-height:calc(100dvh - 260px)}
.iv.docked:not(.iv-s) .iv-player .iptvp-stage{width:100%;height:100%}
.iv.docked:not(.iv-s) .iv-np{display:block;grid-area:np;align-self:start;padding:12px 0 16px;min-width:0}
.iv.docked:not(.iv-s) .iv-np-title{font-size:1.15rem;font-weight:600;line-height:1.3;margin-bottom:10px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.iv.docked:not(.iv-s) .iv-np-ch{display:flex;align-items:center;gap:10px;font-weight:600;font-size:.95rem}
.iv.docked:not(.iv-s) .iv-np-ch:empty{display:none}
.iv.docked:not(.iv-s) .iv-np-ch .iv-np-logo{flex:0 0 40px;width:40px;height:40px;border-radius:50%;background:var(--sdui-c-surface);display:flex;align-items:center;justify-content:center;font-size:.55rem;font-weight:700;overflow:hidden}
.iv.docked:not(.iv-s) .iv-np-logo img{width:100%;height:100%;object-fit:contain}
.iv.docked:not(.iv-s) .iv-np-card{margin-top:8px;font-size:.85rem;line-height:1.5;color:var(--sdui-c-textMuted)}
.iv.docked:not(.iv-s) .iv-np-card b{color:var(--sdui-c-text);font-weight:600}
.iv.docked:not(.iv-s) .iv-chips{grid-area:chips;display:flex;gap:8px;overflow-x:auto;padding:0 16px 10px 0;scrollbar-width:none}
.iv.docked:not(.iv-s) .iv-chips::-webkit-scrollbar{display:none}
.iv.docked:not(.iv-s) .iv-chip{min-height:32px;padding:0 12px;border-radius:8px;border-color:transparent;font-size:.85rem;font-weight:500}
.iv.docked:not(.iv-s) .iv-list{grid-area:list;flex:none;min-height:0;overflow-y:auto;padding-inline-end:8px}
.iv.docked:not(.iv-s) .iv-row{grid-template-columns:64px minmax(0,1fr);grid-template-areas:"logo name" "logo now" "logo prog";column-gap:12px;row-gap:1px;
  padding:6px 8px;border-bottom:none;border-radius:8px}
.iv.docked:not(.iv-s) .iv-logo{grid-area:logo;width:64px;height:36px;border-radius:6px}
.iv.docked:not(.iv-s) .iv-name{grid-area:name}
.iv.docked:not(.iv-s) .iv-name b{font-size:.88rem}
.iv.docked:not(.iv-s) .iv-name span,.iv.docked:not(.iv-s) .iv-nextc,.iv.docked:not(.iv-s) .iv-prog .left,
.iv.docked:not(.iv-s) .iv-nowc .dot,.iv.docked:not(.iv-s) .iv-nowc .t{display:none}
.iv.docked:not(.iv-s) .iv-nowc{grid-area:now;font-size:.78rem;color:var(--sdui-c-textMuted)}
.iv.docked:not(.iv-s) .iv-prog{grid-area:prog;margin-top:3px}
.iv.docked:not(.iv-s) .iv-prog .bar{height:2px}
/* Phone: the time in Now stays whole, and the recently-played strip goes (the chips and the list are enough). */
.iv.iv-s .iv-np-card .t{white-space:nowrap}
.iv.iv-s .iv-recent{display:none}
/* Channel names, programme titles and playlist names keep their own direction inside a right-to-left page (ar), as the
   0.51 renderer's dir=auto does for company text: each line takes the direction of its first strong letter. */
.iv-name b,.iv-name span,.iv-nowc,.iv-nextc,.iv-np-title,.iv-np-ch span,.iv-np-card,.iv-dock-ch,.iv-dock-now,.iv-line-t,.iv-g span:first-child,.iv-chip,.iv-plcard b,.iv-pl b,.iv-rt span,.iv-poster .nm{unicode-bidi:plaintext}
