:root {
  --bg: #0c0c0b; --bg2: #171715; --bg3: #20201d; --text: #ededdf; --dim: #8f8f82; --accent: #ccff00; --line: #2c2c25;
  --good: #5ee08a; --bad: #ff6b5e;
  --display: "Archivo", system-ui, sans-serif; --mono: "JetBrains Mono", ui-monospace, monospace;
  --glass: rgba(12,12,11,.9);
  color-scheme: dark;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; background: #e9e5dc; color: var(--text); font: 13px/1.45 var(--mono); -webkit-font-smoothing: antialiased; }
#map { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
[hidden] { display: none !important; }
a { color: var(--accent); }
button { font: inherit; color: inherit; }
.good { color: var(--good) !important; } .bad { color: var(--bad) !important; }
.dim { color: var(--dim); font-size: 12px; margin: 6px 0; }

/* ---------- cards + controls ---------- */
.card { background: var(--glass); border: 1px solid var(--line); border-radius: 14px; padding: 22px; width: min(560px, 100%); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
#setup { position: fixed; inset: 0; display: flex; align-items: flex-start; justify-content: center; padding: 16px; overflow-y: auto; background: radial-gradient(circle at 30% 20%, #1d2a12 0%, #0c0c0b 70%); z-index: 20; }
#setup .card { margin: auto; }
#setup.is-off { display: none; }
.back { color: var(--dim); text-decoration: none; font-size: 12px; }
.back:hover { color: var(--accent); }
h1 { font: 900 clamp(38px, 9vw, 58px)/1 var(--display); letter-spacing: -.02em; margin: 10px 0 8px; }
h1::first-letter { color: var(--accent); }
h2 { font: 900 26px/1.1 var(--display); margin-bottom: 8px; }
h3 { font: 700 16px/1.2 var(--display); }
h4 { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--dim); margin: 14px 0 6px; }
.sub { color: var(--dim); margin-bottom: 18px; }
.sub b { color: var(--text); }
.lab { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--dim); margin-bottom: 4px; }
.row { display: flex; gap: 8px; }
.row--end { justify-content: flex-end; margin-top: 12px; }
input[type=text], select, .nm { width: 100%; background: var(--bg2); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; font: inherit; }
input:focus-visible, select:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: var(--bg2); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 9px 14px; font: 500 12px var(--mono); cursor: pointer; white-space: nowrap; text-decoration: none; }
.btn:hover:not(:disabled) { border-color: var(--accent); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn--go { background: var(--accent); color: #0c0c0b; border-color: var(--accent); font-weight: 700; }
.btn--bad:hover:not(:disabled) { border-color: var(--bad); color: var(--bad); }
.btn.wide { width: 100%; margin-top: 12px; padding: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 14px; }
.chips button { background: none; border: 1px solid var(--line); color: var(--dim); border-radius: 99px; padding: 4px 11px; font: 12px var(--mono); cursor: pointer; }
.chips button:hover { color: var(--accent); border-color: var(--accent); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.status { margin-top: 14px; background: var(--bg2); border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px; font-size: 12px; }
.status.err { color: var(--bad); }
.fine { margin-top: 14px; font-size: 11px; color: var(--dim); }

/* ---------- HUD ---------- */
#hud { position: fixed; inset: 0; pointer-events: none; z-index: 5; }
#hud > * { pointer-events: auto; }
#top { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; gap: 10px; align-items: stretch; pointer-events: none; }
#top > * { pointer-events: auto; background: var(--glass); border: 1px solid var(--line); border-radius: 12px; padding: 7px 12px; }
.brand { display: flex; flex-direction: column; gap: 4px; justify-content: center; }
#clock { font-weight: 700; font-size: 12px; white-space: nowrap; }
.speed { display: flex; gap: 3px; }
.speed button { background: var(--bg2); border: 1px solid var(--line); border-radius: 6px; padding: 2px 7px; font-size: 11px; cursor: pointer; }
.speed button.on { background: var(--accent); color: #0c0c0b; border-color: var(--accent); font-weight: 700; }
.stats { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; min-width: 58px; }
.stat span { font-size: 9px; text-transform: uppercase; letter-spacing: .08em; color: var(--dim); }
.stat b { font: 700 17px/1.15 var(--display); white-space: nowrap; }
.stat small { font-size: 10px; }
.lvl { min-width: 74px; cursor: help; }
.xp { height: 4px; background: var(--bg3); border-radius: 4px; overflow: hidden; margin-top: 3px; }
.xp i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .4s; }

#hint { position: absolute; top: 76px; left: 50%; transform: translateX(-50%); background: var(--accent); color: #0c0c0b; font-weight: 700; padding: 7px 16px; border-radius: 99px; pointer-events: none; text-align: center; max-width: min(640px, 92vw); font-size: 12px; box-shadow: 0 4px 18px rgba(0,0,0,.25); }
#hint:empty { display: none; }
#toasts { position: absolute; left: 10px; bottom: 88px; display: flex; flex-direction: column-reverse; gap: 4px; pointer-events: none; width: min(380px, 70vw); }
.toast { background: var(--glass); border: 1px solid var(--line); padding: 6px 12px; border-radius: 8px; font-size: 12px; animation: fade 5s forwards; }
@keyframes fade { 0% { opacity: 0; transform: translateY(6px); } 6%, 82% { opacity: 1; transform: none; } 100% { opacity: 0; } }
#banner { position: absolute; top: 120px; left: 50%; transform: translateX(-50%); background: #0c0c0b; border: 2px solid var(--accent); border-radius: 14px; padding: 12px 22px; text-align: center; pointer-events: none; max-width: min(520px, 92vw); box-shadow: 0 10px 40px rgba(0,0,0,.4); }
#banner b { display: block; font: 900 22px/1.1 var(--display); color: var(--accent); margin-bottom: 3px; }
#banner span { font-size: 12px; color: var(--text); }
#banner.pop { animation: pop 3.6s forwards; }
@keyframes pop { 0% { opacity: 0; transform: translate(-50%, -10px) scale(.9); } 8%, 85% { opacity: 1; transform: translate(-50%, 0) scale(1); } 100% { opacity: 0; } }

/* side panel */
#panelWrap { position: absolute; top: 76px; right: 10px; width: 310px; max-height: calc(100vh - 170px); display: flex; flex-direction: column; background: rgba(12,12,11,.97); border: 1px solid var(--line); border-radius: 12px; }
#panelToggle { display: none; }
#panel { overflow-y: auto; padding: 12px 14px 14px; }
#panel:empty { display: none; }
.ph { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.ph h3 { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.ph .back { background: none; border: 1px solid var(--line); color: var(--dim); border-radius: 6px; padding: 2px 7px; cursor: pointer; font-size: 12px; }
.ph .nm { padding: 5px 8px; font: 700 14px var(--display); flex: 1; min-width: 0; }
.ph .mode { font-size: 11px; color: var(--dim); white-space: nowrap; }
.sw { display: inline-block; width: 14px; height: 14px; border-radius: 4px; flex: none; vertical-align: -2px; margin-right: 4px; }
.kv { display: flex; align-items: center; gap: 8px; justify-content: space-between; background: var(--bg2); border-radius: 7px; padding: 6px 9px; min-width: 0; }
.kv span { font-size: 10px; color: var(--dim); text-transform: uppercase; letter-spacing: .05em; }
.kv b { font-weight: 700; white-space: nowrap; }
.kv .cb { flex: 1; }
.cb { display: inline-block; height: 6px; width: 46px; background: var(--bg3); border-radius: 4px; overflow: hidden; }
.cb span { display: block; height: 100%; }
.tip { background: rgba(204,255,0,.08); border-left: 3px solid var(--accent); padding: 6px 9px; font-size: 12px; margin: 8px 0; border-radius: 0 6px 6px 0; }
.fare { display: block; margin-top: 10px; background: var(--bg2); border-radius: 8px; padding: 8px 10px; }
.fare span { display: flex; justify-content: space-between; font-size: 10px; text-transform: uppercase; color: var(--dim); letter-spacing: .05em; }
.fare b { color: var(--accent); font-size: 13px; }
.fare input { width: 100%; accent-color: var(--accent); margin: 6px 0 2px; }
.fare small { color: var(--dim); font-size: 10px; }
.lines { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.lrow { display: grid; grid-template-columns: 12px 1fr auto auto; gap: 8px; align-items: center; background: var(--bg2); border: 1px solid transparent; border-radius: 7px; padding: 6px 8px; cursor: pointer; text-align: left; }
.lrow:hover { border-color: var(--accent); }
.lrow i { width: 12px; height: 12px; border-radius: 3px; }
.lrow em { font-style: normal; color: var(--dim); font-size: 11px; }
.upg { display: flex; flex-direction: column; gap: 4px; }
.u { display: grid; grid-template-columns: 1fr auto; gap: 0 8px; background: var(--bg2); border: 1px solid var(--line); border-radius: 7px; padding: 6px 9px; text-align: left; cursor: pointer; }
.u:hover:not(:disabled) { border-color: var(--accent); }
.u:disabled { opacity: .55; cursor: default; }
.u span { grid-column: 1; font-size: 11px; color: var(--dim); }
.u em { grid-row: 1 / span 2; grid-column: 2; align-self: center; font-style: normal; color: var(--accent); font-weight: 700; }
.u.done { color: var(--dim); font-size: 11px; cursor: default; }
.veh { display: flex; align-items: center; gap: 8px; margin: 10px 0; flex-wrap: wrap; }
.veh span { font-size: 10px; text-transform: uppercase; color: var(--dim); letter-spacing: .05em; }
.veh .btn { padding: 4px 12px; font-size: 16px; }
.veh b { font: 900 20px var(--display); min-width: 26px; text-align: center; }
.veh small { width: 100%; color: var(--dim); font-size: 11px; }
.swatches { display: flex; flex-wrap: wrap; gap: 5px; margin: 8px 0; }
.swatches button { width: 20px; height: 20px; border-radius: 5px; border: 2px solid transparent; cursor: pointer; }
.swatches button.on { border-color: #fff; }
.btns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.btns.col { flex-direction: column; margin: 14px 0; }
.btns .btn { padding: 7px 10px; font-size: 11px; }
.stops { padding-left: 22px; color: var(--dim); font-size: 12px; }
.stops button, .link { background: none; border: none; color: var(--text); cursor: pointer; text-align: left; padding: 1px 0; text-decoration: underline dotted var(--dim); }
.stops button:hover, .link:hover { color: var(--accent); }
.pois { list-style: none; display: flex; flex-direction: column; gap: 3px; margin-top: 8px; font-size: 12px; }
.pois small { color: var(--dim); }

/* toolbar */
#tools { position: absolute; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; gap: 4px; background: var(--glass); border: 1px solid var(--line); border-radius: 14px; padding: 6px; max-width: calc(100vw - 16px); overflow-x: auto; }
#tools button { position: relative; display: flex; flex-direction: column; align-items: center; gap: 1px; min-width: 58px; background: none; border: 1px solid transparent; border-radius: 9px; padding: 5px 6px 4px; font-size: 19px; line-height: 1.1; cursor: pointer; }
#tools button span { font-size: 10px; color: var(--dim); white-space: nowrap; }
#tools button:hover { background: var(--bg2); }
#tools button.on { background: var(--accent); }
#tools button.on span { color: #0c0c0b; font-weight: 700; }
#tools button.locked { opacity: .38; }
#tools button.glow { animation: glow 1.4s infinite; }
@keyframes glow { 50% { box-shadow: 0 0 0 2px var(--accent) inset; } }
#tools em { position: absolute; top: 2px; right: 6px; background: #ff9f1a; color: #0c0c0b; font: 700 10px var(--mono); border-radius: 99px; padding: 0 5px; }
#tools em:empty { display: none; }
#buildbar { position: absolute; left: 50%; bottom: calc(86px + env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; align-items: center; gap: 14px; background: #0c0c0b; border: 2px solid var(--accent); border-radius: 12px; padding: 8px 10px 8px 14px; max-width: calc(100vw - 16px); flex-wrap: wrap; justify-content: center; }
.bb-t { display: flex; flex-direction: column; font-size: 12px; }
.bb-t span { color: var(--dim); font-size: 11px; }
.bb-t span b { color: var(--accent); }
.bb-b { display: flex; gap: 6px; }

/* pick phase: only panel + hint */
body.picking #top, body.picking #tools { display: none; }
body.picking #hint { top: 14px; }
body.picking #panelWrap { top: 14px; }

/* modal */
#modal { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.5); padding: 16px; z-index: 30; }
.mcard { position: relative; max-height: calc(100vh - 32px); overflow-y: auto; width: min(600px, 100%); }
.x { position: absolute; top: 10px; right: 12px; background: none; border: none; color: var(--dim); font-size: 26px; cursor: pointer; line-height: 1; }
.x:hover { color: var(--text); }
.mcard select { margin-bottom: 4px; }
.goals { list-style: none; display: flex; flex-direction: column; gap: 5px; margin-top: 8px; }
.goals li { display: flex; gap: 10px; align-items: center; background: var(--bg2); border-radius: 8px; padding: 8px 11px; }
.goals li > div { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.goals li span { color: var(--dim); font-size: 11px; }
.goals li em { font-style: normal; color: var(--accent); font-size: 12px; white-space: nowrap; }
.goals li.ok { opacity: .55; }
.goals li.ok b { color: var(--good); }
.pb { display: block; height: 4px; background: var(--bg3); border-radius: 4px; margin-top: 5px; overflow: hidden; }
.pb i { display: block; height: 100%; background: var(--accent); }
.help { padding-left: 18px; display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.chart { display: flex; align-items: flex-end; gap: 4px; height: 130px; background: var(--bg2); border-radius: 8px; padding: 8px 8px 18px; }
.bar { flex: 1; height: 100%; position: relative; display: flex; align-items: flex-end; gap: 1px; }
.bar i { flex: 1; background: var(--accent); border-radius: 2px 2px 0 0; min-height: 1px; }
.bar s { flex: .6; border-radius: 2px 2px 0 0; min-height: 1px; }
.bar s.g, .lg.g { background: var(--good); } .bar s.b, .lg.b { background: var(--bad); }
.lg { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin: 0 3px 0 8px; } .lg.r { background: var(--accent); }
.bar small { position: absolute; bottom: -16px; left: 0; right: 0; text-align: center; font-size: 9px; color: var(--dim); }
.tbl { width: 100%; border-collapse: collapse; font-size: 12px; }
.tbl th { text-align: left; font-size: 10px; color: var(--dim); font-weight: 500; text-transform: uppercase; padding: 4px; }
.tbl td { padding: 5px 4px; border-top: 1px solid var(--line); white-space: nowrap; }

.attrib { position: fixed; right: 6px; bottom: 4px; font-size: 10px; background: rgba(255,255,255,.75); color: #333; padding: 1px 6px; border-radius: 4px; z-index: 6; }
.attrib a { color: #1a4a8a; }

@media (max-width: 760px) {
  #top { flex-direction: column; gap: 6px; }
  #top > * { padding: 6px 10px; }
  .brand { flex-direction: row; align-items: center; justify-content: space-between; }
  .stats { gap: 12px; justify-content: space-between; }
  .stat { min-width: 0; }
  .stat b { font-size: 14px; }
  .hide-s { display: none; }
  #hint { top: auto; bottom: 150px; font-size: 11px; }
  #panelWrap { top: auto; bottom: calc(80px + env(safe-area-inset-bottom)); left: 8px; right: 8px; width: auto; max-height: 42vh; }
  #panelToggle { display: block; background: var(--bg2); border: none; border-bottom: 1px solid var(--line); border-radius: 12px 12px 0 0; padding: 3px; cursor: pointer; color: var(--dim); }
  body.panel-min #panel { display: none; }
  body.panel-min #panelToggle { transform: rotate(180deg); border-radius: 12px; border: none; }
  #toasts { bottom: auto; top: 130px; }
  #banner { top: 140px; }
  #tools button { min-width: 50px; font-size: 17px; }
  #buildbar { bottom: auto; top: 128px; }
  body.picking #panelWrap { top: auto; bottom: 12px; max-height: 38vh; }
  body.picking #hint { top: 12px; bottom: auto; }
}

/* ---------- world map layer + loading ---------- */
#basemap { position: fixed; inset: 0; background: #d3e6c4; pointer-events: none; }
#basemap .maplibregl-canvas { outline: none; }
#map { z-index: 1; }
#setup { z-index: 20; }
#hud { z-index: 5; }
#netStatus { position: absolute; top: 76px; left: 10px; background: var(--glass); border: 1px solid var(--line); border-radius: 99px; padding: 4px 12px; font-size: 11px; color: var(--dim); pointer-events: none; }
#netStatus::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-right: 7px; animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .2; } }
#loading { position: fixed; inset: 0; z-index: 25; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; background: rgba(12,12,11,.6); color: var(--text); font-size: 13px; text-align: center; padding: 16px; }
.spin { width: 38px; height: 38px; border: 4px solid rgba(204,255,0,.25); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.camp { background: var(--bg2); border-radius: 10px; padding: 10px 12px; margin: 10px 0; display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; }
.camp span:first-child { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--dim); }
.camp b { font: 900 18px var(--display); color: var(--accent); }
.camp .pb { grid-column: 1 / -1; margin: 0; }
.camp small { grid-column: 1 / -1; color: var(--dim); font-size: 11px; }
.goals li .btn { padding: 5px 8px; font-size: 11px; }
html, body { background: #d3e6c4; }
@media (max-width: 760px) { #netStatus { top: 120px; } #hint, #banner { width: 92vw; } }
.stops li { margin: 1px 0; }
.stops .rm { margin-left: 6px; background: none; border: 1px solid var(--line); color: var(--dim); border-radius: 5px; padding: 0 6px; font-size: 12px; line-height: 1.4; cursor: pointer; text-decoration: none; }
.stops .rm:hover { color: var(--bad); border-color: var(--bad); }

/* ---------- world events ---------- */
.evcard { position: absolute; left: 10px; top: 108px; width: min(330px, calc(100vw - 20px)); background: #0c0c0b; border: 2px solid var(--line); border-radius: 12px; padding: 12px 14px; box-shadow: 0 10px 30px rgba(0,0,0,.35); animation: evin .35s ease-out; }
@keyframes evin { from { opacity: 0; transform: translateX(-12px); } }
.evcard.ev--good { border-color: #3ccf6e; } .evcard.ev--bad { border-color: #f5a524; } .evcard.ev--ugly { border-color: #ff5a4e; }
.evh { display: flex; gap: 10px; align-items: center; margin-bottom: 6px; position: relative; }
.evh .x { position: static; margin-left: auto; font-size: 22px; }
.evi { font-size: 28px; line-height: 1; }
.evh small { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--dim); }
.ev--good .evh small { color: #3ccf6e; } .ev--bad .evh small { color: #f5a524; } .ev--ugly .evh small { color: #ff5a4e; }
.evh b { font: 700 16px/1.2 var(--display); }
.evcard p { font-size: 12px; margin: 4px 0; }
.evlist { display: flex; flex-direction: column; gap: 4px; }
.ev { display: grid; grid-template-columns: 22px 1fr auto; gap: 4px 8px; align-items: center; background: var(--bg2); border-left: 3px solid var(--line); border-radius: 7px; padding: 6px 8px; }
.ev.ev--good { border-left-color: #3ccf6e; } .ev.ev--bad { border-left-color: #f5a524; } .ev.ev--ugly { border-left-color: #ff5a4e; }
.ev > span { font-size: 17px; }
.ev small { display: block; color: var(--dim); font-size: 10.5px; line-height: 1.35; }
.ev em { font-style: normal; color: var(--dim); font-size: 11px; }
.ev .btn { grid-column: 2 / -1; padding: 5px 8px; font-size: 11px; }
@media (max-width: 760px) { .evcard { top: 128px; } }

/* ---------- mode / depot picker ---------- */
.modes { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.mpick { display: flex; flex-direction: column; align-items: center; gap: 1px; min-width: 92px; background: var(--bg2); border: 1px solid var(--line); border-radius: 9px; padding: 6px 8px; cursor: pointer; }
.mpick span { font-size: 20px; line-height: 1.1; }
.mpick b { font-size: 12px; }
.mpick small { font-size: 10px; color: var(--dim); }
.mpick:hover:not(:disabled), .mpick.on { border-color: var(--accent); }
.mpick:disabled { opacity: .45; cursor: not-allowed; }
#buildbar:has(.modes) { flex-direction: column; align-items: stretch; }

/* ---------- tech tree ---------- */
.mcard.wide { width: min(1080px, 100%); }
.techtabs { display: flex; flex-wrap: wrap; gap: 4px; margin: 10px 0 12px; }
.techtabs button { background: var(--bg2); border: 1px solid var(--line); border-radius: 99px; padding: 5px 11px; font-size: 12px; cursor: pointer; }
.techtabs button.on { background: var(--accent); color: #0c0c0b; border-color: var(--accent); font-weight: 700; }
.techtabs small { opacity: .7; }
.techrow { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px; margin-bottom: 8px; }
.techgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.techgrid > div { display: flex; flex-direction: column; gap: 6px; }
.techgrid h4 { margin: 4px 0 0; }
.techgrid--list { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.tech { background: var(--bg2); border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; display: flex; flex-direction: column; gap: 4px; position: relative; }
.tech .tt { display: flex; justify-content: space-between; gap: 6px; align-items: baseline; }
.tech .tt b { font-size: 12.5px; }
.tech .tt small { font-size: 9.5px; color: var(--dim); text-transform: uppercase; letter-spacing: .05em; white-space: nowrap; }
.tech p { font-size: 11px; color: var(--dim); margin: 0; }
.tech em { font-style: normal; font-size: 11px; }
.tech .btn { padding: 5px 8px; font-size: 11px; white-space: normal; }
.tech--owned { border-color: #2f6b3f; background: #12201a; }
.tech--open { border-color: #5a7300; }
.tech--busy { border-color: #f5a524; }
.tech--locked { opacity: .55; }
@media (max-width: 760px) { .techgrid { grid-template-columns: 1fr 1fr; } .mpick { min-width: 74px; } #sRP { font-size: 13px; } }

/* ---------- stats, advisor, service, bank ---------- */
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 8px 0; }
.hgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.hchart { background: var(--bg2); border-radius: 9px; padding: 8px 10px; }
.hc-h { display: flex; justify-content: space-between; font-size: 11px; color: var(--dim); text-transform: uppercase; letter-spacing: .05em; }
.hc-h b { color: var(--text); font-size: 13px; text-transform: none; letter-spacing: 0; }
.hchart svg { width: 100%; height: 80px; display: block; margin: 6px 0 2px; }
.hc-f { display: flex; justify-content: space-between; } .hc-f small { color: var(--dim); font-size: 9.5px; }
.chart.hours .bar { position: relative; }
.chart.hours .bar s.y { position: absolute; left: 0; right: 0; height: 2px; background: #7fd6ff; border-radius: 0; min-height: 0; flex: none; }
.chart.hours .bar.now i { background: #fff; }
.tbl .link { text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.tbl th .link { color: var(--dim); font-size: 10px; text-transform: uppercase; }
.tbl th .link.on { color: var(--accent); }
.adv { display: flex; flex-direction: column; gap: 4px; }
.advt { display: grid; grid-template-columns: 20px 1fr; gap: 6px; text-align: left; background: rgba(245,165,36,.08); border: 1px solid rgba(245,165,36,.35); border-radius: 7px; padding: 6px 8px; font-size: 11.5px; cursor: pointer; }
.advt:hover { border-color: var(--accent); }
.svc { display: flex; align-items: center; gap: 4px; margin-top: 8px; flex-wrap: wrap; }
.svc span { font-size: 10px; text-transform: uppercase; color: var(--dim); letter-spacing: .05em; margin-right: 4px; }
.svc button { background: var(--bg2); border: 1px solid var(--line); border-radius: 6px; padding: 4px 8px; font-size: 11px; cursor: pointer; }
.svc button.on { background: var(--accent); color: #0c0c0b; border-color: var(--accent); font-weight: 700; }
@media (max-width: 760px) { .grid3 { grid-template-columns: 1fr 1fr; } .hgrid { grid-template-columns: 1fr; } }
