/* OnyxArt Design System & Theme */
:root {
    --bg-primary: #0b0c10;
    --bg-secondary: #13151c;
    --bg-tertiary: #1b1e28;
    --bg-card: rgba(22, 25, 35, 0.75);
    --bg-glass: rgba(18, 20, 29, 0.82);
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-highlight: rgba(168, 85, 247, 0.4);

    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --brand-glow: #a855f7;
    --brand-cyan: #38bdf8;
    --brand-gradient: linear-gradient(135deg, #c084fc 0%, #818cf8 50%, #38bdf8 100%);
    --brand-gradient-hover: linear-gradient(135deg, #d8b4fe 0%, #a5b4fc 50%, #7dd3fc 100%);

    --danger: #ef4444;
    --success: #10b981;
    --warning: #f59e0b;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;

    --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.45);
    --shadow-glow: 0 0 20px rgba(168, 85, 247, 0.25);
    --blur-glass: blur(16px);
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    user-select: none;
    -webkit-user-select: none;
}

body, html {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* App Shell */
.app-layout {
    display: flex;
    flex-direction: column;
    width: 100vw;
    height: 100vh;
    position: relative;
    overflow: hidden;
}

/* Navigation Bar */
.top-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
    padding: 0 16px;
    background: var(--bg-glass);
    backdrop-filter: var(--blur-glass);
    -webkit-backdrop-filter: var(--blur-glass);
    border-bottom: 1px solid var(--border-subtle);
    z-index: 100;
}

.nav-left, .nav-center, .nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Brand */
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    cursor: pointer;
}

.brand-gem {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 0 8px rgba(168, 85, 247, 0.5));
}

.gem-svg {
    width: 100%;
    height: 100%;
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-name {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #ffffff;
}

.brand-accent {
    background: var(--brand-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-sub {
    font-size: 0.65rem;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-muted);
    letter-spacing: 0.04em;
}

/* Room Pill */
.room-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
}

.room-dot {
    width: 8px;
    height: 8px;
    background: var(--brand-cyan);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--brand-cyan);
}

.room-label {
    color: var(--text-muted);
}

.room-id {
    font-family: 'JetBrains Mono', monospace;
    color: #e2e8f0;
    font-weight: 600;
}

.btn-icon-subtle {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-icon-subtle:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

/* Center Action Group */
.action-btn-group {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    padding: 4px;
    border-radius: var(--radius-md);
}

.btn-nav {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
    position: relative;
}

.btn-nav:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.btn-nav.danger-hover:hover {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

.nav-divider {
    width: 1px;
    height: 20px;
    background: var(--border-subtle);
}

/* Artists Presence Tray */
.artists-tray {
    display: flex;
    align-items: center;
    margin-right: 4px;
}

.artist-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
    border: 2px solid var(--bg-secondary);
    margin-left: -8px;
    position: relative;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.artist-avatar:first-child {
    margin-left: 0;
}

.artist-avatar:hover {
    transform: translateY(-2px) scale(1.1);
    z-index: 5;
}

/* Status Indicator */
.status-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    background: rgba(0, 0, 0, 0.2);
    padding: 4px 10px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-subtle);
}

.status-pulse {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 8px var(--success);
    animation: pulse 2s infinite;
}

.status-indicator.offline .status-pulse {
    background: var(--danger);
    box-shadow: 0 0 8px var(--danger);
}

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

/* Badges & Buttons */
.has-badge {
    position: relative;
}

.badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: var(--brand-glow);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
}

.btn-primary {
    background: var(--brand-gradient);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    padding: 6px 14px;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    box-shadow: var(--shadow-glow);
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background: var(--brand-gradient-hover);
    transform: translateY(-1px);
}

.profile-avatar-btn {
    background: transparent;
    border: none;
    cursor: pointer;
}

.avatar-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--brand-glow);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.4);
    transition: transform 0.2s ease;
}

.avatar-circle:hover {
    transform: scale(1.08);
}

/* Canvas Workspace */
.canvas-workspace {
    flex: 1;
    position: relative;
    overflow: hidden;
    background-color: #0d0e12;
    background-image: 
        radial-gradient(circle at 50% 50%, rgba(26, 29, 41, 0.4) 0%, transparent 80%),
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 100% 100%, 32px 32px, 32px 32px;
    touch-action: none;
}

