/* Cookie Scout Turf Wars — Glass Morphism Cookie Theme */
/* Adapted from Head of State presidential aesthetic for cookie hustle */

/* ====== 1. RESET & ROOT VARIABLES ====== */
:root {
  --cookie-brown: #8B4513;
  --cookie-brown-light: #A0522D;
  --cookie-brown-dark: #5C2D0E;
  --cookie-light: #D2A679;
  --cookie-cream: #FFF5E6;
  --cookie-pink: #FFB6C1;
  --mint-green: #98FB98;
  --cash-green: #22C55E;
  --cash-green-light: #86EFAC;
  --debt-red: #EF4444;
  --debt-red-light: #FCA5A5;
  --debt-orange: #F97316;
  --gold: #FFD700;
  --gold-light: #FFE44D;
  --gold-dim: rgba(255, 215, 0, 0.3);
  --accent: #E8845C;
  --accent-light: #F0A07A;
  --accent-dark: #C4603A;
  --bg-dark: #2D1810;
  --bg-darker: #1a0e08;
  --bg-card: rgba(255, 245, 230, 0.12);
  --surface: rgba(139, 69, 19, 0.15);
  --surface-solid: rgba(45, 24, 16, 0.95);
  --text: #FFF5E6;
  --text-dim: rgba(255, 245, 230, 0.6);
  --text-muted: rgba(255, 245, 230, 0.35);
  --border: rgba(255, 245, 230, 0.15);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --glass-blur: 20px;
  --glass-bg: rgba(255, 255, 255, 0.06);
  --glass-border: rgba(232, 132, 92, 0.2);
  --glass-border-bright: rgba(232, 132, 92, 0.4);
  --card-bg: rgba(139, 69, 19, 0.2);
  --card-bg-solid: rgba(45, 24, 16, 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(232, 132, 92, 0.1);
  --btn-glow: 0 0 20px rgba(232, 132, 92, 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-dark);
  color: var(--text);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 0;
  margin: 0;
}

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

#game-root {
  width: 390px;
  height: 844px;
  display: flex;
  flex-direction: column;
  position: relative;
  background: linear-gradient(180deg, var(--bg-dark) 0%, var(--bg-darker) 100%);
  overflow: hidden;
  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(139, 69, 19, 0.15) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(232, 132, 92, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(92, 45, 14, 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); }
}

/* Ensure all content sits above the background */
#game-root > * {
  position: relative;
  z-index: 1;
}

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

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

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

@keyframes glow {
  0%, 100% { box-shadow: 0 0 8px rgba(232, 132, 92, 0.2); }
  50% { box-shadow: 0 0 20px rgba(232, 132, 92, 0.4); }
}

@keyframes cookiePulse {
  0%, 100% { box-shadow: 0 0 30px rgba(232, 132, 92, 0.25), 0 4px 20px rgba(232, 132, 92, 0.15); }
  50% { box-shadow: 0 0 40px rgba(232, 132, 92, 0.35), 0 4px 24px rgba(232, 132, 92, 0.2); }
}

.fadeIn { animation: fadeIn 0.3s ease-out; }

/* ====== 4. TYPOGRAPHY ====== */
h1 {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 2px;
  background: linear-gradient(135deg, var(--gold), var(--gold-light), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 2px 8px rgba(255, 215, 0, 0.3));
}

h2 {
  font-size: 22px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--gold), var(--gold-light), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 1px 6px rgba(255, 215, 0, 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(--cash-green); }
.text-red { color: var(--debt-red); }
.text-orange { color: var(--debt-orange); }
.text-center { text-align: center; }
.text-small { font-size: 12px; }
.text-xs { font-size: 10px; }

/* ====== 5. 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(232, 132, 92, 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;
}

/* Gold accent button */
.btn-glass.btn-gold,
.btn-gold {
  background: linear-gradient(135deg, rgba(184, 134, 11, 0.2), rgba(255, 215, 0, 0.12), rgba(255, 228, 77, 0.08));
  border-color: var(--gold);
  border-top-color: rgba(255, 228, 77, 0.5);
  color: var(--gold-light);
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  box-shadow:
    0 4px 16px rgba(255, 215, 0, 0.12),
    0 0 30px rgba(255, 215, 0, 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(255, 215, 0, 0.2), rgba(255, 228, 77, 0.12));
  box-shadow: 0 0 30px rgba(255, 215, 0, 0.25), 0 4px 20px rgba(255, 215, 0, 0.15);
  animation: cookiePulse 1.5s ease-in-out infinite;
}

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

/* Primary — cookie orange gradient */
.btn-glass.btn-primary,
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  border-color: var(--gold);
  border-top-color: rgba(255, 215, 0, 0.5);
  color: white;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  box-shadow:
    0 4px 20px rgba(232, 132, 92, 0.3),
    0 0 30px rgba(232, 132, 92, 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(--accent-light), var(--accent));
  box-shadow:
    0 6px 24px rgba(232, 132, 92, 0.4),
    0 0 40px rgba(255, 215, 0, 0.1);
}

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

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

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

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

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

/* ====== 6. LEGACY BUTTON COMPAT (cstw- prefix) ====== */
.cstw-btn {
  padding: 14px 32px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: transform 0.1s, box-shadow 0.1s;
  position: relative;
  overflow: hidden;
}

.cstw-btn:active { transform: scale(0.96); }

.cstw-btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: white;
  box-shadow: 0 4px 15px rgba(232, 132, 92, 0.4);
  border: 1px solid rgba(255, 215, 0, 0.3);
}

.cstw-btn-primary::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 50%;
  background: linear-gradient(180deg, rgba(255,255,255,0.1) 0%, transparent 100%);
  pointer-events: none;
}

.cstw-btn-secondary {
  background: var(--glass-bg);
  color: var(--text-dim);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
}

.cstw-btn-small { padding: 8px 16px; font-size: 12px; border-radius: var(--radius-sm); }
.cstw-btn-disabled { opacity: 0.4; pointer-events: none; }

/* ====== 7. TOPIC CARDS — for pitches, taste tests, event options ====== */
.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(--accent);
  background: rgba(139, 69, 19, 0.3);
  box-shadow: var(--btn-glow);
}

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

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

.topic-info { flex: 1; }

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

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

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

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

/* ====== 8. ACTION BUTTONS — 3-column grid tiles ====== */
.action-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

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

