/* ══════════════════════════════════════════════════════════════════════
   Canvas Items + Watch Party Theater Mode

   Extraído de sidebar.css (Anti-Monolith Sección XIV) — el archivo
   principal había crecido a 1018 líneas mezclando estilos del sidebar
   verticales con la anatomía completa de stickies del canvas y el
   theater mode de Watch Party. Este archivo concentra:

     - Anatomía de canvas items (note, AI Q+A, action bars, stack picker)
     - Iterar + accordion de turnos (Sprint C v5.7.27.44)
     - Watch Party Theater Mode (rediseño Fase 7ac)

   sidebar.css queda con los estilos puros del nav vertical (grupos,
   labels, focus mine, espacios home, créditos pill).
   ══════════════════════════════════════════════════════════════════════ */

/* ── Canvas sticky — nueva anatomía paper-look (Fase 7ab) ────────────────── */

.canvas-item--note {
  border-radius: 4px;
  padding: 14px 16px 30px;
  font-size: 13px;
  color: var(--sticky-text);
  line-height: 1.5;
  box-shadow: 0 6px 14px rgba(0,0,0,0.28);
  transform: rotate(-0.3deg);
  transition: box-shadow 0.15s, transform 0.15s;
}
.canvas-item--note:hover {
  box-shadow: 0 14px 28px rgba(0,0,0,0.42), 0 0 0 1px rgba(255,255,255,0.08);
  transform: translateY(-2px) rotate(-0.3deg);
}

.canvas-note-author {
  position: absolute;
  bottom: 8px;
  /* [v5.7.16] Footer en una sola línea. `left:22px` y `right:22px` apartan
     el texto del área de los resize handles SW/SE (14×14 en esquinas) para
     que el nickname no quede tapado visualmente por los indicadores "L".
     `z-index:7` asegura que si se solapa, el texto queda encima (los
     handles tienen z:6). flex-wrap:nowrap evita el wrap vertical. */
  left: 22px;
  right: 22px;
  z-index: 7;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  font-size: 10px;
  color: rgba(58,42,16,0.55);
  pointer-events: none;
  border: none;
  padding: 0;
  margin: 0;
  background: transparent;
  white-space: nowrap;
  overflow: hidden;
}
.canvas-note-author__name,
.canvas-note-author__time,
.canvas-note-author__date,
.canvas-note-author__sep { pointer-events: none; }
/* [v5.7.15] Fecha en formato dd-mm-yyyy / mm-dd-yyyy: tono ligeramente más
   tenue que el nickname para mantener jerarquía visual nombre > fecha > hora. */
.canvas-note-author__date { opacity: 0.85; font-variant-numeric: tabular-nums; flex-shrink: 0; }
/* [v5.7.16] La hora y los separadores son fijos — nunca se comprimen.
   El nickname es el único que puede truncarse con elipsis si el sticky
   queda más angosto que el footer completo. */
.canvas-note-author__time { font-variant-numeric: tabular-nums; flex-shrink: 0; }
.canvas-note-author__sep { flex-shrink: 0; }
/* [v5.7.16] El nickname NO se trunca — el footer entero ocupa una fila
   completa. El sticky tiene un `min-width` inline calculado dinámicamente
   en _renderCanvas que garantiza que todo el footer cabe sin elipsis. */
.canvas-note-author__name { flex-shrink: 0; }
.canvas-note-author__vis {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  padding: 2px;
  border-radius: 3px;
  transition: background 0.1s;
}
.canvas-note-author__vis:hover { background: rgba(58,42,16,0.08); }
.canvas-note-author__vis svg,
.canvas-note-author__vis i { width: 11px; height: 11px; }

/* ── Canvas item action bar — pill flotante (Fase 7ab) ──────────────────── */

.canvas-item__actionbar {
  position: absolute;
  left: 50%;
  /* [v5.7.27.3] Acercada al mínimo respiratorio: -56px → -46px. Deja ~6px
     de gap entre el border-bottom punteado del sticky y el top de la pill —
     suficiente para que el dashed border no quede tocado visualmente, pero
     mucho más compacto que los 16px previos. El ::before bridge se ajusta
     proporcionalmente para mantener el hover handoff sticky↔pill. */
  bottom: -46px;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 5px;
  background: linear-gradient(180deg, var(--cv-panel-raised), var(--cv-panel));
  border: 1px solid var(--cv-border-strong);
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.35);
  font-family: Inter, -apple-system, system-ui, sans-serif;
  opacity: 0;
  pointer-events: none;
  z-index: 10;
  /* CSS es instantáneo; el grace de 2s se maneja en JS con setTimeout.
     Evita conflicto: si CSS tuviera delay, remover data-ab-open via JS
     dispararía el delay sobre el cierre inmediato al pasar a otro sticky. */
  transition: opacity 0.2s ease 0s, visibility 0s linear 0.2s;
  visibility: hidden;
}
/* Puente invisible entre el sticky y la pill. Originalmente usado para mantener
   el hover durante el tránsito sticky→pill, pero `pointer-events: auto` sobre
   un bloque que se solapa con el fondo del sticky bloqueaba los handles de
   resize SW/SE (14×14 en las esquinas) en notas cuyo ancho ≤ ancho de la pill.
   Hoy el hover se mantiene vía el timer JS de 2s en _renderCanvas (ver
   data-ab-open), así que el bridge ya no necesita capturar eventos.
   `pointer-events: none` preserva el hueco visual sin bloquear el drag. */
