:root {
  font-family: Pretendard, "Noto Sans KR", system-ui, sans-serif;
  color: #172033;
  background: #f6f8fb;
  line-height: 1.5;

  /* 헤더 높이. sticky 검색 영역이 이 값만큼 아래에 붙는다. */
  --header-height: 58px;
  --brand: #2563eb;
  --ink: #172033;
  --muted: #64748b;
  --line: #e4e9f2;
  --radius: 14px;
  --control-height: 42px;
}

* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; }
button, input, select { font: inherit; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------------------------------------------------------------- 헤더 */

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  height: var(--header-height);
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(1.6) blur(8px);
  border-bottom: 1px solid var(--line);
}

.header-inner,
.container,
.footer-inner {
  max-width: 1240px;
  margin: 0 auto;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 100%;
  padding: 0 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  margin-right: auto;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  color: white;
}
.brand-text { display: flex; align-items: baseline; gap: 7px; }
.brand-text strong { font-size: 17px; letter-spacing: -.01em; }
.brand-text small {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: lowercase;
  color: #94a3b8;
}

.segment-nav,
.view-tabs {
  display: inline-flex;
  gap: 3px;
  padding: 3px;
  border-radius: 11px;
  background: #eef2f8;
}
.segment-link,
.view-tab {
  text-decoration: none;
  font-weight: 700;
  font-size: 13px;
  border-radius: 8px;
  color: var(--muted);
  transition: .15s ease;
}
.segment-link { padding: 7px 14px; }
.segment-link.active,
.view-tab.active {
  background: white;
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(23, 32, 51, .12);
}
.segment-link:hover:not(.active),
.view-tab:hover:not(.active) { color: var(--ink); }

.header-actions { display: flex; align-items: center; gap: 8px; }
.header-support {
  height: 32px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: white;
  color: #475569;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: .15s ease;
}
.header-support:hover { border-color: #c7d2fe; color: var(--brand); }

/* ------------------------------------------------------- 검색 영역(sticky) */

.container { padding: 16px 24px 32px; }

.search-panel {
  position: sticky;
  /* 헤더 바로 아래에 붙는다. 헤더와 겹치지 않게 높이만큼 띄운다. */
  top: var(--header-height);
  z-index: 60;
  margin-bottom: 4px;
  padding: 10px 0 8px;
  background: #f6f8fb;
}
.search-panel-inner {
  padding: 14px 16px;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 6px 18px rgba(23, 32, 51, .05);
}

.search-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 11px;
}
.page-heading { margin: 0; font-size: 17px; letter-spacing: -.01em; }
.view-tab { padding: 7px 16px; }

#notice-filter { display: grid; gap: 9px; }
.filter-row-fields {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 9px;
}
.filter-row-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 9px;
}

.filter-field { display: block; min-width: 0; }
.filter-label {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
}

