:root {
  --bg: #f4f6f8;
  --panel: #ffffff;
  --line: #d8dee6;
  --text: #111827;
  --muted: #6b7280;
  --soft: #eef2f7;
  --blue: #2563eb;
  --purple: #7c3aed;
  --green: #16a34a;
  --orange: #f97316;
  --gray: #6b7280;
  --amber: #d97706;
  --danger: #dc2626;
  --shadow: 0 16px 40px rgba(15, 23, 42, 0.15);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans KR", "Apple SD Gothic Neo", sans-serif;
  overflow-x: hidden;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  padding: 14px 20px 12px;
}

.title-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(20px, 3vw, 28px);
  line-height: 1.2;
}

h2 {
  font-size: 18px;
}

h3 {
  font-size: 17px;
}

.header-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.header-actions {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.header-link {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--text);
  color: #fff;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.header-link:hover {
  background: #374151;
}

.filters {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.mobile-filter-toggle,
.mobile-view-tabs {
  display: none;
}

.filter-group,
.filter-field {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 8px 10px;
}

.filter-group {
  margin: 0;
}

.filter-group legend,
.filter-field span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.filter-group legend {
  padding: 0 4px;
}

.filter-group label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
}

.filter-field select {
  min-width: 96px;
  border: 0;
  background: transparent;
  color: var(--text);
  outline: 0;
}

.toggle-field {
  gap: 7px;
}

.toggle-field input {
  width: 16px;
  height: 16px;
  accent-color: var(--blue);
}

.filter-range {
  min-width: 260px;
}

.filter-range input {
  width: 140px;
  accent-color: var(--blue);
}

.filter-range strong {
  min-width: 64px;
  text-align: right;
  font-size: 13px;
}

main {
  padding: 16px 20px 32px;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(340px, 430px) minmax(0, 1fr);
  gap: 16px;
  min-height: 680px;
  height: calc(100vh - 132px);
}

.list-panel,
.map-area,
.info-section {
  border: 1px solid var(--line);
  background: var(--panel);
}

.list-panel {
  display: flex;
  min-height: 0;
  flex-direction: column;
  border-radius: 8px;
  overflow: hidden;
}

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

.list-heading p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.plain-button,
.icon-button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
}

.plain-button {
  min-height: 36px;
  padding: 0 12px;
}

.plain-button:hover,
.icon-button:hover {
  background: var(--soft);
}

.listing-list {
  min-height: 0;
  overflow: auto;
  padding: 12px;
}

