.academic-link { display: inline-flex; align-items: center; gap: 8px; margin: 4px 0 8px; padding: 8px 11px; border: 1px solid #b6ddd4; border-radius: 7px; background: #e9f7f2; color: #11685e; font-size: 12px; font-weight: 700; text-decoration: none; }
.academic-link:hover { background: #d9f1e8; }
.academic-link:focus-visible { outline: 3px solid #cc8a31; outline-offset: 2px; }
.beta-recommendation { margin: 12px 0; padding: 13px; border: 1px solid #e1b56c; border-radius: 8px; background: #fffaf0; color: #553b14; font-size: 12px; }
.beta-recommendation h2 { margin: 0 0 7px; font-size: 15px; }
.beta-recommendation h2 span { display: inline-block; padding: 2px 6px; border-radius: 5px; background: #f7e3b7; font-size: 11px; }
.beta-recommendation p { margin: 7px 0; line-height: 1.5; }
.beta-recommendation .beta-status { padding: 9px; border-radius: 6px; background: #f4ece0; font-size: 14px; font-weight: 700; }
.beta-recommendation.beta-recommend .beta-status { color: #0c4f45; background: #dff3e9; }
.beta-recommendation .beta-method { font-size: 11px; }
.live-observations { margin: 12px 0; padding: 12px; border: 1px solid #b8c9d6; border-radius: 8px; background: #f4f8fb; color: #18354c; font-size: 12px; }
.live-observations h2 { margin: 0 0 6px; font-size: 14px; }
.live-observations p { margin: 5px 0; line-height: 1.5; }
.live-observations ul { margin: 6px 0 0; padding-left: 18px; }

:root {
  --ink: #172033;
  --muted: #667085;
  --line: #e4e7ec;
  --surface: #ffffff;
  --surface-soft: #f7f8fa;
  --blue: #2563eb;
  --conditional: #f59e0b;
  --screened: #64748b;
  --rejected: #dc2626;
  --field: #7c3aed;
  --parking: #0891b2;
  --policy: #0f766e;
  --shadow: 0 8px 24px rgba(16, 24, 40, 0.12);
}

* { box-sizing: border-box; }

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

body {
  color: var(--ink);
  background: #dfe4ea;
  font-family: -apple-system, BlinkMacSystemFont, "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  font-size: 14px;
}

button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: 0.55; }

.app-shell { position: relative; width: 100%; height: 100%; overflow: hidden; }

#map { position: absolute; inset: 0; z-index: 1; background: #d7dde5; }

.sidebar {
  position: absolute;
  z-index: 1000;
  top: 12px;
  bottom: 12px;
  left: 12px;
  width: 390px;
  overflow-y: auto;
  padding: 18px 18px 24px;
  border: 1px solid rgba(255,255,255,.75);
  border-radius: 14px;
  background: rgba(255,255,255,.96);
  box-shadow: var(--shadow);
  scrollbar-width: thin;
}

.app-header { padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.eyebrow { color: var(--blue); font-size: 10px; font-weight: 800; letter-spacing: .12em; }
h1 { margin: 5px 0 6px; font-size: 22px; line-height: 1.2; letter-spacing: -.03em; word-break: keep-all; }
.app-header p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }

section { margin-top: 16px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 9px; }
h2 { margin: 0; font-size: 14px; line-height: 1.3; }
.frozen-badge, .selection-status {
  display: inline-flex; align-items: center; padding: 3px 7px; border-radius: 999px;
  color: #475467; background: #f2f4f7; font-size: 10px; white-space: nowrap;
}
.selection-status { color: #667085; }

.summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.summary-card {
  min-height: 54px; padding: 8px 7px; border: 1px solid #dbe3ed; border-radius: 8px;
  background: #f8fbff;
}
.summary-card span { display: block; color: var(--muted); font-size: 10px; line-height: 1.25; }
.summary-card strong { display: block; margin-top: 3px; font-size: 18px; line-height: 1; }
.summary-card.warning { background: #fff9eb; border-color: #fde7a9; }
.summary-card.muted { background: #f7f8fa; border-color: #e4e7ec; }
.summary-card.danger { background: #fff5f5; border-color: #fecaca; }
.summary-card.verified { background: #f0fdf4; border-color: #bbf7d0; }
.summary-note, .control-note { margin: 8px 0 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.control-subnote { margin: 10px 0 4px; color: var(--muted); font-size: 10.5px; font-weight: 600; letter-spacing: .02em; }
.feedback-checks { border-left: 2px solid #e2e8f0; padding-left: 10px; margin-left: 2px; }
.fb-mapgap-icon { background: none; border: none; }
.fb-mapgap-icon span {
  display: flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 50%;
  background: #dc2626; color: #fff; font-weight: 800; font-size: 13px; line-height: 1;
  box-shadow: 0 1px 4px rgba(15, 23, 42, .5); border: 2px solid #fff;
}
.fb-popup .fb-title { font-weight: 700; margin: 0 0 4px; }
.fb-popup .fb-note { color: #64748b; font-size: 11px; margin: 6px 0 0; }
.fb-popup .fb-expl { font-size: 12px; background: #f8fafc; border-left: 3px solid #94a3b8; padding: 5px 7px; }

.priority-section { padding: 11px 10px 10px; border: 1px solid #dbe3ed; border-radius: 10px; background: #f8fbff; }
.priority-section .section-heading { margin-bottom: 8px; }
.priority-mode-buttons .filter-button { flex: 1 1 44%; padding: 7px 6px; font-size: 11px; }
.priority-mode-buttons .filter-button.active { color: #fff; border-color: var(--blue); background: var(--blue); }
.priority-note { margin: 8px 0; color: #475467; font-size: 11px; line-height: 1.45; }
.priority-list { display: grid; gap: 8px; grid-template-columns: minmax(0, 1fr); }
.priority-group { display: grid; gap: 5px; grid-template-columns: minmax(0, 1fr); }
.priority-group-title { color: #344054; font-size: 11px; font-weight: 800; }
.priority-card {
  display: flex; width: 100%; gap: 8px; align-items: flex-start; padding: 8px;
  border: 1px solid #d8e0ea; border-radius: 8px; color: var(--ink); text-align: left;
  background: #fff; box-shadow: 0 1px 2px rgba(16,24,40,.04); transition: .15s ease;
}
.priority-card:hover { border-color: #93c5fd; background: #f5f9ff; transform: translateY(-1px); }
.priority-card.new-site-card { border-left: 4px solid #2563eb; }
.priority-card.parking-card { border-left: 4px solid var(--parking); }
.priority-card.policy-card { border-left: 4px solid var(--policy); }
.priority-rank {
  display: grid; place-items: center; width: 23px; height: 23px; flex: 0 0 23px;
  border-radius: 50%; color: #fff; background: #2563eb; font-size: 12px; font-weight: 800;
}
.parking-card .priority-rank { background: var(--parking); }
.policy-card .priority-rank { background: var(--policy); }
.priority-card-body { display: block; min-width: 0; }
.priority-card-body strong, .priority-card-body small, .priority-card-meta, .priority-card-warning { display: block; overflow-wrap: anywhere; }
.priority-card-body strong { font-size: 11px; line-height: 1.3; }
.priority-card-body small { margin-top: 2px; color: var(--muted); font-size: 10px; line-height: 1.3; }
.priority-card-meta { margin-top: 4px; color: #475467; font-size: 10px; line-height: 1.35; }
.priority-card-warning { margin-top: 4px; color: #9a6700; font-size: 10px; line-height: 1.35; }
.priority-empty { padding: 9px; border: 1px dashed #cbd5e1; border-radius: 7px; color: var(--muted); background: #fff; font-size: 11px; line-height: 1.45; }

.search-row { display: flex; gap: 6px; }
.search-row input {
  min-width: 0; flex: 1; padding: 9px 10px; border: 1px solid #d0d5dd; border-radius: 7px;
  color: var(--ink); background: #fff; outline: none;
}
.search-row input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.primary-button, .secondary-button, .filter-button {
  border: 1px solid #d0d5dd; border-radius: 7px; padding: 8px 10px; color: #344054; background: #fff;
  transition: .15s ease;
  word-break: keep-all;
}
.primary-button { border-color: var(--blue); color: #fff; background: var(--blue); font-weight: 700; }
.primary-button:hover { background: #1d4ed8; }
.secondary-button:hover, .filter-button:hover { border-color: #98a2b3; background: #f9fafb; }
.filter-button.active { border-color: #93c5fd; color: #1d4ed8; background: #eff6ff; font-weight: 700; }
.button-row { display: flex; flex-wrap: wrap; gap: 6px; }
.utility-buttons .secondary-button { font-size: 12px; }

.search-results { margin-top: 7px; }
.search-results:empty { display: none; }
.search-count { margin: 6px 0 4px; color: var(--muted); font-size: 11px; }
.search-result {
  display: block; width: 100%; padding: 7px 8px; border: 0; border-bottom: 1px solid #f0f2f5;
  color: var(--ink); text-align: left; background: #fbfcfe;
}
.search-result:hover { background: #eef5ff; }
.search-result strong { display: block; font-size: 12px; }
.search-result small { color: var(--muted); font-size: 10px; }

.check-list { display: grid; gap: 7px; }
.check-list label { display: flex; align-items: center; gap: 6px; color: #344054; font-size: 12px; line-height: 1.35; }
.check-list input { accent-color: var(--blue); }
.check-list small { margin-left: auto; color: #98a2b3; font-size: 10px; }
.emphasis-label { margin-top: 3px; padding-top: 8px; border-top: 1px solid var(--line); }
.swatch { width: 10px; height: 10px; flex: 0 0 10px; border-radius: 3px; background: #94a3b8; }
.swatch.conditional { background: var(--conditional); }
.swatch.screened { background: var(--screened); }
.swatch.rejected { background: var(--rejected); }
.swatch.field { border: 2px solid var(--field); background: #fff; }
.swatch.conflict { border: 2px dashed #b42318; background: #fff1f0; }
.swatch.dedicated { border: 2px dotted #6941c6; background: #f4f0ff; }
.swatch.all-parcels { border: 1px solid #98a2b3; background: #eef2f6; }
.swatch.policy { border-radius: 50%; background: var(--policy); }
.swatch.parking { border-radius: 50%; background: var(--parking); }
.swatch.fb-supply { border-radius: 50%; background: #0891b2; }
.swatch.fb-circles { border-radius: 50%; background: transparent; border: 2px dashed #475569; }
.swatch.fb-mapgap { border-radius: 50%; background: #dc2626; }
.swatch.fb-landvalue { border-radius: 50%; background: #fbbf24; border: 1px dashed #b45309; }

.selected-detail { min-height: 80px; }
.empty-state { display: grid; place-items: center; padding: 22px 12px; border: 1px dashed #d0d5dd; border-radius: 8px; color: var(--muted); text-align: center; line-height: 1.5; }
.detail-alert { margin-bottom: 10px; padding: 9px 10px; border-left: 4px solid var(--conditional); border-radius: 5px; color: #7a4b00; background: #fff8e6; font-size: 12px; line-height: 1.45; }
.detail-alert.danger { border-left-color: var(--rejected); color: #8a1c1c; background: #fff1f2; }
.detail-alert.info { border-left-color: var(--blue); color: #174ea6; background: #eff6ff; }
.detail-section { margin-top: 10px; border: 1px solid #e4e7ec; border-radius: 8px; overflow: hidden; }
.detail-section summary { padding: 8px 10px; color: #344054; background: #f8fafc; cursor: pointer; font-size: 12px; font-weight: 700; }
.detail-section dl { display: grid; grid-template-columns: 46% 54%; gap: 0; margin: 0; padding: 4px 10px 7px; }
.detail-section dt, .detail-section dd { margin: 0; padding: 5px 0; border-bottom: 1px solid #f2f4f7; font-size: 11px; line-height: 1.4; overflow-wrap: anywhere; }
.detail-section dt { padding-right: 8px; color: var(--muted); }
.detail-section dd { color: var(--ink); font-weight: 600; }
.detail-section dl > :nth-last-child(-n+2) { border-bottom: 0; }
.na { color: #98a2b3; font-weight: 400; }
.flag-yes { color: #b54708; }
.flag-no { color: #027a48; }
.selected-link { color: var(--blue); text-decoration: underline; word-break: break-all; }
.field-chip { display: inline-block; margin: 1px 3px 1px 0; padding: 2px 5px; border-radius: 999px; color: #6941c6; background: #f4f0ff; font-size: 10px; }

.policy-context-list { display: grid; gap: 6px; }
.policy-context-item { padding: 8px 9px; border: 1px solid #d7ebe8; border-radius: 7px; background: #f1fbfa; }
.policy-context-item strong { display: block; color: #0f625b; font-size: 11px; }
.policy-context-item span { display: block; margin-top: 3px; color: #475467; font-size: 10px; line-height: 1.4; }

.sidebar-footer { margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--line); }
.sidebar-footer p { margin: 5px 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.sidebar-footer strong { color: #475467; }
.data-status { color: #344054 !important; font-weight: 700; }

.legend {
  position: absolute; z-index: 900; right: 14px; bottom: 16px; min-width: 190px; max-width: 280px;
  padding: 10px 11px; border: 1px solid rgba(255,255,255,.9); border-radius: 9px; background: rgba(255,255,255,.94); box-shadow: 0 4px 16px rgba(16,24,40,.14); font-size: 10px;
}
.legend-title { margin-bottom: 6px; font-size: 12px; font-weight: 800; }
.legend-group { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 8px; margin-top: 5px; }
.legend-label { width: 100%; color: var(--muted); font-weight: 700; }
.legend-box, .legend-line, .legend-dot { display: inline-block; vertical-align: -1px; margin-right: 3px; }
.legend-box { width: 10px; height: 10px; border-radius: 2px; }
.legend-box.conditional { background: var(--conditional); }
.legend-box.screened { background: var(--screened); }
.legend-box.rejected { background: var(--rejected); }
.legend-line { width: 14px; height: 8px; border: 2px dashed var(--field); border-radius: 2px; }
.legend-line.conflict { border-color: #b42318; border-style: dashed; }
.legend-line.dedicated { border-color: #6941c6; border-style: dotted; }
.legend-dot { width: 9px; height: 9px; border-radius: 50%; }
.legend-dot.parking { background: var(--parking); }
.legend-dot.policy-primary { background: var(--policy); }
.legend-dot.policy-p6 { background: #9333ea; }
.legend-dot.fb-supply { background: #0891b2; }
.legend-dot.fb-circles { background: transparent; border: 2px dashed #475569; }
.legend-dot.fb-mapgap { background: #dc2626; }
.legend-dot.fb-landvalue { background: #fbbf24; border: 1px dashed #b45309; }
.legend-priority { display: inline-grid; place-items: center; width: 18px; height: 18px; margin-right: 3px; border: 1px solid #fff; border-radius: 50%; color: #fff; font-size: 9px; font-style: normal; font-weight: 800; vertical-align: -5px; box-shadow: 0 1px 3px rgba(15,23,42,.28); }
.legend-priority.new-site { background: #2563eb; }
.legend-priority.existing-parking { background: #0891b2; }
.legend-priority.policy { width: 26px; border-radius: 9px; background: #0f766e; }
.legend-caution { margin-top: 8px; padding-top: 7px; border-top: 1px solid #e4e7ec; color: #667085; font-size: 10px; line-height: 1.35; }

.map-error {
  position: absolute; z-index: 1200; top: 18px; right: 18px; max-width: 420px; padding: 12px 14px;
  border: 1px solid #fda4af; border-radius: 8px; color: #881337; background: #fff1f2; box-shadow: var(--shadow); font-size: 12px; line-height: 1.5;
}

.leaflet-control-layers { margin-left: 0 !important; }
.leaflet-control-layers-expanded { padding: 8px 10px; border: 1px solid rgba(255,255,255,.9); border-radius: 8px; background: rgba(255,255,255,.95); box-shadow: 0 4px 16px rgba(16,24,40,.14); line-height: 1.6; }
.leaflet-control-layers label { color: #344054; font-size: 12px; }
.leaflet-popup-content { margin: 12px 14px; }
.candidate-cluster-wrapper { background: transparent; border: 0; }
.candidate-cluster {
  display: grid; place-items: center; width: 28px; height: 28px; border: 2px solid #fff;
  border-radius: 50%; color: #fff; background: #475467; box-shadow: 0 2px 7px rgba(16,24,40,.32);
  font-size: 11px; font-weight: 800; text-shadow: 0 1px 2px rgba(0,0,0,.25);
}
.candidate-cluster.conditional { background: #d97706; }
.candidate-cluster.field { background: #7c3aed; }
.candidate-cluster.selected { outline: 3px solid #111827; outline-offset: 2px; }
.region-overview-wrapper { background: transparent; border: 0; }
.region-overview {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  min-width: 112px; padding: 8px 10px; border: 2px solid #fff; border-radius: 999px;
  color: #fff; background: #1d4ed8; box-shadow: 0 3px 10px rgba(16,24,40,.32);
  white-space: nowrap; font-size: 12px; font-weight: 800;
}
.region-overview strong { font-size: 12px; }
.region-overview em { color: #dbeafe; font-size: 11px; font-style: normal; }
.popup-region-button {
  width: 100%; margin-top: 8px; padding: 6px 8px; border: 1px solid #93c5fd; border-radius: 6px;
  color: #1d4ed8; background: #eff6ff; font-size: 11px; font-weight: 700;
}
.popup-region-button:hover { background: #dbeafe; }
.popup-title { margin-bottom: 6px; color: #111827; font-size: 13px; font-weight: 800; }
.popup-subtitle { color: #667085; font-size: 10px; }
.popup-table { border-collapse: collapse; font-size: 11px; }
.popup-table th, .popup-table td { padding: 3px 6px 3px 0; text-align: left; vertical-align: top; }
.popup-table th { color: #667085; font-weight: 500; }
.popup-table td { color: #172033; font-weight: 700; }
.popup-note { margin-top: 7px; color: #667085; font-size: 10px; line-height: 1.4; }
.warning-note { color: #9a6700; }
.priority-popup-list { margin: 7px 0 0; padding-left: 18px; color: #344054; font-size: 11px; line-height: 1.55; }

.priority-marker-wrapper { background: transparent; border: 0; }
.priority-marker {
  display: grid; place-items: center; width: 34px; height: 34px; border: 3px solid #fff;
  border-radius: 50%; color: #fff; background: #2563eb; box-shadow: 0 2px 8px rgba(15,23,42,.42);
  font-size: 14px; font-weight: 900; text-shadow: 0 1px 2px rgba(0,0,0,.35);
}
.priority-marker.new-site { background: #2563eb; }
.priority-marker.existing-parking { background: #0891b2; }
.priority-marker.policy { background: #0f766e; }
.priority-marker.group { width: 48px; height: 36px; border-radius: 18px; background: #0f766e; font-size: 12px; }

@media (max-width: 900px) {
  .sidebar { width: 330px; top: 8px; bottom: 8px; left: 8px; padding: 14px; }
  .leaflet-control-layers { margin-left: 0 !important; }
  .legend { right: 8px; bottom: 8px; max-width: 190px; }
}

@media (max-width: 700px) {
  #map { position: fixed; inset: 0; }
  .sidebar {
    top: auto; right: 0; bottom: 0; left: 0; width: 100%; height: min(56vh, 520px); max-height: 56vh;
    padding: 12px 14px calc(16px + env(safe-area-inset-bottom));
    border-right: 0; border-bottom: 0; border-left: 0; border-radius: 16px 16px 0 0;
    box-shadow: 0 -6px 24px rgba(16,24,40,.2);
  }
  .app-header { padding-bottom: 10px; }
  h1 { font-size: 19px; }
  .summary-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
  .summary-card { min-height: 46px; padding: 6px 5px; }
  .summary-card strong { font-size: 16px; }
  .priority-section { padding: 9px 8px; }
  .priority-mode-buttons .filter-button { flex-basis: 46%; }
  .legend { right: 8px; bottom: calc(56vh + 8px); max-width: 208px; max-height: 30vh; overflow-y: auto; }
  .leaflet-control-layers { top: 8px; right: 8px; }
  .leaflet-control-layers-expanded { max-width: 170px; }
}

@media (max-width: 640px) {
  .sidebar { width: calc(100% - 16px); max-height: 45%; bottom: auto; }
  #map { top: 45%; }
  .leaflet-control-layers { margin-left: 0 !important; }
  .legend { display: none; }
}

/* 개별공시지가 표시 */
.price-value { font-weight: 600; white-space: nowrap; }
.price-value small { font-weight: 400; color: var(--muted); }
.price-zero { color: var(--rejected); font-weight: 600; text-decoration: underline dotted; }
.price-verified {
  display: inline-block; margin-left: 4px; padding: 1px 6px; border-radius: 999px;
  background: #e7f6ec; color: #14683a; border: 1px solid #bfe3cd; font-size: 10px; white-space: nowrap;
}
.price-link { color: var(--blue, #1d6fd8); text-decoration: none; }
.price-link:hover { text-decoration: underline; }
.price-card {
  margin: 6px 0; padding: 10px 12px; border: 1px solid #d7e3f4; border-left: 4px solid var(--blue, #1d6fd8);
  border-radius: 6px; background: #f4f8ff; font-size: 12px; line-height: 1.5;
}
.price-card strong { font-size: 11px; letter-spacing: .2px; }
.price-card-value { font-size: 15px; font-weight: 600; margin: 2px 0; }
.price-card-value small { font-weight: 400; color: var(--muted); }
.price-card small { color: var(--muted); display: block; }
.price-card .price-link { display: inline-block; margin-top: 4px; }

/* 이용 불균형 (중동 A18-A24) 패널 */
.imbalance-block {
  margin: 0 0 10px; padding: 10px 12px; border: 1px solid #e5e7eb; border-radius: 8px; background: #fff;
}
.imbalance-block-title { font-size: 12px; font-weight: 700; margin-bottom: 6px; color: #111827; }
.imbalance-compare { display: flex; align-items: stretch; gap: 8px; }
.imbalance-fac { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.imbalance-fac strong { font-size: 12px; line-height: 1.3; }
.imbalance-fac small { color: #6b7280; font-size: 11px; line-height: 1.4; }
.imbalance-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; border: 1px solid #1f2937; margin-bottom: 2px; }
.imbalance-dot.a18 { background: #dc2626; }
.imbalance-dot.a24 { background: #2563eb; }
.imbalance-gap {
  flex: 0 0 auto; align-self: center; text-align: center; font-size: 10px; color: #6b7280; line-height: 1.4;
  padding: 4px 8px; border: 1px dashed #c4b5fd; border-radius: 8px; background: #f5f3ff;
}
.imbalance-gap strong { font-size: 16px; color: #6d28d9; }
.imbalance-kpi { font-size: 12px; line-height: 1.5; color: #111827; margin-bottom: 6px; }
.imbalance-kpi strong { font-size: 13px; }
.imbalance-table { width: 100%; border-collapse: collapse; font-size: 11px; margin: 4px 0 8px; }
.imbalance-table th, .imbalance-table td { padding: 4px 6px; border: 1px solid #e5e7eb; text-align: left; white-space: nowrap; }
.imbalance-table th { background: #f8fafc; font-weight: 600; }
.imbalance-card { border-left: 4px solid #c4b5fd; }
.imbalance-card.imbalance-a18 { border-left-color: #dc2626; }
.imbalance-card.imbalance-a24 { border-left-color: #2563eb; }
.imbalance-card .priority-rank { font-size: 10px; }

/* BISCO 이용현황 24시간 프로필 */
.bisco-profile { margin: 8px 0 4px; }
.bisco-bars {
  display: flex; align-items: flex-end; gap: 2px; height: 44px; padding: 3px;
  border: 1px solid #e5e7eb; border-radius: 6px; background: #f8fafc;
}
.bisco-bar { flex: 1; min-height: 3px; background: #2563eb; border-radius: 2px 2px 0 0; }
.bisco-bars.weekend .bisco-bar { background: #7c3aed; }
.bisco-axis { display: flex; justify-content: space-between; font-size: 10px; color: #6b7280; margin-top: 2px; padding: 0 1px; }

/* 모바일(390px) 보강 — 파일 최후미에 위치하여 기본 규칙보다 우선 적용 */
@media (max-width: 700px) {
  .imbalance-compare { flex-direction: column; }
  .imbalance-gap { align-self: stretch; text-align: center; }
  .imbalance-table { font-size: 10px; }
  .imbalance-table th, .imbalance-table td { white-space: normal; }
  .bisco-bars { height: 36px; }
}

/* 데이터 갱신 상태 표시 */
.refresh-status {
  margin: 8px 0 0; padding: 6px 10px; border-radius: 8px;
  font-size: 11px; line-height: 1.5; color: #475467;
  background: #f2f4f7; border: 1px solid #e4e7ec;
}
.refresh-status.ok { background: #e7f6ec; color: #14683a; border-color: #bfe3cd; }
.refresh-status.error { background: #fdecec; color: #b42318; border-color: #f3c1c1; }
.refresh-button { margin-top: 6px; width: 100%; font-size: 12px; }
.bisco-live { display: block; color: #1d6fd8; font-weight: 600; }
.bisco-live.stale { color: #a15c07; }
.priority-card-meta em, .popup-table td em { font-style: normal; font-size: 9px; color: #98a2b3; }
.imbalance-current { border-left: 3px solid #2563eb; }
.imbalance-current .imbalance-block-title { color: #1d6fd8; }

/* 정책 권역 제안 (policy_case) */
.policy-case-card { align-items: flex-start; }
.case-badge {
  flex: 0 0 auto; margin-top: 2px; padding: 3px 8px; border-radius: 999px;
  font-size: 10px; font-weight: 700; letter-spacing: -0.01em; white-space: nowrap;
  background: #eef2f7; color: #475467; border: 1px solid #d0d5dd;
}
.case-badge-redistributable { background: #e8f1ff; color: #1d6fd8; border-color: #b8d4f5; }
.case-badge-partial_redistributable { background: #fff7e6; color: #a15c07; border-color: #f2d8a7; }
.case-badge-pair_no_substitute { background: #fdecec; color: #b42318; border-color: #f3c1c1; }
.case-badge-facility_chronic_congestion { background: #fef3e2; color: #b25e09; border-color: #f5cf9b; }
.case-badge-no_action_monitor { background: #f2f4f7; color: #475467; border-color: #d0d5dd; }
.case-related-note { display: block; margin-top: 4px; font-size: 11px; line-height: 1.45; color: #694105; background: #fffaeb; border: 1px solid #f2e2b8; border-radius: 6px; padding: 4px 6px; }
.case-related-note.full { margin: 6px 0 0; }
.case-area-line { margin: 4px 0 0; font-size: 12px; color: #475467; }
.case-meta-line {
  display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center;
  padding: 8px 10px; margin: 10px 0; font-size: 11px; color: #475467;
  background: #f8fafc; border: 1px solid #e4e7ec; border-radius: 8px;
}
.gate-chip {
  display: inline-block; padding: 2px 8px; margin: 2px 4px 2px 0; border-radius: 6px;
  font-size: 10px; font-weight: 700; font-family: ui-monospace, monospace;
}
.gate-chip.pass { background: #e7f6ec; color: #14683a; border: 1px solid #bfe3cd; }
.gate-chip.fail { background: #f2f4f7; color: #667085; border: 1px solid #d0d5dd; }
.case-policy-block { padding: 8px 0; border-bottom: 1px dashed #e4e7ec; }
.case-policy-block:last-child { border-bottom: none; }
.case-policy-head { font-size: 12px; font-weight: 700; color: #101828; margin-bottom: 4px; }
.case-gap-list { margin: 4px 0; padding-left: 18px; }
.case-gap-list li { font-size: 11px; color: #b54708; margin: 2px 0; }
