* { box-sizing: border-box; }
body { margin: 0; background: #101b19; color: #e7efe4; font: 15px/1.5 system-ui, sans-serif; }
button, summary { font: inherit; color: inherit; background: #243932; border: 1px solid #526354; border-radius: 8px; padding: 10px 13px; cursor: pointer; min-height: 44px; }
button[aria-pressed="true"] { background: #c9df9b; color: #152219; }
button:disabled { opacity: .45; }
button:focus-visible, summary:focus-visible { outline: 3px solid #f3c26b; }
h1,h2,p { margin: 0; }
h1 { font-size: 23px; letter-spacing: -.7px; }
.eyebrow { font-size: 10px; letter-spacing: 2px; color: #bed39e; }
.muted { font-size: 12px; color: #bdcbbd; margin-top: 12px; }
#gate { max-width: 500px; margin: 18vh auto; padding: 30px; }
#gate h1 { font-size: 40px; line-height: 1.15; margin: 20px 0; }
#app { position: fixed; inset: 0; }
#map { width: 100%; height: 100dvh; background: #dce1d0; }
nav { position: absolute; z-index: 800; top: max(12px, env(safe-area-inset-top), var(--tg-content-safe-area-inset-top, 0px)); left: max(12px, env(safe-area-inset-left)); display: flex; gap: 6px; }
nav button { font-size: 12px; }
.status { position: absolute; z-index: 800; top: max(62px, calc(env(safe-area-inset-top) + 50px), calc(var(--tg-content-safe-area-inset-top, 0px) + 50px)); left: 12px; right: 12px; pointer-events: none; }
.status span, #gps-status { display: table; background: #243932; color: #eef4e9; border-radius: 4px; padding: 2px 6px; font-size: 10px; margin-bottom: 3px; max-width: 100%; }
.sheets { position: absolute; z-index: 800; bottom: max(34px, calc(env(safe-area-inset-bottom) + 22px)); left: 12px; right: 12px; display: flex; gap: 8px; align-items: flex-end; }
details { max-width: 100%; }
summary { font-size: 12px; list-style: none; }
details[open] { background: #172a23; border: 1px solid #526354; border-radius: 8px; padding: 10px; max-height: 55dvh; overflow: auto; flex: 1; }
details[open] summary { margin-bottom: 8px; }
@media (pointer: coarse) {
  details[open] { overscroll-behavior: contain; }
}
#tracker-list { display: grid; gap: 7px; }
#tracker-list button { text-align: left; font-size: 12px; }
.legend { font-size: 12px; margin-top: 10px; }
.leaflet-container { font-family: inherit; }
.leaflet-popup-content { color: #17251e; }
.you-label { background: #1270b1; color: white; font-weight: 800; border-color: white; }
.leaflet-control-attribution { font-size: 9px !important; }
