/* ═══════════════════════════════════════════════════════════════
   LLOS.ai — Conversations Dimension Styles
   Orange accent, chat-style layout, following inner-growth patterns
   ═══════════════════════════════════════════════════════════════ */

:root {
    --conv-orange: #ea580c;
    --conv-orange-light: #fb923c;
    --conv-orange-pale: #fff7ed;
    --conv-orange-deep: #c2410c;
    --conv-amber: #f59e0b;
    --conv-surface: rgba(255,255,255,0.85);
    --conv-cream: #FDFBF7;
    --conv-cream-warm: #faf6ef;
}

/* ═══ Hero: Warm Sunrise (darkened for WCAG AA text contrast) ═══ */
.hero-sunrise {
    background: linear-gradient(160deg, #431407 0%, #6c2710 25%, #7c2d12 50%, #9a3412 75%, #b45309 100%);
    position: relative;
    overflow: hidden;
}

.hero-sunrise::before {
    content: '';
    position: absolute;
    bottom: -20%;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 400px;
    background: radial-gradient(ellipse, rgba(251, 146, 60, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.hero-sunrise::after {
    content: '';
    position: absolute;
    top: 10%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.1) 0%, transparent 60%);
    pointer-events: none;
    animation: conv-drift 25s ease-in-out infinite;
}

@keyframes conv-drift {
    0%, 100% { transform: translate(0,0) scale(1); }
    50% { transform: translate(-30px, 20px) scale(1.1); }
}

/* Dot pattern overlay */
.hero-sunrise .dot-pattern {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255,255,255,0.06) 1px, transparent 1px);
    background-size: 32px 32px;
    pointer-events: none;
}

/* ═══ Warm Background Section ═══ */
.warm-section-orange {
    background:
        radial-gradient(ellipse at 20% 30%, rgba(234, 88, 12, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 70%, rgba(245, 158, 11, 0.04) 0%, transparent 50%),
        var(--conv-cream);
}

/* ═══ Quote Rotator ═══ */
.quote-rotator {
    min-height: 44px;
    position: relative;
}
.quote-slide {
    position: absolute;
    width: 100%;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}
.quote-slide.active {
    opacity: 1;
    transform: translateY(0);
}

/* ═══ Pathway Pills (Workflow Selectors in Hero) ═══ */
.pathway-pill {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 10px;
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.20);
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-decoration: none;
    color: rgba(255,255,255,0.95);
    flex-shrink: 0;
    min-width: 110px;
    text-align: center;
}

.pathway-pill:hover {
    background: rgba(255,255,255,0.22);
    border-color: rgba(255,255,255,0.6);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(234, 88, 12, 0.25);
    color: white;
}

.pathway-pill:active {
    transform: translateY(-2px) scale(0.98);
}

.pathway-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: transform 0.3s;
}

.pathway-pill:hover .pathway-icon {
    transform: scale(1.15);
}

.pathway-label {
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.2;
}

@media (max-width: 640px) {
    .pathway-pill { min-width: 90px; padding: 8px 6px; }
    .pathway-icon { width: 34px; height: 34px; font-size: 1.1rem; }
    .pathway-label { font-size: 0.625rem; }
}

/* ═══ Asset Cards (Scenario Cards on Landing) ═══ */
.asset-card {
    background: var(--conv-surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 1rem;
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow:
        0 4px 16px -2px rgba(0,0,0,0.06),
        0 2px 4px -1px rgba(0,0,0,0.04),
        inset 0 1px 0 rgba(255,255,255,0.6);
    padding: 1.25rem;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}

@media (max-width: 640px) {
    .asset-card { padding: 1rem; border-radius: 0.875rem; }
}

.asset-card::before {
    content: '';
    position: absolute;
    top: 12px; bottom: 12px; left: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--conv-orange), var(--conv-amber));
    border-radius: 0 3px 3px 0;
    opacity: 0;
    transform: scaleY(0.5);
    transition: all 0.3s ease;
}

.asset-card:hover::before { opacity: 1; transform: scaleY(1); }

.asset-card:hover {
    background: rgba(255,255,255,0.95);
    transform: translateY(-4px);
    box-shadow:
        0 12px 32px -4px rgba(234, 88, 12, 0.12),
        0 4px 12px -2px rgba(0,0,0,0.08);
    border-color: rgba(234, 88, 12, 0.3);
}