.canvas-viewport {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    cursor: crosshair;
}

.canvas-viewport.panning {
    cursor: grab;
}

.canvas-viewport.panning:active {
    cursor: grabbing;
}

#mainCanvas, #draftCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
    pointer-events: none;
}

.cursors-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 50;
}

/* Live Collaborator Cursors */
.collaborator-cursor {
    position: absolute;
    pointer-events: none;
    transform: translate(0, 0);
    transition: transform 0.08s cubic-bezier(0, 0, 0.2, 1);
    z-index: 60;
}

.cursor-pointer-svg {
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.5));
}

.cursor-tag {
    position: absolute;
    left: 14px;
    top: 14px;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 0.72rem;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.01em;
}

/* Floating Glassmorphism Toolbar */
.floating-toolbar {
    position: absolute;
    top: 16px;
    left: 16px;
    background: var(--bg-glass);
    backdrop-filter: var(--blur-glass);
    -webkit-backdrop-filter: var(--blur-glass);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-glass);
    padding: 8px;
    z-index: 80;
    width: 64px;
    transition: width 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease;
}

.floating-toolbar:hover, .floating-toolbar:focus-within {
    box-shadow: var(--shadow-glass), var(--shadow-glow);
}

.tool-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.tool-btn {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
}

.tool-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
}

.tool-btn.active {
    color: #fff;
    background: rgba(168, 85, 247, 0.2);
    border-color: var(--border-highlight);
    box-shadow: 0 0 12px rgba(168, 85, 247, 0.3);
}

.tool-separator {
    width: 36px;
    height: 1px;
    background: var(--border-subtle);
    margin: 4px 0;
}

/* Color Palette in Toolbar */
.color-palette-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.swatches-grid {
    display: grid;
    grid-template-columns: repeat(2, 18px);
    gap: 6px;
    margin: 4px 0;
}

.swatch {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background-color: var(--c);
    border: 2px solid rgba(0, 0, 0, 0.4);
    cursor: pointer;
    transition: transform 0.15s ease, border-color 0.15s ease;
}

.swatch:hover {
    transform: scale(1.2);
}

.swatch.active {
    border-color: #fff;
    box-shadow: 0 0 8px var(--c);
    transform: scale(1.15);
}

.custom-color-container {
    position: relative;
    width: 24px;
    height: 24px;
}

.color-picker-label {
    cursor: pointer;
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
}

.color-picker-label input[type="color"] {
    opacity: 0;
    width: 100%;
    height: 100%;
    position: absolute;
    cursor: pointer;
}

.color-preview-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: conic-gradient(red, yellow, lime, aqua, blue, magenta, red);
    border: 2px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.2);
}

/* Sliders */
.slider-control {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 4px 0;
}

.slider-header {
    display: none;
    width: 100%;
    justify-content: space-between;
    font-size: 0.7rem;
    color: var(--text-muted);
}

.custom-range {
    -webkit-appearance: none;
    appearance: none;
    width: 44px;
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.15);
    outline: none;
    cursor: pointer;
}

.custom-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.5);
    cursor: pointer;
    transition: transform 0.1s ease;
}

.custom-range::-webkit-slider-thumb:hover {
    transform: scale(1.3);
}

.size-circle-preview-wrap {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.size-circle-preview {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.4);
}

/* Bottom Controls (Zoom & Pan) */
.canvas-controls-overlay {
    position: absolute;
    bottom: 16px;
    left: 16px;
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-glass);
    backdrop-filter: var(--blur-glass);
    -webkit-backdrop-filter: var(--blur-glass);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 4px 8px;
    box-shadow: var(--shadow-glass);
    z-index: 80;
}

.btn-ctrl {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-ctrl:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.zoom-text {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--text-secondary);
    min-width: 42px;
    text-align: center;
}