.action-btn:hover {
  background: rgba(139, 69, 19, 0.35);
  border-color: var(--accent);
  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(255, 215, 0, 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; }

/* ====== 9. EFFECT CHIPS — +/- stat changes ====== */
.effect-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.effect-chip-positive {
  color: var(--cash-green);
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.25);
}

.effect-chip-negative {
  color: var(--debt-red);
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.effect-chip-neutral {
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ====== 10. SEVERITY BADGES ====== */
.severity-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.severity-low {
  color: var(--cash-green);
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.severity-medium {
  color: var(--gold);
  background: rgba(255, 215, 0, 0.15);
  border: 1px solid rgba(255, 215, 0, 0.3);
}

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

.severity-critical {
  color: var(--debt-red);
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* ====== 11. HUD ====== */
/* ── HUD — Head of State style persistent top bar ──────────────── */
.cstw-hud {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(45, 24, 16, 0.94);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(232, 132, 92, 0.2);
  padding: 0; font-size: 12px; font-weight: 600;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}
.cstw-hud-row1 {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 10px 5px;
}
/* Nav buttons */
.cstw-hud-nav { display: flex; gap: 4px; flex-shrink: 0; }
.cstw-hud-btn {
  width: 28px; height: 28px; border-radius: 8px; border: none;
  background: rgba(255,255,255,0.08); color: var(--text);
  font-size: 14px; cursor: pointer; display: flex;
  align-items: center; justify-content: center;
  transition: all 0.1s; border: 1px solid rgba(255,255,255,0.1);
}
.cstw-hud-btn:active { transform: scale(0.9); background: rgba(255,255,255,0.15); }
/* Stats group */
.cstw-hud-stats {
  display: flex; align-items: center; gap: 4px; flex-shrink: 0;
}
.cstw-hud-stat { display: flex; align-items: center; gap: 2px; }
.cstw-hud-stat-val { font-variant-numeric: tabular-nums; font-size: 12px; font-weight: 700; }
.cstw-hud-divider { color: rgba(255,245,230,0.15); font-size: 10px; }
/* Day */
.cstw-hud-day {
  flex: 1; text-align: center;
  font-size: 12px; font-weight: 800; color: var(--gold); letter-spacing: 0.5px;
}
/* Right group */
.cstw-hud-right-group {
  display: flex; flex-direction: column; align-items: flex-end; gap: 2px; flex-shrink: 0;
}
.cstw-hud-cred-wrap {
  display: flex; align-items: center; gap: 3px; position: relative;
}
.cstw-hud-notif {
  position: absolute; top: -3px; right: -3px; width: 7px; height: 7px;
  border-radius: 50%; background: #F97316;
  border: 1.5px solid rgba(45,24,16,0.9);
  animation: pulse 1.5s ease-in-out infinite;
}
.cstw-hud-cred-track {
  width: 32px; height: 5px; border-radius: 3px;
  background: rgba(255,255,255,0.08); overflow: hidden;
}
.cstw-hud-cred-fill {
  height: 100%; border-radius: 3px; transition: width 0.3s;
}
.cstw-hud-cred-num { font-size: 9px; font-weight: 700; }
.cstw-hud-wagon-wrap { display: flex; align-items: center; gap: 2px; }
/* Location bar */
.cstw-hud-loc {
  font-size: 9px; color: rgba(255,245,230,0.4); text-align: center;
  padding: 2px 10px 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  border-top: 1px solid rgba(255,255,255,0.04);
}

.cstw-hud-item { display: flex; align-items: center; gap: 4px; }
.cstw-hud-value { font-variant-numeric: tabular-nums; }
.cstw-hud-cash { color: var(--cash-green); }
.cstw-hud-debt { color: var(--debt-orange); }
.cstw-hud-inv { color: var(--cookie-light); }
.cstw-hud-turn { color: var(--gold); }
.cstw-hud-cred { color: var(--accent); }

/* ====== 12. TITLE SCREEN ====== */
/* Title screen with poster image */
.cstw-title-screen {
  display: flex; flex-direction: column; align-items: center;
  height: 100%; position: relative; overflow: hidden;
  animation: fadeIn 0.5s ease-out;
}

.cstw-title-poster {
  width: 100%; flex: 1; display: flex; align-items: center; justify-content: center;
  padding: 20px; position: relative;
}
.cstw-title-poster-img {
  width: 100%; height: 100%; object-fit: contain;
  border-radius: 16px;
  filter: drop-shadow(0 8px 24px rgba(0,0,0,0.6));
}

.cstw-title-content {
  width: 100%; padding: 16px 24px 32px; text-align: center;
  background: linear-gradient(0deg, rgba(26,14,8,0.98) 0%, rgba(26,14,8,0.85) 60%, transparent 100%);
  position: relative; z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}

.cstw-title-heading {
  font-size: 26px; font-weight: 900; letter-spacing: 2px; text-transform: uppercase;
  background: linear-gradient(135deg, var(--gold), var(--gold-light), var(--accent));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  filter: drop-shadow(0 2px 10px rgba(255,215,0,0.3));
  line-height: 1.2;
}

.cstw-title-tagline {
  font-size: 13px; color: var(--text-dim); max-width: 280px; line-height: 1.5;
}

.cstw-title-buttons {
  display: flex; gap: 10px; width: 100%; max-width: 280px; margin-top: 6px;
}
.cstw-title-buttons .btn-glass { flex: 1; }

/* ====== 13. MAP SCREEN ====== */
.cstw-map-screen {
  padding: 44px 8px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 100%;
  animation: fadeIn 0.3s ease-out;
}

.cstw-map-header { text-align: center; }

.cstw-map-title {
  font-size: 18px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--gold), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 1px;
}

.cstw-map-subtitle {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 2px;
}

.cstw-map-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

.cstw-map-svg {
  width: 100%;
  max-height: 500px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--glass-border);
  overflow: hidden;
  box-shadow: var(--card-shadow);
}

.cstw-map-zone { transition: fill-opacity 0.2s; }
.cstw-map-zone:hover { fill-opacity: 0.45 !important; }

.cstw-map-legend {
  display: flex;
  justify-content: center;
  gap: 16px;
  font-size: 11px;
  color: var(--text-dim);
  font-weight: 600;
}

.cstw-legend-item { display: flex; align-items: center; gap: 4px; }
.cstw-legend-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }

/* ====== 14. MARKET SCREEN ====== */
.cstw-market-screen {
  padding: 44px 10px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  animation: fadeIn 0.3s ease-out;
}

.cstw-market-header { text-align: center; margin-bottom: 2px; }

.cstw-market-location {
  font-size: 18px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--gold), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
}

