
/* ========================================
   Phase 1: Situation Board
   ======================================== */
#situation-board {
    margin-bottom: 10px;
    padding: 10px 12px;
    background: linear-gradient(180deg, #121722 0%, #0c1018 100%);
    border: 2px solid #555;
    border-radius: 4px;
    min-height: 150px;
    box-shadow:
        inset 0 2px 8px rgba(0, 0, 0, 0.65),
        0 2px 5px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

#situation-board:empty::before {
    content: "ALL SYSTEMS NOMINAL";
    color: #5d6b80;
    font-family: var(--font-teletype);
    font-size: 12px;
    display: block;
    text-align: center;
    padding-top: 60px;
    letter-spacing: 2px;
}

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

.situation-instruments {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 10px;
}

.instrument-card {
    position: relative;
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #7d6544;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.2) 0%, rgba(233, 214, 180, 0.15) 100%),
        linear-gradient(180deg, #e6d0a9 0%, #d0b07f 100%);
    color: #1f1710;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.45),
        inset 0 -1px 0 rgba(0, 0, 0, 0.08),
        0 1px 3px rgba(0, 0, 0, 0.35);
}

.instrument-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 4px;
    pointer-events: none;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, transparent 42%),
        radial-gradient(circle at 20% 16%, rgba(255, 255, 255, 0.24) 0%, transparent 38%);
}

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

.instrument-label {
    font-family: var(--font-teletype);
    font-size: 10px;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: bold;
    color: #4f3b24;
}

.nixie-readout {
    display: inline-flex;
    gap: 3px;
    padding: 3px 4px;
    border-radius: 3px;
    border: 1px solid #49321a;
    background: linear-gradient(180deg, #20140b 0%, #0e0804 100%);
    box-shadow:
        inset 0 1px 2px rgba(0, 0, 0, 0.6),
        0 0 8px rgba(255, 141, 0, 0.15);
}

.nixie-digit {
    width: 18px;
    height: 26px;
    border-radius: 2px;
    border: 1px solid rgba(171, 116, 56, 0.3);
    background: radial-gradient(circle at 50% 38%, rgba(250, 177, 92, 0.16) 0%, rgba(0, 0, 0, 0.92) 78%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.8);
}

.nixie-digit-glyph {
    font-family: var(--font-teletype);
    font-size: 18px;
    line-height: 1;
    color: #ffb461;
    text-shadow:
        0 0 3px rgba(255, 179, 84, 0.95),
        0 0 8px rgba(255, 122, 30, 0.45);
    animation: nixie-flicker 3s steps(2, end) infinite;
}

.nixie-digit-2 .nixie-digit-glyph { animation-delay: 0.14s; }
.nixie-digit-3 .nixie-digit-glyph { animation-delay: 0.26s; }

.defcon-dial {
    position: relative;
    width: 122px;
    height: 78px;
    margin: 6px auto 4px;
    border: 1px solid #7a6646;
    border-bottom: 0;
    border-radius: 110px 110px 0 0;
    background: radial-gradient(circle at 50% 90%, #f7e8cf 0%, #d9bf94 58%, #b28d55 100%);
    overflow: hidden;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.45),
        inset 0 -1px 0 rgba(0, 0, 0, 0.12);
}

.defcon-dial::before {
    content: '';
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 8px;
    border-top: 1px solid rgba(44, 30, 13, 0.35);
}

.defcon-mark {
    position: absolute;
    font-family: var(--font-teletype);
    font-size: 10px;
    font-weight: bold;
    color: #3f2d1a;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
}

.defcon-mark.mark-5 { left: 10px; bottom: 10px; }
.defcon-mark.mark-4 { left: 24px; bottom: 34px; }
.defcon-mark.mark-3 { left: 56px; bottom: 50px; transform: translateX(-50%); }
.defcon-mark.mark-2 { right: 24px; bottom: 34px; }
.defcon-mark.mark-1 { right: 10px; bottom: 10px; }

.defcon-needle {
    position: absolute;
    left: 50%;
    bottom: 7px;
    width: 2px;
    height: 50px;
    transform-origin: 50% calc(100% - 1px);
    transform: translateX(-50%) rotate(var(--defcon-angle, -120deg));
    transition: transform 0.35s ease-out;
    background: linear-gradient(180deg, #1b1612 0%, #4f2112 100%);
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.4);
}

.defcon-needle::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 8px solid #6a2617;
}

.defcon-hub {
    position: absolute;
    left: 50%;
    bottom: 4px;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    transform: translateX(-50%);
    background: radial-gradient(circle at 35% 35%, #f2d3a0 0%, #8f6230 68%, #5d3d20 100%);
    border: 1px solid #4f3115;
}

.defcon-card.defcon-level-1 .defcon-dial,
.defcon-card.defcon-level-2 .defcon-dial {
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.45),
        inset 0 -1px 0 rgba(0, 0, 0, 0.12),
        0 0 12px rgba(220, 20, 60, 0.35);
}

.tension-analog-meter {
    margin-top: 8px;
}

.tension-track {
    position: relative;
    height: 20px;
    border-radius: 999px;
    border: 1px solid #5f4a2f;
    background: #1b160f;
    box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.55);
}

.tension-track::before {
    content: '';
    position: absolute;
    inset: 3px;
    border-radius: 999px;
    background: linear-gradient(
        90deg,
        var(--defcon-5) 0%,
        var(--defcon-4) 25%,
        var(--defcon-3) 50%,
        var(--defcon-2) 75%,
        var(--defcon-1) 100%
    );
    opacity: 0.75;
}

.tension-track::after {
    content: '';
    position: absolute;
    left: 70%;
    top: 2px;
    bottom: 2px;
    width: 2px;
    background: rgba(80, 8, 8, 0.8);
}

.tension-danger-zone {
    position: absolute;
    left: 70%;
    top: -13px;
    transform: translateX(-50%);
    font-family: var(--font-teletype);
    font-size: 9px;
    letter-spacing: 0.7px;
    color: #8b1e2d;
    text-transform: uppercase;
    font-weight: bold;
}

.tension-needle {
    position: absolute;
    left: var(--tension-meter, 0%);
    top: -5px;
    bottom: -4px;
    width: 2px;
    transform: translateX(-50%);
    transition: left 0.35s ease-out;
    background: linear-gradient(180deg, #17120e 0%, #352016 100%);
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.45);
}

.tension-needle::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-bottom: 7px solid #352016;
}

.tension-scale {
    margin-top: 4px;
    display: flex;
    justify-content: space-between;
    font-family: var(--font-teletype);
    font-size: 9px;
    color: #4c3c29;
}

.instrument-status {
    margin-top: 6px;
    padding-top: 4px;
    border-top: 1px dashed rgba(64, 46, 24, 0.45);
    font-family: var(--font-teletype);
    font-size: 10px;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    font-weight: bold;
    color: #332515;
}

.defcon-card.defcon-level-1 .instrument-status {
    color: #8d1326;
    animation: defcon-alert-pulse 1.4s infinite;
}

.defcon-card.defcon-level-2 .instrument-status {
    color: #8f3c16;
}

.tension-card.tension-band-critical .instrument-status {
    color: #9a3e18;
}

.tension-card.tension-band-flashpoint .instrument-status {
    color: #8d1326;
    animation: defcon-alert-pulse 1.4s infinite;
}

.warning-ticker {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 180px;
    overflow-y: auto;
    padding-right: 2px;
    animation: ticker-slide 0.5s ease-out;
}

.warning-item {
    font-family: var(--font-teletype);
    font-size: 11px;
    font-weight: bold;
    padding: 5px 8px;
    border-radius: 2px;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    white-space: normal;
}

.warning-icon {
    font-size: 12px;
}

.warning-nominal {
    background: #1e2b38;
    color: #c6d8ea;
    border: 1px solid #3b516b;
}

/* Warning Severity Levels */
.warning-critical {
    background: #500000;
    color: #ffcccc;
    border: 1px solid #ff0000;
    animation: warning-pulse 2s infinite;
}

.warning-high {
    background: #553300;
    color: #ffddaa;
    border: 1px solid #ffaa00;
}

.warning-medium {
    background: #223344;
    color: #bbddff;
    border: 1px solid #4488cc;
}

