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

/* ====== 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: center;
  padding: 0;
  margin: 0;
}


/* ====== 2. 9:16 ASPECT RATIO CONTAINER + SAFE AREA ====== */
#game-root {
  width: 100%;
  height: 100dvh;
  max-width: calc(100dvh * 9 / 16);
  max-height: 100dvh;
  display: flex;
  flex-direction: column;
  position: relative;
  background: var(--bg);
  overflow: hidden;
  margin: 0 auto;
  /* Safe area handled at root — injected from React Native as --sat/--sab */
  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;
}


/* ====== 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 — icon-only, slate-blue gradient, gold hover accent */
.btn-back,
.btn-glass.btn-back {
  padding: 8px;
  font-size: 0;
  width: 36px;
  height: 36px;
  min-height: 36px;
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.35), rgba(51, 65, 85, 0.3));
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 10px;
  color: #CBD5E1;
  cursor: pointer;
  transition: all 0.2s ease;
  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.05);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-back:hover,
.btn-glass.btn-back:hover {
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.5), rgba(51, 65, 85, 0.4));
  border-color: rgba(212, 175, 55, 0.35);
  color: #E2E8F0;
  box-shadow: 0 2px 12px rgba(30, 58, 138, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.btn-back:active,
.btn-glass.btn-back:active {
  transform: scale(0.96);
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.55), rgba(51, 65, 85, 0.45));
}

.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 --- */
.screen-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 140px 12px 16px;
  border-bottom: 1px solid var(--glass-border);
  background: var(--surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  min-height: 48px;
  flex-shrink: 0;
  position: relative;
  z-index: 10;
}

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

.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 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 (Pause / Mute / Exit) ====== */
.game-hud {
  position: absolute;
  top: calc(8px + var(--sat, env(safe-area-inset-top, 0px)));
  right: 12px;
  left: 12px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  z-index: 9000;
  pointer-events: auto;
}

.hud-btn {
  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-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: fixed;
  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: 32px 40px;
  min-width: 260px;
  max-width: 320px;
}

.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: 24px;
  gap: 20px;
  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;
  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; }


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

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

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

.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: 12px 14px 8px;
}

.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 14px 14px;
}

.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;
}

.office-hud {
  padding: 12px 16px;
  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); }

.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%;
}

/* 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: 12px 6px;
  gap: 3px;
  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: 80px;
  font-family: inherit;
}

.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-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

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

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

.impact-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-height: 20px;
}

/* 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;
}

.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);
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
}

.npc-grid {
  flex: 1;
  overflow-y: auto;
  padding: 6px 10px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: repeat(4, 1fr);
  gap: 6px;
}

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

.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: 8px;
}

.npc-portrait {
  width: 96px;
  height: 96px;
  min-width: 96px;
  border-radius: 50%;
  border: 2px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  background: rgba(255, 255, 255, 0.04);
}

.npc-info { text-align: left; }
.npc-name { font-size: 13px; font-weight: 700; line-height: 1.2; color: var(--text); }
.npc-role { font-size: 10px; color: var(--text-dim); }

/* 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 — gold border glow */
.npc-badges {
  display: flex;
  gap: 3px;
  flex-wrap: wrap;
}

.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;
  border-top: 1px solid var(--glass-border);
}


/* ====== 13. MEETING SCREEN / DIALOGUE ====== */
.meeting-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* NPC portrait header with mood indicator */
.meeting-npc {
  display: flex;
  align-items: center;
  gap: 16px;
  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;
}

.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: fixed;
  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);
}


/* ====== 16. EVENT SCREEN ====== */
.event-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  gap: 16px;
}

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

.event-emoji { font-size: 64px; filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3)); }

/* 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: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  line-height: 1.3;
  color: var(--text);
}

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

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

.event-none {
  color: var(--text-dim);
  text-align: center;
  padding: 40px;
  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; }
.option-description { font-size: 12px; color: var(--text-dim); line-height: 1.4; }
.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: center;
  padding: 24px;
  gap: 20px;
  background: radial-gradient(ellipse at 50% 30%, rgba(26, 58, 138, 0.3) 0%, transparent 70%);
}

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

.election-title {
  font-size: 28px;
  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: 14px;
  color: var(--text-dim);
  margin-top: 8px;
}

/* State map filling animation */
.election-map {
  width: 100%;
  max-width: 320px;
  position: relative;
}

.election-map svg {
  width: 100%;
  height: auto;
}

.county-region {
  fill: rgba(255, 255, 255, 0.05);
  stroke: rgba(255, 255, 255, 0.1);
  stroke-width: 0.5;
  transition: fill 0.3s ease;
}

.county-region.player-won {
  fill: var(--primary-light);
  stroke: rgba(37, 99, 235, 0.5);
}