/* Quantity selector — glass pill group */
.cstw-qty-selector {
  display: flex;
  gap: 0;
  justify-content: center;
  align-items: center;
  margin: 4px auto;
  background: var(--glass-bg);
  border-radius: 20px;
  border: 1px solid var(--glass-border);
  padding: 2px;
  overflow: hidden;
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
}

.cstw-qty-label {
  font-size: 10px;
  color: var(--text-dim);
  font-weight: 700;
  padding: 0 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.cstw-qty-btn {
  padding: 6px 14px;
  border: none;
  border-radius: 18px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-dim);
  background: transparent;
  transition: all var(--transition-fast);
}

.cstw-qty-active {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: white;
  box-shadow: 0 2px 8px rgba(232, 132, 92, 0.4);
}

/* Cookie market list */
.cstw-market-list { display: flex; flex-direction: column; gap: 6px; }

.cstw-market-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--glass-bg);
  border-radius: var(--radius);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

.cstw-market-row:hover {
  border-color: rgba(232, 132, 92, 0.3);
  background: rgba(255, 255, 255, 0.08);
}

.cstw-market-row-unavailable { opacity: 0.3; pointer-events: none; }

.cstw-market-cookie-info { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.cstw-market-emoji { font-size: 24px; flex-shrink: 0; }
.cstw-market-name { font-size: 12px; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.cstw-market-price-area { display: flex; align-items: center; gap: 4px; min-width: 60px; justify-content: flex-end; }

.cstw-market-price {
  font-size: 15px;
  font-weight: 800;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 4px rgba(255, 215, 0, 0.2);
}

.cstw-price-na { color: var(--text-dim); font-size: 14px; }
.cstw-price-up { color: var(--cash-green); font-size: 11px; font-weight: 800; }
.cstw-price-down { color: var(--debt-red); font-size: 11px; font-weight: 800; }
.cstw-price-flat { color: var(--text-dim); font-size: 10px; }

.cstw-market-actions { display: flex; gap: 4px; flex-shrink: 0; }

/* Glass buy/sell buttons */
.cstw-btn-buy, .cstw-btn-sell {
  position: relative;
  border: none;
  cursor: pointer;
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: all 0.1s;
  overflow: hidden;
}

.cstw-btn-buy {
  background: linear-gradient(135deg, #22C55E, #16A34A);
  color: white;
  box-shadow: 0 2px 6px rgba(34, 197, 94, 0.3);
}

.cstw-btn-buy:active { transform: scale(0.95); box-shadow: 0 1px 3px rgba(34, 197, 94, 0.2); }

.cstw-btn-sell {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: white;
  box-shadow: 0 2px 6px rgba(232, 132, 92, 0.3);
}

.cstw-btn-sell:active { transform: scale(0.95); }
.cstw-btn-sell:disabled { opacity: 0.3; pointer-events: none; }

/* Glass shine on buy/sell buttons */
.cstw-btn-buy::before, .cstw-btn-sell::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.15) 0%, transparent 100%);
  pointer-events: none;
  border-radius: 8px 8px 0 0;
}

/* ====== 15. INVENTORY SECTION ====== */
.cstw-inventory-section {
  margin-top: 4px;
  padding: 10px 12px;
  background: var(--glass-bg);
  border-radius: var(--radius);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
}

.cstw-inventory-heading {
  font-size: 12px;
  font-weight: 700;
  color: var(--cookie-light);
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.cstw-inventory-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 12px;
}

.cstw-inventory-row:last-child { border-bottom: none; }
.cstw-inventory-emoji { font-size: 16px; }
.cstw-inventory-name { flex: 1; color: var(--text); font-weight: 600; }
.cstw-inventory-qty { color: var(--gold); font-weight: 700; font-variant-numeric: tabular-nums; min-width: 30px; text-align: right; }
.cstw-inventory-value { color: var(--text-dim); font-size: 10px; min-width: 50px; text-align: right; }
.cstw-inventory-empty { color: var(--text-dim); font-size: 11px; text-align: center; padding: 8px 0; font-style: italic; }

/* End turn button */
.cstw-market-footer { padding: 8px 0; text-align: center; }

.cstw-market-footer .cstw-btn-primary {
  width: 100%;
  padding: 14px;
  font-size: 15px;
  letter-spacing: 2px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: var(--radius);
  box-shadow: 0 4px 15px rgba(232, 132, 92, 0.3);
  position: relative;
  overflow: hidden;
}

.cstw-market-footer .cstw-btn-primary::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, transparent 100%);
  pointer-events: none;
}

/* ====== 16. ACTION SELECT SCREEN ====== */
.cstw-action-select {
  padding: 44px 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  animation: fadeIn 0.3s ease-out;
}

.cstw-action-header {
  text-align: center;
  padding: 4px 0;
}

.cstw-action-title {
  font-size: 18px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--gold), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.cstw-action-subtitle {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 2px;
}

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

/* ====== 17. COOKIE PITCH SCREEN ====== */
.cstw-cookie-pitch {
  padding: 44px 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  animation: slideUp 0.3s ease-out;
}

.cstw-pitch-header {
  text-align: center;
  padding: 8px 0;
}

.cstw-pitch-icon { font-size: 48px; margin-bottom: 8px; }

.cstw-pitch-title {
  font-size: 20px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--gold), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.cstw-pitch-desc {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 4px;
  line-height: 1.5;
}

.cstw-pitch-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cstw-pitch-result {
  text-align: center;
  padding: 20px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  animation: slideUp 0.3s ease-out;
}

.cstw-pitch-result-icon { font-size: 48px; margin-bottom: 8px; }

.cstw-pitch-result-title {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 4px;
}

.cstw-pitch-success { color: var(--cash-green); }
.cstw-pitch-failure { color: var(--debt-red); }

.cstw-pitch-effects {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin-top: 8px;
}

/* ====== 18. TASTE TEST SCREEN ====== */
.cstw-taste-test {
  padding: 44px 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  animation: slideUp 0.3s ease-out;
}

.cstw-taste-header {
  text-align: center;
  padding: 8px 0;
}

.cstw-taste-icon { font-size: 48px; margin-bottom: 8px; }

.cstw-taste-title {
  font-size: 20px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--gold), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.cstw-taste-desc {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 4px;
  line-height: 1.5;
}

