/* Viral Coil — original neon/glass design tokens. No TikTok/Slither.io
   color hex pairs used verbatim. */
:root {
  --vc-bg: #0b0712;
  --vc-bg-2: #120a1f;
  --vc-fg: #f1ecff;
  --vc-muted: #a09bbc;
  --vc-magenta: #ff2d8f;
  --vc-cyan: #34e7ff;
  --vc-lime: #aaff4a;
  --vc-gold: #ffd23f;
  --vc-purple: #9b3bff;
  --vc-line: rgba(160, 155, 188, 0.18);
  --vc-card: rgba(18, 10, 31, 0.78);
  --vc-radius: 14px;
  --vc-max: 1180px;
  --vc-sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --vc-display: "Space Grotesk", "Inter", sans-serif;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  background: radial-gradient(circle at 20% 10%, rgba(255, 45, 143, 0.15), transparent 35%),
              radial-gradient(circle at 80% 70%, rgba(52, 231, 255, 0.12), transparent 35%),
              var(--vc-bg);
  color: var(--vc-fg);
  font-family: var(--vc-sans);
  min-height: 100dvh;
}
a { color: var(--vc-cyan); text-decoration: none; }
a:hover { color: var(--vc-magenta); }

/* ---------- nav ---------- */
.vc-nav {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; gap: 24px;
  padding: 14px max(16px, env(safe-area-inset-right)) 14px max(16px, env(safe-area-inset-left));
  background: linear-gradient(180deg, rgba(11, 7, 18, 0.92), rgba(11, 7, 18, 0.6));
  border-bottom: 1px solid var(--vc-line);
  backdrop-filter: blur(12px);
}
.vc-brand { display: inline-flex; align-items: center; gap: 8px; color: var(--vc-fg); font-family: var(--vc-display); font-weight: 700; font-size: 1.1rem; }
.vc-logo { font-size: 1.4rem; color: var(--vc-magenta); text-shadow: 0 0 16px var(--vc-magenta); }
.vc-nav-links { display: flex; gap: 18px; flex: 1; }
.vc-nav-links a { color: var(--vc-muted); font-weight: 500; font-size: 0.95rem; }
.vc-nav-links a:hover { color: var(--vc-fg); }
.vc-nav-user { display: inline-flex; align-items: center; gap: 12px; }
.vc-cta { padding: 8px 16px; border-radius: 999px; background: linear-gradient(120deg, var(--vc-magenta), var(--vc-cyan)); color: #0b0712; font-weight: 700; }
.vc-user { display: inline-flex; align-items: center; gap: 8px; color: var(--vc-fg); }
.vc-avatar { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--vc-line); object-fit: cover; }
.vc-avatar-fallback { display: inline-flex; align-items: center; justify-content: center; color: #0b0712; font-weight: 800; }
.vc-link { color: var(--vc-muted); font-size: 0.85rem; }

/* ---------- main ---------- */
.vc-main { max-width: var(--vc-max); margin: 0 auto; padding: 32px max(16px, env(safe-area-inset-right)) 64px max(16px, env(safe-area-inset-left)); }
.vc-footer { max-width: var(--vc-max); margin: 0 auto; padding: 18px 16px; color: var(--vc-muted); font-size: 0.85rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.vc-foot-tag { font-family: var(--vc-display); }

/* ---------- landing ---------- */
.vc-hero { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 32px; align-items: center; margin: 24px 0 56px; }
.vc-eyebrow { display: inline-block; padding: 4px 12px; border-radius: 999px; background: rgba(255, 45, 143, 0.12); color: var(--vc-magenta); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.vc-hero h1 { font-family: var(--vc-display); font-weight: 700; font-size: clamp(2.4rem, 6vw, 4.4rem); line-height: 1.02; margin: 18px 0 14px; }
.vc-grad { background: linear-gradient(120deg, var(--vc-magenta), var(--vc-cyan)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.vc-hero-copy p { color: var(--vc-muted); font-size: 1.05rem; max-width: 38ch; line-height: 1.55; }
.vc-cta-row { display: flex; gap: 12px; margin: 22px 0 16px; flex-wrap: wrap; }
.vc-btn { display: inline-flex; align-items: center; justify-content: center; padding: 12px 22px; border-radius: 999px; font-weight: 700; cursor: pointer; border: 1px solid transparent; font-family: inherit; font-size: 1rem; transition: transform 150ms ease, border-color 150ms ease, background 150ms ease; }
.vc-btn-primary { background: linear-gradient(120deg, var(--vc-magenta), var(--vc-cyan)); color: #0b0712; box-shadow: 0 8px 30px rgba(255, 45, 143, 0.35), 0 8px 30px rgba(52, 231, 255, 0.2); }
.vc-btn-primary:hover { transform: translateY(-1px); }
.vc-btn-ghost { background: transparent; color: var(--vc-fg); border-color: var(--vc-line); }
.vc-btn-ghost:hover { border-color: var(--vc-cyan); }
.vc-btn-mini { padding: 6px 12px; font-size: 0.85rem; border-radius: 999px; background: rgba(52, 231, 255, 0.15); color: var(--vc-cyan); border: 1px solid var(--vc-cyan); }
.vc-muted { color: var(--vc-muted); }

.vc-hero-art { position: relative; aspect-ratio: 1 / 1; max-width: 460px; margin: 0 auto; }
.vc-orb { position: absolute; border-radius: 50%; filter: blur(0.2px); }
.vc-orb-1 { width: 64%; height: 64%; left: 18%; top: 18%; background: radial-gradient(circle at 30% 30%, var(--vc-magenta), transparent 60%); }
.vc-orb-2 { width: 40%; height: 40%; right: 10%; bottom: 12%; background: radial-gradient(circle at 30% 30%, var(--vc-cyan), transparent 60%); }
.vc-orb-3 { width: 28%; height: 28%; left: 4%; bottom: 12%; background: radial-gradient(circle at 30% 30%, var(--vc-lime), transparent 60%); }
.vc-snake { position: absolute; left: 6%; right: 6%; top: 40%; height: 14px; border-radius: 999px; background: linear-gradient(120deg, var(--vc-magenta), var(--vc-cyan)); box-shadow: 0 0 60px rgba(52, 231, 255, 0.45); transform: rotate(-12deg); }

.vc-grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.vc-card { padding: 22px; background: var(--vc-card); border: 1px solid var(--vc-line); border-radius: var(--vc-radius); backdrop-filter: blur(10px); }
.vc-card h3 { margin: 0 0 8px; font-family: var(--vc-display); }

/* ---------- auth / login ---------- */
.vc-auth { max-width: 460px; margin: 24px auto; padding: 28px; border: 1px solid var(--vc-line); border-radius: var(--vc-radius); background: var(--vc-card); }
.vc-auth h1 { margin: 0 0 6px; font-family: var(--vc-display); }
.vc-oauth-stack { display: grid; gap: 10px; margin: 18px 0; }
.vc-oauth { display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 12px; font-weight: 700; border: 1px solid var(--vc-line); color: var(--vc-fg); background: rgba(11, 7, 18, 0.6); }
.vc-oauth:hover { border-color: var(--vc-cyan); }
.vc-oauth-icon { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 8px; background: rgba(52, 231, 255, 0.12); color: var(--vc-cyan); }
.vc-oauth-discord .vc-oauth-icon { background: rgba(88, 101, 242, 0.18); color: #b0b8ff; }
.vc-oauth-linkedin .vc-oauth-icon { background: rgba(10, 102, 194, 0.18); color: #7cc8f2; }
.vc-warning { padding: 12px; border: 1px solid var(--vc-gold); border-radius: 10px; background: rgba(255, 210, 63, 0.06); color: var(--vc-gold); font-size: 0.9rem; }
.vc-fineprint { font-size: 0.82rem; margin-top: 12px; }

/* ---------- profile ---------- */
.vc-profile-hero { display: flex; align-items: center; gap: 18px; margin-bottom: 22px; }
.vc-profile-hero .vc-avatar { width: 64px; height: 64px; }
.vc-profile-hero h1 { margin: 0; font-family: var(--vc-display); }
.vc-stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-bottom: 28px; }
.vc-stat { display: grid; gap: 4px; padding: 14px 16px; }
.vc-stat span { color: var(--vc-muted); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; }
.vc-stat strong { font-family: var(--vc-display); font-size: 1.6rem; }
.vc-skins { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.vc-skin { padding: 14px; border: 1px solid var(--vc-line); border-radius: 12px; background: rgba(11, 7, 18, 0.55); display: grid; grid-template-columns: 88px 1fr; gap: 14px; align-items: center; }
.vc-skin.is-equipped { border-color: var(--vc-magenta); }
.vc-skin.is-locked { opacity: 0.6; }
.vc-skin-swatch { width: 80px; height: 80px; border-radius: 12px; }
.vc-skin-meta strong { display: block; }
.vc-skin-meta small { color: var(--vc-muted); text-transform: uppercase; letter-spacing: 0.04em; font-size: 0.72rem; }
.vc-skin-state { color: var(--vc-magenta); font-weight: 700; font-size: 0.85rem; }
.vc-skin-locked { color: var(--vc-muted); }

/* ---------- leaderboards ---------- */
.vc-leaderboards h1 { font-family: var(--vc-display); margin: 0 0 8px; }
.vc-tabs { display: flex; gap: 8px; margin: 16px 0; flex-wrap: wrap; }
.vc-tab { padding: 8px 16px; border-radius: 999px; background: rgba(11, 7, 18, 0.6); color: var(--vc-muted); border: 1px solid var(--vc-line); cursor: pointer; font: inherit; font-weight: 600; }
.vc-tab.is-active { color: var(--vc-fg); border-color: var(--vc-cyan); background: rgba(52, 231, 255, 0.12); }
.vc-leaderboard { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.vc-leaderboard li { display: grid; grid-template-columns: 56px 1fr auto; align-items: center; padding: 12px 14px; background: var(--vc-card); border: 1px solid var(--vc-line); border-radius: 10px; }
.vc-rank { color: var(--vc-muted); font-family: var(--vc-display); font-weight: 700; }
.vc-name { font-weight: 600; }
.vc-score { font-family: var(--vc-display); color: var(--vc-cyan); font-weight: 700; }
.vc-empty { color: var(--vc-muted); }

/* ---------- quests ---------- */
.vc-quests h1 { font-family: var(--vc-display); margin: 0 0 4px; }
.vc-quest-list { display: grid; gap: 12px; margin-top: 18px; }
.vc-quest { padding: 16px 18px; background: var(--vc-card); border: 1px solid var(--vc-line); border-radius: 12px; }
.vc-quest.is-done { border-color: var(--vc-lime); }
.vc-quest-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.vc-quest-reward { color: var(--vc-cyan); font-weight: 700; }
.vc-quest p { color: var(--vc-muted); margin: 6px 0 10px; }
.vc-progress { width: 100%; height: 8px; background: rgba(255, 45, 143, 0.1); border-radius: 999px; overflow: hidden; }
.vc-progress span { display: block; height: 100%; background: linear-gradient(120deg, var(--vc-magenta), var(--vc-cyan)); border-radius: 999px; transition: width 250ms ease; }

/* ---------- settings ---------- */
.vc-settings h1 { font-family: var(--vc-display); margin: 0 0 12px; }
.vc-bullets { padding-left: 18px; color: var(--vc-muted); }
.vc-radio-row {
  display: flex; gap: 14px; flex-wrap: wrap;
  border: 0; padding: 0; margin: 10px 0 14px;
}
.vc-radio-row label {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 14px; border-radius: 999px;
  background: rgba(11,7,18,0.55); border: 1px solid var(--vc-line);
  font-weight: 600; font-size: 0.92rem; cursor: pointer;
  min-height: 44px;
}
.vc-radio-row input { accent-color: var(--vc-magenta); }
.vc-toggle {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: 12px;
  background: rgba(11,7,18,0.55); border: 1px solid var(--vc-line);
  font-weight: 600; cursor: pointer; min-height: 44px;
}
.vc-toggle input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--vc-cyan); }
.vc-slider-row {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) minmax(140px, 220px) 56px;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(11,7,18,0.55);
  border: 1px solid var(--vc-line);
  font-weight: 700;
}
.vc-slider-row input { width: 100%; accent-color: var(--vc-cyan); }
.vc-slider-row strong { color: var(--vc-cyan); text-align: right; }

/* ---------- game ---------- */
/* On the play page the game canvas is position:fixed and owns the viewport.
   Use display:contents on .vc-main so the wrapper vanishes from layout while
   its children (#vc-game-shell, scripts) still render. The previous rule
   used display:none which also hid the game shell. */
.vc-play .vc-main { display: contents; }
.vc-play .vc-footer { display: none; }
.vc-play .vc-nav { display: none; }
#vc-game-shell { position: fixed; inset: 0; }
#vc-canvas { display: block; width: 100%; height: 100%; touch-action: none; background: var(--vc-bg); }
#vc-hud { position: fixed; inset: 0; pointer-events: none; }
.vc-hud-row { pointer-events: auto; }
.vc-hud-top { position: absolute; top: max(12px, env(safe-area-inset-top)); left: 12px; display: flex; gap: 8px; }
.vc-hud-chip { padding: 8px 14px; border-radius: 999px; background: rgba(11, 7, 18, 0.6); border: 1px solid var(--vc-line); display: inline-flex; flex-direction: column; align-items: flex-start; line-height: 1.1; color: var(--vc-fg); font: inherit; font-weight: 700; backdrop-filter: blur(8px); }
.vc-hud-chip span { color: var(--vc-muted); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }
.vc-hud-chip strong { font-family: var(--vc-display); font-size: 1.05rem; }
.vc-hud-button { padding: 8px 12px; cursor: pointer; }
.vc-hud-button.is-active { border-color: var(--vc-cyan); color: var(--vc-cyan); }
.vc-hud-leaderboard { position: absolute; top: max(12px, env(safe-area-inset-top)); right: max(12px, env(safe-area-inset-right)); width: 220px; padding: 14px; background: rgba(11, 7, 18, 0.65); border: 1px solid var(--vc-line); border-radius: 12px; backdrop-filter: blur(8px); }
.vc-hud-leaderboard h4 { margin: 0 0 8px; font-family: var(--vc-display); font-size: 0.85rem; color: var(--vc-muted); letter-spacing: 0.06em; text-transform: uppercase; }
.vc-hud-leaderboard ol { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.vc-hud-leaderboard li { display: grid; grid-template-columns: 28px 1fr auto; gap: 6px; font-size: 0.85rem; }
#vc-minimap { position: absolute; bottom: max(14px, env(safe-area-inset-bottom)); right: max(14px, env(safe-area-inset-right)); border-radius: 50%; background: rgba(11, 7, 18, 0.55); border: 1px solid var(--vc-line); }
#vc-boost-bar { position: absolute; bottom: max(14px, env(safe-area-inset-bottom)); left: max(14px, env(safe-area-inset-left)); width: 220px; height: 8px; background: rgba(255, 45, 143, 0.18); border-radius: 999px; overflow: hidden; }
#vc-boost-fill { display: block; height: 100%; width: 0; background: linear-gradient(120deg, var(--vc-magenta), var(--vc-cyan)); transition: width 80ms linear; }
#vc-touch-controls { position: absolute; bottom: max(70px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); display: none; }
#vc-boost-btn { padding: 16px 24px; border-radius: 999px; background: rgba(255, 45, 143, 0.4); color: #fff; border: 1px solid var(--vc-magenta); font: inherit; font-weight: 700; pointer-events: auto; }
#vc-quest-toast { position: absolute; top: 80px; left: 50%; transform: translateX(-50%); padding: 10px 16px; border-radius: 999px; background: rgba(170, 255, 74, 0.18); border: 1px solid var(--vc-lime); color: var(--vc-lime); font-weight: 700; }
.vc-combo-chip {
  position: absolute;
  top: max(102px, calc(env(safe-area-inset-top) + 90px));
  left: max(12px, env(safe-area-inset-left));
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 210, 63, 0.18);
  border: 1px solid var(--vc-gold);
  color: var(--vc-gold);
  font-weight: 800;
  backdrop-filter: blur(8px);
}
.vc-combo-chip span { font-size: 0.7rem; text-transform: uppercase; margin-right: 7px; color: rgba(255,255,255,0.72); }
.vc-rank-pop {
  position: absolute;
  top: max(68px, calc(env(safe-area-inset-top) + 56px));
  left: 50%;
  transform: translate(-50%, -8px);
  opacity: 0;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(52, 231, 255, 0.18);
  border: 1px solid var(--vc-cyan);
  color: var(--vc-cyan);
  font-weight: 800;
  transition: transform 180ms ease, opacity 180ms ease;
}
.vc-rank-pop.is-visible { transform: translate(-50%, 0); opacity: 1; }
.vc-event-banner {
  position: absolute;
  top: max(12px, env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  max-width: min(420px, calc(100vw - 220px));
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(255, 210, 63, 0.16);
  border: 1px solid rgba(255, 210, 63, 0.65);
  color: var(--vc-gold);
  font-weight: 800;
  text-align: center;
  backdrop-filter: blur(8px);
}
#vc-overlay { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; background: rgba(11, 7, 18, 0.78); backdrop-filter: blur(8px); pointer-events: auto; }
#vc-overlay.is-active, #vc-overlay.is-start { display: flex; }
.vc-overlay-card { width: min(420px, 92vw); padding: 28px; background: var(--vc-card); border: 1px solid var(--vc-line); border-radius: var(--vc-radius); text-align: center; }
.vc-overlay-card h2 { margin: 0 0 6px; font-family: var(--vc-display); font-size: 2rem; }
#vc-name { width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--vc-line); background: rgba(11, 7, 18, 0.6); color: var(--vc-fg); font: inherit; margin: 14px 0; }
#vc-name:focus { outline: 2px solid var(--vc-cyan); outline-offset: 2px; }
#vc-start { width: 100%; }
.vc-overlay-link { display: inline-block; margin-top: 14px; color: var(--vc-muted); font-size: 0.85rem; }
.vc-stat-row { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px dashed var(--vc-line); }
.vc-stat-row:last-child { border-bottom: 0; }

/* ---------- 2026-05-19 expansion: background, effects, avatars ---------- */
#vc-bg-canvas {
  position: fixed; inset: 0; z-index: 0;
  width: 100%; height: 100%; pointer-events: none;
}
.vc-play.performance-mode #vc-bg-canvas { display: none; }
#vc-canvas { position: relative; z-index: 1; }
#vc-hud { z-index: 2; }
#vc-overlay { z-index: 3; }

.vc-hud-effects {
  position: absolute;
  top: max(56px, env(safe-area-inset-top));
  left: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 320px;
  pointer-events: none;
}
.vc-effect-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(11, 7, 18, 0.7);
  border: 1px solid var(--vc-line);
  color: var(--vc-fg);
  font-size: 0.78rem;
  font-weight: 700;
  backdrop-filter: blur(8px);
}
.vc-effect-chip[data-kind="multiplier"] { border-color: var(--vc-gold); color: var(--vc-gold); }
.vc-effect-chip[data-kind="magnet"]     { border-color: var(--vc-cyan); color: var(--vc-cyan); }
.vc-effect-chip[data-kind="speed"]      { border-color: #ff7c5b; color: #ff7c5b; }
.vc-effect-chip[data-kind="shield"]     { border-color: var(--vc-lime); color: var(--vc-lime); }
.vc-effect-chip[data-kind="radar"]      { border-color: #ffffff; color: #ffffff; }
.vc-effect-chip[data-kind="combo"]      { border-color: var(--vc-magenta); color: var(--vc-magenta); }
.vc-effect-chip[data-kind="surge"]      { border-color: var(--vc-cyan); color: var(--vc-cyan); }
.vc-effect-icon  { font-family: "Space Grotesk", sans-serif; }
.vc-effect-time  { opacity: 0.85; }

.vc-lb-avatar {
  width: 18px; height: 18px; border-radius: 50%;
  background: rgba(11, 7, 18, 0.6); object-fit: cover;
}
.vc-bot-tag {
  color: var(--vc-muted); font-style: normal; font-weight: 500;
  font-size: 0.7rem; padding: 1px 6px; border-radius: 999px;
  background: rgba(160, 155, 188, 0.15); margin-left: 4px;
}

/* Start-overlay mini picker */
.vc-mini-picker, .vc-mini-note {
  margin: 6px 0 0;
  color: var(--vc-muted);
  font-size: 0.85rem;
}
.vc-mini-sep { margin: 0 6px; opacity: 0.5; }
.vc-mini-link { color: var(--vc-cyan); }

/* Avatars on /profile */
.vc-avatars {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 12px;
  margin: 12px 0 28px;
}
.vc-av-tile {
  display: grid;
  gap: 6px;
  margin: 0;
}
.vc-av-btn {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  border: 1px solid var(--vc-line);
  background: rgba(11, 7, 18, 0.6);
  padding: 6px;
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease;
}
.vc-av-btn:hover { transform: translateY(-1px); border-color: var(--vc-cyan); }
.vc-av-btn img { width: 100%; height: 100%; object-fit: contain; border-radius: 10px; display: block; }
.vc-av-tile.is-selected .vc-av-btn { border-color: var(--vc-magenta); box-shadow: 0 0 0 2px rgba(255, 45, 143, 0.4); }
.vc-av-name { text-align: center; font-size: 0.75rem; color: var(--vc-muted); }

/* Live leaderboard items get a small grid for the avatar chip */
.vc-hud-leaderboard ol li {
  grid-template-columns: 22px 22px 1fr auto !important;
}

/* ---------- empty / 404 ---------- */
.vc-empty-screen { text-align: center; padding: 80px 16px; }
.vc-empty-screen h1 { font-family: var(--vc-display); font-size: 4rem; margin: 0; background: linear-gradient(120deg, var(--vc-magenta), var(--vc-cyan)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- mobile ---------- */
@media (max-width: 880px) {
  .vc-hero { grid-template-columns: 1fr; }
  .vc-hero-art { display: none; }
  .vc-nav-links { gap: 12px; }
  .vc-hud-leaderboard { display: none; }
  #vc-touch-controls { display: block; }
  #vc-minimap { width: 110px; height: 110px; }
  #vc-boost-bar { width: 140px; }
}
@media (max-width: 600px) {
  .vc-nav { padding: 10px 12px; gap: 12px; }
  .vc-nav-links { display: none; }
  .vc-hero h1 { font-size: 2.3rem; }
  .vc-hud-top .vc-hud-chip { padding: 6px 10px; font-size: 0.85rem; }
}

/* ---------- 2026-05-19 mobile / PWA hardening ---------- */
html, body {
  /* Use small-viewport units where available so the layout doesn't jump as
     the mobile address bar collapses. Fall back to old 100vh. */
  min-height: 100vh;
  min-height: 100svh;
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overscroll-behavior: none;
  touch-action: manipulation;
}
body.vc-play, body.vc-play html {
  /* During gameplay, lock down zoom and selection entirely. */
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  overflow: hidden;
  overscroll-behavior: contain;
}
button, .vc-btn, .vc-cta {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
input, textarea, select {
  font-size: 16px; /* prevents iOS auto-zoom on focus */
}

/* Game shell uses dvh so the address-bar collapse doesn't shift the canvas */
#vc-game-shell {
  position: fixed;
  inset: 0;
  height: 100vh;       /* legacy fallback */
  height: 100dvh;
  width: 100vw;
}
/* Safe-area-aware HUD anchors */
.vc-hud-top {
  top: max(12px, env(safe-area-inset-top)) !important;
  left: max(12px, env(safe-area-inset-left)) !important;
}
.vc-hud-leaderboard {
  right: max(12px, env(safe-area-inset-right));
  top: max(12px, env(safe-area-inset-top));
}
#vc-minimap {
  bottom: max(14px, env(safe-area-inset-bottom));
  right: max(14px, env(safe-area-inset-right));
}
#vc-boost-bar {
  bottom: max(14px, env(safe-area-inset-bottom));
  left: max(14px, env(safe-area-inset-left));
}
#vc-boost-bar.is-boosting #vc-boost-fill { background: linear-gradient(120deg, #fff, var(--vc-magenta), var(--vc-cyan)); }

/* Boost button sized for thumbs; always at least 64×64 hit target. */
#vc-touch-controls {
  position: absolute;
  bottom: max(82px, calc(env(safe-area-inset-bottom) + 78px));
  right: max(28px, calc(env(safe-area-inset-right) + 28px));
  left: auto;
  transform: none;
  display: none;
  pointer-events: none;
}
@media (pointer: coarse) {
  #vc-touch-controls { display: block; }
}
#vc-boost-btn {
  min-width: 96px;
  min-height: 96px;
  padding: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255,45,143,0.92), rgba(155,59,255,0.95));
  color: #fff;
  border: 2px solid rgba(255,255,255,0.55);
  box-shadow: 0 8px 24px rgba(0,0,0,0.35), 0 0 22px rgba(255,45,143,0.35);
  font: 700 0.95rem/1 'Inter', sans-serif;
  pointer-events: auto;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}
#vc-boost-btn:active { transform: scale(0.94); }

/* Virtual joystick container (rendered when settings.controls === "joystick") */
#vc-joystick {
  position: absolute;
  bottom: max(28px, calc(env(safe-area-inset-bottom) + 28px));
  left: max(28px, calc(env(safe-area-inset-left) + 28px));
  width: 140px;
  height: 140px;
  display: none;
  pointer-events: auto;
  touch-action: none;
}
#vc-joystick.is-active,
body.vc-play.has-joystick #vc-joystick {
  display: block;
}
#vc-joystick .vc-joy-base {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.18);
  background: rgba(11,7,18,0.55);
  backdrop-filter: blur(6px);
}
#vc-joystick .vc-joy-stick {
  position: absolute;
  top: 50%; left: 50%;
  width: 64px; height: 64px;
  margin: -32px 0 0 -32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff2d8f, #34e7ff);
  box-shadow: 0 6px 14px rgba(0,0,0,0.45);
  transition: transform 60ms ease-out;
}
body.vc-play.is-lefty #vc-joystick {
  left: auto;
  right: max(28px, calc(env(safe-area-inset-right) + 28px));
}
body.vc-play.is-lefty #vc-touch-controls {
  right: auto;
  left: max(28px, calc(env(safe-area-inset-left) + 28px));
}

