:root {
  color-scheme: light dark;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", sans-serif;
}

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

#map {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  padding: calc(env(safe-area-inset-top, 0px) + 8px) 16px 8px;
  pointer-events: none;
  text-align: center;
}

.app-header h1 {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 6px 16px;
  font-size: 1.1rem;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.header-logo {
  height: 1.1em;
  width: auto;
}

button {
  font-family: inherit;
  font-size: 1rem;
  border: none;
  border-radius: 8px;
  padding: 10px 16px;
  cursor: pointer;
  background: #1a73e8;
  color: #fff;
}

button:hover {
  background: #1558b0;
}

button:disabled {
  background: #9aa0a6;
  cursor: not-allowed;
}

button.secondary {
  background: #e8eaed;
  color: #202124;
}

button.secondary:hover {
  background: #d2d5d9;
}

.icon-button {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
  font-size: 1.1rem;
  line-height: 1;
}

.info-toggle {
  position: fixed;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 20px);
  left: 12px;
  z-index: 10;
  background: rgba(255, 255, 255, 0.9);
  color: #1a1a1a;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.locate-button {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 8px);
  right: 12px;
  z-index: 11;
  background: rgba(255, 255, 255, 0.9);
  color: #1a1a1a;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.call-buttons {
  position: fixed;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 20px);
  transform: translateX(-50%);
  z-index: 15;
  display: flex;
  gap: 10px;
}

.call-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 78px;
  padding: 10px 4px 8px;
  font-size: 0.65rem;
  line-height: 1.2;
  font-weight: 600;
  border-radius: 16px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  min-height: 44px;
  white-space: normal;
  text-align: center;
}

.call-button img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.pill-button {
  position: fixed;
  right: 12px;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 20px);
  z-index: 15;
  border-radius: 999px;
  font-size: 0.85rem;
  padding: 10px 14px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  background: #fff;
  color: #202124;
  padding: 16px 16px calc(env(safe-area-inset-bottom, 0px) + 16px);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
  border-radius: 16px 16px 0 0;
  max-width: 480px;
  margin: 0 auto;
}

.sheet p {
  margin: 0 0 12px;
  font-size: 0.9rem;
  line-height: 1.5;
}

.sheet-actions {
  display: flex;
  gap: 8px;
}

.toast {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 60px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  background: rgba(32, 33, 36, 0.92);
  color: #fff;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 0.85rem;
  max-width: 90vw;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.leaflet-popup-content {
  font-size: 0.85rem;
}

.call-marker-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
}

.call-marker-icon img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}
