:root {
    --bg-color: #1a1714;
    --text-primary: #e8dcc5;
    --text-secondary: #a69882;
    --accent: #d4af37; /* Gold */
    --accent-hover: #b5952f;
    --card-bg: rgba(43, 33, 28, 0.85);
    --border-color: rgba(212, 175, 55, 0.3);
    --glass-blur: 8px;
    --success: #65a30d;
    --agent-curator: #38bdf8;
    --agent-soundtrack: #a855f7;
    --agent-sommelier: #fb7185;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Playfair Display', serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

.separator {
    color: var(--accent);
    font-size: 0.8rem;
    margin-top: 1rem;
    letter-spacing: 5px;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
}

/* Authentication Bar */
.auth-bar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 100;
}

.auth-logged-in {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(43, 33, 28, 0.95);
    border: 1px solid var(--accent);
    padding: 6px 14px;
    border-radius: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1.5px solid var(--accent);
    object-fit: cover;
}

.user-details {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.user-name {
    font-family: 'Playfair Display', serif;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.user-email {
    font-size: 0.7rem;
    color: var(--text-secondary);
    line-height: 1.1;
}

.memory-indicator {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.75rem;
    color: var(--accent);
    background: rgba(212, 175, 55, 0.15);
    border: 1px solid rgba(212, 175, 55, 0.4);
    padding: 3px 8px;
    border-radius: 12px;
}

.sign-out-btn {
    background: transparent;
    border: 1px solid rgba(212, 175, 55, 0.4);
    color: var(--text-secondary);
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.75rem;
    font-family: 'Playfair Display', serif;
    cursor: pointer;
    margin: 0;
    width: auto;
    transition: all 0.3s;
}

.sign-out-btn:hover {
    color: var(--accent);
    border-color: var(--accent);
    background: rgba(212, 175, 55, 0.1);
}

.guest-notice {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-right: 12px;
}

.custom-google-btn {
    background: #111;
    color: #fff;
    border: 1px solid var(--accent);
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 0.85rem;
    cursor: pointer;
    font-family: 'Playfair Display', serif;
    transition: all 0.3s;
}

.custom-google-btn:hover {
    background: rgba(212, 175, 55, 0.15);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

/* Header */
header {
    text-align: center;
    margin-bottom: 2.5rem;
}

h1 {
    font-family: 'Cinzel', serif;
    font-size: 2.8rem;
    color: var(--accent);
    letter-spacing: 2px;
    margin-bottom: 0.2rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
}

.subtitle {
    font-style: italic;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Cards & Glassmorphism */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    backdrop-filter: blur(var(--glass-blur));
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

/* Hero Screening Room Banner (Compact & Sleek) */
.hero-screening-card {
    position: relative;
    overflow: visible;
    background: radial-gradient(circle at 50% 0%, rgba(45, 36, 25, 0.95), rgba(16, 13, 10, 0.95));
    border: 1.5px solid rgba(212, 175, 55, 0.4);
    border-radius: 12px;
    padding: 1.6rem 1.8rem 1.4rem;
    text-align: center;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
}

.hero-projector-glow {
    position: absolute;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    width: 260px;
    height: 140px;
    background: radial-gradient(ellipse at center, rgba(212, 175, 55, 0.25) 0%, rgba(212, 175, 55, 0) 70%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 700px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(212, 175, 55, 0.15);
    border: 1px solid var(--accent);
    padding: 3px 12px;
    border-radius: 16px;
    color: var(--accent);
    font-family: 'Cinzel', serif;
    font-size: 0.78rem;
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
}

.hero-screening-card h2 {
    font-family: 'Cinzel', serif;
    font-size: 1.6rem;
    color: #fff;
    margin-bottom: 0.4rem;
    line-height: 1.25;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

.hero-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.45;
    margin-bottom: 1.2rem;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-hero {
    background: linear-gradient(135deg, var(--accent) 0%, #b38f28 100%);
    color: #110f0c !important;
    font-size: 0.92rem;
    padding: 0.7rem 1.6rem;
    border-radius: 25px;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: auto;
    margin-top: 0;
}

.btn-hero:hover {
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.7);
    transform: translateY(-1px);
}

.btn-secondary {
    background: rgba(20, 16, 12, 0.8);
    border: 1px solid rgba(212, 175, 55, 0.4);
    color: var(--text-primary);
    font-size: 0.88rem;
    padding: 0.7rem 1.4rem;
    border-radius: 25px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: auto;
    margin-top: 0;
}

.btn-secondary:hover {
    background: rgba(40, 32, 24, 0.9);
    border-color: var(--accent);
    color: var(--accent);
}

/* ==========================================================================
   Ethereal Floating Cinema Screening Modal ("The Screen Test")
   ========================================================================== */
.screening-overlay {
    background: rgba(5, 4, 3, 0.88);
    backdrop-filter: blur(25px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.screening-projector-beam {
    position: absolute;
    top: -120px;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 400px;
    background: radial-gradient(ellipse at 50% 0%, rgba(212, 175, 55, 0.22) 0%, rgba(212, 175, 55, 0) 70%);
    pointer-events: none;
}

.screening-modal-card {
    background: rgba(14, 11, 9, 0.95);
    border: 1.5px solid rgba(212, 175, 55, 0.45);
    border-radius: 16px;
    width: 100%;
    max-width: 680px;
    padding: 30px 35px;
    position: relative;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.8), 0 0 30px rgba(212, 175, 55, 0.15);
    animation: float-ethereal 4s ease-in-out infinite alternate;
}

/* Floating Ambient Intro Curator Loader on top edge of banner */
.intro-curator-loader {
    position: absolute;
    top: -24px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(18, 14, 10, 0.98);
    border: 1.5px solid var(--accent);
    border-radius: 30px;
    padding: 7px 22px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.9), 0 0 25px rgba(212, 175, 55, 0.45);
    z-index: 50;
    backdrop-filter: blur(14px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    animation: loader-pop-in 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.intro-curator-loader.fade-out {
    opacity: 0;
    transform: translate(-50%, -15px);
    pointer-events: none;
}

@keyframes loader-pop-in {
    from {
        opacity: 0;
        transform: translate(-50%, -15px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

.loader-reel {
    font-size: 1.4rem;
    display: inline-block;
    animation: reel-spin 2s linear infinite;
}

@keyframes reel-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.loader-info {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.loader-main {
    font-family: 'Cinzel', serif;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 0.5px;
}

.loader-sub {
    font-size: 0.78rem;
    color: #e2e8f0;
    font-family: 'Outfit', sans-serif;
}

.loader-progress-bar {
    position: absolute;
    bottom: 0;
    left: 20px;
    right: 20px;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.loader-progress-fill {
    width: 0%;
    height: 100%;
    background: var(--accent);
    animation: progress-fill 2.4s ease-in-out forwards;
}

@keyframes progress-fill {
    from { width: 0%; }
    to { width: 100%; }
}

@keyframes float-ethereal {
    0% { transform: translateY(0px); }
    100% { transform: translateY(-4px); }
}

.modal-cinema-branding {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px dashed rgba(212, 175, 55, 0.25);
}

.modal-brand-tag {
    font-family: 'Cinzel', serif;
    font-size: 0.85rem;
    color: var(--accent);
    letter-spacing: 1px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.modal-brand-tag strong {
    color: #fff;
    font-weight: 700;
}

.modal-brand-tagline {
    font-size: 0.82rem;
    color: #cbd5e1;
    font-family: 'Outfit', sans-serif;
    font-style: italic;
    line-height: 1.4;
}

.screening-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    padding-bottom: 18px;
    margin-bottom: 24px;
}

.header-left-col {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.modal-identity-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.8rem;
}

.modal-auth-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(212, 175, 55, 0.25);
    padding: 3px 12px;
    border-radius: 14px;
    color: #bbb;
    font-family: 'Playfair Display', serif;
}

.modal-auth-badge.logged-in {
    background: rgba(39, 174, 96, 0.12);
    border-color: rgba(39, 174, 96, 0.4);
    color: #a8e6cf;
}

.modal-auth-badge .badge-tag {
    background: var(--accent);
    color: #111;
    font-size: 0.68rem;
    font-weight: bold;
    padding: 1px 6px;
    border-radius: 8px;
    margin-left: 4px;
    font-family: 'Cinzel', serif;
}

.modal-login-chip {
    background: #111;
    color: #f3d069;
    border: 1px solid var(--accent);
    border-radius: 14px;
    padding: 3px 11px;
    font-size: 0.75rem;
    cursor: pointer;
    font-family: 'Playfair Display', serif;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    width: auto;
    margin: 0;
}

.modal-login-chip:hover {
    background: rgba(212, 175, 55, 0.2);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.4);
    transform: translateY(-1px);
}

.screening-stepper {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.stepper-dot {
    font-family: 'Cinzel', serif;
    font-size: 0.78rem;
    color: #888;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
}

.stepper-dot .dot-num {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: bold;
    border: 1px solid #555;
}

.stepper-dot.active {
    color: var(--accent);
    font-weight: bold;
}

.stepper-dot.active .dot-num {
    background: rgba(212, 175, 55, 0.25);
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.5);
}

.stepper-dot.completed {
    color: var(--success);
}

.stepper-dot.completed .dot-num {
    background: rgba(39, 174, 96, 0.2);
    border-color: var(--success);
    color: var(--success);
}

.stepper-line {
    width: 14px;
    height: 1px;
    background: rgba(212, 175, 55, 0.3);
}

.header-right-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.modal-vault-btn {
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.35);
    color: var(--accent);
    padding: 5px 12px;
    border-radius: 14px;
    font-size: 0.78rem;
    font-family: 'Cinzel', serif;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    width: auto;
    margin: 0;
}

.modal-vault-btn:hover {
    background: rgba(212, 175, 55, 0.25);
    border-color: var(--accent);
    color: #fff;
    transform: translateY(-1px);
}

.modal-close-btn {
    background: none;
    border: none;
    color: #999;
    font-size: 1.6rem;
    cursor: pointer;
    padding: 0;
    width: auto;
    margin: 0;
    line-height: 1;
    transition: color 0.2s ease;
}

.modal-close-btn:hover {
    color: var(--accent);
    background: none;
    transform: none;
    box-shadow: none;
}

/* Scene Step Transitions */
.scene-step {
    animation: scene-fade-in 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

.scene-meta {
    font-family: 'Cinzel', serif;
    font-size: 0.75rem;
    letter-spacing: 1.5px;
    color: var(--accent);
    margin-bottom: 6px;
}

.scene-question {
    font-family: 'Cinzel', serif;
    font-size: 1.4rem;
    color: #fff;
    margin-bottom: 6px;
    line-height: 1.3;
}

.scene-hint {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.scene-textarea {
    min-height: 90px;
    font-size: 1.05rem;
    line-height: 1.5;
    background: rgba(20, 16, 12, 0.85);
    border: 1.5px solid rgba(212, 175, 55, 0.3);
    border-radius: 8px;
    padding: 12px 16px;
}

.scene-textarea:focus, .scene-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 16px rgba(212, 175, 55, 0.35);
    background: rgba(28, 22, 18, 0.95);
}

.scene-input {
    font-size: 1rem;
    padding: 12px 16px;
    background: rgba(20, 16, 12, 0.85);
    border: 1.5px solid rgba(212, 175, 55, 0.3);
    border-radius: 8px;
}

.scene-fields-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

@media (max-width: 600px) {
    .scene-fields-grid {
        grid-template-columns: 1fr;
    }
}

/* Quick Suggestion Pills */
.scene-suggestions {
    margin-top: 14px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.suggestion-label {
    font-size: 0.78rem;
    color: #888;
    font-family: 'Cinzel', serif;
    margin-right: 4px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.suggestion-badge {
    font-size: 0.72rem;
    color: #a3a3a3;
    background: transparent;
    border: none;
    padding: 0 4px;
    font-family: 'Outfit', sans-serif;
    font-style: italic;
    font-weight: 300;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    opacity: 0.85;
}

.suggestion-badge i {
    color: var(--accent);
    font-size: 0.7rem;
}

.scene-pill {
    background: rgba(212, 175, 55, 0.08);
    border: 1px solid rgba(212, 175, 55, 0.25);
    color: #ddd;
    font-size: 0.78rem;
    padding: 5px 12px;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    width: auto;
    margin: 0;
    font-family: 'Playfair Display', serif;
}

.scene-pill:hover {
    background: rgba(212, 175, 55, 0.25);
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-1px);
}

.scene-pill.selected {
    background: var(--accent);
    color: #111;
    font-weight: bold;
    border-color: var(--accent);
}

/* Screening Modal Footer */
.screening-modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
    border-top: 1px solid rgba(212, 175, 55, 0.2);
    padding-top: 18px;
    gap: 12px;
}

.btn-scene-nav {
    background: rgba(24, 20, 16, 0.8);
    border: 1px solid rgba(212, 175, 55, 0.3);
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    width: auto;
    margin: 0;
}

.btn-scene-nav:hover {
    color: var(--accent);
    border-color: var(--accent);
}

.footer-center-hint {
    font-size: 0.75rem;
    color: #777;
}

.footer-center-hint kbd {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid #555;
    padding: 2px 5px;
    border-radius: 4px;
    font-family: monospace;
    color: #aaa;
}

.btn-scene-next {
    background: var(--accent);
    color: #111;
    padding: 10px 22px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: bold;
    width: auto;
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-scene-submit {
    background: linear-gradient(135deg, var(--accent) 0%, #b8860b 100%);
    color: #111;
    padding: 10px 24px;
    border-radius: 25px;
    font-size: 0.95rem;
    font-weight: bold;
    width: auto;
    margin: 0;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.5);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-scene-submit:hover {
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.8);
    transform: translateY(-1px);
}

/* Final Scene Auth & Dispatch Box */
.scene-auth-box {
    margin-top: 22px;
    background: linear-gradient(135deg, rgba(28, 22, 18, 0.95), rgba(16, 13, 10, 0.98));
    border: 1px solid rgba(212, 175, 55, 0.35);
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.scene-auth-box.logged-in {
    border-color: rgba(39, 174, 96, 0.4);
    background: linear-gradient(135deg, rgba(20, 32, 24, 0.95), rgba(12, 18, 14, 0.98));
}

.auth-box-prompt {
    display: flex;
    align-items: center;
    gap: 12px;
}

.auth-box-prompt i {
    font-size: 1.5rem;
    color: var(--accent);
}

.scene-auth-box.logged-in .auth-box-prompt i {
    color: #2ecc71;
}

.auth-box-prompt strong {
    font-family: 'Cinzel', serif;
    font-size: 0.95rem;
    color: #fff;
    display: block;
    margin-bottom: 2px;
}

.auth-box-prompt p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin: 0;
}

.auth-box-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.choice-or {
    color: #888;
    font-size: 0.8rem;
    font-style: italic;
}

.btn-scene-guest {
    background: rgba(40, 32, 24, 0.9);
    border: 1px solid rgba(212, 175, 55, 0.4);
    color: var(--text-primary);
    padding: 9px 18px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: auto;
    margin: 0;
    transition: all 0.2s ease;
}

.btn-scene-guest:hover {
    background: rgba(60, 48, 36, 0.95);
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-1px);
}

.btn-scene-google {
    background: linear-gradient(135deg, var(--accent) 0%, #b38f28 100%);
    color: #111;
    padding: 9px 20px;
    border-radius: 20px;
    font-size: 0.88rem;
    font-weight: bold;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: auto;
    margin: 0;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
    transition: all 0.2s ease;
}

.btn-scene-google:hover {
    box-shadow: 0 0 25px rgba(212, 175, 55, 0.7);
    transform: translateY(-1px);
}

.input-section h2, .results-section h2 {
    font-family: 'Cinzel', serif;
    color: var(--accent);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.form-group {
    margin-bottom: 1.2rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: bold;
    font-size: 0.95rem;
}

.glass-input {
    width: 100%;
    padding: 0.8rem;
    background: rgba(26, 23, 20, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-family: 'Playfair Display', serif;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.glass-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
    background: rgba(26, 23, 20, 0.8);
}

/* Buttons */
button {
    background: var(--accent);
    color: var(--bg-color);
    border: none;
    padding: 0.9rem 1.8rem;
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: 1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 1rem;
}

button:hover {
    background: var(--accent-hover);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
    transform: translateY(-1px);
}

button:disabled {
    background: #555;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Collaborative Partner Banner */
.collab-partner-banner {
    background: linear-gradient(135deg, rgba(43, 33, 28, 0.95), rgba(26, 23, 20, 0.95));
    border: 1.5px solid var(--accent);
    border-radius: 10px;
    padding: 1rem 1.5rem;
    margin-bottom: 1.8rem;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.2);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.collab-badge {
    font-family: 'Cinzel', serif;
    font-size: 0.85rem;
    color: var(--accent);
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 1px;
}

#collab-note-text {
    font-style: italic;
    color: #f1ebd8;
    font-size: 1rem;
    line-height: 1.5;
}

/* Unified Experience Card */
.package-card {
    background: rgba(30, 24, 20, 0.9);
    border: 1px solid var(--accent);
    border-radius: 12px;
    padding: 1.8rem;
    margin-bottom: 2rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

.package-top {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 25px;
    margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
    .package-top {
        grid-template-columns: 1fr;
    }
}

.package-poster-wrapper {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.package-poster {
    width: 100%;
    height: 260px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid var(--accent);
    box-shadow: 0 6px 15px rgba(0,0,0,0.6);
    background: #111;
}

.match-pill {
    background: rgba(212, 175, 55, 0.15);
    border: 1px solid var(--accent);
    color: var(--accent);
    font-family: 'Cinzel', serif;
    font-weight: bold;
    text-align: center;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.9rem;
}

.package-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.package-title {
    font-size: 2rem;
    color: #fff;
    font-family: 'Cinzel', serif;
    line-height: 1.2;
}

.package-meta {
    font-size: 0.95rem;
    color: var(--accent);
    margin-bottom: 6px;
    font-style: italic;
}

.package-cast {
    font-size: 0.88rem;
    color: #e2e8f0;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.package-cast i {
    color: var(--accent);
}

.package-cast strong {
    color: var(--accent);
    font-weight: 600;
}

.package-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}

.package-tag {
    background: rgba(212, 175, 55, 0.12);
    border: 1px solid rgba(212, 175, 55, 0.3);
    color: var(--text-primary);
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
}

.package-synopsis {
    font-size: 1.05rem;
    color: #ded1be;
    margin-bottom: 14px;
    line-height: 1.5;
}

.package-reason {
    font-size: 0.95rem;
    background: rgba(0, 0, 0, 0.25);
    border-left: 3px solid var(--accent);
    padding: 10px 14px;
    border-radius: 0 6px 6px 0;
    margin-bottom: 12px;
    color: #e5ded0;
}

.package-fun-fact {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Sub-Agents Grid (Soundtrack & Sommelier) */
.subagents-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px dashed rgba(212, 175, 55, 0.3);
}

@media (max-width: 768px) {
    .subagents-grid {
        grid-template-columns: 1fr;
    }
}

.subagent-card {
    background: rgba(20, 17, 15, 0.8);
    border-radius: 8px;
    padding: 1.2rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.subagent-card.soundtrack {
    border-left: 3px solid var(--agent-soundtrack);
}

.subagent-card.sommelier {
    border-left: 3px solid var(--agent-sommelier);
}

.subagent-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: bold;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.subagent-header.soundtrack-title {
    color: var(--agent-soundtrack);
}

.subagent-header.sommelier-title {
    color: var(--agent-sommelier);
}

.subagent-body {
    font-size: 0.92rem;
    color: #ddd;
    line-height: 1.4;
}

.subagent-detail {
    margin-top: 6px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Streaming Providers Section */
.streaming-box {
    margin-top: 1.2rem;
    padding: 12px 16px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: 8px;
    font-size: 0.88rem;
}

.streaming-title {
    color: var(--agent-curator);
    font-weight: bold;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Behind the Scenes: Visual AI Crew Pipeline */
.trace-card {
    background: rgba(20, 16, 14, 0.95);
    border: 1.5px solid rgba(212, 175, 55, 0.4);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

.trace-main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    padding-bottom: 14px;
    margin-bottom: 18px;
    flex-wrap: wrap;
    gap: 10px;
}

.trace-title-group h3 {
    font-family: 'Cinzel', serif;
    font-size: 1.25rem;
    color: #fff;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.trace-subtitle {
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.trace-badge {
    background: rgba(212, 175, 55, 0.15);
    border: 1px solid rgba(212, 175, 55, 0.4);
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 20px;
    color: var(--accent);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: 'Cinzel', serif;
}

/* 4-Crew Step Cards Grid */
.crew-pipeline-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.crew-step-card {
    background: rgba(12, 10, 8, 0.7);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 8px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

.crew-step-card:hover {
    border-color: var(--accent);
    background: rgba(26, 22, 18, 0.9);
    transform: translateY(-2px);
}

.crew-step-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.crew-step-num {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(212, 175, 55, 0.2);
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--accent);
}

.crew-icon {
    font-size: 1.1rem;
    color: var(--accent);
}

.crew-info {
    display: flex;
    flex-direction: column;
}

.crew-name {
    font-size: 0.88rem;
    font-weight: bold;
    color: #fff;
    font-family: 'Cinzel', serif;
}

.crew-role {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.crew-action {
    font-size: 0.78rem;
    color: #ccc;
    line-height: 1.35;
    margin-bottom: 10px;
    font-style: italic;
    min-height: 34px;
}

.crew-status {
    font-size: 0.72rem;
    color: var(--success);
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: bold;
}

.badge-dot.green {
    background: var(--success);
    box-shadow: 0 0 6px var(--success);
}

/* Dev / Judge Toggle */
.trace-dev-toggle {
    display: flex;
    justify-content: center;
    border-top: 1px dashed rgba(212, 175, 55, 0.2);
    padding-top: 12px;
    margin-top: 6px;
}

.trace-terminal-btn {
    background: rgba(14, 12, 10, 0.8);
    border: 1px solid rgba(212, 175, 55, 0.3);
    color: var(--text-secondary);
    font-size: 0.78rem;
    padding: 6px 16px;
    border-radius: 20px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    font-family: 'Fira Code', monospace;
    width: auto;
    margin: 0;
}

.trace-terminal-btn:hover {
    color: var(--accent);
    border-color: var(--accent);
    background: rgba(26, 22, 18, 0.95);
}

.trace-body {
    margin-top: 12px;
    padding: 14px;
    border-radius: 6px;
    max-height: 280px;
    overflow-y: auto;
    font-family: 'Fira Code', monospace;
    font-size: 0.8rem;
    background: #080706;
    border: 1px solid rgba(212, 175, 55, 0.15);
}

.trace-line {
    margin-bottom: 8px;
    line-height: 1.4;
    display: flex;
    gap: 8px;
}

.trace-ts {
    color: #666;
}

.trace-agent {
    font-weight: bold;
}

.trace-agent.MasterOrchestrator { color: var(--accent); }
.trace-agent.FilmCuratorAgent { color: var(--agent-curator); }
.trace-agent.SoundtrackAgent { color: var(--agent-soundtrack); }
.trace-agent.SommelierAgent { color: var(--agent-sommelier); }

.trace-action {
    color: #aaa;
}

.inspect-crew-btn {
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.3);
    color: var(--accent);
    padding: 6px 14px;
    border-radius: 20px;
    font-family: 'Cinzel', serif;
    font-size: 0.8rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    width: auto;
    margin-top: 8px;
}

.inspect-crew-btn:hover {
    background: var(--accent);
    color: #111;
    box-shadow: 0 0 12px rgba(212, 175, 55, 0.4);
}

/* Feedback Loop Card */
.feedback-card {
    border: 1.5px solid rgba(212, 175, 55, 0.4);
    background: rgba(30, 24, 20, 0.95);
}

.feedback-header h3 {
    font-family: 'Cinzel', serif;
    color: var(--accent);
    font-size: 1.3rem;
    margin-bottom: 4px;
}

.feedback-subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    padding-bottom: 10px;
}

.feedback-step-block {
    background: rgba(18, 15, 13, 0.6);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 18px;
}

.feedback-step-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Cinzel', serif;
    font-size: 0.95rem;
    color: #fff;
    margin-bottom: 8px;
}

.feedback-step-desc {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.rating-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
}

.rating-text-hint {
    font-size: 0.85rem;
    color: var(--accent);
    font-style: italic;
}

.feedback-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.feedback-chip {
    background: rgba(26, 23, 20, 0.8);
    border: 1px solid rgba(212, 175, 55, 0.3);
    color: var(--text-primary);
    padding: 6px 14px;
    border-radius: 20px;
    font-family: 'Playfair Display', serif;
    font-size: 0.82rem;
    cursor: pointer;
    width: auto;
    margin: 0;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.feedback-chip:hover, .feedback-chip.selected {
    background: var(--accent);
    color: #111;
    border-color: var(--accent);
    font-weight: bold;
}

.feedback-form {
    width: 100%;
}

.feedback-row {
    display: flex;
    gap: 12px;
    align-items: center;
    width: 100%;
}

.feedback-row .glass-input {
    flex: 1;
    min-width: 0;
    margin: 0;
}

@media (max-width: 768px) {
    .feedback-row {
        flex-direction: column;
        align-items: stretch;
    }
}

.star-rating {
    display: flex;
    gap: 6px;
    font-size: 1.5rem;
    color: #555;
    cursor: pointer;
    user-select: none;
    flex-shrink: 0;
}

.star-rating span.active, .star-rating span:hover {
    color: var(--accent);
}

.feedback-submit-btn {
    width: auto;
    flex-shrink: 0;
    margin: 0;
    padding: 0.8rem 1.4rem;
    font-size: 0.85rem;
    white-space: nowrap;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.feedback-status-msg {
    margin-top: 10px;
    font-size: 0.85rem;
    color: var(--success);
}

/* Cinémathèque Archive Styles */
.archive-card {
    background: rgba(26, 23, 20, 0.95);
    border: 1px solid var(--accent);
}

.archive-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
    padding-bottom: 0.8rem;
}

.archive-title-group h3 {
    font-family: 'Cinzel', serif;
    color: var(--accent);
    font-size: 1.3rem;
}

.archive-subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.archive-status-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--accent);
    border: 1px solid var(--accent);
    padding: 4px 10px;
    border-radius: 15px;
}

.badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 6px var(--accent);
}

.archive-guest-banner {
    background: rgba(231, 76, 60, 0.15);
    border: 1px solid rgba(231, 76, 60, 0.4);
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 0.82rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #ffcccc;
}

.archive-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px dashed rgba(212, 175, 55, 0.2);
}

.drawer-cabinet {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    flex: 1;
    min-width: 260px;
    margin-bottom: 0;
}

.archive-sort-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(18, 15, 13, 0.7);
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid rgba(212, 175, 55, 0.25);
}

.archive-sort-label {
    font-family: 'Cinzel', serif;
    font-size: 0.78rem;
    color: var(--accent);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 5px;
}

.archive-sort-select {
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 0.78rem;
    font-family: 'Outfit', sans-serif;
    cursor: pointer;
    outline: none;
    transition: all 0.2s ease;
}

.archive-sort-select:focus,
.archive-sort-select:hover {
    border-color: var(--accent);
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.3);
}

.archive-sort-select option {
    background: #1a1714;
    color: #fff;
}

.drawer-tab {
    background: rgba(43, 33, 28, 0.6);
    border: 1px solid rgba(212, 175, 55, 0.3);
    color: var(--text-secondary);
    padding: 6px 12px;
    border-radius: 4px;
    font-family: 'Cinzel', serif;
    font-size: 0.78rem;
    cursor: pointer;
    width: auto;
    margin: 0;
    transition: all 0.3s;
}

.drawer-tab.active, .drawer-tab:hover {
    background: rgba(212, 175, 55, 0.2);
    color: var(--accent);
    border-color: var(--accent);
}

.archive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
}

.archive-record-card {
    background: rgba(18, 15, 13, 0.9);
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-radius: 8px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.archive-card-top {
    display: flex;
    gap: 12px;
}

.archive-poster {
    width: 60px;
    height: 90px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid var(--accent);
}

.archive-meta {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1;
    min-width: 0;
}

.archive-meta-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 6px;
}

.archive-delete-btn {
    background: transparent;
    border: none;
    color: #888;
    font-size: 0.85rem;
    cursor: pointer;
    padding: 4px 8px;
    margin: 0;
    width: auto;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.archive-delete-btn i {
    pointer-events: none;
}

.archive-delete-btn:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.15);
    transform: scale(1.15);
    box-shadow: none;
}

.archive-title {
    font-size: 1rem;
    color: #fff;
    font-family: 'Cinzel', serif;
}

.archive-director {
    font-size: 0.78rem;
    color: var(--accent);
}

.archive-date {
    font-size: 0.7rem;
    color: #888;
}

.archive-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
}

.tag-pill {
    background: rgba(212, 175, 55, 0.1);
    color: var(--accent);
    font-size: 0.7rem;
    padding: 1px 6px;
    border-radius: 10px;
}

.archive-expand-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 1.4rem;
}

.archive-expand-btn {
    background: rgba(26, 23, 20, 0.8);
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 8px 22px;
    border-radius: 25px;
    font-family: 'Cinzel', serif;
    font-size: 0.85rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    width: auto;
    margin: 0;
}

.archive-expand-btn:hover {
    background: var(--accent);
    color: #111;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
}

.archive-quote-box {
    background: rgba(0,0,0,0.3);
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 0.78rem;
    font-style: italic;
    color: #aaa;
}

.archive-reasoning {
    font-size: 0.8rem;
    color: #bbb;
    line-height: 1.3;
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-card {
    background: rgba(30, 24, 20, 0.98);
    border: 1px solid var(--accent);
    border-radius: 12px;
    padding: 2rem;
    max-width: 420px;
    width: 90%;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6), 0 0 20px rgba(212, 175, 55, 0.2);
    text-align: center;
    position: relative;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.modal-header h3 {
    margin-bottom: 0;
    border-bottom: none;
    font-size: 1.3rem;
}

.modal-close-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    width: auto;
    padding: 0;
    margin: 0;
    line-height: 1;
}

.modal-subtitle {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 1.2rem;
}

.modal-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1.2rem 0;
    color: var(--text-secondary);
    font-size: 0.75rem;
    letter-spacing: 1px;
}

.modal-divider::before, .modal-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

.modal-divider span {
    padding: 0 10px;
}

.modal-submit-btn {
    width: 100%;
    margin-top: 1rem;
    font-size: 1rem;
    padding: 0.8rem;
}

.hidden {
    display: none !important;
}

.cinematic-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.reel {
    animation: spin 2s linear infinite;
    display: inline-block;
}

@keyframes spin {
    100% { transform: rotate(360deg); }
}

/* ==========================================================================
   Emotional Biopic Milestone Banner & Trailer Player (Google Veo & Lyria)
   ========================================================================== */

/* Milestone Card */
.biopic-milestone-card {
    background: radial-gradient(circle at 50% 0%, rgba(50, 40, 28, 0.95), rgba(18, 14, 11, 0.98));
    border: 1.5px solid var(--accent);
    border-radius: 12px;
    padding: 1.4rem 1.6rem;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.7), 0 0 25px rgba(212, 175, 55, 0.2);
    position: relative;
    overflow: hidden;
}

@media (max-width: 768px) {
    .biopic-milestone-card {
        flex-direction: column;
        align-items: stretch;
    }
}

.milestone-content {
    flex: 1;
}

.milestone-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.milestone-badge {
    background: rgba(212, 175, 55, 0.18);
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 3px 12px;
    border-radius: 14px;
    font-size: 0.76rem;
    font-family: 'Cinzel', serif;
    letter-spacing: 0.5px;
}

.milestone-tag {
    color: #cbd5e1;
    font-size: 0.74rem;
    font-family: 'Outfit', sans-serif;
    background: rgba(255, 255, 255, 0.08);
    padding: 2px 8px;
    border-radius: 10px;
}

.milestone-title {
    font-family: 'Cinzel', serif;
    font-size: 1.15rem;
    color: #fff;
    margin: 4px 0 2px;
}

.milestone-desc {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-bottom: 12px;
}

.milestone-progress-row {
    display: flex;
    align-items: center;
    gap: 14px;
}

.milestone-progress-track {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.milestone-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #d4af37, #f3d069);
    border-radius: 6px;
    transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.7);
}

.milestone-count-text {
    font-family: 'Cinzel', serif;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent);
    white-space: nowrap;
}

.milestone-action-box {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 220px;
}

.btn-biopic-unlocked {
    background: linear-gradient(135deg, var(--accent) 0%, #b38f28 100%);
    color: #110f0c !important;
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: 0.85rem;
    padding: 0.75rem 1.2rem;
    border-radius: 20px;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.5);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    width: 100%;
    margin: 0;
}

.btn-biopic-unlocked:disabled {
    background: rgba(45, 36, 28, 0.8);
    color: #777 !important;
    border: 1px solid #443525;
    box-shadow: none;
    cursor: not-allowed;
}

.btn-biopic-unlocked:not(:disabled):hover {
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.8);
    transform: translateY(-2px);
}

.btn-demo-preview {
    background: transparent;
    border: 1px dashed rgba(212, 175, 55, 0.5);
    color: var(--accent);
    font-size: 0.75rem;
    padding: 5px 10px;
    border-radius: 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease;
    width: 100%;
    margin: 0;
}

.btn-demo-preview:hover {
    background: rgba(212, 175, 55, 0.15);
    border-style: solid;
}

/* Archive Watched Toggle Button */
.archive-card-top {
    transition: transform 0.2s ease, filter 0.2s ease;
    border-radius: 6px;
    padding: 2px;
}

.archive-card-top:hover {
    filter: brightness(1.08);
}

.archive-card-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed rgba(212, 175, 55, 0.2);
    gap: 6px;
    flex-wrap: wrap;
}

.archive-view-btn {
    background: rgba(212, 175, 55, 0.15);
    border: 1px solid var(--accent);
    color: var(--accent);
    font-size: 0.72rem;
    font-family: 'Cinzel', serif;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s ease;
    width: auto;
    margin: 0;
}

.archive-view-btn:hover {
    background: var(--accent);
    color: #111 !important;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

.archive-watched-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #bbb;
    font-size: 0.72rem;
    font-family: 'Outfit', sans-serif;
    padding: 4px 10px;
    border-radius: 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s ease;
    width: auto;
    margin: 0;
}

.archive-watched-btn:hover {
    background: rgba(212, 175, 55, 0.15);
    border-color: var(--accent);
    color: var(--accent);
}

.archive-watched-btn.is-watched {
    background: rgba(39, 174, 96, 0.18);
    border-color: rgba(39, 174, 96, 0.6);
    color: #a8e6cf;
    font-weight: 600;
}

.archive-watched-btn.is-watched:hover {
    background: rgba(231, 76, 60, 0.15);
    border-color: rgba(231, 76, 60, 0.5);
    color: #ffcccc;
}

.archive-rating-stars {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: rgba(0, 0, 0, 0.45);
    padding: 3px 9px;
    border-radius: 14px;
    border: 1px solid rgba(212, 175, 55, 0.25);
}

.star-rating-label {
    font-size: 0.68rem;
    color: #94a3b8;
    margin-right: 3px;
    font-family: 'Cinzel', serif;
}

.archive-star {
    font-size: 0.95rem;
    color: #475569;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
    line-height: 1;
}

.archive-star:hover {
    transform: scale(1.25);
    color: #f3d069;
}

.archive-star.filled {
    color: #f3d069;
    text-shadow: 0 0 6px rgba(243, 208, 105, 0.6);
}

/* ==========================================================================
   35mm Director's Storyboard & Editorial Visual Notebook Modal
   ========================================================================== */

.storyboard-overlay {
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(25px);
    z-index: 2000;
    overflow-y: auto;
    padding: 20px;
}

.storyboard-modal-wrapper {
    width: 100%;
    max-width: 1040px;
    background: #0d0a08;
    border: 1.5px solid var(--accent);
    border-radius: 12px;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.95), 0 0 45px rgba(212, 175, 55, 0.25);
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* 35mm Filmstrip Sprocket Holes *//* ==========================================================================
   Interactive Emotional Constellation & Google Lyria Soundscape
   ========================================================================== */

/* ==========================================================================
   Behind the Scenes: AI Crew Pipeline & Developer Trace Terminal
   ========================================================================== */

.trace-main-section {
    margin-top: 2.5rem;
    margin-bottom: 2.5rem;
}

.trace-card {
    background: rgba(14, 18, 27, 0.95);
    border: 1.5px solid rgba(212, 175, 55, 0.35);
    border-radius: 14px;
    padding: 1.8rem;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.8), 0 0 30px rgba(212, 175, 55, 0.12);
    position: relative;
    overflow: hidden;
}

.trace-main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding-bottom: 1.2rem;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    margin-bottom: 1.5rem;
}

