:root {
  color-scheme: light;
  --cp-bg: #f7f4ef;
  --cp-bg-elevated: #fcfbf8;
  --cp-surface: #ffffff;
  --cp-surface-soft: #f5f5f5;
  --cp-border: #dedede;
  --cp-border-strong: #919191;
  --cp-text: #242424;
  --cp-text-muted: #5c5c5c;
  --cp-text-soft: #6f6f6f;
  --cp-accent: #b11f4b;
  --cp-accent-hover: #9a1a41;
  --cp-accent-soft: rgba(177, 31, 75, 0.08);
  --cp-accent-fg: #ffffff;
  --cp-success: #16a34a;
  --cp-danger: #dc2626;
  --cp-warning: #f59e0b;
  --cp-link: #0078d4;
  --cp-shadow: 0 18px 48px rgba(0, 0, 0, 0.12);
  --cp-overlay: rgba(255, 255, 255, 0.8);
  --cp-panel: rgba(255, 255, 255, 0.86);
  --cp-panel-strong: rgba(255, 255, 255, 0.96);
  --cp-sheen: rgba(255, 255, 255, 0.55);
  --cp-highlight: rgba(177, 31, 75, 0.12);
}
html[data-theme="dark"] {
  color-scheme: dark;
  --cp-bg: #3d3b3a;
  --cp-bg-elevated: #343231;
  --cp-surface: #292929;
  --cp-surface-soft: #2e2e2e;
  --cp-border: #474747;
  --cp-border-strong: #5f5f5f;
  --cp-text: #dedede;
  --cp-text-muted: #919191;
  --cp-text-soft: #b0b0b0;
  --cp-accent: #fd8ea1;
  --cp-accent-hover: #fb7b91;
  --cp-accent-soft: rgba(253, 142, 161, 0.14);
  --cp-accent-fg: #1a1a1a;
  --cp-success: #4ade80;
  --cp-danger: #f87171;
  --cp-warning: #fbbf24;
  --cp-link: #4da6ff;
  --cp-shadow: 0 18px 48px rgba(0, 0, 0, 0.32);
  --cp-overlay: rgba(41, 41, 41, 0.88);
  --cp-panel: rgba(41, 41, 41, 0.72);
  --cp-panel-strong: rgba(41, 41, 41, 0.96);
  --cp-sheen: rgba(255, 255, 255, 0.04);
  --cp-highlight: rgba(253, 142, 161, 0.12);
}
* { box-sizing: border-box; }
html, body { width: 100%; min-height: 100%; }
body { margin: 0; min-height: 100dvh; background: var(--cp-bg); color: var(--cp-text); font-family: "Segoe UI", Aptos, Calibri, -apple-system, BlinkMacSystemFont, sans-serif; }
body::before { content: ""; position: fixed; inset: 0; pointer-events: none; background: radial-gradient(circle at 50% 15%, var(--cp-highlight), transparent 42%); }
button, input { font: inherit; }
.shell { width: 100%; max-width: 1600px; height: 100dvh; min-height: 560px; margin: auto; padding: clamp(12px, 2vh, 20px) clamp(12px, 3vw, 48px); display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto auto; gap: clamp(8px, 1.5vh, 16px); }
header { display: flex; justify-content: space-between; align-items: center; min-height: 44px; }
.identity, .connection { display: flex; align-items: center; gap: 12px; }
.identity div { display: grid; }
.identity span, .connection { color: var(--cp-text-muted); font-size: 13px; }
.brand-mark { width: 10px; height: 28px; background: var(--cp-accent); border-radius: 2px; }
#status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cp-border-strong); }
#status-dot.online { background: var(--cp-success); box-shadow: 0 0 0 5px var(--cp-accent-soft); }
.stage { container-type: size; position: relative; overflow: hidden; width: 100%; height: 100%; min-height: 220px; border: 1px solid var(--cp-border); border-radius: 8px; background: var(--cp-bg-elevated); box-shadow: 0 0 2px var(--cp-border), 0 1px 2px var(--cp-border); }
.video-frame { position: absolute; top: 50%; left: 50%; width: min(100cqw, calc(100cqh * 16 / 9)); aspect-ratio: 16 / 9; translate: -50% -50%; }
#video-container { position: absolute; inset: 0; display: grid; place-items: center; }
#video-container video { display: block; width: 100%; height: 100%; max-width: 100%; max-height: 100%; object-fit: contain; object-position: center; }
#video-container audio { display: none; }
.stage-shade { position: absolute; inset: auto 0 0; height: 35%; pointer-events: none; background: linear-gradient(transparent, var(--cp-overlay)); }
.company-logo { position: absolute; z-index: 2; top: clamp(10px, 2vw, 20px); right: clamp(10px, 2vw, 20px); width: clamp(100px, 12vw, 160px); height: auto; padding: 7px 9px; border-radius: 4px; background: rgba(255, 255, 255, 0.9); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18); pointer-events: none; user-select: none; }
#caption { position: absolute; left: 50%; bottom: 24px; translate: -50% 0; width: min(90%, 720px); padding: 12px 16px; text-align: center; line-height: 1.45; background: var(--cp-panel-strong); border: 1px solid var(--cp-border); border-radius: 6px; opacity: 0; transition: opacity 160ms ease; }
#caption.visible { opacity: 1; }
.controls, .text-bar { display: flex; justify-content: center; align-items: center; gap: 10px; }
button { border: 1px solid var(--cp-border); cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .45; }
button svg { width: 19px; height: 19px; }
.primary { min-height: 46px; padding: 0 20px; display: inline-flex; align-items: center; gap: 9px; border-color: var(--cp-accent); border-radius: 6px; color: var(--cp-accent-fg); background: var(--cp-accent); }
.primary:hover:not(:disabled) { background: var(--cp-accent-hover); }
.primary.connected { border-color: var(--cp-danger); background: var(--cp-danger); }
.icon-button { width: 46px; height: 46px; padding: 0; display: grid; place-items: center; border-radius: 6px; color: var(--cp-text); background: var(--cp-surface); }
.icon-button.active { color: var(--cp-accent); border-color: var(--cp-accent); background: var(--cp-accent-soft); }
.text-bar { width: min(100%, 680px); margin: auto; }
input { width: 100%; height: 46px; padding: 0 14px; border: 1px solid var(--cp-border); border-radius: 6px; background: var(--cp-surface); color: var(--cp-text); outline: none; }
input:focus { border-color: var(--cp-accent); }
#error { min-height: 20px; margin: 0; text-align: center; color: var(--cp-danger); font-size: 13px; }
@media (max-width: 620px) { .shell { min-height: 520px; padding: 10px; grid-template-rows: auto minmax(0, 1fr) auto auto auto; } .stage { min-height: 200px; } .connection { font-size: 0; } #status-dot { display: block; } .controls { flex-wrap: wrap; } .primary { flex: 1; } #caption { bottom: 14px; } }
@media (max-height: 620px) { .shell { min-height: 500px; padding-block: 8px; gap: 8px; } header { min-height: 36px; } .stage { min-height: 180px; } .primary, .icon-button, input { min-height: 40px; height: 40px; } }
