.info-mongddang-page {
  --ink: #1c2433;
  --muted: #667085;
  --line: #d8dee8;
  --panel: #f0f1f3;
  --panel-strong: #e5e7eb;
  --blue: #4568c8;
  --blue-soft: #dfe8ff;
  --rose: #e8d4d7;
  --bg: #f8fafc;
}

* {
  box-sizing: border-box;
}

.info-mongddang-page {
  color: var(--ink);
  background: var(--bg);
  font-family: "Segoe UI", "Malgun Gothic", Arial, sans-serif;
  padding: 1px 0 40px;
}

.info-mongddang-page .topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(18px, 4vw, 48px);
  color: #fff;
  background: linear-gradient(115deg, #2f73d8, #3d67d0 54%, #6d4ec7);
}

.info-mongddang-page .eyebrow {
  margin: 0 0 4px;
  font-size: 14px;
  opacity: .9;
}

.info-mongddang-page h1,
.info-mongddang-page h2,
.info-mongddang-page h3,
.info-mongddang-page h4,
.info-mongddang-page p {
  margin: 0;
}

.info-mongddang-page h1 {
  font-size: 30px;
  letter-spacing: 0;
}

.status {
  padding: 10px 14px;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 8px;
  background: rgba(255,255,255,.12);
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}

.dashboard {
  width: min(1180px, calc(100% - 28px));
  margin: 22px auto 48px;
}

.hero,
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.hero {
  display: grid;
  grid-template-columns: 1.35fr .9fr;
  grid-template-areas:
    "title list"
    "map list";
  gap: 18px;
  padding: 22px;
}

.hero-title {
  grid-area: title;
  text-align: center;
}

.hero-title p {
  font-weight: 900;
  color: var(--blue);
}

.hero-title h2 {
  margin-top: 8px;
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1.18;
}

.seoul-map {
  grid-area: map;
  min-height: 430px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#seoulSvg {
  width: 100%;
  max-width: 650px;
  height: auto;
  filter: drop-shadow(0 12px 12px rgba(22, 34, 54, .16));
}

.district-shape {
  fill: rgba(255, 255, 255, .96);
  stroke: #1a2333;
  stroke-width: 3;
  vector-effect: non-scaling-stroke;
  cursor: pointer;
  transition: fill .15s ease, filter .15s ease;
}

.district-shape.has-results:not(.active) {
  fill: var(--blue-soft);
}

.district-shape:hover,
.district-shape.active {
  fill: var(--blue);
}

.district-label,
.district-count {
  pointer-events: none;
  text-anchor: middle;
  paint-order: stroke;
  stroke: rgba(255, 255, 255, .9);
  stroke-width: 5px;
  stroke-linejoin: round;
}

.district-label {
  fill: #111827;
  font-size: 20px;
  font-weight: 900;
}

.district-count {
  fill: #27344a;
  font-size: 14px;
  font-weight: 900;
}

.district-label.active,
.district-count.active {
  fill: #fff;
  stroke: rgba(69, 104, 200, .55);
}

.district-panel {
  grid-area: list;
  padding: 20px;
  background: rgba(255,255,255,.62);
  border-radius: 8px;
  min-height: 460px;
}

.district-panel h3 {
  font-size: 24px;
}

.district-panel p {
  margin-top: 8px;
  color: var(--muted);
  font-weight: 700;
}

.business-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 12px;
  max-height: 540px;
  overflow: auto;
}

.business-toolbar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  margin-top: 16px;
}

.business-toolbar input {
  width: 100%;
  min-height: 42px;
  padding: 0 14px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #c8d4e5;
  border-radius: 999px;
  font: inherit;
  font-weight: 800;
}

.business-toolbar input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(69, 104, 200, .14);
  outline: 0;
}

.business-toolbar span {
  min-width: 58px;
  padding: 9px 11px;
  color: #27344a;
  background: var(--blue-soft);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
  text-align: center;
  white-space: nowrap;
}

.info-mongddang-page button,
.info-mongddang-page .real-price-link {
  min-height: 38px;
  border: 1px solid #c9d1df;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  text-decoration: none;
}

.business-chip {
  display: grid;
  grid-template-columns: minmax(180px, 1.6fr) minmax(100px, .8fr) minmax(120px, 1fr) 92px;
  gap: 10px;
  align-items: center;
  padding: 11px 14px;
  text-align: left;
  background: #fff;
  border-radius: 8px;
  transition: border-color .14s ease, box-shadow .14s ease, transform .14s ease;
}

.business-chip:hover {
  border-color: var(--blue);
  box-shadow: 0 8px 22px rgba(31, 41, 55, .10);
  transform: translateY(-1px);
}

.business-chip .business-row-name,
.business-chip .business-row-detail,
.business-chip .business-row-stage {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.business-chip .business-row-name {
  font-weight: 900;
}

.business-chip .business-row-stage {
  color: #fff;
  justify-self: start;
  max-width: 100%;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--blue);
  font-size: 12px;
  font-weight: 900;
}

.business-chip .business-row-detail,
.business-chip time {
  color: #694f55;
  font-size: 12px;
  font-weight: 800;
}

.business-chip.active {
  color: #fff;
  background: var(--blue);
}

.business-chip.active span {
  color: #eff4ff;
}

.business-list-help {
  margin-top: 14px;
  color: var(--muted);
  font-weight: 800;
  text-align: center;
}

.district-panel {
  position: relative;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 18px;
}