.trace-title-group h3 {
    margin: 0 0 4px 0;
    font-family: 'Cinzel', serif;
    font-size: 1.25rem;
    color: #fff;
}

.trace-subtitle {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.trace-badge {
    background: rgba(212, 175, 55, 0.15);
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 4px 12px;
    border-radius: 12px;
    font-family: 'Cinzel', serif;
    font-size: 0.75rem;
    font-weight: 600;
}

/* 4-Card Crew Grid */
.crew-pipeline-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
    margin-bottom: 1.5rem;
}

.crew-step-card {
    background: rgba(20, 26, 38, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
    transition: all 0.3s ease;
}

.crew-step-card:hover {
    border-color: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6), 0 0 15px rgba(212, 175, 55, 0.2);
}

.crew-step-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.crew-step-num {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--accent);
    color: #111;
    font-family: 'Cinzel', serif;
    font-size: 0.72rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.crew-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(212, 175, 55, 0.15);
    border: 1px solid rgba(212, 175, 55, 0.3);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.crew-info {
    display: flex;
    flex-direction: column;
}

.crew-name {
    font-family: 'Cinzel', serif;
    font-size: 0.92rem;
    font-weight: 700;
    color: #fff;
}

.crew-role {
    font-size: 0.7rem;
    color: #94a3b8;
    font-family: 'Outfit', sans-serif;
}