/* Sprint 7f: Situation Board nuclear-governance lanes */
.scientific-morale-card .morale-gauge {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.morale-gauge-row {
    display: grid;
    grid-template-columns: 34px 1fr 34px;
    gap: 6px;
    align-items: center;
}

.morale-side,
.morale-value {
    font-family: var(--font-teletype);
    font-size: 10px;
    font-weight: bold;
    color: #4b3721;
}

.morale-value {
    text-align: right;
}

.morale-track {
    position: relative;
    height: 10px;
    border-radius: 999px;
    border: 1px solid #6b5232;
    background: #17120d;
    overflow: hidden;
}

.morale-fill {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    background: linear-gradient(90deg, #587867 0%, #8fb288 100%);
    transition: width 0.35s ease-out;
}

.morale-gauge-row.morale-low .morale-fill {
    background: linear-gradient(90deg, #6e2a1d 0%, #c5422e 100%);
    box-shadow: 0 0 8px rgba(197, 66, 46, 0.5);
}

.morale-gauge-row.morale-high .morale-fill {
    background: linear-gradient(90deg, #33617f 0%, #59a3cd 100%);
    box-shadow: 0 0 8px rgba(89, 163, 205, 0.45);
}

.morale-threshold {
    position: absolute;
    top: -1px;
    bottom: -1px;
    width: 2px;
    background: rgba(244, 233, 201, 0.55);
    transform: translateX(-50%);
}

.morale-threshold.threshold-low {
    background: rgba(193, 72, 55, 0.8);
}

.morale-threshold.threshold-high {
    background: rgba(84, 126, 175, 0.85);
}

.scientific-morale-card.morale-band-low .instrument-status {
    color: #8f1d1d;
    animation: warning-pulse 1.8s infinite;
}

.scientific-morale-card.morale-band-high .instrument-status {
    color: #224f79;
}

.civilian-control-slider {
    position: relative;
    height: 20px;
    margin-top: 10px;
    border-radius: 999px;
    border: 1px solid #5a4830;
    background: #17130e;
    overflow: hidden;
}

.control-zone {
    position: absolute;
    top: 2px;
    bottom: 2px;
    border-radius: 999px;
    opacity: 0.7;
}

.control-zone.zone-military {
    left: 2px;
    width: calc(var(--control-low, 30%) - 2px);
    background: linear-gradient(90deg, rgba(115, 21, 21, 0.88) 0%, rgba(161, 42, 42, 0.88) 100%);
}

.control-zone.zone-balanced {
    left: var(--control-low, 30%);
    width: calc(var(--control-high, 70%) - var(--control-low, 30%));
    background: linear-gradient(90deg, rgba(68, 95, 66, 0.82) 0%, rgba(114, 145, 95, 0.82) 100%);
}

.control-zone.zone-civilian {
    left: var(--control-high, 70%);
    right: 2px;
    background: linear-gradient(90deg, rgba(43, 73, 119, 0.86) 0%, rgba(75, 126, 183, 0.86) 100%);
}

.control-threshold {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    transform: translateX(-50%);
    background: rgba(249, 237, 209, 0.52);
}

.control-threshold.threshold-low {
    left: var(--control-low, 30%);
}

.control-threshold.threshold-high {
    left: var(--control-high, 70%);
}

.control-marker {
    position: absolute;
    left: var(--control-value, 50%);
    top: -3px;
    bottom: -3px;
    width: 2px;
    transform: translateX(-50%);
    background: linear-gradient(180deg, #f5e3ba 0%, #e9b06a 100%);
    box-shadow: 0 0 7px rgba(239, 180, 102, 0.55);
}

.control-scale {
    margin-top: 5px;
    display: flex;
    justify-content: space-between;
    font-family: var(--font-teletype);
    font-size: 9px;
    color: #4c3a28;
}

.control-fog-note {
    margin-top: 4px;
    font-family: var(--font-teletype);
    font-size: 9px;
    color: #4e402f;
    letter-spacing: 0.3px;
}

.civilian-control-card.control-band-military .instrument-status {
    color: #8f1d1d;
    animation: warning-pulse 1.8s infinite;
}

.civilian-control-card.control-band-civilian .instrument-status {
    color: #224f79;
}

.turn-debrief {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 5px 10px;
    border: 1px solid #3e5a79;
    background: #10263d;
    color: #d9ebff;
    border-radius: 3px;
    font-family: var(--font-teletype);
    font-size: 10px;
    white-space: normal;
}

.turn-debrief-label {
    font-weight: bold;
    color: #8ec4ff;
    letter-spacing: 0.8px;
}

.turn-debrief-line {
    opacity: 0.95;
}

.turn-debrief-line strong {
    color: #bfe0ff;
}

@keyframes ticker-slide {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes nixie-flicker {
    0%, 92%, 100% { opacity: 1; }
    94% { opacity: 0.7; }
    96% { opacity: 0.92; }
}

@keyframes warning-pulse {
    0%, 100% { border-color: #ff0000; box-shadow: 0 0 5px rgba(255, 0, 0, 0.3); }
    50% { border-color: #ff4444; box-shadow: 0 0 10px rgba(255, 0, 0, 0.6); }
}

@keyframes defcon-alert-pulse {
    0%, 100% { opacity: 1; text-shadow: 0 0 0 rgba(141, 19, 38, 0.1); }
    50% { opacity: 0.75; text-shadow: 0 0 10px rgba(141, 19, 38, 0.55); }
}

/* ========================================
   Phase 2: Map Intelligence Layers
   ======================================== */
.map-controls-bar {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
    padding: 8px;
    background: rgba(0,0,0,0.1);
    border-radius: 4px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.layer-toggle {
    background: var(--bakelite-dark);
    color: #888;
    border: 1px solid #444;
    padding: 4px 12px;
    border-radius: 12px;
    font-family: var(--font-body);
    font-size: 10px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.layer-toggle:hover {
    color: #ccc;
    border-color: #666;
}

.layer-toggle.active {
    background: var(--usa-blue);
    color: white;
    border-color: var(--usa-light);
    box-shadow: 0 0 5px rgba(0, 40, 104, 0.5);
}

/* Instability Layer Styling */
.map-region.instability-low { fill: #228b22 !important; }
.map-region.instability-med { fill: #d4a84b !important; }
.map-region.instability-high { fill: #ff8c00 !important; }
.map-region.instability-crit { fill: #8b0000 !important; animation: map-pulse 2s infinite; }

@keyframes map-pulse {
    0%, 100% { fill-opacity: 0.8; }
    50% { fill-opacity: 0.4; }
}

/* Intel Layer Styling */
.map-region.intel-high { stroke: #00ff00 !important; stroke-width: 2px; }
.map-region.intel-med { stroke: #ffff00 !important; stroke-dasharray: 4 2; }
.map-region.intel-low { 
    stroke: #444 !important; 
    fill: #222 !important; 
    fill-opacity: 0.9 !important;
}

/* ========================================
   Phase 2: Lamp + Clear Light
   ======================================== */
.desk-lamp-switch {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 6200;
}

.lamp-toggle-btn {
    position: relative;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1px solid #5a452b;
    background:
        radial-gradient(circle at 30% 28%, rgba(255, 243, 199, 0.55) 0%, rgba(223, 186, 122, 0.2) 38%, transparent 60%),
        linear-gradient(180deg, #5b4733 0%, #2b2218 100%);
    cursor: pointer;
    color: #f0d29a;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        inset 0 -1px 0 rgba(0, 0, 0, 0.45),
        0 2px 7px rgba(0, 0, 0, 0.4);
    transition: transform 0.16s ease, box-shadow 0.24s ease, border-color 0.24s ease, background 0.24s ease;
}

.lamp-toggle-btn::before {
    content: '';
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    border: 1px solid rgba(249, 224, 176, 0.35);
    pointer-events: none;
}

.lamp-toggle-btn:hover {
    border-color: #8d7146;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.35),
        inset 0 -1px 0 rgba(0, 0, 0, 0.45),
        0 0 10px rgba(255, 206, 106, 0.28),
        0 3px 8px rgba(0, 0, 0, 0.45);
}

.lamp-toggle-btn.lamp-clicking {
    transform: translateY(1px) rotate(-8deg) scale(0.97);
    box-shadow:
        inset 0 2px 4px rgba(0, 0, 0, 0.6),
        0 1px 4px rgba(0, 0, 0, 0.35);
}

.lamp-toggle-btn.is-clear {
    border-color: #7e96b5;
    background:
        radial-gradient(circle at 36% 24%, rgba(255, 255, 255, 0.78) 0%, rgba(210, 228, 255, 0.24) 42%, transparent 62%),
        linear-gradient(180deg, #cad8ed 0%, #8ea6cb 100%);
    color: #17345b;
}

.lamp-icon {
    display: inline-block;
    font-size: 10px;
    line-height: 1;
    filter: drop-shadow(0 0 3px rgba(255, 236, 186, 0.45));
    transition: transform 0.24s ease, filter 0.24s ease;
}

.lamp-toggle-btn.is-clear .lamp-icon,
body.clear-light .lamp-icon {
    transform: rotate(24deg) translateY(-1px);
    filter: drop-shadow(0 0 5px rgba(189, 219, 255, 0.6));
}

/* Claustrophobic desk-lamp cone for active room panels */
.policy-view.active #map-area,
.policy-view.active #domestic-dashboard,
.policy-view.active #domestic-action-panel,
.policy-view.active .intel-log-panel {
    box-shadow:
        inset 0 58px 110px rgba(254, 237, 201, 0.13),
        inset 0 -90px 130px rgba(8, 10, 16, 0.46),
        inset 0 0 0 1px rgba(255, 255, 255, 0.05),
        0 2px 8px rgba(0, 0, 0, 0.32);
    transition: background 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

/* Clear Light Mode Overrides */
body.clear-light {
    background: #eff3f8 !important;
}

body.clear-light::before {
    display: none !important;
}

body.clear-light::after {
    display: none !important;
}

body.clear-light #desk {
    background:
        linear-gradient(180deg, #e9edf3 0%, #dde4ee 55%, #d3dce8 100%) !important;
    filter: none !important;
}

body.clear-light #desk::before,
body.clear-light #desk::after {
    opacity: 0 !important;
}

/* Override visual decay classes in clear mode */
body.clear-light #desk.desk-stress-1,
body.clear-light #desk.desk-stress-2,
body.clear-light #desk.desk-stress-3 {
    filter: none !important;
}

body.clear-light #header {
    background: linear-gradient(180deg, #f7f9fc 0%, #e4ecf8 100%) !important;
    border-color: #9db0c9 !important;
    box-shadow: 0 1px 3px rgba(19, 42, 72, 0.15) !important;
}

body.clear-light #status-bar {
    background: linear-gradient(180deg, #e8f1ff 0%, #d5e7ff 100%) !important;
    border-color: #86a6cf !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.82),
        0 1px 3px rgba(21, 44, 74, 0.14) !important;
}

body.clear-light .status-item .label,
body.clear-light .action-header h2 {
    color: #1f3555 !important;
    text-shadow: none !important;
}

body.clear-light .status-item .value {
    color: #111d2e !important;
    text-shadow: none !important;
}

body.clear-light #view-toggle,
body.clear-light #map-area,
body.clear-light #action-panel,
body.clear-light #domestic-dashboard,
body.clear-light #domestic-action-panel,
body.clear-light .intel-log-panel {
    background: #ffffff !important;
    border-color: #a5b6cc !important;
    color: #1a2a3d !important;
}

body.clear-light #map-area,
body.clear-light #action-panel,
body.clear-light #domestic-dashboard,
body.clear-light #domestic-action-panel,
body.clear-light .intel-log-panel {
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        0 1px 4px rgba(12, 30, 56, 0.12) !important;
}

body.clear-light .policy-view.active #map-area,
body.clear-light .policy-view.active #domestic-dashboard,
body.clear-light .policy-view.active #domestic-action-panel,
body.clear-light .policy-view.active .intel-log-panel {
    box-shadow:
        inset 0 35px 70px rgba(255, 255, 255, 0.45),
        inset 0 -30px 45px rgba(197, 213, 232, 0.35),
        0 1px 4px rgba(12, 30, 56, 0.12) !important;
}

body.clear-light .protocol-btn,
body.clear-light .log-toggle-btn,
body.clear-light .view-btn,
body.clear-light .end-turn-btn {
    background: linear-gradient(180deg, #f6f9ff 0%, #d8e6fb 100%) !important;
    border-color: #90a7c8 !important;
    color: #1b3253 !important;
    text-shadow: none !important;
}

body.clear-light #footer {
    background: #dde7f5 !important;
    border-color: #8da8c8 !important;
    color: #223b5e !important;
}

body.clear-light #situation-board {
    background: linear-gradient(180deg, #d8dce3 0%, #c9cfd9 100%);
    border-color: #8b95a6;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.6),
        0 2px 4px rgba(0, 0, 0, 0.15);
}

body.clear-light .instrument-card {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.35) 0%, rgba(227, 232, 241, 0.22) 100%),
        linear-gradient(180deg, #f2f4f8 0%, #d8deea 100%);
    border-color: #95a0b0;
}

body.clear-light .instrument-label,
body.clear-light .instrument-status,
body.clear-light .tension-scale {
    color: #2b3648;
}

body.clear-light .warning-nominal {
    background: #e5edf8;
    color: #20324a;
    border-color: #7d99bc;
}

/* ========================================
   CLEAR LIGHT MODE: Advisor-Specific Overrides

   In clear-light mode, panel backgrounds become white/light-blue.
   Many advisor themes use light-colored text (gold, silver, cream)
   designed for dark backgrounds. These overrides ensure all text
   remains readable on light backgrounds.
   ======================================== */

/* --- Generic text elements across ALL dark-background advisors --- */
body.clear-light .ap-display {
    color: #2a3a50 !important;
}

body.clear-light .map-title {
    color: #1a2a40 !important;
    text-shadow: none !important;
}

body.clear-light .region-summary .region-name {
    color: #1a2a40 !important;
    text-shadow: none !important;
}

body.clear-light .action-name {
    color: #1a2a40 !important;
}

body.clear-light .telegram {
    background: #ffffff !important;
    border-color: #b0bcc8 !important;
}

body.clear-light .telegram-body p {
    color: #2a3a50 !important;
}

body.clear-light .telegram-body .stats {
    color: #3a4a60 !important;
}

body.clear-light .country-selector label {
    color: #3a4a60 !important;
}

body.clear-light .country-select {
    background: #ffffff !important;
    color: #1a2a40 !important;
    border-color: #8090a8 !important;
}

body.clear-light .execute-btn {
    background: linear-gradient(180deg, #e8eef6 0%, #d0daea 100%) !important;
    border-color: #8090a8 !important;
    color: #1a2a40 !important;
    text-shadow: none !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
}

body.clear-light .execute-btn:disabled {
    background: #eef0f4 !important;
    color: #8a95a5 !important;
    border-color: #c0c8d0 !important;
}

body.clear-light .action-cost {
    background: #2a4060 !important;
    color: #ffffff !important;
    border-color: #1a3050 !important;
}

body.clear-light .action-cost.cost-discount {
    background: #2a6040 !important;
    color: #ffffff !important;
}

body.clear-light .action-cost.cost-markup {
    background: #803030 !important;
    color: #ffffff !important;
}

/* Country chips in clear-light */
body.clear-light .country-chip.us {
    background: rgba(30, 80, 160, 0.12) !important;
    border-color: #2a5090 !important;
    color: #1a3a6a !important;
}

body.clear-light .country-chip.ussr {
    background: rgba(180, 30, 30, 0.1) !important;
    border-color: #a02020 !important;
    color: #802020 !important;
}

body.clear-light .country-chip.contested {
    background: rgba(160, 120, 20, 0.1) !important;
    border-color: #907020 !important;
    color: #604a10 !important;
}

/* Region summaries get light backgrounds in clear-light */
body.clear-light .region-summary {
    background: #f0f4f8 !important;
    border-color: #a0b0c0 !important;
}

/* World map container */
body.clear-light .world-map-container {
    background: #f8fafc !important;
    border-color: #a0b0c0 !important;
}

/* Global control indicator */
body.clear-light .global-control-indicator {
    background: #f0f4f8 !important;
    border-color: #6080a0 !important;
    color: #1a2a40 !important;
}

/* Classification footer */
body.clear-light .classification {
    color: #a02020 !important;
}

body.clear-light .version {
    color: #4a5a70 !important;
}

/* Telegram stripe */
body.clear-light .telegram::before {
    opacity: 0.4 !important;
}

/* --- Victory Metric Displays (each advisor has a unique one) --- */

/* LeMay: Kill Ratio */
body.clear-light .kill-ratio-display {
    background: linear-gradient(180deg, #e8eef6 0%, #d8e2ee 100%) !important;
    border-color: #8090a8 !important;
}

body.clear-light .kill-ratio-label {
    color: #2a3a50 !important;
}

body.clear-light .kill-ratio-value {
    color: #1a2a40 !important;
}

body.clear-light .kill-ratio-bar {
    background: #d0d8e0 !important;
    border-color: #a0a8b0 !important;
}

body.clear-light .kill-ratio-status {
    text-shadow: none !important;
}

body.clear-light .kill-ratio-status.winning {
    color: #2a5080 !important;
    background: rgba(40, 80, 130, 0.12) !important;
}

body.clear-light .kill-ratio-status.parity {
    color: #806020 !important;
    background: rgba(160, 120, 20, 0.12) !important;
}

body.clear-light .kill-ratio-status.losing {
    color: #a02020 !important;
    background: rgba(180, 30, 30, 0.12) !important;
}

/* Konev: Satellites Secured */
body.clear-light .satellites-display {
    background: linear-gradient(180deg, #f0e8e0 0%, #e8ddd4 100%) !important;
    border-color: #a08050 !important;
}

body.clear-light .satellites-label {
    color: #604020 !important;
    text-shadow: none !important;
}

body.clear-light .satellites-value {
    color: #3a2010 !important;
    text-shadow: none !important;
}

body.clear-light .satellites-bar {
    background: #d8d0c0 !important;
    border-color: #a09080 !important;
}

body.clear-light .satellites-status {
    text-shadow: none !important;
}

body.clear-light .satellites-status.winning {
    color: #806020 !important;
    background: rgba(160, 120, 20, 0.15) !important;
}

body.clear-light .satellites-status.parity {
    color: #802020 !important;
    background: rgba(160, 30, 30, 0.12) !important;
}

/* Kennan: Long Peace Score */
body.clear-light .long-peace-display {
    background: linear-gradient(180deg, #fdf6e3 0%, #f5eedb 100%) !important;
    border-color: #a09080 !important;
}

/* Wallace: Global Trust */
body.clear-light .global-trust-display {
    background: #ffffff !important;
    border-color: #2a5090 !important;
}

/* Acheson: Alliance Cohesion */
body.clear-light .alliance-cohesion-display {
    background: linear-gradient(180deg, #e8eef6 0%, #dde6f0 100%) !important;
    border-color: #a08030 !important;
}

body.clear-light .alliance-cohesion-label {
    color: #6a5010 !important;
}

body.clear-light .alliance-cohesion-value {
    color: #1a2a40 !important;
    text-shadow: none !important;
}

body.clear-light .alliance-cohesion-bar {
    background: #d0d8e0 !important;
    border-color: #a0a8b0 !important;
}

body.clear-light .alliance-cohesion-status {
    text-shadow: none !important;
}

body.clear-light .alliance-cohesion-streak {
    color: #6a5010 !important;
}

body.clear-light .core-ally-chip.locked {
    background: #d4af37 !important;
    color: #2a2010 !important;
}

body.clear-light .core-ally-chip.aligned {
    color: #6a5010 !important;
}

body.clear-light .core-ally-chip.wavering {
    color: #805010 !important;
}

/* Molotov: NATO Cohesion */
body.clear-light .nato-cohesion-display {
    background: linear-gradient(180deg, #e8eaee 0%, #dde0e6 100%) !important;
    border-color: #8090a0 !important;
}

body.clear-light .nato-cohesion-label {
    color: #3a4050 !important;
}

body.clear-light .nato-cohesion-value {
    color: #1a2030 !important;
}

body.clear-light .nato-cohesion-bar {
    background: #d0d4d8 !important;
    border-color: #a0a4a8 !important;
}

body.clear-light .nato-cohesion-status.failing {
    color: #4a5060 !important;
}

body.clear-light .nato-cohesion-status.winning {
    color: #802020 !important;
}

body.clear-light .nato-cohesion-status.contesting {
    color: #705020 !important;
}

/* Beria: Subversion Score */
body.clear-light .subversion-display {
    background: linear-gradient(180deg, #eaeaea 0%, #e0e0e0 100%) !important;
    border-color: #a03030 !important;
}

body.clear-light .subversion-display::before {
    background: #e0e0e0 !important;
    color: #a03030 !important;
}

body.clear-light .subversion-label {
    color: #802020 !important;
}

body.clear-light .subversion-value {
    color: #1a1a1a !important;
    text-shadow: none !important;
}

body.clear-light .subversion-bar {
    background: #d0d0d0 !important;
    border-color: #a0a0a0 !important;
}

body.clear-light .subversion-status.dominant {
    color: #802020 !important;
}

body.clear-light .subversion-status.influential {
    color: #802020 !important;
}

body.clear-light .subversion-status.operating {
    color: #4a4a4a !important;
}

body.clear-light .subversion-status.infiltrating {
    color: #5a5a5a !important;
}

/* Litvinov: Autarky Score */
body.clear-light .autarky-score-display {
    background: linear-gradient(180deg, #f0e8d8 0%, #e8dcc8 100%) !important;
    border-color: #a08030 !important;
}

body.clear-light .autarky-score-label {
    color: #6a5010 !important;
}

body.clear-light .autarky-score-value {
    color: #3a2010 !important;
}

body.clear-light .autarky-score-bar {
    background: #d0c8b0 !important;
    border-color: #a09070 !important;
}

body.clear-light .autarky-score-status.devastated {
    color: #4a3020 !important;
    background: rgba(80, 40, 20, 0.12) !important;
}

body.clear-light .autarky-score-status.prospering {
    color: #6a5010 !important;
    background: rgba(160, 120, 20, 0.12) !important;
}

/* Encirclement warning */
body.clear-light .encirclement-warning {
    background: rgba(180, 30, 30, 0.08) !important;
    border-color: #c05050 !important;
}

body.clear-light .encirclement-warning-title {
    color: #802020 !important;
}

body.clear-light .encirclement-border-name {
    color: #2a2a2a !important;
}

body.clear-light .encirclement-border-status.secure {
    color: #2a6a2a !important;
    background: rgba(40, 120, 40, 0.12) !important;
}

body.clear-light .encirclement-border-status.contested {
    color: #705020 !important;
}

body.clear-light .encirclement-border-status.encircled {
    color: #802020 !important;
}

/* Overstretch warning (Konev) */
body.clear-light .overstretch-warning {
    background: linear-gradient(180deg, #e8e0d0 0%, #ddd6c4 100%) !important;
    border-color: #a09070 !important;
    color: #3a2a1a !important;
}

body.clear-light .overstretch-warning .value {
    color: #705020 !important;
}

/* Tiger warning (Beria) */
body.clear-light .tiger-warning {
    background: rgba(180, 30, 30, 0.08) !important;
    border-color: #c05050 !important;
    color: #802020 !important;
}

body.clear-light .tiger-warning .value {
    color: #a02020 !important;
}

/* NATO targets panel (Molotov) */
body.clear-light .nato-targets-panel {
    background: #f0f2f4 !important;
    border-color: #a0a4a8 !important;
}

body.clear-light .nato-targets-title {
    color: #2a3040 !important;
}

body.clear-light .nato-target-name {
    color: #2a3040 !important;
}

body.clear-light .nato-target-status.western {
    background: #4a6080 !important;
    color: #ffffff !important;
}

body.clear-light .nato-target-status.neutral {
    background: #907030 !important;
    color: #ffffff !important;
}

body.clear-light .nato-target-status.wavering {
    background: #a03030 !important;
    color: #ffffff !important;
}

body.clear-light .nato-target-status.soviet {
    background: #802020 !important;
    color: #ffffff !important;
}

/* --- Special Ability Buttons in clear-light --- */
/* SAC Alert (LeMay) */
body.clear-light .sac-alert-btn {
    background: linear-gradient(180deg, #c03030 0%, #a02020 100%) !important;
    color: #ffffff !important;
}

body.clear-light .sac-alert-cost {
    color: #806020 !important;
}

body.clear-light .sac-alert-used {
    background: #e8eaee !important;
    border-color: #a0a4a8 !important;
    color: #5a6070 !important;
}

/* Deep Battle (Konev) */
body.clear-light .deep-battle-btn:disabled {
    background: linear-gradient(180deg, #c0b8a8 0%, #a8a090 100%) !important;
    color: #6a6058 !important;
}

body.clear-light .deep-battle-cost {
    color: #802020 !important;
}

body.clear-light .deep-battle-used {
    background: #f0e8d8 !important;
    border-color: #a09070 !important;
    color: #5a4a30 !important;
}

body.clear-light .deep-battle-region-select {
    background: #ffffff !important;
    color: #2a2020 !important;
    border-color: #a08040 !important;
}

/* Veto (Molotov) */
body.clear-light .veto-used {
    background: #e8eaee !important;
    border-color: #a0a4a8 !important;
    color: #5a6070 !important;
}

body.clear-light .veto-country-select {
    background: #ffffff !important;
    color: #1a1a1a !important;
    border-color: #8090a0 !important;
}

/* Liquidate (Beria) */
body.clear-light .liquidate-used {
    background: #eaeaea !important;
    border-color: #a0a0a0 !important;
    color: #5a5a5a !important;
}

body.clear-light .liquidate-country-select {
    background: #ffffff !important;
    color: #1a1a1a !important;
    border-color: #a03030 !important;
}

/* Accelerate Plan (Litvinov) */
body.clear-light .accelerate-plan-btn:disabled {
    background: linear-gradient(180deg, #e0d8c8 0%, #d0c8b0 100%) !important;
    color: #6a5a40 !important;
    border-color: #a09060 !important;
}

body.clear-light .accelerate-plan-used {
    background: #f0e8d8 !important;
    border-color: #a09060 !important;
    color: #5a4a30 !important;
}

/* Grand Bargain status (Wallace) */
body.clear-light .grand-bargain-status {
    background: rgba(160, 120, 20, 0.08) !important;
    border-color: #a08030 !important;
}

/* Containment shield used (Kennan) */
body.clear-light .containment-shield-used {
    background: #f5eedb !important;
    border-color: #a09070 !important;
    color: #4a4030 !important;
}

body.clear-light .containment-region-select {
    background: #ffffff !important;
    color: #2a2a2a !important;
}

/* Frozen regions display (Kennan) */
body.clear-light .frozen-regions-display {
    background: rgba(38, 139, 210, 0.08) !important;
}

body.clear-light .frozen-regions-label {
    color: #1a5080 !important;
}

body.clear-light .frozen-region-item {
    color: #2a2a2a !important;
}

/* Convene Summit cooldown (Acheson) */
body.clear-light .convene-summit-cooldown {
    background: #e8eef6 !important;
    border-color: #a0a8b8 !important;
    color: #3a4a60 !important;
}

/* --- Field Operations in clear-light --- */
body.clear-light .intel-ops-section {
    background: #f0f4f8 !important;
    border-color: #a0b0c0 !important;
}

body.clear-light .intel-ops-summary {
    color: #1a3060 !important;
    border-bottom-color: #c0ccd8 !important;
}

body.clear-light .intel-ops-list .telegram.action-card {
    background: #ffffff !important;
    border-color: #a0b0c0 !important;
}

body.clear-light .intel-ops-list .telegram.action-card .telegram-header {
    background: #f0f4f8 !important;
    border-bottom-color: #c0ccd8 !important;
}

body.clear-light .intel-ops-list .telegram.action-card .action-name {
    color: #1a2a40 !important;
}

body.clear-light .intel-ops-list .telegram.action-card .telegram-body,
body.clear-light .intel-ops-list .telegram.action-card .telegram-body p {
    color: #2a3a50 !important;
}

body.clear-light .intel-ops-list .telegram.action-card .stats {
    color: #3a5070 !important;
}

body.clear-light .intel-ops-list .telegram.action-card .execute-btn {
    background: linear-gradient(180deg, #e0e8f0 0%, #d0daea 100%) !important;
    border-color: #8090a8 !important;
    color: #1a3060 !important;
}

/* --- View toggle active state in clear-light --- */
body.clear-light .view-btn.active {
    background: linear-gradient(180deg, #d0ddf0 0%, #b8cadf 100%) !important;
    border-color: #6080b0 !important;
    color: #0a1a30 !important;
}

/* --- Protocol menu in clear-light --- */
body.clear-light .protocol-menu-panel {
    background: #ffffff !important;
    border-color: #a0b0c0 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

body.clear-light .protocol-menu-item {
    color: #1a2a40 !important;
}

body.clear-light .protocol-menu-item:hover {
    background: #e8f0f8 !important;
}

/* --- Advisor Selection Modal in clear-light --- */
body.clear-light .advisor-overlay {
    background: linear-gradient(180deg, #e8eef6 0%, #dde4ee 100%) !important;
}

body.clear-light .advisor-modal,
body.clear-light .ussr-modal {
    background: transparent !important;
}

body.clear-light .advisor-header h1 {
    color: #1a2a40 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) !important;
}

body.clear-light .advisor-subtitle {
    color: #3a4a60 !important;
}

body.clear-light .advisor-card {
    background: #ffffff !important;
    border: 2px solid #b0bcc8 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
}

body.clear-light .advisor-card:hover {
    border-color: #4080c0 !important;
    box-shadow: 0 6px 20px rgba(30, 60, 100, 0.15) !important;
}

body.clear-light .advisor-portrait {
    border-color: #a0b0c0 !important;
}

body.clear-light .advisor-name {
    color: #1a2a40 !important;
    text-shadow: none !important;
}

body.clear-light .advisor-title {
    color: #2a5080 !important;
}

body.clear-light .advisor-desc {
    color: #2a3a50 !important;
}

body.clear-light .advisor-flavor {
    color: #4a5a70 !important;
    border-left-color: #8090a8 !important;
}

body.clear-light .advisor-passive {
    color: #1a2a40 !important;
    background: rgba(30, 80, 160, 0.08) !important;
    border-color: #8090c0 !important;
}

body.clear-light .advisor-badge-challenge {
    background: rgba(180, 30, 30, 0.1) !important;
    border-color: rgba(180, 40, 40, 0.5) !important;
    color: #802020 !important;
}

body.clear-light .advisor-challenge-note {
    color: #6a2020 !important;
    background: rgba(180, 30, 30, 0.06) !important;
    border-color: rgba(180, 40, 40, 0.25) !important;
}

body.clear-light .advisor-select-btn {
    background: linear-gradient(180deg, #4090d0 0%, #2a70b0 100%) !important;
    color: #ffffff !important;
    text-shadow: none !important;
}

body.clear-light .advisor-select-btn:hover {
    background: linear-gradient(180deg, #50a0e0 0%, #3a80c0 100%) !important;
}

/* --- Title Screen / Faction Selection in clear-light --- */
body.clear-light .title-overlay {
    background: linear-gradient(180deg, #e8eef6 0%, #dde4ee 50%, #e8eef6 100%) !important;
}

body.clear-light .title-main {
    color: #1a2a40 !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
    animation: none !important;
}

body.clear-light .title-subtitle {
    color: #4a5a70 !important;
}

body.clear-light .title-tagline {
    color: #5a6a80 !important;
}

body.clear-light .faction-prompt {
    color: #2a3a50 !important;
}

body.clear-light .faction-card.usa {
    background: linear-gradient(180deg, #e0eaf8 0%, #d0ddf0 100%) !important;
    border-color: #3a70b0 !important;
    box-shadow: 0 2px 12px rgba(20, 50, 100, 0.15) !important;
}

body.clear-light .faction-card.usa:hover {
    box-shadow: 0 8px 30px rgba(20, 50, 100, 0.25) !important;
}

body.clear-light .faction-card.ussr {
    background: linear-gradient(180deg, #f0e0e0 0%, #e8d0d0 100%) !important;
    border-color: #a03030 !important;
    box-shadow: 0 2px 12px rgba(100, 20, 20, 0.12) !important;
}

body.clear-light .faction-card.usa .faction-icon {
    color: #2a5090 !important;
    text-shadow: none !important;
}

body.clear-light .faction-card.ussr .faction-icon {
    color: #a03030 !important;
    text-shadow: none !important;
}

body.clear-light .faction-name {
    color: #1a2a40 !important;
    text-shadow: none !important;
}

body.clear-light .faction-motto {
    color: #3a4a60 !important;
}

body.clear-light .faction-description {
    color: #2a3a50 !important;
}

body.clear-light .faction-btn.usa-btn {
    background: linear-gradient(180deg, #4090d0 0%, #2a70b0 100%) !important;
    color: #ffffff !important;
}

body.clear-light .faction-btn.usa-btn:hover {
    background: linear-gradient(180deg, #50a0e0 0%, #3a80c0 100%) !important;
}

body.clear-light .faction-btn.ussr-btn {
    background: linear-gradient(180deg, #e0d0d0 0%, #d0c0c0 100%) !important;
    color: #6a4a4a !important;
}

body.clear-light .faction-stamp {
    background: #c03030 !important;
    color: #ffffff !important;
}

/* Title screen settings/config */
body.clear-light .async-toggle {
    color: #2a3a50 !important;
}

body.clear-light .async-toggle input {
    accent-color: #2a5090 !important;
}

body.clear-light .async-note {
    color: #4a5a70 !important;
}

body.clear-light .async-banner {
    color: #2a3a50 !important;
    border-color: rgba(30, 60, 100, 0.25) !important;
    background: rgba(220, 230, 245, 0.5) !important;
}

body.clear-light .narrative-verbosity-label {
    color: #4a5a70 !important;
}

body.clear-light .narrative-verbosity-select {
    background: #ffffff !important;
    border-color: #8090a8 !important;
    color: #1a2a40 !important;
}

body.clear-light .advisor-select-btn {
    background: linear-gradient(180deg, #4090d0 0%, #2a70b0 100%) !important;
    border-color: #1a5090 !important;
    color: #ffffff !important;
    text-shadow: none !important;
}

/* --- Tension indicators get darker text in clear-light --- */
body.clear-light .tension-calm {
    color: #ffffff !important;
}

body.clear-light .tension-concerned {
    color: #1a1a10 !important;
}

/* --- Domestic stats & Era badges --- */
/* These colored badges keep their colored backgrounds in clear-light.
   The status-item label/value overrides above force dark text, but
   these badges need light text on their colored backgrounds.
   Must come AFTER the status-item overrides to win cascade tie. */
body.clear-light .domestic-stat .label,
body.clear-light .domestic-stat .value,
body.clear-light .era-monopoly .label,
body.clear-light .era-monopoly .value,
body.clear-light .era-nuclear .label,
body.clear-light .era-nuclear .value {
    color: inherit !important;
    text-shadow: inherit !important;
}

body.clear-light .domestic-stat.domestic-ok {
    color: #ffffff !important;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.3) !important;
}

body.clear-light .domestic-stat.domestic-warning {
    color: #1a1a10 !important;
    text-shadow: none !important;
}

body.clear-light .domestic-stat.domestic-low {
    color: #ffffff !important;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.3) !important;
}

body.clear-light .era-monopoly {
    color: white !important;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.3) !important;
}

body.clear-light .era-nuclear {
    color: white !important;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.3) !important;
}

/* --- Notification --- */
body.clear-light .notification {
    text-shadow: none !important;
}

/* --- Log entries --- */
body.clear-light .log-title {
    color: #1a2a40 !important;
}

body.clear-light .log-content {
    color: #2a3a50 !important;
}

body.clear-light .log-status {
    color: #2a6a40 !important;
}

body.clear-light .action-log-container {
    background: #ffffff !important;
    border-color: #a0b0c0 !important;
}

body.clear-light .log-header {
    background: #f0f4f8 !important;
    border-bottom-color: #c0ccd8 !important;
}

body.clear-light .log-entry.usa-entry {
    color: #1a3a6a !important;
    border-left-color: #2a5090 !important;
}

body.clear-light .log-entry.ussr-entry {
    color: #802020 !important;
    border-left-color: #a02020 !important;
}

/* --- Intel Panels in clear-light --- */
body.clear-light .intel-panel-title {
    color: #1a2a40 !important;
    text-shadow: none !important;
}

body.clear-light .intel-secret .intel-panel-title {
    color: #1a6030 !important;
    text-shadow: none !important;
}

body.clear-light .intel-panel-subtitle {
    color: #4a5a70 !important;
}

body.clear-light .intel-secret .intel-panel-subtitle {
    color: #2a7040 !important;
}

body.clear-light .intel-panel-content {
    color: #2a3a50 !important;
}

body.clear-light .intel-action-bar {
    background: #f0f4f8 !important;
}

/* --- Log Modals in clear-light --- */
body.clear-light .log-modal {
    background: #ffffff !important;
    color: #2a3a50 !important;
}

body.clear-light .log-modal-header {
    color: #1a2a40 !important;
}

body.clear-light .log-modal-title {
    color: #1a2a40 !important;
}

body.clear-light .log-modal.intel .log-modal-title {
    color: #1a6030 !important;
}

body.clear-light .classification-stamp {
    color: #802020 !important;
}

body.clear-light .log-modal-content {
    color: #2a3a50 !important;
}

/* --- Crisis Modal in clear-light --- */
body.clear-light .crisis-modal {
    background: #ffffff !important;
    border-color: #a02020 !important;
}

body.clear-light .crisis-title {
    color: #802020 !important;
    text-shadow: none !important;
}

body.clear-light .crisis-description {
    color: #2a3040 !important;
}

body.clear-light .crisis-btn {
    background: #f0f4f8 !important;
    border-color: #a0b0c0 !important;
    color: #1a2a40 !important;
}

body.clear-light .crisis-btn.escalate {
    background: linear-gradient(180deg, #c03030 0%, #a02020 100%) !important;
    color: #ffffff !important;
    border-color: #801818 !important;
}

/* --- Event Modal in clear-light --- */
body.clear-light .event-modal {
    background: #ffffff !important;
    border-color: #a0b0c0 !important;
}

body.clear-light .event-modal .event-title {
    color: #1a2a40 !important;
}

body.clear-light .event-modal .event-subtitle {
    color: #4a5a70 !important;
}

body.clear-light .event-modal .event-description {
    color: #2a3a50 !important;
}

body.clear-light .event-modal .event-option {
    background: #f0f4f8 !important;
    border-color: #a0b0c0 !important;
    color: #1a2a40 !important;
}

body.clear-light .event-modal .event-option:hover {
    background: #ffffff !important;
    border-color: #4080c0 !important;
}

body.clear-light .event-modal .event-option.recommended {
    border-color: #2a70b0 !important;
    background: rgba(42, 112, 176, 0.08) !important;
}

/* ========================================
   v5.9: UI IMPROVEMENTS
   - Larger map
   - Collapsible log panels
   - Country detail panel
   - Larger map nodes
   ======================================== */

/* 1. FULL MAP DISPLAY - Show entire map without cropping */
/* v7.0: Restore original aspect ratio and use 100% background coverage */
/* The original desk.css used a different ratio - we match the new map.jpg ratio and ensure full visibility */
.game-map {
    padding-bottom: 56.96% !important; /* Match actual map.jpg aspect ratio (1326/2328) */
    min-height: 300px !important;
    background-size: contain !important; /* Ensure full map is visible */
    background-position: center center !important;
}

/* v9.4: When ghost-map inner wrapper is used, the visual layer handles the
   map image. Remove the background from the outer container to prevent
   a misaligned duplicate image in letterboxing scenarios. */
.game-map.ghost-map-container {
    background-image: none !important;
}

/* Larger country nodes for better visibility */
.country-node .node-circle {
    width: 32px !important;
    height: 32px !important;
    border-width: 3px !important;
}

.country-node.superpower .node-circle {
    width: 42px !important;
    height: 42px !important;
    border-width: 4px !important;
}

.country-node .node-label {
    font-size: 11px !important;
    margin-top: 6px !important;
    background: rgba(0, 0, 0, 0.7);
    padding: 2px 6px;
    border-radius: 3px;
}

.country-node .node-alignment {
    font-size: 11px !important;
    background: rgba(0, 0, 0, 0.8);
    padding: 2px 6px;
    border-radius: 3px;
    margin-top: 2px;
}

/* Make adjacency lines more visible */
.adjacency-line {
    stroke-width: 2px !important;
    opacity: 0.7 !important;
}

/* 2. COUNTRY DETAIL PANEL */
/* v9.2: Overlay at bottom of map area instead of displacing content */
#country-detail-panel {
    background: var(--paper-cream, #f5f0e6);
    border: 2px solid #8b7355;
    border-radius: 4px;
    padding: 12px;
    box-shadow:
        inset 0 0 10px rgba(0, 0, 0, 0.05),
        0 -4px 12px rgba(0, 0, 0, 0.25);
    display: none; /* Hidden by default */
    animation: panel-slide-in 0.2s ease-out;
    /* v9.2: Overlay positioning - sits at bottom of map-area without pushing content */
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10;
}

#country-detail-panel.visible {
    display: block;
}

@keyframes panel-slide-in {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.detail-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 2px dashed #a09080;
}

.detail-panel-title {
    font-family: var(--font-display, 'Courier New', monospace);
    font-size: 16px;
    font-weight: bold;
    color: #3a3020;
}

.detail-panel-close {
    background: #8b0000;
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    transition: background 0.2s;
}

.detail-panel-close:hover {
    background: #cc0000;
}

.detail-panel-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.detail-stat {
    background: rgba(0, 0, 0, 0.05);
    padding: 8px;
    border-radius: 3px;
    text-align: center;
}

.detail-stat-label {
    font-size: 10px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.detail-stat-value {
    font-size: 18px;
    font-weight: bold;
    color: #3a3020;
}

.detail-stat-value.positive { color: #1a5a8a; }
.detail-stat-value.negative { color: #8b0000; }
.detail-stat-value.neutral { color: #6a5a4a; }

.detail-traits {
    grid-column: span 3;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}

.detail-trait {
    background: #d4c4a8;
    color: #5a4a3a;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
}

.detail-neighbors {
    grid-column: span 3;
    font-size: 11px;
    color: #666;
    margin-top: 6px;
    padding-top: 8px;
    border-top: 1px dashed #ccc;
}

.detail-neighbors strong {
    color: #444;
}

/* 3. COLLAPSIBLE LOG PANELS */
.action-log-container {
    transition: max-height 0.3s ease, padding 0.3s ease;
    overflow: hidden;
}

.action-log-container.collapsed {
    max-height: 40px !important;
    padding-bottom: 0 !important;
}

.log-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 6px 10px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
    margin-bottom: 8px;
    user-select: none;
}

.log-header:hover {
    background: rgba(0, 0, 0, 0.15);
}

.log-collapse-btn {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    font-size: 14px;
    padding: 0 4px;
    transition: transform 0.2s;
}

.action-log-container.collapsed .log-collapse-btn {
    transform: rotate(-90deg);
}

.log-content {
    transition: opacity 0.2s;
}

.action-log-container.collapsed .log-content {
    opacity: 0;
    pointer-events: none;
}

/* 4. UNIFIED TARGET SELECTOR */
#unified-target-selector {
    background: linear-gradient(to bottom, #e8e0d0, #d8d0c0);
    border: 2px solid #a09080;
    border-radius: 4px;
    padding: 10px;
    margin-bottom: 15px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.5);
}

.unified-selector-label {
    font-family: var(--font-display);
    font-size: 11px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
    display: block;
}

#unified-target-dropdown {
    width: 100%;
    padding: 8px 12px;
    font-family: var(--font-body);
    font-size: 13px;
    border: 1px solid #a09080;
    border-radius: 3px;
    background: white;
    cursor: pointer;
}

#unified-target-dropdown:focus {
    outline: none;
    border-color: var(--usa-blue, #002868);
    box-shadow: 0 0 5px rgba(0, 40, 104, 0.3);
}

.country-selector.unified-target-proxy {
    display: flex;
    justify-content: flex-end;
    margin-top: 8px;
}

.recommended-actions {
    border: 1px solid #8f7f6e;
    border-radius: 4px;
    padding: 8px;
    background: rgba(255, 248, 234, 0.65);
}

.recommended-header {
    font-size: 11px;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    font-weight: bold;
    color: #5a4a39;
    margin-bottom: 6px;
}

.all-actions-section {
    margin-top: 6px;
    border: 1px solid #8f7f6e;
    border-radius: 4px;
    background: rgba(216, 206, 187, 0.35);
}

.all-actions-section summary {
    cursor: pointer;
    padding: 8px 10px;
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: #4e3f30;
    list-style: none;
}

.all-actions-section summary::-webkit-details-marker {
    display: none;
}

.all-actions-list {
    padding: 0 8px 8px;
}

.commanders-intent {
    border-left: 3px solid #7f5d2e;
}

.commanders-intent .telegram-body p {
    margin-bottom: 6px;
    font-size: 11px;
}

.region-ticker {
    display: none;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.region-ticker-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: 12px;
    border: 1px solid #6e7f95;
    background: rgba(17, 30, 44, 0.85);
    color: #dfe7ef;
    font-size: 10px;
    letter-spacing: 0.3px;
}

.region-ticker-chip.pro-us {
    border-color: #426ea8;
}

.region-ticker-chip.pro-ussr {
    border-color: #a84a4a;
}

.region-ticker-chip.neutral {
    border-color: #7b5ca6;
}

.ticker-name {
    opacity: 0.9;
}

.ticker-value {
    font-weight: bold;
}

/* Hide individual action dropdowns when unified selector is present */
.action-card .country-selector-row {
    display: none;
}

/* Show only execute button for actions */
.action-card .action-execute-row {
    margin-top: 10px;
}

.action-forecast-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.forecast-chip {
    display: inline-flex;
    align-items: center;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 10px;
    line-height: 1.2;
    letter-spacing: 0.2px;
    border: 1px solid #b7ab96;
    background: rgba(245, 239, 227, 0.9);
    color: #2b2b2b;
}

.forecast-confidence.forecast-high,
.forecast-exposure.forecast-low {
    border-color: #4a8f57;
    background: #e3f3e6;
    color: #1f4d2c;
}

.forecast-confidence.forecast-med,
.forecast-exposure.forecast-med {
    border-color: #ad8c45;
    background: #fbf1d8;
    color: #5a4310;
}

.forecast-confidence.forecast-low,
.forecast-exposure.forecast-high {
    border-color: #b15c4f;
    background: #fbe2dd;
    color: #692117;
}

.forecast-confidence.forecast-blocked {
    border-color: #704040;
    background: #eee2e2;
    color: #4d2323;
}

/* USSR Theme adjustments for detail panel */
.theme-ussr #country-detail-panel,
.theme-molotov #country-detail-panel,
.theme-konev #country-detail-panel,
.theme-beria #country-detail-panel,
.theme-litvinov #country-detail-panel {
    background: #2a1a1a;
    border-color: #5a3030;
    color: #e8d8d8;
}

.theme-ussr .detail-panel-title,
.theme-molotov .detail-panel-title,
.theme-konev .detail-panel-title,
.theme-beria .detail-panel-title,
.theme-litvinov .detail-panel-title {
    color: #ffcccc;
}

.theme-ussr .detail-stat,
.theme-molotov .detail-stat,
.theme-konev .detail-stat,
.theme-beria .detail-stat,
.theme-litvinov .detail-stat {
    background: rgba(255, 255, 255, 0.05);
}

.theme-ussr .detail-stat-value,
.theme-molotov .detail-stat-value,
.theme-konev .detail-stat-value,
.theme-beria .detail-stat-value,
.theme-litvinov .detail-stat-value {
    color: #ffeedd;
}

.theme-ussr .detail-trait,
.theme-molotov .detail-trait,
.theme-konev .detail-trait,
.theme-beria .detail-trait,
.theme-litvinov .detail-trait {
    background: #4a2a2a;
    color: #ffcccc;
}

/* ========================================
   v6.0: GHOST MAP SYSTEM
   Hearts of Iron-style territory interaction
   with color-picking and glowing borders
   ======================================== */

/* Main Ghost Map Container */
/* v6.3: Expanded viewport - showing more of the world including southern hemisphere */
/* Now displays Australia, NZ, and Argentina */
.ghost-map-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.96% !important; /* Match map.jpg aspect ratio to avoid cropping */
    min-height: 340px;
    overflow: hidden;
    /* v9.4: Flex centering for the inner aspect-ratio wrapper */
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Inner wrapper - maintains the exact map aspect ratio so that
   percentage-based label positions always match the map image,
   even when the outer container is stretched by min-height or flex.
   Acts as the containing block for all absolute child layers. */
.ghost-map-inner {
    position: relative;
    width: 100%;
    max-height: 100%;
    aspect-ratio: 2328 / 1326;
    overflow: hidden;
}

/* Visual Layer - Zoomed Eurasian Cold War map background */
/* v7.0: Switched to zoomed map.jpg focusing on European/Asian theater */
/* USA and Germany shown in corner insets */
.ghost-map-visual {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../assets/map.jpg');
    background-repeat: no-repeat;
    background-position: center center;
    background-size: 100% 100%; /* Fill inner wrapper exactly (aspect ratio matches) */
    pointer-events: none;
    z-index: 1;
}

/* Highlight Canvas Container */
.ghost-map-highlight-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

/* Highlight Canvas - Glow effects rendered here */
.ghost-map-highlight {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    mix-blend-mode: screen;
    opacity: 0.9;
}

/* Pulsing animation for selected countries */
.ghost-map-highlight.selected-pulse {
    animation: ghost-pulse 2s ease-in-out infinite;
}

@keyframes ghost-pulse {
    0%, 100% {
        opacity: 0.9;
        filter: brightness(1);
    }
    50% {
        opacity: 1;
        filter: brightness(1.3);
    }
}

/* SVG Layer for adjacency lines */
.ghost-map-container .adjacency-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 3;
}

/* Country Labels Layer */
.ghost-map-labels {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 4;
}

/* Individual Country Label */
.ghost-label {
    position: absolute;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    transition: transform 0.15s ease, filter 0.15s ease;
}

.ghost-label .label-code {
    font-family: var(--font-teletype, 'Courier New', monospace);
    font-size: 12px;
    font-weight: bold;
    color: #2a2a2a;
    background: rgba(255, 255, 255, 0.85);
    padding: 3px 8px;
    border-radius: 3px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    letter-spacing: 1px;
}

.ghost-label .label-value {
    font-family: var(--font-teletype, 'Courier New', monospace);
    font-size: 10px;
    color: white;
    background: rgba(0, 0, 0, 0.7);
    padding: 2px 6px;
    border-radius: 2px;
}

/* Superpower Labels */
.ghost-label.superpower .label-code {
    font-size: 14px;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.95);
}

/* Alignment-based label styling */
.ghost-label.us-aligned .label-code {
    background: rgba(200, 220, 255, 0.9);
    border: 2px solid rgba(80, 144, 255, 0.8);
    color: #002868;
}

.ghost-label.ussr-aligned .label-code {
    background: rgba(255, 200, 200, 0.9);
    border: 2px solid rgba(255, 60, 60, 0.8);
    color: #8b0000;
}

.ghost-label.contested .label-code {
    background: rgba(230, 210, 255, 0.9);
    border: 2px solid rgba(180, 130, 220, 0.8);
    color: #4a2a6a;
}

/* Instability layer styling */
.ghost-label.instability-low .label-code {
    border: 2px solid #228b22;
}

.ghost-label.instability-med .label-code {
    border: 2px solid #d4a84b;
    background: rgba(255, 240, 200, 0.9);
}

.ghost-label.instability-high .label-code {
    border: 2px solid #ff8c00;
    background: rgba(255, 220, 180, 0.9);
}

.ghost-label.instability-crit .label-code {
    border: 2px solid #ff0000;
    background: rgba(255, 200, 200, 0.9);
    animation: label-danger-pulse 1s infinite;
}

/* Intel layer styling */
.ghost-label.intel-low .label-code {
    opacity: 0.6;
}

.ghost-label.intel-med .label-code {
    border: 2px solid #ffff00;
    box-shadow: 0 0 6px rgba(255, 255, 0, 0.5);
}

.ghost-label.intel-high .label-code {
    border: 2px solid #00ff00;
    box-shadow: 0 0 8px rgba(0, 255, 0, 0.6);
}

@keyframes label-danger-pulse {
    0%, 100% {
        box-shadow: 0 0 5px rgba(255, 0, 0, 0.3);
    }
    50% {
        box-shadow: 0 0 12px rgba(255, 0, 0, 0.7);
    }
}

/* Hover State */
.ghost-label.hovered {
    transform: translate(-50%, -50%) scale(1.15);
    filter: brightness(1.2);
    z-index: 100;
}

.ghost-label.hovered .label-code {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4),
                0 0 12px rgba(255, 215, 0, 0.6);
}

/* Selected State */
.ghost-label.selected {
    z-index: 101;
}

.ghost-label.selected .label-code {
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.8),
                0 2px 8px rgba(0, 0, 0, 0.4);
    animation: label-selected-glow 1.5s ease-in-out infinite;
}

@keyframes label-selected-glow {
    0%, 100% {
        box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.8),
                    0 2px 8px rgba(0, 0, 0, 0.4);
    }
    50% {
        box-shadow: 0 0 0 5px rgba(255, 215, 0, 1),
                    0 2px 12px rgba(0, 0, 0, 0.5);
    }
}

/* Interaction Layer - Captures all mouse events */
.ghost-map-interaction {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    cursor: default;
}

/* World map container adjustments for Ghost Map */
.world-map-container.ghost-map {
    position: relative;
    border: 2px solid #8b7355;
    border-radius: 4px;
    background: #1a1a1a;
    overflow: hidden;
}

.world-map-container.ghost-map .map-title {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-teletype, 'Courier New', monospace);
    font-size: 10px;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 2px;
    text-transform: uppercase;
    background: rgba(0, 0, 0, 0.5);
    padding: 4px 12px;
    border-radius: 2px;
    z-index: 20;
}

/* Legend adjustments */
/* v9.2: Improved legend readability - larger text, better contrast, clearer background */
.world-map-container.ghost-map .map-legend {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    background: rgba(20, 15, 10, 0.85);
    padding: 8px 16px;
    border-radius: 3px;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(160, 144, 128, 0.3);
}

.world-map-container.ghost-map .map-legend .legend-item {
    font-size: 11px;
    color: #d4c8b4;
    font-weight: bold;
    letter-spacing: 0.3px;
}

/* Clear Light Mode overrides for Ghost Map */
body.clear-light .ghost-map-visual {
    filter: brightness(1.1) contrast(0.95);
}

body.clear-light .ghost-label .label-code {
    background: rgba(255, 255, 255, 0.95);
    color: #1a1a1a;
}

body.clear-light .ghost-map-highlight {
    mix-blend-mode: multiply;
    opacity: 0.7;
}

/* USSR Theme adjustments for Ghost Map */
.theme-ussr .world-map-container.ghost-map,
.theme-molotov .world-map-container.ghost-map,
.theme-konev .world-map-container.ghost-map,
.theme-beria .world-map-container.ghost-map,
.theme-litvinov .world-map-container.ghost-map {
    border-color: #5a3030;
}

.theme-ussr .ghost-label.selected .label-code,
.theme-molotov .ghost-label.selected .label-code,
.theme-konev .ghost-label.selected .label-code,
.theme-beria .ghost-label.selected .label-code,
.theme-litvinov .ghost-label.selected .label-code {
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.9),
                0 2px 8px rgba(0, 0, 0, 0.5);
}

/* ========================================
   v6.0: LOG PANEL REFACTOR
   - Maximize map area
   - Move logs to modal overlays
   - Add nav bar toggle buttons with notifications
   ======================================== */

/* 1. HIDE THE INLINE ACTION LOG */
#action-log {
    display: none !important;
}

/* 2. EXPAND MAP AREA - Scrollable to show full map */
#map-area {
    flex: 1 1 auto !important;
    min-height: 300px;
    max-height: none; /* Remove any max-height constraints */
    overflow-y: auto; /* Allow scrolling if map is taller than viewport */
    overflow-x: hidden;
}

/* v7.0: Policy views fill space when active - flex display handled by .policy-view.active */
#foreign-policy-view,
#domestic-policy-view,
#intel-policy-view {
    flex: 1;
    min-height: 0;
    /* Note: display is controlled by .policy-view / .policy-view.active in desk.css */
}

/* Cropped ghost map - expanded to show southern hemisphere (Australia, NZ, Argentina) */
/* v6.3: Expanded vertical range to show more of the world */
.ghost-map-container {
    padding-bottom: 56.96% !important; /* Match map.jpg aspect ratio to avoid cropping */
    min-height: 340px;
}

/* For very tall viewports, allow more map height */
@media (min-height: 900px) {
    .ghost-map-container {
        padding-bottom: 56.96% !important;
        min-height: 400px;
    }
}

@media (min-height: 1100px) {
    .ghost-map-container {
        padding-bottom: 56.96% !important;
        min-height: 460px;
    }
}

/* v6.3: Compact region summaries to balance expanded map */
.region-summaries {
    margin-top: 10px !important;
    gap: 8px !important;
}

.region-summary {
    padding: 8px 10px !important;
    min-width: 160px !important;
}

.region-summary .region-header {
    margin-bottom: 6px !important;
    padding-bottom: 5px !important;
}

.region-summary .region-name {
    font-size: 12px !important;
}

.country-chips {
    gap: 4px !important;
}

.country-chip {
    padding: 2px 6px !important;
    font-size: 10px !important;
}

/* 3. LOG TOGGLE BUTTONS IN HEADER */
.log-toggle-buttons {
    display: flex;
    gap: 8px;
    margin-left: 15px;
    padding-left: 15px;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
}

.log-toggle-btn {
    position: relative;
    background: linear-gradient(180deg, var(--bakelite-light, #4a3828) 0%, var(--bakelite-dark, #2a2018) 100%);
    border: 1px solid #5a4838;
    border-radius: 4px;
    padding: 6px 12px;
    color: var(--paper-aged, #e8dcc4);
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.log-toggle-btn:hover {
    background: linear-gradient(180deg, #5a4838 0%, #3a2828 100%);
    border-color: #7a5848;
}

.log-toggle-btn:active {
    transform: translateY(1px);
}

.log-toggle-btn .btn-icon {
    font-size: 14px;
}

/* Notification dot for unread entries */
.log-toggle-btn .notification-dot {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 10px;
    height: 10px;
    background: #ff3333;
    border-radius: 50%;
    border: 2px solid var(--wood-medium, #6b4423);
    opacity: 0;
    transform: scale(0);
    transition: opacity 0.3s, transform 0.3s;
}

.log-toggle-btn.has-unread .notification-dot {
    opacity: 1;
    transform: scale(1);
    animation: notification-pulse 2s infinite;
}

@keyframes notification-pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(255, 51, 51, 0.7);
    }
    50% {
        box-shadow: 0 0 0 4px rgba(255, 51, 51, 0);
    }
}

/* 4. LOG MODAL OVERLAY */
.log-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9000;
    opacity: 0;
    visibility: hidden;
    pointer-events: none; /* CRITICAL: Allow click-through when hidden */
    transition: opacity 0.3s, visibility 0.3s;
}

.log-modal-overlay.visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto; /* Re-enable clicks when modal is shown */
}

.log-modal {
    width: 90%;
    max-width: 700px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    border-radius: 6px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    transform: translateY(20px);
    transition: transform 0.3s;
    overflow: hidden;
}

.log-modal-overlay.visible .log-modal {
    transform: translateY(0);
}

/* Gazette Modal Styling */
.log-modal.gazette {
    background: #f4f1ea;
    border: 3px solid #1a1a1a;
}

.log-modal.gazette .log-modal-header {
    background: transparent;
    border-bottom: 3px double #1a1a1a;
    padding: 15px 20px;
}

.log-modal.gazette .log-modal-title {
    font-family: 'Playfair Display', 'Times New Roman', serif;
    font-size: 28px;
    font-weight: 900;
    color: #1a1a1a;
    text-transform: uppercase;
    letter-spacing: 3px;
    text-align: center;
}

.log-modal.gazette .log-modal-content {
    padding: 20px;
    font-family: 'Georgia', serif;
    font-size: 14px;
    line-height: 1.6;
    color: #2a2a2a;
    overflow-y: auto;
    flex: 1;
}

.log-modal.gazette .log-entry {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #d0c8b8;
}

.log-modal.gazette .log-entry:last-child {
    border-bottom: none;
}

.log-modal.gazette .log-entry.usa-entry {
    color: #002050;
}

.log-modal.gazette .log-entry.ussr-entry {
    color: #600000;
}

/* Intel Modal Styling */
.log-modal.intel {
    background: #111;
    border: 2px solid #333;
}

.log-modal.intel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 255, 0, 0.03) 2px,
        rgba(0, 255, 0, 0.03) 4px
    );
    pointer-events: none;
    z-index: 1;
}

.log-modal.intel .log-modal-header {
    position: relative;
    z-index: 2;
    background: #0a0a0a;
    border-bottom: 2px solid #333;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.log-modal.intel .log-modal-title {
    font-family: 'Special Elite', 'Courier New', monospace;
    font-size: 20px;
    font-weight: bold;
    color: #ff3333;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(255, 50, 50, 0.5);
}

.log-modal.intel .classification-stamp {
    color: #ffcc00;
    font-size: 10px;
    font-weight: bold;
    letter-spacing: 1px;
}

.log-modal.intel .log-modal-content {
    position: relative;
    z-index: 2;
    padding: 20px;
    font-family: 'Courier Prime', 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.5;
    color: #aaccff;
    overflow-y: auto;
    flex: 1;
}

.log-modal.intel .log-entry {
    margin-bottom: 8px;
    padding-left: 10px;
    border-left: 2px solid #3b5998;
}

.log-modal.intel .log-entry.usa-entry {
    border-left-color: #3b5998;
    color: #aaccff;
}

.log-modal.intel .log-entry.ussr-entry {
    border-left-color: #cc0000;
    color: #ffaaaa;
}

.log-modal.intel .log-entry.misperceived {
    border-left-style: dashed;
    font-style: italic;
    opacity: 0.85;
}

/* Modal Close Button */
.log-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 30px;
    height: 30px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: #888;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 10;
}

.log-modal-close:hover {
    background: rgba(139, 0, 0, 0.8);
    color: white;
    border-color: #cc0000;
}

.log-modal.gazette .log-modal-close {
    background: #f4f1ea;
    border: 2px solid #1a1a1a;
    color: #1a1a1a;
}

.log-modal.gazette .log-modal-close:hover {
    background: #8b0000;
    color: white;
    border-color: #8b0000;
}

/* Modal Footer with cursor */
.log-modal-footer {
    padding: 10px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: right;
}

.log-modal.gazette .log-modal-footer {
    background: rgba(0, 0, 0, 0.02);
    border-top: 1px double #c0b8a0;
}

.log-modal.intel .log-modal-footer {
    background: #0a0a0a;
}

.log-modal.intel .cursor-blink {
    color: #00ff00;
    text-shadow: 0 0 5px #00ff00;
    animation: cursor-blink 1s infinite;
}

@keyframes cursor-blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* 5. USSR THEME ADJUSTMENTS */

/* USSR: Situation Board as Vertical Left Panel */
.theme-ussr #foreign-policy-view.active,
.theme-molotov #foreign-policy-view.active,
.theme-konev #foreign-policy-view.active,
.theme-beria #foreign-policy-view.active,
.theme-litvinov #foreign-policy-view.active {
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-rows: 1fr;
    gap: 10px;
}

.theme-ussr #situation-board,
.theme-molotov #situation-board,
.theme-konev #situation-board,
.theme-beria #situation-board,
.theme-litvinov #situation-board {
    grid-column: 1;
    grid-row: 1;
    width: auto;
    min-width: 180px;
    max-width: 240px;
    min-height: unset;
    height: auto;
    align-self: stretch;
    margin-bottom: 0;
}

.theme-ussr #situation-board .warning-ticker,
.theme-molotov #situation-board .warning-ticker,
.theme-konev #situation-board .warning-ticker,
.theme-beria #situation-board .warning-ticker,
.theme-litvinov #situation-board .warning-ticker {
    flex-direction: column;
    gap: 8px;
    white-space: normal;
}

.theme-ussr #situation-board .warning-item,
.theme-molotov #situation-board .warning-item,
.theme-konev #situation-board .warning-item,
.theme-beria #situation-board .warning-item,
.theme-litvinov #situation-board .warning-item {
    white-space: normal;
    text-align: left;
}

.theme-ussr #situation-board:empty::before,
.theme-molotov #situation-board:empty::before,
.theme-konev #situation-board:empty::before,
.theme-beria #situation-board:empty::before,
.theme-litvinov #situation-board:empty::before {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
}

.theme-ussr #map-area,
.theme-molotov #map-area,
.theme-konev #map-area,
.theme-beria #map-area,
.theme-litvinov #map-area {
    grid-column: 2;
    grid-row: 1;
}

.theme-ussr #action-panel,
.theme-molotov #action-panel,
.theme-konev #action-panel,
.theme-beria #action-panel,
.theme-litvinov #action-panel {
    grid-column: 3;
    grid-row: 1;
}

/* v9.2: USA/Kennan themes - fix situation board text truncation in narrow column layout */
#situation-board .warning-ticker {
    flex-direction: column;
    gap: 8px;
    white-space: normal;
}

#situation-board .warning-item {
    white-space: normal;
    text-align: left;
}

.theme-ussr .log-toggle-btn,
.theme-molotov .log-toggle-btn,
.theme-konev .log-toggle-btn,
.theme-beria .log-toggle-btn,
.theme-litvinov .log-toggle-btn {
    background: linear-gradient(180deg, #3a2020 0%, #1a0a0a 100%);
    border-color: #5a2020;
    color: #ffcccc;
}

.theme-ussr .log-toggle-btn:hover,
.theme-molotov .log-toggle-btn:hover,
.theme-konev .log-toggle-btn:hover,
.theme-beria .log-toggle-btn:hover,
.theme-litvinov .log-toggle-btn:hover {
    background: linear-gradient(180deg, #4a2828 0%, #2a1010 100%);
    border-color: #7a3030;
}

/* 6. RESPONSIVE ADJUSTMENTS */
@media (max-width: 768px) {
    .log-toggle-buttons {
        margin-left: 10px;
        padding-left: 10px;
    }

    .log-toggle-btn {
        padding: 5px 8px;
        font-size: 10px;
    }

    .log-toggle-btn .btn-text {
        display: none;
    }

    .log-modal {
        width: 95%;
        max-height: 85vh;
    }
}

/* ========================================
   v7.0 - Intelligence Hub View (Three Rooms)
   ======================================== */

#intel-policy-view {
    flex-direction: column;
    gap: 12px;
    padding: 0;
}

.intel-log-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--paper-cream, #f4f1ea);
    border: 3px solid var(--wood-dark, #3d2914);
    border-radius: 3px;
    overflow: hidden;
    box-shadow:
        inset 0 0 20px rgba(0, 0, 0, 0.08),
        3px 3px 10px rgba(0, 0, 0, 0.3);
}

.intel-log-panel.intel-secret {
    background: linear-gradient(180deg, #0a0a0a 0%, #1a1a1a 100%);
    border-color: #333;
    box-shadow:
        inset 0 0 30px rgba(0, 50, 0, 0.2),
        0 0 20px rgba(0, 255, 0, 0.05);
}

/* Panel Header */
.intel-panel-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: linear-gradient(180deg,
        var(--brass, #b8860b) 0%,
        var(--brass-light, #d4a84b) 50%,
        var(--brass, #b8860b) 100%);
    border-bottom: 2px solid var(--wood-dark, #3d2914);
    font-family: 'Special Elite', 'Courier New', monospace;
}

.intel-secret .intel-panel-header {
    background: linear-gradient(180deg, #1a1a1a 0%, #2a2a2a 50%, #1a1a1a 100%);
    border-bottom: 1px solid #333;
    border-top: 1px solid rgba(0, 255, 0, 0.1);
}

.intel-panel-icon {
    font-size: 24px;
}

.intel-panel-title {
    font-size: 16px;
    font-weight: bold;
    letter-spacing: 2px;
    color: var(--ink-black, #1a1a1a);
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.3);
}

.intel-secret .intel-panel-title {
    color: #00ff00;
    text-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
}

.intel-panel-subtitle {
    font-size: 11px;
    color: rgba(0, 0, 0, 0.6);
    font-style: italic;
    margin-left: auto;
}

.intel-secret .intel-panel-subtitle {
    color: rgba(0, 255, 0, 0.5);
}

/* Panel Content */
.intel-panel-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    font-family: 'Special Elite', 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.6;
}

.intel-secret .intel-panel-content {
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 50, 0, 0.03) 0px,
        transparent 1px,
        transparent 3px
    );
}

/* v8.7: Human Assets summary */
.intel-prelude {
    margin-bottom: 12px;
}

.intel-asset-summary {
    border: 1px solid rgba(0, 255, 0, 0.2);
    background: rgba(0, 30, 0, 0.15);
    padding: 10px;
    font-size: 12px;
}

.asset-summary-header {
    display: flex;
    justify-content: space-between;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 11px;
    color: #00ff88;
    margin-bottom: 8px;
}

.asset-section {
    margin-bottom: 10px;
}

.asset-section-title {
    font-size: 10px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: rgba(0, 255, 0, 0.6);
    margin-bottom: 4px;
}

.asset-row {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 8px;
    padding: 4px 0;
    border-bottom: 1px dashed rgba(0, 255, 0, 0.15);
}

.asset-row.captured {
    color: #aaccff;
}

.asset-row:last-child {
    border-bottom: none;
}

.asset-name {
    font-weight: bold;
}

.asset-location {
    color: rgba(0, 255, 0, 0.7);
}

.asset-bonus {
    color: rgba(255, 255, 255, 0.7);
}

.asset-empty {
    font-style: italic;
    color: rgba(0, 255, 0, 0.5);
}

/* Log Entries */
.intel-log-entry {
    padding: 8px 12px;
    margin-bottom: 8px;
    border-left: 3px solid #666;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 0 3px 3px 0;
    transition: background 0.2s;
}

.intel-log-entry:hover {
    background: rgba(0, 0, 0, 0.06);
}

.intel-log-entry.usa-entry {
    border-left-color: #1a5276;
}

.intel-log-entry.ussr-entry {
    border-left-color: #8b0000;
}

.intel-log-entry.system-entry {
    border-left-color: #666;
    font-style: italic;
    opacity: 0.9;
}

.intel-log-entry.failed {
    text-decoration: line-through;
    opacity: 0.6;
}

.intel-log-entry.misperceived {
    border-left-style: dashed;
    font-style: italic;
    opacity: 0.85;
}

/* Secret Panel Entry Overrides */
.intel-secret .intel-log-entry {
    background: rgba(0, 50, 0, 0.1);
    color: #00cc00;
}

.intel-secret .intel-log-entry:hover {
    background: rgba(0, 100, 0, 0.15);
}

.intel-secret .intel-log-entry.usa-entry {
    border-left-color: #0066cc;
    color: #aaccff;
}

.intel-secret .intel-log-entry.ussr-entry {
    border-left-color: #cc0000;
    color: #ffaaaa;
}

.intel-secret .intel-log-entry.system-entry {
    color: #888;
}

.intel-secret .intel-log-entry.intel-threshold-entry {
    border-left-color: #d48c2b;
    background:
        linear-gradient(90deg, rgba(212, 140, 43, 0.24) 0%, rgba(28, 20, 6, 0.6) 55%, rgba(20, 16, 9, 0.5) 100%);
    color: #ffd6a3;
}

.intel-secret .intel-log-entry.intel-joe1-entry {
    border-left-color: #c12626;
    background:
        linear-gradient(90deg, rgba(193, 38, 38, 0.32) 0%, rgba(46, 10, 10, 0.7) 58%, rgba(24, 10, 10, 0.58) 100%);
    color: #ffd0d0;
    box-shadow: inset 0 0 0 1px rgba(193, 38, 38, 0.35);
}

.intel-secret .intel-log-entry.intel-launch-warning-entry {
    border-left-color: #e25a2d;
    background:
        linear-gradient(90deg, rgba(226, 90, 45, 0.28) 0%, rgba(53, 22, 11, 0.72) 58%, rgba(21, 11, 8, 0.55) 100%);
    color: #ffd8c6;
}

.intel-secret .intel-log-entry.intel-alert-entry,
.log-modal.intel .log-entry.intel-alert-entry {
    padding-top: 14px;
}

.intel-alert-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 5px;
    padding-right: 56px;
    font-family: var(--font-teletype, 'Courier New', monospace);
    font-size: 10px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.intel-alert-chip {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(245, 212, 147, 0.55);
    border-radius: 2px;
    padding: 1px 6px;
    background: rgba(42, 27, 11, 0.58);
    color: #ffe0b2;
    font-weight: bold;
    line-height: 1.3;
}

.intel-alert-context {
    color: rgba(241, 222, 192, 0.9);
    font-weight: bold;
}

.intel-alert-value {
    color: rgba(252, 208, 142, 0.95);
    font-variant-numeric: tabular-nums;
    margin-left: auto;
}

.intel-alert-copy {
    line-height: 1.45;
    text-wrap: pretty;
}

.intel-alert-entry.intel-alert-critical .intel-alert-chip {
    border-color: rgba(235, 97, 82, 0.9);
    background: rgba(76, 18, 18, 0.68);
    color: #ffd0c9;
}

.intel-alert-entry.intel-alert-warning .intel-alert-chip {
    border-color: rgba(223, 166, 88, 0.82);
    background: rgba(74, 42, 14, 0.64);
    color: #ffe1b0;
}

.intel-alert-entry.intel-alert-info .intel-alert-chip {
    border-color: rgba(130, 168, 210, 0.82);
    background: rgba(20, 40, 63, 0.58);
    color: #d6e8ff;
}

/* v6.1: Morning Paper Entry Styles */
/* GAZETTE entries - newspaper headline style */
.log-entry.gazette-entry {
    color: #1a3a5c;
    font-weight: 500;
    border-left: 3px solid #c9a227;
    padding-left: 8px;
    margin-left: -3px;
    background: linear-gradient(90deg, rgba(201, 162, 39, 0.08) 0%, transparent 50%);
}

.log-entry.gazette-entry::before {
    content: '';
}

/* INTEL entries - CIA cable style */
.log-entry.intel-entry {
    color: #00aa00;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    letter-spacing: 0.02em;
    border-left: 2px solid #00ff00;
    padding-left: 8px;
    margin-left: -2px;
    background: linear-gradient(90deg, rgba(0, 255, 0, 0.05) 0%, transparent 30%);
}

/* WORLD entries - flavor/atmosphere style */
.log-entry.world-entry {
    color: #666;
    font-style: italic;
    opacity: 0.85;
    border-left: 2px dotted #999;
    padding-left: 8px;
    margin-left: -2px;
}

/* Light mode overrides for Morning Paper entries */
body:not(.dark-mode) .log-entry.gazette-entry {
    color: #1a3a5c;
}

body:not(.dark-mode) .log-entry.intel-entry {
    color: #006600;
}

body:not(.dark-mode) .log-entry.world-entry {
    color: #555;
}

/* Intel log panel (Eyes Only) specific overrides */
.log-secret .log-entry.intel-entry {
    color: #00ff00;
    text-shadow: 0 0 2px rgba(0, 255, 0, 0.3);
}

.log-secret .log-entry.gazette-entry {
    color: #d4af37;
}

.log-secret .log-entry.world-entry {
    color: #888;
}

/* v6.1: Intel Hub Action Bar (v12.0: updated for field operations panel) */
.intel-action-bar {
    padding: 12px 16px;
    background: linear-gradient(180deg, #1a1a2e 0%, #0d0d1a 100%);
    border-top: 1px solid #333;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.intel-turn-controls {
    width: 100%;
    max-width: 300px;
}

.intel-turn-controls .end-turn-btn {
    width: 100%;
    padding: 10px 24px;
    font-size: 14px;
    background: linear-gradient(180deg, #2d5016 0%, #1a3009 100%);
    border: 1px solid #4a7c23;
    color: #9ccc65;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.intel-turn-controls .end-turn-btn:hover:not(:disabled) {
    background: linear-gradient(180deg, #3d6a1e 0%, #2a4a12 100%);
    border-color: #6b9d3a;
    color: #c5e1a5;
}

.intel-turn-controls .end-turn-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* v6.1: Domestic Desk Turn Controls */
.domestic-turn-controls {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #d0c8b8;
}

.domestic-turn-controls .end-turn-btn {
    width: 100%;
    padding: 12px 24px;
    font-size: 14px;
    background: linear-gradient(180deg, #1a4a6e 0%, #0d3a5c 100%);
    border: 1px solid #2a6a9e;
    color: #8fc4e8;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 4px;
}

.domestic-turn-controls .end-turn-btn:hover:not(:disabled) {
    background: linear-gradient(180deg, #2a5a7e 0%, #1a4a6c 100%);
    border-color: #4a8abe;
    color: #b8d8f0;
}

.domestic-turn-controls .end-turn-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Intel log entry overrides for Morning Paper types */
.intel-log-entry.gazette-entry {
    color: #c9a227;
    font-weight: 500;
    border-left-color: #c9a227;
}

.intel-log-entry.intel-entry {
    color: #00cc00;
    font-family: 'Courier New', monospace;
    font-size: 0.95em;
    border-left-color: #00ff00;
}

.intel-log-entry.world-entry {
    color: #888;
    font-style: italic;
    border-left-color: #666;
    border-left-style: dotted;
}

.intel-secret .intel-log-entry.intel-entry {
    color: #00ff00;
    text-shadow: 0 0 3px rgba(0, 255, 0, 0.4);
}

/* Phase 3: Gazette broadsheet polish */
#intel-gazette-panel {
    position: relative;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.28) 0%, rgba(246, 238, 224, 0.92) 100%),
        repeating-linear-gradient(
            90deg,
            rgba(73, 55, 26, 0.05) 0,
            rgba(73, 55, 26, 0.05) 1px,
            rgba(0, 0, 0, 0) 1px,
            rgba(0, 0, 0, 0) 172px
        ),
        linear-gradient(180deg, #f7f2e4 0%, #ece1ca 100%);
    clip-path: polygon(0 0, 99.5% 0, 100% 4%, 100% 100%, 1.6% 100%, 0 97%);
}

#intel-gazette-panel::after {
    content: '';
    position: absolute;
    right: 0;
    top: 10px;
    bottom: 10px;
    width: 3px;
    background: linear-gradient(180deg, rgba(128, 107, 74, 0.35) 0%, rgba(217, 199, 169, 0.1) 100%);
    pointer-events: none;
}

#intel-gazette-panel .intel-panel-content {
    column-count: 2;
    column-gap: 22px;
    column-rule: 1px solid rgba(88, 71, 46, 0.28);
    padding: 16px 18px;
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 14px;
    line-height: 1.46;
}

#intel-gazette-panel .intel-log-entry.gazette-broadsheet-entry {
    break-inside: avoid-column;
    margin-bottom: 10px;
    padding: 8px 10px 9px;
    border-left: none;
    border-radius: 2px;
    background: rgba(255, 252, 245, 0.62);
    border-bottom: 1px dotted rgba(77, 62, 39, 0.38);
    color: #292119;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.56);
}

#intel-gazette-panel .intel-log-entry.gazette-broadsheet-entry:hover {
    background: rgba(255, 249, 236, 0.9);
}

#intel-gazette-panel .intel-log-entry .gazette-dateline {
    display: block;
    margin-bottom: 2px;
    color: #5a4630;
    font-family: 'Arial', sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

#intel-gazette-panel .intel-log-entry .gazette-copy {
    display: block;
    text-wrap: pretty;
}

/* Phase 3: Classified entry stamps + redaction reveal */
.intel-secret .intel-log-entry.classified-entry,
.log-modal.intel .log-entry.classified-entry {
    position: relative;
    padding-top: 16px;
}

.intel-secret .intel-log-entry.classified-entry::before,
.log-modal.intel .log-entry.classified-entry::before {
    content: attr(data-stamp);
    position: absolute;
    top: 2px;
    right: 10px;
    font-family: 'Special Elite', 'Courier New', monospace;
    font-size: 9px;
    letter-spacing: 0.09em;
    color: rgba(209, 54, 63, 0.9);
    border: 1px solid rgba(209, 54, 63, 0.82);
    border-radius: 2px;
    padding: 1px 4px;
    text-transform: uppercase;
    transform: rotate(-8deg);
    background: rgba(22, 4, 4, 0.52);
    box-shadow: 0 0 4px rgba(255, 66, 75, 0.22);
    pointer-events: none;
}

.intel-redaction {
    display: inline-block;
    margin: 0 1px;
    padding: 0 4px;
    border-radius: 2px;
    background: #000;
    color: #000;
    letter-spacing: 0.08em;
    user-select: none;
}

.intel-redaction.intel-redaction-lift {
    animation: intel-redaction-lift 0.3s ease forwards;
}

.intel-log-entry.redaction-revealed,
.log-modal.intel .log-entry.redaction-revealed {
    animation: intel-reveal-glint 0.3s ease-out;
}

@keyframes intel-redaction-lift {
    from {
        background: #000;
        color: #000;
    }
    to {
        background: transparent;
        color: inherit;
    }
}

@keyframes intel-reveal-glint {
    from {
        filter: brightness(1.36);
    }
    to {
        filter: none;
    }
}

/* Modal parity for Gazette broadsheet format */
.log-modal.gazette .log-modal-content {
    column-count: 2;
    column-gap: 22px;
    column-rule: 1px solid rgba(88, 71, 46, 0.28);
}

.log-modal.gazette .log-entry.gazette-broadsheet-entry {
    break-inside: avoid-column;
}

.log-modal.gazette .log-entry .gazette-dateline {
    display: block;
    margin-bottom: 2px;
    color: #5a4630;
    font-family: 'Arial', sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.log-modal.gazette .log-entry .gazette-copy {
    display: block;
    font-family: 'Georgia', serif;
    color: #222;
}

/* Phase 3: PDB dark-manila/typewriter treatment */
.intel-log-panel.intel-secret {
    background:
        linear-gradient(180deg, rgba(76, 62, 43, 0.95) 0%, rgba(49, 39, 28, 0.98) 100%),
        radial-gradient(circle at 20% 16%, rgba(201, 171, 125, 0.14) 0%, transparent 48%);
    border-color: #4a3825;
    box-shadow:
        inset 0 0 26px rgba(0, 0, 0, 0.42),
        0 6px 14px rgba(0, 0, 0, 0.34);
}

.intel-secret .intel-panel-header {
    background: linear-gradient(180deg, #3b2f21 0%, #2c2318 100%);
    border-bottom: 1px solid #63503a;
    border-top: 1px solid rgba(224, 193, 146, 0.2);
}

.intel-secret .intel-panel-title {
    color: #f0d6ae;
    text-shadow: none;
    letter-spacing: 1.5px;
}

.intel-secret .intel-panel-subtitle {
    color: rgba(230, 204, 162, 0.72);
}

.intel-secret .intel-panel-content {
    background:
        repeating-linear-gradient(
            0deg,
            rgba(20, 15, 10, 0.08) 0px,
            rgba(20, 15, 10, 0.08) 1px,
            transparent 1px,
            transparent 4px
        );
    color: #e6dac6;
    font-family: 'Courier Prime', 'Courier New', monospace;
    letter-spacing: 0.01em;
}

.intel-secret .intel-log-entry {
    background: rgba(35, 26, 18, 0.58);
    border-left-color: #9f7e4f;
    color: #eadfcd;
}

.intel-secret .intel-log-entry:hover {
    background: rgba(50, 37, 24, 0.74);
}

.intel-secret .intel-log-entry.usa-entry {
    border-left-color: #8daece;
    color: #d7e4f3;
}

.intel-secret .intel-log-entry.ussr-entry {
    border-left-color: #d59292;
    color: #f4cccc;
}

.intel-secret .intel-log-entry.system-entry {
    color: #c9bb9e;
}

.intel-secret .intel-asset-summary {
    border-color: rgba(208, 172, 117, 0.38);
    background: rgba(33, 24, 17, 0.5);
}

.intel-secret .asset-summary-header {
    color: #f0d6a4;
}

.intel-secret .asset-section-title {
    color: rgba(230, 198, 143, 0.72);
}

.intel-secret .asset-location {
    color: rgba(229, 204, 164, 0.8);
}

.log-modal.intel {
    background:
        linear-gradient(180deg, #31271c 0%, #241c13 100%);
    border: 2px solid #5c4731;
}

.log-modal.intel::before {
    background:
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(29, 20, 11, 0.12) 2px,
            rgba(29, 20, 11, 0.12) 4px
        );
}

.log-modal.intel .log-modal-header {
    background: #2d2419;
    border-bottom: 2px solid #5c4731;
}

.log-modal.intel .log-modal-title {
    color: #efd1ad;
    text-shadow: none;
}

.log-modal.intel .classification-stamp {
    color: #e3bd84;
}

.log-modal.intel .log-modal-content {
    color: #e6dac6;
    font-family: 'Courier Prime', 'Courier New', monospace;
}

/* Empty State */
.intel-log-empty {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-style: italic;
}

.intel-secret .intel-log-empty {
    color: rgba(0, 255, 0, 0.4);
}

/* Scrollbar Styling for Intel Panels */
.intel-panel-content::-webkit-scrollbar {
    width: 8px;
}

.intel-panel-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

.intel-panel-content::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

.intel-secret .intel-panel-content::-webkit-scrollbar-track {
    background: rgba(0, 50, 0, 0.2);
}

.intel-secret .intel-panel-content::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 0, 0.3);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    #intel-policy-view {
        gap: 8px;
    }

    .intel-panel-header {
        padding: 8px 12px;
        gap: 8px;
    }

    .intel-panel-icon {
        font-size: 18px;
    }

    .intel-panel-title {
        font-size: 13px;
        letter-spacing: 1px;
    }

    .intel-panel-subtitle {
        display: none;
    }

    .intel-panel-content {
        padding: 10px;
        font-size: 12px;
    }

    .intel-log-entry {
        padding: 6px 10px;
        margin-bottom: 6px;
    }

    #intel-gazette-panel .intel-panel-content,
    .log-modal.gazette .log-modal-content {
        column-count: 1;
        column-rule: none;
    }

    .intel-secret .intel-log-entry.classified-entry::before,
    .log-modal.intel .log-entry.classified-entry::before {
        right: 8px;
        font-size: 8px;
    }
}

/* ========================================
   v6.0: Title Overlay Modal Fix
   Ensures the title screen fully covers previous game state
   ======================================== */
.title-overlay {
    /* Ensure solid background - no see-through */
    background: #0a0a0a !important;
    /* Ensure highest z-index to cover everything */
    z-index: 99999 !important;
    /* Prevent scrolling behind overlay */
    isolation: isolate;
}

/* When title overlay is present, hide body scrollbar */
body:has(.title-overlay) {
    overflow: hidden;
}

/* Ensure advisor overlay also has solid background */
.advisor-overlay {
    background: #0a0a0a !important;
    z-index: 99998 !important;
}

body:has(.advisor-overlay) {
    overflow: hidden;
}

/* ========================================
   v7.0: COLLAPSIBLE ACTION PANEL
   - Toggle button to collapse/expand
   - Scrollable content when expanded
   - Compact header-only mode when collapsed
   ======================================== */

/* Action panel base - ensure scrollability */
#action-panel {
    max-height: calc(100vh - 200px); /* Prevent panel from exceeding viewport */
    overflow-y: auto;
    transition: max-height 0.3s ease, width 0.3s ease, min-width 0.3s ease;
}

/* Collapse toggle button */
.action-panel-toggle {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    color: var(--paper-cream, #f5f0e6);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
}

.action-panel-toggle:hover {
    background: rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.4);
}

.action-panel-toggle::before {
    content: '\u25C0'; /* Left arrow - collapse */
}

/* Action header needs position relative for toggle button */
.action-header {
    position: relative;
    padding-right: 40px; /* Make room for toggle button */
}

/* Collapsed state */
#action-panel.collapsed {
    min-width: 60px;
    width: 60px;
    max-width: 60px;
    flex: 0 0 60px !important;
    overflow: hidden;
}

#action-panel.collapsed .action-header {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
    padding: 15px 5px;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

#action-panel.collapsed .action-header h2 {
    font-size: 14px;
    white-space: nowrap;
}

#action-panel.collapsed .ap-display {
    font-size: 12px;
    white-space: nowrap;
}

#action-panel.collapsed .action-panel-toggle {
    position: static;
    transform: rotate(180deg);
    margin-bottom: 10px;
}

#action-panel.collapsed .action-panel-toggle::before {
    content: '\u25B6'; /* Right arrow - expand */
}

/* Hide content when collapsed */
#action-panel.collapsed .action-list,
#action-panel.collapsed #unified-target-selector,
#action-panel.collapsed .recommended-actions,
#action-panel.collapsed .all-actions-section,
#action-panel.collapsed .commanders-intent,
#action-panel.collapsed .special-action-section,
#action-panel.collapsed .async-banner,
#action-panel.collapsed .turn-controls,
#action-panel.collapsed .advisor-button-row {
    display: none;
}

/* Expand map area when action panel is collapsed */
#foreign-policy-view:has(#action-panel.collapsed) #map-area {
    flex: 1 1 100%;
}

/* Responsive: On smaller screens, collapsed panel is even more compact */
@media (max-width: 1200px) {
    #action-panel.collapsed {
        min-width: 50px;
        width: 50px;
        max-width: 50px;
        flex: 0 0 50px !important;
    }

    #action-panel.collapsed .action-header h2 {
        font-size: 12px;
    }
}

/* Scrollbar styling for action panel */
#action-panel::-webkit-scrollbar {
    width: 8px;
}

#action-panel::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

#action-panel::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

#action-panel::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.5);
}

/* ========================================
   v8.10: Crisis Explainability
   ======================================== */
.crisis-triggers {
    margin-top: 8px;
    padding: 6px 10px;
    background: rgba(0, 0, 0, 0.2);
    border-left: 3px solid var(--defcon-2, #ff8c00);
    font-size: 0.85em;
    opacity: 0.85;
}

.crisis-triggers .trigger-label {
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.75em;
    letter-spacing: 1px;
}

.crisis-triggers ul {
    margin: 4px 0 0 0;
    padding-left: 16px;
}

.crisis-triggers li {
    margin: 2px 0;
}

/* ========================================
   v8.2 - CHOKEPOINT / SHIPPING LANES
   ======================================== */

/* Chokepoint selector in action cards */
.chokepoint-selector {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #a09080;
}

.chokepoint-selector label {
    font-size: 11px;
    color: #3a3a3a;
    font-weight: bold;
}

.chokepoint-select {
    flex: 1;
    padding: 6px 8px;
    font-family: var(--font-body);
    font-size: 12px;
    border: 2px solid #3a3a3a;
    border-radius: 2px;
    background: #ffffff;
    color: #000000;
    font-weight: bold;
}

/* Agency selector for targeted mole insertion */
.agency-selector {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #a09080;
}

.agency-selector label {
    font-size: 11px;
    color: #3a3a3a;
    font-weight: bold;
}

.agency-select {
    flex: 1;
    padding: 6px 8px;
    font-family: var(--font-body);
    font-size: 12px;
    border: 2px solid #3a3a3a;
    border-radius: 2px;
    background: #ffffff;
    color: #000000;
    font-weight: bold;
}

/* Chokepoint status panel */
.chokepoint-status-panel {
    margin: 12px 0;
    padding: 10px;
    border: 1px solid #a09080;
    background: rgba(245, 239, 227, 0.6);
}

.cp-header {
    font-size: 10px;
    font-weight: bold;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #555;
    margin-bottom: 8px;
    border-bottom: 1px solid #c0b0a0;
    padding-bottom: 4px;
}

.cp-row {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 3px 0;
    font-size: 11px;
    border-bottom: 1px dotted #d0c0b0;
}

.cp-row:last-child {
    border-bottom: none;
}

.cp-name {
    flex: 1;
    font-weight: bold;
    color: #2b2b2b;
}

.cp-control {
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 2px;
    font-weight: bold;
    letter-spacing: 0.5px;
}

.cp-control.usa-control {
    background: rgba(0, 40, 104, 0.15);
    color: #002868;
}

.cp-control.ussr-control {
    background: rgba(204, 0, 0, 0.15);
    color: #cc0000;
}

.cp-control.contested {
    background: rgba(120, 120, 120, 0.15);
    color: #555;
}

.cp-ops {
    font-size: 10px;
}

.cp-interdicted {
    color: #cc0000;
    font-weight: bold;
}

.cp-neutralized {
    color: #888;
    font-style: italic;
}

.cp-escorted {
    color: #002868;
    font-weight: bold;
}

.cp-clear {
    color: #999;
    font-style: italic;
}

.action-confirmation-note {
    margin: 10px 0 0;
    padding: 7px 10px;
    border: 1px solid rgba(129, 18, 18, 0.35);
    background: linear-gradient(180deg, rgba(78, 10, 10, 0.12) 0%, rgba(34, 8, 8, 0.24) 100%);
    color: #7c1919;
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 1.3px;
    text-transform: uppercase;
}

/* ========================================
   Phase 5: Hold-to-Confirm (high-stakes doctrine actions)
   ======================================== */
#action-panel button.hold-confirm-btn {
    --hold-confirm-progress: 0%;
    position: relative;
    overflow: hidden;
    isolation: isolate;
    touch-action: none;
}

#action-panel button.hold-confirm-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    width: var(--hold-confirm-progress);
    background: linear-gradient(90deg, rgba(235, 76, 76, 0.85) 0%, rgba(168, 17, 17, 0.92) 100%);
    opacity: 0;
    transition: opacity 0.12s ease;
    z-index: 1;
    pointer-events: none;
}

#action-panel button.hold-confirm-btn > :not(.hold-confirm-warning):not(.hold-confirm-stamp) {
    position: relative;
    z-index: 2;
    transition: opacity 0.12s ease;
}

#action-panel button.hold-confirm-btn .hold-confirm-warning {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    color: #ffe8d1;
    font-family: var(--font-teletype, 'Courier New', monospace);
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.65);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.1s ease;
    text-align: center;
}

#action-panel button.hold-confirm-btn.hold-confirm-active,
#action-panel button.hold-confirm-btn.hold-confirm-committed {
    border-color: #3d0000;
    background: linear-gradient(180deg, #7a0808 0%, #3d0000 100%);
    color: #ffe8d1;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        0 0 0 1px rgba(250, 120, 120, 0.18),
        0 4px 10px rgba(40, 0, 0, 0.55);
}

#action-panel button.hold-confirm-btn.hold-confirm-active::after,
#action-panel button.hold-confirm-btn.hold-confirm-committed::after {
    opacity: 1;
}

#action-panel button.hold-confirm-btn.hold-confirm-active .hold-confirm-warning,
#action-panel button.hold-confirm-btn.hold-confirm-committed .hold-confirm-warning {
    opacity: 1;
}

#action-panel button.hold-confirm-btn.hold-confirm-active > :not(.hold-confirm-warning):not(.hold-confirm-stamp),
#action-panel button.hold-confirm-btn.hold-confirm-committed > :not(.hold-confirm-warning):not(.hold-confirm-stamp) {
    opacity: 0;
}

