:root {
  --bg: #0b1410; --panel: #12201a; --panel2: #182b22; --line: #2a4436;
  --text: #eef5f0; --muted: #8fa89a; --accent: #ffd23f; --accent2: #3ee08f; --nitro: #ffb13b;
  --danger: #ff5a5f; --pol: #3f7bff; --fire: #ff5a3c; --ems: #ff8a8d; --dot: #ff9a1f;
  --sat: env(safe-area-inset-top, 0px); --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px); --sar: env(safe-area-inset-right, 0px);
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; background: var(--bg); color: var(--text); overflow: hidden;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  -webkit-user-select: none; user-select: none; touch-action: none; overscroll-behavior: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
canvas#game { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
.hidden { display: none !important; }
.h { font-weight: 900; font-style: italic; text-transform: uppercase; letter-spacing: .02em; }

/* ------------------------------------------------------------ HUD */
#hud { position: fixed; inset: 0; pointer-events: none; }
#hud button, #hud .call, #hud .unit { pointer-events: auto; }
.box { background: rgba(8, 14, 11, .86); border: 1px solid #ffffff22; border-radius: 12px; box-shadow: 0 6px 20px #0008; }
.score { position: absolute; top: calc(10px + var(--sat)); left: calc(10px + var(--sal)); padding: 5px 11px 7px; min-width: 100px; }
.score b { display: block; font-size: 23px; font-weight: 900; font-style: italic; color: var(--accent); line-height: 1; font-variant-numeric: tabular-nums; }
.score .flow { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 10px; font-weight: 900; letter-spacing: .1em; color: var(--muted); }
.score .flow i { font-style: italic; color: var(--accent2); font-size: 14px; letter-spacing: 0; }
.score .fbar { height: 5px; border-radius: 3px; background: #ffffff18; margin-top: 4px; overflow: hidden; }
.score .fbar div { height: 100%; width: 0; background: linear-gradient(90deg, #1fb46d, var(--accent2)); border-radius: 3px; transition: width .2s; }
.clock { position: absolute; top: calc(10px + var(--sat)); left: 50%; transform: translateX(-50%); padding: 4px 12px 6px; text-align: center; white-space: nowrap; max-width: calc(100vw - 230px); overflow: hidden; }
.clock > b { display: block; font-size: 18px; font-weight: 900; font-variant-numeric: tabular-nums; }
.clock > span { display: block; font-size: 10px; font-weight: 900; letter-spacing: .08em; overflow: hidden; text-overflow: ellipsis; }
.clock .cline { display: flex; gap: 6px; justify-content: center; align-items: center; font-size: 10px; font-weight: 800; color: var(--muted); margin-top: 1px; font-variant-numeric: tabular-nums; }
.clock .stars { font-size: 12px; letter-spacing: .06em; color: #ffffff30; }
.clock .stars em { font-style: normal; color: var(--accent); }
.pause { position: absolute; top: calc(12px + var(--sat)); right: calc(12px + var(--sar)); width: 38px; height: 38px; border-radius: 10px; border: 1px solid #ffffff2a;
  background: rgba(8, 14, 11, .8); font-weight: 900; display: grid; place-items: center; font-size: 13px; }
.meter, .tug, .mon { position: absolute; top: calc(76px + var(--sat)); left: 50%; transform: translateX(-50%); width: min(calc(100vw - 20px), 360px); padding: 5px 9px 7px; }
.meter .t, .tug .t, .mon .t { display: flex; justify-content: space-between; font-size: 9.5px; font-weight: 900; letter-spacing: .13em; color: var(--muted); }
.meter .t b { color: var(--accent2); }
.meter .bar { position: relative; height: 9px; border-radius: 5px; background: #ffffff14; margin-top: 4px; overflow: hidden; }
.meter .bar div { height: 100%; width: 100%; border-radius: 5px; background: linear-gradient(90deg, #ff5a5f, #ffd23f 45%, #3ee08f); background-size: 340px 100%; transition: width .25s; }
.meter .bar i { position: absolute; top: 0; bottom: 0; width: 2px; background: #ffffffaa; }
.meter.hot { border-color: #ff5a5f; box-shadow: 0 0 18px #ff5a5f55; }
.meter.snow .bar div { background: linear-gradient(90deg, #ff9a1f, #ffd23f); background-size: 100% 100%; }
.meter.fire .bar div { background: linear-gradient(90deg, #8fd4ff, #3a8fd8); background-size: 100% 100%; }
.tug .t .a { color: #7fa6ff; } .tug .t .b { color: #ff8a8d; } .tug .t span:nth-child(2) { color: #fff; }
.tug .tbar { position: relative; height: 10px; border-radius: 5px; background: linear-gradient(90deg, #3f7bff, #3f7bff55 50%, #ff5a5f55 50%, #ff5a5f); margin-top: 4px; }
.tug .tbar i { position: absolute; top: -4px; width: 6px; height: 18px; margin-left: -3px; border-radius: 3px; background: #fff; box-shadow: 0 0 8px #fff; transition: left .15s; }
.mon { display: flex; gap: 10px; align-items: center; }
.mon .hrt { font-size: 22px; color: var(--danger); animation: beat .8s infinite; }
@keyframes beat { 50% { transform: scale(1.18); } }
.mon .c { flex: 1; min-width: 0; }
.mon .t b { color: var(--accent2); }
.mon svg { display: block; width: 100%; height: 20px; }
.mon .bar { height: 6px; border-radius: 3px; background: #ffffff14; overflow: hidden; }
.mon .bar div { height: 100%; background: linear-gradient(90deg, #ff5a5f, #ffd23f 40%, #3ee08f); background-size: 300px 100%; transition: width .2s; }
.mon .eta { text-align: center; font-weight: 900; font-style: italic; font-size: 18px; line-height: 1; font-variant-numeric: tabular-nums; }
.mon .eta small { display: block; font-size: 9px; color: var(--muted); letter-spacing: .12em; font-style: normal; }
.mon.late .eta { color: var(--danger); }

/* dispatch strip */
.disp { position: absolute; top: calc(120px + var(--sat)); left: calc(10px + var(--sal)); right: calc(10px + var(--sar)); display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; pointer-events: auto; touch-action: pan-x; }
.disp::-webkit-scrollbar { display: none; }
.call { flex: 0 0 auto; display: flex; align-items: center; gap: 7px; background: rgba(8, 14, 11, .92); border: 1px solid #ffffff22; border-radius: 12px; padding: 5px 9px 5px 5px; font-size: 11px; white-space: nowrap; cursor: pointer; text-align: left; animation: fin .25s ease-out; }
.call .ic { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 14px; position: relative; background: #ffffff10; }
.call .ic svg { position: absolute; inset: -3px; width: 36px; height: 36px; transform: rotate(-90deg); }
.call b { display: block; font-size: 11.5px; } .call span { color: var(--muted); font-size: 10px; font-weight: 700; }
.call.act { border-color: var(--accent); background: #2a2a10ee; } .call.hot { border-color: #ff5a5f99; } .call.hot span { color: #ff8a8d; }
.call kbd { font: 900 9px system-ui; background: #ffffff1a; border-radius: 4px; padding: 0 4px; margin-left: 4px; color: var(--muted); display: none; }
body.desk .call kbd { display: inline; }
.units { position: absolute; top: calc(120px + var(--sat)); left: calc(10px + var(--sal)); right: calc(10px + var(--sar)); display: flex; gap: 5px; pointer-events: auto; }
.unit { flex: 1; display: flex; align-items: center; gap: 6px; background: rgba(8, 14, 11, .92); border: 2px solid #ffffff18; border-radius: 11px; padding: 4px 6px; font-size: 10.5px; min-width: 0; cursor: pointer; text-align: left; }
.unit .ic { font-size: 16px; position: relative; }
.unit .ic kbd { position: absolute; top: -7px; left: -7px; background: var(--accent); color: #1a1400; font: 900 9px system-ui; border-radius: 4px; padding: 0 3px; display: none; }
body.desk .unit .ic kbd { display: block; }
.unit b { display: block; font-size: 11px; white-space: nowrap; } .unit span { display: block; color: var(--muted); font-size: 9.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.unit > div { min-width: 0; }
.unit.sel { border-color: var(--accent); background: #2a2a10ee; }
.unit.busy span { color: var(--accent2); }
.feed { position: absolute; top: calc(172px + var(--sat)); left: calc(10px + var(--sal)); display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.feed div { background: rgba(8, 14, 11, .86); border: 1px solid #ffffff1c; border-radius: 999px; padding: 3px 10px; font-size: 11px; font-weight: 800; white-space: nowrap; animation: fin .2s ease-out; }
.feed .up { color: var(--accent2); } .feed .dn { color: #ff8a8d; }
@keyframes fin { from { opacity: 0; transform: translateY(-4px); } }
.tip { position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(196px + var(--sab)); background: rgba(8, 14, 11, .94);
  border: 1px solid #ffffff22; border-left: 4px solid var(--accent); padding: 8px 12px; border-radius: 10px; font-size: 13px;
  width: max-content; max-width: min(92vw, 440px); line-height: 1.35; pointer-events: none; animation: fin .25s ease-out; }
.tip b { color: var(--accent); }
.banner { position: absolute; top: 32%; left: 50%; transform: translate(-50%, -50%); text-align: center; pointer-events: none; }
.banner .big { font-size: 38px; color: var(--accent); text-shadow: 0 4px 20px #000a; white-space: nowrap; }
.banner .small { font-size: 14px; font-weight: 800; color: var(--text); text-shadow: 0 2px 8px #000; margin-top: 4px; }
.banner.bad .big { color: #fff; background: var(--danger); padding: 4px 18px; border-radius: 12px; box-shadow: 0 10px 30px #ff5a5f55; }
.banner.pop { animation: pop .35s ease-out; }
@keyframes pop { from { transform: translate(-50%, -50%) scale(.6); opacity: 0; } }

/* the floating stick (Circuit Golems) */
#stickzone { position: absolute; left: 0; bottom: 0; width: 56%; height: 46%; pointer-events: auto; touch-action: none; }
#stick { position: absolute; left: calc(26px + var(--sal)); bottom: calc(36px + var(--sab)); width: 124px; height: 124px; border-radius: 50%; border: 2px solid #ffffff38; background: radial-gradient(circle, #ffffff10, #ffffff04 70%); }
#stick i { position: absolute; left: 50%; top: 50%; width: 52px; height: 52px; margin: -26px 0 0 -26px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ffffffcc, #9fb0a6); box-shadow: 0 4px 12px #0008; }
#stick small { position: absolute; bottom: -17px; left: 0; right: 0; text-align: center; font-size: 9px; font-weight: 900; letter-spacing: .14em; color: var(--muted); }
#stick.idle { opacity: .55; }
#stick.aim { border-color: #8fd4ff88; } #stick.aim i { background: radial-gradient(circle at 35% 30%, #d8f0ff, #3a8fd8); }

/* arrows mode: steering on the left thumb, pedals under the right */
#pedals { position: absolute; inset: 0; pointer-events: none; }
.ped { position: absolute; pointer-events: auto; touch-action: none; border: 2px solid #ffffff44; box-shadow: 0 6px 16px #0008; font-weight: 900; font-style: italic; color: #fff;
  display: flex; align-items: center; justify-content: center; transition: transform .06s, filter .06s; }
.ped.down { transform: scale(.93); filter: brightness(1.25); }
.ped.arrow { bottom: calc(26px + var(--sab)); width: 76px; height: 76px; border-radius: 20px; background: rgba(8, 14, 11, .82); font-size: 30px; font-style: normal; }
#pd-left { left: calc(14px + var(--sal)); } #pd-right { left: calc(98px + var(--sal)); }
.ped.gas { right: calc(14px + var(--sar)); bottom: calc(22px + var(--sab)); width: 72px; height: 112px; border-radius: 18px;
  background: repeating-linear-gradient(0deg, #ffffff18 0 4px, transparent 4px 14px), linear-gradient(180deg, #4ce39a, #1a9e55); color: #002313; font-size: 15px; }
.ped.brake { right: calc(96px + var(--sar)); bottom: calc(22px + var(--sab)); width: 70px; height: 70px; border-radius: 16px;
  background: repeating-linear-gradient(0deg, #ffffff18 0 4px, transparent 4px 12px), linear-gradient(180deg, #ff7a7d, #c0262d); font-size: 12px; }
body.arrows #stickzone { display: none; }
body.arrows .btns { bottom: calc(150px + var(--sab)); transform: scale(.74); transform-origin: right bottom; }
body.arrows .drivepill { bottom: calc(120px + var(--sab)); }
body.arrows .tip { bottom: calc(260px + var(--sab)); }
body.land.arrows .btns { bottom: calc(6px + var(--sab)); right: calc(186px + var(--sar)); transform: scale(.7); }
body.land.arrows .ped.arrow { bottom: calc(14px + var(--sab)); width: 70px; height: 70px; }
body.land.arrows #pd-right { left: calc(92px + var(--sal)); }
body.land.arrows .ped.gas { bottom: calc(12px + var(--sab)); height: 100px; }
body.land.arrows .ped.brake { bottom: calc(12px + var(--sab)); }
body.land.arrows .drivepill { bottom: calc(96px + var(--sab)); }
body.land.arrows .tip { bottom: calc(96px + var(--sab)); }
body.desk #pedals { display: none; }

/* round action buttons */
.btns { position: absolute; right: calc(14px + var(--sar)); bottom: calc(24px + var(--sab)); width: 200px; height: 178px; pointer-events: none; }
.tb { position: absolute; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; font-weight: 900; text-align: center; font-style: italic;
  border: 2px solid #ffffff55; box-shadow: 0 6px 16px #0008; line-height: 1.05; letter-spacing: .03em; pointer-events: auto; transition: filter .15s, transform .08s; white-space: pre-line; }
.tb:active, .tb.down { transform: scale(.94); }
.tb .n { position: absolute; top: -4px; right: -4px; min-width: 22px; height: 22px; border-radius: 11px; background: #0b1410; color: #fff; border: 2px solid #ffffff88; font-size: 11px; display: grid; place-items: center; padding: 0 4px; }
.tb .n:empty { display: none; }
.tb .k { display: none; position: absolute; bottom: -8px; left: 50%; transform: translateX(-50%); background: #0b1410; color: var(--text); border: 1px solid #ffffff44; border-radius: 5px; font-size: 10px; padding: 1px 5px; font-style: normal; }
body.desk .tb .k { display: block; }
.tb .cd { position: absolute; inset: -2px; border-radius: 50%; pointer-events: none; }
.tb .l { position: relative; }
.tb.big { right: 0; bottom: 0; width: 96px; height: 96px; font-size: 14px; }
.tb.mid { right: 106px; bottom: 4px; width: 66px; height: 66px; font-size: 10.5px; }
.tb.top { right: 18px; bottom: 108px; width: 64px; height: 64px; font-size: 10.5px; }
.tb.siren { background: conic-gradient(from 0deg, #ff3b3b 0 25%, #3f7bff 0 50%, #ff3b3b 0 75%, #3f7bff 0); color: #fff; text-shadow: 0 1px 3px #000; }
.tb.siren.on { box-shadow: 0 0 0 6px #3f7bff44, 0 0 0 12px #ff3b3b22, 0 6px 16px #0008; animation: spin 1.2s linear infinite; }
.tb.siren.on .l { animation: spin 1.2s linear infinite reverse; }
@keyframes spin { to { transform: rotate(360deg); } }
.tb.siren:not(.on) { filter: saturate(.55) brightness(.75); }
.tb.amberb { background: radial-gradient(circle at 35% 30%, #ffd08a, #f08a00); color: #2a1600; }
.tb.amberb.on { box-shadow: 0 0 0 6px #ffb13b55, 0 0 0 12px #ffb13b22, 0 6px 16px #0008; animation: live .5s ease-in-out infinite alternate; }
.tb.blue { background: radial-gradient(circle at 35% 30%, #a9c8ff, #3a64d8); color: #fff; }
.tb.green { background: radial-gradient(circle at 35% 30%, #8ff7c1, #1fb46d); color: #002313; }
.tb.green.on { box-shadow: 0 0 0 6px #3ee08f44, 0 0 0 12px #3ee08f1c, 0 6px 16px #0008; }
.tb.red { background: radial-gradient(circle at 35% 30%, #ff9d8a, #d8322c); color: #fff; }
.tb.white { background: radial-gradient(circle at 35% 30%, #ffffff, #c9ced3); color: #7a1015; }
.tb.white.on { box-shadow: 0 0 0 6px #ffffff33, 0 6px 16px #0008; }
.tb.ready { box-shadow: 0 0 0 6px #ffffff2a, 0 0 0 12px #ffffff10, 0 6px 16px #0008; animation: live .5s ease-in-out infinite alternate; }
.tb.off { filter: saturate(.2) brightness(.5); }
@keyframes live { to { transform: scale(1.07); } }
.drivepill { position: absolute; left: calc(14px + var(--sal)); bottom: calc(180px + var(--sab)); background: rgba(8, 14, 11, .9); border: 1px solid #ffffff33; border-radius: 999px; padding: 8px 14px; font-weight: 900; font-size: 12px; font-style: italic; text-transform: uppercase; }
.inc { position: absolute; top: calc(172px + var(--sat)); right: calc(10px + var(--sar)); width: 178px; padding: 8px 10px; }
.inc .lbl { font-size: 9.5px; font-weight: 900; color: var(--muted); letter-spacing: .14em; margin-bottom: 5px; display: flex; justify-content: space-between; }
.inc .lbl b { color: var(--accent); }
.chk { display: flex; gap: 6px; align-items: center; font-size: 10.5px; padding: 2px 0; font-weight: 700; }
.chk i { width: 14px; height: 14px; border-radius: 4px; display: grid; place-items: center; font-style: normal; font-size: 9px; font-weight: 900; flex: 0 0 14px; border: 2px solid #ffffff33; }
.chk.done { color: var(--muted); text-decoration: line-through; } .chk.done i { background: var(--accent2); border-color: var(--accent2); color: #002313; }
.chk.now i { border-color: var(--accent); } .chk em { margin-left: auto; font-style: normal; color: var(--accent); font-weight: 900; }
.chk.wait { opacity: .5; }

/* phone landscape */
body.land .meter, body.land .tug, body.land .mon { top: calc(10px + var(--sat)); left: auto; right: calc(60px + var(--sar)); transform: none; width: 220px; }
body.land .clock { max-width: calc(100vw - 480px); }
body.land .disp, body.land .units { top: auto; bottom: calc(8px + var(--sab)); left: 50%; right: auto; transform: translateX(-50%); max-width: calc(100vw - 420px); }
body.land .feed { top: calc(70px + var(--sat)); }
body.land .btns { transform: scale(.78); transform-origin: right bottom; right: calc(8px + var(--sar)); bottom: calc(4px + var(--sab)); }
body.land #stickzone { width: 40%; height: 70%; }
body.land #stick { bottom: calc(18px + var(--sab)); width: 110px; height: 110px; }
body.land .tip { bottom: calc(64px + var(--sab)); }
body.land .inc { top: calc(64px + var(--sat)); }
body.land .drivepill { bottom: calc(140px + var(--sab)); }
/* desktop */
body.desk #stickzone, body.desk .drivepill { display: none; }
body.desk .score { top: 14px; left: 14px; } body.desk .clock { top: 14px; max-width: 520px; }
body.desk .meter, body.desk .tug, body.desk .mon { top: 14px; left: auto; right: 62px; transform: none; width: 280px; }
body.desk .disp, body.desk .units { top: auto; bottom: 46px; left: 50%; right: auto; transform: translateX(-50%); max-width: calc(100vw - 520px); justify-content: center; }
body.desk .units { width: 620px; }
body.desk .feed { top: 96px; left: 14px; }
body.desk .btns { transform: scale(.82); transform-origin: right bottom; right: 18px; bottom: 52px; }
body.desk .tip { bottom: 110px; }
body.desk .inc { top: 66px; right: 14px; width: 250px; padding: 10px 12px; }
body.desk .chk { font-size: 12px; padding: 4px 0; }
.keys { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); display: flex; gap: 6px; white-space: nowrap; }
.keys div { background: rgba(8, 14, 11, .86); border: 1px solid #ffffff22; border-radius: 8px; padding: 4px 9px; font-size: 11px; font-weight: 700; color: var(--muted); }
.keys b { color: var(--text); background: #ffffff14; border-radius: 4px; padding: 0 5px; margin-right: 4px; }

/* ------------------------------------------------------------ menus */
.screen { position: fixed; inset: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; touch-action: pan-y;
  background: radial-gradient(120% 60% at 50% 0%, #1d2f5a 0%, var(--bg) 62%); }
.screen .wrap { padding: calc(14px + var(--sat)) calc(16px + var(--sar)) calc(24px + var(--sab)) calc(16px + var(--sal)); max-width: 540px; margin: 0 auto; }
.logo { text-align: center; margin: 2px 0 10px; }
.logo .t1, .logo .t2 { font-size: 36px; line-height: .9; }
.logo .t2 { color: var(--accent); }
.logo .bar { display: inline-flex; margin: 0 0 8px; border-radius: 7px; overflow: hidden; border: 2px solid #ffffff33; }
.logo .bar i { width: 30px; height: 10px; animation: flash 1s steps(2) infinite; }
.logo .bar i:nth-child(1) { background: #ff3b3b; box-shadow: 0 0 14px #ff3b3b; }
.logo .bar i:nth-child(2) { background: #fff; width: 10px; animation: none; }
.logo .bar i:nth-child(3) { background: #3f7bff; box-shadow: 0 0 14px #3f7bff; animation-delay: -.5s; }
@keyframes flash { 50% { filter: brightness(.35); } }
.logo .sub { color: var(--muted); font-size: 11px; letter-spacing: .3em; margin-top: 6px; font-weight: 700; }
.card { display: block; width: 100%; text-align: left; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; margin-bottom: 8px; }
.lbl { font-size: 11px; font-weight: 900; color: var(--muted); letter-spacing: .14em; margin-bottom: 8px; text-transform: uppercase; display: flex; justify-content: space-between; }
.lbl b { color: var(--accent); letter-spacing: .06em; }
.depts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.dp { background: var(--panel2); border: 2px solid transparent; border-radius: 12px; padding: 6px; text-align: left; }
.dp canvas { display: block; width: 100%; height: 50px; border-radius: 8px; background: radial-gradient(circle, #2a3a33, #141c18); }
.dp .nm { font-size: 13px; font-weight: 900; font-style: italic; text-transform: uppercase; margin-top: 5px; }
.dp .rk { font-size: 10px; color: var(--muted); font-weight: 800; display: flex; justify-content: space-between; margin-top: 1px; }
.dp .rk b { color: var(--accent); }
.dp .xp { height: 4px; border-radius: 2px; background: #ffffff14; margin-top: 4px; overflow: hidden; } .dp .xp div { height: 100%; }
.dp.sel { border-color: var(--accent); background: #2a2a10; }
.dist { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 2px; scrollbar-width: none; touch-action: pan-x; }
.dist::-webkit-scrollbar { display: none; }
.dc { flex: 0 0 108px; scroll-snap-align: start; background: var(--panel2); border: 2px solid transparent; border-radius: 12px; padding: 5px; text-align: left; }
.dc canvas { display: block; width: 94px; height: 56px; border-radius: 8px; }
.dc .nm { font-size: 11px; font-weight: 900; margin-top: 5px; line-height: 1.15; }
.dc .st { font-size: 10px; color: var(--accent); font-weight: 900; margin-top: 2px; }
.dc.sel { border-color: var(--accent); background: #2a2a10; }
.dc.lock { opacity: .5; } .dc.lock .st { color: var(--muted); }
.shifts { display: grid; gap: 6px; }
.sh { display: flex; align-items: center; gap: 10px; background: var(--panel2); border: 2px solid transparent; border-radius: 11px; padding: 6px 10px 6px 8px; text-align: left; width: 100%; }
.sh .ico { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; font-size: 17px; background: #ffffff10; flex: 0 0 34px; }
.sh .nm { font-weight: 900; font-size: 13.5px; }
.sh .ds { font-size: 10.5px; color: var(--muted); font-weight: 700; margin-top: 1px; }
.sh .st { margin-left: auto; font-size: 15px; letter-spacing: .06em; color: #ffffff28; white-space: nowrap; text-align: right; }
.sh .st em { font-style: normal; color: var(--accent); }
.sh .st small { display: block; font-size: 9.5px; color: var(--muted); letter-spacing: 0; font-weight: 800; }
.sh.sel { border-color: var(--accent); background: #2a2a10; }
.sh.lock { opacity: .45; }
.seg { display: flex; gap: 6px; }
.seg button { flex: 1; text-align: center; background: var(--panel2); border: 1px solid var(--line); padding: 10px 2px; border-radius: 10px; font-size: 12px; }
.seg button.sel { background: var(--accent); color: #1a1400; border-color: var(--accent); }
.hint { font-size: 11.5px; color: var(--muted); margin-top: 8px; line-height: 1.4; }
.hint b { color: var(--accent); }
.settings { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; font-size: 12px; }
.set { background: var(--panel2); border-radius: 10px; padding: 8px 10px; display: flex; justify-content: space-between; gap: 6px; text-align: left; }
.set b { color: var(--accent); white-space: nowrap; }
.set.wide { width: 100%; margin-top: 8px; }
/* cloud saves line on the menu */
.cloud { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 8px; padding: 8px 10px; background: var(--panel2); border-radius: 10px; font-size: 12px; line-height: 1.35; }
.cloud .ctag { font-weight: 900; color: var(--accent2); white-space: nowrap; }
.cloud .cmsg { flex: 1; min-width: 150px; color: var(--muted); }
.cloud .cacts { display: flex; gap: 6px; }
.cloud .cacts button { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font-size: 12px; font-weight: 800; color: var(--text); }
.cloud .cacts .pri { background: var(--accent); color: #1a1400; border-color: var(--accent); }
.stn { display: flex; align-items: center; justify-content: space-between; }
.stn b { font-size: 17px; display: block; } .stn small { font-size: 11px; color: var(--muted); font-weight: 700; }
.bolts { font-weight: 900; font-style: italic; color: var(--accent); font-size: 18px; white-space: nowrap; }
.how summary { cursor: pointer; list-style: none; margin: 0; }
.how summary::after { content: '+'; color: var(--accent); } .how[open] summary::after { content: '–'; }
.how ul { padding-left: 18px; display: grid; gap: 6px; margin-top: 8px; }
.how li { font-size: 12.5px; line-height: 1.45; color: #cfdcd4; } .how b { color: var(--text); }
.go { display: block; width: 100%; padding: 14px; border-radius: 14px; background: linear-gradient(180deg, #ffe066, #f0b400);
  color: #241900; font-size: 20px; border: 0; box-shadow: 0 8px 20px #f0b40044; text-align: center; margin-top: 4px; }
.go:active { transform: translateY(1px); }
#btn-go { position: sticky; bottom: calc(10px + var(--sab)); z-index: 2; }
.foot { text-align: center; font-size: 11px; color: var(--muted); margin-top: 10px; }
.btn { display: block; width: 100%; padding: 12px; border-radius: 12px; text-align: center; font-size: 15px; margin-top: 8px; }
.btn.ghost { background: var(--panel2); border: 1px solid var(--line); }
.btn.link { color: var(--muted); font-weight: 800; font-size: 13px; }

/* station */
.head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.head .title { font-size: 28px; color: var(--accent); }
.back { font-weight: 900; color: var(--muted); font-size: 15px; padding: 6px 4px; }
.vehs { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
.veh { background: var(--panel2); border: 2px solid transparent; border-radius: 11px; padding: 5px; text-align: left; }
.veh canvas { display: block; width: 100%; height: 40px; border-radius: 7px; background: radial-gradient(circle, #2a3a33, #141c18); }
.veh .nm { font-size: 11px; font-weight: 900; margin-top: 4px; line-height: 1.15; }
.veh .ds { font-size: 9.5px; color: var(--muted); font-weight: 700; margin-top: 2px; line-height: 1.3; }
.veh.sel { border-color: var(--accent); background: #2a2a10; }
.veh.lock { opacity: .45; }
.ups { display: grid; gap: 6px; }
.up { display: flex; gap: 10px; align-items: center; background: var(--panel2); border-radius: 11px; padding: 9px 10px; }
.up .nm { font-weight: 900; font-size: 13.5px; } .up .ds { font-size: 11px; color: var(--muted); margin-top: 2px; line-height: 1.35; }
.up .pips { display: flex; gap: 3px; margin-top: 5px; } .up .pips i { width: 16px; height: 5px; border-radius: 3px; background: #ffffff1c; } .up .pips i.on { background: var(--accent2); }
.up button { margin-left: auto; flex: 0 0 auto; background: var(--accent); color: #1a1400; border-radius: 10px; padding: 8px 10px; font-weight: 900; font-size: 13px; font-style: italic; white-space: nowrap; }
.up button:disabled { background: #ffffff14; color: var(--muted); }

/* overlays */
.overlay { position: fixed; inset: 0; background: rgba(6, 11, 8, .74); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); overflow-y: auto; display: flex; justify-content: center; align-items: flex-start; touch-action: pan-y; }
.panel { width: min(92vw, 360px); margin: max(50px, 14vh) auto 20px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 18px; }
.ptitle { font-size: 30px; text-align: center; color: var(--accent); } .pmap { text-align: center; color: var(--muted); font-weight: 800; font-size: 12px; margin: 4px 0 12px; letter-spacing: .1em; }
.res { width: min(100vw, 430px); padding: calc(22px + var(--sat)) 16px calc(20px + var(--sab)); }
.res .ttl { text-align: center; font-size: 38px; color: var(--accent); line-height: 1; }
.res .ttl.bad { color: var(--danger); }
.res .sub { text-align: center; color: var(--muted); font-size: 12px; letter-spacing: .14em; margin-top: 6px; }
.bigstars { display: flex; justify-content: center; gap: 10px; margin: 14px 0 6px; }
.bigstars div { width: 62px; height: 62px; display: grid; place-items: center; font-size: 52px; line-height: 1; color: #ffffff1f; }
.bigstars div.on { color: var(--accent); text-shadow: 0 0 22px #ffd23f88; animation: pop2 .4s ease-out both; }
.bigstars div:nth-child(2) { transform: translateY(-10px) scale(1.15); }
.bigstars div:nth-child(2).on { animation-delay: .15s; } .bigstars div:nth-child(3).on { animation-delay: .3s; }
@keyframes pop2 { from { opacity: 0; scale: .3; } }
.why { text-align: center; font-size: 12px; color: var(--muted); margin-bottom: 12px; min-height: 16px; }
.why b { color: var(--text); }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.stat { background: var(--panel2); border-radius: 10px; padding: 7px 10px; }
.stat span { display: block; font-size: 10px; font-weight: 900; letter-spacing: .12em; color: var(--muted); }
.stat b { font-size: 19px; font-weight: 900; font-style: italic; font-variant-numeric: tabular-nums; }
.stat b small { font-size: 11px; color: var(--accent2); font-style: normal; margin-left: 4px; }
.stat b small.bad { color: #ff8a8d; }
.total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 8px; }
.total .lbl2 { color: var(--muted); font-size: 13px; }
.total b { font-size: 30px; font-style: italic; color: var(--accent); font-weight: 900; }
.total .best { font-size: 10px; font-weight: 900; background: var(--accent); color: #1a1400; border-radius: 6px; padding: 2px 7px; letter-spacing: .08em; vertical-align: 6px; }
.rank { background: var(--panel2); border-radius: 12px; padding: 9px 11px; margin-top: 8px; }
.rank .t { display: flex; justify-content: space-between; font-size: 11px; font-weight: 900; letter-spacing: .06em; gap: 8px; }
.rank .t span { color: var(--muted); }
.rank .xp { height: 8px; border-radius: 4px; background: #ffffff14; margin-top: 6px; overflow: hidden; position: relative; }
.rank .xp div { position: absolute; top: 0; bottom: 0; left: 0; } .rank .xp i { position: absolute; top: 0; bottom: 0; opacity: .55; }
.earn { text-align: right; font-size: 12px; font-weight: 800; color: var(--muted); margin-top: 6px; }
.earn b { color: var(--accent); font-style: italic; }
.unlock { display: flex; align-items: center; gap: 10px; background: #3ee08f18; border: 1px solid #3ee08f55; border-radius: 12px; padding: 9px 11px; margin: 8px 0 4px; }
.unlock canvas { width: 72px; height: 42px; border-radius: 7px; flex: 0 0 72px; background: radial-gradient(circle, #2a3a33, #141c18); }
.unlock span { font-size: 10px; font-weight: 900; letter-spacing: .14em; color: var(--accent2); }
.unlock b { display: block; font-size: 15px; } .unlock small { font-size: 11px; color: var(--muted); font-weight: 700; }
.acts { display: grid; grid-template-columns: 1fr 1.6fr; gap: 8px; margin-top: 12px; }
.acts .btn, .acts .go { margin: 0; font-size: 16px; padding: 13px; }

/* Studio credit and link back to the games page, the same on every Game Golem Studios title screen */
.ggs-foot { text-align: center; font-size: 11px; margin-top: 12px; }
.ggs-foot a { color: var(--muted); text-underline-offset: 2px; }
