:root {
  --bg-0: #07080d;
  --bg-1: #11141d;
  --bg-2: #1b2030;
  --accent: #5cf2c4;
  --accent-2: #6fb3ff;
  --neon: #b6ff3b;
  --warn: #ffb454;
  --danger: #ff4d4d;
  --money: #6dff8e;
  --ink: #e6e9ef;
  --ink-dim: #8a92a3;
  --pixel-font: 'Press Start 2P', monospace;
  --body-font: 'VT323', 'Press Start 2P', monospace;
}

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg-0);
  color: var(--ink);
  font-family: var(--body-font);
  font-size: 18px;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
  touch-action: none;
  image-rendering: pixelated;
}

#app {
  position: fixed;
  inset: 0;
}

#game {
  display: block;
  width: 100%;
  height: 100%;
  cursor: crosshair;
  background: #1a1a1a;
}

/* ============ Overlays ============ */
.overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(4, 6, 12, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 10;
  padding: 24px;
  overflow-y: auto;
}
.overlay.hidden { display: none; }

.panel {
  background: var(--bg-1);
  border: 3px solid var(--neon);
  padding: 28px 24px 24px;
  max-width: 480px;
  width: 100%;
  text-align: center;
  box-shadow: 0 0 30px rgba(182, 255, 59, 0.25), 6px 6px 0 #000;
  position: relative;
}
.panel-wide { max-width: 920px; }

.title {
  font-family: var(--pixel-font);
  font-size: 26px;
  letter-spacing: 2px;
  margin-bottom: 12px;
  color: var(--neon);
  text-shadow: 2px 2px 0 #000;
}
.subtitle {
  color: var(--ink-dim);
  margin-bottom: 22px;
  font-size: 18px;
}

/* ============ Key-art landing ============ */
/* The game is pixel art. The landing is not — it is box art, and box art is
   allowed to be a painting. Screenshots keep the promise honest; this sells
   the fantasy. No pixel frame, no Game Boy chrome. */
.title-screen {
  background: #05050a;
  padding: 0;
  align-items: stretch;
  justify-content: stretch;
}
.title-flicker, .title-scanlines { display: none; }

.hero-shell {
  position: relative;
  width: 100%;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow-y: auto;
}
.hero-art {
  position: absolute; inset: 0;
  background-image: url('../assets/landing/hero_city.jpg');
  background-size: cover;
  background-position: center 38%;
  image-rendering: auto;          /* painted art must NOT be nearest-neighbour */
  z-index: 0;
}
/* Two gradients, not one: a vertical wash so the lower third can hold text,
   and a left-weighted wash so the copy column never fights the skyline. */
.hero-vignette {
  position: absolute; inset: 0;
  background:
    linear-gradient(105deg, rgba(5,5,10,0.94) 0%, rgba(5,5,10,0.86) 32%,
                    rgba(5,5,10,0.45) 58%, rgba(5,5,10,0.25) 100%),
    linear-gradient(180deg, rgba(5,5,10,0.55) 0%, transparent 30%,
                    transparent 55%, rgba(5,5,10,0.9) 100%);
  z-index: 1;
}
.hero-inner {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 48px;
  align-items: center;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 48px 40px;
}
.hero-copy { flex: 1 1 560px; min-width: 0; max-width: 680px; }

.hero-kicker {
  font-family: 'Barlow Condensed', var(--body-font);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 4px;
  color: #ffb454;
  border-left: 3px solid #ff336e;
  padding-left: 10px;
  margin-bottom: 14px;
}

/* The wordmark: heavy condensed display type, tight, with a hard offset
   shadow. Reads as a crime-movie title card rather than a console splash. */