.listing-card {
  display: grid;
  grid-template-columns: 104px 1fr;
  gap: 12px;
  width: 100%;
  margin: 0 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
  text-align: left;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.listing-card:hover,
.listing-card.is-hover,
.listing-card.is-active {
  border-color: var(--blue);
  box-shadow: 0 8px 22px rgba(37, 99, 235, 0.14);
  transform: translateY(-1px);
}

.listing-card.is-active {
  outline: 2px solid rgba(37, 99, 235, 0.16);
}

.thumb {
  width: 104px;
  height: 92px;
  overflow: hidden;
  border-radius: 6px;
  background: var(--soft);
}

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

.thumb-placeholder {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  color: var(--muted);
  font-size: 12px;
}

.card-title-row,
.badge-row,
.price-row,
.meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.card-title-row {
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.card-title {
  font-size: 16px;
  font-weight: 800;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border-radius: 999px;
  padding: 0 8px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.badge-rank {
  background: #d6336c;
}

.badge-region-14 {
  background: var(--blue);
}

.badge-region-15 {
  background: var(--purple);
}

.status-sale {
  background: var(--green);
}

.status-done {
  background: var(--gray);
}

.status-auction {
  background: var(--orange);
}

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

.price-row {
  margin-top: 7px;
  font-size: 14px;
  font-weight: 800;
}

.price-row span {
  white-space: nowrap;
}

.meta-row {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.badge-new {
  background: #e11d48;
  letter-spacing: 0.04em;
  box-shadow: 0 2px 8px rgba(225, 29, 72, 0.35);
}

.badge-updated {
  background: #0891b2;
}

.exclude-summary {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12.5px;
}

.link-button {
  border: 0;
  background: none;
  padding: 0;
  color: var(--blue);
  font-weight: 700;
  text-decoration: underline;
}

.card-wrap {
  margin: 0 0 12px;
}

.card-wrap .listing-card {
  width: 100%;
  margin: 0;
}

.card-actions {
  display: flex;
  justify-content: flex-end;
  padding: 4px 2px 0;
}

.exclude-btn {
  min-height: 28px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 700;
  opacity: 0.62;
  transition: opacity 0.15s ease, background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.card-wrap:hover .exclude-btn,
.exclude-btn:focus-visible {
  opacity: 1;
}

.exclude-btn:hover {
  background: var(--soft);
}

.exclude-btn.is-on {
  opacity: 1;
  background: #fee2e2;
  color: var(--danger);
  border-color: #fecaca;
}

.card-wrap.is-excluded .listing-card {
  opacity: 0.5;
  filter: grayscale(0.35);
}

.map-area {
  position: relative;
  min-height: 520px;
  border-radius: 8px;
  overflow: hidden;
}

#map {
  width: 100%;
  height: 100%;
  min-height: 520px;
}

.map-pin {
  position: relative;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 3px solid #fff;
  border-radius: 50% 50% 50% 0;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.22);
  transform: rotate(-45deg);
}

.map-pin span {
  transform: rotate(45deg);
}

.map-pin.is-done {
  opacity: 0.48;
  filter: grayscale(0.15);
}

.map-pin.is-approx {
  border-style: dashed;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.18), 0 8px 18px rgba(15, 23, 42, 0.22);
}

.map-pin.is-active,
.map-pin.is-hover {
  width: 42px;
  height: 42px;
  border-width: 4px;
  box-shadow: 0 0 0 6px rgba(37, 99, 235, 0.2), 0 12px 24px rgba(15, 23, 42, 0.28);
}

.map-pin.is-new {
  border-color: #ffe4e6;
  box-shadow: 0 0 0 4px rgba(225, 29, 72, 0.4), 0 8px 18px rgba(15, 23, 42, 0.22);
}

.map-pin.is-excluded {
  opacity: 0.32;
  filter: grayscale(0.6);
}

.pin-new-tag {
  position: absolute;
  top: -9px;
  right: -9px;
  display: grid;
  width: 16px;
  height: 16px;
  place-items: center;
  border-radius: 50%;
  background: #e11d48;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  font-style: normal;
  transform: rotate(45deg);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.3);
}

.pin-box {
  position: relative;
  display: inline-block;
}

.pin-jibun {
  position: absolute;
  top: calc(100% + 2px);
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  padding: 0 5px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--text);
  font-size: 10px;
  font-weight: 800;
  line-height: 15px;
  box-shadow: 0 2px 5px rgba(15, 23, 42, 0.18);
  pointer-events: none;
}

.poi-marker {
  display: flex;
  align-items: center;
  gap: 5px;
  width: max-content;
  filter: drop-shadow(0 6px 12px rgba(15, 23, 42, 0.18));
}

.poi-symbol {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.poi-label {
  display: grid;
  min-height: 30px;
  align-content: center;
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--text);
  padding: 3px 7px;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.15;
  white-space: nowrap;
}

.poi-label em {
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
}

.poi-station-live .poi-symbol {
  background: #0ea5e9;
}

.poi-station-planned .poi-symbol {
  width: 36px;
  border: 2px dashed var(--gray);
  background: #f3f4f6;
  color: #4b5563;
  font-size: 10px;
}

.poi-station-planned .poi-label {
  border-style: dashed;
  color: #4b5563;
}

.poi-landmark-park .poi-symbol {
  background: #15803d;
}

.poi-landmark-kids .poi-symbol,
.poi-landmark-market .poi-symbol {
  background: var(--orange);
}

.poi-landmark-school .poi-symbol {
  background: #0891b2;
}

.poi-landmark-newapt .poi-symbol {
  background: #9333ea;
}

.poi-landmark-etc .poi-symbol {
  background: var(--gray);
}

.poi-marker.is-approx .poi-label {
  background: rgba(255, 251, 235, 0.96);
}

.map-legend {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 450;
  display: grid;
  gap: 6px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.95);
  padding: 10px;
  color: var(--text);
  font-size: 12px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
  pointer-events: none;
}

.map-legend strong {
  font-size: 13px;
}

.map-legend span {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 800;
}

.map-legend em {
  color: var(--muted);
  font-style: normal;
  font-weight: 800;
}

