/* Head of State — Presidential Blue & Gold Glass Morphism Theme */
/* Designed for 9:16 portrait mobile aspect ratio */

/* Material Symbols — bundled locally, no Google Fonts CDN dependency */
@font-face {
  font-family: 'Material Symbols Outlined';
  font-style: normal;
  font-weight: 100 700;
  src: url('../fonts/material-symbols-outlined.woff2') format('woff2');
  font-display: block; /* prevent FOIT — wait for font before showing icons */
}

/* ====== 1. RESET & ROOT VARIABLES ====== */
:root {
  --primary: #1A3A8A;
  --primary-light: #2563EB;
  --primary-dark: #0F2460;
  --gold: #D4AF37;
  --gold-light: #F0D060;
  --gold-dim: rgba(212, 175, 55, 0.3);
  --bg: #060A16;
  --bg-light: #111827;
  --surface: rgba(26, 58, 138, 0.15);
  --surface-solid: rgba(15, 15, 28, 0.95);
  --text: #F1F5F9;
  --text-dim: #94A3B8;
  --text-muted: #64748B;
  --red: #DC2626;
  --red-light: #FCA5A5;
  --blue: #2563EB;
  --blue-light: #93C5FD;
  --green: #22C55E;
  --green-light: #86EFAC;
  --orange: #F97316;
  --orange-light: #FDBA74;
  --danger: #EF4444;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --glass-blur: 20px;
  --glass-border: rgba(212, 175, 55, 0.2);
  --glass-border-bright: rgba(212, 175, 55, 0.4);
  --glass-bg: rgba(255, 255, 255, 0.06);
  --card-bg: rgba(26, 58, 138, 0.2);
  --card-bg-solid: rgba(15, 20, 40, 0.9);
  --card-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 2px 8px rgba(0, 0, 0, 0.2), 0 0 1px rgba(212, 175, 55, 0.1);
  --btn-glow: 0 0 20px rgba(212, 175, 55, 0.15);
  --transition-fast: 0.15s ease;
  --transition: 0.25s ease;
  --transition-slow: 0.4s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

html, body {
  width: 100%;
  height: 100dvh;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 0;
  margin: 0;
}

/* ====== 2. SCALE-TO-FIT CONTAINER ====== */
#game-scaler {
  margin: 0 auto;
  overflow: hidden;
  position: relative;
}

#game-root {
  /* Fixed reference size — JS scaler applies transform: scale() */
  width: 390px;
  height: 844px;
  display: flex;
  flex-direction: column;
  position: relative;
  background: var(--bg);
  overflow: hidden;
  /* RN injects real safe area insets as --sat/--sab. WebView is full-screen so
     background (::before) extends edge-to-edge. Padding pushes content below notch. */
  padding-top: var(--sat, env(safe-area-inset-top, 0px));
  padding-bottom: var(--sab, env(safe-area-inset-bottom, 0px));
}

/* Animated radial gradient background */
#game-root::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(26, 58, 138, 0.15) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(212, 175, 55, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(15, 36, 96, 0.12) 0%, transparent 60%);
  animation: bgPulse 8s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 0;
}

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

/* Game background layer */
.game-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.2;
  pointer-events: none;
  z-index: 0;
}

/* Ensure all content sits above the background */
#game-root > *:not(.game-bg):not(.game-hud) {
  position: relative;
  z-index: 1;
}


/* ====== Material Icons baseline ====== */
.material-symbols-outlined.mi {
  font-family: 'Material Symbols Outlined';
  font-weight: normal;
  font-style: normal;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: inherit;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-smoothing: antialiased;
  vertical-align: middle;
  /* Glass icon base */
  padding: 4px;
  border-radius: 6px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* Compact icon mode — inside small buttons, badges, stats, inline text */
.endorse-stat .mi,
.endorse-action-icon .mi,
.endorse-action-done-icon .mi,
.endorse-result-icon .mi,
.endorse-badge .mi,
.badge-alliance .mi,
.badge-scheme .mi,
.badge-hook .mi,
.chub-plank-tag .mi,
.war-result-icon .mi,
h2 .mi,
h3 .mi {
  padding: 2px;
  border: none;
  background: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* ── Icon color categories — glass gradient look ── */
.mi-finance {
  color: #4ADE80;
  background: linear-gradient(135deg, rgba(74,222,128,0.15) 0%, rgba(212,175,55,0.10) 100%);
  border-color: rgba(74,222,128,0.25);
  text-shadow: 0 0 8px rgba(74,222,128,0.3);
}
.mi-govt {
  color: #F0D060;
  background: linear-gradient(135deg, rgba(212,175,55,0.18) 0%, rgba(184,134,11,0.08) 100%);
  border-color: rgba(212,175,55,0.30);
  text-shadow: 0 0 8px rgba(212,175,55,0.3);
}
.mi-military {
  color: #F87171;
  background: linear-gradient(135deg, rgba(248,113,113,0.18) 0%, rgba(148,163,184,0.10) 100%);
  border-color: rgba(248,113,113,0.25);
  text-shadow: 0 0 8px rgba(248,113,113,0.3);
}
.mi-infra {
  color: #FBBF24;
  background: linear-gradient(135deg, rgba(251,191,36,0.16) 0%, rgba(245,158,11,0.08) 100%);
  border-color: rgba(251,191,36,0.25);
  text-shadow: 0 0 8px rgba(251,191,36,0.3);
}
.mi-nature {
  color: #34D399;
  background: linear-gradient(135deg, rgba(52,211,153,0.16) 0%, rgba(20,184,166,0.08) 100%);
  border-color: rgba(52,211,153,0.22);
  text-shadow: 0 0 8px rgba(52,211,153,0.3);
}
.mi-health {
  color: #FB7185;
  background: linear-gradient(135deg, rgba(251,113,133,0.16) 0%, rgba(244,63,94,0.08) 100%);
  border-color: rgba(251,113,133,0.25);
  text-shadow: 0 0 8px rgba(251,113,133,0.3);
}
.mi-edu {
  color: #818CF8;
  background: linear-gradient(135deg, rgba(129,140,248,0.16) 0%, rgba(99,102,241,0.08) 100%);
  border-color: rgba(129,140,248,0.25);
  text-shadow: 0 0 8px rgba(129,140,248,0.3);
}
.mi-media {
  color: #38BDF8;
  background: linear-gradient(135deg, rgba(56,189,248,0.16) 0%, rgba(14,165,233,0.08) 100%);
  border-color: rgba(56,189,248,0.22);
  text-shadow: 0 0 8px rgba(56,189,248,0.3);
}
.mi-justice {
  color: #C084FC;
  background: linear-gradient(135deg, rgba(192,132,252,0.16) 0%, rgba(168,85,247,0.08) 100%);
  border-color: rgba(192,132,252,0.25);
  text-shadow: 0 0 8px rgba(192,132,252,0.3);
}
.mi-housing {
  color: #D4A574;
  background: linear-gradient(135deg, rgba(212,165,116,0.16) 0%, rgba(180,120,70,0.08) 100%);
  border-color: rgba(212,165,116,0.22);
  text-shadow: 0 0 8px rgba(212,165,116,0.3);
}
.mi-people {
  color: #93C5FD;
  background: linear-gradient(135deg, rgba(147,197,253,0.14) 0%, rgba(96,165,250,0.08) 100%);
  border-color: rgba(147,197,253,0.22);
  text-shadow: 0 0 8px rgba(147,197,253,0.3);
}
.mi-tech {
  color: #67E8F9;
  background: linear-gradient(135deg, rgba(103,232,249,0.16) 0%, rgba(34,211,238,0.08) 100%);
  border-color: rgba(103,232,249,0.22);
  text-shadow: 0 0 8px rgba(103,232,249,0.3);
}
.mi-danger {
  color: #F87171;
  background: linear-gradient(135deg, rgba(248,113,113,0.16) 0%, rgba(239,68,68,0.08) 100%);
  border-color: rgba(248,113,113,0.25);
  text-shadow: 0 0 8px rgba(248,113,113,0.3);
}
.mi-success {
  color: #4ADE80;
  background: linear-gradient(135deg, rgba(74,222,128,0.16) 0%, rgba(34,197,94,0.08) 100%);
  border-color: rgba(74,222,128,0.25);
  text-shadow: 0 0 8px rgba(74,222,128,0.3);
}

/* ====== 3. TYPOGRAPHY ====== */
h1 {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 2px;
  background: linear-gradient(135deg, #D4AF37, #F0D060, #B8860B);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 2px 8px rgba(212, 175, 55, 0.3));
}

h2 {
  font-size: 22px;
  font-weight: 700;
  background: linear-gradient(135deg, #D4AF37, #F0D060, #B8860B);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 1px 6px rgba(212, 175, 55, 0.2));
}

h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 1px;
}

h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--gold-light);
}

.text-dim { color: var(--text-dim); }
.text-muted { color: var(--text-muted); }
.text-gold { color: var(--gold); }
.text-green { color: var(--green); }
.text-red { color: var(--red); }
.text-blue { color: var(--blue); }
.text-orange { color: var(--orange); }
.text-center { text-align: center; }
.text-small { font-size: 12px; }
.text-xs { font-size: 10px; }


/* ====== 4. COMMON COMPONENTS ====== */

/* --- Glass Buttons --- */
.btn-glass {
  position: relative;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  color: var(--text);
  padding: 12px 24px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  letter-spacing: 0.5px;
}

.btn-glass::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, transparent 100%);
  pointer-events: none;
  border-radius: 11px 11px 0 0;
}

.btn-glass::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.2), transparent);
  pointer-events: none;
}

.btn-glass:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--glass-border-bright);
  box-shadow: var(--btn-glow);
}

.btn-glass:active {
  transform: scale(0.97);
  background: rgba(255, 255, 255, 0.08);
}

.btn-glass:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  pointer-events: none;
}

/* Primary — presidential blue gradient with gold border */
.btn-glass.btn-primary,
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-color: var(--gold);
  border-top-color: rgba(212, 175, 55, 0.5);
  color: white;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  box-shadow:
    0 4px 20px rgba(26, 58, 138, 0.3),
    0 0 30px rgba(26, 58, 138, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.btn-glass.btn-primary:hover,
.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  box-shadow:
    0 6px 24px rgba(26, 58, 138, 0.4),
    0 0 40px rgba(212, 175, 55, 0.1);
}

.btn-glass.btn-primary:active,
.btn-primary:active {
  transform: scale(0.97);
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
}

/* Danger — red glass */
.btn-glass.btn-danger,
.btn-danger {
  background: rgba(220, 38, 38, 0.15);
  border-color: rgba(220, 38, 38, 0.5);
  color: var(--red-light);
  box-shadow: 0 4px 16px rgba(220, 38, 38, 0.1);
}

.btn-glass.btn-danger:hover,
.btn-danger:hover {
  background: rgba(220, 38, 38, 0.25);
  border-color: var(--red);
}

.btn-glass.btn-danger:active,
.btn-danger:active {
  transform: scale(0.97);
  background: rgba(220, 38, 38, 0.3);
}

/* Alliance — green accent */
.btn-glass.btn-alliance,
.btn-alliance {
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.4);
  color: var(--green);
  box-shadow: 0 4px 16px rgba(34, 197, 94, 0.08);
}

.btn-glass.btn-alliance:hover,
.btn-alliance:hover {
  background: rgba(34, 197, 94, 0.2);
  border-color: var(--green);
}

.btn-glass.btn-alliance:active,
.btn-alliance:active {
  transform: scale(0.97);
  background: rgba(34, 197, 94, 0.25);
}

/* Gold accent button */
.btn-glass.btn-gold,
.btn-gold {
  background: linear-gradient(135deg, rgba(184, 134, 11, 0.2), rgba(212, 175, 55, 0.12), rgba(240, 208, 96, 0.08));
  border-color: var(--gold);
  border-top-color: rgba(240, 208, 96, 0.5);
  color: var(--gold-light);
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  box-shadow:
    0 4px 16px rgba(212, 175, 55, 0.12),
    0 0 30px rgba(212, 175, 55, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.btn-glass.btn-gold:hover,
.btn-gold:hover {
  background: linear-gradient(135deg, rgba(184, 134, 11, 0.3), rgba(212, 175, 55, 0.2), rgba(240, 208, 96, 0.12));
  box-shadow: 0 0 30px rgba(212, 175, 55, 0.25), 0 4px 20px rgba(212, 175, 55, 0.15);
  animation: goldPulse 1.5s ease-in-out infinite;
}

.btn-glass.btn-gold:active,
.btn-gold:active {
  transform: scale(0.97);
  animation: none;
}

@keyframes goldPulse {
  0%, 100% { box-shadow: 0 0 30px rgba(212, 175, 55, 0.25), 0 4px 20px rgba(212, 175, 55, 0.15); }
  50% { box-shadow: 0 0 40px rgba(212, 175, 55, 0.35), 0 4px 24px rgba(212, 175, 55, 0.2); }
}

/* Small button variant */
.btn-glass.btn-small { padding: 8px 16px; font-size: 13px; min-height: 36px; }

/* Back button — matches HUD button style (circle, same size, same z) */
.btn-back,
.btn-glass.btn-back {
  padding: 0;
  font-size: 0;
  width: 38px;
  height: 38px;
  min-height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(13, 27, 72, 0.7), rgba(30, 58, 138, 0.5));
  border: 1px solid rgba(148, 163, 184, 0.25);
  color: #CBD5E1;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.btn-back:hover,
.btn-glass.btn-back:hover {
  background: linear-gradient(135deg, rgba(13, 27, 72, 0.85), rgba(30, 58, 138, 0.65));
  border-color: rgba(212, 175, 55, 0.35);
  color: #E2E8F0;
}

.btn-back:active,
.btn-glass.btn-back:active,
.btn-back.btn-pressed,
.btn-glass.btn-back.btn-pressed {
  transform: scale(0.9);
  background: linear-gradient(135deg, rgba(13, 27, 72, 0.85), rgba(30, 58, 138, 0.65));
}

.btn-icon { font-size: 18px; line-height: 1; }

/* --- Glass Cards --- */
.card-glass {
  position: relative;
  background: var(--card-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  padding: 16px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.card-glass::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  pointer-events: none;
  border-radius: var(--radius) var(--radius) 0 0;
}

.card-glass:hover {
  border-color: var(--glass-border-bright);
}

.card-glass.card-gold {
  border-color: var(--gold);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.2),
    0 0 20px rgba(212, 175, 55, 0.1);
}

.card-glass.card-interactive {
  cursor: pointer;
}

.card-glass.card-interactive:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.25),
    0 0 25px rgba(212, 175, 55, 0.1);
}

.card-glass.card-interactive:active {
  transform: scale(0.98);
}

/* --- Badges --- */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  white-space: nowrap;
}

.badge-gold {
  background: rgba(212, 175, 55, 0.2);
  color: var(--gold-light);
  border: 1px solid var(--gold-dim);
}

.badge-blue {
  background: rgba(37, 99, 235, 0.2);
  color: var(--blue-light);
  border: 1px solid rgba(37, 99, 235, 0.3);
}

.badge-red {
  background: rgba(220, 38, 38, 0.2);
  color: var(--red-light);
  border: 1px solid rgba(220, 38, 38, 0.3);
}

.badge-green {
  background: rgba(34, 197, 94, 0.2);
  color: var(--green-light);
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.badge-orange {
  background: rgba(249, 115, 22, 0.2);
  color: var(--orange-light);
  border: 1px solid rgba(249, 115, 22, 0.3);
}

.badge-muted {
  background: rgba(100, 116, 139, 0.2);
  color: var(--text-muted);
  border: 1px solid rgba(100, 116, 139, 0.3);
}

.badge-live {
  background: var(--gold);
  color: #0A0F1E;
  font-weight: 900;
  letter-spacing: 2px;
  animation: pulse 1.5s ease-in-out infinite;
}

/* --- Progress Bars --- */
.progress-bar {
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.progress-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s ease;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  position: relative;
}

.progress-bar-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.2) 0%, transparent 100%);
  border-radius: 4px 4px 0 0;
}

.progress-bar-fill.fill-gold {
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
}

.progress-bar-fill.fill-green {
  background: linear-gradient(90deg, #16A34A, var(--green));
}

.progress-bar-fill.fill-red {
  background: linear-gradient(90deg, #B91C1C, var(--red));
}

.progress-bar-fill.fill-orange {
  background: linear-gradient(90deg, #C2410C, var(--orange));
}

.progress-bar-fill.fill-blue {
  background: linear-gradient(90deg, var(--primary), var(--blue));
}

.progress-bar.bar-thin { height: 4px; }
.progress-bar.bar-thick { height: 12px; border-radius: 6px; }
.progress-bar.bar-thick .progress-bar-fill { border-radius: 6px; }

/* --- Stat Rows --- */
.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  font-size: 13px;
}

.stat-row + .stat-row {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-label {
  color: var(--text-dim);
  font-size: 12px;
}

.stat-value {
  font-weight: 700;
  color: var(--text);
  font-size: 14px;
}

.stat-value.positive { color: var(--green); }
.stat-value.negative { color: var(--red); }
.stat-value.gold { color: var(--gold); }
.stat-value.blue { color: var(--blue); }

/* --- Screen Header (sits below the HUD) --- */
.screen-header {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  margin-top: 38px; /* Flush below floating HUD (8px top + 38px button height) */
  border-bottom: 1px solid var(--glass-border);
  background: var(--surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  min-height: 44px;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.screen-header-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.screen-title {
  flex: 1;
  font-size: 16px;
  font-weight: 700;
  color: var(--gold);
  text-align: center;
  text-shadow: 0 1px 6px rgba(212, 175, 55, 0.2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.screen-subtitle {
  font-size: 12px;
  color: var(--text-dim);
  text-align: center;
}


/* ====== 5. ANIMATIONS ====== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

.fadeOut { animation: fadeOut 0.25s ease-out forwards; }

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

@keyframes slideIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(100%); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes glow {
  0%, 100% { box-shadow: 0 0 10px rgba(212, 175, 55, 0.3); }
  50% { box-shadow: 0 0 25px rgba(212, 175, 55, 0.6); }
}

@keyframes glowBlue {
  0%, 100% { box-shadow: 0 0 10px rgba(37, 99, 235, 0.3); }
  50% { box-shadow: 0 0 25px rgba(37, 99, 235, 0.6); }
}

@keyframes glowRed {
  0%, 100% { box-shadow: 0 0 10px rgba(220, 38, 38, 0.3); }
  50% { box-shadow: 0 0 25px rgba(220, 38, 38, 0.6); }
}

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

@keyframes sound-wave {
  0%, 100% { height: 6px; }
  50% { height: 20px; }
}

@keyframes vote-tick {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); color: var(--gold-light); }
  100% { transform: scale(1); }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

@keyframes fillExpand {
  from { width: 0%; }
}

@keyframes countUp {
  from { opacity: 0; transform: translateY(10px) scale(0.8); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes flashBanner {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.fadeIn { animation: fadeIn 0.4s ease-out; }
.slideUp { animation: slideUp 0.4s ease-out; }
.slideIn { animation: slideIn 0.4s ease-out; }

/* Staggered entry animations */
.stagger-1 { animation: fadeIn 0.4s ease-out 0.05s both; }
.stagger-2 { animation: fadeIn 0.4s ease-out 0.1s both; }
.stagger-3 { animation: fadeIn 0.4s ease-out 0.15s both; }
.stagger-4 { animation: fadeIn 0.4s ease-out 0.2s both; }
.stagger-5 { animation: fadeIn 0.4s ease-out 0.25s both; }
.stagger-6 { animation: fadeIn 0.4s ease-out 0.3s both; }
.stagger-7 { animation: fadeIn 0.4s ease-out 0.35s both; }
.stagger-8 { animation: fadeIn 0.4s ease-out 0.4s both; }


/* ====== 5b. GAME HUD (Back / Pause / Mute / Exit) ====== */
.game-hud {
  position: absolute;
  top: var(--sat, env(safe-area-inset-top, 0px));
  left: 12px;
  right: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 9000;
  pointer-events: none;
}

.hud-left,
.hud-right {
  display: flex;
  gap: 8px;
  align-items: center;
  pointer-events: none;
}
.hud-mini-timer {
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--gold);
  background: rgba(13, 27, 72, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.25);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 4px 10px;
  border-radius: 16px;
  pointer-events: none;
}

.hud-btn {
  pointer-events: auto;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: linear-gradient(135deg, rgba(13, 27, 72, 0.7), rgba(30, 58, 138, 0.5));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: #CBD5E1;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  padding: 0;
  line-height: 1;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.hud-btn:active {
  transform: scale(0.9);
  background: linear-gradient(135deg, rgba(13, 27, 72, 0.85), rgba(30, 58, 138, 0.65));
}

.hud-mute.muted {
  border-color: rgba(220, 38, 38, 0.4);
  background: linear-gradient(135deg, rgba(127, 29, 29, 0.4), rgba(30, 58, 138, 0.5));
}

.hud-back {
  width: auto;
  padding: 0 14px 0 10px;
  gap: 4px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.hud-back svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.hud-back-label {
  font-size: 12px;
  letter-spacing: 0.3px;
}

.hud-exit {
  border-color: rgba(220, 38, 38, 0.3);
  font-size: 13px;
}

.hud-exit:active {
  border-color: rgba(220, 38, 38, 0.6);
  background: linear-gradient(135deg, rgba(127, 29, 29, 0.5), rgba(30, 58, 138, 0.5));
}

/* Pause overlay */
.pause-overlay,
.exit-overlay {
  position: absolute;
  inset: 0;
  background: rgba(5, 10, 30, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9500;
  animation: fadeIn 0.2s ease-out;
}

.pause-box,
.exit-box {
  text-align: center;
  padding: 16px 20px;
  min-width: 220px;
  max-width: 320px;
  width: calc(100% - 32px);
  box-sizing: border-box;
}

.pause-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.pause-title,
.exit-title {
  font-size: 22px;
  font-weight: 700;
  color: #E2E8F0;
  margin: 0 0 8px;
}

.exit-subtitle {
  font-size: 14px;
  color: #94A3B8;
  margin: 0 0 20px;
  line-height: 1.4;
}

.pause-resume {
  width: 100%;
  margin-top: 16px;
  padding: 12px 24px;
  font-size: 16px;
}

.exit-actions {
  display: flex;
  gap: 12px;
}

.exit-actions .btn-glass {
  flex: 1;
  padding: 12px 16px;
  font-size: 15px;
}


/* ====== 6. TITLE SCREEN ====== */
.title-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px;
  padding-bottom: 14px;
  gap: 12px;
  animation: fadeIn 0.5s ease;
  background: radial-gradient(ellipse at 50% 30%, rgba(26, 58, 138, 0.3) 0%, transparent 70%);
}

.title-exit-row {
  width: 100%;
  display: flex;
  justify-content: flex-start;
  flex-shrink: 0;
}

.title-exit-btn {
  border-color: rgba(220, 38, 38, 0.3);
}

.title-exit-btn:active {
  border-color: rgba(220, 38, 38, 0.6);
  background: linear-gradient(135deg, rgba(127, 29, 29, 0.5), rgba(30, 58, 138, 0.5));
}

.title-card-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 0;
  overflow: hidden;
  border-radius: var(--radius-xl);
}

.title-card-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  border-radius: var(--radius-xl);
  filter: drop-shadow(0 8px 40px rgba(26, 58, 138, 0.3));
}

.title-poster {
  text-align: center;
}

.title-seal {
  font-size: 80px;
  margin-bottom: 16px;
  filter: drop-shadow(0 0 20px rgba(212, 175, 55, 0.5));
}

.title-name {
  font-size: 36px;
  font-weight: 900;
  color: var(--gold);
  letter-spacing: 4px;
  text-shadow: 0 2px 20px rgba(212, 175, 55, 0.4);
  text-transform: uppercase;
}

.title-subtitle {
  font-size: 14px;
  color: var(--text-dim);
  margin-top: 8px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.title-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 300px;
  flex-shrink: 0;
}

.title-play-btn {
  padding: 16px 32px;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 3px;
  text-transform: uppercase;
}

.title-glow-btn {
  animation: glow 2.5s ease-in-out infinite;
}

.title-play-btn .btn-icon {
  font-size: 22px;
}


/* ====== 7. STATE SELECT SCREEN ====== */
.state-select-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.state-select-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
  padding-bottom: 16px;
}

.state-select-section-title {
  font-size: 14px;
  color: var(--gold);
  font-weight: 700;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ── Role Toggle (segmented control) ── */
.role-toggle {
  display: flex;
  gap: 0;
  margin: 0 16px 8px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
}

.role-btn {
  flex: 1;
  padding: 8px 0;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  border: none;
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.role-btn.active {
  background: rgba(212, 175, 55, 0.18);
  color: var(--gold);
}

.role-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.coming-soon-badge {
  display: inline-block;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: var(--gold);
  color: #0A0F1E;
  padding: 1px 5px;
  border-radius: 6px;
  margin-left: 4px;
  vertical-align: middle;
}

/* ── US Tile Cartogram ── */
.tile-map {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: repeat(7, 1fr);
  gap: 2px;
  padding: 0 8px;
  margin-bottom: 6px;
}

.tile-cell {
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
  padding: 0;
  min-width: 0;
}

.tile-cell:hover {
  border-color: var(--gold);
  filter: brightness(1.25);
}

.tile-cell:active {
  transform: scale(0.9);
}

.tile-cell.selected {
  border-color: var(--gold);
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.5), 0 0 20px rgba(212, 175, 55, 0.2);
  animation: glow 2s ease-in-out infinite;
  z-index: 1;
}

.tile-cell.filtered-out {
  opacity: 0.12;
  pointer-events: none;
}

.tile-abbr {
  font-size: 10px;
  font-weight: 800;
  color: #fff;
  line-height: 1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

/* ── Tile Legend ── */
.tile-legend {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 4px 16px 8px;
}

.tile-legend-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  color: var(--text-dim);
}

.tile-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  display: inline-block;
}

/* State Preview Panel */
.state-preview {
  background: var(--card-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 16px;
  margin-top: 12px;
  animation: fadeIn 0.3s ease;
}

.state-preview-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.state-preview-name {
  font-size: 20px;
  font-weight: 800;
  color: var(--gold);
}

.state-preview-motto {
  font-size: 11px;
  color: var(--text-dim);
  font-style: italic;
}

.state-preview-svg {
  width: 60px;
  height: 60px;
  fill: rgba(26, 58, 138, 0.4);
  stroke: var(--gold);
  stroke-width: 1.5;
  filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.2));
}

.state-preview-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.state-preview-stat {
  text-align: center;
  padding: 8px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-sm);
}

.state-preview-stat-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: block;
}

.state-preview-stat-value {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  display: block;
  margin-top: 2px;
}

.state-preview-difficulty {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-sm);
}

.state-preview-difficulty-label {
  font-size: 12px;
  color: var(--text-dim);
}

.state-preview-difficulty-dots {
  display: flex;
  gap: 4px;
}

.difficulty-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.difficulty-dot.filled { background: var(--gold); border-color: var(--gold); }
.difficulty-dot.filled.hard { background: var(--orange); border-color: var(--orange); }
.difficulty-dot.filled.expert { background: var(--red); border-color: var(--red); }

.state-select-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--glass-border);
  display: flex;
  gap: 12px;
}

.state-select-footer .btn-glass { flex: 1; }


/* ====== 8. PARTY SELECT SCREEN ====== */
.party-select-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.party-select-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.party-cards {
  display: flex;
  gap: 12px;
  margin-top: 12px;
}

.party-card {
  flex: 1;
  border: 2px solid var(--glass-border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card-bg);
  transition: all var(--transition);
  cursor: pointer;
}

.party-card:active { transform: scale(0.98); }

.party-card.selected {
  border-color: var(--gold);
  animation: glow 2s infinite;
}

.party-card.party-red .party-card-header {
  background: linear-gradient(135deg, #991B1B, #DC2626);
}

.party-card.party-blue .party-card-header {
  background: linear-gradient(135deg, #1E40AF, #2563EB);
}

.party-card-header {
  padding: 14px 12px;
  text-align: center;
  font-weight: 700;
  font-size: 16px;
  color: white;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.party-card-header-icon {
  font-size: 28px;
  display: block;
  margin-bottom: 4px;
}

.party-card-body {
  padding: 8px;
}

/* Wing selection chips */
.wing-btn {
  display: block;
  width: 100%;
  padding: 10px;
  margin-bottom: 6px;
  background: var(--glass-bg);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: all var(--transition);
  min-height: 44px;
}

.wing-btn:hover { background: rgba(255, 255, 255, 0.1); }

.wing-btn.selected {
  border-color: var(--gold);
  background: rgba(212, 175, 55, 0.15);
}

.wing-btn strong {
  display: block;
  font-size: 13px;
  margin-bottom: 2px;
}

.wing-desc {
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.3;
}

/* Trait selection grid */
.traits-section {
  margin-top: 20px;
  text-align: center;
}

.traits-section h3 {
  margin-bottom: 10px;
}

.traits-display {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.trait-badge {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border: 1px solid var(--gold);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--gold-light);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.trait-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
}

.trait-option {
  padding: 10px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: center;
  transition: all var(--transition);
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.trait-option:hover { background: rgba(255, 255, 255, 0.08); }

.trait-option.selected {
  border-color: var(--gold);
  background: rgba(212, 175, 55, 0.15);
  color: var(--gold-light);
}

.trait-option-label { font-size: 13px; font-weight: 600; }

.reroll-btn { margin: 0 auto; }

.party-select-actions {
  padding: 12px 16px;
  border-top: 1px solid var(--glass-border);
  display: flex;
  gap: 12px;
  justify-content: center;
}

.party-select-actions .btn-glass { flex: 1; }
.party-select-actions .rules-btn { flex: 0 0 auto; min-width: 80px; }

/* ====== RULES MODAL ====== */
.rules-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.rules-modal {
  width: 100%;
  max-width: 480px;
  max-height: 85dvh;
  background: var(--card-bg-solid);
  border: 1px solid var(--glass-border-bright);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--card-shadow), 0 0 40px rgba(212, 175, 55, 0.1);
}

.rules-modal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--glass-border);
  flex-shrink: 0;
}

.rules-modal-header h2 {
  font-size: 18px;
  color: var(--gold-light);
}

.rules-close-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  color: var(--text);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  flex-shrink: 0;
  order: -1;
}

.rules-close-btn:active { background: rgba(255, 255, 255, 0.15); }

.rules-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px 24px;
  -webkit-overflow-scrolling: touch;
}

.rules-section {
  margin-bottom: 20px;
}

.rules-section h3 {
  font-size: 15px;
  color: var(--gold);
  margin-bottom: 8px;
  font-weight: 700;
}

.rules-section p {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.5;
  margin-bottom: 6px;
}

.rules-table {
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin: 8px 0;
}

