/* Only #watch and isolated chat classes. No player or media element changes. */
#watch.watch-chat-enabled:not([hidden]){display:grid!important;grid-template-columns:minmax(0,1fr) minmax(285px,365px)!important;gap:12px!important;align-items:center!important;padding:12px!important;overflow-y:auto!important}
#watch.watch-chat-enabled .playerframe{width:100%!important;min-width:0!important;margin:0!important}
.wc-panel{font-family:inherit;box-sizing:border-box;color:#f4f4f5;background:#181b22;border:1px solid #393d49;border-radius:12px;display:flex;flex-direction:column;min-height:350px;height:min(80vh,760px);overflow:hidden;font-size:13px}
.wc-panel *{box-sizing:border-box}
.wc-head{padding:15px;background:#222633;border-bottom:1px solid #3b3f4a;display:flex;justify-content:space-between;align-items:flex-start;gap:9px}
.wc-head strong{display:block;font-size:13px;letter-spacing:.6px}.wc-head small{display:block;color:#b2b4bf;margin-top:5px;max-width:210px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.wc-head span{font-size:11px;color:#72e3a4;white-space:nowrap}
.wc-qr-row{padding:9px 12px;border-bottom:1px solid #343842;display:flex;gap:10px;align-items:center}.wc-qr-row img{width:86px;height:86px;background:#fff;padding:4px;border-radius:5px}.wc-qr-row strong{font-size:12px}.wc-qr-row p{font-size:11px;line-height:1.4;color:#bec0cb;margin:5px 0}.wc-panel button{cursor:pointer;border:1px solid #575d6d;background:#2e3443;color:#f8f8fc;border-radius:6px;padding:6px 10px;font-size:11px}.wc-panel button:hover{background:#444c61}.wc-status{padding:7px 12px;font-size:11px;color:#c4c8d2;background:#1f222b}.wc-join{padding:12px;display:grid;gap:10px}.wc-join label{font-size:12px;display:grid;gap:5px}.wc-join input[type=text],.wc-join input:not([type]){padding:9px;background:#0e1118;color:white;border:1px solid #4b4f58;border-radius:5px}.wc-consent{display:flex!important;flex-direction:row!important;align-items:flex-start;gap:6px!important;line-height:1.4}
.wc-nav{display:flex;padding:6px;border-bottom:1px solid #343842;gap:5px}.wc-nav button{flex:1}.wc-nav button[aria-pressed=true]{background:#b92d45;border-color:#d34a61}
.wc-messages,.wc-people{flex:1;min-height:100px;overflow-y:auto;padding:10px 12px}.wc-message{padding:8px 0;border-bottom:1px solid #2a2d36;overflow-wrap:anywhere}.wc-message-head{display:flex;gap:8px;align-items:center;justify-content:space-between}.wc-message-head strong{color:#9fbfff;font-size:12px}.wc-message-head strong.wc-me{color:#77e0a0}.wc-message-head time{font-size:10px;color:#999fad}.wc-message p{font-size:12px;line-height:1.45;color:#e3e6ec;margin:5px 0}.wc-message-actions button{background:none;border:0;color:#8f96a9;font-size:10px;padding:2px 0}.wc-person{display:flex;align-items:center;justify-content:space-between;gap:5px;padding:10px 0;border-bottom:1px solid #30343f}.wc-person span{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis}.wc-person .wc-block{color:#c8a4a9}.wc-empty{color:#b2b4be}.wc-send{display:flex;gap:6px;padding:10px;border-top:1px solid #373b47}.wc-send input{flex:1;width:0;background:#11141b;color:white;padding:9px;border:1px solid #484d59;border-radius:5px}.wc-send button{background:#b52b44;border-color:#c83b54}.wc-footer{font-size:10px;color:#989fae;padding:8px 12px;border-top:1px solid #313540}
#sleeprx9-watch-chat [hidden]{display:none!important}
body.wc-mobile{background:#0b0c0f;margin:0;padding:16px}.wc-mobile-header{color:#f3f4f6;max-width:700px;margin:0 auto 10px;font-family:system-ui}.wc-mobile-header a{color:#c9d5ff}.wc-mobile-header h1{margin:12px 0 8px;font-size:22px}#wc-mobile-root{max-width:700px;margin:0 auto}#wc-mobile-root .wc-panel{height:min(85vh,850px)}
@media(max-width:920px){#watch.watch-chat-enabled:not([hidden]){display:flex!important;flex-direction:column!important;justify-content:flex-start!important;align-items:stretch!important;padding:8px!important}#watch.watch-chat-enabled .playerframe{max-height:none!important}#watch .wc-panel{width:100%;height:48vh;min-height:300px;flex-shrink:0}}

/* R3 TV Guide styling, scoped to chat only. */
.wc-panel{background:var(--ui-surface,#171717)!important;border:1px solid var(--ui-divider,#363636)!important;border-radius:5px!important;color:#eeeeef!important;box-shadow:0 8px 28px rgba(0,0,0,.24)}
.wc-head{background:#202020!important;border-bottom:1px solid #393939!important;padding:13px 15px!important}
.wc-overline{display:block;letter-spacing:1.6px;font-size:9px;color:#ff5966;font-weight:800;margin-bottom:5px}
.wc-head strong{font-size:15px!important;letter-spacing:1.2px}.wc-head small{color:#a8a8a8!important}
.wc-head span#wc-count{color:#83d3a3!important;font-size:10px!important}
.wc-qr-row,.wc-nav,.wc-send,.wc-footer{border-color:#353535!important}
.wc-qr-row{background:#1b1b1b!important}.wc-qr-row p,.wc-footer{color:#9b9b9b!important}
.wc-status{background:#151515!important;color:#bcbcbc!important}
.wc-panel button{border-radius:4px!important;background:#292929!important;border:1px solid #494949!important;color:#eee!important}
.wc-panel button:hover{background:#353535!important}
.wc-nav button[aria-pressed=true],.wc-send button{background:#a72d42!important;border-color:#c34257!important;color:#fff!important}
.wc-messages,.wc-people{background:#131313!important}
.wc-message{border-color:#303030!important}.wc-message p{color:#e0e0e0!important}
.wc-message-head strong{color:#c7c7c7!important}.wc-message-head strong.wc-me{color:#f57d8e!important}
.wc-send input,.wc-join input,.wc-nick-edit input{background:#0b0b0b!important;border:1px solid #4a4a4a!important;color:#fff!important;border-radius:4px!important}
.wc-profile{display:flex;align-items:center;justify-content:space-between;gap:9px;padding:8px 12px;background:#1b1b1b;border-bottom:1px solid #353535;font-size:10px;letter-spacing:.5px}
.wc-profile span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:700;color:#ccc}
.wc-profile button{font-size:10px!important;white-space:nowrap}
.wc-nick-edit{display:flex;flex-wrap:wrap;gap:7px;align-items:center;padding:10px 12px;background:#222;border-bottom:1px solid #373737}
.wc-nick-edit label{width:100%;font-size:11px;color:#ddd}.wc-nick-edit input{flex:1;min-width:100px;padding:8px}
.wc-nick-edit[hidden],.wc-profile[hidden]{display:none!important}
/* Mobile watch + chat */
body.wc-mobile{padding:0!important;background:#0b0b0b!important;font-family:Inter,ui-sans-serif,system-ui,Arial,sans-serif}
.wc-mobile-header{max-width:none!important;border-bottom:1px solid #303030;background:#111;padding:15px max(16px,calc((100vw - 1200px)/2))!important;margin:0!important}
.wc-mobile-header a{color:#f4f4f4!important;font-weight:900;text-decoration:none;letter-spacing:1.3px}
.wc-mobile-header h1{font-size:18px!important;margin:7px 0 4px!important;letter-spacing:-.3px}.wc-mobile-header p{color:#a6a6a6!important;font-size:12px;margin:0}
.wc-mobile-layout{width:min(1240px,100%);padding:14px;margin:0 auto;display:grid;grid-template-columns:minmax(0,1.7fr) minmax(285px,360px);gap:12px;align-items:start}
.wc-watch-card{border:1px solid #343434;background:#181818;border-radius:5px;overflow:hidden;color:#fff;min-width:0}
.wc-watch-meta{display:flex;align-items:center;gap:10px;padding:12px;border-bottom:1px solid #353535;flex-wrap:wrap}
.wc-live-pill{background:#b62841;border-radius:3px;font-size:10px;font-weight:800;padding:4px 7px;letter-spacing:1px}
.wc-watch-title{font-size:14px;font-weight:800;flex:1}.wc-watch-subtitle{font-size:11px;color:#aaa;padding:0 12px 12px}
.wc-watch-video{position:relative;aspect-ratio:16/9;background:#000}.wc-watch-video video,.wc-watch-video iframe{width:100%;height:100%;display:block;border:0;object-fit:contain;background:#000}
.wc-watch-empty{position:absolute;inset:0;display:grid;place-items:center;color:#ccc;padding:20px;text-align:center;font-size:13px;background:#060606}
.wc-watch-actions{display:flex;gap:8px;align-items:center;padding:10px 12px;border-top:1px solid #343434;flex-wrap:wrap}
.wc-watch-actions button{background:#292929;color:#fff;border:1px solid #555;border-radius:4px;padding:8px 10px;font-size:12px;cursor:pointer}
.wc-watch-actions .wc-live-sync{color:#b9b9b9;font-size:11px;margin-left:auto}
#wc-mobile-root{max-width:none!important;margin:0!important;min-width:0}
#wc-mobile-root .wc-panel{width:100%;height:min(76vh,840px)!important}
@media(max-width:850px){.wc-mobile-layout{grid-template-columns:1fr;padding:9px}.wc-watch-meta{padding:9px}.wc-mobile-header{padding:12px!important}#wc-mobile-root .wc-panel{height:60vh!important;min-height:340px}.wc-watch-actions .wc-live-sync{margin-left:0}}

/* R3.1 mobile audio controls */
.wc-volume-label{font-size:11px;color:#aaa}
#wc-volume{accent-color:#b62841;width:110px;max-width:25vw}
#wc-mute{min-width:75px}

/* SLEEPRX9-WATCH-CHAT-VIDEO-VISIBILITY-FIX */
#wc-watch-empty[hidden]{display:none!important}


/* SLEEPRX9-WATCH-CHAT-DARK-THEME-R1 */
:root {
  --wc-bg-1: #05070b;
  --wc-bg-2: #0a0d14;
  --wc-panel: rgba(10, 14, 22, 0.94);
  --wc-panel-2: rgba(14, 18, 28, 0.96);
  --wc-border: rgba(255, 255, 255, 0.08);
  --wc-border-soft: rgba(255, 255, 255, 0.05);
  --wc-text: #e9edf7;
  --wc-text-soft: #aeb8cc;
  --wc-accent: #8b5cf6;
  --wc-accent-2: #5b7cff;
  --wc-message: rgba(255, 255, 255, 0.05);
  --wc-message-me: rgba(91, 124, 255, 0.18);
  --wc-input: rgba(255, 255, 255, 0.04);
}

body {
  background:
    radial-gradient(circle at top left, rgba(91,124,255,0.14), transparent 28%),
    radial-gradient(circle at top right, rgba(139,92,246,0.12), transparent 22%),
    linear-gradient(180deg, var(--wc-bg-2) 0%, var(--wc-bg-1) 100%);
  color: var(--wc-text);
}

body,
.wc-app,
.wc-shell,
.wc-layout {
  color: var(--wc-text);
}

.wc-app,
.wc-shell,
.wc-layout,
.wc-main,
.wc-sidebar,
.wc-chat,
.wc-chat-panel,
.wc-watch-panel,
.wc-panel,
.wc-card {
  background: transparent;
}

.wc-chat-panel,
.wc-sidebar,
.wc-card,
.wc-panel,
.wc-watch-panel,
.wc-room-meta,
.wc-join-panel,
.wc-qr-panel,
.wc-private-panel {
  background: var(--wc-panel);
  border: 1px solid var(--wc-border);
  box-shadow: 0 18px 50px rgba(0,0,0,0.34);
  border-radius: 16px;
  backdrop-filter: blur(10px);
}

.wc-chat-header,
.wc-room-header,
.wc-panel-header,
.wc-sidebar-header {
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
  border-bottom: 1px solid var(--wc-border-soft);
}

.wc-messages,
.wc-chat-messages,
.wc-thread,
.wc-message-list {
  background: rgba(0,0,0,0.18);
  border: 1px solid var(--wc-border-soft);
  border-radius: 14px;
}

.wc-message,
.wc-bubble,
.wc-chat-bubble {
  background: var(--wc-message);
  border: 1px solid rgba(255,255,255,0.04);
  color: var(--wc-text);
  border-radius: 14px;
}

.wc-message.me,
.wc-bubble.me,
.wc-chat-bubble.me,
.wc-message.self {
  background: var(--wc-message-me);
  border-color: rgba(91,124,255,0.24);
}

.wc-message-meta,
.wc-meta,
.wc-subtle,
.wc-room-subtitle,
.wc-channel-subtitle,
.wc-help,
.wc-note,
.wc-empty-note {
  color: var(--wc-text-soft);
}

input,
textarea,
select,
.wc-input,
.wc-composer input,
.wc-composer textarea,
.wc-nickname-row input,
.wc-private-row input {
  background: var(--wc-input);
  color: var(--wc-text);
  border: 1px solid var(--wc-border);
  border-radius: 12px;
}

input::placeholder,
textarea::placeholder {
  color: #8f9ab0;
}

button,
.wc-button,
.wc-primary,
.wc-send,
.wc-join-btn,
.wc-save-nickname {
  background: linear-gradient(135deg, var(--wc-accent-2), var(--wc-accent));
  color: white;
  border: 0;
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(91,124,255,0.24);
}

button:hover,
.wc-button:hover,
.wc-primary:hover,
.wc-send:hover {
  filter: brightness(1.06);
}

.wc-secondary,
.wc-muted-button {
  background: rgba(255,255,255,0.06);
  color: var(--wc-text);
  border: 1px solid var(--wc-border);
  box-shadow: none;
}

a {
  color: #9ab1ff;
}

.wc-watch-empty,
#wc-watch-empty {
  background: linear-gradient(180deg, rgba(7,10,16,0.88), rgba(5,7,11,0.92));
  color: var(--wc-text);
  border: 1px solid var(--wc-border);
  border-radius: 16px;
}

.wc-qr-panel img,
.wc-qr-card img,
img.wc-qr {
  background: #fff;
  padding: 10px;
  border-radius: 12px;
}

.wc-chat-panel,
.wc-sidebar,
.wc-room-meta,
.wc-join-panel,
.wc-private-panel,
.wc-qr-panel {
  overflow: hidden;
}

/* SLEEPRX9-TRUE-BLACK-THEME-R2 */

:root {
  --wc-bg-1: #000000;
  --wc-bg-2: #000000;
  --wc-panel: #050505;
  --wc-panel-2: #070707;
  --wc-border: #202020;
  --wc-border-soft: #171717;
  --wc-message: #0a0a0a;
  --wc-message-me: #101018;
  --wc-input: #080808;
  --wc-text: #f5f5f5;
  --wc-text-soft: #aaaaaa;
}

html, body {
  background: #000000 !important;
  color: #f5f5f5;
}

.wc-app, .wc-shell, .wc-layout,
.wc-main, .wc-chat, .wc-sidebar {
  background: #000000 !important;
}

.wc-chat-panel, .wc-card, .wc-panel,
.wc-watch-panel, .wc-room-meta,
.wc-join-panel, .wc-private-panel,
.wc-qr-panel, .wc-sidebar {
  background: #050505 !important;
  border-color: #202020 !important;
  box-shadow: none !important;
}

.wc-chat-header, .wc-room-header,
.wc-panel-header, .wc-sidebar-header {
  background: #050505 !important;
  border-color: #202020 !important;
}

.wc-messages, .wc-chat-messages,
.wc-thread, .wc-message-list {
  background: #000000 !important;
  border-color: #171717 !important;
}

.wc-message, .wc-bubble, .wc-chat-bubble {
  background: #0a0a0a !important;
  border-color: #171717 !important;
}

.wc-message.me, .wc-bubble.me,
.wc-chat-bubble.me, .wc-message.self {
  background: #101018 !important;
}

input, textarea, select,
.wc-input, .wc-composer input,
.wc-composer textarea,
.wc-nickname-row input,
.wc-private-row input {
  background: #080808 !important;
  border-color: #252525 !important;
  color: #f5f5f5 !important;
}

.wc-watch-empty,
#wc-watch-empty {
  background: #000000 !important;
}

#wc-watch-empty[hidden] {
  display: none !important;
}