input,
select,
.multi-select summary {
  width: 100%;
  height: var(--control-height);
  padding: 0 12px;
  border: 1px solid #d7dee9;
  border-radius: 10px;
  background: white;
  color: var(--ink);
  font-size: 14px;
}
select { padding-right: 8px; }
input::placeholder { color: #a5b0c0; }

input:focus,
select:focus,
.multi-select[open] summary {
  outline: 3px solid rgba(37, 99, 235, .12);
  border-color: var(--brand);
}

.multi-select { position: relative; }
.multi-select summary {
  display: flex;
  align-items: center;
  list-style: none;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 28px;
  font-size: 14px;
}
.multi-select summary::-webkit-details-marker { display: none; }
.multi-select summary::after {
  content: "▾";
  position: absolute;
  right: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
}
.multi-select.disabled summary {
  background: #f4f7fb;
  color: #a5b0c0;
  cursor: not-allowed;
}
.multi-select-menu {
  position: absolute;
  /* sticky 검색 영역 안에서 가장 위에 떠야 한다. */
  z-index: 1200;
  top: calc(100% + 6px);
  left: 0;
  min-width: 100%;
  max-height: 340px;
  overflow: auto;
  padding: 9px;
  background: white;
  border: 1px solid #dde4ee;
  border-radius: 12px;
  box-shadow: 0 18px 45px rgba(23, 32, 51, .16);
}
.wide-menu { width: 340px; }
.clear-selection {
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: #eef2ff;
  color: #3730a3;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  text-align: left;
}
/* 기관은 200개를 넘어 검색 없이는 못 찾는다. */
.option-search {
  height: 34px;
  margin-top: 7px;
  padding: 0 10px;
  font-size: 13px;
}
.check-option[hidden] { display: none; }
.checkbox-list { display: grid; gap: 2px; margin-top: 6px; }
.check-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
}
.check-option:hover { background: #f6f8fb; }
.check-option input { width: auto; height: auto; margin: 0; padding: 0; }
.sigungu-group { padding: 7px 0; border-top: 1px solid #eef2f7; }
.sigungu-group:first-of-type { border-top: 0; }
.sigungu-group > strong { display: block; padding: 3px 7px; font-size: 12px; color: var(--brand); }
.helper-text { margin: 9px 4px 4px; color: #94a3b8; font-size: 12px; }

.keyword { display: block; min-width: 0; }
.filter-actions { display: flex; gap: 8px; }
.search-button,
.reset-button {
  height: var(--control-height);
  /* 조회 버튼을 넉넉히 잡고 그만큼 검색 input을 줄인다(input은 1fr). */
  padding: 0 26px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: .15s ease;
}
.search-button {
  min-width: 124px;
  border: 1px solid var(--brand);
  background: var(--brand);
  color: white;
  cursor: pointer;
}
.search-button:hover { background: #1d4ed8; border-color: #1d4ed8; }
.reset-button { min-width: 96px; border: 1px solid #d7dee9; background: white; color: #475569; }
.reset-button:hover { border-color: #94a3b8; color: var(--ink); }

/* ---------------------------------------------------------------- 광고 자리 */

.ad-slot:empty { display: none; }
.ad-slot { margin: 10px 0; }
.ad-placeholder {
  display: grid;
  place-items: center;
  min-height: 92px;
  border: 1px dashed #c7d2e3;
  border-radius: 12px;
  background: #fbfcfe;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 700;
}
.ad-slot-list-inline { grid-column: 1 / -1; }

/* ---------------------------------------------------------------- 목록·카드 */

.summary-row {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 14px 2px 12px;
  color: var(--muted);
  font-size: 14px;
  flex-wrap: wrap;
}
.summary-row strong { color: var(--ink); margin-right: auto; font-size: 15px; }
/* 기본으로 빠지는 공고가 있다는 안내. 결과 수보다 약하게 보여준다. */
.filter-note {
  padding: 2px 9px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #94a3b8;
  font-size: 12px;
}

.notice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.notice-card {
  display: flex;
  flex-direction: column;
  padding: 18px;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 4px 14px rgba(23, 32, 51, .04);
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.notice-card:hover {
  border-color: #c7d6f0;
  box-shadow: 0 10px 26px rgba(23, 32, 51, .09);
  transform: translateY(-1px);
}
.notice-title { margin: 0 0 10px; font-size: 17px; line-height: 1.4; letter-spacing: -.01em; }
.notice-title-link { text-decoration: none; }
.notice-title-link:hover { color: var(--brand); }

/*
  배지는 **한 줄을 넘지 않는다.** 두 줄이 되면 카드 높이가 들쭉날쭉해져 목록을
  훑기 어렵다. 길이가 일정하지 않은 기관 배지를 먼저 줄이고, 넘치면 말줄임한다.
  전체 이름은 title 속성과 상세 페이지에서 볼 수 있다.
*/
.badges {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 5px;
  min-width: 0;
  overflow: hidden;
}
.badges.compact { gap: 4px; }
.badge {
  display: inline-block;
  flex: 0 0 auto;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.6;
  background: #f1f5f9;
  color: #475569;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* 기관명은 공동사업이면 매우 길어진다. 여기서 먼저 줄인다. */
.badge.agency { flex: 0 1 auto; min-width: 54px; }

/*
  기관 배지 색. **배경은 공공·민간 구분으로 통일**해 한눈에 갈리고,
  기관은 글자색으로 나눈다(`web.py:_badge_tone`). 같은 기관은 카드·지도·상세에서
  같은 글자색이다. 공고명보다 시선을 끌지 않도록 배경은 연하게만 쓴다.
*/
.badge.agency { border: 1px solid transparent; }
.seg-public { background: #eff6ff; border-color: #dbeafe; }
.seg-private { background: #fdf4ff; border-color: #f5e0fb; }
.seg-unknown { background: #f5f7fa; border-color: #e7ecf3; }

.ink-0 { color: #475569; }
.ink-1 { color: #1d4ed8; }
.ink-2 { color: #0f766e; }
.ink-3 { color: #b42318; }
.ink-4 { color: #6d28d9; }
.ink-5 { color: #c2410c; }
.ink-6 { color: #0369a1; }
.ink-7 { color: #be185d; }
.ink-8 { color: #4d7c0f; }

/* 공급유형은 상위 분류마다 뜻이 있어 고정색을 쓴다. */
.badge.type { border: 1px solid transparent; }
.type-sale { background: #ecfdf5; color: #047857; border-color: #d1fae5; }
.type-rental { background: #eef2ff; color: #4338ca; border-color: #e0e7ff; }
.type-jeonse { background: #fdf4ff; color: #a21caf; border-color: #fae8ff; }
.type-etc { background: #f1f5f9; color: #475569; }

/* 진행상태는 색만 보고 뜻을 알 수 있어야 한다. */
.status-open { background: #dcfce7; color: #15803d; }
.status-upcoming { background: #dbeafe; color: #1d4ed8; }
.status-announced { background: #fef3c7; color: #92400e; }
.status-always_open { background: #ede9fe; color: #6d28d9; }
.status-closed { background: #f1f5f9; color: #64748b; }
.status-date_unknown { background: #f8fafc; color: #94a3b8; }
.status-cancelled { background: #fee2e2; color: #b91c1c; }

.badge.revision { background: #fff1f2; color: #be123c; }
/* 확정된 정보가 아니라 "확인이 필요하다"는 표시이므로 테두리로 구분한다. */
.badge.segment-unconfirmed {
  flex: 0 1 auto;
  min-width: 64px;
  background: #fffbeb;
  color: #92400e;
  border: 1px dashed #d97706;
  cursor: help;
}

/* 상세 페이지는 자리가 넉넉하므로 자르지 않고 전부 보여준다. */
.detail-hero .badges { flex-wrap: wrap; overflow: visible; }
.detail-hero .badge {
  flex: 0 0 auto;
  min-width: 0;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

.region {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 11px 0 0;
  color: #475569;
  font-size: 14px;
}
.region-icon { color: #94a3b8; font-size: 11px; }

.card-facts { margin: 10px 0 14px; }
.card-facts div {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 8px;
  margin-top: 4px;
  font-size: 14px;
}
.card-facts dt { color: #94a3b8; font-size: 13px; }
.card-facts dd { margin: 0; }
.apply-period { font-weight: 700; color: var(--ink); }

.card-actions {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid #f1f5f9;
}
.detail-link,
.official-link { text-decoration: none; font-weight: 700; font-size: 14px; color: var(--brand); }
.detail-link { color: var(--ink); }
.detail-link:hover, .official-link:hover { color: #1d4ed8; }
.map-ready {
  margin-left: auto;
  padding: 2px 8px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 700;
}

.empty-state {
  grid-column: 1/-1;
  padding: 64px;
  text-align: center;
  color: var(--muted);
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.disclaimer { color: #94a3b8; font-size: 13px; margin-top: 18px; }

/* ---------------------------------------------------------------- 지도 */

.map-layout {
  display: grid;
  /* 목록이 좁으면 제목·배지가 넘쳐 가로 스크롤이 생긴다. 넉넉히 잡는다. */
  grid-template-columns: 392px minmax(0, 1fr);
  min-height: 660px;
  background: white;
  border: 1px solid var(--line);
  /* 지도는 모서리를 둥글리지 않는다. 둥근 모서리는 팝업에만 쓴다. */
  border-radius: 0;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(23, 32, 51, .04);
}
.map-notice-list {
  max-height: 660px;
  overflow-y: auto;
  /* 핀을 누르면 해당 카드로 부드럽게 이동한다. 지원하지 않으면 즉시 이동한다. */
  scroll-behavior: smooth;
  /* 세로만 스크롤한다. 가로 스크롤이 생기면 목록을 읽기 어렵다. */
  overflow-x: hidden;
  border-right: 1px solid var(--line);
  background: #fbfcfe;
}
.map-list-item {
  min-width: 0;
  padding: 14px 16px;
  border-bottom: 1px solid #eef2f7;
  cursor: pointer;
  transition: background .15s ease;
}
.map-list-item:hover { background: #f1f5f9; }
/* 좌표가 없으면 눌러도 지도가 움직일 곳이 없다. 클릭 대상이 아님을 보여준다. */
.map-list-item.no-position { cursor: default; }
.map-list-item.no-position:hover { background: transparent; }
.no-position-note {
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
/* 핀을 누르면 목록에서도 어느 공고인지 보여야 한다. */
.map-list-item.active {
  background: #eff6ff;
  box-shadow: inset 3px 0 0 var(--brand);
}
.map-list-item h3 { margin: 0 0 7px; font-size: 15px; line-height: 1.4; }
.map-list-item h3 a { text-decoration: none; }
.map-list-region { margin: 8px 0 7px; color: var(--muted); font-size: 13px; }
.map-list-actions { display: flex; gap: 12px; }
.map-list-actions a { color: var(--brand); font-size: 13px; font-weight: 700; text-decoration: none; }

/*
  지도 안의 오버레이(z-index 500대)가 sticky 검색 영역 위로 올라오지 않도록
  이 패널 안에서만 겹치게 가둔다.
*/
.map-panel { position: relative; z-index: 0; min-width: 0; }
#notice-map { width: 100%; height: 660px; background: #e7edf5; border-radius: 0; }
.map-unavailable {
  background:
    radial-gradient(circle at 25% 25%, rgba(37, 99, 235, .12), transparent 34%),
    linear-gradient(135deg, #eef2f7, #dce5f0);
}
.map-provider-message {
  position: absolute;
  z-index: 520;
  left: 50%;
  top: 22px;
  transform: translateX(-50%);
  width: min(560px, calc(100% - 40px));
  padding: 11px 16px;
  border: 1px solid #fbbf24;
  border-radius: 10px;
  background: #fffbeb;
  color: #92400e;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  box-shadow: 0 8px 24px rgba(23, 32, 51, .12);
}
.map-empty-overlay {
  position: absolute;
  z-index: 500;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(390px, calc(100% - 40px));
  padding: 20px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 12px 36px rgba(23, 32, 51, .18);
  text-align: center;
  pointer-events: none;
}
.map-empty-overlay strong,
.map-empty-overlay span { display: block; }
.map-empty-overlay span { margin-top: 6px; color: var(--muted); font-size: 13px; }
.compact-empty { margin: 12px; padding: 34px 14px; }

/*
  지도 팝업. 카드와 같은 디자인 언어를 쓰되 지도를 가리지 않게 좁게 둔다.
  모서리는 둥글리지 않는다. 카카오 InfoWindow가 자체 각진 흰 상자를 그리므로
  안쪽 div만 둥글려 봐야 상자 안에 둥근 상자가 겹쳐 보인다.
*/
.kakao-map-popup {
  width: min(300px, 74vw);
  max-height: 330px;
  overflow-y: auto;
  padding: 12px 14px;
  font-size: 13px;
}
/* 팝업 배지도 카드와 같게 한 줄로 두고 긴 기관명은 자른다. */
.map-popup .badges { flex-wrap: nowrap; overflow: hidden; }
.map-popup-heading {
  display: block;
  margin-bottom: 8px;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
}
.map-popup-notice { padding: 11px 0; border-top: 1px solid #eef2f7; }
.map-popup-notice:first-of-type { border-top: 0; padding-top: 0; }
.map-popup-notice:last-of-type { padding-bottom: 0; }
.map-popup-title {
  margin: 0 0 7px;
  font-size: 14px;
  line-height: 1.4;
  letter-spacing: -.01em;
}
.map-popup-title a { text-decoration: none; }
.map-popup-title a:hover { color: var(--brand); }
.map-popup .badges { margin-bottom: 8px; }
.map-popup-meta { margin: 3px 0; color: var(--muted); font-size: 12.5px; }
.map-popup-meta strong { color: #475569; font-weight: 700; }
.map-popup-actions { display: flex; gap: 10px; margin-top: 9px; }
.map-popup-actions a { color: var(--brand); font-weight: 700; text-decoration: none; font-size: 13px; }

/* ---------------------------------------------------------------- 상세 */

.detail-container { max-width: 1040px; }
.detail-back {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 2px 14px;
  font-size: 13px;
  color: var(--muted);
}
.back-link { text-decoration: none; font-weight: 700; color: #475569; }
.back-link:hover { color: var(--brand); }
.back-sep { color: #cbd5e1; }

.detail-title { margin: 0 0 12px; font-size: clamp(21px, 3vw, 27px); line-height: 1.35; }
.detail-section {
  margin-bottom: 16px;
  padding: 22px;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 4px 14px rgba(23, 32, 51, .04);
}
.detail-section h2 { margin: 0 0 16px; font-size: 19px; }
.detail-hero { position: relative; }
.detail-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 24px;
  margin: 16px 0;
}
.detail-facts div { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 8px; }
.detail-facts dt { color: #94a3b8; font-size: 13px; }
.detail-facts dd { margin: 0; }
.official-button {
  display: inline-flex;
  margin-top: 2px;
  padding: 11px 18px;
  border-radius: 10px;
  background: var(--brand);
  color: white;
  font-weight: 800;
  text-decoration: none;
}
.official-button:hover { background: #1d4ed8; }
.link-warning,
.empty-detail { color: var(--muted); }

.detail-back-bottom { margin: 18px 0 6px; }
.back-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: var(--control-height);
  padding: 0 18px;
  border: 1px solid #d7dee9;
  border-radius: 10px;
  background: white;
  color: #475569;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
}
.back-button:hover { border-color: #94a3b8; color: var(--ink); }

.media-gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.media-gallery figure { margin: 0; }
.media-gallery img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 12px; background: #e7edf5; }
.media-gallery figcaption { margin-top: 6px; color: var(--muted); font-size: 12px; }
.property-detail { padding: 18px 0; border-top: 1px solid #eef2f7; }
.property-detail:first-of-type { padding-top: 0; border-top: 0; }
.property-detail:last-child { padding-bottom: 0; }
.property-detail h3 { margin: 0 0 12px; font-size: 16px; }
.compact-facts { margin: 10px 0; }
.location-row {
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr);
  gap: 6px;
  padding: 10px 12px;
  background: #f8fafc;
  border-radius: 10px;
  font-size: 14px;
}
.location-row small { grid-column: 2; color: var(--muted); }
.unit-grid { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.unit-grid div { display: flex; gap: 7px; padding: 6px 10px; border-radius: 8px; background: #eef2ff; font-size: 13px; }
.property-style-list div { background: #f1f5f9; }
.property-merge-note { margin-top: 8px; color: var(--muted); font-size: 13px; }
.supply-table-wrap { overflow-x: auto; }
.supply-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.supply-table th,
.supply-table td { padding: 10px; border-bottom: 1px solid #eef2f7; text-align: left; white-space: nowrap; }
.supply-table th { color: var(--muted); background: #f8fafc; font-weight: 700; }

/* ---------------------------------------------------------------- 푸터 */

.site-footer {
  margin-top: 34px;
  padding: 26px 24px 32px;
  border-top: 1px solid var(--line);
  background: white;
}
.footer-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-logo { font-weight: 800; }
.footer-domain { margin-left: 8px; color: #94a3b8; font-size: 12px; font-weight: 700; }
.footer-note { max-width: 520px; margin: 7px 0 0; color: var(--muted); font-size: 13px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px; }
.footer-link {
  padding: 7px 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: white;
  color: #475569;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: .15s ease;
}
.footer-link:hover { border-color: #c7d2fe; color: var(--brand); }
.footer-link-support { border-color: #c7d2fe; color: var(--brand); background: #eff6ff; }

.support-dialog {
  width: min(400px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 20px 50px rgba(23, 32, 51, .22);
}
.support-dialog::backdrop { background: rgba(15, 23, 42, .38); }
.support-inner { padding: 22px; }
.support-dialog h2 { margin: 0 0 8px; font-size: 18px; }
.support-dialog p { margin: 0 0 8px; color: var(--muted); font-size: 14px; }
.support-contact a { color: var(--brand); font-weight: 700; }

.support-field { display: block; margin: 14px 0 6px; font-size: 13px; font-weight: 700; color: #334155; }
.support-dialog textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d7dee9;
  border-radius: 9px;
  font: inherit;
  font-size: 14px;
  color: #0f172a;
  background: white;
  box-sizing: border-box;
  resize: vertical;
  min-height: 96px;
}
.support-dialog textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, .12);
}
.support-hint { display: block; margin-top: 8px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.support-error {
  margin: 12px 0 0;
  padding: 9px 11px;
  border-radius: 8px;
  background: #fef2f2;
  color: #b91c1c !important;
  font-size: 13px;
  font-weight: 600;
}
.support-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.support-submit {
  height: 38px;
  padding: 0 20px;
  border: 1px solid var(--brand);
  border-radius: 9px;
  background: var(--brand);
  color: white;
  font-weight: 700;
  cursor: pointer;
}
.support-submit:disabled { opacity: .6; cursor: default; }
.dialog-close {
  height: 38px;
  padding: 0 18px;
  border: 1px solid #d7dee9;
  border-radius: 9px;
  background: white;
  color: #475569;
  font-weight: 700;
  cursor: pointer;
}
.footer-link-quiet { border-color: transparent; background: transparent; color: var(--muted); text-decoration: none; display: inline-flex; align-items: center; }

/* --------------------------------------------------------- 약관·방침 문서 */

.legal-page { max-width: 780px; margin: 0 auto; padding: 26px 0 48px; }
.legal-page h1 { margin: 0 0 6px; font-size: 24px; }
.legal-updated { margin: 0 0 26px; color: var(--muted); font-size: 13px; }
.legal-page h2 { margin: 28px 0 10px; font-size: 17px; }
.legal-page p, .legal-page li { color: #334155; font-size: 14px; line-height: 1.75; }
.legal-page ul { margin: 8px 0; padding-left: 20px; }
.legal-page a { color: var(--brand); font-weight: 600; }
.legal-table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 13px; }
.legal-table th, .legal-table td { border: 1px solid var(--line); padding: 9px 11px; text-align: left; vertical-align: top; }
.legal-table th { background: #f8fafc; font-weight: 700; color: #334155; white-space: nowrap; }
.legal-scroll { overflow-x: auto; }

/* ---------------------------------------------------------------- 반응형 */

@media (max-width: 1050px) {
  .filter-row-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .map-layout { grid-template-columns: 300px minmax(0, 1fr); }
}

@media (max-width: 850px) {
  :root { --header-height: 54px; }
  .header-inner { padding: 0 16px; gap: 10px; }
  .brand-text small { display: none; }
  .filter-row-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /*
    좁은 화면에서는 필터가 세로로 쌓여 sticky가 화면을 거의 다 덮는다.
    검색 결과를 가리는 편보다 함께 스크롤되는 편이 낫다. 헤더는 계속 고정이라
    다른 화면으로는 언제든 이동할 수 있다.
  */
  .search-panel { position: static; }
  .notice-grid { grid-template-columns: 1fr; }
  .detail-facts { grid-template-columns: 1fr; }
  .media-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .map-layout { grid-template-columns: 1fr; }
  .map-notice-list { max-height: 290px; border-right: 0; border-bottom: 1px solid var(--line); }
  #notice-map { height: 500px; }
}

@media (max-width: 560px) {
  .container { padding: 12px 14px 26px; }
  .header-actions { display: none; }
  .segment-nav { margin-left: auto; }
  .search-panel { padding: 8px 0 6px; }
  .search-panel-inner { padding: 12px; }
  .search-head { margin-bottom: 9px; }
  .filter-row-fields { grid-template-columns: 1fr; }
  .filter-row-search { grid-template-columns: 1fr; }
  .filter-actions > * { flex: 1; }
  .wide-menu { width: min(340px, calc(100vw - 52px)); }
  .detail-section { padding: 16px; }
  .media-gallery { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; }
}

/*
  화면이 낮으면 sticky 검색 영역이 결과를 너무 가린다. 그럴 때만 조금 더
  촘촘하게 접는다.
*/
@media (max-height: 720px) and (min-width: 851px) {
  .search-panel { padding: 8px 0 6px; }
  .search-panel-inner { padding: 11px 14px; }
  .search-head { margin-bottom: 8px; }
  #notice-filter { gap: 7px; }
}