.rules-table.rules-table-sm .rules-row { padding: 6px 12px; }

.rules-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 12px;
  font-size: 13px;
  color: var(--text);
  border-bottom: 1px solid var(--glass-border);
}

.rules-row:last-child { border-bottom: none; }
.rules-row:nth-child(odd) { background: rgba(255, 255, 255, 0.03); }
.rules-row span:first-child { font-weight: 600; }
.rules-row span:last-child { color: var(--text-dim); }

.rules-action {
  padding: 8px 12px;
  margin-bottom: 6px;
  background: var(--glass-bg);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--gold-dim);
}

.rules-action strong {
  display: block;
  font-size: 13px;
  color: var(--text);
  margin-bottom: 3px;
}

.rules-action span {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.4;
}

.rules-progression {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 12px 0;
  flex-wrap: wrap;
}

.rules-prog-step {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--text);
}

.rules-prog-icon { font-size: 18px; }

.rules-prog-arrow {
  color: var(--gold);
  font-size: 18px;
  font-weight: 700;
}

.rules-tips {
  list-style: none;
  padding: 0;
}

.rules-tips li {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.5;
  padding: 4px 0 4px 20px;
  position: relative;
}

.rules-tips li::before {
  content: '•';
  position: absolute;
  left: 6px;
  color: var(--gold);
  font-weight: 700;
}

/* ====== 9. NEWS SCREEN ====== */
.news-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.news-body {
  flex: 1;
  overflow-y: auto;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Reporter Portrait */
.news-reporter {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 6px 0 4px;
}

.reporter-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid var(--gold);
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
  object-fit: cover;
  background: var(--surface);
}

.reporter-avatar-placeholder {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid var(--gold);
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
}

.reporter-info {
  text-align: center;
}

.reporter-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.reporter-title {
  font-size: 11px;
  color: var(--text-dim);
}

/* LIVE badge */
.news-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--gold);
  color: #0A0F1E;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 2px;
  text-transform: uppercase;
  animation: pulse 1.5s ease-in-out infinite;
}

.news-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #DC2626;
  animation: pulse 1s ease-in-out infinite;
}

/* Sound wave bars */
.news-sound-wave {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 24px;
  margin-top: 4px;
}

.wave-bar {
  width: 3px;
  height: 6px;
  background: var(--gold);
  border-radius: 2px;
  animation: sound-wave 0.8s ease-in-out infinite;
}

.wave-bar:nth-child(1) { animation-delay: 0s; }
.wave-bar:nth-child(2) { animation-delay: 0.15s; height: 12px; }
.wave-bar:nth-child(3) { animation-delay: 0.3s; height: 18px; }
.wave-bar:nth-child(4) { animation-delay: 0.15s; height: 12px; }
.wave-bar:nth-child(5) { animation-delay: 0s; }

/* News cards — horizontal scroll-snap carousel */
.news-carousel {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 4px 0;
  scrollbar-width: none;
}

.news-carousel::-webkit-scrollbar { display: none; }

.news-card {
  flex: 0 0 85%;
  scroll-snap-align: start;
  background: var(--card-bg-solid);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--transition);
  position: relative;
}

.news-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
}

.news-card.category-economy::before { background: var(--green); }
.news-card.category-opposition::before { background: var(--red); }
.news-card.category-event::before { background: var(--gold); }
.news-card.category-population::before { background: var(--blue); }
.news-card.category-infrastructure::before { background: var(--orange); }

.news-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px 4px;
}

.news-card-category {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.news-card-category.economy { color: var(--green); }
.news-card-category.opposition { color: var(--red); }
.news-card-category.event { color: var(--gold); }
.news-card-category.population { color: var(--blue); }
.news-card-category.infrastructure { color: var(--orange); }

.news-card-turn {
  font-size: 10px;
  color: var(--text-muted);
}

.news-card-body {
  padding: 0 10px 8px;
}

.news-card-headline {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 6px;
}

.news-card-summary {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.5;
}

.news-card-impact {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.impact-chip {
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 12px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.05);
}

.impact-chip.positive { color: var(--green); border: 1px solid rgba(34, 197, 94, 0.3); }
.impact-chip.negative { color: var(--red); border: 1px solid rgba(220, 38, 38, 0.3); }
.impact-chip.neutral { color: var(--text-dim); border: 1px solid rgba(255, 255, 255, 0.1); }

/* Opposition intel section */
.news-opposition {
  background: rgba(220, 38, 38, 0.08);
  border: 1px solid rgba(220, 38, 38, 0.25);
  border-radius: var(--radius);
  padding: 14px;
}

.news-opposition-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.news-opposition-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--red-light);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.news-opposition-icon {
  font-size: 18px;
}

.news-opposition-body {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.5;
}

.news-opposition-stat {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-top: 1px solid rgba(220, 38, 38, 0.15);
  margin-top: 8px;
}

.news-opposition-stat-label { font-size: 12px; color: var(--text-muted); }
.news-opposition-stat-value { font-size: 14px; font-weight: 700; color: var(--red-light); }

/* News quick-stat pills */
.news-stats {
  display: flex;
  gap: 8px;
}

.news-stat-pill {
  flex: 1;
  text-align: center;
  padding: 8px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.news-stat-label {
  display: block;
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.news-stat-value {
  display: block;
  font-size: 16px;
  font-weight: 700;
  margin-top: 2px;
}

.news-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--glass-border);
}


/* ====== 10. OFFICE SCREEN ====== */
.office-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.office-hud {
  padding: 12px 16px;
  margin-top: 38px;
  background: var(--surface);
  border-bottom: 1px solid var(--glass-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.hud-row {
  display: flex;
  justify-content: space-around;
}

.hud-item { text-align: center; }

.hud-label {
  display: block;
  font-size: 10px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.hud-value {
  display: block;
  font-size: 20px;
  font-weight: 700;
  color: var(--gold);
  text-shadow: 0 1px 6px rgba(212, 175, 55, 0.2);
}

.hud-value.positive { color: var(--green); }
.hud-value.negative { color: var(--red); }
.capital-value { color: var(--gold-light); }

.leg-bonus-badge {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 5px;
  font-size: 11px;
  font-weight: 700;
  color: #EAB308;
  background: rgba(234, 179, 8, 0.12);
  border: 1px solid rgba(234, 179, 8, 0.3);
  border-radius: 6px;
  vertical-align: middle;
}

.office-title {
  text-align: center;
  padding: 16px 16px 8px;
}

.office-title h2 {
  font-size: 20px;
}

.office-subtitle {
  font-size: 13px;
  color: var(--text-dim);
  margin-top: 4px;
  font-style: italic;
}

/* Mini state outline in corner */
.office-state-mini {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  opacity: 0.4;
  transition: opacity var(--transition);
}

.office-state-mini:hover { opacity: 0.8; }

.office-state-mini svg {
  width: 100%;
  height: 100%;
}

/* HUD inline office title (moved from separate .office-title section) */
.hud-office-label {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  flex-shrink: 0;
  max-width: 120px;
  text-align: right;
}
.hud-office-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  line-height: 1.2;
  white-space: nowrap;
}
.hud-office-flavor {
  font-size: 9px;
  color: var(--text-dim);
  font-style: italic;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* State silhouette behind office content (governor/senator only) */
.office-state-silhouette {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 280px;
  height: 280px;
  pointer-events: none;
  z-index: 0;
  opacity: 0.25;
}
.office-state-silhouette svg {
  width: 100%;
  height: 100%;
}

/* State silhouette on news screen (governor/senator only) */
.news-state-silhouette {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 320px;
  height: 320px;
  pointer-events: none;
  z-index: 0;
  opacity: 0.25;
}
.news-state-silhouette svg {
  width: 100%;
  height: 100%;
}

/* VP ability card in events panel */
.vp-event-card {
  border-left: 3px solid var(--gold) !important;
}

/* Action points counter */
.action-points-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  font-size: 15px;
  font-weight: 700;
  color: var(--gold-light);
  text-shadow: 0 1px 6px rgba(212, 175, 55, 0.3);
}

.action-points-bar .ap-icon { font-size: 18px; }

.action-points-bar .ap-count {
  font-size: 20px;
  font-weight: 800;
  color: var(--gold);
}

.action-points-bar .ap-label {
  font-size: 12px;
  color: var(--text-dim);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.active-bills-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  font-size: 11px;
  color: var(--blue-light);
}

.active-bills-bar .bill-chip {
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(37, 99, 235, 0.12);
  border: 1px solid rgba(37, 99, 235, 0.3);
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}

/* 3-column action grid */
.office-actions {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  padding: 8px 12px;
  align-content: start;
  overflow-y: auto;
  min-height: 0;
}

.action-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 4px;
  gap: 2px;
  background: var(--card-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
  min-height: 72px;
  font-family: inherit;
  overflow: hidden;
}

.action-btn:hover {
  background: rgba(26, 58, 138, 0.35);
  border-color: var(--gold);
  box-shadow: var(--btn-glow);
}

.action-btn:active { transform: scale(0.97); }

.action-btn.action-disabled {
  opacity: 0.35;
  pointer-events: none;
}

.action-btn .action-cost {
  position: absolute;
  top: 4px;
  right: 4px;
  font-size: 9px;
  font-weight: 700;
  color: var(--gold);
  background: rgba(212, 175, 55, 0.1);
  padding: 1px 5px;
  border-radius: 8px;
}

.action-icon { font-size: 24px; display: block; }
.action-label { font-size: 12px; font-weight: 700; color: var(--text); display: block; }
.action-desc { font-size: 10px; color: var(--text-dim); display: block; }

/* Capital display with gold accent */
.capital-display {
  font-size: 13px;
  color: var(--gold);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

.capital-display::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  display: inline-block;
}

/* Infrastructure warning bar */
.infrastructure-warning {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  margin: 0 16px;
  background: rgba(249, 115, 22, 0.1);
  border: 1px solid rgba(249, 115, 22, 0.3);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--orange-light);
  animation: fadeIn 0.3s ease;
}

.infrastructure-warning-icon { font-size: 16px; }

.infrastructure-warning.critical {
  background: rgba(220, 38, 38, 0.12);
  border-color: rgba(220, 38, 38, 0.3);
  color: var(--red-light);
  animation: pulse 2s ease-in-out infinite;
}

/* Turn indicator */
.turn-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px;
  font-size: 13px;
  color: var(--text-dim);
}

.turn-indicator-number {
  color: var(--gold);
  font-weight: 700;
  font-size: 15px;
}

/* Event action button (spans full width, pulses) */
.action-event {
  grid-column: 1 / -1;
  background: rgba(239, 68, 68, 0.12);
  border-color: var(--danger);
  animation: pulse 1.5s infinite;
}

.action-event:hover {
  background: rgba(239, 68, 68, 0.2);
}

.event-badge-count {
  display: inline-block;
  background: var(--danger);
  color: white;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  line-height: 20px;
  text-align: center;
  margin-left: 4px;
}

.office-bottom {
  padding: 12px 16px;
  border-top: 1px solid var(--glass-border);
}

.end-turn-btn { width: 100%; }

/* Turn countdown timer bar */
.turn-timer-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.turn-timer-bar {
  flex: 1;
  height: 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.turn-timer-fill {
  height: 100%;
  width: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--green), var(--gold));
  transition: width 0.2s linear;
  box-shadow: 0 0 8px rgba(212, 175, 55, 0.3);
}

.turn-timer-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
  min-width: 36px;
  text-align: right;
}


/* ====== 11. POLICY SCREEN ====== */
.policy-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* 4 category tabs */
.policy-tabs,
.policy-tab-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 8px 16px;
  flex-shrink: 0;
}

.policy-tab {
  padding: 12px 8px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.policy-tab:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.policy-tab.active {
  background: rgba(212, 175, 55, 0.15);
  border-color: var(--gold);
  color: var(--gold-light);
}

.policy-tab-icon { font-size: 16px; }

/* Impact preview panels (above sliders, 2 columns) */
.policy-impact-section {
  padding: 0 16px 8px;
  flex-shrink: 0;
}

.impact-grid-4 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.impact-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.impact-panel {
  background: var(--card-bg);
  border-radius: var(--radius-sm);
  padding: 6px 8px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.impact-title {
  font-size: 10px;
  color: var(--text-dim);
  margin: 0 0 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.impact-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  min-height: 18px;
}

.impact-empty {
  font-size: 9px;
  color: var(--text-muted);
  font-style: italic;
}

/* Per-slider tradeoff chips */
.slider-tradeoffs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-bottom: 4px;
}

.tradeoff-side {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
}

.tradeoff-left { justify-content: flex-start; }
.tradeoff-right { justify-content: flex-end; }

.tradeoff-chip {
  font-size: 9px;
  padding: 2px 6px;
  border-radius: 8px;
  font-weight: 500;
  line-height: 1.3;
}

.left-chip {
  background: rgba(59, 130, 246, 0.12);
  color: #60A5FA;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.right-chip {
  background: rgba(168, 85, 247, 0.12);
  color: #C084FC;
  border: 1px solid rgba(168, 85, 247, 0.2);
}

/* Policy sliders */
.policy-categories {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
}

.policy-category {
  margin-bottom: 20px;
  animation: fadeIn 0.3s ease;
}

.category-title {
  font-size: 16px;
  color: var(--gold);
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--glass-border);
}

.slider-row {
  margin-bottom: 14px;
  padding: 10px 12px;
  background: var(--card-bg);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.slider-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.slider-name { font-size: 13px; font-weight: 600; color: var(--text); }

.slider-cost {
  font-size: 12px;
  color: var(--gold);
  font-weight: 600;
}

.slider-cost.has-cost { color: var(--orange); }
.slider-cost.high-cost { color: var(--red); }

.slider-labels {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.slider-track-container { position: relative; }

.policy-slider {
  width: 100%;
  height: 28px;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  outline: none;
}

.policy-slider::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(to right, var(--blue) 0%, rgba(255,255,255,0.15) 48%, var(--gold) 50%, rgba(255,255,255,0.15) 52%, var(--red) 100%);
}

.policy-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--gold);
  border: 2px solid white;
  margin-top: -9px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: transform var(--transition-fast);
}

.policy-slider::-webkit-slider-thumb:active {
  transform: scale(1.15);
}

.slider-value-display {
  position: absolute;
  right: 0;
  top: 2px;
  font-size: 14px;
  font-weight: 700;
  color: var(--gold);
}

/* Sector impact preview bars */
.sector-impact-preview {
  margin-top: 8px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-sm);
}

.sector-impact-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  font-size: 11px;
}

.sector-impact-row:last-child { margin-bottom: 0; }

.sector-impact-label { width: 80px; color: var(--text-dim); }

.sector-impact-bar {
  flex: 1;
  height: 4px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 2px;
  overflow: hidden;
}

.sector-impact-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.3s;
}

.sector-impact-fill.positive { background: var(--green); }
.sector-impact-fill.negative { background: var(--red); }

.sector-impact-value {
  width: 32px;
  text-align: right;
  font-weight: 600;
  font-size: 10px;
}

.sector-impact-value.positive { color: var(--green); }
.sector-impact-value.negative { color: var(--red); }

/* Infrastructure impact indicators */
.infra-impact-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  font-size: 12px;
}

.infra-impact-icon { font-size: 14px; }
.infra-impact-label { flex: 1; color: var(--text-dim); }
.infra-impact-delta { font-weight: 700; }
.infra-impact-delta.positive { color: var(--green); }
.infra-impact-delta.negative { color: var(--red); }

.policy-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--glass-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.policy-footer-costs {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.fiscal-impact-line {
  font-size: 11px;
  color: var(--text-dim);
}

.total-cost {
  font-size: 14px;
  color: var(--text-dim);
}

.total-cost-value {
  color: var(--gold);
  font-weight: 700;
}


/* ====== 12. CABINET SCREEN ====== */
.cabinet-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.meetings-display {
  font-size: 13px;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

/* Header exit button (right side) */
.btn-header-exit {
  width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  border-radius: 10px;
  border: 1px solid rgba(220, 38, 38, 0.25);
  background: linear-gradient(135deg, rgba(127, 29, 29, 0.25), rgba(51, 65, 85, 0.3));
  color: #F87171;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-size: 16px;
  font-weight: 700;
  z-index: 20;
  position: relative;
}
.btn-header-exit:active,
.btn-header-exit.btn-pressed {
  transform: scale(0.88);
  background: linear-gradient(135deg, rgba(127, 29, 29, 0.45), rgba(51, 65, 85, 0.45));
  border-color: rgba(220, 38, 38, 0.5);
}

.npc-grid {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px));
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-auto-rows: auto;
  gap: 6px;
  align-content: start;
}

.npc-card {
  background: var(--card-bg);
  border: 2px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 6px;
  padding-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  transition: all var(--transition);
  position: relative;
  min-height: 0;
  overflow: visible;
  box-sizing: border-box;
}

.npc-card.allied {
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.2);
}

/* Top row: portrait + name/role inline */
.npc-top-row {
  display: flex;
  align-items: center;
  gap: 4px;
}

.npc-portrait {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 50%;
  border: 2px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  background: rgba(255, 255, 255, 0.04);
  flex-shrink: 0;
  overflow: hidden;
}
.npc-portrait-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.npc-info { text-align: left; flex: 1; min-width: 0; }
.npc-name { font-size: 12px; font-weight: 700; line-height: 1.2; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.npc-role { font-size: 10px; color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Opinion bars — green to red gradient */
.opinion-section { margin-top: 2px; }

.opinion-bar-track {
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  position: relative;
  overflow: hidden;
}

.opinion-bar-track.large {
  height: 10px;
  border-radius: 5px;
}

.opinion-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s ease;
}

.opinion-bar-center {
  position: absolute;
  left: 50%;
  top: 0;
  width: 2px;
  height: 100%;
  background: rgba(255, 255, 255, 0.3);
}

.opinion-label {
  font-size: 11px;
  text-align: center;
  margin-top: 3px;
  font-weight: 600;
}

.opinion-label-large {
  font-size: 14px;
  text-align: center;
  margin-top: 6px;
  font-weight: 700;
}

/* Alliance badge — overlaps top-left edge of NPC card */
.npc-badges {
  display: flex;
  gap: 3px;
  flex-wrap: wrap;
  position: absolute;
  top: -6px;
  left: 4px;
  right: 4px;
  z-index: 2;
  overflow: hidden;
}

.badge-alliance {
  font-size: 9px;
  background: rgba(34, 197, 94, 0.2);
  color: var(--green);
  padding: 2px 6px;
  border-radius: 8px;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.badge-alliance.gold-glow {
  border-color: var(--gold);
  box-shadow: 0 0 8px rgba(212, 175, 55, 0.3);
  color: var(--gold-light);
  background: rgba(212, 175, 55, 0.15);
}

/* Scheme warning — pulsing red badge */
.badge-scheme {
  font-size: 9px;
  background: rgba(239, 68, 68, 0.2);
  color: var(--red-light);
  padding: 2px 6px;
  border-radius: 8px;
  border: 1px solid rgba(239, 68, 68, 0.3);
  animation: pulse 2s ease-in-out infinite;
}

.badge-scheme.critical {
  background: rgba(239, 68, 68, 0.3);
  border-color: var(--red);
  animation: glowRed 1.5s ease-in-out infinite;
}

.badge-hook {
  font-size: 9px;
  background: rgba(249, 115, 22, 0.2);
  color: var(--orange);
  padding: 2px 6px;
  border-radius: 8px;
}

.badge-hook.strong {
  background: rgba(239, 68, 68, 0.2);
  color: var(--danger);
}

.badge-met {
  font-size: 9px;
  background: rgba(100, 116, 139, 0.3);
  color: var(--text-muted);
  padding: 2px 6px;
  border-radius: 8px;
}

/* Faction badges */
.badge-faction {
  font-size: 9px;
  padding: 2px 8px;
  border-radius: 8px;
  font-weight: 600;
  background: rgba(26, 58, 138, 0.3);
  color: var(--blue-light);
  border: 1px solid rgba(37, 99, 235, 0.2);
}

.badge-faction.moderate { color: var(--text-dim); background: rgba(100, 116, 139, 0.2); border-color: rgba(100, 116, 139, 0.2); }
.badge-faction.progressive { color: var(--blue-light); background: rgba(37, 99, 235, 0.15); border-color: rgba(37, 99, 235, 0.2); }
.badge-faction.conservative { color: var(--red-light); background: rgba(220, 38, 38, 0.15); border-color: rgba(220, 38, 38, 0.2); }
.badge-faction.libertarian { color: var(--gold-light); background: rgba(212, 175, 55, 0.15); border-color: rgba(212, 175, 55, 0.2); }

/* Loyalty level labels */
.loyalty-label {
  font-size: 10px;
  font-weight: 600;
  text-align: center;
  margin-top: 2px;
}

.loyalty-label.loyal { color: var(--green); }
.loyalty-label.neutral { color: var(--text-dim); }
.loyalty-label.disloyal { color: var(--orange); }
.loyalty-label.hostile { color: var(--red); }



.cabinet-footer {
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--glass-border);
}


/* ====== 13. MEETING SCREEN / DIALOGUE ====== */
.meeting-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: rgba(6, 10, 22, 0.85);
}

/* NPC portrait header with mood indicator */
.meeting-npc {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--glass-border);
  flex-shrink: 0;
}

.meeting-portrait {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  background: rgba(255, 255, 255, 0.04);
  position: relative;
  flex-shrink: 0;
  overflow: hidden;
}

.meeting-portrait-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

/* Mood indicator dot */
.mood-indicator {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--bg);
}

.mood-indicator.happy { background: var(--green); }
.mood-indicator.neutral { background: var(--text-muted); }
.mood-indicator.angry { background: var(--red); }
.mood-indicator.suspicious { background: var(--orange); }

.meeting-npc-info { flex: 1; }
.meeting-npc-name { font-size: 18px; font-weight: 700; color: var(--text); }
.meeting-npc-role { font-size: 13px; color: var(--text-dim); }

.meeting-traits {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}

.opinion-display {
  padding: 10px 16px;
  flex-shrink: 0;
}

/* Topic tabs */
.meeting-topics {
  display: flex;
  gap: 6px;
  padding: 8px 16px;
  overflow-x: auto;
  scrollbar-width: none;
  flex-shrink: 0;
}

.meeting-topics::-webkit-scrollbar { display: none; }

.topic-tab {
  padding: 8px 14px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  min-height: 36px;
}

.topic-tab:hover { color: var(--text); background: rgba(255, 255, 255, 0.08); }

.topic-tab.active {
  background: rgba(212, 175, 55, 0.15);
  border-color: var(--gold);
  color: var(--gold-light);
}

/* iMessage-style dialogue bubbles */
.dialogue-area {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dialogue-bubble {
  max-width: 82%;
  padding: 12px 16px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.5;
  position: relative;
  animation: fadeIn 0.3s ease;
}

/* NPC bubbles — dark glass, left-aligned */
.dialogue-bubble.npc {
  align-self: flex-start;
  background: var(--card-bg-solid);
  border: 1px solid var(--glass-border);
  color: var(--text);
  border-bottom-left-radius: 4px;
}

.dialogue-bubble.npc::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: -8px;
  width: 16px;
  height: 16px;
  background: radial-gradient(ellipse at top right, var(--card-bg-solid) 50%, transparent 50%);
}

/* Player bubbles — blue/primary background, right-aligned */
.dialogue-bubble.player {
  align-self: flex-end;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  border-bottom-right-radius: 4px;
}

.dialogue-bubble.player::before {
  content: '';
  position: absolute;
  bottom: 0;
  right: -8px;
  width: 16px;
  height: 16px;
  background: radial-gradient(ellipse at top left, var(--primary) 50%, transparent 50%);
}

/* Typewriter cursor animation */
.typing-indicator {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 16px;
}

.typing-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-dim);
  animation: pulse 1s ease-in-out infinite;
}

.typing-dot:nth-child(2) { animation-delay: 0.15s; }
.typing-dot:nth-child(3) { animation-delay: 0.3s; }

.typing-cursor {
  display: inline-block;
  width: 2px;
  height: 16px;
  background: var(--gold);
  animation: typing-cursor 0.8s ease-in-out infinite;
  vertical-align: text-bottom;
  margin-left: 2px;
}

/* Response choice buttons (3 options) */
.meeting-actions {
  padding: 12px 16px;
  border-top: 1px solid var(--glass-border);
  flex-shrink: 0;
}

.meeting-actions h4 {
  color: var(--gold);
  margin-bottom: 10px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.action-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.response-choice {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 14px 16px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  text-align: left;
  color: var(--text);
  min-height: 44px;
  width: 100%;
}

.response-choice:hover {
  border-color: var(--gold);
  background: rgba(212, 175, 55, 0.08);
}

.response-choice:active { transform: scale(0.98); }

.response-choice.disabled { opacity: 0.4; cursor: not-allowed; pointer-events: none; }

.action-name { font-size: 14px; font-weight: 600; }
.action-cost { font-size: 11px; color: var(--text-dim); }
.action-effect { font-size: 11px; color: var(--gold); }

/* Meeting result toast */
.meeting-result {
  position: absolute;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 24px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  z-index: 100;
  text-align: center;
  max-width: 80%;
  animation: slideUp 0.3s ease;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.result-positive {
  background: rgba(34, 197, 94, 0.9);
  color: white;
  border: 1px solid var(--green);
}

.result-negative {
  background: rgba(239, 68, 68, 0.9);
  color: white;
  border: 1px solid var(--danger);
}

/* Legacy dialogue box (non-bubble style) */
.dialogue-box {
  margin: 0 16px;
  padding: 16px;
  background: var(--card-bg);
  border-radius: var(--radius);
  border-left: 3px solid var(--gold);
}

.dialogue-text {
  font-size: 15px;
  font-style: italic;
  line-height: 1.5;
  color: var(--text);
}


/* ====== 14. BUDGET SCREEN ====== */
.budget-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 100%;
}

.budget-fixed-header {
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 10;
  background: linear-gradient(180deg, var(--bg-dark) 80%, transparent);
  padding-bottom: 4px;
}

.budget-scrollable {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  min-height: 0;
  padding-bottom: 12px;
}

.budget-fixed-footer {
  flex-shrink: 0;
  position: sticky;
  bottom: 0;
  z-index: 10;
  background: linear-gradient(0deg, var(--bg-dark) 80%, transparent);
  padding: 12px 16px;
  padding-top: 16px;
}

.budget-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.budget-footer-row .budget-remaining {
  font-size: 14px;
  font-weight: 600;
}

.budget-footer-row .btn-primary {
  flex-shrink: 0;
  padding: 10px 24px;
  font-size: 15px;
}

.budget-body {
  flex: 1;
  overflow-y: auto;
}

.budget-overview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 16px;
}

.budget-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 14px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.budget-card-label {
  font-size: 11px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.budget-card-value {
  font-size: 22px;
  font-weight: 700;
  margin-top: 4px;
}

.budget-card.revenue .budget-card-value { color: var(--green); }
.budget-card.spending .budget-card-value { color: var(--orange); }
.budget-card.balance.positive .budget-card-value { color: var(--green); }
.budget-card.balance.negative .budget-card-value { color: var(--danger); }
.budget-card.debt .budget-card-value { color: var(--text); }

/* Credit rating badge */
.credit-rating {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 14px;
  margin: 0 auto;
}

.credit-rating.aaa { background: rgba(34, 197, 94, 0.15); color: var(--green); border: 1px solid rgba(34, 197, 94, 0.3); }
.credit-rating.aa { background: rgba(34, 197, 94, 0.1); color: var(--green); border: 1px solid rgba(34, 197, 94, 0.2); }
.credit-rating.a { background: rgba(37, 99, 235, 0.1); color: var(--blue-light); border: 1px solid rgba(37, 99, 235, 0.2); }
.credit-rating.bbb { background: rgba(249, 115, 22, 0.1); color: var(--orange); border: 1px solid rgba(249, 115, 22, 0.2); }
.credit-rating.junk { background: rgba(220, 38, 38, 0.15); color: var(--red-light); border: 1px solid rgba(220, 38, 38, 0.3); animation: pulse 2s infinite; }

/* Debt tracker with warning threshold */
.debt-tracker {
  padding: 0 16px;
  margin-bottom: 12px;
}

.debt-bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  margin-top: 6px;
  position: relative;
  overflow: hidden;
}

.debt-bar-fill {
  height: 100%;
  background: var(--danger);
  border-radius: 3px;
  transition: width 0.5s ease;
}

.debt-threshold {
  position: absolute;
  top: -2px;
  width: 2px;
  height: 10px;
  background: var(--orange);
  border-radius: 1px;
}

.debt-warning {
  color: var(--danger);
  font-weight: 700;
  margin-top: 8px;
  font-size: 12px;
  text-align: center;
}

/* Surplus/deficit indicator */
.surplus-deficit {
  text-align: center;
  padding: 10px 16px;
  font-size: 16px;
  font-weight: 700;
}

.surplus-deficit.surplus { color: var(--green); }
.surplus-deficit.deficit { color: var(--red); }

/* Revenue bars (green tinted) */
.budget-breakdown {
  padding: 0 16px 12px;
}

.budget-breakdown h3 {
  margin-bottom: 10px;
}

