:root {
  --ink: #17243a;
  --muted: #677386;
  --paper: #f5f1e9;
  --surface: #fffdf8;
  --line: #d9d4ca;
  --observed: #e65f4f;
  --unobserved: #91a0b2;
  --available: #16857a;
  --unavailable: #e65f4f;
  --shadow: 0 12px 30px rgb(23 36 58 / 8%);
  --radius: 18px;
}

* { box-sizing: border-box; }

/* 상하단 메뉴 영역만 핀치 줌 방지(스크롤/탭만 허용)하고 나머지 영역은 뷰포트 확대 허용 */
.map-top-bar,
.mobile-navigation,
.admin-subnav,
.admin-health-banner {
  touch-action: pan-x pan-y;
}

body {
  margin: 0;
  min-width: 320px;
  background: radial-gradient(circle at 8% 4%, rgb(230 95 79 / 9%), transparent 24rem), var(--paper);
  color: var(--ink);
  font-family: Pretendard, "Noto Sans KR", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

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

button:focus-visible, input:focus-visible, select:focus-visible, .leaflet-interactive:focus {
  outline: 3px solid rgb(22 133 122 / 40%);
  outline-offset: 2px;
}

.site-header {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(520px, 1.8fr);
  gap: 32px;
  align-items: end;
  padding: 28px clamp(18px, 3vw, 48px) 22px;
}

.heading-block h1, .panel-heading h2, .listing-detail h3, .calendar-month h4 {
  margin: 0;
  font-family: Georgia, "Noto Serif KR", serif;
  line-height: 1.05;
}

.heading-block h1 { font-size: clamp(1.9rem, 3vw, 3.25rem); }

.eyebrow {
  margin: 0 0 7px;
  color: var(--observed);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.header-note { margin: 12px 0 0; color: var(--muted); font-size: 0.85rem; }

.refresh-dashboard {
  min-height: 44px;
  margin-top: 14px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  font-weight: 750;
  cursor: pointer;
}
.refresh-dashboard:hover:not(:disabled) { border-color: var(--available); }
.refresh-dashboard:disabled { cursor: wait; opacity: 0.6; }

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

.summary-card {
  min-width: 0;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgb(255 253 248 / 82%);
  box-shadow: 0 6px 20px rgb(23 36 58 / 5%);
}

.summary-card dt { color: var(--muted); font-size: 0.74rem; font-weight: 700; }
.summary-card dd {
  margin: 6px 0 0;
  font-family: Georgia, serif;
  font-size: clamp(1.45rem, 2vw, 2rem);
  font-variant-numeric: tabular-nums;
}

.status {
  min-height: 20px;
  margin: 0 clamp(18px, 3vw, 48px) 10px;
  color: var(--muted);
  font-size: 0.85rem;
}
.status.error { color: #9e3126; font-weight: 700; }

.operations-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 0 clamp(18px, 3vw, 48px) 14px;
  padding: 12px 14px;
  border: 1px solid rgb(22 133 122 / 35%);
  border-radius: 12px;
  background: rgb(22 133 122 / 8%);
  font-size: 0.78rem;
}
.operations-strip span { color: var(--muted); }
.operations-strip.warning {
  border-color: rgb(230 95 79 / 45%);
  background: rgb(230 95 79 / 10%);
}

.dashboard-shell {
  display: grid;
  grid-template-areas: "filters map detail";
  grid-template-columns: 280px minmax(360px, 1fr) 360px;
  gap: 14px;
  min-height: 650px;
  padding: 0 clamp(18px, 3vw, 48px) 36px;
}

.filter-panel, .map-panel, .detail-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.filter-panel { grid-area: filters; padding: 20px; }
.map-panel { grid-area: map; min-width: 0; background: #dfe5df; }
.detail-panel { grid-area: detail; padding: 20px; }

.panel-heading {
  display: flex;
  gap: 12px;
  align-items: end;
  justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.panel-heading h2 { font-size: 1.35rem; }
.panel-heading > p { margin: 0; color: var(--muted); font-size: 0.78rem; white-space: nowrap; }

.filter-fields { display: grid; gap: 14px; padding: 20px 0; }
.field label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}
.field input, .field select {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}
.field select { padding-right: 34px; }
.filter-reset {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f4f0e8;
  font-weight: 700;
  cursor: pointer;
}
.filter-reset:hover { border-color: var(--available); }
.filter-reset:disabled { cursor: not-allowed; opacity: 0.55; }

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
  font-size: 0.72rem;
}
.legend span { display: inline-flex; gap: 6px; align-items: center; }
.legend-dot {
  width: 9px;
  height: 9px;
  border: 2px solid var(--surface);
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--line);
}
.legend-dot.observed { background: var(--observed); }
.legend-dot.unobserved { background: var(--unobserved); }

.listing-fallback { margin-top: 20px; }
.listing-fallback h3 {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.76rem;
  letter-spacing: 0.04em;
}
.listing-list { display: grid; gap: 6px; max-height: 310px; overflow: auto; }
.listing-button {
  min-height: 44px;
  padding: 9px 11px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: #f4f0e8;
  text-align: left;
  cursor: pointer;
}
.listing-button:hover, .listing-button.selected {
  border-color: var(--available);
  background: rgb(22 133 122 / 9%);
}
.listing-scan-count {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: fit-content;
  margin-top: 5px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #f1f5f9;
  font-size: 0.75rem;
  line-height: 1.25;
}
.listing-scan-count + small { margin-top: 5px; }

.map-picker-scan-count {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
}

.scan-tag-cal {
  color: #0f766e;
  font-weight: 600;
}
.scan-tag-cal.zero {
  color: #94a3b8;
  font-weight: normal;
}
.scan-sep {
  color: #cbd5e1;
  font-weight: normal;
}
.scan-tag-quote {
  color: #2563eb;
  font-weight: 600;
}
.scan-tag-quote.zero {
  color: #94a3b8;
  font-weight: normal;
}
.scan-tag-none {
  color: #94a3b8;
}

.map-listing-picker {
  position: fixed;
  z-index: 110;
  top: 50%;
  left: 50%;
  width: min(420px, calc(100vw - 28px));
  max-height: min(620px, calc(100dvh - 28px));
  padding: 16px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 20px 48px rgb(23 36 58 / 28%);
  transform: translate(-50%, -50%);
}
.map-listing-picker header { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.map-listing-picker h2 { margin: 0; font-family: Georgia, "Noto Serif KR", serif; font-size: 1.1rem; }
.map-listing-picker-list { display: grid; gap: 7px; margin-top: 14px; }
.map-listing-picker-list button {
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #f4f0e8;
  text-align: left;
  cursor: pointer;
}
.map-listing-picker-list button:hover { border-color: var(--available); background: rgb(22 133 122 / 9%); }
.map-listing-picker-list button small { display: block; margin-top: 3px; color: var(--muted); }
.listing-button small { display: block; margin-top: 3px; color: var(--muted); }
.airbnb-listing-link {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  color: var(--primary);
  font-size: .72rem;
  font-weight: 800;
  line-height: 1.35;
  text-underline-offset: 3px;
}
.detail-tab-panel > .airbnb-listing-link { margin: 0 0 10px; }
.load-more-listings {
  min-height: 44px;
  border: 1px dashed var(--available);
  border-radius: 9px;
  background: transparent;
  font-weight: 700;
  cursor: pointer;
}
.load-more-listings:hover { background: rgb(22 133 122 / 9%); }

.run-summary {
  display: grid;
  gap: 8px;
  margin: 14px 0;
}
.run-summary > p:not(.legend-caveat) {
  margin: 0;
  padding: 10px 12px;
  border-radius: 9px;
  background: #f4f0e8;
  font-variant-numeric: tabular-nums;
}

#map {
  width: 100%;
  height: 100%;
  min-height: 650px;
  touch-action: none;
}
.map-empty-state {
  display: grid;
  height: 100%;
  min-height: 650px;
  place-items: center;
  margin: 0;
  padding: 32px;
  color: var(--muted);
  line-height: 1.65;
  text-align: center;
}
.map-empty-state[hidden] { display: none; }
.map-unavailable {
  display: grid;
  height: 100%;
  min-height: 650px;
  place-items: center;
  padding: 24px;
  color: var(--muted);
  text-align: center;
}
.leaflet-control-attribution { font-size: 0.65rem; }

.empty-state {
  display: grid;
  min-height: 220px;
  place-items: center;
  padding: 28px 8px;
  color: var(--muted);
  line-height: 1.65;
  text-align: center;
}
.listing-detail { padding-top: 20px; }
.listing-detail h3 { font-size: 1.45rem; line-height: 1.25; }
.listing-id { margin: 8px 0 18px; color: var(--muted); font-size: 0.75rem; }
.listing-availability {
  display: inline-flex;
  margin: 8px 0 16px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #ecfdf5;
  color: #047857;
  font-size: .7rem;
  font-weight: 800;
}
.listing-availability.inactive { background: #fff7ed; color: #9a3412; }
.listing-id-details { margin-top: 12px; color: var(--muted); font-size: .7rem; }
.listing-id-details summary { min-height: 44px; padding: 12px 0; cursor: pointer; font-weight: 750; }
.listing-id-details .listing-id { margin: 0; padding: 0 0 12px; }
.extra-detail-facts { margin-bottom: 10px; }
.detail-facts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  overflow: hidden;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--line);
}
.detail-facts div { padding: 10px 12px; background: var(--surface); }
.detail-facts dt { color: var(--muted); font-size: 0.69rem; }
.detail-facts dd { margin: 4px 0 0; font-weight: 700; }

.analysis-section {
  min-width: 0;
  margin-top: 24px;
  padding-top: 22px;
  border-top: 2px solid var(--ink);
}
.analysis-loading { margin: 0; color: var(--muted); }
.analysis-heading {
  display: flex;
  gap: 12px;
  align-items: end;
  justify-content: space-between;
}
.analysis-heading h4 {
  margin: 0;
  font-family: Georgia, "Noto Serif KR", serif;
  font-size: 1.35rem;
}
#analysis-month {
  width: 132px;
  min-height: 44px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  font-size: 0.78rem;
}
.analysis-status {
  margin: 14px 0;
  padding: 11px 12px;
  border-left: 4px solid var(--available);
  border-radius: 8px;
  background: rgb(22 133 122 / 8%);
  font-size: 0.76rem;
  line-height: 1.55;
}
.analysis-status.insufficient_data,
.analysis-status.partial {
  border-left-color: #c17a29;
  background: rgb(193 122 41 / 10%);
}
.analysis-status.planning {
  border-left-color: #d97706;
  background: #fff7ed;
  color: #7c2d12;
}
.analysis-status.error {
  border-left-color: var(--unavailable);
  background: rgb(230 95 79 / 10%);
}
.analysis-readiness {
  margin: -6px 0 14px;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.55;
}
.analysis-confidence-reasons {
  margin: -8px 0 14px;
  color: #8b4e16;
  font-size: 0.72rem;
  line-height: 1.55;
}
.analysis-next-step {
  margin: -6px 0 12px;
  color: var(--muted);
  font-size: .72rem;
  line-height: 1.45;
}
.planning-assumptions {
  margin: -6px 0 14px;
  padding: 10px 12px;
  border: 1px solid #fed7aa;
  border-radius: 10px;
  background: #fffaf2;
  color: #9a3412;
  font-size: .72rem;
  line-height: 1.55;
}
.analysis-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--line);
}
.analysis-metric {
  min-width: 0;
  padding: 12px;
  background: var(--surface);
}
.analysis-metric dt { color: var(--muted); font-size: 0.68rem; }
.analysis-metric dd {
  margin: 5px 0 0;
  overflow-wrap: anywhere;
  font-family: Georgia, serif;
  font-size: 1rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.analysis-metric small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.62rem;
  line-height: 1.35;
}
.analysis-subheading {
  margin: 22px 0 10px;
  font-size: 0.86rem;
}
.revenue-scenarios { display: grid; gap: 8px; min-width: 0; }
.revenue-scenario {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px 12px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #f2eee6;
}
.revenue-scenario.base {
  border-color: rgb(22 133 122 / 55%);
  background: rgb(22 133 122 / 8%);
}
.revenue-scenario h5 {
  grid-column: 1 / -1;
  margin: 0 0 4px;
  font-size: 0.78rem;
}
.revenue-scenario span { color: var(--muted); font-size: 0.68rem; }
.revenue-scenario strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.cost-editor,
.analysis-details {
  min-width: 0;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
}
.cost-editor summary,
.analysis-details summary {
  min-height: 44px;
  padding: 12px;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 800;
}
.analysis-note,
.cost-warning {
  margin: 0;
  padding: 0 12px 12px;
  color: var(--muted);
  font-size: 0.69rem;
  line-height: 1.55;
}
.cost-warning { color: #77362f; }
.cost-grid { display: grid; gap: 10px; padding: 0 12px 12px; }
.cost-extra-details {
  margin: 0 12px 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgb(255 255 255 / 72%);
}
.cost-extra-details > summary {
  min-height: 44px;
  padding: 12px;
  color: var(--primary);
  cursor: pointer;
  font-size: .74rem;
  font-weight: 800;
}
.cost-extra-details .cost-grid { padding: 0 10px 10px; }
.cost-extra-details .analysis-note { padding: 0 10px 10px; }
.cost-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(132px, 0.9fr);
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-size: 0.7rem;
}
.cost-input-wrapper { position: relative; min-width: 0; }
.cost-input-wrapper input {
  width: 100%;
  min-height: 44px;
  padding: 0 72px 0 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.cost-input-wrapper small {
  position: absolute;
  top: 50%;
  right: 8px;
  max-width: 64px;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.58rem;
  text-overflow: ellipsis;
  transform: translateY(-50%);
  white-space: nowrap;
  pointer-events: none;
}
.assumption-scenario {
  min-width: 0;
  margin-top: 18px;
  padding: 16px;
  border: 1px solid #c4b5fd;
  border-radius: 16px;
  background: #faf5ff;
}
.assumption-scenario > summary { min-height: 44px; cursor: pointer; font-size: .86rem; font-weight: 900; }
.assumption-scenario:not([open]) { padding-bottom: 6px; }
.assumption-boundary {
  display: inline-flex;
  margin: 0 0 8px;
  padding: 5px 9px;
  border-radius: 999px;
  background: #ede9fe;
  color: #6d28d9;
  font-size: .66rem;
  font-weight: 850;
}
.assumption-scenario .analysis-note { padding: 0 0 12px; }
.assumption-source {
  display: grid;
  gap: 5px;
  margin: 0 0 12px;
  color: #5b21b6;
  font-size: .66rem;
  font-weight: 750;
}
.assumption-source-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 8px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid rgb(109 40 217 / 16%);
  border-radius: 10px;
  background: rgb(255 255 255 / 70%);
}
.assumption-source-row button {
  min-height: 32px;
  padding: 0 9px;
  border: 1px solid #c4b5fd;
  border-radius: 8px;
  background: white;
  color: #6d28d9;
  font-size: .64rem;
  font-weight: 800;
  cursor: pointer;
}
.assumption-source-row button:hover:not(:disabled) { border-color: #7c3aed; }
.assumption-source-row button:disabled { cursor: not-allowed; opacity: .48; }
.assumption-source-row small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: .62rem;
  font-weight: 650;
}
.assumption-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.assumption-field {
  grid-template-columns: minmax(0, 1fr) minmax(128px, .85fr);
  padding: 10px;
  border-radius: 11px;
  background: rgb(255 255 255 / 82%);
}
.assumption-result { margin-top: 12px; background: white; }
.assumption-result-evidence {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: .64rem;
}
.assumption-breakdown {
  display: grid;
  grid-column: 1 / -1;
  gap: 4px;
  margin: 4px 0 0;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  color: #475569;
  font-size: .66rem;
  line-height: 1.45;
}
.assumption-breakdown-details { grid-column: 1 / -1; }
.assumption-breakdown-details summary {
  min-height: 40px;
  padding-top: 10px;
  color: var(--primary);
  font-size: .68rem;
  font-weight: 800;
  cursor: pointer;
}
.assumption-settings .assumption-source,
.assumption-settings .assumption-grid,
.assumption-range .illustrative-revenue,
.scenario-details .revenue-scenarios,
.method-details .monthly-band-grid { margin: 0 12px 12px; }
.comparable-list,
.analysis-details ul {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0 28px 14px 34px;
}
.comparable-list li { min-width: 0; font-size: 0.72rem; }
.comparable-list strong,
.comparable-list .comparable-listing-link,
.comparable-list span,
.comparable-list small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}
.comparable-list span,
.comparable-list small { margin-top: 3px; color: var(--muted); }
.analysis-details li { overflow-wrap: anywhere; font-size: 0.7rem; line-height: 1.5; }
.evidence-details > .detail-facts,
.evidence-details > .segment-evidence,
.evidence-details > .subject-quote-evidence {
  margin: 0 12px 12px;
}
.evidence-details .segment-evidence h4,
.evidence-details .subject-quote-evidence h4 { margin: 0 0 6px; font-size: .8rem; }
.evidence-details .segment-evidence p,
.evidence-details .subject-quote-evidence p { margin: 0; font-size: .7rem; line-height: 1.5; }

