:root {
  --bg: #f7f5ef;
  --panel: #fffdf8;
  --panel-strong: #f0eadf;
  --ink: #24231f;
  --muted: #6d675d;
  --line: #ded6c8;
  --accent: #277566;
  --accent-dark: #15594b;
  --sun: #d18f2f;
  --rose: #bb5b61;
  --blue: #456f9e;
  --shadow: 0 18px 50px rgba(36, 35, 31, 0.16);
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "Apple SD Gothic Neo", "Noto Sans KR",
    sans-serif;
}

* {
  box-sizing: border-box;
}

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

button,
select {
  font: inherit;
}

.app-shell {
  display: grid;
  grid-template-columns: 380px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 100vh;
  padding: 22px;
  overflow-y: auto;
  background: var(--panel);
  border-right: 1px solid var(--line);
  z-index: 2;
}

.brand-area h1 {
  margin: 4px 0 10px;
  font-size: 32px;
  line-height: 1.1;
}

.eyebrow {
  margin: 0;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.intro {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.55;
}

.report-button,
.text-button,
.place-list-item,
.icon-button {
  cursor: pointer;
}

.report-button {
  width: 100%;
  min-height: 46px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: var(--accent);
  font-weight: 800;
}

.report-button:hover {
  background: var(--accent-dark);
}

.filter-panel,
.place-list-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.section-heading h2 {
  margin: 0;
  font-size: 18px;
}

.text-button {
  border: 0;
  color: var(--accent-dark);
  background: transparent;
  font-size: 14px;
  font-weight: 700;
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}

.filter-group label,
.filter-group legend {
  width: 100%;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.filter-group select {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
}

.checkbox-pill {
  width: auto;
}

.checkbox-pill input {
  position: absolute;
  opacity: 0;
}

.checkbox-pill span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
}

.checkbox-pill input:checked + span {
  border-color: var(--accent);
  color: #fff;
  background: var(--accent);
}

.result-count {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

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

.place-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 72px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  text-align: left;
  background: #fff;
}

.place-list-item:hover,
.place-list-item.is-selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(39, 117, 102, 0.14);
}

.place-list-item strong,
.place-list-item small {
  display: block;
}

.place-list-item small {
  margin-top: 4px;
  color: var(--muted);
}

.status-badge {
  flex: none;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 9px;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.status-reported {
  background: var(--blue);
}

.status-needs-check {
  background: var(--sun);
}

.status-verified {
  background: var(--accent);
}

.map-area {
  position: relative;
  min-width: 0;
  min-height: 100vh;
}

#map {
  position: absolute;
  inset: 0;
}

.map-marker {
  width: 28px;
  height: 28px;
  border: 3px solid #fff;
  border-radius: 50% 50% 50% 8px;
  box-shadow: 0 7px 18px rgba(0, 0, 0, 0.25);
  transform: rotate(-45deg);
}

.map-marker::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background: #fff;
}

.map-marker.is-selected {
  width: 34px;
  height: 34px;
  border-color: #24231f;
}

.place-detail-card {
  position: absolute;
  right: 22px;
  bottom: 22px;
  width: min(420px, calc(100% - 44px));
  max-height: calc(100vh - 44px);
  overflow-y: auto;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.96);
  box-shadow: var(--shadow);
}

.detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.place-detail-card h2 {
  margin: 12px 0 8px;
  font-size: 22px;
  line-height: 1.25;
}

.address,
.notes,
.source,
.empty-state {
  color: var(--muted);
  line-height: 1.5;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0;
}

.detail-grid div {
  min-height: 70px;
  padding: 12px;
  border-radius: 8px;
  background: var(--panel-strong);
}

.detail-grid dt {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.detail-grid dd {
  margin: 0;
  line-height: 1.4;
}

.tag-block {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag-block span {
  padding: 7px 9px;
  border-radius: 999px;
  background: #ece6da;
  font-size: 12px;
  font-weight: 700;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(36, 35, 31, 0.54);
  z-index: 10;
}

.modal-backdrop[aria-hidden="false"] {
  display: flex;
}

.modal-panel {
  position: relative;
  width: min(480px, 100%);
  padding: 28px;
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.modal-panel h2 {
  margin: 8px 0 12px;
}

.modal-note {
  padding: 12px;
  border-radius: 8px;
  background: var(--panel-strong);
  color: var(--muted);
  line-height: 1.5;
}

.icon-button {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  font-size: 24px;
  line-height: 1;
}

@media (max-width: 860px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    min-height: auto;
    max-height: none;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .map-area {
    display: flex;
    flex-direction: column;
    min-height: auto;
  }

  #map {
    position: relative;
    inset: auto;
    min-height: 420px;
    height: 62vh;
  }

  .place-detail-card {
    position: relative;
    right: auto;
    bottom: auto;
    width: auto;
    max-height: none;
    margin: 12px;
  }
}

@media (max-width: 520px) {
  .sidebar {
    padding: 16px;
  }

  .brand-area h1 {
    font-size: 28px;
  }

  .place-list-item {
    align-items: flex-start;
    flex-direction: column;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }
}
