:root {
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #172f30;
  background: #e5ece3;
  font-synthesis: none;
}
* { box-sizing: border-box; }
html, body, main, #map { width: 100%; height: 100%; }
body { margin: 0; overflow: hidden; }
main { position: relative; }
#map { background: #e5ece3; }
.map-panel {
  position: absolute;
  z-index: 1000;
  top: 18px;
  left: 18px;
  width: min(340px, calc(100vw - 36px));
  padding: 18px;
  border: 1px solid #d9e1d9;
  border-radius: 14px;
  background: rgb(255 255 255 / 94%);
  box-shadow: 0 8px 28px rgb(23 47 48 / 16%);
  backdrop-filter: blur(8px);
}
header { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.eyebrow { font-size: 9px; letter-spacing: 1.8px; font-weight: 800; color: #5d7472; }
h1 { margin: 3px 0 0; font-size: 25px; letter-spacing: -1px; line-height: 1; }
.dot { color: #dd663f; }
button, input { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible { outline: 3px solid #df983f; outline-offset: 3px; }
#reload {
  border: 1px solid #d7dfd8;
  border-radius: 8px;
  background: #fff;
  padding: 9px 11px;
  color: #294c45;
  font-size: 11px;
  font-weight: 700;
}
.status-line { display: flex; align-items: center; gap: 7px; margin-top: 16px; font-size: 12px; }
#indicator { width: 8px; height: 8px; border-radius: 50%; background: #d79a35; flex: none; }
#indicator.ready { background: #228367; }
#count { margin-left: auto; color: #5c716d; font-size: 11px; font-weight: 700; }
#updated { margin: 5px 0 15px 15px; color: #657773; font-size: 10px; line-height: 1.4; }
.filter-groups { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 12px; }
.filter-groups fieldset { display: flex; flex-wrap: wrap; align-content: start; gap: 6px 10px; min-width: 0; margin: 0; padding: 0; border: 0; }
.filter-groups legend { width: 100%; margin-bottom: 4px; color: #536a66; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.filter-groups label { display: flex; align-items: center; gap: 4px; cursor: pointer; font-size: 10px; white-space: nowrap; }
input[type=checkbox] { accent-color: #216b61; }
.key { display: inline-block; width: 9px; height: 9px; border-radius: 3px; }
.key.bus { background: #24786a; }
.key.obus { background: #8a1324; }
.key.train { background: #c75d3c; }
.search-label { display: block; margin-bottom: 6px; font-size: 10px; font-weight: 700; }
input[type=search] {
  width: 100%;
  border: 1px solid #d6dfd7;
  border-radius: 8px;
  background: #fff;
  padding: 10px 11px;
  color: inherit;
  font-size: 12px;
}
#empty { margin: 9px 0 0; color: #8b4d39; font-size: 11px; }
#reset {
  position: absolute;
  z-index: 1000;
  top: 18px;
  right: 18px;
  border: 1px solid #d7dfd8;
  border-radius: 8px;
  background: #fff;
  padding: 11px 14px;
  color: #294c45;
  box-shadow: 0 3px 12px rgb(24 48 37 / 10%);
  font-size: 11px;
  font-weight: 700;
}
#notice {
  position: absolute;
  z-index: 1000;
  bottom: 24px;
  left: 50%;
  width: max-content;
  max-width: 85%;
  transform: translateX(-50%);
  border: 1px solid #e3c68c;
  border-radius: 8px;
  background: #fff7e7;
  padding: 9px 14px;
  color: #735322;
  box-shadow: 0 3px 15px rgb(0 0 0 / 7%);
  font-size: 11px;
  text-align: center;
}
.vehicle-marker { background: none; border: 0; }
.vehicle-marker span {
  display: block;
  padding: 4px 6px;
  border: 2px solid #fff;
  border-radius: 8px;
  background: #24786a;
  color: #fff;
  box-shadow: 0 2px 6px rgb(0 0 0 / 25%);
  font-size: 11px;
  font-weight: 800;
  text-align: center;
  white-space: nowrap;
}
.vehicle-marker.train span { background: #c75d3c; }
.vehicle-marker.obus span { background: #8a1324; }
.vehicle-marker.stale { opacity: .5; }
.vehicle-marker:hover span, .vehicle-marker:focus span { transform: scale(1.12); }
.leaflet-popup-content { min-width: 210px; margin: 15px 17px; line-height: 1.45; }
.leaflet-popup-content strong { display: block; margin-bottom: 9px; font-size: 16px; }
.detail-row { margin-top: 5px; font-size: 12px; }
.detail-label { color: #647570; font-size: 10px; font-weight: 700; letter-spacing: .3px; text-transform: uppercase; }
.popup-muted { margin-top: 10px; color: #647570; font-size: 10px; }
@media (max-width: 600px) {
  .map-panel { top: 10px; left: 10px; width: calc(100vw - 20px); padding: 13px; }
  h1 { font-size: 21px; }
  .status-line { margin-top: 11px; }
  #updated { margin-bottom: 10px; }
  .filter-groups { margin-bottom: 9px; }
  #reset { top: auto; right: 10px; bottom: 70px; padding: 9px 11px; }
  #notice { bottom: 18px; font-size: 10px; }
}
