:root {
  --bg: #2a2b2c;
  --rail: #222324;
  --edge: #545557;
  --text: #dbdee0;
  --dim: #999b9e;
  --frame: #18191a;
  --button: #3c3d3f;
  --plot: #040405;
}

* { box-sizing: border-box; }
html, body {
  margin: 0; height: 100%; overflow: hidden;
  background: var(--plot);
  color: var(--text);
  font: 12.5px/1.35 -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

#map { position: absolute; inset: 28px 0 22px 228px; }

.menubar {
  position: absolute; z-index: 6; top: 0; left: 0; right: 0; height: 28px;
  display: flex; align-items: center; gap: 8px;
  padding: 0 10px;
  background: var(--rail);
  border-bottom: 1px solid var(--edge);
}
.name { color: var(--text); text-decoration: none; font-weight: 600; }
.sep, .cur { color: var(--dim); }
.clock {
  color: var(--dim);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}
.counts {
  color: var(--dim);
  font-variant-numeric: tabular-nums;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pill {
  display: inline-flex; align-items: center; gap: 5px;
  color: var(--dim);
}
.pill i {
  width: 6px; height: 6px; background: #6a6c6e;
}
.pill.ok { color: var(--text); }
.pill.ok i { background: #b8bab8; }
.menubar input {
  margin-left: auto; width: 210px; height: 20px;
  background: var(--frame); color: var(--text);
  border: 1px solid var(--edge); border-radius: 1px;
  padding: 0 6px; font: inherit; outline: none;
}
.menubar input:focus { border-color: #8a8c8e; }
.link { color: var(--text); text-decoration: none; }
.link:hover { text-decoration: underline; }

.rail {
  position: absolute; z-index: 5; top: 28px; left: 0; bottom: 22px; width: 228px;
  background: var(--bg);
  border-right: 1px solid var(--edge);
  display: flex; flex-direction: column;
  min-height: 0;
}
.ptitle {
  flex: none;
  padding: 6px 10px 5px;
  border-bottom: 1px solid var(--edge);
  color: var(--dim);
}
.ptitle.row { display: flex; justify-content: space-between; }
#layers { flex: none; padding: 4px 8px 6px; border-bottom: 1px solid var(--edge); }
#layers label {
  display: flex; align-items: center; gap: 6px;
  padding: 1px 0; cursor: pointer; user-select: none;
}
#layers label.off { color: var(--dim); }
#layers input { margin: 0; accent-color: #c8cacc; }
.ico { width: 16px; height: 16px; flex: none; display: block; }
.n { margin-left: auto; color: var(--dim); font-variant-numeric: tabular-nums; }

#list {
  flex: 1; min-height: 0; overflow: auto;
}
#list .empty { padding: 8px 10px; color: var(--dim); }
#list button {
  display: grid;
  grid-template-columns: 16px 1fr auto;
  grid-template-rows: auto auto;
  column-gap: 7px;
  width: 100%;
  text-align: left;
  background: transparent; color: var(--text);
  border: 0; border-bottom: 1px solid #3a3b3c;
  padding: 5px 10px; cursor: pointer; font: inherit;
}
#list button:hover, #list button.sel { background: var(--button); }
#list .sym { grid-row: 1 / span 2; align-self: center; width: 16px; height: 16px; }
#list .lab { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#list .sub { grid-column: 2; color: var(--dim); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#list .age { grid-column: 3; grid-row: 1; color: var(--dim); font-variant-numeric: tabular-nums; }

.note { flex: none; padding: 7px 10px; color: var(--dim); border-top: 1px solid var(--edge); }
.note.hide { display: none; }

.pane {
  position: absolute; z-index: 5;
  background: var(--bg);
  border: 1px solid var(--edge);
}
.inspect { top: 36px; right: 8px; width: 268px; padding: 8px 12px 12px; }
.inspect .k { color: var(--dim); }
.inspect h2 { margin: 2px 0 8px; font-size: 15px; font-weight: 600; }
.inspect table { width: 100%; border-collapse: collapse; }
.inspect th { text-align: left; font-weight: 400; color: var(--dim); padding: 2px 10px 2px 0; width: 78px; }
.inspect td { padding: 2px 0; font-variant-numeric: tabular-nums; }
.inspect .x {
  position: absolute; top: 4px; right: 6px;
  border: 1px solid var(--edge); background: var(--button); color: var(--text);
  width: 18px; height: 18px; cursor: pointer; line-height: 14px; padding: 0;
}

.status {
  position: absolute; z-index: 6; left: 0; right: 0; bottom: 0; height: 22px;
  display: flex; align-items: center; gap: 12px;
  padding: 0 10px;
  background: var(--rail);
  border-top: 1px solid var(--edge);
  color: var(--dim);
  font-variant-numeric: tabular-nums;
}
.status a { color: var(--text); text-decoration: none; }
.status a:hover { text-decoration: underline; }
.grow { flex: 1; }

.maplibregl-ctrl-bottom-right { right: 6px; bottom: 6px; }
.maplibregl-ctrl-group {
  background: var(--bg) !important;
  border: 1px solid var(--edge) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}
.maplibregl-ctrl-group button + button { border-top: 1px solid var(--edge); }
.maplibregl-ctrl-attrib, .maplibregl-ctrl-logo { display: none; }
.maplibregl-canvas { outline: none; }

@media (max-width: 860px) {
  #map { left: 0; }
  .rail { display: none; }
  .counts, .link { display: none; }
  .menubar input { width: 140px; }
  .inspect { left: 8px; right: 8px; width: auto; top: auto; bottom: 30px; }
}