#action-panel button.hold-confirm-btn.hold-confirm-active {
    cursor: progress;
}

#action-panel button.hold-confirm-btn.hold-confirm-cancelled {
    animation: hold-confirm-clunk 0.2s ease;
}

@keyframes hold-confirm-clunk {
    0% { transform: translateY(0); }
    45% { transform: translateY(2px); }
    100% { transform: translateY(0); }
}

#action-panel button.hold-confirm-btn .hold-confirm-stamp {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 4;
    padding: 3px 10px;
    border: 2px solid rgba(255, 220, 220, 0.9);
    background: rgba(46, 0, 0, 0.75);
    color: #ffd6d6;
    font-family: var(--font-teletype, 'Courier New', monospace);
    font-size: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
    transform: translate(-50%, -50%) rotate(-6deg) scale(0.8);
    opacity: 0;
    pointer-events: none;
}

#action-panel button.hold-confirm-btn .hold-confirm-stamp.visible {
    animation: hold-confirm-stamp-in 0.42s ease forwards;
}

@keyframes hold-confirm-stamp-in {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) rotate(-10deg) scale(1.2);
    }
    35% {
        opacity: 1;
        transform: translate(-50%, -50%) rotate(-6deg) scale(0.95);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) rotate(-6deg) scale(0.92);
    }
}

