.theater-chat-fab {
  position: fixed; right: 1.15rem; bottom: 1.15rem; z-index: 120;
  display: inline-flex; align-items: center; gap: 0.55rem;
  border: 0; border-radius: 999px;
  padding: 0.65rem 1.05rem 0.65rem 0.65rem;
  background: linear-gradient(135deg, #0891b2 0%, #0ea5e9 45%, #10b981 100%);
  color: #fff;
  font-weight: 800; font-size: 0.8rem;
  box-shadow:
    0 14px 34px rgba(14,165,233,0.38),
    0 4px 12px rgba(16,185,129,0.22);
  cursor: pointer;
  overflow: visible;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.theater-chat-fab:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow:
    0 18px 40px rgba(14,165,233,0.45),
    0 6px 16px rgba(16,185,129,0.28);
}
.theater-chat-fab:active { transform: translateY(0) scale(0.98); }
.theater-chat-fab.is-open,
.theater-chat-fab.is-chat-open,
body.theater-chat-panel-open .theater-chat-fab {
  /* Chat open → FAB completely gone (no duplicate launcher) */
  display: none !important;
  pointer-events: none !important;
  visibility: hidden !important;
}
.theater-chat-fab__glow {
  position: absolute; inset: -2px; border-radius: 999px;
  background: linear-gradient(135deg, rgba(56,189,248,0.55), rgba(16,185,129,0.45));
  filter: blur(10px); opacity: 0.55; z-index: -1; pointer-events: none;
}
.theater-chat-fab__pulse {
  position: absolute; inset: -6px; border-radius: 999px;
  border: 2px solid rgba(56,189,248,0.45);
  animation: theaterFabPulse 2s ease-out infinite; pointer-events: none;
}
@keyframes theaterFabPulse {
  0% { transform: scale(1); opacity: 0.65; }
  100% { transform: scale(1.4); opacity: 0; }
}
.theater-chat-fab__icon {
  width: 2.35rem; height: 2.35rem; display: grid; place-items: center;
  background: rgba(255,255,255,0.22); border-radius: 999px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.35);
  flex-shrink: 0;
}
.theater-chat-fab__icon svg { width: 1.2rem; height: 1.2rem; }
.theater-chat-fab__meta {
  display: flex; flex-direction: column; align-items: flex-start; line-height: 1.1;
}
.theater-chat-fab__label { font-size: 0.86rem; letter-spacing: 0.01em; }
.theater-chat-fab__hint {
  font-size: 0.62rem; font-weight: 700; opacity: 0.88; margin-top: 0.12rem;
}
.theater-chat-fab__live {
  position: absolute; top: 0.35rem; right: 0.4rem;
  width: 0.55rem; height: 0.55rem; border-radius: 999px;
  background: #bbf7d0; border: 1.5px solid #fff;
  box-shadow: 0 0 0 2px rgba(16,185,129,0.35);
}
.theater-chat-window {
  position: fixed; z-index: 130; display: flex; overflow: hidden;
  background: #ffffff; color: #0f172a;
  border: 1px solid #e2e8f0; border-radius: 1rem;
  box-shadow: 0 24px 60px rgba(0,0,0,0.22);
  min-width: 280px; min-height: 320px;
}
.theater-chat-window.hidden { display: none !important; }
.theater-chat-window.is-fs {
  left: 0 !important; top: 0 !important;
  width: 100vw !important; height: 100dvh !important; border-radius: 0;
}
.theater-chat-window.theme-dark {
  background: #0f172a; color: #f1f5f9; border-color: rgba(148,163,184,0.25);
}
.theater-chat-history {
  width: 200px; border-right: 1px solid #e2e8f0; background: #f8fafc;
  display: flex; flex-direction: column; transition: width 0.2s ease;
}
.theater-chat-window.theme-dark .theater-chat-history {
  background: #070b14; border-color: rgba(148,163,184,0.2);
}
.theater-chat-history.collapsed { width: 0; overflow: hidden; border: 0; padding: 0; margin: 0; min-width: 0; }
.theater-chat-history:not(.collapsed) { width: 200px; }
.theater-chat-new {
  margin: 0.5rem; border: 0; border-radius: 0.75rem; background: #38bdf8;
  color: #0f172a; font-weight: 800; font-size: 0.75rem; padding: 0.55rem 0.7rem;
  cursor: pointer; text-align: left;
  display: inline-flex; align-items: center; gap: 0.35rem;
}
.theater-chat-new .ti { font-size: 1rem; line-height: 1; }
.theater-chat-history__label {
  padding: 0 0.75rem 0.35rem; font-size: 10px; font-weight: 800;
  letter-spacing: 0.06em; text-transform: uppercase; color: #64748b;
}
.theater-chat-session-list {
  list-style: none; margin: 0; padding: 0 0.4rem 0.75rem; overflow: auto; flex: 1;
}
.theater-chat-session-list li button {
  width: 100%; text-align: left; border: 0; background: transparent;
  color: #64748b; font-size: 11px; padding: 0.5rem 0.55rem; border-radius: 0.6rem;
  cursor: pointer; display: flex; gap: 0.35rem;
}
.theater-chat-session-list li button.active,
.theater-chat-session-list li button:hover {
  background: rgba(56,189,248,0.14); color: #0f172a;
}
.theater-chat-window.theme-dark .theater-chat-session-list li button.active,
.theater-chat-window.theme-dark .theater-chat-session-list li button:hover {
  color: #f1f5f9;
}
.theater-chat-session-list .del { opacity: 0.5; margin-left: auto; }
.theater-chat-main { flex: 1; min-width: 0; display: flex; flex-direction: column; background: #fff; }
.theater-chat-window.theme-dark .theater-chat-main { background: #0f172a; }
.theater-chat-header {
  display: flex; align-items: center; gap: 0.4rem; padding: 0.55rem 0.6rem;
  border-bottom: 1px solid #e2e8f0; cursor: grab; user-select: none; background: #fff;
}
.theater-chat-window.theme-dark .theater-chat-header {
  background: #0f172a; border-color: rgba(148,163,184,0.2);
}
.theater-chat-brand { display: flex; align-items: center; gap: 0.45rem; flex: 1; min-width: 0; }
.theater-chat-avatar {
  width: 2rem; height: 2rem; border-radius: 999px; display: grid; place-items: center;
  background: linear-gradient(135deg,#06b6d4,#10b981); color: #fff; font-size: 0.85rem;
}
.theater-chat-title { font-size: 0.82rem; font-weight: 800; color: #0f172a; }
.theater-chat-sub { font-size: 10px; color: #64748b; font-weight: 650; }
.theater-chat-window.theme-dark .theater-chat-title { color: #f8fafc; }
.theater-chat-window.theme-dark .theater-chat-sub { color: #94a3b8; }
.theater-chat-iconbtn {
  border: 1px solid #e2e8f0; background: #fff; color: #334155;
  border-radius: 0.55rem; width: 2rem; height: 2rem;
  display: grid; place-items: center; cursor: pointer; text-decoration: none;
  font-size: 1.05rem; line-height: 1; flex-shrink: 0;
}
.theater-chat-iconbtn .ti { font-size: 1.1rem; line-height: 1; }
.theater-chat-avatar .ti { font-size: 1rem; }
.theater-chat-fab__icon .ti { font-size: 1.45rem; line-height: 1; }
.theater-chat-window.theme-dark .theater-chat-iconbtn {
  background: transparent; border-color: rgba(148,163,184,0.25); color: #cbd5e1;
}
.theater-chat-messages {
  flex: 1; overflow: auto; padding: 0.85rem; display: flex; flex-direction: column;
  gap: 0.55rem; font-size: 0.84rem; background: #f8fafc;
}
.theater-chat-window.theme-dark .theater-chat-messages { background: #070b14; }
.theater-chat-bubble {
  max-width: 92%; border-radius: 1rem; padding: 0.75rem 0.9rem;
  line-height: 1.55; white-space: pre-wrap; word-break: break-word;
  font-size: 0.9rem; font-weight: 500;
}
.theater-chat-bubble.user {
  align-self: flex-end; background: #dbeafe; border: 1px solid #93c5fd; color: #0c1e3a;
}
.theater-chat-bubble.ai {
  align-self: flex-start; background: #ffffff; border: 1px solid #cbd5e1; color: #0f172a;
  box-shadow: 0 1px 2px rgba(15,23,42,0.04);
}
.theater-chat-bubble > div[dir="auto"] {
  color: inherit; -webkit-font-smoothing: antialiased;
}
.theater-chat-window.theme-dark .theater-chat-bubble.user {
  background: rgba(14,165,233,0.22); border-color: rgba(56,189,248,0.4); color: #f0f9ff;
}
.theater-chat-window.theme-dark .theater-chat-bubble.ai {
  background: #1e293b; border-color: rgba(148,163,184,0.28); color: #f8fafc;
}
.theater-chat-bubble .who {
  font-size: 10px; font-weight: 800; color: #475569; margin-bottom: 0.3rem;
  letter-spacing: 0.02em;
}
.theater-chat-window.theme-dark .theater-chat-bubble .who { color: #94a3b8; }
.bubble-actions {
  display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.65rem;
}
.bubble-action-btn {
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid #94a3b8; background: #f8fafc; color: #0f172a;
  border-radius: 999px; padding: 0.35rem 0.75rem; font-size: 0.78rem;
  font-weight: 700; cursor: pointer; text-decoration: none; line-height: 1.2;
}
.bubble-action-btn:hover { background: #e2e8f0; border-color: #64748b; }
.theater-chat-window.theme-dark .bubble-action-btn {
  background: #0f172a; color: #e2e8f0; border-color: #475569;
}
.theater-chat-window.theme-dark .bubble-action-btn:hover { background: #1e293b; }
.theater-chat-status {
  min-height: 1rem; padding: 0 0.75rem; font-size: 10px; color: #0284c7; font-weight: 700;
}
.theater-chat-form {
  display: flex; align-items: flex-end; gap: 0.3rem; padding: 0.55rem 0.6rem;
  border-top: 1px solid #e2e8f0; background: #fff;
}
.theater-chat-tools {
  display: flex; align-items: center; gap: 0.25rem; flex-shrink: 0;
}
.theater-chat-window.theme-dark .theater-chat-form {
  background: #0f172a; border-color: rgba(148,163,184,0.2);
}
.theater-chat-form textarea {
  flex: 1; resize: none; min-height: 40px; max-height: 144px; /* ~6 lines */
  border: 1px solid #cbd5e1;
  outline: none; background: #f8fafc; color: #0f172a; border-radius: 1.1rem;
  padding: 0.6rem 0.85rem; font-size: 0.9rem; font-weight: 500;
  caret-color: #0284c7; line-height: 1.4; overflow-y: hidden;
}
.theater-chat-form textarea.is-scroll { overflow-y: auto; }
.theater-chat-form textarea::placeholder { color: #64748b; opacity: 1; }
.theater-chat-form textarea:focus {
  border-color: #38bdf8; background: #fff;
  box-shadow: 0 0 0 3px rgba(56,189,248,0.18);
}
.theater-chat-window.theme-dark .theater-chat-form textarea {
  background: #070b14; color: #f8fafc; border-color: rgba(148,163,184,0.28);
}
.theater-chat-window.theme-dark .theater-chat-form textarea::placeholder { color: #94a3b8; }
.theater-chat-voice-hint {
  display: flex; align-items: center; gap: 0.4rem;
  padding: 0.35rem 0.85rem; font-size: 11px; font-weight: 650;
  color: #0369a1; background: #e0f2fe; border-top: 1px solid #bae6fd;
}
.theater-chat-voice-hint[hidden] { display: none !important; }
.theater-chat-voice-hint .ti { font-size: 0.95rem; }
.theater-chat-window.theme-dark .theater-chat-voice-hint {
  background: rgba(14,165,233,0.12); color: #7dd3fc; border-color: rgba(56,189,248,0.25);
}
.theater-chat-send {
  border: 0; border-radius: 999px; width: 2.35rem; height: 2.35rem;
  background: linear-gradient(135deg, #0ea5e9, #0284c7); color: #fff;
  font-weight: 800; cursor: pointer; flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(14,165,233,0.35);
  display: grid; place-items: center; font-size: 1.05rem; line-height: 1;
}
.theater-chat-send .ti { font-size: 1.05rem; }
.theater-chat-mic,
.theater-chat-cam {
  position: relative;
  width: 2.45rem; height: 2.45rem; border-radius: 999px; border: 1px solid #e2e8f0;
  background: linear-gradient(180deg, #fff, #f1f5f9);
  display: grid; place-items: center; cursor: pointer; color: #0f172a;
  flex-shrink: 0; overflow: visible; padding: 0;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.theater-chat-mic:hover,
.theater-chat-cam:hover {
  transform: scale(1.06);
  box-shadow: 0 4px 14px rgba(15,23,42,0.12);
  color: #0369a1;
}
.theater-chat-mic__icon,
.theater-chat-cam__icon {
  width: auto; height: auto; font-size: 1.15rem; line-height: 1;
  position: relative; z-index: 2;
}
.theater-chat-mic__rings {
  position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none;
}
.theater-chat-mic__rings .r1,
.theater-chat-mic__rings .r2 {
  position: absolute; border-radius: 999px; border: 2px solid rgba(14,165,233,0.45);
  opacity: 0; width: 100%; height: 100%;
}
.theater-chat-mic.is-rec {
  background: linear-gradient(180deg, #fee2e2, #fecaca);
  border-color: #f87171; color: #b91c1c;
  box-shadow: 0 0 0 3px rgba(239,68,68,0.18);
}
.theater-chat-mic.is-rec .theater-chat-mic__rings .r1 {
  animation: micRing 1.4s ease-out infinite;
}
.theater-chat-mic.is-rec .theater-chat-mic__rings .r2 {
  animation: micRing 1.4s ease-out 0.45s infinite;
}
.theater-chat-cam.is-live {
  background: linear-gradient(180deg, #dbeafe, #bfdbfe);
  border-color: #38bdf8; color: #0369a1;
  box-shadow: 0 0 0 3px rgba(56,189,248,0.2);
}
@keyframes micRing {
  0% { transform: scale(1); opacity: 0.65; }
  100% { transform: scale(1.85); opacity: 0; }
}
.theater-chat-window.theme-dark .theater-chat-mic,
.theater-chat-window.theme-dark .theater-chat-cam {
  background: linear-gradient(180deg, #1e293b, #0f172a);
  border-color: rgba(148,163,184,0.3); color: #e2e8f0;
}
.theater-chat-perm {
  display: none; margin: 0 0.6rem 0.45rem; padding: 0.65rem 0.75rem;
  border-radius: 0.75rem; background: #eff6ff; border: 1px solid #bfdbfe;
  color: #0c4a6e; font-size: 0.72rem; font-weight: 650; line-height: 1.45;
}
.theater-chat-perm.is-on { display: block; }
.theater-chat-perm-title {
  font-size: 0.8rem; font-weight: 800; color: #0c4a6e; margin-bottom: 0.35rem;
}
.theater-chat-perm-body {
  font-weight: 550; color: #075985; white-space: pre-line;
}
.theater-chat-perm-actions { margin-top: 0.5rem; display: flex; flex-wrap: wrap; gap: 0.35rem; }
.theater-chat-perm button {
  border: 0; border-radius: 999px; padding: 0.4rem 0.85rem;
  background: #0284c7; color: #fff; font-size: 0.7rem; font-weight: 800; cursor: pointer;
}
.theater-chat-perm button.secondary { background: #e2e8f0; color: #0f172a; }
.theater-chat-cam-preview {
  display: none; position: relative; margin: 0 0.6rem 0.4rem;
  border-radius: 1rem; overflow: hidden; border: 1px solid #cbd5e1;
  background: #020617; aspect-ratio: 16/10; max-height: 240px;
}
.theater-chat-cam-preview.is-on { display: block; }
.theater-chat-cam-preview video {
  width: 100%; height: 100%; object-fit: cover; display: block;
  background: #020617; transform: translateZ(0);
}
.theater-chat-cam-preview .cam-top {
  position: absolute; top: 0; left: 0; right: 0;
  display: flex; align-items: center; gap: 0.45rem;
  padding: 0.45rem 0.65rem;
  background: linear-gradient(rgba(0,0,0,0.55), transparent);
  color: #fff; font-size: 0.7rem; font-weight: 800;
}
.cam-live-dot {
  width: 0.55rem; height: 0.55rem; border-radius: 999px; background: #ef4444;
  box-shadow: 0 0 0 3px rgba(239,68,68,0.35);
  animation: camPulse 1.2s ease-in-out infinite;
}
@keyframes camPulse {
  0%, 100% { opacity: 1; } 50% { opacity: 0.45; }
}
.cam-timer { font-variant-numeric: tabular-nums; letter-spacing: 0.04em; }
.cam-facing {
  margin-left: auto; background: rgba(255,255,255,0.18);
  border-radius: 999px; padding: 0.15rem 0.5rem; font-size: 0.65rem;
}
.theater-chat-cam-preview .cam-actions {
  position: absolute; left: 0; right: 0; bottom: 0; display: flex; gap: 0.4rem;
  justify-content: center; flex-wrap: wrap; padding: 0.55rem;
  background: linear-gradient(transparent, rgba(0,0,0,0.72));
}
.theater-chat-cam-preview .cam-actions button {
  border: 0; border-radius: 999px; padding: 0.45rem 0.85rem;
  font-size: 0.72rem; font-weight: 800; cursor: pointer;
}
.theater-chat-cam-preview .cam-snap { background: #38bdf8; color: #0f172a; }
.theater-chat-cam-preview .cam-cancel { background: rgba(255,255,255,0.92); color: #0f172a; }
.theater-chat-cam-preview .cam-flip { background: rgba(255,255,255,0.2); color: #fff; border: 1px solid rgba(255,255,255,0.35) !important; }

/* Recording bar — Gemini-like waveform + timer */
.theater-chat-recbar {
  display: flex; align-items: center; gap: 0.45rem;
  margin: 0 0.55rem 0.4rem; padding: 0.45rem 0.55rem;
  border-radius: 999px; background: #0f172a; color: #e2e8f0;
  border: 1px solid rgba(56,189,248,0.35);
  box-shadow: 0 8px 24px rgba(2,6,23,0.25);
}
.theater-chat-recbar[hidden] { display: none !important; }
.rec-dot {
  width: 0.55rem; height: 0.55rem; border-radius: 999px; background: #ef4444;
  animation: camPulse 1s ease-in-out infinite; flex-shrink: 0;
}
.rec-timer {
  font-size: 0.78rem; font-weight: 800; font-variant-numeric: tabular-nums;
  min-width: 3rem; color: #f8fafc;
}
.rec-wave {
  flex: 1; height: 36px; max-width: 220px; min-width: 80px;
  border-radius: 0.5rem; background: rgba(15,23,42,0.4);
}
.rec-btn {
  border: 0; border-radius: 999px; padding: 0.4rem 0.75rem;
  font-size: 0.7rem; font-weight: 800; cursor: pointer; flex-shrink: 0;
}
.rec-btn.stop { background: #38bdf8; color: #0f172a; }
.rec-btn.ghost { background: rgba(255,255,255,0.12); color: #e2e8f0; }

/* Pending attachments before send */
.theater-chat-pending {
  margin: 0 0.6rem 0.35rem; padding: 0.4rem 0.5rem;
  border-radius: 0.85rem; background: #f1f5f9; border: 1px solid #e2e8f0;
}
.theater-chat-pending[hidden] { display: none !important; }
.theater-chat-window.theme-dark .theater-chat-pending {
  background: #1e293b; border-color: rgba(148,163,184,0.25);
}
.pending-label { font-size: 10px; font-weight: 800; color: #64748b; margin-bottom: 0.3rem; }
.pending-row { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.pending-chip {
  position: relative; width: 56px; height: 56px; border-radius: 0.65rem;
  overflow: hidden; border: 1px solid #cbd5e1; background: #fff;
}
.pending-chip img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pending-chip.is-done { border-color: #22c55e; }
.pending-upload-ring {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(15, 23, 42, 0.45); pointer-events: none;
}
.pending-chip.is-done .pending-upload-ring { background: rgba(34, 197, 94, 0.35); }
.pending-upload-ring svg { display: block; }
.pending-upload-ring .ring-bg { stroke: rgba(255,255,255,0.35); }
.pending-upload-ring .ring-fg { stroke: #38bdf8; transition: stroke-dashoffset 0.12s linear; }
.pending-chip.is-done .pending-upload-ring .ring-fg { stroke: #4ade80; }
.pending-upload-ring .ring-label {
  position: absolute; font-size: 9px; font-weight: 800; color: #fff; letter-spacing: -0.02em;
}
.pending-upload-err {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(185, 28, 28, 0.55); color: #fff; font-weight: 900; font-size: 16px;
}
.pending-chip.file {
  width: auto; height: auto; padding: 0.35rem 0.55rem; font-size: 0.68rem; font-weight: 700;
  display: flex; align-items: center; gap: 0.25rem; color: #0f172a;
}
.pending-chip button {
  position: absolute; top: 2px; right: 2px; width: 18px; height: 18px;
  border: 0; border-radius: 999px; background: rgba(15,23,42,0.75); color: #fff;
  font-size: 11px; line-height: 1; cursor: pointer;
}
.pending-chip.file button { position: static; background: transparent; color: #64748b; }

/* In-chat attachment bubbles */
.bubble-atts { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.35rem 0 0.45rem; }
.att-img {
  display: block; border-radius: 0.75rem; overflow: hidden;
  border: 1px solid rgba(148,163,184,0.35); max-width: 220px;
}
.att-img img { display: block; width: 100%; max-height: 200px; object-fit: cover; }
.att-audio {
  display: flex; flex-direction: column; gap: 0.2rem;
  background: rgba(14,165,233,0.1); border: 1px solid rgba(56,189,248,0.35);
  border-radius: 0.85rem; padding: 0.45rem 0.55rem; min-width: 180px;
}
.att-audio audio { width: 100%; height: 32px; }
.att-audio span { font-size: 10px; font-weight: 700; color: #0369a1; }
.att-file {
  font-size: 0.75rem; font-weight: 700; padding: 0.4rem 0.6rem;
  border-radius: 0.65rem; background: #f1f5f9; border: 1px solid #e2e8f0;
}
.theater-chat-window.theme-dark .att-file {
  background: #1e293b; border-color: rgba(148,163,184,0.25); color: #e2e8f0;
}
.bubble-speak {
  float: right; border: 0; background: transparent; cursor: pointer;
  font-size: 0.75rem; opacity: 0.7; padding: 0 0.15rem;
}
.bubble-speak:hover { opacity: 1; }
.bubble-feedback {
  display: flex; align-items: center; gap: 0.35rem; margin-top: 0.45rem;
  padding-top: 0.35rem; border-top: 1px dashed rgba(148,163,184,0.35);
}
.bubble-feedback button {
  border: 1px solid rgba(148,163,184,0.45); background: #fff; border-radius: 999px;
  cursor: pointer; font-size: 0.85rem; line-height: 1; padding: 0.2rem 0.45rem;
  opacity: 0.85; transition: transform 0.12s ease, opacity 0.12s ease;
}
.bubble-feedback button:hover { opacity: 1; transform: scale(1.06); }
.bubble-feedback button.is-active {
  border-color: #0ea5e9; background: #e0f2fe; opacity: 1;
}
.bubble-feedback .fb-thanks { font-size: 10px; font-weight: 700; color: #64748b; }
.theater-chat-window.theme-dark .bubble-feedback button {
  background: #1e293b; border-color: rgba(148,163,184,0.35);
}
.bubble-status { color: #0284c7; font-weight: 700; font-size: 0.8rem; }
.theater-chat-iconbtn.is-on { border-color: #38bdf8; color: #0284c7; background: #e0f2fe; }
.theater-chat-window.theme-dark .theater-chat-iconbtn.is-on {
  background: rgba(14,165,233,0.18); color: #7dd3fc;
}
.theater-chat-resize {
  position: absolute; right: 0; bottom: 0; width: 16px; height: 16px; cursor: nwse-resize;
  background: linear-gradient(135deg, transparent 50%, rgba(148,163,184,0.7) 50%);
}
@media (max-width: 767px) {
  .theater-chat-window:not(.hidden) {
    left: 0 !important; top: 0 !important;
    width: 100vw !important; height: 100dvh !important; border-radius: 0;
  }
  .theater-chat-fab {
    padding: 0.7rem; width: 3.4rem; height: 3.4rem; justify-content: center;
  }
  .theater-chat-fab__meta,
  .theater-chat-fab__hint { display: none; }
  .theater-chat-fab__icon { width: 2.2rem; height: 2.2rem; }
}

/* —— Live Voice Mode orb —— */
.theater-chat-livebtn.is-on {
  border-color: #10b981; color: #059669; background: #d1fae5;
}
.theater-live-overlay {
  position: fixed; inset: 0; z-index: 10050;
  display: flex; align-items: center; justify-content: center;
  background: rgba(2, 8, 23, 0.72); backdrop-filter: blur(8px);
  padding: 1rem;
}
.theater-live-overlay[hidden] { display: none !important; }
.theater-live-card {
  position: relative; width: min(380px, 100%);
  background: linear-gradient(165deg, #0f172a 0%, #020617 100%);
  border: 1px solid rgba(148,163,184,0.25); border-radius: 1.5rem;
  padding: 1.5rem 1.25rem 1.35rem; color: #f8fafc; text-align: center;
  box-shadow: 0 24px 60px rgba(0,0,0,0.45);
}
.theater-live-close {
  position: absolute; top: 0.65rem; right: 0.65rem;
  width: 2rem; height: 2rem; border-radius: 999px;
  border: 1px solid rgba(148,163,184,0.3); background: transparent;
  color: #cbd5e1; display: grid; place-items: center; cursor: pointer;
}
.theater-live-title { font-size: 1.05rem; font-weight: 800; letter-spacing: 0.02em; }
.theater-live-sub { font-size: 0.72rem; color: #94a3b8; margin-top: 0.2rem; font-weight: 600; }
.theater-live-orb {
  position: relative; margin: 1.35rem auto 0.85rem;
  width: 9.5rem; height: 9.5rem; border: 0; background: transparent;
  cursor: pointer; display: grid; place-items: center;
}
.theater-live-orb__ring {
  position: absolute; inset: 0; border-radius: 999px;
  border: 2px solid rgba(16,185,129,0.35); animation: livePulse 1.8s ease-out infinite;
}
.theater-live-orb__ring.r2 { inset: 0.55rem; animation-delay: 0.45s; border-color: rgba(56,189,248,0.3); }
.theater-live-orb__core {
  position: relative; z-index: 2;
  width: 5.5rem; height: 5.5rem; border-radius: 999px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #06b6d4, #10b981);
  color: #fff; font-size: 1.75rem;
  box-shadow: 0 0 40px rgba(34,211,238,0.4);
  transition: transform 0.08s linear;
}
.theater-live-orb.is-live .theater-live-orb__core {
  background: linear-gradient(135deg, #34d399, #0ea5e9);
}
.theater-live-orb.is-speak .theater-live-orb__core {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
}
.theater-live-status {
  font-size: 0.8rem; font-weight: 700; color: #7dd3fc; min-height: 1.2rem;
}
.theater-live-interim {
  margin-top: 0.55rem; min-height: 1.1rem; font-size: 0.78rem;
  color: #94a3b8; font-weight: 600;
}
.theater-live-ai {
  margin-top: 0.65rem; max-height: 5.5rem; overflow: auto;
  font-size: 0.82rem; line-height: 1.45; color: #e2e8f0;
  text-align: start; white-space: pre-wrap; word-break: break-word;
  padding: 0.55rem 0.65rem; border-radius: 0.85rem;
  background: rgba(15,23,42,0.65); border: 1px solid rgba(148,163,184,0.2);
}
@keyframes livePulse {
  0% { transform: scale(1); opacity: 0.7; }
  100% { transform: scale(1.35); opacity: 0; }
}
