:root {
  color-scheme: dark;
  font-family: Arial, Helvetica, sans-serif;
  color: #f2f2f2;
  background: #171717;
}
* { box-sizing: border-box; }
body { margin: 0; height: 100dvh; display: flex; flex-direction: column; }
header {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 20px;
  background: #171717;
  border-bottom: 1px solid #4b4b4b;
  z-index: 800;
}
h1 { margin: 0; font-size: 16px; font-weight: 600; white-space: nowrap; }
h1 span { font-size: 12px; color: #b8b8b8; font-weight: 400; margin-left: 12px; }
#stream-status { display: flex; align-items: center; gap: 6px; margin: 4px 0 0; font-size: 11px; color: #b8b8b8; }
#stream-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #999; flex-shrink: 0; }
#stream-status[data-online="true"] { color: #d4f1e3; }
#stream-status[data-online="true"]::before { background: #72dcac; }
.leaflet-tooltip { background: #202020; border: 1px solid #aaa; color: #f2f2f2; font: 12px Arial, Helvetica, sans-serif; box-shadow: none; }
.leaflet-tooltip-top::before { border-top-color: #aaa; }
.player-marker > div { position: absolute; left: -5px; top: -7px; height: 14px; display: flex; align-items: center; gap: 7px; }
.player-dot { width: 10px; height: 10px; flex-shrink: 0; border-radius: 50%; border: 1.5px solid #171717; background: var(--player-color); }
.player-marker.is-local > div { left: -7px; }
.player-marker.is-local .player-dot { width: 14px; height: 14px; border: 2px solid #fff; }
.player-name { white-space: nowrap; color: #fff; font: 600 12px Arial, Helvetica, sans-serif; text-shadow: -1px -1px 1px #111, 1px -1px 1px #111, -1px 1px 1px #111, 1px 1px 1px #111; }
button { font: inherit; color: inherit; cursor: pointer; touch-action: manipulation; }
button:disabled { color: #888; cursor: default; }
button:focus-visible, a:focus-visible, #map:focus-visible { outline: 2px solid #fff; outline-offset: -3px; }
.layers { display: flex; border: 1px solid #777; border-radius: 4px; overflow: hidden; }
.layers button { background: #171717; border: 0; min-height: 40px; padding: 0 17px; font-size: 13px; }
.layers button + button { border-left: 1px solid #777; }
.layers button[aria-pressed="true"] { color: #171717; background: #f2f2f2; }
.layers button:hover:not([aria-pressed="true"]) { background: #333; }
.map-shell { position: relative; flex: 1; min-height: 0; }
#map { height: 100%; width: 100%; background: #171717; z-index: 0; }
.leaflet-container { font: inherit; }
.leaflet-overlay-pane svg { pointer-events: none; }
.dinero-map { position: absolute; inset: 0; pointer-events: none; z-index: 250; }
.map-controls {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 800;
  display: flex;
  flex-direction: column;
  border: 1px solid #777;
  border-radius: 4px;
  overflow: hidden;
}
.map-controls button { width: 44px; height: 44px; background: #202020; border: 0; font-size: 25px; line-height: 1; }
.map-controls button + button { border-top: 1px solid #777; }
.map-controls button:hover:enabled { background: #3b3b3b; }
.map-controls svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.message {
  position: absolute;
  z-index: 900;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 16px 20px;
  max-width: min(440px, calc(100% - 32px));
  background: #202020;
  border: 1px solid #777;
  border-radius: 4px;
  font-size: 14px;
  line-height: 1.5;
}
.message p { margin: 0; }
.message button { margin-top: 12px; padding: 8px 14px; border: 1px solid #aaa; border-radius: 3px; background: #333; }
[hidden] { display: none !important; }
footer {
  z-index: 800;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 20px;
  padding: 8px 20px;
  background: #171717;
  color: #b8b8b8;
  font-size: 11px;
  line-height: 1.5;
  border-top: 1px solid #4b4b4b;
}
footer a { color: #d4d4d4; text-underline-offset: 2px; }
@media (max-width: 560px) {
  header { padding-inline: 12px; }
  h1 { font-size: 14px; }
  h1 span { display: none; }
  .layers button { padding-inline: 14px; }
  .map-controls { right: 12px; }
  footer { padding-inline: 12px; font-size: 10px; }
  .help { display: none; }
}
@media (max-width: 320px) {
  header { flex-wrap: wrap; gap: 8px; }
  h1 { width: 100%; }
}