.crew-duty-desc {
    font-size: 0.78rem;
    color: #cbd5e1;
    line-height: 1.45;
    margin: 0;
    flex: 1;
}

.crew-live-action-box {
    background: rgba(0, 0, 0, 0.45);
    border-left: 2px solid var(--accent);
    padding: 6px 10px;
    border-radius: 0 4px 4px 0;
    margin-top: 4px;
}

.crew-live-action-box .action-label {
    font-size: 0.68rem;
    color: var(--accent);
    font-weight: 600;
    display: block;
    margin-bottom: 2px;
}

.crew-live-action-box .crew-action {
    font-size: 0.74rem;
    color: #e2e8f0;
    margin: 0;
    line-height: 1.3;
}

.crew-status {
    font-size: 0.72rem;
    color: #34d399;
    font-family: 'Fira Code', monospace;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
}

.badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.badge-dot.green {
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
}

/* Terminal Drawer Toggle */
.trace-dev-toggle {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
}

.trace-terminal-btn {
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(56, 189, 248, 0.4);
    color: #7dd3fc;
    font-family: 'Fira Code', monospace;
    font-size: 0.82rem;
    padding: 8px 18px;
    border-radius: 20px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.25s ease;
    width: auto;
    margin: 0;
}

.trace-terminal-btn:hover {
    background: rgba(56, 189, 248, 0.2);
    border-color: #38bdf8;
    color: #fff;
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.35);
}