.budget-bars {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.budget-bar-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bar-label {
  font-size: 12px;
  width: 90px;
  color: var(--text-dim);
  flex-shrink: 0;
}

.bar-track {
  flex: 1;
  height: 8px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.4s ease;
}

.bar-fill.revenue { background: linear-gradient(90deg, #16A34A, var(--green)); }
.bar-fill.spending { background: linear-gradient(90deg, var(--primary), var(--blue)); }

.bar-value {
  font-size: 12px;
  width: 40px;
  text-align: right;
  font-weight: 600;
  flex-shrink: 0;
}

.budget-info { padding: 12px 16px; }
.budget-info p { font-size: 12px; color: var(--text-dim); line-height: 1.4; }

.budget-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--glass-border);
}


/* ====== 15. DASHBOARD SCREEN ====== */
.dashboard-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.dashboard-grid {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  align-content: start;
}

.dash-panel {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 12px;
  border: 1px solid var(--glass-border);
}

.dash-panel h3 {
  font-size: 12px;
  margin-bottom: 8px;
}

/* Population counter with growth arrow */
.population-panel { grid-column: 1 / -1; }

.population-counter {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.population-number {
  font-size: 32px;
  font-weight: 900;
  color: var(--text);
  text-shadow: 0 1px 6px rgba(255, 255, 255, 0.1);
}

.population-growth {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  font-weight: 700;
}

.population-growth.up { color: var(--green); }
.population-growth.down { color: var(--red); }
.population-growth.flat { color: var(--text-muted); }

.growth-arrow {
  font-size: 16px;
  display: inline-block;
}

.growth-arrow.up { transform: rotate(-45deg); }
.growth-arrow.down { transform: rotate(45deg); }

/* Sector employment chart — horizontal bars */
.sector-chart {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

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

.sector-icon { font-size: 14px; width: 20px; text-align: center; flex-shrink: 0; }
.sector-name { font-size: 10px; width: 64px; color: var(--text-dim); flex-shrink: 0; }

.sector-bar-track {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 3px;
  overflow: hidden;
}

.sector-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s ease;
}

.sector-value {
  font-size: 10px;
  width: 28px;
  text-align: right;
  font-weight: 600;
  flex-shrink: 0;
}

/* Infrastructure status bars (color-coded) */
.infra-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

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

.infra-icon { font-size: 14px; width: 20px; text-align: center; flex-shrink: 0; }
.infra-name { font-size: 10px; width: 64px; color: var(--text-dim); flex-shrink: 0; }

.infra-bar-track {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 3px;
  overflow: hidden;
}

.infra-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s ease;
}

.infra-bar-fill.good { background: var(--green); }
.infra-bar-fill.fair { background: var(--orange); }
.infra-bar-fill.poor { background: var(--red); }

.infra-value {
  font-size: 10px;
  width: 28px;
  text-align: right;
  font-weight: 600;
  flex-shrink: 0;
}

/* Approval panel */
.approval-panel { grid-column: 1 / -1; }

.approval-big { text-align: center; margin-bottom: 10px; }

.approval-number {
  font-size: 48px;
  font-weight: 900;
  display: block;
  text-shadow: 0 2px 12px rgba(212, 175, 55, 0.2);
}

.approval-label {
  font-size: 14px;
  color: var(--text-dim);
}

/* Approval history sparkline area */
.approval-history {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 40px;
  padding: 4px 0;
}

.history-bar {
  flex: 1;
  border-radius: 2px 2px 0 0;
  min-height: 4px;
  transition: height 0.4s ease;
}

.history-bar.current {
  box-shadow: 0 0 6px rgba(212, 175, 55, 0.4);
}

/* Economic indicators grid */
.econ-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.econ-stat { text-align: center; }
.econ-label { font-size: 10px; color: var(--text-dim); display: block; }

.econ-value {
  font-size: 16px;
  font-weight: 700;
}

.econ-value.positive { color: var(--green); }
.econ-value.negative { color: var(--danger); }

.demographics-panel { grid-column: 1 / -1; }

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

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

.demo-emoji { font-size: 16px; width: 24px; text-align: center; flex-shrink: 0; }
.demo-name { font-size: 11px; width: 100px; color: var(--text-dim); flex-shrink: 0; }

.demo-bar-track {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 3px;
  overflow: hidden;
}

.demo-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s ease;
}

.demo-value {
  font-size: 12px;
  width: 30px;
  text-align: right;
  font-weight: 600;
  flex-shrink: 0;
}

/* Relations panel */
.rel-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

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

.rel-portrait { font-size: 18px; flex-shrink: 0; }
.rel-name { font-size: 11px; flex: 1; color: var(--text-dim); }
.rel-opinion { font-size: 14px; font-weight: 700; }

.rel-badge {
  font-size: 9px;
  background: rgba(34, 197, 94, 0.2);
  color: var(--green);
  padding: 2px 6px;
  border-radius: 8px;
}

.dashboard-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--glass-border);
}

/* Dashboard scroll container */
.dashboard-scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 8px 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Turn Summary */
.dash-turn-summary {
  border-left: 3px solid var(--gold);
}
.turn-action-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 8px;
}
.turn-action-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text);
  padding: 4px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.turn-action-icon { font-size: 14px; flex-shrink: 0; }
.turn-action-text { flex: 1; }
.turn-action-empty {
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
  padding: 8px 0;
}
.turn-action-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-dim);
  padding-top: 6px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

/* NPC Reactions */
.npc-reaction-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.npc-reaction-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.04);
}
.npc-reaction-row.npc-happy {
  border-color: rgba(34,197,94,0.15);
  background: rgba(34,197,94,0.04);
}
.npc-reaction-row.npc-angry {
  border-color: rgba(239,68,68,0.15);
  background: rgba(239,68,68,0.04);
}
.npc-react-portrait { font-size: 24px; flex-shrink: 0; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; }
.npc-react-portrait-img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.npc-react-info { flex: 1; min-width: 0; }
.npc-react-name-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.npc-react-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}
.npc-react-opinion {
  font-size: 13px;
  font-weight: 700;
}
.npc-react-title {
  font-size: 10px;
  color: var(--text-dim);
  display: block;
}
.npc-react-modifiers {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin-top: 3px;
}
.npc-mod-chip {
  font-size: 9px;
  padding: 1px 5px;
  border-radius: 6px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
}
.npc-react-badge {
  font-size: 9px;
  padding: 2px 6px;
  border-radius: 8px;
  background: rgba(34,197,94,0.15);
  color: #22C55E;
  font-weight: 600;
  flex-shrink: 0;
}
.npc-badge-danger {
  background: rgba(239,68,68,0.15);
  color: #EF4444;
}

/* Active bills mini */
.active-bills-mini {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.bill-mini-row {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  padding: 3px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.bill-mini-name { color: var(--text); }
.bill-mini-turns { color: var(--gold); font-weight: 600; }

/* Opp meter in dashboard */
.opp-label-sm {
  font-size: 10px;
  color: var(--text-dim);
  margin-right: 6px;
}
.dash-opp-bills .opp-meter {
  display: flex;
  align-items: center;
  gap: 6px;
}
.dash-opp-bills .opp-bar-track { flex: 1; }
.dash-opp-bills .opp-value { font-size: 13px; font-weight: 700; min-width: 30px; text-align: right; }

/* Budget impact preview */
.budget-impact-preview {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.budget-impact-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.budget-impact-label {
  font-size: 10px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}
.budget-impact-empty {
  font-size: 11px;
  color: var(--text-muted);
  font-style: italic;
  text-align: center;
  padding: 8px 0;
}

/* Budget slider benefits */
.budget-slider-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2px;
}
.budget-slider-benefits {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin-top: 3px;
}
.budget-benefit-chip {
  font-size: 9px;
  padding: 1px 6px;
  border-radius: 8px;
  font-weight: 500;
}
.budget-benefit-chip.high {
  background: rgba(34,197,94,0.12);
  color: #22C55E;
  border: 1px solid rgba(34,197,94,0.2);
}
.budget-benefit-chip.mid {
  background: rgba(212,175,55,0.1);
  color: var(--gold);
  border: 1px solid rgba(212,175,55,0.2);
}
.budget-benefit-chip.low {
  background: rgba(100,116,139,0.1);
  color: var(--text-muted);
  border: 1px solid rgba(100,116,139,0.15);
}

/* Budget: Dollar display per slider */
.budget-dollar-display {
  display: flex;
  align-items: baseline;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--gold);
}

/* Budget: Fiscal Breakdown */
.fiscal-breakdown {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.fiscal-row {
  display: grid;
  grid-template-columns: 80px 1fr 50px 55px;
  align-items: center;
  gap: 6px;
  font-size: 11px;
}

.fiscal-row.fiscal-fixed {
  opacity: 0.5;
}

.fiscal-label {
  color: var(--text-dim);
  font-size: 10px;
  white-space: nowrap;
}

.fiscal-bar-track {
  height: 6px;
  background: rgba(255,255,255,0.06);
  border-radius: 3px;
  overflow: hidden;
}

.fiscal-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.2s ease;
}

.fiscal-value {
  text-align: right;
  font-weight: 600;
  color: var(--text);
  font-size: 11px;
}

.fiscal-diff {
  text-align: right;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}

/* ====== 16. EVENT SCREEN ====== */
.event-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 10px 16px;
  padding-top: 54px;
  gap: 8px;
  overflow-y: auto;
}

.event-top-bar {
  margin-top: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}

.event-severity-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.5px;
  border: 1px solid;
}

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

.event-card-main {
  text-align: center;
  padding: 10px 16px;
  border-radius: var(--radius);
  width: 100%;
  max-width: 400px;
}

.event-emoji { font-size: 36px; filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3)); }

.event-options-section {
  width: 100%;
  max-width: 400px;
}

.event-options-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-dim);
  text-align: center;
  margin-bottom: 6px;
}

.event-options-list {
  display: flex;
  flex-direction: column;
}

/* Severity badge */
.event-severity {
  display: inline-block;
  padding: 4px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  margin-top: 8px;
  text-transform: uppercase;
}

.severity-low {
  background: rgba(37, 99, 235, 0.15);
  color: var(--blue-light);
  border: 1px solid rgba(37, 99, 235, 0.3);
}

.severity-medium {
  background: rgba(249, 115, 22, 0.15);
  color: var(--orange);
  border: 1px solid var(--orange);
}

.severity-high {
  background: rgba(249, 115, 22, 0.2);
  color: var(--orange);
  border: 1px solid var(--orange);
}

.severity-critical {
  background: rgba(239, 68, 68, 0.2);
  color: var(--danger);
  border: 1px solid var(--danger);
  animation: pulse 1.5s infinite;
}

/* Event card */
.event-card {
  width: 100%;
  max-width: 400px;
  background: var(--card-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
}

.event-card.severity-border-critical {
  border-color: var(--danger);
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.1);
}

.event-card.severity-border-high {
  border-color: var(--orange);
}

.event-name {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.event-headline {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
  line-height: 1.3;
  color: var(--text);
}

.event-description {
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.4;
}

.event-category-icon {
  font-size: 20px;
  margin-bottom: 4px;
}

.event-none {
  color: var(--text-dim);
  text-align: center;
  padding: 20px;
  font-size: 14px;
}

/* 2-4 response option cards */
.event-options {
  width: 100%;
  max-width: 400px;
}

.event-options h3 {
  margin-bottom: 10px;
  text-align: center;
}

.event-option {
  display: block;
  width: 100%;
  margin-bottom: 8px;
  padding: 14px;
  background: var(--card-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  cursor: pointer;
  text-align: left;
  color: var(--text);
  transition: all var(--transition);
  min-height: 44px;
}

.event-option:hover {
  border-color: var(--gold);
  background: rgba(212, 175, 55, 0.08);
}

.event-option:active { transform: scale(0.98); }
.event-option.disabled { opacity: 0.4; cursor: not-allowed; pointer-events: none; }

.option-label { font-size: 15px; font-weight: 700; margin-bottom: 4px; overflow-wrap: break-word; word-break: break-word; }
.option-description { font-size: 12px; color: var(--text-dim); line-height: 1.4; overflow-wrap: break-word; word-break: break-word; }
.option-cost { font-size: 11px; color: var(--orange); margin-top: 4px; font-weight: 600; }

/* Cascading effect preview */
.cascade-preview {
  margin-top: 8px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cascade-effect {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
}

.cascade-arrow { color: var(--text-muted); font-size: 10px; }
.cascade-label { color: var(--text-dim); }
.cascade-value { font-weight: 600; }
.cascade-value.positive { color: var(--green); }
.cascade-value.negative { color: var(--red); }


/* ====== 17. ELECTION SCREEN ====== */
.election-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 38px 16px 20px;
  gap: 10px;
  background: radial-gradient(ellipse at 50% 30%, rgba(26, 58, 138, 0.3) 0%, transparent 70%);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

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

.election-title {
  font-size: 22px;
  font-weight: 900;
  color: var(--gold);
  letter-spacing: 3px;
  text-shadow: 0 2px 10px rgba(212, 175, 55, 0.3);
  text-transform: uppercase;
}

.election-subtitle {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 4px;
}

.election-turnout-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 11px;
}
.turnout-chip-label { color: var(--text-dim); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.turnout-chip-value { color: var(--gold); font-weight: 700; }

.election-body {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

/* State map */
.election-map-section {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.state-map-container {
  width: 100%;
  max-width: 212px;
  position: relative;
  flex-shrink: 0;
}

.state-map-svg {
  width: 100%;
  height: auto;
  display: block;
}

.state-abbr-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 18px;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.15);
  letter-spacing: 2px;
  pointer-events: none;
}

.counties-reporting {
  font-size: 12px;
  color: var(--text-dim);
  text-align: center;
}
.counties-count { color: var(--gold); font-weight: 700; }

/* Tally bar with avatars */
.election-tally-section {
  width: 100%;
  max-width: 380px;
  flex-shrink: 0;
}

.election-tally-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.tally-side {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.tally-left { flex-direction: row; }
.tally-right { flex-direction: row; }

.tally-pct {
  font-size: 14px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  min-width: 48px;
}
.tally-left .tally-pct { text-align: right; }
.tally-right .tally-pct { text-align: left; }

/* Avatar styles for election screen */
.election-avatar-img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid;
  flex-shrink: 0;
}
.election-avatar-emoji {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  border: 2px solid;
  background: rgba(255, 255, 255, 0.05);
  flex-shrink: 0;
}
.election-avatar-fallback {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  border: 2px solid;
  flex-shrink: 0;
}

/* Vote bar */
.vote-bar-container {
  flex: 1;
  position: relative;
  min-width: 0;
}

.vote-bar {
  display: flex;
  height: 20px;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
}

.vote-bar-left,
.vote-bar-right {
  transition: width 0.15s ease;
  height: 100%;
}

.vote-bar-midline {
  position: absolute;
  left: 50%;
  top: -3px;
  width: 2px;
  height: 26px;
  background: white;
  opacity: 0.4;
  border-radius: 1px;
}

/* Margin chip */
.vote-margin-live {
  text-align: center;
  margin-top: 4px;
}

.margin-chip {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
}

/* PROJECTED WINNER — chip-styled banners */
.projected-winner-banner {
  display: none;
  justify-content: center;
  width: 100%;
  flex-shrink: 0;
  animation: slideUp 0.6s ease-out;
}
.banner-reveal { display: flex !important; }

.projected-chip-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.projected-chip-group.projected-flash-in {
  opacity: 1;
  transform: scale(1);
}

.projected-chip {
  display: inline-block;
  padding: 6px 18px;
  border-radius: 20px;
  font-weight: 700;
  text-align: center;
  border: 1px solid;
}

.projected-chip-label {
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold);
  background: rgba(212, 175, 55, 0.12);
  border-color: rgba(212, 175, 55, 0.3);
}

.projected-chip-name {
  font-size: 20px;
  font-weight: 900;
  padding: 8px 24px;
  letter-spacing: 1px;
  border-color: transparent;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.3);
}

.projected-chip-margin {
  font-size: 11px;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
  padding: 4px 14px;
}

/* Demographic breakdown */
.demographic-breakdown {
  display: none;
  width: 100%;
  max-width: 380px;
  max-height: 160px;
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow-y: auto;
  border: 1px solid var(--glass-border);
  flex-shrink: 0;
}

.breakdown-title {
  font-size: 13px;
  color: var(--gold);
  text-align: center;
  padding: 8px 12px 4px;
  margin: 0;
  position: sticky;
  top: 0;
  background: var(--card-bg);
  z-index: 2;
}

.breakdown-header {
  display: flex;
  padding: 6px 12px;
  background: var(--card-bg);
  font-size: 10px;
  position: sticky;
  top: 28px;
  z-index: 2;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.breakdown-col-group { flex: 1.5; }
.breakdown-col-turnout { flex: 1; text-align: center; }
.breakdown-col-share { flex: 1; text-align: center; }

.breakdown-row {
  display: flex;
  align-items: center;
  padding: 6px 12px;
  font-size: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}
.breakdown-row .breakdown-col-group { color: var(--text-dim); display: flex; align-items: center; gap: 4px; }
.breakdown-row .breakdown-col-turnout { text-align: center; color: var(--text-dim); }
.breakdown-row .breakdown-col-share { text-align: center; font-weight: 600; }

.demo-emoji { font-size: 14px; }

.continue-btn { animation: slideUp 0.4s ease-out; flex-shrink: 0; margin-top: 4px; }


/* ====== 18. RESULTS SCREEN (compact single-viewport) ====== */
.results-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 38px 16px 14px;
  gap: 12px;
  overflow-y: auto;
}

/* Banner row — SVG icon left of text */
.results-banner-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.results-banner-row.banner-win {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(212, 175, 55, 0.1));
  border-color: rgba(34, 197, 94, 0.25);
}
.results-banner-row.banner-lose {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(220, 38, 38, 0.1));
  border-color: rgba(239, 68, 68, 0.25);
}
.banner-svg { flex-shrink: 0; display: flex; }
.banner-info { display: flex; flex-direction: column; }
.banner-text { font-size: 22px; font-weight: 900; color: var(--text); margin: 0; letter-spacing: 1px; }
.banner-margin { font-size: 13px; color: var(--text-dim); margin-top: 3px; }

/* Grade circle + vote bar side by side */
.results-grade-vote-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  background: var(--card-bg);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,0.04);
}
.results-grade-compact {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.grade-circle-sm {
  width: 64px; height: 64px;
  border-radius: 50%;
  border: 3px solid;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.25);
}
.grade-letter-sm { font-size: 26px; font-weight: 900; }
.grade-score-sm { font-size: 12px; color: var(--text-dim); }

.results-vote-compact { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.vote-numbers-row { display: flex; align-items: center; justify-content: space-between; }
.vote-bar-compact {
  display: flex; height: 10px; border-radius: 5px; overflow: hidden;
  background: rgba(255,255,255,0.06);
}

/* 6-category breakdown in 2-col grid */
.results-breakdown-grid {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.rb-item {
  background: var(--card-bg);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,0.04);
}
.rb-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 5px; }
.rb-label { font-size: 13px; font-weight: 600; color: var(--text); }
.rb-value { font-size: 13px; font-weight: 700; }
.rb-bar { height: 6px; background: rgba(255,255,255,0.08); border-radius: 3px; overflow: hidden; }
.rb-fill { height: 100%; border-radius: 3px; transition: width 0.6s ease; }
.rb-fill.bar-animate { animation: fillExpand 0.8s ease-out; }

/* Stats 3-col grid */
.results-stats-grid {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}
.rs-stat {
  background: var(--card-bg);
  border-radius: var(--radius-sm);
  padding: 10px 8px;
  text-align: center;
  border: 1px solid rgba(255,255,255,0.04);
}
.rs-label { display: block; font-size: 11px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.5px; }
.rs-value { display: block; font-size: 18px; font-weight: 700; color: var(--text); margin-top: 2px; }

/* Promises Section */
.promises-section {
  width: 100%;
  background: var(--card-bg);
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
}
.promises-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: rgba(212, 175, 55, 0.08);
  border-bottom: 1px solid rgba(212, 175, 55, 0.15);
}
.promises-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.promises-summary {
  font-size: 11px;
  color: var(--text-dim);
}
.promises-grid {
  max-height: 140px;
  overflow-y: auto;
}
.promise-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.promise-row:last-child { border-bottom: none; }
.promise-icon { flex-shrink: 0; display: flex; align-items: center; }
.promise-text { flex: 1; font-size: 12px; color: var(--text); }
.promise-source {
  flex-shrink: 0;
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.promise-kept { background: rgba(34, 197, 94, 0.05); }
.promise-broken { background: rgba(239, 68, 68, 0.05); }
.promise-pending { background: rgba(245, 158, 11, 0.05); }

/* Play Again / Exit */
.results-actions {
  display: flex;
  gap: 10px;
  width: 100%;
  margin-top: 4px;
}
.results-actions .btn-glass { flex: 1; }
.results-actions .btn-glass:only-child { max-width: 200px; }

/* Career progress bar */
.career-progress-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin: 8px 0;
  width: 100%;
}
.career-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}
.career-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--card-bg);
  border: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-dim);
  transition: all 0.3s ease;
}
.career-step-active .career-dot {
  background: linear-gradient(135deg, #D4AF37, #F5D060);
  border-color: #D4AF37;
  color: #000;
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.5);
}
.career-step-done .career-dot {
  background: #22C55E;
  border-color: #22C55E;
  color: #fff;
}
.career-step-label {
  font-size: 10px;
  color: var(--text-dim);
  font-weight: 500;
}
.career-step-active .career-step-label {
  color: #D4AF37;
  font-weight: 700;
}
.career-connector {
  width: 30px;
  height: 2px;
  background: var(--border-color);
  margin-bottom: 16px;
}

/* Promotion card */
.promotion-card {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.15), rgba(212, 175, 55, 0.05));
  border: 1px solid rgba(212, 175, 55, 0.4);
  border-radius: 12px;
  padding: 12px 16px;
  margin: 8px 0;
  width: 100%;
}
.promotion-headline {
  font-size: 14px;
  font-weight: 700;
  color: #D4AF37;
  margin-bottom: 4px;
}
.promotion-subline {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.promotion-requirement {
  font-size: 11px;
  color: var(--text-dim);
  font-style: italic;
}

/* Promotion failed message */
.promotion-failed-msg {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 8px;
  padding: 8px 12px;
  margin: 6px 0;
  text-align: center;
  width: 100%;
}
.promotion-failed-msg span {
  color: #EF4444;
  font-size: 13px;
  font-weight: 600;
}

/* Victory celebration banner */
.career-victory-banner {
  text-align: center;
  padding: 16px;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.2), rgba(245, 208, 96, 0.1));
  border: 1px solid rgba(212, 175, 55, 0.5);
  border-radius: 12px;
  width: 100%;
}
.victory-stars {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 8px;
}
.victory-title {
  font-size: 22px;
  font-weight: 800;
  color: #D4AF37;
  margin: 0 0 4px 0;
  text-transform: uppercase;
  letter-spacing: 2px;
}
.victory-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0 0 10px 0;
}
.career-summary {
  display: flex;
  justify-content: center;
  gap: 16px;
}
.career-stat {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  background: var(--card-bg);
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
}

/* HUD career badge */
.hud-career-badge {
  font-size: 11px;
  font-weight: 600;
  color: #D4AF37;
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 6px;
  padding: 3px 8px;
  white-space: nowrap;
}

/* Election skip button */
.election-skip-btn {
  position: sticky;
  bottom: 10px;
  align-self: flex-end;
  font-size: 13px;
  padding: 6px 16px;
  opacity: 0.7;
  z-index: 10;
  flex-shrink: 0;
}
.election-skip-btn:hover {
  opacity: 1;
}


/* ====== 19. STATE MAP HUD (flex version — absolute removed) ====== */
.state-map-hud {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  cursor: pointer;
  transition: all var(--transition);
}

.state-map-hud:hover {
  transform: scale(1.1);
}

.state-map-hud svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 4px currentColor);
  opacity: 0.8;
}

.state-map-hud svg path {
  stroke: var(--gold);
  stroke-width: 1.5;
  fill: rgba(26, 58, 138, 0.3);
  transition: fill var(--transition);
}

.state-map-hud:hover svg path {
  fill: rgba(26, 58, 138, 0.5);
  filter: drop-shadow(0 0 10px rgba(212, 175, 55, 0.5));
}


/* ====== 20. NEWS REVIEW OVERLAY ====== */
.news-review-overlay {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 85%;
  max-width: 360px;
  background: var(--surface-solid);
  border-left: 1px solid var(--glass-border);
  box-shadow: -8px 0 40px rgba(0, 0, 0, 0.4);
  z-index: 50;
  display: flex;
  flex-direction: column;
  animation: slideInRight 0.3s ease;
}

.news-review-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid var(--glass-border);
  flex-shrink: 0;
}

.news-review-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--gold);
}

.news-review-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-dim);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: all var(--transition);
}

.news-review-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
}

.news-review-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.news-review-card {
  background: var(--card-bg);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  padding: 12px;
  position: relative;
  overflow: hidden;
}

.news-review-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
}

.news-review-card.economy::before { background: var(--green); }
.news-review-card.opposition::before { background: var(--red); }
.news-review-card.event::before { background: var(--gold); }
.news-review-card.population::before { background: var(--blue); }
.news-review-card.infrastructure::before { background: var(--orange); }

.news-review-card-turn {
  font-size: 10px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.news-review-card-headline {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}

.news-review-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 49;
  animation: fadeIn 0.2s ease;
}


/* ====== 21. WIDE SCREEN BORDER ====== */
@media (min-aspect-ratio: 9/16) {
  #game-root {
    border-left: 1px solid rgba(212, 175, 55, 0.15);
    border-right: 1px solid rgba(212, 175, 55, 0.15);
    box-shadow: 0 0 60px rgba(26, 58, 138, 0.1);
  }
}

/* Landscape warning — hidden by default, shown if game requires portrait */
@media (orientation: landscape) and (max-height: 480px) {
  .landscape-warning {
    display: flex;
    position: fixed;
    inset: 0;
    background: var(--bg);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 12px;
    color: var(--text-dim);
    font-size: 14px;
  }

  .landscape-warning-icon {
    font-size: 48px;
    animation: spin 2s linear infinite;
  }
}


/* ====== 22. SCROLLBAR STYLING ====== */
::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--gold-dim);
  border-radius: 2px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(212, 175, 55, 0.5);
}

/* Firefox scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--gold-dim) transparent;
}


/* ====== UTILITY CLASSES ====== */
.hidden { display: none !important; }
.flex-1 { flex: 1; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-col { display: flex; flex-direction: column; }
.gap-4 { gap: 4px; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.p-8 { padding: 8px; }
.p-12 { padding: 12px; }
.p-16 { padding: 16px; }
.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.w-full { width: 100%; }
.overflow-y-auto { overflow-y: auto; }
.shrink-0 { flex-shrink: 0; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }


/* ====================================================================
   COMPATIBILITY — Variable aliases for UI screen references
   ==================================================================== */
:root {
  --bg-card: var(--card-bg);
  --bg-surface: var(--surface);
  --bg-glass: var(--glass-bg);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}


/* ====================================================================
   OFFICE HUD — Phase 2 extras (hud-top-row, warnings, news button)
   ==================================================================== */
.hud-top-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.office-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--gold);
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(212, 175, 55, 0.25);
}

.office-avatar-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: var(--gold);
  font-size: 16px;
  font-weight: 800;
}
.hud-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.hud-state-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.hud-role-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.hud-display-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  word-break: break-word;
}
.hud-quarter {
  font-size: 11px;
  color: var(--text-dim);
}
.btn-news-review {
  padding: 6px 12px;
  font-size: 12px;
}

/* Infrastructure warning bar */
.infra-warning-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  margin-top: 8px;
  background: rgba(249, 115, 22, 0.1);
  border: 1px solid rgba(249, 115, 22, 0.25);
  border-radius: var(--radius-sm);
  font-size: 12px;
}
.infra-warning-icon { font-size: 14px; flex-shrink: 0; }
.infra-warning-text { color: var(--orange); font-weight: 600; }

/* Primary challenge warning */
.primary-warning-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  margin-top: 6px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: var(--radius-sm);
  font-size: 12px;
}

.voting-preview-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  margin: 6px 0;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--text);
}
.voting-preview-icon { font-size: 16px; }
.voting-preview-text { flex: 1; }
.primary-warning-icon { font-size: 14px; flex-shrink: 0; }
.primary-warning-text { color: var(--danger); font-weight: 600; }

/* Event badge (office action) */
.event-badge {
  display: inline-block;
  background: var(--orange);
  color: white;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  margin-left: 4px;
}

/* State map HUD — duplicate removed, see section 19 above */


/* ====================================================================
   DIALOGUE BOX OVERLAY — iMessage-style typewriter roleplay
   ==================================================================== */