@media (min-width: 1024px) {
    .asset-card:hover {
        transform: translateY(-6px) scale(1.02);
        box-shadow: 0 20px 40px -8px rgba(234, 88, 12, 0.15), 0 8px 16px -4px rgba(0,0,0,0.1);
    }
}

.asset-card:active { transform: translateY(-2px) scale(0.98); transition-duration: 0.1s; }

.asset-card:hover .card-icon { transform: scale(1.1) rotate(-3deg); }

.card-icon {
    width: 56px; height: 56px;
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.75rem;
    flex-shrink: 0;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@media (max-width: 640px) {
    .card-icon { width: 44px; height: 44px; font-size: 1.375rem; border-radius: 10px; }
}

.card-link {
    color: var(--conv-orange);
    font-weight: 600;
    font-size: 0.8125rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.3rem 0.625rem;
    border-radius: 8px;
    transition: all 0.25s;
    background: rgba(255, 237, 213, 0.5);
}

.card-link:hover {
    color: var(--conv-orange-deep);
    background: rgba(255, 237, 213, 0.9);
    gap: 0.5rem;
}

/* ═══ Difficulty Badges ═══ */
.badge-beginner {
    background: #dcfce7; color: #166534;
    font-size: 0.6875rem; font-weight: 700;
    padding: 2px 8px; border-radius: 10px;
}
.badge-intermediate {
    background: #fef3c7; color: #92400e;
    font-size: 0.6875rem; font-weight: 700;
    padding: 2px 8px; border-radius: 10px;
}
.badge-advanced {
    background: #fce7f3; color: #9d174d;
    font-size: 0.6875rem; font-weight: 700;
    padding: 2px 8px; border-radius: 10px;
}

/* ═══ Category Color Accents ═══ */
.cat-blue     .card-icon { background: #eff6ff; color: #2563eb; }
.cat-amber    .card-icon { background: #fffbeb; color: #d97706; }
.cat-pink     .card-icon { background: #fdf2f8; color: #db2777; }
.cat-red      .card-icon { background: #fef2f2; color: #dc2626; }
.cat-green    .card-icon { background: #f0fdf4; color: #16a34a; }
.cat-cyan     .card-icon { background: #ecfeff; color: #0891b2; }
.cat-indigo   .card-icon { background: #eef2ff; color: #4f46e5; }
.cat-purple   .card-icon { background: #faf5ff; color: #9333ea; }

/* ═══ Coming Soon Cards ═══ */
.coming-card {
    background: linear-gradient(135deg, rgba(255,255,255,0.5) 0%, rgba(253,251,247,0.8) 100%);
    backdrop-filter: blur(8px);
    border: 2px dashed #cbd5e1;
    border-radius: 1rem;
    padding: 1.5rem;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.coming-card:hover {
    border-color: var(--conv-orange-light);
    box-shadow: 0 8px 24px rgba(234, 88, 12, 0.08);
}

.coming-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #fff7ed;
    color: #c2410c;
    font-size: 0.6875rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ═══ Profile Pills (Filter Bar) ═══ */
.profile-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 12px;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s;
    border: 1px solid #e2e8f0;
    background: white;
    color: #475569;
}

.profile-pill:hover {
    border-color: var(--conv-orange-light);
    color: var(--conv-orange);
    background: var(--conv-orange-pale);
}

.profile-pill.active {
    background: var(--conv-orange);
    color: white;
    border-color: var(--conv-orange);
    box-shadow: 0 4px 12px rgba(234, 88, 12, 0.25);
}

/* ═══ Category Filter Chips ═══ */
.cat-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s;
    border: 1px solid #e2e8f0;
    background: white;
    color: #64748b;
}

.cat-chip:hover {
    border-color: var(--conv-orange-light);
    background: #fff7ed;
}

.cat-chip.active {
    background: #fff7ed;
    border-color: var(--conv-orange);
    color: var(--conv-orange-deep);
}

/* ═══ Search Bar ═══ */
.conv-search {
    width: 100%;
    padding: 12px 16px 12px 44px;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    font-size: 0.9375rem;
    background: white;
    color: #0f172a;
    transition: all 0.3s;
    outline: none;
}

.conv-search:focus {
    border-color: var(--conv-orange);
    box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.1);
}

.conv-search::placeholder {
    color: #94a3b8;
}

/* ═══ Hero Search Bar (Very Prominent) ═══ */
.conv-search-hero {
    width: 100%;
    padding: 18px 24px 18px 56px;
    border: none;
    border-radius: 16px;
    font-size: 1.0625rem;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #0f172a;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    outline: none;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.2),
        0 2px 8px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

.conv-search-hero::placeholder {
    color: #64748b;
    font-weight: 400;
}

.conv-search-hero:focus {
    background: white;
    transform: translateY(-2px) scale(1.01);
    box-shadow: 
        0 12px 40px rgba(234, 88, 12, 0.25),
        0 4px 16px rgba(0, 0, 0, 0.2),
        0 0 0 4px rgba(234, 88, 12, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 1);
    border: 2px solid rgba(234, 88, 12, 0.3);
}

.conv-search-hero:hover:not(:focus) {
    background: white;
    box-shadow: 
        0 10px 36px rgba(0, 0, 0, 0.22),
        0 3px 10px rgba(0, 0, 0, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.95);
    transform: translateY(-1px);
}

@media (max-width: 640px) {
    .conv-search-hero {
        padding: 16px 20px 16px 52px;
        font-size: 1rem;
        border-radius: 14px;
    }
}

/* ═══ Collapsible Filters Section ═══ */
.filters-section {
    transition: all 0.3s;
}

.filter-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: white;
    color: #64748b;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s;
}

.filter-toggle-btn:hover {
    border-color: var(--conv-orange-light);
    color: var(--conv-orange);
    background: var(--conv-orange-pale);
}

.filter-toggle-btn[aria-expanded="true"] {
    border-color: var(--conv-orange);
    color: var(--conv-orange);
    background: var(--conv-orange-pale);
}

.filter-chevron {
    font-size: 0.75rem;
    transition: transform 0.3s ease;
}

.filters-panel {
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    max-height: 0;
    opacity: 0;
}

.filters-panel:not(.hidden) {
    max-height: 600px;
    opacity: 1;
}

/* ═══ Scroll to Top Button ═══ */
.scroll-to-top-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--conv-orange);
    color: white;
    border: none;
    box-shadow: 0 4px 16px rgba(234, 88, 12, 0.3);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    z-index: 30;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.scroll-to-top-btn.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top-btn:hover {
    background: var(--conv-orange-deep);
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 6px 20px rgba(234, 88, 12, 0.4);
}

.scroll-to-top-btn:active {
    transform: translateY(-2px) scale(1);
}

@media (max-width: 640px) {
    .scroll-to-top-btn {
        width: 44px;
        height: 44px;
        bottom: 20px;
        right: 20px;
        font-size: 1rem;
    }
}

/* ═══ Lazy Loading Placeholder ═══ */
.scenario-card-lazy {
    min-height: 280px;
    background: #f8fafc;
    border-radius: 1rem;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 0.875rem;
}

.scenario-card-lazy::before {
    content: '⏳';
    font-size: 1.5rem;
    display: block;
    margin-bottom: 8px;
}

/* ═══ FAQ Accordion ═══ */
.faq-item {
    transition: all 0.3s;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
}

.faq-item.open {
    border-color: rgba(234, 88, 12, 0.3);
    box-shadow: 0 4px 16px rgba(234, 88, 12, 0.08);
}

.faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9375rem;
    color: #1e293b;
    transition: color 0.2s;
    gap: 1rem;
}

.faq-question:hover { color: var(--conv-orange); }

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
    padding: 0 1.25rem;
    color: #475569;
    font-size: 0.875rem;
    line-height: 1.7;
}

.faq-item.open .faq-answer {
    max-height: 500px;
    padding: 0 1.25rem 1rem;
}

.faq-chevron {
    transition: transform 0.3s;
    color: #94a3b8;
    flex-shrink: 0;
}

.faq-item.open .faq-chevron { transform: rotate(180deg); color: var(--conv-orange); }

/* ═══ Status Banner ═══ */
.status-banner {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}

/* ═══════════════════════════════════════════════════════════════
   WIZARD — Step-by-step player layout
   ═══════════════════════════════════════════════════════════════ */

/* Container fills viewport below nav */
.wizard-container {
    height: calc(100vh - 56px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    max-width: 960px;
    margin: 0 auto;
}

/* ═══ Step Indicator ═══ */
.wizard-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 10px 24px 8px;
    background: white;
    border-bottom: 1px solid #f1f5f9;
    flex-shrink: 0;
}

.step-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0;
    font-weight: 700;
    background: #e2e8f0;
    color: #94a3b8;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    flex-shrink: 0;
}

.step-dot.active {
    background: var(--conv-orange);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(234, 88, 12, 0.3);
}

.step-dot.done {
    background: #dcfce7;
    color: #16a34a;
}

.step-dot.done::after {
    content: '\2713';
    font-weight: 900;
    font-size: 0.625rem;
}

.step-line {
    width: 24px;
    height: 2px;
    background: #e2e8f0;
    transition: background 0.3s;
    flex-shrink: 0;
}

.step-line.done {
    background: #86efac;
}

/* ═══ Wizard Steps ═══ */
.wizard-step {
    flex: 1;
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: wiz-fadeIn 0.35s ease;
}

.wizard-step.active {
    display: flex;
}

@keyframes wiz-fadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.step-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px 16px 12px;
}

/* Vertically center step 2/3/4 content */
.step-center-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.step-header {
    text-align: center;
    margin-bottom: 16px;
}

.step-header-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    margin: 0 auto 8px;
}

/* ═══ Step 1: Welcome ═══ */
.step-welcome {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.welcome-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--conv-orange);
    margin-bottom: 14px;
    box-shadow: 0 4px 16px rgba(234, 88, 12, 0.12);
}

