html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  font-family: system-ui, sans-serif;
}

#map {
  position: absolute;
  inset: 0;
}

#hud {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 10;
  background: rgba(20, 20, 24, 0.82);
  color: #eee;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  max-width: 280px;
  pointer-events: none;
}

#hud-title {
  font-weight: 700;
  letter-spacing: 0.04em;
}

#hud-status {
  margin-top: 2px;
  opacity: 0.85;
}

#pic-info {
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 11px;
  font-family: ui-monospace, monospace;
  opacity: 0.9;
  user-select: text;
  pointer-events: auto;
  word-break: break-all;
}

#pic-info a {
  color: #7ab8ff;
}

.pic-badge {
  display: inline-block;
  padding: 0 5px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 10px;
  color: #fff;
  vertical-align: baseline;
}

.pic-badge.is-360 {
  background: #2962ff;
}

.pic-badge.is-flat {
  background: #ff6f00;
}

.flat-popup img {
  width: 100%;
  border-radius: 4px;
  display: block;
}

.flat-popup .flat-meta {
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.5;
}

#exit-street {
  position: absolute;
  top: 10px;
  right: 50px;
  z-index: 20;
  background: rgba(20, 20, 24, 0.85);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 14px;
  cursor: pointer;
}

#exit-street:hover {
  background: rgba(50, 50, 60, 0.95);
}

/* Manual 180° flip for mis-oriented sequences (#69) — below the exit button. */
#flip-pano {
  position: absolute;
  top: 56px;
  right: 50px;
  z-index: 20;
  background: rgba(20, 20, 24, 0.85);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 13px;
  cursor: pointer;
}

#flip-pano:hover {
  background: rgba(50, 50, 60, 0.95);
}

#minimap {
  position: absolute;
  bottom: 24px;
  right: 16px;
  z-index: 20;
  width: 132px;
  height: 132px;
  border-radius: 50%;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

#blend-control {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  background: rgba(20, 20, 24, 0.85);
  color: #fff;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

#blend-control input[type='range'] {
  width: 200px;
}

/* The MapLibre canvas is transparent where nothing renders; at the very-low
   street camera the lower/upper frustum is uncovered, so without this the page
   white shows as an empty void. Fill the container with the ground tone so the
   void matches the (recolored) ground plane — no raw white (#37). */
body.street-mode #map {
  /* Below the horizon MapLibre renders no ground at eye-level pitch; the
     transparent canvas shows this. A ground tone with a subtle recede gradient
     reads as a floor instead of a raw void (#43). Sky above is drawn by
     map.setSky(). background-color is the flat fallback (and e2e anchor). */
  background-color: #d7d9dc;
  background-image: linear-gradient(
    to bottom,
    rgba(230, 238, 247, 0) 45%,
    rgba(160, 166, 174, 0.55) 100%
  );
}

body.street-mode #map canvas {
  cursor: grab;
}

body.street-mode #map canvas:active {
  cursor: grabbing;
}

.pic-popup img {
  width: 100%;
  border-radius: 4px;
  display: block;
}

.pic-popup .pic-meta {
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.5;
}
