/* RainScript Sovereign Creative IDE & Visual Director Styles */

.rainscript-pill-btn {
    position: relative;
    background: linear-gradient(135deg, rgba(0, 242, 254, 0.12), rgba(79, 172, 254, 0.08));
    border-color: rgba(0, 242, 254, 0.3) !important;
    color: #4facfe !important;
}

.rainscript-pill-btn:hover {
    background: linear-gradient(135deg, rgba(0, 242, 254, 0.22), rgba(79, 172, 254, 0.18));
    border-color: #00f2fe !important;
    box-shadow: 0 0 15px rgba(0, 242, 254, 0.3);
}

.rainscript-badge {
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    padding: 2px 5px;
    border-radius: 4px;
    background: linear-gradient(135deg, #00f2fe, #4facfe);
    color: #020617;
    margin-left: 6px;
    vertical-align: middle;
}

.mobile-tab-badge.pro-badge {
    position: absolute;
    top: 4px;
    right: 8px;
    background: linear-gradient(135deg, #00f2fe, #38bdf8);
    color: #020617;
    font-size: 0.55rem;
    font-weight: 800;
    padding: 1px 4px;
    border-radius: 3px;
    box-shadow: 0 0 6px rgba(0, 242, 254, 0.6);
}

/* RainScript Workspace Layout */
.rainscript-workspace {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding: 1rem 1.75rem 3rem;
    max-width: 1720px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

/* Transpiler Bar (Top of Workspace) */
.rainscript-transpiler-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(10, 16, 29, 0.85);
    border: 1px solid rgba(0, 242, 254, 0.3);
    border-radius: 12px;
    padding: 0.5rem 0.75rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px);
}

.transpiler-input-wrapper {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
}

.transpiler-magic-icon {
    position: absolute;
    left: 12px;
    color: #00f2fe;
    font-size: 0.95rem;
    pointer-events: none;
    animation: pulse 2s infinite;
}

.rainscript-nl-input {
    width: 100%;
    background: rgba(5, 9, 18, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 0.65rem 1rem 0.65rem 2.4rem;
    color: #f1f5f9;
    font-size: 0.88rem;
    font-family: 'Plus Jakarta Sans', sans-serif;
    outline: none;
    transition: all 0.2s ease;
}

.rainscript-nl-input:focus {
    border-color: #00f2fe;
    box-shadow: 0 0 12px rgba(0, 242, 254, 0.3);
    background: rgba(8, 14, 28, 0.95);
}

.btn-rainscript-transpile {
    background: linear-gradient(135deg, rgba(0, 242, 254, 0.2), rgba(79, 172, 254, 0.15));
    border: 1px solid rgba(0, 242, 254, 0.4);
    color: #00f2fe;
    font-weight: 700;
    font-size: 0.84rem;
    padding: 0.65rem 1.1rem;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    transition: all 0.2s;
}

.btn-rainscript-transpile:hover {
    background: linear-gradient(135deg, #00f2fe, #4facfe);
    color: #020617;
    box-shadow: 0 0 15px rgba(0, 242, 254, 0.5);
}

/* Mode Switcher Navigation */
.rainscript-mode-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.rainscript-mode-toggle {
    display: flex;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    white-space: nowrap;
    background: rgba(10, 16, 29, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 3px;
    gap: 4px;
    box-sizing: border-box;
}

.rainscript-mode-toggle::-webkit-scrollbar {
    display: none;
}

.mode-tab-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.mode-tab-btn:hover {
    color: #e2e8f0;
}

.mode-tab-btn.active {
    background: linear-gradient(135deg, rgba(0, 242, 254, 0.2), rgba(79, 172, 254, 0.15));
    color: #00f2fe;
    border: 1px solid rgba(0, 242, 254, 0.4);
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.25);
}

/* Workspace Main Grid */
.rainscript-main-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 1.25rem;
    width: 100%;
}

/* Left Pane: Code Editor */
.rainscript-editor-pane {
    display: flex;
    flex-direction: column;
    background: rgba(10, 16, 29, 0.85);
    border: 1px solid rgba(0, 242, 254, 0.2);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(16px);
}

.rainscript-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.1rem;
    background: rgba(5, 9, 18, 0.9);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-wrap: wrap;
    gap: 0.6rem;
}

.rainscript-toolbar-left,
.rainscript-toolbar-right {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.rainscript-preset-select,
.rainscript-snippet-select {
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(0, 242, 254, 0.25);
    color: #e2e8f0;
    padding: 0.45rem 0.85rem;
    border-radius: 8px;
    font-size: 0.82rem;
    font-family: 'Plus Jakarta Sans', sans-serif;
    outline: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.rainscript-preset-select:hover,
.rainscript-snippet-select:hover {
    border-color: #00f2fe;
    background: rgba(20, 30, 55, 0.95);
}

.rainscript-icon-btn {
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    padding: 0.45rem 0.75rem;
    border-radius: 8px;
    font-size: 0.82rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.2s;
}

.rainscript-icon-btn:hover {
    background: rgba(0, 242, 254, 0.15);
    border-color: rgba(0, 242, 254, 0.4);
    color: #00f2fe;
}

/* Mobile Quick-Symbol Keyboard Bar */
.rainscript-mobile-symbol-bar {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.75rem;
    background: #02050c;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
}

.symbol-key-btn {
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #e2e8f0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    padding: 0.35rem 0.65rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s;
    user-select: none;
}

.symbol-key-btn:active {
    background: #00f2fe;
    color: #020617;
    transform: scale(0.95);
}

/* Editor Core Area */
.rainscript-editor-container {
    position: relative;
    flex: 1;
    min-height: 460px;
    background: #050811;
    display: flex;
}

.rainscript-gutter {
    width: 48px;
    padding: 1rem 0;
    background: #03060c;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    color: #475569;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    text-align: right;
    user-select: none;
    box-sizing: border-box;
    line-height: 1.55;
    padding-right: 10px;
    overflow: hidden;
}

.rainscript-textarea {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    resize: none;
    padding: 1rem;
    color: #e2e8f0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.88rem;
    line-height: 1.55;
    white-space: pre;
    overflow-wrap: normal;
    overflow-x: auto;
    box-sizing: border-box;
    tab-size: 4;
    caret-color: #00f2fe;
}

/* Visual Director Pane */
.rainscript-visual-pane {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    background: rgba(10, 16, 29, 0.85);
    border: 1px solid rgba(0, 242, 254, 0.2);
    border-radius: 14px;
    padding: 1.25rem;
    backdrop-filter: blur(16px);
}

.visual-section-title {
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: #00f2fe;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.6rem;
}

.visual-chips-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.visual-chip {
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
    padding: 0.45rem 0.85rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.visual-chip:hover {
    border-color: #00f2fe;
    color: #00f2fe;
}

.visual-chip.active {
    background: linear-gradient(135deg, rgba(0, 242, 254, 0.25), rgba(79, 172, 254, 0.18));
    border-color: #00f2fe;
    color: #00f2fe;
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.3);
}

/* Editor Status Bar */
.rainscript-statusbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.45rem 1rem;
    background: #03060c;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 0.75rem;
    color: #64748b;
    font-family: 'JetBrains Mono', monospace;
}

.rainscript-status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.rainscript-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 8px #22c55e;
}

.rainscript-status-dot.error {
    background: #ef4444;
    box-shadow: 0 0 8px #ef4444;
}

.rainscript-status-dot.compiling {
    background: #f59e0b;
    box-shadow: 0 0 8px #f59e0b;
    animation: pulse 1s infinite;
}

/* Right Pane: Staging & Telemetry */
.rainscript-staging-pane {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

/* Execute Button Card */
.rainscript-dispatch-card {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.8), rgba(6, 12, 24, 0.95));
    border: 1px solid rgba(0, 242, 254, 0.25);
    border-radius: 14px;
    padding: 1.1rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.rainscript-btn-execute {
    background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
    color: #040814;
    font-family: 'Cinzel', serif;
    font-weight: 800;
    font-size: 1.05rem;
    letter-spacing: 0.08em;
    padding: 0.85rem 1.5rem;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    box-shadow: 0 0 25px rgba(0, 242, 254, 0.45);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.rainscript-btn-execute:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 35px rgba(0, 242, 254, 0.7);
    filter: brightness(1.1);
}

.rainscript-btn-execute:active {
    transform: translateY(1px);
}

.rainscript-btn-execute:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    filter: grayscale(0.8);
}