.welcome-setting {
    display: inline-flex;
    align-items: center;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 6px 14px;
    font-size: 0.75rem;
    color: #64748b;
    margin-bottom: 8px;
}

.welcome-cultural {
    display: flex;
    align-items: flex-start;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 0.75rem;
    color: #92400e;
    text-align: left;
    max-width: 440px;
    line-height: 1.5;
    margin-bottom: 10px;
}

.welcome-info {
    display: flex;
    gap: 20px;
    margin-top: 4px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.info-label {
    font-size: 0.6875rem;
    color: #94a3b8;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.info-value {
    font-size: 0.9375rem;
    font-weight: 800;
    color: #1e293b;
}

/* ═══ Step 2: Workflow Cards ═══ */
.workflow-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin: 0 auto;
}

.workflow-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.workflow-card:hover {
    border-color: var(--conv-orange-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(234, 88, 12, 0.08);
}

.workflow-card.selected {
    border-color: var(--conv-orange);
    background: var(--conv-orange-pale);
    box-shadow: 0 4px 16px rgba(234, 88, 12, 0.15);
}

.wf-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.wf-info { flex: 1; }

.wf-title {
    font-size: 0.8125rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 1px;
}

.wf-desc {
    font-size: 0.6875rem;
    color: #64748b;
    line-height: 1.3;
}

.wf-check {
    font-size: 1.25rem;
    color: #e2e8f0;
    transition: all 0.25s;
    flex-shrink: 0;
}

.workflow-card.selected .wf-check {
    color: var(--conv-orange);
}

/* ═══ Steps 3 & 4: Character Casting Cards ═══ */
.casting-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin: 0 auto;
    width: 100%;
}

