:root {
  --bg: #f7f5ef;
  --surface: #ffffff;
  --surface-2: #f1eee6;
  --ink: #1d2a24;
  --ink-soft: #5f6f66;
  --ink-faint: #93a098;
  --line: #e2ded3;
  --green: #2f5d46;
  --green-dark: #244a37;
  --green-soft: #e7efe8;
  --amber: #e9c46a;
  --red: #a32e1e;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(29, 42, 36, 0.14);
  --shadow-sm: 0 2px 10px rgba(29, 42, 36, 0.1);
  --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  display: flex;
  flex-direction: column;
  height: 100dvh;
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

button {
  font-family: inherit;
}

:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

.ico {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

/* ---------- Topbar ---------- */

.topbar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 64px;
  padding: 0 18px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  z-index: 600;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-mark {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
}

.brand-text {
  min-width: 0;
}

.brand h1 {
  margin: 0;
  font-size: 16px;
  font-weight: 750;
  letter-spacing: -0.015em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-sub {
  margin: 2px 0 0;
  font-size: 11.5px;
  color: var(--ink-soft);
}

.role-switch {
  display: flex;
  padding: 3px;
  gap: 2px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  flex: 0 0 auto;
}

.role-switch button {
  border: 0;
  background: transparent;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 650;
  color: var(--ink-soft);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.role-switch button.is-active {
  background: var(--green);
  color: #fbf8ef;
  box-shadow: 0 2px 6px rgba(47, 93, 70, 0.3);
}

/* ---------- Stage / map ---------- */

.stage {
  position: relative;
  flex: 1;
  min-height: 0;
}

#map {
  position: absolute;
  inset: 0;
  background: #e8eae4;
  outline: none;
}

#map .leaflet-tile-pane {
  filter: grayscale(0.28) saturate(0.8) brightness(1.02);
}

.stage.is-pinning #map {
  cursor: crosshair;
}

.leaflet-control-attribution {
  font-size: 9.5px !important;
  background: rgba(255, 255, 255, 0.78) !important;
  border-radius: 0 6px 0 0;
}

.leaflet-control-attribution a {
  color: var(--ink-soft);
}

.map-ui {
  position: absolute;
  z-index: 800;
  display: flex;
  gap: 8px;
}

.map-ui.top-left {
  top: 12px;
  left: 12px;
}

.map-ui.top-right {
  top: 12px;
  right: 12px;
  flex-direction: column;
  align-items: flex-end;
}

.stage.is-pinning .map-ui,
.stage.is-pinning .primary-fab {
  opacity: 0;
  pointer-events: none;
}

.stage.is-pinning .cs-marker {
  pointer-events: none;
}

.map-ui,
.primary-fab {
  transition: opacity 0.15s ease;
}

/* ---------- Type chips ---------- */

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 5px;
  max-width: min(88vw, 430px);
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(6px);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  font-size: 12.5px;
  font-weight: 650;
  color: var(--ink-soft);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}

.chip .ico {
  width: 15px;
  height: 15px;
}

.chip.is-active {
  background: var(--green-soft);
  border-color: #cfe0d4;
  color: var(--green-dark);
}

.chip.is-off {
  opacity: 0.4;
  text-decoration: line-through;
}

/* ---------- Legend ---------- */

.legend {
  width: 188px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(6px);
}

.legend-toggle {
  all: unset;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.legend-caret {
  transition: transform 0.15s ease;
  color: var(--ink-soft);
}

.legend.is-collapsed .legend-caret {
  transform: rotate(-90deg);
}

.legend.is-collapsed .legend-body {
  display: none;
}

.legend-bar {
  height: 8px;
  margin-top: 9px;
  border-radius: 99px;
  background: linear-gradient(
    90deg,
    #e9c46a,
    #dda85c,
    #d0824a,
    #c4693f,
    #b84a38,
    #a32e1e
  );
}

.legend-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 5px;
  font-size: 10.5px;
  color: var(--ink-soft);
}

