:root {
  color-scheme: light dark;
  --ink: #1c2430;
  --muted: #526072;
  --line: #d5dde6;
  --card: #ffffff;
  --accent: #0f6b4c;
  font-family: "Segoe UI", sans-serif;
  line-height: 1.45;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e8eef4;
    --muted: #b7c3d0;
    --line: #314052;
    --card: #15202b;
    --accent: #7dceb0;
  }
}

body {
  margin: 0;
  color: var(--ink);
  background: #eef3f1;
}

h1, h2, p {
  margin-top: 0;
}

.layout {
  display: grid;
  grid-template-rows: minmax(46dvh, 58dvh) auto;
  min-height: 100dvh;
}

.map {
  position: relative;
  height: 42dvh;
  max-height: 42dvh;
  overflow: hidden;
  background: #d5e0db;
}

.map-empty {
  position: absolute;
  z-index: 500;
  left: 0.75rem;
  right: 0.75rem;
  bottom: 0.75rem;
  margin: 0;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  background: var(--card);
  color: var(--ink);
}

.sheet {
  position: relative;
  z-index: 2;
  padding: 1rem 1rem 2rem;
}

.card, .sheet > form, .hint {
  max-width: 36rem;
}

.card {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: var(--card);
}

label, button, input, select, textarea {
  font: inherit;
}

label {
  display: block;
  margin: 0.85rem 0 0.3rem;
  color: var(--muted);
}

.choice {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 2.75rem;
  margin: 0.25rem 0;
  color: var(--ink);
}

input, select, textarea {
  width: min(100%, 36rem);
  min-height: 2.75rem;
  padding: 0.4rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 0.6rem;
  background: transparent;
  color: inherit;
}

.choice input {
  width: 1.25rem;
  height: 1.25rem;
  min-height: 0;
  padding: 0;
}

textarea {
  min-height: 6.5rem;
}

button {
  min-height: 2.75rem;
  margin-top: 0.8rem;
  padding: 0.4rem 0.9rem;
  border: 0;
  border-radius: 0.7rem;
  background: var(--accent);
  color: #fff;
}

button[type="button"] {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}

.hint, code {
  color: var(--muted);
}

.token-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

#device-token {
  overflow-wrap: anywhere;
  font-family: ui-monospace, monospace;
}

.leaflet-container {
  height: 42dvh;
  width: 100%;
  font: inherit;
}

@media (min-width: 64rem) {
  .layout {
    grid-template-columns: minmax(0, 1.45fr) minmax(24rem, 0.7fr);
    grid-template-rows: 100dvh;
  }

  .sheet {
    overflow: auto;
  }
}
