* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { width: 100%; height: 100%; overflow: hidden; background: #05070c;
  font-family: "Segoe UI", system-ui, sans-serif; color: #cfe3ff;
  -webkit-user-select: none; user-select: none; }
#game { position: fixed; inset: 0; display: block; }
.hidden { display: none !important; }

#vignette { position: fixed; inset: 0; pointer-events: none; z-index: 5;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(0,0,5,0.55) 100%); }
#damage { position: fixed; inset: 0; pointer-events: none; z-index: 6; opacity: 0;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(255,30,40,0.5) 100%);
  transition: opacity 0.15s; }

#hud { position: fixed; top: 18px; left: 20px; z-index: 10; pointer-events: none; }
#brand { font-size: 22px; font-weight: 800; letter-spacing: 4px; color: #fff; }
#brand span { color: #22d3ee; }
#objective { margin-top: 8px; font-size: 13px; letter-spacing: 2px; color: #9fb3c8; }
#objective b { color: #22d3ee; }
#healthbar { margin-top: 10px; width: 210px; height: 8px; background: rgba(255,255,255,0.12);
  border-radius: 4px; overflow: hidden; }
#healthfill { height: 100%; width: 100%; border-radius: 4px;
  background: linear-gradient(90deg, #22d3ee, #34d399); transition: width 0.25s; }
#alarm { margin-top: 12px; font-size: 13px; font-weight: 700; letter-spacing: 2px;
  color: #ff4757; animation: blink 0.5s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0.25; } }

#hackui { position: fixed; bottom: 90px; left: 50%; transform: translateX(-50%);
  z-index: 10; text-align: center; pointer-events: none; }
#hacklabel { font-size: 14px; letter-spacing: 3px; color: #fff; margin-bottom: 8px; }
#hacklabel b { color: #22d3ee; border: 1px solid #22d3ee; border-radius: 4px; padding: 1px 7px; }
#hackbar { width: 260px; height: 10px; background: rgba(255,255,255,0.12);
  border-radius: 5px; overflow: hidden; margin: 0 auto; }
#hackfill { height: 100%; width: 0%; background: #22d3ee; border-radius: 5px; }

#carprompt { position: fixed; bottom: 150px; left: 50%; transform: translateX(-50%);
  z-index: 10; font-size: 14px; letter-spacing: 3px; color: #fff; pointer-events: none;
  text-shadow: 0 0 12px rgba(34,211,238,0.8); animation: blink 1.2s steps(2) infinite; }
#carprompt b { color: #22d3ee; border: 1px solid #22d3ee; border-radius: 4px; padding: 1px 7px; }
#speedo { position: fixed; bottom: 26px; right: 28px; z-index: 10; pointer-events: none;
  font-size: 30px; font-weight: 800; letter-spacing: 2px; color: #fff;
  text-shadow: 0 0 16px rgba(179,102,255,0.9); font-variant-numeric: tabular-nums; }

#touchhack { position: fixed; bottom: 110px; right: 26px; z-index: 11; width: 84px; height: 84px;
  border-radius: 50%; background: rgba(34,211,238,0.18); border: 2px solid #22d3ee;
  color: #fff; font-weight: 800; letter-spacing: 1px; display: flex;
  align-items: center; justify-content: center; font-size: 14px; }

/* ---------- menu screens: Figma purple-night UI ---------- */
#menubg { position: fixed; inset: 0; z-index: 15; pointer-events: none; }
.menuscreen { position: fixed; inset: 0; z-index: 20; display: flex;
  align-items: center; justify-content: center; }
#pause.menuscreen { z-index: 30; }
#settings.menuscreen { z-index: 40; }
.panel { text-align: center; width: min(92vw, 560px); padding: 34px 36px;
  max-height: 94vh; max-height: 94dvh; overflow-y: auto; scrollbar-width: none;
  background: linear-gradient(180deg, rgba(30,18,54,0.88), rgba(16,9,32,0.94));
  border: 1px solid rgba(179,102,255,0.45); border-radius: 18px;
  box-shadow: 0 0 44px rgba(122,60,255,0.28), inset 0 0 60px rgba(90,43,214,0.12);
  backdrop-filter: blur(6px); }