.hos-dialogue-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  /* Push panel below the HUD (safe-area + 8px top + 38px button + 8px gap) */
  padding: calc(var(--sat, env(safe-area-inset-top, 0px)) + 54px) 0 0;
}
.hos-dialogue-panel {
  width: 94%;
  max-width: 480px;
  max-height: calc(100% - var(--sat, env(safe-area-inset-top, 0px)) - 70px);
  background: var(--bg);
  border: 2px solid var(--gold);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: fadeIn 0.3s ease-out;
}
.hos-dialogue-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--glass-border);
  flex-shrink: 0;
  text-align: center;
}
.hos-dialogue-npc-portrait { font-size: 36px; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; overflow: hidden; border-radius: 50%; }
.hos-dialogue-portrait-img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.hos-dialogue-npc-info { flex: 1; }
.hos-dialogue-npc-name { font-size: 16px; font-weight: 700; color: var(--text); }
.hos-dialogue-npc-role { font-size: 12px; color: var(--text-dim); }
.hos-dialogue-topic-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 12px;
  background: rgba(212, 175, 55, 0.15);
  color: var(--gold);
  border: 1px solid rgba(212, 175, 55, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Chat Thread */
.hos-chat-thread {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.hos-bubble-row {
  display: flex;
  flex-direction: column;
  max-width: 85%;
}
.hos-bubble-npc { align-self: flex-start; }
.hos-bubble-player { align-self: flex-end; }
.hos-bubble-name {
  font-size: 10px;
  color: var(--text-muted);
  margin-bottom: 3px;
  padding-left: 4px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.hos-bubble {
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.5;
}
.hos-bubble-left {
  background: var(--card-bg);
  border: 1px solid var(--glass-border);
  border-bottom-left-radius: 4px;
  color: var(--text);
}
.hos-bubble-right {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-bottom-right-radius: 4px;
  color: white;
}

/* Typewriter cursor */
.hos-cursor {
  display: inline-block;
  width: 2px;
  height: 14px;
  background: var(--gold);
  margin-left: 1px;
  vertical-align: text-bottom;
  animation: blink 0.6s infinite;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Response Buttons */
.hos-dialogue-actions {
  padding: 12px 16px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
  border-top: 1px solid var(--glass-border);
}
.hos-response-btn {
  display: block;
  width: 100%;
  padding: 12px 14px;
  background: var(--card-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  cursor: pointer;
  text-align: left;
  color: var(--text);
  transition: all 0.2s;
  font-family: inherit;
}
.hos-response-btn:hover { border-color: var(--gold); background: rgba(212, 175, 55, 0.08); }
.hos-response-btn:active,
.hos-response-btn.pressed { transform: scale(0.98); background: rgba(212, 175, 55, 0.12); }
.hos-response-text { font-size: 14px; font-weight: 600; display: block; margin-bottom: 4px; }

.hos-effect-row { display: flex; gap: 6px; flex-wrap: wrap; }
.hos-effect-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
}
.hos-effect-positive { background: rgba(34, 197, 94, 0.15); color: var(--green); }
.hos-effect-negative { background: rgba(239, 68, 68, 0.15); color: var(--danger); }

.hos-continue-btn {
  display: block;
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  color: white;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
}
.hos-continue-btn:hover { background: linear-gradient(135deg, var(--primary-light), var(--primary)); }
.hos-continue-btn:active,
.hos-continue-btn.pressed { transform: scale(0.98); }


/* ====================================================================
   NEWS CARD CATEGORY BADGES (inline class approach from NewsScreen)
   ==================================================================== */
.news-card-category {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  padding: 2px 8px;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 4px;
}
.cat-economy { background: rgba(34, 197, 94, 0.15); color: var(--green); }
.cat-opposition { background: rgba(220, 38, 38, 0.15); color: var(--red-light); }
.cat-event { background: rgba(249, 115, 22, 0.15); color: var(--orange); }
.cat-population { background: rgba(59, 130, 246, 0.15); color: var(--blue-light); }
.cat-infrastructure { background: rgba(139, 92, 246, 0.15); color: #A78BFA; }
.cat-political { background: rgba(212, 175, 55, 0.15); color: var(--gold); }

.news-card-headline {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
  margin-bottom: 4px;
}
.news-card-detail {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.35;
  margin-bottom: 4px;
}
.news-card-impact {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.news-impact-chip {
  font-size: 10px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 10px;
}
.impact-positive { background: rgba(34, 197, 94, 0.15); color: var(--green); }
.impact-negative { background: rgba(239, 68, 68, 0.15); color: var(--danger); }
.impact-neutral { background: rgba(100, 116, 139, 0.15); color: var(--text-dim); }
.impact-warning { background: rgba(249, 115, 22, 0.15); color: var(--orange); }

/* Opposition intel */
.news-opposition-intel {
  padding: 0 16px 8px;
  flex-shrink: 0;
}
.opposition-intel-card {
  background: rgba(220, 38, 38, 0.08);
  border: 1px solid rgba(220, 38, 38, 0.2);
  border-radius: var(--radius);
  padding: 12px;
}
.intel-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.intel-icon { font-size: 18px; }
.intel-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--red-light);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.intel-item {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.4;
  padding: 4px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.intel-item:first-of-type { border-top: none; }

/* News dots */
.news-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 4px 0;
  flex-shrink: 0;
}
.news-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
  transition: all 0.2s;
}
.news-dot.active {
  background: var(--gold);
  width: 18px;
  border-radius: 3px;
}

/* News stats bar */
.news-stats-bar {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 4px 12px;
  border-top: 1px solid var(--glass-border);
  flex-shrink: 0;
}
.news-stats-bar .news-stat {
  flex: 1;
  text-align: center;
  padding: 6px 4px;
  background: rgba(255,255,255,0.04);
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.05);
}
.news-stats-bar .news-stat-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 9px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.news-stats-bar .news-stat-value {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--gold);
  margin-top: 2px;
  text-align: center;
}
.news-stat-pill {
  flex: 1;
  text-align: center;
  padding: 8px 4px;
  background: var(--card-bg);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.news-stat-label {
  display: block;
  font-size: 9px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.news-stat-value {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--gold);
  margin-top: 2px;
}

/* News bottom */
.news-bottom {
  padding: 10px 16px;
  padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  flex-shrink: 0;
}
.news-bottom .btn-glass { width: 100%; }

.news-bottom-bar {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  flex-shrink: 0;
  border-top: 1px solid var(--glass-border);
  background: var(--bg);
}


/* Result margin labels */
.result-margin {
  font-size: 14px;
  color: var(--text-dim);
  margin-top: 8px;
}
.results-vote-card {
  width: 100%;
  max-width: 360px;
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
  border: 1px solid var(--glass-border);
}
.results-vote-card h3 { color: var(--gold); font-size: 14px; margin-bottom: 10px; }
.results-vote-margin {
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 12px;
  display: inline-block;
  margin-top: 8px;
  font-weight: 600;
}
.margin-landslide { background: rgba(34, 197, 94, 0.15); color: var(--green); }
.margin-comfortable { background: rgba(59, 130, 246, 0.15); color: var(--blue-light); }
.margin-squeaker { background: rgba(249, 115, 22, 0.15); color: var(--orange); }
.margin-loss { background: rgba(239, 68, 68, 0.15); color: var(--danger); }

/* State metrics (results) */
.results-state-metrics {
  width: 100%;
  max-width: 360px;
}
.results-state-metrics h3 { color: var(--gold); font-size: 14px; margin-bottom: 10px; text-align: center; }
.state-metrics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.state-metric-card {
  background: var(--card-bg);
  border-radius: var(--radius-sm);
  padding: 10px;
  text-align: center;
}
.state-metric-card .metric-label {
  font-size: 10px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: block;
}
.state-metric-card .metric-value {
  font-size: 18px;
  font-weight: 700;
  display: block;
  margin-top: 2px;
}


/* ====================================================================
   MEETING SCREEN — Phase 2 Status Badges
   ==================================================================== */
.meeting-capital-display {
  font-size: 13px;
  color: var(--gold);
  font-weight: 600;
}
.meeting-status-badges {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-top: 6px;
}
.meeting-status-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  border: 1px solid transparent;
}
.alliance-badge { background: rgba(34, 197, 94, 0.2); color: var(--green); border-color: rgba(34, 197, 94, 0.4); }
.scheme-badge { background: rgba(239, 68, 68, 0.15); }
.hook-info-badge { background: rgba(249, 115, 22, 0.2); color: var(--orange); border-color: rgba(249, 115, 22, 0.3); }
.hook-info-badge.strong { background: rgba(239, 68, 68, 0.2); color: var(--danger); border-color: rgba(239, 68, 68, 0.3); }
.promise-badge { background: rgba(59, 130, 246, 0.2); color: var(--blue-light); border-color: rgba(59, 130, 246, 0.3); }

/* Meeting Dialogue / Actions tabs */
.meeting-tabs {
  display: flex;
  gap: 8px;
  padding: 10px 16px;
  flex-shrink: 0;
}

.meeting-tab {
  flex: 1;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: linear-gradient(135deg, rgba(26, 58, 138, 0.3), rgba(13, 27, 72, 0.4));
  border: 1px solid rgba(148, 163, 184, 0.15);
  color: var(--text-dim);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.meeting-tab:hover {
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.45), rgba(51, 65, 85, 0.35));
  border-color: rgba(212, 175, 55, 0.25);
  color: var(--text);
}

.meeting-tab.active {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.15), rgba(26, 58, 138, 0.4));
  border-color: rgba(212, 175, 55, 0.5);
  color: var(--gold-light);
  box-shadow: 0 2px 12px rgba(212, 175, 55, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* Meeting tab count badge */
.tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--bg);
  font-size: 11px;
  font-weight: 700;
}

/* Dialogue topic list (meeting dialogue tab) */
.meeting-dialogue-tab { padding: 12px 16px; }
.dialogue-empty {
  text-align: center;
  padding: 20px;
  color: var(--text-dim);
}
.dialogue-empty-icon { font-size: 48px; margin-bottom: 12px; opacity: 0.5; }
.dialogue-empty p { font-size: 14px; margin-bottom: 4px; }
.dialogue-empty-hint { font-size: 12px; color: var(--text-muted); }

.dialogue-topic-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.dialogue-topic-btn {
  display: block;
  width: 100%;
  padding: 14px;
  background: var(--card-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  cursor: pointer;
  text-align: left;
  color: var(--text);
  transition: all 0.2s;
  font-family: inherit;
}
.dialogue-topic-btn:hover { border-color: var(--gold); background: rgba(212, 175, 55, 0.08); }
.dialogue-topic-btn:active { transform: scale(0.98); }
.dialogue-topic-btn.previously-discussed { opacity: 0.7; }

.topic-btn-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.topic-icon { font-size: 18px; }
.topic-name { font-size: 15px; font-weight: 700; flex: 1; }
.topic-new-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(34, 197, 94, 0.2);
  color: var(--green);
}
.topic-revisit-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(100, 116, 139, 0.2);
  color: var(--text-muted);
}
.topic-preview {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.4;
  font-style: italic;
  margin-bottom: 4px;
}
.topic-responses-hint { font-size: 11px; color: var(--text-muted); }

/* Meeting actions tab */
.meeting-actions-tab { padding: 12px 16px; }
.actions-section { margin-bottom: 20px; }
.actions-section-title {
  color: var(--gold);
  font-size: 14px;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--glass-border);
}
.action-row-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.action-row-bottom {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.action-cost-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
}
.action-cost-badge.cost { background: rgba(249, 115, 22, 0.15); color: var(--orange); }
.action-cost-badge.gain { background: rgba(34, 197, 94, 0.15); color: var(--green); }
.action-cost-badge.penalty { background: rgba(239, 68, 68, 0.15); color: var(--danger); }
.action-cost-badge.info { background: rgba(59, 130, 246, 0.15); color: var(--blue-light); }
.action-warning { font-size: 10px; color: var(--danger); font-weight: 600; margin-left: auto; }
.action-locked-hint { font-size: 12px; color: var(--text-muted); font-style: italic; padding: 8px 0; }


/* ====================================================================
   CABINET — Phase 2 badges & portrait rings
   ==================================================================== */
.npc-portrait-ring {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 3px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  transition: border-color 0.3s;
}
.npc-portrait-ring .npc-portrait { font-size: 28px; text-align: center; }
.loyalty-label { margin-top: 2px; }
.badge-scheme {
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 8px;
  letter-spacing: 0.3px;
}
.badge-faction {
  font-size: 9px;
  background: rgba(139, 92, 246, 0.2);
  color: #A78BFA;
  padding: 2px 6px;
  border-radius: 8px;
}
.badge-glow {
  animation: glow 2s infinite;
  background: rgba(212, 175, 55, 0.2);
  color: var(--gold);
  font-weight: 700;
}
.npc-card.scheming {
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.2);
}
.faction-warning-banner {
  padding: 8px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
}
.faction-alert {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 12px;
}
.faction-alert-icon { font-size: 16px; color: var(--danger); flex-shrink: 0; }
.faction-alert-text { flex: 1; color: var(--text); line-height: 1.3; }
.faction-alert-power { font-size: 11px; font-weight: 700; flex-shrink: 0; }


/* ====================================================================
   BUDGET — Phase 2 extras
   ==================================================================== */
.budget-content {
  flex: 1;
  overflow-y: auto;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.budget-header-cards {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 8px;
  padding: 12px 16px;
}
.budget-stat-card {
  background: var(--card-bg);
  border-radius: var(--radius-sm);
  padding: 10px 8px;
  text-align: center;
}
.budget-stat-label {
  font-size: 10px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}
.budget-stat-value {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}
.budget-stat-value.positive { color: var(--green); }
.budget-stat-value.negative { color: var(--danger); }
.budget-credit-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 1px;
}
.budget-balance-banner {
  margin: 0 16px 12px;
  padding: 12px 16px;
  border-radius: var(--radius);
  text-align: center;
}
.budget-balance-banner.surplus { background: rgba(34, 197, 94, 0.1); border: 1px solid rgba(34, 197, 94, 0.3); }
.budget-balance-banner.deficit { background: rgba(239, 68, 68, 0.1); border: 1px solid rgba(239, 68, 68, 0.3); }
.balance-banner-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
  margin-bottom: 2px;
}
.budget-balance-banner.surplus .balance-banner-label { color: var(--green); }
.budget-balance-banner.deficit .balance-banner-label { color: var(--danger); }
.balance-banner-value { font-size: 28px; font-weight: 900; }
.budget-balance-banner.surplus .balance-banner-value { color: var(--green); }
.budget-balance-banner.deficit .balance-banner-value { color: var(--danger); }
.balance-banner-detail { font-size: 12px; color: var(--text-dim); margin-top: 2px; }

.budget-section { padding: 0 16px; margin-bottom: 20px; }
.budget-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.budget-section-title { color: var(--gold); font-size: 15px; }
.budget-section-total { font-size: 14px; font-weight: 700; }
.revenue-total { color: var(--green); }
.spending-total { color: var(--orange); }
.revenue-fill { background: linear-gradient(90deg, rgba(34, 197, 94, 0.6), rgba(34, 197, 94, 0.9)); }

.debt-tracker {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 12px;
}
.debt-tracker-bar {
  height: 12px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}
.debt-tracker-fill { height: 100%; border-radius: 6px; transition: width 0.5s; }
.debt-tracker-limit-line {
  position: absolute;
  right: 0;
  top: -2px;
  width: 2px;
  height: 16px;
  background: var(--text-muted);
}
.debt-tracker-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 6px;
}
.debt-tracker-pct { font-weight: 700; }
.debt-crisis-warning {
  margin-top: 10px;
  padding: 8px 12px;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  color: var(--danger);
  display: flex;
  align-items: center;
  gap: 6px;
  animation: pulse 1.5s infinite;
}
.debt-high-warning {
  margin-top: 10px;
  padding: 8px 12px;
  background: rgba(249, 115, 22, 0.1);
  border: 1px solid rgba(249, 115, 22, 0.3);
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  color: var(--orange);
  display: flex;
  align-items: center;
  gap: 6px;
}
.warning-icon { font-size: 14px; flex-shrink: 0; }

.qol-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.qol-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 12px;
  text-align: center;
  border: 1px solid var(--glass-border);
}
.qol-icon { font-size: 28px; margin-bottom: 4px; }
.qol-label { font-size: 11px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 2px; }
.qol-value { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.qol-bar-track { height: 6px; background: rgba(255, 255, 255, 0.1); border-radius: 3px; overflow: hidden; margin-bottom: 4px; }
.qol-bar-fill { height: 100%; border-radius: 3px; transition: width 0.3s; }
.qol-score { font-size: 10px; color: var(--text-muted); }

.sector-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-top: 10px; }
.sector-chip {
  background: var(--card-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 8px 6px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.sector-status { font-size: 9px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }


/* ====================================================================
   DASHBOARD — Phase 2 vertical layout panels
   ==================================================================== */
.dashboard-grid-v2 {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
}
.dash-population .pop-main {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 6px;
}
.dash-population .pop-total { font-size: 32px; font-weight: 900; color: var(--text); }
.dash-population .pop-growth-arrow { font-size: 16px; font-weight: 700; }
.dash-population .pop-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-dim);
}
.dash-population .pop-migration { font-weight: 600; }
.dash-population .pop-urban { color: var(--text-muted); }

/* Cabinet Commitments */
.dash-commitments .commitment-list { display: flex; flex-direction: column; gap: 6px; }
.commitment-row {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 8px; background: rgba(255,255,255,0.03); border-radius: 6px;
}
.commitment-status { font-size: 14px; flex-shrink: 0; }
.commitment-info { flex: 1; min-width: 0; }
.commitment-who { font-size: 11px; font-weight: 700; color: var(--gold); display: block; }
.commitment-what { font-size: 11px; color: var(--text-dim); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.commitment-turn { font-size: 10px; color: var(--text-muted); flex-shrink: 0; }

/* Delegate Pledges */
.dash-delegates .delegate-summary {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 8px; padding: 6px 10px; background: rgba(212,175,55,0.1);
  border-radius: 6px; border: 1px solid rgba(212,175,55,0.2);
}
.delegate-total { font-size: 16px; font-weight: 800; color: var(--gold); }
.delegate-hint { font-size: 11px; color: var(--text-dim); }
.delegate-list { display: flex; flex-direction: column; gap: 4px; }
.delegate-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 4px 8px; font-size: 12px;
}
.delegate-name { color: var(--text); }
.delegate-count { color: #22C55E; font-weight: 700; }

.dash-approval-overview .approval-big { text-align: center; margin-bottom: 10px; }
.dash-approval-overview .approval-number { font-size: 40px; font-weight: 900; display: block; }
.dash-approval-overview .approval-label { font-size: 13px; color: var(--text-dim); }
.dash-approval-overview .approval-history {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 32px;
  margin-bottom: 12px;
}
.demo-bars-compact { display: flex; flex-direction: column; gap: 5px; }
.demo-row-compact { display: flex; align-items: center; gap: 5px; }
.demo-emoji-sm { font-size: 14px; width: 20px; text-align: center; flex-shrink: 0; }
.demo-name-sm { font-size: 10px; width: 85px; color: var(--text-dim); flex-shrink: 0; }
.demo-bar-track-sm { flex: 1; height: 5px; background: rgba(255, 255, 255, 0.08); border-radius: 3px; overflow: hidden; }
.demo-bar-fill-sm { height: 100%; border-radius: 3px; transition: width 0.3s; }
.demo-val-sm { font-size: 11px; width: 28px; text-align: right; font-weight: 600; flex-shrink: 0; }

.dash-sectors .sector-bars { display: flex; flex-direction: column; gap: 6px; }
.sector-row { display: flex; align-items: center; gap: 6px; }
.sector-row .sector-emoji { font-size: 16px; width: 22px; text-align: center; flex-shrink: 0; }
.sector-row .sector-name { font-size: 11px; width: 90px; color: var(--text-dim); flex-shrink: 0; }
.sector-bar-track { flex: 1; height: 6px; background: rgba(255, 255, 255, 0.08); border-radius: 3px; overflow: hidden; }
.sector-bar-fill { height: 100%; border-radius: 3px; transition: width 0.3s; }
.sector-row .sector-growth { font-size: 11px; width: 40px; text-align: right; font-weight: 700; flex-shrink: 0; }

.dash-infra .infra-bars { display: flex; flex-direction: column; gap: 6px; }
.infra-row { display: flex; align-items: center; gap: 6px; }
.infra-row .infra-emoji { font-size: 16px; width: 22px; text-align: center; flex-shrink: 0; }
.infra-row .infra-name { font-size: 11px; width: 90px; color: var(--text-dim); flex-shrink: 0; }
.infra-bar-track { flex: 1; height: 6px; background: rgba(255, 255, 255, 0.08); border-radius: 3px; overflow: hidden; }
.infra-bar-fill { height: 100%; border-radius: 3px; transition: width 0.3s; }
.infra-row .infra-val { font-size: 11px; width: 32px; text-align: right; font-weight: 700; flex-shrink: 0; }
.infra-avg { margin-top: 8px; font-size: 12px; color: var(--text-dim); text-align: right; }

.econ-quick-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.eq-stat { text-align: center; }
.eq-label { font-size: 10px; color: var(--text-dim); display: block; text-transform: uppercase; letter-spacing: 0.5px; }
.eq-value { font-size: 16px; font-weight: 700; display: block; margin-top: 2px; }
.eq-value.positive { color: var(--green); }
.eq-value.negative { color: var(--danger); }

.dash-opposition .opp-meter { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.opp-bar-track { flex: 1; height: 8px; background: rgba(255, 255, 255, 0.08); border-radius: 4px; overflow: hidden; }
.opp-bar-fill { height: 100%; border-radius: 4px; transition: width 0.3s; }
.opp-value { font-size: 18px; font-weight: 900; flex-shrink: 0; }
.opp-candidate { display: flex; align-items: center; gap: 6px; font-size: 12px; margin-bottom: 4px; }
.opp-candidate-label { color: var(--text-dim); }
.opp-candidate-name { color: var(--text); font-weight: 600; }
.opp-no-challenger { color: var(--text-muted); font-style: italic; }
.opp-threat-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); }
.dash-relationships .rel-list { gap: 5px; }


/* ====================================================================
   EVENT SCREEN — Phase 2 extras
   ==================================================================== */
.eo-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2px;
}
.eo-label {
  font-weight: 700;
  font-size: 13px;
}
.eo-cost {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 600;
  color: var(--orange);
}
.eo-description {
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.3;
  margin: 0 0 4px;
}
.eo-effects { display: flex; flex-wrap: wrap; gap: 4px; }
.eo-effect-chip {
  font-size: 9px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 8px;
  border: 1px solid;
  white-space: nowrap;
}
.eo-disabled-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--danger);
  margin-top: 4px;
}
.event-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  gap: 10px;
  padding: 20px;
  text-align: center;
}
.event-empty-icon { font-size: 56px; opacity: 0.4; }
.event-empty-text { font-size: 15px; color: var(--text-dim); line-height: 1.5; max-width: 300px; }


/* ====================================================================
   STATE SELECT — Difficulty badges
   ==================================================================== */
.state-difficulty-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.diff-easy { background: rgba(34, 197, 94, 0.15); color: var(--green); border: 1px solid rgba(34, 197, 94, 0.3); }
.diff-medium { background: rgba(59, 130, 246, 0.15); color: var(--blue-light); border: 1px solid rgba(59, 130, 246, 0.3); }
.diff-hard { background: rgba(249, 115, 22, 0.15); color: var(--orange); border: 1px solid rgba(249, 115, 22, 0.3); }
.diff-extreme { background: rgba(239, 68, 68, 0.15); color: var(--danger); border: 1px solid rgba(239, 68, 68, 0.3); animation: pulseBadge 1.5s infinite; }
.state-card-lean { font-size: 10px; color: var(--text-muted); }
.state-card-map {
  width: 56px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.state-card-map svg {
  width: 100%;
  height: 100%;
  fill: var(--primary-light);
  opacity: 0.7;
  filter: drop-shadow(0 0 4px rgba(37, 99, 235, 0.3));
}
.state-card-name { font-size: 14px; font-weight: 700; color: var(--text); }
.state-card-pop { font-size: 11px; color: var(--text-dim); }
.state-select-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px 16px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(transparent, var(--bg) 30%);
  display: flex;
  gap: 12px;
}
.state-select-bottom .btn-glass { flex: 1; }
.state-filter-bar {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  overflow-x: auto;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.state-filter-bar::-webkit-scrollbar { display: none; }
.state-filter-btn {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  color: var(--text-dim);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  font-family: inherit;
}
.state-filter-btn:hover { color: var(--text); border-color: var(--gold); }
.state-filter-btn.active {
  background: rgba(212, 175, 55, 0.15);
  color: var(--gold);
  border-color: var(--gold);
}


/* ====================================================================
   PRESS CONFERENCE SCREEN
   ==================================================================== */
.press-conference-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.press-conf-header {
  padding: 16px;
  margin-top: 38px;
  text-align: center;
  border-bottom: 1px solid var(--glass-border);
}

.press-conf-header h2 {
  font-size: 20px;
  margin-bottom: 4px;
}

.press-conf-subtitle {
  font-size: 12px;
  color: var(--text-dim);
}

.press-conf-topics {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  overflow-y: auto;
  min-height: 0;
}

.topic-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--card-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
}

.topic-card:hover {
  border-color: var(--gold);
  background: rgba(26, 58, 138, 0.3);
  box-shadow: var(--btn-glow);
}

.topic-card:active { transform: scale(0.98); }

.topic-icon { font-size: 28px; }

.topic-info { flex: 1; }

.topic-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.topic-desc {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 2px;
}

.topic-cost {
  font-size: 11px;
  font-weight: 700;
  color: var(--gold);
  padding: 3px 8px;
  border-radius: 8px;
  background: rgba(212, 175, 55, 0.1);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 3px;
}

.topic-card.action-disabled {
  opacity: 0.35;
  pointer-events: none;
}

.press-conf-briefing {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 20px 16px;
  gap: 16px;
  overflow-y: auto;
  min-height: 0;
}

.briefing-room {
  background: var(--card-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
}

.briefing-icon { font-size: 48px; margin-bottom: 12px; }

.briefing-outcome {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
}

.briefing-outcome.positive { color: var(--green); }
.briefing-outcome.negative { color: var(--red); }
.briefing-outcome.neutral { color: var(--blue-light); }

.briefing-detail {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.5;
}

.briefing-effects {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin-top: 12px;
}

.briefing-effect-chip {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 12px;
  border: 1px solid;
}

.press-conf-bottom {
  padding: 12px 16px;
  border-top: 1px solid var(--glass-border);
}


/* ====================================================================
   TOWN HALL SCREEN
   ==================================================================== */
.town-hall-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.town-hall-header {
  padding: 16px;
  margin-top: 38px;
  text-align: center;
  border-bottom: 1px solid var(--glass-border);
}

.town-hall-header h2 {
  font-size: 20px;
  margin-bottom: 4px;
}

.town-hall-subtitle {
  font-size: 12px;
  color: var(--text-dim);
}

.demographic-grid {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 12px 16px;
  overflow-y: auto;
  align-content: start;
  min-height: 0;
}

.demographic-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 8px;
  background: var(--card-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
  font-family: inherit;
}

.demographic-card:hover {
  border-color: var(--gold);
  background: rgba(26, 58, 138, 0.3);
}

.demographic-card:active { transform: scale(0.98); }

.demo-icon { font-size: 24px; }
.demo-name { font-size: 13px; font-weight: 700; color: var(--text); }
.demo-desc { font-size: 10px; color: var(--text-dim); }

.town-hall-result {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  gap: 16px;
  text-align: center;
}

.town-hall-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.4), rgba(51, 65, 85, 0.35));
  border: 2px solid rgba(212, 175, 55, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(203, 213, 225, 0.7);
  margin-bottom: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.town-hall-dialogue {
  background: var(--card-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 16px 20px;
  max-width: 320px;
  font-size: 14px;
  color: var(--text);
  line-height: 1.5;
  font-style: italic;
  position: relative;
}

.town-hall-dialogue::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid var(--glass-border);
}

.town-hall-bottom {
  padding: 12px 16px;
  border-top: 1px solid var(--glass-border);
}


/* ====================================================================
   LEGISLATIVE SCREEN
   ==================================================================== */
.legislative-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.legislative-header {
  padding: 16px;
  margin-top: 38px;
  text-align: center;
  border-bottom: 1px solid var(--glass-border);
}

.legislative-header h2 {
  font-size: 20px;
  margin-bottom: 4px;
}

.legislative-subtitle {
  font-size: 12px;
  color: var(--text-dim);
}

.active-bills-section {
  padding: 12px 16px 0;
}

.active-bills-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.active-bill-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: var(--radius-sm);
  margin-bottom: 6px;
}

.bill-name { font-size: 13px; font-weight: 600; color: var(--text); }
.bill-progress {
  font-size: 11px;
  font-weight: 600;
  color: var(--blue-light);
}

.bill-templates {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 16px;
  overflow-y: auto;
  min-height: 0;
}

.bill-template-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px;
  background: var(--card-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
}

.bill-template-card:hover {
  border-color: var(--gold);
  background: rgba(26, 58, 138, 0.3);
}

.bill-template-card:active { transform: scale(0.98); }

.bill-template-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.bill-template-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.bill-template-cost {
  font-size: 11px;
  font-weight: 700;
  color: var(--gold);
  padding: 2px 8px;
  border-radius: 8px;
  background: rgba(212, 175, 55, 0.1);
  display: flex;
  align-items: center;
  gap: 3px;
}

.bill-template-turns {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-dim);
  padding: 2px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
}

.bill-template-card.action-disabled {
  opacity: 0.35;
  pointer-events: none;
}

.bill-template-desc {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.4;
}

.bill-template-effects {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.bill-effect-chip {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  border: 1px solid;
}

.legislative-bottom {
  padding: 12px 16px;
  border-top: 1px solid var(--glass-border);
}


/* ====================================================================
   CAMPAIGN SCREEN
   ==================================================================== */
.campaign-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.campaign-header {
  padding: 16px;
  margin-top: 38px;
  text-align: center;
  border-bottom: 1px solid var(--glass-border);
}

.campaign-header h2 {
  font-size: 22px;
  margin-bottom: 4px;
}

.campaign-banner {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--gold);
  background: rgba(212, 175, 55, 0.08);
  padding: 4px 12px;
  border-radius: 8px;
  display: inline-block;
  margin-bottom: 8px;
  animation: pulse 2s infinite;
}

.campaign-poll-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  margin: 0 16px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
}

.poll-label {
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.poll-bar-track {
  flex: 1;
  height: 8px;
  border-radius: 4px;
  background: rgba(220, 38, 38, 0.3);
  overflow: hidden;
}

.poll-bar-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--blue), var(--blue-light));
  transition: width 0.5s ease;
}

.poll-value {
  font-size: 13px;
  font-weight: 700;
  min-width: 32px;
  text-align: right;
}

.campaign-capital {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  font-size: 15px;
  font-weight: 700;
  color: var(--gold);
}

.campaign-actions-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px 16px;
  overflow-y: auto;
  min-height: 0;
}

.campaign-action-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--card-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
}

.campaign-action-card:hover {
  border-color: var(--gold);
  background: rgba(26, 58, 138, 0.3);
}

.campaign-action-card:active { transform: scale(0.98); }

.campaign-action-card.used {
  opacity: 0.35;
  pointer-events: none;
}

.campaign-action-card.too-expensive {
  opacity: 0.4;
  pointer-events: none;
}

.ca-icon { font-size: 28px; flex-shrink: 0; }

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

.ca-name { font-size: 14px; font-weight: 700; color: var(--text); }

.ca-desc {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 2px;
  line-height: 1.3;
}

.ca-cost {
  font-size: 13px;
  font-weight: 700;
  color: var(--gold);
  white-space: nowrap;
}

.campaign-bottom {
  padding: 12px 16px;
  border-top: 1px solid var(--glass-border);
}


/* ====================================================================
   HISTORICAL EVENT CONTEXT PANEL
   ==================================================================== */
.historical-context {
  margin: 0 16px 6px;
  padding: 8px 12px;
  background: rgba(139, 119, 42, 0.08);
  border: 1px solid rgba(184, 134, 11, 0.2);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--gold);
}

.historical-context-label {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--gold);
  margin-bottom: 4px;
}

.historical-context-text {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.5;
  font-style: italic;
}

.historical-era-badge {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 2px 8px;
  border-radius: 8px;
  background: rgba(212, 175, 55, 0.1);
  color: var(--gold);
  border: 1px solid rgba(212, 175, 55, 0.2);
  margin-left: 8px;
}


/* ====================================================================
   ROLE TOGGLE (State Select)
   ==================================================================== */
.role-toggle {
  display: flex;
  gap: 6px;
  padding: 8px 16px;
  justify-content: center;
}

.role-btn {
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  position: relative;
}

.role-btn:hover:not(:disabled) {
  color: var(--text);
  border-color: var(--gold);
}

.role-btn.active {
  background: rgba(212, 175, 55, 0.15);
  color: var(--gold);
  border-color: var(--gold);
}

.role-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.coming-soon-badge {
  font-size: 8px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 1px 5px;
  border-radius: 6px;
  background: rgba(212, 175, 55, 0.15);
  color: var(--gold);
  margin-left: 4px;
  vertical-align: super;
}


/* ====================================================================
   PHASE 4 FIXES — Glass panels, scroll, policy tabs, events, budget sliders
   ==================================================================== */

/* --- Glass panel mixin class --- */
.glass-panel {
  background: linear-gradient(135deg, rgba(26,58,138,0.4), rgba(13,27,72,0.6));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(212,175,55,0.15);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.05);
}

/* Apply glass to key containers */
.office-actions .action-btn,
.cabinet-screen .npc-card,
.budget-screen .budget-section,
.policy-screen .slider-row,
.meeting-screen .dialogue-topic-btn,
.meeting-screen .bribe-btn,
.news-card,
.event-screen .event-card-main,
.town-hall-screen .demographic-card,
.meeting-action-card {
  background: linear-gradient(135deg, rgba(26,58,138,0.35), rgba(13,27,72,0.5));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(212,175,55,0.12);
  box-shadow: 0 4px 16px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.04);
}

/* --- Scroll fixes for all screens --- */
.policy-screen,
.cabinet-screen,
.town-hall-screen,
.meeting-screen {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  min-height: 0;
}

.cabinet-screen .npc-grid,
.meeting-screen .meeting-tab-content {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1;
  min-height: 0;
}

