/* ==================== DEBATE MINIGAME V2 STYLES ==================== */
/* Scoped to #debateMinigameView inside the main election game.
   Global body/reset rules from the standalone version intentionally removed. */

/* ── Break the debate out of the normal .game-container 1800px cap so the
   stage fills the full browser window. The screen is positioned to the
   viewport edges (negative left/width trick), and the inner stage stretches
   to fill all of it. ── */
#debateScreen.screen.active {
    position: relative;
    left: 50%;
    right: 50%;
    width: 100vw;
    margin-left: -50vw;
    margin-right: -50vw;
    padding: 0;
    /* Restore default vertical rhythm even though we're full-bleed */
    min-height: calc(100vh - 80px);
}

#debateMinigameView {
    width: 100%;
    height: calc(100vh - 80px);
    min-height: 600px;
}

#debateMinigameView .debate-container {
    width: 100%;
    height: 100%;
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: stretch;
    justify-content: stretch;
    background: #0a0a0a;
    color: #fff;
}
#debateMinigameView .debate-container *,
#debateMinigameView .debate-container *::before,
#debateMinigameView .debate-container *::after {
    box-sizing: border-box;
}
#debateMinigameView .debate-stage {
    position: relative;
    width: 100%;
    height: 100%;
    /* Override the legacy 900px max-width set on .debate-stage in style.css */
    max-width: none;
    margin: 0;
    padding: 0;
    background: #000;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
/* ── PHOTOGRAPHIC STAGE BACKDROP ── */
#debateMinigameView .stage-photo {
    position: absolute;
    inset: 0;
    background-image: url('../images/Debate Background.png');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    z-index: 0;
    pointer-events: none;
}
/* ── AUDIENCE / SPOTLIGHTS (legacy hand-drawn decorations, now hidden — backdrop photo handles this) ── */
#debateMinigameView .debate-audience, #debateMinigameView .debate-spotlights { display: none; }
/* ── SPOTLIGHTS ── */
#debateMinigameView .debate-spotlights {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 250px;
    pointer-events: none;
    z-index: 1;
}
#debateMinigameView .spotlight {
    position: absolute;
    top: -60px;
    width: 200px;
    height: 300px;
    border-radius: 0 0 50% 50%;
    opacity: 0.08;
}
#debateMinigameView .spotlight-left {
    left: 5%;
    background: radial-gradient(ellipse at center, #ffe08a 0%, transparent 70%);
}
#debateMinigameView .spotlight-center {
    left: 50%;
    transform: translateX(-50%);
    width: 280px;
    background: radial-gradient(ellipse at center, #fff4c4 0%, transparent 70%);
    opacity: 0.15;
}
#debateMinigameView .spotlight-right {
    right: 5%;
    background: radial-gradient(ellipse at center, #ffe08a 0%, transparent 70%);
}
/* ── CANDIDATES ROW (podium images placed on the photographic stage) ── */
#debateMinigameView .candidates-row {
    /* Cover the full stage; individual candidates are absolutely positioned
       within this layer so they line up with the stage floor in the photo. */
    position: absolute;
    inset: 0;
    z-index: 10;
    pointer-events: none;
}
#debateMinigameView .candidates-container {
    position: absolute;
    inset: 0;
}
/*
 * Each candidate is a wrapper that holds a podium PNG. Candidates are absolutely
 * positioned by the engine using `left: <pct>%` along the stage floor; their feet
 * sit just behind the curved railing in the backdrop photo.
 */