.cstw-taste-demographics {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cstw-taste-demo-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);
}

.cstw-taste-demo-card:hover {
  border-color: var(--accent);
  background: rgba(139, 69, 19, 0.3);
  box-shadow: var(--btn-glow);
}

.cstw-taste-demo-card:active { transform: scale(0.98); }

.cstw-taste-demo-emoji { font-size: 28px; }
.cstw-taste-demo-name { font-size: 14px; font-weight: 700; color: var(--text); }
.cstw-taste-demo-desc { font-size: 11px; color: var(--text-dim); margin-top: 2px; }

.cstw-taste-result {
  text-align: center;
  padding: 20px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  animation: slideUp 0.3s ease-out;
}

.cstw-taste-feedback {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
}

.cstw-taste-feedback-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 8px;
  font-size: 12px;
}

.cstw-taste-cookie-name { color: var(--text); font-weight: 600; }
.cstw-taste-rating-up { color: var(--cash-green); font-weight: 700; }
.cstw-taste-rating-down { color: var(--debt-red); font-weight: 700; }
.cstw-taste-rating-neutral { color: var(--text-dim); }

/* ====== 19. TURF WAR SCREEN ====== */
.cstw-turf-war {
  padding: 44px 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  animation: slideUp 0.3s ease-out;
}

.cstw-turf-header {
  text-align: center;
  padding: 8px 0;
}

.cstw-turf-icon { font-size: 56px; margin-bottom: 8px; animation: pulse 1.5s ease-in-out infinite; }

.cstw-turf-title {
  font-size: 22px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--debt-red), var(--debt-orange));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.cstw-turf-vs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 16px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
}

.cstw-turf-combatant {
  flex: 1;
  text-align: center;
}

.cstw-turf-combatant-emoji { font-size: 40px; }
.cstw-turf-combatant-name { font-size: 14px; font-weight: 700; margin-top: 4px; }
.cstw-turf-combatant-power { font-size: 12px; color: var(--gold); font-weight: 700; }

.cstw-turf-vs-text {
  font-size: 24px;
  font-weight: 900;
  color: var(--debt-red);
  text-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
}

.cstw-turf-choices {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cstw-turf-result {
  text-align: center;
  padding: 24px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  animation: slideUp 0.3s ease-out;
}

.cstw-turf-win {
  border-color: rgba(34, 197, 94, 0.4);
  box-shadow: 0 0 20px rgba(34, 197, 94, 0.1);
}

.cstw-turf-lose {
  border-color: rgba(239, 68, 68, 0.4);
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.1);
}

/* ====== 20. SEASON FINALE SCREEN ====== */
.cstw-season-finale {
  padding: 44px 12px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  animation: fadeIn 0.5s ease-out;
}

.cstw-finale-header {
  text-align: center;
  padding: 12px 0;
}

.cstw-finale-emoji { font-size: 64px; animation: pulse 2s ease-in-out infinite; }

.cstw-finale-title {
  font-size: 24px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--gold), var(--gold-light), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-top: 8px;
}

.cstw-finale-subtitle {
  font-size: 13px;
  color: var(--text-dim);
  margin-top: 4px;
  line-height: 1.5;
}

.cstw-finale-stats {
  width: 100%;
  max-width: 340px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 16px;
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
}

.cstw-finale-stat-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 13px;
}

.cstw-finale-stat-row:last-child { border-bottom: none; }
.cstw-finale-stat-label { color: var(--text-dim); }
.cstw-finale-stat-value { font-weight: 700; font-variant-numeric: tabular-nums; }

.cstw-finale-rank {
  text-align: center;
  padding: 16px;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(232, 132, 92, 0.08));
  border: 1px solid var(--gold);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 340px;
  animation: glow 2s ease-in-out infinite;
}

.cstw-finale-rank-title { font-size: 12px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 1px; }
.cstw-finale-rank-name { font-size: 28px; font-weight: 900; color: var(--gold); margin-top: 4px; }

/* ====== 21. EVENT SCREEN ====== */
.cstw-event-overlay {
  position: absolute;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.cstw-event-card {
  background: linear-gradient(135deg, rgba(61, 35, 23, 0.95), rgba(45, 24, 16, 0.95));
  border: 1px solid var(--gold);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  max-width: 320px;
  width: 90%;
  text-align: center;
  animation: slideUp 0.3s ease-out;
  box-shadow: var(--card-shadow), 0 0 40px rgba(255, 215, 0, 0.08);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
}

.cstw-event-emoji { font-size: 56px; margin-bottom: 12px; }

.cstw-event-name {
  font-size: 20px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--gold), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}

.cstw-event-desc {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.5;
  margin-bottom: 20px;
}

.cstw-event-choices {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ====== 22. GAME OVER ====== */
.cstw-gameover {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 40px 24px;
  text-align: center;
  gap: 16px;
  animation: fadeIn 0.5s ease-out;
}

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

.cstw-gameover-title {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.cstw-gameover-win {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 2px 10px rgba(255, 215, 0, 0.3));
}

.cstw-gameover-lose { color: var(--debt-red); text-shadow: 0 2px 10px rgba(239, 68, 68, 0.3); }

.cstw-gameover-reason {
  font-size: 13px;
  color: var(--text-dim);
  max-width: 280px;
  line-height: 1.5;
}

.cstw-stats {
  width: 100%;
  max-width: 300px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 12px 16px;
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
}

.cstw-stat-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 13px;
}

.cstw-stat-row:last-child { border-bottom: none; }
.cstw-stat-label { color: var(--text-dim); }
.cstw-stat-value { font-weight: 700; font-variant-numeric: tabular-nums; }
.cstw-stat-positive { color: var(--cash-green); }
.cstw-stat-negative { color: var(--debt-red); }

.cstw-tokens-earned {
  background: var(--glass-bg);
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.08);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
}

.cstw-tokens-label { font-size: 12px; color: var(--text-dim); }
.cstw-tokens-value { font-size: 24px; font-weight: 900; color: var(--gold); }

.cstw-gameover-actions { display: flex; gap: 12px; margin-top: 8px; }

/* ====== 23. WAGON MOD SCREEN ====== */
.cstw-wagon-mods {
  padding: 44px 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  animation: slideUp 0.3s ease-out;
}

.cstw-wagon-header {
  text-align: center;
  padding: 8px 0;
}

.cstw-wagon-icon { font-size: 48px; margin-bottom: 8px; }

