@charset "UTF-8";
/* ============================================================
   Live Stage — Glass/Tech Mission Control CSS
   "Mr. & Mrs. NetShow" — Conference Demo Page
   ============================================================ */

/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --blue:      #f59e0b;
    --purple:    #f472b6;
    --green:     #10b981;
    --cyan:      #fbbf24;
    --dark:      #1a1a1a;
    --panel-bg:  rgba(255,255,255,0.03);
    --border:    rgba(255,255,255,0.08);
    --text:      #e8eaf0;
    --muted:     #6b7280;
    --glass-blur: blur(20px);
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: var(--dark);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
                 'Helvetica Neue', Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* ── Animated Background ──────────────────────────────────── */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 15% 40%, rgba(245,158,11,0.06) 0%, transparent 60%),
        radial-gradient(ellipse 80% 60% at 85% 60%, rgba(244,114,182,0.06) 0%, transparent 60%),
        radial-gradient(ellipse 50% 40% at 50% 100%, rgba(251,191,36,0.04) 0%, transparent 50%);
    animation: bg-pulse 8s ease-in-out infinite alternate;
    pointer-events: none;
    z-index: 0;
}

@keyframes bg-pulse {
    0%   { opacity: 0.7; }
    100% { opacity: 1; }
}

/* ── Page Layout ──────────────────────────────────────────── */
#live-stage {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    width: 100vw;
    height: 100vh;
    min-width: 1024px;
}

/* ── Top Bar ──────────────────────────────────────────────── */
#top-bar {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    height: 56px;
    background: rgba(10,10,20,0.85);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--border);
    position: relative;
    z-index: 10;
}

#top-bar::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(245,158,11,0.4) 25%,
        rgba(251,191,36,0.6) 50%,
        rgba(244,114,182,0.4) 75%,
        transparent 100%);
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: var(--muted);
    text-transform: uppercase;
}

.brand-bolt {
    font-size: 1.1rem;
    filter: drop-shadow(0 0 6px var(--cyan));
}

.brand-name {
    color: var(--text);
    font-weight: 700;
}

/* Slogan */
#slogan {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    background: linear-gradient(90deg,
        #f59e0b 0%,
        #fbbf24 40%,
        #f472b6 70%,
        #f59e0b 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: slogan-shimmer 4s linear infinite;
    text-shadow: none;
}

@keyframes slogan-shimmer {
    0%   { background-position: 0% center; }
    100% { background-position: 200% center; }
}

.top-meta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 6px var(--green);
    animation: blink 2s ease-in-out infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.3; }
}

.top-label {
    font-size: 0.78rem;
    color: var(--muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* ── Main Stage Area ──────────────────────────────────────── */
#stage-main {
    flex: 1 1 0;
    display: flex;
    overflow: hidden;
    position: relative;
}

/* ── Avatar Panels (Left + Right) ─────────────────────────── */
.avatar-panel {
    flex: 0 0 25%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 20px;
    background: var(--panel-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    position: relative;
    transition: background 0.3s ease;
}

#panel-mr {
    border-right: 1px solid var(--border);
}

#panel-mrs {
    border-left: 1px solid var(--border);
}

/* Active persona (persistent selected state) */
.avatar-panel.active-persona {
    border-color: rgba(255,255,255,0.15);
}

#panel-mr.active-persona {
    box-shadow: 0 0 20px rgba(245,158,11,0.2), inset 0 0 30px rgba(245,158,11,0.05);
    border-color: rgba(245,158,11,0.3);
}

#panel-mrs.active-persona {
    box-shadow: 0 0 20px rgba(244,114,182,0.2), inset 0 0 30px rgba(244,114,182,0.05);
    border-color: rgba(244,114,182,0.3);
}

/* Vertical scan line decoration */
.avatar-panel::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 1px;
    background: linear-gradient(180deg,
        transparent 0%,
        rgba(255,255,255,0.05) 30%,
        rgba(255,255,255,0.1) 50%,
        rgba(255,255,255,0.05) 70%,
        transparent 100%);
    animation: scan-v 6s linear infinite;
    pointer-events: none;
}

#panel-mr::before  { right: 0; }
#panel-mrs::before { left: 0; }

@keyframes scan-v {
    0%   { transform: scaleY(0) translateY(-100%); opacity: 0; }
    20%  { opacity: 1; }
    80%  { opacity: 1; }
    100% { transform: scaleY(1) translateY(0%); opacity: 0; }
}

/* ── Avatar Container ─────────────────────────────────────── */
.avatar-container {
    position: relative;
    width: clamp(250px, 22vw, 380px);
    height: clamp(250px, 22vw, 380px);
    border-radius: 16px;
    overflow: visible;
    transition: transform 0.3s ease;
}

.avatar-inner {
    width: 100%;
    height: 100%;
    border-radius: 14px;
    overflow: hidden;
    border: 2px solid var(--border);
    background: rgba(255,255,255,0.04);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: border-color 0.3s ease;
}

/* Avatar placeholder icon */
.avatar-inner::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(circle at 40% 35%,
        rgba(255,255,255,0.08) 0%,
        transparent 60%);
}

.avatar-inner::before {
    content: '';
    position: absolute;
    inset: 1px;
    border-radius: inherit;
    border: 1px solid transparent;
    pointer-events: none;
    opacity: 0;
    z-index: 4;
}

.avatar-icon {
    font-size: 4.5rem;
    filter: grayscale(0.3);
    position: relative;
    z-index: 1;
    user-select: none;
}

.avatar-face {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 15%;
    border-radius: 14px;
    position: relative;
    z-index: 1;
    user-select: none;
    pointer-events: none;
}

/* ── Tier 2: Idle video loop ─────────────────────────────── */
.avatar-idle-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 15%;
    border-radius: 14px;
    z-index: 2;
    opacity: 1;
    transition: opacity 0.4s ease;
    pointer-events: none;
    user-select: none;
}

/* When speaking: fade out idle video, show static img + glow */
.speaking .avatar-idle-video {
    opacity: 0;
    pointer-events: none;
}

/* Show static img during speaking state */
.speaking .avatar-face {
    opacity: 1 !important;
}

/* ACT visualizer bar (placeholder — JS will replace) */
.act-visualizer {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    gap: 3px;
    align-items: flex-end;
    height: 24px;
    background: rgba(0,0,0,0.4);
    padding: 4px 12px;
    border-radius: 12px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.act-bar {
    width: 4px;
    border-radius: 2px;
    background: var(--green);
    box-shadow: 0 0 4px var(--green);
    transition: height 0.1s ease;
    height: 4px;
}

/* ── Mr. NetShow — Blue ───────────────────────────────────── */
#panel-mr .avatar-inner {
    border-color: rgba(245,158,11,0.3);
    box-shadow: 0 0 20px rgba(245,158,11,0.1);
}

#panel-mr .act-bar { background: var(--blue); box-shadow: 0 0 4px var(--blue); }

/* ── Mrs. NetShow — Purple ────────────────────────────────── */
#panel-mrs .avatar-inner {
    border-color: rgba(244,114,182,0.3);
    box-shadow: 0 0 20px rgba(244,114,182,0.1);
}

#panel-mrs .act-bar { background: var(--purple); box-shadow: 0 0 4px var(--purple); }

/* Idle breathing — subtle scale pulse when not speaking */
.avatar-container {
    animation: breathe 4s ease-in-out infinite;
}
.speaking .avatar-container {
    animation: none;
    transform: scale(1.02);
}
@keyframes breathe {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.015); }
}

/* ── Speaking Animation ───────────────────────────────────── */
#panel-mr.speaking .avatar-container {
    transform: scale(1.02);
}
#panel-mr.speaking .avatar-inner {
    border-color: var(--blue);
    box-shadow:
        0 0 0 2px rgba(245,158,11,0.45),
        0 0 30px rgba(245,158,11,0.65),
        0 0 85px rgba(245,158,11,0.35),
        inset 0 0 36px rgba(245,158,11,0.08);
    /* animation: glow-amber — removed; glow is now driven by real audio volume via LiveStageAudioViz */
}
#panel-mr.speaking .avatar-inner::before {
    opacity: 1;
    border-color: rgba(245,158,11,0.85);
    /* animation: border-amber — removed; border is now driven by real audio volume via LiveStageAudioViz */
}

#panel-mrs.speaking .avatar-container {
    transform: scale(1.02);
}
#panel-mrs.speaking .avatar-inner {
    border-color: var(--purple);
    box-shadow:
        0 0 0 2px rgba(244,114,182,0.45),
        0 0 30px rgba(244,114,182,0.65),
        0 0 85px rgba(244,114,182,0.35),
        inset 0 0 36px rgba(244,114,182,0.08);
    /* animation: glow-rose — removed; glow is now driven by real audio volume via LiveStageAudioViz */
}
#panel-mrs.speaking .avatar-inner::before {
    opacity: 1;
    border-color: rgba(244,114,182,0.85);
    /* animation: border-rose — removed; border is now driven by real audio volume via LiveStageAudioViz */
}

@keyframes glow-amber {
    0%, 100% {
        box-shadow:
            0 0 0 2px rgba(245,158,11,0.45),
            0 0 30px rgba(245,158,11,0.55),
            0 0 80px rgba(245,158,11,0.25);
    }
    50% {
        box-shadow:
            0 0 0 4px rgba(245,158,11,0.75),
            0 0 50px rgba(245,158,11,0.9),
            0 0 110px rgba(245,158,11,0.45);
    }
}

