html, body {
  height: 100%;
  margin: 0;
  background: #0d1117;
  color: #e8edf3;
  font: 15px/1.4 system-ui, sans-serif;
  overflow: hidden;
}
#app { position: fixed; inset: 0; }
#app canvas { display: block; width: 100%; height: 100%; }
#loading {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-content: center;
  gap: 14px;
  text-align: center;
  background: radial-gradient(circle at 50% 40%, #1d2a3a, #0d1117 70%);
  transition: opacity .6s;
}
#loading.done { opacity: 0; pointer-events: none; }
#loading .title { font-size: 34px; font-weight: 700; letter-spacing: .04em; }
#loading .msg { min-height: 1.4em; opacity: .75; }
#loading .bar { width: 220px; height: 3px; margin: 0 auto; background: #ffffff1a; border-radius: 2px; overflow: hidden; }
#loading .bar i { display: block; height: 100%; width: 100%; background: #f2c14e; transform: scaleX(.04); transform-origin: left; transition: transform .12s linear; }
#loading .modes { display: flex; gap: 12px; justify-content: center; }
#loading .modes button {
  border: 0;
  border-radius: 999px;
  padding: 10px 22px;
  font: 700 16px system-ui, sans-serif;
  cursor: pointer;
  background: #243044;
  color: #e8edf3;
}
#loading .modes button[data-mode="fly"] { background: #f2c14e; color: #1a1408; }