.zoom-stack {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.zoom-stack button {
  width: 38px;
  height: 38px;
  border: 0;
  background: #fff;
  font-size: 18px;
  line-height: 1;
  color: var(--ink);
  cursor: pointer;
}

.zoom-stack button:hover {
  background: var(--surface-2);
}

.zoom-stack button + button {
  border-top: 1px solid var(--line);
}

/* ---------- Pin banner ---------- */

.pin-banner {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 850;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 12px 10px 16px;
  background: var(--ink);
  color: #fbf8ef;
  border-radius: 999px;
  font-size: 13px;
  white-space: nowrap;
  box-shadow: var(--shadow);
}

.pin-banner .link {
  color: #f4d9a8;
}

/* ---------- Floating buttons ---------- */

.fab {
  position: absolute;
  right: 14px;
  bottom: calc(18px + env(safe-area-inset-bottom));
  z-index: 800;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--green-dark);
  box-shadow: var(--shadow);
  cursor: pointer;
}

.fab .ico {
  width: 21px;
  height: 21px;
}

.primary-fab {
  position: absolute;
  left: 50%;
  bottom: calc(18px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 800;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 22px;
  border: 0;
  border-radius: 999px;
  background: var(--green);
  color: #fbf8ef;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 12px 26px rgba(47, 93, 70, 0.35);
  cursor: pointer;
}

.primary-fab:hover {
  background: var(--green-dark);
}

.primary-fab-plus {
  font-size: 17px;
  line-height: 1;
  margin-top: -1px;
}

/* ---------- Map markers ---------- */

.cs-marker {
  background: none;
  border: 0;
}

.marker {
  position: relative;
  display: grid;
  place-items: center;
  width: var(--size);
  height: var(--size);
}

.marker-halo {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--halo);
  border: 1px solid var(--ring);
}

.marker-dot {
  position: relative;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--dot, #fff);
  color: var(--dot-ink, var(--green-dark));
  box-shadow: 0 2px 8px rgba(20, 30, 24, 0.28);
}

.marker-dot .ico {
  width: 19px;
  height: 19px;
}

.marker-count {
  position: absolute;
  top: -3px;
  right: -4px;
  display: grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 12px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 1px 4px rgba(20, 30, 24, 0.2);
}

.marker.is-resolved {
  opacity: 0.55;
  filter: grayscale(0.4);
}

.cs-pin {
  background: none;
  border: 0;
  color: var(--green-dark);
}

.temp-pin {
  width: 40px;
  height: 48px;
  filter: drop-shadow(0 4px 6px rgba(20, 30, 24, 0.35));
  animation: pin-drop 0.18s ease-out;
}

.temp-pin .ico {
  width: 40px;
  height: 48px;
}

@keyframes pin-drop {
  from {
    transform: translateY(-8px);
    opacity: 0;
  }
}

/* ---------- Sheet ---------- */

.sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  max-height: 88dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--surface);
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -10px 40px rgba(29, 42, 36, 0.2);
  padding-bottom: calc(16px + env(safe-area-inset-bottom));
  animation: sheet-up 0.2s ease-out;
}

@keyframes sheet-up {
  from {
    transform: translateY(14px);
    opacity: 0.5;
  }
}

.sheet-grip {
  width: 38px;
  height: 4px;
  margin: 8px auto 2px;
  border-radius: 99px;
  background: #ddd8ca;
}

.sheet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px 4px;
}

.eyebrow {
  margin: 0 0 3px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.sheet-head h2 {
  margin: 0;
  font-size: 19px;
  letter-spacing: -0.02em;
}

.sheet-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 12px 20px 4px;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--ink-soft);
  cursor: pointer;
}

.icon-btn:hover {
  background: var(--surface-2);
}

/* ---------- Detail ---------- */

.photo {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 16px;
  overflow: hidden;
  background: var(--surface-2);
  cursor: zoom-in;
}

.photo img {
  display: block;
  width: 100%;
  height: 210px;
  object-fit: cover;
}

.photo-empty {
  display: grid;
  place-items: center;
  gap: 6px;
  height: 132px;
  border: 1.5px dashed #cfc9ba;
  border-radius: 16px;
  background: repeating-linear-gradient(
    135deg,
    #f4f1e9,
    #f4f1e9 10px,
    #efece3 10px,
    #efece3 20px
  );
  color: #9aa69e;
  font-size: 12.5px;
  cursor: default;
}

