:root {
  color-scheme: light;
  --ink: #17201d;
  --muted: #65716c;
  --line: #dce4df;
  --surface: #ffffff;
  --green: #126b52;
  --red: #c94335;
  --amber: #be7a10;
  --blue: #2f6fa9;
  --shadow: 0 24px 70px rgba(28, 47, 40, 0.16);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Noto Sans SC", "Microsoft YaHei", sans-serif;
  overflow: hidden;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.radar-app {
  position: relative;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

.search-header {
  position: absolute;
  top: 12px;
  right: 0;
  left: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(260px, 680px);
  justify-content: center;
  padding: 0 clamp(12px, 3vw, 28px);
  pointer-events: none;
}

.search-wrap {
  display: grid;
  grid-template-columns: auto 1fr auto;
  min-width: 0;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 12px 34px rgba(28, 47, 40, 0.08);
  padding: 0 8px 0 14px;
  pointer-events: auto;
}

.search-wrap span {
  color: var(--muted);
}

.search-wrap input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 16px;
}

.search-wrap button,
.primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--green);
  color: #fff;
  font-weight: 800;
  padding: 0 14px;
}

.view-switch {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  justify-self: center;
  gap: 4px;
  margin-top: 8px;
  border: 1px solid rgba(20, 108, 82, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 28px rgba(28, 47, 40, 0.08);
  padding: 4px;
  pointer-events: auto;
}

.view-switch button {
  min-width: 72px;
  min-height: 32px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.view-switch button.is-active {
  background: var(--green);
  color: #fff;
}

.auth-prompt {
  display: inline-flex;
  max-width: min(420px, calc(100vw - 24px));
  align-items: center;
  justify-content: space-between;
  justify-self: center;
  gap: 10px;
  margin-top: 8px;
  border: 1px solid rgba(20, 108, 82, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 28px rgba(28, 47, 40, 0.08);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  padding: 7px 8px 7px 11px;
  pointer-events: auto;
}

.auth-prompt[hidden] {
  display: none;
}

.auth-prompt button {
  min-height: 30px;
  border: 0;
  border-radius: 7px;
  background: #eaf5ef;
  color: var(--green);
  font-size: 13px;
  font-weight: 900;
  padding: 0 10px;
  white-space: nowrap;
}

.search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  display: none;
  width: min(680px, calc(100vw - 24px));
  max-height: min(460px, calc(100vh - 130px));
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow);
  transform: translateX(-50%);
  pointer-events: auto;
}

.search-results.is-open {
  display: grid;
}

.search-results button {
  display: grid;
  gap: 4px;
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  padding: 14px 16px;
  text-align: left;
}

.search-results span,
.search-note {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.search-note {
  padding: 14px 16px;
}

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

.map-canvas {
  position: absolute;
  inset: 0;
}

.map-canvas::after {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(245, 247, 246, 0.58);
  content: "";
  pointer-events: none;
}

.map-canvas .maplibregl-marker {
  z-index: 2;
}

.radar-panel,
.place-drawer {
  position: absolute;
  z-index: 5;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.radar-panel {
  z-index: 6;
  top: 78px;
  left: 18px;
  width: min(270px, calc(100vw - 36px));
  overflow: hidden;
  padding: 12px 14px;
}

.panel-title {
  display: grid;
  gap: 4px;
  margin-bottom: 0;
}

.panel-title strong {
  font-size: 18px;
}

.panel-title span,
.panel-empty {
  color: var(--muted);
  font-size: 13px;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.chip-row button {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  padding: 0 11px;
}

.chip-row button.is-active {
  border-color: rgba(18, 107, 82, 0.2);
  background: #eaf5ef;
  color: var(--green);
}

.risk-row {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.area-alerts {
  display: grid;
  gap: 8px;
}

.area-alerts button {
  display: grid;
  gap: 5px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
  text-align: left;
}

.area-alerts strong {
  color: var(--ink);
}

.area-alerts span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.report-button,
.locate-button {
  position: absolute;
  z-index: 4;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: #fff;
  box-shadow: 0 2px 8px rgba(28, 47, 40, 0.12);
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.report-button {
  bottom: 18px;
  left: 50%;
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border-color: transparent;
  border-radius: 8px;
  background: var(--green);
  color: #fff;
  font-weight: 900;
  padding: 0 22px;
  transform: translateX(-50%);
}

.drawer-open .report-button,
.drawer-open .locate-button {
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
}

.drawer-open .report-button {
  transform: translate(-50%, 8px);
}

.picking-location .locate-button {
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
}

.pick-mode-banner {
  position: absolute;
  top: 72px;
  left: 50%;
  z-index: 8;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(18, 107, 82, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 34px rgba(28, 47, 40, 0.12);
  color: var(--ink);
  font-weight: 900;
  padding: 8px 10px 8px 12px;
  transform: translateX(-50%);
}

.pick-mode-banner[hidden] {
  display: none;
}

.pick-mode-banner button {
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  padding: 0 9px;
}

.locate-button {
  right: 18px;
  bottom: 18px;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 4px;
  color: var(--green);
  font-size: 22px;
  font-weight: 900;
}

.locate-button.is-loading {
  color: var(--muted);
}

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

.map-attribution {
  position: absolute;
  bottom: 3px;
  left: 50%;
  z-index: 4;
  background: transparent;
  color: rgba(23, 32, 29, 0.72);
  font-size: 8px;
  line-height: 1;
  padding: 0 3px;
  text-decoration: none;
  transform: translateX(-50%);
}

.map-pin,
.alert-pin,
.cluster-pin {
  position: relative;
  z-index: 1;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 3px solid #fff;
  border-radius: 50% 50% 50% 8px;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(28, 47, 40, 0.25);
  transform: rotate(-45deg);
}

.map-pin span,
.alert-pin span,
.cluster-pin span {
  position: relative;
  z-index: 2;
  transform: rotate(45deg);
}

.pin-activity-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: -1;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0) 0 18%, rgba(18, 107, 82, 0.14) 28%, rgba(190, 122, 16, 0.06) 44%, rgba(255, 255, 255, 0) 70%);
  transform: translate(-50%, -50%) rotate(45deg);
  pointer-events: none;
}

.map-pin[data-density="mid"] .pin-activity-glow,
.cluster-pin[data-density="mid"] .pin-activity-glow {
  width: 210px;
  height: 210px;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0) 0 17%, rgba(18, 107, 82, 0.2) 30%, rgba(190, 122, 16, 0.09) 48%, rgba(255, 255, 255, 0) 72%);
}

.map-pin[data-density="high"] .pin-activity-glow,
.cluster-pin[data-density="high"] .pin-activity-glow {
  width: 280px;
  height: 280px;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0) 0 16%, rgba(18, 107, 82, 0.25) 31%, rgba(190, 122, 16, 0.12) 52%, rgba(255, 255, 255, 0) 74%);
}