/* Install banner */
.vc-install-banner {
  position: fixed;
  bottom: max(12px, env(safe-area-inset-bottom));
  left: max(12px, env(safe-area-inset-left));
  right: max(12px, env(safe-area-inset-right));
  z-index: 30;
  pointer-events: none;
}
.vc-install-banner.is-visible { pointer-events: auto; }
.vc-install-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(11,7,18,0.92);
  border: 1px solid var(--vc-line);
  border-radius: 18px;
  box-shadow: 0 10px 32px rgba(0,0,0,0.4);
  max-width: 480px;
  margin: 0 auto;
  backdrop-filter: blur(14px);
}
.vc-install-card img { width: 44px; height: 44px; border-radius: 12px; }
.vc-install-text { flex: 1; display: grid; line-height: 1.25; }
.vc-install-text strong { color: var(--vc-fg); }
.vc-install-text span { color: var(--vc-muted); font-size: 0.85rem; }
.vc-install-actions { display: flex; gap: 6px; flex-shrink: 0; }
.vc-install-actions .vc-btn { padding: 8px 12px; font-size: 0.85rem; }

/* Pages — safe-area padding on shell content */
.vc-main {
  padding-left: max(16px, env(safe-area-inset-left)) !important;
  padding-right: max(16px, env(safe-area-inset-right)) !important;
  padding-bottom: max(64px, calc(env(safe-area-inset-bottom) + 64px)) !important;
}
.vc-nav {
  padding-top: max(14px, env(safe-area-inset-top));
  padding-left: max(16px, env(safe-area-inset-left));
  padding-right: max(16px, env(safe-area-inset-right));
}
.vc-footer {
  padding-bottom: max(18px, env(safe-area-inset-bottom));
}