.cstw-wagon-title {
  font-size: 20px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--gold), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.cstw-wagon-mods-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cstw-wagon-mod-card {
  padding: 14px 16px;
  background: var(--card-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
}

.cstw-wagon-mod-card:hover {
  border-color: var(--accent);
  background: rgba(139, 69, 19, 0.3);
  box-shadow: var(--btn-glow);
}

.cstw-wagon-mod-card:active { transform: scale(0.98); }

.cstw-wagon-mod-card.owned {
  border-color: var(--cash-green);
  background: rgba(34, 197, 94, 0.08);
}

.cstw-wagon-mod-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.cstw-wagon-mod-emoji { font-size: 24px; }
.cstw-wagon-mod-name { font-size: 14px; font-weight: 700; color: var(--text); flex: 1; }
.cstw-wagon-mod-cost { font-size: 12px; font-weight: 700; color: var(--gold); }

.cstw-wagon-mod-desc { font-size: 11px; color: var(--text-dim); line-height: 1.4; }

.cstw-wagon-mod-tradeoff {
  font-size: 10px;
  color: var(--debt-orange);
  margin-top: 4px;
  font-style: italic;
}

.cstw-wagon-mod-effects {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

/* ====== 24. SCROLLBAR ====== */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(232, 132, 92, 0.2); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(232, 132, 92, 0.4); }

/* ====== 25. ACTION SELECT SCREEN ====== */
.cstw-action-select-screen {
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cstw-action-header {
  text-align: center;
}

.cstw-action-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 8px;
}

.cstw-action-ap-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 6px;
}

.cstw-action-ap-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-dim);
}

.cstw-action-ap-dots {
  display: flex;
  gap: 4px;
}

.cstw-action-cred-bar {
  display: flex;
  justify-content: center;
}

/* ====== 26. COOKIE PITCH SCREEN ====== */
.cstw-pitch-screen {
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cstw-pitch-header {
  text-align: center;
  margin-bottom: 4px;
}

.cstw-pitch-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  margin: 0;
}

.cstw-pitch-subtitle {
  font-size: 12px;
  color: var(--text-dim);
  margin: 4px 0 0;
}

.cstw-pitch-topics {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  max-height: 55vh;
}

.cstw-pitch-footer {
  display: flex;
  justify-content: center;
  padding-top: 8px;
}

.cstw-pitch-result,
.cstw-taste-result,
.cstw-war-result {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 24px 16px;
  text-align: center;
}

.cstw-result-emoji {
  font-size: 48px;
}

.cstw-result-headline {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  margin: 0;
}

.cstw-result-description,
.cstw-result-flavor {
  font-size: 13px;
  color: var(--text-dim);
  margin: 0;
  max-width: 340px;
}

.cstw-result-effects {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}

.cstw-result-success {
  border-left: 3px solid var(--cash-green);
  background: rgba(34, 197, 94, 0.05);
  border-radius: var(--radius);
}

.cstw-result-fail {
  border-left: 3px solid var(--debt-red);
  background: rgba(239, 68, 68, 0.05);
  border-radius: var(--radius);
}

/* ====== 27. TASTE TEST SCREEN ====== */
.cstw-taste-test-screen {
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cstw-taste-header {
  text-align: center;
  margin-bottom: 4px;
}

.cstw-taste-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  margin: 0;
}

.cstw-taste-subtitle {
  font-size: 12px;
  color: var(--text-dim);
  margin: 4px 0 0;
}

.cstw-taste-demos,
.cstw-taste-cookies {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  max-height: 55vh;
}

.cstw-taste-footer {
  display: flex;
  justify-content: center;
  padding-top: 8px;
}

.cstw-taste-hint-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  margin: 8px auto;
  background: var(--card-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  max-width: 340px;
}

.cstw-taste-hint {
  font-size: 13px;
  font-style: italic;
  color: var(--text);
  margin: 0;
}

/* ====== 28. TURF WAR SCREEN ====== */
.cstw-turf-war-screen {
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cstw-war-header {
  text-align: center;
}

.cstw-war-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  margin: 0;
}

.cstw-war-subtitle {
  font-size: 12px;
  color: var(--text-dim);
  margin: 4px 0 0;
}

.cstw-war-confrontation {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.cstw-war-rival-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px;
  background: var(--card-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 280px;
}

.cstw-war-rival-emoji {
  font-size: 56px;
}

.cstw-war-rival-name {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
}

.cstw-war-rival-badge {
  margin-top: 4px;
}

.cstw-war-vs {
  font-size: 32px;
}

.cstw-war-bars {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cstw-war-bar-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cstw-war-bar-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-dim);
}

.cstw-war-bar-track {
  width: 100%;
  height: 14px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 7px;
  overflow: hidden;
}

.cstw-war-bar-fill {
  height: 100%;
  border-radius: 7px;
  transition: width 0.5s ease;
}

.cstw-war-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.cstw-war-actions .btn-glass {
  flex: 1;
  max-width: 160px;
}

.cstw-war-loot {
  margin-top: 4px;
}

/* ====== 29. SEASON FINALE SCREEN ====== */
.cstw-season-finale-screen {
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
}

.cstw-finale-banner {
  text-align: center;
  padding: 16px;
  width: 100%;
  border-radius: var(--radius);
}

.cstw-finale-title {
  font-size: 24px;
  font-weight: 900;
  color: var(--text);
  margin: 0;
  letter-spacing: 1px;
}

.cstw-finale-map {
  width: 100%;
  text-align: center;
}

.cstw-finale-map-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-dim);
  margin: 0 0 8px;
}

.cstw-finale-svg {
  max-height: 260px;
  border-radius: var(--radius);
  border: 1px solid var(--glass-border);
}

.cstw-finale-stats {
  width: 100%;
}

.cstw-finale-profit {
  text-align: center;
  padding: 16px;
  background: var(--card-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  margin-bottom: 12px;
}

.cstw-finale-stat-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-dim);
  display: block;
}

.cstw-finale-stat-value {
  font-size: 28px;
  font-weight: 900;
  display: block;
  margin-top: 4px;
}