.panel {
  padding: 20px;
}

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

.kicker {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.panel h3 {
  margin-top: 6px;
  font-size: 24px;
}

.stage-line {
  margin-top: 14px;
  font-size: 18px;
  font-weight: 900;
}

.real-price-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  background: var(--rose);
  white-space: nowrap;
}

.real-price-link.source-link {
  background: #eaf1ff;
  border-color: #b8c7e8;
  color: #23385f;
}

.business-modal-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.business-modal-actions button {
  padding: 0 16px;
  background: var(--blue-soft);
}

.timeline {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  max-height: 360px;
  overflow: auto;
}

.timeline-row {
  display: grid;
  grid-template-columns: 92px 130px 150px 1fr;
  gap: 10px;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.timeline-row time,
.timeline-row span,
.timeline-row p {
  color: var(--muted);
  font-size: 13px;
}

.review-panel button,
#reloadNewsBtn,
.pin-button,
.modal-card button {
  padding: 0 14px;
}

.stars {
  margin-top: 18px;
  font-size: 26px;
  letter-spacing: 0;
}

.star.full {
  color: #1f2937;
}

.star.half {
  color: #5f6f8e;
}

.star.empty {
  color: #c9ced8;
}

.review-comment {
  margin-top: 16px;
  white-space: pre-wrap;
  line-height: 1.6;
}

.news-panel {
  margin-top: 18px;
}

.local-news-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.local-news-card {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  color: var(--ink);
  text-decoration: none;
  background: #fff;
  border: 1px solid #cdd8ea;
  border-left: 5px solid var(--blue);
  border-radius: 8px;
}

.local-news-card strong {
  font-size: 16px;
  line-height: 1.35;
}

.local-news-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.info-trend-chart {
  margin-top: 14px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.info-trend-svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.info-trend-svg line {
  stroke: #aab6c9;
  stroke-width: 2;
}

.info-trend-svg .grid {
  stroke: #e4e9f2;
}

.info-trend-svg polyline {
  fill: none;
  stroke: var(--blue);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.info-trend-svg circle {
  fill: #fff;
  stroke: var(--blue);
  stroke-width: 4;
}

.info-trend-svg text {
  fill: var(--ink);
  font-weight: 900;
}

.info-trend-svg .amount {
  font-size: 20px;
}

.info-trend-svg .month {
  fill: var(--muted);
  font-size: 16px;
}

.info-trend-range {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.info-trend-range span {
  padding: 6px 10px;
  color: #27344a;
  background: var(--blue-soft);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
}

.info-transaction-table {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.info-transaction-table div {
  display: grid;
  grid-template-columns: 92px 1fr 160px 120px;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.info-transaction-table time,
.info-transaction-table span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.info-transaction-table strong,
.info-transaction-table em {
  font-style: normal;
  font-weight: 900;
}

.news-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-top: 22px;
}

.news-columns h4 {
  margin-bottom: 12px;
}

.news-list {
  display: grid;
  gap: 10px;
}

.news-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.news-card a {
  color: var(--ink);
  font-weight: 900;
  text-decoration: none;
}

.news-card p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.pin-button {
  min-height: 32px;
  background: var(--rose);
}

.loading,
.empty {
  padding: 14px;
  color: var(--muted);
  background: rgba(255,255,255,.7);
  border-radius: 8px;
  font-weight: 800;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(16, 24, 40, .58);
}

.business-detail-modal {
  inset: 148px 0 0;
  overflow: auto;
  place-items: start center;
  padding: 34px 22px 42px;
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-card {
  position: relative;
  display: grid;
  gap: 14px;
  width: min(460px, 100%);
  padding: 28px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 22px 70px rgba(0,0,0,.28);
}

.business-detail-card {
  width: min(1040px, calc(100% - 28px));
  max-height: calc(100vh - 212px);
  overflow: auto;
  scroll-behavior: smooth;
}

.business-modal-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: start;
  padding-right: 72px;
}

.modal-section {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.business-detail-card .timeline {
  max-height: 430px;
}

.business-detail-card .review-comment {
  min-height: 48px;
}

.modal-card label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 900;
}

.modal-card input,
.modal-card textarea {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid #bdc8da;
  border-radius: 8px;
  font: inherit;
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  min-height: 34px;
}

.primary {
  color: #fff;
  background: var(--blue);
  border-color: var(--blue);
}

.modal-error {
  color: #c03546;
  font-weight: 900;
}

@media (max-width: 960px) {
  .business-detail-modal {
    inset: 96px 0 0;
    padding: 22px 14px 32px;
  }

  .business-detail-card {
    max-height: calc(100vh - 130px);
  }

  .hero,
  .detail-grid,
  .news-columns {
    grid-template-columns: 1fr;
    grid-template-areas: none;
  }

  .hero-title,
  .seoul-map,
  .district-panel {
    grid-area: auto;
  }

  .business-list {
    grid-template-columns: 1fr;
  }

  .business-chip,
  .business-modal-head {
    grid-template-columns: 1fr;
  }

  .business-toolbar {
    grid-template-columns: 1fr;
  }

  .business-toolbar span {
    justify-self: start;
  }

  .business-modal-head {
    padding-right: 0;
  }

  .business-modal-actions {
    justify-content: flex-start;
  }

  .timeline-row {
    grid-template-columns: 1fr;
  }

  .info-transaction-table div {
    grid-template-columns: 1fr;
  }

  .panel-head {
    display: grid;
  }
}
