/* ==========================================================================
   ECLIPSE: GALACTIC OVERSEER - Tabletop Companion Styles
   ========================================================================== */

:root {
    --bg-dark: #07090e;
    --bg-panel: #0d121d;
    --bg-panel-light: #151d2e;
    --border-color: #212c42;
    --border-glow: rgba(56, 189, 248, 0.3);
    --input-bg: #000000;
    --input-color: #f8fafc;
    --card-subtle-bg: rgba(0, 0, 0, 0.3);

    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --military-color: #ff4d4d;
    --military-bg: rgba(255, 77, 77, 0.12);
    --military-border: rgba(255, 77, 77, 0.4);

    --grid-color: #00e676;
    --grid-bg: rgba(0, 230, 118, 0.12);
    --grid-border: rgba(0, 230, 118, 0.4);

    --nano-color: #ffb703;
    --nano-bg: rgba(255, 183, 3, 0.12);
    --nano-border: rgba(255, 183, 3, 0.4);

    --rare-color: #d946ef;
    --rare-bg: rgba(217, 70, 239, 0.12);
    --rare-border: rgba(217, 70, 239, 0.4);

    --accent-cyan: #38bdf8;
    --accent-gold: #fbbf24;

    --font-heading: 'Cinzel', serif;
    --font-ui: 'Syne', sans-serif;
    --font-mono: 'Courier Prime', monospace;
    color-scheme: dark;
}

/* Tactical Form Inputs & Selects */
.tactical-input,
.tactical-select {
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    color: var(--input-color);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.tactical-input:focus,
.tactical-select:focus {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 8px var(--border-glow);
}

.setup-options-box,
.modal-inset-box {
    background: var(--card-subtle-bg);
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-ui);
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    background-image: 
        radial-gradient(circle at 15% 15%, rgba(56, 189, 248, 0.04) 0%, transparent 40%),
        radial-gradient(circle at 85% 85%, rgba(217, 70, 239, 0.04) 0%, transparent 40%);
}

/* Sci-fi Custom Scrollbars */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) rgba(0, 0, 0, 0.25);
}

*::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

*::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.25);
    border-radius: 3px;
}

*::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

*::-webkit-scrollbar-thumb:hover {
    background: var(--accent-cyan);
}

/* CRT Scanlines Overlay */
.crt-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.03), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.03));
    background-size: 100% 3px, 6px 100%;
    z-index: 999;
    opacity: 0.7;
    display: none;
}

.crt-active .crt-overlay {
    display: block;
}

/* ==========================================================================
   TOP APPLICATION HEADER
   ========================================================================== */
.overseer-header {
    background: rgba(13, 18, 29, 0.95);
    border-bottom: 1px solid var(--border-color);
    padding: clamp(6px, 1vh, 10px) clamp(10px, 1.8vw, 20px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    min-height: 44px;
    gap: 8px;
    flex-wrap: nowrap;
}

@media (max-width: 1180px) {
    .brand-subtitle {
        display: none;
    }
    #theme-toggle-label,
    #kiosk-toggle-label {
        display: none;
    }
    .header-actions .btn-tactical {
        padding: 4px 8px;
    }
}

.header-brand {
    display: flex;
    align-items: center;
    gap: clamp(8px, 1.5vw, 12px);
    flex-shrink: 0;
    cursor: pointer;
    user-select: none;
}


.header-brand svg {
    width: clamp(26px, 3vw, 32px);
    height: clamp(26px, 3vw, 32px);
    color: var(--accent-cyan);
    filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.5));
}

.brand-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.brand-title {
    font-family: var(--font-heading);
    font-size: clamp(1.05rem, 2.2vw, 1.3rem);
    font-weight: 900;
    letter-spacing: clamp(1px, 0.2vw, 2px);
    color: #fff;
    white-space: nowrap;
}

.brand-version-badge {
    font-family: var(--font-mono);
    font-size: clamp(0.58rem, 0.9vw, 0.68rem);
    font-weight: 700;
    letter-spacing: 0.8px;
    color: var(--accent-cyan);
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.35);
    border-radius: 4px;
    padding: 1px 6px;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    line-height: normal;
    white-space: nowrap;
    box-shadow: 0 0 6px rgba(56, 189, 248, 0.15);
    transition: all 0.2s ease;
    cursor: pointer;
    user-select: none;
}

.brand-version-badge:hover {
    background: rgba(56, 189, 248, 0.25);
    border-color: var(--accent-cyan);
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.35);
    transform: translateY(-1px);
}

.brand-version-sub {
    color: var(--accent-gold);
    font-weight: 600;
    margin-left: 2px;
}

.console-version-tag {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--accent-cyan);
    letter-spacing: 1px;
    white-space: nowrap;
}

.scorecard-version-tag {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--accent-cyan);
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: 4px;
    padding: 2px 7px;
    font-weight: 600;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.alert-modal-system-footer {
    margin-top: 14px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.alert-modal-system-footer .version-highlight {
    color: var(--accent-cyan);
    font-weight: 600;
}

.brand-subtitle {
    font-size: clamp(0.55rem, 1vw, 0.65rem);
    font-family: var(--font-mono);
    color: var(--accent-cyan);
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

/* Session Code Widget */
.session-widget {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 4px 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.session-widget:hover {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.2);
}

.session-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.session-code {
    font-family: var(--font-mono);
    font-size: 0.95rem;
    font-weight: bold;
    color: var(--accent-gold);
    letter-spacing: 1.5px;
}

.copy-icon {
    font-size: 0.85rem;
    opacity: 0.7;
}

/* Header Controls */
.header-actions {
    display: flex;
    align-items: center;
    gap: clamp(6px, 0.8vw, 10px);
    flex-wrap: wrap;
}

.btn-tactical {
    background: var(--bg-panel-light);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: clamp(5px, 0.8vh, 6px) clamp(8px, 1vw, 12px);
    border-radius: 6px;
    font-family: var(--font-mono);
    font-size: clamp(0.7rem, 0.9vw, 0.75rem);
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    white-space: nowrap;
}

.btn-tactical:hover {
    color: #fff;
    border-color: var(--accent-cyan);
}

.btn-tactical.primary {
    background: rgba(56, 189, 248, 0.15);
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
}

.btn-tactical.primary:hover {
    background: var(--accent-cyan);
    color: #000;
}

.btn-tactical.danger {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.5);
    color: #fca5a5;
}

.btn-tactical.danger:hover {
    background: #dc2626;
    border-color: #ef4444;
    color: #fff;
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.4);
}

/* ==========================================================================
   ROUND & PHASE TACTICAL HUD
   ========================================================================== */
.tactical-hud {
    background: rgba(10, 15, 24, 0.78);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border-color);
    padding: clamp(4px, 0.8vh, 8px) clamp(10px, 1.8vw, 20px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: clamp(6px, 1vw, 12px);
    flex-shrink: 0;
}

.round-tracker-container {
    display: flex;
    align-items: center;
    gap: clamp(6px, 1.2vw, 12px);
    flex-wrap: wrap;
}

.round-badge {
    font-family: var(--font-heading);
    font-size: clamp(0.85rem, 1.5vw, 1rem);
    font-weight: bold;
    color: var(--accent-gold);
    letter-spacing: 1px;
    white-space: nowrap;
}

.round-nodes {
    display: flex;
    gap: clamp(2px, 0.4vw, 5px);
}

.round-node {
    width: clamp(20px, 2vw, 25px);
    height: clamp(20px, 2vw, 25px);
    border-radius: 4px;
    border: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: clamp(0.68rem, 0.85vw, 0.75rem);
    color: var(--text-muted);
}

.round-node.past {
    border-color: var(--text-muted);
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.05);
}

.round-node.active {
    border-color: var(--accent-gold);
    color: #000;
    background: var(--accent-gold);
    font-weight: bold;
    box-shadow: 0 0 10px rgba(251, 191, 36, 0.5);
}

/* Phase Progress Strip */
.phase-strip {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-color);
    border-radius: 30px;
    padding: 2px 4px;
    max-width: 100%;
    overflow-x: auto;
}

.phase-step {
    padding: clamp(3px, 0.6vh, 5px) clamp(6px, 1vw, 12px);
    border-radius: 20px;
    font-size: clamp(0.65rem, 0.8vw, 0.72rem);
    font-family: var(--font-mono);
    letter-spacing: clamp(0.4px, 0.1vw, 0.8px);
    color: var(--text-muted);
    text-transform: uppercase;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.phase-step.active {
    background: var(--accent-cyan);
    color: #000;
    font-weight: bold;
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.4);
}

/* ==========================================================================
   DYNAMIC ACTION STRIP (THE NORMAL GAME CYCLE CONDUCTOR)
   ========================================================================== */
.cycle-conductor-strip {
    background: linear-gradient(90deg, rgba(13, 18, 29, 0.82), rgba(21, 29, 46, 0.82));
    backdrop-filter: blur(10px);
    border-bottom: 2px solid var(--border-color);
    padding: clamp(6px, 1vh, 10px) clamp(10px, 1.8vw, 20px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: clamp(8px, 1.2vw, 12px);
    flex-shrink: 0;
}

.conductor-left {
    display: flex;
    align-items: center;
    gap: clamp(8px, 1.2vw, 12px);
    flex-wrap: wrap;
}

.active-turn-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
}

.player-turn-avatar {
    width: clamp(26px, 2.8vw, 32px);
    height: clamp(26px, 2.8vw, 32px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    flex-shrink: 0;
}

.player-turn-avatar svg {
    width: clamp(16px, 1.6vw, 20px);
    height: clamp(16px, 1.6vw, 20px);
}

.turn-text-group {
    display: flex;
    flex-direction: column;
}

.turn-subtitle {
    font-family: var(--font-mono);
    font-size: clamp(0.62rem, 0.75vw, 0.68rem);
    color: var(--accent-cyan);
    text-transform: uppercase;
}

.turn-player-name {
    font-size: clamp(0.88rem, 1.4vw, 1.02rem);
    font-weight: bold;
    color: #fff;
}

.conductor-actions {
    display: flex;
    align-items: center;
    gap: clamp(6px, 1vw, 10px);
    flex-wrap: wrap;
}

.btn-action-main {
    padding: clamp(6px, 1vh, 8px) clamp(10px, 1.4vw, 16px);
    border-radius: 6px;
    font-family: var(--font-ui);
    font-size: clamp(0.78rem, 0.95vw, 0.85rem);
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.btn-action-main.execute {
    background: #2563eb;
    color: #fff;
    box-shadow: 0 0 15px rgba(37, 99, 235, 0.4);
}

.btn-action-main.execute:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
}

.btn-action-main.pass {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid #ef4444;
    color: #fca5a5;
}

.btn-action-main.pass:hover {
    background: #ef4444;
    color: #fff;
}

.btn-action-main.advance-phase {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.5);
    animation: pulseGlow 2s infinite;
}

.btn-action-main.advance-phase:hover {
    filter: brightness(1.15);
    transform: translateY(-1px);
}