.cluster-pin {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--green);
  transform: none;
}

.cluster-pin span {
  transform: none;
}

.cluster-pin .pin-activity-glow {
  transform: translate(-50%, -50%);
}

.map-pin[data-status="many"] {
  background: var(--red);
}

.map-pin[data-status="photo"] {
  background: var(--amber);
}

.map-pin[data-status="discussed"] {
  background: var(--blue);
}

.map-pin[data-status="clue"] {
  background: #68756f;
}

.map-pin[data-status="external"] {
  background: var(--green);
}

.alert-pin {
  background: #6b4bd8;
}

.map-pin.is-selected,
.alert-pin.is-selected {
  outline: 5px solid rgba(18, 107, 82, 0.18);
  z-index: 2;
}

.place-drawer {
  top: 18px;
  right: 18px;
  z-index: 7;
  width: min(390px, calc(100vw - 36px));
  max-height: calc(100% - 130px);
  overflow-y: auto;
  padding: 18px;
  opacity: 0;
  pointer-events: none;
  transform: translateX(18px);
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.place-drawer.is-open {
  z-index: 20;
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.drawer-head {
  position: sticky;
  top: -18px;
  z-index: 3;
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
  margin: -18px -18px 14px;
  border-bottom: 1px solid rgba(220, 228, 223, 0.78);
  background: rgba(255, 255, 255, 0.97);
  padding: 18px 18px 12px;
  backdrop-filter: blur(14px);
}

.drawer-head h1 {
  margin: 0 0 6px;
  font-size: 24px;
  line-height: 1.15;
  letter-spacing: 0;
}

.drawer-head p,
.drawer-note {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.icon-button {
  position: relative;
  z-index: 5;
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
  touch-action: manipulation;
}

.risk-tags,
.place-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}

.risk-tags span,
.place-meta span {
  border-radius: 999px;
  background: #eef5f0;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  padding: 6px 10px;
}

.place-identity-card {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7fbf8;
  padding: 10px;
}

.place-identity-card.is-text-only {
  grid-template-columns: 1fr;
}

.place-identity-card img,
.place-identity-photo {
  display: grid;
  width: 82px;
  height: 76px;
  place-items: center;
  overflow: hidden;
  border-radius: 7px;
  background: #eaf5ef;
  color: var(--green);
  font-weight: 900;
  object-fit: cover;
}

.place-identity-card strong,
.place-identity-card span {
  display: block;
}

.place-identity-card strong {
  color: var(--ink);
  font-size: 15px;
}

.place-identity-card span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.place-identity-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}

.place-identity-meta small,
.place-identity-meta a {
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
}

.place-identity-meta a,
.map-source-link {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border-radius: 999px;
  background: #eaf5ef;
  padding: 0 10px;
  text-decoration: none;
}

.place-quick-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 14px;
}