.wordmark {
  font-family: 'Anton', 'Barlow Condensed', var(--body-font);
  font-weight: 400;
  font-size: clamp(58px, 9vw, 132px);
  line-height: 0.86;
  letter-spacing: -1px;
  margin: 0 0 10px;
  display: flex;
  flex-direction: column;
  text-transform: uppercase;
}
.wordmark-1 { color: #ff2f6a; text-shadow: 5px 5px 0 #000, 0 0 44px rgba(255,47,106,0.55); }
.wordmark-2 { color: #ffc83c; text-shadow: 5px 5px 0 #000, 0 0 44px rgba(255,200,60,0.45); margin-left: 0.06em; }

.hero-tag {
  font-family: 'Barlow Condensed', var(--body-font);
  font-weight: 600;
  font-size: clamp(17px, 2vw, 23px);
  letter-spacing: 1.5px;
  color: #e8e2d4;
  text-shadow: 0 2px 10px rgba(0,0,0,0.9);
  margin: 0 0 30px;
  max-width: 36ch;      /* the line fits on one row; don't orphan "rest." */
}

.btn-play {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 20px 46px;
  font-family: 'Anton', var(--body-font);
  font-size: 30px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #14030a;
  background: linear-gradient(180deg, #ffe14d 0%, #ffb01f 55%, #ff8a1f 100%);
  border: none;
  border-radius: 2px;
  cursor: pointer;
  box-shadow: 6px 6px 0 rgba(0,0,0,0.85), 0 0 40px rgba(255,150,31,0.35);
  transition: transform 90ms ease, box-shadow 90ms ease, filter 90ms ease;
}
.btn-play:hover {
  filter: brightness(1.07);
  transform: translate(-2px, -2px);
  box-shadow: 8px 8px 0 rgba(0,0,0,0.85), 0 0 60px rgba(255,180,60,0.5);
}
.btn-play:active { transform: translate(3px, 3px); box-shadow: 2px 2px 0 rgba(0,0,0,0.85); }
.btn-play-arrow { font-size: 20px; }

.hero-reassure {
  font-family: 'Barlow Condensed', var(--body-font);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 2px;
  color: #9a9384;
  margin-top: 16px;
  text-transform: uppercase;
}

.hero-marquee {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 26px 0 0;
  padding: 0;
}
.hero-marquee li {
  font-family: 'Barlow Condensed', var(--body-font);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 2px;
  color: #ffd98a;
  border: 1px solid rgba(255,180,84,0.35);
  background: rgba(0,0,0,0.45);
  padding: 6px 11px;
  text-transform: uppercase;
}

.hero-secondary { margin-top: 22px; }
.hero-secondary.hidden { display: none; }
.btn-link {
  background: none; border: none;
  font-family: 'Barlow Condensed', var(--body-font);
  font-weight: 600; font-size: 17px; letter-spacing: 1px;
  color: #9a9384; cursor: pointer; padding: 4px 0;
  text-decoration: underline; text-underline-offset: 5px;
  text-transform: uppercase;
}
.btn-link:hover { color: #ffc83c; }

/* Actual-gameplay strip. Painted key art over a pixel game is a promise you
   have to keep — showing the real thing right under it is how you keep it. */
.hero-shots {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 40px 44px;
}
.hero-shots-label {
  font-family: 'Barlow Condensed', var(--body-font);
  font-weight: 700; font-size: 12px; letter-spacing: 3px;
  color: #7d7566; text-transform: uppercase; margin-bottom: 8px;
}
.hero-shots-row { display: flex; gap: 10px; max-width: 780px; }
.hero-shots-row img {
  width: 33.33%;
  height: auto;
  display: block;
  border: 2px solid rgba(255,255,255,0.10);
  image-rendering: pixelated;      /* these ARE pixel art — keep them crisp */
  box-shadow: 0 8px 22px rgba(0,0,0,0.6);
}

/* Once the player is picking a character the pitch is over: give the grid
   the full width and get the marketing out of its way. */
body.cs-picking .hero-panels,
body.cs-picking .hero-shots,
body.cs-picking .hero-kicker { display: none; }
body.cs-picking .hero-copy { max-width: none; flex: 1 1 auto; }
body.cs-picking .wordmark { font-size: clamp(40px, 5vw, 64px); flex-direction: row; gap: 0.18em; }
body.cs-picking .hero-tag { display: none; }
body.cs-picking .hero-inner { align-items: flex-start; padding-top: 32px; }

/* Box-art panel grid — the classic crime-game cover. */
.hero-panels {
  flex: 0 0 380px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.hero-panel {
  aspect-ratio: 1;
  background-size: cover;
  background-position: center;
  image-rendering: auto;
  border: 3px solid #0a0a0f;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.10), 0 12px 34px rgba(0,0,0,0.75);
}
.hero-panel[data-art="panel_driver"] { background-image: url('../assets/landing/panel_driver.jpg'); }
.hero-panel[data-art="panel_heist"]  { background-image: url('../assets/landing/panel_heist.jpg'); }
.hero-panel[data-art="panel_chase"]  { background-image: url('../assets/landing/panel_chase.jpg'); }
.hero-panel[data-art="panel_empire"] { background-image: url('../assets/landing/panel_empire.jpg'); }

@media (max-width: 1000px) {
  .hero-inner { flex-direction: column; gap: 30px; padding: 32px 22px; align-items: flex-start; }
  .hero-panels { flex: 1 1 auto; width: 100%; max-width: 460px; grid-template-columns: repeat(4, 1fr); }
  .hero-copy { max-width: none; }
}

/* ============ Gate cards (ID check, cloud save) ============ */
/* These sit on the key art, so they wear the same type as the hero — a
   pixel-font form under an Anton wordmark reads as two different products. */
.gate-card {
  margin: 0 0 4px;
  padding: 24px 26px 20px;
  max-width: 540px;
  text-align: left;
  background: rgba(8, 6, 12, 0.82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 180, 84, 0.28);
  border-left: 4px solid #ff2f6a;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.7);
}
/* On the landing the sign-in card IS the call to action, so it carries more
   weight than the same card does mid-flow. */
.gate-card-hero { max-width: 600px; margin-bottom: 18px; }
.gate-card-hero .gate-card-label { font-size: 30px; }
.gate-card-hero .gate-row .btn { font-size: 22px; padding: 14px 34px; }

.gate-card-label {
  font-family: 'Anton', var(--body-font);
  font-size: 26px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #ffc83c;
  margin-bottom: 8px;
}
.gate-card-copy {
  font-family: 'Barlow Condensed', var(--body-font);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: 0.4px;
  line-height: 1.35;
  color: #a9a294;
  margin-bottom: 18px;
}
.gate-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: stretch;
}
.gate-input {
  flex: 1 1 150px;
  min-width: 0;
  font-family: 'Barlow Condensed', var(--body-font);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: 1px;
  padding: 13px 14px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 2px;
  outline: none;
}
.gate-input::placeholder { color: #6d6659; }
.gate-input:focus { border-color: #ffc83c; box-shadow: 0 0 0 3px rgba(255, 200, 60, 0.16); }
/* The gate's own submit button — same family as PLAY, one size down. */
.gate-row .btn,
.gate-row .btn-primary {
  flex: 0 0 auto;
  font-family: 'Anton', var(--body-font);
  font-size: 19px;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 13px 26px;
  color: #14030a;
  background: linear-gradient(180deg, #ffe14d 0%, #ffb01f 55%, #ff8a1f 100%);
  border: none;
  border-radius: 2px;
  cursor: pointer;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.75);
  transition: transform 90ms ease, filter 90ms ease;
}
.gate-row .btn:hover { filter: brightness(1.07); transform: translate(-1px, -1px); }
.gate-row .btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 rgba(0,0,0,0.75); }
.gate-back { display: block; margin-top: 16px; font-size: 15px; }

.cs-char-head {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}
.cs-char-head .hidden { display: none; }

.mp-status {
  font-family: var(--body-font);
  font-size: 15px;
  color: var(--ink-dim);
  margin-top: 10px;
}
.mp-status.online { color: #5cf2c4; }
.mp-status.error  { color: var(--danger); }
.mp-server-label { display: none; }
body.dev-mode .mp-server-label {
  display: flex;
  gap: 8px;
  align-items: center;
  font-family: var(--body-font);
  font-size: 12px;
  color: var(--ink-dim);
  margin-top: 8px;
}
.mp-server-input {
  font-family: monospace;
  font-size: 12px;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink-dim);
  padding: 2px 6px;
  width: 240px;
}

/* MP debug overlay (top-left during gameplay) */
.mp-debug {
  position: absolute;
  top: 60px;
  left: 18px;
  background: rgba(0, 0, 0, 0.75);
  border-left: 3px solid #5cf2c4;
  padding: 6px 10px;
  font-family: monospace;
  font-size: 11px;
  color: #5cf2c4;
  line-height: 1.5;
  white-space: pre;
  z-index: 4;
  pointer-events: none;
}
.mp-debug.hidden { display: none; }

.menu-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 18px;
}

.btn {
  font-family: var(--pixel-font);
  font-size: 12px;
  letter-spacing: 1px;
  padding: 12px 18px;
  background: var(--bg-2);
  color: var(--ink);
  border: 2px solid var(--ink-dim);
  cursor: pointer;
  transition: transform 60ms, background 60ms, border-color 60ms;
}
.btn:hover:not(:disabled) { transform: translate(-2px, -2px); border-color: var(--accent); }
.btn:active:not(:disabled) { transform: translate(1px, 1px); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-primary { background: var(--neon); color: #000; border-color: var(--neon); }
.btn-primary:hover:not(:disabled) { background: #d2ff63; border-color: #d2ff63; }
.btn-small { font-size: 10px; padding: 8px 12px; }
.btn-icon {
  background: rgba(0, 0, 0, 0.6);
  color: var(--neon);
  border: 2px solid var(--neon);
  width: 40px; height: 40px;
  font-size: 22px;
  cursor: pointer;
  font-family: var(--pixel-font);
}

/* ============ Character select ============ */
.char-section { margin: 18px 0 8px; text-align: left; }
.char-section-label {
  font-family: var(--pixel-font);
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--accent);
  margin-bottom: 8px;
}
.char-flavor {
  font-size: 16px;
  color: var(--ink-dim);
  margin-bottom: 10px;
  font-style: italic;
}
.char-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px;
}
.char-card {
  background: var(--bg-2);
  border: 2px solid #333;
  padding: 10px 8px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--ink);
  font-family: var(--body-font);
  font-size: 16px;
  transition: border-color 80ms, transform 80ms;
}
.char-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.char-card.picked {
  border-color: var(--neon);
  box-shadow: 0 0 0 1px var(--neon), 0 0 16px rgba(182, 255, 59, 0.4);
}
.char-card img {
  width: 64px; height: 64px;
  object-fit: contain;
  image-rendering: pixelated;
}
.char-card .char-name {
  font-family: var(--pixel-font);
  font-size: 9px;
  letter-spacing: 0.5px;
  color: var(--ink);
}
.char-card .char-tag {
  font-size: 12px;
  color: var(--ink-dim);
}

/* ============ HUD ============ */
.hud {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 5;
}
.hud.hidden { display: none; }
.hud > * { pointer-events: auto; }

.hud-row {
  position: absolute;
  left: 0; right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  gap: 16px;
  pointer-events: none;
}
.hud-row > * { pointer-events: auto; }
.hud-top { top: 0; }
.hud-bottom { bottom: 0; }

.hud-stats {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}
.stat-block {
  background: rgba(0, 0, 0, 0.65);
  border: 2px solid var(--neon);
  padding: 6px 10px;
  min-width: 90px;
  text-align: center;
}
.stat-label {
  font-family: var(--pixel-font);
  font-size: 8px;
  letter-spacing: 1px;
  color: var(--neon);
  margin-bottom: 4px;
}
.cash-value {
  font-family: var(--pixel-font);
  font-size: 14px;
  color: var(--money);
}
.empire-value {
  font-family: var(--pixel-font);
  font-size: 11px;
  color: var(--accent-2);
}
.hp-bar {
  width: 120px;
  height: 12px;
  background: #2a0a0a;
  border: 1px solid #000;
  overflow: hidden;
}
.hp-fill {
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--danger), #ff8a8a);
  transition: width 100ms;
}
.wanted-stars {
  font-family: var(--pixel-font);
  font-size: 14px;
  color: var(--warn);
  letter-spacing: 2px;
  min-height: 18px;
}

.weapon-bar {
  display: flex;
  gap: 6px;
  background: rgba(0, 0, 0, 0.65);
  border: 2px solid var(--neon);
  padding: 6px;
}
.weapon-slot {
  width: 56px;
  padding: 6px 4px;
  background: var(--bg-2);
  border: 1px solid #333;
  text-align: center;
  font-family: var(--pixel-font);
  font-size: 8px;
  color: var(--ink-dim);
  cursor: pointer;
}
.weapon-slot.active {
  border-color: var(--neon);
  background: #1a2a14;
  color: var(--neon);
}
.weapon-slot .wkey {
  display: block;
  font-size: 9px;
  color: var(--accent);
  margin-bottom: 3px;
}
.ammo-value {
  font-family: var(--pixel-font);
  font-size: 14px;
  color: var(--neon);
  background: rgba(0, 0, 0, 0.65);
  border: 2px solid var(--neon);
  padding: 8px 12px;
}

.interact-prompt {
  position: absolute;
  left: 50%;
  bottom: 110px;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.85);
  border: 2px solid var(--neon);
  padding: 12px 18px;
  font-family: var(--pixel-font);
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--neon);
  text-align: center;
  pointer-events: none;
  white-space: nowrap;
}
.interact-prompt.hidden { display: none; }
.interact-prompt .ik {
  display: inline-block;
  background: var(--neon);
  color: #000;
  padding: 2px 6px;
  margin-right: 6px;
}

.feed {
  position: absolute;
  right: 18px;
  top: 90px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-end;
  pointer-events: none;
}
.feed-msg {
  font-family: var(--pixel-font);
  font-size: 10px;
  background: rgba(0, 0, 0, 0.7);
  border-left: 3px solid var(--neon);
  padding: 6px 10px;
  color: var(--ink);
  animation: feedSlide 240ms ease-out;
}
.feed-msg.money { border-left-color: var(--money); color: var(--money); }
.feed-msg.warn { border-left-color: var(--warn); color: var(--warn); }
.feed-msg.danger { border-left-color: var(--danger); color: var(--danger); }
@keyframes feedSlide {
  from { transform: translateX(40px); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

.prop-body {
  text-align: left;
  font-size: 18px;
  color: var(--ink);
  margin-bottom: 8px;
}
.prop-body .pl {
  display: flex; justify-content: space-between;
  padding: 4px 0;
  border-bottom: 1px dashed #333;
}
.prop-body .pl-k { color: var(--ink-dim); }
.prop-body .pl-v { color: var(--accent); }
.prop-body .pl-v.money { color: var(--money); }

.pause-stats {
  margin-top: 16px;
  font-size: 16px;
  color: var(--ink-dim);
  text-align: left;
}
.pause-stats .pl { display: flex; justify-content: space-between; padding: 2px 0; }

/* ============ Broker panel ============ */
.broker-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 14px;
  border-bottom: 2px solid #333;
}
.broker-tab {
  font-family: var(--pixel-font);
  font-size: 11px;
  letter-spacing: 1px;
  padding: 10px 14px;
  background: transparent;
  color: var(--ink-dim);
  border: 2px solid transparent;
  border-bottom: none;
  cursor: pointer;
}
.broker-tab.active {
  background: var(--bg-2);
  color: var(--neon);
  border-color: var(--neon);
}
.broker-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
  text-align: left;
  max-height: 380px;
  overflow-y: auto;
}
.broker-offer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-2);
  border: 2px solid #333;
  padding: 10px 14px;
  gap: 12px;
}
.broker-offer:hover { border-color: var(--accent); }