.hold-confirm-screen-flash {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 10020;
    background: radial-gradient(circle at 50% 50%, rgba(255, 245, 220, 0.24) 0%, rgba(255, 60, 40, 0.14) 45%, rgba(20, 0, 0, 0) 100%);
    animation: hold-confirm-screen-flash-fade 0.22s ease-out forwards;
}

@keyframes hold-confirm-screen-flash-fade {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* ========================================
   Phase 6: Microdot + Teletype + Turn Atmosphere
   ======================================== */
body.lamp-switch-flash::before {
    opacity: 0.05 !important;
}

body.lamp-switch-flash::after {
    opacity: 0.08 !important;
}

.lamp-toggle-btn.turn-flicker {
    animation: lamp-turn-flicker 0.26s steps(2, end);
}

@keyframes lamp-turn-flicker {
    0% { filter: brightness(1); }
    30% { filter: brightness(1.4); }
    65% { filter: brightness(0.82); }
    100% { filter: brightness(1); }
}

#desk.desk-turn-shuffle .policy-view.active #map-area,
#desk.desk-turn-shuffle .policy-view.active #domestic-dashboard,
#desk.desk-turn-shuffle .policy-view.active #domestic-action-panel,
#desk.desk-turn-shuffle .policy-view.active .intel-log-panel {
    animation: desk-turn-shuffle 0.34s ease;
}

