* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  height: 100%;
  background: #e8eae6;
  color: #1c1c1e;
  font: 16px/1.35 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  overflow: hidden;
  overscroll-behavior: none;
}

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

.card, .btn {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.18);
}

.card {
  position: absolute;
  top: calc(env(safe-area-inset-top) + 10px);
  left: 12px;
  right: 12px;
  max-width: 480px;
  margin: 0 auto;
  padding: 12px 16px;
  z-index: 5;
}
.card.alert { background: #fff4f2; }
.title { font-size: 20px; font-weight: 700; }
.alert .title { color: #c62828; }
.sub { margin-top: 2px; font-size: 14px; color: #5f6368; }
.sub:empty { display: none; }

.bar {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: calc(env(safe-area-inset-bottom) + 12px);
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  gap: 10px;
  z-index: 5;
}

.btn {
  border: 0;
  min-height: 56px;
  font: 600 17px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #1c1c1e;
  touch-action: manipulation;
  cursor: pointer;
}
.btn:active { background: #f1f3f4; }
.main { flex: 1; }
.main.active { background: #1a73e8; color: #fff; }
.icon { width: 56px; display: grid; place-items: center; color: #3c4043; }
.icon svg { width: 26px; height: 26px; }
.icon.active { background: #1a73e8; }
#needle { transition: transform 0.15s linear; }

.mark {
  padding: 3px 8px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  background: #e5383b;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
  pointer-events: none;
}
.mark-entrance { background: #5f6368; font-size: 11px; }

.maplibregl-ctrl-bottom-right { bottom: calc(env(safe-area-inset-bottom) + 76px); }

.built {
  position: absolute;
  left: 12px;
  bottom: calc(env(safe-area-inset-bottom) + 78px);
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px 4px 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.18);
  font-size: 12px;
  font-weight: 600;
  color: #3c4043;
  text-decoration: none;
}
.built img { width: 18px; height: 18px; }

.notice {
  position: absolute;
  top: calc(env(safe-area-inset-top) + 92px);
  left: 12px;
  right: 12px;
  max-width: 480px;
  margin: 0 auto;
  padding: 6px 12px;
  border-radius: 10px;
  background: rgba(255, 244, 214, 0.95);
  color: #5c4300;
  font-size: 13px;
  z-index: 5;
}
