:root {
  --bg: #0a0d12; --panel: #12161d; --line: #232b36;
  --ink: #e8edf4; --dim: #97a3b4; --hot: #ff9500;
  font-synthesis: none;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink);
  font: 15px/1.5 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
#map { position: absolute; inset: 0; }
.maplibregl-ctrl-attrib { font-size: 10px; }

#panel {
  position: absolute; top: 0; left: 0; bottom: 0; width: 400px; max-width: 100%;
  background: rgba(18,22,29,.94); backdrop-filter: blur(12px);
  border-right: 1px solid var(--line); overflow-y: auto; padding: 22px 22px 30px;
  z-index: 5;
}
h1 { font-size: 19px; margin: 0 0 4px; letter-spacing: -.01em; }
.sub { color: var(--dim); font-size: 13px; margin: 0 0 18px; }
.searchwrap { position: relative; margin-bottom: 16px; }
input[type=text] {
  width: 100%; padding: 10px 12px; background: #0d1117; color: var(--ink);
  border: 1px solid var(--line); border-radius: 8px; font-size: 14px;
}
input[type=text]:focus { border-color: #3d4a5c; }
ul#results { position: absolute; z-index: 9; left: 0; right: 0; top: 42px; margin: 0; padding: 4px;
  list-style: none; background: #0d1117; border: 1px solid var(--line); border-radius: 8px; }
ul#results li { padding: 7px 9px; border-radius: 5px; cursor: pointer; font-size: 13.5px; }
ul#results li:hover { background: #1b2430; }
.hidden { display: none; }

.intro { color: var(--dim); font-size: 13.5px; border-top: 1px solid var(--line); padding-top: 14px; }
.intro p { margin: 0 0 10px; }
#panel.live .intro { display: none; }
#panel:not(.live) .live-only { display: none; }

h2 { font-size: 15px; margin: 4px 0 2px; }
h2 span { color: var(--hot); }
#headline { font-size: 15px; margin: 10px 0 14px; color: var(--ink); }
#headline .big { font-size: 40px; font-weight: 650; color: var(--hot); display: block; line-height: 1.05; }
#stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.stat { background: #0d1117; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.stat b { display: block; font-size: 17px; font-weight: 600; }
.stat span { color: var(--dim); font-size: 11.5px; }
#detail, #twin { font-size: 13.5px; color: var(--dim); margin-bottom: 14px; }
#twin { background: #0f1720; border: 1px solid #23364a; border-left: 3px solid #4da3ff;
  border-radius: 6px; padding: 10px 12px; color: #cfe0f2; }
#twin b { color: #fff; }
#strip { width: 100%; height: 150px; display: block; margin-bottom: 6px; }
.caption { font-size: 11.5px; color: var(--dim); margin: 0 0 16px; }

.btns { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
button { background: #18202b; color: var(--ink); border: 1px solid var(--line);
  border-radius: 8px; padding: 9px 12px; font-size: 13px; cursor: pointer; }
button:hover { background: #202b39; }
button.on { border-color: var(--hot); color: var(--hot); }
button.ghost { background: transparent; color: var(--dim); }

details { border-top: 1px solid var(--line); padding-top: 12px; }
summary { cursor: pointer; color: var(--dim); font-size: 13px; }
details p { font-size: 12.5px; color: var(--dim); }

@media (max-width: 780px) {
  #panel { width: 100%; top: auto; height: 62%; border-right: 0; border-top: 1px solid var(--line); }
  #map { bottom: 62%; }
}

.dialwrap { margin: 0 0 16px; }
.dialwrap label { display: flex; justify-content: space-between; font-size: 12px;
  color: var(--dim); margin-bottom: 6px; }
.dialwrap span { color: var(--hot); font-variant-numeric: tabular-nums; }
input[type=range] { width: 100%; accent-color: var(--hot); }

.modes { display: flex; gap: 6px; margin: 4px 0 10px; }
.mode { flex: 1; font-size: 12.5px; padding: 7px 8px; }
.mode.on { border-color: var(--hot); color: var(--hot); background: #1d1a12; }

#fault { background: #2a1416; border: 1px solid #5c2a2e; border-left: 3px solid #ff3b30;
  border-radius: 6px; padding: 10px 12px; margin-bottom: 14px; font-size: 13px; color: #ffd9d6; }

#runner { margin: 0 0 14px; }
.runbar { height: 6px; background: #0d1117; border: 1px solid var(--line);
  border-radius: 4px; overflow: hidden; }
#runfill { height: 100%; width: 0; background: var(--hot); transition: width .5s linear; }
.runstats { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 7px;
  font-size: 12px; color: var(--dim); font-variant-numeric: tabular-nums; }
.runstats span:first-child { color: var(--hot); }
.since { font-size: 12.5px; color: var(--dim); border-top: 1px solid var(--line);
  padding-top: 12px; margin: 4px 0 14px; }