.calendar { display: grid; gap: 22px; margin-top: 18px; }
.calendar-other-details {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
}
.calendar-other-details > summary {
  min-height: 44px;
  padding: 12px;
  color: var(--primary);
  cursor: pointer;
  font-size: .78rem;
  font-weight: 800;
}
.calendar-other-content {
  display: grid;
  gap: 22px;
  padding: 0 12px 12px;
}
.calendar-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.calendar-summary > div {
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.calendar-summary > div.available { background: rgb(22 133 122 / 9%); color: #0b665e; }
.calendar-summary > div.unavailable { background: rgb(230 95 79 / 9%); color: #a13b30; }
.calendar-summary span,
.calendar-summary strong { display: block; }
.calendar-summary span { font-size: .66rem; font-weight: 750; }
.calendar-summary strong { margin-top: 4px; font-size: 1.15rem; }
.calendar-coverage-details {
  margin-top: -12px;
  border-bottom: 1px solid var(--line);
}
.calendar-coverage-details summary {
  min-height: 40px;
  padding: 10px 0;
  color: var(--primary);
  font-size: .7rem;
  font-weight: 800;
  cursor: pointer;
}
.calendar-coverage-details p { margin: 0 0 10px; color: var(--muted); font-size: .68rem; }
.calendar-legend { display: flex; gap: 12px; margin: -12px 0 0; color: var(--muted); font-size: .65rem; }
.calendar-legend span::before {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 4px;
  border-radius: 3px;
  content: "";
}
.calendar-legend .available::before { background: rgb(22 133 122 / 30%); }
.calendar-legend .unavailable::before { background: rgb(230 95 79 / 30%); }
.calendar-legend .unobserved::before { background: rgb(145 160 178 / 30%); }
.calendar-month h4 { margin-bottom: 10px; font-size: 1rem; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.calendar-weekday {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 800;
  text-align: center;
}
.calendar-cell {
  display: grid;
  min-height: 50px;
  place-items: center;
  padding: 5px 2px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
}
.calendar-cell.available {
  border-color: rgb(22 133 122 / 38%);
  background: rgb(22 133 122 / 10%);
  color: #0b665e;
}
.calendar-cell.unavailable {
  border-color: rgb(230 95 79 / 35%);
  background: rgb(230 95 79 / 10%);
  color: #a13b30;
}
.calendar-cell.unobserved {
  border-color: rgb(145 160 178 / 38%);
  background: rgb(145 160 178 / 10%);
  color: #596779;
}
.calendar-cell small { display: block; font-size: 0.58rem; }
.calendar-cell.is-past {
  opacity: 0.85;
}
.calendar-cell.is-today {
  outline: 2px solid var(--primary, #008489);
  outline-offset: -2px;
  font-weight: 800;
}

.statistics-section {
  min-width: 0;
  padding: 0 clamp(18px, 3vw, 48px) 56px;
}

.statistics-heading {
  display: grid;
  grid-template-columns: minmax(220px, 0.6fr) minmax(360px, 1.4fr);
  gap: 28px;
  align-items: end;
  margin-bottom: 18px;
}

.statistics-heading h2,
.statistics-panel-heading h3,
.distribution-card h4 {
  margin: 0;
  font-family: Georgia, "Noto Serif KR", serif;
}

.statistics-heading h2 { font-size: clamp(1.7rem, 2.5vw, 2.5rem); }
.statistics-caveat,
.legend-caveat {
  margin: 0;
  color: #77362f;
  line-height: 1.65;
}
.statistics-caveat { font-size: 0.88rem; }
.legend-caveat { font-size: 0.75rem; }

.statistics-status {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.85rem;
}
.statistics-status.error { color: #9e3126; font-weight: 700; }

.statistics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  min-width: 0;
}

.statistics-panel {
  min-width: 0;
  padding: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.initial-calendar-panel,
.composition-panel { grid-column: 1 / -1; }

.statistics-panel-heading {
  display: flex;
  gap: 12px;
  align-items: end;
  justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.statistics-panel-heading h3 { font-size: 1.2rem; }
.statistics-panel-heading > p { margin: 0; color: var(--muted); font-size: 0.78rem; }

.coverage-list { display: grid; gap: 18px; padding-top: 20px; }
.coverage-item > div {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 0.82rem;
}
.coverage-item span { color: var(--muted); }
.coverage-item strong { font-variant-numeric: tabular-nums; text-align: right; }
.coverage-item progress {
  width: 100%;
  height: 13px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: #e7e3da;
  accent-color: var(--available);
}
.coverage-item progress::-webkit-progress-bar { background: #e7e3da; }
.coverage-item progress::-webkit-progress-value { background: var(--available); }
.coverage-item progress::-moz-progress-bar { background: var(--available); }
.coverage-operations {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 20px 0 0;
}
.coverage-operations div { min-width: 0; padding: 12px; background: #f2eee6; }
.coverage-operations dt { color: var(--muted); font-size: 0.7rem; }
.coverage-operations dd {
  margin: 6px 0 0;
  overflow-wrap: anywhere;
  font-size: 0.82rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

#initial-calendar-chart {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 230px;
  margin-top: 18px;
  border-radius: 10px;
  background: #f2eee6;
}
.calendar-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.75rem;
}
.calendar-chart-legend span { display: inline-flex; gap: 6px; align-items: center; }
.chart-swatch { width: 12px; height: 12px; border-radius: 3px; }
.chart-swatch.available { background: var(--available); }
.chart-swatch.unavailable { background: var(--unavailable); }
.chart-swatch.unobserved { background: var(--unobserved); }
.legend-caveat { margin-top: 9px; }
.chart-summary {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.55;
}

.composition-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  padding-top: 20px;
}
.distribution-card { min-width: 0; }
.distribution-card h4 { font-size: 1rem; }
.distribution-meta { margin: 6px 0 14px; color: var(--muted); font-size: 0.72rem; }
.distribution-bars { display: grid; gap: 11px; }
.distribution-row { min-width: 0; }
.distribution-heading {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin-bottom: 5px;
  font-size: 0.75rem;
}
.distribution-heading span:first-child { min-width: 0; overflow-wrap: anywhere; }
.distribution-heading span:last-child { color: var(--muted); white-space: nowrap; }
.distribution-track { height: 9px; overflow: hidden; border-radius: 999px; background: #e7e3da; }
.distribution-fill { height: 100%; border-radius: inherit; background: var(--available); }
.distribution-empty { margin: 0; color: var(--muted); font-size: 0.78rem; }

.table-scroll { max-width: 100%; overflow-x: auto; padding-top: 10px; }
#run-health { width: 100%; min-width: 610px; border-collapse: collapse; font-size: 0.75rem; }
#run-health th,
#run-health td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: left; }
#run-health th { color: var(--muted); font-weight: 700; }
#run-health td { font-variant-numeric: tabular-nums; }

.transition-content { padding-top: 16px; }
.transition-empty { margin: 0; color: var(--muted); line-height: 1.6; }
.transition-signals { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 0; }
.transition-signals div { padding: 14px; border-radius: 12px; background: #f2eee6; }
.transition-signals dt { color: var(--muted); font-size: 0.72rem; }
.transition-signals dd { margin: 6px 0 0; font-family: Georgia, serif; font-size: 1.6rem; }

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

@media (max-width: 900px) {
  .site-header { grid-template-columns: 1fr; }
  .dashboard-shell {
    grid-template-areas: "filters" "map" "detail";
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .filter-fields { grid-template-columns: repeat(3, 1fr); }
  .listing-list { grid-template-columns: repeat(2, 1fr); max-height: 220px; }
  #map, .map-unavailable { height: 62vh; min-height: 440px; }
  .map-empty-state { height: 62vh; min-height: 440px; }
  .statistics-heading,
  .statistics-grid { grid-template-columns: 1fr; }
  .initial-calendar-panel,
  .composition-panel { grid-column: auto; }
  .composition-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .site-header { gap: 20px; padding-top: 22px; }
  .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .summary-card { padding: 13px 14px; }
  .dashboard-shell,
  .statistics-section { padding-right: 10px; padding-left: 10px; }
  .filter-fields, .listing-list { grid-template-columns: 1fr; }
  .field select, .listing-button, button { min-height: 44px; }
  #map, .map-unavailable { height: 52vh; min-height: 340px; }
  .map-empty-state { height: 52vh; min-height: 340px; }
  .statistics-panel { padding: 16px; }
  .statistics-heading { gap: 14px; }
  .coverage-item > div { align-items: flex-end; }
  .coverage-item strong { max-width: 58%; }
  .coverage-operations { grid-template-columns: 1fr; }
  .transition-signals { grid-template-columns: 1fr; }
  .analysis-heading { align-items: start; }
  #analysis-month { width: 126px; }
  .analysis-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cost-field { grid-template-columns: minmax(0, 1fr) minmax(128px, 0.9fr); }
}

@media (max-width: 360px) {
  .analysis-heading { display: grid; }
  #analysis-month { width: 100%; }
  .analysis-metrics { grid-template-columns: 1fr; }
  .cost-field { grid-template-columns: 1fr; gap: 5px; }
}

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

/* Task 3: bright, map-first market and isolated operations surfaces */
:root {
  --paper: #ffffff;
  --surface: #ffffff;
  --primary: #1769ff;
  --selected: #ff476f;
  --success: #00a878;
  --warning: #f59e0b;
  --danger: #dc2626;
  --violet: #7c3aed;
  --mint: #0f9f82;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --shadow: 0 18px 45px rgb(15 23 42 / 14%);
}

[hidden] { display: none !important; }

body.market-page,
body.operations-page {
  min-width: 0;
  overflow-x: hidden;
  background: #ffffff;
}

body.modal-open { overflow: hidden; }

.market-page button,
.market-page input,
.market-page select,
.market-page a.operations-link,
.operations-page button,
.operations-page input,
.operations-page select,
.operations-page a.operations-link {
  min-height: 44px;
}

.market-page button:focus-visible,
.market-page input:focus-visible,
.market-page select:focus-visible,
.market-page a:focus-visible,
.operations-page button:focus-visible,
.operations-page a:focus-visible {
  outline: 3px solid rgb(37 99 235 / 35%);
  outline-offset: 2px;
}

.map-top-bar {
  position: relative;
  z-index: 30;
  display: grid;
  grid-template-columns: minmax(170px, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 62px;
  padding: 8px clamp(12px, 2.5vw, 32px);
  border-bottom: 1px solid var(--line);
  background: rgb(255 255 255 / 96%);
  box-shadow: 0 2px 14px rgb(15 23 42 / 7%);
}

.map-top-bar:has(.environment-switch:not([hidden])) {
  grid-template-columns: minmax(170px, 1fr) auto auto;
}

.brand {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  min-width: 0;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), #60a5fa);
  color: white;
  font-weight: 900;
}

.brand strong,
.brand small { display: block; }
.brand strong { overflow: hidden; font-size: .95rem; text-overflow: ellipsis; white-space: nowrap; }
.brand small { color: var(--muted); font-size: .68rem; }

.environment-switch {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  min-height: 44px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  white-space: nowrap;
}

.environment-switch a {
  display: inline-grid;
  min-width: 44px;
  min-height: 44px;
  padding: 0 7px;
  place-items: center;
  border-radius: 999px;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 850;
  text-decoration: none;
}

.environment-switch a[aria-current="page"] {
  background: #dbeafe;
  color: var(--primary);
}

.development-status-chip {
  min-width: 0;
  margin: 0;
  padding: 9px 12px;
  overflow: hidden;
  border: 1px solid #bbf7d0;
  border-radius: 999px;
  background: #f0fdf4;
  color: #166534;
  font-size: .72rem;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.development-status-chip.stale {
  border-color: #fde68a;
  background: #fffbeb;
  color: #92400e;
}

.map-top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.geo-monitor-top-btn,
.geo-monitor-top-link {
  display: inline-grid;
  min-height: 44px;
  padding: 0 14px;
  place-items: center;
  border: 1px solid #c7d2fe;
  border-radius: 12px;
  background: #eef2ff;
  color: #4338ca;
  font-size: .78rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.geo-monitor-top-btn:hover,
.geo-monitor-top-link:hover {
  background: #e0e7ff;
  border-color: #a5b4fc;
}

.operations-link {
  display: inline-grid;
  min-height: 44px;
  padding: 0 14px;
  place-items: center;
  border-radius: 12px;
  background: var(--primary);
  color: white;
  font-size: .78rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.app-navigation {
  position: relative;
  z-index: 25;
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 10px clamp(12px, 2.5vw, 32px);
  border-bottom: 1px solid #dbe7ff;
  background: white;
}

.app-navigation button,
.app-navigation a,
.mobile-navigation button,
.mobile-navigation a {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #4b5d78;
  font-size: .8rem;
  font-weight: 850;
  text-decoration: none;
  cursor: pointer;
}

.app-navigation button[aria-selected="true"],
.mobile-navigation button[aria-selected="true"],
.mobile-navigation a[aria-selected="true"] {
  background: #e8f0ff;
  color: var(--primary);
}

.app-navigation button[aria-selected="true"] { box-shadow: inset 0 -3px var(--primary); }
.app-navigation a { margin-left: auto; color: #7c3aed; }
.mobile-navigation { display: none; }

.market-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 180px)) minmax(160px, 1fr) auto;
  gap: 8px;
  align-items: stretch;
  padding: 9px clamp(12px, 2.5vw, 32px);
  border-bottom: 1px solid var(--line);
  background: white;
}

.market-summary > div {
  min-width: 0;
  padding: 7px 10px;
  border-radius: 10px;
  background: #f8fafc;
}

.market-summary strong { display: block; }
.market-summary span {
  display: flex;
  align-items: center;
  color: var(--muted);
  font-size: .68rem;
  line-height: 1.2;
}
.market-summary strong { margin-top: 2px; color: var(--primary); font-size: 1.02rem; }
.summary-updated { align-self: center; color: var(--muted); font-size: .72rem; }
#refresh-dashboard {
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  font-weight: 800;
  cursor: pointer;
}

.market-page > .status {
  position: absolute;
  z-index: 14;
  top: 134px;
  left: 50%;
  max-width: calc(100vw - 32px);
  margin: 0;
  padding: 7px 12px;
  transform: translateX(-50%);
  border: 1px solid rgb(255 255 255 / 70%);
  border-radius: 999px;
  background: rgb(255 255 255 / 90%);
  box-shadow: 0 5px 20px rgb(15 23 42 / 10%);
  font-size: .72rem;
  text-align: center;
}

.market-page > .status:empty { display: none; }

body[data-active-view="list"] > .status,
body[data-active-view="market"] > .status,
body[data-active-view="geo-monitor"] > .status {
  display: none;
}

body[data-active-view="list"] .market-summary,
body[data-active-view="market"] .market-summary,
body[data-active-view="geo-monitor"] .market-summary,
.market-page .map-top-bar > .operations-link {
  display: none;
}

.map-guide {
  position: absolute;
  z-index: 5;
  bottom: 18px;
  left: 50%;
  max-width: calc(100% - 32px);
  margin: 0;
  padding: 9px 14px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: rgb(15 23 42 / 82%);
  color: white;
  font-size: .75rem;
  font-weight: 750;
  text-align: center;
  pointer-events: none;
}

.market-map-shell { min-width: 0; background: white; }
.app-panel { min-width: 0; }

.view-heading {
  display: flex;
  gap: 18px;
  align-items: end;
  justify-content: space-between;
  padding: 26px clamp(16px, 3vw, 42px) 18px;
  border-bottom: 1px solid #e5edff;
  background: linear-gradient(120deg, #ffffff 52%, #eef4ff);
}

.view-heading h1 { margin: 0; font-size: clamp(1.45rem, 3vw, 2.25rem); }
.view-heading p { max-width: 560px; margin: 0; color: var(--muted); font-size: .82rem; }

.map-surface {
  position: relative;
  min-width: 0;
  height: min(760px, calc(100dvh - 190px));
  min-height: 540px;
  overflow: hidden;
  background: #dbeafe;
}

.market-page #map {
  width: 100%;
  height: 100%;
  min-height: 0;
}

.map-message {
  position: absolute;
  inset: 50% auto auto 50%;
  z-index: 3;
  width: min(520px, calc(100% - 32px));
  margin: 0;
  padding: 22px;
  transform: translate(-50%, -50%);
  border: 1px solid #bfdbfe;
  border-radius: 18px;
  background: white;
  box-shadow: var(--shadow);
  color: #1e3a8a;
  font-weight: 750;
  text-align: center;
}

.map-message > strong,
.map-message > span {
  display: block;
}

.map-message > span {
  margin-top: 5px;
  color: var(--muted);
  font-weight: 600;
}

.map-message details {
  margin-top: 14px;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 600;
}

.map-message details p {
  margin: 8px 0 0;
  line-height: 1.5;
}

.map-action-bar {
  position: absolute;
  z-index: 14;
  top: 18px;
  right: clamp(12px, 2.5vw, 32px);
  display: flex;
  gap: 8px;
  align-items: center;
  pointer-events: none;
}

.map-show-all-button {
  position: absolute;
  z-index: 14;
  right: 16px;
  bottom: 96px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line, #dbe5df);
  border-radius: 8px;
  background: rgb(255 255 255 / 96%);
  color: var(--ink, #25352e);
  font-size: .74rem;
  white-space: nowrap;
  cursor: pointer;
  pointer-events: auto;
}

.map-gps-btn {
  position: absolute;
  z-index: 20;
  right: 16px;
  bottom: 148px;
  width: 44px;
  height: 44px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line, #dbe5df);
  border-radius: 10px;
  background: rgb(255 255 255 / 96%);
  color: var(--ink, #25352e);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  pointer-events: auto;
  transition: all 0.2s ease;
}

.map-gps-btn svg {
  pointer-events: none;
}

.map-gps-btn:hover {
  background: #ffffff;
  color: #2b6cb0;
  border-color: #bee3f8;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.map-gps-btn:active {
  transform: translateY(0);
}

.map-gps-btn.loading svg {
  animation: gpsSpin 1s linear infinite;
  color: #3182ce;
}

@keyframes gpsSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* GPS Pulse Marker on Naver Map */
.gps-pulse-marker {
  position: relative;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.gps-pulse-dot {
  width: 14px;
  height: 14px;
  background-color: #3182ce;
  border: 2.5px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  z-index: 2;
}

.gps-pulse-ring {
  position: absolute;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: rgba(49, 130, 206, 0.35);
  animation: gpsPulse 2s ease-out infinite;
  z-index: 1;
}

@keyframes gpsPulse {
  0% {
    transform: scale(0.4);
    opacity: 0.9;
  }
  70% {
    transform: scale(1.4);
    opacity: 0.1;
  }
  100% {
    transform: scale(1.6);
    opacity: 0;
  }
}

/* ── 글로벌 토스트 알림 ── */
.global-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(0);
  z-index: 9999;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: min(90vw, 480px);
  padding: 11px 18px;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #ffffff;
  border-radius: 9999px;
  font-size: 0.86rem;
  font-weight: 550;
  line-height: 1.4;
  text-align: center;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.15);
  pointer-events: none;
  animation: globalToastIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.global-toast[hidden] {
  display: none;
}

.global-toast.warning {
  background: rgba(180, 83, 9, 0.96);
  border: 1px solid rgba(251, 191, 36, 0.4);
}

.global-toast.success {
  background: rgba(22, 101, 52, 0.96);
  border: 1px solid rgba(74, 222, 128, 0.4);
}

.global-toast.info {
  background: rgba(30, 41, 59, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.3);
}

@keyframes globalToastIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.map-loading-status {
  position: absolute;
  z-index: 15;
  top: 116px;
  left: 50%;
  max-width: calc(100% - 32px);
  margin: 0;
  padding: 10px 14px;
  box-sizing: border-box;
  transform: translateX(-50%);
  border: 1px solid var(--line, #dbe5df);
  border-radius: 10px;
  background: rgb(255 255 255 / 96%);
  color: var(--ink, #25352e);
  box-shadow: 0 4px 16px rgb(27 43 34 / 8%);
  font-size: .76rem;
  line-height: 1.5;
  text-align: center;
  pointer-events: none;
}
.map-loading-status[hidden] { display: none; }
.map-loading-status.error { color: #9f2944; border-color: #f2c9d1; }
.market-page[data-active-view="map"] > .status:not(.error) { display: none; }
@media (min-width: 601px) {
  .map-loading-status {
    right: 16px;
    left: auto;
    max-width: calc(100% - 416px);
    transform: none;
  }
}

.map-provider-status,
.map-filter-button,
.projection-open-button {
  min-height: 44px;
  margin: 0;
  padding: 0 14px;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: rgb(255 255 255 / 96%);
  box-shadow: 0 8px 22px rgb(23 105 255 / 14%);
  color: #1e40af;
  font-size: .74rem;
  font-weight: 850;
}

.map-provider-status { display: inline-flex; gap: 7px; align-items: center; }
.map-provider-status[hidden] { display: none; }
.map-provider-status { pointer-events: none; }
.map-provider-status span { width: 9px; height: 9px; border-radius: 50%; background: var(--warning); }
.map-provider-status[data-state="connected"] span { background: var(--success); }
.map-provider-status[data-state$="failed"],
.map-provider-status[data-state="config-missing"] { border-color: #fecdd3; color: #be123c; }
.map-provider-status[data-state$="failed"] span,
.map-provider-status[data-state="config-missing"] span { background: var(--selected); }
.map-filter-button { display: none; border-color: var(--primary); background: var(--primary); color: white; cursor: pointer; pointer-events: auto; }
.projection-open-button {
  border-color: #7c3aed;
  background: #7c3aed;
  color: white;
  cursor: pointer;
  pointer-events: auto;
}

.filter-sheet {
  position: absolute;
  z-index: 12;
  top: 24px;
  left: clamp(12px, 2.5vw, 32px);
  width: min(380px, calc(100% - 24px));
  max-height: calc(100% - 48px);
  padding: 18px 20px;
  box-sizing: border-box;
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid rgb(226 232 240 / 90%);
  border-radius: 20px;
  background: rgb(255 255 255 / 96%);
  box-shadow: var(--shadow);
  overscroll-behavior: contain;
}

.filter-scope-note {
  grid-column: 1 / -1;
  margin: 2px 0 0;
  color: #92400e;
  font-size: .67rem;
  line-height: 1.45;
}

.projection-panel {
  position: absolute;
  z-index: 16;
  top: 76px;
  right: clamp(12px, 2.5vw, 32px);
  width: min(440px, calc(100% - 24px));
  max-height: calc(100% - 96px);
  padding: 18px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid #ddd6fe;
  border-radius: 20px;
  background: rgb(255 255 255 / 98%);
  box-shadow: 0 20px 48px rgb(76 29 149 / 20%);
}
.projection-open .map-view .filter-sheet { display: none; }
.projection-heading { display: flex; gap: 12px; align-items: center; justify-content: space-between; }
.projection-heading h2 { margin: 0; font-size: 1.15rem; }
.projection-heading p { margin: 4px 0 0; color: var(--muted); font-size: .72rem; }
.projection-heading .drawer-close {
  display: grid;
  flex: 0 0 40px;
  width: 40px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #eef4ff;
  color: var(--primary);
  font-size: 1.4rem;
  cursor: pointer;
}
.projection-boundary,
.projection-status,
.projection-evidence {
  margin: 9px 0;
  color: var(--muted);
  font-size: .7rem;
  line-height: 1.5;
}
.projection-boundary {
  padding: 9px 10px;
  border-left: 4px solid #f97316;
  border-radius: 8px;
  background: #fff7ed;
  color: #9a3412;
  font-weight: 750;
}
.projection-location-summary {
  margin: 8px 0 0;
  padding: 9px 10px;
  border: 1px solid #c4b5fd;
  border-radius: 10px;
  background: #f5f3ff;
  color: #5b21b6;
  font-size: .72rem;
  font-weight: 800;
}
.projection-form,
.projection-assumptions { display: grid; gap: 9px; margin-top: 10px; }
.projection-assumption-group {
  display: grid;
  gap: 9px;
  padding: 10px;
  border-radius: 10px;
  background: #f8fafc;
}
.projection-assumption-group h4 { margin: 0 0 2px; font-size: .76rem; }
.projection-extra-details {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
}
.projection-extra-details > summary {
  min-height: 44px;
  padding: 12px;
  color: var(--primary);
  cursor: pointer;
  font-size: .74rem;
  font-weight: 800;
}
.projection-extra-details .projection-assumption-group { border-radius: 0; }
.projection-step {
  display: grid;
  gap: 10px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
}
.projection-step-heading { display: flex; gap: 10px; align-items: flex-start; }
.projection-step-heading > span {
  display: grid;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: #ede9fe;
  color: #6d28d9;
  font-size: .75rem;
  font-weight: 900;
}
.projection-step-heading h3 { margin: 1px 0 0; font-size: .86rem; }
.projection-step-heading p { margin: 3px 0 0; color: var(--muted); font-size: .66rem; line-height: 1.4; }
.projection-location-button,
.projection-submit { width: 100%; min-height: 46px; cursor: pointer; }
.projection-location-button { color: var(--primary); background: #eef4ff; }
.projection-submit { font-size: .86rem; }
.projection-location-marker {
  display: grid;
  width: 28px;
  height: 28px;
  border: 4px solid white;
  border-radius: 50% 50% 50% 0;
  background: var(--primary);
  box-shadow: 0 3px 10px rgb(15 23 42 / 28%);
  transform: translate(-50%, -100%) rotate(-45deg);
  place-items: center;
}
.projection-location-marker i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: white;
}
.projection-form label,
.projection-assumptions label { display: grid; gap: 4px; color: var(--muted); font-size: .68rem; font-weight: 750; }
.projection-form input,
.projection-form select,
.projection-assumptions input {
  min-width: 0;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  color: var(--ink);
  font: inherit;
}
.projection-location-grid,
.projection-condition-grid,
.projection-output-grid,
.projection-band-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.projection-condition-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.projection-output-grid { margin-top: 12px; }
.projection-output-grid > :last-child:nth-child(odd) { grid-column: 1 / -1; }
.projection-output {
  min-width: 0;
  padding: 11px;
  border-radius: 12px;
  background: #f5f3ff;
}
.projection-output span,
.projection-output small { display: block; color: var(--muted); font-size: .62rem; }
.projection-output strong { display: block; margin: 4px 0; color: #6d28d9; overflow-wrap: anywhere; }
.projection-band-card,
.projection-comparables {
  min-width: 0;
  margin-top: 12px;
  padding: 11px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fafafa;
}
.projection-band-card h3,
.projection-comparables h3 { margin: 0 0 7px; font-size: .82rem; }
.projection-band-card p { margin: 4px 0; font-size: .67rem; line-height: 1.45; }
.projection-comparables ol { margin: 7px 0 0; padding-left: 20px; }
.projection-comparables li { margin: 6px 0; font-size: .65rem; line-height: 1.4; }
.projection-comparables .comparable-listing-link {
  display: inline-flex;
  min-height: 32px;
  font-size: .68rem;
}
.projection-comparable-meta { display: block; color: var(--muted); }
.projection-method-badge { color: #c2410c; font-weight: 800; }
.rent-estimate {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #c7d2fe;
  border-radius: 12px;
  background: #f7f7ff;
}
.rent-estimate-details {
  overflow: hidden;
}
.rent-estimate-details .rent-estimate {
  margin: 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
}
.rent-estimate h4 { margin: 0 0 6px; font-size: .86rem; }
.rent-estimate-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}
.rent-estimate-grid article {
  min-width: 0;
  padding: 10px;
  border-radius: 10px;
  background: white;
}
.rent-estimate-grid span,
.rent-estimate-grid small { display: block; color: var(--muted); font-size: .64rem; }
.rent-estimate-grid strong { display: block; margin: 4px 0; font-size: .76rem; overflow-wrap: anywhere; }
.projection-result-details {
  margin-top: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
}
.projection-result-details > summary {
  padding: 12px;
  color: var(--primary);
  font-size: .76rem;
  font-weight: 850;
  cursor: pointer;
}
.projection-details-content { padding: 0 11px 12px; }
.projection-details-content > .projection-band-grid,
.projection-details-content > .projection-assumptions { margin-top: 0; }

.list-view .filter-sheet,
.market-view .filter-sheet {
  position: relative;
  top: auto;
  left: auto;
  max-height: none;
  box-sizing: border-box;
  border-color: #cfe0ff;
  border-radius: 18px;
  box-shadow: 0 10px 28px rgb(23 105 255 / 8%);
}

.list-view > .view-heading,
.market-view > .view-heading { display: block; }
.list-view > .view-heading p,
.market-view > .view-heading p { margin-top: 8px; }
.list-view .filter-sheet {
  width: calc(100% - 2 * clamp(16px, 3vw, 42px));
  max-width: none;
  margin: 18px clamp(16px, 3vw, 42px) 0;
}
.market-view .filter-sheet {
  width: min(1180px, calc(100% - 32px));
  max-width: 1180px;
  margin: 18px auto 0;
}

body[data-active-view="market"] .filter-heading > p,
body[data-active-view="market"] .filter-smart-search-wrap,
body[data-active-view="market"] .filter-quick-chips-wrap,
body[data-active-view="market"] .address-hierarchy-section,
body[data-active-view="market"] .field-search,
body[data-active-view="market"] label[for="room-type-filter"],
body[data-active-view="market"] label[for="bedrooms-filter"],
body[data-active-view="market"] label[for="capacity-filter"],
body[data-active-view="market"] .advanced-filters,
body[data-active-view="market"] #reset-filters,
body[data-active-view="market"] .filter-scope-note {
  display: none !important;
}

body[data-active-view="market"] .filter-sheet .filter-fields {
  grid-template-columns: minmax(200px, 420px);
  padding-top: 10px;
}

.list-view .map-message {
  position: relative;
  inset: auto;
  width: auto;
  margin: 18px clamp(16px, 3vw, 42px) 0;
  transform: none;
}

.drawer-close,
.filter-backdrop { display: none; }

.sheet-handle {
  display: none;
  width: 44px;
  height: 5px;
  margin: 0 auto 10px;
  border-radius: 99px;
  background: #cbd5e1;
}

.filter-heading,
.market-insight-heading,
.listing-list-heading,
.detail-modal-header,
.panel-heading {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.filter-heading h2,
.market-insight-heading h2,
.listing-list-heading h2,
.detail-modal-header h2,
.operations-heading h1,
.operations-hero h2,
.operations-panel h2 {
  margin: 0;
  font-family: inherit;
}

.filter-heading p { margin: 0; color: var(--muted); }
.filter-tabs,
.detail-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  margin-top: 10px;
  border-bottom: 1px solid var(--line);
}

.filter-tabs button,
.detail-tabs button {
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
  cursor: pointer;
}

.filter-tabs button[aria-selected="true"],
.detail-tabs button[aria-selected="true"] {
  border-bottom-color: var(--primary);
  color: var(--primary);
}

.filter-sheet .filter-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 12px 0 0;
}

.filter-sheet .field { display: block; min-width: 0; }
.filter-sheet .field-search,
.filter-sheet label[for="district-filter"] { grid-column: 1 / -1; }
.filter-sheet .field > span {
  display: block;
  margin: 0 0 5px;
  color: var(--muted);
  font-size: .7rem;
  font-weight: 750;
}

.filter-sheet input,
.filter-sheet select {
  width: 100%;
  min-height: 44px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
}

.advanced-filters {
  grid-column: 1 / -1;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafc;
}

.advanced-filters summary {
  min-height: 44px;
  padding: 12px;
  color: var(--primary);
  font-size: .75rem;
  font-weight: 850;
  cursor: pointer;
}

.advanced-filter-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 0 12px 12px;
}

.advanced-filter-fields .secondary-button { align-self: end; min-height: 44px; }
.filter-scope-note { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: .68rem; }

.secondary-button {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafc;
  font-weight: 800;
}

.market-insight {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  margin: 24px auto 48px;
  padding: clamp(18px, 3vw, 30px);
  border: 1px solid rgb(226 232 240 / 90%);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.market-key-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.market-key-grid .insight-card {
  padding: 18px 16px;
}

.market-key-grid .insight-card strong {
  margin-top: 10px;
  font-size: clamp(1.1rem, 2vw, 1.45rem);
}

.market-key-grid .insight-card small {
  display: none;
}

.market-insight:has(.market-analysis-details[open]) .market-key-grid .insight-card small {
  display: block;
}

.market-analysis-details {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8fafc;
}

.market-analysis-details > summary {
  min-height: 48px;
  padding: 14px;
  color: var(--primary);
  font-size: .76rem;
  font-weight: 850;
  cursor: pointer;
}

.market-analysis-details .market-insight-grid {
  padding: 0 12px 12px;
}

.operations-back-link {
  display: none;
  min-height: 44px;
  margin-bottom: 8px;
  align-items: center;
  color: var(--primary);
  font-size: .78rem;
  font-weight: 850;
  text-decoration: none;
}

#market-analysis-status {
  margin: 6px 0 10px;
  color: var(--muted);
  font-size: .72rem;
}

.market-insight-grid,
.operations-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.insight-card,
.operations-card {
  min-width: 0;
  padding: 12px;
  border-radius: 14px;
}

.insight-card span,
.insight-card strong,
.insight-card small,
.operations-card span,
.operations-card strong,
.operations-card small { display: block; }
.insight-card span,
.operations-card span { color: var(--muted); font-size: .68rem; font-weight: 750; }
.insight-card strong,
.operations-card strong { margin: 7px 0 3px; font-size: 1rem; overflow-wrap: anywhere; }
.insight-card small,
.operations-card small { color: var(--muted); font-size: .62rem; }
.insight-card.blue,
.operations-card.blue { background: #dbeafe; color: #1d4ed8; }
.insight-card.mint,
.operations-card.mint { background: #d1fae5; color: #047857; }
.insight-card.violet,
.operations-card.violet { background: #ede9fe; color: #6d28d9; }
.insight-card.coral { background: #fff0f3; color: #d91f52; }
.insight-card.confidence { background: #fff7d6; color: #9a5b00; }
.insight-card.neutral { background: #f1f5f9; color: #475569; }
.operations-card.amber { background: #fef3c7; color: #b45309; }
.operations-card.emerald { background: #d1fae5; color: #047857; }
.operations-card.coral { background: #ffe4e6; color: #be123c; }
.operations-card.neutral { background: #f1f5f9; color: #334155; }
.operations-card small + small { margin-top: 4px; }

.market-page .listing-fallback {
  margin: 0;
  min-height: calc(100dvh - 190px);
  padding: 0 0 42px;
  border: 0;
  background: white;
}

.list-view .listing-list-heading,
.list-view .listing-list { margin-right: clamp(16px, 3vw, 42px); margin-left: clamp(16px, 3vw, 42px); }
.list-view .listing-list-heading { margin-top: 22px; }
.market-page .list-view .listing-list {
  max-height: none;
  overflow: visible;
  padding-bottom: 36px;
}

.listing-list-heading { margin-bottom: 12px; }
.listing-list-heading .legend { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: .72rem; }
.listing-list-heading .legend i {
  width: 9px;
  height: 9px;
  margin-left: 7px;
  border-radius: 50%;
  background: var(--unobserved);
}
.listing-list-heading .legend i.observed { background: var(--selected); }

.market-page .listing-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
  max-height: 290px;
  overflow: auto;
}

.market-page .listing-button {
  min-width: 0;
  min-height: 56px;
  border-color: var(--line);
  background: white;
}

.listing-marker {
  display: grid;
  width: 44px;
  height: 44px;
  padding: 0;
  place-items: center;
  border: 3px solid white;
  border-radius: 50%;
  box-shadow: 0 8px 18px rgb(15 23 42 / 24%);
  cursor: pointer;
}

.listing-marker > span {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--unobserved);
}
.listing-marker.observed > span { background: var(--selected); }
.listing-marker.has-revenue {
  width: auto;
  min-width: 44px;
  height: 30px;
  padding: 0 9px;
  border-width: 2px;
  border-radius: 9px;
  background: linear-gradient(135deg, #ff4fa3, #e11d6b);
  color: white;
  font-size: 11px;
  line-height: 1;
}
.listing-marker.has-revenue.observed { background: linear-gradient(135deg, #f72585, #be185d); }
.listing-marker.has-revenue strong { font-weight: 900; white-space: nowrap; }

/* 허가 유형 색. 4색 전체 쌍 색각 검증(dataviz validate_palette --pairs all): 정상 시력 통과,
   파랑↔자주 색약 ΔE 7.4라 생활숙박업은 각진 모양을 덧붙인다. 흰 글자 대비 모두 5:1 이상. */
:root {
  --permit-city: #1d4ed8;
  --permit-sandbox: #c2410c;
  --permit-general: #047857;
  --permit-residence: #a21caf;
  --permit-other: #475569;
  --permit-none: #94a3b8;
}
.listing-marker.reg-city_homestay > span { background: var(--permit-city); }
.listing-marker.reg-sandbox > span { background: var(--permit-sandbox); }
.listing-marker.reg-general_lodging > span { background: var(--permit-general); }
.listing-marker.reg-residence > span { background: var(--permit-residence); border-radius: 2px; }
.listing-marker.reg-other > span { background: var(--permit-other); }
.listing-marker.reg-none > span { background: var(--permit-none); }
.listing-marker.unobserved > span { opacity: .5; }
.listing-marker.has-revenue.reg-city_homestay { background: var(--permit-city); }
.listing-marker.has-revenue.reg-sandbox { background: var(--permit-sandbox); }
.listing-marker.has-revenue.reg-general_lodging { background: var(--permit-general); }
.listing-marker.has-revenue.reg-residence { background: var(--permit-residence); border-radius: 2px; }
.listing-marker.has-revenue.reg-other { background: var(--permit-other); }
.listing-marker.has-revenue.reg-none {
  border-color: var(--permit-none);
  background: white;
  color: #334155;
}

.naver-cluster-marker.has-permit-ring,
.naver-cluster-marker.has-permit-ring.digits-4,
.naver-cluster-marker.has-permit-ring.digits-5 {
  padding: 5px;
  border: 0;
  background: var(--permit-ring);
  box-shadow: 0 0 0 2px white, 0 8px 18px rgb(15 23 42 / 24%);
}
.naver-cluster-marker.has-permit-ring > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-width: 34px;
  height: 34px;
  padding: 0 7px;
  border-radius: 999px;
  background: #1e293b;
}

.registration-legend {
  position: absolute;
  z-index: 11;
  bottom: 44px; /* 네이버 지도 로고·축척 위 */
  /* 데스크톱에서는 왼쪽 필터 패널(.filter-sheet) 오른쪽에 둔다. */
  left: calc(clamp(12px, 2.5vw, 32px) + min(380px, calc(100% - 24px)) + 12px);
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  max-width: calc(100% - clamp(12px, 2.5vw, 32px) - min(380px, calc(100% - 24px)) - 132px); /* 오른쪽 GPS·전체 범위 버튼 자리 */
  margin: 0;
  padding: 6px;
  border: 1px solid rgb(226 232 240 / 90%);
  border-radius: 14px;
  background: rgb(255 255 255 / 94%);
  box-shadow: 0 8px 22px rgb(15 23 42 / 12%);
  list-style: none;
}
.registration-legend button {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  min-height: 30px;
  padding: 0 9px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: .68rem;
  font-weight: 750;
  cursor: pointer;
}
.registration-legend button:hover { background: #f1f5f9; }
.registration-legend button[aria-pressed="false"] { color: #94a3b8; text-decoration: line-through; }
.registration-legend button[aria-pressed="false"] i { opacity: .3; }
.registration-legend i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--permit-none);
}
.registration-legend [data-group="city_homestay"] i { background: var(--permit-city); }
.registration-legend [data-group="sandbox"] i { background: var(--permit-sandbox); }
.registration-legend [data-group="general_lodging"] i { background: var(--permit-general); }
.registration-legend [data-group="residence"] i { background: var(--permit-residence); border-radius: 2px; }
.registration-legend [data-group="other"] i { background: var(--permit-other); }
.registration-legend [data-group="none"] i { box-sizing: border-box; border: 2px solid var(--permit-none); background: white; }

.naver-cluster-marker {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  width: auto;
  height: 44px;
  padding: 0 8px;
  box-sizing: border-box;
  border: 3px solid white;
  border-radius: 999px;
  box-shadow: 0 8px 18px rgb(15 23 42 / 24%);
  background: #1e293b;
  color: white;
  font-weight: 900;
  font-size: 14px;
  white-space: nowrap;
  cursor: pointer;
  line-height: 1;
}
.naver-cluster-marker.digits-4 {
  font-size: 12px;
  padding: 0 10px;
  letter-spacing: -0.3px;
}
.naver-cluster-marker.digits-5 {
  font-size: 11px;
  padding: 0 8px;
  letter-spacing: -0.5px;
}
.naver-cluster-marker.has-average {
  border-color: #fce7f3;
}

.cluster-average-revenue {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  width: max-content;
  padding: 3px 7px;
  transform: translateX(-50%);
  border: 1.5px solid white;
  border-radius: 7px;
  background: linear-gradient(135deg, #ff4fa3, #e11d6b);
  color: white;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.2;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgb(225 29 107 / 40%);
  pointer-events: none;
  z-index: 2;
}

.cluster-average-revenue::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 4px;
  border-style: solid;
  border-color: #e11d6b transparent transparent transparent;
}

.modal-backdrop {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  padding: 24px;
  place-items: center;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: rgb(15 23 42 / 58%);
}

.detail-modal {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  width: min(880px, 100%);
  height: min(85dvh, 880px);
  max-height: 85vh;
  overflow: hidden;
  border-radius: 24px;
  background: white;
  box-shadow: 0 28px 80px rgb(15 23 42 / 35%);
}

.detail-modal-header { padding: 16px 18px 10px; }
.modal-close {
  width: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #f1f5f9;
  color: #475569;
  font-size: 1.8rem;
  cursor: pointer;
}

.detail-tabs {
  display: flex;
  overflow-x: auto;
  margin: 0;
  padding: 0 12px;
  border-bottom: 1px solid #e2e8f0;
  background: #ffffff;
  scrollbar-width: none;
}
.detail-tabs::-webkit-scrollbar { display: none; }

.detail-tabs button {
  padding: 12px 14px;
  font-size: 0.88rem;
  font-weight: 600;
  color: #64748b;
  border: none;
  border-bottom: 2px solid transparent;
  background: none;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.detail-tabs button:hover {
  color: #0f172a;
}

.detail-tabs button[aria-selected="true"] {
  color: var(--accent, #e11d48);
  border-bottom-color: var(--accent, #e11d48);
  font-weight: 700;
}

.detail-content {
  min-width: 0;
  min-height: 0;
  padding: 18px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
}

.listing-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 480px;
  max-width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  z-index: 101;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  background: #ffffff;
  border-left: 1px solid var(--line, #e2e8f0);
  border-radius: 0;
  box-shadow: -8px 0 32px rgba(15, 23, 42, 0.15);
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: auto;
  overflow: hidden;
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  background: transparent;
  transition: opacity 0.25s ease;
}

.drawer-backdrop:not([hidden]) {
  display: block;
}

.drawer-backdrop:not([hidden]) .listing-drawer {
  transform: translateX(0);
}

@media (max-width: 768px) {
  .drawer-backdrop {
    pointer-events: auto;
    background: rgba(15, 23, 42, 0.4);
  }
  .listing-drawer {
    width: 100vw;
    border-left: none;
  }
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #f1f5f9;
  background: #ffffff;
}

.drawer-header-title-box {
  flex: 1;
  min-width: 0;
  margin-right: 12px;
}

.drawer-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.drawer-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.drawer-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #475569;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
}

.drawer-action-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #cbd5e1;
}

.drawer-action-btn.active {
  background: #fef2f2;
  border-color: #fecaca;
  color: #ef4444;
}

.drawer-close-btn {
  font-size: 1.1rem;
  font-weight: 700;
}

/* 공통 button min-height(44px)·.modal-close width가 덮어써 36×44 타원이 되던 것을 막고 정원으로 고정한다. */
.drawer-header-actions .drawer-action-btn {
  flex: 0 0 auto;
  box-sizing: border-box;
  width: 38px;
  height: 38px;
  min-width: 38px;
  min-height: 38px;
  padding: 0;
  aspect-ratio: 1;
  line-height: 1;
}
@media (max-width: 600px) {
  .drawer-header-actions .drawer-action-btn {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
  }
}

.drawer-tabs {
  display: flex;
  overflow-x: auto;
  border-bottom: 1px solid #e2e8f0;
  background: #ffffff;
  padding: 0 12px;
  scrollbar-width: none;
}
.drawer-tabs::-webkit-scrollbar {
  display: none;
}

.drawer-tabs button {
  padding: 12px 14px;
  font-size: 0.88rem;
  font-weight: 600;
  color: #64748b;
  border: none;
  border-bottom: 2px solid transparent;
  background: none;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.drawer-tabs button:hover {
  color: #0f172a;
}

.drawer-tabs button[aria-selected="true"] {
  color: var(--accent, #e11d48);
  border-bottom-color: var(--accent, #e11d48);
  font-weight: 700;
}

.drawer-content {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* 세로 단일 스크롤 스트림 섹션 */
.detail-stream-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.detail-stream-section:last-child {
  padding-bottom: 0;
  border-bottom: none;
}
.detail-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}
.detail-section-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 750;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.02em;
}

/* 숙소 프로필 카드 */
.listing-profile-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
}
.detail-listing-title {
  margin: 0 0 8px 0;
  font-size: 1.12rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.35;
}
.profile-badges-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-bottom: 12px;
}
.profile-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
}
.profile-badge.status-active {
  background: #dcfce7;
  color: #15803d;
}
.profile-badge.status-inactive {
  background: #f1f5f9;
  color: #64748b;
}
.profile-badge.rating {
  background: #fef3c7;
  color: #92400e;
}
.profile-badge.superhost {
  background: #fdf2f8;
  color: #9d174d;
}
.profile-badge.permit {
  background: #ede9fe;
  color: #6d28d9;
}

/* 핵심 스펙 그리드 */
.specs-chips-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
@media (max-width: 480px) {
  .specs-chips-grid {
    grid-template-columns: 1fr;
  }
}
.spec-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
}
.spec-chip-icon {
  font-size: 1.1rem;
  line-height: 1;
}
.spec-chip-body {
  display: grid;
  gap: 2px;
}
.spec-chip-label {
  font-size: 0.68rem;
  font-weight: 750;
  color: var(--muted);
}
.spec-chip-val {
  font-size: 0.95rem;
  font-weight: 750;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
}
.listing-meta-footnote {
  margin: 10px 0 0;
  font-size: 0.75rem;
  color: #94a3b8;
}

/* 계산 기준 접이식 아코디언 */
.evidence-accordion {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
}
.evidence-accordion summary {
  cursor: pointer;
  font-weight: 750;
  font-size: 0.84rem;
  color: #0f172a;
  user-select: none;
}
.evidence-accordion summary:hover {
  color: #0f172a;
}
.evidence-accordion[open] summary {
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--line);
}

/* 토지 및 입지 정보 탭 스타일 */
.land-use-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.land-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 750;
  font-size: 0.88rem;
}

.land-badge.positive {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.land-badge.danger {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.land-badge.warning {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
}

.land-badge.info {
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

.land-badge.neutral {
  background: #ffffff;
  color: #334155;
  border: 1px solid var(--line);
}

.land-card {
  padding: 12px 14px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid var(--line);
}

.land-card-title {
  font-size: 0.75rem;
  font-weight: 750;
  color: var(--muted);
  margin: 0 0 8px 0;
  letter-spacing: 0.02em;
}

.land-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.land-metric {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
}

.land-metric-label {
  font-size: 0.68rem;
  font-weight: 750;
  color: var(--muted);
}

.land-metric-val {
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
}

.land-tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.land-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  background: #e2e8f0;
  color: #334155;
}

.land-tag.primary {
  background: #e0e7ff;
  color: #3730a3;
}

.land-tag.warning {
  background: #fef3c7;
  color: #92400e;
}

.land-tag.danger {
  background: #fee2e2;
  color: #991b1b;
}

.land-hint-item {
  display: flex;
  gap: 10px;
  padding: 12px;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  margin-top: 8px;
}

.land-hint-icon {
  font-size: 1.2rem;
}

.land-hint-body h4 {
  margin: 0 0 4px 0;
  font-size: 0.88rem;
  font-weight: 700;
  color: #1e293b;
}

.land-hint-body p {
  margin: 0;
  font-size: 0.8rem;
  color: #64748b;
  line-height: 1.45;
}

.land-eum-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 10px;
  background: #0f172a;
  color: #ffffff;
  font-weight: 600;
  font-size: 0.85rem;
  text-decoration: none;
  margin-top: 8px;
  transition: background 0.15s ease;
}

.land-eum-link:hover {
  background: #334155;
}

.illustrative-revenue {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 5px 12px;
  margin: 10px 0 14px;
  padding: 12px;
  border: 1px solid rgb(109 40 217 / 22%);
  border-radius: 12px;
  background: white;
}
.illustrative-revenue span,
.illustrative-revenue strong,
.illustrative-revenue small { display: block; }
.illustrative-revenue span { color: var(--muted); font-size: .68rem; font-weight: 750; }
.illustrative-revenue strong { color: #6d28d9; font-size: 1.05rem; }
.illustrative-revenue small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: .64rem;
  line-height: 1.5;
}

.detail-tab-panel { min-width: 0; }
.detail-tab-panel > h3 { margin-top: 0; }
.detail-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.listing-revenue-summary {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
}
.listing-revenue-summary.is-loading { color: var(--muted); font-weight: 750; font-size: 0.85rem; }
.listing-revenue-summary-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.listing-revenue-summary-header h4 {
  margin: 0;
  color: #0f172a;
  font-size: 1.05rem;
  font-weight: 750;
  letter-spacing: -0.02em;
}
.listing-revenue-summary-header input[type="month"] {
  font-size: 0.8rem;
  font-weight: 650;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: #0f172a;
}
.listing-revenue-summary-note {
  margin: 0;
  color: var(--muted);
  font-size: .68rem;
  line-height: 1.45;
}
.listing-revenue-primary,
.listing-revenue-secondary {
  display: grid;
  gap: 8px;
  margin: 0;
}
.listing-revenue-primary {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.listing-revenue-secondary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.listing-revenue-primary > div,
.listing-revenue-secondary > div {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
}
.listing-revenue-primary > .is-emphasis {
  background: #f8fafc;
  border-color: #cbd5e1;
}
.listing-revenue-summary dt {
  color: var(--muted);
  font-size: .68rem;
  font-weight: 750;
  letter-spacing: -0.01em;
}
.listing-revenue-summary dd {
  margin: 0;
  color: #0f172a;
  font-size: 1.05rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.listing-revenue-primary > .is-emphasis dd {
  color: #312e81;
}
.listing-revenue-summary small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: .66rem;
  line-height: 1.35;
}
@media (max-width: 600px) {
  .listing-revenue-secondary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.listing-revenue-detail-link { justify-self: start; border: 0; padding: 0; background: transparent; color: #4f46e5; font-weight: 800; cursor: pointer; }
.listing-basic-details { margin-top: 12px; }
.listing-basic-details > summary { cursor: pointer; color: #334155; font-weight: 800; }
.listing-basic-details .detail-facts { margin-top: 12px; }
.listing-actions-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 6px 0 10px;
  width: 100%;
}
.listing-actions-row .airbnb-listing-link {
  margin: 0;
  flex-shrink: 1;
}
.listing-share-button {
  margin-left: auto;
  flex-shrink: 0;
  padding: 6px 14px;
  border: 1px solid #f9a8d4;
  border-radius: 9px;
  background: #fff1f7;
  color: #be185d;
  font-size: .82rem;
  font-weight: 800;
  cursor: pointer;
  transition: all .15s ease;
}
.listing-share-button:hover {
  background: #fce7f3;
  border-color: #f472b6;
}

@media (min-width: 901px) {
  .detail-modal[data-active-tab="summary"] {
    height: auto;
    max-height: 85vh;
  }
  .detail-modal[data-active-tab="evidence"] {
    height: auto;
    max-height: 85vh;
  }
  .detail-modal[data-active-tab="calendar"].calendar-empty {
    height: auto;
    max-height: 85vh;
  }
  .detail-modal[data-active-tab="summary"] .detail-content,
  .detail-modal[data-active-tab="evidence"] .detail-content,
  .detail-modal[data-active-tab="calendar"].calendar-empty .detail-content {
    max-height: calc(85vh - 120px);
  }
}

.monthly-total-cards,
.monthly-band-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.monthly-total-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 12px 0; }
.monthly-band-card {
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
}
.monthly-band-card.standard_weekday { border-color: #cbd5e1; background: #f8fafc; }
.monthly-band-card h5 { margin: 0 0 10px; font-size: 0.95rem; font-weight: 750; color: #0f172a; }
.monthly-band-card dl { display: grid; gap: 8px; margin: 0; }
.monthly-metric {
  min-width: 0;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #ffffff;
  display: grid;
  gap: 3px;
}
.monthly-metric dt { color: var(--muted); font-size: .68rem; font-weight: 750; letter-spacing: -0.01em; }
.monthly-metric dd { margin: 0; font-size: 1.05rem; font-weight: 800; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; color: #0f172a; }
.monthly-metric small { display: block; margin-top: 2px; color: var(--muted); font-size: .66rem; line-height: 1.35; }
.fact-value { color: var(--primary); }
.estimate-value { color: var(--violet); }
.planning-value { color: #c2410c; }
.pending-value { color: #64748b !important; }

.analysis-stage-list {
  display: grid;
  gap: .45rem;
  margin: .75rem 0 0;
  padding: 0;
  list-style: none;
}

.analysis-stage-list li {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  padding: .55rem .65rem;
  border-radius: .55rem;
  background: #f8fafc;
  font-size: .85rem;
}

.analysis-stage-list span { color: #64748b; text-align: right; }
.evidence-boundary {
  padding: 14px;
  border-left: 4px solid var(--primary);
  border-radius: 10px;
  background: #eff6ff;
  color: #1e3a8a;
}

.market-page .cost-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.market-page .cost-field input {
  min-height: 56px;
  font-size: 1.2rem;
  font-weight: 850;
  text-align: right;
}

.operations-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 52px;
}
.operations-heading { max-width: 720px; margin-bottom: 22px; }
.operations-heading p { color: var(--muted); }
.operations-hero,
.operations-panel {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: white;
  box-shadow: 0 10px 30px rgb(15 23 42 / 6%);
}
.operations-hero {
  display: grid;
  grid-template-columns: minmax(220px, .8fr) minmax(0, 1.8fr);
  gap: 24px;
}
.operations-hero.warning { border-color: #fecaca; background: #fff7f7; }
.controller-panel { margin-top: 18px; }
.controller-panel .panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}
.controller-panel > summary { min-height: 44px; cursor: pointer; list-style: none; }
.controller-panel > summary::-webkit-details-marker { display: none; }
.controller-panel > summary::after {
  content: "펼치기";
  color: var(--primary);
  font-size: .72rem;
  font-weight: 850;
}
.controller-panel[open] > summary::after { content: "접기"; }
.controller-panel > #controller-safety { margin: 14px 0 0; color: var(--muted); line-height: 1.5; }
.resume-primary { margin-top: 12px; border: 0; border-radius: 9px; padding: 9px 12px; background: #4338ca; color: #fff; font-weight: 800; cursor: pointer; }
.resume-primary-result { margin: 8px 0 0; color: var(--muted); font-size: .78rem; }
.worker-status { margin-top: 18px; }
.worker-status-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.collector-vpn-control {
  display: flex;
  align-items: center;
}
.vpn-policy-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 0.76rem;
  font-weight: 700;
  color: #065f46;
  user-select: none;
}
/* NordVPN 계정 자격 증명 설정 (nordvpn.env) */
.vpn-credentials-details {
  margin: 12px 0;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #ffffff;
  padding: 12px 16px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.vpn-credentials-summary {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  user-select: none;
}
.vpn-credentials-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.84rem;
  font-weight: 700;
  color: #1e293b;
}
.vpn-credentials-title code {
  font-size: 0.78rem;
  background: #f1f5f9;
  padding: 1px 6px;
  border-radius: 4px;
  color: #0f172a;
}
.vpn-credentials-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 999px;
  white-space: nowrap;
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #cbd5e1;
}
.vpn-credentials-badge.badge-configured {
  background: #ecfdf5;
  color: #065f46;
  border-color: #a7f3d0;
}
.vpn-credentials-badge.badge-missing {
  background: #fef2f2;
  color: #991b1b;
  border-color: #fecaca;
}
.vpn-credentials-form {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.vpn-credentials-desc {
  margin: 0;
  font-size: 0.78rem;
  color: #64748b;
  line-height: 1.5;
}
.vpn-credentials-desc strong {
  color: #334155;
}
.vpn-credentials-desc code {
  font-size: 0.76rem;
  background: #f1f5f9;
  padding: 1px 4px;
  border-radius: 4px;
}
.vpn-credentials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}
.vpn-input-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.vpn-input-group label {
  font-size: 0.77rem;
  font-weight: 600;
  color: #334155;
}
.vpn-input-group label code {
  font-size: 0.72rem;
  color: #64748b;
}
.vpn-input-group input {
  padding: 8px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  font-size: 0.82rem;
  font-family: inherit;
  outline: none;
  background: #ffffff;
  color: #0f172a;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.vpn-input-group input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.vpn-password-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.vpn-password-wrap input {
  width: 100%;
  padding-right: 38px;
}
.vpn-pw-toggle-btn {
  position: absolute;
  right: 6px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 5px 6px;
  font-size: 0.9rem;
  line-height: 1;
  border-radius: 4px;
  user-select: none;
  opacity: 0.7;
  transition: opacity 0.15s;
}
.vpn-pw-toggle-btn:hover {
  opacity: 1;
}
.vpn-credentials-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 2px;
}
.btn-save-credentials {
  background: #0284c7;
  color: #ffffff;
  border: none;
  border-radius: 7px;
  padding: 8px 16px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-save-credentials:hover {
  background: #0369a1;
}
.btn-save-credentials:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.btn-restart-vpn {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  padding: 8px 16px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-restart-vpn:hover {
  background: #e2e8f0;
  color: #0f172a;
}
.btn-restart-vpn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.vpn-credentials-msg {
  font-size: 0.78rem;
  font-weight: 600;
  color: #475569;
}
.vpn-credentials-msg.success {
  color: #059669;
}
.vpn-credentials-msg.error {
  color: #dc2626;
}
.worker-status h3 { margin: 0; font-size: .86rem; }
.worker-status-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 10px; }
.worker-status-list article { display: grid; gap: 7px; min-width: 0; padding: 14px; border-radius: 12px; background: #f8fafc; border: 1px solid #e2e8f0; }
.worker-card-header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 8px; min-width: 0; }
.worker-title-wrap { display: grid; gap: 2px; min-width: 0; }
.worker-name-row { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; }
.worker-name-row strong { font-size: 0.92rem; color: #0f172a; font-weight: 800; margin: 0; }
.worker-stage-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.3;
}
.worker-stage-badge.stage-calendar {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}
.worker-stage-badge.stage-unified {
  background: linear-gradient(135deg, #f0fdf4 0%, #eff6ff 100%);
  color: #1e40af;
  border: 1px solid #93c5fd;
  box-shadow: 0 1px 2px rgba(37,99,235,0.08);
}
.worker-stage-badge.stage-quote {
  background: #faf5ff;
  color: #7e22ce;
  border: 1px solid #e9d5ff;
}
.worker-vpn-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1.3;
}
.worker-vpn-badge.vpn-connected {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}
.worker-vpn-badge.vpn-fallback {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}
.worker-vpn-badge code {
  font-size: 0.68rem;
  font-family: ui-monospace, monospace;
}
.vpn-rot-count {
  color: #0284c7;
  font-weight: 700;
}
.vpn-failover-count {
  color: #d97706;
  font-weight: 700;
}
.worker-badge { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px; font-size: 0.74rem; font-weight: 800; white-space: nowrap; flex-shrink: 0; }
.badge-running { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.badge-resting { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }
.badge-adaptive { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.badge-blocked { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.badge-probe { background: #f5f3ff; color: #5b21b6; border: 1px solid #ddd6fe; }
.badge-done { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.worker-status-banner { display: grid; min-width: 0; overflow-wrap: anywhere; gap: 3px; padding: 9px 12px; border-radius: 8px; font-size: 0.78rem; line-height: 1.45; }
.worker-status-banner strong { font-size: 0.8rem; font-weight: 800; }
.worker-status-banner.banner-running { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }
.worker-status-banner.banner-resting { background: #f1f5f9; border: 1px solid #e2e8f0; color: #334155; }
.worker-status-banner.banner-adaptive { background: #fffdf5; border: 1px solid #fef08a; color: #854d0e; }
.worker-status-banner.banner-danger { background: #fff5f5; border: 1px solid #fecaca; color: #991b1b; }
.worker-last-burst {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  font-size: 0.76rem;
  line-height: 1.45;
}
.worker-last-burst.is-success {
  border-color: #bbf7d0;
  background: #fcfdfc;
}
.worker-last-burst.has-failures {
  border-color: #fed7aa;
  background: #fffbf5;
  box-shadow: 0 2px 8px rgba(234, 88, 12, 0.05);
}
.burst-header-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.burst-header-row strong {
  color: #334155;
  font-weight: 750;
  font-size: 0.78rem;
}
.burst-status-badge {
  font-size: 0.72rem;
  font-weight: 750;
  padding: 2px 7px;
  border-radius: 6px;
}
.burst-status-badge.ok {
  background: #dcfce7;
  color: #15803d;
}
.burst-status-badge.fail {
  background: #fee2e2;
  color: #b91c1c;
}
.burst-count-info {
  color: #64748b;
  font-size: 0.74rem;
  margin-left: auto;
}
.burst-failure-detail-box {
  display: grid;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid #ffedd5;
  margin-top: 2px;
}
.burst-detail-row {
  display: grid;
  grid-template-columns: 68px 1fr;
  align-items: baseline;
  gap: 8px;
}
.burst-detail-label {
  color: #9a3412;
  font-weight: 750;
  font-size: 0.72rem;
}
.burst-detail-content {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 0.74rem;
  line-height: 1.4;
}
.failure-category-chip {
  font-size: 0.68rem;
  font-weight: 700;
  background: #f1f5f9;
  color: #475569;
  padding: 1px 6px;
  border-radius: 4px;
}
.failure-kind-name, .failure-reason-desc {
  color: #b91c1c;
  font-weight: 650;
}
.failure-handling-chip {
  font-size: 0.68rem;
  font-weight: 750;
  padding: 1px 6px;
  border-radius: 4px;
}
.failure-handling-chip.badge-retry {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}
.failure-handling-chip.badge-paused {
  background: #fefce8;
  color: #a16207;
  border: 1px solid #fef08a;
}
.failure-handling-chip.badge-blocked {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}
.failure-handling-chip.badge-dropped {
  background: #f3f4f6;
  color: #4b5563;
  border: 1px solid #e5e7eb;
}
.failure-handling-desc {
  color: #334155;
  font-size: 0.73rem;
}
.worker-status-list span { color: var(--muted); font-size: .78rem; }
.worker-status-list .worker-plan-reason { color: #9a3412; font-weight: 750; line-height: 1.45; }
.worker-status-list .worker-plan-response { color: #334155; line-height: 1.45; }
.worker-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin: 4px 0; }
.worker-metrics div { min-width: 0; padding: 8px; border-radius: 8px; background: #fff; border: 1px solid #f1f5f9; }
.worker-metrics dt { color: var(--muted); font-size: .7rem; }
.worker-metrics dd { margin: 3px 0 0; font-size: .76rem; font-weight: 750; line-height: 1.35; overflow-wrap: anywhere; }
.controller-phase {
  flex: 0 0 auto;
  padding: 8px 12px;
  border-radius: 999px;
  background: #eef2ff;
  color: #4338ca;
  font-size: .78rem;
}
.controller-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0 0;
}
.controller-grid > div {
  min-width: 0;
  padding: 12px;
  border-radius: 12px;
  background: #f8fafc;
}
.controller-grid dt { color: var(--muted); font-size: .7rem; }
.controller-grid dd { margin: 6px 0 0; font-weight: 850; overflow-wrap: anywhere; }
.controller-history { margin-top: 18px; }
.controller-history h3 { margin: 0; font-size: .86rem; }
.controller-collapsible-group {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}
details.controller-collapsible-history {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafc;
  padding: 12px 16px;
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}
details.controller-collapsible-history[open] {
  background: #ffffff;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05);
}
details.controller-collapsible-history summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.88rem;
  font-weight: 750;
  color: #1e293b;
  cursor: pointer;
  user-select: none;
  list-style: none;
}
details.controller-collapsible-history summary::-webkit-details-marker {
  display: none;
}
details.controller-collapsible-history summary::after {
  content: "▾";
  font-size: 0.85rem;
  color: #94a3b8;
  margin-left: 8px;
  transition: transform 0.2s ease;
}
details.controller-collapsible-history[open] summary::after {
  transform: rotate(180deg);
}
.history-count-badge {
  font-size: 0.72rem;
  font-weight: 600;
  color: #475569;
  background: #e2e8f0;
  padding: 2px 8px;
  border-radius: 9999px;
  margin-left: auto;
  margin-right: 8px;
}
details.controller-collapsible-history[open] .history-count-badge {
  background: #cbd5e1;
  color: #1e293b;
}
.controller-history-note {
  margin: 10px 0 6px;
  font-size: 0.76rem;
  color: #64748b;
  line-height: 1.4;
}
.operations-scope-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}
.operations-scope-grid > div {
  min-width: 0;
  padding: 12px;
  border-radius: 12px;
  background: #f8fafc;
}
.operations-scope-grid dt { color: var(--muted); font-size: .7rem; }
.operations-scope-grid dd { margin: 6px 0 0; font-weight: 850; overflow-wrap: anywhere; }
.operations-grid { margin: 18px 0; }
.operations-card strong { font-size: clamp(1.25rem, 3vw, 2rem); }
.operations-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.operations-progress {
  margin-top: 18px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: white;
  box-shadow: 0 10px 30px rgb(15 23 42 / 6%);
}
.operations-progress > h2 { margin: 0; font-size: 1rem; }
.operations-progress > .operations-grid { margin-bottom: 0; }
.stage-list { display: grid; gap: 8px; margin-top: 12px; }
.stage-list > div { display: flex; justify-content: space-between; padding: 12px; border-radius: 10px; background: #f8fafc; }
.operations-page .coverage-list { margin-top: 14px; }
.operations-page .coverage-list label { display: grid; gap: 8px; margin-bottom: 14px; font-weight: 750; }
.operations-page progress { width: 100%; accent-color: var(--primary); }
.operations-admin-details {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: white;
  box-shadow: 0 10px 30px rgb(15 23 42 / 6%);
}
.operations-admin-details > summary {
  min-height: 56px;
  padding: 18px 22px;
  color: var(--primary);
  font-weight: 850;
  cursor: pointer;
}
.operations-admin-details > .operations-grid,
.operations-admin-details > .operations-detail-grid,
.operations-storage-grid { margin-right: 22px; margin-left: 22px; }
.operations-storage-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 22px;
}
.operations-storage-grid > div { padding: 12px; border-radius: 12px; background: #f8fafc; }
.operations-storage-grid dt { color: var(--muted); font-size: .7rem; }
.operations-storage-grid dd { margin: 6px 0 0; font-weight: 850; }

@media (max-width: 900px) {
  .map-top-bar {
    grid-template-columns: minmax(150px, 1fr) auto;
  }
  .map-top-bar:has(.environment-switch:not([hidden])) {
    grid-template-columns: minmax(150px, 1fr) auto auto;
  }
  .market-summary { grid-template-columns: repeat(2, minmax(110px, 1fr)) minmax(160px, auto) auto; overflow-x: auto; }
  .market-summary .summary-updated,
  .market-summary #refresh-dashboard { position: static; }
  .market-insight-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .market-key-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .operations-scope-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .controller-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
  body.market-page { padding-bottom: 72px; }
  .map-top-bar {
    grid-template-columns: minmax(130px, 1fr) auto;
    gap: 6px;
    min-height: 62px;
    padding: 7px 10px;
  }
  .map-top-bar:has(.environment-switch:not([hidden])) {
    grid-template-columns: minmax(130px, 1fr) auto;
  }
  .brand small { display: none; }
  .map-top-bar .operations-link { display: none; }
  .environment-switch { justify-self: end; padding: 0 4px; }
  .development-status-chip { width: 100%; }
  .app-navigation { display: none; }
  .admin-subnav {
    width: auto;
    max-width: calc(100vw - 20px);
    overflow-x: auto;
    margin-inline: 10px;
    gap: 0.25rem;
  }
  .admin-subnav a { white-space: nowrap; padding: 0.55rem 0.75rem; }
  .mobile-navigation {
    position: fixed;
    z-index: 90;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    min-height: 68px;
    padding: 5px max(6px, env(safe-area-inset-right)) max(5px, env(safe-area-inset-bottom)) max(6px, env(safe-area-inset-left));
    border-top: 1px solid #dbe7ff;
    background: rgb(255 255 255 / 98%);
    box-shadow: 0 -10px 30px rgb(23 105 255 / 10%);
  }
  .mobile-navigation button,
  .mobile-navigation a {
    display: grid;
    min-width: 0;
    min-height: 56px;
    padding: 4px 2px;
    place-items: center;
    align-content: center;
    border-radius: 12px;
    font-size: .65rem;
  }
  .mobile-navigation span { display: block; color: inherit; font-size: 1.08rem; line-height: 1; }
  .market-summary { display: none; }
  .listing-list-heading .legend { display: none; }
  .operations-back-link { display: inline-flex; }
  .market-page > .status { top: 68px; }
  .map-surface {
    height: calc(100dvh - 130px);
    min-height: 480px;
  }
  .map-action-bar { top: 12px; right: 10px; left: 10px; justify-content: flex-end; }
  .map-provider-status,
  .map-filter-button,
  .map-favorites-button,
  .projection-open-button { padding: 0 9px; font-size: .64rem; }
  .map-filter-button { display: inline-flex; align-items: center; }
  .filter-backdrop {
    position: fixed;
    z-index: 70;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    background: rgb(15 23 42 / 42%);
  }
  .filter-sheet {
    position: fixed;
    z-index: 95;
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    max-height: min(78dvh, 680px);
    padding: 10px 14px max(18px, env(safe-area-inset-bottom));
    border-radius: 26px 26px 0 0;
    transform: translateY(105%);
    visibility: hidden;
    transition: transform .22s ease, visibility .22s;
  }
  .projection-panel {
    position: fixed;
    z-index: 95;
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    max-height: min(82dvh, 760px);
    padding: 14px 14px max(20px, env(safe-area-inset-bottom));
    border-radius: 26px 26px 0 0;
  }
  .projection-location-grid,
  .projection-condition-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rent-estimate-grid { grid-template-columns: 1fr; }
  .list-view .filter-sheet,
  .market-view .filter-sheet {
    position: relative;
    z-index: 1;
    inset: auto;
    width: auto;
    max-height: none;
    margin: 12px 10px 0;
    padding: 12px;
    border-radius: 18px;
    transform: none;
    visibility: visible;
  }
  .list-view .drawer-close,
  .list-view .sheet-handle,
  .market-view .drawer-close,
  .market-view .sheet-handle { display: none; }
  .filters-open .filter-sheet { transform: translateY(0); visibility: visible; }
  .drawer-close {
    display: grid;
    flex: 0 0 44px;
    width: 44px;
    padding: 0;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: #eef4ff;
    color: var(--primary);
    font-size: 1.5rem;
    cursor: pointer;
  }
  .sheet-handle { display: block; }
  .filter-heading .eyebrow { display: none; }
  .filter-heading h2 { font-size: 1rem; }
  .filter-sheet .filter-fields {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
  }
  .filter-sheet .field-search,
  .filter-sheet label[for="district-filter"] { grid-column: 1 / -1; }
  .filter-sheet .field:not(.compact-filter):not([for="district-filter"]) { grid-column: span 2; }
  .advanced-filters { grid-column: 1 / -1; }
  .advanced-filter-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .filter-sheet .field > span { font-size: .62rem; }
  .filter-sheet input,
  .filter-sheet select { padding: 0 7px; font-size: .74rem; }
  .secondary-button { grid-column: span 2; font-size: .74rem; }
  .view-heading { display: block; padding: 20px 14px 14px; }
  .list-view > .view-heading,
  .market-view > .view-heading { display: none; }
  .view-heading p { margin-top: 7px; }
  .market-insight { width: calc(100% - 20px); margin: 12px auto 28px; padding: 14px; }
  .market-insight-heading .eyebrow { display: none; }
  .market-insight-heading h2 { font-size: .82rem; }
  #market-analysis-status { margin: 3px 0 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .market-insight-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .market-key-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .market-key-grid .insight-card { min-height: 104px; padding: 14px 11px; }
  .market-key-grid .insight-card span { font-size: .65rem; }
  .market-key-grid .insight-card strong { font-size: 1rem; }
  .insight-card { padding: 12px 10px; border-radius: 13px; }
  .insight-card span,
  .insight-card small { font-size: .55rem; }
  .insight-card strong { font-size: .86rem; }
  .market-page .listing-list { grid-template-columns: 1fr; }
  .market-page .list-view .listing-list { padding-bottom: 92px; }
  .market-page .listing-fallback { min-height: calc(100dvh - 130px); }
  .modal-backdrop { padding: 0; place-items: end center; }
  .detail-modal {
    width: 100%;
    height: calc(100dvh - max(8px, env(safe-area-inset-top)));
    max-height: none;
    border-radius: 24px 24px 0 0;
  }
  .detail-modal-header { padding: 12px 14px 8px; }
  .detail-tabs { padding: 0 5px; }
  .detail-tabs button { padding: 0 4px; font-size: .76rem; }
  .detail-content { padding: 14px; }
  .detail-facts,
  .monthly-band-grid,
  .assumption-grid,
  .market-page .cost-grid { grid-template-columns: 1fr; }
  .monthly-total-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .monthly-total-cards .monthly-metric:first-child { grid-column: 1 / -1; }
  .monthly-band-card { padding: 13px; }
  .listing-revenue-secondary { grid-template-columns: 1fr; }
  .operations-shell { width: min(100% - 20px, 1180px); padding-top: 22px; padding-bottom: 96px; }
  .operations-hero,
  .operations-detail-grid { grid-template-columns: 1fr; }
  .operations-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .controller-panel .panel-heading { display: grid; }
  .controller-panel:not([open]) { padding: 0 18px; }
  .controller-panel:not([open]) .panel-heading {
    display: flex;
    min-height: 56px;
    align-items: center;
  }
  .controller-panel:not([open]) > summary::after {
    content: "›";
    font-size: 1.2rem;
  }
  .controller-grid, .worker-metrics { grid-template-columns: 1fr; }
  .worker-status-list { grid-template-columns: 1fr; }
  .operations-scope-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 360px) {
  .market-insight-grid { grid-template-columns: 1fr; }
  .filter-sheet .filter-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filter-sheet .field-search,
  .filter-sheet .field:not(.compact-filter) { grid-column: 1 / -1; }
}

/* ----------------------------------------------------------------------
   스마트 통합 검색창 & 뷰포트 자동 연동 바 스타일
---------------------------------------------------------------------- */
.filter-smart-search-wrap {
  grid-column: 1 / -1;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  position: relative;
  margin-bottom: 6px;
}

.filter-quick-chips-wrap {
  grid-column: 1 / -1;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  margin-bottom: 10px;
}

.address-hierarchy-section {
  grid-column: 1 / -1;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  margin-bottom: 10px;
}

.address-hierarchy-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  width: 100%;
}

@media (max-width: 540px) {
  .address-hierarchy-grid {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

.quick-chips-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  gap: 8px;
  flex-wrap: wrap;
}

.quick-chips-label {
  display: block;
  font-size: 0.74rem;
  font-weight: 750;
  color: var(--muted);
  margin-bottom: 0;
}

.quick-city-tabs {
  display: inline-flex;
  background: var(--bg-soft, #f1f5f9);
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 18px;
  padding: 2px;
  gap: 2px;
  flex: 0 0 auto;
  max-width: 100%;
  flex-wrap: wrap;
}

.city-tab {
  background: transparent;
  border: none;
  padding: 3px 10px;
  border-radius: 14px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted, #64748b);
  cursor: pointer;
  transition: all 0.15s ease;
  flex: 0 0 auto;
  white-space: nowrap;
  word-break: keep-all;
}

.city-tab:hover {
  color: var(--ink, #1e293b);
}

.city-tab.active {
  background: #ffffff;
  color: var(--primary, #2563eb);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.legacy-district-field {
  position: absolute !important;
  left: -9999px !important;
  top: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0.01 !important;
  overflow: hidden !important;
  pointer-events: none !important;
}

.search-suggestions-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 1000;
  background: #ffffff;
  border-radius: 14px;
  border: 1px solid rgb(23 36 58 / 14%);
  box-shadow: 0 12px 32px rgb(23 36 58 / 18%);
  max-height: 280px;
  overflow-y: auto;
  padding: 4px 0;
}

.suggestion-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 16px;
  cursor: pointer;
  transition: background 0.15s;
}

.suggestion-item:hover {
  background: #f4f7fa;
}

.suggestion-badge {
  font-size: 0.7rem;
  font-weight: 750;
  padding: 2px 7px;
  border-radius: 6px;
  white-space: nowrap;
}

.badge-landmark {
  background: rgb(22 133 122 / 12%);
  color: var(--available);
}

.badge-borough {
  background: rgb(23 36 58 / 10%);
  color: var(--ink);
}

.badge-listing {
  background: rgb(230 95 79 / 12%);
  color: var(--observed);
}

.suggestion-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}

.suggestion-title {
  font-size: 0.85rem;
  font-weight: 650;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.suggestion-sub {
  font-size: 0.72rem;
  color: var(--muted);
}

.suggestion-empty {
  padding: 14px 16px;
  color: var(--muted);
  font-size: 0.84rem;
  text-align: center;
}

.viewport-sync-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  background: rgb(255 255 255 / 92%);
  backdrop-filter: blur(10px);
  border: 1px solid rgb(23 36 58 / 12%);
  border-radius: 14px;
  box-shadow: 0 4px 16px rgb(23 36 58 / 8%);
  margin-top: 10px;
}

.viewport-info {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink);
}

.viewport-badge {
  font-size: 0.68rem;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgb(22 133 122 / 12%);
  color: var(--available);
  font-weight: 800;
}

.viewport-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-sync-district {
  background: var(--available);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 0.72rem;
  font-weight: 750;
  padding: 2px 8px;
  cursor: pointer;
  margin-left: 2px;
  transition: opacity 0.15s;
}

.btn-sync-district:hover {
  opacity: 0.9;
}

.quick-chips-scroll {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  width: 100%;
  max-width: 100%;
  padding: 2px 0;
  box-sizing: border-box;
}

.quick-chip {
  background: rgb(255 255 255 / 92%);
  backdrop-filter: blur(8px);
  border: 1px solid rgb(23 36 58 / 12%);
  color: var(--ink);
  padding: 5px 12px;
  border-radius: 18px;
  font-size: 0.78rem;
  font-weight: 650;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.18s ease;
  box-shadow: 0 3px 10px rgb(0 0 0 / 5%);
}

.quick-chip:hover {
  background: #ffffff;
  border-color: var(--available);
  color: var(--available);
  transform: translateY(-1px);
}

.quick-chip.active {
  background: var(--available);
  color: #ffffff;
  border-color: var(--available);
  box-shadow: 0 4px 12px rgb(22 133 122 / 30%);
}

.map-auto-sync-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  font-weight: 650;
  color: var(--ink);
  background: rgb(255 255 255 / 90%);
  backdrop-filter: blur(8px);
  border: 1px solid rgb(23 36 58 / 15%);
  border-radius: 16px;
  padding: 6px 12px;
  cursor: pointer;
  user-select: none;
  box-shadow: 0 2px 8px rgb(0 0 0 / 6%);
}

.map-auto-sync-toggle input {
  cursor: pointer;
  accent-color: var(--available);
}

/* ----------------------------------------------------------------------
   수집 현황: 전국 지역 확산 로드맵 & 자율 승격 게이트 스타일
---------------------------------------------------------------------- */
.expansion-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 4px 20px rgb(23 36 58 / 5%);
}

.expansion-gate-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.76rem;
  font-weight: 750;
  padding: 4px 12px;
  border-radius: 16px;
  background: #f1f5f9;
  color: var(--muted);
}

.expansion-gate-badge.status-ready {
  background: rgb(22 133 122 / 14%);
  color: var(--available);
  border: 1px solid rgb(22 133 122 / 30%);
}

.expansion-gate-badge.status-waiting {
  background: rgb(245 158 11 / 14%);
  color: #b45309;
  border: 1px solid rgb(245 158 11 / 30%);
}

.expansion-gate-badge.status-completed {
  background: rgb(59 130 246 / 14%);
  color: #1d4ed8;
  border: 1px solid rgb(59 130 246 / 30%);
}

.expansion-gate-badge.status-blocked {
  background: rgb(239 68 68 / 14%);
  color: #dc2626;
  border: 1px solid rgb(239 68 68 / 30%);
}

.expansion-timeline {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 20px 0;
}

.timeline-step {
  display: flex;
  gap: 14px;
  padding: 12px 16px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  align-items: flex-start;
  transition: all 0.2s ease;
}

.timeline-step.completed {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.timeline-step.current {
  background: #eff6ff;
  border-color: #bfdbfe;
  box-shadow: 0 4px 14px rgb(59 130 246 / 10%);
}

.step-marker {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #e2e8f0;
  color: #64748b;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 800;
  flex-shrink: 0;
  margin-top: 2px;
}

.timeline-step.completed .step-marker {
  background: #22c55e;
  color: #ffffff;
}

.timeline-step.current .step-marker {
  background: #3b82f6;
  color: #ffffff;
}

.step-content {
  flex: 1;
  min-width: 0;
}

.step-header {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.step-city {
  font-size: 0.7rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 6px;
}

.step-city.seoul {
  background: #e0e7ff;
  color: #3730a3;
}

.step-city.busan {
  background: #ccfbf1;
  color: #0f766e;
}

.step-title {
  font-size: 0.9rem;
  color: var(--ink);
}

.step-date {
  margin-left: auto;
  font-size: 0.74rem;
  color: var(--muted);
  font-weight: 650;
}

.step-desc {
  margin: 4px 0 0;
  font-size: 0.78rem;
  color: var(--muted);
}

.gate-evaluation-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px 18px;
  margin-top: 18px;
}

.gate-eval-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.gate-eval-header h3 {
  margin: 0;
  font-size: 0.88rem;
  color: var(--ink);
}

.next-stage-name {
  font-size: 0.84rem;
  color: var(--available);
}

.gate-checks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.gate-check-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
}

.gate-check-card.passed {
  border-left: 4px solid #22c55e;
}

.gate-check-card.pending {
  border-left: 4px solid #f59e0b;
}

.check-icon {
  font-size: 1rem;
  flex-shrink: 0;
}

.check-body {
  display: flex;
  flex-direction: column;
}

.check-name {
  font-size: 0.8rem;
  color: var(--ink);
}

.check-detail {
  margin: 2px 0 0;
  font-size: 0.72rem;
  color: var(--muted);
}

/* ==========================================================================
   Geo Monitor (글로벌 숙소 노출 & 빈방 모니터링)
   ========================================================================== */
.geo-monitor-view {
  display: grid;
  gap: 20px;
  width: min(100% - 32px, 1200px);
  margin: 0 auto 60px;
  padding-top: 16px;
}

.geo-hero-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: white;
  box-shadow: 0 4px 12px rgb(15 23 42 / 4%);
}

.geo-hero-main {
  display: flex;
  align-items: center;
  gap: 12px;
}

.geo-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 700;
}
.geo-badge.idle { background: #f1f5f9; color: #475569; }
.geo-badge.running { background: #dcfce7; color: #15803d; border: 1px solid #86efac; }
.geo-badge.error { background: #fee2e2; color: #b91c1c; border: 1px solid #fca5a5; }

.geo-hero-meta {
  display: flex;
  gap: 24px;
  margin: 0;
}
.geo-hero-meta dt { font-size: 0.75rem; color: var(--muted); font-weight: 600; margin-bottom: 2px; }
.geo-hero-meta dd { margin: 0; font-size: 0.95rem; font-weight: 700; color: #0f172a; }

.geo-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.geo-stat-card {
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
}
.geo-stat-card small { display: block; font-size: 0.78rem; color: var(--muted); margin-bottom: 4px; }
.geo-stat-card strong { font-size: 1.4rem; font-weight: 800; color: #0f172a; }
.geo-stat-card.mint strong { color: #059669; }
.geo-stat-card.coral strong { color: #e11d48; }
.geo-stat-card.amber strong { color: #d97706; }

.geo-country-stats-card {
  margin-bottom: 0;
}
.geo-country-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
}
.geo-country-stat-card {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.geo-country-stat-card:hover {
  background: #ffffff;
  box-shadow: 0 4px 12px rgb(0 0 0 / 5%);
}
.geo-csc-header {
  display: flex;
  align-items: center;
  gap: 8px;
}
.geo-csc-flag {
  font-size: 1.25rem;
  line-height: 1;
}
.geo-csc-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: #0f172a;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.geo-csc-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  background: white;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgb(226 232 240 / 80%);
}
.geo-csc-metric {
  text-align: center;
}
.geo-csc-metric small {
  display: block;
  font-size: 0.68rem;
  color: var(--muted);
  margin-bottom: 2px;
}
.geo-csc-metric strong {
  font-size: 0.88rem;
  font-weight: 800;
}
.geo-csc-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  color: var(--muted);
}

.geo-layout-grid {
  display: grid;
  grid-template-columns: 380px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.geo-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: white;
  box-shadow: 0 4px 14px rgb(15 23 42 / 4%);
}
.geo-card h2 { margin: 0 0 16px; font-size: 1.15rem; font-weight: 800; color: #0f172a; }
.geo-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.geo-card-header h2 { margin: 0; }

.geo-config-card form {
  display: grid;
  gap: 16px;
}
.geo-config-card label {
  display: grid;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #334155;
}
.geo-config-card input[type="text"],
.geo-config-card input[type="number"] {
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.9rem;
}

.geo-country-picker {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  margin: 0;
}
.geo-country-picker legend { font-size: 0.8rem; font-weight: 700; color: #475569; padding: 0 6px; }
.geo-checkbox-group {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 10px;
}
.geo-checkbox-group label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
}

#geo-input-custom-countries {
  width: 100%;
  box-sizing: border-box;
}

.geo-input-action-row {
  display: flex;
  gap: 8px;
}
.geo-input-action-row input { flex: 1; }

.geo-inline-fields {
  display: flex;
  align-items: center;
  gap: 16px;
}
.geo-checkbox-inline {
  display: flex !important;
  align-items: center;
  gap: 6px;
  font-weight: 500 !important;
  cursor: pointer;
}

.geo-button-bar {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.btn-success { background: #16a34a !important; color: white !important; }
.btn-success:not(:disabled):hover { background: #15803d !important; }
.btn-success:disabled {
  background: #94a3b8 !important;
  color: #f8fafc !important;
  opacity: 0.55 !important;
  cursor: not-allowed !important;
  box-shadow: none !important;
}
.geo-button-bar button:disabled {
  opacity: 0.5 !important;
  cursor: not-allowed !important;
}
.danger-button {
  padding: 9px 16px;
  border: 1px solid #fca5a5;
  border-radius: 8px;
  background: #fef2f2;
  color: #dc2626;
  font-weight: 700;
  cursor: pointer;
}
.danger-button:disabled { opacity: 0.45 !important; cursor: not-allowed !important; }
.danger-button:not(:disabled):hover { background: #fee2e2; }

.geo-table-responsive {
  overflow-x: auto;
}
.geo-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.geo-table th {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 2px solid #e2e8f0;
  color: #475569;
  font-weight: 700;
  font-size: 0.8rem;
  white-space: nowrap;
}
.geo-table td {
  padding: 12px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: top;
}
.geo-table tbody tr:hover {
  background: #f8fafc;
}

.geo-tag {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}
.geo-tag.tag-normal { background: #dcfce7; color: #166534; }
.geo-tag.tag-blocked { background: #fee2e2; color: #991b1b; }
.geo-tag.tag-not-found { background: #fef3c7; color: #92400e; }
.geo-tag.tag-error { background: #f1f5f9; color: #475569; }

.geo-listing-title {
  max-width: 240px;
  word-break: break-all;
  font-size: 0.82rem;
  color: #1e293b;
}

.geo-date-item {
  font-size: 0.78rem;
  margin-bottom: 2px;
  white-space: nowrap;
}
.text-green { color: #16a34a; font-weight: 700; }
.text-red { color: #dc2626; font-weight: 700; }

/* 모바일 카드 리스트 기본은 데스크톱에서 숨김 */
.geo-results-mobile-list {
  display: none;
}

@media (max-width: 960px) {
  .geo-layout-grid {
    grid-template-columns: 1fr;
  }
  .geo-stats-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  /* 모바일 상단 헤더 우측 중복 버튼 숨김 (하단 탭바에 이미 있음) */
  .geo-monitor-top-btn {
    display: none !important;
  }

  .geo-header h1 {
    font-size: 1.35rem;
    letter-spacing: -0.02em;
  }

  .geo-subtitle {
    font-size: 0.82rem;
    line-height: 1.45;
  }

  .geo-monitor-view {
    width: 100% !important;
    max-width: 100vw !important;
    margin: 0 !important;
    padding: 10px 14px 100px !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
    gap: 14px;
  }

  .geo-hero-card {
    padding: 14px 16px;
    gap: 12px;
    border-radius: 14px;
    box-sizing: border-box;
    width: 100%;
  }

  .geo-hero-main {
    width: 100%;
    justify-content: space-between;
  }

  .geo-hero-meta {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 12px;
    margin: 0;
  }

  .geo-stats-row {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    width: 100%;
    box-sizing: border-box;
  }

  .geo-stat-card {
    padding: 12px 14px;
    border-radius: 12px;
    box-sizing: border-box;
    min-width: 0;
  }

  .geo-stat-card small {
    font-size: 0.72rem;
    margin-bottom: 2px;
  }

  .geo-stat-card strong {
    font-size: 1.15rem;
  }

  .geo-layout-grid {
    grid-template-columns: 1fr !important;
    gap: 14px;
    width: 100%;
    box-sizing: border-box;
    min-width: 0;
  }

  .geo-card {
    padding: 16px !important;
    border-radius: 14px !important;
    width: 100%;
    box-sizing: border-box;
    min-width: 0;
    overflow: hidden;
  }

  .geo-card h2 {
    font-size: 1.05rem;
    margin-bottom: 12px;
  }

  .geo-country-picker {
    padding: 10px 12px;
    box-sizing: border-box;
    width: 100%;
  }

  .geo-checkbox-group {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 6px 8px;
  }

  .geo-checkbox-group label {
    font-size: 0.78rem;
    line-height: 1.35;
    word-break: break-word;
  }

  .geo-checkbox-group label input {
    margin-top: 2px;
    flex-shrink: 0;
  }

  .geo-inline-fields {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .geo-button-bar {
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
  }

  .geo-button-bar button {
    width: 100%;
    min-height: 46px;
    font-size: 0.95rem;
    font-weight: 700;
  }

  .geo-input-action-row {
    flex-direction: column;
    gap: 8px;
  }

  .geo-input-action-row button {
    width: 100%;
    min-height: 42px;
    font-size: 0.88rem;
  }

  /* 모바일에서는 거대한 가로 테이블 숨김 */
  .geo-table-responsive {
    display: none !important;
  }

  /* 모바일 전용 결과 카드 리스트 표시 */
  .geo-results-mobile-list {
    display: flex !important;
    flex-direction: column;
    gap: 12px;
    width: 100%;
  }

  .geo-result-card {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: 0 2px 8px rgb(15 23 42 / 4%);
    box-sizing: border-box;
    width: 100%;
  }

  .geo-result-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }

  .geo-result-country {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
  }

  .geo-result-flag {
    font-size: 1.2rem;
  }

  .geo-result-city {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--muted);
    margin-left: 2px;
  }

  .geo-result-listing {
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.4;
  }

  .geo-result-listing a {
    color: var(--primary);
    text-decoration: none;
    word-break: break-all;
  }

  .geo-result-listing a:active,
  .geo-result-listing a:hover {
    text-decoration: underline;
  }

  .geo-result-dates {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    background: #f8fafc;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid #f1f5f9;
  }

  .geo-result-date-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.76rem;
    background: white;
    padding: 3px 8px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    font-weight: 600;
  }

  .geo-result-date-chip .chip-dates {
    color: #475569;
  }

  .geo-result-date-chip .chip-price {
    color: #0f172a;
  }

  .geo-result-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--muted);
    border-top: 1px solid #f1f5f9;
    padding-top: 8px;
  }
}

/* 수집 공평성 분포 (기아 방지) 패널 스타일 */
.fairness-panel {
  background: white;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  padding: 20px 24px;
  margin-top: 24px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.03);
}

.fairness-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.fairness-header h2 {
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 4px;
}

.fairness-desc {
  font-size: 0.85rem;
  color: #64748b;
  margin: 0;
}

.fairness-summary-badge {
  font-size: 0.85rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 6px 12px;
  border-radius: 20px;
  color: #334155;
}

.fairness-summary-badge strong {
  color: #0284c7;
}

.fairness-bars {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.fairness-row {
  display: grid;
  grid-template-columns: 180px 1fr 110px;
  align-items: center;
  gap: 16px;
  padding: 8px 12px;
  border-radius: 8px;
  background: #f8fafc;
  transition: background 0.2s;
}

.fairness-row.priority {
  background: #fffbeb;
  border-left: 3px solid #f59e0b;
}

.fairness-label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.fairness-days {
  font-size: 0.88rem;
  font-weight: 700;
  color: #1e293b;
}

.fairness-badge-priority {
  font-size: 0.7rem;
  font-weight: 700;
  background: #fee2e2;
  color: #dc2626;
  padding: 2px 6px;
  border-radius: 4px;
}

.fairness-badge-normal {
  font-size: 0.7rem;
  font-weight: 600;
  background: #dcfce7;
  color: #15803d;
  padding: 2px 6px;
  border-radius: 4px;
}

.fairness-bar-track {
  width: 100%;
  height: 10px;
  background: #e2e8f0;
  border-radius: 5px;
  overflow: hidden;
}

.fairness-bar-fill {
  height: 100%;
  border-radius: 5px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.fill-priority {
  background: linear-gradient(90deg, #f59e0b, #ef4444);
}

.fill-normal {
  background: linear-gradient(90deg, #10b981, #0284c7);
}

.fairness-numbers {
  text-align: right;
  font-size: 0.88rem;
}

.fairness-numbers strong {
  color: #0f172a;
}

.fairness-numbers small {
  color: #64748b;
  margin-left: 4px;
}

@media (max-width: 640px) {
  .fairness-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .fairness-numbers {
    text-align: left;
  }
}

/* ==========================================================================
   인증 및 로그인 페이지 스타일
   ========================================================================== */
.auth-page {
  min-height: 100vh;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at top right, #f1f5f9, #e2e8f0 80%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #1e293b;
}

.auth-container {
  width: 100%;
  max-width: 420px;
  padding: 24px;
}

.auth-card {
  background: #ffffff;
  border-radius: 20px;
  padding: 36px 32px;
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.08), 0 0 1px 1px rgba(0, 0, 0, 0.04);
  border: 1px solid #e2e8f0;
}

.auth-header {
  text-align: center;
  margin-bottom: 28px;
}

.brand-mark.large {
  width: 52px;
  height: 52px;
  font-size: 1.5rem;
  margin: 0 auto 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #2563eb;
  color: #ffffff;
  border-radius: 14px;
  font-weight: 800;
  box-shadow: 0 8px 16px -4px rgba(37, 99, 235, 0.3);
}

.auth-header h1 {
  font-size: 1.4rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 8px;
  letter-spacing: -0.02em;
}

.auth-subtitle {
  font-size: 0.88rem;
  color: #64748b;
  margin: 0;
  line-height: 1.45;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.auth-input {
  width: 100%;
  box-sizing: border-box;
  padding: 13px 16px;
  border: 1.5px solid #cbd5e1;
  border-radius: 12px;
  font-size: 0.95rem;
  color: #0f172a;
  background: #f8fafc;
  transition: all 0.15s ease-in-out;
}

.auth-input:focus {
  outline: none;
  background: #ffffff;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.auth-error {
  padding: 10px 14px;
  border-radius: 10px;
  background: #fef2f2;
  border: 1px solid #fee2e2;
  color: #b91c1c;
  font-size: 0.85rem;
  font-weight: 500;
  line-height: 1.4;
}

.auth-submit-btn {
  width: 100%;
  padding: 13px 16px;
  border: none;
  border-radius: 12px;
  background: #2563eb;
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-submit-btn:hover:not(:disabled) {
  background: #1d4ed8;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
  transform: translateY(-1px);
}

.auth-submit-btn:active:not(:disabled) {
  transform: translateY(0);
}

.auth-submit-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.auth-logout-btn {
  margin-left: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #64748b;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
}

.auth-logout-btn:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #b91c1c;
}

/* 🏆 수익성 랭킹 페이지 스타일 */
.rankings-view {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
}

.rankings-highlights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.rankings-progress {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface, #fff);
  color: var(--text, #18392b);
}
.rankings-progress > div { flex: 1; min-width: 0; }
.rankings-progress strong, .rankings-progress small { display: block; }
.rankings-progress small { margin-top: .35rem; color: var(--muted, #64748b); line-height: 1.5; }
.rankings-progress .ranking-loader { flex-shrink: 0; border-color: #dce8df; border-top-color: #38745a; }
.rankings-progress[data-state="error"] { border-color: #d3a59b; }
.ranking-placeholder { display: grid; align-content: center; gap: 1rem; min-height: 170px; padding: 1.5rem; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.ranking-placeholder .ranking-skeleton { width: 100%; background-image: linear-gradient(90deg, #f0f5f1 20%, #dce8df 45%, #f0f5f1 70%); }
.ranking-placeholder .ranking-skeleton:last-child { width: 65%; }
@media (prefers-reduced-motion: reduce) {
  .ranking-loader, .ranking-skeleton { animation: none; }
}

.ranking-highlight-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.ranking-highlight-card.profit {
  border-left: 4px solid #eab308;
  background: linear-gradient(135deg, #fffdf0 0%, #ffffff 100%);
}

.ranking-highlight-card.roi {
  border-left: 4px solid #10b981;
  background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
}

.ranking-highlight-card.deposit {
  border-left: 4px solid #3b82f6;
  background: linear-gradient(135deg, #eff6ff 0%, #ffffff 100%);
}

.ranking-highlight-card .highlight-icon {
  font-size: 2rem;
}

.ranking-highlight-card .highlight-info {
  display: flex;
  flex-direction: column;
}

.ranking-highlight-card .highlight-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 2px;
}

.ranking-highlight-card .highlight-val {
  font-size: 1.25rem;
  font-weight: 800;
  color: #0f172a;
}

.ranking-highlight-card .highlight-sub {
  font-size: 0.85rem;
  color: #475569;
  margin-top: 2px;
}

.rankings-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  background: #ffffff;
  padding: 1rem 1.25rem;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
}

.ranking-room-capsules,
.ranking-sort-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.room-capsule-btn,
.sort-tab-btn {
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #475569;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.sort-tab-btn {
  border-radius: 8px;
}

.room-capsule-btn:hover,
.sort-tab-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.room-capsule-btn.active,
.sort-tab-btn.active {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

.rankings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1.25rem;
}

.rankings-loading,
.rankings-empty,
.rankings-error {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem 1rem;
  color: #64748b;
  background: #ffffff;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  font-size: 1rem;
}

.rankings-loading { display: grid; justify-items: center; gap: .7rem; }
.rankings-loading strong { color: #1e3a8a; }
.rankings-loading small { color: #64748b; }
.ranking-loader { width: 30px; height: 30px; border: 4px solid #dbeafe; border-top-color: #2563eb; border-radius: 50%; animation: ranking-spin .8s linear infinite; }
.ranking-skeleton { width: min(420px, 90%); height: 12px; border-radius: 99px; background: linear-gradient(90deg, #eef2ff 20%, #dbeafe 45%, #eef2ff 70%); background-size: 200% 100%; animation: ranking-shimmer 1.2s linear infinite; }
@keyframes ranking-spin { to { transform: rotate(360deg); } }
@keyframes ranking-shimmer { to { background-position: -200% 0; } }

.ranking-card {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.ranking-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.ranking-card.top-tier {
  border-color: #fde047;
  background: linear-gradient(180deg, #fffdf5 0%, #ffffff 100%);
}

.ranking-card-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.ranking-badge {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 800;
  color: #475569;
  flex-shrink: 0;
}

.ranking-badge.medal {
  background: #fef08a;
  font-size: 1.75rem;
}

.ranking-title-group h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}

.ranking-title-group h3 small {
  font-size: 0.85rem;
  font-weight: 400;
  color: #64748b;
}

.ranking-listing-count {
  font-size: 0.8rem;
  color: #64748b;
}

.ranking-metric-main {
  background: #f8fafc;
  padding: 1rem;
  border-radius: 12px;
  border: 1px solid #f1f5f9;
}

.main-profit {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.5rem;
}

.main-profit .metric-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #475569;
}

.main-profit .metric-val {
  font-size: 1.35rem;
  font-weight: 800;
  color: #059669;
}

.main-profit .metric-val.negative {
  color: #dc2626;
}

.profit-bar-track {
  height: 6px;
  background: #e2e8f0;
  border-radius: 9999px;
  overflow: hidden;
}

.profit-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981 0%, #059669 100%);
  border-radius: 9999px;
}

.ranking-metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin: 0;
}

.ranking-metrics-grid div {
  display: flex;
  flex-direction: column;
}

.ranking-metrics-grid dt {
  font-size: 0.75rem;
  color: #64748b;
  margin-bottom: 2px;
}

.ranking-metrics-grid dd {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
}

.ranking-metrics-grid dd.highlight-green {
  color: #059669;
}

.ranking-card-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.ranking-action-btn {
  flex: 1;
  padding: 0.6rem;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  font-size: 0.825rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.ranking-action-btn:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #0f172a;
}

.admin-subnav {
  display: flex;
  gap: 0.5rem;
  margin: 1.25rem 0;
  padding: 0.5rem;
  width: fit-content;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
}

.admin-subnav a {
  padding: 0.6rem 0.9rem;
  border-radius: 8px;
  color: #475569;
  font-weight: 700;
  text-decoration: none;
}

.admin-subnav a:hover,
.admin-subnav a[aria-current="page"] {
  background: #eff6ff;
  color: #1d4ed8;
}

/* 수익 랭킹은 홈의 주요 기능으로만 제공한다. */
.admin-subnav a[href="/?view=rankings#rankings"],
.admin-subnav a[href="./?view=rankings#rankings"],
.admin-subnav a[href="../?view=rankings#rankings"] { display: none; }

.admin-overseas-panel {
  scroll-margin-top: 1rem;
}

.admin-overseas-subnav {
  margin: 12px 16px 0;
}

.admin-overseas-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.admin-log-row {
  display: grid;
  grid-template-columns: minmax(10rem, 1fr) auto;
  gap: 0.25rem 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid #e2e8f0;
}

.admin-log-row p { grid-column: 1 / -1; margin: 0; color: #475569; }
.admin-log-row time { color: #64748b; font-size: 0.875rem; }
.admin-log-row.blocked strong { color: #b91c1c; }
.admin-log-row.probe strong { color: #a16207; }

@media (max-width: 640px) {
  .rankings-view {
    padding: 1rem 0.75rem 2rem;
  }

  .rankings-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .rankings-toolbar {
    padding: 0.875rem;
  }

  .ranking-card {
    padding: 1rem;
  }
}

/* 분석기 현황 (Admin Analyzer) 스타일 */
.analyzer-toolbar-panel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin: 16px 0 14px;
  padding: 16px 20px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.analyzer-toolbar-title h2 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  color: #1e293b;
}
.analyzer-toolbar-title p {
  margin: 3px 0 0;
  font-size: 0.82rem;
  color: #64748b;
  font-weight: 600;
}
.heading-with-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  width: 100%;
}
.analyzer-top-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.analyzer-month-label {
  font-size: .82rem;
  font-weight: 800;
  color: #475569;
}
.analyzer-month-select {
  padding: 8px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  background: #ffffff;
  font-weight: 800;
  font-size: .88rem;
  color: #1e293b;
  cursor: pointer;
}
.run-analyzer-btn {
  padding: 8px 16px;
  font-size: .88rem;
  font-weight: 800;
  border-radius: 9px;
  background: #4f46e5;
  color: #ffffff;
  border: 0;
  cursor: pointer;
  transition: background .15s ease;
}
.run-analyzer-btn:hover:not(:disabled) {
  background: #4338ca;
}
.run-analyzer-btn:disabled {
  opacity: .65;
  cursor: not-allowed;
}

.analyzer-hero {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.hero-label {
  display: inline-block;
  font-size: .72rem;
  font-weight: 800;
  color: #6366f1;
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 4px;
}
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: .88rem;
  font-weight: 800;
  background: #f1f5f9;
  color: #475569;
}
.status-badge.live {
  background: #dcfce7;
  color: #15803d;
}
.status-badge.error {
  background: #fee2e2;
  color: #b91c1c;
}

.analyzer-scope-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}
.analyzer-metrics-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.analyzer-quality-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
  margin-top: 12px;
}
.quality-card {
  padding: 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
}
.quality-card h3 {
  margin: 0 0 12px;
  font-size: .92rem;
  font-weight: 800;
  color: #334155;
}
.dist-row {
  margin-bottom: 12px;
}
.dist-row:last-child {
  margin-bottom: 0;
}
.dist-row-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .8rem;
  margin-bottom: 5px;
}
.dist-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  color: #334155;
}
.dist-count {
  font-weight: 800;
  color: #1e293b;
}
.badge {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: .72rem;
  font-weight: 900;
}
.badge.emerald { background: #d1fae5; color: #065f46; }
.badge.blue { background: #dbeafe; color: #1e40af; }
.badge.amber { background: #fef3c7; color: #92400e; }
.badge.gray { background: #f1f5f9; color: #475569; }

.progress-track {
  height: 8px;
  border-radius: 4px;
  background: #e2e8f0;
  overflow: hidden;
  width: 100%;
}
.progress-bar {
  height: 100%;
  border-radius: 4px;
  transition: width .3s ease;
}
.progress-bar.emerald { background: #10b981; }
.progress-bar.blue { background: #3b82f6; }
.progress-bar.amber { background: #f59e0b; }
.progress-bar.gray { background: #94a3b8; }

.table-responsive {
  width: 100%;
  overflow-x: auto;
  margin-top: 12px;
}
.analyzer-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .84rem;
  text-align: left;
}
.analyzer-table th {
  padding: 10px 12px;
  background: #f8fafc;
  border-bottom: 2px solid #e2e8f0;
  color: #475569;
  font-weight: 800;
  white-space: nowrap;
}
.analyzer-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}
.analyzer-table .num-col {
  text-align: right;
}
.analyzer-table .empty-cell {
  text-align: center;
  padding: 24px;
  color: #64748b;
}

.pipeline-inputs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.pipeline-input-card {
  padding: 14px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pipeline-input-card.emerald { border-left: 4px solid #10b981; }
.pipeline-input-card.blue { border-left: 4px solid #3b82f6; }
.pipeline-input-card.purple { border-left: 4px solid #8b5cf6; }
.pipeline-input-card.amber { border-left: 4px solid #f59e0b; }
.pipeline-input-card.indigo { border-left: 4px solid #6366f1; }
.pipeline-input-card.cyan { border-left: 4px solid #06b6d4; }
.pipeline-input-card.rose { border-left: 4px solid #f43f5e; }
.pipeline-input-card.gray { border-left: 4px solid #94a3b8; }

.pipeline-input-card .card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.pipeline-input-card .card-title {
  font-size: .8rem;
  font-weight: 800;
  color: #475569;
}
.pipeline-input-card .card-badge {
  font-size: .66rem;
  font-family: monospace;
  padding: 2px 6px;
  background: #f1f5f9;
  border-radius: 4px;
  color: #64748b;
}
.pipeline-input-card .card-val {
  font-size: 1.25rem;
  font-weight: 900;
  color: #0f172a;
}
.pipeline-input-card .card-detail {
  margin: 0;
  font-size: .72rem;
  color: #64748b;
  line-height: 1.35;
}

.diagnostics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.diag-item {
  padding: 12px;
  background: #f8fafc;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.diag-key {
  font-size: .72rem;
  font-weight: 800;
  color: #64748b;
}
.diag-val {
  font-size: .88rem;
  font-weight: 800;
  color: #1e293b;
  overflow-wrap: anywhere;
}
.alert-box.error {
  padding: 14px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 12px;
  color: #991b1b;
}
.alert-box.error h4 {
  margin: 0 0 8px;
  font-size: .95rem;
}
.alert-box.error p {
  margin: 4px 0;
  font-size: .84rem;
}
.badge-count {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 9999px;
  background: #e0e7ff;
  color: #3730a3;
  font-size: .78rem;
  font-weight: 800;
}
.status.busy {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}

/* ==========================================================================
   실시간 분석기 엔진 상태 및 카운트다운 타이머
   ========================================================================== */
.hero-status-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.analyzer-countdown-box {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  border-radius: 9999px;
  font-size: .82rem;
}
.analyzer-countdown-box .countdown-label {
  color: #6366f1;
  font-weight: 700;
  font-size: .75rem;
}
.analyzer-countdown-box strong {
  color: #312e81;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
}

/* ==========================================================================
   핵심 시장 인사이트 (Market Insights)
   ========================================================================== */
.market-insights-panel .panel-badge-label {
  display: inline-block;
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .06em;
  color: #4f46e5;
  background: #eef2ff;
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 4px;
}
.market-insights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  margin-top: 14px;
}
.insight-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
}
.insight-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.insight-icon {
  font-size: 1.25rem;
  line-height: 1;
}
.insight-card-header h3 {
  margin: 0;
  font-size: .92rem;
  font-weight: 800;
  color: #1e293b;
}
.insight-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
}
.insight-main-stat {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 10px;
}
.insight-main-stat strong {
  font-size: 1.75rem;
  font-weight: 900;
  color: #0f172a;
  letter-spacing: -.02em;
}
.stat-unit {
  font-size: .84rem;
  font-weight: 700;
  color: #64748b;
}
.insight-split-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8fafc;
  border-radius: 10px;
  padding: 10px 14px;
  border: 1px solid #f1f5f9;
}
.split-col {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.split-label {
  font-size: .72rem;
  font-weight: 700;
  color: #64748b;
}
.split-col strong {
  font-size: .95rem;
  font-weight: 800;
  color: #1e293b;
}
.split-col small {
  font-size: .78rem;
  font-weight: 700;
  color: #475569;
}
.split-divider {
  font-size: .78rem;
  font-weight: 800;
  color: #94a3b8;
}
.insight-hotspot-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.insight-hotspot-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #f1f5f9;
}
.hotspot-left {
  display: flex;
  align-items: center;
  gap: 8px;
}
.hotspot-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  font-size: .75rem;
  font-weight: 900;
}
.hotspot-rank.rank-1 { background: #fef08a; color: #854d0e; }
.hotspot-rank.rank-2 { background: #e2e8f0; color: #334155; }
.hotspot-rank.rank-3 { background: #ffedd5; color: #9a3412; }
.hotspot-name {
  font-weight: 800;
  font-size: .88rem;
  color: #1e293b;
}
.hotspot-stat {
  font-weight: 800;
  font-size: .88rem;
  color: #059669;
}
.insight-desc {
  font-size: .8rem;
  color: #64748b;
  margin: 0 0 10px;
  line-height: 1.4;
}
.room-type-comparison {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.room-type-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #f1f5f9;
}
.room-type-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.room-type-meta small {
  font-size: .72rem;
  color: #64748b;
  font-weight: 700;
}
.room-type-stat {
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.room-type-stat strong {
  font-size: .92rem;
  font-weight: 800;
  color: #1e293b;
}
.room-type-stat small {
  font-size: .72rem;
  color: #64748b;
  font-weight: 700;
}

/* ==========================================================================
   상권 벤치마크 정렬 툴바 & 뱃지
   ========================================================================== */
.benchmarks-toolbar {
  margin-top: 10px;
  margin-bottom: 8px;
}
.sort-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.sort-tab {
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  font-size: .82rem;
  font-weight: 800;
  color: #475569;
  cursor: pointer;
  transition: all .15s ease;
}
.sort-tab:hover {
  background: #f1f5f9;
  color: #1e293b;
}
.sort-tab.active {
  background: #4f46e5;
  border-color: #4f46e5;
  color: #ffffff;
}
.rank-col {
  width: 50px;
  text-align: center;
}
.rank-badge {
  display: inline-block;
  width: 22px;
  height: 22px;
  line-height: 22px;
  text-align: center;
  border-radius: 6px;
  font-size: .75rem;
  font-weight: 900;
  background: #f1f5f9;
  color: #64748b;
}
.rank-badge.top-1 { background: #fef08a; color: #854d0e; }
.rank-badge.top-2 { background: #e2e8f0; color: #334155; }
.rank-badge.top-3 { background: #ffedd5; color: #9a3412; }

/* ==========================================================================
   최근 실행 이력 타임라인 미니 테이블
   ========================================================================== */
.recent-history-section {
  margin-bottom: 20px;
}
.recent-history-section h3 {
  margin: 0 0 8px;
  font-size: .92rem;
  font-weight: 800;
  color: #334155;
}
.history-table th {
  font-size: .8rem;
  padding: 8px 10px;
}
.history-table td {
  font-size: .8rem;
  padding: 8px 10px;
}


/* ==========================================================================
   SOLID/GRASP 표준 메트릭 툴팁 및 지표 의미 안내 팝오버 스타일
   ========================================================================== */
.metric-info-badge {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  width: 15px !important;
  height: 15px !important;
  min-width: 15px !important;
  min-height: 15px !important;
  max-width: 15px !important;
  max-height: 15px !important;
  aspect-ratio: 1 / 1 !important;
  padding: 0 !important;
  border: none !important;
  border-radius: 50% !important;
  background: rgba(100, 116, 139, 0.15) !important;
  color: #64748b !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  line-height: 15px !important;
  cursor: help !important;
  margin-left: 5px !important;
  vertical-align: middle !important;
  transition: all 0.15s ease !important;
  position: relative !important;
  user-select: none !important;
  box-sizing: border-box !important;
  flex-shrink: 0 !important;
  align-self: center !important;
  overflow: hidden !important;
}

.metric-info-badge svg {
  display: block !important;
  width: 9px !important;
  height: 9px !important;
  flex-shrink: 0 !important;
  fill: currentColor !important;
  pointer-events: none !important;
}

.metric-info-badge:hover,
.metric-info-badge:focus {
  background: #3b82f6;
  color: #ffffff;
  outline: none;
}

.metric-info-badge[data-tooltip]:hover::after,
.metric-info-badge[data-tooltip]:focus::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 7px);
  left: 50%;
  transform: translateX(-50%);
  background: #0f172a;
  color: #f8fafc;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.5;
  white-space: pre-wrap;
  width: max-content;
  max-width: 290px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.2);
  z-index: 10000;
  pointer-events: none;
  text-align: left;
}

.metric-info-badge[data-tooltip]:hover::before,
.metric-info-badge[data-tooltip]:focus::before {
  content: "";
  position: absolute;
  bottom: calc(100% + 1px);
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px 6px 0 6px;
  border-style: solid;
  border-color: #0f172a transparent transparent transparent;
  z-index: 10000;
}

/* ==========================================================================
   관리자 공통 통합 시스템 상황판 (System Health Banner)
   ========================================================================== */
.admin-health-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  margin: 0 0 18px 0;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.health-banner-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.health-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 700;
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #e2e8f0;
  cursor: default;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.health-badge.ok,
.health-badge.running {
  background: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}

.health-badge.resting {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}

.health-badge.warning {
  background: #fffbeb;
  color: #b45309;
  border-color: #fde68a;
}

.health-badge.danger,
.health-badge.blocked {
  background: #fef2f2;
  color: #b91c1c;
  border-color: #fecaca;
}

.health-badge.vpn {
  background: #f5f3ff;
  color: #6d28d9;
  border-color: #ddd6fe;
}

.health-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.health-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.health-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 11px;
  border-radius: 8px;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid var(--line);
  background: #f8fafc;
  color: #334155;
  transition: all 0.15s ease;
}

.health-action-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.health-action-btn.primary {
  background: #2563eb;
  color: #ffffff;
  border-color: #1d4ed8;
}

.health-action-btn.primary:hover {
  background: #1d4ed8;
}

.health-action-btn.danger {
  background: #dc2626;
  color: #ffffff;
  border-color: #b91c1c;
}

.health-action-btn.danger:hover {
  background: #b91c1c;
}

/* ==========================================================================
   서울 25개 자치구 수집·정찰 매트릭스 (Phase 2)
   ========================================================================== */
.matrix-summary-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.districts-matrix-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 14px;
}

.district-zone-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
}

.district-zone-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 8px;
}

.district-zone-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 8px;
}

.district-zone-meta {
  font-size: 0.78rem;
  color: #64748b;
  font-weight: 600;
}

.district-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}

.district-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 12px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  transition: all 0.15s ease;
}

.district-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.07);
}

.district-card.active {
  border-color: #6ee7b7;
  background: #ffffff;
}

.district-card.observing {
  border-color: #fcd34d;
  background: #ffffff;
}

.district-card.unscouted {
  border: 1px dashed #94a3b8;
  background: #f8fafc;
}

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

.district-name {
  font-size: 0.92rem;
  font-weight: 800;
  color: #0f172a;
}

.district-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 9999px;
  text-transform: uppercase;
}

.district-badge.active {
  background: #d1fae5;
  color: #065f46;
}

.district-badge.observing {
  background: #fef3c7;
  color: #92400e;
}

.district-badge.unscouted {
  background: #e2e8f0;
  color: #475569;
}

.district-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 10px;
  font-size: 0.76rem;
}

.district-metric-item dt {
  color: #64748b;
  font-size: 0.68rem;
  margin-bottom: 1px;
}

.district-metric-item dd {
  margin: 0;
  font-weight: 700;
  color: #1e293b;
  white-space: nowrap;
}

.district-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  border-top: 1px solid #f1f5f9;
  font-size: 0.72rem;
  color: #94a3b8;
}

.district-scout-btn {
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid #3b82f6;
  background: #eff6ff;
  color: #1d4ed8;
  transition: all 0.15s ease;
}

.district-scout-btn:hover {
  background: #3b82f6;
  color: #ffffff;
}

.district-scout-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ==========================================================================
   Scout 신규 정찰 제어 센터 (Phase 3)
   ========================================================================== */
.scout-control-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.scout-plan-overview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}
.scout-plan-overview > div {
  display: grid;
  gap: 8px;
  padding: 16px;
  background: var(--surface-soft, #f1f5f9);
  border-radius: 14px;
  min-width: 0;
}
.scout-plan-overview span { color: var(--muted); font-size: .8rem; }
.scout-plan-overview strong { overflow-wrap: anywhere; }
.scout-control-actions > label,
.scout-target-filters label { display: grid; gap: 6px; font-size: .85rem; min-width: 0; }
.scout-control-actions select,
.scout-target-filters select,
.scout-target-filters input {
  min-height: 44px;
  max-width: 100%;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: #1e293b;
}
.scout-control-actions button { min-height: 44px; white-space: nowrap; }
.scout-control-panel .scout-select-group { flex-wrap: wrap; max-width: 100%; }
.scout-control-panel .scout-select-group label { flex-basis: 100%; font-size: .85rem; }
.scout-control-panel .scout-district-select { flex: 1 1 180px; width: 180px; }
.scout-plan-queue h3 { margin-bottom: 10px; font-size: .95rem; }
#scout-priority-list { padding-left: 22px; }
#scout-priority-list li { margin: 10px 0; overflow-wrap: anywhere; }
.scout-queue-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.scout-queue-actions button { min-height: 40px; }
.scout-next-details summary { cursor: pointer; padding: 12px 0; }
#scout-next-list { max-height: 240px; overflow-y: auto; overscroll-behavior: auto; padding-left: 28px; }
#scout-next-list li { padding: 6px 0; overflow-wrap: anywhere; }
.scout-target-filters { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.scout-target-filters label { flex: 1 1 180px; }
.scout-target-card { min-width: 0; text-align: left; }
.scout-target-card h4 { margin: 0 0 10px; font-size: .95rem; overflow-wrap: anywhere; }
.scout-target-card p { margin: 6px 0; font-size: .8rem; overflow-wrap: anywhere; }
.scout-target-card label { display: flex; align-items: center; gap: 6px; min-height: 44px; font-size: .85rem; }
.scout-target-card input[type="checkbox"] { width: 18px; height: 18px; flex: 0 0 18px; }
.scout-target-card button { min-height: 44px; margin-top: 6px; }
.scout-target-card.is-current { border-color: #3b82f6; background: #eff6ff; }
.scout-control-panel .scout-progress-info { flex-wrap: wrap; gap: 8px; }
@media (max-width: 600px) {
  .scout-plan-overview { grid-template-columns: 1fr; }
  .scout-control-actions > label,
  .scout-control-panel .scout-select-group { width: 100%; }
}

.scout-select-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.scout-district-select {
  padding: 5px 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: #1e293b;
  font-size: 0.8rem;
  font-weight: 600;
  outline: none;
}

.scout-district-select:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.scout-progress-container {
  margin-top: 14px;
  padding: 12px 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
}

.scout-progress-bar-wrap {
  width: 100%;
  height: 8px;
  background: #e2e8f0;
  border-radius: 9999px;
  overflow: hidden;
}

.scout-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #10b981);
  border-radius: 9999px;
  transition: width 0.3s ease;
}

.scout-progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #334155;
}

/* ==========================================================================
   관측 성숙도 파이프라인 퍼널 및 D-Day 예측 (Phase 4)
   ========================================================================== */
.maturity-panel {
  margin-top: 20px;
}

.maturity-summary-badge {
  font-size: 0.82rem;
  font-weight: 700;
  color: #047857;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  padding: 5px 12px;
  border-radius: 9999px;
}

.maturity-funnel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.maturity-stage-card {
  display: flex;
  flex-direction: column;
  padding: 14px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  transition: all 0.15s ease;
}

.maturity-stage-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
}

.maturity-stage-card.stage-1 {
  border-left: 4px solid #94a3b8;
}

.maturity-stage-card.stage-2 {
  border-left: 4px solid #f59e0b;
}

.maturity-stage-card.stage-3 {
  border-left: 4px solid #10b981;
}

.maturity-stage-card.stage-4 {
  border-left: 4px solid #6366f1;
}

.maturity-stage-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stage-tag {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  background: #f1f5f9;
  color: #475569;
}

.stage-1 .stage-tag { background: #f1f5f9; color: #475569; }
.stage-2 .stage-tag { background: #fef3c7; color: #b45309; }
.stage-3 .stage-tag { background: #d1fae5; color: #065f46; }
.stage-4 .stage-tag { background: #ede9fe; color: #5b21b6; }

.stage-title {
  font-size: 0.85rem;
  font-weight: 800;
  color: #1e293b;
}

.maturity-stage-count {
  font-size: 1.45rem;
  font-weight: 900;
  color: #0f172a;
  margin: 10px 0 6px 0;
}

.maturity-stage-count small {
  font-size: 0.78rem;
  font-weight: 600;
  color: #64748b;
  margin-left: 4px;
}

.maturity-stage-bar-wrap {
  width: 100%;
  height: 6px;
  background: #e2e8f0;
  border-radius: 9999px;
  overflow: hidden;
}

.maturity-stage-bar {
  height: 100%;
  border-radius: 9999px;
  transition: width 0.4s ease;
}

.stage-1 .maturity-stage-bar { background: #94a3b8; }
.stage-2 .maturity-stage-bar { background: #f59e0b; }
.stage-3 .maturity-stage-bar { background: #10b981; }
.stage-4 .maturity-stage-bar { background: #6366f1; }

.maturity-stage-desc {
  font-size: 0.72rem;
  color: #64748b;
  margin: 8px 0 0 0;
  font-weight: 500;
}

.maturity-forecast-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding: 12px 16px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 10px;
}

.forecast-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
}

.forecast-content strong {
  display: block;
  font-size: 0.85rem;
  font-weight: 800;
  color: #166534;
  margin-bottom: 2px;
}

.forecast-content p {
  margin: 0;
  font-size: 0.78rem;
  color: #15803d;
  font-weight: 600;
}

/* ── 메신저 공유 모달 스타일 ── */
.share-backdrop {
  z-index: 200;
  pointer-events: auto;
}

.share-modal {
  width: min(420px, 92vw);
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 24px 60px rgb(15 23 42 / 35%), 0 0 1px rgb(15 23 42 / 10%);
  overflow: hidden;
  animation: shareModalPop 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes shareModalPop {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.share-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: 1px solid #f1f5f9;
}

.share-modal-header h2 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
}

.share-modal-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.share-listing-title {
  margin: 0;
  padding: 10px 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  color: #334155;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.share-instructions {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: #64748b;
}

.share-messenger-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px 8px;
  justify-items: center;
}

.share-option-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 12px;
  transition: transform 0.15s ease, background 0.15s ease;
}

.share-option-btn:hover {
  transform: translateY(-2px);
  background: #f8fafc;
}

.share-option-btn:active {
  transform: translateY(0) scale(0.96);
}

.share-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgb(0 0 0 / 10%);
  transition: box-shadow 0.15s ease;
}

.share-option-btn:hover .share-icon-wrap {
  box-shadow: 0 6px 16px rgb(0 0 0 / 16%);
}

.share-label {
  font-size: 0.76rem;
  font-weight: 600;
  color: #475569;
}

/* 메신저 브랜드별 색상 */
.kakao-icon {
  background: #FEE500;
  color: #3C1E1E;
}

.telegram-icon {
  background: #229ED9;
  color: #ffffff;
}

.line-icon {
  background: #06C755;
  color: #ffffff;
}

.whatsapp-icon {
  background: #25D366;
  color: #ffffff;
}

.twitter-icon {
  background: #0f172a;
  color: #ffffff;
}

.native-icon {
  background: #6366f1;
  color: #ffffff;
}

/* 링크 복사 섹션 */
.share-link-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}

.share-link-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: #64748b;
}

.share-link-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 4px 6px 4px 12px;
}

.share-link-box input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 0.82rem;
  color: #334155;
  outline: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.copy-url-btn {
  padding: 8px 14px;
  background: #0f172a;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease;
}

.copy-url-btn:hover {
  background: #334155;
}

.copy-url-btn.copied {
  background: #16a34a;
}

.share-toast {
  margin: 0;
  padding: 8px 12px;
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #86efac;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  text-align: center;
  animation: fadeIn 0.2s ease;
}

/* ── 숙소 북마크(Favorite) 관련 스타일 ── */
.favorites-toggle-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: #ffffff;
  color: #475569;
  border: 1px solid #cbd5e1;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.favorites-toggle-chip:hover {
  background: #fff1f2;
  border-color: #fecdd3;
  color: #e11d48;
}

.favorites-toggle-chip.active,
.favorites-toggle-chip[aria-pressed="true"] {
  background: #ffe4e6;
  border-color: #f43f5e;
  color: #be123c;
  box-shadow: 0 2px 8px rgb(244 63 94 / 20%);
  font-weight: 700;
}

.map-favorites-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: #ffffff;
  color: #334155;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  pointer-events: auto;
  box-shadow: 0 4px 12px rgb(15 23 42 / 10%);
  transition: all 0.15s ease;
}

.map-favorites-button:hover {
  background: #fff1f2;
  border-color: #fda4af;
  color: #e11d48;
}

.map-favorites-button.active,
.map-favorites-button[aria-pressed="true"] {
  background: #ffe4e6;
  border-color: #f43f5e;
  color: #be123c;
  font-weight: 700;
  box-shadow: 0 4px 14px rgb(244 63 94 / 28%);
}

.listing-list-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.favorites-list-status { margin: 0 0 12px; color: var(--muted); font-size: .8rem; }
.favorite-missing-card { padding: 16px; border: 1px dashed var(--line); border-radius: 12px; background: var(--surface, white); overflow-wrap: anywhere; }
.favorite-missing-card strong { font-size: .85rem; }
.favorite-missing-card p { color: var(--muted); font-size: .8rem; line-height: 1.6; }
.favorite-missing-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }

/* 리스트 아이템 내 하트 버튼 */
.listing-button {
  position: relative;
}

.item-favorite-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 2px 6px rgb(0 0 0 / 8%);
  transition: transform 0.15s ease, background 0.15s ease;
  z-index: 2;
}

.item-favorite-btn:hover {
  transform: scale(1.18);
  background: #fff1f2;
  border-color: #fecdd3;
}

.item-favorite-btn:active {
  transform: scale(0.95);
}

.item-favorite-btn.active {
  background: #fff1f2;
  border-color: #fecdd3;
}

/* 상세 모달 내 북마크 버튼 */
.listing-favorite-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: #ffffff;
  color: #334155;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.listing-favorite-button:hover {
  background: #fff1f2;
  border-color: #fecdd3;
  color: #e11d48;
}

.listing-favorite-button.active,
.listing-favorite-button[aria-pressed="true"] {
  background: #ffe4e6;
  border-color: #f43f5e;
  color: #be123c;
  font-weight: 700;
}

/* ==========================================================================
   Stage 2: Dual Pipeline Progress, Night Badges, and Quote Feed
   ========================================================================== */
.dual-pipeline-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 16px;
  margin-bottom: 20px;
  min-width: 0;
  max-width: 100%;
}

.pipeline-card {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px 18px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.pipeline-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
}

.pipeline-card.stage1-card {
  border-top: 4px solid #059669; /* emerald */
}

.pipeline-card.stage2-card {
  border-top: 4px solid #7c3aed; /* violet */
}

.pipeline-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.pipeline-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pipeline-stage-tag {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  text-transform: uppercase;
}

.pipeline-stage-tag.stage1-tag {
  background: #d1fae5;
  color: #065f46;
}

.pipeline-stage-tag.stage2-tag {
  background: #ede9fe;
  color: #5b21b6;
}

.pipeline-title-group h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #1e293b;
}

.pipeline-status-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
}

.pipeline-progress-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pipeline-progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: #64748b;
  flex-wrap: wrap;
  gap: 4px;
}

.pipeline-progress-meta strong {
  color: #0f172a;
}

.pipeline-bar {
  width: 100%;
  height: 10px;
  border-radius: 6px;
  appearance: none;
  overflow: hidden;
}

.pipeline-bar::-webkit-progress-bar {
  background: #f1f5f9;
  border-radius: 6px;
}

.pipeline-bar.stage1-bar::-webkit-progress-value {
  background: linear-gradient(90deg, #10b981, #059669);
  border-radius: 6px;
}

.pipeline-bar.stage2-bar::-webkit-progress-value {
  background: linear-gradient(90deg, #8b5cf6, #6d28d9);
  border-radius: 6px;
}

.pipeline-metrics-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  padding-top: 8px;
  border-top: 1px solid #f1f5f9;
  text-align: center;
}

.pipeline-metrics-row .meta-label {
  display: block;
  font-size: 0.7rem;
  color: #64748b;
  margin-bottom: 2px;
}

.pipeline-metrics-row strong {
  font-size: 0.95rem;
  color: #1e293b;
  word-break: break-all;
}

.pipeline-distribution-wrap {
  background: #f8fafc;
  border-radius: 8px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.distribution-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: #475569;
}

.night-badge-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.night-badge {
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 6px;
  font-weight: 500;
}

.night-badge strong {
  font-weight: 700;
}

.night-badge.badge-1-2 {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

.night-badge.badge-3-4 {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.night-badge.badge-5-plus {
  background: #f3e8ff;
  color: #7e22ce;
  border: 1px solid #e9d5ff;
}

.night-badge.badge-total {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
}

/* 2단계 실결제 견적 피드 테이블 */
.stage2-quotes-panel {
  margin-top: 24px;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.stage2-quotes-panel .table-responsive {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.quote-feed-table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
  font-size: 0.82rem;
  margin-top: 10px;
}

.quote-feed-table th {
  background: #f8fafc;
  color: #475569;
  font-weight: 600;
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
}

.quote-feed-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
  vertical-align: middle;
}

.quote-feed-table tr:hover td {
  background: #f8fafc;
}

.three-shot-metrics-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.three-shot-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.76rem;
  padding: 3px 8px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 9999px;
  color: #475569;
}

.three-shot-pill strong {
  font-weight: 700;
  color: #0f172a;
}

.three-shot-pill.total {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.three-shot-pill.weekday {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #166534;
}
.three-shot-pill.weekday strong { color: #15803d; }

.three-shot-pill.weekend {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #9a3412;
}
.three-shot-pill.weekend strong { color: #c2410c; }

.three-shot-pill.base {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1e40af;
}
.three-shot-pill.base strong { color: #1d4ed8; }

.three-shot-pill.chunks {
  background: #faf5ff;
  border-color: #e9d5ff;
  color: #6b21a8;
}
.three-shot-pill.chunks strong { color: #7e22ce; }

.three-shot-pill.inferred {
  background: #fdf4ff;
  border-color: #f5d0fe;
  color: #86198f;
}
.three-shot-pill.inferred strong { color: #a21caf; }

.quote-chunk-pill {
  display: inline-block;
  font-family: monospace;
  font-size: 0.68rem;
  color: #475569;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 1px 5px;
  margin-top: 2px;
  width: fit-content;
}

.quote-col-window {
  white-space: nowrap;
}

.quote-window-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 6px;
  white-space: nowrap;
}

.quote-window-badge.full {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.quote-window-badge.weekday {
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.quote-window-badge.weekend {
  background: #fff7ed;
  color: #c2410c;
  border: 1px solid #fed7aa;
}

.quote-window-badge.holiday {
  background: #faf5ff;
  color: #7e22ce;
  border: 1px solid #e9d5ff;
}

.quote-window-badge.general {
  background: #f8fafc;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.quote-col-listing {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-width: 240px;
}

.quote-listing-id {
  font-family: monospace;
  font-weight: 600;
  color: #2563eb;
  text-decoration: none;
}

.quote-listing-id:hover {
  text-decoration: underline;
}

.quote-listing-title {
  font-size: 0.75rem;
  color: #64748b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quote-stay-dates {
  font-weight: 600;
  display: block;
}

.quote-stay-info {
  color: #64748b;
  font-size: 0.7rem;
}

.quote-feed-table td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.quote-net-strong {
  font-size: 0.85rem;
  font-weight: 700;
  color: #0f172a;
  display: block;
}

.quote-gross-sub {
  font-size: 0.68rem;
  color: #64748b;
  display: block;
}

.quote-col-breakdown {
  min-width: 140px;
}

.quote-breakdown-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.72rem;
}

.quote-breakdown-item {
  display: inline-block;
  white-space: nowrap;
}

.quote-breakdown-item.room {
  color: #334155;
  font-weight: 500;
}

.quote-breakdown-item.cleaning.has-fee {
  color: #b45309;
  font-weight: 600;
}

.quote-breakdown-item.cleaning.free {
  color: #059669;
  font-size: 0.68rem;
}

.quote-breakdown-item.service {
  color: #64748b;
}

.quote-total-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.quote-total-price {
  font-weight: 700;
  color: #0f172a;
}

.quote-orig-price {
  font-size: 0.75rem;
  color: #94a3b8;
  text-decoration: line-through;
}

.quote-discount-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  color: #dc2626;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 4px;
  padding: 1px 5px;
  white-space: nowrap;
}

.quote-avg-price {
  color: #334155;
  font-weight: 500;
}

.quote-col-time {
  font-size: 0.75rem;
  color: #64748b;
  white-space: nowrap;
}

/* ── [Phase 3] 예상 숙박일 및 객단가 산출 근거 (수식 분해) ── */
.revenue-calc-breakdown-details {
  margin: 14px 0 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 0.82rem;
}

.revenue-calc-breakdown-summary {
  font-weight: 600;
  color: #1e293b;
  cursor: pointer;
  user-select: none;
  outline: none;
  display: flex;
  align-items: center;
  gap: 6px;
}

.revenue-calc-breakdown-summary:hover {
  color: #0f766e;
}

.revenue-calc-breakdown-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid #edf2f7;
}

.calc-breakdown-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
}

.calc-breakdown-card h6 {
  margin: 0 0 4px;
  font-size: 0.78rem;
  font-weight: 750;
  color: #0f172a;
}

.calc-breakdown-card p {
  margin: 0 0 2px;
  font-size: 0.82rem;
  color: #0f172a;
}

.calc-breakdown-card small {
  display: block;
  font-size: 0.68rem;
  color: var(--muted);
}

.calc-breakdown-total {
  background: #f0fdf4;
  border-color: #bbf7d0;
  border-radius: 12px;
}

.calc-breakdown-total h6 {
  color: #166534;
}

.calc-formula-box {
  margin-top: 6px;
  padding: 6px 8px;
  background: #dcfce7;
  border-radius: 8px;
  font-family: monospace;
  font-size: 0.74rem;
  color: #14532d;
  word-break: break-all;
}

/* ── [Phase 2] 월별 통계 인터랙티브 차트 (12개월 추이 그래프) ── */
.listing-monthly-trends-section {
  margin: 14px 0 10px;
  padding: 12px 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
}

.trends-title {
  margin: 0 0 12px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #334155;
}

.trends-chart-bar-wrap {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  height: 110px;
  padding: 0 4px 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.trend-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  min-width: 44px;
  max-width: 60px;
  height: 100%;
  cursor: pointer;
  border-radius: 6px;
  padding: 2px;
  transition: background 0.15s ease;
}

.trend-col:hover {
  background: #f1f5f9;
}

.trend-col.is-active {
  background: #e0f2fe;
}

.trend-val-label {
  font-size: 0.66rem;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 4px;
  white-space: nowrap;
}

.trend-bar-track {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  flex: 1;
  width: 100%;
}

.trend-bar-fill {
  width: 20px;
  background: #0284c7;
  border-radius: 4px 4px 0 0;
  transition: height 0.3s ease, background 0.2s;
}

.trend-col.is-active .trend-bar-fill {
  background: #16857a;
  box-shadow: 0 0 0 2px #0f766e;
}

.trend-month-label {
  font-size: 0.72rem;
  color: #64748b;
  margin-top: 6px;
  white-space: nowrap;
  font-weight: 600;
}

.trend-col.is-active .trend-month-label {
  color: #0f766e;
  font-weight: 700;
}

/* ── [Phase 4] 관심 숙소 (위시리스트) 전용 뷰 ── */
.favorites-view {
  padding: 20px clamp(16px, 3vw, 40px);
  max-width: 1200px;
  margin: 0 auto;
}

.favorites-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
  gap: 16px;
}

.favorites-heading h1 {
  margin: 0 0 6px;
  font-size: 1.6rem;
  font-weight: 800;
}

.favorites-heading-actions {
  display: flex;
  gap: 8px;
}

.favorites-group-nav {
  margin-bottom: 14px;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 8px;
}

.favorites-group-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
}

.favorites-group-tab {
  padding: 8px 16px;
  border: 1px solid #cbd5e1;
  border-radius: 20px;
  background: #ffffff;
  color: #475569;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.favorites-group-tab:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

.favorites-group-tab.active {
  background: #17243a;
  color: #ffffff;
  border-color: #17243a;
}

.favorites-group-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  font-size: 0.85rem;
  color: #64748b;
}

.fav-group-actions {
  display: flex;
  gap: 8px;
}

.favorites-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.fav-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.fav-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.fav-card-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.fav-card-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fav-card-title:hover {
  color: #2563eb;
  text-decoration: underline;
}

.fav-card-district {
  font-size: 0.78rem;
  color: #64748b;
}

.fav-card-stats {
  font-size: 0.85rem;
  color: #0f172a;
  background: #f8fafc;
  padding: 8px 10px;
  border-radius: 8px;
}

.fav-card-groups {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.fav-group-badge {
  font-size: 0.68rem;
  font-weight: 600;
  color: #0369a1;
  background: #e0f2fe;
  border-radius: 4px;
  padding: 2px 6px;
}

.fav-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid #f1f5f9;
}

.fav-airbnb-link {
  font-size: 0.78rem;
  color: #2563eb;
  text-decoration: none;
  font-weight: 600;
}

.fav-airbnb-link:hover {
  text-decoration: underline;
}

.fav-remove-btn {
  margin-left: auto;
  color: #dc2626;
  background: #fef2f2;
  border: 1px solid #fecaca;
}

.fav-remove-btn:hover {
  background: #fee2e2;
}

.nav-fav-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  color: #ffffff;
  background: #e65f4f;
  border-radius: 10px;
  padding: 1px 6px;
  margin-left: 4px;
}

.fav-empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 16px;
  color: #64748b;
}









/* Market workspace — shared visual tokens, presentation only. */
body.market-page,
body.operations-page {
  --primary: #245e52;
  --ink: #202925;
  --muted: #66716b;
  --line: #e1e6e2;
  --paper: #f6f7f5;
  --surface: #fff;
  --shadow: 0 8px 28px rgb(27 43 34 / 8%);
  --workspace-width: 216px;
  background: var(--paper);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

.ui-icon { display: inline-block; flex: 0 0 19px; width: 19px; height: 19px; vertical-align: middle; }
.skip-to-content {
  position: fixed;
  z-index: 200;
  top: 8px;
  left: 8px;
  padding: 12px 18px;
  transform: translateY(-160%);
  border-radius: 8px;
  background: var(--ink);
  color: white;
}
.skip-to-content:focus { transform: none; }
.workspace-brand, .workspace-nav-label, .workspace-sidebar-footer, .workspace-context { display: none; }
.market-page .map-top-bar, .operations-page .map-top-bar {
  box-shadow: none;
  background: #fff;
  min-height: 68px;
}
.market-page .brand-mark, .operations-page .brand-mark {
  border-radius: 11px;
  background: #245e52;
  font-size: 18px;
  font-weight: 650;
}
.market-page .brand strong, .operations-page .brand strong { font-weight: 700; letter-spacing: -.035em; }
.market-page .operations-link, .operations-page .operations-link {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  font-weight: 600;
}
.market-page .app-navigation { gap: 4px; border-color: var(--line); }
.market-page .app-navigation button { gap: 10px; color: var(--muted); font-weight: 600; border-radius: 8px; }
.market-page .app-navigation button[aria-selected="true"] {
  background: #e7eeea;
  box-shadow: none;
  color: #245e52;
}
.market-page .nav-fav-badge { margin-left: auto; background: #e1e6e2; color: #526159; font-size: .68rem; }
.market-page .market-summary { gap: 18px; padding-block: 14px; background: var(--paper); border-bottom: 0; }
.market-page .market-summary > div { padding: 0 18px 0 0; border-right: 1px solid var(--line); border-radius: 0; background: transparent; }
.market-page .market-summary strong { color: var(--ink); font-size: 1.25rem; font-weight: 650; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.market-page .market-summary > div > span { font-size: .7rem; }
.market-page #refresh-dashboard { display: inline-flex; gap: 8px; align-items: center; justify-content: center; align-self: center; border-radius: 8px; font-size: .73rem; font-weight: 550; }
.market-page .market-map-shell { background: var(--paper); }
.market-page .view-heading { padding-block: 30px 24px; border-color: var(--line); background: transparent; }
.market-page .view-heading h1 { font-size: clamp(1.5rem, 2.2vw, 2rem); letter-spacing: -.055em; font-weight: 650; }
.market-page .view-heading p { line-height: 1.65; }
.market-page .map-surface { background: #edf0eb; }
.market-page .map-message { border-color: var(--line); border-radius: 12px; color: var(--ink); box-shadow: var(--shadow); font-weight: 600; }
.market-page .map-guide { background: rgb(32 41 37 / 85%); border-radius: 8px; font-weight: 500; font-size: .7rem; }
.market-page > .status { border-radius: 8px; font-weight: 500; }
.market-page .map-filter-button,
.market-page .map-favorites-button,
.market-page .projection-open-button,
.market-page .viewport-badge {
  gap: 7px;
  border-radius: 9px;
  border-color: var(--line);
  box-shadow: 0 3px 12px rgb(27 43 34 / 7%);
  background: white;
  color: var(--ink);
  font-weight: 600;
}
.market-page .projection-open-button { border-color: #245e52; background: #245e52; color: white; }
.market-page .map-favorites-button[aria-pressed="true"] { background: #fff1f2; color: #9f2944; border-color: #f2c9d1; box-shadow: none; }
.market-page .chip-heart { display: inline-flex; align-items: center; }
.market-page .chip-heart .ui-icon { width: 15px; height: 15px; flex-basis: 15px; }
.market-page .filter-sheet { border-color: var(--line); border-radius: 14px; background: #fff; box-shadow: var(--shadow); }
.market-page .filter-heading h2 { color: var(--ink); font-size: 1.08rem; font-weight: 650; letter-spacing: -.04em; }
.market-page .filter-heading > p { font-weight: 500; }
.market-page .filter-heading > p strong { color: #245e52; }
.market-page .filter-sheet .filter-fields { gap: 16px; }
.market-page .filter-sheet input, .market-page .filter-sheet select { border-color: var(--line); border-radius: 8px; background: #fafbf9; font-weight: 450; }
.market-page .filter-sheet input:focus, .market-page .filter-sheet select:focus { border-color: #245e52; background: white; }
.market-page .quick-chip { padding: 8px 11px; min-height: 36px; border-radius: 7px; border-color: var(--line); box-shadow: none; font-weight: 550; font-size: .7rem; background: #fff; color: #4c5851; }
.market-page .quick-chip:hover { background: #f1f5f0; border-color: #becbc1; transform: none; }
.market-page .quick-chip.active { background: #e7eeea; color: #245e52; border-color: #afc4b8; box-shadow: none; }
.market-page .quick-city-tabs { padding: 3px; border-radius: 8px; box-shadow: none; border-color: var(--line); background: #f2f4f1; }
.market-page .city-tab { min-height: 32px; border-radius: 6px; padding-inline: 10px; font-weight: 600; }
.market-page .city-tab.active { color: #245e52; box-shadow: 0 1px 4px rgb(27 43 34 / 8%); }
.market-page .quick-chips-label { font-weight: 600; color: var(--muted); }
.market-page .address-hierarchy-section { border-color: var(--line); }
.market-page .advanced-filters { border-color: var(--line); border-radius: 8px; background: #fafbf9; }
.market-page .advanced-filters > summary { color: var(--muted); font-weight: 600; }
.market-page .secondary-button { border-color: var(--line); border-radius: 8px; background: white; color: var(--ink); font-weight: 550; }
.market-page .projection-panel { border-color: var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.market-page .projection-step-heading > span { background: #e7eeea; color: #245e52; }
.market-page .listing-button { border-color: var(--line); border-radius: 12px; box-shadow: none; background: white; transition: border-color .15s, box-shadow .15s; }
.market-page .listing-button:hover, .market-page .listing-button.selected { transform: none; border-color: #9ab4a6; background: white; box-shadow: 0 4px 16px rgb(27 43 34 / 6%); }
.market-page .listing-button strong { font-weight: 650; }
.market-page .item-favorite-btn { box-shadow: none; }
.market-page .modal-backdrop { background: rgb(19 30 24 / 42%); backdrop-filter: blur(4px); }
.market-page .detail-modal { border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 24px 90px rgb(19 30 24 / 24%); }
.market-page .detail-modal-header { padding: 20px 22px 14px; }
.market-page .detail-modal-header h2 { letter-spacing: -.04em; font-weight: 650; }
.market-page .detail-tabs { border-color: var(--line); }
.market-page .detail-tabs button { color: var(--muted); font-weight: 600; }
.market-page .detail-tabs button[aria-selected="true"] { background: #e7eeea; color: #245e52; border-color: #245e52; }
.market-page .detail-content { padding: 22px; }
.market-page .detail-content h3 { font-family: inherit; font-weight: 650; letter-spacing: -.035em; }
.market-page .insight-card, .market-page .ranking-card, .market-page .fav-card, .market-page .ranking-highlight-card { border-color: var(--line); border-radius: 12px; box-shadow: none; background: white; }
.market-page .ranking-card:hover, .market-page .fav-card:hover { transform: none; border-color: #9ab4a6; box-shadow: var(--shadow); }
.market-page .ranking-highlight-card { border-left: 1px solid var(--line); }
.market-page .ranking-card.top-tier { border-color: #a9c2b3; }
.market-page .rankings-toolbar, .market-page .favorites-group-toolbar { border-color: var(--line); border-radius: 10px; background: #fff; }
.market-page .rankings-view > .view-heading { padding-inline: 0; padding-top: 8px; }
.market-page .rankings-view, .market-page .favorites-view { max-width: 1320px; }
.market-page .ranking-sort-tab.active, .market-page .ranking-room-capsule.active,
.market-page .favorites-group-tab.active { background: #e7eeea; border-color: #afc4b8; color: #245e52; box-shadow: none; }
.market-page .favorites-heading { background: transparent; }
.market-page .favorites-heading h1 { color: var(--ink); }
.market-page .favorites-group-nav { border-color: var(--line); }
.market-page button:focus-visible, .market-page a:focus-visible,
.market-page input:focus-visible, .market-page select:focus-visible,
.operations-page button:focus-visible, .operations-page a:focus-visible {
  outline: 3px solid #719c86;
  outline-offset: 3px;
}
.market-page .operations-link:hover, .operations-page .operations-link:hover { background: #f1f5f0; }

/* Operations shares the same surfaces while retaining semantic status colors. */
.operations-page .operations-shell { max-width: 1400px; }
.operations-page .operations-heading h1 { font-weight: 650; letter-spacing: -.05em; }
.operations-page .admin-subnav { border: 1px solid var(--line); border-radius: 10px; background: #eef1ed; padding: 5px; }
.operations-page .admin-subnav a { color: var(--muted); border-radius: 7px; font-weight: 600; }
.operations-page .admin-subnav a[aria-current="page"] { background: white; color: #245e52; box-shadow: 0 1px 4px rgb(27 43 34 / 6%); }
.operations-page .operations-panel, .operations-page .operations-progress,
.operations-page .pipeline-card, .operations-page .worker-status-card {
  border-color: var(--line); border-radius: 14px; background: white; box-shadow: none;
}
.operations-page .operations-hero { border-color: #bdcfc2; border-radius: 14px; background: #edf3ee; box-shadow: none; }
.operations-page .operations-hero h2 { color: #245e52; letter-spacing: -.04em; }
.operations-page .operations-card { border: 1px solid var(--line); border-radius: 10px; background: #fff; box-shadow: none; }
.operations-page .operations-card strong { font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: -.035em; }
.operations-page .pipeline-card h3 { font-weight: 650; letter-spacing: -.035em; }
.operations-page .pipeline-bar { height: 8px; }

@media (min-width: 1024px) {
  .market-page { padding-left: var(--workspace-width); }
  .market-page .workspace-sidebar {
    position: fixed; z-index: 40; inset: 0 auto 0 0;
    display: flex; flex-direction: column; width: var(--workspace-width);
    padding: 24px 14px 18px; border-right: 1px solid var(--line); background: #eef1ed;
  }
  .workspace-brand { display: flex; gap: 10px; align-items: center; padding: 0 6px; color: var(--ink); text-decoration: none; }
  .workspace-brand strong, .workspace-brand small { display: block; }
  .workspace-brand strong { font-size: .84rem; font-weight: 650; letter-spacing: -.04em; }
  .workspace-brand small { margin-top: 4px; color: var(--muted); font-size: .53rem; letter-spacing: .11em; }
  .workspace-nav-label { display: block; margin: 38px 12px 10px; color: #78847c; font-size: .65rem; font-weight: 600; }
  .market-page .app-navigation { display: flex; flex-direction: column; align-items: stretch; gap: 5px; padding: 0; border: 0; background: transparent; }
  .market-page .app-navigation button { justify-content: flex-start; min-height: 44px; padding: 0 12px; font-size: .79rem; }
  .market-page .app-navigation button:hover { background: #e4eae3; }
  .market-page .app-navigation button[aria-selected="true"] { background: white; color: #245e52; box-shadow: 0 1px 5px rgb(27 43 34 / 5%); }
  .workspace-sidebar-footer { display: block; margin-top: auto; }
  .workspace-sidebar-footer p { padding: 16px 10px; border-top: 1px solid #d7dfd7; color: #526159; font-size: .73rem; font-weight: 600; line-height: 1.6; }
  .workspace-sidebar-footer small { display: block; margin-top: 6px; font-size: .65rem; color: var(--muted); font-weight: 400; }
  .workspace-admin-link { display: flex; gap: 10px; align-items: center; min-height: 44px; padding: 0 12px; border: 1px solid #d7dfd7; border-radius: 8px; color: #526159; font-size: .75rem; text-decoration: none; }
  .workspace-admin-link:hover { background: #fff; }
  .workspace-admin-link > span { margin-left: auto; }
  .market-page .map-top-bar { grid-template-columns: minmax(0, 1fr) auto; padding-inline: 28px; }
  .market-page .map-top-bar:has(.environment-switch:not([hidden])) { grid-template-columns: minmax(0, 1fr) auto auto; }
  .market-page .map-top-bar > .brand { display: none; }
  .workspace-context { display: flex; gap: 12px; align-items: center; font-size: .78rem; }
  .workspace-context-label { display: flex; gap: 12px; color: var(--muted); }
  .workspace-context-label > span { color: #b0bbb2; }
  .workspace-view-name { display: none; font-weight: 600; }
  body:not([data-active-view]) [data-view-name="map"],
  body[data-active-view="map"] [data-view-name="map"],
  body[data-active-view="list"] [data-view-name="list"],
  body[data-active-view="stats"] [data-view-name="stats"],
  body[data-active-view="subway-stats"] [data-view-name="subway-stats"],
  body[data-active-view="market"] [data-view-name="market"],
  body[data-active-view="rankings"] [data-view-name="rankings"],
  body[data-active-view="favorites"] [data-view-name="favorites"],
  body[data-active-view="geo-monitor"] [data-view-name="geo-monitor"] { display: inline; }
  .market-page .market-summary { padding-inline: 28px; }
  .market-page .map-view { padding: 0 14px 14px; }
  .market-page .map-surface { height: calc(100dvh - 165px); min-height: 540px; border: 1px solid var(--line); border-radius: 14px; }
  .market-page .map-view .filter-sheet { left: 16px; top: 16px; width: 318px; max-height: calc(100% - 32px); padding: 18px; }
  .market-page .map-action-bar { top: 16px; right: 16px; }
  .market-page > .status { top: 80px; left: calc(50% + var(--workspace-width) / 2); }
  .market-page .list-view .filter-sheet { padding: 22px; }
  .operations-page .map-top-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-inline: 28px;
  }
  .operations-page .map-top-bar > .brand {
    display: inline-flex;
  }
  .operations-page .workspace-context {
    display: flex;
    gap: 12px;
    align-items: center;
    font-size: .78rem;
    padding-left: 16px;
    border-left: 1px solid var(--line);
  }
  .operations-page .workspace-view-name {
    display: inline;
    font-weight: 600;
  }
  .operations-page .environment-switch {
    margin-left: auto;
  }
  .operations-page .map-top-actions {
    margin-left: auto;
  }
  .operations-page .map-top-bar:has(.environment-switch:not([hidden])) .map-top-actions {
    margin-left: 0;
  }
}

@media (min-width: 601px) and (max-width: 1023px) {
  .market-page .app-navigation button { padding-inline: 12px; font-size: .76rem; }
  .market-page .map-surface { height: calc(100dvh - 225px); }
}

@media (max-width: 600px) {
  .market-page,
  .operations-page { padding-bottom: calc(74px + env(safe-area-inset-bottom)); }
  .market-page .map-top-bar,
  .operations-page .map-top-bar { min-height: 62px; padding-inline: 14px; }
  .market-page .mobile-navigation,
  .operations-page .mobile-navigation {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    min-height: 72px; border-color: var(--line); box-shadow: 0 -2px 15px rgb(27 43 34 / 5%);
  }
  .market-page .mobile-navigation button,
  .market-page .mobile-navigation a,
  .operations-page .mobile-navigation button,
  .operations-page .mobile-navigation a { gap: 6px; border-radius: 8px; color: #66716b; font-size: .58rem; font-weight: 550; }
  .market-page .mobile-navigation .ui-icon,
  .operations-page .mobile-navigation .ui-icon { width: 20px; height: 20px; }
  .market-page .mobile-navigation button[aria-selected="true"],
  .market-page .mobile-navigation a[aria-selected="true"],
  .operations-page .mobile-navigation button[aria-selected="true"],
  .operations-page .mobile-navigation a[aria-selected="true"] { background: #e7eeea; color: #245e52; }
  .market-page .view-heading { padding: 22px 16px 18px; }
  .market-page .view-heading h1 { font-size: 1.5rem; }
  .market-page .map-surface { height: calc(100dvh - 136px - env(safe-area-inset-bottom)); min-height: 380px; }
  .market-page .map-action-bar { flex-wrap: wrap; gap: 6px; }
  .market-page .projection-open-button { min-height: 40px; }
  .market-page .map-view .filter-sheet { border-radius: 20px 20px 0 0; padding: 14px 16px max(20px, env(safe-area-inset-bottom)); }
  .market-page .filter-sheet .filter-fields { gap: 12px; }
  .market-page .list-view .filter-sheet { margin-inline: 12px; padding: 16px; }
  .market-page .detail-modal { border-radius: 18px 18px 0 0; }
  .market-page .detail-content { padding: 16px; }
  .market-page .quick-chip { min-height: 44px; }
  .operations-page .admin-subnav { margin-inline: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .market-page *, .operations-page * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

/* Keep search results in view while refining desktop filters. */
.market-page .list-view .filter-sheet,
.market-page .market-view .filter-sheet {
  overflow: visible;
  overscroll-behavior: auto;
  touch-action: pan-y;
}
.market-page .listing-fallback { background: var(--paper); }
.market-page .room-capsule-btn.active, .market-page .sort-tab-btn.active {
  border-color: #afc4b8; background: #e7eeea; color: #245e52; box-shadow: none;
}
@media (min-width: 1200px) {
  .market-page .list-view { display: grid; grid-template-columns: 318px minmax(0, 1fr); gap: 20px 24px; padding: 0 28px 36px; align-items: start; }
  .market-page .list-view > .view-heading { grid-column: 1 / -1; padding: 30px 0 24px; }
  .market-page .list-view > .map-message { grid-column: 1 / -1; margin: 0; padding: 14px 20px; text-align: left; }
  .market-page .list-view > .map-message > strong, .market-page .list-view > .map-message > span { display: inline; font-size: .75rem; }
  .market-page .list-view > .map-message > span { margin-left: 8px; }
  .market-page .list-view > .map-message details { display: inline-block; margin: 0 0 0 16px; }
  .market-page .list-view .filter-sheet { position: sticky; top: 18px; grid-column: 1; width: 100%; margin: 0; padding: 18px; max-height: calc(100dvh - 36px); overflow-y: auto; overscroll-behavior: auto; box-shadow: none; }
  .market-page .list-view .filter-heading { align-items: center; }
  .market-page .list-view .quick-chips-header { align-items: flex-start; flex-wrap: wrap; gap: 10px; }
  .market-page .list-view .quick-chips-scroll { gap: 6px; }
  .market-page .list-view .address-hierarchy-grid { grid-template-columns: 1fr; }
  .market-page .listing-results { min-width: 0; }
  .market-page .list-view .listing-list-heading { flex-wrap: wrap; gap: 12px; margin: 0 0 16px; padding-top: 6px; }
  .market-page .list-view .listing-list-heading h2 { font-family: inherit; font-size: 1rem; font-weight: 600; }
  .market-page .list-view .listing-list-actions { flex-wrap: wrap; gap: 8px; }
  .market-page .list-view .listing-list { margin: 0; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
}

.market-page .listing-button { padding: 16px; min-height: 120px; text-align: left; }
.market-page .listing-button > span { display: block; padding-right: 32px; min-height: 42px; font-size: .82rem; font-weight: 550; line-height: 1.6; overflow-wrap: anywhere; }
.market-page .listing-scan-count { display: inline-block; margin-top: 10px; padding: 3px 6px; border-radius: 4px; background: #edf3ee; color: #38634d; font-size: .63rem; font-weight: 550; }
.market-page .listing-button small { margin-top: 8px; line-height: 1.5; font-size: .69rem; }
.market-page .listing-revenue-summary { background: #f2f5f1; border-color: var(--line); border-radius: 12px; }
.market-page .listing-revenue-summary h4 { color: var(--ink); font-weight: 650; }
.market-page .listing-revenue-summary dt { font-weight: 550; }
.market-page .listing-revenue-summary dd { color: #245e52; font-weight: 650; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.market-page .listing-revenue-primary > div, .market-page .listing-revenue-secondary > div { border-radius: 8px; background: white; }
.market-page .listing-revenue-primary > .is-emphasis { border-color: #c2d3c7; }
.market-page .listing-revenue-detail-link { color: #245e52; font-weight: 600; }
.market-page .listing-share-button { border-color: var(--line); background: white; color: var(--ink); font-weight: 550; }
.market-page .listing-share-button:hover { border-color: #a9c2b3; background: #f2f5f1; }

@media (max-width: 600px) {
  .market-page .favorites-heading { padding: 4px 0 18px; flex-direction: column; gap: 12px; }
  .market-page .favorites-heading-actions { width: 100%; }
  .market-page .favorites-heading-actions button { white-space: nowrap; }
  .market-page .favorites-group-toolbar { padding: 12px; height: auto; }
  .market-page .list-view > .view-heading, .market-page .market-view > .view-heading { display: block; }
}

@media (min-width: 1200px) {
  .market-page .list-view { grid-template-areas: "heading heading" "notice notice" "filters results"; grid-template-rows: auto auto minmax(0, 1fr); }
  .market-page .list-view > .view-heading { grid-area: heading; }
  .market-page .list-view > .map-message { grid-area: notice; }
  .market-page .list-view > .filter-sheet { grid-area: filters; }
  .market-page .list-view > .listing-results { grid-area: results; }
  .market-page .list-view:not(:has(> .map-message:not([hidden]))) { grid-template-areas: "heading heading" "filters results"; grid-template-rows: auto minmax(0, 1fr); }
}

/* ── 산출 근거 공식 분해 아코디언 컴포넌트 ── */
.listing-calc-basis-details {
  margin: 14px 0 18px;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  background: #f8fafc;
  overflow: hidden;
  transition: all 0.2s ease;
}
.listing-calc-basis-details[open] {
  background: #ffffff;
  border-color: #94a3b8;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}
.listing-calc-basis-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  cursor: pointer;
  user-select: none;
  background: #f1f5f9;
  font-size: 0.85rem;
  color: #1e293b;
}
.listing-calc-basis-summary:hover {
  background: #e2e8f0;
}
.calc-basis-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 9999px;
  background: #dbeafe;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}
.listing-calc-basis-content {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-size: 0.82rem;
  line-height: 1.6;
  color: #334155;
}
.calc-formula-block {
  padding: 12px 14px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}
.calc-formula-block h5 {
  margin: 0 0 8px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #0f172a;
}
.calc-formula-block ul {
  margin: 0;
  padding-left: 18px;
}
.calc-formula-block li {
  margin-bottom: 4px;
}
.calc-formula-block code {
  background: #e2e8f0;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.8rem;
  color: #0f172a;
  font-weight: 600;
}

.three-shot-formula-block {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
}
.three-shot-formula-block h5 {
  color: #166534;
}
.three-shot-summary-lead p {
  margin: 0 0 10px 0;
  font-size: 0.85rem;
  line-height: 1.5;
  color: #1e293b;
}
.three-shot-key-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.ts-metric-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  background: #ffffff;
  border: 1px solid #86efac;
  border-radius: 6px;
  font-size: 0.78rem;
  color: #15803d;
}
.ts-metric-chip strong {
  color: #166534;
}
.ts-month-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 600;
}
.ts-month-chip.exact {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #86efac;
}
.ts-month-chip.adjacent {
  background: #e0e7ff;
  color: #3730a3;
  border: 1px solid #c7d2fe;
}
.three-shot-table-wrap {
  overflow-x: auto;
  margin: 10px 0;
  background: #ffffff;
  border: 1px solid #dcfce7;
  border-radius: 6px;
}
.three-shot-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
  text-align: left;
}
.three-shot-table th {
  background: #f8fafc;
  padding: 7px 10px;
  font-weight: 600;
  color: #475569;
  border-bottom: 1px solid #e2e8f0;
}
.three-shot-table td {
  padding: 7px 10px;
  border-bottom: 1px solid #f1f5f9;
  color: #1e293b;
}
.three-shot-table tr:last-child td {
  border-bottom: none;
}
.three-shot-table .text-right {
  text-align: right;
}
.ts-window-badge {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
}
.ts-window-badge.pure_weekday {
  background: #e0f2fe;
  color: #0369a1;
}
.ts-window-badge.pure_weekend {
  background: #fef3c7;
  color: #b45309;
}
.ts-window-badge.holiday_peak {
  background: #fee2e2;
  color: #b91c1c;
}
.ts-window-badge.full_window {
  background: #ede9fe;
  color: #6d28d9;
}
.ts-window-badge.sub_window {
  background: #f1f5f9;
  color: #475569;
}
.three-shot-footnote {
  margin: 8px 0 0 0;
  font-size: 0.78rem;
  color: #64748b;
  line-height: 1.4;
}

/* Scout 제어: 선택 입력과 버튼을 같은 기준선에 정렬한다. */
.scout-control-actions { display: grid; gap: 16px; margin-bottom: 20px; }
.scout-control-row { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 12px; }
.scout-control-field { display: grid; gap: 8px; flex: 1 1 240px; min-width: 0; }
.scout-control-label { color: var(--muted); font-size: .85rem; font-weight: 600; }
.scout-control-panel .scout-select-group { display: grid; }
.scout-control-panel .scout-district-select { width: 100%; }
.scout-control-select { width: 100%; height: 44px; font: inherit; }
.scout-control-btns { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.scout-control-actions .scout-action-btn { height: 44px; margin: 0; padding: 0 16px; font: inherit; font-size: .85rem; }
.scout-control-actions :disabled, .scout-target-card :disabled { cursor: wait; }
.scout-control-panel[aria-busy="true"] .scout-control-actions { opacity: .7; }
.scout-toast-wrap {
  position: fixed; right: 24px; bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 1100;
  display: flex; align-items: center; gap: 12px; width: min(480px, calc(100vw - 32px));
  padding: 12px 12px 12px 18px; border: 1px solid #a7d6bf; border-radius: 16px;
  background: #f1fbf5; color: #14532d; box-shadow: 0 12px 36px rgb(15 23 42 / .16);
  animation: scout-toast-enter .18s ease-out;
}
.scout-toast-wrap[hidden] { display: none; }
.scout-toast-wrap[data-type="error"] { background: #fff7ed; color: #9a3412; border-color: #fdba74; }
.scout-toast-content { display: flex; align-items: flex-start; gap: 10px; min-width: 0; flex: 1; }
.scout-toast-text.status { margin: 0; color: inherit; font-size: .9rem; line-height: 1.5; overflow-wrap: anywhere; }
.scout-toast-close { width: 44px; height: 44px; flex: 0 0 44px; border: 0; border-radius: 10px; background: transparent; color: inherit; font-size: 24px; cursor: pointer; }
.scout-toast-close:hover { background: rgb(0 0 0 / .05); }
@keyframes scout-toast-enter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 600px) {
  .scout-control-row { display: grid; grid-template-columns: minmax(0, 1fr); }
  .scout-control-field { width: 100%; }
  .scout-control-btns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .scout-control-actions .scout-action-btn { height: auto; min-height: 44px; padding: 10px; white-space: normal; word-break: keep-all; }
  .scout-control-row:last-child .scout-control-btns { grid-template-columns: minmax(0, 1fr); }
  .scout-toast-wrap { right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) { .scout-toast-wrap { animation: none; } }
.scout-control-actions .primary-action {
  border: 1px solid #245e53;
  border-radius: 10px;
  background: #245e53;
  color: #fff;
  font-weight: 650;
  cursor: pointer;
}
.scout-control-actions .primary-action:hover:not(:disabled) { background: #1b4d43; }
.scout-control-actions .primary-action:disabled { cursor: wait; opacity: .65; }
.ui-settings-form { display: grid; gap: 20px; max-width: 640px; margin-top: 24px; }
.ui-settings-form label { display: grid; gap: 8px; font-weight: 600; }
.ui-settings-form input { height: 44px; width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.ui-settings-form small { font-weight: 400; color: var(--muted); line-height: 1.5; }
.ui-settings-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.ui-settings-actions button { min-height: 44px; padding: 10px 16px; }
.ui-settings-form [role="status"] { overflow-wrap: anywhere; }
@media (max-width: 600px) {
  .operations-page .admin-subnav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; overflow: visible; }
  .operations-page .admin-subnav a { min-width: 0; text-align: center; white-space: normal; word-break: keep-all; }
}

.vpn-reconnect-control { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-left: 8px; font-size: 12px; font-weight: normal; }
.vpn-reconnect-button { border: 1px solid currentColor; border-radius: 6px; padding: 4px 8px; background: transparent; color: inherit; cursor: pointer; font: inherit; white-space: nowrap; }
.vpn-reconnect-button:disabled { opacity: .6; cursor: wait; }
.vpn-reconnect-error { color: #dc2626; }
.vpn-health-details { position: relative; }
.vpn-health-details summary { cursor: pointer; list-style: none; }
.vpn-health-tunnels { position: absolute; right: 0; z-index: 60; background: var(--surface, white); color: var(--text, #15243a); border: 1px solid #cbd5e1; border-radius: 10px; padding: 12px; box-shadow: 0 8px 24px #0002; width: min(440px, 85vw); }
.vpn-health-tunnels > div { padding: 6px 0; font-size: 12px; }
#scout-vpn .vpn-reconnect-control { font-size: 12px; }
@media (max-width: 700px) {
  .vpn-health-tunnels { left: 0; right: auto; width: calc(100vw - 56px); }
}

.precision-evidence { padding: 12px; margin: 12px 0; border: 1px solid #bae6fd; border-radius: 10px; background: #f0f9ff; overflow-wrap: anywhere; min-width: 0; }
.precision-evidence article { padding: 8px 0; border-top: 1px solid #dbeafe; }
.precision-evidence h5, .precision-evidence p { margin: 6px 0; }
.precision-collection-control {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 12px 0;
}
.precision-collection-control button {
  padding: 8px 12px;
  border: 1px solid #c7d2fe;
  border-radius: 8px;
  background: #eef2ff;
  color: #3730a3;
  cursor: pointer;
}
.precision-collection-control button:disabled { opacity: .6; cursor: wait; }
.precision-collection-control p { margin: 0; font-size: 13px; overflow-wrap: anywhere; }


/* Selected listing: concise identity and permit information precede the totals. */
.listing-detail [data-detail-panel="summary"] > h3 { margin-bottom: 6px; }
.listing-detail .listing-availability { margin: 0 0 10px; font-size: .78rem; }
.listing-detail .listing-actions-row { gap: 8px; flex-wrap: wrap; }
.listing-overview { display: grid; gap: 10px; margin: 14px 0 0; }
.listing-essentials { margin: 0; line-height: 1.7; font-size: .85rem; color: var(--text-muted, #53625b); }
.listing-registration { display: flex; align-items: baseline; gap: 6px 12px; flex-wrap: wrap;
  padding: 10px 12px; background: #f5f7f5; border: 1px solid #e1e7e2; border-radius: 10px; }
.listing-registration > span { font-size: .76rem; color: #607267; }
.listing-registration > strong { font-size: .9rem; overflow-wrap: anywhere; }
.listing-registration details { margin-left: auto; font-size: .72rem; color: #53625b; }
.listing-registration details[open] { width: 100%; margin-left: 0; }
.listing-registration details p { line-height: 1.7; margin: 6px 0 0; }
.listing-summary-body { display: grid; gap: 12px; }
.market-page .listing-summary-body .listing-revenue-summary { margin: 12px 0 0; padding: 14px; gap: 10px; }
.listing-summary-body .listing-basic-details { margin: 0; }
.listing-summary-body .detail-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.listing-summary-body .revenue-calc-breakdown-details { margin: 0; }
@media (max-width: 600px) {
  .listing-registration details { margin-left: 0; }
  .listing-summary-body .detail-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .market-page .listing-summary-body .listing-revenue-secondary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .listing-summary-body .listing-revenue-primary dd { font-size: 1.1rem; }
  .listing-detail .listing-share-button { margin-left: auto; }
}

/* VPN 운영 모드: 자격 증명 설정과 구분하고 정찰 켜기 체크박스를 문구와 한 줄로 둔다 */
.vpn-mode-form {
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px dashed var(--line, #d8dee6);
}
.vpn-input-group .vpn-scout-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  font-weight: 600;
}

/* 관리자 VPN 설정 메뉴 */
.vpn-settings-moved { margin: 8px 0 12px; font-size: 0.8rem; color: var(--muted); }
.vpn-settings-moved a { font-weight: 700; }
.vpn-settings-desc { margin: 4px 0 0; font-size: 0.85rem; color: var(--muted); line-height: 1.6; }
.vpn-settings-form { display: grid; gap: 16px; margin-top: 18px; min-width: 0; }
.vpn-settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.vpn-settings-grid > label { display: grid; gap: 8px; align-content: start; font-weight: 600; }
.vpn-settings-grid select { height: 44px; width: 100%; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font: inherit; }
.vpn-settings-grid small { font-weight: 400; color: var(--muted); line-height: 1.5; }
.vpn-settings-check > span { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; }
.vpn-settings-check input { width: 18px; height: 18px; }
.vpn-assignment-wrap { overflow-x: auto; }
.vpn-assignment-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.vpn-assignment-table th, .vpn-assignment-table td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.vpn-assignment-table th { font-size: 0.76rem; color: var(--muted); font-weight: 600; }
.vpn-assignment-table tr.is-off td { color: var(--muted); }
.vpn-settings-summary { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.vpn-settings-subtitle { margin: 12px 0 0; font-size: 1rem; }
.vpn-country-groups { display: grid; gap: 12px; }
.vpn-country-group { min-width: 0; margin: 0; padding: 10px 12px 12px; border: 1px solid var(--line); border-radius: 10px; }
.vpn-country-group legend { padding: 0 6px; font-size: 0.85rem; }
.vpn-country-state { font-size: 0.75rem; color: var(--muted); }
.vpn-country-group.is-unused { opacity: 0.6; }
.vpn-country-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.vpn-country-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: 0.8rem; cursor: pointer; background: #fff; }
.vpn-country-chip:has(input:checked) { border-color: #0284c7; background: #f0f9ff; color: #075985; font-weight: 600; }
.vpn-recover-list { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.vpn-recover-item { display: inline-flex; align-items: center; gap: 4px; min-height: 36px; font-size: 0.85rem; }
.vpn-recover-item.is-unused { opacity: 0.6; }
.vpn-status-list { list-style: none; margin: 14px 0; padding: 0; display: grid; gap: 8px; }
.vpn-status-list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; min-width: 0; }
.vpn-status-name { display: grid; gap: 2px; min-width: 0; }
.vpn-status-name small { color: var(--muted); font-size: 0.75rem; }
.vpn-status-list .vpn-reconnect-control { margin-left: 0; }
#vpn-credentials-title .vpn-credentials-badge { margin-left: 8px; vertical-align: middle; }
.vpn-type-group select { max-width: 320px; height: 40px; padding: 6px 10px; border: 1px solid #cbd5e1; border-radius: 7px; font: inherit; }

/* 신규 수집기: 지역이 늘어나도 한 줄씩 훑어볼 수 있는 간소한 목록 */
.scout-target-list-wrap { min-width: 0; }
.scout-target-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 10px; }
.scout-target-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; align-items: center; gap: 8px 14px; padding: 8px 12px; border-top: 1px solid var(--line); min-width: 0; }
.scout-target-row:first-child { border-top: 0; }
.scout-target-row.is-current { background: #eff6ff; }
.scout-target-row.is-excluded .scout-target-info { opacity: .6; }
.scout-target-info { display: grid; gap: 2px; min-width: 0; }
.scout-target-info strong { font-size: .9rem; overflow-wrap: anywhere; }
.scout-target-info small { font-size: .75rem; color: var(--muted); overflow-wrap: anywhere; }
.scout-target-state { font-size: .75rem; padding: 2px 8px; border-radius: 999px; background: #f1f5f9; color: #334155; white-space: nowrap; }
.scout-target-row.is-current .scout-target-state { background: #dbeafe; color: #1d4ed8; }
.scout-target-row.is-excluded .scout-target-state { background: #fef2f2; color: #991b1b; }
.scout-target-toggle { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; font-size: .8rem; }
.scout-target-toggle input { width: 18px; height: 18px; }
.scout-target-row button { min-height: 36px; white-space: nowrap; }
.scout-target-more { margin-top: 10px; width: 100%; min-height: 40px; }
@media (max-width: 600px) {
  .scout-target-row { grid-template-columns: minmax(0, 1fr) auto; }
  .scout-target-info { grid-column: 1 / -1; }
}
.vpn-preset-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.vpn-preset-row > span { font-size: 0.8rem; color: var(--muted); font-weight: 600; }
.vpn-assignment-table select { height: 36px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font: inherit; }
.vpn-container-name { display: block; margin-top: 2px; font-size: 0.72rem; color: var(--muted); }
.vpn-assignment-table td.vpn-share-mode { white-space: normal; min-width: 140px; }
.vpn-settings-pending { margin: 0; padding: 8px 12px; border-radius: 8px; background: #fffbeb; border: 1px solid #fde68a; color: #92400e; font-size: 0.82rem; }
.vpn-advanced { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.vpn-advanced > summary { cursor: pointer; font-weight: 600; font-size: 0.85rem; }
.vpn-advanced[open] > summary { margin-bottom: 8px; }
.vpn-country-group legend { display: inline-flex; align-items: center; gap: 4px; }
.vpn-country-chips[hidden], .vpn-country-group[hidden] { display: none; }
.vpn-country-group:has(> .vpn-country-chips[hidden]) { padding: 2px 12px 6px; }
@media (max-width: 600px) {
  .vpn-assignment-table th:nth-child(3), .vpn-assignment-table td.vpn-share-mode { display: none; }
}
.vpn-accounts { margin-top: 14px; }
.vpn-account-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.vpn-account-list li { padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; min-width: 0; }
.vpn-account-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; }
.vpn-account-head > span:first-child { display: grid; gap: 2px; min-width: 0; }
.vpn-account-head small { color: var(--muted); font-size: 0.75rem; overflow-wrap: anywhere; }
.vpn-account-actions { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.vpn-account-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin-top: 10px; }
.vpn-account-form[hidden], .vpn-account-form label[hidden] { display: none; }
.vpn-account-form label { display: grid; gap: 4px; font-size: 0.78rem; font-weight: 600; }
.vpn-account-form input, .vpn-account-form select { height: 38px; padding: 6px 10px; border: 1px solid #cbd5e1; border-radius: 7px; font: inherit; min-width: 0; }
.vpn-account-form .vpn-account-actions { grid-column: 1 / -1; }

/* 관리자 서버 상태 */
.server-health-updated { margin: 14px 0 0; font-size: 0.85rem; color: var(--muted); }
.server-health-updated[data-level="warning"] { color: #92400e; }
.server-kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 14px 0 18px; }
.server-kpi { display: grid; gap: 6px; align-content: start; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; min-width: 0; }
.server-kpi-label { font-size: 0.8rem; color: var(--muted); font-weight: 600; }
.server-kpi > strong { font-size: 1.6rem; line-height: 1.1; color: var(--ink); }
.server-kpi > small { font-size: 0.75rem; color: var(--muted); overflow-wrap: anywhere; }
.server-kpi-flag { font-size: 0.75rem; font-weight: 700; color: #92400e; }
.server-kpi[data-level="critical"] .server-kpi-flag { color: #991b1b; }
.server-meter { height: 8px; border-radius: 4px; background: #e0f2fe; overflow: hidden; }
.server-meter > span { display: block; height: 100%; border-radius: 4px; background: #0284c7; }
.server-kpi[data-level="warning"] .server-meter { background: #fef3c7; }
.server-kpi[data-level="warning"] .server-meter > span { background: #d97706; }
.server-kpi[data-level="critical"] .server-meter { background: #fee2e2; }
.server-kpi[data-level="critical"] .server-meter > span { background: #dc2626; }
.server-spark { position: relative; height: 48px; margin-top: 4px; cursor: crosshair; }
.server-spark.is-empty { display: flex; align-items: center; font-size: 0.72rem; color: var(--muted); cursor: default; }
.server-spark svg { display: block; width: 100%; height: 48px; overflow: visible; }
.server-spark-line { fill: none; stroke: #0284c7; stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.server-spark-cross { stroke: #94a3b8; stroke-width: 1; vector-effect: non-scaling-stroke; }
.server-spark-dot { fill: #0284c7; stroke: #fff; stroke-width: 2; vector-effect: non-scaling-stroke; }
.server-spark-tip { position: absolute; top: -26px; transform: translateX(-50%); padding: 2px 8px; border-radius: 6px; background: #0f172a; color: #fff; font-size: 0.72rem; white-space: nowrap; pointer-events: none; }
.server-container-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; margin-top: 10px; }
.server-container-table th, .server-container-table td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; }
.server-container-table th { font-size: 0.76rem; color: var(--muted); font-weight: 600; }
.server-container-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.vpn-input-hint { font-size: 0.72rem; color: var(--muted); line-height: 1.5; }

/* 1 VNIC Active-Standby VPN 제어 패널 */
.vpn-pool-panel {
  border: 1px solid #cbd5e1;
  background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
  border-radius: 14px;
  margin-bottom: 24px;
  padding: 18px 20px;
}
.vpn-pool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin: 16px 0;
}
.vpn-slot-card {
  padding: 16px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.vpn-slot-card.active-card {
  border-left: 5px solid #10b981;
  background: #f0fdf4;
}
.vpn-slot-card.standby-card {
  border-left: 5px solid #3b82f6;
  background: #eff6ff;
}
.slot-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.slot-badge.badge-active {
  font-weight: 700;
  color: #065f46;
  font-size: 0.85rem;
}
.slot-badge.badge-standby {
  font-weight: 700;
  color: #1e40af;
  font-size: 0.85rem;
}
.slot-generation {
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  background: rgba(0,0,0,0.04);
  padding: 2px 8px;
  border-radius: 10px;
}
.slot-body {
  display: grid;
  gap: 8px;
  font-size: 0.85rem;
}
.slot-metric {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.slot-status-pill {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
  background: #dcfce7;
  color: #15803d;
}
.vpn-pool-meta-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 0.8rem;
  color: #64748b;
  border-top: 1px dashed #cbd5e1;
  padding-top: 10px;
  margin-top: 8px;
}

/* VPN 전환 이력 테이블 및 뱃지 */
.vpn-history-table th {
  background: #f8fafc;
  font-weight: 600;
  color: #475569;
}
.vpn-history-table td {
  padding: 8px 12px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}
.vpn-history-table tr:hover {
  background-color: #f8fafc;
}
.vpn-history-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}
.vpn-history-badge.reason-manual {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}
.vpn-history-badge.reason-blocked {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}
.vpn-history-badge.reason-network {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}
.vpn-history-badge.reason-default {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}
.vpn-history-route {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
}


/* 통합 원패스 수집기 카드 */
.unified-card {
  background: linear-gradient(135deg, #f5f3ff 0%, #ffffff 100%);
  border: 1px solid #c4b5fd;
  border-left: 5px solid #8b5cf6;
}
.unified-tag {
  background: #ede9fe;
  color: #6d28d9;
}
.unified-bar::-webkit-progress-value {
  background: linear-gradient(90deg, #8b5cf6, #3b82f6);
}
.unified-bar::-moz-progress-bar {
  background: linear-gradient(90deg, #8b5cf6, #3b82f6);
}

.vpn-policy-banner {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease-in-out;
}

/* ==========================================================================
   고도화된 Mission Control VPN 관리 UI 스타일
   ========================================================================== */

/* 1. 세그먼트 탭 스위처 (OpenVPN vs WireGuard) */
.vpn-segmented-control {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin: 16px 0 20px;
  background: #f1f5f9;
  padding: 6px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}
.vpn-segment-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
  color: var(--ink);
}
.vpn-segment-btn:hover {
  background: rgba(255, 255, 255, 0.6);
}
.vpn-segment-btn.is-active {
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.vpn-segment-btn .segment-icon {
  font-size: 1.5rem;
}
.vpn-segment-btn .segment-text {
  display: flex;
  flex-direction: column;
}
.vpn-segment-btn .segment-text strong {
  font-size: 0.95rem;
  color: #0f172a;
}
.vpn-segment-btn .segment-text small {
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 2px;
}

/* 2. 자격 증명 카드 & 폼 스타일 */
.vpn-cred-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 20px 24px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}
.vpn-cred-guide {
  background: #f8fafc;
  border-left: 4px solid #3b82f6;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 20px;
  font-size: 0.82rem;
  color: #334155;
  line-height: 1.5;
}
.vpn-field-group {
  margin-bottom: 16px;
}
.vpn-field-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 6px;
}
.vpn-field-input {
  width: 100%;
  height: 42px;
  padding: 8px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.9rem;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.vpn-field-input:focus {
  border-color: #0284c7;
  outline: none;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}
.vpn-pw-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}
.vpn-pw-wrapper .vpn-field-input {
  padding-right: 42px;
}
.vpn-pw-toggle {
  position: absolute;
  right: 8px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  font-size: 1.1rem;
  opacity: 0.6;
  transition: opacity 0.15s;
}
.vpn-pw-toggle:hover {
  opacity: 1;
}

/* 3. 모던 iOS 토글 스위치 (Auto-Recovery) */
.vpn-toggle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
  margin: 14px 0;
}
.vpn-toggle-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}
.vpn-toggle-info {
  display: flex;
  flex-direction: column;
}
.vpn-toggle-info strong {
  font-size: 0.88rem;
  color: #1e293b;
}
.vpn-toggle-info small {
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 2px;
}
.modern-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}
.modern-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.switch-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #cbd5e1;
  transition: 0.25s;
  border-radius: 24px;
}
.switch-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.25s;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}
.modern-switch input:checked + .switch-slider {
  background-color: #10b981;
}
.modern-switch input:checked + .switch-slider:before {
  transform: translateX(20px);
}

/* 4. 개별 터널 헬스체크 카드 그리드 */
.vpn-tunnel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  margin: 16px 0;
}
.vpn-tunnel-card {
  padding: 16px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.vpn-tunnel-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.vpn-tunnel-title {
  display: flex;
  align-items: center;
  gap: 8px;
}
.vpn-tunnel-title strong {
  font-size: 0.92rem;
  color: #0f172a;
}
.vpn-tunnel-role-badge {
  font-size: 0.72rem;
  padding: 2px 7px;
  border-radius: 6px;
  font-weight: 600;
  background: #f1f5f9;
  color: #475569;
}
.vpn-tunnel-metrics {
  display: grid;
  gap: 6px;
  font-size: 0.8rem;
  color: #475569;
  margin-bottom: 12px;
}
.vpn-tunnel-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.vpn-tunnel-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 10px;
  border-top: 1px dashed #e2e8f0;
}

/* 5. 국가 칩 향상 */
.vpn-country-chip {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 500;
  transition: all 0.15s ease;
}
.vpn-country-chip:hover {
  border-color: #94a3b8;
  background: #f8fafc;
}

.vpn-tunnel-card .vpn-reconnect-control {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  gap: 8px;
  margin-left: 0;
}
.vpn-tunnel-card .vpn-reconnect-button {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #1e293b;
  cursor: pointer;
  transition: all 0.15s ease;
}
.vpn-tunnel-card .vpn-reconnect-button:hover:not(:disabled) {
  background: #e2e8f0;
  border-color: #94a3b8;
}
.vpn-tunnel-card .vpn-reconnect-control small {
  font-size: 0.74rem;
  color: var(--muted);
}


/* ==========================================================================
   신규 수집기 (Scout) Mission Control 고도화 스타일
   ========================================================================== */

/* 1. 상단 헤더 & 격리 태그 */
.heading-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.badge-airgap-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.76rem;
  font-weight: 700;
  color: #065f46;
  background: linear-gradient(135deg, #ecfdf5, #d1fae5);
  border: 1px solid #a7f3d0;
  padding: 4px 10px;
  border-radius: 9999px;
  letter-spacing: 0.02em;
}

/* 2. 전용 독립 VPN 격리 안전 배너 */
.scout-isolation-banner {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 20px;
  border-radius: 12px;
  background: linear-gradient(135deg, #f0fdf4 0%, #eff6ff 100%);
  border: 1px solid #bbf7d0;
  border-left: 4px solid #10b981;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.06);
}
.scout-isolation-icon {
  font-size: 1.8rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}
.scout-isolation-content {
  flex: 1;
  min-width: 0;
}
.scout-isolation-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.scout-isolation-title-row strong {
  font-size: 0.95rem;
  color: #065f46;
  font-weight: 700;
}
.scout-isolation-badge {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: #dcfce7;
  color: #15803d;
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid #bbf7d0;
}
.scout-isolation-content p {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.5;
  color: #334155;
}

/* 3. 상단 Hero & Live Status Hub */
.scout-modern-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 20px;
  align-items: stretch;
  margin-bottom: 24px;
}
@media (max-width: 800px) {
  .scout-modern-hero {
    grid-template-columns: 1fr;
  }
}
.scout-hero-main {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.scout-live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.74rem;
  font-weight: 700;
  color: #047857;
  background: #ecfdf5;
  padding: 3px 8px;
  border-radius: 9999px;
  width: fit-content;
  margin-bottom: 8px;
  border: 1px solid #a7f3d0;
}
.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: scout-pulse 2s infinite;
}
@keyframes scout-pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}
.scout-scope-grid {
  display: grid;
  gap: 12px;
  margin: 0;
}
.scout-scope-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}
.scout-scope-card dt {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 4px;
}
.scout-scope-card dd {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 600;
  color: #0f172a;
}

/* 4. 시각적 탐색 플로우 파이프라인 */
.modern-scout-flow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0 24px;
}
@media (max-width: 640px) {
  .modern-scout-flow {
    flex-direction: column;
    align-items: stretch;
  }
}
.scout-flow-card {
  flex: 1;
  min-width: 0;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 18px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  transition: all 0.2s ease;
}
.scout-flow-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}
.flow-current {
  border-color: #3b82f6;
  background: linear-gradient(135deg, #eff6ff 0%, #ffffff 100%);
  border-left: 4px solid #2563eb;
}
.flow-next {
  border-color: #10b981;
  background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
  border-left: 4px solid #10b981;
}
.flow-step-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--muted);
  margin-bottom: 6px;
}
.flow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #64748b;
}
.flow-dot.pulse {
  background: #2563eb;
  animation: scout-pulse 2s infinite;
}
.scout-flow-card strong {
  display: block;
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.scout-flow-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: #94a3b8;
  padding: 0 4px;
}
@media (max-width: 640px) {
  .scout-flow-divider {
    transform: rotate(90deg);
    padding: 2px 0;
  }
}

/* 5. 컨트롤 박스 & 버튼 */
.modern-control-box {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 24px;
}
.modern-select {
  height: 44px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  padding: 0 12px;
  font-size: 0.88rem;
  color: #1e293b;
  box-sizing: border-box;
  transition: all 0.15s ease;
}
.modern-select:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}
.priority-run-btn {
  height: 44px !important;
  box-sizing: border-box !important;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  border: 1px solid transparent !important;
  border-radius: 8px !important;
  box-shadow: 0 2px 6px rgba(37,99,235,0.3) !important;
  transition: all 0.2s ease !important;
}
.priority-run-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(37,99,235,0.4) !important;
}

/* 6. 우선 탐색 대기열 칩 리스트 */
.scout-priority-section {
  margin-bottom: 24px;
}
.scout-section-header {
  margin-bottom: 10px;
}
.scout-section-header h3 {
  margin: 0 0 4px;
  font-size: 0.95rem;
  color: #0f172a;
  font-weight: 700;
}
.section-guide-text {
  font-size: 0.78rem;
  color: var(--muted);
}
.scout-priority-chips {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.scout-priority-chips li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
  transition: all 0.15s ease;
}
.scout-priority-chips li:hover {
  border-color: #cbd5e1;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}
.scout-priority-chips li > span {
  display: inline-flex;
  align-items: center;
  font-size: 0.92rem;
  font-weight: 600;
  color: #1e293b;
}
.priority-rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: #eff6ff;
  color: #2563eb;
  font-size: 0.75rem;
  font-weight: 700;
  margin-right: 8px;
  border: 1px solid #dbeafe;
}
.scout-queue-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.scout-queue-actions button {
  height: 32px;
  padding: 0 10px;
  font-size: 0.78rem;
  border-radius: 6px;
}

/* 7. 이후 자동 순서 아코디언 */
.modern-details {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 16px;
  background: #ffffff;
  margin-bottom: 24px;
}
.modern-details summary {
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 700;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 8px;
}
.schedule-count-pill {
  font-size: 0.74rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 9999px;
  background: #f1f5f9;
  color: #475569;
}
.scout-next-chips {
  list-style: none;
  padding: 12px;
  margin: 12px 0 0;
  background: #f8fafc;
  border-radius: 8px;
  max-height: 200px;
  overflow-y: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.scout-next-chips li {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.78rem;
  color: #334155;
}

/* 8. 실시간 정찰 프로그레스 카드 */
.modern-progress-card {
  background: linear-gradient(135deg, #eff6ff 0%, #f0fdf4 100%);
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  padding: 16px 20px;
  box-shadow: 0 2px 8px rgba(37,99,235,0.06);
  margin-top: 20px;
}
.modern-progress-card .scout-progress-bar-wrap {
  height: 12px;
  border-radius: 6px;
  background: rgba(0,0,0,0.08);
  overflow: hidden;
  margin-bottom: 10px;
}
.modern-progress-card .scout-progress-bar {
  height: 100%;
  border-radius: 6px;
  background: linear-gradient(90deg, #3b82f6, #10b981, #06b6d4);
  background-size: 200% 100%;
  animation: scout-gradient-shift 2.5s linear infinite;
}
@keyframes scout-gradient-shift {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}
.progress-main-text {
  font-size: 0.88rem;
  font-weight: 700;
  color: #1e293b;
}
.progress-sub-text {
  font-size: 0.78rem;
  color: #64748b;
}

/* 9. 지역 탐색 목록 필터 바 */
.scout-target-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 16px;
}
.scout-target-filters label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #475569;
}
.scout-target-filters select,
.scout-target-filters input {
  height: 38px;
  padding: 0 10px;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  background: #ffffff;
  font: inherit;
  font-size: 0.82rem;
}
.scout-target-filters input {
  min-width: 180px;
}

/* 10. 전체 지역 행 디자인 고도화 */
.scout-target-row {
  transition: all 0.15s ease;
}
.scout-target-row:hover {
  background: #f8fafc;
}
.scout-target-row.is-current {
  background: #eff6ff !important;
  border-left: 3px solid #2563eb;
}
.scout-target-state {
  font-size: 0.74rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 9999px;
  letter-spacing: 0.02em;
}

/* 11. 신규 숙소 정찰 ➔ 운영 DB 편입 4단계 퍼널 (Scout-to-Live Promotion Funnel) */
.scout-funnel-panel {
  margin-bottom: 24px;
}
.scout-funnel-panel .panel-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}
.scout-funnel-steps {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.funnel-step-card {
  flex: 1;
  min-width: 160px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.funnel-step-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.funnel-step-card.step-1 { border-top: 4px solid #3b82f6; }
.funnel-step-card.step-2 { border-top: 4px solid #8b5cf6; }
.funnel-step-card.step-3 { border-top: 4px solid #f59e0b; }
.funnel-step-card.step-4 { border-top: 4px solid #10b981; }

.step-num {
  font-size: 0.7rem;
  font-weight: 800;
  color: #64748b;
  letter-spacing: 0.05em;
}
.step-title {
  font-size: 0.92rem;
  color: #1e293b;
}
.step-metric {
  font-size: 1.45rem;
  font-weight: 800;
  color: #0f172a;
}
.step-sub {
  font-size: 0.76rem;
  color: #64748b;
}
.funnel-arrow {
  font-size: 1.2rem;
  color: #94a3b8;
  font-weight: bold;
}
.funnel-summary-badge {
  font-size: 0.82rem;
  font-weight: 700;
  color: #059669;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  padding: 6px 14px;
  border-radius: 9999px;
  white-space: nowrap;
}
.scout-net-change-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid #e2e8f0;
}
.net-stat-box {
  padding: 12px 16px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.net-stat-box.green {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
}
.net-stat-box.red {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}
.net-stat-box.blue {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
}
.net-label {
  font-size: 0.76rem;
  font-weight: 600;
}
.net-stat-box strong {
  font-size: 1.25rem;
  font-weight: 800;
}

/* 12. 실결제 견적 기반 상권별 청소비·수수료 비중 & 할인율 분석 (Quote Fee Insights) */
.fee-summary-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.fee-summary-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 18px 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.fee-summary-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.fee-summary-card.cleaning { border-left: 4px solid #3b82f6; }
.fee-summary-card.service { border-left: 4px solid #8b5cf6; }
.fee-summary-card.discount { border-left: 4px solid #10b981; }

.fee-card-icon {
  font-size: 2rem;
  line-height: 1;
}
.fee-card-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.fee-card-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #64748b;
}
.fee-card-info strong {
  font-size: 1.45rem;
  font-weight: 900;
  color: #0f172a;
}
.fee-card-info small {
  font-size: 0.76rem;
  color: #64748b;
  font-weight: 600;
}

.fee-table .market-name-cell {
  font-weight: 700;
  color: #1e293b;
}
.fee-bar-container {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 140px;
}
.fee-bar-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.8rem;
}
.fee-bar-meta strong {
  color: #1e293b;
}
.fee-bar-meta small {
  font-size: 0.72rem;
  color: #64748b;
}
.fee-mini-bar-track {
  width: 100%;
  height: 6px;
  background: #f1f5f9;
  border-radius: 9999px;
  overflow: hidden;
}
.fee-mini-bar-fill {
  height: 100%;
  border-radius: 9999px;
  transition: width 0.3s ease;
}
.fee-mini-bar-fill.clean {
  background: linear-gradient(90deg, #60a5fa, #3b82f6);
}
.fee-mini-bar-fill.service {
  background: linear-gradient(90deg, #a78bfa, #8b5cf6);
}



/* 주변 숙소 구성(입지 경쟁 조사) */
.nearby-open-button { border-color: #1e293b; background: #1e293b; }
.nearby-open .map-view .filter-sheet { display: none; }
.nearby-panel { border-color: #cbd5e1; box-shadow: 0 20px 48px rgb(15 23 42 / 18%); }
.nearby-location-marker { background: #1e293b; }
.nearby-controls { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: end; margin-top: 14px; }
.nearby-controls label { display: grid; gap: 4px; color: var(--muted); font-size: .68rem; font-weight: 750; }
.nearby-controls select {
  min-height: 46px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  color: var(--ink);
  font: inherit;
}
.nearby-boundary { margin: 12px 0 0; color: var(--muted); font-size: .66rem; line-height: 1.5; }
.text-link-button {
  margin: 4px 0 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--primary);
  font: inherit;
  font-size: .72rem;
  font-weight: 800;
  text-decoration: underline;
  cursor: pointer;
}
.nearby-dimension-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; }
.nearby-dimension-tab {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  color: var(--ink);
  font: inherit;
  font-size: .72rem;
  font-weight: 800;
  cursor: pointer;
}
.nearby-dimension-tab[aria-pressed="true"] { border-color: #1e293b; background: #1e293b; color: white; }
.nearby-bars { display: grid; gap: 2px; margin: 0 0 14px; padding: 0; list-style: none; }
.nearby-bar {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 36px;
  padding: 4px 8px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: .74rem;
  text-align: left;
  cursor: pointer;
}
.nearby-bar:hover { background: #f1f5f9; }
.nearby-bar[aria-pressed="true"] { border-color: #1e293b; background: #f1f5f9; }
.nearby-bar-label { display: flex; gap: 7px; align-items: center; min-width: 0; font-weight: 750; overflow-wrap: anywhere; }
.nearby-bar-track { height: 8px; border-radius: 4px; background: #e2e8f0; overflow: hidden; }
.nearby-bar-fill { display: block; height: 100%; border-radius: 4px; background: #475569; }
.nearby-bar-count { color: var(--muted); font-size: .68rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.nearby-swatch { flex: 0 0 10px; width: 10px; height: 10px; border-radius: 50%; background: var(--permit-none); }
.nearby-swatch.reg-city_homestay { background: var(--permit-city); }
.nearby-swatch.reg-sandbox { background: var(--permit-sandbox); }
.nearby-swatch.reg-general_lodging { background: var(--permit-general); }
.nearby-swatch.reg-residence { background: var(--permit-residence); border-radius: 2px; }
.nearby-swatch.reg-other { background: var(--permit-other); }
.nearby-swatch.reg-none { box-sizing: border-box; border: 2px solid var(--permit-none); background: white; }
.nearby-list-section h3 { margin: 0 0 6px; font-size: .82rem; }
.nearby-list { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.nearby-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px; align-items: stretch; }
.nearby-link {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  gap: 2px 8px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  text-decoration: none;
}
.nearby-link:hover { border-color: #94a3b8; background: #f8fafc; }
.nearby-link strong { overflow: hidden; font-size: .76rem; text-overflow: ellipsis; white-space: nowrap; }
.nearby-meta { grid-column: 2; color: var(--muted); font-size: .66rem; line-height: 1.45; }
.nearby-airbnb {
  display: grid;
  width: 36px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
  font-weight: 900;
  text-decoration: none;
}
.nearby-airbnb:hover { border-color: #94a3b8; color: var(--ink); }
.nearby-more { width: 100%; margin-top: 8px; min-height: 40px; cursor: pointer; }
.projection-open .registration-legend,
.nearby-open .registration-legend {
  left: clamp(12px, 2.5vw, 32px);
  max-width: calc(100% - 520px);
}
@media (max-width: 1023px) {
  .registration-legend button { min-height: 26px; padding: 0 7px; font-size: .62rem; }
}
/* 601px 이상은 필터 패널이 왼쪽에 떠 있으므로 그 옆(기본 규칙)에 두고, 이하에서만 왼쪽 끝에 붙인다. */
@media (max-width: 600px) {
  .registration-legend,
  .projection-open .registration-legend,
  .nearby-open .registration-legend { left: 10px; bottom: 30px; max-width: calc(100% - 84px); }
}
@media (min-width: 1024px) {
  /* market-page 지도 필터 패널: left 16px · width 318px */
  .market-page .registration-legend { left: 346px; bottom: 16px; max-width: calc(100% - 346px - 132px); }
  .market-page.projection-open .registration-legend,
  .market-page.nearby-open .registration-legend { left: 16px; bottom: 44px; max-width: calc(100% - 520px); }
}

/* 바로가기 칩: 도시별 묶음(2026-10-10 정리) */
#quick-spot-chips { display: grid; gap: 8px; }
.quick-chip-group h3 { margin: 0 0 4px; color: var(--muted); font-size: .64rem; font-weight: 800; letter-spacing: .02em; }
.quick-chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.market-summary { justify-content: flex-end; }
.market-summary .summary-updated { color: var(--muted); font-size: .7rem; }

/* 상세 투자 요약 카드 */
.detail-investment-section { display: grid; gap: 10px; }
.investment-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.investment-metric { display: grid; gap: 4px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.investment-metric .label { color: var(--muted); font-size: .68rem; font-weight: 750; }
.investment-metric strong { font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.investment-metric.negative strong { color: #b42318; }
.investment-trend { display: grid; gap: 6px; color: var(--muted); font-size: .7rem; }
.investment-trend p { margin: 0; }
.investment-trend-bars { display: flex; gap: 3px; align-items: flex-end; height: 40px; }
.investment-trend-bar { flex: 1 1 0; max-width: 22px; border-radius: 3px 3px 0 0; background: #94a3b8; }
.investment-trend-bar:last-child { background: var(--primary); }
.investment-source, .investment-empty { margin: 0; color: var(--muted); font-size: .66rem; line-height: 1.5; }
@media (max-width: 600px) {
  .investment-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* 재계산·계산 근거 패널 */
.recalculate-panel, #calculation-evidence { border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.recalculate-panel > summary, #calculation-evidence > summary { min-height: 44px; padding: 12px 14px; cursor: pointer; font-size: .82rem; font-weight: 800; }
.recalculate-body, .calculation-evidence-body { display: grid; gap: 14px; padding: 0 14px 14px; }
.evidence-group { display: grid; gap: 8px; }
.evidence-group > h4 { margin: 6px 0 0; color: var(--muted); font-size: .72rem; font-weight: 800; }

/* ==========================================================================
   통계 메인 및 서브 네비게이션 (사이드바 & 서브탭바)
   ========================================================================== */
.nav-group-stats {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sidebar-subnav {
  display: flex;
  flex-direction: column;
  padding-left: 28px;
  gap: 2px;
  margin-top: 2px;
  margin-bottom: 4px;
}
.sidebar-subnav-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  font-size: 0.82rem;
  color: #64748b;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
}
.sidebar-subnav-btn:hover {
  background: rgba(0, 0, 0, 0.04);
  color: #0f172a;
}
.sidebar-subnav-btn[aria-selected="true"],
.sidebar-subnav-btn.active {
  background: rgba(30, 41, 59, 0.08);
  color: #0f172a;
  font-weight: 600;
}
.subnav-bullet {
  font-weight: bold;
  color: #94a3b8;
}
.sidebar-subnav-btn[aria-selected="true"] .subnav-bullet {
  color: #2563eb;
}

/* 통계 화면 공통 서브 탭바 */
.stats-subnav-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  margin-bottom: 20px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.stats-subnav-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #64748b;
  font-size: 0.88rem;
  font-weight: 550;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.stats-subnav-item:hover {
  background: rgba(255, 255, 255, 0.6);
  color: #1e293b;
}
.stats-subnav-item.active,
.stats-subnav-item[aria-selected="true"] {
  background: #ffffff;
  color: #0f172a;
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.stats-subnav-item .ui-icon {
  width: 16px;
  height: 16px;
}

/* ==========================================================================
   서울 지하철역별 실증특례 숙소 통계 대시보드
   ========================================================================== */
.subway-stats-view {
  padding: 16px 24px 40px;
  max-width: 1280px;
  margin: 0 auto;
}
.subway-stats-heading {
  margin-bottom: 20px;
}
.subway-stats-heading h1 {
  font-size: 1.45rem;
  font-weight: 750;
  color: #0f172a;
  margin: 0 0 6px;
}
.subway-stats-heading .section-lead {
  color: #64748b;
  font-size: 0.88rem;
  margin: 0;
}

/* KPI 카드 그리드 (투자 요약 스타일) */
.subway-stats-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.subway-kpi-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px;
  background: #ffffff;
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}
.subway-kpi-label {
  font-size: 0.68rem;
  font-weight: 750;
  color: var(--muted, #64748b);
  letter-spacing: 0.02em;
}
.subway-kpi-value {
  font-size: 1.05rem;
  font-weight: 750;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
}

/* 컨트롤 툴바 */
.subway-stats-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 14px;
}
.subway-radius-control-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}
.subway-stats-toolbar .toolbar-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: #334155;
  white-space: nowrap;
}
.subway-radius-chips {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.subway-radius-chip {
  padding: 5px 12px;
  font-size: 0.8rem;
  font-weight: 550;
  border-radius: 20px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
}
.subway-radius-chip:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}
.subway-radius-chip.active {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
  font-weight: 700;
}

.subway-search-filter-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-grow: 1;
  justify-content: flex-end;
}
.subway-search-box {
  position: relative;
  min-width: 260px;
  max-width: 380px;
  flex-grow: 1;
}
.subway-search-box .search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  color: #94a3b8;
  pointer-events: none;
}
.subway-search-box input {
  width: 100%;
  padding: 7px 12px 7px 32px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.84rem;
  background: #f8fafc;
  transition: all 0.15s ease;
}
.subway-search-box input:focus {
  outline: none;
  border-color: #2563eb;
  background: #ffffff;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}
.subway-filter-checkbox-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: #475569;
  cursor: pointer;
  white-space: nowrap;
}
.subway-stats-status {
  font-size: 0.82rem;
  color: #64748b;
  margin: 0 0 12px 4px;
}

/* 테이블 스타일 */
.subway-stats-table-wrap {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.subway-stats-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.88rem;
}
.subway-stats-table th {
  background: #f8fafc;
  color: #475569;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 12px 16px;
  border-bottom: 1px solid #e2e8f0;
}
.subway-stats-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}
.subway-stats-table tr:last-child td {
  border-bottom: none;
}
.subway-stats-table tr:hover {
  background: #f8fafc;
}
.subway-stats-table .col-rank { width: 60px; text-align: center; }
.subway-stats-table .col-sandbox { width: 140px; }
.subway-stats-table .col-total { width: 110px; }
.subway-stats-table .col-ratio { width: 150px; }
.subway-stats-table .col-actions { width: 170px; text-align: right; }

.rank-medal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-weight: 750;
  font-size: 0.8rem;
}
.rank-medal-1 { background: #fef3c7; color: #b45309; border: 1px solid #fcd34d; }
.rank-medal-2 { background: #f1f5f9; color: #475569; border: 1px solid #cbd5e1; }
.rank-medal-3 { background: #ffedd5; color: #9a3412; border: 1px solid #fed7aa; }
.rank-num { font-weight: 600; color: #64748b; font-size: 0.84rem; }

.station-meta-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.station-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
}
.station-district {
  font-size: 0.72rem;
  color: #64748b;
  background: #f1f5f9;
  padding: 2px 6px;
  border-radius: 4px;
}
.station-lines-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.subway-line-tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
  white-space: nowrap;
}

.sandbox-count-badge {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.84rem;
  background: #f1f5f9;
  color: #64748b;
}
.sandbox-count-badge.has-count {
  background: #eff6ff;
  color: #1d4ed8;
}
.sandbox-count-badge.has-count strong {
  font-size: 1.05rem;
  font-weight: 800;
  color: #1e40af;
}

.ratio-bar-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}
.ratio-bar-fill {
  height: 6px;
  background: #3b82f6;
  border-radius: 3px;
  max-width: 80px;
  flex-shrink: 0;
}
.ratio-text {
  font-size: 0.82rem;
  font-weight: 600;
  color: #334155;
  font-variant-numeric: tabular-nums;
}

.btn-subway-nearby,
.btn-subway-map {
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 550;
  cursor: pointer;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  transition: all 0.15s ease;
}
.btn-subway-nearby {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
}
.btn-subway-nearby:hover {
  background: #334155;
}
.btn-subway-map:hover {
  background: #f8fafc;
}

/* 모바일 카드 스타일 */
.subway-stats-mobile-list {
  display: none;
  flex-direction: column;
  gap: 10px;
}
.subway-stat-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.card-title-box {
  display: flex;
  align-items: center;
  gap: 8px;
}
.card-lines {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 12px;
}
.card-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  background: #f8fafc;
  padding: 8px 12px;
  border-radius: 8px;
  margin-bottom: 12px;
}
.metric-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.metric-label {
  font-size: 0.68rem;
  color: #64748b;
  font-weight: 600;
}
.metric-val {
  font-size: 0.92rem;
  font-weight: 700;
  color: #0f172a;
}
.card-actions {
  display: flex;
  gap: 8px;
}
.card-actions button {
  flex: 1;
  padding: 8px 0;
  text-align: center;
}

@media (max-width: 768px) {
  .subway-stats-table-wrap { display: none; }
  .subway-stats-mobile-list { display: flex; }
  .subway-stats-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .subway-search-filter-wrap {
    flex-direction: column;
    align-items: stretch;
  }
  .subway-search-box {
    max-width: 100%;
    min-width: 0;
  }
  .subway-stats-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .subway-stats-view {
    padding: 12px 14px 40px;
  }
}