@keyframes desk-turn-shuffle {
    0% { transform: translate3d(0, 0, 0) rotate(0deg); }
    35% { transform: translate3d(2px, 1px, 0) rotate(0.18deg); }
    70% { transform: translate3d(-1px, -1px, 0) rotate(-0.12deg); }
    100% { transform: translate3d(0, 0, 0) rotate(0deg); }
}

.action-send-indicator {
    min-height: 14px;
    margin-top: 4px;
    font-family: var(--font-teletype, 'Courier New', monospace);
    font-size: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #f2cf8b;
    opacity: 0;
    transition: opacity 0.14s ease;
    text-shadow: 0 0 4px rgba(242, 207, 139, 0.35);
}

.action-send-indicator.sending {
    opacity: 1;
    animation: action-send-blink 0.16s steps(2, end) infinite;
}

.action-send-indicator.sending.sent {
    animation: none;
    color: #b7dcff;
    text-shadow: 0 0 5px rgba(126, 184, 239, 0.45);
}

#action-panel.collapsed .action-send-indicator {
    display: none;
}

@keyframes action-send-blink {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0.58; }
}

#footer.footer-tension-pulse .classification {
    animation: footer-alert-pulse 1.2s ease-in-out infinite;
}

@keyframes footer-alert-pulse {
    0%, 100% {
        color: #d85757;
        text-shadow: 0 0 0 rgba(216, 87, 87, 0);
    }
    50% {
        color: #ff9c9c;
        text-shadow: 0 0 9px rgba(233, 82, 82, 0.55);
    }
}

