:root {
  color-scheme: light;
  --ink: #172522;
  --muted: #5e6d69;
  --line: #dbe4e1;
  --surface: #ffffff;
  --surface-soft: #f3f7f5;
  --brand: #146b58;
  --brand-dark: #0d4f41;
  --brand-soft: #e1f1ec;
  --accent: #f5b942;
  --danger: #ad332e;
  --danger-soft: #fae8e6;
  --shadow: 0 16px 44px rgba(16, 44, 37, 0.18);
  --header-height: 3.75rem;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #dfe9e5;
  color: var(--ink);
}

body {
  min-width: 20rem;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

button,
input,
select {
  color: inherit;
  font: inherit;
}

button,
label,
select {
  touch-action: manipulation;
}

button {
  border: 0;
}

a {
  color: var(--brand-dark);
}

[x-cloak] {
  display: none !important;
}

.skip-link {
  position: fixed;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 5000;
  padding: 0.7rem 0.9rem;
  border-radius: 0.5rem;
  background: var(--surface);
  box-shadow: var(--shadow);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.app-shell {
  display: grid;
  grid-template-rows: calc(var(--header-height) + var(--safe-top)) minmax(0, 1fr);
  width: 100%;
  height: 100vh;
  height: 100dvh;
}

.app-header {
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--safe-top) max(0.85rem, var(--safe-right)) 0 max(0.85rem, var(--safe-left));
  background: var(--surface);
  border-bottom: 1px solid rgba(23, 37, 34, 0.08);
}

.brand {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 0.65rem;
  line-height: 1.08;
}

.brand-mark {
  display: grid;
  width: 2.15rem;
  height: 2.15rem;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 0.75rem;
  color: #fff;
  background: var(--brand);
}

.brand-mark svg {
  width: 1.25rem;
  fill: currentColor;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  overflow: hidden;
  font-size: 0.95rem;
  letter-spacing: -0.015em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand small {
  margin-top: 0.2rem;
  color: var(--muted);
  font-size: 0.7rem;
}

.header-info,
.icon-button {
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
}

.header-info:hover,
.icon-button:hover {
  background: var(--surface-soft);
}

.header-info:focus-visible,
.icon-button:focus-visible,
.button:focus-visible,
.map-control:focus-visible,
.report-fab:focus-visible,
.text-button:focus-visible,
.leaflet-control-zoom a:focus-visible {
  outline: 3px solid rgba(20, 107, 88, 0.35);
  outline-offset: 2px;
}

.header-info svg,
.icon-button svg {
  width: 1.45rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.8;
}

.map-stage,
#map {
  position: relative;
  width: 100%;
  min-height: 0;
}

.map-stage {
  overflow: hidden;
}

#map {
  z-index: 1;
  height: 100%;
  background: #d8e5df;
}

.leaflet-container {
  color: var(--ink);
  font: inherit;
}

.leaflet-control-zoom {
  overflow: hidden;
  border: 0 !important;
  border-radius: 0.75rem !important;
  box-shadow: 0 4px 18px rgba(19, 48, 41, 0.17) !important;
}

.leaflet-control-zoom a {
  display: grid;
  width: 2.75rem !important;
  height: 2.75rem !important;
  place-items: center;
  color: var(--ink) !important;
  font: 1.35rem/1 inherit !important;
  border-color: var(--line) !important;
}