.hud { position: fixed; inset: 0; z-index: 12; pointer-events: none; font-family: "Segoe UI", system-ui, sans-serif; }
.hud.hidden .topbar, .hud.hidden .money, .hud.hidden .explore, .hud.hidden .panel,
.hud.hidden .speed, .hud.hidden .nav, .hud.hidden .fly, .hud.hidden .hint, .hud.hidden .place, .hud.hidden .weapon, .hud.hidden .crosshair, .hud.hidden .lockbox, .hud.hidden .radar, .hud.hidden .lead, .hud.hidden .tags, .hud.hidden .meters { visibility: hidden; }
.topbar { position: absolute; top: 2.2vh; left: 2vw; display: flex; gap: 8px; pointer-events: auto; flex-wrap: wrap; max-width: 70vw; }
.key, .mapkey, .legend button, .sheet button, .explore {
  pointer-events: auto;
  cursor: pointer;
  color: #dfe6f0;
  background: #0c101a9e;
  border: 1px solid #ffffff29;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px 5px 5px;
  font: 600 12px system-ui, sans-serif;
  letter-spacing: .04em;
}
.key i, .mapkey kbd, kbd {
  box-sizing: border-box;
  min-width: 20px;
  padding: 2px 6px;
  text-align: center;
  color: #fff;
  background: linear-gradient(#3a4660, #283247);
  border: 1px solid #ffffff38;
  border-bottom-width: 2px;
  border-radius: 5px;
  font: 700 11px/1.35 system-ui, sans-serif;
  font-style: normal;
}
.key:hover, .mapkey:hover, .explore:hover { background: #161e2ed9; }
.key.act { color: #f2c14e; border-color: #f2c14eb3; }
.key.bot { border-color: #50aaeb73; }
.key.bot i { background: #229ed9; border: 0; border-radius: 50%; width: 20px; height: 20px; display: grid; place-items: center; }
.key.next.off { display: none; }
.money { position: absolute; top: 2.2vh; right: 2.2vw; font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; text-shadow: 0 2px 8px #0008; }
.money b { color: #f5c52e; margin-right: 4px; }
.money.debt span, .money.fine span { color: #ff6a55; }
.explore { position: absolute; top: calc(2.2vh + 40px); right: 2.2vw; border-color: #f2c14e59; }
.explore b { color: #f2c14e; font-size: 16px; background: none; border: 0; padding: 0; }
.explore.all { border-color: #6ee08ab3; }
.explore.all b { color: #6ee08a; }
.explore.pop { transform: scale(1.06); }
.panel {
  position: relative; top: auto; left: auto; transform: none;
  min-width: 0; text-align: left;
  display: flex; align-items: center; gap: 8px;
  background: #0e101ab8;
  border-top: 2px solid #f5c52e; border-radius: 8px; padding: 5px 11px 5px 10px;
}
.panel.off, .banner:not(.on), .toast:not(.on), .fly:not(.on), .hint:not(.on), .place:not(.on), .lockbox.off { opacity: 0; pointer-events: none; }
.panel .ttl { color: #f5c52e; letter-spacing: .12em; font-size: 11px; font-weight: 700; text-transform: uppercase; }
.panel .obj { display: none; }
.panel .row { display: flex; justify-content: center; align-items: center; gap: 8px; margin: 0; font-size: 12px; }
.panel .bar { width: 72px; height: 3px; background: #ffffff2e; border-radius: 4px; overflow: hidden; }
.panel .bar i { display: block; height: 100%; background: #f5c52e; width: 0; }
.panel .tm.low { color: #ff6a55; font-weight: 700; }
.banner {
  position: absolute; top: 4.2vh; left: 50%; transform: translateX(-50%);
  text-align: center; font-size: 16px; font-weight: 700;
  text-shadow: 0 2px 10px #000; transition: opacity .3s;
}
.banner small { display: block; font-size: 12px; font-weight: 600; opacity: .9; }
.toast {
  position: absolute; top: 4.6vh; left: 50%; transform: translateX(-50%);
  color: #ff8d7a; font-size: 14px; font-weight: 700;
}
.meters { position: absolute; left: 2.2vw; bottom: 15.5vh; width: 190px; text-shadow: 0 1px 4px #000a; }
.thr, .land { display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 800; letter-spacing: .08em; }
.land { margin-top: 6px; }
.land.off { display: none; }
.thr b, .land b { width: 36px; color: #d5deea; }
.thr i, .land i { position: relative; flex: 1; height: 8px; border-radius: 99px; background: #ffffff24; }
.thr em { display: block; height: 100%; width: 0; border-radius: 99px; background: #f2c14e; }
.thr span { width: 36px; text-align: right; color: #f2c14e; font-variant-numeric: tabular-nums; }
.land i { background: linear-gradient(90deg, #3dde6a 0%, #d6e25a 42%, #ff5a3c 82%, #ff2a22 100%); }
.land s { position: absolute; left: 82%; top: -3px; width: 2px; height: 14px; background: #fff; }
.land em { position: absolute; top: -4px; width: 3px; height: 16px; margin-left: -1px; background: #fff; box-shadow: 0 0 0 1px #000a; }
.speed { position: absolute; left: 2.2vw; bottom: 3vh; text-shadow: 0 2px 8px #0008; }
.speed .street { min-height: 1.2em; color: #d5deea; font-weight: 600; }
.speed .v { font-size: clamp(42px, 5vw, 64px); font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.speed .u { color: #a9bde6; letter-spacing: .14em; font-size: 13px; font-weight: 700; }
.fly, .hint {
  position: absolute; left: 50%; transform: translateX(-50%);
  background: #0c101ab3; border: 1px solid #ffffff40; border-radius: 999px;
  padding: 7px 14px; font-weight: 600;
}
.fly { bottom: 12vh; }
.hint { bottom: 17vh; font-size: 18px; }
.weapon {
  display: inline-block;
  margin-bottom: 6px;
  padding: 5px 9px;
  background: #f4f7fb;
  color: #121820;
  font-weight: 800;
  letter-spacing: .06em;
  font-size: 13px;
  border-radius: 4px;
  box-shadow: 0 0 0 2px #f4f7fb;
  text-shadow: none;
}
.weapon.msl {
  background: #ff4b1f;
  color: #fff;
  box-shadow: 0 0 0 2px #ff4b1f;
}
.weapon.lock { box-shadow: 0 0 0 2px #fff, 0 0 12px #ff4b1f; }
.radar {
  position: absolute;
  left: 2.2vw;
  bottom: 21vh;
  width: 210px;
  text-shadow: 0 2px 8px #000a;
}
.radar .cap {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
  color: #f2c14e;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
}
.radar .cap em { font-style: normal; color: #ff8d7a; }
.radar .scope {
  width: 156px;
  height: 156px;
  border-radius: 50%;
  background: #071018;
  box-shadow: 0 0 0 2px #f2c14e66, 0 8px 18px #0008;
}
.radar .keyline {
  display: flex;
  width: 100%;
  gap: 6px;
  align-items: center;
  margin-top: 4px;
  color: #d5deea;
  font-size: 11px;
  font-weight: 700;
}
.radar .keyline i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}
.radar .keyline i.g { background: #3dde6a; }
.radar .keyline i.r { background: #ff3b30; margin-left: 8px; border-radius: 1px; transform: rotate(45deg); }
.radar .keyline i.b { background: #ff9a1a; margin-left: 8px; border-radius: 1px; }
.crosshair {
  position: absolute; left: 50%; top: 46%;
  width: 22px; height: 22px; margin: -11px 0 0 -11px;
  border: 2px solid #f2c14ecc; border-radius: 50%;
  pointer-events: none;
}
.crosshair:before, .crosshair:after {
  content: ""; position: absolute; background: #f2c14ecc;
}
.crosshair:before { left: 50%; top: -8px; width: 2px; height: 6px; margin-left: -1px; }
.crosshair:after { left: 50%; bottom: -8px; width: 2px; height: 6px; margin-left: -1px; }
.crosshair.lock { border-color: #ff6a4a; }
.lockbox {
  position: absolute; width: 34px; height: 34px; margin: -17px 0 0 -17px;
  border: 2px solid #ff3b30; border-radius: 50%;
  box-shadow: 0 0 10px #ff3b30aa;
  pointer-events: none;
}
.lockbox.off, .lead.off { display: none; }
.lead {
  position: absolute;
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -6px;
  border: 2px solid #f2c14e;
  transform: rotate(45deg);
  box-shadow: 0 0 8px #f2c14eaa;
  pointer-events: none;
}
.tags { position: absolute; inset: 0; pointer-events: none; }
.tags b {
  position: absolute;
  transform: translate(-50%, -130%);
  color: #ffb4a8;
  font: 800 13px system-ui, sans-serif;
  letter-spacing: .16em;
  text-shadow: 0 2px 8px #000;
}
.radar.warn .scope { box-shadow: 0 0 0 2px #ff3b30, 0 0 18px #ff3b30bb; }
.radar .score { margin-left: auto; color: #ffb4a8; }
.nav { position: absolute; right: 2vw; bottom: 3vh; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.mini { width: 190px; height: 190px; border-radius: 6px; background: #243044; box-shadow: 0 6px 16px #0006; }
.pin { position: absolute; left: 0; top: 0; width: 0; height: 0; }
.pin.off { display: none; }
.pin .mk { width: 14px; height: 14px; margin: -7px; background: #ffd24a; border: 2px solid #140e02; box-shadow: 0 0 10px #ffd24a; }
.pin.edge .mk { background: transparent; border: 0; box-shadow: none; width: 0; height: 0; margin: 0; border-left: 8px solid #ffd24a; border-top: 6px solid transparent; border-bottom: 6px solid transparent; }
.pin .d { position: absolute; top: 12px; left: -40px; width: 80px; text-align: center; color: #ffe38a; font-weight: 700; font-size: 13px; }
.manual, .sheet {
  pointer-events: auto;
  position: absolute;
  top: calc(2.2vh + 46px);
  left: 2vw;
  width: min(760px, 92vw);
  max-height: calc(100vh - 80px);
  overflow: auto;
  background: #0c101acc;
  border: 1px solid #ffffff1a;
  border-radius: 10px;
  padding: 12px 16px;
  box-shadow: 0 8px 28px #0006;
}
.manual:not(.on), .sheet.off, .bigmap.off { display: none; }
.manual h4, .sheet h3 { margin: 0 0 8px; color: #f2c14e; letter-spacing: .14em; font-size: 12px; }
.manual .cols { column-count: 2; column-gap: 22px; }
.manual section { break-inside: avoid; margin-bottom: 10px; }
.manual h5 { margin: 0 0 4px; color: #9fc0ff; letter-spacing: .12em; font-size: 11px; text-transform: uppercase; }
.manual .r { display: grid; grid-template-columns: 150px 1fr; gap: 8px; padding: 2px 0; }
.manual .t { color: #dfe6f0; }
.botline, .sheet p, .src { color: #c9d3e4; }
.sheet article { margin: 10px 0; }
.sheet button { margin-top: 8px; }
.place {
  position: absolute; top: 50%; right: 0; transform: translateY(-50%);
  width: min(320px, 86vw); padding: 16px;
  background: linear-gradient(160deg, #1a2438f0, #10141ceb);
  border: 1px solid #f2c14e88; border-right: 0; border-radius: 14px 0 0 14px;
  display: flex; gap: 12px;
}
.place .ic { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: #f2c14e; color: #1a1404; font-size: 20px; }
.place b { font-size: 18px; }
.place small, .place p { color: #d5deea; margin: 2px 0 0; }
.bigmap { position: fixed; inset: 0; z-index: 20; background: #1a273b; cursor: grab; }
.bigmap.grab { cursor: grabbing; }
.bigmap canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.vignette { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(#0000 58%, #060a128c 100%); }
.head { position: absolute; top: 22px; left: 28px; pointer-events: none; }
.title { font-size: 36px; font-weight: 700; letter-spacing: .22em; }
.sub { color: #f2c14e; letter-spacing: .28em; font-size: 13px; font-weight: 700; }
.north { position: absolute; top: 22px; right: 28px; width: 44px; height: 44px; border-radius: 50%; border: 1px solid #ffffff38; background: #0c111cc7; }
.north i { position: absolute; left: 16px; top: 6px; width: 0; height: 0; border-left: 6px solid transparent; border-right: 6px solid transparent; border-bottom: 14px solid #ff6a55; }
.north span { position: absolute; bottom: 4px; left: 0; right: 0; text-align: center; font-size: 11px; font-weight: 700; }
.legend { position: absolute; left: 28px; bottom: 28px; display: flex; gap: 8px; flex-wrap: wrap; }
.legend button.act { color: #fff; border-color: #ffffff57; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dot.sight { background: #11161f; border: 2px solid #f2c14e; }
.dot.town { background: #7eb6ff; }
.dot.street { width: 14px; height: 4px; border-radius: 2px; background: #c5d0de; }
.scale { position: absolute; right: 28px; bottom: 28px; text-align: right; font-size: 12px; font-weight: 600; }
.scale i { display: block; margin-left: auto; height: 8px; border: 2px solid #fff; border-top: 0; }
.keys, .copy { position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%); color: #9aa7bc; font-size: 12px; pointer-events: none; }
.copy { left: auto; right: 28px; bottom: 58px; transform: none; }
.tip { position: absolute; transform: translate(-50%, -100%); background: #0c111cf0; border: 1px solid #f2c14e8c; border-radius: 8px; padding: 8px 12px; text-align: center; }
.tip.off { display: none; }
.tip b { color: #f6d98a; }
.tip span, .tip em { display: block; color: #c9d3e4; font-style: normal; font-size: 12px; }
@media (max-width: 720px) {
  .manual .cols { column-count: 1; }
  .money { top: auto; bottom: calc(3vh + 210px); }
  .explore { top: auto; bottom: calc(3vh + 176px); }
  .mini { width: 132px; height: 132px; }
}