/* --- Policy panel show/hide (tab switching) --- */
.policy-panel {
  display: none;
}
.policy-panel.active {
  display: block;
}

/* --- Policy header layout --- */
.policy-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.policy-header .capital-display {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--gold);
  font-weight: 700;
  font-size: 14px;
  margin-left: auto;
}

.policy-header-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

/* --- Event option cards with risk coloring --- */
.event-option-card {
  min-height: 0;
  font-size: 13px;
  padding: 10px 12px;
  border-radius: 10px;
  margin-bottom: 6px;
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid rgba(212,175,55,0.15);
  background: linear-gradient(135deg, rgba(26,58,138,0.35), rgba(13,27,72,0.5));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.event-option-card:hover:not(.disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0,0,0,0.4);
}
.event-option-card.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.event-option-safe {
  border-left: 4px solid #22C55E;
  background: linear-gradient(135deg, rgba(34,197,94,0.08), rgba(13,27,72,0.5));
}
.event-option-moderate {
  border-left: 4px solid #F59E0B;
  background: linear-gradient(135deg, rgba(245,158,11,0.08), rgba(13,27,72,0.5));
}
.event-option-risky {
  border-left: 4px solid #EF4444;
  background: linear-gradient(135deg, rgba(239,68,68,0.08), rgba(13,27,72,0.5));
}

/* --- Budget interactive sliders --- */
.budget-slider-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.budget-slider-row .bar-label {
  font-size: 13px;
  color: var(--text);
}
.budget-slider-row input[type="range"] {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  background: linear-gradient(90deg, rgba(26,58,138,0.6), rgba(13,27,72,0.8));
  border-radius: 3px;
  outline: none;
}
.budget-slider-row input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--gold);
  cursor: pointer;
  border: 2px solid rgba(0,0,0,0.3);
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}
.budget-slider-row .bar-value {
  min-width: 40px;
  text-align: right;
  font-size: 13px;
  font-weight: 600;
  color: var(--gold);
}
.budget-remaining {
  text-align: center;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  margin: 8px 0;
}
.budget-remaining.balanced {
  background: rgba(34,197,94,0.1);
  color: var(--green);
  border: 1px solid rgba(34,197,94,0.3);
}
.budget-remaining.over {
  background: rgba(239,68,68,0.1);
  color: var(--danger);
  border: 1px solid rgba(239,68,68,0.3);
}

/* --- Office pending events panel --- */
.office-events-panel {
  max-height: 200px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  margin: 8px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  animation: eventPulse 2s ease-in-out infinite;
}
@keyframes eventPulse {
  0%, 100% { box-shadow: 0 0 0 rgba(239, 68, 68, 0); }
  50% { box-shadow: 0 0 12px rgba(239, 68, 68, 0.3); }
}
.office-events-panel-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}
.office-event-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(26,58,138,0.35), rgba(13,27,72,0.5));
  border: 1px solid rgba(212,175,55,0.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.office-event-card .event-title {
  flex: 1;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.event-turns-badge {
  background: rgba(212,175,55,0.15);
  color: var(--gold);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 12px;
  white-space: nowrap;
  border: 1px solid rgba(212,175,55,0.3);
}
.event-turns-badge.urgent {
  background: rgba(239,68,68,0.15);
  color: var(--danger);
  border-color: rgba(239,68,68,0.3);
}
.office-event-respond-btn {
  background: rgba(212,175,55,0.15);
  border: 1px solid rgba(212,175,55,0.3);
  color: var(--gold);
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.office-event-respond-btn:hover {
  background: rgba(212,175,55,0.3);
}
.office-event-actions {
  display: flex; align-items: center; gap: 4px;
}
.office-event-dismiss-btn {
  background: none; border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-dim); font-size: 14px; width: 24px; height: 24px;
  border-radius: 6px; cursor: pointer; display: flex;
  align-items: center; justify-content: center; line-height: 1;
  transition: all 0.2s;
}
.office-event-dismiss-btn:hover {
  color: var(--danger, #EF4444); border-color: var(--danger, #EF4444);
  background: rgba(239,68,68,0.1);
}

/* Notification bars with dismiss */
.notif-bar {
  display: flex; align-items: center; gap: 6px;
  padding: 4px 0; justify-content: center;
}
.notif-bar > button:first-child { flex: 1; max-width: 400px; }
.notif-dismiss-btn {
  background: none; border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-dim); font-size: 14px; width: 28px; height: 28px;
  border-radius: 6px; cursor: pointer; display: flex;
  align-items: center; justify-content: center; line-height: 1;
  flex-shrink: 0; transition: all 0.2s;
}
.notif-dismiss-btn:hover {
  color: var(--danger, #EF4444); border-color: var(--danger, #EF4444);
  background: rgba(239,68,68,0.1);
}

/* Header events bell button */
.hud-events-btn {
  position: relative; background: none; border: 1px solid rgba(255,255,255,0.15);
  color: var(--gold); width: 36px; height: 36px; border-radius: 10px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  margin-left: auto; flex-shrink: 0; transition: all 0.2s;
}
.hud-events-btn:hover { background: rgba(212,175,55,0.1); border-color: var(--gold); }
.hud-events-badge {
  position: absolute; top: -4px; right: -4px;
  background: var(--danger, #EF4444); color: #fff;
  font-size: 10px; font-weight: 700; min-width: 16px; height: 16px;
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
  padding: 0 3px;
}

/* --- News screen Shortee style upgrades --- */
.news-screen {
  overflow: hidden;
  position: relative;
}
.news-screen .btn-proceed {
  /* Styling now inline in NewsScreen.js for flex layout with menu button */
}
.news-broadcast-header {
  text-align: center;
  padding: 6px 12px 2px;
  margin-top: 38px; /* Flush below floating HUD (8px top + 38px button height) */
}
.news-screen .news-title {
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 800;
  font-size: 22px;
  margin: 4px 0;
}
.news-screen .news-card {
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(26,58,138,0.4), rgba(13,27,72,0.6));
  border: 1px solid rgba(212,175,55,0.12);
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}
.news-card-category {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(212,175,55,0.1);
}

/* --- Anchor row: anchor portrait + player thumbnail --- */
.news-anchor-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 6px 12px;
  background: linear-gradient(135deg, rgba(26,58,138,0.5), rgba(13,27,72,0.7));
  border-radius: 12px;
  margin: 4px 12px 6px;
  border: 1px solid rgba(212,175,55,0.15);
}
.news-anchor-portrait {
  position: relative;
  width: 64px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.anchor-img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--gold);
  filter: drop-shadow(0 0 8px rgba(212,175,55,0.3));
}
.anchor-glow {
  position: absolute;
  top: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212,175,55,0.25) 0%, transparent 70%);
  animation: pulse 2s ease-in-out infinite;
  pointer-events: none;
}
.anchor-live-dot {
  animation: pulse 1s ease-in-out infinite;
}
.news-anchor-portrait .sound-wave {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 18px;
}

/* --- Player thumbnail circle --- */
.news-player-portrait {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
}
.player-thumbnail {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 2px solid;
  background: linear-gradient(135deg, rgba(26,58,138,0.8), rgba(13,27,72,0.9));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 12px rgba(212,175,55,0.2);
}
.player-initial {
  font-size: 22px;
  font-weight: 800;
  color: var(--gold);
  line-height: 1;
}
.player-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}
.player-name-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.player-role-line {
  font-size: 10px;
  font-weight: 700;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.player-name-line {
  font-size: 11px;
  font-weight: 700;
  color: var(--text);
  word-break: break-word;
}
.player-role-label {
  font-size: 9px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* --- Last turn actions list --- */
.news-last-actions {
  margin: 4px 12px 8px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(26,58,138,0.3), rgba(13,27,72,0.45));
  border: 1px solid rgba(212,175,55,0.1);
  overflow: hidden;
}
.last-actions-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-bottom: 1px solid rgba(212,175,55,0.1);
  background: rgba(212,175,55,0.06);
}
.last-actions-icon {
  font-size: 12px;
}
.last-actions-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.last-actions-list {
  max-height: 100px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 4px 0;
}
.last-action-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  transition: background 0.15s;
}
.last-action-item:last-child {
  border-bottom: none;
}
.last-action-item:hover {
  background: rgba(212,175,55,0.05);
}
.last-action-icon {
  font-size: 13px;
  flex-shrink: 0;
  width: 20px;
  text-align: center;
}
.last-action-text {
  font-size: 13px;
  color: var(--text);
  line-height: 1.3;
}

/* --- News tab bar + polling panel --- */
.news-tab-bar {
  display: flex;
  gap: 0;
  margin: 0 12px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(212,175,55,0.15);
  background: rgba(13,27,72,0.5);
}
.news-tab {
  flex: 1;
  padding: 8px 0;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-dim);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}
.news-tab.active {
  color: var(--gold);
  background: rgba(212,175,55,0.12);
}
.news-tab-content { width: 100%; flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.news-tab-panel { display: none; }
.news-tab-panel.active { display: block; }

/* Polling panel */
.polls-empty {
  text-align: center;
  padding: 16px;
  color: var(--text-dim);
  font-size: 13px;
}
.polls-overview {
  margin: 8px 12px;
  padding: 12px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(26,58,138,0.3), rgba(13,27,72,0.45));
  border: 1px solid rgba(212,175,55,0.1);
}
.polls-overall {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.polls-overall-label { font-size: 12px; color: var(--text-dim); font-weight: 600; }
.polls-overall-value { font-size: 20px; font-weight: 800; }
.polls-trend { font-size: 11px; font-weight: 600; margin-left: auto; }

.polls-history-chart { margin-top: 8px; }
.polls-history-bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 40px;
}
.polls-history-bar-wrap {
  flex: 1;
  height: 100%;
  display: flex;
  align-items: flex-end;
}
.polls-history-bar {
  width: 100%;
  border-radius: 2px 2px 0 0;
  min-height: 2px;
  transition: height 0.3s ease;
}
.polls-history-label {
  text-align: center;
  font-size: 9px;
  color: var(--text-dim);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.polls-insights {
  display: flex;
  gap: 6px;
  margin: 8px 12px 4px;
}
.polls-insight-chip {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 8px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 600;
  border: 1px solid;
}
.polls-strong {
  color: #22C55E;
  border-color: rgba(34,197,94,0.25);
  background: rgba(34,197,94,0.08);
}
.polls-weak {
  color: #EF4444;
  border-color: rgba(239,68,68,0.25);
  background: rgba(239,68,68,0.08);
}
.polls-insight-emoji { font-size: 14px; }
.polls-insight-text { line-height: 1.2; }

.polls-demographics {
  margin: 8px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.polls-demo-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border-radius: 6px;
  background: rgba(26,58,138,0.2);
  border: 1px solid rgba(255,255,255,0.03);
}
.polls-demo-emoji { font-size: 14px; flex-shrink: 0; width: 18px; text-align: center; }
.polls-demo-name { font-size: 11px; color: var(--text); font-weight: 600; width: 80px; flex-shrink: 0; }
.polls-demo-bar-track {
  flex: 1;
  height: 5px;
  background: rgba(255,255,255,0.08);
  border-radius: 3px;
  overflow: hidden;
}
.polls-demo-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s ease;
}
.polls-demo-val { font-size: 11px; font-weight: 700; width: 32px; text-align: right; flex-shrink: 0; }

/* --- Town hall response choices --- */
.town-hall-choices {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 20px;
}
.town-hall-choice {
  padding: 14px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid rgba(212,175,55,0.15);
  background: linear-gradient(135deg, rgba(26,58,138,0.35), rgba(13,27,72,0.5));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.town-hall-choice:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0,0,0,0.4);
}
.town-hall-choice.supportive {
  border-left: 4px solid #22C55E;
  background: linear-gradient(135deg, rgba(34,197,94,0.12), rgba(13,27,72,0.6));
}
.town-hall-choice.supportive .town-hall-choice-title { color: #4ADE80; }
.town-hall-choice.pragmatic {
  border-left: 4px solid #F59E0B;
  background: linear-gradient(135deg, rgba(245,158,11,0.12), rgba(13,27,72,0.6));
}
.town-hall-choice.pragmatic .town-hall-choice-title { color: #FBBF24; }
.town-hall-choice.deflective {
  border-left: 4px solid #EF4444;
  background: linear-gradient(135deg, rgba(239,68,68,0.12), rgba(13,27,72,0.6));
}
.town-hall-choice.deflective .town-hall-choice-title { color: #F87171; }

.town-hall-choice.event-comment {
  border-left: 4px solid #A855F7;
  background: linear-gradient(135deg, rgba(168,85,247,0.15), rgba(13,27,72,0.6));
}
.town-hall-choice.event-comment .town-hall-choice-title { color: #C084FC; }
.town-hall-choice-title {
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 4px;
  color: var(--text);
}
.town-hall-choice-desc {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.4;
}
.town-hall-choice-effects {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

/* --- Cabinet action buttons --- */
.cabinet-action-row {
  display: flex;
  gap: 3px;
  margin-top: auto;
  padding-top: 2px;
}
.cabinet-action-btn {
  flex: 1;
  padding: 8px 1px;
  min-height: 38px;
  border-radius: 5px;
  font-size: 9px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid rgba(212,175,55,0.2);
  background: rgba(26,58,138,0.3);
  color: var(--text);
  transition: all 0.2s;
  text-align: center;
}
.cabinet-action-btn:hover:not(:disabled) {
  background: rgba(212,175,55,0.15);
  border-color: var(--gold);
}
.cabinet-action-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.cabinet-action-btn.met {
  opacity: 0.35;
  background: rgba(100,100,100,0.2);
  border-color: rgba(100,100,100,0.2);
  color: rgba(255,255,255,0.4);
}
.cabinet-action-btn .mi {
  padding: 1px;
  font-size: 12px;
  border: none;
  background: none;
}

/* One-use action buttons in meetings — greyed out after use */
.action-used,
.action-used:hover {
  opacity: 0.35 !important;
  background: rgba(100,100,100,0.15) !important;
  border-color: rgba(100,100,100,0.2) !important;
  color: rgba(255,255,255,0.4) !important;
  cursor: not-allowed !important;
  pointer-events: none;
}

/* --- Meeting ripple effects panel --- */
.ripple-effects-panel {
  margin-top: 12px;
  padding: 10px;
  border-radius: 10px;
  background: rgba(26,58,138,0.2);
  border: 1px solid rgba(212,175,55,0.1);
}
.ripple-effects-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}
.ripple-effect-item {
  font-size: 12px;
  color: var(--text-dim);
  padding: 2px 0;
}

/* --- Task selection modal for cabinet --- */
.task-selection-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}
.task-selection-modal {
  width: 90%;
  max-width: 360px;
  max-height: 80vh;
  overflow-y: auto;
  background: linear-gradient(135deg, rgba(15,15,28,0.97), rgba(6,10,22,0.99));
  border: 1px solid rgba(212,175,55,0.2);
  border-radius: 16px;
  padding: 20px;
}
.task-selection-modal h3 {
  color: var(--gold);
  font-size: 16px;
  margin-bottom: 12px;
}
.task-option {
  padding: 12px;
  border-radius: 10px;
  margin-bottom: 8px;
  cursor: pointer;
  border: 1px solid rgba(212,175,55,0.12);
  background: linear-gradient(135deg, rgba(26,58,138,0.35), rgba(13,27,72,0.5));
  transition: all 0.2s;
}
.task-option:hover {
  border-color: var(--gold);
  background: rgba(212,175,55,0.1);
}
.task-option-name {
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 4px;
}
.task-option-desc {
  font-size: 12px;
  color: var(--text-dim);
}
.task-option-cost {
  font-size: 11px;
  color: var(--gold);
  margin-top: 4px;
}

/* --- Fundraiser overlay --- */
.fundraiser-toggle-row {
  display: flex;
  gap: 6px;
}
.fundraiser-toggle {
  flex: 1;
  padding: 8px 4px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  background: rgba(255,255,255,0.05);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.fundraiser-toggle:hover:not(.disabled) {
  background: rgba(255,255,255,0.1);
}
.fundraiser-toggle.active {
  background: rgba(212,175,55,0.2);
  border-color: var(--gold);
  color: var(--gold);
}
.fundraiser-toggle.disabled {
  opacity: 0.3;
  cursor: not-allowed;
}
.fundraiser-summary {
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 10px 12px;
}
.fundraiser-summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  padding: 3px 0;
  color: var(--text-dim);
}
.fundraiser-summary-row span:last-child {
  font-weight: 600;
}

/* ====== MULTIPLAYER ====== */

/* Title Screen — Multiplayer button */
.title-mp-btn {
  border: 1px solid rgba(212, 175, 55, 0.4) !important;
}

/* Waiting for Opponent Screen */
.waiting-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 16px;
  text-align: center;
}
.waiting-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  max-width: 340px;
}
.waiting-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid rgba(212, 175, 55, 0.2);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.waiting-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin: 8px 0 0;
}
.waiting-subtitle {
  font-size: 14px;
  color: var(--text-dim);
  margin: 0 0 16px;
}

/* Opponent Info Bar (used in Waiting + Office) */
.mp-opponent-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(220, 38, 38, 0.1);
  border: 1px solid rgba(220, 38, 38, 0.25);
  border-radius: var(--radius);
  padding: 10px 14px;
  width: 100%;
  max-width: 340px;
}
.mp-office-bar {
  max-width: 100%;
  margin-bottom: 8px;
  border-radius: var(--radius-sm);
}
.mp-vs-badge {
  font-size: 12px;
  font-weight: 900;
  color: var(--gold);
  background: rgba(212, 175, 55, 0.15);
  padding: 2px 8px;
  border-radius: 6px;
  letter-spacing: 1px;
}
.mp-opponent-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--red);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(220, 38, 38, 0.15);
  flex-shrink: 0;
}
.mp-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.mp-avatar-letter {
  font-size: 16px;
  font-weight: 700;
  color: var(--red-light);
}
.mp-opponent-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.mp-opponent-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.mp-opponent-approval {
  font-size: 12px;
  font-weight: 600;
}

/* Waiting screen — last turn actions */
.waiting-actions {
  width: 100%;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  padding: 12px;
  margin-top: 12px;
}
.waiting-actions-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.waiting-action-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  font-size: 13px;
  color: var(--text);
}
.waiting-action-icon {
  font-size: 16px;
}
.waiting-action-text {
  flex: 1;
}

/* ====== ELECTORAL COLLEGE — PRESIDENTIAL ELECTION ====== */

.ec-presidential {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 16px 8px 12px;
}

/* Header */
.ec-header {
  text-align: center;
  margin-bottom: 4px;
}
.ec-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--gold);
  text-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
}
.ec-subtitle {
  font-size: 13px;
  color: var(--text-dim);
  margin-top: 2px;
}

/* Scoreboard */
.ec-scoreboard {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 500px;
  gap: 6px;
  padding: 10px 14px;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  border-radius: var(--radius);
  border: 1px solid var(--glass-border);
}

/* Portraits row — avatars + names above the tally */
.ec-portraits {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  width: 100%;
}
.ec-portrait {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}
.ec-portrait-name {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.ec-role-line {
  font-size: 10px;
  font-weight: 700;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.ec-name-line {
  font-size: 11px;
  font-weight: 700;
  color: var(--text);
  word-break: break-word;
}
.ec-portrait-vs {
  font-size: 10px;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: 1px;
  margin: 0 4px;
}

/* Tally row — EV counts + bar */
.ec-tally-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}
.ec-ev-count {
  font-size: 28px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  transition: all 0.3s ease;
}
.ec-avatar-img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--gold);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
.ec-avatar-emoji {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  border: 2px solid var(--text-dim);
  background: var(--surface);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
.ec-avatar-fallback {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  border: 2px solid;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* EV Progress Bar */
.ec-ev-bar-wrap {
  flex: 1;
  position: relative;
  min-width: 80px;
}
.ec-ev-bar {
  width: 100%;
  height: 10px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 5px;
  overflow: hidden;
  display: flex;
}
.ec-ev-bar-player {
  height: 100%;
  border-radius: 5px 0 0 5px;
  transition: width 0.5s ease;
}
.ec-ev-bar-opponent {
  height: 100%;
  border-radius: 0 5px 5px 0;
  transition: width 0.5s ease;
  margin-left: auto;
}
.ec-270-marker {
  position: absolute;
  left: 50%;
  top: -4px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.ec-270-marker::before {
  content: '';
  width: 2px;
  height: 18px;
  background: var(--gold);
  opacity: 0.6;
}
.ec-270-label {
  font-size: 9px;
  font-weight: 700;
  color: var(--gold);
  margin-top: 1px;
}

/* Tile Map */
.ec-tile-map {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: repeat(7, 1fr);
  gap: 2px;
  width: 100%;
  max-width: 500px;
  padding: 6px 4px;
  background: rgba(15, 23, 42, 0.5);
  border-radius: var(--radius);
  border: 1px solid rgba(148, 163, 184, 0.12);
}
.ec-tile {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: default;
  transition: transform 0.3s ease;
  overflow: visible;
  min-height: 0;
  aspect-ratio: 1;
}
.ec-tile-svg {
  position: absolute;
  inset: -1px;
  width: calc(100% + 2px);
  height: calc(100% + 2px);
}
.ec-tile-path {
  transition: fill 0.4s ease, stroke 0.4s ease;
  filter: drop-shadow(0 0 1px rgba(148, 163, 184, 0.2));
}
.ec-tile-label {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
}
.ec-tile .tile-abbr {
  font-size: 8px;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9), 0 0 2px rgba(0, 0, 0, 0.6);
}
.ec-tile .tile-ev {
  font-size: 6px;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1;
  margin-top: 1px;
  font-weight: 600;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9), 0 0 2px rgba(0, 0, 0, 0.6);
}
.ec-tile-empty {
  background: transparent;
  border: none;
}
.ec-tile.ec-tile-called .tile-abbr,
.ec-tile.ec-tile-called .tile-ev {
  color: #fff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}
.ec-tile.ec-tile-called .ec-tile-path {
  filter: drop-shadow(0 0 3px currentColor);
}
.ec-tile.calling {
  animation: ec-tile-pulse 0.6s ease;
  z-index: 2;
}
@keyframes ec-tile-pulse {
  0% { transform: scale(1); filter: brightness(1); }
  50% { transform: scale(1.25); filter: brightness(1.6) drop-shadow(0 0 8px rgba(255, 255, 255, 0.6)); }
  100% { transform: scale(1); filter: brightness(1); }
}

/* States Called Counter */
.ec-states-called {
  font-size: 12px;
  color: var(--text-dim);
  text-align: center;
}
.ec-states-called span {
  font-weight: 700;
  color: var(--text);
}

/* Winner Overlay */
.ec-winner-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(6, 10, 22, 0.85);
  display: flex;
  align-items: center;
  padding-top: 50px;
  justify-content: center;
  z-index: 100;
  backdrop-filter: blur(8px);
}
.ec-winner-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  position: relative;
}
.ec-winner-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--gold);
  animation: ec-avatar-scale 0.8s ease forwards;
  box-shadow: 0 0 30px rgba(212, 175, 55, 0.4);
}
.ec-winner-avatar-fallback {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 800;
  color: var(--text);
  border: 3px solid;
  animation: ec-avatar-scale 0.8s ease forwards;
}
@keyframes ec-avatar-scale {
  0% { transform: scale(0.5); opacity: 0; }
  60% { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}
.ec-winner-title {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 3px;
  text-shadow: 0 0 30px currentColor;
  animation: ec-title-glow 2s ease infinite alternate;
}
@keyframes ec-title-glow {
  0% { text-shadow: 0 0 20px currentColor; }
  100% { text-shadow: 0 0 40px currentColor, 0 0 60px currentColor; }
}
.ec-winner-name {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}
.ec-ev-final {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 36px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.ec-ev-final-dash {
  color: var(--text-dim);
  font-size: 24px;
}
.ec-tie-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--orange);
  letter-spacing: 2px;
  margin-top: 4px;
}
.ec-dismiss-btn {
  margin-top: 20px;
  padding: 10px 28px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1px;
}

/* Confetti */
.ec-confetti {
  position: absolute;
  top: -40px;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 200px;
  pointer-events: none;
  overflow: visible;
}
.ec-confetti::before,
.ec-confetti::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
}
.ec-confetti::before {
  background-image:
    radial-gradient(circle, #D4AF37 2px, transparent 2px),
    radial-gradient(circle, #F0D060 2px, transparent 2px),
    radial-gradient(circle, #FFD700 1.5px, transparent 1.5px),
    radial-gradient(circle, #FFA500 1.5px, transparent 1.5px),
    radial-gradient(circle, #fff 1px, transparent 1px),
    radial-gradient(circle, #D4AF37 1.5px, transparent 1.5px);
  background-size: 40px 40px, 50px 50px, 35px 35px, 45px 45px, 55px 55px, 30px 30px;
  background-position: 0 0, 20px 20px, 10px 30px, 35px 10px, 5px 45px, 40px 35px;
  animation: ec-confetti-fall 3s ease-out forwards;
}
@keyframes ec-confetti-fall {
  0% { transform: translateY(-30px) scale(0.5); opacity: 1; }
  50% { opacity: 1; }
  100% { transform: translateY(120px) scale(1.2); opacity: 0; }
}

/* State Breakdown Table */
.ec-state-table-wrap {
  width: 100%;
  max-width: 500px;
  margin-top: 8px;
}
.ec-table-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--gold);
  text-align: center;
  margin-bottom: 8px;
  letter-spacing: 1px;
}
.ec-state-table {
  max-height: 240px;
  overflow-y: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
  background: var(--surface);
}
.ec-state-row {
  display: grid;
  grid-template-columns: 2.5fr 1fr 1.5fr 1.5fr 1fr;
  align-items: center;
  padding: 5px 8px;
  font-size: 11px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.ec-state-header-row {
  font-weight: 700;
  color: var(--text-dim);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: sticky;
  top: 0;
  background: var(--card-bg-solid);
  z-index: 1;
}
.ec-state-row.player-won {
  background: rgba(37, 99, 235, 0.06);
}
.ec-state-row.opponent-won {
  background: rgba(220, 38, 38, 0.06);
}
.ec-state-row.swing {
  border-left: 2px solid var(--orange);
}
.ec-state-col-name {
  font-weight: 600;
  color: var(--text);
}
.ec-state-col-ev {
  text-align: center;
  color: var(--text-dim);
  font-weight: 600;
}
.ec-state-col-pct {
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.ec-state-col-winner {
  text-align: center;
  font-weight: 700;
  color: var(--text-dim);
}
.ec-swing-icon {
  font-size: 10px;
  margin-left: 2px;
}

/* ═══════════════════════════════════════════════════════════════
   CAMPAIGN MODE — Presidential Campaign Screens
   ═══════════════════════════════════════════════════════════════ */

/* ─── Campaign Hub ───────────────────────────────────────────── */
.campaign-hub-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 20px 16px env(safe-area-inset-bottom, 14px);
  gap: 12px;
  overflow-y: auto;
}

.chub-header {
  text-align: center;
  margin-bottom: 4px;
}

.chub-phase-badge {
  display: inline-block;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.25), rgba(212, 175, 55, 0.1));
  border: 1px solid rgba(212, 175, 55, 0.4);
  border-radius: 20px;
  padding: 4px 14px;
  font-size: 11px;
  font-weight: 700;
  color: #D4AF37;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.chub-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  margin: 4px 0;
}

.chub-progress {
  font-size: 12px;
  color: var(--text-dim);
}

/* Meters */
.chub-meters {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chub-meter {
  background: var(--card-bg);
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
}

.chub-meter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.chub-meter-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.chub-meter-value {
  font-size: 13px;
  font-weight: 700;
}

.chub-meter-bar {
  height: 8px;
  background: rgba(255,255,255,0.06);
  border-radius: 4px;
  overflow: hidden;
}

.chub-meter-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.6s ease;
}

/* Stats row */
.chub-stats-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chub-stat {
  flex: 1;
  min-width: 70px;
  background: var(--card-bg);
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: var(--radius-sm);
  padding: 10px;
  text-align: center;
}

.chub-stat-value {
  display: block;
  font-size: 18px;
  font-weight: 800;
  color: var(--gold);
}

.chub-stat-label {
  display: block;
  font-size: 10px;
  color: var(--text-dim);
  margin-top: 2px;
}

/* Platform strip */
.chub-platform-strip {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 8px 12px;
  background: var(--card-bg);
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: var(--radius-sm);
}

.chub-platform-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
}

.chub-plank-tag {
  font-size: 11px;
  background: rgba(212, 175, 55, 0.15);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 12px;
  padding: 3px 10px;
  color: #D4AF37;
  font-weight: 600;
}

/* Rivals section */
.chub-rivals-section {
  margin-top: 4px;
}

.chub-section-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 8px;
}

.chub-rivals-grid {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chub-rival-card {
  flex: 1;
  min-width: 90px;
  background: var(--card-bg);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-sm);
  padding: 10px;
  text-align: center;
}

.chub-rival-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}

.chub-rival-title {
  font-size: 10px;
  color: var(--text-dim);
  margin-bottom: 6px;
}

.chub-rival-meter {
  height: 5px;
  background: rgba(255,255,255,0.06);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 4px;
}

.chub-rival-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s ease;
}

.chub-rival-momentum {
  font-size: 10px;
  color: var(--text-dim);
}

.chub-rival-delegates {
  font-size: 10px;
  color: var(--gold);
  font-weight: 600;
}

.chub-dropped {
  margin-top: 6px;
}

.chub-dropped-tag {
  display: inline-block;
  font-size: 10px;
  color: var(--text-dim);
  background: rgba(255,255,255,0.03);
  border-radius: 8px;
  padding: 3px 8px;
  text-decoration: line-through;
}

/* Next scenario card */
.chub-next-scenario {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.12), rgba(37, 99, 235, 0.08));
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: var(--radius-sm);
  padding: 14px;
}

.chub-next-icon {
  font-size: 28px;
}

.chub-next-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.chub-next-subtitle {
  font-size: 12px;
  color: var(--text-dim);
}

.chub-governance-section {
  margin-top: 8px;
}

.chub-governance-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 6px;
}

.chub-governance-grid .topic-card {
  padding: 10px 12px;
  gap: 8px;
}

.chub-governance-grid .topic-icon {
  font-size: 16px;
}

.chub-governance-grid .topic-name {
  font-size: 12px;
}

.chub-governance-grid .topic-desc {
  font-size: 10px;
}

.chub-actions {
  margin-top: auto;
  padding: 8px 0;
}

.chub-next-btn {
  width: 100%;
}

/* ─── Debate Screen ──────────────────────────────────────────── */
.debate-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 20px 16px env(safe-area-inset-bottom, 14px);
  gap: 14px;
  overflow-y: auto;
}