.photo-empty .ico {
  width: 26px;
  height: 26px;
}

.desc {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
}

.meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.muted {
  font-size: 12.5px;
  color: var(--ink-soft);
}

.count-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid var(--chip-ring, var(--line));
  background: var(--chip-bg, var(--surface-2));
  color: var(--chip-ink, var(--ink));
  font-size: 12.5px;
  font-weight: 700;
}

.count-chip::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.status-chip {
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.status-chip.open {
  background: #fbefe3;
  color: #a65a22;
}

.status-chip.resolved {
  background: var(--green-soft);
  color: var(--green-dark);
}

.sheet-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 2px;
}

/* ---------- Buttons / links ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 18px;
  border: 1px solid transparent;
  border-radius: 14px;
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
}

.btn-primary {
  background: var(--green);
  color: #fbf8ef;
  box-shadow: 0 8px 18px rgba(47, 93, 70, 0.24);
}

.btn-primary:hover:not(:disabled) {
  background: var(--green-dark);
}

.btn-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}

.btn-ghost {
  background: #fff;
  border-color: var(--line);
  color: var(--ink);
}

.btn-ghost:hover {
  background: var(--surface-2);
}

.link {
  all: unset;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--green);
  cursor: pointer;
}

.link .ico {
  width: 15px;
  height: 15px;
}

.link.subtle {
  color: var(--ink-faint);
  font-weight: 600;
}

/* ---------- Form ---------- */

.form {
  gap: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.field-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.loc-box {
  padding: 12px 14px;
  border: 1px dashed #cfc9ba;
  border-radius: 12px;
  background: var(--surface-2);
  font-size: 13.5px;
  font-variant-numeric: tabular-nums;
}

.hint {
  margin: 0;
  font-size: 11.5px;
  color: var(--ink-soft);
}

.hint.center {
  text-align: center;
}

textarea {
  width: 100%;
  min-height: 84px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  font: inherit;
  font-size: 14.5px;
  line-height: 1.45;
  resize: vertical;
}

textarea:focus {
  outline: 2px solid rgba(47, 93, 70, 0.3);
  border-color: var(--green);
}

.text-input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
}

.text-input:focus {
  outline: 2px solid rgba(47, 93, 70, 0.3);
  border-color: var(--green);
}

.type-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.type-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 13px 6px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--ink-soft);
  font-size: 12.5px;
  font-weight: 650;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.type-btn .ico {
  width: 22px;
  height: 22px;
}

.type-btn[aria-checked="true"] {
  background: var(--green);
  border-color: var(--green);
  color: #fbf8ef;
  box-shadow: 0 6px 14px rgba(47, 93, 70, 0.24);
}

.photo-drop {
  display: block;
  min-height: 104px;
  border: 1.5px dashed #c9c3b4;
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  background: repeating-linear-gradient(
    135deg,
    #f4f1e9,
    #f4f1e9 10px,
    #efece3 10px,
    #efece3 20px
  );
}

.photo-drop-inner {
  display: grid;
  place-items: center;
  gap: 7px;
  height: 104px;
  color: var(--ink-soft);
  font-size: 13px;
}

.photo-drop-inner img {
  width: 100%;
  height: 104px;
  object-fit: cover;
}

.photo-drop-inner .ico {
  width: 24px;
  height: 24px;
}

/* ---------- Officer panel ---------- */

.panel {
  position: fixed;
  top: 76px;
  right: 12px;
  bottom: 12px;
  z-index: 950;
  display: flex;
  flex-direction: column;
  width: min(384px, calc(100vw - 24px));
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  animation: panel-in 0.18s ease-out;
}

@keyframes panel-in {
  from {
    transform: translateX(12px);
    opacity: 0.4;
  }
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 16px 16px 10px;
}

.panel-head h2 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -0.02em;
}

.pill {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 11px;
  background: var(--green-soft);
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 750;
  vertical-align: 1px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 0 16px 12px;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
}

