html,
body,
#vmap {
  margin: 0;
  width: 100%;
  height: 100%;
  background: #0b1a24;
  overflow: hidden;
}
body {
  font:
    13px/1.4 -apple-system,
    BlinkMacSystemFont,
    "Apple SD Gothic Neo",
    sans-serif;
  color: #fff;
}
[hidden] {
  display: none !important;
}

/* Loading skeleton: the engine and the first tiles take a few seconds. */
.cover {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: linear-gradient(160deg, #0b1a24, #003049);
  color: #c9dbe6;
  text-align: center;
  padding: 0 24px;
}
.cover .pulse {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.18);
  border-top-color: #9fd0ea;
  animation: spin 0.9s linear infinite;
}
.cover.is-error .pulse {
  display: none;
}
.cover p {
  margin: 0;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .cover .pulse {
    animation: none;
  }
}

.hud {
  position: fixed;
  top: max(10px, env(safe-area-inset-top));
  left: 10px;
  z-index: 10;
  display: flex;
  gap: 8px;
  align-items: baseline;
  padding: 5px 10px;
  border-radius: 6px;
  background: rgba(0, 20, 32, 0.68);
  font-variant-numeric: tabular-nums;
}
.hud b {
  font-size: 15px;
}
.hud span {
  color: #c9dbe6;
  font-size: 12px;
}

/* Sits above VWorld's bottom logo strip. */
.bar {
  position: fixed;
  left: 10px;
  right: 10px;
  bottom: calc(34px + env(safe-area-inset-bottom));
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(0, 20, 32, 0.72);
  font-variant-numeric: tabular-nums;
}
.bar button {
  flex: none;
  min-width: 36px;
  height: 32px;
  border: 0;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.bar button:focus-visible,
.bar input:focus-visible {
  outline: 2px solid #9fd0ea;
  outline-offset: 2px;
}
.bar input {
  flex: 1;
  min-width: 0;
  accent-color: #ff5a1f;
}
.bar .km {
  flex: none;
  min-width: 48px;
  text-align: right;
}
/* VWorld's notice wraps to a second line on narrow screens; keep it clear. */
@media (max-width: 480px) {
  .bar {
    bottom: calc(54px + env(safe-area-inset-bottom));
  }
}