.county-region.opponent-won {
  fill: var(--red);
  stroke: rgba(220, 38, 38, 0.5);
}

.county-region.counting {
  animation: pulse 0.5s ease-in-out;
}

/* Running vote tally — two columns */
.vote-display {
  display: flex;
  align-items: center;
  gap: 20px;
  width: 100%;
  max-width: 400px;
}

.vote-side {
  flex: 1;
  text-align: center;
}

.vote-label {
  font-size: 14px;
  color: var(--text-dim);
  margin-bottom: 4px;
}

.vote-count {
  font-size: 36px;
  font-weight: 900;
  transition: all 0.1s;
}

.player-side .vote-count { color: var(--gold); }
.opponent-side .vote-count { color: var(--text-dim); }

.vote-vs {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-muted);
}

/* Vote tick counters */
.vote-tick {
  animation: vote-tick 0.2s ease;
}

/* Vote bar */
.vote-bar-container {
  width: 100%;
  max-width: 400px;
  position: relative;
}

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

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

.vote-bar-center-line {
  position: absolute;
  left: 50%;
  top: -4px;
  width: 2px;
  height: 32px;
  background: white;
  opacity: 0.5;
}

/* Drumroll progress bar */
.drumroll-bar {
  width: 100%;
  max-width: 400px;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
}

.drumroll-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--gold), var(--primary-light));
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: 2px;
  transition: width 0.3s ease;
}

/* "PROJECTED WINNER" flash */
.projected-winner {
  text-align: center;
  animation: flashBanner 1s ease-in-out 3;
}

.projected-winner-label {
  font-size: 12px;
  color: var(--gold);
  letter-spacing: 3px;
  text-transform: uppercase;
  font-weight: 700;
}

.projected-winner-name {
  font-size: 28px;
  font-weight: 900;
  margin-top: 4px;
  text-shadow: 0 2px 12px rgba(255, 255, 255, 0.2);
}

.projected-winner-name.player { color: var(--gold-light); }
.projected-winner-name.opponent { color: var(--red-light); }

/* Election result banner */
.election-result {
  text-align: center;
  animation: slideUp 0.6s ease-out;
}

.result-banner {
  font-size: 22px;
  font-weight: 900;
  padding: 16px 32px;
  border-radius: var(--radius);
}

.result-win {
  background: rgba(34, 197, 94, 0.2);
  color: var(--green);
  border: 2px solid var(--green);
}

.result-lose {
  background: rgba(239, 68, 68, 0.2);
  color: var(--danger);
  border: 2px solid var(--danger);
}

/* Demographic breakdown table */
.demographic-breakdown {
  width: 100%;
  max-width: 400px;
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
}

.demo-table-header {
  display: flex;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.04);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.demo-table-row {
  display: flex;
  padding: 8px 12px;
  font-size: 13px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.demo-table-cell {
  flex: 1;
  text-align: center;
}

.demo-table-cell:first-child { text-align: left; color: var(--text-dim); }
.demo-table-cell.player-col { color: var(--blue-light); font-weight: 600; }
.demo-table-cell.opponent-col { color: var(--red-light); font-weight: 600; }

.continue-btn { animation: slideUp 0.4s ease-out; }


/* ====== 18. RESULTS SCREEN (compact single-viewport) ====== */
.results-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px env(safe-area-inset-bottom, 12px);
  gap: 8px;
  overflow: hidden;
}

/* Banner row — SVG icon left of text */
.results-banner-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  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: 18px; font-weight: 900; color: var(--text); margin: 0; letter-spacing: 1px; }
.banner-margin { font-size: 11px; color: var(--text-dim); margin-top: 2px; }

/* Grade circle + vote bar side by side */
.results-grade-vote-row {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
}
.results-grade-compact {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
}
.grade-circle-sm {
  width: 52px; height: 52px;
  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: 22px; font-weight: 900; }
.grade-score-sm { font-size: 10px; color: var(--text-dim); }

.results-vote-compact { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.vote-numbers-row { display: flex; align-items: center; justify-content: space-between; }
.vote-bar-compact {
  display: flex; height: 6px; border-radius: 3px; 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: 5px;
}
.rb-item {
  background: var(--card-bg);
  border-radius: var(--radius-sm);
  padding: 6px 8px;
  border: 1px solid rgba(255,255,255,0.04);
}
.rb-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 3px; }
.rb-label { font-size: 10px; font-weight: 600; color: var(--text); }
.rb-value { font-size: 10px; font-weight: 700; }
.rb-bar { height: 4px; background: rgba(255,255,255,0.08); border-radius: 2px; overflow: hidden; }
.rb-fill { height: 100%; border-radius: 2px; transition: width 0.6s ease; }
.rb-fill.bar-animate { animation: fillExpand 0.8s ease-out; }

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