#debateMinigameView .candidate-logo {
    position: absolute;
    bottom: 28%;        /* feet just above the front railing of the stage */
    transform: translateX(-50%);
    height: 38%;        /* full body height — about a third of the stage */
    width: auto;
    background: transparent;
    border: none;
    border-radius: 0;
    display: block;
    cursor: pointer;
    transition: filter 0.2s ease, transform 0.2s ease;
    overflow: visible;
    pointer-events: auto;
    /* Soft ground-contact shadow on the stage */
    filter: drop-shadow(0 14px 8px rgba(0, 0, 0, 0.55));
}
#debateMinigameView .candidate-logo .candidate-portrait {
    height: 100%;
    width: auto;
    display: block;
    pointer-events: none;
    /* Subtle stage lighting on the podium silhouettes */
    filter: brightness(0.95) contrast(1.05);
}
#debateMinigameView .candidate-logo:hover {
    filter: drop-shadow(0 14px 10px rgba(255, 220, 150, 0.35))
            drop-shadow(0 0 0 rgba(0,0,0,0));
    transform: translateX(-50%) translateY(-2px);
}
#debateMinigameView .candidate-logo.player .candidate-portrait {
    filter: brightness(1.05) contrast(1.05) drop-shadow(0 0 12px rgba(77, 166, 255, 0.55));
}
#debateMinigameView .candidate-logo.speaking .candidate-portrait {
    filter: brightness(1.1) contrast(1.05) drop-shadow(0 0 16px rgba(255, 204, 0, 0.7));
}
#debateMinigameView .candidate-logo.attackable .candidate-portrait {
    filter: brightness(1.05) drop-shadow(0 0 14px rgba(255, 80, 80, 0.85));
    animation: attackablePulse 1.1s ease-in-out infinite;
}

@keyframes attackablePulse {
    0%, 100% { filter: brightness(1.05) drop-shadow(0 0 10px rgba(255, 80, 80, 0.55)); }
    50%      { filter: brightness(1.15) drop-shadow(0 0 22px rgba(255, 80, 80, 1)); }
}
#debateMinigameView .candidate-name-label {
    position: absolute;
    bottom: -22px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.95), 0 0 6px rgba(0, 0, 0, 0.8);
    letter-spacing: 0.3px;
}
/* ── SVG LINES (static candidate→moderator lines removed; the #debateLines
   layer is kept only as a coordinate space if ever needed again) ── */
#debateMinigameView .debate-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}
/* ── PLAYER AREA (sits on top of the moderator desk in the photo) ── */
#debateMinigameView .player-area {
    position: absolute;
    bottom: 4%;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 20;
    width: min(1400px, 92%);
}
#debateMinigameView .player-logo-container {
    display: none; /* center player portrait omitted; backdrop has the silhouettes */
}
#debateMinigameView .player-options-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    align-items: stretch;
    min-height: 45px;
}
#debateMinigameView .option-button {
    padding: 10px 18px;
    background: rgba(77, 166, 255, 0.2);
    border: 2px solid #4da6ff;
    color: #fff;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s ease;
    white-space: nowrap;
    text-align: center;
    line-height: 1.25;
}
/* ── Three button display modes for player answers ──
   .mode-name-only   : compact pill, just the policy name (skill > 75 OR
                       prepared & skill > 50). Default look above.
   .mode-quote-only  : full canned quote, no headline (skill < 50). Wider,
                       softer, italic so it reads like a teleprompter line.
   .mode-name-and-quote : policy headline on top, small quote below as a hint
                       (50 ≤ skill ≤ 75 for unprepared candidates).
*/
#debateMinigameView .option-button.mode-quote-only,
#debateMinigameView .option-button.mode-name-and-quote {
    white-space: normal;          /* allow the quote to wrap */
    border-radius: 14px;
    padding: 10px 16px;
    max-width: 320px;
    min-width: 200px;
    text-align: center;
    flex: 1 1 240px;
}
#debateMinigameView .option-button.mode-quote-only {
    font-style: italic;
    font-weight: 500;
    font-size: 0.92rem;
}
#debateMinigameView .option-button.mode-name-and-quote .option-name {
    font-weight: 800;
    font-size: 0.95rem;
    letter-spacing: 0.4px;
    margin-bottom: 4px;
    color: #fff;
    text-transform: uppercase;
}
#debateMinigameView .option-button.mode-name-and-quote .option-quote {
    font-style: italic;
    font-weight: 500;
    font-size: 0.82rem;
    opacity: 0.92;
    line-height: 1.25;
}
#debateMinigameView .option-button:hover {
    background: rgba(77, 166, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(77, 166, 255, 0.3);
}
#debateMinigameView .option-button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
/* Briefing-book recommendation: when a prepared candidate's advisor has
   identified the strongest answer(s) for this question, those buttons glow
   gold so the player sees the call without losing the choice. */