@keyframes glow-rose {
    0%, 100% {
        box-shadow:
            0 0 0 2px rgba(244,114,182,0.45),
            0 0 30px rgba(244,114,182,0.55),
            0 0 80px rgba(244,114,182,0.25);
    }
    50% {
        box-shadow:
            0 0 0 4px rgba(244,114,182,0.75),
            0 0 50px rgba(244,114,182,0.9),
            0 0 110px rgba(244,114,182,0.45);
    }
}

@keyframes border-amber {
    0%, 100% {
        opacity: 0.5;
        box-shadow: 0 0 8px rgba(245,158,11,0.5);
    }
    50% {
        opacity: 1;
        box-shadow: 0 0 16px rgba(245,158,11,0.85);
    }
}

@keyframes border-rose {
    0%, 100% {
        opacity: 0.5;
        box-shadow: 0 0 8px rgba(244,114,182,0.5);
    }
    50% {
        opacity: 1;
        box-shadow: 0 0 16px rgba(244,114,182,0.85);
    }
}


.avatar-transcript-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 8px 12px;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    border-radius: 0 0 14px 14px;
    z-index: 5;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    min-height: 40px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.avatar-transcript-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.transcript-text {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.9);
    line-height: 1.3;
    max-height: 3.9em;
    overflow: hidden;
    flex: 1;
    margin-right: 8px;
}

.transcript-controls {
    display: flex;
    align-items: center;
}

.transcript-replay-btn {
    background: rgba(255,255,255,0.15);
    border: none;
    color: white;
    padding: 4px;
    border-radius: 50%;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s;
}

.transcript-replay-btn:hover {
    background: rgba(255,255,255,0.3);
}

/* ── Avatar Name + Mic Indicator ──────────────────────────── */
.avatar-name {
    margin-top: 20px;
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-align: center;
}

#panel-mr  .avatar-name { color: var(--blue); text-shadow: 0 0 12px rgba(245,158,11,0.5); }
#panel-mrs .avatar-name { color: var(--purple); text-shadow: 0 0 12px rgba(244,114,182,0.5); }

.avatar-role {
    margin-top: 4px;
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--muted);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-align: center;
}

.mic-indicator {
    margin-top: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--muted);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.mic-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--muted);
    transition: background 0.3s, box-shadow 0.3s;
}

.speaking .mic-dot {
    background: var(--green);
    box-shadow: 0 0 6px var(--green);
    animation: blink 0.8s ease-in-out infinite;
}

/* Corner accent lines */
.avatar-panel .corner-tl,
.avatar-panel .corner-tr,
.avatar-panel .corner-bl,
.avatar-panel .corner-br {
    position: absolute;
    width: 16px;
    height: 16px;
    opacity: 0.4;
}

.corner-tl { top: 12px; left: 12px; border-top: 1px solid; border-left: 1px solid; }
.corner-tr { top: 12px; right: 12px; border-top: 1px solid; border-right: 1px solid; }
.corner-bl { bottom: 12px; left: 12px; border-bottom: 1px solid; border-left: 1px solid; }
.corner-br { bottom: 12px; right: 12px; border-bottom: 1px solid; border-right: 1px solid; }

#panel-mr .corner-tl,
#panel-mr .corner-tr,
#panel-mr .corner-bl,
#panel-mr .corner-br { border-color: var(--blue); }

#panel-mrs .corner-tl,
#panel-mrs .corner-tr,
#panel-mrs .corner-bl,
#panel-mrs .corner-br { border-color: var(--purple); }

/* ── Center Workspace ─────────────────────────────────────── */
#workspace-panel {
    flex: 0 0 50%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    gap: 12px;
    position: relative;
    background: rgba(0,0,0,0.2);
}

/* Mode pills */
#mode-pills {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    flex-shrink: 0;
}

.mode-pill {
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.03);
    color: var(--muted);
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.mode-pill:hover {
    border-color: rgba(251,191,36,0.4);
    color: var(--cyan);
}

.mode-pill.active {
    border-color: var(--cyan);
    background: rgba(251,191,36,0.08);
    color: var(--cyan);
    box-shadow: 0 0 10px rgba(251,191,36,0.15);
}

/* Workspace frame */
#workspace-frame {
    flex: 1 1 0;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(251,191,36,0.15);
    box-shadow:
        0 0 0 1px rgba(251,191,36,0.05),
        0 0 30px rgba(251,191,36,0.06),
        inset 0 0 40px rgba(0,0,0,0.3);
    background: rgba(0,0,0,0.4);
}

/* Corner accents on workspace */
#workspace-frame::before,
#workspace-frame::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    z-index: 2;
    pointer-events: none;
}
#workspace-frame::before {
    top: 0; left: 0;
    border-top: 2px solid rgba(251,191,36,0.5);
    border-left: 2px solid rgba(251,191,36,0.5);
    border-radius: 2px 0 0 0;
}
#workspace-frame::after {
    bottom: 0; right: 0;
    border-bottom: 2px solid rgba(251,191,36,0.5);
    border-right: 2px solid rgba(251,191,36,0.5);
    border-radius: 0 0 2px 0;
}

/* ── Idle State ───────────────────────────────────────────── */
#workspace-idle {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    z-index: 5;
    transition: opacity 0.4s ease;
}

#workspace-idle.hidden {
    opacity: 0;
    pointer-events: none;
}

.idle-logo {
    font-size: 3.5rem;
    animation: float 4s ease-in-out infinite;
    filter: drop-shadow(0 0 20px rgba(251,191,36,0.4));
    user-select: none;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50%       { transform: translateY(-12px); }
}

.idle-brand {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--cyan);
    text-shadow: 0 0 20px rgba(251,191,36,0.5);
}

/* Capabilities marquee */
.capabilities-marquee {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.capabilities-marquee::before,
.capabilities-marquee::after {
    content: '';
    position: absolute;
    top: 0; bottom: 0;
    width: 40px;
    z-index: 2;
}
.capabilities-marquee::before { left: 0; background: linear-gradient(90deg, rgba(0,0,0,0.4), transparent); }
.capabilities-marquee::after  { right: 0; background: linear-gradient(-90deg, rgba(0,0,0,0.4), transparent); }

.marquee-track {
    display: flex;
    gap: 32px;
    animation: marquee 20s linear infinite;
    white-space: nowrap;
    width: max-content;
}

@keyframes marquee {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.cap-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 4px 10px;
    border: 1px solid var(--border);
    border-radius: 100px;
    background: rgba(255,255,255,0.02);
}

.cap-tag .cap-icon { font-size: 0.9rem; }

/* Workspace iframe */
#workspace-iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 12px;
    z-index: 3;
    opacity: 0;
    transition: opacity 0.4s ease;
    background: #0a0a0f;
}

#workspace-iframe.visible { opacity: 1; }

/* ── Bottom Bar ───────────────────────────────────────────── */
#bottom-bar {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    height: 72px;
    background: rgba(10,10,20,0.9);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-top: 1px solid var(--border);
    position: relative;
    z-index: 10;
}

#bottom-bar::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(245,158,11,0.3) 25%,
        rgba(251,191,36,0.5) 50%,
        rgba(244,114,182,0.3) 75%,
        transparent 100%);
}

/* Mic + Stop Buttons */
#mic-btn,
#stop-btn,
#audience-toggle-btn {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid rgba(0,255,136,0.5);
    background: rgba(0,255,136,0.06);
    color: var(--green);
    font-size: 1.3rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 0 12px rgba(0,255,136,0.1);
}

#mic-btn:hover,
#stop-btn:hover,
#audience-toggle-btn:hover {
    border-color: var(--green);
    background: rgba(0,255,136,0.12);
    box-shadow: 0 0 20px rgba(0,255,136,0.25);
}

#mic-btn.active {
    border-color: var(--green);
    background: rgba(0,255,136,0.15);
    animation: mic-pulse 1.5s ease-in-out infinite;
}

#stop-btn {
    border-color: rgba(255, 68, 68, 0.5);
    background: rgba(255, 68, 68, 0.08);
    color: #ff7b7b;
}

#stop-btn:hover {
    border-color: #ff7b7b;
    background: rgba(255, 68, 68, 0.16);
    box-shadow: 0 0 20px rgba(255, 68, 68, 0.25);
}

#audience-toggle-btn {
    border-color: rgba(245,158,11, 0.5);
    background: rgba(245,158,11, 0.08);
    color: var(--cyan);
}

#audience-toggle-btn:hover {
    border-color: var(--cyan);
    background: rgba(245,158,11, 0.16);
    box-shadow: 0 0 20px rgba(245,158,11, 0.25);
}

@keyframes mic-pulse {
    0%, 100% { box-shadow: 0 0 12px rgba(0,255,136,0.3); }
    50%       { box-shadow: 0 0 28px rgba(0,255,136,0.6), 0 0 50px rgba(0,255,136,0.2); }
}

#mic-btn.muted {
    border-color: rgba(255,68,68,0.5);
    background: rgba(255,68,68,0.06);
    color: #ff4444;
    box-shadow: none;
}

/* Transcript Area */
#transcript-area {
    flex: 1 1 0;
    height: 56px;
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0 18px;
    display: flex;
    align-items: center;
    overflow: hidden;
    position: relative;
}

#transcript-area::before {
    content: 'TRANSCRIPT';
    position: absolute;
    top: 4px;
    left: 10px;
    font-size: 0.58rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    color: var(--muted);
    opacity: 0.5;
}

#transcript-text {
    font-size: 1.3rem;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-top: 14px;
    width: 100%;
    font-weight: 500;
}

#transcript-text.typing::after {
    content: '▌';
    animation: cursor-blink 0.7s step-end infinite;
    color: var(--cyan);
}