.legend-swatch {
  width: 16px;
  height: 10px;
  border: 2px solid currentColor;
  border-radius: 3px;
  background: currentColor;
  opacity: 0.7;
}

.legend-14 {
  color: var(--blue);
}

.legend-15 {
  color: var(--purple);
}

.region-boundary-label {
  border: 1px solid rgba(15, 23, 42, 0.18);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--text);
  padding: 4px 7px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.14);
}

.region-boundary-label strong {
  display: block;
  font-size: 13px;
}

.detail-panel {
  position: absolute;
  top: 14px;
  right: 14px;
  bottom: 14px;
  z-index: 500;
  width: min(440px, calc(100% - 28px));
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  transform: translateX(calc(100% + 24px));
  transition: transform 0.2s ease;
}

.detail-panel.is-open {
  transform: translateX(0);
}

.empty-detail {
  display: grid;
  min-height: 100%;
  place-items: center;
  gap: 8px;
  padding: 24px;
  text-align: center;
}

.empty-detail span {
  color: var(--muted);
  font-size: 14px;
}

.detail-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 14px;
}

.detail-subtitle {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.icon-button {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
}

.gallery {
  padding: 14px;
}

.accuracy-alert {
  display: grid;
  gap: 4px;
  margin: 14px 14px 0;
  border: 1px solid #f59e0b;
  border-radius: 8px;
  background: #fffbeb;
  color: #78350f;
  padding: 10px;
  line-height: 1.45;
}

.accuracy-alert strong {
  font-size: 14px;
}

.accuracy-alert span {
  font-size: 13px;
}

.detail-address {
  display: grid;
  gap: 4px;
  margin: 14px 14px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
}

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

.detail-address strong {
  font-size: 14px;
}

.detail-address em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.4;
}

.gallery-main {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: var(--soft);
  aspect-ratio: 4 / 3;
}

.gallery-main img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
}

.gallery-controls button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 0 10px;
}

.gallery-controls button:disabled {
  cursor: default;
  opacity: 0.42;
}

.detail-body {
  padding: 0 14px 16px;
}

.detail-block {
  border-top: 1px solid var(--line);
  padding: 14px 0;
}

.detail-block:first-child {
  border-top: 0;
}

.detail-block h4 {
  margin: 0 0 10px;
  font-size: 15px;
}

