html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overscroll-behavior: none;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

#map {
  position: fixed;
  inset: 0;
  background: #f2efe9; /* same tone as OSM land */
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

#navcard {
  position: fixed;
  left: 10px;
  right: 10px;
  bottom: calc(14px + env(safe-area-inset-bottom));
  z-index: 1100;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  padding: 12px 14px;
}

.navcard-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}

#navcard-info {
  margin: 2px 0 0;
  font-size: 13px;
  color: #555;
}

#navcard .row {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

#navcard button {
  flex: 1;
  padding: 10px;
  border-radius: 10px;
  border: none;
  font-size: 15px;
  cursor: pointer;
}

#nav-go { background: #1a73e8; color: #fff; }
#nav-cancel { background: #ececec; color: #333; }

body.nav-preview #locate { display: none; }

#navbanner {
  position: fixed;
  top: calc(10px + env(safe-area-inset-top));
  left: 10px;
  right: 10px;
  z-index: 1100;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

#navbanner[hidden] { display: none; }

#navbanner .nav-text {
  flex: 1;
  display: flex;
  flex-direction: column;
}

#nav-dist { font-size: 16px; }

#nav-eta {
  font-size: 12px;
  color: #666;
}

#nav-close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: #ececec;
  color: #333;
  font-size: 15px;
  cursor: pointer;
}

#locate {
  position: fixed;
  right: 14px;
  bottom: calc(24px + env(safe-area-inset-bottom));
  z-index: 1000;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: none;
  background: #fff;
  color: #444;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

#locate.active { color: #1a73e8; }

#locate.following {
  background: #1a73e8;
  color: #fff;
}

#status {
  position: fixed;
  top: calc(10px + env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  background: rgba(30, 30, 30, 0.85);
  color: #fff;
  padding: 6px 14px;
  border-radius: 16px;
  font-size: 13px;
  max-width: 80vw;
  text-align: center;
}