@keyframes cursor-blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0; }
}

/* Action Queue */
#action-queue {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    min-width: 160px;
}

.action-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    color: var(--muted);
    letter-spacing: 0.05em;
    padding: 2px 0;
    animation: slide-in-right 0.3s ease;
}

@keyframes slide-in-right {
    from { opacity: 0; transform: translateX(10px); }
    to   { opacity: 1; transform: translateX(0); }
}

.action-badge {
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.action-badge.pending  { background: rgba(255,200,0,0.15); color: #ffc800; }
.action-badge.running  { background: rgba(245,158,11,0.15); color: var(--blue); }
.action-badge.done     { background: rgba(0,255,136,0.12); color: var(--green); }
.action-badge.error    { background: rgba(255,68,68,0.15); color: #ff4444; }

/* ── Horizontal scan line ─────────────────────────────────── */
#scan-line {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg,
        transparent, rgba(251,191,36,0.3), rgba(251,191,36,0.8), rgba(251,191,36,0.3), transparent);
    animation: scan-h 10s ease-in-out infinite;
    pointer-events: none;
    z-index: 999;
}

@keyframes scan-h {
    0%   { top: 0%;   opacity: 0; }
    5%   { opacity: 1; }
    95%  { opacity: 1; }
    100% { top: 100%; opacity: 0; }
}

/* ── Audio Control Panel ─────────────────────────────────── */
.audio-control-panel {
    position: fixed;
    top: 58px;
    right: 26%;
    width: 240px;
    border-radius: 12px;
    border: 1px solid rgba(245,158,11, 0.25);
    background: rgba(10, 10, 20, 0.92);
    backdrop-filter: blur(20px);
    box-shadow: 0 0 25px rgba(245,158,11, 0.1);
    z-index: 200;
    font-family: system-ui, -apple-system, sans-serif;
    color: #e0e0e0;
    transition: opacity 0.3s, transform 0.3s;
}

.audio-control-panel.hidden {
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
}

.ac-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.ac-title {
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.03em;
}

.ac-btn-mini {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: transparent;
    color: #999;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ac-body {
    padding: 10px 14px;
    max-height: 500px;
    overflow-y: auto;
    transition: max-height 0.3s, padding 0.3s, opacity 0.3s;
}

.ac-body.collapsed {
    max-height: 0;
    padding: 0 14px;
    opacity: 0;
    overflow: hidden;
}

.ac-section {
    margin-bottom: 14px;
}

.ac-section label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 6px;
    color: #aaa;
}

.ac-section small {
    display: block;
    font-size: 0.7rem;
    color: #666;
    margin-top: 4px;
}

.ac-slider-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ac-slider {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.1);
    outline: none;
}

.ac-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--blue, #f59e0b);
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.ac-slider-row span {
    min-width: 50px;
    text-align: right;
    font-size: 0.8rem;
    font-variant-numeric: tabular-nums;
    color: var(--blue, #f59e0b);
}

.ac-radio-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.ac-radio {
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    color: #ccc;
}

.ac-radio input[type="radio"] {
    accent-color: var(--blue, #f59e0b);
}

.ac-toggle-group {
    display: flex;
    gap: 4px;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.ac-toggle {
    flex: 1;
    padding: 6px 8px;
    border: none;
    background: rgba(255, 255, 255, 0.03);
    color: #888;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s;
}

.ac-toggle:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #bbb;
}

.ac-toggle.active {
    background: rgba(245,158,11, 0.15);
    color: var(--blue, #f59e0b);
    font-weight: 600;
}

.ac-btn {
    width: 100%;
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: #ccc;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.ac-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.ac-btn.active {
    border-color: var(--green, #00ff88);
    color: var(--green, #00ff88);
    background: rgba(0, 255, 136, 0.06);
}

.ac-btn-primary {
    border-color: var(--blue, #f59e0b);
    color: var(--blue, #f59e0b);
    background: rgba(245,158,11, 0.08);
}

.ac-btn-primary:hover {
    background: rgba(245,158,11, 0.15);
}

.ac-mic-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0 0 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.ac-indicator {
    font-size: 12px;
    animation: none;
}

.ac-indicator-live {
    color: var(--green, #00ff88);
    animation: pulse-green 1.5s ease infinite;
}

.ac-indicator-muted {
    color: #ff4444;
    animation: none;
}

.ac-shortcut {
    margin-left: auto;
    font-size: 0.65rem;
    color: #555;
    font-family: monospace;
}

@keyframes pulse-green {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* ── Camera Overlay ───────────────────────────────────────── */
.camera-overlay {
    position: fixed;
    bottom: 100px;
    left: 16px;
    width: 240px;
    height: 180px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(245,158,11, 0.3);
    box-shadow: 0 0 20px rgba(245,158,11, 0.15);
    backdrop-filter: blur(10px);
    background: rgba(10, 10, 15, 0.8);
    z-index: 100;
    transition: opacity 0.3s, transform 0.3s;
}

.camera-overlay.hidden {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}

.camera-overlay video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.camera-control-btn {
    position: absolute;
    bottom: 8px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 101;
}

.camera-control-btn:hover {
    background: rgba(245,158,11, 0.3);
    border-color: var(--blue);
}

#camera-flip-btn { left: 8px; }
#camera-capture-btn { right: 8px; }

#camera-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(8px);
    cursor: pointer;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s;
    flex-shrink: 0;
}

#camera-btn:hover {
    border-color: var(--blue);
    background: rgba(245,158,11, 0.1);
}

#camera-btn.active {
    border-color: var(--green);
    background: rgba(0, 255, 136, 0.1);
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.3);
}

/* ── Audience Panel ───────────────────────────────────────── */
.audience-panel {
    position: fixed;
    right: 16px;
    bottom: 108px;
    width: 320px;
    max-height: 52vh;
    overflow: hidden;
    border-radius: 12px;
    border: 1px solid rgba(251,191,36, 0.25);
    background: rgba(10, 10, 20, 0.92);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: 0 0 24px rgba(245,158,11, 0.15);
    z-index: 130;
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.audience-panel.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.audience-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--cyan);
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.audience-panel-shortcut {
    color: var(--muted);
    font-size: 0.62rem;
}

.audience-list {
    max-height: calc(52vh - 46px);
    overflow-y: auto;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.audience-card {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 8px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
}

.audience-photo {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.audience-photo-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.04);
}

.audience-meta {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.audience-name {
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--text);
}

.audience-count,
.audience-info,
.audience-empty {
    font-size: 0.72rem;
    color: var(--muted);
}

.audience-empty {
    padding: 12px;
    text-align: center;
    border: 1px dashed rgba(255, 255, 255, 0.12);
    border-radius: 10px;
}

/* ── Dev Test Controls ────────────────────────────────────── */
#dev-controls.dev-visible {
    position: fixed;
    bottom: 100px;
    right: 16px;
    flex-direction: column;
    gap: 6px;
    z-index: 100;
    background: rgba(10,10,20,0.95);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px;
}

#dev-controls summary {
    font-size: 0.7rem;
    color: var(--muted);
    cursor: pointer;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    user-select: none;
    margin-bottom: 6px;
}

.dev-btn {
    padding: 5px 10px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.04);
    color: var(--text);
    font-size: 0.72rem;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.dev-btn:hover { background: rgba(255,255,255,0.08); }
.dev-btn.blue   { border-color: rgba(245,158,11,0.4); color: var(--blue); }
.dev-btn.purple { border-color: rgba(244,114,182,0.4); color: var(--purple); }
.dev-btn.green  { border-color: rgba(0,255,136,0.4); color: var(--green); }

/* ── Demo Mode Indicator ──────────────────────────────────── */
#demo-mode-badge {
    position: fixed;
    top: 8px;
    right: 8px;
    padding: 3px 10px;
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--green);
    border: 1px solid rgba(0,255,136,0.2);
    border-radius: 4px;
    background: rgba(0,255,136,0.05);
    opacity: 0.5;
    z-index: 1000;
    pointer-events: none;
    transition: opacity 0.3s;
}

/* ── Thinking Mode — GPT-5.4 Reasoning Trace ─────────────── */
#workspace-thinking {
    display: none;
    flex-direction: column;
    position: absolute;
    inset: 0;
    background: rgba(8, 6, 2, 0.97);
    border-radius: 12px;
    overflow: hidden;
    z-index: 5;
    border: 1px solid rgba(251, 191, 36, 0.2);
    box-shadow: 0 0 40px rgba(251, 191, 36, 0.06) inset;
}

.thinking-header {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.06);
    border-bottom: 1px solid rgba(251, 191, 36, 0.15);
    animation: thinking-pulse 2s ease-in-out infinite;
}

.thinking-header::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #fbbf24;
    box-shadow: 0 0 8px #fbbf24;
    animation: thinking-dot-pulse 1s ease-in-out infinite;
}

@keyframes thinking-pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.8; }
}

@keyframes thinking-dot-pulse {
    0%, 100% { transform: scale(1);   opacity: 1; }
    50%       { transform: scale(1.4); opacity: 0.7; }
}

#thinking-content {
    flex: 1 1 auto;
    margin: 0;
    padding: 16px;
    overflow-y: auto;
    font-family: ui-monospace, SFMono-Regular, 'Cascadia Code', Menlo, monospace;
    font-size: 0.78rem;
    line-height: 1.7;
    color: #fbbf24;
    white-space: pre-wrap;
    word-break: break-word;
    text-shadow: 0 0 8px rgba(251, 191, 36, 0.3);
    scrollbar-width: thin;
    scrollbar-color: rgba(251, 191, 36, 0.3) transparent;
}