.panel::-webkit-scrollbar { display: none; }
/* compact menu layout for short viewports (itch.io embed etc.) — fits, never scrolls */
@media (max-height: 760px) {
  .panel { padding: 14px 20px; }
  #title-brand { font-size: 10px; letter-spacing: 6px; margin-bottom: 2px; }
  .gamelogo { font-size: 30px; letter-spacing: 4px; margin-bottom: 4px; }
  .gamelogo.small { font-size: 22px; }
  .sub { display: none; }
  .controls { font-size: 10px; gap: 3px 12px; margin-bottom: 8px; }
  .chips { margin-bottom: 8px; }
  .chips span { font-size: 9px; padding: 3px 8px; }
  .diffrow { margin-bottom: 8px; }
  .diffbtn { font-size: 10px; padding: 6px 12px; }
  .btn-primary { font-size: 13px; padding: 9px 24px; }
  .btn-ghost { font-size: 10px; padding: 8px 16px; }
  .note { display: none; }
  .btnrow { margin-bottom: 6px; }
  .setrow { margin: 6px 0; padding: 6px 10px; font-size: 12px; }
}
@media (max-height: 720px) {
  .panel { padding: 20px 24px; }
  #title-brand { font-size: 11px; letter-spacing: 7px; margin-bottom: 4px; }
  .gamelogo { font-size: 38px; letter-spacing: 5px; margin-bottom: 8px; }
  .gamelogo.small { font-size: 26px; }
  .sub { font-size: 13px; margin-bottom: 12px; }
  .controls { font-size: 11px; gap: 5px 14px; margin-bottom: 14px; }
  .chips { margin-bottom: 12px; }
  .chips span { font-size: 10px; padding: 4px 10px; }
  .btn-primary { font-size: 14px; padding: 11px 30px; }
  .btn-ghost { font-size: 11px; padding: 10px 20px; }
  .note { margin-top: 10px; font-size: 11px; }
  .setrow { margin: 8px 0; padding: 8px 12px; }
  #endstats { margin-bottom: 12px; font-size: 13px; }
}
#pausebtn { position: fixed; top: 18px; right: 20px; z-index: 12;
  width: 44px; height: 44px; border-radius: 10px; font-size: 15px;
  background: rgba(10,16,24,0.6); border: 1px solid rgba(34,211,238,0.5);
  color: #22d3ee; cursor: pointer; backdrop-filter: blur(4px); }
#pausebtn:hover { background: rgba(34,211,238,0.2); }
.volrow { display: flex; align-items: center; gap: 14px; margin: 4px 0 8px; }
.volrow span { font-size: 13px; letter-spacing: 3px; color: #cdb4ff; }
#vol { flex: 1; accent-color: #b366ff; cursor: pointer; }
#title-brand { font-size: 14px; letter-spacing: 10px; color: #b366ff;
  margin-bottom: 8px; text-shadow: 0 0 14px rgba(179,102,255,0.8); }