/* Tight portrait phones */
@media (max-width: 420px) {
  .vc-install-card { padding: 10px 12px; gap: 10px; }
  .vc-install-text strong { font-size: 0.92rem; }
  .vc-install-text span { font-size: 0.78rem; }
  .vc-hud-top .vc-hud-chip { padding: 5px 9px; font-size: 0.8rem; }
  .vc-hud-effects { max-width: calc(100vw - 24px); }
  #vc-minimap { width: 96px; height: 96px; }
  #vc-boost-bar { width: 110px; }
}

@media (pointer: coarse) {
  body.vc-play {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
  }
  #vc-hud { touch-action: none; }
  .vc-hud-top { max-width: calc(100vw - 24px); }
  .vc-hud-chip strong { font-size: 1.18rem; }
  #vc-boost-bar {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    bottom: max(16px, calc(env(safe-area-inset-bottom) + 12px));
    width: min(190px, 42vw);
  }
  #vc-minimap {
    top: max(76px, calc(env(safe-area-inset-top) + 64px));
    right: max(12px, env(safe-area-inset-right));
    bottom: auto;
    width: 96px;
    height: 96px;
  }
  .vc-event-banner {
    top: max(54px, calc(env(safe-area-inset-top) + 44px));
    max-width: min(360px, calc(100vw - 28px));
    font-size: 0.84rem;
  }
  .vc-combo-chip {
    top: max(92px, calc(env(safe-area-inset-top) + 80px));
  }
}