#thinking-content::-webkit-scrollbar {
    width: 4px;
}
#thinking-content::-webkit-scrollbar-track {
    background: transparent;
}
#thinking-content::-webkit-scrollbar-thumb {
    background: rgba(251, 191, 36, 0.3);
    border-radius: 2px;
}

/* ── Skills Catalog Overlay ───────────────────────────────── */
#workspace-skills {
    display: none;
    flex-direction: column;
    position: absolute;
    inset: 0;
    background: rgba(8, 6, 14, 0.97);
    border-radius: 12px;
    overflow: hidden;
    z-index: 5;
    border: 1px solid rgba(245,158,11, 0.15);
    box-shadow: 0 0 40px rgba(245,158,11, 0.04) inset;
}

.skills-header {
    flex: 0 0 auto;
    padding: 14px 20px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(245,158,11, 0.04);
}

.skills-title {
    font-size: 1rem;
    font-weight: 700;
    color: #f59e0b;
    letter-spacing: 0.04em;
    line-height: 1.2;
}

.skills-subtitle {
    font-size: 0.72rem;
    color: #6b7280;
    margin-top: 2px;
    letter-spacing: 0.02em;
}

.skills-grid {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 14px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    align-content: start;
    scrollbar-width: thin;
    scrollbar-color: rgba(245,158,11, 0.2) transparent;
}

.skills-grid::-webkit-scrollbar { width: 4px; }
.skills-grid::-webkit-scrollbar-track { background: transparent; }
.skills-grid::-webkit-scrollbar-thumb { background: rgba(245,158,11, 0.2); border-radius: 2px; }

@media (max-width: 1200px) {
    .skills-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 800px) {
    .skills-grid { grid-template-columns: repeat(2, 1fr); }
}

.skill-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 12px 12px 10px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
    cursor: default;
}

.skill-card:hover {
    transform: scale(1.02);
    border-color: rgba(245,158,11, 0.3);
    box-shadow: 0 0 12px rgba(245,158,11, 0.2);
}

.skill-card.skill-loaded {
    border-color: rgba(0, 255, 136, 0.4);
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.12);
    background: rgba(0, 255, 136, 0.04);
}

.skill-loaded-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #00ff88;
    color: #0d0d12;
    font-size: 0.65rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.skill-icon {
    font-size: 1.5rem;
    line-height: 1;
    margin-bottom: 2px;
}

.skill-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: #e5e7eb;
    line-height: 1.2;
}

.skill-category {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 20px;
    font-size: 0.64rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    border: 1px solid;
    width: fit-content;
    line-height: 1.4;
}

.skill-desc {
    font-size: 0.72rem;
    color: #9ca3af;
    line-height: 1.45;
    flex: 1;
    margin-top: 2px;
}

.skill-load-btn {
    margin-top: 6px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    cursor: pointer;
    border: 1px solid rgba(245,158,11, 0.4);
    background: rgba(245,158,11, 0.1);
    color: #f59e0b;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    align-self: flex-start;
}

.skill-load-btn:hover {
    background: rgba(245,158,11, 0.22);
    border-color: rgba(245,158,11, 0.7);
}

.skill-load-btn--loaded {
    background: rgba(0, 255, 136, 0.12);
    color: #00ff88;
    border-color: rgba(0, 255, 136, 0.4);
    cursor: default;
}

.skill-load-btn--loaded:hover {
    background: rgba(0, 255, 136, 0.15);
    border-color: rgba(0, 255, 136, 0.5);
}

/* ── Dev Controls (hidden by default in demo mode) ────────── */
#dev-controls {
    display: none;
}
#dev-controls.dev-visible {
    display: flex;
}

/* ── Utility ──────────────────────────────────────────────── */
.hidden { display: none !important; }

/* ── Responsive: 2560x1440+ — scale up for stage ──────────── */
@media (min-width: 2000px) {
    .avatar-container { width: clamp(320px, 19vw, 420px); height: clamp(320px, 19vw, 420px); }
    .avatar-icon      { font-size: 6rem; }
    .avatar-name      { font-size: 1.8rem; }
    .avatar-role      { font-size: 0.9rem; }
    .mic-indicator    { font-size: 0.9rem; }
    #slogan           { font-size: 2.2rem; }
    #top-bar          { height: 72px; }
    #bottom-bar       { height: 100px; }
    #mic-btn          { width: 84px; height: 84px; font-size: 2.2rem; }
    #stop-btn         { width: 84px; height: 84px; font-size: 2.2rem; }
    #camera-btn       { width: 84px; height: 84px; font-size: 32px; }
    #transcript-text  { font-size: 1.6rem; }
    #transcript-area  { height: 64px; }
    .act-bar          { width: 6px; }
    .brand            { font-size: 1rem; }
    .brand-bolt       { font-size: 1.3rem; }
    .idle-logo        { font-size: 5rem; }
    .idle-brand       { font-size: 2rem; }
    .cap-tag          { font-size: 0.95rem; padding: 6px 14px; }
}

/* ── Responsive avatar scaling ────────────────────────────── */
@media (max-width: 1280px) {
    .avatar-container { width: clamp(240px, 24vw, 320px); height: clamp(240px, 24vw, 320px); }
    .avatar-name      { font-size: 1.1rem; }
    #slogan           { font-size: 1.2rem; }
}

@media (max-width: 768px) {
    .avatar-container { width: clamp(220px, 40vw, 280px); height: clamp(220px, 40vw, 280px); }
    .avatar-inner,
    .avatar-face,
    .avatar-idle-video { border-radius: 12px; }
    .avatar-transcript-overlay { border-radius: 0 0 12px 12px; }
}

@media (max-width: 480px) {
    .avatar-container { width: clamp(200px, 46vw, 240px); height: clamp(200px, 46vw, 240px); }
    .avatar-name      { font-size: 0.95rem; }
    .act-visualizer   { bottom: 10px; padding: 3px 10px; }
    .transcript-text  { font-size: 0.68rem; }
}

/* ═══════════════════════════════════════════════════════════
   BANTER MODE — LIVE DEBATE INDICATOR
   ═══════════════════════════════════════════════════════════ */

#banter-indicator {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 20;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    opacity: 0;
    transition: opacity 0.4s ease;
}

#banter-indicator.banter-active {
    opacity: 1;
    pointer-events: none;
}

/* Pulsing connection line that spans the full stage */
#banter-indicator::before,
#banter-indicator::after {
    content: '';
    flex: 1;
    height: 2px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255, 100, 50, 0.3) 30%,
        rgba(255, 160, 50, 0.8) 100%);
}

#banter-indicator::after {
    background: linear-gradient(270deg,
        transparent 0%,
        rgba(255, 100, 50, 0.3) 30%,
        rgba(255, 160, 50, 0.8) 100%);
}

#banter-indicator.banter-active::before,
#banter-indicator.banter-active::after {
    animation: banter-line-pulse 1.2s ease-in-out infinite alternate;
}

.banter-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 16px;
    border-radius: 100px;
    border: 1px solid rgba(255, 140, 0, 0.6);
    background: rgba(255, 100, 0, 0.12);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #ffa040;
    white-space: nowrap;
    box-shadow: 0 0 16px rgba(255, 100, 0, 0.3);
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

#banter-indicator.banter-active .banter-badge {
    opacity: 1;
    transform: scale(1);
    animation: banter-badge-pulse 1.2s ease-in-out infinite alternate;
}

.banter-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #ff8c00;
    box-shadow: 0 0 6px #ff8c00;
    animation: blink 0.6s ease-in-out infinite;
}

@keyframes banter-line-pulse {
    0%   { opacity: 0.5; }
    100% { opacity: 1; }
}

@keyframes banter-badge-pulse {
    0%   { box-shadow: 0 0 10px rgba(255,100,0,0.3); }
    100% { box-shadow: 0 0 28px rgba(255,100,0,0.7), 0 0 50px rgba(255,80,0,0.2); }
}

/* ═══════════════════════════════════════════════════════════
   WEBRTC TELEMETRY BADGES (above each avatar panel)
   ═══════════════════════════════════════════════════════════ */

.webrtc-badge {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 100px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: var(--muted);
    white-space: nowrap;
    z-index: 5;
    transition: border-color 0.3s, color 0.3s;
    pointer-events: none;
}

.badge-rtt {
    font-variant-numeric: tabular-nums;
    color: var(--cyan);
    min-width: 36px;
    text-align: center;
}

.badge-state { opacity: 0.7; }

/* State-based badge coloring */
@keyframes badge-pulse-blue {
    0%, 100% { box-shadow: 0 0 0 rgba(245,158,11,0.2); }
    50% { box-shadow: 0 0 14px rgba(245,158,11,0.45); }
}

@keyframes badge-pulse-orange {
    0%, 100% { box-shadow: 0 0 0 rgba(255,140,0,0.2); }
    50% { box-shadow: 0 0 14px rgba(255,140,0,0.55); }
}

.webrtc-badge.badge-ready,
.webrtc-badge.badge-connected {
    border-color: rgba(0,255,136,0.35);
}
.webrtc-badge.badge-ready .badge-state,
.webrtc-badge.badge-connected .badge-state {
    color: var(--green);
    opacity: 1;
}

.webrtc-badge.badge-connecting {
    border-color: rgba(245,158,11,0.35);
    animation: badge-pulse-blue 1.2s ease-in-out infinite;
}
.webrtc-badge.badge-connecting .badge-state {
    color: var(--blue);
    opacity: 1;
}