.debate-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.debate-round-badge {
  background: rgba(212, 175, 55, 0.2);
  border: 1px solid rgba(212, 175, 55, 0.4);
  border-radius: 16px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 700;
  color: #D4AF37;
}

.debate-score {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.debate-topic-card {
  background: var(--card-bg);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-sm);
  padding: 16px;
  text-align: center;
}

.debate-topic-label {
  font-size: 18px;
  font-weight: 800;
  color: var(--gold);
  margin: 0 0 6px;
}

.debate-topic-question {
  font-size: 14px;
  color: var(--text);
  margin: 0;
  line-height: 1.4;
}

.debate-rivals-strip {
  display: flex;
  gap: 8px;
}

.debate-rival {
  flex: 1;
  background: var(--card-bg);
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: var(--radius-sm);
  padding: 8px;
  text-align: center;
}

.debate-rival-name {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-dim);
}

.debate-rival-reaction {
  font-size: 10px;
  color: var(--text-dim);
  font-style: italic;
  margin-top: 4px;
  min-height: 28px;
}

.debate-positions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.debate-position-btn {
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  padding: 14px;
}

.debate-pos-label {
  font-weight: 700;
  font-size: 14px;
}

.debate-pos-selected {
  border-color: var(--gold) !important;
  background: rgba(212, 175, 55, 0.15) !important;
}

.debate-round-progress {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
}

.debate-round-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
}

.dot-done {
  background: #22C55E;
  border-color: #22C55E;
}

.dot-active {
  background: var(--gold);
  border-color: var(--gold);
  box-shadow: 0 0 8px rgba(212, 175, 55, 0.5);
}

/* Debate Results */
.debate-results {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 20px 0;
}

.debate-results-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--text);
}

.debate-results-grade {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  font-weight: 900;
  background: rgba(0,0,0,0.3);
}

.debate-results-score {
  font-size: 16px;
  color: var(--text-dim);
}

.debate-rounds-summary {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.debate-round-result {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 14px;
  background: var(--card-bg);
  border-radius: var(--radius-sm);
}

.debate-rr-topic {
  font-size: 13px;
  color: var(--text);
}

.debate-rr-score {
  font-size: 14px;
  font-weight: 700;
}

.debate-continue-btn {
  width: 100%;
  margin-top: 8px;
}

/* ─── Senate Race: Debate Banner ─────────────────────────────── */
.senate-debate-banner {
  text-align: center;
  padding: 8px 0;
}

.senate-debate-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--gold);
  margin: 0 0 2px;
}

.senate-debate-subtitle {
  font-size: 13px;
  color: var(--text-dim);
  margin: 0;
}

.senate-debate-feedback {
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  padding: 8px 0;
}

.senate-debate-bonus {
  font-size: 16px;
  font-weight: 700;
  text-align: center;
}

/* ─── Senate Race: Campaign Strategy Cards ───────────────────── */
.senate-campaign-stats {
  display: flex;
  justify-content: center;
  gap: 24px;
  padding: 8px 0;
}

.senate-campaign-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.senate-campaign-stat-label {
  font-size: 11px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.senate-campaign-stat-value {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
}

.senate-campaign-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.senate-campaign-card {
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  padding: 16px;
  gap: 6px;
}

.senate-campaign-card-label {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.senate-campaign-card-desc {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.4;
}

.senate-campaign-card-bonus {
  font-size: 14px;
  font-weight: 700;
}

/* ─── Senate Race: Nationwide Player Highlight ───────────────── */
@keyframes senate-player-pulse {
  0%, 100% { box-shadow: 0 0 4px 2px rgba(255, 215, 0, 0.6); }
  50% { box-shadow: 0 0 12px 6px rgba(255, 215, 0, 0.9); }
}

.senate-seat-player {
  animation: senate-player-pulse 1.5s ease-in-out infinite;
}

.senate-dot-player {
  background: #FFD700 !important;
  animation: senate-player-pulse 1.5s ease-in-out infinite;
}

.senate-player-label {
  font-size: 8px;
  font-weight: 800;
  color: #FFD700;
  text-align: center;
  letter-spacing: 0.5px;
}

.senate-state-player {
  border-color: rgba(255, 215, 0, 0.4) !important;
  background: rgba(255, 215, 0, 0.08) !important;
}

.senate-nationwide-congrats {
  text-align: center;
  padding: 8px 0;
}

/* ─── Campaign Scenario Screen ───────────────────────────────── */
.cscenario-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 24px 16px env(safe-area-inset-bottom, 14px);
  gap: 12px;
  overflow-y: auto;
}

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

.cscenario-icon {
  font-size: 36px;
  margin-bottom: 4px;
}

.cscenario-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 4px;
}

.cscenario-subtitle {
  font-size: 13px;
  color: var(--text-dim);
  margin: 0;
}

.cscenario-description {
  font-size: 13px;
  color: var(--text);
  line-height: 1.5;
  padding: 8px 4px;
  margin: 0;
}

.cscenario-choices {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cscenario-choice-btn {
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  padding: 14px 16px;
  gap: 4px;
}

.cscenario-choice-label {
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
}

.cscenario-choice-desc {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.4;
}

.cscenario-selected {
  border-color: var(--gold) !important;
  background: rgba(212, 175, 55, 0.15) !important;
}

/* Event / Crisis cards */
.cscenario-event-card,
.cscenario-crisis-card {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(220, 38, 38, 0.05));
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius-sm);
  padding: 14px;
  text-align: center;
}

.cscenario-event-headline,
.cscenario-crisis-headline {
  font-size: 15px;
  font-weight: 800;
  color: #EF4444;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.cscenario-event-context,
.cscenario-crisis-context {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.4;
}

/* Endorsement section */
.cscenario-endorsement-section {
  margin-top: 8px;
}

.cscenario-section-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 8px;
}

.cscenario-endorse-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cscenario-endorse-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--card-bg);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-sm);
}

.cscenario-endorse-card.endorsed {
  border-color: rgba(34, 197, 94, 0.3);
  background: rgba(34, 197, 94, 0.08);
}

.cscenario-endorse-card.declined {
  opacity: 0.5;
}

.cscenario-endorse-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.cscenario-endorse-status {
  font-size: 12px;
  font-weight: 700;
  color: #22C55E;
}

.cscenario-endorse-empty {
  font-size: 12px;
  color: var(--text-dim);
  font-style: italic;
  padding: 8px;
}

.cscenario-court-btn {
  font-size: 11px !important;
  padding: 6px 12px !important;
  min-height: 32px !important;
}

.cscenario-funds-note {
  font-size: 11px;
  color: var(--text-dim);
  text-align: right;
  margin-top: 4px;
}

/* Region grid */
.cscenario-region-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cscenario-region-btn {
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  padding: 12px 14px;
  gap: 2px;
}

.cscenario-region-name {
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
}

.cscenario-region-states {
  font-size: 11px;
  color: var(--text-dim);
}

.cscenario-region-demo {
  font-size: 11px;
  color: var(--gold);
}

/* Tone grid */
.cscenario-tone-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.cscenario-tone-btn {
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  padding: 12px 14px;
  gap: 2px;
}

.cscenario-tone-label {
  font-weight: 700;
  font-size: 14px;
}

.cscenario-tone-desc {
  font-size: 12px;
  color: var(--text-dim);
}

/* VP grid */
.cscenario-vp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.cscenario-vp-card {
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  padding: 12px;
  gap: 4px;
}

.cscenario-vp-card.vp-allied {
  border-color: rgba(34, 197, 94, 0.3);
}

.vp-card-name {
  font-weight: 700;
  font-size: 12px;
  color: var(--text);
}

.vp-card-cost {
  font-size: 10px;
  color: var(--text-dim);
}

.vp-card-cost.vp-cost-free {
  color: #22C55E;
}

.vp-card-pros {
  font-size: 10px;
  color: #22C55E;
  line-height: 1.3;
}

.vp-card-cons {
  font-size: 10px;
  color: #EF4444;
  line-height: 1.3;
}

/* Timed Q&A */
.cscenario-qa-progress {
  font-size: 12px;
  color: var(--text-dim);
}

.cscenario-qa-timer-bar {
  height: 6px;
  background: rgba(255,255,255,0.06);
  border-radius: 3px;
  overflow: hidden;
}

.cscenario-qa-timer-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.1s linear;
}

.cscenario-qa-timer-text {
  text-align: center;
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
}

.cscenario-qa-card {
  background: var(--card-bg);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-sm);
  padding: 16px;
  text-align: center;
}

.cscenario-qa-voter {
  font-size: 11px;
  color: var(--text-dim);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cscenario-qa-question {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  font-style: italic;
}

.cscenario-qa-answers {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cscenario-qa-btn {
  text-align: left;
  font-size: 13px;
  padding: 12px 14px;
}

.cscenario-qa-selected {
  border-color: var(--gold) !important;
  background: rgba(212, 175, 55, 0.15) !important;
}

.cscenario-qa-results {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.cscenario-qa-final-score {
  font-size: 28px;
  font-weight: 900;
  color: var(--gold);
}

.cscenario-qa-summary {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cscenario-qa-result-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 12px;
  background: var(--card-bg);
  border-radius: var(--radius-sm);
}

.cscenario-qa-result-q {
  font-size: 12px;
  color: var(--text);
  flex: 1;
  text-align: left;
}

.cscenario-qa-result-s {
  font-size: 13px;
  font-weight: 700;
  min-width: 30px;
  text-align: right;
}

/* Resource Allocation */
.cscenario-alloc-budget {
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  color: var(--gold);
  padding: 8px;
}

.cscenario-alloc-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cscenario-alloc-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: var(--card-bg);
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: var(--radius-sm);
}

.cscenario-alloc-info {
  flex: 1;
}

.cscenario-alloc-name {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.cscenario-alloc-desc {
  display: block;
  font-size: 11px;
  color: var(--text-dim);
}

.cscenario-alloc-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cscenario-alloc-minus,
.cscenario-alloc-plus {
  width: 32px !important;
  height: 32px !important;
  min-height: 32px !important;
  padding: 0 !important;
  font-size: 16px !important;
  font-weight: 700 !important;
}

.cscenario-alloc-value {
  font-size: 18px;
  font-weight: 800;
  color: var(--gold);
  min-width: 24px;
  text-align: center;
}

.cscenario-alloc-confirm {
  width: 100%;
  margin-top: 8px;
}

/* Scenario result overlay */
.cscenario-result {
  background: var(--card-bg);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: var(--radius-sm);
  padding: 20px 16px;
  margin-top: 12px;
  text-align: center;
}

.cscenario-result-narrative {
  font-size: 14px;
  color: var(--text);
  line-height: 1.5;
  margin-bottom: 12px;
}

.cscenario-result-effect {
  font-size: 13px;
  font-weight: 600;
  color: var(--gold);
  margin-bottom: 4px;
}

.cscenario-result-btn {
  width: 100%;
  margin-top: 10px;
}

.cscenario-actions {
  margin-top: auto;
  padding: 8px 0;
}

.cscenario-done-btn {
  width: 100%;
}

/* ─── Platform Builder Screen ────────────────────────────────── */
.platform-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 24px 16px env(safe-area-inset-bottom, 14px);
  gap: 12px;
  overflow-y: auto;
}

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

.platform-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 4px;
}

.platform-subtitle {
  font-size: 13px;
  color: var(--text-dim);
  margin: 0 0 6px;
}

.platform-counter {
  font-size: 14px;
  font-weight: 700;
  color: var(--gold);
}

.platform-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.platform-card {
  background: var(--card-bg);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-sm);
  padding: 12px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.platform-card:hover {
  border-color: rgba(212, 175, 55, 0.3);
}

.platform-card-selected {
  border-color: var(--gold) !important;
  background: rgba(212, 175, 55, 0.12) !important;
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.2);
}

.platform-card-disabled {
  opacity: 0.35;
  pointer-events: none;
}

.platform-card-icon {
  font-size: 24px;
}

.platform-card-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
}

.platform-card-desc {
  font-size: 10px;
  color: var(--text-dim);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.platform-card-controversy {
  font-size: 9px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Platform demographics */
.platform-demographics {
  background: var(--card-bg);
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
}

.platform-demo-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 8px;
}

.platform-demo-grid {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.platform-demo-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 55px;
}

.platform-demo-label {
  font-size: 10px;
  color: var(--text-dim);
}

.platform-demo-value {
  font-size: 14px;
  font-weight: 700;
}

/* Platform confirm */
.platform-confirm {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 20px 0;
}

.platform-confirm-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  margin: 0;
}

.platform-confirm-subtitle {
  font-size: 13px;
  color: var(--text-dim);
  margin: 0;
}

.platform-confirm-planks {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.platform-confirm-plank {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: var(--radius-sm);
}

.platform-confirm-icon {
  font-size: 24px;
}

.platform-confirm-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.platform-confirm-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.platform-lock-btn {
  width: 100%;
}

/* ─── Delegate Screen ────────────────────────────────────────── */
.delegate-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 24px 16px env(safe-area-inset-bottom, 14px);
  gap: 14px;
  overflow-y: auto;
  align-items: center;
}

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

.delegate-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 4px;
}

.delegate-subtitle {
  font-size: 13px;
  color: var(--text-dim);
}

.delegate-bar-container {
  position: relative;
  width: 100%;
  margin: 10px 0;
}

.delegate-bar {
  display: flex;
  height: 32px;
  background: rgba(255,255,255,0.06);
  border-radius: 6px;
  overflow: hidden;
}

.delegate-segment {
  height: 100%;
}

.delegate-threshold {
  position: absolute;
  top: -8px;
  bottom: -16px;
  transform: translateX(-50%);
}

.delegate-threshold-line {
  width: 2px;
  height: 100%;
  background: var(--text);
}

.delegate-threshold-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  margin-top: 2px;
}

.delegate-counts {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.delegate-count-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--card-bg);
  border-radius: var(--radius-sm);
}

.delegate-count-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.delegate-count-name {
  flex: 1;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.delegate-count-value {
  font-size: 16px;
  font-weight: 800;
  color: var(--gold);
  min-width: 40px;
  text-align: right;
}

/* Delegate results */
.delegate-won,
.delegate-contested,
.delegate-lost {
  text-align: center;
  width: 100%;
  padding: 16px;
}

.delegate-won-title {
  font-size: 24px;
  font-weight: 900;
  color: #22C55E;
  margin: 0 0 6px;
}

.delegate-contested-title {
  font-size: 22px;
  font-weight: 900;
  color: #F59E0B;
  margin: 0 0 6px;
}

.delegate-lost-title {
  font-size: 22px;
  font-weight: 900;
  color: #EF4444;
  margin: 0 0 6px;
}

.delegate-won-text,
.delegate-contested-text,
.delegate-lost-text {
  font-size: 14px;
  color: var(--text);
  margin: 0 0 14px;
}

.delegate-convention-choices {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}

.delegate-continue-btn,
.delegate-return-btn {
  width: 100%;
}

/* ─── Presidential Debate Screen ─────────────────────────────── */
.pres-debate-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 24px 16px env(safe-area-inset-bottom, 14px);
  gap: 14px;
  overflow-y: auto;
}

.pres-debate-header {
  text-align: center;
}

.pres-debate-round {
  font-size: 14px;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 6px;
}

.pres-debate-score-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  font-size: 16px;
}

.pres-debate-player-score {
  font-weight: 700;
  color: #22C55E;
}

.pres-debate-vs {
  color: var(--text-dim);
}

.pres-debate-opp-score {
  font-weight: 700;
  color: #EF4444;
}

.pres-debate-topic {
  background: var(--card-bg);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-sm);
  padding: 16px;
  text-align: center;
}

.pres-debate-topic-label {
  font-size: 18px;
  font-weight: 800;
  color: var(--gold);
  margin: 0 0 6px;
}

.pres-debate-topic-question {
  font-size: 14px;
  color: var(--text);
  margin: 0;
  line-height: 1.4;
}

.pres-debate-positions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pres-debate-pos-btn {
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  padding: 14px;
  gap: 2px;
}

.pres-debate-pos-bonus {
  border-color: rgba(34, 197, 94, 0.3);
}

.pres-debate-pos-label {
  font-weight: 700;
  font-size: 14px;
}

.pres-debate-pos-tag {
  font-size: 10px;
  color: #22C55E;
  font-weight: 600;
}

.pres-debate-dirt {
  text-align: center;
}

.pres-debate-dirt-btn {
  background: rgba(239, 68, 68, 0.15) !important;
  border-color: rgba(239, 68, 68, 0.4) !important;
  color: #EF4444 !important;
}

.pres-debate-round-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 8px;
}

.pres-debate-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  border: 2px solid rgba(255,255,255,0.2);
}

.pres-debate-dot.dot-won {
  background: #22C55E;
  border-color: #22C55E;
}

.pres-debate-dot.dot-lost {
  background: #EF4444;
  border-color: #EF4444;
}

.pres-debate-dot.dot-active {
  border-color: var(--gold);
  box-shadow: 0 0 8px rgba(212, 175, 55, 0.5);
}

/* Round result flash */
.pres-debate-round-result {
  text-align: center;
  padding: 12px;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 800;
}

.round-won {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #22C55E;
}

.round-lost {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #EF4444;
}

/* Presidential debate results */
.pres-debate-results {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.pres-debate-results-title {
  font-size: 26px;
  font-weight: 900;
  color: var(--text);
  margin: 0;
}

.pres-debate-final-score {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 36px;
  font-weight: 900;
}

.pres-debate-player-final {
  color: #22C55E;
}

.pres-debate-vs-final {
  color: var(--text-dim);
}

.pres-debate-opp-final {
  color: #EF4444;
}

.pres-debate-bonus-card {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.2), rgba(212, 175, 55, 0.05));
  border: 1px solid rgba(212, 175, 55, 0.4);
  border-radius: 12px;
  padding: 10px 20px;
}

.pres-debate-bonus-text {
  font-size: 14px;
  font-weight: 700;
  color: #D4AF37;
}

.pres-debate-round-summary {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pres-debate-round-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
}

.round-summary-won {
  background: rgba(34, 197, 94, 0.08);
  color: #22C55E;
}

.round-summary-lost {
  background: rgba(239, 68, 68, 0.08);
  color: #EF4444;
}

.pres-debate-continue-btn {
  width: 100%;
  margin-top: 8px;
}

/* Campaign card variant for promotion */
.campaign-card {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.15), rgba(212, 175, 55, 0.1)) !important;
  border-color: rgba(37, 99, 235, 0.4) !important;
}

/* ====== MIDTERM ELECTION SCREEN ====== */

.midterm-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 38px 16px 20px;
  gap: 8px;
  background: radial-gradient(ellipse at 50% 30%, rgba(26, 58, 138, 0.3) 0%, transparent 70%);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  position: relative;
  z-index: 1;
}

.midterm-title {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 3px;
  color: var(--gold);
  text-transform: uppercase;
  text-shadow: 0 2px 10px rgba(212, 175, 55, 0.3);
  text-align: center;
}

.midterm-subtitle {
  font-size: 13px;
  color: var(--text-dim);
  text-align: center;
  margin-bottom: 4px;
}

.midterm-chambers-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.midterm-section {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 10px 12px;
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
}

.midterm-section-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  margin-bottom: 6px;
}

/* House SVG container */
.midterm-house-wrap {
  width: 100%;
  aspect-ratio: 600 / 320;
  display: flex;
  justify-content: center;
}

.midterm-house-svg {
  width: 100%;
  height: auto;
}

.house-seat {
  transition: fill 0.15s ease;
  transform-box: fill-box;
  transform-origin: center;
}

.house-seat.seat-called {
  animation: seat-pulse 0.3s ease;
}

/* Senate SVG container */
.midterm-senate-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
}

.midterm-senate-svg {
  width: 100%;
  height: auto;
}

.senate-seat {
  transition: fill 0.15s ease;
  transform-box: fill-box;
  transform-origin: center;
}

.senate-seat.seat-called {
  animation: seat-pulse 0.3s ease;
}

.senate-prefilled {
  opacity: 0.6;
}

/* Tally bars */
.midterm-tally {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.midterm-tally-player,
.midterm-tally-opp {
  font-size: 18px;
  font-weight: 800;
  min-width: 36px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.midterm-tally-bar {
  flex: 1;
  height: 16px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  display: flex;
}

.midterm-tally-fill-player,
.midterm-tally-fill-opp {
  height: 100%;
  transition: width 0.15s ease;
}

.midterm-tally-marker {
  position: absolute;
  top: -4px;
  bottom: -4px;
  width: 2px;
  background: var(--gold);
  transform: translateX(-50%);
}

.midterm-marker-label {
  position: absolute;
  bottom: -16px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  color: var(--gold);
  font-weight: 700;
}

/* Skip button */
.midterm-skip-btn {
  position: absolute;
  bottom: 40px;
  right: 16px;
  z-index: 10;
  font-size: 13px;
  padding: 8px 16px;
}

/* Result inline section (replaces overlay) */
.midterm-result-inline {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 16px 20px 20px;
}

.midterm-senate-hint {
  font-size: 12px;
  color: var(--text-dim);
  opacity: 0.7;
  text-align: center;
  margin: 0;
}

.midterm-result-label {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 1.5px;
  text-align: center;
}

.midterm-result-label.sweep {
  color: #22C55E;
  text-shadow: 0 0 20px rgba(34, 197, 94, 0.4);
}

.midterm-result-label.split {
  color: var(--gold);
  text-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
}

.midterm-result-label.wipeout {
  color: #EF4444;
  text-shadow: 0 0 20px rgba(239, 68, 68, 0.4);
}

.midterm-result-desc {
  font-size: 14px;
  color: var(--text-dim);
  text-align: center;
  line-height: 1.4;
}

.midterm-chambers-final {
  display: flex;
  gap: 24px;
  width: 100%;
  justify-content: center;
}

.midterm-chamber-result {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.chamber-label {
  font-size: 12px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.chamber-score {
  font-size: 18px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.midterm-continue-btn {
  width: 100%;
  margin-top: 4px;
}

@keyframes seat-pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

/* ====== SENATE BREAKDOWN OVERLAY ====== */

.senate-breakdown-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9600;
  padding: 16px;
}

.senate-breakdown-panel {
  max-width: 400px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.senate-breakdown-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.senate-breakdown-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--gold);
  letter-spacing: 1px;
  flex: 1;
}

.senate-breakdown-score {
  font-size: 20px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.senate-breakdown-close {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 24px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

.senate-state-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
}

.senate-state-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 2px;
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
}

.senate-state-abbr {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-dim);
  letter-spacing: 0.5px;
}

.senate-dots {
  display: flex;
  gap: 3px;
}

.senate-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.senate-dot-held {
  opacity: 0.5;
}

.senate-dot-contested {
  opacity: 1;
  box-shadow: 0 0 6px currentColor;
}

.senate-breakdown-legend {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  padding-top: 4px;
}

.senate-legend-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  color: var(--text-dim);
}

/* ====== PRESIDENTIAL STATE DRILL-DOWN OVERLAY ====== */

.ec-tile.ec-tile-called {
  cursor: pointer;
}

.state-drilldown-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 16px;
  overflow: hidden;
  touch-action: none;
}

.state-drilldown-panel {
  max-width: 380px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.drilldown-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  position: relative;
}

.drilldown-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.drilldown-state-name {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
}

.drilldown-ev-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  border: 1px solid;
}

.drilldown-header-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.drilldown-win-label {
  font-size: 13px;
  font-weight: 800;
}

.drilldown-pcts {
  font-size: 12px;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}

.drilldown-close {
  position: absolute;
  top: -4px;
  right: -4px;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 24px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

.drilldown-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.drilldown-section-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.drilldown-state-map {
  width: 100%;
  max-width: 180px;
  margin: 4px auto;
}
.drilldown-state-map svg {
  width: 100%;
  height: auto;
}

.drilldown-county-counts {
  font-size: 11px;
  text-align: center;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}

.drilldown-back-btn {
  width: 100%;
  margin-top: 8px;
  padding: 10px;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}

.drilldown-turnout-stats {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.drilldown-turnout-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
}

.drilldown-turnout-label {
  font-size: 10px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.drilldown-turnout-value {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary, currentColor);
  font-variant-numeric: tabular-nums;
}

.drilldown-vote-totals {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 700;
  padding: 6px 0;
  font-variant-numeric: tabular-nums;
}

.drilldown-vote-sep {
  color: var(--text-dim);
  font-weight: 400;
  font-size: 12px;
}

.drilldown-factor-row {
  display: grid;
  grid-template-columns: 1fr 80px 40px;
  align-items: center;
  gap: 6px;
}

.drilldown-factor-label {
  font-size: 11px;
  color: var(--text-dim);
}

.drilldown-factor-bar-wrap {
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
}

.drilldown-factor-bar {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s ease;
}

.drilldown-factor-value {
  font-size: 11px;
  font-weight: 700;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.drilldown-demo-header {
  display: grid;
  grid-template-columns: 1fr 60px 60px;
  gap: 4px;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding-bottom: 2px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}

.drilldown-demo-row {
  display: grid;
  grid-template-columns: 1fr 60px 60px;
  gap: 4px;
  align-items: center;
  padding: 3px 0;
}

.drilldown-demo-name {
  font-size: 11px;
  color: var(--text);
}

.drilldown-demo-turnout {
  font-size: 11px;
  color: var(--text-dim);
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.drilldown-demo-share {
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

/* ═══ Impeachment Banner ═══ */

.impeachment-banner {
  margin: 8px 16px;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(239, 68, 68, 0.12);
  border: 2px solid var(--danger);
  backdrop-filter: blur(8px);
  animation: impeachment-pulse 2s ease-in-out infinite;
}

@keyframes impeachment-pulse {
  0%, 100% { border-color: var(--danger); box-shadow: 0 0 8px rgba(239, 68, 68, 0.3); }
  50% { border-color: #FF6B6B; box-shadow: 0 0 16px rgba(239, 68, 68, 0.5); }
}

.impeachment-phase-label {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--danger);
  letter-spacing: 0.5px;
}

.impeachment-factors {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.impeachment-factor-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.impeachment-factor-label {
  font-size: 10px;
  color: var(--text-dim);
  width: 70px;
  flex-shrink: 0;
  text-align: right;
}

.impeachment-factor-track {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
}

.impeachment-factor-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s ease;
}

.impeachment-factor-value {
  font-size: 10px;
  color: var(--text);
  width: 24px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* ====== TIPS BOOK OVERLAY ====== */

.tips-book-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  z-index: 9600;
  /* Sit below the HUD: safe-area + hud padding + hud content */
  padding: calc(var(--sat, env(safe-area-inset-top, 0px)) + 110px) 12px 12px;
}

.tips-book-panel {
  width: 100%;
  max-width: 390px;
  max-height: calc(100vh - var(--sat, env(safe-area-inset-top, 0px)) - 130px);
  overflow-y: auto;
  padding: 0;
  display: flex;
  flex-direction: column;
  position: relative;
  scroll-behavior: smooth;
}

.tips-book-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  position: sticky;
  top: 0;
  z-index: 10;
  background: linear-gradient(135deg, rgba(26, 58, 138, 0.95), rgba(13, 27, 72, 0.98));
  border-bottom: 1px solid rgba(212, 175, 55, 0.15);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.tips-book-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--gold);
  letter-spacing: 0.5px;
}

.tips-book-close {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 28px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  transition: color var(--transition-fast);
}
.tips-book-close:hover {
  color: var(--text);
}

/* Table of Contents */
.tips-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.tips-toc-item {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(212, 175, 55, 0.1);
  border-radius: 20px;
  color: var(--text-dim);
  font-size: 11px;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}
.tips-toc-item:hover,
.tips-toc-item:active {
  background: rgba(212, 175, 55, 0.12);
  border-color: rgba(212, 175, 55, 0.3);
  color: var(--gold-light);
}

.tips-toc-icon {
  font-size: 13px;
}

.tips-toc-label {
  font-weight: 600;
}

/* Content area */
.tips-content {
  padding: 8px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Section */
.tips-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tips-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0 4px;
  position: sticky;
  top: 50px; /* below the main header */
  z-index: 5;
  background: linear-gradient(180deg, rgba(13, 27, 72, 0.95) 0%, rgba(13, 27, 72, 0.85) 80%, transparent 100%);
  padding-bottom: 8px;
}

.tips-section-icon {
  font-size: 20px;
}

.tips-section-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--gold);
  letter-spacing: 0.3px;
}

/* Tip cards */
.tips-card {
  padding: 10px 12px;
  background: linear-gradient(135deg, rgba(26, 58, 138, 0.25), rgba(13, 27, 72, 0.35));
  border: 1px solid rgba(212, 175, 55, 0.08);
  border-radius: var(--radius-sm);
  transition: border-color var(--transition-fast);
}

.tips-card-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.tips-card-body {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.5;
}

/* Back to top button */
.tips-back-top {
  position: sticky;
  bottom: 12px;
  align-self: flex-end;
  margin: 8px 16px;
  padding: 6px 14px;
  background: rgba(212, 175, 55, 0.2);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 20px;
  color: var(--gold-light);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}
.tips-back-top.visible {
  opacity: 1;
  pointer-events: auto;
}

/* News carousel tip card (purple accent) */
.news-tip-card {
  cursor: pointer;
  border: 1px solid rgba(167, 139, 250, 0.2) !important;
  transition: border-color var(--transition-fast), transform var(--transition-fast);
}
.news-tip-card:active {
  transform: scale(0.97);
  border-color: rgba(167, 139, 250, 0.5) !important;
}

.news-tip-cta {
  margin-top: 8px;
  font-size: 11px;
  font-weight: 700;
  color: #A78BFA;
  letter-spacing: 0.3px;
}

/* ====== RETROSPECTIVE SCREEN — CNN/SNN Special Report ====== */

.retro-screen {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px 16px;
  padding-bottom: max(40px, env(safe-area-inset-bottom, 20px));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  max-height: 100%;
  width: 100%;
}

/* Banner */
.retro-banner {
  background: linear-gradient(135deg, #CC0000 0%, #8B0000 60%, #1A3A8A 100%);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(212, 175, 55, 0.3);
}
.retro-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    90deg,
    transparent,
    transparent 4px,
    rgba(255,255,255,0.03) 4px,
    rgba(255,255,255,0.03) 5px
  );
  pointer-events: none;
}
.retro-banner-tag {
  display: inline-block;
  background: #CC0000;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 3px 12px;
  border-radius: 3px;
  margin-bottom: 12px;
  box-shadow: 0 2px 8px rgba(204, 0, 0, 0.4);
}
.retro-banner-title {
  font-size: 28px;
  font-weight: 800;
  color: #fff;
  margin: 0 0 4px 0;
  text-shadow: 0 2px 6px rgba(0,0,0,0.3);
}
.retro-banner-subtitle {
  font-size: 13px;
  color: rgba(255,255,255,0.8);
  font-style: italic;
  margin: 0;
}

