:root {
  --bg: #121110;
  --panel: #1b1916;
  --line: #2e2a25;
  --text: #ece6dc;
  --muted: #9a9187;
  --amber: #ffb000;
  --rare: #ffd36b;
  color-scheme: dark;
}
[hidden] { display: none !important; }
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif;
}
header, main { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
header { padding-top: 20px; }
h1 { margin: 0; font-size: 22px; letter-spacing: 0.02em; }
h1 span { color: var(--muted); font-weight: 400; font-size: 16px; }
h2 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin: 18px 0 6px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }

.device { margin: 18px 0 10px; }
.bezel {
  background: linear-gradient(#26231f, #141210);
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 1px 0 #3a352f inset, 0 18px 40px rgba(0, 0, 0, 0.55);
}
#board {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 1;
  height: auto;
  border-radius: 4px;
  background: #0b0805;
}
.feeds { margin-top: 8px; font-size: 12px; color: var(--muted); }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 4px; vertical-align: 1px; }
.dot.ok { background: #6fcf7f; }
.dot.bad { background: #e36a5a; }

.controls { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 4px 0; }
label b { color: var(--amber); font-weight: 600; }
input[type="range"] { width: 120px; accent-color: var(--amber); }
button, select {
  background: #2a2622;
  color: var(--text);
  border: 1px solid #3c3731;
  border-radius: 7px;
  padding: 5px 10px;
  font: inherit;
  cursor: pointer;
}
select { max-width: 100%; min-width: 0; }
button:hover, select:hover { border-color: var(--amber); }
button[aria-pressed="true"] { background: #4a3500; border-color: var(--amber); }
button.small { padding: 1px 8px; font-size: 12px; }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 16px; margin: 14px 0 40px; }
#map { height: 520px; border-radius: 10px; border: 1px solid var(--line); background: #0d0d0d; }
.tables { min-width: 0; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
th, td { text-align: left; padding: 4px 6px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: var(--muted); font-weight: 500; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.rare td { color: var(--rare); }
.dark-tiles { filter: invert(1) hue-rotate(180deg) brightness(0.85) contrast(0.85) saturate(0.4); }
.leaflet-tooltip.tip {
  background: rgba(20, 18, 16, 0.85);
  color: var(--text);
  border: 0;
  box-shadow: none;
  font-size: 11px;
  padding: 1px 5px;
}
.leaflet-tooltip.tip::before { display: none; }

@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; }
  #map { height: 340px; }
  .bezel { padding: 8px; border-radius: 10px; }
}