/* Scene Inspector Card */
.rainscript-card {
    background: rgba(10, 16, 29, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 1.1rem;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    backdrop-filter: blur(12px);
}

.rainscript-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding-bottom: 0.55rem;
}

.rainscript-card-title {
    font-size: 0.86rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #38bdf8;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Staging Grid Badges */
.rainscript-specs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.6rem;
}

.rainscript-spec-item {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
}

.rainscript-spec-label {
    font-size: 0.68rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 2px;
}

.rainscript-spec-val {
    font-size: 0.82rem;
    font-weight: 600;
    color: #f1f5f9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Invariants List */
.rainscript-invariants-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.rainscript-invariant-pill {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.35);
    color: #34d399;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

/* Neural Trajectory Breakdown */
.rainscript-prompt-box {
    background: #03060c;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    padding: 0.75rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    color: #94a3b8;
    max-height: 120px;
    overflow-y: auto;
    line-height: 1.45;
}

/* Viewport Live Result Display */
.rainscript-viewport-container {
    background: #02040a;
    border: 1px solid rgba(0, 242, 254, 0.2);
    border-radius: 14px;
    min-height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.rainscript-viewport-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    color: #475569;
    font-size: 0.85rem;
    padding: 2rem;
    text-align: center;
}

.rainscript-viewport-placeholder i {
    font-size: 2.5rem;
    color: rgba(0, 242, 254, 0.3);
}

.rainscript-result-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 12px;
    display: block;
}