.webrtc-badge.badge-degraded {
    border-color: rgba(255,200,0,0.45);
}
.webrtc-badge.badge-degraded .badge-state {
    color: #ffc800;
    opacity: 1;
}

.webrtc-badge.badge-recovering {
    border-color: rgba(255,140,0,0.45);
    animation: badge-pulse-orange 1s ease-in-out infinite;
}
.webrtc-badge.badge-recovering .badge-state {
    color: #ff9f43;
    opacity: 1;
}

.webrtc-badge.badge-failed,
.webrtc-badge.badge-disconnected {
    border-color: rgba(255,68,68,0.5);
}
.webrtc-badge.badge-failed .badge-state,
.webrtc-badge.badge-disconnected .badge-state {
    color: #ff4444;
    opacity: 1;
}

/* ═══════════════════════════════════════════════════════════
   STAGE DIRECTOR OVERLAY
   ═══════════════════════════════════════════════════════════ */

#stage-director {
    position: fixed;
    top: 60px;
    right: 20px;
    left: auto;
    transform: translateY(30px);
    z-index: 99999;
    width: min(860px, 95vw);

    background: rgba(8, 8, 18, 0.92);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(251,191,36, 0.2);
    border-radius: 16px;
    box-shadow:
        0 0 0 1px rgba(251,191,36,0.05),
        0 8px 40px rgba(0,0,0,0.6),
        0 0 60px rgba(251,191,36,0.06);

    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
    overflow-x: hidden;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
}

#stage-director.director-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

#stage-director::-webkit-scrollbar {
    width: 6px;
}

#stage-director::-webkit-scrollbar-track {
    background: transparent;
}

#stage-director::-webkit-scrollbar-thumb {
    background: rgba(251,191,36,0.3);
    border-radius: 3px;
}

#stage-director::-webkit-scrollbar-thumb:hover {
    background: rgba(251,191,36,0.5);
}

/* Draggable header cursor */
.director-header {
    cursor: move;
    user-select: none;
}

.director-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px 8px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    background: rgba(251,191,36,0.04);
}

.director-title {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--cyan);
    flex: 1;
}

.director-shortcut {
    font-size: 0.62rem;
    color: var(--muted);
    font-family: monospace;
    letter-spacing: 0.05em;
    opacity: 0.6;
}

.director-cost-display {
    font-size: 0.62rem;
    color: #a8e6a3;
    font-family: monospace;
    letter-spacing: 0.03em;
    opacity: 0.85;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
    flex: 1 1 auto;
    text-align: right;
}

.director-close {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.04);
    color: var(--muted);
    cursor: pointer;
    font-size: 0.65rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    flex-shrink: 0;
}

.director-close:hover {
    background: rgba(255,68,68,0.15);
    border-color: rgba(255,68,68,0.4);
    color: #ff6b6b;
}

/* Macro grid */
.director-macros {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 8px;
    padding: 12px 14px;
}

.director-macro {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 10px 8px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.03);
    color: var(--text);
    cursor: pointer;
    transition: all 0.18s ease;
    min-height: 70px;
    position: relative;
    overflow: hidden;
}

.director-macro::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.02) 0%, transparent 100%);
    border-radius: inherit;
    pointer-events: none;
}

.director-macro:hover {
    border-color: rgba(251,191,36,0.35);
    background: rgba(251,191,36,0.07);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(251,191,36,0.1);
}

.director-macro:active {
    transform: translateY(0) scale(0.97);
}

.macro-icon {
    font-size: 1.4rem;
    line-height: 1;
    filter: drop-shadow(0 0 4px rgba(255,255,255,0.1));
}

.macro-label {
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-align: center;
    color: var(--muted);
    line-height: 1.3;
}

/* Toggle state */
.director-macro.macro-toggle.macro-active {
    border-color: rgba(251,191,36,0.5);
    background: rgba(251,191,36,0.1);
    box-shadow: 0 0 14px rgba(251,191,36,0.2);
}

.director-macro.macro-toggle.macro-active .macro-label {
    color: var(--cyan);
}

/* Specific macro accent colors */
.director-macro:nth-child(1):hover { border-color: rgba(245,158,11,0.4); background: rgba(245,158,11,0.08); }
.director-macro:nth-child(5):hover { border-color: rgba(255,140,0,0.4); background: rgba(255,140,0,0.08); }
.director-macro:nth-child(6):hover { border-color: rgba(255,68,68,0.4); background: rgba(255,68,68,0.08); }
.director-macro:nth-child(8):hover { border-color: rgba(255,68,68,0.5); background: rgba(255,50,50,0.1); }
.director-macro:nth-child(8) .macro-icon { font-size: 1.6rem; }

/* ── Demo Sequences Section ────────────────────────────────── */
.director-sequences {
    border-top: 1px solid rgba(255,255,255,0.05);
    background: rgba(0,0,0,0.15);
}

.seq-section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px 6px;
    flex-wrap: wrap;
}

.seq-section-title {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--cyan);
    flex-shrink: 0;
}

.seq-progress-text {
    font-size: 0.62rem;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
    opacity: 0.7;
    margin-right: auto;
}

.seq-controls {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.seq-ctrl-btn {
    font-size: 0.62rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.04);
    color: var(--muted);
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
    letter-spacing: 0.02em;
}

.seq-ctrl-btn:hover:not(:disabled) {
    border-color: rgba(251,191,36,0.4);
    background: rgba(251,191,36,0.08);
    color: var(--cyan);
}

.seq-ctrl-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.seq-btn-playall:hover:not(:disabled) {
    border-color: rgba(251,191,36,0.5);
    background: rgba(251,191,36,0.12);
    color: var(--cyan);
    box-shadow: 0 0 10px rgba(251,191,36,0.15);
}

.seq-btn-stop:hover:not(:disabled) {
    border-color: rgba(255,68,68,0.5);
    background: rgba(255,68,68,0.1);
    color: #ff6b6b;
}

.seq-btn-reset:hover:not(:disabled) {
    border-color: rgba(255,200,0,0.4);
    background: rgba(255,200,0,0.08);
    color: #ffc800;
}

/* Progress bar */
.seq-progress-bar {
    height: 2px;
    background: rgba(255,255,255,0.06);
    margin: 0 14px 6px;
    border-radius: 2px;
    overflow: hidden;
}

.seq-progress-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--cyan), rgba(251,191,36,0.5));
    border-radius: 2px;
    transition: width 0.4s ease;
}

/* Sequence list */
.seq-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 0 8px 8px;
    max-height: 220px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(251,191,36,0.2) transparent;
}

.seq-list::-webkit-scrollbar {
    width: 4px;
}

.seq-list::-webkit-scrollbar-track {
    background: transparent;
}

.seq-list::-webkit-scrollbar-thumb {
    background: rgba(251,191,36,0.2);
    border-radius: 2px;
}

.demo-seq-item {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 4px 8px;
    border-radius: 7px;
    border: 1px solid transparent;
    background: rgba(255,255,255,0.02);
    transition: all 0.18s ease;
    min-height: 32px;
    cursor: default;
}

.demo-seq-item:hover {
    background: rgba(255,255,255,0.04);
    border-color: rgba(255,255,255,0.06);
}

/* Active beat — cyan glow */
.demo-seq-item.seq-active {
    border-color: rgba(251,191,36,0.45);
    background: rgba(251,191,36,0.08);
    box-shadow: 0 0 12px rgba(251,191,36,0.18), inset 0 0 8px rgba(251,191,36,0.04);
}

.demo-seq-item.seq-active .seq-name {
    color: var(--cyan);
    font-weight: 700;
}

/* Completed beats — dimmed */
.demo-seq-item.seq-done {
    opacity: 0.4;
}

.demo-seq-item.seq-done .seq-check {
    display: inline;
    color: var(--cyan);
}

.seq-play-btn {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.04);
    color: var(--muted);
    cursor: pointer;
    font-size: 0.55rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.15s;
    padding: 0;
    line-height: 1;
}

.seq-play-btn:hover {
    border-color: rgba(251,191,36,0.5);
    background: rgba(251,191,36,0.15);
    color: var(--cyan);
    box-shadow: 0 0 6px rgba(251,191,36,0.2);
}

.seq-icon {
    font-size: 0.9rem;
    flex-shrink: 0;
    filter: drop-shadow(0 0 3px rgba(255,255,255,0.1));
}

.seq-name {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--muted);
    flex: 1;
    letter-spacing: 0.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.seq-persona {
    font-size: 0.75rem;
    flex-shrink: 0;
    opacity: 0.6;
}

.seq-persona-both {
    opacity: 0.9;
}

.seq-check {
    display: none;
    font-size: 0.65rem;
    color: var(--cyan);
    flex-shrink: 0;
    font-weight: 700;
}

/* ── SF-1: Cost Dashboard ─────────────────────────────────── */

.cost-dashboard {
    border-top: 1px solid rgba(255,255,255,0.05);
    background: rgba(0,0,0,0.18);
}

.cost-dashboard-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px 6px;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s ease;
    flex-wrap: wrap;
}

.cost-dashboard-header:hover {
    background: rgba(245,158,11,0.04);
}

.cost-section-title {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--cyan);
    flex-shrink: 0;
    white-space: nowrap;
}

.cost-summary-bar {
    display: flex;
    align-items: center;
    gap: 5px;
    flex: 1;
    flex-wrap: wrap;
    font-size: 0.63rem;
    font-variant-numeric: tabular-nums;
}

.cost-summary-total {
    color: #f59e0b;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.cost-summary-sep {
    color: rgba(255,255,255,0.2);
    font-size: 0.55rem;
}