body.clear-light #footer.footer-tension-pulse .classification {
    color: #9f2a2a !important;
    animation: footer-alert-pulse-clear 1.3s ease-in-out infinite;
}

@keyframes footer-alert-pulse-clear {
    0%, 100% {
        text-shadow: 0 0 0 rgba(199, 70, 70, 0);
    }
    50% {
        text-shadow: 0 0 6px rgba(199, 70, 70, 0.35);
    }
}

.protocol-microdot-overlay {
    position: fixed;
    inset: 0;
    z-index: 10030;
    background: rgba(6, 6, 8, 0.8);
    backdrop-filter: blur(1px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
}

.protocol-microdot-modal {
    width: min(860px, calc(100vw - 30px));
    max-height: calc(100vh - 34px);
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px;
    border: 2px solid #5f4822;
    border-radius: 4px;
    background:
        linear-gradient(180deg, rgba(250, 198, 113, 0.08) 0%, rgba(30, 18, 8, 0.5) 50%, rgba(10, 7, 5, 0.95) 100%),
        #0b0907;
    color: #e8d6b3;
    box-shadow:
        inset 0 1px 0 rgba(255, 227, 178, 0.22),
        0 12px 40px rgba(0, 0, 0, 0.6);
    transform: translateY(8px);
    opacity: 0;
    transition: transform 0.16s ease, opacity 0.16s ease;
}

.protocol-microdot-modal.visible {
    transform: translateY(0);
    opacity: 1;
}

.protocol-microdot-close {
    align-self: flex-end;
    width: 30px;
    height: 30px;
    border-radius: 3px;
    border: 1px solid #6d5327;
    background: #22170b;
    color: #e4c481;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.protocol-microdot-header {
    margin-top: -30px;
    padding-right: 36px;
}

.protocol-microdot-kicker {
    font-family: var(--font-teletype, 'Courier New', monospace);
    font-size: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #a48859;
}

.protocol-microdot-title {
    margin: 4px 0 2px;
    font-family: var(--font-display, 'Courier New', monospace);
    font-size: 20px;
    letter-spacing: 1px;
    color: #f1dbb0;
}

.protocol-microdot-subtitle,
.protocol-microdot-label,
.protocol-microdot-meta {
    font-family: var(--font-teletype, 'Courier New', monospace);
    font-size: 11px;
    letter-spacing: 1px;
}

.protocol-microdot-subtitle {
    color: #c8aa75;
}

.protocol-microdot-label {
    text-transform: uppercase;
    color: #e4c184;
}

.protocol-microdot-textarea {
    width: 100%;
    min-height: 280px;
    resize: vertical;
    padding: 12px;
    border: 1px solid #6f5424;
    border-radius: 2px;
    background:
        repeating-linear-gradient(
            180deg,
            rgba(255, 192, 94, 0.04) 0px,
            rgba(255, 192, 94, 0.04) 1px,
            rgba(12, 10, 8, 0.96) 1px,
            rgba(12, 10, 8, 0.96) 3px
        );
    color: #f0c777;
    caret-color: #ffd58d;
    font-family: var(--font-teletype, 'Courier New', monospace);
    font-size: 12px;
    line-height: 1.45;
    box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.65);
}