.rainscript-viewport-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.75rem 1rem;
    background: linear-gradient(0deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0) 100%);
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

/* Floating Action Button for Mobile */
.mobile-rainscript-fab {
    display: none;
}

/* ========================================================================= */
/* MOBILE RESPONSIVE OPTIMIZATIONS (< 900px)                                */
/* ========================================================================= */
@media (max-width: 900px) {
    .rainscript-workspace {
        padding: 0.75rem 0.75rem 8.5rem !important;
        gap: 0.9rem;
        max-width: 100vw;
        overflow-x: hidden;
        box-sizing: border-box;
    }

    .rainscript-mode-toggle {
        flex-wrap: wrap !important;
        overflow-x: visible !important;
        white-space: normal !important;
        justify-content: center !important;
    }

    .rainscript-mode-toggle .mode-tab-btn {
        padding: 0.45rem 0.72rem !important;
        font-size: 0.78rem !important;
    }

    .rainscript-staging-pane {
        padding-bottom: 5.5rem !important;
    }

    .rainscript-transpiler-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }

    .btn-rainscript-transpile {
        justify-content: center;
        padding: 0.6rem;
    }

    .rainscript-main-grid {
        grid-template-columns: 1fr;
    }

    .rainscript-editor-container {
        min-height: 320px;
    }

    .rainscript-textarea {
        font-size: 0.82rem;
        padding: 0.75rem;
    }

    .rainscript-gutter {
        width: 38px;
        font-size: 0.75rem;
        padding-right: 6px;
    }

    .rainscript-mobile-symbol-bar {
        display: flex;
    }

    /* Floating Execute Pill on Mobile */
    .mobile-rainscript-fab {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.6rem;
        position: fixed;
        bottom: 74px; /* Sits cleanly above mobile-bottom-nav */
        left: 1rem;
        right: 1rem;
        z-index: 99;
        background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
        color: #020617;
        font-family: 'Cinzel', serif;
        font-weight: 800;
        font-size: 0.95rem;
        letter-spacing: 0.06em;
        padding: 0.85rem 1.25rem;
        border-radius: 12px;
        box-shadow: 0 4px 20px rgba(0, 242, 254, 0.55), 0 0 10px rgba(0, 0, 0, 0.8);
        border: 1px solid rgba(255, 255, 255, 0.4);
        cursor: pointer;
        transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .mobile-rainscript-fab:active {
        transform: scale(0.97);
        filter: brightness(1.2);
    }
}