#debateMinigameView .option-button.recommended {
    background: rgba(255, 200, 80, 0.22);
    border-color: #ffc850;
    color: #fff5d6;
    box-shadow: 0 0 14px rgba(255, 200, 80, 0.55),
                inset 0 0 10px rgba(255, 200, 80, 0.18);
    animation: recommendedPulse 1.6s ease-in-out infinite;
}
#debateMinigameView .option-button.recommended:hover {
    background: rgba(255, 200, 80, 0.38);
    box-shadow: 0 4px 18px rgba(255, 200, 80, 0.55);
}
@keyframes recommendedPulse {
    0%, 100% { box-shadow: 0 0 12px rgba(255, 200, 80, 0.45),
                            inset 0 0 8px rgba(255, 200, 80, 0.15); }
    50%      { box-shadow: 0 0 22px rgba(255, 220, 130, 0.85),
                            inset 0 0 14px rgba(255, 220, 130, 0.28); }
}
#debateMinigameView .attack-button {
    padding: 10px 18px;
    background: rgba(220, 53, 69, 0.2);
    border: 2px solid #dc3545;
    color: #ff6b6b;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 700;
    transition: all 0.2s ease;
    text-align: center;
    line-height: 1.25;
}
/* Same three display modes as policy-answer buttons. */
#debateMinigameView .attack-button.mode-quote-only,
#debateMinigameView .attack-button.mode-name-and-quote {
    white-space: normal;
    border-radius: 14px;
    padding: 10px 16px;
    max-width: 320px;
    min-width: 200px;
    flex: 1 1 240px;
}
#debateMinigameView .attack-button.mode-quote-only {
    font-style: italic;
    font-weight: 600;
    font-size: 0.92rem;
    color: #ffd1d1;
}
#debateMinigameView .attack-button.mode-name-and-quote .option-name {
    font-weight: 800;
    font-size: 0.95rem;
    letter-spacing: 0.4px;
    margin-bottom: 4px;
    color: #ff8a8a;
    text-transform: uppercase;
}
#debateMinigameView .attack-button.mode-name-and-quote .option-quote {
    font-style: italic;
    font-weight: 500;
    font-size: 0.82rem;
    opacity: 0.95;
    line-height: 1.25;
    color: #ffd1d1;
}
#debateMinigameView .attack-button:hover {
    background: rgba(220, 53, 69, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}
#debateMinigameView .attack-button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
/* ── MODERATOR'S RAILING (invisible target where debate lines terminate) ── */
#debateMinigameView .moderator-area {
    position: absolute;
    inset: 0;
    text-align: center;
    z-index: 15;
    pointer-events: none;
}
/*
 * `.moderator-rim` is positioned over the front edge of the moderator's desk
 * railing in the backdrop photo. It's not visually drawn — the engine reads its
 * bounding box to compute where each candidate's debate line should terminate.
 * Tweak top/left/right/height if the backdrop image is swapped.
 */
#debateMinigameView .moderator-rim {
    position: absolute;
    /* The bright railing strip across the top of the moderator desk in the
       photo sits roughly 80% of the way down, spanning ~20%–80% horizontally. */
    left: 20%;
    right: 20%;
    top: 79%;
    height: 1px;
    background: transparent;
    pointer-events: none;
}
/* Hide legacy decorative pieces from the previous iteration */
#debateMinigameView .moderator-desk, #debateMinigameView .moderator-silhouettes, #debateMinigameView .silhouette, #debateMinigameView .moderator-icon { display: none; }
#debateMinigameView .moderator-speech {
    position: absolute;
    bottom: 18px;
    left: 0;
    right: 0;
    font-size: 0.85rem;
    color: #d8e2f5;
    font-style: italic;
    min-height: 20px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.95);
    pointer-events: none;
}
/* ── TEXT BUBBLES ── */
#debateMinigameView .bubbles-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 25;
    pointer-events: none;
}
#debateMinigameView .debate-bubble {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 18px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: pre-wrap;
    word-wrap: break-word;
    max-width: 180px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    pointer-events: none;
    transform: translate(-50%, -50%);
    animation: bubbleAppear 0.3s ease-out;
}
#debateMinigameView .debate-bubble.question {
    background: rgba(255, 200, 100, 0.9);
    color: #000;
    border: 2px solid #ffb300;
}
#debateMinigameView .debate-bubble.answer {
    background: rgba(100, 200, 100, 0.9);
    color: #fff;
    border: 2px solid #4caf50;
}
#debateMinigameView .debate-bubble.attack {
    background: rgba(220, 80, 80, 0.9);
    color: #fff;
    border: 2px solid #dc3545;
}