/* Play Again / Exit */
.results-actions {
  display: flex;
  gap: 10px;
  width: 100%;
}
.results-actions .btn-glass { flex: 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-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;
}
.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: fixed;
  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-end;
  justify-content: center;
  padding: 0;
}
.hos-dialogue-panel {
  width: 100%;
  max-width: 480px;
  max-height: 85%;
  background: var(--bg);
  border-top: 2px solid var(--gold);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slideUp 0.3s ease-out;
}
.hos-dialogue-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--glass-border);
  flex-shrink: 0;
}
.hos-dialogue-npc-portrait { font-size: 36px; }
.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: 3px 10px;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 10px;
}
.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: 17px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 8px;
}
.news-card-detail {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.5;
  margin-bottom: 10px;
}
.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: 8px 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;
  gap: 6px;
  padding: 8px 16px;
  border-top: 1px solid var(--glass-border);
  flex-shrink: 0;
}
.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%; }


/* ====================================================================
   COUNTY ANIMATION GRID (election screen)
   ==================================================================== */
.county-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 3px;
  width: 100%;
  max-width: 320px;
}
.county-cell {
  aspect-ratio: 1;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.08);
  transition: background-color 0.2s, transform 0.2s;
}
.county-cell.flipped {
  animation: countUp 0.2s ease-out;
}

/* Demographic breakdown table */
.election-demographics {
  width: 100%;
  max-width: 400px;
}
.election-demographics h3 {
  font-size: 14px;
  color: var(--gold);
  text-align: center;
  margin-bottom: 10px;
}
.demo-breakdown-table {
  width: 100%;
  border-collapse: collapse;
}
.demo-breakdown-table th {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 4px 8px;
  text-align: center;
  border-bottom: 1px solid var(--glass-border);
}
.demo-breakdown-table td {
  font-size: 13px;
  padding: 6px 8px;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}
.demo-breakdown-table td:first-child { text-align: left; }

/* 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: 40px 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); }

.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-effects { display: flex; flex-wrap: wrap; gap: 5px; }
.eo-effect-chip {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  border: 1px solid;
  white-space: nowrap;
}
.eo-disabled-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--danger);
  margin-top: 6px;
}
.event-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  gap: 16px;
  padding: 40px 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;
  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;
}

.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;
  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;
  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-turns {
  font-size: 10px;
  font-weight: 600;
  color: var(--gold);
  padding: 2px 8px;
  border-radius: 8px;
  background: rgba(212, 175, 55, 0.1);
}

.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;
  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 12px;
  padding: 12px 16px;
  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: 80px;
  font-size: 15px;
  padding: 16px;
  border-radius: 12px;
  margin-bottom: 10px;
  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;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
}
.budget-slider-row .bar-label {
  min-width: 100px;
  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);
}

/* --- News screen Shortee style upgrades --- */
.news-screen {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.news-broadcast-header {
  text-align: center;
  padding: 12px 16px 4px;
}
.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: 24px;
  padding: 12px 16px;
  background: linear-gradient(135deg, rgba(26,58,138,0.5), rgba(13,27,72,0.7));
  border-radius: 12px;
  margin: 4px 12px 8px;
  border: 1px solid rgba(212,175,55,0.15);
}
.news-anchor-portrait {
  position: relative;
  width: 90px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.anchor-img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--gold);
  filter: drop-shadow(0 0 12px rgba(212,175,55,0.3));
}
.anchor-glow {
  position: absolute;
  top: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 88px;
  height: 88px;
  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: 4px;
  flex-shrink: 0;
}
.player-thumbnail {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  border: 3px 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 16px rgba(212,175,55,0.2);
}
.player-initial {
  font-size: 28px;
  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 {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.player-role-label {
  font-size: 10px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* --- Last turn actions list --- */
.news-last-actions {
  margin: 8px 12px 16px;
  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: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(212,175,55,0.1);
  background: rgba(212,175,55,0.06);
}
.last-actions-icon {
  font-size: 14px;
}
.last-actions-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.last-actions-list {
  max-height: 200px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 6px 0;
}
.last-action-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  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: 16px;
  flex-shrink: 0;
  width: 24px;
  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; }
.news-tab-panel { display: none; }
.news-tab-panel.active { display: block; }

/* Polling panel */
.polls-empty {
  text-align: center;
  padding: 30px 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-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: 5px;
  margin-top: auto;
  padding-top: 6px;
}
.cabinet-action-btn {
  flex: 1;
  padding: 6px 4px;
  border-radius: 8px;
  font-size: 12px;
  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;
}

/* --- 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: fixed;
  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;
}