/* ========================================================================= */
/* TACTILE NEURAL SOUNDSTAGE (VIRTUAL PRODUCTION STAGE)                      */
/* ========================================================================= */
.rainscript-soundstage-pane {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: rgba(10, 16, 29, 0.85);
    border: 1px solid rgba(0, 242, 254, 0.2);
    border-radius: 14px;
    padding: 1.25rem;
    backdrop-filter: blur(16px);
}

.soundstage-canvas-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    max-height: 480px;
    background: #02050c;
    border: 1px solid rgba(0, 242, 254, 0.3);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: inset 0 0 30px rgba(0, 242, 254, 0.08), 0 8px 30px rgba(0, 0, 0, 0.6);
}

#soundstage-canvas {
    width: 100%;
    height: 100%;
    display: block;
    touch-action: none; /* Crucial for smooth mobile drag without page scroll */
    cursor: crosshair;
}

.soundstage-hud-info {
    display: flex;
    align-items: center;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 0.6rem;
    padding: 0.6rem 0.9rem;
    background: rgba(5, 9, 18, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.76rem;
    color: #94a3b8;
}

.soundstage-hud-item span {
    color: #64748b;
    margin-right: 4px;
}

.soundstage-hud-item strong {
    color: #00f2fe;
}

.soundstage-slots-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.soundstage-slot-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.soundstage-slot-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.soundstage-char-select {
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(0, 242, 254, 0.25);
    color: #f1f5f9;
    padding: 0.4rem 0.75rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-family: 'Plus Jakarta Sans', sans-serif;
    outline: none;
    cursor: pointer;
}


/* ========================================================================= */
/* SEQUENTIAL STORYBOARD & COMIC STRIP DIRECTOR                              */
/* ========================================================================= */
.rainscript-storyboard-pane {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    background: rgba(10, 16, 29, 0.85);
    border: 1px solid rgba(0, 242, 254, 0.2);
    border-radius: 14px;
    padding: 1.25rem;
    backdrop-filter: blur(16px);
}

.storyboard-input-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.storyboard-panels-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.1rem;
    width: 100%;
}

@media (max-width: 900px) {
    .storyboard-panels-container {
        grid-template-columns: 1fr;
    }
}

.storyboard-panel-card {
    background: #040813;
    border: 1px solid rgba(0, 242, 254, 0.25);
    border-radius: 12px;
    padding: 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
    transition: all 0.25s ease;
}

.storyboard-panel-card:hover {
    border-color: #00f2fe;
    box-shadow: 0 0 15px rgba(0, 242, 254, 0.25);
}

.storyboard-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.storyboard-panel-badge {
    background: rgba(0, 242, 254, 0.15);
    border: 1px solid rgba(0, 242, 254, 0.35);
    color: #00f2fe;
    font-size: 0.68rem;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 6px;
    font-family: 'JetBrains Mono', monospace;
}

.storyboard-panel-title {
    margin: 0;
    font-size: 0.84rem;
    font-weight: 700;
    color: #f1f5f9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.storyboard-panel-viewport {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #020409;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.panel-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: #64748b;
    font-size: 0.8rem;
    font-family: 'JetBrains Mono', monospace;
}

.storyboard-panel-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.storyboard-panel-caption {
    font-size: 0.78rem;
    font-style: italic;
    color: #cbd5e1;
    line-height: 1.4;
    background: rgba(15, 23, 42, 0.6);
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    border-left: 2px solid #00f2fe;
}

.btn-export-comic {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    font-weight: 800;
    font-size: 0.88rem;
    padding: 0.65rem 1.25rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.35);
    transition: all 0.2s;
}

.btn-export-comic:hover {
    filter: brightness(1.15);
    transform: translateY(-2px);
}