.btn-action-main.draw-tech {
    background: linear-gradient(135deg, #a855f7, #7c3aed);
    color: #fff;
    font-size: clamp(0.85rem, 1.2vw, 1rem);
    padding: clamp(10px, 1.5vh, 12px) clamp(16px, 2vw, 24px);
    box-shadow: 0 0 25px rgba(168, 85, 247, 0.6);
    animation: pulseRare 2.5s infinite;
}

.btn-action-main.draw-tech:hover {
    filter: brightness(1.2);
    transform: translateY(-2px);
}

@keyframes pulseGlow {
    0% { box-shadow: 0 0 10px rgba(16, 185, 129, 0.4); }
    50% { box-shadow: 0 0 25px rgba(16, 185, 129, 0.8); }
    100% { box-shadow: 0 0 10px rgba(16, 185, 129, 0.4); }
}

@keyframes pulseRare {
    0% { box-shadow: 0 0 15px rgba(168, 85, 247, 0.4); }
    50% { box-shadow: 0 0 30px rgba(168, 85, 247, 0.9); }
    100% { box-shadow: 0 0 15px rgba(168, 85, 247, 0.4); }
}

/* ==========================================================================
   APP MAIN GRID LAYOUT & REACTIVE REAL ESTATE FIT
   ========================================================================== */
#game-view {
    display: flex;
    flex-direction: column;
    width: 100%;
    position: relative;
}

#game-view > * {
    position: relative;
    z-index: 2;
}

/* ==========================================================================
   DYNAMIC ATMOSPHERIC SPACE BACKDROP (Cross-Fading Layers)
   ========================================================================== */
#game-view > .game-backdrop-container {
    position: fixed;
    inset: 0;
    top: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.game-backdrop-layer {
    position: absolute;
    inset: -1%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: opacity;
    filter: saturate(1.25) contrast(1.15) brightness(1.0);
}

.game-backdrop-layer.active {
    opacity: 1;
}

.game-backdrop-scrim {
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse 95% 85% at 50% 45%, rgba(7, 9, 14, 0.30) 0%, rgba(3, 7, 18, 0.65) 80%, #030712 100%),
        linear-gradient(to bottom, rgba(3, 7, 18, 0.30) 0%, rgba(3, 7, 18, 0.08) 30%, rgba(3, 7, 18, 0.55) 85%, #030712 100%);
    pointer-events: none;
    z-index: 1;
}

/* Solar Day Mode Theme Adaptation */
body.theme-light .game-backdrop-scrim {
    background: 
        radial-gradient(ellipse 95% 85% at 50% 45%, rgba(241, 245, 249, 0.88) 0%, rgba(226, 232, 240, 0.94) 80%, #cbd5e1 100%),
        linear-gradient(to bottom, rgba(241, 245, 249, 0.85) 0%, rgba(241, 245, 249, 0.5) 30%, rgba(226, 232, 240, 0.92) 85%, #cbd5e1 100%);
}
body.theme-light .game-backdrop-layer {
    opacity: 0;
    filter: saturate(0.8) contrast(0.9);
}
body.theme-light .game-backdrop-layer.active {
    opacity: 0.35;
}

@media (prefers-reduced-motion: reduce) {
    .game-backdrop-layer {
        transition: none !important;
    }
}

.overseer-grid {
    display: grid;
    grid-template-columns: clamp(260px, 22vw, 360px) 1fr;
    gap: clamp(8px, 1.2vw, 14px);
    padding: clamp(6px, 1vh, 12px) clamp(8px, 1.5vw, 16px);
    max-width: min(99vw, 2560px);
    width: 100%;
    margin: 0 auto;
}

/* App Shell Mode: Fits 100% of available viewport without global scrolling on screens with >= 520px height & >= 800px width */
@media (min-width: 800px) and (min-height: 520px) {
    body {
        height: 100vh;
        height: 100dvh;
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }

    #landing-view {
        flex: 1;
        overflow-y: auto;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding: clamp(12px, 2vh, 24px) clamp(16px, 2vw, 32px);
    }

    #game-view {
        flex: 1;
        min-height: 0;
        height: calc(100dvh - 48px);
        overflow-y: auto;
        overflow-x: hidden;
        display: flex;
        flex-direction: column;
    }

    .overseer-grid {
        flex: 1;
        min-height: 0;
        height: 100%;
        overflow: hidden;
    }

    /* When campaign debrief is active, allow overseer grid and stations to flow naturally so entire report and board are scrollable */
    body.game-over .overseer-grid,
    #game-view:has(.campaign-summary-section:not([style*="display: none"])) .overseer-grid {
        flex: none;
        min-height: auto;
        height: auto;
        overflow: visible;
    }

    body.game-over .players-station,
    body.game-over .tray-section,
    #game-view:has(.campaign-summary-section:not([style*="display: none"])) .players-station,
    #game-view:has(.campaign-summary-section:not([style*="display: none"])) .tray-section {
        height: auto;
        overflow: visible;
    }

    .players-station {
        height: 100%;
        overflow-y: auto;
        overflow-x: hidden;
        padding-right: 4px;
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .tray-section {
        height: 100%;
        overflow-y: auto;
        overflow-x: hidden;
        padding-right: 4px;
        display: flex;
        flex-direction: column;
        gap: 6px;
        justify-content: flex-start;
    }
}

/* Adaptive Vertical Flow on ultra-compact screens or mobile */
@media (max-width: 799px), (max-height: 519px) {
    body {
        height: auto;
        min-height: 100dvh;
        overflow-y: auto;
        overflow-x: hidden;
    }

    #game-view {
        height: auto;
        min-height: calc(100dvh - 48px);
        overflow: visible;
    }

    .overseer-grid {
        display: flex;
        flex-direction: column;
        height: auto;
        overflow: visible;
        padding: 10px;
        gap: 12px;
    }

    .players-station,
    .tray-section {
        height: auto;
        overflow: visible;
    }

    .cycle-conductor-strip {
        position: sticky;
        top: 48px;
        z-index: 50;
        backdrop-filter: blur(12px);
    }
}

/* Tablet portrait roster 2-column optimization */
@media (min-width: 600px) and (max-width: 899px) {
    .player-list {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}

/* Mobile compact adjustments */
@media (max-width: 640px) {
    .brand-title-row {
        gap: 6px;
    }

    .brand-version-badge {
        font-size: 0.58rem;
        padding: 1px 4px;
    }

    .brand-subtitle {
        display: none;
    }
    
    .conductor-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .btn-action-main {
        flex: 1;
        justify-content: center;
    }
}

/* ==========================================================================
   LEFT SIDEBAR: PLAYERS & PASS ORDER
   ========================================================================== */
.players-station {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.station-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 10px 12px;
}

.station-title {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    letter-spacing: 0.8px;
    color: var(--accent-cyan);
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pass-order-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.pass-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 6px 10px;
    font-family: var(--font-mono);
    font-size: 0.76rem;
}

.pass-item.first {
    border-color: var(--accent-gold);
    background: rgba(251, 191, 36, 0.08);
}

.pass-rank {
    font-weight: bold;
    color: var(--text-secondary);
}

.pass-item.first .pass-rank {
    color: var(--accent-gold);
}

/* Player Cards */
.player-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.player-card {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--border-color);
    border-radius: 6px;
    padding: 8px 10px;
    transition: all 0.2s ease;
}

.player-card.active-turn {
    border-color: var(--accent-cyan);
    border-left-width: 6px;
    background: rgba(56, 189, 248, 0.06);
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.15);
}

.player-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.player-name-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.turn-name-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.player-round-order {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1;
    padding: 2px 5px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.14);
    letter-spacing: 0.5px;
    white-space: nowrap;
    user-select: none;
    flex-shrink: 0;
}

.player-round-order.first-player {
    background: rgba(234, 179, 8, 0.16);
    color: var(--accent-gold);
    border-color: rgba(234, 179, 8, 0.45);
    box-shadow: 0 0 8px rgba(234, 179, 8, 0.25);
}

.player-carousel-badge {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--accent-cyan);
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.25);
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.player-name {
    font-weight: bold;
    font-size: 0.95rem;
}

.btn-rename-player {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 0.75rem;
    opacity: 0.5;
    padding: 2px 4px;
    border-radius: 4px;
    line-height: 1;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}

.btn-rename-player:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.12);
    transform: scale(1.15);
}

body.theme-light .btn-rename-player {
    opacity: 0.65;
    color: var(--text-primary);
}

body.theme-light .btn-rename-player:hover {
    background: rgba(0, 0, 0, 0.08);
}

.btn-row-randomize {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.15s ease;
}

.btn-row-randomize:hover {
    transform: rotate(25deg) scale(1.1);
}


.player-faction-tag {
    font-size: 0.7rem;
    font-family: var(--font-mono);
    color: var(--text-muted);
}

.player-status-badge {
    font-size: 0.7rem;
    font-family: var(--font-mono);
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
}

.player-status-badge.passed {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.4);
}

.player-resources {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-top: 8px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    padding: 6px 8px;
}

.res-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-family: var(--font-mono);
}

.res-label {
    font-size: 0.65rem;
    color: var(--text-muted);
}

.res-val {
    font-size: 0.9rem;
    font-weight: bold;
    color: #fff;
}

.player-techs-row {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 8px;
}

.tech-chip {
    font-size: 0.65rem;
    font-family: var(--font-mono);
    padding: 2px 6px;
    border-radius: 3px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.tech-chip.military { background: var(--military-bg); border-color: var(--military-border); color: var(--military-color); }
.tech-chip.grid { background: var(--grid-bg); border-color: var(--grid-border); color: var(--grid-color); }
.tech-chip.nano { background: var(--nano-bg); border-color: var(--nano-border); color: var(--nano-color); }
.tech-chip.rare { background: var(--rare-bg); border-color: var(--rare-border); color: var(--rare-color); }

/* ==========================================================================
   CENTER: TECH SUPPLY TRAY & CONTROLS
   ========================================================================== */
.tray-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tray-control-panel {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 6px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-shrink: 0;
}

.tray-header-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
}

.tray-title-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tray-title-icon {
    font-size: 1.1rem;
}

.tray-main-title {
    font-family: var(--font-heading);
    font-size: 0.88rem;
    font-weight: bold;
    letter-spacing: 1px;
    color: #fff;
    white-space: nowrap;
}

.tray-controls-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.badge-bag-count {
    font-family: var(--font-mono);
    font-size: 0.74rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 3px 8px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    color: var(--text-primary);
}

.badge-bag-count:hover {
    background: rgba(56, 189, 248, 0.15);
    border-color: var(--accent-cyan);
    color: #e0f2fe;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.3);
}

.badge-bag-count:focus-visible {
    outline: 2px solid var(--accent-cyan);
    outline-offset: 1px;
}

.btn-filter-pill {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    color: var(--text-primary);
    padding: 3px 10px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-filter-pill:hover,
.btn-filter-pill.active {
    border-color: var(--accent-cyan);
    background: rgba(56, 189, 248, 0.15);
    color: #fff;
    box-shadow: 0 0 8px rgba(56, 189, 248, 0.3);
}

.tray-category-tabs {
    display: flex;
    gap: 4px;
    align-items: center;
}

.tray-tab {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-secondary);
    padding: 3px 8px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.tray-tab:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
}

.tray-tab.active {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-color: var(--accent-cyan);
    box-shadow: 0 0 6px rgba(56, 189, 248, 0.25);
    font-weight: bold;
}

.tray-tab.tab-military.active { border-color: var(--military-color); box-shadow: 0 0 6px rgba(255, 77, 77, 0.3); }
.tray-tab.tab-grid.active { border-color: var(--grid-color); box-shadow: 0 0 6px rgba(0, 230, 118, 0.3); }
.tray-tab.tab-nano.active { border-color: var(--nano-color); box-shadow: 0 0 6px rgba(255, 183, 3, 0.3); }
.tray-tab.tab-rare.active { border-color: var(--rare-color); box-shadow: 0 0 6px rgba(217, 70, 239, 0.3); }

/* In-Stock Only filter */
.hide-out-of-stock .tech-tile-card.empty {
    display: none !important;
}

