/* watch-surface.css — PARITY-2A, the watching surface (§2.3 the target; §2.9 the floor).
   The page's own palette and type; no new brand. The TV face follows the app's box;
   the phone and tablet faces are §2.3 item 12's own. */
#watchSurface{position:fixed; inset:0; z-index:4200; background:#000; color:var(--text);
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  display:block; overflow:hidden; overscroll-behavior:none}
#watchSurface.ws{position:fixed}
#watchSurface.hidden{display:none !important}
.wsPicture{position:absolute; inset:0; background:#000; display:flex; align-items:center; justify-content:center; overflow:hidden}
.wsPicture #vid{width:100%; height:100%; object-fit:contain; background:#000; display:block}
/* the page's old in-box chrome follows the picture in but is not drawn: the surface's chrome is the chrome */
.wsHosted.wsHosted{opacity:0 !important; pointer-events:none !important; visibility:hidden !important}
#watchSurface #placeholder.wsHosted{display:none !important}
.wsScrim{position:absolute; inset:0; pointer-events:none; opacity:0; transition:opacity .18s linear;
  background:linear-gradient(to bottom,rgba(0,0,0,.62) 0,rgba(0,0,0,0) 28%,rgba(0,0,0,0) 60%,rgba(0,0,0,.74) 100%)}
#watchSurface.ws-chrome .wsScrim{opacity:1}

/* ---------- top chrome (§2.3 items 1–6) ---------- */
.wsTop{position:absolute; left:0; right:0; top:0; display:flex; align-items:flex-start; justify-content:space-between; gap:16px;
  padding:calc(14px + var(--sat)) 18px 14px; transition:transform .2s ease,opacity .2s ease; will-change:transform,opacity}
.wsTop.wsOff{transform:translateY(-104%); opacity:0; pointer-events:none}
.wsTopLeft{display:flex; align-items:center; gap:14px; min-width:0}
.wsBack{flex:0 0 auto; width:40px; height:40px; border-radius:50%; background:rgba(19,44,82,.86); color:var(--text);
  font-size:20px; line-height:1; border:1px solid var(--line)}
.wsBack:hover,.wsBack:focus{background:var(--focus); color:#04121f; outline:none}
.wsLogo{width:44px; height:44px; object-fit:contain; border-radius:8px; background:rgba(11,27,51,.6)}
.wsMeta{min-width:0}
.wsName{font-size:21px; font-weight:650; letter-spacing:.2px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; text-shadow:0 1px 2px rgba(0,0,0,.55)}
.wsProg{font-size:14.5px; color:var(--dim); margin-top:3px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.wsNext{font-size:13px; color:var(--dim); opacity:.85; margin-top:2px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.wsTopRight{flex:0 0 auto; display:flex; align-items:center}
/* the live badge: "● LIVE" at the edge, "−0:45 behind live" behind it, "RECORDING" for a recording */
.wsBadge{display:none; padding:5px 11px 6px; border-radius:999px; font-size:13.5px; font-weight:650; letter-spacing:.4px;
  background:rgba(19,44,82,.86); border:1px solid var(--line); color:var(--text); font-variant-numeric:tabular-nums; white-space:nowrap}
.wsBadge.live{background:linear-gradient(180deg,#2E9BFF,#1E6FD9); border-color:#57B6FF; color:#04121f}

/* ---------- bottom chrome: seek row, transport row, label (§2.3 items 7–10) ---------- */
.wsBottom{position:absolute; left:0; right:0; bottom:0; padding:10px 18px calc(12px + var(--sab));
  background:linear-gradient(to top,rgba(0,0,0,.86),rgba(0,0,0,.5) 62%,rgba(0,0,0,0));
  transition:transform .2s ease,opacity .2s ease; will-change:transform,opacity}
.wsBottom.wsOff{transform:translateY(104%); opacity:0; pointer-events:none}
.wsSeek{position:relative; display:flex; align-items:center; gap:12px; margin:2px 2px 8px}
.wsPos,.wsEnd{flex:0 0 auto; font-size:13px; color:var(--dim); font-variant-numeric:tabular-nums; min-width:44px}
.wsEnd{text-align:right; color:var(--text)}
.wsBar{position:relative; flex:1 1 auto; height:22px; display:flex; align-items:center; touch-action:none; cursor:pointer}
.wsBar::before{content:""; position:absolute; left:0; right:0; top:50%; height:5px; margin-top:-2.5px; border-radius:3px; background:rgba(234,243,255,.22)}
.wsFill{position:absolute; left:0; top:50%; height:5px; margin-top:-2.5px; border-radius:3px; background:var(--accent); width:0}
.wsThumb{position:absolute; top:50%; width:13px; height:13px; margin:-6.5px 0 0 -6.5px; border-radius:50%; background:var(--text); left:0;
  box-shadow:0 0 0 2px rgba(46,155,255,.55)}
.wsBar:focus{outline:none}
.wsBar:focus .wsThumb{box-shadow:0 0 0 3px var(--focus)}
.wsBubble{position:absolute; bottom:26px; transform:translateX(-50%); padding:4px 9px; border-radius:8px; font-size:12.5px; white-space:nowrap;
  background:rgba(11,27,51,.95); border:1px solid var(--line); color:var(--text); display:none; font-variant-numeric:tabular-nums; pointer-events:none}
.wsTransport{display:flex; align-items:center; gap:6px; flex-wrap:nowrap; overflow-x:auto; scrollbar-width:none}
.wsTransport::-webkit-scrollbar{display:none}
.wsBtn{flex:0 0 auto; display:inline-flex; align-items:center; gap:7px; padding:9px 12px; border-radius:11px; font-size:14px;
  background:rgba(19,44,82,.74); border:1px solid var(--line); color:var(--text); white-space:nowrap}
.wsBtn .wsIc{font-size:15px; line-height:1}
.wsBtn:hover{background:rgba(26,58,102,.96)}
.wsBtn:focus{outline:none; background:var(--focus); color:#04121f; border-color:var(--focus)}
.wsBtn .wsIc.on{color:var(--accent)}
.wsBtn:focus .wsIc.on{color:#04121f}
.wsBtn.wsBig{padding:9px 15px; font-weight:600}
.wsBtn.wsDisc{min-width:104px}
.wsBtn[hidden]{display:none !important}
.wsGap{flex:1 1 auto; min-width:10px}
.wsLabel{height:18px; margin:5px 2px 0; font-size:12.5px; letter-spacing:.3px; color:var(--dim); overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.wsLabel:empty{visibility:hidden}
/* "Report sent", above the transport row, 1.8 s (§2.3 item 3) */
.wsSent{position:absolute; left:50%; transform:translateX(-50%); bottom:calc(100% + 2px); padding:7px 14px; border-radius:999px;
  font-size:13.5px; background:rgba(19,44,82,.97); border:1px solid #57B6FF; color:var(--text); opacity:0;
  transition:opacity .15s linear; pointer-events:none; white-space:nowrap}
.wsSent.shown{opacity:1}
.wsSent.bad{border-color:var(--danger); color:#ffd9d9}

/* ---------- the error card (§2.3 item 5) ---------- */
.wsCard{position:absolute; inset:0; display:flex; align-items:center; justify-content:center; background:rgba(4,10,20,.74)}
.wsCard.hidden{display:none}
.wsCardBox{max-width:min(560px,86vw); background:var(--panel); border:1px solid var(--line); border-radius:16px; padding:26px 26px 20px;
  box-shadow:0 18px 48px rgba(0,0,0,.5)}
.wsCardBox h2{margin:0 0 8px; font-size:20px; font-weight:650}
.wsCardBox p{margin:0 0 18px; color:var(--dim); font-size:15px; line-height:1.45}
.wsCardBtns{display:flex; gap:10px; flex-wrap:wrap}
.wsCardBtns .wsBtn.primary{background:var(--accent); border-color:var(--accent); color:#04121f; font-weight:650}
.wsCardBtns .wsBtn.primary:focus{background:var(--focus)}

/* ---------- the trial banner (§2.3 item 6) ---------- */
.wsTrial{position:absolute; left:0; right:0; top:0; display:flex; align-items:center; gap:14px; justify-content:center;
  padding:calc(10px + var(--sat)) 18px 10px; background:linear-gradient(180deg,rgba(19,44,82,.99),rgba(19,44,82,.92));
  border-bottom:1px solid var(--line); font-size:14.5px; z-index:6}
.wsTrial.hidden{display:none}
.wsTrial .wsBtn{padding:6px 14px}

/* ---------- the Play disc (§2.3 item 13) ---------- */
.wsTap{position:absolute; left:50%; top:50%; transform:translate(-50%,-50%); display:flex; flex-direction:column; align-items:center; gap:10px;
  padding:18px 22px; border-radius:16px; background:rgba(11,27,51,.74); border:1px solid var(--line); color:var(--text); font-size:14px}
.wsTap.hidden{display:none}
.wsTap:focus{outline:none; border-color:var(--focus); background:rgba(19,44,82,.92)}
.wsTapDisc{width:64px; height:64px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:26px;
  background:var(--accent); color:#04121f; padding-left:4px}

/* ---------- Channels over the picture's left (§2.3 item 12) ---------- */
.wsChannels{position:absolute; left:0; top:0; bottom:0; width:min(320px,72vw); background:rgba(11,27,51,.97); border-right:1px solid var(--line);
  display:flex; flex-direction:column; z-index:5}
.wsChannels.hidden{display:none}
.wsChHead{display:flex; align-items:center; justify-content:space-between; padding:calc(10px + var(--sat)) 14px 10px; font-size:13px; letter-spacing:.6px; color:var(--dim); text-transform:uppercase}
.wsChList{overflow-y:auto; padding:0 8px 12px}
.wsChRow{display:block; width:100%; text-align:left; padding:10px 12px; border-radius:9px; font-size:14.5px; color:var(--text)}
.wsChRow:hover,.wsChRow:focus{outline:none; background:var(--panel2)}
.wsChRow.playing{background:rgba(46,155,255,.2); color:#fff; font-weight:600}

/* the page's W53-6 guide overlay, hosted as the layer over the picture (grid replacement: 3b) */
.wsGuideHost{position:absolute; inset:0; z-index:3; pointer-events:none; display:none}
.wsGuideHost>*{pointer-events:auto}
#watchSurface.ws-guide .wsGuideHost{display:block}
#watchSurface.ws-guide .wsScrim{opacity:1}
#watchSurface .wsGuideHost #guideOverlay{position:absolute; inset:6% 6% 12%; background:rgba(11,27,51,.96); border:1px solid var(--line); border-radius:14px}

/* ---------- phone upright (§2.3 item 12): header, picture, two rows, programme line, lineup ---------- */
#watchSurface[data-mode="phone-portrait"]{background:var(--bg); overflow-y:auto}
#watchSurface[data-mode="phone-portrait"] .wsPicture{position:relative; inset:auto; width:100%; aspect-ratio:16/9; height:auto}
#watchSurface[data-mode="phone-portrait"] .wsScrim{display:none}
#watchSurface[data-mode="phone-portrait"] .wsTop{display:none}
#watchSurface[data-mode="phone-portrait"] .wsHeader{display:flex}
#watchSurface[data-mode="phone-portrait"] .wsBottom{position:relative; inset:auto; background:none; padding:12px 14px calc(14px + var(--sab)); transform:none; opacity:1}
#watchSurface[data-mode="phone-portrait"] .wsSeek{margin:0 0 12px}
#watchSurface[data-mode="phone-portrait"] .wsTransport{display:none}
#watchSurface[data-mode="phone-portrait"] .wsLabel{display:none}
#watchSurface[data-mode="phone-portrait"] .wsPhoneRows{display:block}
#watchSurface[data-mode="phone-portrait"] .wsPhoneList{display:block}
#watchSurface[data-mode="phone-portrait"] .wsSent{top:-42px; bottom:auto}
.wsPhoneRows{display:none}
.wsPhoneRow1,.wsPhoneRow2{display:flex; align-items:center; justify-content:space-between; gap:8px}
.wsPhoneRow2{margin-top:10px}
.wsPhoneRow1 .wsBtn,.wsPhoneRow2 .wsBtn{flex:1 1 0; justify-content:center; flex-direction:column; gap:4px; padding:10px 6px; font-size:12px}
.wsPhoneRow1 .wsBtn.wsBig{background:var(--accent); border-color:var(--accent); color:#04121f; flex:1.2 1 0}
.wsPhoneRow1 .wsBtn .wsIc{font-size:18px}
.wsMore{display:flex; gap:8px; margin-top:10px; flex-wrap:wrap}
.wsMore[hidden]{display:none}
.wsPhoneRows[data-more="0"] .wsMore{display:none}
.wsHeader{display:none; position:relative; align-items:center; gap:10px; padding:calc(8px + var(--sat)) 12px 8px; background:#0B1B33; border-bottom:1px solid var(--line)}
#wsHeaderBack{width:34px; height:34px; border-radius:50%; background:var(--panel); font-size:18px; border:1px solid var(--line); color:var(--text)}
#wsHeaderName{font-size:16px; font-weight:650; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.wsPhoneList{display:none; padding:12px 14px calc(16px + var(--sab))}
.wsPhoneList .wsChRow{font-size:15px; padding:11px 12px}

/* ---------- phone sideways (§2.3 item 12): the picture fills; a tap brings the chrome ---------- */
#watchSurface[data-mode="phone-landscape"] .wsHeader{display:none}
#watchSurface[data-mode="phone-landscape"] .wsTop{padding:calc(6px + var(--sat)) 12px 6px}
#watchSurface[data-mode="phone-landscape"] .wsName{font-size:17px}
#watchSurface[data-mode="phone-landscape"] .wsBottom{padding:6px 12px calc(6px + var(--sab))}
#watchSurface[data-mode="phone-landscape"] .wsTransport{display:none}
#watchSurface[data-mode="phone-landscape"] .wsPhoneRows{display:block}
#watchSurface[data-mode="phone-landscape"] .wsLabel{display:none}
#watchSurface[data-mode="phone-landscape"] .wsPhoneRow1 .wsBtn,#watchSurface[data-mode="phone-landscape"] .wsPhoneRow2 .wsBtn{padding:7px 6px; font-size:11px}
#watchSurface[data-mode="phone-landscape"] .wsPhoneRow2{margin-top:6px}
#watchSurface[data-mode="phone-landscape"] .wsSent{top:-38px; bottom:auto}

/* ---------- tablet sideways (§2.3 item 12): the TV arrangement, touch-sized rows ---------- */
#watchSurface[data-mode="tablet-landscape"] .wsBtn{padding:12px 15px; font-size:14.5px}
#watchSurface[data-mode="tablet-landscape"] .wsTop{padding:calc(16px + var(--sat)) 22px 16px}
#watchSurface[data-mode="tablet-landscape"] .wsBottom{padding:12px 22px calc(14px + var(--sab))}

/* ---------- fill the window (§C1 delta 4): the picture fills; a tap brings the chrome back ---------- */
#watchSurface[data-mode="fill"] .wsTop .wsBack{display:none}

@media (max-height:340px){
  .wsName{font-size:16px} .wsProg{font-size:12.5px} .wsNext{display:none}
  .wsBtn{padding:7px 10px; font-size:13px}
}

/* ---------- Settings → Playback (§2.3): the two settings the watching surface obeys ---------- */
.setRow{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:12px 0;border-top:1px solid var(--line)}
.setRow:first-of-type{border-top:0}
.setLbl{font-size:15.5px;color:var(--text)}
.setCtl{display:flex;gap:8px;flex-wrap:wrap}
.setChip{padding:8px 14px;border-radius:999px;background:var(--panel2);border:1px solid var(--line);color:var(--text);font-size:14px}
.setChip.on{background:var(--accent);border-color:var(--accent);color:#04121f;font-weight:650}
.setChip:focus{outline:none;border-color:var(--focus);box-shadow:0 0 0 2px rgba(87,182,255,.45)}
/* a channel with no logo keeps the mark's place, not a blank box (the app draws a mark) */
.wsLogoMark{width:44px; height:44px; border-radius:8px; display:none; align-items:center; justify-content:center;
  background:linear-gradient(180deg,#1E6FD9,#132C52); color:#EAF3FF; font-size:20px; font-weight:700; border:1px solid var(--line)}