/* Procedural Soundscape Toggle Pill */
.soundscape-toggle-btn {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #94a3b8;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0.45rem 0.85rem;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
    font-family: 'JetBrains Mono', monospace;
}

.soundscape-toggle-btn.active {
    background: linear-gradient(135deg, rgba(0, 242, 254, 0.2), rgba(79, 172, 254, 0.15));
    border-color: #00f2fe;
    color: #00f2fe;
    box-shadow: 0 0 12px rgba(0, 242, 254, 0.3);
}

/* Hands-Free Voice Directing Microphone Button */
.btn-voice-direct {
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #94a3b8;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s ease;
    margin-left: 0.5rem;
    flex-shrink: 0;
}

.btn-voice-direct:hover {
    color: #00f2fe;
    border-color: rgba(0, 242, 254, 0.5);
    background: rgba(0, 242, 254, 0.1);
    transform: scale(1.05);
}

.btn-voice-direct.mic-pulsing-active {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.3), rgba(244, 63, 94, 0.2));
    border-color: #ef4444;
    color: #f43f5e;
    box-shadow: 0 0 16px rgba(244, 63, 94, 0.6);
    animation: micPulse 1.2s infinite alternate ease-in-out;
}

@keyframes micPulse {
    0% { transform: scale(1); box-shadow: 0 0 10px rgba(244, 63, 94, 0.4); }
    100% { transform: scale(1.1); box-shadow: 0 0 22px rgba(244, 63, 94, 0.8); }
}

/* ========================================================================= */
/* 3D NEURAL HOLOGRAM & GYROSCOPIC VIEWPORT                                  */
/* ========================================================================= */
.rainscript-hologram-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 12px;
    z-index: 5;
    touch-action: none;
    cursor: grab;
}

.rainscript-hologram-canvas:active {
    cursor: grabbing;
}

.hologram-floating-toolbar {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    padding: 0.3rem 0.5rem;
    z-index: 20;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}

.holo-mode-pill {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.3rem 0.65rem;
    border-radius: 16px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: all 0.2s ease;
    font-family: 'JetBrains Mono', monospace;
}

.holo-mode-pill:hover {
    color: #f8fafc;
    background: rgba(255, 255, 255, 0.08);
}

.holo-mode-pill.active {
    background: linear-gradient(135deg, rgba(0, 242, 254, 0.3), rgba(168, 85, 247, 0.25));
    color: #00f2fe;
    border: 1px solid rgba(0, 242, 254, 0.4);
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.3);
}

/* ========================================================================= */
/* NEURAL PHENOTYPE DNA BARYCENTRIC SPLICER                                   */
/* ========================================================================= */
.rainscript-splicer-pane {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 1.25rem;
    backdrop-filter: blur(12px);
    width: 100%;
}

.splicer-canvas-wrapper {
    position: relative;
    width: 100%;
    height: 380px;
    background: radial-gradient(circle at center, rgba(30, 41, 59, 0.8) 0%, rgba(15, 23, 42, 0.95) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    touch-action: none;
}

#splicer-canvas {
    width: 100%;
    height: 100%;
    display: block;
    cursor: crosshair;
}

.splicer-telemetry {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    background: rgba(10, 15, 30, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 0.85rem 1rem;
    font-family: 'JetBrains Mono', monospace;
}

.splicer-genome-bar {
    display: flex;
    justify-content: space-around;
    font-size: 0.82rem;
    font-weight: 700;
}

.splicer-phenotype-title {
    font-size: 0.85rem;
    color: #e2e8f0;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 0.4rem;
}

.btn-splice-inject {
    background: linear-gradient(135deg, #00f2fe, #4facfe);
    border: none;
    color: #0f172a;
    font-weight: 800;
    font-size: 0.85rem;
    padding: 0.75rem 1.2rem;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s;
    box-shadow: 0 0 15px rgba(0, 242, 254, 0.35);
}

.btn-splice-inject:hover {
    filter: brightness(1.15);
    transform: translateY(-2px);
}