.info-table {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.info-cell {
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px;
}

.info-cell dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.info-cell dd {
  margin: 5px 0 0;
  font-size: 14px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.calc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.calc-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.calc-grid input {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
}

.calc-result {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.result-box {
  border-radius: 8px;
  background: var(--soft);
  padding: 10px;
}

.result-box span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.result-box strong {
  display: block;
  margin-top: 5px;
  font-size: 18px;
}

.estimate-label {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #fff7ed;
  color: #9a3412;
  font-size: 12px;
  font-weight: 800;
  padding: 3px 8px;
}

.compare-label {
  background: #eef2ff;
  color: #3730a3;
}

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

.calc-head h4 {
  margin-bottom: 0;
}

.benchmark-hint {
  max-width: 220px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  text-align: right;
}

.source-list {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

.source-list a {
  color: var(--blue);
  font-weight: 800;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.source-list a:hover {
  text-decoration: underline;
}

.note-box {
  border-radius: 8px;
  background: #fff7ed;
  color: #7c2d12;
  padding: 10px;
  line-height: 1.5;
}

.owner-cash-block h4 {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.cash-guide,
.owner-note {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
}

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

.cash-cell {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  padding: 10px;
}

.cash-cell dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.cash-cell dd {
  margin: 5px 0 3px;
  font-size: 17px;
  font-weight: 900;
}

.cash-cell span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.live-by-block {
  display: grid;
  gap: 5px;
  margin: 10px 0;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
  color: #1e3a8a;
  padding: 10px;
  line-height: 1.45;
}

.live-by-block strong {
  font-size: 13px;
}

.live-by-block span {
  font-size: 13px;
  font-weight: 800;
}

.loading-error,
.empty-list {
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  padding: 18px;
  line-height: 1.5;
}

.info-section {
  margin-top: 16px;
  border-radius: 8px;
  padding: 18px;
}

.section-title {
  margin-bottom: 14px;
}

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

.region-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.region-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.region-card dl {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 8px 10px;
  margin: 0;
}

.region-card dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.region-card dd {
  margin: 0;
  line-height: 1.45;
}

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

.term-grid div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.term-grid dt {
  font-weight: 900;
}

.term-grid dd {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.progress-page {
  max-width: 1180px;
  margin: 0 auto;
}

.progress-summary p,
.section-note {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.section-note {
  font-size: 13px;
  font-weight: 700;
}

.progress-region-list {
  display: grid;
  gap: 14px;
}

.progress-region {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}

.progress-region-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.progress-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 14px;
}

.progress-stat {
  min-height: 74px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  padding: 10px;
}

.progress-stat dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.progress-stat dd {
  margin: 6px 0 0;
  font-weight: 900;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.progress-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 14px;
}

.progress-columns h4 {
  margin: 0 0 10px;
  font-size: 15px;
}

.unit-mix {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}

.unit-mix-row {
  display: grid;
  grid-template-columns: 138px minmax(0, 1fr) 84px;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.unit-mix-row span,
.unit-mix-row strong {
  overflow-wrap: anywhere;
}

.unit-bar {
  height: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--soft);
}

.unit-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--purple));
}

.timeline-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline-list li {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 9px;
}

.timeline-list li.is-done {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.timeline-list li.is-upcoming {
  border-style: dashed;
}

.timeline-date {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.timeline-event {
  line-height: 1.4;
}

.timeline-list strong {
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.timeline-list li.is-done strong {
  color: var(--green);
}

.caution-grid,
.agent-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.caution-card,
.agent-card,
.checklist-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.caution-card h3,
.agent-card h3,
.checklist-panel h3 {
  margin: 0 0 8px;
  font-size: 15px;
}

.caution-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.agent-card {
  position: relative;
}

.agent-rank {
  display: inline-grid;
  min-width: 32px;
  height: 28px;
  place-items: center;
  border-radius: 999px;
  background: var(--text);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  margin-bottom: 8px;
}

.agent-phone {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 0 0 10px;
  font-weight: 900;
}

.agent-phone a {
  color: var(--blue);
  text-decoration: none;
}

.agent-phone a:hover {
  text-decoration: underline;
}

.phone-separator {
  color: var(--muted);
}

.agent-card dl {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 6px 8px;
  margin: 0;
}

.agent-card dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.agent-card dd {
  margin: 0;
  line-height: 1.45;
}

.checklist-panel {
  margin-top: 12px;
}

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

.check-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  padding: 9px;
  line-height: 1.45;
}

.check-item input {
  margin-top: 3px;
  accent-color: var(--blue);
}

@media (max-width: 1100px) {
  .workspace {
    grid-template-columns: 1fr;
    height: auto;
  }

  .list-panel {
    max-height: 520px;
  }

  .map-area,
  #map {
    min-height: 560px;
  }

  .region-grid,
  .term-grid,
  .progress-stat-grid,
  .caution-grid,
  .agent-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .progress-columns,
  .call-checklist {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  html,
  body {
    width: 100%;
    overflow-x: hidden;
  }

  .app-header,
  main {
    padding-left: 12px;
    padding-right: 12px;
  }

  .app-header {
    padding-top: 10px;
    padding-bottom: 10px;
  }

  main {
    overflow-x: hidden;
  }

  .title-row {
    display: block;
    margin-bottom: 10px;
  }

  h1 {
    font-size: 20px;
  }

  .header-note {
    margin-top: 8px;
    white-space: normal;
  }

  .header-actions {
    justify-content: flex-start;
    margin-top: 10px;
  }

  .header-link {
    min-height: 44px;
    padding: 0 14px;
  }

  .mobile-filter-toggle {
    display: flex;
    width: 100%;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--text);
    color: #fff;
    font-weight: 900;
  }

  .filters {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: 8px;
    margin-top: 8px;
  }

  .filters.is-collapsed .filter-group,
  .filters.is-collapsed .filter-field:not(.quick-filter) {
    display: none;
  }

  .filter-field,
  .filter-group,
  .filter-range {
    min-width: 0;
    width: 100%;
    min-inline-size: 0;
  }

  .filter-field {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }

  .filter-field select {
    width: 100%;
    min-width: 0;
    min-height: 30px;
  }

  .filter-group,
  .filter-range,
  .toggle-field {
    grid-column: 1 / -1;
  }

  .filter-group {
    flex-wrap: wrap;
  }

  .filter-group label {
    min-height: 32px;
  }

  .filter-range input {
    flex: 1;
    min-width: 0;
    width: auto;
  }

  .mobile-view-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 10px;
  }

  .mobile-view-tabs button {
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--text);
    font-weight: 900;
  }

  .mobile-view-tabs button.is-active {
    border-color: var(--blue);
    background: var(--blue);
    color: #fff;
  }

  .workspace {
    display: block;
    min-height: 0;
    height: auto;
  }

  .workspace.view-list .map-area {
    height: 0;
    min-height: 0;
    overflow: visible;
    border: 0;
  }

  .workspace.view-list .map-area #map,
  .workspace.view-list .map-legend {
    display: none;
  }

  .workspace.view-map .list-panel {
    display: none;
  }

  .list-panel {
    max-height: none;
    min-height: calc(100vh - 176px);
  }

  .list-heading {
    align-items: flex-start;
    padding: 12px;
  }

  .plain-button {
    min-height: 44px;
  }

  .listing-list {
    padding: 10px;
  }

  .listing-card {
    grid-template-columns: 84px minmax(0, 1fr);
    gap: 10px;
    padding: 10px;
  }

  .thumb {
    width: 84px;
    height: 82px;
  }

  .card-title-row {
    align-items: flex-start;
  }

  .card-title {
    font-size: 15px;
    overflow-wrap: anywhere;
  }

  .price-row {
    font-size: 13.5px;
  }

  .price-row span {
    white-space: normal;
  }

  .meta-row {
    font-size: 12.5px;
  }

  .badge {
    min-height: 24px;
  }

  .card-actions {
    padding: 6px 0 0;
  }

  .exclude-btn {
    width: 100%;
    min-height: 44px;
    border-radius: 8px;
    font-size: 14px;
    opacity: 1;
  }

  .map-area,
  #map {
    height: 60vh;
    min-height: 60vh;
  }

  .map-legend {
    right: 8px;
    bottom: 8px;
    left: 8px;
    max-width: calc(100% - 16px);
    font-size: 11px;
  }

  .detail-panel {
    position: fixed;
    inset: 8vh 0 0;
    z-index: 900;
    width: 100%;
    max-height: none;
    border-width: 1px 0 0;
    border-radius: 16px 16px 0 0;
    transform: translateY(100%);
  }

  .detail-panel.is-open {
    transform: translateY(0);
  }

  .detail-header {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #fff;
    padding: 12px;
  }

  .detail-header h3 {
    font-size: 16px;
  }

  .icon-button {
    width: 48px;
    height: 48px;
    font-size: 24px;
  }

  .gallery {
    padding: 12px;
  }

  .gallery-main {
    touch-action: pan-y;
  }

  .gallery-controls button {
    min-width: 72px;
    min-height: 44px;
  }

  .detail-body {
    padding: 0 12px 18px;
  }

  .accuracy-alert,
  .detail-address {
    margin: 12px 12px 0;
  }

  .info-table,
  .calc-grid,
  .calc-result,
  .cash-grid,
  .region-grid,
  .term-grid,
  .progress-stat-grid,
  .caution-grid,
  .agent-grid {
    grid-template-columns: 1fr;
  }

  .unit-mix-row,
  .timeline-list li {
    grid-template-columns: 1fr;
  }

  .timeline-list strong {
    text-align: left;
  }

  .calc-head {
    display: block;
  }

  .benchmark-hint {
    max-width: none;
    margin-top: 6px;
    text-align: left;
  }

  .region-card dl {
    grid-template-columns: 82px 1fr;
  }
}

/* 주소 특정 반영: 등급 배지 · 교차검증 안내 · 식별근거 · 갤러리 캡션 */
.addr-grade {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  vertical-align: middle;
}
.addr-grade-ok { background: #dcfce7; color: #15803d; }
.addr-grade-mid { background: #dbeafe; color: #1d4ed8; }
.addr-grade-warn { background: #ffedd5; color: #c2410c; }
.accuracy-ok {
  margin: 6px 0 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  font-size: 12px;
  color: #166534;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.addr-basis {
  margin: 4px 0 8px;
  font-size: 12px;
  color: #475569;
}
.addr-basis summary { cursor: pointer; color: #2563eb; }
.addr-basis p { margin: 6px 0 0; line-height: 1.5; }
.gallery-caption {
  margin-top: 4px;
  font-size: 12px;
  color: #64748b;
  text-align: center;
}
