.map-attribution {
  position: fixed;
  bottom: 0;
  right: 0;
  z-index: 15;
  padding: 2px 5px;
  background: #f5ead4;
  color: #35240f;
  font: 10px system-ui;
}

.hud-bottom-center .mode-switch {
  justify-content: center;
}

.hud-bottom-center .mode-btn {
  white-space: nowrap;
}

:is([data-street-city="sanfrancisco"], [data-street-city="hk"]) .fullmap-legend {
  flex-wrap: wrap;
  max-width: calc(100% - 32px);
}

.atlas-bridge-swatch { background: #79c4d1; }
.atlas-elevated-swatch { background: #dfad6e; }
.atlas-tunnel-swatch { background: repeating-linear-gradient(90deg, #bcadd7 0 3px, transparent 3px 5px); }
.terrain-attribution { display: block; color: inherit; text-underline-offset: .15em; }

[data-street-city="hk"] .fullmap-footer {
  max-width: 312px;
}

@media (max-width: 1080px) {
  [data-street-city="hk"] .fullmap-footer {
    bottom: 96px;
  }
}

:is([data-street-city="sanfrancisco"], [data-street-city="hk"]) .hud-minimized .toolbar {
  width: fit-content;
  margin-left: auto;
}

:is([data-street-city="sanfrancisco"], [data-street-city="hk"]) .hud-minimized .toolbar > :not(#btn-toggle-hud) {
  display: none;
}

@media (max-width: 1190px) and (min-width: 621px) {
  body:not(.touch-enabled) .hud-bottom-left,
  body:not(.touch-enabled) .hud-bottom-right {
    bottom: 76px;
  }
}

@media (max-width: 620px) {
  :is([data-street-city="sanfrancisco"], [data-street-city="hk"]) .fullmap-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  :is([data-street-city="sanfrancisco"], [data-street-city="hk"]) .fullmap-search-wrap {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  :is([data-street-city="sanfrancisco"], [data-street-city="hk"]) .fullmap-footer {
    bottom: 108px;
  }

  .hud-top-right {
    top: max(8px, env(safe-area-inset-top));
    left: 8px;
    right: 8px;
    max-width: none;
  }

  .toolbar {
    gap: 3px;
    padding: 4px;
  }

  .toolbar-divider,
  .toolbar kbd,
  .mode-switch kbd {
    display: none;
  }

  .toolbar .time-btn,
  .toolbar .tool-btn,
  .toolbar .repo-link,
  .mode-switch .mode-btn {
    padding: 0 6px;
    font-size: 12px;
  }

  body.touch-enabled .hud-bottom-left,
  body:not(.touch-enabled) .hud-bottom-left {
    top: var(--street-radar-top, 158px);
    width: 136px;
  }

  body.touch-enabled .radar,
  body:not(.touch-enabled) .radar {
    width: 136px;
    height: 92px;
  }

  body.touch-enabled .hud-bottom-center,
  body:not(.touch-enabled) .hud-bottom-center {
    bottom: max(15px, env(safe-area-inset-bottom));
  }
}