@keyframes bubbleAppear {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}
/* ── DEBATE INFO ── */
#debateMinigameView .debate-info {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 30;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
#debateMinigameView .round-info {
    font-size: 1rem;
    font-weight: 700;
    color: #ffb300;
}
#debateMinigameView .timer-info {
    display: flex;
    gap: 10px;
    align-items: center;
}
#debateMinigameView .round-timer {
    font-size: 1.2rem;
    font-weight: 700;
    color: #4da6ff;
    font-family: 'Courier New', monospace;
    min-width: 60px;
}
/* ── RESULTS SCREEN ── */
#debateMinigameView .debate-results {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}
#debateMinigameView .debate-results.hidden {
    display: none;
}
#debateMinigameView .results-panel {
    background: linear-gradient(180deg, #1a2438, #0f1419);
    border: 2px solid #4da6ff;
    border-radius: 15px;
    padding: 40px;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    text-align: center;
}
#debateMinigameView .results-panel h2 {
    font-size: 2rem;
    color: #ffb300;
    margin-bottom: 30px;
}
#debateMinigameView .results-list {
    margin-bottom: 30px;
    text-align: left;
}
#debateMinigameView .result-item {
    background: rgba(77, 166, 255, 0.1);
    border-left: 3px solid #4da6ff;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 5px;
    font-size: 0.9rem;
}
#debateMinigameView .result-item-name {
    font-weight: 700;
    color: #4da6ff;
    margin-bottom: 5px;
}
#debateMinigameView .result-item-stat {
    color: #aaa;
    margin: 3px 0;
    font-size: 0.85rem;
}
#debateMinigameView .btn-primary {
    padding: 12px 30px;
    background: linear-gradient(135deg, #4da6ff, #2a7eda);
    border: none;
    color: #fff;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}
#debateMinigameView .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(77, 166, 255, 0.4);
}
/* ── TARGET SELECTION MODE ── */
#debateMinigameView .candidate-logo.selectable-target {
    cursor: crosshair;
    border-color: #ff6b6b;
}
#debateMinigameView .candidate-logo.selectable-target:hover {
    border-color: #ff6b6b;
    box-shadow: 0 0 20px rgba(220, 53, 69, 0.6);
}

/* ── RESPONSIVE ── */
@media (max-width: 1200px) {
    #debateMinigameView .candidates-container {
        gap: 25px;
    }
    
    #debateMinigameView .candidate-logo {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
}

@media (max-width: 768px) {
    #debateMinigameView .candidates-container {
        gap: 15px;
    }
    
    #debateMinigameView .candidate-logo {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    #debateMinigameView .player-logo {
        width: 90px;
        height: 90px;
        font-size: 2.2rem;
    }
    
    #debateMinigameView .debate-bubble {
        max-width: 140px;
        font-size: 0.75rem;
    }
}
/* ==================== SETUP SCREEN ==================== */
#debateMinigameView .hidden { display: none !important; }
#debateMinigameView .setup-screen {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, #0f1729 0%, #1a2744 50%, #0f1729 100%);
    overflow-y: auto;
    z-index: 1000;
    padding: 40px 20px;
}
#debateMinigameView .setup-panel {
    max-width: 1100px;
    margin: 0 auto;
    background: rgba(20, 30, 55, 0.85);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 14px;
    padding: 36px 40px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
