html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  font: 14px/1.4 system-ui, sans-serif;
  color: #1c1915;
  background: #f6f3ee;
}

body {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
}

#status,
#credit {
  margin: 0;
  position: fixed;
  z-index: 2;
  max-width: calc(100vw - 2rem);
  padding: 0.45rem 0.7rem;
  border-radius: 0.45rem;
  background: rgb(246 243 238 / 88%);
  box-shadow: 0 1px 5px rgb(28 25 21 / 20%);
  backdrop-filter: blur(4px);
  box-sizing: border-box;
  pointer-events: none;
}

#status {
  top: max(0.75rem, env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  transition: opacity 180ms ease;
}

#credit {
  right: max(0.75rem, env(safe-area-inset-right));
  bottom: max(0.75rem, env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 12px;
  pointer-events: auto;
}

#credit-toggle {
  margin: 0 0 0 0.3rem;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  cursor: pointer;
}

#about-panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + 0.5rem);
  width: min(22rem, calc(100vw - 1.5rem));
  padding: 0.9rem 1rem;
  border: 1px solid rgb(28 25 21 / 10%);
  border-radius: 0.7rem;
  background: rgb(246 243 238 / 97%);
  box-shadow: 0 0.5rem 1.5rem rgb(28 25 21 / 18%);
  color: inherit;
  line-height: 1.45;
}

#about-panel strong {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 14px;
}

#about-panel p {
  margin: 0;
}

.about-meta {
  margin-top: 0.75rem;
  padding-top: 0.65rem;
  border-top: 1px solid rgb(28 25 21 / 12%);
  color: #625d55;
  font-size: 11px;
}

.about-meta span {
  display: block;
  margin-bottom: 0.2rem;
  font-weight: 600;
}

#credit-detail {
  color: inherit;
}

#credit[data-expanded="false"] #about-panel {
  display: none;
}

#credit[data-expanded="false"] {
  padding: 0.35rem 0.55rem;
  border-radius: 0.45rem;
  line-height: 1;
}

#credit[data-expanded="false"] #credit-toggle {
  margin: 0;
}

#map {
  position: absolute;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
}

body[data-state="error"] #status,
body[data-state="empty"] #status {
  background: #f3d6d0;
}

body[data-state="ready"] #status {
  opacity: 0;
}

.maplibregl-ctrl-attrib {
  font-size: 12px;
}

@media (max-width: 600px) {
  #credit {
    left: max(0.75rem, env(safe-area-inset-left));
    max-width: none;
  }

  #about-panel {
    right: auto;
    left: 0;
  }
}
