.after-hours-game{max-width:1100px;margin:20px auto;background:#101117;color:#fff;border:2px solid #333846;border-radius:18px;overflow:hidden;font-family:system-ui,-apple-system,Segoe UI,sans-serif;box-shadow:0 18px 45px #0005}.after-hours-stage{position:relative;aspect-ratio:8/5;overflow:hidden;background:#131a27;touch-action:none}.after-hours-stage canvas{width:100%;height:100%;display:block}.after-hours-hud{position:absolute;top:12px;left:12px;right:12px;display:flex;gap:8px;flex-wrap:wrap;pointer-events:none;font-size:13px;font-weight:750}.after-hours-hud span{background:#111b2be6;border:1px solid #ffffff35;border-radius:9px;padding:7px 11px;text-shadow:0 1px #000}.after-hours-toast{position:absolute;top:60px;left:50%;transform:translateX(-50%);width:max-content;max-width:75%;text-align:center;background:#211b27ed;border:1px solid #e4ac69;border-radius:10px;padding:9px 15px;font-weight:700;opacity:0;transition:opacity .2s;pointer-events:none}.after-hours-toast.show{opacity:1}.after-hours-overlay{position:absolute;inset:0;background:#090b13c9;display:grid;place-items:center;z-index:5;padding:16px}.after-hours-overlay.hidden{display:none}.after-hours-card{max-width:490px;text-align:center;background:linear-gradient(#202130,#11131d);padding:28px 28px 24px;border:2px solid #f19f55;border-radius:20px;box-shadow:0 12px 50px #000b}.after-hours-card .eyebrow{color:#ffae68;font-size:12px;font-weight:900;letter-spacing:.2em}.after-hours-card h2{color:#fff;margin:8px 0;font-size:clamp(30px,6vw,58px);line-height:1;text-shadow:3px 3px #971e34}.after-hours-card p{font-size:15px;line-height:1.5}.after-hours-card button{background:#e6424e;border:0;color:white;border-radius:9px;font-size:16px;font-weight:900;padding:13px 25px;cursor:pointer;margin:7px}.after-hours-card small{display:block;color:#bcc6d1;line-height:1.6;margin-top:10px}.after-hours-help{padding:11px 18px;text-align:center;font-size:13px;color:#c7c7ce}.after-hours-controls{display:none;position:absolute;left:12px;right:12px;bottom:12px;justify-content:space-between;align-items:end;pointer-events:none}.after-hours-controls button{pointer-events:auto;touch-action:none;color:#fff;background:#1e2b3ddb;border:2px solid #ffffff8a;border-radius:13px;font-size:17px;font-weight:800;width:53px;height:48px;user-select:none}.after-hours-dpad{display:grid;grid-template-columns:repeat(3,53px);gap:3px}.after-hours-dpad button:first-child{grid-column:2}.after-hours-dpad button:nth-child(2){grid-column:1;grid-row:2}.after-hours-dpad button:nth-child(3){grid-column:2;grid-row:2}.after-hours-dpad button:nth-child(4){grid-column:3;grid-row:2}.after-hours-actions{display:flex;gap:7px}.after-hours-actions button{width:66px;font-size:11px;background:#b82d45dd}@media(pointer:coarse),(max-width:680px){.after-hours-controls{display:flex}.after-hours-game{margin:8px auto}.after-hours-stage{aspect-ratio:3/4}.after-hours-hud{font-size:11px;gap:4px;top:5px;left:5px}.after-hours-hud span{padding:5px}.after-hours-card{padding:16px}.after-hours-card p{font-size:13px}}

/* Keep long presses inside the game from selecting the page or opening a menu. */
.after-hours-game,.after-hours-game *{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;-webkit-tap-highlight-color:transparent}
.after-hours-stage,.after-hours-controls,.after-hours-controls *{touch-action:none}
.after-hours-joystick{width:145px;height:145px;display:grid;place-items:center;pointer-events:auto;touch-action:none;border-radius:50%;background:#28344938;border:2px solid #ffffff38}
.after-hours-joystick-base{width:104px;height:104px;border-radius:50%;display:grid;place-items:center;background:#19273cbb;border:3px solid #ffffff6a;pointer-events:none}
.after-hours-joystick-knob{width:57px;height:57px;border-radius:50%;background:linear-gradient(145deg,#e5edf7bb,#809cbbcc);border:3px solid #fff8;box-shadow:0 4px 14px #0008;pointer-events:none;will-change:transform}
@media(pointer:coarse),(max-width:680px){.after-hours-joystick{width:130px;height:130px}.after-hours-joystick-base{width:92px;height:92px}.after-hours-joystick-knob{width:52px;height:52px}.after-hours-controls{bottom:8px;left:8px;right:8px}.after-hours-actions{align-items:end}.after-hours-actions button{min-width:65px;min-height:56px}}
/* Use the same shape for the visible canvas and its internal drawing surface. */
.after-hours-game.touch-enabled .after-hours-stage{aspect-ratio:3/4}
.after-hours-game.touch-enabled .after-hours-controls{display:flex;z-index:4;align-items:flex-end}
.after-hours-game.touch-enabled .after-hours-joystick{display:grid;flex:none;position:relative;width:clamp(112px,32vw,145px);height:clamp(112px,32vw,145px);background:#40608088;border:3px solid #d4e8ffcc;box-shadow:0 0 0 6px #0005,0 5px 20px #0009}
.after-hours-game.touch-enabled .after-hours-joystick-base{width:70%;height:70%;background:#253b58e8;border-color:#d4e8ffad}
.after-hours-game.touch-enabled .after-hours-joystick-knob{width:55%;height:55%;background:linear-gradient(145deg,#fff,#9bc1e8)}
.after-hours-upgrade{position:absolute;inset:0;z-index:8;background:#080b16c9;display:grid;place-items:center;padding:16px}
.after-hours-upgrade.hidden{display:none}
.after-hours-upgrade-card{background:#1d2431;border:2px solid #ffc577;border-radius:16px;padding:22px;max-width:420px;width:100%;text-align:center;box-shadow:0 12px 40px #000a}
.after-hours-upgrade-card h2{margin:0 0 8px;color:#ffd18d;font-size:26px}
.after-hours-upgrade-card p{font-size:14px;line-height:1.4}
.after-hours-upgrade-card button{display:block;width:100%;margin:9px 0;padding:10px;color:white;background:#a93148;border:1px solid #f5a3a8;border-radius:9px;font-weight:800;font-size:14px;cursor:pointer;touch-action:manipulation}
.after-hours-upgrade-card button small{display:block;font-weight:400;margin-top:2px;color:#fbe9ec}
.after-hours-social{position:absolute;right:10px;top:56px;z-index:3;width:min(185px,43%);font-size:12px;color:#fff}
.after-hours-social-toggle{display:block;margin-left:auto;padding:7px 9px;color:#fff;background:#172437ed;border:1px solid #91b9cb;border-radius:8px;font-size:11px;font-weight:800;cursor:pointer;touch-action:manipulation}
.after-hours-player-list:not([hidden]){margin-top:4px;padding:8px;background:#172437f5;border:1px solid #91b9cb;border-radius:9px;max-height:150px;overflow:auto}
.after-hours-player-row{display:flex;align-items:center;justify-content:space-between;gap:5px;margin:5px 0}
.after-hours-player-row span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.after-hours-player-row button{padding:4px 6px;border:1px solid #f0b985;border-radius:6px;background:#91354c;color:white;font-size:11px;cursor:pointer;touch-action:manipulation}
.after-hours-player-row{flex-wrap:wrap}
.after-hours-player-row span{flex:1 1 85px}
.after-hours-player-row select{flex:1 1 100%;max-width:100%;padding:6px;color:white;background:#263c51;border:1px solid #91b9cb;border-radius:6px;font-size:12px;touch-action:manipulation}
.after-hours-map{position:absolute;left:10px;top:56px;z-index:3;max-width:min(260px,66%)}
.after-hours-map-toggle{padding:7px 10px;color:white;background:#172437ed;border:1px solid #91b9cb;border-radius:8px;font-size:11px;font-weight:800;cursor:pointer;touch-action:manipulation}
.after-hours-stage .after-hours-map canvas{display:block;width:100%;height:auto;aspect-ratio:26/19;margin-top:4px;border:2px solid #91b9cb;border-radius:9px;background:#1a3b3d;box-shadow:0 5px 18px #0008;pointer-events:none}
.after-hours-map.expanded{left:50%;top:50%;transform:translate(-50%,-50%);z-index:6;width:min(92%,700px);max-width:none;padding:12px;background:#101c2bf5;border:2px solid #91b9cb;border-radius:14px;box-shadow:0 12px 40px #000b}
.after-hours-map.expanded .after-hours-map-toggle{width:100%;min-height:42px;margin-bottom:7px}
.after-hours-map.expanded canvas{max-height:72vh;object-fit:contain}
@media(pointer:coarse),(max-width:680px){.after-hours-map,.after-hours-social{top:93px}.after-hours-map{max-width:min(180px,47%)}}
.after-hours-game [hidden]{display:none!important}

/* Keep four upgrade choices reachable on short mobile screens. */
.after-hours-upgrade{overflow-y:auto;align-items:safe center}
@media (max-width:680px){.after-hours-upgrade-card{padding:13px}.after-hours-upgrade-card button{margin:6px 0;min-height:44px}}
.after-hours-dispatch{position:absolute;inset:0;z-index:7;display:grid;align-items:safe center;justify-items:center;padding:16px;background:#080b16d9;overflow-y:auto}
.after-hours-dispatch.hidden{display:none}
.after-hours-dispatch-card{box-sizing:border-box;width:min(420px,100%);padding:20px;border:2px solid #ffca84;border-radius:16px;background:#1b2633;box-shadow:0 12px 40px #000a;text-align:center}
.after-hours-dispatch-card h2{margin:0 0 8px;color:#ffd18d;font-size:22px}
.after-hours-dispatch-card p{margin:0 0 12px;font-size:13px}
.after-hours-dispatch-options button{display:block;box-sizing:border-box;width:100%;min-height:68px;margin:8px 0;padding:10px;border:1px solid #9fc3d3;border-radius:10px;background:#23394a;color:#fff;text-align:left;cursor:pointer;touch-action:manipulation}
.after-hours-dispatch-options strong,.after-hours-dispatch-options small{display:block}
.after-hours-dispatch-options small{margin-top:4px;color:#d5e5ef;line-height:1.35}
.after-hours-dispatch-close{min-height:44px;margin-top:6px;padding:7px 13px;border:1px solid #f0b985;border-radius:8px;background:#572f40;color:#fff;font-weight:700;cursor:pointer;touch-action:manipulation}
@media (max-width:680px){.after-hours-dispatch-card{padding:12px}.after-hours-dispatch-card h2{font-size:19px}}
.after-hours-challenge{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 9px;padding:8px;border:1px solid #f0b985;border-radius:8px;background:#304052}
.after-hours-challenge span{flex:1 1 100%;line-height:1.35}
.after-hours-challenge button{min-height:36px}

.after-hours-actions button[data-control="interact"]{width:100px;min-width:100px;font-size:12px}
/* Keep navigation available without covering the city on a phone. */
.after-hours-hud{flex-wrap:nowrap;right:auto;max-width:calc(100% - 18px);gap:5px}
.after-hours-hud span,.after-hours-hud button{white-space:nowrap;padding:5px 8px;background:#101a27d9;border:1px solid #ffffff35;border-radius:9px;color:#fff;font:inherit;text-shadow:0 1px #000}
.after-hours-hud button{pointer-events:auto;cursor:pointer;touch-action:manipulation}
.after-hours-ticket{position:absolute;left:50%;top:85px;transform:translateX(-50%);z-index:4;width:min(280px,82%);padding:12px 14px;background:#101b29f5;border:1px solid #d5b97b;border-radius:12px;box-shadow:0 8px 25px #000a;color:#fff;font-size:12px}
.after-hours-ticket strong{color:#ffd996;letter-spacing:.08em}
.after-hours-ticket p{white-space:pre-line;line-height:1.55;margin:7px 0}
.after-hours-ticket button{display:block;margin-left:auto;padding:5px 9px;color:#fff;background:#943549;border:1px solid #ffb6ad;border-radius:7px;cursor:pointer;touch-action:manipulation}
.after-hours-map,.after-hours-social{top:50px}
.after-hours-map-toggle,.after-hours-social-toggle{font-size:10px;padding:6px 8px;background:#152334d9}
@media(pointer:coarse),(max-width:680px){
  .after-hours-hud{top:6px;left:7px;font-size:10px;gap:4px}
  .after-hours-hud span,.after-hours-hud button{padding:5px 6px;border-radius:7px}
  .after-hours-map,.after-hours-social{top:45px}
  .after-hours-game.touch-enabled .after-hours-joystick{width:clamp(98px,27vw,118px);height:clamp(98px,27vw,118px);background:#3455759c;box-shadow:0 3px 14px #0008}
  .after-hours-game.touch-enabled .after-hours-joystick-base{width:65%;height:65%}
  .after-hours-game.touch-enabled .after-hours-joystick-knob{width:57%;height:57%}
  .after-hours-actions button[data-control="interact"]{min-width:86px;width:86px;min-height:52px;font-size:11px}
}
.after-hours-overlay{overflow-y:auto;align-items:safe center;box-sizing:border-box}
.after-hours-card{box-sizing:border-box;width:min(490px,100%)}
.after-hours-card .after-hours-garage-open{background:#2e5366;border:1px solid #9dc9d5}
.after-hours-shift-summary{margin:12px auto;padding:10px 12px;border:1px solid #ddb575;border-radius:10px;background:#293440;line-height:1.55;font-size:14px}
.after-hours-garage{position:absolute;inset:0;z-index:9;display:grid;place-items:safe center;padding:12px;overflow-y:auto;background:#080b16ed;box-sizing:border-box}
.after-hours-garage-card{box-sizing:border-box;width:min(440px,100%);padding:17px;border:2px solid #ffc577;border-radius:16px;background:#1d2431;color:#fff;text-align:center;box-shadow:0 12px 40px #000a}
.after-hours-garage-card h2{margin:0 0 7px;color:#ffd18d;font-size:24px}
.after-hours-garage-card h3{margin:12px 0 7px;color:#ffd18d;font-size:13px;letter-spacing:.07em}
.after-hours-garage-card p,.after-hours-garage-upgrades{margin:7px 0;font-size:13px;line-height:1.5}
.after-hours-garage-preview{position:relative;margin:8px auto;width:68px;height:100px;border-radius:12px;background:#344756;box-shadow:inset 0 0 0 2px #8199a1}
.after-hours-garage-wheel{position:absolute;left:29px;width:10px;height:18px;background:#121820;border-radius:4px}
.after-hours-garage-wheel.front{top:4px}.after-hours-garage-wheel.back{bottom:4px}
.after-hours-garage-bike{position:absolute;left:23px;top:16px;width:22px;height:51px;border-radius:11px 11px 6px 6px;background:var(--bike-colour,#e3444a);box-shadow:0 0 0 2px #1b2630}
.after-hours-garage-helmet{position:absolute;left:25px;top:42px;width:18px;height:18px;border-radius:50%;background:#e8e5d6;box-shadow:0 0 0 2px #29343e}
.after-hours-garage-box{position:absolute;left:20px;top:67px;width:28px;height:20px;background:var(--bike-colour,#e3444a);border:2px solid #1b2630;border-radius:3px}
.after-hours-garage-colours{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
.after-hours-garage-colours button,.after-hours-garage-close{min-height:46px;padding:7px 10px;border:1px solid #9fc3d3;border-radius:9px;background:#293f50;color:white;font-weight:700;cursor:pointer;touch-action:manipulation}
.after-hours-garage-colours button::before{content:'';display:inline-block;width:15px;height:15px;margin-right:7px;vertical-align:-2px;border-radius:50%;background:var(--swatch);border:1px solid #fff9}
.after-hours-garage-colours button[aria-pressed="true"]{border:2px solid #ffce86;background:#475869}
.after-hours-garage-close{width:100%;margin-top:14px;background:#a93148;border-color:#f5a3a8}
.after-hours-garage-shop{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;text-align:left}
.after-hours-garage-shop button{min-height:65px;padding:9px;border:1px solid #b7c9d1;border-radius:9px;background:#314d5a;color:#fff;text-align:left;cursor:pointer;touch-action:manipulation}
.after-hours-garage-shop button strong,.after-hours-garage-shop button small{display:block;line-height:1.35}
.after-hours-garage-shop button strong{font-size:12px}.after-hours-garage-shop button small{margin-top:3px;color:#d7e8e8;font-size:11px}
.after-hours-garage-shop button:disabled{opacity:.65;cursor:default}
.after-hours-garage-card .after-hours-garage-status{min-height:18px;margin:9px 0 0;color:#ffe2a4;font-size:12px}
@media(max-width:360px){.after-hours-garage-shop{grid-template-columns:1fr}.after-hours-garage-shop button{min-height:49px}}
.after-hours-hud .after-hours-fuel{color:#a6efc3;border-color:#72bc92}
.after-hours-hud .after-hours-fuel.low{color:#ffcc82;border-color:#ffb574;background:#44301fef}
.after-hours-fuel-panel{position:absolute;inset:0;z-index:8;display:grid;place-items:safe center;padding:14px;box-sizing:border-box;overflow-y:auto;background:#07141ae8}
.after-hours-fuel-card{box-sizing:border-box;width:min(390px,100%);padding:20px;border:2px solid #8de0bd;border-radius:16px;background:#1b2932;color:#fff;text-align:center;box-shadow:0 12px 40px #000b}
.after-hours-fuel-card h2{margin:0;color:#a5ecc8;font-size:23px}
.after-hours-fuel-details{white-space:pre-line;line-height:1.75;font-size:15px;margin:12px 0 17px}
.after-hours-fuel-buttons{display:grid;gap:10px}
.after-hours-fuel-buttons button{min-height:48px;padding:9px 12px;border:1px solid #b0dfcb;border-radius:9px;background:#287453;color:#fff;font-size:15px;font-weight:800;cursor:pointer;touch-action:manipulation}
.after-hours-fuel-buttons .after-hours-fuel-close{background:#344956;border-color:#8db1b9}
@media(max-width:680px){.after-hours-fuel-card{padding:16px}.after-hours-fuel-details{font-size:14px}}
.after-hours-bike-health{position:absolute;top:38px;left:0;display:flex;align-items:center;gap:6px;white-space:nowrap}
.after-hours-hud .after-hours-health-track{display:block;width:76px;height:9px;padding:0;overflow:hidden;border-radius:6px;background:#6c2835;border:1px solid #e1e9e2}
.after-hours-hud .after-hours-health-fill{display:block;width:100%;height:100%;padding:0;border:0;background:#69d896;transition:width .18s}
.after-hours-hud .after-hours-bike-health.low .after-hours-health-fill{background:#ec985a}
.after-hours-bike-health .after-hours-health-text{font-size:11px;padding:0!important;border:0!important;background:none!important}
.after-hours-speedometer{position:absolute;top:38px;left:155px;white-space:nowrap;color:#bce5fa!important;border-color:#77a9bf!important}
.after-hours-speedometer.speeding{color:#ffcb7e!important;border-color:#ed9952!important;background:#543022e8!important}
.after-hours-map,.after-hours-social{top:75px}
@media(pointer:coarse),(max-width:680px){.after-hours-bike-health{top:29px;left:0}.after-hours-hud .after-hours-health-track{width:58px}.after-hours-bike-health .after-hours-health-text{font-size:10px}.after-hours-speedometer{top:29px;left:130px}.after-hours-map,.after-hours-social{top:62px}}
.after-hours-repair-panel{position:absolute;inset:0;z-index:8;display:grid;place-items:safe center;padding:14px;box-sizing:border-box;overflow-y:auto;background:#0d1522eb}
.after-hours-repair-card{box-sizing:border-box;width:min(390px,100%);padding:20px;border:2px solid #9bcbd6;border-radius:16px;background:#1c2935;color:#fff;text-align:center;box-shadow:0 12px 40px #000b}
.after-hours-repair-card h2{margin:0;color:#b0e6f2;font-size:23px}
.after-hours-repair-details{white-space:pre-line;line-height:1.75;font-size:15px;margin:12px 0 17px}
.after-hours-repair-buttons{display:grid;gap:10px}
.after-hours-repair-buttons button{min-height:48px;padding:9px 12px;border:1px solid #c1d8db;border-radius:9px;background:#326885;color:#fff;font-size:15px;font-weight:800;cursor:pointer;touch-action:manipulation}
.after-hours-repair-buttons .after-hours-repair-close{background:#344956;border-color:#8db1b9}
@media(max-width:680px){.after-hours-repair-card{padding:16px}.after-hours-repair-details{font-size:14px}}
