@font-face {
    font-family: 'ABC Arizona Flare';
    src: url('/fonts/ABCArizonaFlare-Regular-Trial.woff2') format('woff2'),
         url('/fonts/ABCArizonaFlare-Regular-Trial.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'ABC Arizona Flare Sans';
    src: url('/fonts/ABCArizonaSans-Regular-Trial.woff2') format('woff2'),
         url('/fonts/ABCArizonaSans-Regular-Trial.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

:root {
    --bg: #fdfbf7;
    --text: #342e29;
    --accent-red: #86312b;
    --accent-green: #344736;
    --border-color: #342e29;
    --font-serif: 'ABC Arizona Flare', serif;
    --font-sans: 'ABC Arizona Flare Sans', sans-serif;
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html, body {
    height: 100%;
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--text);
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
}

button, select {
    font-family: var(--font-serif);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 2px solid var(--border-color);
    background: var(--bg);
    color: var(--text);
    padding: 12px 20px;
    border-radius: 0;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: bold;
    outline: none;
    transition: all var(--transition-fast);
}

input {
    font-family: var(--font-sans);
    border: 2px solid var(--border-color);
    background: var(--bg);
    color: var(--text);
    padding: 12px 16px;
    border-radius: 0;
    font-size: 1rem;
    outline: none;
    transition: all var(--transition-fast);
}

button:hover {
    background: var(--text);
    color: var(--bg);
    transform: translateY(-1px);
}

button:active {
    transform: translateY(1px) scale(0.98);
}

button:disabled, input:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: none;
}

h1, h2, h3, h4 {
    font-family: var(--font-serif);
    font-weight: normal;
    letter-spacing: -0.02em;
}

.hidden {
    display: none !important;
}

/* Start Screen — Editorial Split */
.start-screen {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.start-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.start-hero {
    height: 60vh;
    width: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #1a1612;
    position: relative;
}

/* Optional overlay for the image */
.start-hero::after {
    display: none;
}

.start-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 6vh 8vw;
    background: var(--bg);
    position: relative;
}

.start-header-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 48px;
    animation: editorialFadeIn 1s cubic-bezier(0.2, 1, 0.3, 1) both;
}

@keyframes editorialFadeIn {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.start-title {
    font-size: clamp(3rem, 10vw, 5rem);
    line-height: 0.9;
    letter-spacing: -0.04em;
    color: var(--text);
    text-transform: uppercase;
}

.start-sub {
    font-family: var(--font-sans);
    font-size: 1.1rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    opacity: 0.6;
    font-weight: bold;
}

.start-actions {
    display: flex;
    flex-direction: column;
    gap: 0; /* Stack neatly with borders */
    max-width: 480px;
    animation: editorialFadeIn 1s cubic-bezier(0.2, 1, 0.3, 1) 0.2s both;
}

.name-input, .session-passcode {
    width: 100%;
    height: 64px;
    border: none;
    border-bottom: 1px solid rgba(52, 46, 41, 0.15);
    background: transparent;
    font-size: 1.1rem;
    padding: 0 16px;
}

.name-input:focus, .session-passcode:focus {
    border-bottom: 2px solid var(--text);
    background: rgba(0,0,0,0.02);
}

.btn-start {
    margin-top: 32px;
    height: 64px;
    background: var(--text);
    color: var(--bg);
    border: none;
    font-size: 0.9rem;
    letter-spacing: 0.2em;
    font-weight: bold;
}

.btn-start:hover {
    background: var(--accent-green);
    color: #fff;
}

.start-hint {
    margin-top: 40px;
    font-size: 0.75rem;
    opacity: 0.4;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    line-height: 1.6;
    max-width: 400px;
}

/* Help Icon — floating bottom right */
.help-fab {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #86312b;
    color: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-family: var(--font-serif);
    font-size: 0.95rem;
    font-weight: bold;
    flex-shrink: 0;
    transition: background 0.2s, transform 0.15s;
    box-shadow: none;
    position: static;
}

.help-fab:hover {
    background: #9e3430;
    transform: scale(1.1);
}

/* Help Modal */
.help-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 300;
    background: rgba(28, 22, 18, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.help-modal-overlay.open {
    opacity: 1;
    pointer-events: all;
}

.help-modal {
    background: var(--bg);
    border: 2px solid var(--border-color);
    max-width: 520px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    padding: 48px;
    position: relative;
    transform: translateY(16px);
    transition: transform 0.25s ease;
}

.help-modal-overlay.open .help-modal {
    transform: translateY(0);
}

.help-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: transparent;
    border: 1.5px solid var(--border-color);
    color: var(--text);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
}

.help-modal-close:hover {
    background: var(--text);
    color: var(--bg);
}

.help-modal h2 {
    font-size: 2rem;
    margin-bottom: 8px;
}

.help-modal-subtitle {
    font-family: var(--font-sans);
    font-size: 0.9rem;
    opacity: 0.6;
    margin-bottom: 32px;
    line-height: 1.5;
}

.guideline-item {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    align-items: flex-start;
}

.guideline-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    background: var(--accent-green);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.guideline-text h4 {
    font-size: 0.95rem;
    margin-bottom: 4px;
    letter-spacing: 0.02em;
}

.guideline-text p {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    opacity: 0.65;
    line-height: 1.5;
}

/* Present View */
.present-view {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    background: var(--bg);
}

.presentation-shell {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.presentation-stage {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

/* Topbar */
.topbar {
    display: flex;
    justify-content: space-between;
    padding: 16px 24px;
    border-bottom: 2px solid var(--border-color);
    background: var(--bg);
    z-index: 10;
    align-items: center;
}

.topbar-label {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 12px;
    border: 2px solid var(--border-color);
    padding: 6px 16px;
    background: #fff;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text);
    position: relative;
}

.status-dot.live { 
    background: #2ecc71; 
    box-shadow: 0 0 0 rgba(46, 204, 113, 0.4);
    animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(46, 204, 113, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(46, 204, 113, 0); }
}

.status-dot.paused { background: #f39c12; }

.status-dot.your-turn {
    background: var(--accent-green);
    animation: pulse-your-turn 1.5s ease-in-out infinite;
}

@keyframes pulse-your-turn {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.7; }
}

.status-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

#status-text {
    font-size: 0.85rem;
    font-weight: bold;
    text-transform: uppercase;
}

.status-detail {
    font-size: 0.7rem;
    opacity: 0.6;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.chat-fab {
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: #fff;
}

.chat-fab-count {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--accent-red);
    color: #fff;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.chat-fab-count.is-zero {
    display: none;
}

.slide-counter {
    font-variant-numeric: tabular-nums;
    font-weight: 500;
}

/* Slide Area */
.slide-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 0;
    position: relative;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.slide-container {
    width: 100%;
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

/* Rule of Thirds (Desktop) */
@media (min-width: 1025px) {
    .slide-container {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0;
        min-height: calc(100vh - 80px - 100px); /* Adjust for topbar and footer */
    }

    .slide-visual-shell {
        height: 100%;
        position: sticky;
        top: 0;
        border-bottom: none;
        border-right: 2px solid var(--border-color);
    }

    .slide-copy {
        min-height: 100%;
        padding: 80px 60px 120px 60px;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
}

.slide-visual-shell {
    flex: 1;
    min-height: 300px;
    border-bottom: 2px solid var(--border-color);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    background-color: #fff;
    transition: background-image 0.6s cubic-bezier(0.4, 0, 0.2, 1), filter 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.blur-up {
    filter: blur(20px);
}

.slide-copy {
    padding: 40px 32px;
    transition: all 0.4s ease;
    background: var(--bg);
    position: relative;
    padding-bottom: 120px; /* Space for footer */
}

.folio-bar {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 40px;
    border-bottom: 1px solid rgba(52, 46, 41, 0.1);
    padding-bottom: 12px;
    position: relative;
}

.folio-date, .folio-deck {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.5;
}

.folio-page {
    position: absolute;
    right: 0;
    top: 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.8;
    background: var(--text);
    color: var(--bg);
    padding: 2px 8px;
}

.slide-title {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    line-height: 1.05;
    margin-bottom: 32px;
}

.slide-content-flow {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.slide-subtitle {
    font-size: 1.5rem;
    line-height: 1.4;
    opacity: 0.9;
    font-family: var(--font-serif);
}

.full-transcription {
    font-size: 1.15rem;
    line-height: 1.8;
    opacity: 0.75;
    max-width: 600px;
}

/* Scrubber */
.scrubber-container {
    width: 100%;
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    background: var(--bg);
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
}

.scrubber-filmstrip {
    display: inline-flex;
    gap: 12px;
    padding-bottom: 4px;
}

.scrubber-thumb {
    width: 64px;
    height: 64px;
    border: 2px solid var(--border-color);
    background-size: cover;
    background-position: center;
    cursor: pointer;
    transition: all 0.2s ease;
    opacity: 0.4;
    flex-shrink: 0;
}

.scrubber-thumb:hover {
    opacity: 0.8;
    transform: translateY(-2px);
}

.scrubber-thumb.active {
    opacity: 1;
    border-color: var(--accent-red);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Subtitles / Transcript removed */

/* Presentation Footer */
.presentation-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end; /* Align to bottom so hints sit above */
    padding: 24px 32px;
    border-top: 1px solid var(--border-color);
    background: var(--bg);
    z-index: 10;
}

.footer-block {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-left {
    align-items: flex-start;
}

.footer-right {
    align-items: flex-end;
}

.footer-hint {
    font-family: var(--font-sans);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.4;
    font-weight: bold;
}

.footer-continue-btn {
    display: none;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--accent-green);
    color: #fff;
    border: 2px solid var(--accent-green);
    font-size: 0.8rem;
    font-family: var(--font-serif);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    cursor: pointer;
}

.footer-continue-btn.visible {
    display: flex;
}

.footer-continue-btn:hover {
    background: #2a3a2b;
    border-color: #2a3a2b;
    transform: none;
}

/* Immersive Dock */
.immersive-dock {
    display: flex;
    align-items: center;
    gap: 32px;
}

.dock-hint {
    display: flex;
    flex-direction: column;
}

.dock-label {
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
}

.dock-sub {
    font-size: 0.85rem;
    opacity: 0.6;
}

.interrupt-mic {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 24px;
    border-radius: 30px;
    background: var(--accent-red);
    color: #fff;
    border-color: var(--accent-red);
}

.interrupt-mic:hover {
    background: var(--text);
    border-color: var(--text);
}

.interrupt-mic.listening {
    background: var(--text);
    border-color: var(--text);
    animation: pulse-red-bg 2s infinite;
}

@keyframes pulse-red-bg {
    0% { box-shadow: 0 0 0 0 rgba(134, 49, 43, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(134, 49, 43, 0); }
    100% { box-shadow: 0 0 0 0 rgba(134, 49, 43, 0); }
}

/* Waveform */
.waveform {
    height: 80px;
    width: 100%;
    border-top: 1px solid var(--border-color);
    background: #fff;
}

/* Dialogue / Q&A Panel — Editorial Style */
.qa-panel {
    position: fixed;
    right: 0;
    top: 0;
    bottom: 0;
    width: 480px;
    background: var(--bg);
    border-left: 1px solid rgba(52, 46, 41, 0.1);
    z-index: 500;
    transform: translateX(0);
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: -40px 0 100px rgba(52, 46, 41, 0.08);
}

.qa-panel.hidden {
    transform: translateX(100%);
}

.qa-panel-inner {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.qa-header {
    padding: 48px 40px 32px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.qa-eyebrow {
    display: block;
    font-family: var(--font-sans);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-weight: bold;
    opacity: 0.4;
    margin-bottom: 8px;
}

.qa-display-title {
    font-size: 2.5rem;
    line-height: 1;
}

.qa-header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.qa-status-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(52, 46, 41, 0.05);
    padding: 6px 14px;
    border-radius: 20px;
    font-family: 'JetBrains Mono', monospace;
}

.qa-count {
    font-weight: bold;
    font-size: 0.85rem;
}

.qa-pill-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    opacity: 0.5;
}

.qa-close-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(52, 46, 41, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    cursor: pointer;
    transition: all 0.2s ease;
}

.qa-close-circle:hover {
    background: var(--text);
    color: var(--bg);
}

.qa-content-area {
    flex: 1;
    overflow-y: auto;
    padding: 0 40px;
    margin-bottom: 120px; /* Space for sticky footer */
}

.qa-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Question Cards */
.qa-card {
    padding: 24px;
    background: #fff;
    border: 1px solid rgba(52, 46, 41, 0.08);
    position: relative;
    animation: editorialFadeIn 0.8s cubic-bezier(0.2, 1, 0.3, 1) both;
}

.qa-card.is-answered {
    border-left: 4px solid var(--accent-green);
}

.qa-card-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 16px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    text-transform: uppercase;
    opacity: 0.4;
}

.qa-card-question {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    line-height: 1.4;
    color: var(--text);
}

.qa-card-answer {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px dashed rgba(52, 46, 41, 0.1);
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.6;
    opacity: 0.8;
}

.qa-empty-state {
    padding: 60px 0;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.qa-empty-state p {
    font-size: 1rem;
    line-height: 1.6;
    opacity: 0.4;
    max-width: 280px;
}

/* Q&A Footer / Input Area */
.qa-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 32px 40px 48px;
    background: linear-gradient(to top, var(--bg) 80%, rgba(253, 251, 247, 0) 100%);
}

.qa-input-container {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    background: #fff;
    padding: 8px 8px 8px 20px;
    border: 1px solid rgba(52, 46, 41, 0.1);
    box-shadow: 0 10px 30px rgba(52, 46, 41, 0.05);
}

.qa-textarea {
    flex: 1;
    border: none;
    background: transparent;
    padding: 12px 0;
    font-family: var(--font-sans);
    font-size: 1rem;
    resize: none;
    max-height: 120px;
    color: var(--text);
}

.qa-textarea:focus {
    outline: none;
}

.qa-send-btn {
    width: 48px;
    height: 48px;
    background: var(--text);
    color: var(--bg);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.qa-send-btn:hover {
    background: var(--accent-green);
    color: #fff;
}

.qa-input-hint {
    margin-top: 12px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.3;
    font-weight: bold;
}

@media (max-width: 720px) {
    .qa-panel {
        width: 100%;
        border-left: none;
    }

    .qa-header {
        padding: 24px 20px 20px;
        align-items: center;
    }

    .qa-display-title {
        font-size: 1.8rem;
    }

    .qa-header-actions {
        gap: 12px;
    }

    .qa-close-circle {
        width: 36px;
        height: 36px;
    }

    .qa-content-area {
        padding: 0 20px;
    }

    .qa-footer {
        padding: 20px 20px 24px;
    }
}

/* Reactions */
.reaction-bar {
    display: flex;
    flex-direction: row;
    gap: 12px;
    z-index: 20;
}

.reaction-btn {
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    color: var(--text);
    transition: all 0.2s ease;
    font-size: 1.4rem;
}

.reaction-btn:hover {
    transform: translateY(-4px) scale(1.1);
}

.reaction-clap:hover { background: #344736; }
.reaction-heart:hover { background: #86312b; }
.reaction-idea:hover { background: #ffc083; }

.reaction-btn:active {
    transform: scale(0.9);
}

.floating-reaction {
    position: absolute;
    bottom: 20px;
    pointer-events: none;
    z-index: 100;
    user-select: none;
    will-change: transform, opacity;
}

@keyframes float-and-fade {
    0% {
        transform: translate(0, 0) rotate(0deg) scale(1);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    100% {
        transform: translate(var(--drift), -250px) rotate(var(--rotation)) scale(var(--scale));
        opacity: 0;
    }
}

.input-with-clear {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-clear.flex-1 {
    flex: 1;
}

.input-clear-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(0,0,0,0.05);
    border: none;
    color: var(--text);
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    opacity: 0.6;
    transition: all 0.2s ease;
    z-index: 5;
}

.input-clear-btn:hover {
    background: rgba(0,0,0,0.1);
    opacity: 1;
}

.qa-textarea + .input-clear-btn {
    top: 24px; /* Adjust for textarea */
}
    justify-content: center;
    gap: 16px;
    border-radius: 0;
    font-size: 1rem;
    min-width: 240px;
}

.slide-turn-mic {
    background: var(--accent-red);
    color: #fff;
    border-color: var(--accent-red);
}

.slide-turn-continue {
    background: var(--bg);
    color: var(--text);
    border-color: var(--border-color);
}

.slide-turn-qa {
    border-top: 1px solid #eee;
    padding-top: 40px;
}

.slide-turn-input-row {
    display: flex;
    gap: 12px;
    max-width: 500px;
    margin: 0 auto;
}

.slide-turn-input {
    flex: 1;
    height: 56px;
    background: #f9f9f9;
}

.slide-turn-send {
    width: 56px;
    height: 56px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-red);
    color: #fff;
    border-color: var(--accent-red);
}

.slide-turn-send:hover {
    background: var(--text);
    border-color: var(--text);
}

/* Modal UI */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(52, 46, 41, 0.85);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 24px;
}

.modal-card {
    background: var(--bg);
    border: 3px solid var(--border-color);
    padding: 48px;
    max-width: 500px;
    width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.modal-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}

.modal-icon.alert {
    background: #fff0f0;
    color: var(--accent-red);
    border: 2px solid var(--accent-red);
}

.modal-card h2 {
    font-size: 2.2rem;
    line-height: 1.1;
}

.modal-card p {
    font-size: 1.1rem;
    line-height: 1.6;
    opacity: 0.8;
}

.modal-actions {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    margin-top: 12px;
}

.btn-text {
    background: transparent;
    border-color: transparent;
    text-decoration: underline;
    font-size: 0.8rem;
    opacity: 0.6;
}

.btn-text:hover {
    background: transparent;
    color: var(--text);
    opacity: 1;
}

/* Completion Overlay */
.completion-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    text-align: center;
    padding: 20px;
    overflow-y: auto;
}

.completion-content {
    border: 3px solid var(--border-color);
    padding: 80px 40px;
    max-width: 800px;
    width: 100%;
    background: #fff;
    margin: auto;
}

@media (max-width: 960px) {
    .completion-content {
        padding: 48px 28px;
    }
}

.completion-cta {
    margin: 40px 0 32px;
}

.cta-blocks {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cta-block {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 2px solid var(--border-color);
    padding: 16px 20px;
    text-decoration: none;
    color: var(--text);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: left;
}

.cta-block:hover {
    background: var(--accent-green);
    border-color: var(--accent-green);
    color: #fff;
    transform: translateX(4px);
}

.cta-block-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.cta-block-icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cta-block-icon svg {
    width: 20px;
    height: 20px;
}

.cta-block-label {
    font-family: var(--font-serif);
    font-size: 1rem;
    font-weight: normal;
    letter-spacing: 0.02em;
}

.cta-block-arrow {
    opacity: 0.4;
    transition: opacity 0.2s, transform 0.2s;
}

.cta-block:hover .cta-block-arrow {
    opacity: 1;
    transform: translateX(4px);
}

/* Mobile UI Refinement */
@media (max-width: 720px) {
    .start-content {
        padding: 48px 32px;
        max-width: 100%;
    }

    .start-title {
        font-size: clamp(2.8rem, 12vw, 4rem);
    }

    .start-sub {
        font-size: 1rem;
        margin-bottom: 36px;
    }

    .start-actions {
        gap: 12px;
    }

    .name-input, .session-passcode, .btn-start {
        height: 56px;
    }

    .help-modal {
        padding: 36px 28px;
    }

    .help-modal h2 {
        font-size: 1.6rem;
    }

    .topbar {
        padding: 12px 16px;
    }

    .topbar-right {
        gap: 12px;
    }

    .help-fab {
        width: 28px;
        height: 28px;
        font-size: 0.85rem;
    }

    .topbar-label {
        font-size: 1rem;
    }

    .topbar-center {
        display: none;
    }

    .slide-main {
        padding: 0;
        display: flex;
        flex-direction: column;
        overflow-x: hidden;
    }

    .slide-container {
        display: flex;
        flex-direction: column;
    }

    .slide-visual-shell {
        flex: none;
        height: auto;
        min-height: 250px;
        max-height: 50vh;
        aspect-ratio: 16/9;
        border-bottom: 2px solid var(--border-color);
    }

    .slide-copy {
        flex: 1;
        padding: 40px 24px 160px 24px;
        background: var(--bg);
    }

    .slide-title {
        font-size: 2.5rem;
        line-height: 1.1;
        margin-bottom: 20px;
    }

    .slide-subtitle {
        font-size: 1.2rem;
        line-height: 1.5;
        margin-bottom: 24px;
    }

    .presentation-footer {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: var(--bg);
        z-index: 100;
        border-top: 1px solid var(--border-color);
        padding: 24px 20px;
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 12px;
    }

    .reaction-btn {
        width: 44px;
        height: 44px;
    }

    .interrupt-mic {
        padding: 10px 16px;
    }

    .interrupt-label {
        display: none;
    }

    .footer-hint {
        display: none;
    }

    .slide-turn-card {
        padding: 48px 24px;
        gap: 32px;
    }

    .slide-turn-title {
        font-size: 2.8rem;
    }

    .slide-turn-actions {
        flex-direction: column;
        gap: 12px;
    }

    .slide-turn-mic, .slide-turn-continue {
        width: 100%;
        min-width: 0;
    }

    .qa-panel {
        width: 100%;
        border-left: none;
        box-shadow: none;
    }

    .qa-panel.hidden {
        transform: translateX(100%);
    }

    .slide-copy {
        padding: 32px 20px 140px 20px;
    }

    .slide-title {
        font-size: 2rem;
    }

    .slide-subtitle {
        font-size: 1rem;
    }

    .full-transcription {
        font-size: 0.95rem;
    }
}

/* Polls and Wrap Up Results */
.wrapup-panel {
    margin-top: 40px;
    text-align: left;
}

.wrapup-actions {
    margin: 32px 0;
    display: flex;
    justify-content: center;
}

.wrapup-mic {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 32px;
    background: var(--accent-red);
    color: #fff;
    border: none;
    border-radius: 40px;
    cursor: pointer;
    font-family: var(--font-serif);
    font-size: 1.1rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 30px rgba(134, 49, 43, 0.3);
}

.wrapup-mic:hover {
    background: var(--text);
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
}

.wrapup-mic.listening {
    background: var(--text);
    animation: pulse-red-bg 2s infinite;
}

.wrapup-mic-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.wrapup-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 16px;
}

.wrapup-eyebrow {
    display: block;
    text-transform: uppercase;
    font-weight: bold;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    margin-bottom: 4px;
}

.wrapup-timer {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.5rem;
    font-weight: bold;
}

.wrapup-card {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.wrapup-card-meta {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.55;
}

.wrapup-card-title {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    margin-bottom: 8px;
}

.wrapup-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.wrapup-option {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    background: #fdfbf7;
    border: 2px solid var(--border-color);
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    position: relative;
    overflow: hidden;
    gap: 12px;
    width: 100%;
}

.wrapup-option.is-selected {
    background: #fff;
    box-shadow: inset 0 0 0 1px var(--border-color);
    border-width: 3px;
}

.wrapup-option:disabled {
    opacity: 1;
    cursor: default;
}

.option-text {
    font-family: var(--font-sans);
    font-weight: bold;
    font-size: 1rem;
    z-index: 1;
}

.wrapup-card-actions {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.wrapup-submit-note {
    font-family: var(--font-sans);
    font-size: 0.95rem;
    opacity: 0.7;
}

.wrapup-slider-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #eee;
}

.wrapup-nav-btn {
    padding: 8px 16px;
    min-width: 80px;
}

.wrapup-progress {
    font-weight: bold;
    font-family: 'JetBrains Mono', monospace;
}

.story-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 32px;
    background: #344736;
    color: #fff;
    border: none;
    font-family: 'ABC Arizona Flare', serif;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.story-btn:hover {
    background: #342e29;
    transform: translateY(-2px);
}

@media (max-width: 720px) {
    .completion-overlay {
        padding: 12px;
        align-items: flex-start;
    }

    .completion-content {
        padding: 32px 20px;
        max-height: 90vh;
        overflow-y: auto;
    }

    .completion-content h2 {
        font-size: 1.8rem;
    }

    .wrapup-panel {
        margin-top: 24px;
    }

    .wrapup-header {
        flex-direction: column;
        gap: 8px;
    }

    .wrapup-timer {
        font-size: 1.2rem;
    }

    .wrapup-card-title {
        font-size: 1.1rem;
    }

    .wrapup-option {
        padding: 12px;
    }

    .wrapup-slider-nav {
        margin-top: 20px;
        padding-top: 16px;
    }

    .cta-blocks {
        gap: 8px;
    }

    .cta-block {
        padding: 14px 16px;
    }

    .cta-block-label {
        font-size: 0.9rem;
    }
}