/* Timeline */
.retro-timeline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 12px 8px;
}
.retro-timeline-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.retro-timeline-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-dim);
  background: var(--card-bg);
  border: 2px solid var(--glass-border);
  transition: all var(--transition);
}
.retro-step-active .retro-timeline-dot {
  background: var(--gold);
  color: #000;
  border-color: var(--gold);
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.4);
}
.retro-step-done .retro-timeline-dot {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}
.retro-timeline-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.retro-step-active .retro-timeline-label {
  color: var(--gold);
}
.retro-step-done .retro-timeline-label {
  color: var(--green);
}
.retro-timeline-connector {
  width: 32px;
  height: 2px;
  background: var(--glass-border);
  margin: 0 4px;
  margin-bottom: 18px;
}
.retro-connector-done {
  background: var(--green);
}

/* Chapters */
.retro-chapter {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.retro-chapter-header {
  border-left: 4px solid #CC0000;
  padding-left: 12px;
}
.retro-chapter-number {
  display: block;
  font-size: 10px;
  font-weight: 700;
  color: #CC0000;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 2px;
}
.retro-chapter-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  margin: 0;
  letter-spacing: 0.5px;
}

/* News Card */
.retro-card {
  background: var(--card-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 12px 14px;
  backdrop-filter: blur(var(--glass-blur));
}
.retro-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.retro-card-tag {
  display: inline-block;
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 3px;
}
.retro-card-turn {
  font-size: 11px;
  color: var(--text-dim);
  font-weight: 500;
}
.retro-card-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.retro-card-content {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.retro-card-icon {
  font-size: 18px;
  flex-shrink: 0;
  line-height: 1.2;
}
.retro-card-headline {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  line-height: 1.3;
}
.retro-card-subtext {
  font-size: 12px;
  color: var(--text-dim);
  margin: 0;
  line-height: 1.4;
  padding-left: 26px;
}
.retro-card-npc {
  margin-top: 6px;
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
  padding-left: 26px;
}

/* Election Result Card */
.retro-election-card {
  background: var(--card-bg-solid);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-left: 4px solid #CC0000;
  border-radius: var(--radius);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.retro-elec-won {
  border-left-color: var(--green);
}
.retro-elec-lost {
  border-left-color: var(--danger);
}
.retro-elec-header {
  display: flex;
  align-items: center;
  gap: 8px;
}
.retro-elec-icon {
  font-size: 18px;
}
.retro-elec-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: 1px;
  text-transform: uppercase;
  flex: 1;
}
.retro-elec-tag {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 3px;
  letter-spacing: 0.5px;
}
.retro-elec-won .retro-elec-tag {
  background: var(--green);
  color: #fff;
}
.retro-elec-lost .retro-elec-tag {
  background: var(--danger);
  color: #fff;
}

/* Vote bar */
.retro-vote-bar {
  display: flex;
  height: 12px;
  border-radius: 6px;
  overflow: hidden;
  background: rgba(255,255,255,0.05);
}
.retro-vote-fill {
  height: 100%;
  transition: width 0.6s ease;
}
.retro-vote-player {
  background: #2563EB;
  border-radius: 6px 0 0 6px;
}
.retro-vote-opp {
  background: #DC2626;
  border-radius: 0 6px 6px 0;
}
.retro-vote-numbers {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.retro-vote-pct {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}
.retro-vote-margin {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.retro-elec-details {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 11px;
  color: var(--text-dim);
}
.retro-ec-row {
  font-size: 12px;
  font-weight: 600;
  color: var(--gold);
  text-align: center;
}

/* Legacy Card */
.retro-legacy {
  background: linear-gradient(135deg, rgba(204, 0, 0, 0.15) 0%, rgba(212, 175, 55, 0.15) 100%);
  border: 1px solid var(--gold-dim);
  border-radius: var(--radius-lg);
  padding: 20px;
  text-align: center;
}
.retro-legacy-header {
  margin-bottom: 12px;
}
.retro-legacy-tag {
  display: inline-block;
  background: linear-gradient(135deg, #CC0000, #8B0000);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 4px 16px;
  border-radius: 4px;
}
.retro-legacy-grade {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  margin-bottom: 16px;
}
.retro-legacy-letter {
  font-size: 48px;
  font-weight: 900;
  line-height: 1;
}
.retro-legacy-score {
  font-size: 14px;
  font-weight: 600;
  opacity: 0.7;
}
.retro-legacy-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.retro-legacy-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.retro-ls-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}
.retro-ls-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Action Buttons */
.retro-actions {
  display: flex;
  gap: 12px;
  padding: 8px 0;
}
.retro-actions .btn-glass {
  flex: 1;
}

/* Empty state */
.retro-empty {
  text-align: center;
  padding: 32px 16px;
  color: var(--text-dim);
  font-size: 13px;
}

/* Clickable cards */
.retro-card-clickable { cursor: pointer; transition: transform 0.15s, border-color 0.15s; }
.retro-card-clickable:active { transform: scale(0.98); }
.retro-card-clickable:hover { border-color: var(--gold); }
.retro-card-tap {
  font-size: 10px; color: var(--gold); opacity: 0.7;
  margin-left: auto; font-style: italic;
}

/* Detail overlay (shared by news + election modals) */
.retro-detail-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.85); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  padding: 16px; overflow-y: auto;
}
.retro-detail-modal, .retro-election-modal {
  background: var(--glass-bg, rgba(15,15,30,0.95));
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px; padding: 20px; width: 100%; max-width: 400px;
  max-height: 85vh; overflow-y: auto; position: relative;
  -webkit-overflow-scrolling: touch;
}
.retro-detail-close {
  position: absolute; top: 10px; right: 12px;
  background: none; border: none; color: var(--text-dim);
  font-size: 20px; cursor: pointer; z-index: 5;
}
.retro-detail-tag {
  display: inline-block; padding: 2px 8px; border-radius: 4px;
  font-size: 10px; font-weight: 700; color: #fff; letter-spacing: 0.5px;
  margin-bottom: 10px;
}
.retro-detail-headline {
  display: flex; align-items: center; gap: 8px; margin-bottom: 8px;
}
.retro-detail-headline h3 { margin: 0; font-size: 16px; color: var(--text); }
.retro-detail-icon { font-size: 22px; }
.retro-detail-meta { font-size: 12px; color: var(--text-dim); margin-bottom: 10px; }
.retro-detail-body { font-size: 14px; color: var(--text-secondary, #CBD5E1); line-height: 1.5; margin-bottom: 12px; }
.retro-detail-stat {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 12px; border-radius: 8px;
  background: rgba(255,255,255,0.04); margin-bottom: 8px;
}
.retro-detail-stat-label { font-size: 12px; color: var(--text-dim); }
.retro-detail-stat-value { font-size: 18px; font-weight: 700; }
.retro-detail-npc {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: 8px;
  background: rgba(255,255,255,0.04); font-size: 14px; color: var(--text);
}
.retro-detail-outcome {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 12px; border-radius: 8px; font-weight: 600; font-size: 14px;
}
.retro-outcome-pass { background: rgba(34,197,94,0.1); color: #22C55E; }
.retro-outcome-fail { background: rgba(239,68,68,0.1); color: #EF4444; }

/* Election breakdown modal */
.retro-em-header { text-align: center; margin-bottom: 16px; }
.retro-em-badge {
  display: inline-block; padding: 4px 16px; border-radius: 6px;
  font-size: 12px; font-weight: 800; letter-spacing: 1px; margin-bottom: 6px;
}
.retro-em-win { background: rgba(34,197,94,0.15); color: #22C55E; border: 1px solid rgba(34,197,94,0.3); }
.retro-em-loss { background: rgba(239,68,68,0.15); color: #EF4444; border: 1px solid rgba(239,68,68,0.3); }
.retro-em-title { margin: 4px 0; font-size: 18px; color: var(--text); }
.retro-em-margin { font-size: 13px; color: var(--text-dim); }

.retro-em-vote-section { margin-bottom: 16px; }
.retro-em-vote-row {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px;
}
.retro-em-vote-side { text-align: center; flex: 1; }
.retro-em-vote-pct { font-size: 28px; font-weight: 800; }
.retro-em-vote-label { font-size: 11px; text-transform: uppercase; opacity: 0.7; }
.retro-em-vs { font-size: 14px; color: var(--text-dim); }
.retro-em-vote-bar, .retro-em-ec-bar {
  display: flex; height: 10px; border-radius: 5px; overflow: hidden;
  background: rgba(255,255,255,0.06); margin-bottom: 6px;
}
.retro-em-turnout { font-size: 12px; color: var(--text-dim); text-align: center; }

.retro-em-section {
  margin-bottom: 16px; padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.retro-em-section-title {
  font-size: 14px; font-weight: 700; color: var(--gold); margin: 0 0 10px;
  display: flex; align-items: center; gap: 6px;
}
.retro-em-section-title .mi { padding: 0; border: none; background: none; font-size: 16px; }

.retro-em-ec-summary {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 8px; text-align: center;
}
.retro-em-ec-side { flex: 1; }
.retro-em-ec-count { font-size: 32px; font-weight: 800; }
.retro-em-ec-label { font-size: 11px; opacity: 0.6; }
.retro-em-ec-needed { font-size: 12px; color: var(--text-dim); }

.retro-em-states-summary {
  display: flex; justify-content: center; gap: 8px;
  font-size: 13px; margin: 8px 0;
}
.retro-em-state-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(58px, 1fr));
  gap: 4px; max-height: 240px; overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.retro-em-state-tile {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 4px 2px; border-radius: 6px; border: 1px solid;
  font-size: 10px; min-height: 42px;
}
.retro-em-st-abbr { font-weight: 800; font-size: 13px; }
.retro-em-st-ev { font-size: 9px; opacity: 0.7; }
.retro-em-st-vote { font-size: 10px; }

.retro-em-demo-header {
  display: grid; grid-template-columns: 1fr 60px 1fr;
  font-size: 11px; color: var(--text-dim); padding: 4px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06); margin-bottom: 4px;
}
.retro-em-demo-header span:last-child { text-align: right; }
.retro-em-demo-row {
  display: grid; grid-template-columns: 1fr 60px 1fr;
  align-items: center; padding: 5px 0; font-size: 13px;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}
.retro-em-demo-name { display: flex; align-items: center; gap: 4px; }
.retro-em-demo-name .mi { padding: 0; border: none; background: none; font-size: 14px; }
.retro-em-demo-turnout { text-align: center; color: var(--text-dim); font-size: 12px; }
.retro-em-demo-bar-cell { display: flex; align-items: center; gap: 4px; }
.retro-em-demo-bar {
  flex: 1; height: 6px; border-radius: 3px;
  background: rgba(255,255,255,0.06); overflow: hidden;
}
.retro-em-demo-fill { height: 100%; border-radius: 3px; transition: width 0.3s; }
.retro-em-demo-val { font-size: 12px; font-weight: 700; min-width: 32px; text-align: right; }
.retro-em-close-btn { width: 100%; margin-top: 12px; }

/* Electoral SVG Map */
.retro-em-svg-map-slot { margin: 12px 0; }
.retro-em-map-container {
  border-radius: 8px; overflow: hidden;
  background: #0a0a1a; padding: 8px;
  border: 1px solid rgba(255,255,255,0.06);
}
.retro-em-map-container svg { display: block; width: 100%; height: auto; }
.retro-em-demo-clickable {
  padding: 8px 0; border-radius: 8px; transition: background 0.2s;
}
.retro-em-demo-clickable:hover { background: rgba(255,255,255,0.03); }

/* ═══ Endorsement Screen (CK3-style) ═══ */

.endorsement-screen {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  box-sizing: border-box;
}

.endorse-header {
  text-align: center;
  padding: 8px 0 4px;
}

.endorse-header h2 {
  font-size: 18px;
  color: var(--gold);
  margin: 0 0 6px;
}

.endorse-summary {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 6px;
}

.endorse-stat {
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 8px;
  background: rgba(255,255,255,0.05);
}

.endorse-weight-bar {
  margin: 4px auto 8px;
  max-width: 280px;
}

.endorse-weight-label {
  font-size: 11px;
  color: var(--text-dim);
  margin-bottom: 3px;
}

.endorse-weight-track {
  height: 6px;
  background: rgba(255,255,255,0.08);
  border-radius: 3px;
  overflow: hidden;
}

.endorse-weight-fill {
  height: 100%;
  background: linear-gradient(90deg, #D4AF37, #F5D36E);
  border-radius: 3px;
  transition: width 0.5s ease;
}

/* NPC Grid */
.endorse-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  padding-bottom: max(60px, calc(16px + env(safe-area-inset-bottom, 0px)));
}

.endorse-npc-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 8px 10px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.endorse-npc-card:active {
  background: rgba(255,255,255,0.08);
}

.endorse-npc-committed {
  border-color: rgba(34,197,94,0.3);
  background: rgba(34,197,94,0.04);
}

.endorse-npc-top {
  display: flex;
  align-items: center;
  gap: 8px;
}

.endorse-npc-portrait {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.06);
}

.endorse-npc-portrait-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.endorse-npc-portrait-emoji {
  font-size: 20px;
}

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

.endorse-npc-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.endorse-npc-title {
  font-size: 10px;
  color: var(--text-dim);
}

.endorse-stance-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 8px;
  border: 1px solid;
  white-space: nowrap;
  flex-shrink: 0;
}

.endorse-npc-opinion-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}

.endorse-opinion-bar-track {
  flex: 1;
  height: 4px;
  background: rgba(255,255,255,0.08);
  border-radius: 2px;
  overflow: hidden;
}

.endorse-opinion-bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.3s ease;
}

.endorse-opinion-label {
  font-size: 11px;
  font-weight: 600;
  flex-shrink: 0;
}

.endorse-badges {
  display: flex;
  gap: 4px;
  margin-top: 4px;
  flex-wrap: wrap;
}

.endorse-badge {
  font-size: 9px;
  padding: 1px 5px;
  border-radius: 4px;
  font-weight: 600;
}

.endorse-badge-yes {
  background: rgba(34,197,94,0.12);
  color: #22C55E;
}

.endorse-badge-hook {
  background: rgba(234,179,8,0.12);
  color: #EAB308;
}

.endorse-badge-faction {
  background: rgba(139,92,246,0.12);
  color: #8B5CF6;
}

.endorse-badge-leader {
  background: rgba(139,92,246,0.15);
  color: #A78BFA;
  border: 1px solid rgba(139,92,246,0.3);
}

.endorse-badge-ally {
  background: rgba(212,175,55,0.12);
  color: #D4AF37;
}

/* Action Panel Overlay */
.endorse-action-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.7);
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.endorse-action-panel {
  background: var(--card-bg, #1a1a2e);
  border-radius: 16px 16px 0 0;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  width: 100%;
  max-width: 390px;
  max-height: 80vh;
  overflow-y: auto;
  border: 1px solid rgba(255,255,255,0.1);
  border-bottom: none;
}

.endorse-action-header {
  text-align: center;
  margin-bottom: 12px;
  position: relative;
}

.endorse-action-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.endorse-action-role {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 2px;
}

.endorse-action-stance {
  font-size: 13px;
  font-weight: 600;
  margin-top: 4px;
}

.endorse-action-close {
  position: absolute;
  top: 0;
  right: 0;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 18px;
  cursor: pointer;
  padding: 4px;
}

.endorse-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.endorse-action-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  color: var(--text-primary);
  cursor: pointer;
  transition: background 0.2s;
  text-align: left;
  width: 100%;
}

.endorse-action-btn:active:not([disabled]) {
  background: rgba(255,255,255,0.10);
}

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

.endorse-action-faction {
  border-color: rgba(139,92,246,0.3);
  background: rgba(139,92,246,0.06);
}

.endorse-action-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.endorse-action-info {
  flex: 1;
}

.endorse-action-label {
  font-size: 13px;
  font-weight: 600;
}

.endorse-action-desc {
  font-size: 10px;
  color: var(--text-dim);
  margin-top: 1px;
}

.endorse-action-cost {
  font-size: 12px;
  color: var(--gold);
  font-weight: 600;
  flex-shrink: 0;
}

.endorse-action-done {
  text-align: center;
  padding: 16px;
  color: #22C55E;
  font-size: 14px;
}

.endorse-action-done-icon {
  font-size: 24px;
  display: block;
  margin-bottom: 6px;
}

/* Promise Menu */
.endorse-promise-menu {
  padding: 8px 0;
}

.endorse-promise-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--gold);
  text-align: center;
  margin-bottom: 8px;
}

.endorse-promise-btn {
  display: block;
  width: 100%;
  padding: 10px 12px;
  margin-bottom: 6px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  color: var(--text-primary);
  cursor: pointer;
  text-align: left;
}

.endorse-promise-btn:active:not([disabled]) {
  background: rgba(255,255,255,0.10);
}

.endorse-promise-label {
  font-size: 13px;
  font-weight: 600;
}

.endorse-promise-desc {
  font-size: 10px;
  color: var(--text-dim);
  margin-top: 2px;
}

.endorse-promise-cost {
  font-size: 10px;
  color: var(--gold);
  margin-top: 2px;
}

.endorse-promise-made {
  font-size: 10px;
  color: #9CA3AF;
  margin-top: 2px;
  font-style: italic;
}

.endorse-promise-cancel {
  display: block;
  width: 100%;
  padding: 8px;
  background: none;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  color: var(--text-dim);
  cursor: pointer;
  margin-top: 4px;
  font-size: 12px;
}

/* Result Card */
.endorse-result-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid;
  border-radius: 10px;
  margin-top: 8px;
}

.endorse-result-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.endorse-result-text {
  flex: 1;
  font-size: 12px;
  font-weight: 500;
}

.endorse-result-ok {
  padding: 4px 12px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 6px;
  color: var(--text-primary);
  cursor: pointer;
  font-size: 11px;
  flex-shrink: 0;
}

/* Bottom bar */
.endorse-bottom {
  position: sticky;
  bottom: 0;
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(transparent, var(--bg-dark, #0a0a1a) 30%);
  text-align: center;
}

/* Cabinet endorsement bar */
.cabinet-endorse-bar {
  padding: 8px 0 4px;
  text-align: center;
}

.cabinet-endorse-btn {
  font-size: 13px;
  padding: 8px 20px;
  border-color: rgba(212,175,55,0.3);
}

/* ═══ SENATE FLOOR SCREEN ═══ */

.senate-floor-screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  padding: 12px 10px;
  overflow-y: auto;
  z-index: 10;
}

.senate-floor-header {
  text-align: center;
  margin-bottom: 10px;
}

.senate-floor-header h2 {
  font-size: 18px;
  color: var(--gold);
  margin: 0 0 4px;
}

.senate-floor-subtitle {
  font-size: 12px;
  color: var(--text-secondary);
  margin: 0;
}

.senate-floor-bills {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  padding-bottom: 8px;
}

.sf-bill-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 10px;
}

.sf-bill-top {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 8px;
}

.sf-bill-icon {
  font-size: 20px;
  flex-shrink: 0;
}

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

.sf-bill-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.sf-bill-desc {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.sf-bill-stats {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sf-chance-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.sf-chance-label {
  font-size: 11px;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.sf-chance-bar-track {
  flex: 1;
  height: 6px;
  background: rgba(255,255,255,0.06);
  border-radius: 3px;
  overflow: hidden;
}

.sf-chance-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s ease;
}

.sf-chance-pct {
  font-size: 12px;
  font-weight: 700;
  min-width: 32px;
  text-align: right;
}

.sf-whip-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sf-whip-label {
  font-size: 11px;
  color: var(--text-secondary);
}

.sf-whip-btn {
  font-size: 11px;
  padding: 4px 10px;
  background: rgba(212,175,55,0.12);
  border: 1px solid rgba(212,175,55,0.3);
  border-radius: 6px;
  color: var(--gold);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}

.sf-whip-btn:active:not(.action-disabled) {
  background: rgba(212,175,55,0.25);
}

/* Vote Results */
.sf-results-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  padding-bottom: 8px;
}

.sf-result-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid;
  border-radius: 10px;
  padding: 10px;
}

.sf-result-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.sf-result-icon {
  font-size: 20px;
}

.sf-result-info {
  flex: 1;
}

.sf-result-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.sf-result-status {
  font-size: 12px;
  font-weight: 700;
}

.sf-result-votes {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
}

.sf-vote-yes {
  color: #22C55E;
  font-weight: 600;
}

.sf-vote-no {
  color: #EF4444;
  font-weight: 600;
}

.sf-vote-divider {
  color: var(--text-secondary);
}