.protocol-microdot-textarea:focus {
    outline: none;
    border-color: #b6842e;
    box-shadow:
        inset 0 1px 4px rgba(0, 0, 0, 0.65),
        0 0 0 1px rgba(182, 132, 46, 0.55),
        0 0 18px rgba(200, 137, 39, 0.22);
}

.protocol-microdot-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #b59662;
}

.protocol-microdot-status {
    color: #f0cb7e;
}

.protocol-microdot-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.protocol-microdot-btn {
    padding: 8px 12px;
    border: 1px solid #715526;
    border-radius: 2px;
    background: linear-gradient(180deg, #2f2110 0%, #171108 100%);
    color: #dbbf8b;
    font-family: var(--font-teletype, 'Courier New', monospace);
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
}

.protocol-microdot-btn:hover {
    border-color: #a5772d;
    color: #f7d79b;
}

.protocol-microdot-btn.primary {
    background: linear-gradient(180deg, #9a2a20 0%, #64160f 100%);
    border-color: #af4937;
    color: #ffe4c0;
}

/* Sprint 7f: Joe-1 event takeover styling */
#phase-overlay.joe1-event-overlay {
    background: radial-gradient(circle at 50% 20%, rgba(94, 16, 24, 0.7) 0%, rgba(15, 5, 7, 0.95) 68%);
}

#phase-overlay.joe1-announcement-takeover {
    animation: joe1-overlay-pulse 1.2s cubic-bezier(0.32, 0, 0.2, 1) 3 alternate;
}