/* Plot build-options menu (THE BURBS) — multiple buttons, one per build kind. */
.prop-build-menu {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 10px 0;
}
.prop-build-menu:empty { display: none; }
.btn-build {
  background: var(--bg-2);
  border: 2px solid var(--accent);
  color: var(--ink);
  font-family: var(--pixel-font);
  font-size: 10px;
  letter-spacing: 0.5px;
  padding: 8px 12px;
  text-align: left;
  cursor: pointer;
}
.btn-build:hover:not(:disabled) { background: var(--accent); color: #000; }
.btn-build:disabled { opacity: 0.5; cursor: not-allowed; }

/* ===== Lucky Sevens slot machine panel ===== */
.slot-reels {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin: 18px 0 14px;
}
.slot-reel {
  width: 96px;
  height: 96px;
  background: #0a0a0a;
  border: 3px solid #c89b2a;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--pixel-font);
  font-size: 56px;
  color: #ffd84a;
  text-shadow: 0 0 6px #ff3d6e, 0 0 14px #ff3d6e;
  box-shadow: inset 0 0 12px #000, 0 0 12px rgba(255,61,110,0.4);
  user-select: none;
}
.slot-reel-img {
  width: 80px;
  height: 80px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}
.slot-reel.spinning {
  animation: slotSpin 60ms linear infinite;
}
@keyframes slotSpin {
  0%   { transform: translateY(0); filter: blur(1px); }
  50%  { transform: translateY(-8px); filter: blur(2px); }
  100% { transform: translateY(0); filter: blur(1px); }
}
.slot-result {
  font-family: var(--pixel-font);
  font-size: 13px;
  letter-spacing: 1px;
  color: #ffd84a;
  margin: 4px 0 12px;
  min-height: 18px;
}
.slot-result.win  { color: #79ff63; text-shadow: 0 0 8px #79ff63; }
.slot-result.lose { color: #888; }
.slot-result.jackpot {
  color: #ff3d6e;
  text-shadow: 0 0 10px #ff3d6e, 0 0 20px #ffd84a;
  font-size: 16px;
  animation: jackpotPulse 0.5s ease-in-out infinite alternate;
}
@keyframes jackpotPulse {
  from { transform: scale(1); }
  to   { transform: scale(1.08); }
}
.slot-bets {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-bottom: 10px;
}
.slot-bet {
  background: var(--bg-2);
  border: 2px solid #444;
  color: var(--ink);
  padding: 6px 14px;
  font-family: var(--pixel-font);
  font-size: 11px;
  cursor: pointer;
}
.slot-bet:hover { border-color: var(--accent); }
.slot-bet.active {
  background: var(--neon);
  color: #000;
  border-color: var(--neon);
}
.slot-stats {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-bottom: 14px;
}
.slot-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.slot-stat-k {
  font-family: var(--pixel-font);
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--ink-dim);
}
.slot-stat-v {
  font-family: var(--pixel-font);
  font-size: 14px;
  color: var(--ink);
}
.broker-offer-info { flex: 1; }
.broker-offer-title {
  font-family: var(--pixel-font);
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--ink);
  margin-bottom: 4px;
}
.broker-offer-meta {
  font-size: 15px;
  color: var(--ink-dim);
}
.broker-offer-pay {
  font-family: var(--pixel-font);
  font-size: 14px;
  color: var(--money);
  margin-right: 10px;
}
.broker-offer-btn {
  font-family: var(--pixel-font);
  font-size: 10px;
  padding: 8px 12px;
  background: var(--neon);
  color: #000;
  border: 2px solid var(--neon);
  cursor: pointer;
}
.broker-offer-btn:hover { background: #d2ff63; }
.broker-empty {
  color: var(--ink-dim);
  font-style: italic;
  padding: 18px;
  text-align: center;
}

/* ============ Mission tracker (HUD top-left) ============ */
.mission-tracker {
  position: absolute;
  top: 92px;
  left: 18px;
  background: rgba(0, 0, 0, 0.78);
  border: 2px solid var(--neon);
  padding: 10px 14px;
  min-width: 220px;
  max-width: 340px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  pointer-events: auto;
  box-shadow: 0 0 14px rgba(182, 255, 59, 0.2);
}
.mission-tracker.hidden { display: none; }
.mt-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}
.mt-title {
  font-family: var(--pixel-font);
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--neon);
}
.mt-payout {
  font-family: var(--pixel-font);
  font-size: 12px;
  color: var(--money);
}
.mt-objective {
  font-size: 16px;
  color: var(--ink);
}
.mt-timer {
  font-family: var(--pixel-font);
  font-size: 10px;
  color: var(--warn);
}
.mt-abandon {
  align-self: flex-start;
  font-family: var(--pixel-font);
  font-size: 8px;
  padding: 4px 8px;
  margin-top: 4px;
  background: transparent;
  color: var(--ink-dim);
  border: 1px solid var(--ink-dim);
  cursor: pointer;
}
.mt-abandon:hover { color: var(--danger); border-color: var(--danger); }

