/* ==========================================================
   CHICKEN CROSS — MOBILE WEBAPP STYLESHEET (KOTLIN_WEB)
   Brand Palette:
   - Wet Cracked Asphalt: #161922, #1E222D
   - Colored Manhole Covers: Emerald #22C55E, Cyan #06B6D4, Purple #A855F7, Gold #FFB800
   - Fiery Oven Grate Vents: #FF5722, #EF4444
   - 3D Arcade Buttons: GO STEP Emerald #16A34A & BANK EGGS Gold #F59E0B
   ========================================================== */

:root {
  --asphalt-dark: #161922;
  --asphalt-mid: #1E222D;
  --asphalt-card: #242938;
  --asphalt-border: #374057;
  --manhole-emerald: #22C55E;
  --manhole-cyan: #06B6D4;
  --manhole-purple: #A855F7;
  --manhole-gold: #FFB800;
  --flame-orange: #FF5722;
  --flame-red: #EF4444;
  --btn-go-top: #22C55E;
  --btn-go-base: #16A34A;
  --btn-go-edge: #116930;
  --btn-bank-top: #FBBF24;
  --btn-bank-base: #F59E0B;
  --btn-bank-edge: #B45309;
  --text-white: #F8FAFC;
  --text-muted: #94A3B8;
  --font-display: 'Fredoka', sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

html,
body {
  width: 100%;
  height: 100dvh;
  overflow: hidden;
  background-color: var(--asphalt-dark);
  font-family: var(--font-body);
  color: var(--text-white);
  touch-action: manipulation;
}

/* Mobile-First Portrait Viewport Container — bg.jpg at 100% opacity, ZERO blur, ZERO full-screen dark overlay */
#app-shell {
  position: relative;
  width: 100%;
  max-width: 430px;
  height: 100dvh;
  margin: 0 auto;
  overflow: hidden;
  background: url('bg.jpg') center/cover no-repeat;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.85);
}

/* Screen Routing */
.screen {
  display: none;
  width: 100%;
  height: 100%;
  flex-direction: column;
  justify-content: space-between;
  padding: env(safe-area-inset-top, 8px) 10px env(safe-area-inset-bottom, 10px) 10px;
  gap: 8px;
}

.screen.active {
  display: flex;
}

/* ==========================================================
   SCREEN 1: WORLD MAP HUB (WorldMapFirst)
   ========================================================== */

.hub-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--asphalt-dark);
  border: 2px solid var(--manhole-gold);
  border-radius: 18px;
  padding: 6px 10px;
  box-shadow: 0 4px 0 #0B0D13, 0 8px 16px rgba(0, 0, 0, 0.55);
  flex-shrink: 0;
}

.brand-pill {
  display: flex;
  align-items: center;
  gap: 9px;
}

.brand-logo {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 2px solid var(--manhole-gold);
  object-fit: cover;
  flex-shrink: 0;
}

.brand-titles {
  display: flex;
  flex-direction: column;
}

.app-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.05;
  color: #FFFFFF;
  letter-spacing: 0.3px;
  text-shadow: 0 2px 0 #000000;
}

.app-subtitle {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--manhole-gold);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.balance-group {
  display: flex;
  align-items: center;
  gap: 7px;
}

.egg-wallet {
  display: flex;
  align-items: center;
  gap: 5px;
  background-color: var(--asphalt-mid);
  border: 2px solid var(--btn-bank-base);
  border-radius: 999px;
  padding: 6px 11px;
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--manhole-gold);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
}

.egg-icon {
  font-size: 1rem;
}

.icon-capsule-btn {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background-color: var(--asphalt-mid);
  border: 2px solid var(--asphalt-border);
  color: var(--text-white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 3px 0 #0D0F16;
  transition: transform 0.1s ease;
}

.icon-capsule-btn:active {
  transform: translateY(2px);
}

/* Difficulty Selector Bar */
.difficulty-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
  background-color: var(--asphalt-dark);
  border: 2px solid var(--asphalt-border);
  border-radius: 15px;
  padding: 5px;
  box-shadow: 0 4px 0 #0B0D13;
  flex-shrink: 0;
}

