:root {
  color-scheme: light;
  --panel: rgba(255, 255, 255, 0.3);
  --ink: #1c2430;
  --muted: #657083;
  --line: rgba(28, 36, 48, 0.18);
  --accent: #d94d32;
  --accent-dark: #a63222;
  --water: #d9edf2;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --toolbar-safe-bottom: max(0px, calc(var(--safe-bottom) - 8px));
}

* {
  box-sizing: border-box;
}

html,
body,
.app-shell,
.map-stage,
#map {
  width: 100%;
  height: 100%;
}

html,
body {
  margin: 0;
  min-height: 100%;
  min-height: 100dvh;
}

body {
  overflow: hidden;
  font-family: Arial, "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--water);
  min-height: 100dvh;
  min-height: 100svh;
  padding-bottom: 0;
}

.app-shell {
  min-height: 100dvh;
  min-height: 100svh;
  padding-bottom: 0;
}

button,
input {
  font: inherit;
}

.map-stage {
  position: relative;
  min-width: 320px;
  min-height: 360px;
  min-height: 100dvh;
  background: var(--water);
}

#map {
  display: block;
  touch-action: none;
  cursor: grab;
}

#map.dragging {
  cursor: grabbing;
}

.zoom-controls {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 0 16px 40px rgba(38, 54, 73, 0.16);
  backdrop-filter: blur(2px);
}

.zoom-controls button {
  border: 0;
  color: #fff;
  background: var(--accent);
  cursor: pointer;
}

.zoom-controls button:hover {
  background: var(--accent-dark);
}

.status-text {
  position: absolute;
  left: 0;
  bottom: var(--toolbar-safe-bottom);
  z-index: 2;
  padding: 5px;
  color: var(--accent);
  /* background: var(--panel); */
  font-size: 11px;
  /* pointer-events: none; */
  /* backdrop-filter: blur(2px); */
}

.attribution {
  position: absolute;
  right: 5px;
  bottom: calc(5px + var(--toolbar-safe-bottom));
  z-index: 2;
  display: inline-block;
  font-size: 11px;
  cursor: pointer;
  user-select: none;
}

.attribution:hover {
  color: var(--ink);
}

.attribution:focus-visible {
  outline: 3px solid rgba(217, 77, 50, 0.28);
  outline-offset: 3px;
}

.zoom-controls {
  position: absolute;
  right: 5px;
  bottom: calc(30px + var(--toolbar-safe-bottom));
  z-index: 2;
  display: grid;
  overflow: hidden;
  border-radius: 8px;
}

.zoom-controls button {
  width: 40px;
  height: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.38);
  font-size: 22px;
  line-height: 1;
}

.zoom-controls button:last-child {
  border-bottom: 0;
}

.visually-hidden {
  display: none !important;
}