.leaflet-control-attribution {
  max-width: calc(100vw - 0.6rem);
  overflow: hidden;
  font-size: 0.58rem !important;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.map-toolbar {
  position: absolute;
  z-index: 800;
  top: 0.75rem;
  right: max(0.75rem, var(--safe-right));
  pointer-events: none;
}

.map-control {
  display: flex;
  min-height: 2.8rem;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.55rem 0.45rem 0.75rem;
  border: 1px solid rgba(23, 37, 34, 0.08);
  border-radius: 0.8rem;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 5px 18px rgba(19, 48, 41, 0.15);
  font-size: 0.84rem;
  font-weight: 700;
  pointer-events: auto;
  cursor: pointer;
  backdrop-filter: blur(8px);
}

.map-control svg {
  width: 1.2rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.8;
}

.filter-count {
  display: grid;
  min-width: 1.75rem;
  height: 1.75rem;
  place-items: center;
  padding: 0 0.32rem;
  border-radius: 999px;
  color: #fff;
  background: var(--brand);
  font-size: 0.74rem;
}

.data-status {
  position: absolute;
  z-index: 700;
  top: 0.85rem;
  left: max(3.9rem, calc(var(--safe-left) + 3.9rem));
  display: flex;
  min-height: 2.25rem;
  max-width: calc(100% - 12.5rem);
  align-items: center;
  gap: 0.42rem;
  padding: 0.38rem 0.65rem;
  overflow: hidden;
  border-radius: 999px;
  color: #31433e;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 3px 14px rgba(19, 48, 41, 0.12);
  font-size: 0.69rem;
  text-overflow: ellipsis;
  white-space: nowrap;
  backdrop-filter: blur(8px);
}

.data-status.is-error {
  color: var(--danger);
  background: rgba(255, 246, 245, 0.96);
}

.data-status button {
  padding: 0;
  color: inherit;
  background: transparent;
  text-decoration: underline;
  cursor: pointer;
}

.status-dot {
  width: 0.46rem;
  height: 0.46rem;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #36a174;
}

.status-dot.is-loading {
  animation: status-pulse 1.1s ease-in-out infinite;
  background: #df9a16;
}

@keyframes status-pulse {
  50% { opacity: 0.28; transform: scale(0.75); }
}

.map-legend {
  position: absolute;
  z-index: 700;
  bottom: calc(7.25rem + var(--safe-bottom));
  left: max(0.75rem, var(--safe-left));
  display: flex;
  align-items: center;
  gap: 0.58rem;
  padding: 0.45rem 0.62rem;
  border: 1px solid rgba(23, 37, 34, 0.07);
  border-radius: 0.65rem;
  background: rgba(255, 255, 255, 0.93);
  box-shadow: 0 4px 14px rgba(19, 48, 41, 0.12);
  font-size: 0.63rem;
  backdrop-filter: blur(8px);
}

.map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.26rem;
}

.legend-circle {
  display: inline-block;
  width: 0.72rem;
  height: 0.72rem;
  flex: 0 0 auto;
  border: 2px solid currentColor;
  border-radius: 50%;
  color: #2c9074;
  background: color-mix(in srgb, currentColor 55%, transparent);
}

.legend-circle.is-resolved {
  color: #7a8784;
}

.legend-circle.is-suppressed,
.legend-circle.is-doubtful {
  border-style: dashed;
  color: #9a6230;
}

.empty-state {
  position: absolute;
  z-index: 650;
  top: 50%;
  left: 50%;
  display: flex;
  width: min(19rem, calc(100% - 2rem));
  flex-direction: column;
  gap: 0.3rem;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(23, 37, 34, 0.08);
  border-radius: 0.85rem;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow);
  text-align: center;
  transform: translate(-50%, -50%);
}

.empty-state strong {
  font-size: 0.9rem;
}