.cstw-finale-stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.cstw-finale-stat-grid .cstw-finale-stat {
  padding: 10px;
  background: var(--card-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  text-align: center;
}

.cstw-finale-stat-grid .cstw-finale-stat-value {
  font-size: 18px;
}

.cstw-finale-tokens {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: rgba(255, 215, 0, 0.08);
  border: 1px solid rgba(255, 215, 0, 0.25);
  border-radius: var(--radius-xl);
  font-weight: 700;
  color: var(--gold);
}

.cstw-finale-actions {
  display: flex;
  gap: 12px;
  width: 100%;
  max-width: 340px;
}

.cstw-finale-actions .btn-glass {
  flex: 1;
}

/* ── 30. Faction Select Screen ─────────────────────────────────── */
.cstw-faction-select {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 100%; padding: 40px 16px; gap: 24px;
}
.cstw-faction-header { text-align: center; }
.cstw-faction-title { font-size: 24px; font-weight: 900; color: var(--gold); letter-spacing: 2px; text-transform: uppercase; text-shadow: 0 2px 10px rgba(255,215,0,0.3); }
.cstw-faction-subtitle { font-size: 12px; color: var(--text-dim); margin-top: 6px; }

.cstw-faction-cards { display: flex; gap: 12px; width: 100%; max-width: 380px; align-items: stretch; }

.cstw-faction-card {
  flex: 1; position: relative; border-radius: 16px; overflow: hidden;
  background: var(--glass-bg); border: 2px solid var(--glass-border);
  backdrop-filter: blur(var(--glass-blur)); cursor: pointer;
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
  display: flex; flex-direction: column;
}
.cstw-faction-card:hover {
  transform: scale(1.02);
  border-color: var(--faction-color);
  box-shadow: 0 0 20px color-mix(in srgb, var(--faction-color) 30%, transparent);
}
.cstw-faction-card:active { transform: scale(0.98); }

.cstw-faction-card-accent { height: 6px; width: 100%; flex-shrink: 0; }

.cstw-faction-card-body {
  position: relative; overflow: hidden;
  padding: 16px 12px; display: flex; flex-direction: column;
  align-items: center; gap: 8px; text-align: center; flex: 1;
}

/* Wallpaper bg inside card body */
.cstw-faction-card-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: 0.08; pointer-events: none; z-index: 0;
}

/* All card-body children above the bg */
.cstw-faction-card-body > *:not(.cstw-faction-card-bg) { position: relative; z-index: 1; }

.cstw-faction-portrait { display: flex; align-items: center; justify-content: center; width: 120px; height: 120px; flex-shrink: 0; }
.cstw-faction-portrait-img { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; border: 3px solid; }
.cstw-faction-emoji { font-size: 48px; width: 120px; height: 120px; display: flex; align-items: center; justify-content: center; }
.cstw-faction-name { font-size: 15px; font-weight: 800; color: var(--text); letter-spacing: 1px; }
.cstw-faction-troop { font-size: 10px; color: var(--text-dim); font-weight: 600; text-transform: uppercase; letter-spacing: 1.5px; }
.cstw-faction-desc { font-size: 11px; color: var(--text-dim); line-height: 1.4; flex: 1; }

.cstw-faction-perks { display: flex; flex-direction: column; gap: 4px; width: 100%; margin-top: auto; }
.cstw-faction-perk { display: flex; align-items: center; gap: 6px; font-size: 10px; color: var(--text); }

/* ── 31. Rumor / Messages Screen ───────────────────────────────── */
.cstw-rumor-screen {
  display: flex; flex-direction: column; height: 100%; padding: 44px 12px 16px;
}
.cstw-rumor-header { text-align: center; margin-bottom: 12px; }
.cstw-rumor-title { font-size: 18px; font-weight: 800; color: var(--gold); letter-spacing: 1px; }
.cstw-rumor-subtitle { font-size: 11px; color: var(--text-dim); margin-top: 2px; }

.cstw-rumor-thread {
  flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch;
  display: flex; flex-direction: column; gap: 12px; padding: 8px 0;
}

.cstw-bubble-row {
  display: flex; gap: 10px; align-items: flex-start;
  animation: slideUp 0.4s ease-out both;
}
.cstw-bubble-ally { flex-direction: row; }
.cstw-bubble-rival { flex-direction: row-reverse; }

.cstw-bubble-avatar {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--glass-bg); border: 1px solid var(--glass-border);
  font-size: 20px;
}

.cstw-bubble-content {
  flex: 1; min-width: 0; padding: 10px 14px; border-radius: 16px;
  background: var(--glass-bg); border: 1px solid var(--glass-border);
  backdrop-filter: blur(var(--glass-blur));
}
.cstw-bubble-ally .cstw-bubble-content {
  border-top-left-radius: 4px;
  border-color: rgba(34,197,94,0.2);
}
.cstw-bubble-rival .cstw-bubble-content {
  border-top-right-radius: 4px;
  border-color: rgba(239,68,68,0.2);
}

.cstw-bubble-header { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; flex-wrap: wrap; }
.cstw-bubble-name { font-size: 12px; font-weight: 700; }
.cstw-bubble-role { font-size: 9px; color: var(--text-dim); }
.cstw-bubble-badge {
  font-size: 8px; font-weight: 800; padding: 2px 8px; border-radius: 10px;
  letter-spacing: 0.5px; text-transform: uppercase;
}

.cstw-bubble-message { font-size: 12px; color: var(--text); line-height: 1.5; }
.cstw-bubble-warning {
  margin-top: 6px; font-size: 9px; color: var(--debt-orange);
  font-weight: 600; font-style: italic;
}

.cstw-rumor-footer { padding: 12px 0; text-align: center; }