.empty-cat-notice {
    display: none;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-muted);
    padding: 8px 12px;
    text-align: center;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    border: 1px dashed var(--border-color);
    white-space: nowrap;
}

.hide-out-of-stock .empty-cat-notice {
    display: block;
}

/* Category filter */
.tray-category-block.filtered-out {
    display: none !important;
}

.tray-category-block {
    background: rgba(13, 18, 29, 0.78);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 6px 10px 6px;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: relative;
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 3px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    margin-bottom: 4px;
    flex-shrink: 0;
}

.category-title-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.category-title {
    font-family: var(--font-heading);
    font-size: 0.82rem;
    letter-spacing: 0.8px;
}

.category-count {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* Category Color Variations */
.tray-category-block.military { border-top: 3px solid var(--military-color); }
.tray-category-block.military .category-title { color: var(--military-color); }

.tray-category-block.grid { border-top: 3px solid var(--grid-color); }
.tray-category-block.grid .category-title { color: var(--grid-color); }

.tray-category-block.nano { border-top: 3px solid var(--nano-color); }
.tray-category-block.nano .category-title { color: var(--nano-color); }

.tray-category-block.rare { border-top: 3px solid var(--rare-color); }
.tray-category-block.rare .category-title { color: var(--rare-color); }

/* Compact Horizontal Scrolling Tabletop Tech Tray Track */
.tech-tiles-grid {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 8px;
    padding: 7px 6px 7px 6px;
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

.tech-tiles-grid::-webkit-scrollbar {
    height: 4px;
}

.tech-tiles-grid::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 2px;
}

.tech-tiles-grid::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 2px;
}

.tech-tiles-grid::-webkit-scrollbar-thumb:hover {
    background: var(--accent-cyan);
}

.tech-tile-card {
    flex: 0 0 clamp(94px, 7.5vw, 115px);
    width: clamp(94px, 7.5vw, 115px);
    min-height: 80px;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 5px 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    user-select: none;
}

.tech-tile-card:hover {
    border-color: var(--accent-cyan);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
}

.tech-tile-card.available {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
}

.tech-tile-card.available:hover {
    border-color: var(--accent-cyan);
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6);
}

/* Fixed Board Tray Slot (Empty Socket) */
.tech-tile-card.empty {
    background: rgba(0, 0, 0, 0.25);
    border: 1px dashed rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.5);
    opacity: 0.55;
    filter: grayscale(40%);
    cursor: default;
}

.tech-tile-card.empty:hover {
    transform: none;
    border-color: rgba(255, 255, 255, 0.22);
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.5);
}

.tech-tile-card.empty .tile-name {
    color: var(--text-muted);
    opacity: 0.85;
}

.tech-tile-card.empty .tile-icon-box {
    opacity: 0.35;
    filter: grayscale(80%);
}

.tech-tile-card.empty .tile-qty-badge.zero {
    background: rgba(0, 0, 0, 0.35);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    opacity: 0.6;
}

.tech-tile-card.empty .tile-cost {
    opacity: 0.7;
    color: var(--text-muted);
}

.tile-icon-box {
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2px;
    color: var(--text-primary);
}

.tile-icon-box svg {
    width: 22px;
    height: 22px;
    filter: drop-shadow(0 0 4px currentColor);
}

.tile-qty-badge {
    position: absolute;
    top: 3px;
    right: 4px;
    background: #000;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1px 5px;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: bold;
    color: var(--accent-cyan);
    z-index: 2;
}

.tile-qty-badge.zero {
    color: var(--text-muted);
}

.tile-name {
    font-weight: bold;
    font-size: 0.72rem;
    line-height: 1.15;
    margin-bottom: 2px;
    color: #fff;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-height: 2.3em;
}

.tile-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-top: auto;
    padding-top: 1px;
    font-family: var(--font-mono);
    font-size: 0.68rem;
}

.tile-cost {
    color: var(--nano-color);
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* ==========================================================================
   NEW THIS ROUND HIGHLIGHT (CLEAR VIBRANT EXTRA BORDER & GLOW)
   ========================================================================== */
.tech-tile-card.new-this-round {
    outline: 2.5px solid rgba(56, 189, 248, 0.9);
    outline-offset: 3px;
    box-shadow: 0 0 14px rgba(56, 189, 248, 0.5), 0 0 3px rgba(56, 189, 248, 0.8);
}

.tray-category-block.military .tech-tile-card.new-this-round {
    outline-color: #ff3b3b;
    box-shadow: 0 0 14px rgba(255, 59, 59, 0.55), 0 0 3px rgba(255, 59, 59, 0.85);
}

.tray-category-block.grid .tech-tile-card.new-this-round {
    outline-color: #00e676;
    box-shadow: 0 0 14px rgba(0, 230, 118, 0.55), 0 0 3px rgba(0, 230, 118, 0.85);
}

.tray-category-block.nano .tech-tile-card.new-this-round {
    outline-color: #ffb703;
    box-shadow: 0 0 14px rgba(255, 183, 3, 0.55), 0 0 3px rgba(255, 183, 3, 0.85);
}

.tray-category-block.rare .tech-tile-card.new-this-round {
    outline-color: #e056fd;
    box-shadow: 0 0 16px rgba(224, 86, 253, 0.6), 0 0 4px rgba(224, 86, 253, 0.85);
}

.tech-tile-card.new-this-round:hover {
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.75), 0 4px 16px rgba(0, 0, 0, 0.7);
}
.tray-category-block.military .tech-tile-card.new-this-round:hover {
    box-shadow: 0 0 20px rgba(255, 59, 59, 0.75), 0 4px 16px rgba(0, 0, 0, 0.7);
}
.tray-category-block.grid .tech-tile-card.new-this-round:hover {
    box-shadow: 0 0 20px rgba(0, 230, 118, 0.75), 0 4px 16px rgba(0, 0, 0, 0.7);
}
.tray-category-block.nano .tech-tile-card.new-this-round:hover {
    box-shadow: 0 0 20px rgba(255, 183, 3, 0.75), 0 4px 16px rgba(0, 0, 0, 0.7);
}
.tray-category-block.rare .tech-tile-card.new-this-round:hover {
    box-shadow: 0 0 22px rgba(224, 86, 253, 0.8), 0 4px 16px rgba(0, 0, 0, 0.7);
}

/* ==========================================================================
   LANDING / BRIEFING VIEW STYLES
   ========================================================================== */
.landing-container {
    width: 100%;
    max-width: min(98vw, 2200px);
    margin: 0 auto;
    padding: clamp(6px, 1vh, 16px) clamp(8px, 1vw, 20px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.landing-hero {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    width: 100%;
    max-width: min(96vw, 2100px);
    height: min(calc(98vh - 72px), 1150px);
    aspect-ratio: 16 / 9;
    padding: clamp(20px, 3vh, 48px) clamp(24px, 3vw, 56px);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(56, 189, 248, 0.35);
    box-shadow: 0 16px 64px rgba(0, 0, 0, 0.85), inset 0 0 120px rgba(0, 0, 0, 0.7);
    background-color: #030712;
}

@media (max-aspect-ratio: 16/10) {
    .landing-hero {
        height: auto;
        min-height: min(86vh, 800px);
        aspect-ratio: auto;
    }
}

.landing-hero-backdrop {
    position: absolute;
    inset: 0;
    background-image: url('assets/landing_hero_ramming.webp');
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    filter: saturate(1.2) contrast(1.12);
    z-index: 0;
    transform: scale(1);
}

.landing-hero-overlay {
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse 85% 75% at 50% 50%, rgba(6, 11, 25, 0.35) 0%, rgba(3, 7, 18, 0.78) 75%, #030712 100%),
        linear-gradient(to bottom, rgba(3, 7, 18, 0.55) 0%, rgba(3, 7, 18, 0.15) 35%, rgba(3, 7, 18, 0.8) 85%, #030712 100%);
    z-index: 1;
    pointer-events: none;
}

.landing-hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: clamp(10px, 1.8vh, 18px);
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}

.hero-badge {
    background: rgba(14, 165, 233, 0.15);
    border: 1px solid var(--accent-cyan);
    color: var(--accent-cyan);
    font-family: var(--font-mono);
    font-size: clamp(0.68rem, 1vw, 0.78rem);
    letter-spacing: clamp(1px, 0.2vw, 2px);
    padding: 5px 16px;
    border-radius: 20px;
    text-transform: uppercase;
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.25);
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 3.4rem);
    font-weight: 900;
    letter-spacing: clamp(1.5px, 0.3vw, 4px);
    color: #ffffff;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.95), 0 0 35px rgba(56, 189, 248, 0.65);
    line-height: 1.15;
    margin: 0;
}

.hero-desc {
    max-width: 780px;
    font-size: clamp(0.92rem, 1.2vw, 1.06rem);
    color: #cbd5e1;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.9);
    line-height: 1.65;
    margin: 0;
}

.hero-desc strong {
    color: #38bdf8;
}

/* Active Session Resume Card */
.resume-active-card {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(15, 23, 42, 0.92));
    border: 1px solid var(--accent-gold);
    border-radius: 10px;
    padding: 14px 22px;
    width: 100%;
    max-width: 820px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 0 25px rgba(245, 158, 11, 0.25);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.resume-active-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: left;
}

.resume-title {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--accent-gold);
    letter-spacing: 1px;
}

.resume-details {
    font-weight: bold;
    font-size: 1rem;
    color: #fff;
}

/* Tactical Operations Console Panel */
.landing-console-panel {
    background: rgba(10, 16, 30, 0.82);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(56, 189, 248, 0.32);
    border-radius: 12px;
    padding: clamp(16px, 2.5vw, 24px);
    width: 100%;
    max-width: 820px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.65), 0 0 24px rgba(56, 189, 248, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.console-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(56, 189, 248, 0.2);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.console-title {
    color: var(--accent-cyan);
    font-weight: 700;
}

.console-status-indicator {
    color: #4ade80;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #4ade80;
    box-shadow: 0 0 8px #4ade80;
    animation: pulse-status-dot 2s infinite ease-in-out;
}

@keyframes pulse-status-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.85); }
}

/* Landing Actions & Grid Tiers */
.landing-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.action-tier {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    width: 100%;
}

@media (max-width: 640px) {
    .action-tier {
        grid-template-columns: 1fr;
    }
}

.btn-landing-primary {
    background: linear-gradient(135deg, #0284c7 0%, #1d4ed8 100%);
    border: 1px solid rgba(56, 189, 248, 0.6);
    color: #ffffff;
    font-family: var(--font-ui);
    padding: 14px 18px;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    box-shadow: 0 4px 20px rgba(2, 132, 199, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.25);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    text-align: left;
}

.btn-landing-primary:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #0369a1 0%, #2563eb 100%);
    box-shadow: 0 8px 28px rgba(2, 132, 199, 0.65), 0 0 18px rgba(56, 189, 248, 0.5);
    filter: brightness(1.08);
}

.btn-landing-primary:active {
    transform: translateY(0);
}

.btn-landing-secondary {
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(56, 189, 248, 0.25);
    color: var(--text-primary);
    font-family: var(--font-ui);
    padding: 13px 18px;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    text-align: left;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

.btn-landing-secondary:hover {
    border-color: var(--accent-cyan);
    color: #ffffff;
    background: rgba(30, 41, 59, 0.95);
    transform: translateY(-2px);
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.5), 0 0 14px rgba(56, 189, 248, 0.3);
}

.btn-landing-secondary:active {
    transform: translateY(0);
}

.btn-icon {
    font-size: 1.45rem;
    flex-shrink: 0;
    line-height: 1;
}

.btn-text-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.btn-label-main {
    font-size: 0.96rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: inherit;
}