.cost-summary-turns,
.cost-summary-duration,
.cost-summary-rate {
    color: rgba(255,255,255,0.45);
}

.cost-section-toggle {
    font-size: 0.6rem;
    color: rgba(255,255,255,0.3);
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

/* ── Dashboard body (collapsible) ────────────────────────── */

.cost-dashboard-body {
    padding: 0 8px 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow: hidden;
    max-height: 400px;
    transition: max-height 0.25s ease, opacity 0.2s ease;
    opacity: 1;
}

.cost-dashboard-body.cost-dashboard-collapsed {
    max-height: 0;
    opacity: 0;
    padding-bottom: 0;
}

/* ── Breakdown table ─────────────────────────────────────── */

.cost-breakdown-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.62rem;
    font-variant-numeric: tabular-nums;
    color: rgba(255,255,255,0.65);
}

.cost-breakdown-table th {
    text-align: left;
    font-size: 0.58rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.3);
    padding: 4px 6px 3px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
}

.cost-breakdown-table th:not(:first-child),
.cost-breakdown-table td:not(:first-child) {
    text-align: right;
}

.cost-breakdown-table td {
    padding: 3px 6px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.cost-breakdown-table tbody tr:hover {
    background: rgba(255,255,255,0.025);
}

.cost-breakdown-table tfoot .cost-total-row td {
    border-top: 1px solid rgba(255,255,255,0.1);
    border-bottom: none;
    font-weight: 700;
    color: #f59e0b;
    padding-top: 5px;
}

/* ── Per-persona split ───────────────────────────────────── */

.cost-persona-split {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 5px 6px;
    border: 1px solid rgba(245,158,11,0.12);
    border-radius: 6px;
    background: rgba(245,158,11,0.04);
}

.persona-cost-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.62rem;
    font-variant-numeric: tabular-nums;
}

.persona-cost-label {
    flex: 1;
    color: rgba(255,255,255,0.5);
    white-space: nowrap;
}

.persona-cost-tokens {
    color: rgba(255,255,255,0.3);
    font-size: 0.58rem;
    min-width: 60px;
    text-align: right;
}

.persona-cost-value {
    color: #f59e0b;
    font-weight: 700;
    min-width: 48px;
    text-align: right;
}

/* ── Cost projection ─────────────────────────────────────── */

.cost-projection {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 6px;
    font-size: 0.62rem;
    border-radius: 5px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.05);
}

.cost-projection-label {
    color: rgba(255,255,255,0.35);
    flex: 1;
}

.cost-projection-value {
    color: #f59e0b;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

/* ── Sparkline ───────────────────────────────────────────── */

.cost-sparkline {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 30px;
    padding: 0 6px;
    border-radius: 5px;
    background: rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.05);
    overflow: hidden;
}

.cost-bar {
    flex: 1;
    min-width: 4px;
    max-width: 16px;
    background: linear-gradient(to top, rgba(245,158,11,0.7), rgba(251,191,36,0.4));
    border-radius: 2px 2px 0 0;
    transition: height 0.3s ease;
}

.cost-bar:hover {
    background: linear-gradient(to top, #f59e0b, rgba(251,191,36,0.7));
}

/* ── Telemetry section ───────────────────────────────────── */
/* Telemetry section */
.director-telemetry {
    display: flex;
    gap: 16px;
    padding: 8px 14px 10px;
    border-top: 1px solid rgba(255,255,255,0.05);
    background: rgba(0,0,0,0.2);
}

.telemetry-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    font-size: 0.65rem;
    letter-spacing: 0.05em;
}

.tel-label {
    color: var(--muted);
    min-width: 48px;
    font-weight: 600;
}

.tel-badge {
    font-variant-numeric: tabular-nums;
    color: var(--cyan);
    min-width: 40px;
    background: rgba(251,191,36,0.08);
    border: 1px solid rgba(251,191,36,0.15);
    border-radius: 4px;
    padding: 1px 5px;
    text-align: center;
    font-size: 0.62rem;
}

.tel-state {
    color: var(--muted);
    font-size: 0.6rem;
    opacity: 0.7;
}

.tel-state-ready,
.tel-state-connected    { color: var(--green) !important; opacity: 1; }
.tel-state-connecting   { color: var(--blue) !important; opacity: 1; }
.tel-state-degraded     { color: #ffc800 !important; opacity: 1; }
.tel-state-recovering   { color: #ff9f43 !important; opacity: 1; }
.tel-state-failed,
.tel-state-disconnected { color: #ff4444 !important; opacity: 1; }

/* ═══════════════════════════════════════════════════════════
   TRANSCRIPT SUBTITLE OVERLAY
   ═══════════════════════════════════════════════════════════ */

#subtitle-overlay {
    position: absolute;
    bottom: 20px;
    left: 10%;
    right: 10%;
    z-index: 10;
    font-size: 1.4rem;
    font-weight: 600;
    line-height: 1.4;
    background: rgba(0, 0, 0, 0.72);
    color: #ffffff;
    border-radius: 10px;
    padding: 10px 20px;
    max-width: 80%;
    margin: 0 auto;
    text-align: center;
    pointer-events: none;
    word-wrap: break-word;

    /* Hidden by default — toggled by .subtitles-enabled + .subtitle-visible */
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.35s ease, transform 0.35s ease;
}

/* Subtitles are enabled (system is ready to show) */
#subtitle-overlay.subtitles-enabled.subtitle-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Fade out when .subtitle-visible removed */
#subtitle-overlay.subtitles-enabled:not(.subtitle-visible) {
    opacity: 0;
    transform: translateY(8px);
}

.subtitle-speaker {
    color: var(--cyan);
    font-weight: 700;
    margin-right: 4px;
}

/* Responsive scale for large screens */
@media (min-width: 2000px) {
    #subtitle-overlay { font-size: 1.8rem; }
    .director-macros  { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
    .director-macro   { min-height: 86px; }
    .macro-icon       { font-size: 1.8rem; }
    .macro-label      { font-size: 0.75rem; }
}

/* ============================================================
   WORKSPACE PANELS - Search, Dashboard, Skills (shared base)
   ============================================================ */

/* Shared panel base */
#workspace-search,
#workspace-dashboard {
    display: none;
    flex-direction: column;
    position: absolute;
    inset: 0;
    background: rgba(8, 6, 14, 0.97);
    border-radius: 12px;
    overflow: hidden;
    z-index: 5;
    padding: 0;
}

/* Panel header (shared) */
.ws-panel-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px 10px;
    border-bottom: 1px solid rgba(245, 158, 11, 0.12);
    flex-shrink: 0;
}

.ws-panel-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #f59e0b;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.ws-panel-subtitle {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.35);
    font-style: italic;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 260px;
}

/* ── Search Panel ─────────────────────────────────────────── */
.ws-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    gap: 12px;
    padding: 32px;
    opacity: 0.5;
}

.ws-empty-icon {
    font-size: 2.5rem;
    line-height: 1;
}

.ws-empty-message {
    font-size: 0.88rem;
    color: rgba(255,255,255,0.5);
    text-align: center;
    max-width: 300px;
    line-height: 1.5;
}

.ws-results-container {
    display: none;
    flex-direction: column;
    gap: 8px;
    padding: 12px 14px;
    overflow-y: auto;
    flex: 1;
    align-content: start;
}

.ws-results-container::-webkit-scrollbar { width: 4px; }
.ws-results-container::-webkit-scrollbar-track { background: transparent; }
.ws-results-container::-webkit-scrollbar-thumb { background: rgba(245,158,11,0.2); border-radius: 2px; }

.ws-search-result {
    padding: 12px 14px;
    border-radius: 8px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
    transition: border-color 0.2s;
}

.ws-search-result:hover { border-color: rgba(245,158,11,0.25); }

.ws-result-title {
    color: #f59e0b;
    font-size: 0.92rem;
    font-weight: 600;
    margin: 0 0 4px;
    line-height: 1.3;
}

.ws-result-url {
    color: #00ff88;
    font-size: 0.72rem;
    text-decoration: none;
    word-break: break-all;
    display: block;
    margin-bottom: 6px;
    opacity: 0.8;
}

.ws-result-url:hover { text-decoration: underline; opacity: 1; }

.ws-result-snippet {
    color: #9ca3af;
    font-size: 0.8rem;
    line-height: 1.5;
    margin: 0;
}

.ws-no-results {
    color: rgba(255,255,255,0.35);
    font-size: 0.85rem;
    text-align: center;
    padding: 32px;
}

/* ── Dashboard Panel ──────────────────────────────────────── */
.ws-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 14px;
}

.ws-stat-card {
    background: rgba(245,158,11,0.04);
    border: 1px solid rgba(245,158,11,0.12);
    border-radius: 10px;
    padding: 14px 16px;
    text-align: center;
    transition: border-color 0.2s, background 0.2s;
}

.ws-stat-card:hover {
    border-color: rgba(245,158,11,0.3);
    background: rgba(245,158,11,0.07);
}

.ws-stat-icon {
    font-size: 1.5rem;
    line-height: 1;
    margin-bottom: 6px;
}

.ws-stat-value {
    font-size: 1.6rem;
    font-weight: 800;
    color: #f59e0b;
    line-height: 1;
    margin-bottom: 4px;
    font-variant-numeric: tabular-nums;
}

.ws-stat-label {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.4);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.ws-dash-agents {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0 14px 14px;
    margin-top: auto;
}

.ws-dash-agent {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: rgba(255,255,255,0.025);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px;
}

