html, body { height: 100%; margin: 0; background: #0f1117; color: #e8eaf0;
  font: 18px/1.35 "Segoe UI", -apple-system, Helvetica, Arial, sans-serif; overscroll-behavior: none; }
#map { position: absolute; inset: 0; background: #0f1117; }
button { font: inherit; color: #e8eaf0; background: #2a2d3a; border: 1px solid #3a3e4e; border-radius: 10px; padding: 10px 14px; }
button:active { filter: brightness(1.3); }
.hidden { display: none !important; }

#top { position: absolute; z-index: 1000; top: env(safe-area-inset-top, 0); left: 0; right: 0; padding: 8px 10px;
  background: rgba(15,17,23,.88); border-bottom: 1px solid #2a2d3a; }
#stats { display: flex; gap: 18px; font-weight: 700; font-size: 22px; }
#acc { margin-left: auto; font-size: 15px; font-weight: 400; color: #8b90a0; align-self: center; }
#msg { color: #22c55e; font-size: 15px; min-height: 1.2em; }

#bottom { position: absolute; z-index: 1000; left: 0; right: 0; bottom: 0; display: flex; gap: 8px;
  padding: 10px 10px calc(10px + env(safe-area-inset-bottom, 0)); background: rgba(15,17,23,.92); border-top: 1px solid #2a2d3a; }
.big { flex: 1; font-size: 22px; font-weight: 700; padding: 16px 8px; }
.go { background: #16a34a; border-color: #16a34a; color: #fff; }
.stop { background: #dc2626; border-color: #dc2626; color: #fff; }

#marks { position: absolute; z-index: 1000; left: 0; right: 0; bottom: calc(86px + env(safe-area-inset-bottom, 0));
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 0 10px; }
.mk { font-weight: 700; padding: 14px 6px; color: #0f1117; border: none; }
.c1 { background: #ffd400; } .c2 { background: #2ec4b6; } .c3 { background: #ff6b6b; } .c4 { background: #c77dff; }

#panel { position: absolute; z-index: 2000; inset: 0; background: #0f1117; overflow: auto;
  padding: calc(12px + env(safe-area-inset-top, 0)) 12px calc(12px + env(safe-area-inset-bottom, 0)); }
.phead, .pfoot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 12px; }
.pfoot { margin-top: 12px; }
.row { background: #1a1d27; border: 1px solid #2a2d3a; border-radius: 10px; padding: 10px; margin-bottom: 8px; }
.row .t { font-weight: 700; }
.row .s { color: #8b90a0; font-size: 15px; margin-bottom: 8px; }
.row .b { display: flex; gap: 6px; flex-wrap: wrap; }
.row .b button { padding: 8px 10px; font-size: 16px; }
.filebtn { background: #2a2d3a; border: 1px solid #3a3e4e; border-radius: 10px; padding: 10px 14px; }
.filebtn input { display: none; }
.small { color: #8b90a0; font-size: 14px; margin-top: 10px; }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: #1a1d27; color: #e8eaf0; }
.leaflet-control-layers { background: #1a1d27; color: #e8eaf0; }
.leaflet-top { top: calc(70px + env(safe-area-inset-top, 0)); }
.me { width: 18px; height: 18px; border-radius: 50%; background: #2f80ff; border: 3px solid #fff; box-sizing: border-box; box-shadow: 0 0 0 6px rgba(47,128,255,.3); }
.leaflet-control-layers-expanded { padding: 6px 10px; font-size: 15px; }