.senate-floor-bottom {
  position: sticky;
  bottom: 0;
  display: flex;
  gap: 6px;
  padding: 8px 0;
  background: linear-gradient(transparent, var(--bg-dark, #0a0a1a) 30%);
  justify-content: center;
  flex-wrap: wrap;
}

.senate-floor-bottom .btn-glass {
  font-size: 12px;
  padding: 10px 12px;
  flex: 1;
  min-width: 0;
  text-align: center;
}

.senate-floor-bottom .btn-primary {
  background: rgba(212,175,55,0.15);
  border-color: rgba(212,175,55,0.4);
  color: var(--gold);
}

/* ─── Co-signer info on bill cards ─── */
.sf-cosigners {
  font-size: 11px;
  color: var(--text-secondary);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.sf-cosigner-label {
  font-weight: 600;
  color: var(--text-secondary);
}
.sf-cosigner-name {
  font-weight: 500;
}

/* ─── Filibuster warning ─── */
.sf-filibuster-warning {
  font-size: 11px;
  font-weight: 700;
  color: #F59E0B;
  background: rgba(245,158,11,0.08);
  border: 1px solid rgba(245,158,11,0.25);
  border-radius: 6px;
  padding: 4px 8px;
  margin-bottom: 6px;
  text-align: center;
}

/* ─── Amendment proposal ─── */
.sf-amendment-proposal {
  background: rgba(168,85,247,0.06);
  border: 1px solid rgba(168,85,247,0.2);
  border-radius: 8px;
  padding: 8px;
  margin-bottom: 6px;
}
.sf-amendment-title {
  font-size: 12px;
  font-weight: 600;
  color: #A855F7;
  margin-bottom: 2px;
}
.sf-amendment-desc {
  font-size: 11px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.sf-amendment-actions {
  display: flex;
  gap: 6px;
}
.sf-amend-accept, .sf-amend-reject {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid;
}
.sf-amend-accept {
  background: rgba(34,197,94,0.1);
  border-color: rgba(34,197,94,0.3);
  color: #22C55E;
}
.sf-amend-reject {
  background: rgba(239,68,68,0.1);
  border-color: rgba(239,68,68,0.3);
  color: #EF4444;
}
.sf-amendment-accepted {
  font-size: 11px;
  color: #A855F7;
  margin-bottom: 4px;
  font-style: italic;
}

/* ─── Committee tag ─── */
.sf-committee-tag {
  font-size: 10px;
  color: #3B82F6;
  background: rgba(59,130,246,0.08);
  border: 1px solid rgba(59,130,246,0.2);
  border-radius: 4px;
  padding: 2px 6px;
  display: inline-block;
  margin-bottom: 6px;
}

/* ─── Swing Senators section ─── */
.sf-swing-section {
  margin-top: 8px;
  padding: 8px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
}
.sf-swing-header {
  font-size: 13px;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 2px;
}
.sf-swing-subtitle {
  font-size: 11px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.sf-swing-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 160px;
  overflow-y: auto;
}
.sf-swing-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px;
  background: rgba(255,255,255,0.03);
  border-radius: 6px;
}
.sf-swing-name {
  flex: 1;
  font-size: 12px;
  color: var(--text-primary);
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sf-swing-trait {
  font-size: 10px;
  color: var(--text-dim, #666);
  margin-left: 4px;
}
.sf-swing-opinion {
  font-size: 12px;
  font-weight: 700;
  min-width: 24px;
  text-align: right;
}
.sf-swing-lobbied {
  font-size: 10px;
  color: #22C55E;
  font-weight: 600;
  min-width: 50px;
  text-align: center;
}
.sf-swing-lobby-btn {
  font-size: 10px;
  padding: 3px 8px;
  background: rgba(212,175,55,0.12);
  border: 1px solid rgba(212,175,55,0.3);
  border-radius: 5px;
  color: var(--gold);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 3px;
  min-width: 50px;
  justify-content: center;
}

/* ─── Vote result enhancements ─── */
.sf-result-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 0;
}
.sf-result-breakdown {
  text-align: center;
  margin-top: 4px;
}
.sf-breakdown-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  background: rgba(255,255,255,0.04);
  padding: 2px 8px;
  border-radius: 4px;
}
.sf-result-swing {
  font-size: 10px;
  color: var(--text-dim, #888);
  text-align: center;
  margin-top: 3px;
}

/* ═══ WHIP VOTES SEMICIRCLE ═══ */
.whip-semicircle {
  width: 100%;
  max-width: 340px;
  margin: 8px auto;
  padding: 4px;
}
.whip-svg {
  width: 100%;
  height: auto;
  display: block;
}

/* Senator dots — default yellow */
.whip-dot {
  fill: #F59E0B;
  stroke: rgba(255,255,255,0.15);
  stroke-width: 0.5;
  transition: fill 0.2s ease, r 0.15s ease;
  cursor: pointer;
}
.whip-dot:hover {
  r: 7;
  stroke: rgba(255,255,255,0.5);
}

/* Whipped = guaranteed yes, green */
.whip-dot.whipped {
  fill: #22C55E;
  stroke: rgba(34,197,94,0.5);
  stroke-width: 1;
}

/* Player party = blue-tinted yellow */
.whip-dot.player-party {
  fill: #D4A017;
}

/* Opposition = red-tinted yellow */
.whip-dot.opposition {
  fill: #E8862F;
}

/* Post-vote animation states */
.whip-dot.voted-yes {
  fill: #22C55E;
  stroke: rgba(34,197,94,0.5);
  transition: fill 0.15s ease;
}
.whip-dot.voted-no {
  fill: #EF4444;
  stroke: rgba(239,68,68,0.5);
  transition: fill 0.15s ease;
}

/* Legend */
.whip-legend {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 4px 0;
}
.whip-legend-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  color: var(--text-dim, #94A3B8);
}
.whip-dot-sample {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.whip-dot-sample.whip-dot-default { background: #F59E0B; }
.whip-dot-sample.whip-dot-whipped { background: #22C55E; }
.whip-dot-sample.whip-dot-player { background: #D4A017; }
.whip-dot-sample.whip-dot-opp { background: #E8862F; }

/* Bill info in whip phase */
.whip-bill-info {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  margin-bottom: 6px;
}
.whip-bill-icon {
  font-size: 22px;
  flex-shrink: 0;
}
.whip-bill-details {
  flex: 1;
  min-width: 0;
}
.whip-bill-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text, #F1F5F9);
}
.whip-bill-cosigners {
  font-size: 11px;
  color: #3B82F6;
  margin-top: 2px;
}

/* Bill tabs for multiple bills */
.whip-bill-tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  margin-bottom: 6px;
  padding-bottom: 2px;
}
.whip-bill-tab {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text-dim, #94A3B8);
  cursor: pointer;
  white-space: nowrap;
}
.whip-bill-tab.active {
  background: rgba(212,175,55,0.12);
  border-color: rgba(212,175,55,0.3);
  color: var(--gold, #D4AF37);
}

/* Whip stats bar */
.whip-stats-bar {
  display: flex;
  justify-content: space-around;
  padding: 6px 0;
  margin: 4px 0;
  background: rgba(255,255,255,0.03);
  border-radius: 8px;
}
.whip-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.whip-stat-label {
  font-size: 10px;
  color: var(--text-dim, #94A3B8);
  text-transform: uppercase;
}
.whip-stat-value {
  font-size: 14px;
  font-weight: 700;
  color: var(--text, #F1F5F9);
  display: flex;
  align-items: center;
  gap: 3px;
}

/* Bulk whip row */
.whip-bulk-row {
  display: flex;
  justify-content: center;
  margin: 4px 0;
}

/* ═══ CO-SIGNER SELECTION SCREEN ═══ */
.cosign-screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  padding: 12px 10px;
  overflow-y: auto;
  z-index: 10;
}
.cosign-hint {
  font-size: 11px;
  color: #A855F7;
  margin: 4px 0 0;
  text-align: center;
}
.cosign-bill-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  margin-bottom: 8px;
}
.cosign-bill-icon {
  font-size: 18px;
}
.cosign-bill-name {
  flex: 1;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}
.cosign-bill-alignment {
  font-size: 10px;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255,255,255,0.06);
  color: var(--text-secondary);
}
.cosign-selected-count {
  font-size: 12px;
  font-weight: 700;
  color: var(--gold);
  text-align: center;
  margin-bottom: 6px;
}
.cosign-npc-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
  padding-bottom: 8px;
}
.cosign-npc-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
  color: var(--text-primary);
  width: 100%;
  font-family: inherit;
  transition: border-color 0.2s;
}
.cosign-npc-card:active:not([disabled]) {
  background: rgba(255,255,255,0.08);
}
.cosign-npc-card.cosign-selected {
  border-color: rgba(34,197,94,0.5);
  background: rgba(34,197,94,0.06);
}
.cosign-npc-card.cosign-refused {
  opacity: 0.45;
  cursor: not-allowed;
}
.cosign-npc-top {
  display: flex;
  align-items: center;
  gap: 8px;
}
.cosign-npc-portrait {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.cosign-npc-info {
  flex: 1;
  min-width: 0;
}
.cosign-npc-name {
  font-size: 13px;
  font-weight: 600;
}
.cosign-npc-party {
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.cosign-bipartisan-tag {
  font-size: 10px;
  color: #A855F7;
  font-weight: 700;
  background: rgba(168,85,247,0.1);
  padding: 1px 5px;
  border-radius: 3px;
}
.cosign-npc-status {
  font-size: 11px;
  font-weight: 600;
  flex-shrink: 0;
}
.cosign-npc-role {
  font-size: 10px;
  color: var(--text-dim, #888);
  padding-left: 40px;
}

/* ═══ SUPREME COURT SCREEN ═══ */

.scotus-screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  padding: 12px 10px calc(12px + env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  z-index: 10;
}

.scotus-header {
  text-align: center;
  margin-bottom: 10px;
}

.scotus-header h2 {
  font-size: 18px;
  color: var(--gold);
  margin: 0 0 4px;
}

.scotus-subtitle {
  font-size: 12px;
  color: var(--text-secondary);
  margin: 0;
}

.scotus-candidates {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  padding-bottom: 8px;
}

.scotus-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 10px;
}

.scotus-card-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.scotus-card-icon {
  font-size: 20px;
}

.scotus-card-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  flex: 1;
}

.scotus-card-ideology {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: capitalize;
}

.scotus-card-bars {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 6px;
}

.scotus-bar-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.scotus-bar-label {
  font-size: 10px;
  color: var(--text-secondary);
  min-width: 80px;
}

.scotus-bar-track {
  flex: 1;
  height: 5px;
  background: rgba(255,255,255,0.06);
  border-radius: 3px;
  overflow: hidden;
}

.scotus-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s ease;
}

.scotus-bar-val {
  font-size: 11px;
  font-weight: 600;
  min-width: 30px;
  text-align: right;
}

.scotus-card-bio {
  font-size: 11px;
  color: var(--text-secondary);
  margin-bottom: 6px;
  line-height: 1.4;
}

.scotus-card-legacy {
  font-size: 11px;
  color: var(--gold);
  margin-bottom: 8px;
}

.scotus-nominate-btn {
  width: 100%;
  font-size: 12px;
  padding: 6px;
}

/* Nomination Panel */
.scotus-nomination-panel {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 10px;
}

.scotus-nominee-info {
  text-align: center;
  margin-bottom: 10px;
}

.scotus-nominee-icon {
  font-size: 28px;
  display: block;
  margin-bottom: 4px;
}

.scotus-chance-section {
  margin-bottom: 10px;
}

.scotus-chance-label {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.scotus-chance-bar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.scotus-chance-pct {
  font-size: 14px;
  font-weight: 700;
  min-width: 36px;
  text-align: right;
}

.scotus-factors {
  margin-bottom: 8px;
}

.scotus-factors-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.scotus-factor-row {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  padding: 2px 0;
}

.scotus-factor-label {
  color: var(--text-secondary);
}

.scotus-factor-value {
  font-weight: 600;
}

.scotus-cost-note {
  font-size: 11px;
  color: var(--gold);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

/* Result */
.scotus-result-section {
  text-align: center;
  padding: 16px 10px;
}

.scotus-result-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid;
  margin-bottom: 12px;
}

.scotus-result-banner-icon {
  font-size: 24px;
}

.scotus-result-banner-text {
  font-size: 20px;
  font-weight: 700;
}

.scotus-vote-tally {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 16px;
  margin-bottom: 10px;
}

.scotus-vote-yea, .scotus-vote-nay {
  font-weight: 600;
}

.scotus-vote-divider {
  color: var(--text-secondary);
}

.scotus-result-message {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.scotus-effects {
  text-align: left;
  margin-top: 8px;
}

.scotus-effects-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.scotus-effect-row {
  font-size: 11px;
  color: var(--text-primary);
  padding: 2px 0;
}

.scotus-bottom {
  position: sticky;
  bottom: 0;
  display: flex;
  gap: 8px;
  padding: 8px 0;
  background: linear-gradient(transparent, var(--bg-dark, #0a0a1a) 30%);
  justify-content: center;
}

.scotus-bottom .btn-primary {
  background: rgba(212,175,55,0.15);
  border-color: rgba(212,175,55,0.4);
  color: var(--gold);
}

/* Office VP ability bar */
.vp-ability-bar {
  padding: 4px 0;
  text-align: center;
}

.vp-ability-btn {
  font-size: 12px;
  padding: 8px 16px;
  width: 100%;
  border-color: rgba(168,85,247,0.3);
  color: #A855F7;
}

.vp-ability-btn:active:not(.action-disabled) {
  background: rgba(168,85,247,0.15);
}

/* Office SCOTUS vacancy bar */
.scotus-vacancy-bar {
  padding: 6px 0;
  text-align: center;
}

.scotus-vacancy-btn {
  font-size: 13px;
  padding: 10px 16px;
  width: 100%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(212,175,55,0.3); }
  50% { box-shadow: 0 0 0 4px rgba(212,175,55,0); }
}

/* ═══ Situation Room Bar ═══ */

.sit-room-bar {
  padding: 6px 0;
  text-align: center;
}

.sit-room-btn {
  font-size: 13px;
  padding: 10px 16px;
  width: 100%;
  animation: pulse 2s infinite;
}

/* ═══ Situation Room Screen ═══ */

.situation-room-screen {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  max-height: 100%;
  box-sizing: border-box;
}

.sit-room-header {
  text-align: center;
  margin-bottom: 4px;
}

.sit-room-badge {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 4px;
  background: rgba(220,38,38,0.2);
  border: 1px solid rgba(220,38,38,0.5);
  color: #EF4444;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.sit-room-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-bright);
  margin: 0;
}

.sit-room-briefing {
  background: rgba(26,58,138,0.25);
  border: 1px solid rgba(212,175,55,0.15);
  border-radius: 12px;
  padding: 14px;
}

.sit-room-headline {
  font-size: 13px;
  font-weight: 700;
  color: #EF4444;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sit-room-description {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.5;
  margin-bottom: 8px;
}

.sit-room-cost {
  font-size: 12px;
  color: var(--gold);
  display: flex;
  align-items: center;
  gap: 4px;
}

.sit-room-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sit-room-option {
  background: rgba(26,58,138,0.2);
  border: 1px solid rgba(212,175,55,0.15);
  border-radius: 10px;
  padding: 12px;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.2s, background 0.2s;
  color: var(--text-bright);
}

.sit-room-option:hover:not(.action-disabled) {
  border-color: rgba(212,175,55,0.4);
  background: rgba(26,58,138,0.35);
}

.sit-room-option.action-disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.sit-room-option-label {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 4px;
}

.sit-room-option-desc {
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 4px;
  line-height: 1.4;
}

.sit-room-option-risk {
  font-size: 11px;
  font-weight: 700;
}

.sit-room-back {
  background: rgba(26,58,138,0.2);
  border: 1px solid rgba(212,175,55,0.15);
  border-radius: 8px;
  padding: 10px;
  color: var(--text-dim);
  font-size: 13px;
  cursor: pointer;
  margin-top: 4px;
}

.sit-room-result {
  text-align: center;
  padding: 20px;
  border-radius: 12px;
  border: 1px solid;
}

.sit-room-success {
  background: rgba(34,197,94,0.1);
  border-color: rgba(34,197,94,0.3);
}

.sit-room-failure {
  background: rgba(239,68,68,0.1);
  border-color: rgba(239,68,68,0.3);
}

.sit-room-result-icon {
  font-size: 40px;
  margin-bottom: 8px;
}

.sit-room-result-label {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 4px;
}

.sit-room-success .sit-room-result-label { color: #22C55E; }
.sit-room-failure .sit-room-result-label { color: #EF4444; }

.sit-room-result-option {
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 12px;
}

.sit-room-effects {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}

.sit-room-continue {
  background: linear-gradient(135deg, rgba(212,175,55,0.2), rgba(212,175,55,0.1));
  border: 1px solid rgba(212,175,55,0.3);
  border-radius: 10px;
  padding: 12px;
  color: var(--gold);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
  margin-top: 8px;
}

/* ═══ Presidential Meeting Bar ═══ */

.pres-meeting-bar {
  padding: 6px 0;
  text-align: center;
}

.pres-meeting-btn {
  font-size: 13px;
  padding: 10px 16px;
  width: 100%;
}

/* ═══ Presidential Meeting Screen ═══ */

.pres-meeting-screen {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 38px 16px 16px;
  height: 100%;
  box-sizing: border-box;
  overflow-y: auto;
  overflow-x: hidden;
}

.pres-header {
  text-align: center;
  margin-bottom: 4px;
}

.pres-president-info {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(26,58,138,0.25);
  border: 1px solid rgba(212,175,55,0.15);
  border-radius: 10px;
}

.pres-president-portrait {
  font-size: 28px;
}

.pres-president-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-bright);
}

.pres-president-party {
  font-size: 12px;
  font-weight: 600;
}

.pres-round-dots {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 0;
}

.pres-round-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  border: 1.5px solid rgba(255,255,255,0.2);
  transition: all 0.3s;
}

.pres-round-dot.active { background: var(--gold); border-color: var(--gold); }
.pres-round-dot.correct { background: #22C55E; border-color: #22C55E; }
.pres-round-dot.wrong { background: #EF4444; border-color: #EF4444; }

.pres-chat-thread {
  flex: 1 1 0;
  overflow-y: auto;
  padding: 8px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 100px;
  max-height: 340px;
}

.pres-answer-buttons {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 0;
  flex-shrink: 0;
  position: relative;
  z-index: 5;
}

.pres-answer-btn {
  background: rgba(26,58,138,0.25);
  border: 1px solid rgba(212,175,55,0.2);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--text-bright);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  line-height: 1.4;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.pres-answer-btn:hover, .pres-answer-btn:active {
  border-color: rgba(212,175,55,0.4);
  background: rgba(26,58,138,0.4);
}

.pres-debrief {
  text-align: center;
  padding: 12px;
  margin-top: 8px;
}

.pres-score-display {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 4px;
}

.pres-score-win { color: #22C55E; }
.pres-score-lose { color: #EF4444; }

.pres-bonus-badge {
  display: inline-block;
  padding: 6px 14px;
  background: rgba(34,197,94,0.15);
  border: 1px solid rgba(34,197,94,0.3);
  border-radius: 8px;
  color: #22C55E;
  font-size: 14px;
  font-weight: 700;
  margin-top: 4px;
}

/* ═══ Reduced Motion ═══ */

@media (prefers-reduced-motion: reduce) {
  .impeachment-banner {
    animation: none !important;
  }
  .scotus-vacancy-btn {
    animation: none !important;
  }
  .sit-room-btn {
    animation: none !important;
  }
}

/* ═══ War Screen ═══ */

.war-screen {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 10px calc(12px + env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  max-height: 100%;
  box-sizing: border-box;
  max-width: 100%;
}

.war-header {
  text-align: center;
  margin-bottom: 4px;
}

.war-badge {
  display: inline-block;
  background: linear-gradient(135deg, #DC2626, #991B1B);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 6px;
}

.war-badge-scotus {
  background: linear-gradient(135deg, #D4AF37, #B8860B);
}

.war-badge-congress {
  background: linear-gradient(135deg, #1A3A8A, #2563EB);
}

.war-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  margin: 4px 0;
}

.war-phase-counter {
  font-size: 13px;
  color: var(--text-dim);
  font-weight: 600;
}

.war-briefing {
  background: rgba(26,58,138,0.2);
  border: 1px solid rgba(212,175,55,0.15);
  border-radius: var(--radius);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.war-region {
  font-size: 12px;
  color: var(--gold);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.war-description {
  font-size: 14px;
  color: var(--text);
  line-height: 1.5;
}

.war-meta-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.war-meta-item {
  font-size: 13px;
  color: var(--text-dim);
}

.war-congress-warning {
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.3);
  border-radius: 8px;
  padding: 10px;
  font-size: 13px;
  color: #FCA5A5;
  line-height: 1.4;
}

.war-effects-preview {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.war-effect-chip {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid;
}

.war-effect-positive {
  color: #22C55E;
  border-color: rgba(34,197,94,0.3);
  background: rgba(34,197,94,0.08);
}

.war-effect-negative {
  color: #EF4444;
  border-color: rgba(239,68,68,0.3);
  background: rgba(239,68,68,0.08);
}

.war-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.war-confirm-btn {
  font-size: 15px;
  padding: 14px;
}

.war-cancel-btn {
  font-size: 13px;
  padding: 10px;
  opacity: 0.8;
}

/* War Stats Bar */
.war-stats-bar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(26,58,138,0.15);
  border: 1px solid rgba(212,175,55,0.1);
  border-radius: var(--radius);
  padding: 12px;
}

.war-stat {
  display: flex;
  align-items: center;
  gap: 8px;
}

.war-stat-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-dim);
  min-width: 70px;
}

.war-stat-track {
  flex: 1;
  height: 8px;
  background: rgba(255,255,255,0.1);
  border-radius: 4px;
  overflow: hidden;
}

.war-stat-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s ease, background 0.3s ease;
}

.war-stat-value {
  font-size: 13px;
  font-weight: 700;
  min-width: 50px;
  text-align: right;
}

.war-casualties-value {
  color: #EF4444;
}

.war-phase-desc {
  font-size: 14px;
  color: var(--text);
  line-height: 1.4;
  padding: 8px 0;
}

/* War Options */
.war-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.war-option {
  background: rgba(26,58,138,0.2);
  border: 1px solid rgba(212,175,55,0.15);
  border-radius: var(--radius);
  padding: 12px 14px;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: left;
  color: var(--text);
}

.war-option:hover {
  border-color: rgba(212,175,55,0.4);
  background: rgba(26,58,138,0.3);
  box-shadow: var(--btn-glow);
}

.war-option-text {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
}

.war-option-risk {
  font-size: 12px;
  font-weight: 700;
}

/* War Phase Result */
.war-phase-result {
  text-align: center;
  padding: 16px;
  border-radius: var(--radius);
  background: rgba(26,58,138,0.15);
  border: 1px solid rgba(212,175,55,0.1);
}

.war-phase-success {
  border-color: rgba(34,197,94,0.3);
  background: rgba(34,197,94,0.06);
}

.war-phase-failure {
  border-color: rgba(239,68,68,0.3);
  background: rgba(239,68,68,0.06);
}

.war-result-icon {
  font-size: 36px;
  margin-bottom: 4px;
}

.war-result-label {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 4px;
}

.war-phase-success .war-result-label { color: #22C55E; }
.war-phase-failure .war-result-label { color: #EF4444; }

.war-result-choice {
  font-size: 14px;
  color: var(--text);
  font-weight: 600;
  margin-bottom: 4px;
}

.war-result-message {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.4;
  margin-bottom: 4px;
}

.war-result-chance {
  font-size: 12px;
  color: var(--text-muted);
}

.war-continue-btn {
  width: 100%;
  font-size: 14px;
  padding: 12px;
  margin-top: 8px;
}

/* War Final Result */
.war-final-summary {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.war-final-message {
  font-size: 15px;
  color: var(--text);
  line-height: 1.5;
  text-align: center;
}

.war-final-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.war-final-stat {
  background: rgba(26,58,138,0.15);
  border: 1px solid rgba(212,175,55,0.1);
  border-radius: 8px;
  padding: 10px;
  text-align: center;
}

.war-final-stat-label {
  display: block;
  font-size: 11px;
  color: var(--text-dim);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.war-final-stat-value {
  display: block;
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
}

.war-final-phases {
  background: rgba(26,58,138,0.1);
  border: 1px solid rgba(212,175,55,0.1);
  border-radius: var(--radius);
  padding: 12px;
}

.war-final-phases-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.war-final-phase-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.war-final-phase-row:last-child {
  border-bottom: none;
}

.war-final-phase-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-dim);
  min-width: 60px;
}

.war-final-phase-status {
  font-size: 12px;
  font-weight: 700;
  min-width: 55px;
}

.war-final-phase-choice {
  font-size: 12px;
  color: var(--text-muted);
  flex: 1;
}

.war-final-effects {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.war-return-btn {
  width: 100%;
  font-size: 14px;
  padding: 14px;
  margin-top: 8px;
}

/* War SCOTUS / Congress overlays */
.war-scotus-body,
.war-congress-body {
  background: rgba(26,58,138,0.2);
  border: 1px solid rgba(212,175,55,0.15);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
}

.war-scotus-message,
.war-congress-message {
  font-size: 14px;
  color: var(--text);
  line-height: 1.5;
  margin-bottom: 10px;
}

.war-scotus-composition {
  font-size: 13px;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 4px;
}

.war-scotus-chance {
  font-size: 14px;
  color: var(--text-dim);
  font-weight: 700;
}

.war-congress-desc {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.4;
}

.war-congress-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.war-scotus-btn,
.war-congress-defy-btn {
  width: 100%;
  font-size: 14px;
  padding: 12px;
}

.war-congress-comply-btn {
  width: 100%;
  font-size: 13px;
  padding: 10px;
  opacity: 0.8;
}

/* ═══ War Territory Grid ═══ */

.war-grid-stats {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 6px;
  max-width: 100%;
}

.wg-stat {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-dim);
  background: rgba(26,58,138,0.15);
  padding: 4px 8px;
  border-radius: 6px;
}

.wg-stat-player { color: #3B82F6; }
.wg-stat-enemy { color: #EF4444; }
.wg-stat-neutral { color: #9CA3AF; }

.war-capital-bar {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
  color: var(--gold);
  padding: 6px 10px;
  background: rgba(212,175,55,0.08);
  border-radius: 6px;
  margin-bottom: 6px;
}

.war-grid {
  display: grid;
  gap: 2px;
  padding: 3px;
  background: rgba(0,0,0,0.3);
  border-radius: 8px;
  border: 1px solid rgba(212,175,55,0.1);
  margin-bottom: 8px;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.war-grid-small {
  gap: 2px;
  padding: 3px;
}

.war-grid-small .wg-cell {
  padding: 4px 2px;
  min-height: 28px;
}

.war-grid-small .wg-cell-name {
  font-size: 7px;
}

.wg-cell {
  padding: 4px 2px;
  border-radius: 4px;
  text-align: center;
  min-height: 32px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: default;
  transition: all 0.2s;
  border: 1px solid transparent;
  overflow: hidden;
}

.wg-cell-neutral {
  background: rgba(156,163,175,0.15);
  border-color: rgba(156,163,175,0.2);
}

.wg-cell-player {
  background: rgba(59,130,246,0.25);
  border-color: rgba(59,130,246,0.4);
}

.wg-cell-enemy {
  background: rgba(239,68,68,0.2);
  border-color: rgba(239,68,68,0.35);
}

.wg-cell-targetable {
  cursor: pointer;
}

.wg-cell-targetable:active {
  transform: scale(0.95);
}

.wg-cell-selected {
  border-color: var(--gold) !important;
  box-shadow: 0 0 8px rgba(212,175,55,0.4);
}

.wg-cell-name {
  font-size: 8px;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  line-height: 1.1;
}

.wg-cell-alloc {
  font-size: 10px;
  font-weight: 800;
  color: var(--gold);
  margin-top: 1px;
}

.wg-cell-flag {
  font-size: 12px;
  color: #3B82F6;
}

.wg-flash-capture {
  animation: flashGreen 0.6s ease;
}

.wg-flash-lost {
  animation: flashRed 0.6s ease;
}

@keyframes flashGreen {
  0%, 100% { box-shadow: none; }
  50% { box-shadow: 0 0 12px rgba(34,197,94,0.6); background: rgba(34,197,94,0.3); }
}

@keyframes flashRed {
  0%, 100% { box-shadow: none; }
  50% { box-shadow: 0 0 12px rgba(239,68,68,0.6); background: rgba(239,68,68,0.3); }
}

.war-alloc-controls {
  background: rgba(26,58,138,0.15);
  border: 1px solid rgba(212,175,55,0.1);
  border-radius: 8px;
  padding: 8px 12px;
  text-align: center;
  margin-bottom: 8px;
}

.war-alloc-label {
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 6px;
}

.war-alloc-btns {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.war-alloc-btn {
  padding: 6px 14px !important;
  font-size: 14px !important;
  min-width: 44px;
}

.war-alloc-current {
  font-size: 20px;
  font-weight: 800;
  color: var(--gold);
  min-width: 30px;
  text-align: center;
}

.war-grid-launch-btn {
  width: 100%;
  font-size: 14px;
  padding: 12px;
}

.war-grid-launch-btn:disabled {
  opacity: 0.4;
  pointer-events: none;
}

/* Grid Results */
.war-grid-results-summary {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 8px;
}

.wgr-stat {
  font-size: 16px;
  font-weight: 800;
  padding: 6px 16px;
  border-radius: 8px;
}

.wgr-captured {
  color: #22C55E;
  background: rgba(34,197,94,0.1);
  border: 1px solid rgba(34,197,94,0.3);
}

.wgr-lost {
  color: #EF4444;
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.3);
}

.war-grid-detail {
  background: rgba(26,58,138,0.1);
  border-radius: 8px;
  padding: 8px 12px;
  margin-bottom: 6px;
}

.wgd-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.wgd-item {
  font-size: 12px;
  color: var(--text-dim);
  padding: 2px 0;
}

.wgd-captured { color: #22C55E; }
.wgd-lost { color: #EF4444; }

.war-grid-next-btn {
  width: 100%;
  font-size: 14px;
  padding: 12px;
  margin-top: 6px;
}

/* ═══ SCOTUS Review Overlay (Executive Order Challenge) ═══ */

.scotus-review-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: 1000;
  padding: 20px;
}

.scotus-review-card {
  background: var(--card-bg-solid);
  border: 1px solid rgba(212,175,55,0.3);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  max-width: 320px;
  width: 100%;
  box-shadow: var(--card-shadow);
}

.scotus-review-badge {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--gold);
  margin-bottom: 12px;
}

.scotus-review-icon {
  font-size: 40px;
  margin-bottom: 8px;
}

.scotus-review-verdict {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 2px;
  margin-bottom: 8px;
}

.scotus-review-order {
  font-size: 14px;
  color: var(--text);
  font-style: italic;
  margin-bottom: 8px;
}

.scotus-review-court {
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.scotus-review-effect {
  font-size: 14px;
  font-weight: 700;
}

.fadeOut {
  animation: fadeOut 0.4s ease forwards;
}

@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

/* ====== SENATE VOTING SESSION ====== */

.senate-voting-session {
  position: absolute;
  inset: 50px 0 0 0;
  display: flex;
  flex-direction: column;
  padding: 12px 16px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  z-index: 2;
}

.svs-header {
  text-align: center;
  margin-bottom: 8px;
}
.svs-header h2 {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  margin: 0 0 2px;
}
.svs-subtitle {
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  margin: 0;
}

.svs-progress-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 10px;
}
.svs-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  transition: all 0.3s;
}
.svs-dot-active { background: #F59E0B; box-shadow: 0 0 6px #F59E0B; }
.svs-dot-yay { background: #22C55E; }
.svs-dot-nay { background: #EF4444; }

.svs-bill-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  padding: 16px;
  text-align: center;
  margin-bottom: 12px;
  backdrop-filter: blur(8px);
}
.svs-bill-icon {
  font-size: 32px;
  margin-bottom: 6px;
}
.svs-bill-name {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}
.svs-bill-align {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}
.svs-bill-desc {
  font-size: 13px;
  color: rgba(255,255,255,0.7);
  line-height: 1.4;
  margin-bottom: 8px;
}
.svs-cosigners, .svs-stakes, .svs-impact {
  font-size: 11px;
  color: rgba(255,255,255,0.45);
  margin-bottom: 4px;
}
.svs-stakes { color: #F59E0B; font-weight: 600; }
.svs-impact { color: #3B82F6; }

.svs-filibuster {
  background: rgba(245,158,11,0.15);
  color: #F59E0B;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  margin: 6px 0;
  display: inline-block;
}
.svs-amendment-accepted {
  font-size: 11px;
  color: #A855F7;
  margin: 4px 0;
}

.svs-chance-bar {
  margin-top: 10px;
}
.svs-chance-label {
  font-size: 11px;
  color: rgba(255,255,255,0.5);
  margin-bottom: 4px;
}
.svs-chance-track {
  position: relative;
  height: 6px;
  background: rgba(255,255,255,0.1);
  border-radius: 3px;
  overflow: visible;
}
.svs-chance-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.5s ease;
}
.svs-chance-threshold {
  position: absolute;
  top: -3px;
  width: 2px;
  height: 12px;
  background: #fff;
  border-radius: 1px;
  transform: translateX(-1px);
}
.svs-chance-threshold-label {
  font-size: 10px;
  color: rgba(255,255,255,0.35);
  margin-top: 3px;
}

.svs-vote-buttons {
  display: flex;
  gap: 12px;
  margin-top: auto;
  padding-bottom: 12px;
}
.svs-vote-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 16px 10px;
  border-radius: 14px;
  border: 2px solid transparent;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  touch-action: manipulation;
}
.svs-vote-yay {
  background: rgba(34,197,94,0.15);
  border-color: rgba(34,197,94,0.3);
  color: #22C55E;
}
.svs-vote-yay:active { background: rgba(34,197,94,0.35); transform: scale(0.97); }
.svs-vote-nay {
  background: rgba(239,68,68,0.15);
  border-color: rgba(239,68,68,0.3);
  color: #EF4444;
}
.svs-vote-nay:active { background: rgba(239,68,68,0.35); transform: scale(0.97); }
.svs-vote-icon { font-size: 24px; }
.svs-vote-sub { font-size: 10px; font-weight: 400; opacity: 0.6; }

.svs-anim-semicircle {
  display: flex;
  justify-content: center;
  margin: 8px 0;
}
.svs-anim-svg {
  width: 100%;
  max-width: 320px;
  height: auto;
}
.svs-senator-dot {
  fill: rgba(255,255,255,0.15);
  transition: fill 0.15s;
}

.svs-tally {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  font-size: 18px;
  font-weight: 700;
  margin: 4px 0;
}
.svs-tally-yea { color: #22C55E; }
.svs-tally-nay { color: #EF4444; }
.svs-tally-sep { color: rgba(255,255,255,0.3); }

.svs-result-banner {
  text-align: center;
  padding: 12px;
  border: 2px solid;
  border-radius: 12px;
  background: rgba(0,0,0,0.3);
  margin: 8px 0;
}
.svs-result-status {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 1px;
}
.svs-result-score {
  font-size: 14px;
  color: rgba(255,255,255,0.7);
  margin-top: 2px;
}
.svs-result-breakdown {
  font-size: 12px;
  color: rgba(255,255,255,0.4);
}

.svs-results-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  flex: 1;
  margin-bottom: 10px;
}
.svs-result-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid;
  border-radius: 10px;
  padding: 12px;
}
.svs-result-card-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.svs-result-card-name {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}
.svs-result-card-detail {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: rgba(255,255,255,0.5);
}
.svs-result-tag {
  font-size: 11px;
  font-weight: 600;
  margin-top: 4px;
}

.svs-house-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}
.svs-house-bill {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 12px;
}
.svs-house-bill-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: #fff;
  margin-bottom: 6px;
}
.svs-house-chance {
  color: rgba(255,255,255,0.5);
  font-size: 11px;
}
.svs-house-bar {
  height: 5px;
  background: rgba(255,255,255,0.1);
  border-radius: 3px;
  overflow: hidden;
}
.svs-house-fill {
  height: 100%;
  background: linear-gradient(90deg, #3B82F6, #22C55E);
  border-radius: 3px;
  transition: width 0.5s;
}

.svs-bottom {
  padding: 8px 0;
  margin-top: auto;
}

/* ====== CONTESTED PRIMARY SCREEN ====== */

.contested-screen {
  position: absolute;
  inset: 50px 0 0 0;
  display: flex;
  flex-direction: column;
  padding: 16px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  z-index: 2;
}
.contested-intro, .contested-question, .contested-final {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
}
.contested-title {
  font-size: 22px;
  font-weight: 800;
  color: #F59E0B;
  letter-spacing: 1px;
  margin: 0;
}
.contested-subtitle {
  font-size: 13px;
  color: rgba(255,255,255,0.6);
  margin: 0;
}
.contested-standings {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 8px 0;
}
.contested-standing-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(255,255,255,0.06);
  font-size: 14px;
  color: #fff;
}
.contested-standing-player { border-left: 3px solid #22C55E; }
.contested-standing-rival { border-left: 3px solid #EF4444; }
.contested-standing-needed { border-left: 3px solid #F59E0B; }
.contested-standing-name { font-weight: 600; }
.contested-standing-delegates { color: rgba(255,255,255,0.7); }
.contested-standing-label { color: rgba(255,255,255,0.5); }
.contested-debate-intro {
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  margin: 0;
}
.contested-begin-btn { margin-top: 8px; }

.contested-question-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.contested-question-counter {
  font-size: 11px;
  color: rgba(255,255,255,0.4);
}
.contested-question-topic {
  font-size: 16px;
  font-weight: 700;
  color: #F59E0B;
}
.contested-question-text {
  font-size: 14px;
  color: rgba(255,255,255,0.8);
  line-height: 1.5;
  margin: 4px 0;
}
.contested-choices {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.contested-choice-btn {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
  padding: 14px;
}
.contested-choice-label {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}
.contested-choice-desc {
  font-size: 12px;
  color: rgba(255,255,255,0.6);
  line-height: 1.4;
}
.contested-choice-risk {
  font-size: 11px;
  color: #F59E0B;
  font-weight: 600;
}
.contested-score-bar {
  display: flex;
  justify-content: space-between;
  width: 100%;
  padding: 8px 12px;
  background: rgba(255,255,255,0.05);
  border-radius: 8px;
  font-size: 13px;
}
.contested-score-label { color: rgba(255,255,255,0.5); }
.contested-score-value { color: #F59E0B; font-weight: 700; }

.contested-question-result {
  padding: 10px;
  border-radius: 8px;
  text-align: center;
}
.contested-result-win { background: rgba(34,197,94,0.1); }
.contested-result-loss { background: rgba(239,68,68,0.1); }
.contested-result-text { font-size: 13px; color: rgba(255,255,255,0.7); }
.contested-result-points { font-size: 15px; font-weight: 700; margin-top: 4px; }

.contested-final-title {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  margin: 0;
}
.contested-final-summary {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.contested-final-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px;
  background: rgba(255,255,255,0.05);
  border-radius: 8px;
}
.contested-final-stat-label {
  font-size: 11px;
  color: rgba(255,255,255,0.4);
}
.contested-final-stat-value {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
}
.contested-final-verdict {
  width: 100%;
  padding: 16px;
  border-radius: 12px;
  text-align: center;
}
.contested-verdict-win { background: rgba(34,197,94,0.15); border: 1px solid rgba(34,197,94,0.3); }
.contested-verdict-loss { background: rgba(239,68,68,0.15); border: 1px solid rgba(239,68,68,0.3); }
.contested-verdict-title {
  font-size: 18px;
  font-weight: 800;
  margin: 0 0 6px;
}
.contested-verdict-win .contested-verdict-title { color: #22C55E; }
.contested-verdict-loss .contested-verdict-title { color: #EF4444; }
.contested-verdict-text {
  font-size: 13px;
  color: rgba(255,255,255,0.7);
  margin: 0 0 4px;
}
.contested-verdict-delegates {
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  margin: 0;
}
.contested-continue-btn { margin-top: 12px; }

/* ====== PROMISE HIGHLIGHT ====== */
@keyframes promisePulse {
  0%, 100% { border-color: rgba(212,175,55,0.6); box-shadow: 0 0 8px rgba(212,175,55,0.2); }
  50% { border-color: rgba(212,175,55,1); box-shadow: 0 0 16px rgba(212,175,55,0.4); }
}
.promise-highlight {
  animation: promisePulse 1.5s ease-in-out infinite;
  border: 2px solid var(--gold) !important;
  position: relative;
}
.promise-highlight::after {
  content: 'PROMISED';
  position: absolute;
  top: 4px;
  right: 4px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #0D1B48;
  background: var(--gold);
  padding: 1px 6px;
  border-radius: 4px;
  z-index: 2;
}

/* UI/UX audit polish: long-text wrap on dialogue response buttons */
.hos-response-btn {
  overflow-wrap: anywhere;
  word-break: normal;
}