.ws-dash-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.ws-dash-dot--online  { background: #00ff88; box-shadow: 0 0 6px rgba(0,255,136,0.5); }
.ws-dash-dot--offline { background: #6b7280; }

.ws-dash-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: rgba(255,255,255,0.85);
    flex-shrink: 0;
}

.ws-dash-role {
    font-size: 0.73rem;
    color: rgba(255,255,255,0.35);
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ws-dash-badge {
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 10px;
    background: rgba(0,255,136,0.1);
    color: #00ff88;
    border: 1px solid rgba(0,255,136,0.2);
    flex-shrink: 0;
}

/* ── Skills Panel — Capability Cards ─────────────────────── */
.ws-capability-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 14px;
    overflow-y: auto;
    flex: 1;
    align-content: start;
}

.ws-capability-grid::-webkit-scrollbar { width: 4px; }
.ws-capability-grid::-webkit-scrollbar-track { background: transparent; }
.ws-capability-grid::-webkit-scrollbar-thumb { background: rgba(245,158,11,0.2); border-radius: 2px; }

.ws-cap-card {
    background: rgba(245,158,11,0.04);
    border: 1px solid rgba(245,158,11,0.12);
    border-radius: 10px;
    padding: 16px;
    transition: border-color 0.2s, background 0.2s;
}

.ws-cap-card:hover {
    border-color: rgba(245,158,11,0.3);
    background: rgba(245,158,11,0.08);
}

.ws-cap-icon {
    font-size: 1.8rem;
    line-height: 1;
    margin-bottom: 8px;
}

.ws-cap-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #f59e0b;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.ws-cap-desc {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.5);
    line-height: 1.5;
}

@media (max-width: 600px) {
    .ws-stats-grid,
    .ws-capability-grid { grid-template-columns: 1fr; }
}

/* Live captioning from text modality */
.agent-caption {
    background: rgba(59, 130, 246, 0.08);
    border-left: 2px solid #3b82f6;
    padding: 4px 8px;
    margin: 2px 0;
    font-size: 0.85rem;
    animation: caption-fade-in 0.2s ease;
}
.agent-caption[data-persona="mrs"] {
    border-left-color: #a855f7;
    background: rgba(168, 85, 247, 0.08);
}
.caption-text {
    color: #e2e8f0;
}
@keyframes caption-fade-in {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Hide avatar transcript overlay — redundant with dedicated caption area */
.avatar-transcript-overlay {
    display: none !important;
}

/* ============================================================
   Search Result Cards — Dark Amber Theme
   Added: 2026-03-15 (search-display polish)
   ============================================================ */

.ws-search-result {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(245,158,11,0.15);
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 12px;
    transition: border-color 0.2s;
}

.ws-search-result:hover {
    border-color: rgba(245,158,11,0.4);
}

.ws-result-title {
    color: #f59e0b;
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 4px;
}

.ws-result-url {
    color: #6b7280;
    font-size: 0.75rem;
    text-decoration: none;
    display: block;
    margin-bottom: 8px;
    word-break: break-all;
}

.ws-result-url:hover {
    color: #f59e0b;
}

.ws-result-snippet {
    color: #d1d5db;
    font-size: 0.85rem;
    line-height: 1.5;
    margin: 0;
}

.ws-no-results {
    color: #6b7280;
    text-align: center;
    padding: 40px 20px;
    font-style: italic;
}

.ws-search-header {
    color: #9ca3af;
    font-size: 0.8rem;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    width: 100%;
}

.ws-search-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #f59e0b;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.ws-search-loading-icon {
    font-size: 2rem;
    animation: ws-pulse 1.2s ease-in-out infinite;
}

.ws-search-loading-text {
    font-size: 0.95rem;
    color: #f59e0b;
}

.ws-search-loading-text em {
    font-style: normal;
    color: #fcd34d;
}

.ws-search-loading-dots {
    display: flex;
    gap: 6px;
}

.ws-search-loading-dots span {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #f59e0b;
    animation: ws-bounce 1.2s infinite;
}

.ws-search-loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.ws-search-loading-dots span:nth-child(3) { animation-delay: 0.4s; }

/* Fade-in for result cards */
.ws-fade-in {
    animation: ws-fade-in 0.3s ease both;
}

@keyframes ws-pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.4; }
}

@keyframes ws-bounce {
    0%, 80%, 100% { transform: translateY(0); }
    40%           { transform: translateY(-8px); }
}

@keyframes ws-fade-in {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── UI Cleanup 2026-03-15 ─────────────────────────────────── */

/* Idle captions: large transcript text in center workspace */
.idle-captions {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: clamp(2rem, 5vw, 4rem);
    color: rgba(255,255,255,0.9);
    text-align: center;
    max-width: 80%;
    text-shadow: 0 0 30px rgba(245,158,11,0.3);
    transition: opacity 0.5s;
    pointer-events: none;
    z-index: 5;
    line-height: 1.3;
    font-weight: 300;
    letter-spacing: 0.02em;
}

.idle-captions.hidden {
    opacity: 0;
}

/* Bottom bar responsive: tighter on mobile */
@media (max-width: 768px) {
    #bottom-bar {
        gap: 2px;
        padding: 6px 8px;
        height: 60px;
    }

    #bottom-bar button,
    #mic-btn,
    #stop-btn,
    #audience-toggle-btn,
    #camera-btn {
        width: 40px !important;
        height: 40px !important;
        font-size: 1.1rem !important;
        min-width: 36px;
    }
}

/* General bottom-bar button compact style */
#bottom-bar button {
    padding: 6px 8px;
    font-size: 1.1rem;
    min-width: 36px;
}

/* ── Transcript Persona Styling ─────────────────────────── */
.transcript-mr .transcript-label { color: #f59e0b; font-weight: 600; }
.transcript-mrs .transcript-label { color: #f472b6; font-weight: 600; }
.transcript-system .transcript-label { color: #6b7280; font-style: italic; }
.transcript-user .transcript-label { color: #60a5fa; font-weight: 600; }

.transcript-mr { border-left: 2px solid rgba(245,158,11,0.4); padding-left: 8px; margin-bottom: 4px; }
.transcript-mrs { border-left: 2px solid rgba(244,114,182,0.4); padding-left: 8px; margin-bottom: 4px; }
.transcript-system { border-left: 2px solid rgba(107,114,128,0.3); padding-left: 8px; margin-bottom: 4px; opacity: 0.7; }
.transcript-user { border-left: 2px solid rgba(96,165,250,0.4); padding-left: 8px; margin-bottom: 4px; }

/* Transcript entry base */
.transcript-entry {
    font-size: 0.8rem;
    line-height: 1.4;
    padding: 2px 0;
    animation: transcript-fade-in 0.3s ease;
}

@keyframes transcript-fade-in {
    from { opacity: 0; transform: translateX(-4px); }
    to { opacity: 1; transform: translateX(0); }
}

.agent-caption[data-persona="mr"] { border-left-color: rgba(245,158,11,0.4); }
.agent-caption[data-persona="mrs"] { border-left-color: rgba(244,114,182,0.4); }

/* ── Dual-Language Translation Caption ──────────────────── */
.translation-line {
    color: rgba(156, 163, 175, 0.8);
    font-size: 0.75rem;
    font-style: italic;
    padding: 4px 12px;
    text-align: center;
    transition: opacity 0.5s ease;
    max-width: 600px;
    margin: 2px auto 0;
    line-height: 1.3;
}

/* ── Dashboard Workspace Panel ──────────────────────────── */
/* Stats are rendered inside iframe srcdoc with inline styles.
   These rules apply to the outer workspace shell when in dashboard mode. */
#workspace-dashboard {
    display: none; /* Hidden — dashboard content lives in #workspace-iframe */
}

/* Audience Registry Polish */
#audience-toggle-btn {
    position: relative;
}

.audience-count-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #f59e0b;
    color: #000;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 0.65rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.audience-speaker-card {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 8px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    margin-bottom: 6px;
    transition: border-color 0.3s;
}

.audience-speaker-card:hover {
    border-color: rgba(245,158,11,0.3);
}

.speaker-name {
    color: #e5e7eb;
    font-size: 0.85rem;
}

.speaker-status {
    font-size: 0.6rem;
    color: #6b7280;
    transition: color 0.2s;
}

.speaker-status.speaking {
    color: #22c55e;
    animation: pulse-speaking 1s ease-in-out infinite;
}

@keyframes pulse-speaking {
    0%,100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* Live face fallback transitions + status states */
.avatar-panel.avatar-face-transitioning .avatar-live-face-video,
.avatar-panel.avatar-face-transitioning video,
.avatar-panel.avatar-face-transitioning img {
    transition: opacity 400ms ease;
    will-change: opacity;
}

.avatar-panel .live-face-badge {
    background: rgba(34, 197, 94, 0.18);
    border: 1px solid rgba(34, 197, 94, 0.42);
    color: #86efac;
}

.avatar-panel .live-face-badge .live-face-badge__dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #22c55e;
}

.avatar-panel .live-face-badge.live-face-badge--connected {
    background: rgba(34, 197, 94, 0.18);
    border-color: rgba(34, 197, 94, 0.42);
    color: #86efac;
}

.avatar-panel .live-face-badge.live-face-badge--connected .live-face-badge__dot {
    background: #22c55e;
}

.avatar-panel .live-face-badge.live-face-badge--reconnecting {
    background: rgba(245, 158, 11, 0.2);
    border-color: rgba(245, 158, 11, 0.45);
    color: #fcd34d;
    animation: live-face-badge-pulse 1.3s ease-in-out infinite;
}

.avatar-panel .live-face-badge.live-face-badge--reconnecting .live-face-badge__dot {
    background: #f59e0b;
}

.avatar-panel .live-face-badge.live-face-badge--offline {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.45);
    color: #fca5a5;
}