#debateMinigameView .setup-panel h1 {
    font-size: 32px;
    margin-bottom: 6px;
    color: #ffd24a;
    letter-spacing: 0.5px;
}
#debateMinigameView .setup-subtitle {
    color: #b9c4d8;
    margin-bottom: 28px;
    font-size: 14px;
}
#debateMinigameView .setup-loading {
    padding: 40px;
    text-align: center;
    font-size: 16px;
    color: #b9c4d8;
}
#debateMinigameView .setup-section {
    margin-bottom: 32px;
}
#debateMinigameView .setup-section h2 {
    font-size: 18px;
    margin-bottom: 14px;
    color: #fff;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 8px;
}
#debateMinigameView .setup-section .hint {
    font-size: 12px;
    font-weight: normal;
    color: #8a9ab5;
    margin-left: 8px;
}
/* Candidate grid */
#debateMinigameView .candidate-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}
#debateMinigameView .candidate-card {
    background: rgba(255,255,255,0.04);
    border: 2px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    padding: 14px 12px;
    text-align: center;
    transition: all 0.15s ease;
}
#debateMinigameView .candidate-card:hover {
    border-color: rgba(255, 210, 74, 0.5);
    background: rgba(255,255,255,0.07);
}
#debateMinigameView .candidate-card.selected {
    border-color: #4ea1ff;
    background: rgba(78, 161, 255, 0.12);
}
#debateMinigameView .candidate-card.player {
    border-color: #ffd24a;
    background: rgba(255, 210, 74, 0.15);
    box-shadow: 0 0 16px rgba(255, 210, 74, 0.35);
}
#debateMinigameView .cc-emoji, #debateMinigameView .cc-portrait {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    margin: 0 auto 8px;
    overflow: hidden;
    background: rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
}
#debateMinigameView .cc-portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
#debateMinigameView .cc-name {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 10px;
    min-height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}
#debateMinigameView .cc-actions {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-start;
    font-size: 12px;
    color: #cdd6e7;
}
#debateMinigameView .cc-actions label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    width: 100%;
}
#debateMinigameView .cc-actions input[disabled] + span {
    opacity: 0.4;
}
/* Topic grid */
#debateMinigameView .topic-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
#debateMinigameView .topic-chip {
    padding: 8px 14px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.15);
    color: #e6ecf7;
    border-radius: 999px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s ease;
}
#debateMinigameView .topic-chip:hover {
    background: rgba(255,255,255,0.12);
}
#debateMinigameView .topic-chip.selected {
    background: #ffd24a;
    color: #1a1a1a;
    border-color: #ffd24a;
    font-weight: 600;
}
/* Actions */
#debateMinigameView .setup-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-top: 20px;
    flex-wrap: wrap;
}
#debateMinigameView .setup-validation {
    flex: 1;
    font-size: 13px;
    min-height: 18px;
}
#debateMinigameView .setup-validation.ok { color: #6ad97a; }
#debateMinigameView .setup-validation.warn { color: #f0a04b; }
#debateMinigameView .setup-actions .btn-primary {
    padding: 12px 28px;
    font-size: 15px;
    font-weight: 700;
    background: #4ea1ff;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
}
#debateMinigameView .setup-actions .btn-primary:hover:not(:disabled) {
    background: #6bb3ff;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(78,161,255,0.4);
}
#debateMinigameView .setup-actions .btn-primary:disabled {
    background: #3a4a66;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Interrupt-attack: legacy box-shadow rule — superseded by .candidate-logo.attackable
   .candidate-portrait above which drives a drop-shadow pulse on the podium PNG. */

/* ==================== SKIP DEBATE PROMPTS ==================== */