.cast-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.cast-card:hover {
    border-color: var(--conv-orange-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(234, 88, 12, 0.08);
}

.cast-card.selected {
    border-color: var(--conv-orange);
    background: var(--conv-orange-pale);
    box-shadow: 0 4px 16px rgba(234, 88, 12, 0.15);
}

.cast-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8125rem;
    font-weight: 800;
    flex-shrink: 0;
}

.cast-info { flex: 1; min-width: 0; }

.cast-name {
    font-size: 0.8125rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.3;
}

.cast-label {
    font-size: 0.625rem;
    color: var(--conv-orange);
    font-weight: 600;
    margin-left: 4px;
}

.cast-desc {
    font-size: 0.6875rem;
    color: #94a3b8;
    line-height: 1.3;
    margin-top: 2px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cast-speed {
    font-size: 0.625rem;
    font-weight: 600;
    color: #64748b;
    margin-top: 3px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.cast-check {
    font-size: 1.125rem;
    color: #e2e8f0;
    transition: all 0.25s;
    flex-shrink: 0;
}

.cast-card.selected .cast-check {
    color: var(--conv-orange);
}

/* ═══ Player Screen (completely separate from wizard) ═══ */
.player-screen {
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    background: #f8fafc;
    z-index: 40;
}

.player-screen.hidden { display: none; }

.player-toolbar {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    background: white;
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
    gap: 10px;
}

.player-back {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    border: none;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
    font-size: 0.8125rem;
}

.player-back:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.player-title-area {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.player-title {
    font-size: 0.8125rem;
    font-weight: 700;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-badge {
    font-size: 0.6875rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 6px;
    background: var(--conv-orange-pale);
    color: var(--conv-orange);
    white-space: nowrap;
    flex-shrink: 0;
}

/* Gear button (settings toggle) */
.toolbar-gear {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    border: none;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
    font-size: 0.8125rem;
}

.toolbar-gear:hover,
.toolbar-gear.active {
    background: var(--conv-orange-pale);
    color: var(--conv-orange);
}

/* ═══ Player Settings Panel ═══ */
.player-settings {
    background: #fafbfc;
    border-bottom: 1px solid #e2e8f0;
    padding: 10px 20px;
    flex-shrink: 0;
}

.player-settings.hidden { display: none; }

.settings-toggles {
    display: flex;
    justify-content: center;
    gap: 24px;
    padding-bottom: 10px;
}

.settings-vocab {
    border-top: 1px solid #e2e8f0;
    padding-top: 8px;
}

.settings-vocab-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    width: 100%;
    padding: 6px 0;
    background: none;
    border: none;
    cursor: pointer;
    color: #475569;
    font-size: 0.75rem;
    transition: color 0.2s;
}

.settings-vocab-btn:hover { color: var(--conv-orange); }

.vocab-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 8px 0 4px;
}

.vocab-item {
    background: white;
    border-radius: 8px;
    padding: 8px 10px;
    border: 1px solid #e2e8f0;
}

/* Toggle switches (shared) */
.toggle-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.6875rem;
    font-weight: 600;
    color: #64748b;
}

.toggle-switch {
    position: relative;
    width: 32px;
    height: 18px;
    background: #cbd5e1;
    border-radius: 9px;
    cursor: pointer;
    transition: background 0.2s;
}

.toggle-switch.on { background: var(--conv-orange); }

.toggle-switch.on::after { transform: translateX(14px); }

.toggle-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 14px;
    height: 14px;
    background: white;
    border-radius: 50%;
    transition: transform 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

/* ═══ Wizard Bottom Bar ═══ */
.wizard-nav {
    display: flex;
    align-items: center;
    padding: 10px 24px;
    background: white;
    border-top: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.wiz-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: none;
}

.wiz-back {
    background: #f1f5f9;
    color: #475569;
}

.wiz-back:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.wiz-back.hidden { display: none; }

.wiz-next {
    background: var(--conv-orange);
    color: white;
    box-shadow: 0 4px 12px rgba(234, 88, 12, 0.3);
}

.wiz-next:hover {
    background: var(--conv-orange-deep);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(234, 88, 12, 0.4);
}

.wiz-next:active {
    transform: translateY(0) scale(0.98);
}

/* ═══ Player Chat Area ═══ */
.player-chat {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.5rem;
    scroll-behavior: smooth;
    overscroll-behavior: contain;
}

.chat-bubble {
    max-width: 80%;
    margin-bottom: 1rem;
    animation: conv-fadeIn 0.3s ease;
}

@keyframes conv-fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.chat-bubble.speaker-a {
    margin-right: auto;
}

.chat-bubble.speaker-b {
    margin-left: auto;
}

.bubble-content {
    padding: 0.875rem 1rem;
    border-radius: 16px;
    position: relative;
    transition: box-shadow 0.3s;
}

.speaker-a .bubble-content {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-bottom-left-radius: 4px;
}

.speaker-b .bubble-content {
    background: #fdf2f8;
    border: 1px solid #fbcfe8;
    border-bottom-right-radius: 4px;
}

.bubble-content.speaking {
    box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.2);
}