.btn-label-sub {
    font-size: 0.72rem;
    font-family: var(--font-mono);
    color: rgba(226, 232, 240, 0.72);
    font-weight: 400;
}

.console-panel-footer {
    font-family: var(--font-mono);
    font-size: 0.74rem;
    color: #94a3b8;
    padding-top: 10px;
    border-top: 1px solid rgba(56, 189, 248, 0.15);
    text-align: center;
}

/* Feature Grid */
.landing-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    gap: clamp(12px, 1.8vw, 20px);
}

.feature-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: clamp(16px, 2.5vw, 24px);
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: all 0.2s ease;
}

.feature-card:hover {
    border-color: rgba(56, 189, 248, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.feature-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.feature-icon-badge {
    font-size: 1.6rem;
    width: 44px;
    height: 44px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-card-title {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.5px;
}

.feature-card-desc {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ==========================================================================
   MODALS & OVERLAYS
   ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(8px);
    padding: clamp(8px, 2vw, 20px);
}

.modal-dialog {
    background: var(--bg-panel);
    border: 1px solid var(--accent-cyan);
    box-shadow: 0 0 30px rgba(56, 189, 248, 0.2);
    border-radius: 8px;
    padding: clamp(16px, 2.5vw, 24px);
    max-width: 600px;
    width: min(94vw, 600px);
    max-height: 90vh;
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
}

#modal-tech-reveal .modal-dialog {
    max-width: min(94vw, 840px);
    width: 100%;
    display: flex;
    flex-direction: column;
}

.modal-scorecard-dialog {
    max-width: min(96vw, 1280px);
    width: min(96vw, 1280px);
    padding: clamp(14px, 2vw, 24px);
}

.modal-player-stats-dialog {
    max-width: min(96vw, 980px);
    width: min(96vw, 980px);
    padding: clamp(14px, 2vw, 24px);
}

.modal-new-game-dialog {
    max-width: min(96vw, 960px);
    width: min(96vw, 960px);
    padding: clamp(14px, 2vw, 24px);
}

.wizard-player-row {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: nowrap;
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(51, 65, 85, 0.4);
    border-radius: 6px;
    padding: 6px 10px;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.wizard-player-row:hover {
    border-color: rgba(56, 189, 248, 0.4);
    background: rgba(15, 23, 42, 0.65);
}

.tactical-input-error {
    border-color: #ef4444 !important;
    box-shadow: 0 0 6px rgba(239, 68, 68, 0.45) !important;
    background: rgba(239, 68, 68, 0.08) !important;
}

.tactical-warning-banner {
    animation: fadeIn 0.2s ease-in;
}

.btn-row-forget-player:hover,
.btn-leaderboard-forget:hover,
#btn-profile-forget-player:hover {
    background: rgba(239, 68, 68, 0.2) !important;
    border-color: #ef4444 !important;
    color: #fca5a5 !important;
}

@media (max-width: 768px) {
    .wizard-player-row {
        flex-wrap: wrap;
    }
}

.modal-title {
    font-family: var(--font-heading);
    font-size: clamp(1.1rem, 2vw, 1.3rem);
    color: var(--accent-cyan);
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-close-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
}

.modal-close-btn:hover {
    color: #fff;
}

/* Reveal Breakdown Chips */
.reveal-breakdown-chips {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.reveal-chip {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    padding: 3px 10px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
}

.reveal-chip.military { border-color: var(--military-color); color: var(--military-color); }
.reveal-chip.grid { border-color: var(--grid-color); color: var(--grid-color); }
.reveal-chip.nano { border-color: var(--nano-color); color: var(--nano-color); }
.reveal-chip.rare { border-color: var(--rare-color); color: var(--rare-color); }

/* Tech Draw Reveal Animation & Compact Grid */
.modal-tech-reveal-dialog {
    max-width: min(96vw, 1080px);
    width: 100%;
}

.drawn-tiles-reveal {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(clamp(88px, 7.8vw, 112px), 1fr));
    gap: 12px;
    margin: 10px 0;
    max-height: clamp(260px, 64dvh, 600px);
    overflow-y: auto;
    overflow-x: hidden;
    padding: 10px 14px 14px 14px;
}

.revealed-tile {
    background: #000000;
    border: 1.5px solid var(--border-color);
    border-radius: 6px;
    padding: 8px 5px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
    animation: revealPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    min-height: 84px;
    user-select: none;
}

.revealed-tile:hover,
.revealed-tile:focus {
    transform: translateY(-2px) scale(1.05);
    z-index: 10;
    outline: none;
}

.revealed-tile.military { border-color: var(--military-color); box-shadow: 0 0 10px rgba(239, 68, 68, 0.2); }
.revealed-tile.grid { border-color: var(--grid-color); box-shadow: 0 0 10px rgba(16, 185, 129, 0.2); }
.revealed-tile.nano { border-color: var(--nano-color); box-shadow: 0 0 10px rgba(245, 158, 11, 0.2); }
.revealed-tile.rare { border-color: var(--rare-color); box-shadow: 0 0 12px rgba(217, 70, 239, 0.3); }

.revealed-tile.military:hover, .revealed-tile.military:focus { box-shadow: 0 0 18px rgba(239, 68, 68, 0.55); border-color: #ff6b6b; }
.revealed-tile.grid:hover, .revealed-tile.grid:focus { box-shadow: 0 0 18px rgba(16, 185, 129, 0.55); border-color: #34d399; }
.revealed-tile.nano:hover, .revealed-tile.nano:focus { box-shadow: 0 0 18px rgba(245, 158, 11, 0.55); border-color: #fbbf24; }
.revealed-tile.rare:hover, .revealed-tile.rare:focus { box-shadow: 0 0 20px rgba(217, 70, 239, 0.65); border-color: #f472b6; }

/* Tech Draw Window (Modal) Clear Vibrant Extra Border & Glow */
.revealed-tile.new-this-round {
    outline: 2.5px solid rgba(255, 255, 255, 0.9);
    outline-offset: 3px;
    background: radial-gradient(circle at 50% 30%, rgba(255, 255, 255, 0.08) 0%, #000000 75%);
}

.revealed-tile.military.new-this-round {
    border-color: #ff6b6b;
    outline-color: #ff3333;
    box-shadow: 0 0 16px rgba(255, 51, 51, 0.65), 0 0 4px rgba(255, 51, 51, 0.9);
}

.revealed-tile.grid.new-this-round {
    border-color: #34d399;
    outline-color: #00e676;
    box-shadow: 0 0 16px rgba(0, 230, 118, 0.65), 0 0 4px rgba(0, 230, 118, 0.9);
}

.revealed-tile.nano.new-this-round {
    border-color: #fbbf24;
    outline-color: #ffb703;
    box-shadow: 0 0 16px rgba(255, 183, 3, 0.65), 0 0 4px rgba(255, 183, 3, 0.9);
}

.revealed-tile.rare.new-this-round {
    border-color: #f472b6;
    outline-color: #e056fd;
    box-shadow: 0 0 18px rgba(224, 86, 253, 0.7), 0 0 4px rgba(224, 86, 253, 0.9);
}

.revealed-tile.military.new-this-round:hover,
.revealed-tile.military.new-this-round:focus {
    box-shadow: 0 0 24px rgba(255, 51, 51, 0.8), 0 0 6px rgba(255, 51, 51, 1);
}

.revealed-tile.grid.new-this-round:hover,
.revealed-tile.grid.new-this-round:focus {
    box-shadow: 0 0 24px rgba(0, 230, 118, 0.8), 0 0 6px rgba(0, 230, 118, 1);
}

.revealed-tile.nano.new-this-round:hover,
.revealed-tile.nano.new-this-round:focus {
    box-shadow: 0 0 24px rgba(255, 183, 3, 0.8), 0 0 6px rgba(255, 183, 3, 1);
}

.revealed-tile.rare.new-this-round:hover,
.revealed-tile.rare.new-this-round:focus {
    box-shadow: 0 0 26px rgba(224, 86, 253, 0.85), 0 0 8px rgba(224, 86, 253, 1);
}

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

.revealed-icon svg {
    width: 28px;
    height: 28px;
    margin-bottom: 3px;
    filter: drop-shadow(0 0 5px currentColor);
}

.revealed-name {
    font-weight: 700;
    font-size: 0.72rem;
    line-height: 1.15;
    color: #ffffff;
    margin-top: 2px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 22px;
    max-height: 28px;
}

.revealed-cat {
    font-family: var(--font-mono);
    font-size: 0.58rem;
    text-transform: uppercase;
    margin-top: 2px;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.revealed-cost {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: bold;
    color: var(--accent-gold);
    margin-top: 2px;
}

/* Floating Tech Tooltip */
.tech-floating-tooltip {
    position: fixed;
    z-index: 10000;
    max-width: 320px;
    width: max-content;
    background: rgba(10, 14, 23, 0.98);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 14px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.85), 0 0 16px rgba(56, 189, 248, 0.2);
    pointer-events: none;
    transition: opacity 0.15s ease, transform 0.15s ease;
    backdrop-filter: blur(12px);
    text-align: left;
    color: var(--text-primary);
}

.tech-floating-tooltip.military {
    border-color: var(--military-color);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.85), 0 0 16px rgba(239, 68, 68, 0.35);
}

.tech-floating-tooltip.grid {
    border-color: var(--grid-color);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.85), 0 0 16px rgba(16, 185, 129, 0.35);
}

.tech-floating-tooltip.nano {
    border-color: var(--nano-color);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.85), 0 0 16px rgba(245, 158, 11, 0.35);
}

.tech-floating-tooltip.rare {
    border-color: var(--rare-color);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.85), 0 0 20px rgba(217, 70, 239, 0.45);
}

.tech-floating-tooltip .tooltip-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.tech-floating-tooltip .tooltip-icon svg {
    width: 26px;
    height: 26px;
    filter: drop-shadow(0 0 6px currentColor);
}

.tech-floating-tooltip .tooltip-name {
    font-weight: bold;
    font-size: 0.9rem;
    color: #ffffff;
    line-height: 1.2;
}

.tech-floating-tooltip .tooltip-category {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    text-transform: uppercase;
    margin-top: 2px;
}

.tech-floating-tooltip .tooltip-cost {
    font-family: var(--font-mono);
    font-size: 0.74rem;
    color: var(--accent-gold);
    font-weight: bold;
    margin-bottom: 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 4px;
}

.tech-floating-tooltip .tooltip-effect {
    font-size: 0.78rem;
    color: var(--text-secondary);
    line-height: 1.35;
}

@keyframes revealPop {
    0% { transform: scale(0.6); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* Buy Tech Modal - All Owned Notice */
.buy-all-owned-notice {
    background: rgba(2, 132, 199, 0.1);
    border: 1px solid rgba(2, 132, 199, 0.4);
    border-radius: 6px;
    padding: 14px 18px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--accent-cyan);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    box-shadow: 0 0 14px rgba(2, 132, 199, 0.15);
}

.buy-all-owned-notice .all-owned-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(2, 132, 199, 0.25);
    color: var(--accent-cyan);
    font-size: 0.85rem;
    font-weight: bold;
}

/* Campaign Summary & Debrief Section */
.campaign-summary-section {
    background: var(--bg-panel);
    border: 1px solid var(--accent-gold);
    border-radius: 8px;
    padding: clamp(14px, 2vw, 20px);
    margin-bottom: clamp(14px, 2vw, 20px);
    box-shadow: 0 4px 24px rgba(217, 119, 6, 0.15), 0 0 20px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    gap: 16px;
    animation: fadeIn 0.3s ease;
}

.summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    border-bottom: 1px solid rgba(217, 119, 6, 0.25);
    padding-bottom: 12px;
}

.summary-title-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.summary-trophy-badge {
    font-size: 1.8rem;
    width: 46px;
    height: 46px;
    background: rgba(217, 119, 6, 0.15);
    border: 1px solid var(--accent-gold);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 12px rgba(217, 119, 6, 0.25);
}

.summary-title {
    font-family: var(--font-heading);
    font-size: clamp(1.1rem, 2vw, 1.35rem);
    color: var(--accent-gold);
    letter-spacing: 1px;
    margin: 0;
}

.summary-subtitle {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

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

.summary-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(clamp(130px, 15vw, 200px), 1fr));
    gap: 10px;
}

.summary-kpi-card {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.summary-kpi-val {
    font-family: var(--font-mono);
    font-size: 1.35rem;
    font-weight: bold;
    color: #ffffff;
}

.summary-kpi-label {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.summary-table-wrapper {
    overflow-x: auto;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.25);
}

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

.summary-table th {
    background: rgba(0, 0, 0, 0.4);
    padding: 10px 14px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--accent-cyan);
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border-color);
}