.mt-progress {
  width: 100%;
  height: 8px;
  background: #2a2a2a;
  border: 1px solid #000;
  overflow: hidden;
}
.mt-progress.hidden { display: none; }
.mt-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--neon), #d2ff63);
  transition: width 80ms linear;
}

/* ============ Minimap ============ */
.minimap {
  position: absolute;
  top: 92px;
  right: 18px;
  background: rgba(4, 6, 12, 0.78);
  border: 2px solid var(--neon);
  box-shadow: 0 0 14px rgba(182, 255, 59, 0.2);
  image-rendering: pixelated;
  pointer-events: none;
}
.minimap.hidden { display: none; }

.minimap-key {
  position: absolute;
  top: 92px;
  right: 244px;             /* sit immediately left of the minimap */
  background: rgba(4, 6, 12, 0.78);
  border: 2px solid var(--neon);
  box-shadow: 0 0 14px rgba(182, 255, 59, 0.2);
  padding: 6px 8px;
  font-family: var(--pixel-font);
  font-size: 8px;
  letter-spacing: 0.5px;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 3px;
  pointer-events: none;
  line-height: 1.1;
}
.minimap-key.hidden { display: none; }
.mk-title {
  color: var(--neon);
  margin-bottom: 2px;
  letter-spacing: 1px;
}
.mk-row {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.mk-sw {
  display: inline-block;
  width: 10px;
  height: 8px;
  border: 1px solid #000;
  flex-shrink: 0;
}
.mk-sw.mk-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
}
.mk-sw.mk-arrow {
  clip-path: polygon(0 0, 100% 50%, 0 100%);
  border: none;
  width: 12px;
}