.trace-arrow-icon {
    font-size: 0.75rem;
    transition: transform 0.3s ease;
}

.trace-arrow-icon.rotated {
    transform: rotate(180deg);
}

/* Terminal Log Output Window */
.trace-body {
    margin-top: 14px;
    animation: fadeIn 0.3s ease;
}

.terminal-log {
    background: #07090e;
    border: 1px solid #1e293b;
    border-radius: 8px;
    padding: 16px;
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 0.78rem;
    color: #e2e8f0;
    max-height: 400px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.85);
}

.terminal-entry {
    border-left: 2px solid #475569;
    padding-left: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.terminal-entry.masterorchestrator {
    border-left-color: #d4af37;
}

.terminal-entry.filmcuratoragent {
    border-left-color: #38bdf8;
}

.terminal-entry.soundtrackagent {
    border-left-color: #818cf8;
}

.terminal-entry.sommelieragent {
    border-left-color: #f472b6;
}

.terminal-entry.cinémathèquearchive,
.terminal-entry.cinemathequearchive {
    border-left-color: #34d399;
}

.term-header-line {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.term-time {
    color: #64748b;
    font-size: 0.72rem;
}

.term-agent {
    font-weight: 700;
    font-size: 0.74rem;
}

.term-agent.masterorchestrator { color: #facc15; }
.term-agent.filmcuratoragent { color: #38bdf8; }
.term-agent.soundtrackagent { color: #a5b4fc; }
.term-agent.sommelieragent { color: #fbcfe8; }
.term-agent.cinémathèquearchive,
.term-agent.cinemathequearchive { color: #6ee7b7; }
.term-agent.system { color: #10b981; }

.term-step {
    background: rgba(255, 255, 255, 0.08);
    color: #94a3b8;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 0.68rem;
}

.term-action {
    color: #f8fafc;
}

.term-details-box {
    margin-top: 3px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 4px;
    padding: 6px 10px;
    overflow-x: auto;
}

.term-json {
    margin: 0;
    color: #93c5fd;
    font-size: 0.72rem;
    line-height: 1.35;
    white-space: pre-wrap;
    word-break: break-word;
}

.term-text {
    color: #cbd5e1;
    font-size: 0.74rem;
}

/* ==========================================================================
   Interactive Emotional Constellation & Google Lyria Soundscape
   ========================================================================== */

.constellation-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(4, 3, 6, 0.94);
    backdrop-filter: blur(18px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
}

.constellation-modal-wrapper {
    position: relative;
    max-width: 860px !important;
    width: 95vw !important;
    max-height: 90vh !important;
    margin: auto !important;
    background: #08060d;
    border: 1.5px solid rgba(212, 175, 55, 0.5);
    border-radius: 16px;
    box-shadow: 0 0 50px rgba(56, 189, 248, 0.2), 0 25px 60px rgba(0, 0, 0, 0.95);
    overflow-y: auto !important;
    animation: modalPop 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Floating High-Visibility Close Button in Top Right */
.constellation-floating-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.25);
    border: 1.5px solid #ef4444;
    color: #fca5a5;
    font-size: 1.15rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 100;
    transition: all 0.2s ease;
    padding: 0;
    margin: 0;
}

.constellation-floating-close:hover {
    background: #ef4444;
    color: #fff !important;
    transform: scale(1.1);
    box-shadow: 0 0 18px rgba(239, 68, 68, 0.8);
}

.constellation-card {
    padding: 18px 22px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: radial-gradient(circle at top right, rgba(56, 189, 248, 0.08) 0%, rgba(212, 175, 55, 0.04) 40%, transparent 80%);
}

/* Constellation Header */
.constellation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.25);
    padding-right: 46px; /* Space for the floating close button */
    flex-wrap: wrap;
}

.constellation-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.constellation-cosmic-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(56, 189, 248, 0.15);
    border: 1px solid #38bdf8;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #38bdf8;
    font-size: 1rem;
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.35);
}

.constellation-subtitle {
    font-size: 0.62rem;
    font-family: 'Cinzel', serif;
    letter-spacing: 1.5px;
    color: var(--accent);
    display: block;
}

.constellation-title {
    font-family: 'Cinzel', serif;
    font-size: 1.15rem;
    color: #fff;
    margin: 0;
    font-weight: 700;
}

.constellation-header-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* Audio Player Button with Animated Equalizer */
.btn-constellation-audio {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.5);
    color: #a7f3d0;
    font-family: 'Outfit', sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.25s ease;
}

.btn-constellation-audio:hover {
    background: rgba(16, 185, 129, 0.3);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
    color: #fff;
}

.sound-equalizer {
    display: inline-flex;
    align-items: flex-end;
    gap: 2px;
    height: 10px;
}

.sound-equalizer span {
    width: 2px;
    background: #10b981;
    border-radius: 1px;
    height: 3px;
}

.btn-constellation-audio.playing .sound-equalizer span:nth-child(1) { animation: eqBounce 0.8s ease-in-out infinite; }
.btn-constellation-audio.playing .sound-equalizer span:nth-child(2) { animation: eqBounce 0.6s ease-in-out infinite 0.15s; }
.btn-constellation-audio.playing .sound-equalizer span:nth-child(3) { animation: eqBounce 0.9s ease-in-out infinite 0.3s; }
.btn-constellation-audio.playing .sound-equalizer span:nth-child(4) { animation: eqBounce 0.7s ease-in-out infinite 0.45s; }

@keyframes eqBounce {
    0%, 100% { height: 3px; }
    50% { height: 10px; }
}

/* Narrative Bar (Reseña de relación mood/búsquedas y efecto) */
.constellation-narrative-bar {
    background: rgba(15, 23, 42, 0.7);
    border-left: 3px solid #38bdf8;
    padding: 6px 12px;
    border-radius: 0 6px 6px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.narrative-star-icon {
    color: #38bdf8;
    font-size: 0.85rem;
}

.constellation-narrative-text {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 0.82rem;
    color: #e2e8f0;
    margin: 0;
    line-height: 1.35;
}

/* Main Stage Grid (Sky Map on Left, Observatory on Right) */
.constellation-stage-grid {
    display: grid;
    grid-template-columns: 1.25fr 1fr;
    gap: 14px;
    align-items: stretch;
}

@media (max-width: 800px) {
    .constellation-stage-grid {
        grid-template-columns: 1fr;
    }
}

/* Constellation Viewport Canvas */
.constellation-map-viewport {
    position: relative;
    width: 100%;
    min-height: 260px;
    height: 270px;
    background: radial-gradient(circle at center, #0c0a14 0%, #040306 100%);
    border: 1.5px solid rgba(56, 189, 248, 0.3);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.9);
}

.starfield-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.constellation-svg-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.constellation-beam {
    stroke-linecap: round;
    animation: beamGlow 3s ease-in-out infinite alternate;
}

@keyframes beamGlow {
    from { opacity: 0.4; stroke-width: 1; }
    to { opacity: 0.9; stroke-width: 2; }
}

.constellation-stars-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

/* Interactive Celestial Star Node (Star Shape & Radiant Spikes) */
.constellation-star-orb {
    position: absolute;
    transform: translate(-50%, -50%);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    z-index: 5;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease, filter 0.35s ease;
    will-change: transform, opacity;
}

/* Z-Depth & Cosmic Distance Layers for > 5 Films */
.constellation-star-orb.depth-foreground {
    opacity: 1.0;
    z-index: 10;
}

.constellation-star-orb.depth-midground {
    opacity: 0.80;
    z-index: 6;
    filter: drop-shadow(0 0 8px rgba(0, 0, 0, 0.8));
}

.constellation-star-orb.depth-deep {
    opacity: 0.52;
    z-index: 3;
    filter: brightness(0.85) drop-shadow(0 0 10px rgba(0, 0, 0, 0.9));
}

.constellation-star-orb:hover {
    transform: translate(-50%, -50%) scale(1.18) !important;
    opacity: 1 !important;
    z-index: 25 !important;
    filter: brightness(1.2) drop-shadow(0 0 20px var(--spectral-glow, #d4af37));
}

.constellation-star-orb.active {
    transform: translate(-50%, -50%) scale(1.25) !important;
    opacity: 1 !important;
    z-index: 30 !important;
    filter: brightness(1.25) drop-shadow(0 0 25px var(--spectral-glow, #d4af37));
}

/* Radiant 4-Point Star Geometry Container */
.star-shape-wrapper {
    position: relative;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Celestial Star Flaring Spikes (SVG / Pseudo-element diamond rays) */
.star-celestial-flare {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 60px;
    height: 60px;
    transform: translate(-50%, -50%);
    pointer-events: none;
    transition: all 0.3s ease;
}

.star-celestial-flare svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 8px var(--spectral-glow, #d4af37));
}

.constellation-star-orb.active .star-celestial-flare {
    animation: starPulseGlow 2.5s ease-in-out infinite;
    transform: translate(-50%, -50%) scale(1.25);
}

@keyframes starPulseGlow {
    0%, 100% { transform: translate(-50%, -50%) scale(1.2) rotate(0deg); opacity: 0.9; }
    50% { transform: translate(-50%, -50%) scale(1.4) rotate(45deg); opacity: 1; filter: drop-shadow(0 0 16px var(--spectral-glow, #d4af37)); }
}

.star-pulse-ring {
    position: absolute;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    border: 1.5px dashed var(--spectral-glow, #d4af37);
    animation: spinRing 14s linear infinite;
    pointer-events: none;
    opacity: 0.6;
}

.constellation-star-orb.active .star-pulse-ring {
    border-style: solid;
    box-shadow: 0 0 20px var(--spectral-glow, #d4af37);
    animation: spinRing 6s linear infinite;
    opacity: 1;
}

@keyframes spinRing {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Embedded Circular Movie Core in Center of Star */
.star-orb-thumb {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--spectral-glow, #d4af37);
    overflow: hidden;
    background: #050508;
    box-shadow: 0 0 14px rgba(0, 0, 0, 0.9), inset 0 0 6px rgba(0,0,0,0.8);
    position: relative;
    z-index: 2;
}

.star-orb-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.star-label-badge {
    padding: 2px 7px;
    border-radius: 10px;
    border: 1px solid var(--spectral-glow, #d4af37);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: rgba(10, 8, 14, 0.88);
    backdrop-filter: blur(4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.85);
    pointer-events: none;
    max-width: 105px;
    transition: opacity 0.3s ease;
}

.star-label-badge .star-num {
    font-size: 0.52rem;
    font-family: 'Cinzel', serif;
    color: var(--accent);
    font-weight: 700;
    letter-spacing: 0.5px;
}

.star-label-badge .star-name {
    font-size: 0.62rem;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 95px;
}

.constellation-canvas-hint {
    position: absolute;
    bottom: 8px;
    left: 12px;
    font-size: 0.66rem;
    color: #cbd5e1;
    background: rgba(10, 8, 16, 0.8);
    border: 1px solid rgba(212, 175, 55, 0.25);
    padding: 4px 10px;
    border-radius: 12px;
    pointer-events: none;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Right: Active Star & Leitmotif Panel */
.constellation-observatory-panel {
    display: flex;
    flex-direction: column;
    gap: 10px;
    justify-content: space-between;
}

.observatory-star-card {
    background: rgba(15, 23, 42, 0.85);
    border: 1.5px solid rgba(212, 175, 55, 0.35);
    border-radius: 10px;
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6);
}

.observatory-star-header {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.star-badge-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.star-spectral-pill {
    font-family: 'Cinzel', serif;
    font-size: 0.62rem;
    font-weight: 700;
    color: var(--accent);
    border: 1px solid rgba(212, 175, 55, 0.4);
    padding: 1px 6px;
    border-radius: 8px;
}

.star-depth-badge {
    font-size: 0.60rem;
    font-family: 'Cinzel', serif;
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.3);
    padding: 1px 6px;
    border-radius: 8px;
}

.observatory-film-title {
    font-family: 'Cinzel', serif;
    font-size: 1.02rem;
    color: #fff;
    margin: 2px 0 0 0;
}

.observatory-director {
    font-size: 0.7rem;
    color: #94a3b8;
}

.observatory-poster-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.observatory-thumbnail {
    width: 48px;
    height: 66px;
    object-fit: cover;
    border-radius: 5px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
}

.observatory-resonance-box {
    display: flex;
    flex-direction: column;
    gap: 1px;
    font-size: 0.76rem;
}

.resonance-label {
    font-size: 0.64rem;
    color: var(--accent);
    font-weight: 700;
    font-family: 'Cinzel', serif;
}

.resonance-text {
    color: #f1f5f9;
    font-weight: 600;
    margin: 0;
}

.resonance-note {
    color: #cbd5e1;
    font-style: italic;
    font-family: 'Playfair Display', serif;
    margin: 0;
    font-size: 0.76rem;
    line-height: 1.25;
}

.btn-play-star-note {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.25) 0%, rgba(56, 189, 248, 0.2) 100%);
    border: 1px solid var(--accent);
    color: #fef08a;
    font-family: 'Cinzel', serif;
    font-size: 0.74rem;
    font-weight: 700;
    padding: 7px 12px;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    transition: all 0.25s ease;
    margin-top: 2px;
}

.btn-play-star-note:hover {
    background: var(--accent);
    color: #111 !important;
    box-shadow: 0 0 18px rgba(212, 175, 55, 0.6);
}

.btn-play-star-note.playing {
    background: #38bdf8;
    color: #0f172a !important;
    border-color: #7dd3fc;
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.8);
}

/* 5s Cinematic Leitmotif Master Card */
.leitmotif-master-card {
    background: rgba(10, 8, 18, 0.9);
    border: 1.5px solid rgba(56, 189, 248, 0.35);
    border-radius: 10px;
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.6);
}

.leitmotif-timbre-pill {
    font-size: 0.58rem;
    font-family: 'Cinzel', serif;
    font-weight: 700;
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.15);
    border: 1px solid rgba(56, 189, 248, 0.4);
    padding: 1px 6px;
    border-radius: 8px;
    margin-left: 6px;
    text-transform: uppercase;
}

.leitmotif-duration-tag {
    font-size: 0.64rem;
    font-family: 'Fira Code', monospace;
    color: #fef08a;
    background: rgba(212, 175, 55, 0.15);
    border: 1px solid rgba(212, 175, 55, 0.3);
    padding: 1px 6px;
    border-radius: 8px;
}

.leitmotif-desc-text {
    font-size: 0.72rem;
    color: #cbd5e1;
    font-family: 'Playfair Display', serif;
    font-style: italic;
    line-height: 1.35;
    margin: 0;
}

/* 5-Second Melodic Progress & Notes Track */
.leitmotif-timeline-container {
    position: relative;
    width: 100%;
    height: 24px;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(56, 189, 248, 0.25);
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.leitmotif-progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, rgba(212, 175, 55, 0.3) 0%, rgba(56, 189, 248, 0.55) 100%);
    border-right: 2px solid #38bdf8;
    box-shadow: 0 0 10px #38bdf8;
    transition: width 0.05s linear;
    pointer-events: none;
}

.leitmotif-notes-track {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    pointer-events: none;
}

.leitmotif-note-marker {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #d4af37;
    box-shadow: 0 0 6px #d4af37;
    transform: translate(-50%, 0);
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.leitmotif-note-marker.hit {
    background: #38bdf8 !important;
    box-shadow: 0 0 12px #38bdf8, 0 0 20px #fff !important;
    transform: translate(-50%, -2px) scale(1.4) !important;
}

.leitmotif-footer-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.62rem;
    color: #94a3b8;
    font-family: 'Fira Code', monospace;
}

.constellation-bottom-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 2px;
}

.btn-close-constellation-action {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid #ef4444;
    color: #fca5a5;
    font-family: 'Cinzel', serif;
    font-size: 0.76rem;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 20px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.btn-close-constellation-action:hover {
    background: #ef4444;
    color: #fff;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.6);
}

/* Storyboard Header */
.storyboard-card {
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: radial-gradient(circle at top right, rgba(212, 175, 55, 0.05) 0%, transparent 60%);
}

.storyboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

.storyboard-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-seal {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(212, 175, 55, 0.15);
    border: 1px solid var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 1.1rem;
}

.storyboard-subtitle {
    font-size: 0.68rem;
    font-family: 'Cinzel', serif;
    letter-spacing: 2px;
    color: var(--accent);
    display: block;
}

.storyboard-title {
    font-family: 'Cinzel', serif;
    font-size: 1.15rem;
    color: #fff;
    margin: 0;
}

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

.archetype-badge {
    background: rgba(212, 175, 55, 0.12);
    border: 1px solid var(--accent);
    color: var(--accent);
    font-family: 'Cinzel', serif;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.palette-swatches {
    display: flex;
    gap: 5px;
    background: rgba(0, 0, 0, 0.5);
    padding: 4px 8px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.color-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Preface Quote */
.storyboard-preface-bar {
    background: rgba(18, 14, 11, 0.85);
    border-left: 3px solid var(--accent);
    padding: 8px 14px;
    border-radius: 0 6px 6px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.preface-quote-icon {
    color: var(--accent);
    font-size: 0.9rem;
}

.storyboard-preface-text {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 0.88rem;
    color: #cbd5e1;
    margin: 0;
    line-height: 1.4;
}

/* Main Act Stage - 2 Columns */
.storyboard-act-stage {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 22px;
    align-items: start;
}

@media (max-width: 820px) {
    .storyboard-act-stage {
        grid-template-columns: 1fr;
    }
}

/* 35mm Celluloid Frame */
.filmstrip-frame-container {
    background: #080605;
    border: 1.5px solid rgba(212, 175, 55, 0.3);
    border-radius: 8px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
}

.filmstrip-edge-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.68rem;
    color: var(--accent);
    font-family: 'Cinzel', serif;
    font-weight: 600;
    letter-spacing: 1.5px;
}

.filmstrip-frame-inner {
    position: relative;
    width: 100%;
    height: 400px;
    background: #080605;
    border: 1px solid rgba(212, 175, 55, 0.4);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
}

.storyboard-frame-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: brightness(0.9) contrast(1.08) saturate(1.05);
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), filter 0.4s ease;
}

.storyboard-frame-img:hover {
    transform: scale(1.02);
}

.celluloid-grain-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, transparent 40%, rgba(0,0,0,0.6) 100%);
    pointer-events: none;
}

.frame-caption-badge {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px 18px;
    background: linear-gradient(to top, rgba(8, 6, 5, 0.95) 0%, rgba(8, 6, 5, 0.6) 60%, rgba(0, 0, 0, 0) 100%);
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.caption-title {
    font-family: 'Cinzel', serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
}

.caption-director {
    font-size: 0.75rem;
    color: var(--accent);
}

/* Editorial Dossier & Director's Remarks */
.storyboard-editorial-dossier {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dossier-act-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dossier-act-tag {
    font-family: 'Cinzel', serif;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 1.5px;
}

.dossier-mood-pill {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #94a3b8;
    font-size: 0.72rem;
    padding: 2px 8px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.dossier-act-title {
    font-family: 'Cinzel', serif;
    font-size: 1.35rem;
    color: #fff;
    margin: 0;
    line-height: 1.25;
}

.director-notebook-quote {
    background: rgba(18, 14, 11, 0.9);
    border: 1px solid rgba(212, 175, 55, 0.35);
    border-radius: 8px;
    padding: 14px 16px;
    position: relative;
}

.notebook-label {
    font-family: 'Cinzel', serif;
    font-size: 0.7rem;
    color: var(--accent);
    font-weight: 700;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
}

.director-note-body {
    font-family: 'Playfair Display', serif;
    font-size: 1rem;
    font-style: italic;
    color: #f1f5f9;
    line-height: 1.5;
    margin: 0;
}

/* Technical Dossier Cards: Veo & Lyria */
.technical-dossier-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

@media (max-width: 600px) {
    .technical-dossier-grid {
        grid-template-columns: 1fr;
    }
}

.dossier-card {
    background: rgba(10, 8, 6, 0.85);
    border-radius: 8px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.dossier-card.veo-card {
    border: 1px solid rgba(139, 92, 246, 0.4);
}

.dossier-card.lyria-card {
    border: 1px solid rgba(6, 182, 212, 0.4);
}

.dossier-card-title {
    font-size: 0.72rem;
    font-weight: 700;
    font-family: 'Cinzel', serif;
    display: flex;
    align-items: center;
    gap: 6px;
}

.veo-card .dossier-card-title { color: #c4b5fd; }
.lyria-card .dossier-card-title { color: #a5f3fc; }

.dossier-spec-row {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.dossier-badge {
    font-size: 0.65rem;
    background: rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Fira Code', monospace;
}

.dossier-spec-text {
    font-size: 0.72rem;
    color: #94a3b8;
    margin: 0;
    line-height: 1.35;
}

/* Act Stepper */
.storyboard-stepper-row {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 4px;
}

.storyboard-stepper-row .act-step {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.72rem;
    color: #888;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.storyboard-stepper-row .act-step.active {
    background: rgba(212, 175, 55, 0.2);
    border-color: var(--accent);
    color: var(--accent);
    font-weight: 700;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.35);
}

/* Storyboard Footer */
.storyboard-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid rgba(212, 175, 55, 0.2);
    flex-wrap: wrap;
    gap: 12px;
}

.storyboard-nav-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-storyboard-ctrl {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-family: 'Cinzel', serif;
    font-size: 0.75rem;
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    width: auto;
    margin: 0;
}

.btn-storyboard-ctrl:hover {
    background: rgba(212, 175, 55, 0.2);
    border-color: var(--accent);
    color: var(--accent);
}

.btn-storyboard-ambient {
    background: rgba(212, 175, 55, 0.15);
    border: 1px solid var(--accent);
    color: var(--accent);
    font-family: 'Outfit', sans-serif;
    font-size: 0.75rem;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    width: auto;
    margin: 0;
}

.btn-storyboard-ambient:hover {
    background: var(--accent);
    color: #111 !important;
}

.storyboard-climax-quote {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 0.75rem;
    color: #888;
    max-width: 450px;
    text-align: right;
}

@media (max-width: 768px) {
    .storyboard-climax-quote {
        text-align: left;
    }
}

/* ==========================================================================
   Cinema Courier & Epistle Email Modal Styles
   ========================================================================== */

.btn-email-dispatch {
    background: rgba(212, 175, 55, 0.15);
    border: 1px solid var(--accent);
    color: var(--accent);
    font-size: 0.82rem;
    font-family: 'Cinzel', serif;
    font-weight: 700;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    width: auto;
    margin: 0;
}

.btn-email-dispatch:hover {
    background: var(--accent);
    color: #111 !important;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
    transform: translateY(-1px);
}

.epistle-modal-card {
    max-width: 580px;
    width: 100%;
}

.epistle-result-box {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.epistle-status-banner {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: #a7f3d0;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.82rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.epistle-letter-preview {
    background: #080605;
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 8px;
    padding: 16px;
    max-height: 280px;
    overflow-y: auto;
    font-family: 'Playfair Display', serif;
    font-size: 0.88rem;
    color: #cbd5e1;
    line-height: 1.6;
    text-align: left;
}

.epistle-letter-preview h4 {
    font-family: 'Cinzel', serif;
    color: var(--accent);
    margin: 0 0 8px 0;
    font-size: 1rem;
}

.epistle-letter-preview .epistle-highlight-box {
    background: rgba(255, 255, 255, 0.04);
    border-left: 3px solid var(--accent);
    padding: 8px 12px;
    margin: 10px 0;
    border-radius: 0 4px 4px 0;
}

/* Re-roll & Battery Safe Banner Styles */
.package-actions-toolbar {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px dashed rgba(212, 175, 55, 0.25);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.package-actions-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-reroll-same-mood {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.25) 0%, rgba(245, 158, 11, 0.15) 100%);
    border: 1.5px solid var(--accent);
    color: #fef08a;
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: 0.85rem;
    padding: 8px 18px;
    border-radius: 20px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.25s ease;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.2);
    width: auto;
    margin: 0;
}

.btn-reroll-same-mood:hover {
    background: linear-gradient(135deg, var(--accent) 0%, #f59e0b 100%);
    color: #111 !important;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.6);
    transform: translateY(-2px);
}

.ai-battery-banner {
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.4);
    color: #fef3c7;
    font-family: 'Outfit', sans-serif;
    font-size: 0.86rem;
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    line-height: 1.4;
    animation: fadeIn 0.4s ease;
}

.ai-battery-banner i {
    color: #f59e0b;
    font-size: 1.2rem;
    flex-shrink: 0;
}

/* ==========================================================================
   AI Alignment & Multi-Constraint Evaluation Matrix
   ========================================================================== */

.auth-bar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
    padding: 6px 0 16px 0;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    gap: 20px;
    flex-wrap: wrap;
}

.auth-left-actions {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 0;
    padding: 0;
}

.auth-logged-out {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-left: auto;
    margin-top: 0;
}

.auth-logged-in {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-left: auto;
    margin-top: 0;
}

.alignment-matrix-nav-btn {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.15) 0%, rgba(212, 175, 55, 0.15) 100%);
    border: 1px solid rgba(56, 189, 248, 0.5);
    color: #e0f2fe;
    font-family: 'Cinzel', serif;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 7px 16px;
    border-radius: 20px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.25);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    align-self: flex-start;
    margin-top: 0;
}

.alignment-matrix-nav-btn:hover {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.35) 0%, rgba(212, 175, 55, 0.35) 100%);
    border-color: #38bdf8;
    color: #fff;
    box-shadow: 0 0 25px rgba(56, 189, 248, 0.5);
    transform: translateY(-2px);
}

.kbd-badge {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 4px;
    padding: 1px 5px;
    font-size: 0.62rem;
    font-family: 'Fira Code', monospace;
    color: #94a3b8;
}

.alignment-modal-card {
    max-width: 1060px !important;
    width: 95vw !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
    background: #06080d !important;
    border: 1.5px solid rgba(56, 189, 248, 0.4) !important;
    box-shadow: 0 0 50px rgba(56, 189, 248, 0.2), 0 25px 60px rgba(0, 0, 0, 0.95) !important;
    padding: 22px 26px !important;
}

.alignment-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.alignment-icon-badge {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(56, 189, 248, 0.15);
    border: 1px solid #38bdf8;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #38bdf8;
    font-size: 1.15rem;
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.35);
    flex-shrink: 0;
}

/* KPI Summary Grid */
.alignment-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin: 16px 0;
}

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

.alignment-kpi-card {
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    position: relative;
    overflow: hidden;
}

.alignment-kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, #38bdf8, transparent);
}

.alignment-kpi-card .kpi-label {
    font-size: 0.68rem;
    color: #94a3b8;
    font-family: 'Cinzel', serif;
    display: flex;
    align-items: center;
    gap: 6px;
}

.alignment-kpi-card .kpi-value {
    font-family: 'Fira Code', monospace;
    font-size: 1.4rem;
    font-weight: 700;
}

.text-accent { color: var(--accent); }
.text-success { color: #4ade80; }
.text-cyan { color: #38bdf8; }
.text-purple { color: #c084fc; }

.alignment-kpi-card .kpi-sub {
    font-size: 0.64rem;
    color: #64748b;
}

/* Alignment Action Toolbar */
.alignment-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    margin-bottom: 14px;
    flex-wrap: wrap;
    gap: 10px;
}

.alignment-toolbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.toolbar-hint {
    font-size: 0.74rem;
    color: #94a3b8;
}

.toolbar-hint code {
    background: rgba(0, 0, 0, 0.5);
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--accent);
}

.toolbar-count-badge {
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.35);
    color: #7dd3fc;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 12px;
    font-family: 'Fira Code', monospace;
}

.alignment-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.alignment-btn {
    font-family: 'Cinzel', serif;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.alignment-btn.export-csv {
    background: rgba(34, 197, 94, 0.15);
    border-color: rgba(34, 197, 94, 0.5);
    color: #86efac;
}

.alignment-btn.export-csv:hover {
    background: #22c55e;
    color: #000;
    box-shadow: 0 0 15px rgba(34, 197, 94, 0.6);
}

.alignment-btn.export-json {
    background: rgba(56, 189, 248, 0.15);
    border-color: rgba(56, 189, 248, 0.5);
    color: #7dd3fc;
}

.alignment-btn.export-json:hover {
    background: #38bdf8;
    color: #000;
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.6);
}

.alignment-btn.copy-report {
    background: rgba(212, 175, 55, 0.15);
    border-color: rgba(212, 175, 55, 0.5);
    color: #fef08a;
}

.alignment-btn.copy-report:hover {
    background: var(--accent);
    color: #000;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.6);
}

/* Alignment Table */
.alignment-table-wrapper {
    width: 100%;
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(10, 14, 23, 0.9);
}

.alignment-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.76rem;
    text-align: left;
}

.alignment-table th {
    background: rgba(15, 23, 42, 0.95);
    color: var(--accent);
    font-family: 'Cinzel', serif;
    font-size: 0.7rem;
    padding: 10px 12px;
    border-bottom: 1.5px solid rgba(212, 175, 55, 0.3);
    white-space: nowrap;
}

.alignment-table td {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    vertical-align: top;
}

.alignment-table tr:hover td {
    background: rgba(56, 189, 248, 0.04);
}

.eval-id-badge {
    font-family: 'Fira Code', monospace;
    font-size: 0.65rem;
    color: #94a3b8;
    display: block;
}

.eval-date {
    font-size: 0.68rem;
    color: #64748b;
}

.eval-input-box {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.eval-input-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.72rem;
}

.eval-input-item .lbl {
    color: #94a3b8;
    font-weight: 600;
    font-size: 0.65rem;
}

.eval-input-item .val {
    color: #f1f5f9;
}

.eval-directive-pill {
    background: rgba(212, 175, 55, 0.12);
    border: 1px solid rgba(212, 175, 55, 0.4);
    color: #fef08a;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 0.66rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 2px;
}

.eval-film-cell {
    display: flex;
    gap: 8px;
    align-items: center;
}

.eval-film-thumb {
    width: 36px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    flex-shrink: 0;
}

.eval-film-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.eval-film-title {
    font-family: 'Cinzel', serif;
    font-weight: 700;
    color: #fff;
    font-size: 0.82rem;
}

.eval-film-director {
    font-size: 0.68rem;
    color: #38bdf8;
}

.eval-scores-box {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 120px;
}

.score-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.66rem;
    font-family: 'Fira Code', monospace;
}