/* Pre-debate "Take stage / Skip" overlay */
.pre-debate-skip-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.78);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.pre-debate-skip-card {
    background: #1a1f2e;
    color: #f0f0f0;
    padding: 32px 40px;
    border-radius: 12px;
    max-width: 560px;
    width: calc(100% - 40px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
}
.pre-debate-skip-card h2 {
    margin: 0 0 8px;
    font-size: 28px;
    color: #ffd86b;
    letter-spacing: 0.5px;
}
.pre-debate-skip-sub {
    margin: 0 0 18px;
    font-size: 17px;
    opacity: 0.92;
}
.pre-debate-skip-warn {
    background: rgba(255, 90, 90, 0.10);
    border: 1px solid rgba(255, 90, 90, 0.35);
    color: #ffe2dd;
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.45;
    margin: 0 0 22px;
}
.pre-debate-skip-warn strong { color: #ff9c8a; }
.pre-debate-skip-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}
.pre-debate-skip-actions .btn-primary,
.pre-debate-skip-actions .btn-secondary {
    padding: 12px 22px;
    font-size: 15px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.pre-debate-skip-actions .btn-primary {
    background: linear-gradient(180deg, #4caf7a, #2e8b57);
    color: #fff;
    box-shadow: 0 4px 14px rgba(46, 139, 87, 0.4);
}
.pre-debate-skip-actions .btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: #ddd;
    border: 1px solid rgba(255, 255, 255, 0.18);
}
.pre-debate-skip-actions button:hover { transform: translateY(-1px); }

/* Pre-debate briefing variant: keep the overlay light so the candidate's
   themed photographic backdrop (painted by #debateScreen.theme-*::before)
   reads clearly behind the card. The card itself reuses the debate-tutorial
   classes so every candidate's theme palette applies on every debate night. */
.pre-debate-skip-overlay.pre-debate-briefing {
    background: rgba(0, 0, 0, 0.30);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}
.pre-debate-briefing .debate-tutorial-inner {
    max-width: 620px;
    width: calc(100% - 40px);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
    animation: skipCardPop 0.22s cubic-bezier(0.34, 1.4, 0.64, 1);
}
.pre-debate-briefing .tutorial-card-title { font-size: 1.35rem; }
.pre-debate-topics {
    margin: 0 0 14px;
    font-size: 0.92rem;
    opacity: 0.92;
}
/* Warn box colors: base rule assumes a dark card; inherit the themed panel's
   text color so it stays readable on light candidate palettes too. */
.pre-debate-briefing .pre-debate-skip-warn { color: inherit; }
.pre-debate-briefing .pre-debate-skip-warn strong { color: #e05252; }
.pre-debate-briefing .pre-debate-skip-actions {
    justify-content: flex-end;
    align-items: center;
}

/* Two-step inline skip confirmation (replaces the native confirm()) */
.pre-debate-briefing .tutorial-btn-skip.armed {
    background: rgba(180, 40, 40, 0.9);
    border-color: rgba(255, 120, 120, 0.65);
    color: #fff;
    box-shadow: 0 4px 14px rgba(180, 40, 40, 0.45);
}

/* In-debate "skip the rest" modal (replaces the old native confirm()) */
.in-debate-skip-overlay { animation: skipOverlayFade 0.18s ease; }
@keyframes skipOverlayFade {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.in-debate-skip-overlay .pre-debate-skip-card {
    animation: skipCardPop 0.22s cubic-bezier(0.34, 1.4, 0.64, 1);
}
@keyframes skipCardPop {
    from { transform: translateY(14px) scale(0.96); opacity: 0; }
    to   { transform: translateY(0) scale(1); opacity: 1; }
}
.in-debate-skip-warn {
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: left;
}
.pre-debate-skip-actions .btn-danger-skip {
    background: rgba(255, 90, 90, 0.12);
    color: #ffb3a7;
    border: 1px solid rgba(255, 120, 120, 0.45);
}
.pre-debate-skip-actions .btn-danger-skip:hover {
    background: rgba(180, 40, 40, 0.85);
    color: #fff;
}

/* In-debate "Skip Rest" corner button */
.in-debate-skip-btn {
    position: absolute;
    top: 14px;
    right: 18px;
    z-index: 50;
    background: rgba(20, 20, 28, 0.78);
    color: #ffcfcf;
    border: 1px solid rgba(255, 120, 120, 0.45);
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    letter-spacing: 0.4px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transition: background 0.15s ease, color 0.15s ease;
}
.in-debate-skip-btn:hover {
    background: rgba(180, 40, 40, 0.85);
    color: #fff;
}