.place-quick-card img,
.place-quick-photo {
  display: grid;
  width: 92px;
  height: 70px;
  flex: 0 0 auto;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  background: #eaf5ef;
  color: var(--green);
  font-weight: 900;
  object-fit: cover;
}

.place-quick-card.is-text-only {
  justify-content: flex-start;
}

.place-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.map-source-link {
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
}

.return-summary {
  display: grid;
  gap: 11px;
  margin: 14px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.return-question {
  color: var(--ink);
  font-size: 15px;
}

.return-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.return-stats strong {
  color: var(--ink);
  font-size: 16px;
}

.return-stats span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.return-bar {
  display: flex;
  width: 100%;
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #eef2ef;
}

.return-bar i {
  display: block;
  min-width: 0;
}

.return-bar i:first-child:last-child {
  width: 100%;
}

.return-yes-bar {
  background: var(--green);
}

.return-no-bar {
  background: var(--red);
}

.return-summary.is-empty .return-yes-bar {
  width: 100% !important;
  background: #dce4df;
}

.return-summary.is-empty .return-no-bar {
  display: none;
}

.return-filter {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.return-filter button {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.return-filter button.is-active {
  border-color: rgba(18, 107, 82, 0.34);
  background: #eaf5ef;
  color: var(--green);
}

.return-filter button[data-return-filter="return-no"].is-active {
  border-color: rgba(201, 67, 53, 0.34);
  background: #fcecea;
  color: var(--red);
}

.return-summary.is-no .return-stats strong {
  color: var(--red);
}

.return-summary.is-yes .return-stats strong {
  color: var(--green);
}

.comment-feed {
  display: grid;
  gap: 10px;
}

.empty-comments {
  margin: 0;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  padding: 14px;
}

.comment-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 13px;
}

.comment-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.comment-head time {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.comment-author {
  border: 0;
  background: transparent;
  color: var(--green);
  font-size: 14px;
  font-weight: 900;
  padding: 0;
  text-align: left;
}

.comment-item p {
  margin: 0 0 8px;
  color: var(--muted);
  line-height: 1.5;
}

.comment-item .price-note {
  color: var(--ink);
  font-weight: 800;
}

.comment-item small {
  color: var(--green);
  font-weight: 800;
}

.photo-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.photo-thumb {
  display: flex;
  min-height: 96px;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  border: 0;
  border-radius: 8px;
  color: #fff;
  padding: 10px;
  text-align: left;
}

.photo-thumb.local {
  background:
    linear-gradient(135deg, rgba(18, 107, 82, 0.9), rgba(18, 107, 82, 0.68)),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.22) 0 2px, transparent 2px 16px);
}

.photo-thumb.foreign {
  background:
    linear-gradient(135deg, rgba(201, 67, 53, 0.92), rgba(190, 122, 16, 0.72)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.2) 0 2px, transparent 2px 18px);
}