.gamelogo { font-size: 56px; letter-spacing: 8px; margin-bottom: 14px;
  background: linear-gradient(180deg, #f3c6ff 5%, #b366ff 55%, #ff5fa2 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 18px rgba(179,102,255,0.55)); }
.gamelogo.small { font-size: 34px; }
@keyframes logoPulse {
  0%, 100% { filter: drop-shadow(0 0 18px rgba(179,102,255,0.55)); }
  50% { filter: drop-shadow(0 0 34px rgba(255,95,162,0.8)); } }
.gamelogo { animation: logoPulse 3.2s ease-in-out infinite; }
.btnrow.stacked { flex-direction: column; align-items: stretch; }
.btnrow.stacked .btn-primary, .btnrow.stacked .btn-ghost { width: 100%; }
.chips { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-bottom: 20px; }
.chips span { font-size: 11px; letter-spacing: 2px; color: #b366ff;
  border: 1px solid rgba(179,102,255,0.5); border-radius: 20px;
  padding: 5px 12px; background: rgba(90,43,214,0.15); }
#endtitle.lose { background: linear-gradient(180deg, #ffc2cd, #ff4757 60%, #b31e35);
  -webkit-background-clip: text; background-clip: text; }
.sub { color: #b9a8d9; font-size: 15px; line-height: 1.6; margin-bottom: 22px; }
.controls { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 22px;
  text-align: left; font-size: 13px; color: #9d8cbd; margin-bottom: 26px; }
.controls b { color: #efe6ff; }
.btnrow { display: flex; gap: 12px; justify-content: center; margin-top: 10px; flex-wrap: wrap; }
.btn-primary { font-size: 16px; font-weight: 800; letter-spacing: 4px; color: #fff;
  background: linear-gradient(180deg, #8a4dff, #5a2bd6);
  border: 1px solid #b366ff; border-radius: 10px; padding: 14px 40px; cursor: pointer;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
  box-shadow: 0 0 26px rgba(138,77,255,0.5), inset 0 1px 0 rgba(255,255,255,0.25);
  transition: transform 0.12s, box-shadow 0.12s; }
.btn-primary:hover { transform: translateY(-2px);
  box-shadow: 0 0 36px rgba(138,77,255,0.8), inset 0 1px 0 rgba(255,255,255,0.3); }
.btn-primary:active { transform: translateY(1px); }
.btn-ghost { font-size: 13px; font-weight: 700; letter-spacing: 3px; color: #cdb4ff;
  background: rgba(90,43,214,0.18); border: 1px solid rgba(179,102,255,0.5);
  border-radius: 10px; padding: 12px 26px; cursor: pointer; transition: all 0.12s; }
.btn-ghost:hover { background: rgba(90,43,214,0.4); color: #fff;
  box-shadow: 0 0 18px rgba(138,77,255,0.4); }
.note { margin-top: 16px; font-size: 12px; color: #7d6f96; letter-spacing: 1px; }
#endstats { color: #b9a8d9; margin-bottom: 18px; font-size: 15px; letter-spacing: 1px; }
.setrow { display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin: 12px 0; padding: 10px 14px; background: rgba(20,10,40,0.5);
  border: 1px solid rgba(179,102,255,0.25); border-radius: 10px; }
.setrow span { font-size: 13px; letter-spacing: 3px; color: #cdb4ff; text-align: left; }
.setrow input[type=range] { flex: 1; max-width: 200px; accent-color: #b366ff; cursor: pointer; }
.toggle { min-width: 78px; font-size: 13px; font-weight: 800; letter-spacing: 2px;
  border-radius: 20px; padding: 8px 16px; cursor: pointer; border: 1px solid;
  transition: all 0.15s; }
.toggle.off { color: #8f9bb0; background: rgba(40,44,60,0.6); border-color: rgba(143,155,176,0.4); }
.toggle.on { color: #06281a; background: linear-gradient(180deg, #4ade80, #22c55e);
  border-color: #4ade80; box-shadow: 0 0 16px rgba(74,222,128,0.5); }

/* ---------- BLACKOUT v2.0: difficulty, pursuit HUD, crosshair ---------- */
.diffrow { display: flex; gap: 8px; align-items: center; justify-content: center; margin-bottom: 18px; flex-wrap: wrap; }
.diffrow > span { font-size: 11px; letter-spacing: 3px; color: #8f7fb8; }
.diffbtn { font-size: 12px; font-weight: 800; letter-spacing: 2px; padding: 9px 18px; border-radius: 20px;
  cursor: pointer; color: #b9a8d9; background: rgba(90,43,214,0.15);
  border: 1px solid rgba(179,102,255,0.4); transition: all 0.15s; }
.diffbtn:hover { color: #fff; box-shadow: 0 0 14px rgba(138,77,255,0.5); }
.diffbtn.sel { color: #fff; background: linear-gradient(180deg, #8a4dff, #5a2bd6);
  border-color: #b366ff; box-shadow: 0 0 18px rgba(138,77,255,0.65); }
.pursuit { position: fixed; top: 64px; left: 50%; transform: translateX(-50%); z-index: 12;
  font-size: 15px; font-weight: 800; letter-spacing: 3px; padding: 10px 22px; border-radius: 24px;
  pointer-events: none; white-space: nowrap; }
.pursuit.hot { color: #ffd7db; background: rgba(120,10,25,0.72); border: 1px solid #ff4757;
  box-shadow: 0 0 22px rgba(255,71,87,0.55); animation: pursuitBlink 0.7s ease-in-out infinite; }
.pursuit.cool { color: #c9f5dd; background: rgba(8,80,45,0.72); border: 1px solid #34d399;
  box-shadow: 0 0 18px rgba(52,211,153,0.45); }
@keyframes pursuitBlink { 50% { box-shadow: 0 0 34px rgba(255,71,87,0.9); } }
body.playing, body.playing canvas { cursor: none; }
#xhair { position: fixed; top: 50%; left: 50%; width: 26px; height: 26px;
  transform: translate(-50%, -50%); z-index: 11; pointer-events: none; }
#xhair::before { content: ''; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px;
  margin-left: -1px; background: rgba(255,255,255,0.92);
  box-shadow: 0 0 6px rgba(0,0,0,0.9), 0 0 10px rgba(34,211,238,0.8); }
#xhair::after { content: ''; position: absolute; top: 50%; left: 0; right: 0; height: 2px;
  margin-top: -1px; background: rgba(255,255,255,0.92);
  box-shadow: 0 0 6px rgba(0,0,0,0.9), 0 0 10px rgba(34,211,238,0.8); }
#cammode { position: fixed; right: 18px; bottom: 18px; z-index: 12; font-size: 12px;
  font-weight: 800; letter-spacing: 2px; color: #aef3ff; background: rgba(20,30,50,0.6);
  border: 1px solid rgba(34,211,238,0.4); border-radius: 12px; padding: 6px 12px;
  pointer-events: none; }
#touchshoot { position: fixed; right: 22px; bottom: 118px; z-index: 13; width: 76px; height: 76px;
  border-radius: 50%; background: rgba(120,20,40,0.55); border: 2px solid rgba(255,71,87,0.7);
  color: #ffd7db; font-weight: 800; font-size: 12px; letter-spacing: 1px;
  display: flex; align-items: center; justify-content: center; }
#touchaim { position: fixed; right: 110px; bottom: 118px; z-index: 13; width: 64px; height: 64px;
  border-radius: 50%; background: rgba(30,60,120,0.55); border: 2px solid rgba(80,160,255,0.7);
  color: #cfe6ff; font-weight: 800; font-size: 12px; letter-spacing: 1px;
  display: flex; align-items: center; justify-content: center; }
#touchaim.active { background: rgba(80,160,255,0.55); color: #fff; }
@media (max-height: 720px) {
  .diffrow { margin-bottom: 10px; }
  .diffbtn { font-size: 11px; padding: 7px 14px; }
  .pursuit { top: 54px; font-size: 12px; padding: 8px 16px; }
}

#minimap { position: fixed; top: 78px; right: 14px; width: 168px; height: 168px;
  border-radius: 50%; z-index: 12; pointer-events: none;
  border: 2px solid rgba(138,77,255,0.55);
  box-shadow: 0 0 18px rgba(138,77,255,0.35), inset 0 0 30px rgba(0,0,0,0.5); }
@media (max-height: 720px) { #minimap { width: 120px; height: 120px; top: 64px; right: 10px; } }

.heat { position: fixed; top: 256px; right: 30px; z-index: 12; font-size: 22px;
  letter-spacing: 4px; color: rgba(160,160,180,0.5); pointer-events: none;
  text-shadow: 0 0 8px rgba(0,0,0,0.8); }
.heat.hot1 { color: #ffd166; }
.heat.hot2 { color: #ff9a3c; text-shadow: 0 0 12px rgba(255,154,60,0.7); }
.heat.hot3 { color: #ff2d3a; text-shadow: 0 0 14px rgba(255,45,58,0.8); animation: pursuitBlink 0.7s ease-in-out infinite; }
@media (max-height: 720px) { .heat { top: 196px; right: 22px; font-size: 18px; } }

/* tap-to-start: live 3D city behind */
#taptostart { position: fixed; inset: 0; z-index: 25; display: flex;
  flex-direction: column; align-items: center; justify-content: center;
  cursor: pointer; background: radial-gradient(ellipse at center, transparent 40%, rgba(4,6,12,0.55) 100%); }
#taptostart.hidden { display: none; }
.taplogo { font-size: 18px; letter-spacing: 14px; color: #b366ff; margin-bottom: 8px; }
.tapbig { font-size: clamp(60px, 12vw, 132px); letter-spacing: 12px; font-weight: 800;
  background: linear-gradient(180deg, #e9d5ff, #b366ff 60%, #7a3cff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 24px rgba(179,102,255,0.55)); margin-bottom: 26px; }
.tapprompt { font-size: 18px; letter-spacing: 6px; color: #e9e4f5;
  animation: tapPulse 1.8s ease-in-out infinite; }
@keyframes tapPulse { 0%, 100% { opacity: 0.45; } 50% { opacity: 1; } }
/* main menu: smaller, docked left, live city on the right */
#title.menuscreen { justify-content: flex-start; padding-left: 6vw; }
#title .panel { width: min(90vw, 470px); padding: 40px 42px; background: linear-gradient(180deg, rgba(30,18,54,0.78), rgba(16,9,32,0.86)); }
@media (max-width: 720px) {
  #title.menuscreen { justify-content: center; padding-left: 0; }
  #title .panel { width: min(92vw, 430px); }
}

/* intro cutscene */
#cutscene { position: fixed; inset: 0; z-index: 24; display: flex;
  flex-direction: column; align-items: center; justify-content: flex-end;
  padding-bottom: 12vh; pointer-events: auto; cursor: pointer;
  background: linear-gradient(180deg, transparent 55%, rgba(4,6,12,0.72) 100%); }
#cutscene.hidden { display: none; }
#cuttext { font-size: clamp(26px, 5vw, 54px); font-weight: 800; letter-spacing: 8px;
  color: #f2ecff; text-shadow: 0 0 30px rgba(179,102,255,0.8); text-align: center; padding: 0 20px; }
#cutsub { margin-top: 10px; font-size: clamp(13px, 2vw, 18px); letter-spacing: 4px; color: #b9a8e8; }
#cutskip { position: absolute; bottom: 22px; right: 26px; font-size: 11px;
  letter-spacing: 3px; color: rgba(200,190,230,0.5); }
.cutface #cuttext, .cutface #cutsub { animation: cutIn 0.6s ease-out; }
@keyframes cutIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.cutface {}
#cutscene.cutfade #cuttext, #cutscene.cutfade #cutsub { animation: cutIn 0.7s ease-out; }

#cammode { cursor: pointer; padding: 8px 14px; user-select: none; -webkit-tap-highlight-color: transparent; }
#cammode:active { transform: scale(0.94); }