/* Live Chat Drawer */
.chat-drawer {
    position: absolute;
    top: 56px;
    right: 0;
    width: 320px;
    height: calc(100vh - 56px);
    background: var(--bg-glass);
    backdrop-filter: var(--blur-glass);
    -webkit-backdrop-filter: var(--blur-glass);
    border-left: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-glass);
    display: flex;
    flex-direction: column;
    z-index: 90;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.chat-drawer.open {
    transform: translateX(0);
}

.chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-subtle);
}

.chat-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 600;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-bubble {
    display: flex;
    flex-direction: column;
    gap: 3px;
    max-width: 90%;
    animation: fadeIn 0.2s ease;
}

.chat-bubble.mine {
    align-self: flex-end;
}

.chat-bubble.other {
    align-self: flex-start;
}

.chat-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.7rem;
    color: var(--text-muted);
}

.chat-author {
    font-weight: 600;
}

.chat-text {
    padding: 8px 12px;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    line-height: 1.4;
    word-break: break-word;
    user-select: text;
    -webkit-user-select: text;
}

.chat-bubble.mine .chat-text {
    background: var(--brand-glow);
    color: #fff;
    border-bottom-right-radius: 2px;
}

.chat-bubble.other .chat-text {
    background: rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
    border-bottom-left-radius: 2px;
}

.chat-input-form {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid var(--border-subtle);
    background: rgba(0, 0, 0, 0.2);
}

.chat-input-form input {
    flex: 1;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 8px 12px;
    color: #fff;
    font-size: 0.85rem;
    font-family: inherit;
    outline: none;
    user-select: text;
    -webkit-user-select: text;
}

.chat-input-form input:focus {
    border-color: var(--brand-glow);
}

.btn-primary-sm {
    background: var(--brand-gradient);
    border: none;
    border-radius: var(--radius-md);
    color: #fff;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.15s ease;
}

.btn-primary-sm:hover {
    transform: scale(1.05);
}

/* Modals */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.modal-backdrop.open {
    display: flex;
    opacity: 1;
    pointer-events: auto;
}

.modal-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    width: 90%;
    max-width: 440px;
    overflow: hidden;
    transform: translateY(10px) scale(0.96);
    transition: transform 0.2s ease;
}

.modal-backdrop.open .modal-card {
    transform: translateY(0) scale(1);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-subtle);
}

.modal-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
}

.modal-close:hover {
    color: #fff;
}

.modal-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-group input[type="text"] {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    color: #fff;
    font-size: 0.9rem;
    font-family: inherit;
    outline: none;
    user-select: text;
    -webkit-user-select: text;
}

.form-group input[type="text"]:focus {
    border-color: var(--brand-glow);
}

.avatar-color-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.avatar-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform 0.15s ease;
}

.avatar-dot:hover {
    transform: scale(1.15);
}

.avatar-dot.selected {
    border-color: #fff;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
}

.avatar-preview-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.03);
    padding: 12px;
    border-radius: var(--radius-md);
    border: 1px dashed var(--border-subtle);
}

.live-avatar-preview {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--brand-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #fff;
    box-shadow: 0 0 12px rgba(168, 85, 247, 0.4);
}

.modal-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border-subtle);
}

.full-width {
    width: 100%;
    justify-content: center;
    padding: 10px;
}

/* Export Options */
.export-options {
    gap: 12px;
}

.export-option-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 14px;
    cursor: pointer;
    text-align: left;
    transition: all 0.15s ease;
    color: #fff;
}

.export-option-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--brand-glow);
    transform: translateY(-2px);
}

.export-icon {
    font-size: 1.6rem;
}

.export-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.export-meta strong {
    font-size: 0.9rem;
}

.export-meta span {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Toasts */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 10000;
    pointer-events: none;
}

.toast {
    background: var(--bg-tertiary);
    color: #fff;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 10px 16px;
    font-size: 0.85rem;
    font-weight: 500;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    gap: 8px;
    animation: toastIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast.toast-success {
    border-color: rgba(16, 185, 129, 0.4);
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Voice Chat Pill */
.voice-chat-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    padding: 3px 8px;
    border-radius: var(--radius-full);
    transition: all 0.2s ease;
}

.voice-chat-pill.active {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.4);
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.25);
}

.voice-chat-pill.muted {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.4);
}