#phase-overlay.joe1-announcement-takeover::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(circle at center, rgba(255, 80, 80, 0.2) 0%, rgba(255, 20, 20, 0) 58%);
    animation: joe1-flash 0.64s ease-in-out 3;
}

#phase-overlay.joe1-announcement-takeover .event-modal {
    transform-origin: 50% 50%;
    animation: joe1-shake 0.45s ease-in-out 5;
}

.event-modal-joe1 {
    background: linear-gradient(180deg, #231214 0%, #160d0f 100%);
    border-color: #8f2e34;
    box-shadow:
        0 12px 36px rgba(0, 0, 0, 0.6),
        0 0 24px rgba(155, 38, 48, 0.32);
    color: #f3ddd9;
}

.event-modal-joe1::before {
    border-color: rgba(176, 79, 84, 0.55);
}

.event-modal-joe1 .event-newspaper,
.event-modal-joe1 .event-title {
    color: #ffd8cc;
}

.event-modal-joe1 .event-date {
    color: #c59f9f;
}

.event-modal-joe1 .event-cable {
    margin: 0 0 18px;
    padding: 10px 12px;
    border: 1px dashed rgba(190, 86, 74, 0.62);
    border-radius: 3px;
    background: rgba(59, 20, 23, 0.58);
    color: #f4dfd8;
    font-size: 12px;
    line-height: 1.5;
    text-align: left;
}

.event-choices-joe1 {
    gap: 12px;
}

.event-btn-joe1.debrief-cable {
    display: block;
    border: 1px solid rgba(171, 79, 71, 0.66);
    border-radius: 3px;
    background: linear-gradient(180deg, rgba(72, 24, 27, 0.9) 0%, rgba(39, 13, 16, 0.95) 100%);
    color: #f8e3dc;
    padding: 14px 16px;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.event-btn-joe1.debrief-cable:hover {
    transform: translateX(5px);
    border-color: #d56f66;
    box-shadow: 0 0 16px rgba(213, 111, 102, 0.28);
}

.event-btn-joe1 .btn-text {
    color: #ffe7e1;
    letter-spacing: 0.5px;
}

.event-btn-joe1 .btn-flavor {
    color: #d9b2a8;
}

.event-choices-policy-fork {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.event-modal-joe1-policy-fork {
    max-width: min(760px, calc(100vw - 48px));
}

.event-btn-policy-card {
    min-height: 180px;
    padding: 16px 14px;
    border: 2px solid #8d6340;
    border-radius: 2px;
    background:
        linear-gradient(180deg, rgba(255, 242, 214, 0.23) 0%, rgba(173, 123, 73, 0.14) 100%),
        linear-gradient(180deg, #5a2f20 0%, #321a13 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 236, 204, 0.32),
        0 3px 10px rgba(0, 0, 0, 0.35);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 8px;
    text-align: left;
}

.event-btn-policy-card .btn-text {
    font-family: var(--font-teletype);
    font-size: 12px;
    text-transform: uppercase;
}

.event-btn-policy-card .btn-flavor {
    margin-top: 6px;
    font-size: 11px;
    line-height: 1.4;
}

@keyframes joe1-overlay-pulse {
    from { background-color: rgba(24, 6, 10, 0.9); }
    to { background-color: rgba(52, 10, 17, 0.95); }
}

@keyframes joe1-shake {
    0%, 100% { transform: translate3d(0, 0, 0); }
    25% { transform: translate3d(-2px, 0, 0); }
    50% { transform: translate3d(2px, 0, 0); }
    75% { transform: translate3d(-1px, 0, 0); }
}

@keyframes joe1-flash {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 0.55; }
}

@media (prefers-reduced-motion: reduce) {
    #phase-overlay.joe1-announcement-takeover,
    #phase-overlay.joe1-announcement-takeover::before,
    #phase-overlay.joe1-announcement-takeover .event-modal {
        animation: none;
    }
}

@media (max-width: 780px) {
    .protocol-microdot-modal {
        width: calc(100vw - 20px);
        padding: 12px;
    }

    .protocol-microdot-header {
        margin-top: -4px;
        padding-right: 0;
    }

    .protocol-microdot-title {
        font-size: 18px;
    }

    .protocol-microdot-textarea {
        min-height: 230px;
    }

    .event-choices-policy-fork {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .event-modal-joe1 {
        width: calc(100vw - 20px);
        max-height: calc(100vh - 22px);
        overflow-y: auto;
        padding: 18px 14px;
    }

    .event-modal-joe1 .event-header {
        margin-bottom: 14px;
        padding-bottom: 10px;
    }

    .event-modal-joe1 .event-newspaper {
        font-size: 18px;
        letter-spacing: 1.5px;
    }

    .event-modal-joe1 .event-title {
        font-size: 20px;
        line-height: 1.25;
        margin-bottom: 12px;
    }

    .event-modal-joe1 .event-cable {
        margin-bottom: 12px;
        font-size: 11px;
        line-height: 1.55;
    }

    .event-btn-policy-card {
        min-height: 0;
        padding: 14px 12px;
    }

    .event-btn-policy-card .btn-text {
        font-size: 12px;
        line-height: 1.35;
    }

    .event-btn-policy-card .btn-flavor {
        font-size: 11px;
        line-height: 1.5;
        margin-top: 6px;
    }

    .intel-alert-header {
        padding-right: 44px;
    }

    .intel-alert-value {
        margin-left: 0;
        width: 100%;
    }
}

/* v12.0: Domestic Desk - Executive Orders section */
.desk-orders-section {
    margin-top: 10px;
    border: 1px solid #8f7f6e;
    border-radius: 4px;
    background: rgba(216, 206, 187, 0.25);
}

.desk-orders-summary {
    cursor: pointer;
    padding: 8px 12px;
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: #4e3f30;
    list-style: none;
    border-bottom: 1px solid rgba(143, 127, 110, 0.3);
}

.desk-orders-summary::-webkit-details-marker {
    display: none;
}

.desk-orders-summary::before {
    content: '\25B6 ';
    font-size: 9px;
    margin-right: 4px;
}

.desk-orders-section[open] > .desk-orders-summary::before {
    content: '\25BC ';
}

.desk-orders-list {
    padding: 6px 8px 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.desk-orders-list .telegram.action-card {
    margin-bottom: 0;
}

/* v12.0: Intel Hub - Field Operations section */
.intel-ops-section {
    width: 100%;
    margin-bottom: 8px;
    border: 1px solid rgba(100, 180, 255, 0.2);
    border-radius: 4px;
    background: rgba(13, 13, 26, 0.6);
}

.intel-ops-summary {
    cursor: pointer;
    padding: 8px 12px;
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #a0ccff;
    list-style: none;
    border-bottom: 1px solid rgba(100, 180, 255, 0.15);
}

.intel-ops-summary::-webkit-details-marker {
    display: none;
}

.intel-ops-summary::before {
    content: '\25B6 ';
    font-size: 9px;
    margin-right: 4px;
}

.intel-ops-section[open] > .intel-ops-summary::before {
    content: '\25BC ';
}

.intel-ops-list {
    padding: 6px 8px 8px;
    max-height: 50vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.intel-ops-list .telegram.action-card {
    margin-bottom: 0;
    background: rgba(20, 24, 40, 0.85);
    border-color: rgba(100, 180, 255, 0.2);
}

.intel-ops-list .telegram.action-card .telegram-header {
    background: rgba(30, 40, 70, 0.6);
    border-bottom-color: rgba(100, 180, 255, 0.15);
}

.intel-ops-list .telegram.action-card .action-name {
    color: #c0ddff;
}

.intel-ops-list .telegram.action-card .telegram-body,
.intel-ops-list .telegram.action-card .telegram-body p {
    color: #b0c4d8;
}

.intel-ops-list .telegram.action-card .stats,
.intel-ops-list .telegram.action-card .telegram-body .stats {
    color: #90b0cc;
}

.intel-ops-list .telegram.action-card .execute-btn {
    background: linear-gradient(180deg, #1a3050 0%, #0d1a30 100%);
    border-color: rgba(100, 180, 255, 0.3);
    color: #a0ccff;
}

.intel-ops-list .telegram.action-card .execute-btn:hover:not(:disabled) {
    background: linear-gradient(180deg, #2a4060 0%, #1a2a40 100%);
}

.intel-ops-list .telegram.action-card.disabled {
    opacity: 0.6;
}
