:root {
  color-scheme: dark;
  --ink: #f7f2e8;
  --muted: #aaa5b5;
  --panel: rgba(20, 18, 27, .94);
  --line: rgba(255,255,255,.13);
  --acid: #d7ff3f;
  --violet: #9a75ff;
  --orange: #ff8b52;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; width: 100%; height: 100%; overflow: hidden; background: #101018; font-family: Inter, ui-sans-serif, system-ui, sans-serif; color: var(--ink); touch-action: none; }
button { font: inherit; color: inherit; border: 0; cursor: pointer; }
#game-shell { position: fixed; inset: 0; overflow: hidden; background: #272535; }
#game { display: block; width: 100%; height: 100%; cursor: crosshair; }
#hud { position: absolute; z-index: 3; left: max(12px, env(safe-area-inset-left)); right: max(12px, env(safe-area-inset-right)); top: max(10px, env(safe-area-inset-top)); display: grid; grid-template-columns: repeat(5,minmax(88px,max-content)) 46px; align-items: stretch; gap: 7px; pointer-events: none; }
.stat { min-width: 0; padding: 9px 12px; background: rgba(22,20,29,.9); border: 1px solid var(--line); box-shadow: 0 8px 22px #0003; }
.stat span { display: block; color: var(--muted); font-size: 10px; font-weight: 850; letter-spacing: .12em; }
.stat strong { display: block; margin-top: 3px; font-size: 17px; white-space: nowrap; }
.stat.money strong { color: var(--acid); }
.stat.police strong { color: var(--orange); }
.clock-stat { min-width: 96px; }
.clock-label { display: flex !important; align-items: baseline; justify-content: space-between; gap: 5px; }
.clock-label em { min-width: 0; overflow: hidden; color: #d8d4df; font-size: 8px; font-style: normal; font-weight: 800; letter-spacing: 0; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
#clock-time { overflow: visible; color: var(--ink); font-size: 20px; font-variant-numeric: tabular-nums; font-weight: 950; letter-spacing: .02em; line-height: 1; text-overflow: clip; }
.icon-button { pointer-events: auto; width: 46px; background: rgba(22,20,29,.9); border: 1px solid var(--line); font-size: 20px; }
#objective { position: absolute; z-index: 3; top: calc(max(10px, env(safe-area-inset-top)) + 61px); left: max(12px, env(safe-area-inset-left)); display: flex; align-items: center; gap: 12px; padding: 8px 10px 8px 12px; background: rgba(20,18,27,.88); border-left: 3px solid var(--acid); box-shadow: 0 7px 18px #0003; }
#objective .objective-copy > span { display: block; color: var(--acid); font-size: 9px; font-weight: 900; letter-spacing: .16em; }
.objective-copy { min-width: 0; }
#objective strong { display: block; font-size: 13px; line-height: 1.2; }
.objective-guide { display: grid; flex: 0 0 48px; place-items: center; min-height: 46px; border-left: 1px solid var(--line); color: var(--acid); }
.objective-guide.hidden { display: none; }
#objective #objective-arrow { display: block; font-size: 27px; font-weight: 950; line-height: .8; transform-origin: center; transition: transform .16s linear; filter: drop-shadow(0 0 7px #d7ff3f88); animation: guide-pulse .8s ease-in-out infinite alternate; }
.objective-guide small { margin-top: 3px; color: var(--ink); font-size: 8px; font-weight: 900; letter-spacing: .08em; }
@keyframes guide-pulse { from { opacity: .62; } to { opacity: 1; } }
#place-label { position: absolute; z-index: 2; top: 28%; left: 50%; transform: translate(-50%,-50%); padding: 8px 13px; border: 1px solid #ffffff24; background: #15131bcc; font-size: 13px; font-weight: 850; opacity: 0; transition: opacity .18s; pointer-events: none; }
#place-label.show { opacity: 1; }
#minimap { position: absolute; z-index: 3; right: max(18px,env(safe-area-inset-right)); bottom: max(18px,env(safe-area-inset-bottom)); width: 112px; height: 112px; border: 3px solid #f7f2e8cc; border-radius: 50%; background: #17151f; box-shadow: 0 10px 28px #0009, 0 0 0 3px #17151fcc; pointer-events: none; }
#phone-button{position:absolute;z-index:4;right:max(30px,calc(env(safe-area-inset-right) + 12px));bottom:max(148px,calc(env(safe-area-inset-bottom) + 130px));display:grid;width:52px;height:52px;place-items:center;border:2px solid #f7f2e8cc;border-radius:50%;background:#17151feF;box-shadow:0 9px 24px #0009;font-size:25px;pointer-events:auto}#phone-button:focus-visible{outline:3px solid var(--acid);outline-offset:3px}#phone-unread{position:absolute;right:-5px;top:-6px;display:grid;min-width:23px;height:23px;padding:0 5px;place-items:center;border:2px solid #17151f;border-radius:999px;background:#ff655f;color:#fff;font:950 11px/1 system-ui}.phone-list{display:grid;gap:9px;margin:15px 0}.phone-message{padding:12px 13px;border-left:3px solid #9a75ff;background:#ffffff09}.phone-message.unread{border-left-color:var(--acid);background:#d7ff3f0c}.phone-message header{display:flex;align-items:baseline;justify-content:space-between;gap:10px}.phone-message strong{color:var(--acid);font-size:14px}.phone-message time{color:var(--muted);font-size:11px;white-space:nowrap}.phone-message p{margin:7px 0 0;color:#e0dce5;font-size:14px;line-height:1.42}.phone-empty{padding:18px;background:#ffffff09;text-align:center}
#controls { position: absolute; z-index: 4; inset: auto max(18px,env(safe-area-inset-right)) max(18px,env(safe-area-inset-bottom)) max(18px,env(safe-area-inset-left)); display: flex; justify-content: space-between; align-items: flex-end; pointer-events: none; }
.vehicle-action { pointer-events:auto; min-width:118px; min-height:48px; padding:10px 14px; background:var(--acid); color:#17151f; border:3px solid #17151f; font-weight:950; box-shadow:0 8px 24px #0008; }
.hidden { display:none !important; }
#joystick { pointer-events:auto; position:relative; width:112px; height:112px; border:2px solid #ffffff55; border-radius:50%; background:#17151f99; touch-action:none; }
#joystick-knob { position:absolute; left:34px; top:34px; width:40px; height:40px; border-radius:50%; background:var(--acid); box-shadow:0 4px 16px #0009; }
.panel.input-guard .panel-card { pointer-events:none; }
.stepper-row { display:grid; grid-template-columns:48px 1fr 48px; gap:8px; align-items:center; }
.stepper-row button { min-height:44px; background:#3d3948; color:var(--acid); font-size:24px; font-weight:950; }
#touch-hint { padding: 10px 14px; background: rgba(21,19,29,.76); border: 1px solid #ffffff31; backdrop-filter: blur(7px); box-shadow: 0 8px 24px #0005; text-align: left; transition: opacity .25s; }
#touch-hint span { display: block; color: var(--acid); font-size: 11px; font-weight: 900; letter-spacing: .11em; }
#touch-hint small { display: block; margin-top: 2px; color: #d2ced7; font-size: 12px; }
#touch-hint.used { opacity: .25; }
.panel { position: absolute; z-index: 10; inset: 0; display: grid; place-items: center; padding: 18px; background: rgba(7,6,10,.73); backdrop-filter: blur(8px); touch-action: pan-y; }
.panel.hidden { display: none; }
.panel-card { position: relative; width: min(500px,100%); max-height: min(680px, calc(100vh - 36px)); overflow: auto; padding: 26px; background: var(--panel); border: 1px solid #ffffff21; border-top: 4px solid var(--violet); box-shadow: 0 24px 70px #000b; }
.intro-card { border-top-color: var(--acid); }
.legal-panel { z-index: 30; }
.legal-card { width: min(680px,100%); border-top-color: var(--acid); }
.legal-sections { display: grid; gap: 10px; margin: 18px 0; }
.legal-sections section { padding: 14px 16px; background: #ffffff09; border-left: 3px solid #9a75ff; }
.legal-sections h2 { margin: 0 0 7px; color: var(--acid); font-size: 17px; }
.legal-sections p { margin: 6px 0; font-size: 15px; line-height: 1.48; }
.legal-sections a { color: var(--acid); }
.legal-check { display: flex; align-items: flex-start; gap: 11px; margin: 16px 0 6px; padding: 14px; background: #100f16; border: 1px solid var(--line); font-size: 16px; line-height: 1.4; cursor: pointer; }
.legal-check input { flex: 0 0 22px; width: 22px; height: 22px; margin: 0; accent-color: var(--acid); }
.legal-actions { display: grid; grid-template-columns: 1fr 1.4fr; gap: 9px; }
.legal-actions .legal-decision { min-height: 54px; margin-top: 8px; justify-content: center; text-align: center; }
.legal-note { margin: 12px 0 0 !important; color: var(--muted) !important; font-size: 13px; }
.legal-refused { padding: 18px; background: #ff8b5214; border: 1px solid #ff8b5255; }
.legal-refused strong { display: block; color: var(--orange); font-size: 21px; }
.legal-refused p { margin-bottom: 0; }
.intro-lead { margin: 0 0 14px; }
.level-map { display: grid; gap: 8px; margin: 15px 0; }
.level-map article { display: flex; align-items: center; gap: 12px; padding: 11px 12px; background: #ffffff09; border-left: 3px solid var(--acid); }
.level-map article > div { min-width: 0; }
.level-map b { display: block; color: var(--ink); font-size: 15px; }
.level-map small { display: block; margin-top: 2px; color: var(--muted); font-size: 13px; line-height: 1.35; }
.level-icon { display: grid; flex: 0 0 38px; width: 38px; height: 38px; place-items: center; background: #17151f; border: 1px solid #ffffff18; font-size: 21px; }
.level-road { display: grid; grid-template-columns: repeat(3,1fr); gap: 6px; margin: 15px 0 4px; }
.level-road span { padding: 8px 5px; border: 1px solid var(--line); color: var(--muted); font-size: 10px; font-weight: 900; text-align: center; letter-spacing: .04em; }
.level-road .current { border-color: var(--acid); color: var(--acid); background: #d7ff3f0d; }
.level-road .locked { background: #0f0e14; }
.unlock-hero { margin: 14px 0; padding: 18px; background: linear-gradient(135deg,#d7ff3f18,#9a75ff18); border: 1px solid #d7ff3f55; text-align: center; }
.unlock-hero .level-icon { width: 58px; height: 58px; margin: 0 auto 9px; font-size: 32px; }
.unlock-hero strong { display: block; color: var(--acid); font-size: 21px; }
.unlock-hero small { display: block; margin-top: 5px; color: var(--muted); line-height: 1.4; }
.rules-list { display: grid; gap: 8px; margin: 15px 0; }
.rules-list p { margin: 0; padding: 10px 12px; background: #ffffff09; font-size: 14px; line-height: 1.38; }
.rules-list b { color: var(--acid); }
.panel-card h1 { margin: 3px 38px 10px 0; font-size: clamp(27px,7vw,42px); line-height: .97; letter-spacing: -.045em; }
.panel-card p { color: #c6c1cc; line-height: 1.55; }
.eyebrow { margin: 0 !important; color: var(--acid) !important; font-size: 11px; font-weight: 900; letter-spacing: .14em; }
.close { position: absolute; right: 13px; top: 12px; width: 36px; height: 36px; border-radius: 50%; background: #ffffff12; font-size: 25px; }
.primary, .choice { width: 100%; min-height: 52px; margin-top: 10px; padding: 12px 16px; text-align: left; background: #2a2635; border: 1px solid #ffffff18; font-weight: 800; }
.primary { background: var(--acid); color: #17151f; text-align: center; font-size: 17px; }
.choice { display: flex; justify-content: space-between; align-items: center; }
.choice span { color: var(--acid); }
.choice:disabled { opacity: .4; cursor: default; }
.primary:disabled { opacity: .4; cursor: default; }
.price-entry { margin: 18px 0 8px; }
.price-entry label { display: block; margin-bottom: 7px; color: var(--muted); font-size: 13px; font-weight: 800; letter-spacing: .05em; }
.price-entry input { width: 100%; min-height: 58px; padding: 9px 14px; border: 2px solid #ffffff2c; outline: 0; background: #100f16; color: var(--acid); font: 900 26px/1 system-ui; }
.price-entry select { width: 100%; min-height: 48px; margin-bottom: 9px; padding: 8px 12px; border: 2px solid #ffffff2c; background: #100f16; color: var(--ink); font: 800 16px/1 system-ui; }
.price-entry input:focus { border-color: var(--acid); box-shadow: 0 0 0 3px #d7ff3f20; }
.price-preview { display: block; min-height: 20px; margin-top: 8px; color: var(--acid); font-size: 13px; font-weight: 750; }
.stock-slider { margin: 20px 0 12px; padding: 16px; background: #100f16; border: 1px solid var(--line); }
.stock-slider label { display: block; color: var(--muted); font-size: 14px; font-weight: 800; letter-spacing: .04em; }
.stock-slider output { display: block; margin: 8px 0 14px; color: var(--acid); font-size: 34px; font-weight: 950; line-height: 1; text-align: center; }
.stock-slider input[type="range"] { width: 100%; height: 38px; margin: 0; padding: 0; appearance: none; -webkit-appearance: none; background: transparent; cursor: grab; touch-action: pan-x; }
.stock-slider input[type="range"]:active { cursor: grabbing; }
.stock-slider input[type="range"]::-webkit-slider-runnable-track { height: 10px; border-radius: 999px; background: #3d3948; box-shadow: inset 0 1px 2px #0008; }
.stock-slider input[type="range"]::-webkit-slider-thumb { width: 32px; height: 32px; margin-top: -11px; border: 3px solid #17151f; border-radius: 50%; appearance: none; -webkit-appearance: none; background: var(--acid); box-shadow: 0 0 0 2px #d7ff3f55, 0 4px 10px #0008; }
.stock-slider input[type="range"]::-moz-range-track { height: 10px; border-radius: 999px; background: #3d3948; box-shadow: inset 0 1px 2px #0008; }
.stock-slider input[type="range"]::-moz-range-thumb { width: 27px; height: 27px; border: 3px solid #17151f; border-radius: 50%; background: var(--acid); box-shadow: 0 0 0 2px #d7ff3f55, 0 4px 10px #0008; }
.stock-slider input[type="range"]:focus-visible { outline: 3px solid #d7ff3f66; outline-offset: 4px; }
.stock-slider-limits { display: flex; justify-content: space-between; margin-top: 3px; color: var(--muted); font-size: 13px; font-weight: 750; }
.gear-choice{display:grid;gap:8px;margin:12px 0 18px}.gear-radio{display:flex;align-items:center;gap:10px;padding:13px 14px;border:1px solid var(--line);background:#100f16;color:#f3f1f7;font-weight:800}.gear-radio input{width:22px;height:22px;accent-color:var(--acid)}
.legend { display: flex; gap: 10px; margin: 22px 0 12px; }
.legend span { flex: 1; padding: 10px; background: #ffffff0b; color: var(--muted); font-size: 13px; }
.legend b { color: var(--ink); }
.summary { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 17px 0; }
.summary div { padding: 12px; background: #ffffff09; }
.summary small { display: block; color: var(--muted); }
.summary strong { font-size: 20px; }
.tariff-grid { display: grid; grid-template-columns: 1fr auto; gap: 0; margin: 14px 0 4px; border: 1px solid var(--line); background: #100f16; }
.tariff-grid b, .tariff-grid span { padding: 7px 11px; border-bottom: 1px solid #ffffff0d; font-size: 13px; }
.tariff-grid span { color: var(--acid); font-weight: 850; text-align: right; }
#toast { position: absolute; z-index: 20; left: 50%; bottom: calc(max(20px,env(safe-area-inset-bottom)) + 115px); transform: translate(-50%,20px); min-width: 220px; max-width: calc(100% - 40px); padding: 12px 16px; text-align: center; background: #111018ef; border: 1px solid #ffffff22; box-shadow: 0 12px 35px #0008; font-weight: 750; opacity: 0; transition: .25s; pointer-events: none; }
#toast.show { opacity: 1; transform: translate(-50%,0); }
@media (orientation: portrait) and (max-width: 520px) {
  #hud { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 4px; }
  .stat { min-width: 0; padding: 8px 9px; box-shadow: 0 5px 14px #0003; }
  .stat span { font-size: 9px; }
  .stat strong { overflow: hidden; font-size: 14px; text-overflow: ellipsis; }
  .clock-stat { min-width: 0; padding-right: 8px; padding-left: 8px; }
  .clock-label { gap: 3px; }
  .clock-label em { font-size: 7px; }
  #clock-time { overflow: visible; font-size: 19px; text-overflow: clip; }
  .icon-button { width: auto; min-width: 0; margin-left: 0; }
  #objective { top: calc(max(10px, env(safe-area-inset-top)) + 104px); right: max(12px, env(safe-area-inset-right)); max-width: none; }
  #minimap { bottom: max(18px,env(safe-area-inset-bottom)); width: 102px; height: 102px; }
  #phone-button{right:max(28px,calc(env(safe-area-inset-right) + 10px));bottom:max(136px,calc(env(safe-area-inset-bottom) + 118px));}
  .legal-card { padding: 20px; }
  .legal-actions { grid-template-columns: 1fr; }
}
@media (orientation: landscape) and (max-height: 500px) {
  #hud { right: auto; max-width: calc(100% - 80px); }
  #objective { top: 61px; }
  #minimap { bottom: max(12px,env(safe-area-inset-bottom)); width: 92px; height: 92px; }
  #toast { bottom: 30px; }
}
#objective-guide{display:none!important}
.sleep-overlay{position:fixed;inset:0;z-index:80;display:flex;flex-direction:column;align-items:center;justify-content:center;background:#11101bcf;color:#fff;backdrop-filter:blur(5px);pointer-events:all}.sleep-overlay.hidden{display:none}.sleep-overlay span{font-size:clamp(80px,22vw,170px);filter:drop-shadow(0 12px 20px #0008)}.sleep-overlay strong{font-size:clamp(34px,10vw,72px);letter-spacing:.18em;color:#d7ff3f}
.option-section{margin:18px 0}.option-section h2{font-size:1rem;margin:0 0 8px}.option-segment{display:flex;gap:4px;padding:4px;background:#111018;border:1px solid #ffffff25;border-radius:14px}.option-segment button{flex:1;min-width:0;min-height:48px;border:0;border-radius:10px;background:transparent;color:#eee;font:700 1rem system-ui;cursor:pointer}.option-segment button[aria-pressed="true"]{background:#d7ff3f;color:#17151f}.option-segment button:focus-visible{outline:3px solid #fff;outline-offset:2px}
.language-first{z-index:1000}.language-first h1{font-size:1.4rem;line-height:1.6}.first-language{min-height:56px}
.account-field{display:block;margin:12px 0}.account-field span{display:block;margin-bottom:6px;color:var(--muted);font-size:14px;font-weight:800}.account-field input{box-sizing:border-box;width:100%;min-height:52px;padding:10px 12px;border:2px solid #ffffff2c;background:#100f16;color:var(--ink);font:700 16px system-ui}.account-field input:focus{border-color:var(--acid);outline:0;box-shadow:0 0 0 3px #d7ff3f20}.account-separator{display:flex;align-items:center;gap:10px;margin:20px 0 8px;color:var(--muted);font-size:13px;font-weight:850}.account-separator:before,.account-separator:after{content:"";height:1px;flex:1;background:var(--line)}.account-message{min-height:24px;margin:14px 0 0!important;color:var(--acid)!important;font-weight:750}.account-card{display:grid;gap:4px;margin:16px 0;padding:16px;background:#ffffff09;border-left:3px solid var(--acid)}.account-card small{color:var(--muted)}.account-card strong{font-size:22px;color:var(--acid)}
.save-slot{align-items:center}.save-slot>span{display:grid;gap:4px;text-align:left}.save-slot small{color:var(--muted);font-size:12px}.save-slot[aria-current="true"]{border-color:var(--acid);background:#d7ff3f12}.save-slot[aria-current="true"]>strong{color:var(--acid)}
.safe-box,.multiplayer-callout{margin:18px 0;padding:14px;border:1px solid #d7ff3f55;background:linear-gradient(135deg,#d7ff3f0d,#9a75ff0c)}.safe-box h2,.multiplayer-callout h2{margin-top:0}.mp-list{display:grid;gap:8px;margin:12px 0}.mp-player{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px;background:#ffffff09;border-left:3px solid #9a75ff}.mp-player>div{display:grid;gap:3px;min-width:0}.mp-player strong{overflow:hidden;text-overflow:ellipsis}.mp-player small{color:var(--muted);font-size:12px}.mp-player .choice{width:auto;margin:0;padding:9px 10px;font-size:13px}.mp-messages{display:grid;gap:8px;max-height:42vh;overflow:auto;margin:12px 0;padding:10px;background:#0d0c12}.mp-message{display:grid;justify-self:start;max-width:86%;margin:0!important;padding:9px 11px;background:#ffffff0d;border-left:3px solid #9a75ff}.mp-message.mine{justify-self:end;border-left:0;border-right:3px solid var(--acid);text-align:right}.mp-message b{font-size:12px;color:var(--acid)}.mp-message span{overflow-wrap:anywhere}.escape-clock{margin:22px 0;color:#ff655f;font:950 54px/1 system-ui;text-align:center;letter-spacing:.06em;text-shadow:0 0 20px #ff3b3055}.multiplayer-guides article{align-items:flex-start}
.release-note{margin:16px 0;padding:14px;background:#ffffff08;border-left:3px solid var(--acid)}.release-note h2{margin:0 0 10px;color:var(--acid);font-size:17px}.release-note .rules-list{margin:0}.release-note .rules-list p{font-size:14px}