.score-bar-bg {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.score-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #38bdf8, var(--accent));
    border-radius: 2px;
}

.eval-reasoning-cell {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.eval-tag-list {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.eval-tag {
    font-size: 0.6rem;
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.4);
    color: #86efac;
    padding: 1px 5px;
    border-radius: 4px;
}

.eval-arbitration-text {
    font-size: 0.7rem;
    color: #cbd5e1;
    line-height: 1.3;
    font-style: italic;
}

/* ==========================================================================
   Raw Execution Logs Terminal Drawer
   ========================================================================== */

.trace-dev-toggle {
    margin-top: 20px;
    display: flex;
    justify-content: center;
}

.trace-terminal-btn {
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(56, 189, 248, 0.45);
    color: #38bdf8;
    font-family: 'Fira Code', monospace;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 8px 20px;
    border-radius: 20px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.18);
}

.trace-terminal-btn:hover {
    background: rgba(56, 189, 248, 0.15);
    border-color: #38bdf8;
    color: #fff;
    box-shadow: 0 0 25px rgba(56, 189, 248, 0.4);
    transform: translateY(-1px);
}

.trace-arrow-icon {
    transition: transform 0.3s ease;
}

.trace-arrow-icon.rotated {
    transform: rotate(180deg);
}

.trace-body {
    margin-top: 15px;
    transition: all 0.3s ease;
}

.trace-body.hidden {
    display: none !important;
}