.bubble-speaker {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.speaker-a .bubble-speaker { color: #2563eb; }
.speaker-b .bubble-speaker { color: #db2777; }

.bubble-primary {
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.5;
    color: #0f172a;
}

.bubble-translation {
    font-size: 0.8125rem;
    color: #64748b;
    margin-top: 4px;
    line-height: 1.4;
}

.bubble-romanized {
    font-size: 0.75rem;
    color: #94a3b8;
    font-style: italic;
    margin-top: 2px;
}

.bubble-actions {
    display: flex;
    gap: 6px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.bubble-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.6875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid #e2e8f0;
    background: white;
    color: #64748b;
}

.bubble-btn:hover {
    border-color: var(--conv-orange-light);
    color: var(--conv-orange);
    background: var(--conv-orange-pale);
}

.bubble-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ═══ Player Page — Notes Panel ═══ */
.notes-panel {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 12px;
    padding: 0.875rem;
    margin-top: 8px;
    font-size: 0.8125rem;
    line-height: 1.6;
    color: #78350f;
    display: none;
}

.notes-panel.open { display: block; }

.notes-label {
    font-weight: 700;
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #92400e;
    margin-bottom: 4px;
}

/* ═══ Player Controls (inside unified bottom bar) ═══ */
.control-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s;
    border: 1px solid #e2e8f0;
    background: white;
    color: #475569;
}

.control-btn:hover {
    border-color: var(--conv-orange-light);
    color: var(--conv-orange);
}

.control-btn.primary {
    background: var(--conv-orange);
    color: white;
    border-color: var(--conv-orange);
}

.control-btn.primary:hover {
    background: var(--conv-orange-deep);
    border-color: var(--conv-orange-deep);
}

.progress-bar {
    flex: 1;
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--conv-orange);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.75rem;
    color: #94a3b8;
    font-weight: 500;
    white-space: nowrap;
}

/* ═══ Player Controls (pinned to bottom of player-screen) ═══ */
.player-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: white;
    border-top: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.player-progress {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ═══ TTS Unavailable Banner ═══ */
.tts-banner {
    background: #fef3c7;
    border: 1px solid #fde68a;
    border-radius: 10px;
    padding: 8px 14px;
    font-size: 0.8125rem;
    color: #92400e;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tts-banner.hidden { display: none; }

/* ═══ Loading Overlay ═══ */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    transition: opacity 0.3s;
}

.loading-overlay.hidden {
    opacity: 0;
    pointer-events: none;
    z-index: -1;
    visibility: hidden;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e2e8f0;
    border-top-color: var(--conv-orange);
    border-radius: 50%;
    animation: conv-spin 0.8s linear infinite;
}

@keyframes conv-spin {
    to { transform: rotate(360deg); }
}

/* ═══ Desktop Overrides (≥768px) ═══ */
@media (min-width: 768px) {
    .step-content {
        padding: 24px 48px 16px;
    }
    .workflow-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
        max-width: 600px;
    }
    .casting-cards {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
}

/* ═══ Mobile Adjustments (<640px) ═══ */
@media (max-width: 640px) {
    .chat-bubble { max-width: 90%; }
    .player-chat { padding: 0.75rem 1rem; }
    .bubble-content { padding: 0.75rem; }
    .bubble-primary { font-size: 0.9375rem; }

    /* Wizard mobile */
    .wizard-steps { padding: 8px 12px 6px; }
    .step-dot { width: 16px; height: 16px; }
    .step-dot.done::after { font-size: 0.5rem; }
    .step-line { width: 16px; }
    .step-content { padding: 16px 20px 12px; }
    .step-header { margin-bottom: 12px; }
    .step-header-icon { width: 34px; height: 34px; font-size: 0.875rem; margin-bottom: 6px; }
    .welcome-icon { width: 48px; height: 48px; font-size: 1.25rem; margin-bottom: 10px; }
    .welcome-info { gap: 12px; }
    .info-icon { width: 30px; height: 30px; font-size: 0.75rem; }
    .info-value { font-size: 0.8125rem; }
    .info-label { font-size: 0.5625rem; }
    .wizard-nav { padding: 8px 16px; }
    .wiz-btn { padding: 8px 16px; font-size: 0.8125rem; }
    .workflow-card { padding: 10px 12px; gap: 10px; }
    .wf-icon { width: 32px; height: 32px; font-size: 0.875rem; }
    .wf-title { font-size: 0.75rem; }
    .wf-desc { font-size: 0.625rem; }
    .cast-avatar { width: 34px; height: 34px; font-size: 0.75rem; }
    .cast-card { padding: 8px 10px; gap: 8px; }
    .cast-name { font-size: 0.8125rem; }
    .cast-desc { font-size: 0.625rem; -webkit-line-clamp: 1; }
    .cast-speed { font-size: 0.5625rem; }

    /* Player mobile */
    .player-toolbar { padding: 6px 12px; }
    .player-back { width: 28px; height: 28px; font-size: 0.75rem; }
    .toolbar-gear { width: 28px; height: 28px; font-size: 0.75rem; }
    .player-settings { padding: 8px 12px; }
    .settings-toggles { gap: 16px; }
    .vocab-grid { grid-template-columns: 1fr; }
    .player-controls { padding: 8px 12px; gap: 6px; }
    .player-controls .control-btn { padding: 6px 12px; font-size: 0.75rem; }
}

/* ═══ Utilities ═══ */
.serif { font-family: 'Merriweather', serif; }
.hide-scroll::-webkit-scrollbar { display: none; }
.hide-scroll { -ms-overflow-style: none; scrollbar-width: none; }