.photo-thumb.receipt {
  background:
    linear-gradient(135deg, rgba(47, 111, 169, 0.92), rgba(18, 107, 82, 0.7)),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.18) 0 1px, transparent 1px 14px);
}

.photo-thumb span {
  font-size: 12px;
  font-weight: 800;
  opacity: 0.92;
}

.photo-thumb strong {
  font-size: 22px;
  line-height: 1;
}

.primary-action {
  width: 100%;
  min-height: 42px;
  margin-top: 14px;
}

.report-head h1 {
  font-size: 23px;
}

.report-form {
  display: grid;
  gap: 10px;
}

.auth-form {
  display: grid;
  gap: 10px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f5f7f5;
  padding: 4px;
}

.auth-tabs button {
  min-height: 36px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 900;
}

.auth-tabs button.is-active {
  background: #fff;
  box-shadow: 0 5px 14px rgba(28, 47, 40, 0.08);
  color: var(--green);
}

.auth-benefits {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
  border-radius: 8px;
  background: #edf7f2;
  color: #315748;
  font-size: 13px;
  line-height: 1.35;
  padding: 9px 11px;
}

.auth-benefits[hidden] {
  display: none;
}

.auth-benefits strong {
  color: var(--green);
  font-weight: 900;
}

.auth-panel {
  display: grid;
  gap: 10px;
}

.auth-panel[hidden] {
  display: none;
}

.auth-email-switch {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  width: 160px;
  border-radius: 8px;
  background: #f5f7f5;
  padding: 4px;
}

.auth-email-switch button {
  min-height: 30px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 900;
}

.auth-email-switch button.is-active {
  background: #fff;
  color: var(--green);
}

.auth-form input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  padding: 12px 13px;
}

.auth-form .primary-action {
  margin-top: 0;
}