/* ── 32. Phone Home Screen ─────────────────────────────────────── */
.phone-screen {
  display: flex; flex-direction: column; height: 100%;
  background: linear-gradient(180deg, #1a0e08 0%, #2D1810 40%, #1a0e08 100%);
  padding: 44px 16px 16px;
}
.phone-status-bar {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 11px; color: var(--text-dim); font-weight: 600;
  padding: 0 4px 8px; border-bottom: 1px solid var(--border);
  font-variant-numeric: tabular-nums;
}
.phone-status-item { display: flex; align-items: center; gap: 3px; }
.phone-location-bar {
  text-align: center; padding: 8px 0; font-size: 12px;
  color: var(--gold); font-weight: 700;
}

.phone-app-grid {
  flex: 1; display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 16px; padding: 16px 8px; align-content: start;
}
.phone-app {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  background: none; border: none; cursor: pointer; position: relative;
  padding: 8px 0; transition: transform 0.1s;
}
.phone-app:active { transform: scale(0.9); }
.phone-app-disabled { opacity: 0.3; pointer-events: none; }

.phone-app-icon {
  width: 58px; height: 58px; border-radius: 15px;
  /* Vibrant colored gradient background — each icon gets its own hue */
  background: linear-gradient(145deg, var(--app-color, #E8845C), color-mix(in srgb, var(--app-color, #E8845C) 60%, #000));
  border: 1px solid rgba(255,255,255,0.2);
  display: flex; align-items: center; justify-content: center;
  box-shadow:
    0 6px 16px rgba(0,0,0,0.5),
    inset 0 1px 0 rgba(255,255,255,0.25),
    0 0 16px var(--app-glow, rgba(232,132,92,0.2));
  transition: all 0.15s;
  position: relative; overflow: hidden;
}
/* Bright glass shine — top half */
.phone-app-icon::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 50%;
  background: linear-gradient(180deg, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0.05) 100%);
  pointer-events: none; border-radius: 15px 15px 0 0;
}
/* Bottom accent glow */
.phone-app-icon::after {
  content: '';
  position: absolute; bottom: 0; left: 10%; right: 10%; height: 2px;
  background: rgba(255,255,255,0.3);
  box-shadow: 0 0 8px var(--app-color, #E8845C);
  pointer-events: none; border-radius: 1px;
}
.phone-app:hover .phone-app-icon {
  transform: scale(1.08);
  box-shadow:
    0 8px 20px rgba(0,0,0,0.4),
    inset 0 1px 0 rgba(255,255,255,0.3),
    0 0 28px var(--app-glow, rgba(232,132,92,0.35));
}
.phone-app:active .phone-app-icon { transform: scale(0.92); }

/* SVG icons — white with glow for maximum contrast against colored bg */
.phone-app-icon svg {
  stroke: white !important;
  stroke-width: 2.5;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.5)) drop-shadow(0 0 6px rgba(255,255,255,0.3));
}

.phone-app-badge {
  position: absolute; top: 2px; right: calc(50% - 32px);
  min-width: 18px; height: 18px; border-radius: 9px;
  background: var(--debt-red); color: white;
  font-size: 10px; font-weight: 800; display: flex;
  align-items: center; justify-content: center; padding: 0 4px;
}
.phone-app-label {
  font-size: 10px; color: var(--text); font-weight: 600;
  text-align: center; line-height: 1.2;
}