.summary-table td {
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    vertical-align: middle;
}

.summary-table tr:last-child td {
    border-bottom: none;
}

.summary-civ-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.summary-civ-stripe {
    width: 4px;
    height: 32px;
    border-radius: 2px;
    flex-shrink: 0;
}

.summary-civ-name {
    font-weight: bold;
    color: var(--text-primary);
}

.summary-civ-faction {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-muted);
}

.summary-stat-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 10px;
    border-radius: 12px;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: bold;
    background: rgba(2, 132, 199, 0.1);
    color: var(--accent-cyan);
    border: 1px solid rgba(2, 132, 199, 0.3);
}

.summary-tech-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
}

.summary-commendations-strip {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.summary-commendation-card {
    flex: 1;
    min-width: 200px;
    background: rgba(217, 119, 6, 0.06);
    border: 1px solid rgba(217, 119, 6, 0.25);
    border-radius: 6px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.summary-commendation-icon {
    font-size: 1.4rem;
}

.summary-commendation-title {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--accent-gold);
    font-weight: bold;
    text-transform: uppercase;
}

.summary-commendation-desc {
    font-size: 0.8rem;
    color: var(--text-primary);
}


/* Session Closed Notice Banner */
.session-closed-banner {
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid var(--border-color);
    border-left: 5px solid #64748b;
    border-radius: 8px;
    padding: 12px 18px;
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.session-closed-banner.abandoned {
    border-left-color: #ef4444;
    background: rgba(239, 68, 68, 0.08);
}

.closed-banner-content {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.88rem;
    color: #cbd5e1;
}

.closed-badge {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 4px;
    background: #334155;
    color: #fff;
    letter-spacing: 1px;
}

.session-closed-banner.abandoned .closed-badge {
    background: #dc2626;
}

/* Action Log Drawer */
.action-log-container {
    max-height: 110px;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 6px 10px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.log-entry {
    color: var(--text-secondary);
}

.log-entry.highlight {
    color: var(--accent-gold);
}

/* ==========================================================================
   TACTICAL TOAST & ALERT POPUP STYLES
   ========================================================================== */
.tactical-toast-container {
    position: fixed;
    top: 68px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1200;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    pointer-events: none;
    max-width: 90vw;
}

.tactical-toast {
    background: rgba(13, 18, 29, 0.96);
    border: 1px solid var(--accent-cyan);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.7), 0 0 15px rgba(56, 189, 248, 0.25);
    border-radius: 8px;
    padding: 10px 18px;
    color: #fff;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 10px;
    pointer-events: auto;
    animation: toastSlideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.tactical-toast.fade-out {
    opacity: 0;
    transform: translateY(-8px);
}

.tactical-toast.success {
    border-color: var(--grid-color);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.7), 0 0 15px rgba(0, 230, 118, 0.25);
}

.tactical-toast.warning {
    border-color: var(--accent-gold);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.7), 0 0 15px rgba(251, 191, 36, 0.25);
}

.tactical-toast.error {
    border-color: var(--military-color);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.7), 0 0 15px rgba(255, 77, 77, 0.25);
}

.toast-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.toast-msg {
    line-height: 1.3;
}