.diff-tab {
  min-height: 48px;
  border-radius: 10px;
  border: 2px solid transparent;
  background-color: var(--asphalt-mid);
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  cursor: pointer;
  padding: 4px 2px;
  transition: all 0.15s ease;
}

.diff-tab .diff-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-bottom: 1px;
}

.diff-dot.emerald { background-color: var(--manhole-emerald); box-shadow: 0 0 6px var(--manhole-emerald); }
.diff-dot.cyan { background-color: var(--manhole-cyan); box-shadow: 0 0 6px var(--manhole-cyan); }
.diff-dot.purple { background-color: var(--manhole-purple); box-shadow: 0 0 6px var(--manhole-purple); }
.diff-dot.gold { background-color: var(--manhole-gold); box-shadow: 0 0 6px var(--manhole-gold); }

.diff-name {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.diff-mult {
  font-size: 0.62rem;
  font-weight: 700;
  opacity: 0.9;
}

.diff-tab.active[data-diff="EASY"] {
  background-color: #122B1D;
  border-color: var(--manhole-emerald);
  color: #FFFFFF;
}

.diff-tab.active[data-diff="MEDIUM"] {
  background-color: #0E2933;
  border-color: var(--manhole-cyan);
  color: #FFFFFF;
}

.diff-tab.active[data-diff="HARD"] {
  background-color: #26143B;
  border-color: var(--manhole-purple);
  color: #FFFFFF;
}

.diff-tab.active[data-diff="DAREDEVIL"] {
  background-color: #331F0B;
  border-color: var(--manhole-gold);
  color: var(--manhole-gold);
}

/* Route Summary Banner */
.route-summary-banner {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  background-color: var(--asphalt-dark);
  border: 2px solid var(--asphalt-border);
  border-radius: 14px;
  padding: 6px 10px;
  box-shadow: 0 3px 0 #0B0D13;
  flex-shrink: 0;
}

.route-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.route-stat-label {
  font-size: 0.58rem;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: 0.4px;
}

.route-stat-val {
  font-family: var(--font-display);
  font-size: 0.86rem;
  font-weight: 700;
  color: #FFFFFF;
}

.highlight-gold {
  color: var(--manhole-gold);
}

/* Winding Highway Map Viewport */
.highway-map-viewport {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  border-radius: 18px;
  border: 2px solid var(--asphalt-border);
  position: relative;
  scrollbar-width: none;
}

.highway-map-viewport::-webkit-scrollbar {
  display: none;
}

.highway-map-track {
  position: relative;
  width: 100%;
  height: 2280px;
}

.highway-road-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.highway-nodes-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Stage Manhole Milestone Node on World Map */
.map-stage-node {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 76px;
  min-height: 76px;
  border-radius: 50%;
  background-color: var(--asphalt-dark);
  border: 4px solid var(--asphalt-border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 0 #0B0D13, 0 8px 18px rgba(0, 0, 0, 0.75);
  transition: transform 0.15s ease, border-color 0.15s ease;
  padding: 4px;
  z-index: 2;
}

.map-stage-node::before {
  content: '';
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  border: 1.5px dashed rgba(255, 255, 255, 0.25);
  pointer-events: none;
}

.map-stage-node.unlocked.color-emerald {
  border-color: var(--manhole-emerald);
  background: radial-gradient(circle at 35% 30%, #1E3A2B, #161922 75%);
}

.map-stage-node.unlocked.color-cyan {
  border-color: var(--manhole-cyan);
  background: radial-gradient(circle at 35% 30%, #163844, #161922 75%);
}

.map-stage-node.unlocked.color-purple {
  border-color: var(--manhole-purple);
  background: radial-gradient(circle at 35% 30%, #311B47, #161922 75%);
}

.map-stage-node.unlocked.color-gold {
  border-color: var(--manhole-gold);
  background: radial-gradient(circle at 35% 30%, #44300E, #161922 75%);
}

.map-stage-node.selected {
  transform: translate(-50%, -50%) scale(1.14);
  box-shadow: 0 0 0 4px rgba(255, 184, 0, 0.45), 0 7px 0 #090B10, 0 12px 24px rgba(0, 0, 0, 0.9);
  z-index: 4;
}

.map-stage-node.locked {
  background-color: #14171F;
  border-color: #2E3446;
  opacity: 0.88;
}

.node-mile-num {
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 700;
  color: #FFFFFF;
  line-height: 1;
}

.node-mult-tag {
  font-family: var(--font-display);
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--manhole-gold);
  margin-top: 2px;
}

.node-stars {
  font-size: 0.62rem;
  letter-spacing: 1px;
  margin-top: 2px;
}

.node-name-pill {
  position: absolute;
  bottom: -22px;
  white-space: nowrap;
  background-color: var(--asphalt-dark);
  border: 1.5px solid var(--asphalt-border);
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 0.62rem;
  font-weight: 800;
  color: var(--text-white);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.75);
}

.map-stage-node.selected .node-name-pill {
  border-color: var(--manhole-gold);
  color: var(--manhole-gold);
}

/* Bottom Hub Dock */
.hub-bottom-dock {
  display: flex;
  flex-direction: column;
  gap: 7px;
  flex-shrink: 0;
}

.corner-capsules-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.capsule-btn {
  min-height: 52px;
  background-color: var(--asphalt-dark);
  border: 2px solid var(--asphalt-border);
  border-radius: 14px;
  padding: 6px 8px;
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--text-white);
  cursor: pointer;
  box-shadow: 0 4px 0 #0B0D13;
  text-align: left;
  transition: transform 0.1s ease;
}

.capsule-btn:active {
  transform: translateY(2px);
}

.gear-capsule { border-color: var(--manhole-cyan); }
.trophy-capsule { border-color: var(--manhole-gold); }
.legal-capsule { border-color: var(--manhole-purple); }

.capsule-badge-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.capsule-text {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.capsule-title {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
}

.capsule-sub {
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Main Enter Highway Arcade CTA Button */
.arcade-cta-btn {
  width: 100%;
  min-height: 58px;
  border-radius: 16px;
  border: 2px solid #4ADE80;
  background: linear-gradient(180deg, var(--btn-go-top) 0%, var(--btn-go-base) 100%);
  color: #FFFFFF;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 5px 0 var(--btn-go-edge), 0 8px 20px rgba(0, 0, 0, 0.65);
  transition: transform 0.1s ease, box-shadow 0.1s ease;
  padding: 6px 14px;
}

.arcade-cta-btn:active {
  transform: translateY(4px);
  box-shadow: 0 1px 0 var(--btn-go-edge);
}

.cta-main-text {
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.45);
}

.cta-sub-text {
  font-size: 0.68rem;
  font-weight: 700;
  color: #DCFCE7;
  margin-top: 1px;
}

/* ==========================================================
   SCREEN 2: SEPARATE FULLSCREEN GAMEPLAY ARENA
   ========================================================== */

.arena-top-hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background-color: var(--asphalt-dark);
  border: 2px solid var(--asphalt-border);
  border-radius: 16px;
  padding: 6px 10px;
  box-shadow: 0 4px 0 #0B0D13;
  flex-shrink: 0;
}

.arena-back-btn {
  min-width: 68px;
  min-height: 48px;
  border-radius: 12px;
  background-color: var(--asphalt-mid);
  border: 2px solid var(--asphalt-border);
  color: #FFFFFF;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  padding: 0 10px;
  box-shadow: 0 3px 0 #0B0D13;
}

.arena-back-btn:active {
  transform: translateY(2px);
}

.arena-stage-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex: 1;
  min-width: 0;
}

.arena-stage-name {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  color: #FFFFFF;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.arena-meta-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}

.arena-diff-pill {
  font-size: 0.62rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
  background-color: #143322;
  color: var(--manhole-emerald);
  border: 1px solid var(--manhole-emerald);
}

.arena-step-pill {
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--manhole-gold);
}

.arena-wallet-pill {
  display: flex;
  align-items: center;
  gap: 4px;
  background-color: var(--asphalt-mid);
  border: 2px solid var(--btn-bank-base);
  border-radius: 999px;
  padding: 6px 10px;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--manhole-gold);
}

/* Multiplier & Stake Readout Strip */
.arena-multiplier-strip {
  display: grid;
  grid-template-columns: 1.15fr 0.9fr 1.15fr;
  gap: 6px;
  flex-shrink: 0;
}

.mult-chip {
  background-color: var(--asphalt-dark);
  border: 2px solid var(--asphalt-border);
  border-radius: 14px;
  padding: 5px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 0 #0B0D13;
}

.active-mult-chip {
  border-color: var(--manhole-gold);
  background: radial-gradient(circle at 50% 0%, #35270C, #161922 80%);
}

.mult-chip-label {
  font-size: 0.56rem;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: 0.4px;
}

.mult-chip-val {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: #FFFFFF;
}

.neon-mult {
  font-size: 1.12rem;
  color: var(--manhole-gold);
  text-shadow: 0 0 8px rgba(255, 184, 0, 0.5);
}

.stake-adjuster {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 2px;
}

.stake-step-btn {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background-color: var(--asphalt-mid);
  border: 1.5px solid var(--asphalt-border);
  color: #FFFFFF;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stake-step-btn:disabled {
  opacity: 0.4;
}

.perk-status-icons {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 2px;
}

.perk-pill {
  font-family: var(--font-display);
  font-size: 0.74rem;
  font-weight: 700;
  background-color: var(--asphalt-mid);
  border: 1.5px solid var(--manhole-cyan);
  color: #E0F2FE;
  border-radius: 8px;
  padding: 3px 6px;
}

.radar-pulse-btn {
  min-height: 28px;
  background: linear-gradient(180deg, #06B6D4, #0891B2);
  border: 1.5px solid #67E8F9;
  border-radius: 8px;
  padding: 2px 7px;
  color: #FFFFFF;
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}

.radar-pulse-btn:disabled {
  opacity: 0.45;
}

/* Gameplay Canvas Wrapper */
.arena-canvas-wrap {
  position: relative;
  flex: 1;
  min-height: 0;
  width: 100%;
  border-radius: 18px;
  border: 3px solid var(--asphalt-border);
  overflow: hidden;
  background-color: var(--asphalt-dark);
  box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.8), 0 6px 16px rgba(0, 0, 0, 0.6);
}

#highway-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* Lane Spot Selector Bar (3 Circular Manhole Spots per Lane) */
.lane-spot-selector {
  position: absolute;
  bottom: 10px;
  left: 10px;
  right: 10px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  pointer-events: auto;
  z-index: 3;
}

.spot-btn {
  min-height: 48px;
  background-color: rgba(22, 25, 34, 0.94);
  border: 2px solid var(--asphalt-border);
  border-radius: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  padding: 4px 8px;
  box-shadow: 0 4px 0 #0B0D13;
  transition: all 0.12s ease;
}

.spot-disc {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px dashed currentColor;
  flex-shrink: 0;
}

.spot-label {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.spot-btn.selected {
  background-color: #142F21;
  border-color: var(--manhole-emerald);
  color: #FFFFFF;
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.45), 0 4px 0 #0A1F14;
}

.spot-btn.selected .spot-disc {
  background-color: var(--manhole-emerald);
  border-style: solid;
}

/* Outcome Card Overlay inside Canvas Wrap */
.arena-banner-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 10;
  background-color: rgba(12, 14, 20, 0.78);
}

.arena-banner-overlay.hidden {
  display: none;
}

.outcome-card {
  width: 100%;
  max-width: 330px;
  background-color: var(--asphalt-dark);
  border: 3px solid var(--manhole-gold);
  border-radius: 22px;
  padding: 18px 16px;
  text-align: center;
  box-shadow: 0 10px 0 #090B10, 0 16px 36px rgba(0, 0, 0, 0.9);
  animation: popIn 0.22s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

.outcome-card.hazard-loss {
  border-color: var(--flame-red);
}

@keyframes popIn {
  from { transform: scale(0.85); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.outcome-badge {
  font-size: 2.5rem;
  margin-bottom: 4px;
}

.outcome-title {
  font-family: var(--font-display);
  font-size: 1.32rem;
  font-weight: 700;
  color: #FFFFFF;
}

.outcome-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 6px 0 12px;
  line-height: 1.35;
}

.outcome-reward-box {
  background-color: var(--asphalt-mid);
  border: 2px solid var(--asphalt-border);
  border-radius: 14px;
  padding: 8px 12px;
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.outcome-reward-label {
  font-size: 0.64rem;
  font-weight: 800;
  color: var(--text-muted);
}

.outcome-reward-val {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--manhole-gold);
}

.outcome-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.arcade-btn {
  min-height: 48px;
  border-radius: 13px;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  color: #FFFFFF;
  cursor: pointer;
  border: 2px solid transparent;
}

.arcade-btn.gold-btn {
  background: linear-gradient(180deg, var(--btn-bank-top), var(--btn-bank-base));
  border-color: #FDE68A;
  color: #161922;
  box-shadow: 0 4px 0 var(--btn-bank-edge);
}

.arcade-btn.green-btn {
  background: linear-gradient(180deg, var(--btn-go-top), var(--btn-go-base));
  border-color: #86EFAC;
  box-shadow: 0 4px 0 var(--btn-go-edge);
}

/* Chunky 3D Control Deck: BANK EGGS & GO STEP */
.arena-control-deck {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 8px;
  flex-shrink: 0;
}

.arcade-action-btn {
  min-height: 64px;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 6px 10px;
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}

.bank-eggs-btn {
  background: linear-gradient(180deg, var(--btn-bank-top) 0%, var(--btn-bank-base) 100%);
  border: 2px solid #FDE68A;
  color: #161922;
  box-shadow: 0 5px 0 var(--btn-bank-edge), 0 8px 16px rgba(0, 0, 0, 0.55);
}

.bank-eggs-btn:disabled {
  background: #252A38;
  border-color: #384056;
  color: #64748B;
  box-shadow: 0 4px 0 #13161F;
  cursor: not-allowed;
}

.go-step-btn {
  background: linear-gradient(180deg, var(--btn-go-top) 0%, var(--btn-go-base) 100%);
  border: 2px solid #86EFAC;
  color: #FFFFFF;
  box-shadow: 0 5px 0 var(--btn-go-edge), 0 8px 16px rgba(0, 0, 0, 0.55);
}

.go-step-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.arcade-action-btn:not(:disabled):active {
  transform: translateY(4px);
}

.btn-top-tag {
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  opacity: 0.92;
}

.btn-main-label {
  font-family: var(--font-display);
  font-size: 1.18rem;
  font-weight: 700;
  line-height: 1.08;
}

.btn-payout-tag {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  margin-top: 1px;
}

/* ==========================================================
   MODALS: GEAR UPGRADES, TROPHY COOP, SETTINGS & LEGAL
   ========================================================== */

.modal-backdrop {
  position: absolute;
  inset: 0;
  background-color: rgba(11, 13, 19, 0.82);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 50;
  padding: 10px 8px 0 8px;
}

.modal-backdrop.hidden {
  display: none;
}

.modal-sheet {
  width: 100%;
  max-height: 88dvh;
  background-color: var(--asphalt-dark);
  border: 2px solid var(--manhole-gold);
  border-bottom: none;
  border-radius: 24px 24px 0 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 -10px 32px rgba(0, 0, 0, 0.85);
}

.modal-sheet.large-sheet {
  max-height: 92dvh;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background-color: var(--asphalt-mid);
  border-bottom: 2px solid var(--asphalt-border);
  flex-shrink: 0;
}

.modal-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-emoji {
  font-size: 1.5rem;
}

.modal-title-group h2 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: #FFFFFF;
}

.modal-subtitle {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.modal-close-btn {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background-color: var(--asphalt-card);
  border: 2px solid var(--asphalt-border);
  color: #FFFFFF;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
}

.modal-wallet-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  background-color: #12151E;
  border-bottom: 1.5px solid var(--asphalt-border);
  font-size: 0.74rem;
  font-weight: 800;
  color: var(--text-muted);
  flex-shrink: 0;
}

.wallet-readout {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--manhole-gold);
}

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

/* Upgrade Item Card */
.upgrade-card {
  background-color: var(--asphalt-mid);
  border: 2px solid var(--asphalt-border);
  border-radius: 16px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.upgrade-icon-box {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background-color: var(--asphalt-dark);
  border: 2px solid var(--manhole-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.45rem;
  flex-shrink: 0;
}

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

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

.upgrade-name {
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 700;
  color: #FFFFFF;
}

.upgrade-lvl-badge {
  font-size: 0.64rem;
  font-weight: 800;
  background-color: var(--asphalt-dark);
  color: var(--manhole-gold);
  border: 1px solid var(--manhole-gold);
  border-radius: 999px;
  padding: 1px 7px;
}

.upgrade-desc {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
  line-height: 1.3;
}

.upgrade-buy-btn {
  min-width: 92px;
  min-height: 48px;
  border-radius: 12px;
  background: linear-gradient(180deg, var(--btn-go-top), var(--btn-go-base));
  border: 2px solid #86EFAC;
  color: #FFFFFF;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  padding: 4px 10px;
  box-shadow: 0 3px 0 var(--btn-go-edge);
  flex-shrink: 0;
}

.upgrade-buy-btn:disabled {
  background: var(--asphalt-card);
  border-color: var(--asphalt-border);
  color: var(--text-muted);
  box-shadow: none;
  cursor: not-allowed;
}

/* Trophy Coop Grid & Cards */
.career-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 10px 12px;
  background-color: #12151E;
  border-bottom: 1.5px solid var(--asphalt-border);
  flex-shrink: 0;
}

.stat-tile {
  background-color: var(--asphalt-mid);
  border: 1.5px solid var(--asphalt-border);
  border-radius: 10px;
  padding: 6px 4px;
  text-align: center;
  display: flex;
  flex-direction: column;
}

.stat-tile-label {
  font-size: 0.55rem;
  font-weight: 800;
  color: var(--text-muted);
}

.stat-tile-val {
  font-family: var(--font-display);
  font-size: 0.88rem;
  color: var(--manhole-gold);
}

.trophy-card {
  background-color: var(--asphalt-mid);
  border: 2px solid var(--asphalt-border);
  border-radius: 15px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.trophy-card.unlocked {
  border-color: var(--manhole-gold);
  background: linear-gradient(90deg, #2B2210 0%, var(--asphalt-mid) 100%);
}

.trophy-badge {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: var(--asphalt-dark);
  border: 2px solid var(--asphalt-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.trophy-card.unlocked .trophy-badge {
  border-color: var(--manhole-gold);
}

.trophy-info {
  flex: 1;
}

.trophy-title {
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 700;
  color: #FFFFFF;
}

.trophy-desc {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.trophy-status-tag {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 999px;
  background-color: var(--asphalt-dark);
  color: var(--text-muted);
}

.trophy-card.unlocked .trophy-status-tag {
  background-color: var(--manhole-gold);
  color: #161922;
}

/* Settings Subtabs & Panels */
.settings-subtabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 8px 12px;
  background-color: #12151E;
  border-bottom: 1.5px solid var(--asphalt-border);
  flex-shrink: 0;
}

.subtab-btn {
  min-height: 48px;
  border-radius: 11px;
  background-color: var(--asphalt-mid);
  border: 2px solid var(--asphalt-border);
  color: var(--text-muted);
  font-family: var(--font-display);
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
}

.subtab-btn.active {
  background-color: #142F21;
  border-color: var(--manhole-emerald);
  color: #FFFFFF;
}

.settings-panel {
  display: none;
  flex-direction: column;
  gap: 10px;
}

.settings-panel.active {
  display: flex;
}

.setting-card {
  background-color: var(--asphalt-mid);
  border: 2px solid var(--asphalt-border);
  border-radius: 16px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.setting-card h3 {
  font-family: var(--font-display);
  font-size: 0.94rem;
  color: #FFFFFF;
}

.setting-card p {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.38;
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.toggle-switch {
  width: 56px;
  height: 34px;
  border-radius: 999px;
  background-color: #334155;
  border: 2px solid #475569;
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
  transition: background-color 0.15s ease;
}

.toggle-switch.on {
  background-color: var(--btn-go-base);
  border-color: #86EFAC;
}

.toggle-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: #FFFFFF;
  transition: transform 0.15s ease;
}

.toggle-switch.on .toggle-knob {
  transform: translateX(22px);
}

.guide-list {
  padding-left: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.74rem;
  color: var(--text-muted);
  line-height: 1.38;
}

.guide-list strong {
  color: #FFFFFF;
}

/* About & Help Specific Widgets */
.app-identity-card {
  flex-direction: row;
  align-items: center;
  gap: 12px;
}

.about-logo {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  border: 2px solid var(--manhole-gold);
  object-fit: cover;
}

.version-pill {
  font-size: 0.72rem;
  color: var(--manhole-gold) !important;
  font-weight: 700;
}

.status-online-pill {
  display: inline-block;
  margin-top: 4px;
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--manhole-emerald);
  background-color: #112A1C;
  border: 1px solid var(--manhole-emerald);
  padding: 2px 8px;
  border-radius: 999px;
}

.star-rating-row {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 4px 0;
}

.rate-star-btn {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background-color: var(--asphalt-dark);
  border: 2px solid var(--asphalt-border);
  font-size: 1.5rem;
  color: #475569;
  cursor: pointer;
}

.rate-star-btn.active {
  color: var(--manhole-gold);
  border-color: var(--manhole-gold);
  background-color: #2B210E;
}

.custom-input,
.custom-select,
.custom-textarea {
  width: 100%;
  background-color: var(--asphalt-dark);
  border: 2px solid var(--asphalt-border);
  border-radius: 12px;
  padding: 10px 12px;
  color: #FFFFFF;
  font-family: var(--font-body);
  font-size: 0.82rem;
  user-select: text;
  -webkit-user-select: text;
}

.field-label {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--text-white);
  margin-top: 2px;
}

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

.saved-status-note {
  font-size: 0.7rem;
  color: var(--manhole-emerald);
  font-weight: 700;
}

.mini-action-btn {
  min-height: 48px;
  padding: 0 14px;
  border-radius: 12px;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  border: 2px solid transparent;
}

.gold-fill-btn {
  background-color: var(--btn-bank-base);
  border-color: #FDE68A;
  color: #161922;
}

.green-fill-btn {
  background-color: var(--btn-go-base);
  border-color: #86EFAC;
  color: #FFFFFF;
}

.danger-btn {
  background-color: #7F1D1D;
  border-color: var(--flame-red);
  color: #FFFFFF;
}

.share-code-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background-color: var(--asphalt-dark);
  border: 2px dashed var(--manhole-gold);
  border-radius: 12px;
  padding: 6px 8px 6px 12px;
}

.share-code-box code {
  font-family: var(--font-display);
  font-size: 0.82rem;
  color: var(--manhole-gold);
}

.support-submit-btn {
  min-height: 50px;
  margin-top: 4px;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
}

.ticket-history-wrap h4 {
  font-family: var(--font-display);
  font-size: 0.82rem;
  color: var(--manhole-cyan);
  margin: 6px 0;
}

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

.ticket-item {
  background-color: var(--asphalt-dark);
  border: 1.5px solid var(--asphalt-border);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 0.72rem;
}

.ticket-item-top {
  display: flex;
  justify-content: space-between;
  font-weight: 800;
  color: var(--manhole-gold);
  margin-bottom: 3px;
}

/* Legal Sub-Navigation & Articles */
.legal-Subnav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.legal-pill-btn {
  min-height: 48px;
  border-radius: 11px;
  background-color: var(--asphalt-mid);
  border: 2px solid var(--asphalt-border);
  color: var(--text-muted);
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.legal-pill-btn.active {
  background-color: #2B210E;
  border-color: var(--manhole-gold);
  color: var(--manhole-gold);
}

.legal-doc-card {
  display: none;
  background-color: var(--asphalt-mid);
  border: 2px solid var(--asphalt-border);
  border-radius: 16px;
  padding: 14px;
  flex-direction: column;
  gap: 8px;
}

.legal-doc-card.active {
  display: flex;
}

.legal-doc-card h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--manhole-gold);
}

.legal-updated {
  font-size: 0.68rem;
  color: var(--manhole-cyan);
  font-weight: 700;
}

.legal-doc-card h4 {
  font-family: var(--font-display);
  font-size: 0.84rem;
  color: #FFFFFF;
  margin-top: 4px;
}

.legal-doc-card p {
  font-size: 0.74rem;
  color: var(--text-muted);
  line-height: 1.45;
}

/* Toast Notification */
.toast-container {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 90%;
  max-width: 360px;
  pointer-events: none;
}

.toast-msg {
  background-color: var(--asphalt-dark);
  border: 2px solid var(--manhole-gold);
  color: #FFFFFF;
  padding: 10px 14px;
  border-radius: 14px;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 600;
  text-align: center;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.85);
  animation: popIn 0.2s ease;
}