/* Landscape phones */
@media (orientation: landscape) and (max-height: 480px) {
  #vc-touch-controls {
    bottom: max(24px, calc(env(safe-area-inset-bottom) + 20px));
    right: max(24px, calc(env(safe-area-inset-right) + 22px));
  }
  body.vc-play.is-lefty #vc-touch-controls {
    right: auto;
    left: max(24px, calc(env(safe-area-inset-left) + 22px));
  }
  #vc-boost-btn {
    min-width: 86px;
    min-height: 86px;
    font-size: 0.86rem;
  }
  #vc-joystick {
    width: 132px;
    height: 132px;
    bottom: max(18px, calc(env(safe-area-inset-bottom) + 16px));
    left: max(24px, calc(env(safe-area-inset-left) + 22px));
  }
  body.vc-play.is-lefty #vc-joystick {
    left: auto;
    right: max(24px, calc(env(safe-area-inset-right) + 22px));
  }
  #vc-joystick .vc-joy-stick {
    width: 58px;
    height: 58px;
    margin: -29px 0 0 -29px;
  }
  .vc-hud-top { gap: 6px; }
  .vc-hud-top .vc-hud-chip { padding: 5px 9px; }
  .vc-hud-top .vc-hud-chip span { font-size: 0.62rem; }
  .vc-hud-top .vc-hud-chip strong { font-size: 0.96rem; }
  .vc-hud-leaderboard {
    display: block !important;
    width: 172px;
    max-height: 42vh;
    overflow: hidden;
    padding: 9px;
  }
  .vc-hud-leaderboard li { font-size: 0.72rem; }
  #vc-minimap {
    top: max(92px, calc(env(safe-area-inset-top) + 78px));
    right: max(12px, env(safe-area-inset-right));
    width: 82px;
    height: 82px;
  }
  #vc-boost-bar {
    width: min(180px, 28vw);
    bottom: max(10px, env(safe-area-inset-bottom));
  }
  .vc-event-banner {
    top: max(10px, env(safe-area-inset-top));
    max-width: min(300px, 38vw);
    padding: 6px 12px;
  }
  .vc-hud-effects {
    top: max(50px, calc(env(safe-area-inset-top) + 42px));
    max-width: 42vw;
  }
  .vc-effect-chip { font-size: 0.7rem; padding: 4px 8px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