/* ============ Map transition fade ============ */
.transition-fade {
  position: absolute;
  inset: 0;
  background: #000;
  opacity: 0;
  pointer-events: none;
  z-index: 30;
  transition: opacity 500ms ease-in-out;
}
.transition-fade.on { opacity: 1; }
.transition-fade.hidden { display: none; }

/* ============ Flight fade — black overlay + plane silhouette ============ */
.flight-fade {
  position: absolute;
  inset: 0;
  background: #000;
  opacity: 0;
  pointer-events: none;
  z-index: 32;
  transition: opacity 400ms ease-in-out;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.flight-fade.on { opacity: 1; }
.flight-fade.hidden { display: none; }
.flight-banner {
  position: absolute;
  top: 35%;
  font-family: var(--pixel-font);
  font-size: 18px;
  letter-spacing: 2px;
  color: var(--neon);
  text-shadow: 0 0 8px rgba(182, 255, 59, 0.45);
  text-align: center;
  width: 100%;
}
.flight-plane {
  position: absolute;
  top: 55%;
  left: -200px;
  width: 192px;
  height: auto;
  image-rendering: pixelated;
  filter: drop-shadow(0 0 8px rgba(108, 255, 142, 0.55));
}
.flight-fade.flying .flight-plane {
  animation: flightCross 2000ms linear forwards;
}
@keyframes flightCross {
  from { transform: translateX(0);                }
  to   { transform: translateX(calc(100vw + 400px)); }
}

/* ============ Airport ticket panel ============ */
.airport-ticket {
  background: #0c1018;
  border: 2px solid var(--accent);
  padding: 14px 18px;
  margin: 12px 0;
  text-align: left;
  font-family: var(--body-font);
  color: var(--ink);
  position: relative;
}
.airport-ticket::before {
  content: '✈';
  position: absolute;
  top: 8px; right: 12px;
  font-size: 28px;
  color: var(--accent);
  opacity: 0.5;
}
.airport-ticket-route {
  font-family: var(--pixel-font);
  font-size: 14px;
  letter-spacing: 1px;
  color: var(--neon);
  margin-bottom: 8px;
}
.airport-ticket-fare {
  font-family: var(--pixel-font);
  font-size: 22px;
  color: #ffd84a;
  margin: 6px 0;
}
.airport-ticket-meta {
  font-size: 13px;
  color: var(--ink-dim);
}

/* ============ Phone (GPS) ============ */
.phone-frame {
  background: var(--bg-1);
  border: 4px solid var(--neon);
  box-shadow: 0 0 30px rgba(182, 255, 59, 0.3), 6px 6px 0 #000;
  width: min(95vw, 920px);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
}
.phone-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: var(--bg-2);
  border-bottom: 2px solid var(--neon);
}
.phone-title {
  font-family: var(--pixel-font);
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--neon);
}
.phone-x {
  font-family: var(--pixel-font);
  font-size: 16px;
  background: transparent;
  border: 2px solid var(--ink-dim);
  color: var(--ink);
  cursor: pointer;
  width: 30px; height: 30px;
}
.phone-x:hover { border-color: var(--danger); color: var(--danger); }
.phone-body {
  display: flex;
  gap: 12px;
  padding: 12px;
  align-items: stretch;
}
.phone-map {
  background: rgba(4, 6, 12, 0.78);
  image-rendering: pixelated;
  flex: 1;
  cursor: crosshair;
}
.phone-side {
  width: 260px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-family: var(--body-font);
}
.phone-search {
  font-family: var(--body-font);
  font-size: 16px;
  padding: 8px 10px;
  background: var(--bg-2);
  color: var(--ink);
  border: 2px solid #333;
}
.phone-search:focus { outline: none; border-color: var(--neon); }
.phone-list {
  flex: 1;
  overflow-y: auto;
  max-height: 360px;
  border: 1px solid #333;
}
.phone-list-item {
  display: flex;
  justify-content: space-between;
  padding: 6px 10px;
  border-bottom: 1px solid #1d2030;
  cursor: pointer;
  font-size: 15px;
  color: var(--ink);
}
.phone-list-item:hover { background: var(--bg-2); }
.phone-list-item.active { background: #1c3220; color: var(--neon); }
.place-name { display: flex; flex-direction: column; gap: 1px; }
.place-addr { font-size: 12px; color: var(--ink-dim); letter-spacing: 0.5px; }
.phone-list-item .meta {
  color: var(--ink-dim);
  font-size: 13px;
}
.phone-gps {
  font-family: var(--pixel-font);
  font-size: 9px;
  letter-spacing: 1px;
  color: var(--accent);
  padding: 6px 0;
  border-top: 1px solid #333;
}

/* Phone-map legend — explains every color on the map. */
.phone-legend {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #333;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-family: var(--body-font);
  font-size: 12px;
  color: var(--ink);
}
.phone-legend-h {
  font-family: var(--pixel-font);
  font-size: 9px;
  letter-spacing: 1px;
  color: var(--ink-dim);
  margin: 6px 0 2px;
}
.phone-legend-h:first-child { margin-top: 0; }
.phone-legend-row {
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.3;
}
.lk-swatch {
  display: inline-block;
  width: 14px;
  height: 10px;
  border: 1px solid #000;
  flex-shrink: 0;
}
.lk-swatch.lk-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.lk-swatch.lk-arrow {
  clip-path: polygon(0 0, 100% 50%, 0 100%);
  border: none;
}
.phone-foot {
  padding: 8px 14px;
  font-size: 13px;
  color: var(--ink-dim);
  background: var(--bg-2);
  border-top: 1px solid var(--neon);
}
.phone-foot .ik {
  background: var(--neon);
  color: #000;
  padding: 1px 5px;
  margin: 0 2px;
}

.phone-tabs {
  display: flex;
  gap: 4px;
}
.phone-tab {
  font-family: var(--pixel-font);
  font-size: 10px;
  letter-spacing: 1px;
  padding: 6px 12px;
  background: transparent;
  color: var(--ink-dim);
  border: 2px solid transparent;
  cursor: pointer;
}
.phone-tab.active {
  background: var(--bg-1);
  color: var(--neon);
  border-color: var(--neon);
  border-bottom-color: var(--bg-1);
}
/* The frame is a max-height flex column, but the tab body had no overflow and
   no min-height, so a long list (RIDE in a big city) grew past the frame and
   rendered outside its own border. `min-height: 0` is the part that matters:
   without it a flex child refuses to shrink below its content and can never
   scroll. */
.phone-view {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.phone-view.hidden { display: none; }
/* Keep the scrollbar in the same visual language as everything else. */
.phone-view::-webkit-scrollbar { width: 10px; }
.phone-view::-webkit-scrollbar-track { background: var(--bg-0); }
.phone-view::-webkit-scrollbar-thumb {
  background: var(--bg-2);
  border: 2px solid var(--bg-0);
}
.phone-view::-webkit-scrollbar-thumb:hover { background: #2c3448; }

.career-wrap {
  display: flex;
  gap: 12px;
  padding: 12px;
  align-items: stretch;
  max-height: 70vh;
}
.career-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.career-jobs { flex: 1.2; }
.career-box {
  background: var(--bg-2);
  border: 2px solid #333;
  padding: 12px 14px;
}
.career-h {
  font-family: var(--pixel-font);
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--accent);
  margin-bottom: 8px;
}
.career-big {
  font-family: var(--pixel-font);
  font-size: 14px;
  letter-spacing: 1px;
  color: var(--neon);
  margin-bottom: 4px;
}
.career-sub {
  font-size: 15px;
  color: var(--ink-dim);
  margin-bottom: 4px;
}
.career-bar {
  width: 100%;
  height: 8px;
  background: #11141d;
  border: 1px solid #000;
  overflow: hidden;
  margin: 6px 0;
}
.career-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-2), var(--neon));
}
.career-actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}
.career-job-list {
  flex: 1;
  overflow-y: auto;
  border: 1px solid #333;
  max-height: 60vh;
}
.career-job-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  border-bottom: 1px solid #1d2030;
  font-size: 15px;
  gap: 8px;
}
.career-job-item.locked { opacity: 0.5; }
.career-job-item.active { background: #1c3220; }
.career-job-info { flex: 1; min-width: 0; }
.career-job-name {
  font-family: var(--pixel-font);
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--ink);
  margin-bottom: 3px;
}
.career-job-meta {
  font-size: 13px;
  color: var(--ink-dim);
}
.career-job-pay {
  font-family: var(--pixel-font);
  font-size: 11px;
  color: var(--money);
  margin-right: 6px;
}
.career-job-btn {
  font-family: var(--pixel-font);
  font-size: 9px;
  padding: 6px 10px;
  background: var(--neon);
  color: #000;
  border: 2px solid var(--neon);
  cursor: pointer;
}
.career-job-btn:hover:not(:disabled) { background: #d2ff63; }
.career-job-btn:disabled {
  background: transparent;
  color: var(--ink-dim);
  border-color: var(--ink-dim);
  cursor: not-allowed;
}

/* HUD "on the clock" wage indicator. */
.wage-stat .stat-label { color: var(--money); }
.wage-stat .wage-value { color: var(--money); font-family: var(--pixel-font); font-size: 14px; }
.wage-stat.hidden { display: none; }

/* GPS HUD readout — only visible while a waypoint is active. */
.gps-stat .stat-label { color: #ffea4d; }
.gps-stat .gps-value {
  color: #ffea4d;
  font-family: var(--pixel-font);
  font-size: 10px;
  line-height: 1.4;
  letter-spacing: 0.5px;
  text-shadow: 1px 1px 0 #000;
}
.gps-stat .gps-dist { color: #fff7c0; font-size: 13px; }
.gps-stat.hidden { display: none; }

.weather-value {
  font-family: var(--pixel-font);
  font-size: 11px;
  letter-spacing: 1px;
}
.weather-value.clear  { color: #ffe48a; }
.weather-value.cloudy { color: #a6b0c5; }
.weather-value.rain   { color: #7eb6ff; }
.weather-value.storm  { color: #c89eff; }
.weather-value.fog    { color: #cfd4dd; }
.weather-value.snow   { color: #e8f0ff; }

/* ===== Walkthrough / onboarding ===== */
.cs-step.hidden { display: none; }

.hud-buttons { display: flex; gap: 8px; }

.hud-hints {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--body-font);
  font-size: 13px;
  letter-spacing: 1px;
  color: var(--ink-dim);
  opacity: 0.55;
  pointer-events: none;
  white-space: nowrap;
}
.hud-hints kbd,
.tour-body kbd {
  font-family: var(--pixel-font);
  font-size: 10px;
  padding: 2px 5px;
  margin: 0 2px;
  background: #000;
  border: 1px solid #5cf2c4;
  border-radius: 3px;
  color: #5cf2c4;
}

.tour-panel { max-width: 420px; text-align: center; }
.tour-body {
  font-family: var(--body-font);
  font-size: 18px;
  line-height: 2;
  margin: 16px 0;
}
.tour-body kbd { font-size: 12px; padding: 3px 7px; }
.tour-dots { display: flex; justify-content: center; gap: 8px; margin-bottom: 14px; }
.tour-dot {
  width: 8px; height: 8px;
  background: #333;
  border-radius: 50%;
}
.tour-dot.active { background: #5cf2c4; }

/* ===== RIDE app (MAD CABS) ===== */
.ride-header {
  font-family: var(--pixel-font);
  font-size: 10px;
  color: #ffb454;
  letter-spacing: 1px;
  margin: 10px 12px 8px;
}
.ride-list { display: flex; flex-direction: column; gap: 6px; padding: 0 12px 12px; }
.ride-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--pixel-font);
  font-size: 11px;
  padding: 12px 14px;
  background: #0d1017;
  color: var(--ink);
  border: 2px solid #2a3040;
  cursor: pointer;
}
.ride-row:hover:not(:disabled) { border-color: #5cf2c4; }
.ride-row:disabled { opacity: 0.45; cursor: default; }
.ride-dest { color: #5cf2c4; }
.ride-fare { color: var(--money); }
.ride-fare.broke { color: var(--danger); }

/* ===== Casino tables (blackjack + roulette) ===== */
.bj-hands { margin: 14px 0 8px; display: flex; flex-direction: column; gap: 10px; }
.bj-hand { display: flex; align-items: baseline; gap: 12px; justify-content: center; }
.bj-hand-k {
  font-family: var(--pixel-font);
  font-size: 10px;
  color: var(--ink-dim);
  letter-spacing: 1px;
  min-width: 70px;
  text-align: right;
}
.bj-cards { font-family: var(--pixel-font); font-size: 15px; color: var(--ink); letter-spacing: 2px; }
.ru-wheel {
  font-family: var(--pixel-font);
  font-size: 40px;
  margin: 16px auto 8px;
  width: 110px;
  padding: 14px 0;
  border: 3px solid var(--ink-dim);
  color: var(--ink);
  background: #000;
}
.ru-wheel.red   { color: #ff5c5c; border-color: #ff5c5c; }
.ru-wheel.black { color: #e6e9ef; border-color: #e6e9ef; }
.ru-wheel.green { color: #6dff8e; border-color: #6dff8e; }
.ru-choices { display: flex; gap: 8px; justify-content: center; align-items: center; flex-wrap: wrap; margin: 10px 0; }
.ru-choice {
  font-family: var(--pixel-font);
  font-size: 10px;
  padding: 8px 12px;
  background: #0d1017;
  color: var(--ink);
  border: 2px solid #2a3040;
  cursor: pointer;
}
.ru-choice.active { border-color: #b6ff3b; color: #b6ff3b; }
.ru-choice[data-pick="red"]   { color: #ff5c5c; }
.ru-choice[data-pick="black"] { color: #cfd4dd; }
.ru-straight { font-family: var(--pixel-font); font-size: 10px; color: var(--ink-dim); }
.ru-straight input {
  width: 64px;
  font-family: var(--pixel-font);
  font-size: 11px;
  padding: 6px;
  background: #000;
  color: #fff;
  border: 2px solid #2a3040;
}
.ride-section {
  font-family: var(--pixel-font);
  font-size: 9px;
  color: var(--ink-dim);
  letter-spacing: 1px;
  margin: 10px 2px 2px;
}
.ride-meta { font-family: var(--body-font); font-size: 13px; color: var(--ink-dim); margin-left: auto; margin-right: 14px; }
.btn.hidden { display: none; }

/* ===== BAG tab ===== */
.bag-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--pixel-font);
  font-size: 10px;
  padding: 10px 12px;
  background: #0d1017;
  border: 2px solid #2a3040;
}
.bag-name { color: var(--ink); }
.bag-meta { font-family: var(--body-font); font-size: 14px; color: var(--ink-dim); }
.bag-total .bag-name { color: var(--money); }
.bag-total .bag-meta { color: var(--money); }
.wanted-stars.hard { color: var(--danger); text-shadow: 0 0 8px rgba(255, 77, 77, 0.6); }
.clock-value {
  font-family: var(--pixel-font);
  font-size: 11px;
  color: #9ecbff;
  letter-spacing: 1px;
}

/* ===== County lockup ===== */
.prison-year {
  font-family: var(--pixel-font);
  font-size: 22px;
  color: #ffb454;
  margin: 18px 0 10px;
  letter-spacing: 2px;
}
.prison-progress { margin: 0 auto 14px; max-width: 320px; display: block; height: 10px; background: #000; border: 2px solid #2a3040; }
.prison-progress .mt-progress-fill { background: #ffb454; height: 100%; }
.prison-note { font-family: var(--body-font); font-size: 15px; color: var(--ink-dim); margin: 6px 0; }
.prison-fine { font-size: 13px; }

/* ===== THE BIG BOARD (stock exchange) ===== */
.market-panel { max-width: 1180px; text-align: left; }
.market-head { display: flex; align-items: flex-start; gap: 20px; justify-content: space-between; }
.market-title { font-size: 22px; margin-bottom: 4px; }
.market-sub { font-family: var(--body-font); font-size: 14px; color: var(--ink-dim); }
.market-port { display: flex; gap: 20px; margin-left: auto; }
.market-port-row { text-align: right; }
.market-port-row span {
  display: block; font-family: var(--pixel-font); font-size: 8px;
  color: var(--ink-dim); letter-spacing: 1px; margin-bottom: 3px;
}
.market-port-row b { font-family: var(--pixel-font); font-size: 13px; color: var(--ink); }
.market-port-row b.up { color: #6dff8e; }
.market-port-row b.down { color: #ff6b6b; }

.market-body { display: flex; gap: 14px; margin-top: 14px; align-items: flex-start; }
.market-list { width: 288px; display: flex; flex-direction: column; gap: 3px; max-height: 380px; overflow-y: auto; }
.mkt-row {
  display: flex; align-items: center; gap: 8px; width: 100%;
  font-family: var(--pixel-font); font-size: 10px;
  padding: 8px 9px; background: #0d1017; color: var(--ink);
  border: 2px solid #2a3040; cursor: pointer; text-align: left;
}
.mkt-row:hover { border-color: #4a5468; }
.mkt-row.sel { border-color: #5cf2c4; background: #111a20; }
.mkt-dot { width: 9px; height: 9px; border-radius: 2px; flex: none; display: inline-block; margin-right: 5px; }
.mkt-tick { width: 44px; color: var(--ink); }
.mkt-px { width: 62px; text-align: right; color: var(--ink-dim); }
.mkt-ch { width: 74px; text-align: right; font-size: 9px; }
.mkt-ch.up, .up { color: #6dff8e; }
.mkt-ch.down, .down { color: #ff6b6b; }
.mkt-own {
  margin-left: auto; font-size: 8px; color: #ffd84a;
  border: 1px solid #ffd84a; padding: 1px 4px;
}

.market-main { flex: 1; min-width: 0; }
.market-chart-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 6px; }
.market-sel-name { font-family: var(--pixel-font); font-size: 12px; color: var(--ink); }
.market-sel-sector { font-family: var(--body-font); font-size: 14px; color: var(--ink-dim); margin-top: 4px; }
.market-sel-price b { font-family: var(--pixel-font); font-size: 20px; color: var(--ink); }
.market-chg { display: block; text-align: right; font-family: var(--body-font); font-size: 15px; margin-top: 3px; }
.market-chart { width: 100%; background: #0a0d13; border: 2px solid #2a3040; display: block; }
.market-hint { font-family: var(--body-font); font-size: 13px; color: var(--ink-dim); margin-top: 5px; }

.market-trade { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.market-trade-row { display: flex; align-items: center; gap: 8px; }
.market-trade-k {
  font-family: var(--pixel-font); font-size: 9px; color: var(--ink-dim);
  letter-spacing: 1px; width: 74px;
}
.market-qty {
  font-family: var(--pixel-font); font-size: 11px; padding: 7px 8px; width: 92px;
  background: #000; color: #fff; border: 2px solid #2a3040;
}
.market-held { font-family: var(--body-font); font-size: 14px; color: var(--ink-dim); }
.market-msg { font-family: var(--body-font); font-size: 15px; margin-top: 8px; min-height: 20px; }
.market-msg.ok { color: #6dff8e; }
.market-msg.bad { color: #ff6b6b; }

.market-positions { margin-top: 14px; border-top: 2px solid #2a3040; padding-top: 10px; }
.market-pos-head { font-family: var(--pixel-font); font-size: 9px; color: var(--ink-dim); letter-spacing: 1px; margin-bottom: 7px; }
.market-pos-list { display: flex; flex-direction: column; gap: 4px; max-height: 132px; overflow-y: auto; }
.mkt-pos {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--body-font); font-size: 15px; color: var(--ink);
  padding: 7px 10px; background: #0d1017; border: 2px solid #2a3040;
}
.mkt-pos .mkt-tick { font-family: var(--pixel-font); font-size: 10px; }
.mkt-pos span:nth-child(2) { flex: 1; color: var(--ink-dim); }
.mkt-mini {
  font-family: var(--pixel-font); font-size: 8px; padding: 5px 8px;
  background: #000; color: var(--ink); border: 2px solid #2a3040; cursor: pointer;
}
.mkt-mini:hover { border-color: #ff6b6b; color: #ff6b6b; }

/* ===== Net worth breakdown ===== */
.stat-clickable { cursor: pointer; }
.stat-clickable:hover .cash-value { text-shadow: 0 0 8px currentColor; }
.worth-panel { max-width: 900px; text-align: left; }
.worth-body { margin-top: 14px; max-height: 460px; overflow-y: auto; }
.worth-sec { margin-bottom: 14px; }
.worth-sec-head {
  display: flex; justify-content: space-between; align-items: baseline;
  font-family: var(--pixel-font); font-size: 10px; color: #5cf2c4;
  letter-spacing: 1px; padding-bottom: 6px; border-bottom: 2px solid #2a3040; margin-bottom: 5px;
}
.worth-sec-head b { color: var(--ink); font-size: 12px; }
.worth-row {
  display: flex; align-items: baseline; gap: 12px;
  font-family: var(--body-font); font-size: 15px; color: var(--ink);
  padding: 6px 8px;
}
.worth-row:nth-child(even) { background: rgba(255,255,255,0.02); }
.worth-row > span:first-child { font-family: var(--pixel-font); font-size: 10px; width: 150px; flex: none; }
.worth-row > span:nth-child(2) { flex: 1; }
.worth-row > b { font-family: var(--pixel-font); font-size: 10px; margin-left: auto; }
.worth-dim { color: var(--ink-dim); }
.wanted-label {
  font-family: var(--pixel-font);
  font-size: 7px;
  letter-spacing: 1px;
  color: var(--ink-dim);
  margin-top: 3px;
}
.wanted-label.hard { color: var(--warn); }
.wanted-label.critical { color: var(--danger); text-shadow: 0 0 6px rgba(255,77,77,0.7); }

/* ===== Laying low ===== */
.hide-overlay {
  position: absolute; inset: 0;
  background: rgba(3, 5, 10, 0.88);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; z-index: 6; pointer-events: none;
}
.hide-overlay.hidden { display: none; }
.hide-title {
  font-family: var(--pixel-font); font-size: 22px; color: #5cf2c4;
  letter-spacing: 3px; text-shadow: 0 0 14px rgba(92,242,196,0.5);
}
.hide-bar { width: 300px; height: 8px; background: #000; border: 2px solid #2a3040; }
.hide-fill { height: 100%; width: 0%; background: #5cf2c4; }
.hide-count { font-family: var(--pixel-font); font-size: 13px; color: var(--ink); }
.hide-note { font-family: var(--body-font); font-size: 15px; color: var(--ink-dim); max-width: 420px; text-align: center; }
.sentence-value { font-family: var(--pixel-font); font-size: 11px; color: var(--warn); }
.sentence-obj { font-family: var(--pixel-font); font-size: 7px; color: var(--ink-dim); margin-top: 3px; letter-spacing: 1px; }
.stat-block.hidden { display: none; }

/* Street address under a property's name — the panel header reads like a
   listing rather than a category label. */
.prop-address {
  font-family: var(--pixel-font);
  font-size: 9px;
  letter-spacing: 1.5px;
  color: var(--ink-dim);
  margin: -14px 0 18px;
}
.prop-address.hidden { display: none; }

/* One-time prompt to attach a recovery email, shown after the player owns
   something worth losing. Sits low so it never covers the action. */
.email-nudge {
  position: absolute;
  left: 50%; bottom: 96px;
  transform: translateX(-50%);
  z-index: 8;
  width: min(92vw, 560px);
  padding: 16px 18px;
  background: rgba(8, 6, 12, 0.92);
  border: 1px solid rgba(255, 180, 84, 0.35);
  border-left: 4px solid #ffc83c;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.7);
}
.email-nudge.hidden { display: none; }
.email-nudge-copy {
  font-family: 'Barlow Condensed', var(--body-font);
  font-weight: 600; font-size: 17px; color: #e6e2d6; margin-bottom: 12px;
}
.email-nudge-row { display: flex; gap: 8px; align-items: stretch; flex-wrap: wrap; }
.email-nudge-row .gate-input { flex: 1 1 200px; font-size: 16px; padding: 10px 12px; }
.email-nudge-row .btn { font-size: 16px; padding: 10px 18px; }