.avatar-panel .live-face-badge.live-face-badge--offline .live-face-badge__dot {
    background: #ef4444;
}

@keyframes live-face-badge-pulse {
    0%,
    100% { opacity: 1; }
    50% { opacity: 0.55; }
}

/* ── Workspace Activity + Caption Containment Overrides (additive) ── */
#workspace-frame > #system-activity-log {
    position: absolute;
    top: 8px;
    left: 10px;
    right: 10px;
    z-index: 2;
    background: rgba(10, 10, 12, 0.9);
    border: 1px solid rgba(107, 114, 128, 0.28);
    border-radius: 8px;
    padding: 6px 8px;
    max-height: 80px;
    color: #6b7280;
    font: 11px/1.35 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    contain: layout;
    pointer-events: none;
}

#workspace-frame > #system-activity-log .system-activity-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 4px;
}

#workspace-frame > #system-activity-log .system-activity-title {
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 10px;
}

#workspace-frame > #system-activity-log .system-activity-toggle {
    border: 1px solid rgba(107, 114, 128, 0.35);
    background: rgba(17, 24, 39, 0.85);
    color: #9ca3af;
    border-radius: 5px;
    width: 20px;
    height: 18px;
    line-height: 1;
    font-size: 11px;
    cursor: pointer;
    pointer-events: auto;
}

#workspace-frame > #system-activity-log .system-activity-entries {
    max-height: 58px;
    overflow-y: auto;
    scrollbar-width: thin;
    pointer-events: auto;
}

#workspace-frame > #system-activity-log .system-activity-entry {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
    padding: 0;
}

#workspace-frame > #system-activity-log .system-activity-entry.is-highlight {
    color: #f59e0b;
}

#workspace-frame > #system-activity-log.collapsed {
    max-height: 28px;
}

#workspace-frame > #system-activity-log.collapsed .system-activity-entries {
    display: none;
}

#workspace-frame #workspace-idle.session-active {
    opacity: 0.15 !important;
}

#workspace-frame #workspace-idle.workspace-hidden {
    display: none !important;
}

#workspace-frame > #caption-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    transform: none;
    width: 100%;
    max-width: 100%;
    max-height: 60px;
    border-radius: 0;
    padding: 8px 16px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.85));
    text-align: left;
    line-height: 1.3;
    box-sizing: border-box;
    z-index: 17;
}

#workspace-frame > #caption-overlay.hidden {
    transform: translateY(8px);
}

#workspace-frame > #caption-overlay .caption-line {
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

#workspace-frame > #caption-overlay .caption-line--previous {
    font-size: 13px;
    margin-bottom: 2px;
}

#workspace-frame > #caption-overlay .caption-line--current {
    font-size: 15px;
}

/* ── Session Active: Hide slogan + compact mode buttons ── */
body.session-active #slogan {
    display: none !important;
}

body.session-active #top-bar {
    padding: 4px 16px;
    min-height: auto;
}

body.session-active .workspace-mode-tabs [role="tablist"] {
    gap: 4px;
    flex-wrap: wrap;
    justify-content: center;
}

body.session-active .workspace-mode-tabs [role="tab"] {
    font-size: 0.65rem;
    padding: 2px 6px;
    min-width: auto;
}

/* ── Live Stage Layout Restructure Overrides (additive) ── */
#workspace-panel {
    padding: 6px 6px 0 !important;
    gap: 4px !important;
}

#mode-pills {
    gap: 0 !important;
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
}

#mode-pills::-webkit-scrollbar {
    display: none;
}

.mode-pill {
    font-size: 10px !important;
    padding: 2px 6px !important;
    border-radius: 999px;
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    white-space: nowrap;
}

.mode-pill .mode-pill-icon {
    font-size: 11px;
    line-height: 1;
}

.mode-pill .mode-pill-label {
    line-height: 1;
}

body.session-active #mode-pills .mode-pill[data-mode="idle"] {
    display: none !important;
}

body.session-active #mode-pills .mode-pill:not(.active) {
    display: none;
}

#workspace-frame {
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    background: #0a0a0f !important;
}

#workspace-frame::before,
#workspace-frame::after {
    display: none !important;
}

#workspace-iframe {
    inset: 0 !important;
    border-radius: 0 !important;
}

#bottom-bar {
    height: auto !important;
    min-height: 72px;
    gap: 6px !important;
    padding: 8px 10px !important;
    flex-wrap: wrap;
    align-items: flex-start;
}

#bottom-bar > button,
#bottom-bar > a#admin-link-btn {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    border-radius: 999px !important;
    padding: 4px !important;
    font-size: 20px !important;
    line-height: 1 !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
}

#mic-btn {
    width: 46px !important;
    height: 46px !important;
    min-width: 46px !important;
    font-size: 22px !important;
    border-width: 2px;
}

#camera-icon,
#mic-icon {
    font-size: 20px;
    line-height: 1;
}

#bottom-bar #system-activity-log {
    order: 20;
    flex: 1 1 460px;
    min-width: 320px;
    max-height: 120px;
    background: rgba(10, 10, 12, 0.86);
    border: 1px solid rgba(107, 114, 128, 0.32);
    border-radius: 8px;
    padding: 6px 8px;
    color: #9ca3af;
    font: 11px/1.35 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

#bottom-bar #system-activity-log .system-activity-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 4px;
}

#bottom-bar #system-activity-log .system-activity-title {
    color: #d1d5db;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 10px;
}

#bottom-bar #system-activity-log .system-activity-toggle {
    border: 1px solid rgba(107, 114, 128, 0.35);
    background: rgba(17, 24, 39, 0.85);
    color: #9ca3af;
    border-radius: 5px;
    width: 20px;
    height: 18px;
    line-height: 1;
    font-size: 11px;
    cursor: pointer;
}

#bottom-bar #system-activity-last-line {
    display: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #9ca3af;
}

#bottom-bar #system-activity-last-line.is-highlight {
    color: #f59e0b;
}

#bottom-bar #system-activity-log .system-activity-entries {
    max-height: 84px;
    overflow-y: auto;
    scrollbar-width: thin;
}

#bottom-bar #system-activity-log .system-activity-entry {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
    padding: 0;
}

#bottom-bar #system-activity-log .system-activity-entry.is-highlight {
    color: #f59e0b;
}

#bottom-bar #system-activity-log.collapsed {
    max-height: 46px;
}

#bottom-bar #system-activity-log.collapsed .system-activity-entries {
    display: none;
}

#bottom-bar #system-activity-log.collapsed #system-activity-last-line {
    display: block;
}

#transcript-area,
#action-queue {
    display: none !important;
}

#top-bar #caption-overlay {
    position: relative;
    left: auto;
    bottom: auto;
    transform: none;
    z-index: 11;
    width: min(54vw, 860px);
    max-width: min(54vw, 860px);
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 6px 12px;
    text-align: left;
    pointer-events: auto;
    cursor: pointer;
    box-shadow: none;
}

#top-bar #caption-overlay.hidden {
    opacity: 0.55;
    transform: none;
}

#top-bar #caption-overlay.caption-empty {
    opacity: 0.58;
}

#top-bar #caption-overlay .caption-line {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#top-bar #caption-overlay .caption-line--current {
    font-size: 13px;
    font-weight: 600;
    color: #e5e7eb;
}

#top-bar #caption-overlay .caption-line--previous {
    font-size: 11px;
    margin-top: 1px;
    color: rgba(156, 163, 175, 0.9);
}

#top-bar #caption-history {
    display: none;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

#top-bar #caption-overlay.expanded #caption-history {
    display: block;
}

#top-bar #caption-history .caption-history-line {
    font-size: 11px;
    color: #cbd5e1;
    line-height: 1.35;
    margin-bottom: 3px;
}

body.session-active #scan-line {
    display: none !important;
}

body.session-active .idle-logo {
    animation: none !important;
    transform: none !important;
}

@media (max-width: 900px) {
    .mode-pill .mode-pill-label {
        display: none;
    }

    .mode-pill {
        padding: 2px 5px !important;
    }

    #top-bar #caption-overlay {
        width: min(46vw, 620px);
        max-width: min(46vw, 620px);
    }
}

@media (max-width: 768px) {
    #bottom-bar #system-activity-log {
        min-width: 100%;
        flex-basis: 100%;
    }

    #top-bar #caption-overlay {
        width: min(42vw, 360px);
        max-width: min(42vw, 360px);
        padding: 5px 8px;
    }
}

/* ── Resizable bottom bar ── */
#bottom-bar-resize-handle {
    position: absolute;
    top: -4px;
    left: 0;
    right: 0;
    height: 8px;
    cursor: ns-resize;
    background: transparent;
    z-index: 20;
}

#bottom-bar-resize-handle:hover,
#bottom-bar-resize-handle:active {
    background: linear-gradient(180deg, rgba(245,158,11,0.3), transparent);
}

#bottom-bar {
    position: relative;
    min-height: 48px;
    max-height: 50vh;
    transition: none;
}

#bottom-bar #system-activity-log {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}

#bottom-bar #system-activity-log .system-activity-entries {
    max-height: none;
    overflow-y: auto;
}

/* ── Image + Browse panels above idle state ── */
#workspace-image,
#workspace-browse {
    position: absolute;
    inset: 0;
    z-index: 6;
    overflow-y: auto;
}

/* Face animation SHELVED (2026-03-16) — hide all face UI elements */
#face-provider-dashboard { display: none !important; }
.live-face-badge { display: none !important; }