.btn-voice {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: var(--radius-sm);
    transition: color 0.15s ease;
}

.voice-chat-pill.active .btn-voice {
    color: #10b981;
}

.voice-chat-pill.muted .btn-voice {
    color: #ef4444;
}

.audio-wave {
    display: flex;
    align-items: center;
    gap: 2px;
    height: 12px;
}

.audio-wave span {
    width: 2px;
    height: 100%;
    background-color: #10b981;
    border-radius: 1px;
    animation: wave 1.2s infinite ease-in-out;
}

.audio-wave span:nth-child(2) { animation-delay: 0.2s; }
.audio-wave span:nth-child(3) { animation-delay: 0.4s; }

@keyframes wave {
    0%, 100% { transform: scaleY(0.3); }
    50% { transform: scaleY(1); }
}

/* Speaking Pulsing Ring on Avatars */
.artist-avatar.speaking, .avatar-circle.speaking {
    box-shadow: 0 0 0 3px #10b981, 0 0 14px #10b981 !important;
    animation: speakingPulse 1s infinite alternate;
}

@keyframes speakingPulse {
    from { box-shadow: 0 0 0 2px #10b981, 0 0 8px rgba(16, 185, 129, 0.5); }
    to { box-shadow: 0 0 0 4px #10b981, 0 0 18px rgba(16, 185, 129, 0.9); }
}

/* Canvas Floating Text Input */
.canvas-inline-input {
    position: absolute;
    background: rgba(18, 20, 29, 0.95);
    border: 1px solid var(--brand-glow);
    border-radius: var(--radius-sm);
    color: #fff;
    padding: 6px 10px;
    font-size: 1rem;
    font-family: 'Plus Jakarta Sans', sans-serif;
    outline: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6), 0 0 10px rgba(168, 85, 247, 0.4);
    z-index: 100;
}

/* Input Action Row & Form Hints */
.input-action-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.input-action-row input {
    flex: 1;
}

.form-hint {
    display: block;
    color: var(--text-muted);
    font-size: 0.75rem;
    margin-top: 5px;
    line-height: 1.4;
}

.btn-icon-subtle.locked {
    color: #10b981 !important;
    border-color: rgba(16, 185, 129, 0.4) !important;
    background: rgba(16, 185, 129, 0.12) !important;
}

/* Magic Scan Tool active animation */
.tool-btn[data-tool="magic-scan"].active {
    box-shadow: 0 0 14px rgba(168, 85, 247, 0.6);
    border-color: #c084fc;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .top-nav {
        padding: 0 10px;
    }
    .brand-sub, .room-label {
        display: none;
    }
    .floating-toolbar {
        top: 10px;
        left: 10px;
        width: 52px;
        padding: 6px;
    }
    .tool-btn {
        width: 38px;
        height: 38px;
    }
    .chat-drawer {
        width: 100vw;
    }
}

/* Recent Studios Quick-Switch Pills */
.recent-rooms-tray {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
    min-height: 36px;
    align-items: center;
}

.recent-room-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.recent-room-pill:hover {
    background: rgba(168, 85, 247, 0.16);
    border-color: var(--brand-glow);
    color: #fff;
    transform: translateY(-1px);
}

.recent-room-pill.current {
    background: rgba(56, 189, 248, 0.16);
    border-color: var(--brand-cyan);
    color: var(--brand-cyan);
    font-weight: 600;
}

.recent-room-empty {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-style: italic;
}

/* Blueprint Grid Background */
.canvas-workspace.has-blueprint-grid {
    background-color: #080d1a !important;
    background-image: 
        linear-gradient(rgba(56, 189, 248, 0.15) 1px, transparent 1px),
        linear-gradient(90deg, rgba(56, 189, 248, 0.15) 1px, transparent 1px),
        linear-gradient(rgba(56, 189, 248, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(56, 189, 248, 0.05) 1px, transparent 1px) !important;
    background-size: 100px 100px, 100px 100px, 20px 20px, 20px 20px !important;
}

.btn-ctrl.active {
    background: rgba(56, 189, 248, 0.2);
    border-color: var(--brand-cyan);
    color: var(--brand-cyan);
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.35);
}