/* Street Cred bar */
.phone-cred-bar {
  position: relative; height: 4px; margin: 0 16px 8px;
  background: rgba(255,255,255,0.06); border-radius: 2px; overflow: visible;
}
.phone-cred-fill {
  height: 100%; border-radius: 2px;
  background: linear-gradient(90deg, #F97316, #FFD700, #22C55E);
  transition: width 0.3s; box-shadow: 0 0 8px rgba(255,215,0,0.3);
}
.phone-cred-label {
  position: absolute; right: 0; top: -14px;
  font-size: 9px; color: var(--gold); font-weight: 700;
  display: flex; align-items: center; gap: 3px;
}

/* Inventory bar */
.phone-inventory-bar {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 6px 0; font-size: 11px; color: var(--text-dim); font-weight: 600;
  border-top: 1px solid var(--border);
  font-variant-numeric: tabular-nums;
}
.phone-inv-divider { color: rgba(255,255,255,0.15); }

/* Dock */
.phone-dock {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 0 4px;
  font-size: 10px; color: var(--text-dim); letter-spacing: 2px; font-weight: 600;
}

/* ── 33. Chat / Text Exchange (Buy/Sell) ───────────────────────── */
.cstw-chat-screen {
  display: flex; flex-direction: column; height: 100%;
  padding: 44px 0 0;
}
.cstw-chat-header {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; border-bottom: 1px solid var(--border);
  background: rgba(45,24,16,0.95);
}
.cstw-chat-back {
  background: none; border: none; color: var(--accent);
  font-size: 20px; cursor: pointer; padding: 4px;
}
.cstw-chat-avatar { font-size: 32px; }
.cstw-chat-name { font-size: 14px; font-weight: 700; color: var(--text); }
.cstw-chat-role { font-size: 10px; color: var(--text-dim); }

.cstw-chat-thread {
  flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 12px; display: flex; flex-direction: column; gap: 8px;
}

.cstw-chat-bubble {
  max-width: 80%; padding: 10px 14px; border-radius: 16px;
  font-size: 13px; line-height: 1.4; animation: slideUp 0.3s ease-out;
}
.cstw-chat-bubble-npc {
  align-self: flex-start; background: var(--glass-bg);
  border: 1px solid var(--glass-border); border-bottom-left-radius: 4px;
  color: var(--text);
}
.cstw-chat-bubble-player {
  align-self: flex-end;
  background: linear-gradient(135deg, var(--accent), #D4723C);
  border-bottom-right-radius: 4px; color: white;
}
.cstw-chat-bubble-system {
  align-self: center; background: rgba(255,255,255,0.04);
  border: 1px solid var(--border); color: var(--text-dim);
  font-size: 11px; text-align: center; border-radius: 12px;
}

.cstw-chat-input {
  padding: 10px 12px; border-top: 1px solid var(--border);
  background: rgba(45,24,16,0.95); display: flex; flex-direction: column; gap: 8px;
}
.cstw-chat-cookie-select {
  display: flex; gap: 6px; overflow-x: auto; padding: 4px 0;
}
.cstw-chat-cookie-chip {
  padding: 6px 12px; border-radius: 16px; border: 1px solid var(--border);
  background: var(--glass-bg); color: var(--text); font-size: 11px;
  font-weight: 600; cursor: pointer; white-space: nowrap; flex-shrink: 0;
}
.cstw-chat-cookie-chip-active {
  border-color: var(--accent); background: rgba(232,132,92,0.2);
}
.cstw-chat-qty-row {
  display: flex; align-items: center; gap: 8px; justify-content: center;
}
.cstw-chat-qty-btn {
  width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--glass-bg); color: var(--text); font-size: 16px;
  font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.cstw-chat-qty-display {
  font-size: 18px; font-weight: 800; color: var(--gold); min-width: 40px; text-align: center;
  font-variant-numeric: tabular-nums;
}
.cstw-chat-send {
  padding: 10px; border-radius: 12px; border: none;
  background: linear-gradient(135deg, var(--accent), #D4723C);
  color: white; font-size: 14px; font-weight: 700; cursor: pointer;
  letter-spacing: 1px;
}

/* ── 34. Supplier Screen ───────────────────────────────────────── */
.cstw-supplier-screen {
  padding: 44px 12px 16px; display: flex; flex-direction: column; gap: 10px;
  height: 100%; overflow-y: auto;
}
.cstw-supplier-header {
  display: flex; align-items: center; gap: 10px; padding: 8px 0;
}
.cstw-supplier-avatar { font-size: 36px; }
.cstw-supplier-greeting { font-size: 12px; color: var(--text-dim); font-style: italic; }

/* ── 35. Market Intel ──────────────────────────────────────────── */
.cstw-intel-screen {
  padding: 44px 12px 16px; display: flex; flex-direction: column; gap: 12px;
  height: 100%; overflow-y: auto;
}
.cstw-intel-section {
  background: var(--glass-bg); border: 1px solid var(--glass-border);
  border-radius: 12px; padding: 12px; backdrop-filter: blur(var(--glass-blur));
}
.cstw-intel-title {
  font-size: 13px; font-weight: 700; color: var(--gold);
  margin-bottom: 8px; letter-spacing: 0.5px;
}
.cstw-demand-bar {
  height: 6px; border-radius: 3px; background: rgba(255,255,255,0.1);
  overflow: hidden; margin: 4px 0;
}
.cstw-demand-fill {
  height: 100%; border-radius: 3px; transition: width 0.3s;
}

/* ====== SCREEN BACKGROUND IMAGE OVERLAY ====== */
.screen-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.12;
  pointer-events: none;
}

/* ── App Screen — standard container for all app windows ───────── */
/* Provides HUD clearance, back button, and consistent layout */
.app-screen {
  padding-top: 56px; /* clear the fixed HUD */
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.app-screen-header {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px 6px;
  position: relative; z-index: 1;
}
.app-back-btn {
  width: 32px; height: 32px; border-radius: 10px; border: none;
  background: rgba(255,255,255,0.08); color: var(--text);
  font-size: 16px; cursor: pointer; display: flex;
  align-items: center; justify-content: center;
  border: 1px solid rgba(255,255,255,0.1);
  transition: all 0.1s; flex-shrink: 0;
}
.app-back-btn:active { transform: scale(0.9); background: rgba(255,255,255,0.15); }
.app-screen-title {
  font-size: 16px; font-weight: 800; color: var(--gold);
  letter-spacing: 0.5px; flex: 1;
}
.app-screen-subtitle {
  font-size: 10px; color: var(--text-dim); font-weight: 600;
}
.app-screen-body {
  flex: 1; padding: 0 12px 16px;
  position: relative; z-index: 1;
}

/* Also add HUD clearance to phone home + map */
.phone-screen { padding-top: 56px; }
.cstw-map-screen { padding-top: 56px; }

/* Game over / season finale / title / faction don't have HUD — no padding */
.cstw-gameover-screen.app-screen,
.cstw-season-finale-screen.app-screen,
.cstw-title.app-screen,
.cstw-faction-select.app-screen { padding-top: 0; }

/* Ensure screens with backgrounds have position:relative for the overlay */
.phone-supplier-screen,
.phone-chat-screen,
.phone-intel-screen,
.phone-wagon-screen,
.phone-scouts-screen,
.phone-screen {
  position: relative;
}

/* ====== ICON BACKGROUNDS ====== */
.phone-app-icon {
  position: relative;
  overflow: hidden;
}

.phone-app-icon-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 15px;
  opacity: 0.35;
  pointer-events: none;
}

/* ====== PHONE NOTIFICATION (GTA-style) ====== */
.phone-notification {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  margin: 4px 0 6px 0;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(232, 132, 92, 0.2);
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  animation: slideDown 0.4s ease-out;
}

.phone-notif-icon {
  font-size: 22px;
  flex-shrink: 0;
}

.phone-notif-content {
  flex: 1;
  min-width: 0;
}

.phone-notif-sender {
  font-size: 11px;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 1px;
}

.phone-notif-text {
  font-size: 11px;
  color: rgba(255, 245, 230, 0.7);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

/* ====== WAGON SCREEN ====== */
.phone-wagon-screen {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding-bottom: 12px;
}

/* ====== SCOUTS SCREEN TWO-PANEL ====== */
.phone-scouts-screen {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.scouts-contact:hover {
  background: rgba(255, 255, 255, 0.04);
}

.scouts-contact-active {
  background: rgba(255, 255, 255, 0.06);
}

/* Typing dots animation */
.scouts-typing-dots {
  display: inline-block;
  animation: typingDots 1.4s infinite;
}

@keyframes typingDots {
  0%, 20% { opacity: 0.2; }
  40% { opacity: 1; }
  60%, 100% { opacity: 0.2; }
}

/* ====== COOKIE IMAGES & CARDS ====== */
.cstw-cookie-img-lg {
  width: 96px;
  height: 96px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid rgba(232, 132, 92, 0.3);
}

.cstw-cookie-card {
  width: 96px;
  aspect-ratio: 1;
  border-radius: 12px;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: var(--card-shadow);
}

/* ====== BUY / SELL BUTTONS ====== */
.cstw-btn-buy-green {
  background: linear-gradient(135deg, #22C55E, #16A34A);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.cstw-btn-buy-green:active {
  transform: scale(0.95);
}

.cstw-btn-sell-orange {
  background: linear-gradient(135deg, #F97316, #EA580C);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.cstw-btn-sell-orange:active {
  transform: scale(0.95);
}

/* ====== BANNED ZONE OVERLAY ====== */
.cstw-banned-overlay {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 5px,
    rgba(239, 68, 68, 0.15) 5px,
    rgba(239, 68, 68, 0.15) 10px
  );
  pointer-events: none;
  z-index: 5;
  border-radius: inherit;
}

/* ====== SUPPLY DEMAND SCREEN ====== */
.cstw-supply-demand-screen {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.cstw-sd-cookie-tabs::-webkit-scrollbar,
.cstw-sd-loc-tabs::-webkit-scrollbar {
  display: none;
}

/* ── Exit Modal ────────────────────────────────────────────────── */
.cstw-exit-modal-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,0.7); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  animation: fadeIn 0.2s ease-out;
}
.cstw-exit-modal {
  background: rgba(45,24,16,0.95); backdrop-filter: blur(24px);
  border: 1px solid rgba(232,132,92,0.25); border-radius: 16px;
  padding: 24px; max-width: 300px; width: 85%;
  text-align: center; box-shadow: 0 16px 48px rgba(0,0,0,0.5);
  animation: slideUp 0.3s ease-out;
}