.empty-state span {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.report-fab {
  position: absolute;
  z-index: 800;
  right: max(0.85rem, var(--safe-right));
  bottom: calc(3.25rem + var(--safe-bottom));
  display: flex;
  min-height: 3.35rem;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1rem 0.65rem 0.75rem;
  border-radius: 999px;
  color: #fff;
  background: var(--brand-dark);
  box-shadow: 0 9px 28px rgba(9, 61, 49, 0.3);
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
}

.report-fab:active {
  transform: translateY(1px);
}

.report-fab svg {
  width: 1.45rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 2;
}

.map-disclaimer {
  position: absolute;
  z-index: 600;
  right: 0;
  bottom: 0;
  left: 0;
  min-height: calc(1.85rem + var(--safe-bottom));
  margin: 0;
  padding: 0.43rem 0.6rem calc(0.43rem + var(--safe-bottom));
  color: #485b55;
  background: rgba(255, 255, 255, 0.93);
  font-size: 0.62rem;
  text-align: center;
  backdrop-filter: blur(8px);
}

.map-disclaimer a {
  font-weight: 700;
}

.selection-banner {
  position: absolute;
  z-index: 1200;
  top: max(0.75rem, var(--safe-top));
  right: max(0.75rem, var(--safe-right));
  left: max(0.75rem, var(--safe-left));
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 0.55rem;
  padding: 0.7rem 0.65rem 0.7rem 0.9rem;
  border-radius: 0.9rem;
  color: #fff;
  background: #173f35;
  box-shadow: var(--shadow);
}

.selection-banner div {
  min-width: 0;
}

.selection-banner strong,
.selection-banner span {
  display: block;
}

.selection-banner strong {
  font-size: 0.82rem;
}

.selection-banner span {
  margin-top: 0.15rem;
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.67rem;
}

.selection-banner .icon-button {
  width: 2.5rem;
  height: 2.5rem;
  color: #fff;
}

.sheet-layer {
  position: fixed;
  z-index: 2000;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-top: calc(2rem + var(--safe-top));
  background: rgba(8, 24, 20, 0.5);
  overscroll-behavior: contain;
}

.bottom-sheet {
  display: flex;
  width: min(100%, 42rem);
  max-height: calc(100dvh - 1.5rem - var(--safe-top));
  flex-direction: column;
  overflow: hidden;
  border-radius: 1.25rem 1.25rem 0 0;
  background: var(--surface);
  box-shadow: 0 -16px 48px rgba(8, 34, 28, 0.24);
}

.bottom-sheet-compact {
  max-height: min(48rem, calc(100dvh - 2.5rem - var(--safe-top)));
}

.sheet-handle {
  width: 2.7rem;
  height: 0.27rem;
  flex: 0 0 auto;
  margin: 0.48rem auto 0;
  border-radius: 999px;
  background: #c8d3d0;
}

.sheet-header {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 0.8rem 0.75rem 1rem;
  border-bottom: 1px solid var(--line);
}

.sheet-header h1 {
  margin: 0.08rem 0 0;
  font-size: clamp(1.05rem, 4.5vw, 1.35rem);
  letter-spacing: -0.025em;
}

.eyebrow {
  margin: 0;
  color: var(--brand);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sheet-form {
  display: contents;
}

.sheet-content {
  flex: 1 1 auto;
  padding: 1rem;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.sheet-footer {
  flex: 0 0 auto;
  padding: 0.75rem 1rem calc(0.75rem + var(--safe-bottom));
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 -5px 20px rgba(20, 51, 44, 0.06);
}

.sheet-footer > p {
  margin: 0.5rem 0 0;
  color: var(--muted);
  font-size: 0.67rem;
  line-height: 1.4;
  text-align: center;
}

.split-footer {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.6rem;
}

.field-group {
  min-width: 0;
  margin: 0 0 1.2rem;
  padding: 0;
  border: 0;
}

.field-group:last-child {
  margin-bottom: 0;
}

.field-group legend,
.field-label {
  display: block;
  margin: 0 0 0.6rem;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 800;
}

.field-intro,
.field-help {
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.5;
}

.field-intro {
  margin: 0 0 0.9rem;
}

.field-help {
  margin: 0.45rem 0 0;
}

.segmented-control {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.22rem;
  padding: 0.22rem;
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  background: var(--surface-soft);
}

.segmented-control-three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.segmented-control label {
  position: relative;
  min-width: 0;
  cursor: pointer;
}

.segmented-control input,
.option-card input,
.check-row input,
.consent-row input,
.radio-row input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.segmented-control span {
  display: grid;
  min-height: 2.7rem;
  place-items: center;
  padding: 0.38rem;
  border-radius: 0.5rem;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  text-align: center;
}

.segmented-control input:checked + span {
  color: var(--brand-dark);
  background: var(--surface);
  box-shadow: 0 2px 7px rgba(19, 48, 41, 0.11);
}

.segmented-control input:focus-visible + span,
.option-card input:focus-visible + .option-card-body,
.check-row input:focus-visible + .custom-check,
.consent-row input:focus-visible + .custom-check,
.radio-row input:focus-visible + .custom-radio {
  outline: 3px solid rgba(20, 107, 88, 0.3);
  outline-offset: 2px;
}

.check-list,
.radio-list {
  display: grid;
  gap: 0.38rem;
}

.check-row,
.radio-row {
  position: relative;
  display: flex;
  min-height: 2.9rem;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  font-size: 0.78rem;
  font-weight: 650;
  cursor: pointer;
}

.custom-check,
.custom-radio {
  display: grid;
  width: 1.25rem;
  height: 1.25rem;
  flex: 0 0 auto;
  place-items: center;
  border: 1.7px solid #899792;
  background: #fff;
}

.custom-check {
  border-radius: 0.3rem;
}

.custom-radio {
  border-radius: 50%;
}

.custom-check svg {
  width: 0.82rem;
  fill: none;
  stroke: #fff;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
  opacity: 0;
}

.check-row input:checked + .custom-check,
.consent-row input:checked + .custom-check {
  border-color: var(--brand);
  background: var(--brand);
}

.check-row input:checked + .custom-check svg,
.consent-row input:checked + .custom-check svg {
  opacity: 1;
}

.radio-row input:checked + .custom-radio {
  border: 0.35rem solid var(--brand);
}

.type-swatch {
  display: inline-block;
  width: 0.68rem;
  height: 0.68rem;
  flex: 0 0 auto;
  border: 2px solid color-mix(in srgb, var(--swatch) 72%, #172522);
  border-radius: 50%;
  background: var(--swatch);
}

.type-swatch-large {
  width: 0.86rem;
  height: 0.86rem;
}

.option-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.option-card {
  position: relative;
  min-width: 0;
  cursor: pointer;
}

.option-card:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.option-card-body {
  display: grid;
  min-height: 3.65rem;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem;
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  color: #344540;
  font-size: 0.73rem;
  font-weight: 700;
  line-height: 1.25;
}

.option-check {
  width: 1rem;
  fill: none;
  stroke: #fff;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  opacity: 0;
}

.option-card input:checked + .option-card-body {
  border-color: var(--brand);
  color: var(--brand-dark);
  background: var(--brand-soft);
  box-shadow: inset 0 0 0 1px var(--brand);
}

.option-card input:checked + .option-card-body .option-check {
  padding: 0.1rem;
  border-radius: 50%;
  background: var(--brand);
  opacity: 1;
}

.select-wrap {
  position: relative;
}

.select-wrap select {
  width: 100%;
  min-height: 3rem;
  appearance: none;
  padding: 0.55rem 2.6rem 0.55rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  outline: 0;
  background: #fff;
  font-size: 0.8rem;
}

.select-wrap select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(20, 107, 88, 0.15);
}

.select-wrap svg {
  position: absolute;
  top: 50%;
  right: 0.75rem;
  width: 1.2rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.8;
  pointer-events: none;
  transform: translateY(-50%);
}

.position-field {
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  background: var(--surface-soft);
}

.position-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
}

.button {
  display: inline-flex;
  min-height: 2.9rem;
  align-items: center;
  justify-content: center;
  gap: 0.42rem;
  padding: 0.55rem 0.85rem;
  border: 1px solid transparent;
  border-radius: 0.65rem;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.button svg {
  width: 1.15rem;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.button-primary {
  color: #fff;
  background: var(--brand-dark);
}

.button-primary:not(:disabled):hover {
  background: #0a4236;
}

.button-secondary {
  border-color: #a9c7bf;
  color: var(--brand-dark);
  background: #fff;
}

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

.button-danger {
  color: #fff;
  background: var(--danger);
}

.button-small {
  min-height: 2.35rem;
  padding: 0.4rem 0.75rem;
  font-size: 0.72rem;
}

.button-full {
  width: 100%;
  min-height: 3.1rem;
}

.button-spinner {
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.position-summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.65rem;
  padding: 0.65rem;
  border: 1px dashed #aab8b4;
  border-radius: 0.65rem;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.7);
}

.position-summary.has-position {
  border-style: solid;
  border-color: #9bc7ba;
  color: var(--ink);
  background: #edf8f4;
}

.position-icon {
  display: grid;
  width: 2.15rem;
  height: 2.15rem;
  place-items: center;
  border-radius: 50%;
  color: var(--brand);
  background: var(--brand-soft);
}

.position-icon svg {
  width: 1.25rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.position-summary strong,
.position-summary span {
  display: block;
}

.position-summary strong {
  font-size: 0.75rem;
}

.position-summary div > span {
  margin-top: 0.13rem;
  color: var(--muted);
  font-size: 0.66rem;
}

.text-button {
  padding: 0.5rem 0;
  color: var(--brand-dark);
  background: transparent;
  font-size: 0.7rem;
  font-weight: 800;
  text-decoration: underline;
  cursor: pointer;
}

.consent-row {
  position: relative;
  display: flex;
  min-height: 2.7rem;
  align-items: flex-start;
  gap: 0.62rem;
  margin-top: 0.65rem;
  color: #364742;
  font-size: 0.73rem;
  line-height: 1.45;
  cursor: pointer;
}

.consent-row .custom-check {
  margin-top: 0.05rem;
}

.legal-consent {
  margin-top: 0.2rem;
}

.privacy-note {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  margin: 0.65rem 0 0;
  padding: 0.6rem;
  border-radius: 0.55rem;
  color: #48615a;
  background: #e8efed;
  font-size: 0.66rem;
  line-height: 1.45;
}

.privacy-note svg {
  width: 1rem;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.honeypot {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

.form-alert {
  margin: 0 0 0.9rem;
  padding: 0.7rem 0.8rem;
  border-radius: 0.6rem;
  font-size: 0.75rem;
  line-height: 1.45;
}

.form-alert-error {
  color: #76211e;
  background: var(--danger-soft);
  border: 1px solid #e9b9b5;
}

.toast-region {
  position: fixed;
  z-index: 4000;
  top: calc(0.75rem + var(--safe-top));
  right: max(0.75rem, var(--safe-right));
  left: max(0.75rem, var(--safe-left));
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.toast {
  display: grid;
  width: min(100%, 29rem);
  min-height: 3.2rem;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.65rem 0.65rem 0.85rem;
  border-radius: 0.8rem;
  color: #fff;
  background: #263d37;
  box-shadow: var(--shadow);
  font-size: 0.77rem;
  line-height: 1.35;
  pointer-events: auto;
}

.toast.is-success {
  background: #17614f;
}

.toast.is-error {
  background: #8f2e2a;
}

.toast svg {
  width: 1.2rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
}

.toast button {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  color: inherit;
  background: rgba(255, 255, 255, 0.12);
  font-size: 1.2rem;
  cursor: pointer;
}

.sheet-enter,
.sheet-leave {
  transition: transform 220ms cubic-bezier(0.22, 0.7, 0.2, 1);
}

.sheet-enter-start,
.sheet-leave-end {
  transform: translateY(102%);
}

.report-location-marker {
  border: 0;
  background: transparent;
}

.report-location-pin {
  position: relative;
  display: grid;
  width: 2.65rem;
  height: 2.65rem;
  place-items: center;
  border: 3px solid #fff;
  border-radius: 50% 50% 50% 0;
  color: #fff;
  background: var(--brand-dark);
  box-shadow: 0 4px 14px rgba(13, 58, 47, 0.35);
  transform: rotate(-45deg);
}

.report-location-pin::after {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  background: #fff;
  content: "";
}

.leaflet-popup.psm-popup .leaflet-popup-content-wrapper {
  overflow: hidden;
  border-radius: 0.9rem;
  box-shadow: 0 10px 35px rgba(15, 41, 34, 0.22);
}

.leaflet-popup.psm-popup .leaflet-popup-content {
  width: min(17.8rem, calc(100vw - 3.7rem)) !important;
  margin: 0;
}

.leaflet-popup.psm-popup .leaflet-popup-close-button {
  top: 0.4rem;
  right: 0.35rem;
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border-radius: 50%;
  color: #52625e;
  font-size: 1.35rem;
}

.report-popup {
  max-height: min(31rem, calc(100dvh - 8rem));
  overflow-y: auto;
  overscroll-behavior: contain;
}

.popup-head {
  padding: 0.85rem 2.6rem 0.72rem 0.9rem;
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
}

.popup-kicker {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.26rem;
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
}

.popup-head h2 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.25;
}

.popup-status {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  margin-top: 0.45rem;
  padding: 0.22rem 0.42rem;
  border-radius: 999px;
  color: #18664f;
  background: #dcefe9;
  font-size: 0.62rem;
  font-weight: 800;
}

.popup-status::before {
  width: 0.38rem;
  height: 0.38rem;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.popup-status.is-resolved {
  color: #5b6966;
  background: #e5e9e8;
}

.popup-status.is-suppressed {
  color: #855322;
  background: #f2e7db;
}

.popup-status.is-doubtful {
  color: #855322;
  background: #f2e7db;
}

.popup-demo {
  display: inline-flex;
  margin-left: auto;
  padding: 0.16rem 0.34rem;
  border: 1px solid #8b6724;
  border-radius: 0.25rem;
  color: #654813;
  background: #fff2bd;
  font-size: 0.53rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.leaflet-tooltip.demo-map-label {
  padding: 0.1rem 0.24rem;
  border: 1px solid rgba(75, 53, 10, 0.75);
  border-radius: 0.2rem;
  color: #4f390e;
  background: #fff1ae;
  box-shadow: 0 1px 4px rgba(53, 38, 8, 0.22);
  font-size: 0.48rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  line-height: 1;
  pointer-events: none;
}

.leaflet-tooltip.demo-map-label::before {
  display: none;
}

.popup-body {
  padding: 0.75rem 0.9rem 0.9rem;
}

.popup-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
  margin: 0;
}

.popup-meta div {
  min-width: 0;
}

.popup-meta dt {
  margin-bottom: 0.13rem;
  color: var(--muted);
  font-size: 0.59rem;
  text-transform: uppercase;
}

.popup-meta dd {
  margin: 0;
  font-size: 0.69rem;
  font-weight: 700;
  line-height: 1.32;
}

.popup-score {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0.75rem 0;
  padding: 0.55rem 0.62rem;
  border-radius: 0.55rem;
  background: var(--surface-soft);
  font-size: 0.67rem;
}

.popup-score strong {
  color: var(--brand-dark);
  font-size: 0.95rem;
}

.popup-counts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.3rem;
  margin-bottom: 0.8rem;
}

.popup-count {
  padding: 0.4rem 0.2rem;
  border: 1px solid var(--line);
  border-radius: 0.45rem;
  text-align: center;
}

.popup-count strong,
.popup-count span {
  display: block;
}

.popup-count strong {
  font-size: 0.8rem;
}

.popup-count span {
  margin-top: 0.08rem;
  color: var(--muted);
  font-size: 0.49rem;
  line-height: 1.1;
}

.popup-question {
  margin: 0 0 0.45rem;
  font-size: 0.67rem;
  font-weight: 800;
}

.popup-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem;
}

.popup-action {
  min-height: 2.55rem;
  padding: 0.38rem;
  border: 1px solid #bbcec8;
  border-radius: 0.5rem;
  color: var(--brand-dark);
  background: #fff;
  font-size: 0.61rem;
  font-weight: 800;
  line-height: 1.2;
  cursor: pointer;
}

.popup-action.is-caution {
  border-color: #d7c2ac;
  color: #80501f;
}

.popup-action:disabled {
  color: #74817e;
  background: #edf1f0;
  cursor: not-allowed;
}

.popup-overlap {
  margin: 0.75rem 0 0;
  padding: 0.55rem;
  border-radius: 0.5rem;
  color: #475a54;
  background: #e9f0ee;
  font-size: 0.59rem;
  line-height: 1.35;
  text-align: center;
}

.popup-overlap button,
.popup-flag {
  min-height: 2.35rem;
  margin-top: 0.4rem;
  color: var(--brand-dark);
  background: transparent;
  font-size: 0.62rem;
  font-weight: 800;
  text-decoration: underline;
  cursor: pointer;
}

.popup-flag {
  width: 100%;
  margin-top: 0.55rem;
  color: #715048;
}

.noscript-message {
  position: fixed;
  z-index: 6000;
  inset: 1rem;
  height: fit-content;
  padding: 1rem;
  border-radius: 0.8rem;
  background: #fff;
  box-shadow: var(--shadow);
  font-size: 0.88rem;
  line-height: 1.5;
}

@media (min-width: 40rem) {
  .app-header {
    padding-right: 1.25rem;
    padding-left: 1.25rem;
  }

  .brand strong {
    font-size: 1rem;
  }

  .map-toolbar {
    right: 1.25rem;
  }

  .data-status {
    left: 4.35rem;
    max-width: none;
    font-size: 0.73rem;
  }

  .map-legend {
    left: 1.25rem;
  }

  .report-fab {
    right: 1.25rem;
  }

  .bottom-sheet {
    margin-bottom: 1rem;
    border-radius: 1.25rem;
  }

  .sheet-layer {
    padding-bottom: var(--safe-bottom);
  }

  .sheet-footer {
    padding-bottom: 0.9rem;
  }
}

@media (max-width: 23rem) {
  .map-control > span:not(.filter-count) {
    display: none;
  }

  .data-status {
    max-width: calc(100% - 8.6rem);
  }

  .map-legend {
    gap: 0.38rem;
    font-size: 0.58rem;
  }

  .report-fab span {
    display: none;
  }

  .report-fab {
    width: 3.35rem;
    padding: 0;
    justify-content: center;
  }

  .position-actions {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body.legal-page {
  min-width: 0;
  height: auto;
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  background:
    radial-gradient(circle at top right, rgba(20, 107, 88, 0.1), transparent 28rem),
    #f3f7f5;
}

.legal-shell {
  width: min(100%, 49rem);
  margin: 0 auto;
  padding: max(1rem, var(--safe-top)) max(1rem, var(--safe-right)) calc(2.5rem + var(--safe-bottom)) max(1rem, var(--safe-left));
}

.legal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: clamp(2rem, 9vw, 4.5rem);
}

.legal-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 800;
  text-decoration: none;
}

.legal-brand .brand-mark {
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 0.6rem;
}

.back-link {
  display: inline-flex;
  min-height: 2.65rem;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.72rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--brand-dark);
  background: rgba(255, 255, 255, 0.8);
  font-size: 0.72rem;
  font-weight: 800;
  text-decoration: none;
}

.back-link svg {
  width: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.8;
}

.legal-document {
  padding: clamp(1.15rem, 5vw, 2.6rem);
  border: 1px solid rgba(23, 37, 34, 0.08);
  border-radius: 1.2rem;
  background: rgba(255, 255, 255, 0.93);
  box-shadow: 0 18px 50px rgba(16, 44, 37, 0.09);
}

.legal-document > header {
  margin-bottom: 2rem;
  padding-bottom: 1.3rem;
  border-bottom: 1px solid var(--line);
}

.legal-document h1 {
  max-width: 17ch;
  margin: 0.35rem 0 0.7rem;
  font-size: clamp(1.75rem, 8vw, 3rem);
  letter-spacing: -0.045em;
  line-height: 1.04;
}

.legal-lead {
  max-width: 62ch;
  margin: 0;
  color: var(--muted);
  font-size: clamp(0.88rem, 3vw, 1rem);
  line-height: 1.65;
}

.legal-section + .legal-section {
  margin-top: 1.75rem;
}

.legal-section h2 {
  margin: 0 0 0.55rem;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.legal-section p,
.legal-section li {
  color: #465650;
  font-size: 0.84rem;
  line-height: 1.7;
}

.legal-section p {
  margin: 0.45rem 0;
}

.legal-section ul {
  margin: 0.55rem 0 0;
  padding-left: 1.2rem;
}

.legal-callout {
  margin: 1.4rem 0;
  padding: 0.9rem 1rem;
  border-left: 4px solid var(--accent);
  border-radius: 0 0.65rem 0.65rem 0;
  color: #53421f;
  background: #fff6df;
  font-size: 0.83rem;
  font-weight: 650;
  line-height: 1.6;
}

.legal-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-top: 1.25rem;
  padding: 0 0.25rem;
  color: var(--muted);
  font-size: 0.68rem;
}

.legal-footer nav {
  display: flex;
  gap: 0.8rem;
}