.auth-status {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.auth-status[hidden] {
  display: none;
}

.auth-status.is-mail,
.auth-status.is-success,
.auth-status.is-error,
.auth-status.is-loading {
  display: grid;
  gap: 4px;
  border-radius: 8px;
  padding: 10px 12px;
}

.auth-status.is-mail,
.auth-status.is-success {
  border: 1px solid rgba(18, 107, 82, 0.18);
  background: #edf7f2;
  color: #315748;
}

.auth-status.is-error {
  border: 1px solid rgba(172, 54, 54, 0.2);
  background: #fff0ee;
  color: #9b2d2d;
}

.auth-status.is-loading {
  border: 1px solid rgba(28, 47, 40, 0.1);
  background: #f5f7f5;
  color: var(--muted);
}

.auth-status strong {
  color: var(--green);
  font-weight: 900;
}

.auth-status.is-error strong {
  color: #9b2d2d;
}

.report-step[hidden],
.report-form .primary-action[hidden] {
  display: none;
}

.report-step {
  scroll-margin-top: 86px;
  animation: stepIn 180ms ease both;
}

.report-step.is-new {
  animation: stepPop 520ms ease both;
}

.visual-field.is-new,
.story-card.is-new textarea {
  border-color: rgba(18, 107, 82, 0.42);
  box-shadow: 0 0 0 3px rgba(18, 107, 82, 0.12);
}

@keyframes stepIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes stepPop {
  0% {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
  }

  55% {
    opacity: 1;
    transform: translateY(-2px) scale(1.01);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.place-search-box {
  display: grid;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7fbf8;
  padding: 12px;
}

.place-search-hero {
  display: flex;
  align-items: center;
  gap: 10px;
}

.place-search-hero > span {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 8px;
  background: var(--green);
  color: #fff;
  font-size: 22px;
  font-weight: 900;
}

.place-search-hero strong,
.visual-title strong {
  display: block;
  color: var(--ink);
  font-size: 15px;
}

.place-search-hero small {
  display: block;
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.selected-report-place {
  display: grid;
  grid-template-columns: 82px 1fr;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7fbf8;
  padding: 10px;
}

.selected-report-place.is-text-only {
  grid-template-columns: 82px 1fr;
}

.selected-report-place > img,
.selected-report-place > span {
  display: grid;
  width: 82px;
  height: 76px;
  place-items: center;
  overflow: hidden;
  border-radius: 7px;
  background: #eaf5ef;
  color: var(--green);
  font-size: 18px;
  font-weight: 900;
  object-fit: cover;
}

.selected-report-place strong,
.selected-report-place small,
.selected-report-place a {
  display: block;
}

.selected-report-place strong {
  color: var(--ink);
  font-size: 15px;
}

.selected-report-place small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.selected-report-place .map-source-link {
  display: inline-flex;
  margin-top: 8px;
}

.report-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.form-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.place-search-box .form-actions {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.secondary-action {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
  padding: 0 10px;
}

.inline-action {
  width: auto;
  min-height: 38px;
  margin-top: 0;
}

.report-place-status {
  justify-self: start;
  border-radius: 999px;
  background: #eaf5ef;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.4;
  padding: 5px 9px;
}

.report-results {
  display: grid;
  gap: 8px;
}

.report-results button {
  display: grid;
  grid-template-columns: 68px 1fr;
  gap: 10px;
  width: 100%;
  min-height: 84px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 10px;
  text-align: left;
}

.place-candidate-photo {
  display: grid;
  width: 68px;
  height: 64px;
  place-items: center;
  overflow: hidden;
  border-radius: 7px;
  background: #eaf5ef;
  color: var(--green);
  font-size: 18px;
  font-weight: 900;
  object-fit: cover;
}

.place-candidate-photo.is-empty {
  border: 1px solid rgba(18, 107, 82, 0.14);
}

.place-candidate-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.report-results span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.report-nearby-sheet {
  position: relative;
  display: none;
  grid-template-rows: auto minmax(0, 1fr);
  height: min(460px, 54vh);
  min-height: 260px;
  max-height: 460px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.99);
  box-shadow: 0 16px 42px rgba(28, 47, 40, 0.14);
}

.report-nearby-sheet.is-open {
  display: grid;
}

.report-nearby-sheet.is-open::after {
  position: absolute;
  right: 1px;
  bottom: 1px;
  left: 1px;
  height: 30px;
  border-radius: 0 0 8px 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), #fff 82%);
  content: "";
  pointer-events: none;
}

.nearby-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 12px 12px 10px 14px;
}

.nearby-sheet-head > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.nearby-sheet-head strong {
  color: var(--ink);
  font-size: 18px;
}

.nearby-sheet-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.nearby-sheet-head .icon-button {
  width: 34px;
  min-height: 0;
  height: 34px;
  padding: 0;
  box-shadow: none;
}

.nearby-sheet-body {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 10px 12px 22px;
  scrollbar-color: rgba(18, 107, 82, 0.34) transparent;
  scrollbar-width: thin;
}

.nearby-sheet-body::-webkit-scrollbar {
  width: 5px;
}

.nearby-sheet-body::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(18, 107, 82, 0.34);
}

.nearby-sheet-body .nearby-note {
  display: grid;
  min-height: 96px;
  place-items: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.nearby-sheet-body button {
  display: grid;
  grid-template-columns: 68px 1fr;
  gap: 10px;
  min-height: 86px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 10px;
  text-align: left;
}

.nearby-place-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.nearby-place-copy strong,
.nearby-place-copy small,
.nearby-place-copy em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nearby-place-copy small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.nearby-place-copy em {
  color: var(--green);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.visual-field {
  display: grid;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.visual-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.risk-picker {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.risk-card {
  display: flex;
  min-height: 74px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 10px;
}

.risk-card span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  background: #eef5f0;
  color: var(--green);
  font-size: 16px;
  font-weight: 900;
}

.risk-card strong {
  font-size: 15px;
  line-height: 1.2;
  text-align: center;
}

.risk-card.is-active {
  border-color: rgba(18, 107, 82, 0.35);
  background: #eaf5ef;
  box-shadow: inset 0 0 0 1px rgba(18, 107, 82, 0.12);
}

.story-card {
  display: grid;
}

.report-form input,
.report-form select,
.report-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  padding: 10px 11px;
}

.report-form textarea {
  min-height: 84px;
  resize: vertical;
}

.evidence-upload {
  position: relative;
  display: grid;
  gap: 8px;
  min-height: 124px;
  place-items: center;
  overflow: hidden;
  border: 1px dashed rgba(18, 107, 82, 0.36);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(234, 245, 239, 0.94), rgba(255, 255, 255, 0.98)),
    repeating-linear-gradient(90deg, rgba(18, 107, 82, 0.08) 0 1px, transparent 1px 18px);
  color: var(--ink);
  padding: 14px;
  text-align: center;
}

.evidence-upload.is-compact {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-style: solid;
  background: #fff;
  padding: 0 12px;
}

.evidence-upload input {
  position: absolute;
  inset: 0;
  cursor: pointer;
  opacity: 0;
}

.evidence-upload strong {
  font-size: 14px;
}

.evidence-upload small {
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 860px) {
  .search-header {
    grid-template-columns: 1fr;
    top: 10px;
    padding: 0 10px;
  }

  .radar-panel {
    top: auto;
    right: 12px;
    bottom: 12px;
    left: 12px;
    width: auto;
    max-height: 82px;
    padding: 12px;
    overflow: hidden;
  }

  .panel-title {
    margin-bottom: 0;
  }

  .panel-title strong {
    font-size: 17px;
  }

  .chip-row {
    flex-wrap: nowrap;
    gap: 7px;
    margin-bottom: 8px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .chip-row::-webkit-scrollbar {
    display: none;
  }

  .chip-row button {
    flex: 0 0 auto;
    min-height: 30px;
    padding: 0 10px;
    white-space: nowrap;
  }

  .risk-row {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: 0;
  }

  .area-alerts {
    display: none;
  }

  .report-open .search-header {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
  }

  .report-open .search-header * {
    pointer-events: none;
  }

  .place-drawer {
    top: auto;
    right: 10px;
    bottom: 44px;
    left: 10px;
    width: auto;
    max-height: 54%;
    transform: translateY(18px);
  }

  .place-drawer.is-open {
    transform: translateY(0);
  }

  .place-drawer.is-report {
    position: fixed;
    top: 10px !important;
    right: 8px !important;
    bottom: 10px !important;
    left: 8px !important;
    width: auto !important;
    max-width: none;
    max-height: none;
    overflow-x: hidden;
    padding: 18px;
  }

  .place-drawer.is-report .drawer-head {
    top: -18px;
  }

  .place-drawer.is-report .report-form {
    gap: 14px;
    min-width: 0;
  }

  .place-drawer.is-report .place-search-box,
  .place-drawer.is-report .visual-field {
    min-width: 0;
    padding: 14px;
  }

  .place-drawer.is-report .report-nearby-sheet {
    height: min(430px, 46vh);
  }

  .place-drawer.is-report .risk-card {
    min-height: 86px;
  }

  .place-drawer.is-report .report-form input,
  .place-drawer.is-report .report-form textarea {
    padding: 13px;
  }

  .place-drawer.is-report .report-form textarea {
    min-height: 118px;
  }

  .place-drawer.is-report .primary-action {
    min-height: 50px;
    font-size: 16px;
  }

  .locate-button {
    right: 12px;
    bottom: 18px;
  }

  .report-button {
    bottom: 18px;
    left: 50%;
    min-height: 44px;
    padding: 0 18px;
  }

  .risk-card {
    min-height: 66px;
  }
}

@media (min-width: 861px) and (max-width: 1180px) {
  .place-drawer {
    top: 18px;
    right: 18px;
    width: min(360px, calc(100vw - 420px));
  }
}

@media (max-width: 560px) {
  .search-wrap {
    grid-template-columns: 1fr auto;
    min-height: 46px;
    padding-left: 12px;
  }

  .search-wrap span {
    display: none;
  }

  .photo-strip {
    grid-template-columns: 1fr;
  }

  .risk-picker {
    grid-template-columns: 1fr 1fr;
  }

  .place-drawer.is-report {
    inset: 0 !important;
    width: 100% !important;
    max-width: none;
    overflow-x: hidden;
    border-radius: 0;
    padding: 16px 14px;
  }

  .place-drawer.is-report .drawer-head {
    top: -16px;
    margin: -16px -14px 14px;
    padding: 16px 14px 12px;
  }

  .place-drawer.is-report .form-actions,
  .place-drawer.is-report .risk-picker {
    grid-template-columns: 1fr;
  }
}