.stat strong {
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}

.stat span {
  font-size: 11px;
  color: var(--ink-soft);
}

.panel-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 16px 10px;
}

.check {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: var(--ink-soft);
  cursor: pointer;
}

.check input {
  accent-color: var(--green);
  width: 15px;
  height: 15px;
}

.report-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 2px 16px 16px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.report-row {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.report-row:hover {
  background: var(--bg);
}

.report-row.is-selected {
  border-color: var(--green);
  box-shadow: 0 0 0 2px rgba(47, 93, 70, 0.14);
}

.row-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--green-soft);
  color: var(--green-dark);
}

.row-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.row-title {
  font-size: 13.5px;
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.row-sub {
  font-size: 11.5px;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.row-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
}

.row-count {
  font-size: 14px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.empty {
  padding: 26px 14px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  text-align: center;
  font-size: 13px;
  color: var(--ink-soft);
}

/* ---------- Lightbox / toast ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1500;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(15, 23, 19, 0.88);
}

.lightbox img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 12px;
}

.lightbox-close {
  position: fixed;
  top: 16px;
  right: 16px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 16px;
  cursor: pointer;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(88px + env(safe-area-inset-bottom));
  z-index: 2000;
  max-width: min(92vw, 460px);
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: #fbf8ef;
  font-size: 13px;
  text-align: center;
  opacity: 0;
  transform: translate(-50%, 16px);
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- Responsive ---------- */

@media (min-width: 860px) {
  .sheet {
    left: auto;
    right: 20px;
    bottom: 20px;
    width: 424px;
    max-height: calc(100dvh - 100px);
    border-radius: 20px;
  }

  body.has-panel .sheet {
    right: auto;
    left: 20px;
  }

  body.has-panel .map-ui.top-right {
    right: 408px;
  }

  body.has-sheet .map-ui.top-right {
    display: none;
  }

  .sheet-grip {
    display: none;
  }

  .primary-fab {
    left: auto;
    right: 20px;
    bottom: 20px;
    transform: none;
  }

  .fab {
    right: 20px;
    bottom: 82px;
  }

  .map-ui.top-right {
    right: 20px;
  }

  .map-ui.top-left {
    left: 20px;
  }
}

@media (max-width: 859px) {
  .panel {
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-height: 82dvh;
    border-radius: 20px 20px 0 0;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
    padding-bottom: env(safe-area-inset-bottom);
  }
}

@media (max-width: 640px) {
  .topbar {
    height: 58px;
    padding: 0 12px;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
  }

  .brand h1 {
    font-size: 14.5px;
  }

  .brand-sub {
    display: none;
  }

  .role-switch button {
    padding: 6px 10px;
    font-size: 11.5px;
  }

  .map-ui.top-left {
    top: 10px;
    left: 10px;
    right: 10px;
  }

  .chips {
    max-width: 100%;
  }

  .map-ui.top-right {
    top: auto;
    right: 10px;
    bottom: calc(80px + env(safe-area-inset-bottom));
    align-items: flex-end;
  }

  .legend {
    width: 168px;
  }

  .zoom-stack {
    display: none;
  }

  .fab {
    right: 12px;
  }

  .pin-banner {
    top: 64px;
    max-width: calc(100vw - 24px);
    white-space: normal;
    font-size: 12.5px;
  }

  .sheet-head,
  .sheet-body {
    padding-left: 16px;
    padding-right: 16px;
  }

  .photo img {
    height: 180px;
  }

  .stats {
    padding-left: 12px;
    padding-right: 12px;
  }

  .panel-head,
  .report-list {
    padding-left: 12px;
    padding-right: 12px;
  }
}

@media (max-width: 420px) {
  .brand h1 {
    font-size: 13.5px;
  }

  .brand-mark {
    width: 30px;
    height: 30px;
  }

  .role-switch button {
    padding: 6px 9px;
    font-size: 11px;
  }
}

@media (max-width: 340px) {
  .brand-mark {
    display: none;
  }

  .brand h1 {
    font-size: 12.5px;
  }

  .role-switch button {
    padding: 6px 7px;
    font-size: 10.5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