.canvas-item__actionbar::before {
  content: '';
  position: absolute;
  /* [v5.7.27.3] Bridge sincronizado con bottom: -46px de la pill. */
  top: -46px;
  left: -16px;
  right: -16px;
  height: 46px;
  background: transparent;
  pointer-events: none;
}
/* Visibilidad controlada por JS via data-ab-open en el .canvas-item.
   Esto es más robusto que :hover porque evita la pérdida de hover
   cuando el cursor cambia de forma (pointer → arrow → grab) entre sub-elementos. */
.canvas-item[data-ab-open="1"] .canvas-item__actionbar {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  transition: opacity 0.15s ease 0s, visibility 0s linear 0s;
}

.canvas-item__actionbar-swatches {
  display: flex;
  gap: 4px;
  padding: 0 5px;
}
.canvas-item__actionbar-sw {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: transform 0.1s, box-shadow 0.1s;
}
.canvas-item__actionbar-sw:hover { transform: scale(1.2); }
.canvas-item__actionbar-sw.is-active {
  box-shadow: 0 0 0 1.5px var(--cv-violet-bright);
}

.canvas-item__actionbar-sep {
  width: 1px;
  height: 22px;
  background: var(--cv-border);
  margin: 0 3px;
}
.canvas-item__actionbar-btn {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  background: transparent;
  border: none;
  color: var(--cv-text-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: all 0.12s;
}
.canvas-item__actionbar-btn:hover {
  background: var(--cv-panel-hover);
  color: var(--cv-text);
}
.canvas-item__actionbar-btn--danger:hover { color: var(--cv-red, #f87171); }
.canvas-item__actionbar-btn svg,
.canvas-item__actionbar-btn i { width: 16px; height: 16px; }

/* ── Stack picker badge — overlap entre stickies (v5.7.27.96) ───────────── */

.canvas-item__stack-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 12;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  border: none;
  border-radius: 999px;
  background: rgba(0,0,0,0.78);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  font-family: Inter, -apple-system, system-ui, sans-serif;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.35);
  transition: background 0.12s, transform 0.12s;
}
.canvas-item__stack-badge:hover {
  background: rgba(0,0,0,0.92);
  transform: scale(1.05);
}
.canvas-item__stack-badge-icn { font-size: 11px; line-height: 1; }
.canvas-item__stack-badge-count { line-height: 1; }

.canvas-item__stack-picker {
  /* `position: fixed` y `top/left` los pone JS; aquí solo estilos visuales. */
  min-width: 240px;
  max-width: 320px;
  background: rgba(20,20,28,0.96);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.55);
  overflow: hidden;
  font-family: Inter, -apple-system, system-ui, sans-serif;
}
.canvas-item__stack-picker-title {
  padding: 8px 12px 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: rgba(255,255,255,0.5);
}
.canvas-item__stack-picker-hint {
  padding: 0 12px 8px;
  font-size: 10px;
  color: rgba(255,255,255,0.45);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.canvas-item__stack-picker-list {
  display: flex;
  flex-direction: column;
}
.canvas-item__stack-pick {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 12px;
  background: transparent;
  border: none;
  text-align: left;
  cursor: pointer;
  color: rgba(255,255,255,0.92);
  transition: background 0.1s;
}
.canvas-item__stack-pick:hover:not(:disabled) {
  background: rgba(255,255,255,0.08);
}
.canvas-item__stack-pick:disabled,
.canvas-item__stack-pick.is-current {
  background: rgba(255,255,255,0.04);
  cursor: default;
}
.canvas-item__stack-swatch {
  flex-shrink: 0;
  width: 12px;
  height: 12px;
  margin-top: 2px;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 3px;
}
.canvas-item__stack-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
  font-size: 11px;
}
.canvas-item__stack-preview {
  color: rgba(255,255,255,0.95);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.canvas-item__stack-meta {
  font-size: 10px;
  color: rgba(255,255,255,0.5);
}

/* ── Canvas AI Q+A note — anatomía violeta oscura (Fase 7ab) ────────────── */

.canvas-item.ai-question-note {
  /* El AI sticky hereda el color del sticky padre (como cualquier sticky pre-conversión).
     El background viene del inline style (bgColor). Texto oscuro sobre pastel. */
  color: var(--sticky-text);
  border-radius: 4px;
  padding: 14px 16px 30px;
  box-shadow: 0 6px 14px rgba(0,0,0,0.28);
  transform: rotate(-0.3deg);
  transition: box-shadow 0.15s, transform 0.15s;
  font-family: Inter, -apple-system, system-ui, sans-serif;
}
.canvas-item.ai-question-note:hover {
  box-shadow: 0 14px 28px rgba(0,0,0,0.42), 0 0 0 1px rgba(255,255,255,0.08);
  transform: translateY(-2px) rotate(-0.3deg);
}
.canvas-item.ai-question-note .ai-q-header,
.canvas-item.ai-question-note .ai-q-footer {
  border-radius: 8px;
}

.ai-q-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  margin-bottom: 10px;
  /* Header como pill translúcido sobre sticky color — estilo 'Ask about this article' */
  background: color-mix(in srgb, var(--ai-accent, #8b5cf6) 18%, rgba(255,255,255,0.55));
  border: 1px solid color-mix(in srgb, var(--ai-accent, #8b5cf6) 35%, transparent);
}
.ai-q-header-icn {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: linear-gradient(135deg,
    var(--ai-accent, var(--cv-violet-bright)),
    color-mix(in srgb, var(--ai-accent, var(--cv-violet-deep)) 65%, #000));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 2px 8px color-mix(in srgb, var(--ai-accent, #8b5cf6) 45%, transparent);
  flex-shrink: 0;
}
.ai-q-header-icn svg,
.ai-q-header-icn i { width: 12px; height: 12px; }
.ai-q-header-title {
  flex: 1;
  font-size: 11px;
  font-weight: 700;
  /* Violeta constante (como el pill "Ask about this article"). La pill bg ya
     comunica el acento de color — el texto debe ser siempre legible sobre
     pasteles claros (amarillo/gris/cyan). */
  color: var(--cv-violet-deep, #7c3aed);
  text-transform: uppercase;
  letter-spacing: 0.7px;
}
.ai-q-header-time { color: rgba(58,42,16,0.55); }
.ai-q-header-time { font-size: 10px; color: var(--cv-text-faint); }

.ai-q-source {
  display: flex;
  gap: 10px;
  padding: 10px 12px;
  margin-bottom: 10px;
  /* Card blanca translúcida sobre el sticky color — como el article card */
  background: rgba(255,255,255,0.82);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 8px;
}
.ai-q-source-avatar {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  background: #ec4899;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  flex-shrink: 0;
}
.ai-q-source-body {
  flex: 1;
  min-width: 0;
}
.ai-q-source-title {
  font-size: 11.5px;
  color: var(--sticky-text);
  font-weight: 500;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ai-q-source-outlet {
  font-size: 10px;
  color: rgba(58,42,16,0.55);
  margin-top: 2px;
}

.ai-q-body {
  padding: 0;
}
.ai-q-question {
  font-size: 13px;
  font-weight: 600;
  color: var(--sticky-text);
  line-height: 1.45;
  margin-bottom: 8px;
}
.ai-q-answer {
  font-size: 12.5px;
  color: rgba(58,42,16,0.82);
  line-height: 1.55;
  white-space: pre-wrap;
}
.ai-q-input {
  width: 100%;
  min-height: 80px;
  background: rgba(255,255,255,0.7);
  border: 1px solid rgba(0,0,0,0.10);
  border-radius: 6px;
  padding: 8px 10px;
  color: var(--sticky-text);
  font-family: inherit;
  font-size: 12.5px;
  line-height: 1.5;
  resize: vertical;
  outline: none;
  transition: border 0.12s;
}
.ai-q-input:focus { border-color: var(--sbr-violet-border); }
.ai-q-submit {
  margin-top: 8px;
  padding: 7px 14px;
  background: linear-gradient(135deg, var(--sbr-violet), var(--cv-violet-deep));
  color: #fff;
  border: none;
  border-radius: 6px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: filter 0.12s;
}
.ai-q-submit:hover:not(:disabled) { filter: brightness(1.15); }
.ai-q-submit:disabled { opacity: 0.55; cursor: not-allowed; }

.ai-q-pending-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 0;
}
.ai-q-pending-spinner svg,
.ai-q-pending-spinner i {
  width: 18px;
  height: 18px;
  color: var(--cv-violet-bright);
  animation: ai-q-spin 0.9s linear infinite;
}
@keyframes ai-q-spin { to { transform: rotate(360deg); } }

.ai-q-error {
  margin-top: 8px;
  padding: 8px 10px;
  background: rgba(248,113,113,0.12);
  border: 1px solid rgba(248,113,113,0.28);
  border-radius: 6px;
  color: #fca5a5;
  font-size: 12px;
  line-height: 1.45;
}
.ai-q-retry {
  margin-top: 8px;
  padding: 6px 12px;
  background: transparent;
  border: 1px solid var(--cv-border-strong);
  border-radius: 6px;
  color: var(--cv-text-dim);
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.ai-q-retry:hover { background: var(--cv-panel-hover); color: var(--cv-text); }

.ai-q-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 4px 0;
  margin-top: 10px;
  border-top: 1px solid rgba(58,42,16,0.12);
  background: transparent;
  gap: 10px;
}
.ai-q-lock {
  font-size: 10.5px;
  color: rgba(58,42,16,0.55);
  display: flex;
  align-items: center;
  gap: 5px;
}
.ai-q-lock svg,
.ai-q-lock i { width: 10.5px; height: 10.5px; }
.ai-q-copy {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  background: transparent;
  border: 1px solid var(--cv-border);
  border-radius: 5px;
  color: var(--cv-text-dim);
  font-size: 10.5px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}
.ai-q-copy:hover,
.ai-q-copy.is-copied {
  background: color-mix(in srgb, var(--ai-accent, #8b5cf6) 15%, transparent);
  border-color: color-mix(in srgb, var(--ai-accent, #8b5cf6) 35%, transparent);
  color: color-mix(in srgb, var(--ai-accent, var(--cv-violet-bright)) 70%, #fff);
}
.ai-q-copy svg,
.ai-q-copy i { width: 11px; height: 11px; }

/* ── [Sprint C v5.7.27.44] AI Question — Iterar (botón) + accordion de turnos ── */

/* Botón "Iterar" en el footer (estado answered, solo autor). */
.ai-q-iterate {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  background: color-mix(in srgb, var(--ai-accent, #8b5cf6) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--ai-accent, #8b5cf6) 38%, transparent);
  border-radius: 5px;
  color: color-mix(in srgb, var(--ai-accent, var(--cv-violet-bright)) 80%, #1f1409);
  font-size: 10.5px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}
.ai-q-iterate:hover:not(:disabled) {
  background: color-mix(in srgb, var(--ai-accent, #8b5cf6) 28%, transparent);
  border-color: color-mix(in srgb, var(--ai-accent, #8b5cf6) 60%, transparent);
}
.ai-q-iterate:disabled { opacity: 0.5; cursor: progress; }
.ai-q-iterate svg, .ai-q-iterate i { width: 11px; height: 11px; }

/* Accordion de cortinas (turnos). Solo UNA abierta a la vez para que el
   sticky no crezca por iteración. Headers compactos (~28px) cuando cerradas. */
.ai-q-turns {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 6px 0 4px;
}
.ai-q-turn {
  background: rgba(255,255,255,0.42);
  border: 1px solid rgba(58,42,16,0.12);
  border-radius: 6px;
  overflow: hidden;
  transition: border-color 0.15s, background 0.15s;
}
.ai-q-turn:hover { border-color: rgba(58,42,16,0.22); }
.ai-q-turn.is-open {
  background: rgba(255,255,255,0.65);
  border-color: color-mix(in srgb, var(--ai-accent, #8b5cf6) 38%, transparent);
}
.ai-q-turn-header {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  color: var(--cv-text, #1f1409);
}
.ai-q-turn-header:hover { background: rgba(58,42,16,0.04); }
.ai-q-turn-caret { width: 12px; height: 12px; flex-shrink: 0; opacity: 0.7; }
.ai-q-turn-label {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: rgba(58,42,16,0.65);
  flex-shrink: 0;
}
.ai-q-turn-current {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 5px;
  font-size: 9px;
  font-weight: 700;
  background: color-mix(in srgb, var(--ai-accent, #8b5cf6) 25%, transparent);
  color: color-mix(in srgb, var(--ai-accent, #8b5cf6) 90%, #1f1409);
  border-radius: 3px;
  letter-spacing: 0.3px;
}
.ai-q-turn-preview {
  font-size: 11px;
  color: rgba(58,42,16,0.6);
  font-style: italic;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}
.ai-q-turn.is-open .ai-q-turn-preview { display: none; }
.ai-q-turn-body {
  padding: 4px 10px 10px;
  border-top: 1px solid rgba(58,42,16,0.08);
}

/* ── Watch Party Theater Mode — rediseño (Fase 7ac) ─────────────────────── */

.ws-theater-overlay {
  position: fixed; inset: 0;
  background: rgba(5, 2, 12, 0.82);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex; align-items: center; justify-content: center;
}
.ws-theater-modal {
  width: min(92vw, 1280px);
  height: min(86vh, 800px);
  background: var(--cv-panel);
  border: 1px solid var(--cv-border-strong);
  border-radius: 16px;
  box-shadow: 0 40px 80px rgba(0,0,0,0.55), 0 0 0 1px rgba(139,92,246,0.06);
  display: flex; flex-direction: column;
  overflow: hidden;
  font-family: Inter, -apple-system, system-ui, sans-serif;
}

/* Header */
.ws-theater-header {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--cv-border);
  background: linear-gradient(135deg, rgba(139,92,246,0.08), transparent);
}
.ws-theater-header__live {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px 4px 8px;
  border-radius: 20px;
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.6px;
  white-space: nowrap;
}
.ws-theater-header__live--admin {
  background: var(--cv-red-soft);
  border: 1px solid var(--cv-red-border);
  color: var(--cv-red);
}
.ws-theater-header__live--autonomous {
  background: rgba(139,92,246,0.12);
  border: 1px solid rgba(139,92,246,0.30);
  color: var(--cv-violet-bright);
}
.ws-theater-header__live-dot {
  width: 6px; height: 6px; border-radius: 3px;
}
.ws-theater-header__live--admin .ws-theater-header__live-dot {
  background: var(--cv-red);
  box-shadow: 0 0 8px var(--cv-red);
}
.ws-theater-header__live--autonomous .ws-theater-header__live-dot {
  background: var(--cv-violet-bright);
  box-shadow: 0 0 8px var(--cv-violet-glow);
}
.ws-theater-header__title {
  flex: 1;
  font-size: 12.5px; color: var(--cv-text); font-weight: 500;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ws-theater-header__presence {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px 5px 8px;
  border-radius: 20px;
  background: var(--cv-panel-raised);
  border: 1px solid var(--cv-border);
  color: var(--cv-text); font-size: 11px; font-weight: 500;
}
.ws-theater-header__presence svg,
.ws-theater-header__presence i { width: 12px; height: 12px; }
.ws-theater-header__chat-toggle,
.ws-theater-header__close {
  width: 28px; height: 28px;
  border-radius: 7px;
  background: transparent;
  border: 1px solid var(--cv-border);
  color: var(--cv-text-dim);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; padding: 0;
  transition: all 0.12s;
}
.ws-theater-header__chat-toggle:hover,
.ws-theater-header__close:hover {
  background: var(--cv-panel-hover);
  color: var(--cv-text);
  border-color: var(--cv-border-strong);
}
.ws-theater-header__chat-toggle.active {
  background: rgba(139,92,246,0.12);
  border-color: rgba(139,92,246,0.30);
  color: var(--cv-violet-bright);
}
.ws-theater-header__chat-toggle svg,
.ws-theater-header__chat-toggle i,
.ws-theater-header__close svg,
.ws-theater-header__close i { width: 14px; height: 14px; }

/* Body */
.ws-theater-body {
  flex: 1; min-height: 0;
  display: flex;
}
.ws-theater-player {
  flex: 1;
  background: #000;
  position: relative;
  display: flex; align-items: center; justify-content: center;
}
#ws-yt-player-theater {
  width: 100%; height: 100%;
}

/* Chat lateral */
.ws-theater-chat {
  /* [v5.7.27.123] Ancho 320px (antes 260px) — el botón "Enviar" del input
     row se truncaba con 260px porque .ws-chat-input flex:1 dejaba menos
     espacio del que necesitaba el send button. 320px da margen cómodo
     para input + button + paddings/gaps. */
  width: 320px;
  display: flex; flex-direction: column;
  border-left: 1px solid var(--cv-border);
  background: var(--cv-panel);
  position: relative;
}

/* [v5.7.27.124] Pill "Cargar mensajes anteriores" en flujo normal dentro
   del theater chat, no `position: absolute`. El comportamiento absolute
   es para el drawer principal (donde el pill flota sobre el scroll
   container), pero en el theater el chat es más compacto y el pill se
   superponía al header. Igual que el chat React del canvas, queremos el
   pill como elemento de bloque entre header y messages list.