@keyframes toastSlideDown {
    from {
        opacity: 0;
        transform: translateY(-16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   DAY / LIGHT THEME (TACTICAL SOLAR OPERATIONS DECK)
   Optimized for daytime play, bright ambient rooms, and direct overhead table glare
   ========================================================================== */
body.theme-light {
    --bg-dark: #edf2f7;
    --bg-panel: #ffffff;
    --bg-panel-light: #f8fafc;
    --border-color: #cbd5e1;
    --border-glow: rgba(2, 132, 199, 0.25);
    --input-bg: #ffffff;
    --input-color: #0f172a;
    --card-subtle-bg: #f8fafc;

    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;

    --military-color: #dc2626;
    --military-bg: rgba(220, 38, 38, 0.08);
    --military-border: rgba(220, 38, 38, 0.35);

    --grid-color: #059669;
    --grid-bg: rgba(5, 150, 105, 0.08);
    --grid-border: rgba(5, 150, 105, 0.35);

    --nano-color: #d97706;
    --nano-bg: rgba(217, 119, 6, 0.08);
    --nano-border: rgba(217, 119, 6, 0.35);

    --rare-color: #9333ea;
    --rare-bg: rgba(147, 51, 234, 0.08);
    --rare-border: rgba(147, 51, 234, 0.35);

    --accent-cyan: #0284c7;
    --accent-gold: #b45309;

    color-scheme: light;
    background-color: var(--bg-dark);
    background-image: 
        radial-gradient(circle at 15% 15%, rgba(2, 132, 199, 0.06) 0%, transparent 40%),
        radial-gradient(circle at 85% 85%, rgba(147, 51, 234, 0.06) 0%, transparent 40%);
}

/* Light Theme Component Refinements */
body.theme-light {
    scrollbar-color: #cbd5e1 #f1f5f9;
}

body.theme-light *::-webkit-scrollbar-track {
    background: #f1f5f9;
}

body.theme-light *::-webkit-scrollbar-thumb {
    background: #cbd5e1;
}

body.theme-light *::-webkit-scrollbar-thumb:hover {
    background: var(--accent-cyan);
}

body.theme-light .overseer-header {
    background: rgba(255, 255, 255, 0.96);
    border-bottom-color: #cbd5e1;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

body.theme-light .brand-title {
    color: #0f172a;
}

body.theme-light .brand-version-badge {
    color: #0284c7;
    background: rgba(2, 132, 199, 0.1);
    border-color: rgba(2, 132, 199, 0.3);
    box-shadow: none;
}

body.theme-light .brand-version-badge:hover {
    background: rgba(2, 132, 199, 0.2);
    border-color: #0284c7;
}

body.theme-light .brand-version-sub {
    color: #b45309;
}

body.theme-light .console-version-tag {
    color: #0284c7;
}

body.theme-light .scorecard-version-tag {
    color: #0284c7;
    background: rgba(2, 132, 199, 0.1);
    border-color: rgba(2, 132, 199, 0.3);
}

body.theme-light .alert-modal-system-footer {
    border-top-color: #e2e8f0;
    color: #64748b;
}

body.theme-light .alert-modal-system-footer .version-highlight {
    color: #0284c7;
}

body.theme-light .session-widget {
    background: #ffffff;
    border-color: #cbd5e1;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

body.theme-light .session-widget:hover {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 8px rgba(2, 132, 199, 0.2);
}

body.theme-light .session-label {
    color: #64748b;
}

body.theme-light .session-code {
    color: #b45309;
}

body.theme-light .btn-tactical {
    background: #ffffff;
    border-color: #cbd5e1;
    color: #334155;
}

body.theme-light .btn-tactical:hover {
    color: #0f172a;
    border-color: var(--accent-cyan);
    background: #f8fafc;
}

body.theme-light .btn-tactical.primary {
    background: rgba(2, 132, 199, 0.08);
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
}

body.theme-light .btn-tactical.primary:hover {
    background: var(--accent-cyan);
    color: #ffffff;
}

body.theme-light .btn-tactical.danger {
    background: rgba(220, 38, 38, 0.08);
    border-color: rgba(220, 38, 38, 0.35);
    color: #dc2626;
}

body.theme-light .btn-tactical.danger:hover {
    background: #dc2626;
    color: #ffffff;
}

body.theme-light .tactical-hud {
    background: #e2e8f0;
    border-bottom-color: #cbd5e1;
}

body.theme-light .round-badge {
    color: #b45309;
}

body.theme-light .round-node {
    background: #ffffff;
    border-color: #cbd5e1;
    color: #475569;
}

body.theme-light .round-node.past {
    background: #f1f5f9;
    border-color: #e2e8f0;
    color: #94a3b8;
}

body.theme-light .round-node.active {
    background: var(--accent-gold);
    border-color: var(--accent-gold);
    color: #ffffff;
    box-shadow: 0 0 10px rgba(180, 83, 9, 0.4);
}

body.theme-light .phase-strip {
    background: #ffffff;
    border-color: #cbd5e1;
}

body.theme-light .phase-step {
    color: #64748b;
}

body.theme-light .phase-step.active {
    background: var(--accent-cyan);
    color: #ffffff;
    box-shadow: 0 0 10px rgba(2, 132, 199, 0.35);
}

body.theme-light .cycle-conductor-strip {
    background: linear-gradient(90deg, #ffffff, #f8fafc);
    border-bottom-color: #cbd5e1;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

body.theme-light .turn-player-name {
    color: #0f172a;
}

body.theme-light .player-turn-avatar {
    border-color: #0f172a;
}

body.theme-light .btn-action-main.execute {
    background: #0284c7;
    color: #ffffff;
    box-shadow: 0 2px 10px rgba(2, 132, 199, 0.3);
}

body.theme-light .btn-action-main.execute:hover {
    background: #0369a1;
}

body.theme-light .btn-action-main.pass {
    background: rgba(220, 38, 38, 0.08);
    border: 1px solid #ef4444;
    color: #dc2626;
}

body.theme-light .btn-action-main.pass:hover {
    background: #dc2626;
    color: #ffffff;
}

body.theme-light .station-card {
    background: #ffffff;
    border-color: #cbd5e1;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

body.theme-light .pass-item {
    background: #f8fafc;
    border-color: #e2e8f0;
}

body.theme-light .pass-rank {
    color: #475569;
}

body.theme-light .pass-item.first {
    border-color: var(--accent-gold);
    background: rgba(217, 119, 6, 0.08);
}

body.theme-light .player-card {
    background: #ffffff;
    border-color: #cbd5e1;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

body.theme-light .player-card.active-turn {
    background: rgba(2, 132, 199, 0.05);
    border-color: var(--accent-cyan);
    box-shadow: 0 0 12px rgba(2, 132, 199, 0.15);
}

body.theme-light .player-round-order {
    background: rgba(0, 0, 0, 0.06);
    color: #475569;
    border-color: rgba(0, 0, 0, 0.14);
}

body.theme-light .player-round-order.first-player {
    background: rgba(202, 138, 4, 0.15);
    color: #b45309;
    border-color: rgba(202, 138, 4, 0.45);
    box-shadow: 0 0 8px rgba(202, 138, 4, 0.2);
}

body.theme-light .player-carousel-badge {
    background: rgba(2, 132, 199, 0.1);
    border-color: rgba(2, 132, 199, 0.28);
    color: #0369a1;
}

body.theme-light .player-name {
    color: #0f172a;
}

body.theme-light .player-status-badge {
    background: #f1f5f9;
    color: #475569;
}

body.theme-light .player-status-badge.passed {
    background: rgba(220, 38, 38, 0.08);
    color: #dc2626;
    border-color: rgba(220, 38, 38, 0.35);
}

body.theme-light .player-resources {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

body.theme-light .res-val {
    color: #0f172a;
}

body.theme-light .btn-res-adj {
    background: #e2e8f0;
    border: 1px solid #cbd5e1;
    color: #0f172a;
    width: 22px;
    height: 20px;
    border-radius: 3px;
    font-size: 0.75rem;
    cursor: pointer;
}

body.theme-light .btn-res-adj:hover {
    background: #cbd5e1;
}

body.theme-light .action-log-container {
    background: #f8fafc;
    border-color: #cbd5e1;
}

body.theme-light .log-entry {
    color: #334155;
}

body.theme-light .log-entry.highlight {
    color: var(--accent-gold);
}

body.theme-light .tray-control-panel {
    background: #ffffff;
    border-color: #cbd5e1;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

body.theme-light .badge-bag-count {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #334155;
}

body.theme-light .badge-bag-count:hover {
    background: #e0f2fe;
    border-color: #0284c7;
    color: #0369a1;
    box-shadow: 0 0 8px rgba(2, 132, 199, 0.25);
}

body.theme-light .btn-filter-pill {
    background: #ffffff;
    border-color: #cbd5e1;
    color: #334155;
}

body.theme-light .btn-filter-pill:hover,
body.theme-light .btn-filter-pill.active {
    background: var(--accent-cyan);
    border-color: var(--accent-cyan);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.25);
}

body.theme-light .tray-category-tabs {
    border-top-color: #e2e8f0;
}

body.theme-light .tray-tab {
    background: #ffffff;
    border-color: #cbd5e1;
    color: #475569;
}

body.theme-light .tray-tab:hover {
    color: #0f172a;
    border-color: #94a3b8;
    background: #f8fafc;
}

body.theme-light .tray-tab.active {
    background: var(--accent-cyan);
    border-color: var(--accent-cyan);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.25);
}

body.theme-light .tray-tab.tab-military.active {
    background: var(--military-color);
    border-color: var(--military-color);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
}

body.theme-light .tray-tab.tab-grid.active {
    background: var(--grid-color);
    border-color: var(--grid-color);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(5, 150, 105, 0.3);
}

body.theme-light .tray-tab.tab-nano.active {
    background: var(--nano-color);
    border-color: var(--nano-color);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(217, 119, 6, 0.3);
}

body.theme-light .tray-tab.tab-rare.active {
    background: var(--rare-color);
    border-color: var(--rare-color);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(147, 51, 234, 0.3);
}

body.theme-light .tray-category-block {
    background: #ffffff;
    border-color: #cbd5e1;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

body.theme-light .category-header {
    border-bottom-color: #e2e8f0;
}

body.theme-light .tech-tile-card {
    background: #ffffff;
    border-color: #cbd5e1;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

body.theme-light .tech-tile-card:hover {
    border-color: var(--accent-cyan);
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.18);
}

body.theme-light .tech-tile-card.available {
    background: #ffffff;
}

body.theme-light .tech-tile-card.empty {
    background: #f1f5f9;
    border: 1px dashed #cbd5e1;
    box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.08);
    opacity: 0.65;
    filter: grayscale(40%);
}

body.theme-light .tech-tile-card.empty:hover {
    border-color: #94a3b8;
    box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.08);
}

body.theme-light .tech-tile-card.empty .tile-name {
    color: #64748b;
}

body.theme-light .tech-tile-card.empty .tile-icon-box {
    opacity: 0.35;
    filter: grayscale(80%);
}

body.theme-light .tech-tile-card.empty .tile-qty-badge.zero {
    background: #e2e8f0;
    border-color: #cbd5e1;
    color: #94a3b8;
}

body.theme-light .tech-tile-card.empty .tile-cost {
    color: #64748b;
    opacity: 0.8;
}

body.theme-light .hero-title {
    color: #ffffff;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.95), 0 0 35px rgba(56, 189, 248, 0.65);
}

body.theme-light .hero-badge {
    background: rgba(14, 165, 233, 0.2);
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.25);
}

body.theme-light .hero-desc {
    color: #cbd5e1;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.9);
}

body.theme-light .resume-active-card {
    background: linear-gradient(135deg, rgba(217, 119, 6, 0.08), #ffffff);
    border-color: var(--accent-gold);
    box-shadow: 0 2px 12px rgba(217, 119, 6, 0.15);
}

body.theme-light .resume-details {
    color: #0f172a;
}

body.theme-light .landing-hero {
    border-color: #94a3b8;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

body.theme-light .landing-hero-overlay {
    background: 
        radial-gradient(ellipse 95% 75% at 50% 45%, rgba(15, 23, 42, 0.55) 0%, rgba(15, 23, 42, 0.88) 75%, #0f172a 100%),
        linear-gradient(to bottom, rgba(15, 23, 42, 0.72) 0%, rgba(15, 23, 42, 0.35) 35%, rgba(15, 23, 42, 0.9) 80%, #0f172a 100%);
}

body.theme-light .landing-console-panel {
    background: rgba(15, 23, 42, 0.88);
    border-color: rgba(56, 189, 248, 0.4);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

body.theme-light .btn-landing-secondary {
    background: rgba(30, 41, 59, 0.85);
    border-color: rgba(148, 163, 184, 0.35);
    color: #f8fafc;
}

body.theme-light .btn-landing-secondary:hover {
    border-color: var(--accent-cyan);
    background: rgba(51, 65, 85, 0.95);
    color: #ffffff;
}

body.theme-light .btn-label-sub {
    color: #94a3b8;
}

body.theme-light .feature-card {
    background: #ffffff;
    border-color: #cbd5e1;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

body.theme-light .feature-card:hover {
    border-color: var(--accent-cyan);
    box-shadow: 0 4px 16px rgba(2, 132, 199, 0.15);
}

body.theme-light .feature-card-title {
    color: #0f172a;
}

body.theme-light .feature-card-desc {
    color: #475569;
}

body.theme-light .feature-icon-badge {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

body.theme-light .modal-overlay {
    background: rgba(15, 23, 42, 0.65);
}

body.theme-light .modal-dialog {
    background: #ffffff;
    border-color: #cbd5e1;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
    color: #0f172a;
}

body.theme-light .modal-close-btn {
    color: #64748b;
}

body.theme-light .modal-close-btn:hover {
    color: #0f172a;
}

body.theme-light .reveal-chip {
    background: #f8fafc;
    border-color: #cbd5e1;
}

body.theme-light .revealed-tile {
    background: #ffffff;
    border-color: #cbd5e1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

body.theme-light .revealed-tile:hover {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.14);
}

body.theme-light .revealed-tile .revealed-name {
    color: #0f172a;
}

body.theme-light .tech-tile-card.new-this-round {
    outline-color: #0284c7;
    box-shadow: 0 0 10px rgba(2, 132, 199, 0.4);
}
body.theme-light .tray-category-block.military .tech-tile-card.new-this-round {
    outline-color: #dc2626;
    box-shadow: 0 0 12px rgba(220, 38, 38, 0.45);
    border-color: rgba(220, 38, 38, 0.7);
}
body.theme-light .tray-category-block.grid .tech-tile-card.new-this-round {
    outline-color: #059669;
    box-shadow: 0 0 12px rgba(5, 150, 105, 0.45);
    border-color: rgba(5, 150, 105, 0.7);
}
body.theme-light .tray-category-block.nano .tech-tile-card.new-this-round {
    outline-color: #d97706;
    box-shadow: 0 0 12px rgba(217, 119, 6, 0.45);
    border-color: rgba(217, 119, 6, 0.7);
}
body.theme-light .tray-category-block.rare .tech-tile-card.new-this-round {
    outline-color: #9333ea;
    box-shadow: 0 0 14px rgba(147, 51, 234, 0.45);
    border-color: rgba(147, 51, 234, 0.7);
}

body.theme-light .revealed-tile.military.new-this-round {
    outline-color: #dc2626;
    border-color: #dc2626;
    box-shadow: 0 0 12px rgba(220, 38, 38, 0.4);
}
body.theme-light .revealed-tile.grid.new-this-round {
    outline-color: #059669;
    border-color: #059669;
    box-shadow: 0 0 12px rgba(5, 150, 105, 0.4);
}
body.theme-light .revealed-tile.nano.new-this-round {
    outline-color: #d97706;
    border-color: #d97706;
    box-shadow: 0 0 12px rgba(217, 119, 6, 0.4);
}
body.theme-light .revealed-tile.rare.new-this-round {
    outline-color: #9333ea;
    border-color: #9333ea;
    box-shadow: 0 0 14px rgba(147, 51, 234, 0.4);
}

body.theme-light .tech-floating-tooltip {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2), 0 0 16px rgba(0, 0, 0, 0.08);
}

body.theme-light .tech-floating-tooltip .tooltip-name {
    color: #0f172a;
}

body.theme-light .tech-floating-tooltip .tooltip-effect {
    color: #334155;
}

body.theme-light .tech-floating-tooltip .tooltip-cost {
    border-bottom-color: #e2e8f0;
}


body.theme-light .session-closed-banner {
    background: #ffffff;
    border-color: #cbd5e1;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

body.theme-light .closed-banner-content {
    color: #0f172a;
}

body.theme-light .closed-badge {
    background: #e2e8f0;
    color: #334155;
}

body.theme-light .tactical-toast {
    background: #ffffff;
    color: #0f172a;
    border-color: #cbd5e1;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

body.theme-light .empty-cat-notice {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #64748b;
}

body.theme-light .buy-all-owned-notice {
    background: #f0fdf4;
    border-color: #86efac;
    color: #166534;
    box-shadow: 0 1px 4px rgba(22, 101, 52, 0.08);
}

body.theme-light .buy-all-owned-notice .all-owned-badge {
    background: #dcfce7;
    color: #166534;
}

body.theme-light .campaign-summary-section {
    background: #ffffff;
    border-color: #cbd5e1;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

body.theme-light .summary-header {
    border-bottom-color: #e2e8f0;
}

body.theme-light .summary-title {
    color: #b45309;
}

body.theme-light .summary-trophy-badge {
    background: rgba(217, 119, 6, 0.1);
    border-color: #f59e0b;
}

body.theme-light .summary-kpi-card {
    background: #f8fafc;
    border-color: #cbd5e1;
}

body.theme-light .summary-kpi-val {
    color: #0f172a;
}

body.theme-light .summary-table-wrapper {
    background: #ffffff;
    border-color: #cbd5e1;
}

body.theme-light .summary-table th {
    background: #f1f5f9;
    color: #0f172a;
    border-bottom-color: #cbd5e1;
}

body.theme-light .summary-table td {
    border-bottom-color: #e2e8f0;
}

body.theme-light .summary-civ-name {
    color: #0f172a;
}

body.theme-light .summary-stat-badge {
    background: #f1f5f9;
    color: #0369a1;
    border-color: #bae6fd;
}

body.theme-light .summary-commendation-card {
    background: #fffbeb;
    border-color: #fde68a;
}

body.theme-light .summary-commendation-desc {
    color: #0f172a;
}

/* ==========================================================================
   FINAL GAME SCORECARD STYLES
   ========================================================================== */
.scorecard-table-wrapper {
    background: var(--surface-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    overflow-x: auto;
}

.scorecard-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
    min-width: 860px;
}

.scorecard-table th {
    background: rgba(15, 23, 42, 0.95);
    padding: 8px 4px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--accent-cyan);
    letter-spacing: 0.05em;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.scorecard-table td {
    padding: 6px 4px;
    border-bottom: 1px solid rgba(51, 65, 85, 0.4);
    text-align: center;
    vertical-align: middle;
}

.scorecard-civ-cell {
    display: flex;
    align-items: center;
    gap: 8px;
    text-align: left;
    padding-left: 6px;
}

.scorecard-civ-stripe {
    width: 4px;
    height: 32px;
    border-radius: 2px;
    flex-shrink: 0;
}

.scorecard-civ-name {
    font-weight: 700;
    font-size: 0.85rem;
    line-height: 1.2;
}

.scorecard-civ-code {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--accent-gold);
}

.scorecard-stepper {
    display: inline-flex;
    align-items: stretch;
    position: relative;
    width: 48px;
    height: 30px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    background: rgba(15, 23, 42, 0.85);
    transition: border-color 0.15s, box-shadow 0.15s;
    overflow: hidden;
    vertical-align: middle;
    box-sizing: border-box;
}

.scorecard-stepper:focus-within {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 6px rgba(56, 189, 248, 0.4);
}

.scorecard-stepper:hover {
    border-color: rgba(56, 189, 248, 0.6);
}

.scorecard-input {
    width: 30px;
    min-width: 0;
    flex: 1;
    padding: 2px 1px;
    border: none;
    border-radius: 0;
    background: transparent;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.88rem;
    font-weight: 700;
    text-align: center;
    box-shadow: none;
    outline: none;
    transition: color 0.15s;
    -moz-appearance: textfield;
    box-sizing: border-box;
}

.scorecard-input::-webkit-outer-spin-button,
.scorecard-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.scorecard-input:focus {
    border: none;
    box-shadow: none;
    outline: none;
}

.scorecard-stepper-controls {
    display: flex;
    flex-direction: column;
    width: 17px;
    flex-shrink: 0;
    border-left: 1px solid rgba(51, 65, 85, 0.6);
    background: rgba(30, 41, 59, 0.7);
    box-sizing: border-box;
}

.scorecard-step-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 50%;
    width: 100%;
    padding: 0;
    margin: 0;
    background: transparent;
    border: none;
    color: var(--accent-cyan);
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    transition: background 0.1s, color 0.1s;
    box-sizing: border-box;
}

.scorecard-step-btn:hover:not(:disabled) {
    background: rgba(56, 189, 248, 0.35);
    color: #ffffff;
}

.scorecard-step-btn:active:not(:disabled) {
    background: rgba(56, 189, 248, 0.65);
    color: #ffffff;
}

.scorecard-step-btn:disabled {
    opacity: 0.22;
    cursor: not-allowed;
    color: var(--text-muted);
}

.scorecard-step-btn.step-up {
    border-bottom: 1px solid rgba(51, 65, 85, 0.5);
}

.scorecard-step-btn svg {
    pointer-events: none;
    display: block;
}

.scorecard-total-vp {
    font-family: var(--font-mono);
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--accent-cyan);
}

.scorecard-rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-weight: bold;
    font-size: 0.85rem;
    padding: 3px 8px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    min-width: 44px;
}

.scorecard-rank-badge.rank-1 {
    background: rgba(234, 179, 8, 0.2);
    border-color: var(--accent-gold);
    color: var(--accent-gold);
    box-shadow: 0 0 8px rgba(234, 179, 8, 0.3);
}

.scorecard-rank-badge.rank-2 {
    background: rgba(148, 163, 184, 0.2);
    border-color: #94a3b8;
    color: #e2e8f0;
}

.scorecard-rank-badge.rank-3 {
    background: rgba(180, 83, 9, 0.2);
    border-color: #b45309;
    color: #f59e0b;
}

/* ==========================================================================
   POST-GAME PLAYER TOP LIST & CAREER SUMMARY
   ========================================================================== */
.summary-toplist-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: var(--surface-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
}

.toplist-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
    margin-bottom: 6px;
}

.toplist-title {
    font-family: var(--font-heading);
    font-size: 1rem;
    color: var(--accent-gold);
    display: flex;
    align-items: center;
    gap: 8px;
}

.toplist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 14px;
}

.toplist-rows {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.toplist-row {
    background: var(--surface-secondary);
    border: 1px solid var(--border-color);
    border-left: 5px solid var(--accent-cyan);
    border-radius: 6px;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
    overflow: hidden;
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.toplist-row:hover {
    transform: translateX(4px);
    border-color: var(--accent-cyan);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

.toplist-row.champion {
    border-color: var(--accent-gold);
    border-left-color: var(--accent-gold);
    box-shadow: 0 0 16px rgba(234, 179, 8, 0.2);
    background: linear-gradient(90deg, rgba(234, 179, 8, 0.08) 0%, var(--surface-secondary) 40%);
}

.toplist-card {
    background: var(--surface-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.toplist-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

.toplist-card.is-winner {
    border-color: var(--accent-gold);
    box-shadow: 0 0 16px rgba(234, 179, 8, 0.2);
}

.toplist-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
}

.toplist-player-title {
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1.2;
}

.toplist-player-sub {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-muted);
}

.toplist-score-badge {
    text-align: right;
    font-family: var(--font-mono);
}

.toplist-match-vp {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--accent-cyan);
    line-height: 1;
}

.toplist-match-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.toplist-career-kpis {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    background: rgba(15, 23, 42, 0.6);
    border-radius: 4px;
    padding: 8px;
    text-align: center;
}

.career-kpi-val {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-primary);
}

.career-kpi-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.toplist-races-list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}

.race-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.25);
    color: var(--text-secondary);
}

/* ==========================================================================
   INTERACTIVE SVG DEVELOPMENT GRAPH
   ========================================================================== */
.summary-development-container {
    background: var(--surface-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.development-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.graph-player-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.graph-player-pill {
    padding: 5px 12px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    background: var(--surface-secondary);
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}

.graph-player-pill:hover {
    border-color: var(--accent-cyan);
    color: var(--text-primary);
}

.graph-player-pill.active {
    background: rgba(56, 189, 248, 0.2);
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
    font-weight: 700;
}

.trend-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 14px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
}

.trend-badge.improving {
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid #10b981;
    color: #34d399;
}

.trend-badge.declining {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid #ef4444;
    color: #f87171;
}

.trend-badge.steady {
    background: rgba(56, 189, 248, 0.2);
    border: 1px solid var(--accent-cyan);
    color: var(--accent-cyan);
}

.graph-svg-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 6px;
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid rgba(51, 65, 85, 0.4);
    padding: 10px 0;
}

.player-dev-svg {
    width: 100%;
    height: 220px;
    display: block;
}

.graph-grid-line {
    stroke: rgba(51, 65, 85, 0.35);
    stroke-dasharray: 3 3;
}

.graph-axis-text {
    fill: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 10px;
}

.graph-data-line {
    fill: none;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.graph-data-area {
    opacity: 0.25;
}

.graph-trend-line {
    stroke-dasharray: 5 4;
    stroke-width: 2;
    opacity: 0.85;
}

.graph-point-circle {
    cursor: pointer;
    transition: r 0.2s, stroke-width 0.2s;
}

.graph-point-circle:hover {
    r: 7;
    stroke-width: 3;
}

.graph-floating-tooltip {
    position: absolute;
    display: none;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid var(--accent-cyan);
    border-radius: 4px;
    padding: 6px 10px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-primary);
    pointer-events: none;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    white-space: nowrap;
    transform: translate(-50%, -120%);
}

/* ==========================================================================
   LIGHT THEME ADAPTATIONS
   ========================================================================== */
body.theme-light .scorecard-table-wrapper {
    background: #ffffff;
    border-color: #cbd5e1;
}

body.theme-light .scorecard-table th {
    background: #f1f5f9;
    color: #0369a1;
    border-bottom-color: #cbd5e1;
}

body.theme-light .scorecard-table td {
    border-bottom-color: #e2e8f0;
}

body.theme-light .scorecard-stepper {
    background: #f8fafc;
    border-color: #cbd5e1;
}

body.theme-light .scorecard-stepper:focus-within {
    border-color: #0284c7;
    box-shadow: 0 0 6px rgba(2, 132, 199, 0.3);
}

body.theme-light .scorecard-stepper:hover {
    border-color: #0284c7;
}

body.theme-light .scorecard-input {
    background: transparent;
    color: #0f172a;
}

body.theme-light .scorecard-stepper-controls {
    border-left-color: #cbd5e1;
    background: #f1f5f9;
}

body.theme-light .scorecard-step-btn {
    color: #0369a1;
}

body.theme-light .scorecard-step-btn:hover:not(:disabled) {
    background: #e0f2fe;
    color: #0284c7;
}

body.theme-light .scorecard-step-btn:active:not(:disabled) {
    background: #bae6fd;
    color: #0284c7;
}

body.theme-light .scorecard-step-btn:disabled {
    opacity: 0.25;
    color: #94a3b8;
}

body.theme-light .scorecard-step-btn.step-up {
    border-bottom-color: #cbd5e1;
}

body.theme-light .summary-toplist-container,
body.theme-light .summary-development-container {
    background: #ffffff;
    border-color: #cbd5e1;
}

body.theme-light .toplist-card,
body.theme-light .toplist-row {
    background: #f8fafc;
    border-color: #cbd5e1;
}

body.theme-light .toplist-row:hover {
    border-color: #0369a1;
}

body.theme-light .toplist-row.champion {
    background: linear-gradient(90deg, rgba(234, 179, 8, 0.12) 0%, #ffffff 40%);
    border-color: #d97706;
}

body.theme-light .toplist-career-kpis {
    background: #f1f5f9;
}

body.theme-light .graph-svg-wrapper {
    background: #f8fafc;
    border-color: #e2e8f0;
}

body.theme-light .graph-grid-line {
    stroke: rgba(203, 213, 225, 0.6);
}

body.theme-light .graph-axis-text {
    fill: #64748b;
}

body.theme-light .wizard-player-row {
    background: rgba(241, 245, 249, 0.7);
    border-color: rgba(203, 213, 225, 0.8);
}

body.theme-light .wizard-player-row:hover {
    background: #ffffff;
    border-color: rgba(3, 105, 161, 0.4);
}

body.theme-light .tactical-input-error {
    border-color: #dc2626 !important;
    box-shadow: 0 0 6px rgba(220, 38, 38, 0.3) !important;
    background: #fef2f2 !important;
}

/* ==========================================================================
   KIOSK & COMPACT SCREEN SCALING (ZERO SCROLLBAR OPTIMIZATION)
   ========================================================================== */
@media (max-height: 840px) {
    .overseer-header {
        min-height: 40px;
        padding: 3px 10px;
    }
    .brand-title {
        font-size: 0.95rem;
    }
    .brand-version-badge {
        font-size: 0.58rem;
        padding: 1px 4px;
    }
    .brand-subtitle {
        display: none;
    }
    .tactical-hud {
        padding: 2px 10px;
    }
    .round-badge {
        font-size: 0.78rem;
    }
    .round-nodes {
        gap: 3px;
    }
    .round-node {
        width: 19px;
        height: 19px;
        font-size: 0.62rem;
    }
    .phase-step {
        padding: 2px 6px;
        font-size: 0.62rem;
    }
    .cycle-conductor-strip {
        padding: 3px 10px;
    }
    .player-turn-avatar {
        width: 22px;
        height: 22px;
    }
    .turn-player-name {
        font-size: 0.82rem;
    }
    .btn-action-main {
        padding: 3px 8px;
        font-size: 0.72rem;
    }
    .overseer-grid {
        padding: 4px 8px;
        gap: 6px;
    }
    .tray-section {
        gap: 5px;
    }
    .tray-control-panel {
        padding: 3px 8px;
        gap: 4px;
    }
    .tray-category-block {
        padding: 3px 8px 3px;
    }
    .category-header {
        padding-bottom: 2px;
        margin-bottom: 2px;
    }
    .category-title {
        font-size: 0.74rem;
    }
    .tech-tile-card {
        min-height: 66px;
        padding: 3px 4px;
        flex: 0 0 86px;
        width: 86px;
    }
    .tile-icon-box {
        width: 18px;
        height: 18px;
    }
    .tile-icon-box svg {
        width: 16px;
        height: 16px;
    }
    .tile-name {
        font-size: 0.64rem;
    }
    .tile-cost {
        font-size: 0.60rem;
    }
    .station-card {
        padding: 5px 8px;
    }
    .action-log-container {
        max-height: 70px;
    }
}

/* Dedicated Kiosk Mode Styling */
body.kiosk-mode .brand-subtitle,
body.kiosk-mode #link-wrench-lab,
body.kiosk-mode #btn-landing-code,
body.kiosk-mode #btn-resume-modal,
body.kiosk-mode #btn-player-stats-modal {
    display: none !important;
}

body.kiosk-mode .overseer-header {
    padding: 3px 10px;
    min-height: 38px;
}

body.kiosk-mode .overseer-grid {
    padding: 4px 8px;
    gap: 8px;
}

body.kiosk-mode .tactical-hud {
    padding: 3px 8px;
}

body.kiosk-mode .cycle-conductor-strip {
    padding: 4px 8px;
}

/* ==========================================================================
   TURN COUNTDOWN TIMER WIDGET (TOP VISUAL TIMER)
   ========================================================================== */
.turn-timer-widget {
    display: inline-flex;
    align-items: center;
    gap: clamp(8px, 1.2vw, 14px);
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(56, 189, 248, 0.35);
    border-radius: 8px;
    padding: clamp(3px, 0.6vh, 6px) clamp(8px, 1vw, 14px);
    backdrop-filter: blur(8px);
    transition: all 0.25s ease;
}

.turn-timer-widget.timer-warning {
    border-color: rgba(245, 158, 11, 0.6);
    background: rgba(30, 20, 10, 0.85);
}

.turn-timer-widget.timer-critical {
    border-color: rgba(239, 68, 68, 0.8);
    background: rgba(40, 15, 20, 0.9);
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.4);
}

.turn-timer-widget.timer-expired {
    border-color: #ef4444;
    background: rgba(60, 10, 15, 0.95);
    box-shadow: 0 0 18px rgba(239, 68, 68, 0.7);
    animation: timerPulseRed 1s infinite alternate ease-in-out;
}

@keyframes timerPulseRed {
    0% { box-shadow: 0 0 8px rgba(239, 68, 68, 0.4); }
    100% { box-shadow: 0 0 20px rgba(239, 68, 68, 0.85); }
}

.timer-countdown-block {
    display: flex;
    flex-direction: column;
    min-width: clamp(120px, 14vw, 175px);
}

.timer-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-muted);
}

.timer-title {
    color: var(--accent-cyan);
    font-weight: 600;
    letter-spacing: 0.5px;
}

.timer-status-badge {
    font-size: 0.62rem;
    padding: 1px 5px;
    border-radius: 3px;
    background: rgba(56, 189, 248, 0.15);
    color: var(--accent-cyan);
    border: 1px solid rgba(56, 189, 248, 0.3);
    font-weight: bold;
    text-transform: uppercase;
}

.timer-status-badge.badge-paused {
    background: rgba(245, 158, 11, 0.2);
    color: var(--accent-gold);
    border-color: var(--accent-gold);
}

.timer-status-badge.badge-expired {
    background: #ef4444;
    color: #fff;
    border-color: #ef4444;
    font-weight: 800;
    animation: blinkAlert 0.8s infinite;
}

@keyframes blinkAlert {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.timer-digits-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
}

.turn-timer-digits {
    font-family: var(--font-mono);
    font-size: clamp(1.15rem, 1.6vw, 1.45rem);
    font-weight: 800;
    color: var(--accent-cyan);
    letter-spacing: 1px;
    line-height: 1.1;
}

.turn-timer-widget.timer-warning .turn-timer-digits {
    color: var(--accent-gold);
}

.turn-timer-widget.timer-critical .turn-timer-digits {
    color: #f87171;
}

.turn-timer-widget.timer-expired .turn-timer-digits {
    color: #fca5a5;
}

.turn-timer-total {
    font-family: var(--font-mono);
    font-size: clamp(0.62rem, 0.75vw, 0.72rem);
    color: var(--text-muted);
    white-space: nowrap;
}

.timer-bar-track {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 3px;
}

.turn-timer-bar {
    height: 100%;
    background: linear-gradient(90deg, #06b6d4, #38bdf8);
    transition: width 0.3s ease, background 0.3s ease;
    border-radius: 2px;
}

.turn-timer-widget.timer-warning .turn-timer-bar {
    background: linear-gradient(90deg, #d97706, #f59e0b);
}

.turn-timer-widget.timer-critical .turn-timer-bar {
    background: linear-gradient(90deg, #dc2626, #ef4444);
}

.turn-timer-widget.timer-expired .turn-timer-bar {
    background: #ef4444;
}

.timer-controls-block {
    display: flex;
    align-items: center;
    gap: 4px;
}

.btn-timer-ctrl {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: clamp(3px, 0.5vh, 5px) clamp(5px, 0.8vw, 8px);
    border-radius: 4px;
    font-size: clamp(0.72rem, 0.9vw, 0.82rem);
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-timer-ctrl:hover {
    background: rgba(56, 189, 248, 0.15);
    border-color: var(--accent-cyan);
}

/* Most time badges */
.scorecard-rank-badge.most-time-badge,
.badge-most-time {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid #ef4444;
    color: #fca5a5;
    font-size: 0.72rem;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

/* Light Theme support */
body.theme-light .turn-timer-widget {
    background: #ffffff;
    border-color: #cbd5e1;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

body.theme-light .turn-timer-digits {
    color: #0284c7;
}

body.theme-light .turn-timer-widget.timer-warning {
    border-color: #f59e0b;
    background: #fffbeb;
}

body.theme-light .turn-timer-widget.timer-warning .turn-timer-digits {
    color: #d97706;
}

body.theme-light .turn-timer-widget.timer-critical {
    border-color: #ef4444;
    background: #fef2f2;
}

body.theme-light .turn-timer-widget.timer-critical .turn-timer-digits {
    color: #dc2626;
}

body.theme-light .btn-timer-ctrl {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #1e293b;
}

body.theme-light .btn-timer-ctrl:hover {
    background: #e2e8f0;
    border-color: #0284c7;
}

body.theme-light .scorecard-rank-badge.most-time-badge,
body.theme-light .badge-most-time {
    background: #fef2f2;
    border-color: #ef4444;
    color: #dc2626;
}

/* Kiosk mode compaction */
body.kiosk-mode .turn-timer-widget {
    padding: 2px 8px;
    gap: 8px;
}

body.kiosk-mode .turn-timer-digits {
    font-size: 1.05rem;
}

body.kiosk-mode .timer-countdown-block {
    min-width: 110px;
}

/* ==========================================================================
   LANDING / BRIEFING & CAPABILITIES STYLES (SEO & UX)
   ========================================================================== */
.landing-briefing {
    width: 100%;
    max-width: min(96vw, 1600px);
    margin-top: clamp(32px, 5vh, 64px);
    margin-bottom: clamp(32px, 5vh, 64px);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    gap: clamp(24px, 4vh, 48px);
}

.briefing-header {
    text-align: center;
}

.briefing-tag {
    display: inline-block;
    font-family: var(--font-mono, monospace);
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    color: var(--accent-cyan, #38bdf8);
    margin-bottom: 8px;
}

.briefing-title {
    font-family: var(--font-cinzel, 'Cinzel', serif);
    font-size: clamp(1.4rem, 2.5vw, 2.2rem);
    font-weight: 900;
    color: #f8fafc;
    letter-spacing: 0.05em;
    margin: 0 0 12px 0;
}

.briefing-subtitle {
    font-family: var(--font-sans, 'Syne', sans-serif);
    font-size: clamp(0.95rem, 1.2vw, 1.15rem);
    color: #94a3b8;
    max-width: 720px;
    margin: 0 auto;
    line-height: 1.6;
}

.briefing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: clamp(16px, 2vw, 24px);
}

.briefing-card {
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(56, 189, 248, 0.2);
    border-radius: 12px;
    padding: clamp(18px, 2.5vh, 28px);
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.briefing-card:hover {
    transform: translateY(-3px);
    border-color: rgba(56, 189, 248, 0.5);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
}

.briefing-card-icon {
    font-size: 1.8rem;
}

.briefing-card-title {
    font-family: var(--font-cinzel, 'Cinzel', serif);
    font-size: 1.15rem;
    font-weight: 700;
    color: #e2e8f0;
    margin: 0;
}

.briefing-card-desc {
    font-family: var(--font-sans, 'Syne', sans-serif);
    font-size: 0.9rem;
    line-height: 1.6;
    color: #94a3b8;
    margin: 0;
}

.briefing-faq-section {
    background: rgba(6, 11, 25, 0.6);
    border: 1px solid rgba(56, 189, 248, 0.2);
    border-radius: 16px;
    padding: clamp(20px, 3vh, 36px);
}

.briefing-faq-header {
    text-align: center;
    margin-bottom: 24px;
}

.briefing-faq-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 900px;
    margin: 0 auto;
}

.faq-item {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(56, 189, 248, 0.15);
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.2s ease;
}

.faq-item[open] {
    border-color: rgba(56, 189, 248, 0.4);
}

.faq-question {
    font-family: var(--font-cinzel, 'Cinzel', serif);
    font-weight: 700;
    font-size: 1rem;
    color: #38bdf8;
    padding: 14px 18px;
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.faq-question::-webkit-details-marker {
    display: none;
}

.faq-question::after {
    content: '▼';
    font-size: 0.75rem;
    transition: transform 0.2s ease;
}

.faq-item[open] .faq-question::after {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 18px 16px 18px;
    font-family: var(--font-sans, 'Syne', sans-serif);
    font-size: 0.92rem;
    line-height: 1.65;
    color: #cbd5e1;
}

.faq-answer p {
    margin: 0;
}

.faq-answer code {
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: var(--font-mono, monospace);
    font-size: 0.85em;
}

/* Light Theme Overrides for Briefing */
body.theme-light .briefing-title {
    color: #0f172a;
}

body.theme-light .briefing-subtitle {
    color: #475569;
}

body.theme-light .briefing-card {
    background: #f8fafc;
    border-color: #cbd5e1;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

body.theme-light .briefing-card:hover {
    border-color: #0284c7;
    box-shadow: 0 8px 24px rgba(2, 132, 199, 0.15);
}

body.theme-light .briefing-card-title {
    color: #0f172a;
}

body.theme-light .briefing-card-desc {
    color: #475569;
}

body.theme-light .briefing-faq-section {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

body.theme-light .faq-item {
    background: #ffffff;
    border-color: #e2e8f0;
}

body.theme-light .faq-item[open] {
    border-color: #0284c7;
}

body.theme-light .faq-question {
    color: #0284c7;
}

body.theme-light .faq-answer {
    color: #334155;
}



