:root {
  color-scheme: light dark;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f6f4ef;
  color: #222722;
}

@media (prefers-color-scheme: dark) {
  :root {
    background: #111312;
    color: #f4f1e8;
  }
}

* {
  box-sizing: border-box;
}

html,
body,
#app {
  width: 100%;
  height: 100%;
  margin: 0;
  overscroll-behavior: none;
}

body {
  overflow: hidden;
  position: fixed;
  inset: 0;
}

#app {
  position: relative;
}

#map {
  display: block;
  width: 100vw;
  height: 100vh;
  background: #f6f4ef;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

@media (prefers-color-scheme: dark) {
  #map {
    background: #121614;
  }
}

#map.dragging {
  cursor: grabbing;
}

#fit-button {
  position: absolute;
  right: 12px;
  top: 10px;
  min-width: 44px;
  min-height: 36px;
  border: 1px solid rgba(37, 43, 39, 0.28);
  border-radius: 6px;
  background: rgba(246, 244, 239, 0.88);
  color: #222722;
  font: 600 13px/1 ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  cursor: pointer;
}

#fit-button:active {
  transform: translateY(1px);
}

#hud {
  position: absolute;
  left: 12px;
  top: 10px;
  max-width: calc(100vw - 24px);
  color: rgba(34, 39, 34, 0.76);
  font: 12px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace;
  pointer-events: none;
  text-shadow: 0 1px 8px rgba(255, 255, 255, 0.85);
  white-space: pre-wrap;
}

@media (prefers-color-scheme: dark) {
  #hud {
    color: rgba(244, 241, 232, 0.76);
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.85);
  }

  #fit-button {
    border-color: rgba(244, 241, 232, 0.32);
    background: rgba(18, 22, 20, 0.82);
    color: #f4f1e8;
  }
}
