/* 청약 경쟁률 조회 화면 스타일 — 기존 연회색 배경과 파란색 강조를 유지하는 앱형 작업 화면. */
:root {
  --bg: #F5F6F8;
  --surface: #FFFFFF;
  --surface-2: #F0F2F5;
  --border: #E5E7EB;
  --text: #1A1A1A;
  --muted: #6B7280;
  --faint: #9CA3AF;
  --accent: #2563EB;
  --accent-soft: #EFF4FF;
  --accent-border: #BFD3FF;
  --green: #15803D;
  --green-soft: #E7F6EC;
  --green-border: #BBE5C6;
  --danger: #DC2626;
  --deep-1: #0A1A3A;
  --deep-2: #102A5E;
  --deep-accent: #0D2B5C;
  --deep-accent-2: #16407A;
  --deep-sub: #A9C2E5;
  --deep-label: #8FB4E8;
  --deep-note-bg: #EAF1FB;
  --font-base: 17px;
  --motion-ease-out: cubic-bezier(.22, .68, .24, 1);
  --motion-ease-standard: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Malgun Gothic", "맑은 고딕", "Apple SD Gothic Neo", sans-serif;
  font-size: var(--font-base);
  line-height: 1.5;
  font-weight: 400;
}

a { color: var(--accent); }

/* 콘텐츠 래퍼 — 넓은 모니터에서 가운데 1080px 로 모으고 좌우 여백. 헤더·본문 모두 이 폭에 정렬 */
.page {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

/* 상단 헤더 */
header.app-header {
  position: relative;
  overflow: hidden;
  /* 본문 컨테이너(.page) 폭을 꽉 채워 좌·우 경계를 비교토글·본문과 일치시킨다.
     텍스트는 왼쪽, 오른쪽 빈 공간은 글로우(빛)가 자연스럽게 채운다. */
  margin: 24px 0 0;
  padding: 32px 28px;
  background: linear-gradient(120deg, #0A1A3A 0%, #102A5E 100%);
  border-radius: 18px;
}
.hero-content { position: relative; padding-right: 234px; } /* PC 집 크기 20% 추가 축소에 맞춘 오른쪽 여백 */
.hero-label {
  font-size: 13px;
  letter-spacing: 2px;
  font-weight: 600;
  color: var(--deep-label);
}
header.app-header h1 {
  margin: 8px 0 0;
  font-size: 28px;
  line-height: 1.3;
  color: #fff;
  font-weight: 600;
}
header.app-header p {
  margin: 10px 0 0;
  color: var(--deep-sub);
  font-size: 16px;
}
/* 헤더 오른쪽 집 아이콘: 직전 181.35×145.08px에서 PC 화면만 정확히 20% 축소. */
.hero-house {
  position: absolute;
  top: 50%;
  right: 80px;
  transform: translateY(-50%);
  width: 145.08px;
  height: 116.064px;
  opacity: 0.9;
  pointer-events: none;
  z-index: 1;
}

.error-banner {
  margin: 12px 0;
  padding: 12px 14px;
  border: 1px solid var(--danger);
  border-radius: 10px;
  background: #FDECEC;
  color: var(--danger);
  font-size: 15px;
}
.error-banner[hidden] { display: none; }
.error-banner[data-tone="notice"] {
  border-color: #B9D1F3;
  background: #F2F7FF;
  color: #27527F;
}

main {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 20px; /* 두 컬럼 사이 일정한 gutter */
  padding: 24px 0; /* 헤더·비교토글과 동일한 24px 세로 리듬 */
  align-items: start;
}
@media (max-width: 820px) {
  main { grid-template-columns: 1fr; }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
}

.card h2 {
  margin: 0 0 10px;
  font-size: 17px;
  font-weight: 500;
  color: var(--text);
}

/* 목록 — 큰 검색창(돋보기 아이콘 + padding-left 로 텍스트와 분리) */
.search-box { position: relative; margin-bottom: 10px; }
.search-box .search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--faint);
  pointer-events: none;
}
#search {
  width: 100%;
  height: 48px;
  padding: 0 14px 0 42px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 16px;
}
#search::placeholder { color: var(--faint); }
#search:focus { outline: none; border-color: var(--accent); }

/* 지역 토글 버튼(서울/경기/무순위) — 선택 시 파란 배경·흰 글씨 */
.region-toggle { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .55fr) minmax(0, 1.2fr); gap: 8px; margin-bottom: 12px; }
.region-btn {
  min-height: 42px;
  padding: 8px 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  line-height: 1.25;
  white-space: nowrap;
}
.region-btn:hover { border-color: var(--accent); }
.region-btn.active { background: var(--deep-accent); border-color: var(--deep-accent); color: #FFFFFF; }
#region option { background: var(--surface); color: var(--text); }

/* 목록 위 요약 한 줄 */
.list-summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 14px;
}
.list-summary-label { color: var(--muted); }
.list-summary-count { color: var(--text); font-weight: 500; }

/* 단지 카드 리스트 */
#complex-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 42vh; /* 목록 높이 축소(스크롤로 전체 접근). 아래 관련 기사 공간 확보 */
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.complex-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.complex-card:hover {
  transform: translateY(-3px);
  border-color: rgba(79, 140, 255, 0.65);
  box-shadow: 0 8px 22px rgba(79, 140, 255, 0.20);
}
.complex-card.selected { border-color: var(--accent-border); background: var(--accent-soft); border-left: 3px solid var(--deep-accent); }
.complex-card .card-body { flex: 1; min-width: 0; }
.complex-card .card-name {
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.complex-card .card-meta {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  margin-top: 4px;
  font-size: 14px;
  color: var(--muted);
}
.complex-card .card-meta-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.complex-card .card-pin { display: inline-flex; flex-shrink: 0; color: var(--accent); }
.complex-card .card-special-allocation { margin-top: 5px; font-size: 13px; line-height: 1.35; color: #176B4D; font-weight: 600; }
.complex-card .card-special-allocation.is-pending { color: #A35C00; }
.complex-card .card-lease-status { max-width: 100%; margin-top: 4px; overflow-wrap: anywhere; font-size: 13px; line-height: 1.35; font-weight: 600; word-break: normal; }
.complex-card .card-lease-status.is-possible { color: #176B4D; }
.complex-card .card-lease-status.is-conditional { color: #A35C00; }
.complex-card .card-lease-status.is-pending { color: var(--muted); }
.complex-card .card-occupancy-status { max-width: 100%; margin-top: 4px; overflow-wrap: anywhere; font-size: 13px; line-height: 1.35; color: var(--muted); font-weight: 500; word-break: normal; }
.complex-card .card-occupancy-status.is-exact { color: #176B4D; font-weight: 600; }
.complex-card .card-occupancy-status.is-pending { color: #A35C00; font-weight: 600; }
/* 접수 전 일정은 카드 안에서만 강조한다. 긴 날짜 문구도 다음 카드 영역으로 넘지 않는다. */
.complex-card.has-upcoming { align-items: flex-start; min-height: 166px; }
.complex-card .card-upcoming {
  display: block;
  box-sizing: border-box;
  max-width: 100%;
  min-height: 30px;
  margin-top: 7px;
  padding: 5px 8px;
  overflow-wrap: anywhere;
  border: 1px solid #B9D1F3;
  border-radius: 6px;
  background: #F2F7FF;
  color: #1F5A94;
  font-size: 12.5px;
  font-weight: 750;
  line-height: 1.35;
  white-space: normal;
  animation: upcomingBlink 1.3s ease-in-out infinite;
}
@keyframes upcomingBlink { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .card-upcoming { animation: none; } }
/* 상세 제목 옆 '모집 예정' 구분 태그(딥블루 헤더 위 앰버 칩) */
.upcoming-tag { display: inline-block; margin-left: 10px; padding: 3px 11px; border-radius: 999px; background: #FFD84D; color: #4A3B00; font-size: 14px; font-weight: 700; vertical-align: middle; white-space: nowrap; }
/* 예측 확정(freeze) 배지 — 이 단지 예측이 그 시점 모델로 고정됨을 표시 */
.predict-locked { margin-left: 8px; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: 12px; font-weight: 600; }
.complex-card .card-chevron { display: inline-flex; flex-shrink: 0; color: var(--faint); }

/* 단지 전환 시 오른쪽 상세가 오른쪽에서 살짝 밀려들며 페이드인 */
@keyframes detailSlideIn {
  from { opacity: 0; transform: translateX(180px); }
  to { opacity: 1; transform: translateX(0); }
}
/* 오른쪽(180px)에서 빠르게(0.65s) 미끄러져 들어와 부드럽게 멈추는 ease-out. */
.detail-animate { animation: detailSlideIn .65s cubic-bezier(.16, 1, .3, 1) both; }

/* 상세 — (A) 딥블루 헤더 */
.detail-hero {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  padding: 22px;
  background: linear-gradient(120deg, #0A1A3A 0%, #102A5E 100%);
}
.detail-hero .hero-content { position: relative; padding-right: 0; } /* 상세 헤더엔 집이 없으므로 헤더용 오른쪽 여백(집 공간) 제거 → 제목이 전체 폭 사용 */
.detail-eyebrow { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.detail-hero .chip-light {
  font-size: 13px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.22);
}
.detail-hero .detail-date,
.detail-hero .detail-move { font-size: 14px; color: var(--deep-sub); }
.detail-hero h2 { margin: 0; font-size: 24px; line-height: 1.3; color: #fff; font-weight: 600; white-space: nowrap; } /* 단지명 한 줄 고정(폭 초과 시 fitDetailName 이 글자 축소) */
.detail-hero .sub { margin-top: 4px; font-size: 15px; color: var(--deep-sub); word-break: break-word; }
.detail-restrictions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.restriction-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  min-height: 28px;
  max-width: 100%;
  padding: 5px 9px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 13px;
  line-height: 1.35;
}
.restriction-chip-label { color: var(--deep-sub); }
.restriction-chip strong { min-width: 0; font-weight: 600; word-break: break-word; }
.restriction-chip.is-pending { border-color: rgba(255, 205, 86, 0.55); color: #FFE29A; }
.restriction-chip.is-residence-none { border-color: rgba(116, 224, 171, 0.52); color: #BFF4D7; }
.restriction-chip.is-residence-none .restriction-chip-label { color: #BFF4D7; }
.restriction-chip.is-sale-post { border-color: rgba(255, 205, 86, 0.62); color: #FFE29A; }
.restriction-chip.is-loan-arranged { border-color: rgba(116, 224, 171, 0.52); color: #BFF4D7; }
.detail-actions { margin-top: 14px; display: flex; gap: 8px; flex-wrap: wrap; }
.btn-light {
  display: inline-block;
  text-decoration: none;
  padding: 8px 14px;
  font-size: 15px;
  font-weight: 500;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.28);
  font-family: inherit;
  line-height: 1.25;
  cursor: pointer;
}
.btn-light:hover { background: rgba(255, 255, 255, 0.24); }
.btn-light[hidden] { display: none; }

/* 현재 공고값의 출처와 개인 스냅샷 비교 기준을 분리한다. 상세 헤더의 제목·별 버튼과
   겹치지 않도록 헤더 바로 아래에 두고, 대체 목록일 때는 기본으로 근거를 펼친다. */
.notice-data-trust-wrap { margin-top: 10px; }
.notice-data-trust-wrap[hidden] { display: none; }
.notice-data-trust {
  overflow: hidden;
  border: 1px solid #B8CBEA;
  border-radius: 10px;
  background: #F6F9FF;
  color: var(--text);
}
.notice-data-trust.is-fallback_snapshot,
.notice-data-trust.is-live_partial,
.notice-data-trust.is-unavailable {
  border-color: #F0C26C;
  background: #FFF9ED;
}
.notice-data-trust.is-original-verified {
  border-color: #8DBFA4;
  background: #F4FBF6;
}
.notice-data-trust > summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 12px;
  cursor: pointer;
  list-style: none;
}
.notice-data-trust > summary::-webkit-details-marker { display: none; }
.notice-data-trust > summary::after {
  content: "⌄";
  flex: 0 0 auto;
  margin-left: auto;
  color: var(--muted);
  font-size: 16px;
  line-height: 1;
  transition: transform .18s ease;
}
.notice-data-trust[open] > summary::after { transform: rotate(180deg); }
.notice-data-trust-status {
  flex: 0 0 auto;
  padding: 3px 7px;
  border-radius: 999px;
  background: #DCE9FF;
  color: var(--deep-accent);
  font-size: 11.5px;
  font-weight: 800;
}
.notice-data-trust.is-fallback_snapshot .notice-data-trust-status,
.notice-data-trust.is-live_partial .notice-data-trust-status,
.notice-data-trust.is-unavailable .notice-data-trust-status {
  background: #FFF0D2;
  color: #875000;
}
.notice-data-trust-summary {
  min-width: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  word-break: keep-all;
}
.notice-data-trust-body {
  display: grid;
  gap: 7px;
  padding: 0 12px 12px;
  border-top: 1px solid rgba(113, 143, 184, .24);
}
.notice-data-trust-body p {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.5;
  word-break: keep-all;
}
.notice-data-trust-body .notice-data-trust-comparison { color: #536881; }
.notice-data-trust-body .notice-data-trust-official { color: #245B9F; font-weight: 650; }
.notice-data-trust-body .notice-data-trust-original { color: #176B4D; font-weight: 650; }
.notice-data-trust-body .notice-data-trust-original-change { color: #8A4C14; font-weight: 750; }
.notice-data-trust-link {
  width: fit-content;
  color: var(--deep-accent);
  font-size: 12.5px;
  font-weight: 750;
  text-underline-offset: 2px;
}

/* 개인 프로필과 공고별 특공 요건을 분리한다. 초록은 입력 기준 통과, 주황은 확인 필요,
   빨강은 현재 입력 기준 어려움이며 어느 상태도 최종 적격을 뜻하지 않는다. */
.eligibility-diagnosis {
  margin: 14px 0;
  padding: 15px;
  border: 1px solid #B8CBEA;
  border-radius: 12px;
  background: linear-gradient(135deg, #F5F8FF 0%, #FBFCFF 100%);
}
.eligibility-diagnosis[hidden] { display: none; }
.eligibility-diagnosis-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}
.eligibility-kicker {
  display: block;
  margin-bottom: 3px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}
.eligibility-diagnosis h3 { margin: 0; color: var(--text); font-size: 17px; }
.eligibility-edit-button,
.profile-edit-button,
.profile-save-button,
.profile-clear-button {
  min-height: 34px;
  border-radius: 7px;
  font: inherit;
  font-size: 12.5px;
  font-weight: 750;
  cursor: pointer;
}
.eligibility-edit-button,
.profile-edit-button {
  flex: 0 0 auto;
  padding: 6px 9px;
  border: 1px solid #9CB9E6;
  background: #FFFFFF;
  color: var(--deep-accent);
}
.eligibility-diagnosis-summary {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.5;
}
.eligibility-diagnosis-list { display: grid; gap: 9px; margin-top: 12px; }
.eligibility-general-supply {
  border: 1px solid #C8D5E8;
  border-radius: 9px;
  background: #FFFFFF;
}
.eligibility-general-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px;
  cursor: pointer;
  color: var(--deep-accent);
  font-size: 13px;
  list-style: none;
}
.eligibility-general-summary::-webkit-details-marker { display: none; }
.eligibility-general-summary::after {
  content: "⌄";
  flex: 0 0 auto;
  color: #4A5B70;
  font-size: 16px;
  transition: transform .15s ease;
}
.eligibility-general-supply[open] .eligibility-general-summary::after { transform: rotate(180deg); }
.eligibility-general-status {
  flex: 0 0 auto;
  padding: 3px 7px;
  border-radius: 999px;
  background: #EEF2F7;
  color: #4A5B70;
  font-size: 11.5px;
  font-weight: 800;
}
.eligibility-general-status.is-ready { background: #DDF5E6; color: #176B4D; }
.eligibility-general-status.is-review { background: #FFF0D2; color: #875000; }
.eligibility-general-status.is-difficult { background: #FFE0E0; color: #A33A3A; }
.eligibility-general-copy {
  margin: 0;
  padding: 0 11px 10px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.45;
}
.eligibility-general-supply .eligibility-result { margin: 0 10px 10px; }
.eligibility-result {
  overflow: hidden;
  border: 1px solid #C8D5E8;
  border-radius: 9px;
  background: #FFFFFF;
}
.eligibility-result.is-ready { border-color: #9DD6BA; }
.eligibility-result.is-review { border-color: #E9C17C; }
.eligibility-result.is-difficult { border-color: #E6B0B0; }
.eligibility-result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 11px;
  border-bottom: 1px solid #E1E8F3;
}
.eligibility-result.is-ready .eligibility-result-head { background: #F0FBF4; }
.eligibility-result.is-review .eligibility-result-head { background: #FFF8EA; }
.eligibility-result.is-difficult .eligibility-result-head { background: #FFF4F4; }
.eligibility-result.is-not_offered .eligibility-result-head { background: #F3F5F8; }
.eligibility-result-label { color: var(--text); font-size: 14px; font-weight: 800; }
.eligibility-result-status {
  flex: 0 0 auto;
  padding: 3px 7px;
  border-radius: 999px;
  background: #EEF2F7;
  color: #4A5B70;
  font-size: 11.5px;
  font-weight: 800;
}
.eligibility-result.is-ready .eligibility-result-status { background: #DDF5E6; color: #176B4D; }
.eligibility-result.is-review .eligibility-result-status { background: #FFF0D2; color: #875000; }
.eligibility-result.is-difficult .eligibility-result-status { background: #FFE0E0; color: #A33A3A; }
.eligibility-result-copy {
  margin: 0;
  padding: 9px 11px 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.5;
}
.eligibility-item-list {
  display: grid;
  gap: 0;
  margin: 8px 11px 10px;
  padding: 0;
  list-style: none;
  border-top: 1px solid #EDF1F6;
}
.eligibility-item {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 7px;
  padding: 8px 0;
  border-bottom: 1px solid #EDF1F6;
}
.eligibility-item:last-child { border-bottom: 0; }
.eligibility-item-mark {
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border-radius: 999px;
  background: #EFF3F7;
  color: #56677A;
  font-size: 11px;
  font-weight: 850;
}
.eligibility-item.is-pass .eligibility-item-mark { background: #DDF5E6; color: #176B4D; }
.eligibility-item.is-review .eligibility-item-mark { background: #FFF0D2; color: #875000; }
.eligibility-item.is-fail .eligibility-item-mark { background: #FFE0E0; color: #A33A3A; }
.eligibility-item.is-info .eligibility-item-mark { background: #E5EEFF; color: #245B9F; }
.eligibility-item-copy { min-width: 0; }
.eligibility-item-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.eligibility-item-label { color: var(--text); font-size: 12.5px; font-weight: 750; }
.eligibility-item-value { flex: 0 0 auto; color: var(--deep-accent); font-size: 12px; font-weight: 750; text-align: right; }
.eligibility-item.is-review .eligibility-item-value { color: #875000; }
.eligibility-item.is-fail .eligibility-item-value { color: #A33A3A; }
.eligibility-item-note { display: block; margin-top: 2px; color: var(--muted); font-size: 11.5px; line-height: 1.4; word-break: break-word; }
.eligibility-result-source {
  display: inline-block;
  margin: 0 11px 11px;
  color: #245B9F;
  font-size: 11.5px;
  font-weight: 750;
  text-underline-offset: 2px;
}
.eligibility-disclaimer { margin: 10px 0 0; color: #596B82; font-size: 11.5px; line-height: 1.45; }

/* 상세 — (B) 핵심 지표 4개 */
.kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 14px; }
.kpi-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.kpi-card:hover {
  transform: translateY(-3px);
  border-color: rgba(79, 140, 255, 0.65);
  box-shadow: 0 8px 22px rgba(79, 140, 255, 0.20);
}
.kpi-card.kpi-primary {
  background: linear-gradient(120deg, var(--deep-accent) 0%, var(--deep-accent-2) 100%);
  border-color: transparent;
}
.kpi-card.kpi-primary:hover {
  border-color: rgba(79, 140, 255, 0.70);
  box-shadow: 0 10px 26px rgba(13, 43, 92, 0.42);
}
.kpi-label { font-size: 13px; color: var(--muted); }
.kpi-primary .kpi-label { color: var(--deep-sub); }
.kpi-value { font-size: 22px; font-weight: 600; line-height: 1.2; color: var(--text); }
.kpi-primary .kpi-value { color: #fff; }
.kpi-sub { font-size: 13px; color: var(--faint); word-break: keep-all; }
.kpi-primary .kpi-sub { color: var(--deep-sub); }

/* 상세 — (C) 탭 */
.tab-bar { display: flex; gap: 4px; margin-top: 18px; border-bottom: 1px solid var(--border); }
.tab-btn {
  appearance: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px 14px;
  font-size: 16px;
  font-weight: 500;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--deep-accent); border-bottom-color: var(--deep-accent); font-weight: 600; }
.tab-panels { margin-top: 16px; }
.tab-panel[hidden] { display: none; }

.divider { height: 1px; background: var(--border); border: none; margin: 18px 0; }

.section-title {
  margin: 16px 0 8px;
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
}

/* 공고 기초정보 — 2열 그리드 카드(흰 배경, 0.5px 회색 테두리, 모서리 12px) */
.notice-info {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5px;
  background: var(--border);
  border: 0.5px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.notice-info[hidden] { display: none; }
.notice-info .ni-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  padding: 12px 14px;
  background: var(--surface);
}
.notice-info .ni-label {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.3;
}
.notice-info .ni-value {
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.45;
  word-break: break-word;
}
.notice-info .ni-note {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding-top: 7px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 400;
  line-height: 1.45;
  word-break: keep-all;
}
.notice-info .ni-value.ni-status {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  width: fit-content;
  max-width: 100%;
  padding: 4px 10px;
  border: 1px solid var(--accent-border);
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--deep-accent);
  font-size: 15px;
  font-weight: 700;
}
.notice-info .ni-status.is-positive {
  border-color: var(--green-border);
  background: var(--green-soft);
  color: var(--green);
}
.notice-info .ni-status.is-warning {
  border-color: #F3C684;
  background: #FFF8E8;
  color: #8A4B00;
}
.notice-info .ni-status.is-neutral {
  border-color: var(--border);
  background: var(--surface-2);
  color: var(--muted);
}
.notice-info .ni-status.is-pending {
  border-color: #F0B94C;
  background: #FFF9E8;
  color: #7A4300;
}
.notice-supply-summary {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 12px 14px;
  background: var(--surface);
}
.notice-supply-stat {
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid var(--accent-border);
  border-radius: 8px;
  background: var(--accent-soft);
}
.notice-supply-stat span {
  display: block;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
}
.notice-supply-stat strong {
  display: block;
  margin-top: 3px;
  color: var(--deep-accent);
  font-size: 18px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.notice-supply-stat.is-newlywed {
  border-color: var(--green-border);
  background: var(--green-soft);
}
.notice-supply-stat.is-newlywed strong { color: var(--green); }
.notice-supply-stat.is-newborn {
  border-color: #F3C684;
  background: #FFF8E8;
}
.notice-supply-stat.is-newborn strong { color: #8A4B00; }
.notice-supply-note {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.45;
  word-break: keep-all;
}

/* 모집정보에서 분리한 청약 일정 */
.notice-schedule {
  max-width: 880px;
  margin: 0 auto;
}
.notice-schedule-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
  padding: 2px 2px 11px;
  border-bottom: 1px solid var(--border);
}
.notice-schedule-kicker {
  display: block;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}
.notice-schedule-head h3 {
  margin: 1px 0 0;
  color: var(--text);
  font-size: 19px;
  line-height: 1.3;
}
.notice-schedule-status {
  flex: 0 0 auto;
  min-height: 28px;
  padding: 4px 9px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.notice-schedule-status.is-current {
  border-color: var(--green-border);
  background: var(--green-soft);
  color: var(--green);
}
.notice-schedule-status.is-upcoming {
  border-color: var(--accent-border);
  background: var(--accent-soft);
  color: var(--deep-accent);
}
.notice-change-summary-wrap[hidden] { display: none; }
.notice-change-summary {
  margin: 0 0 12px;
  padding: 13px 14px;
  border: 1px solid #F0C26C;
  border-radius: 10px;
  background: #FFF9ED;
  scroll-margin-top: 14px;
}
.notice-change-summary.is-notice_info {
  border-color: #B8CBEA;
  background: #F6F9FF;
}
.notice-change-summary.is-official {
  border-color: #8CB3EA;
  background: #F4F8FF;
}
.notice-change-summary.is-original {
  border-color: #8DBFA4;
  background: #F4FBF6;
}
.notice-change-head {
  display: flex;
  align-items: center;
  gap: 8px;
}
.notice-change-tag {
  flex: 0 0 auto;
  padding: 3px 7px;
  border-radius: 999px;
  background: #FFF0D2;
  color: #875000;
  font-size: 11.5px;
  font-weight: 800;
}
.notice-change-summary.is-notice_info .notice-change-tag {
  background: #DCE9FF;
  color: var(--deep-accent);
}
.notice-change-summary.is-official .notice-change-tag {
  background: #DCE9FF;
  color: var(--deep-accent);
}
.notice-change-summary.is-original .notice-change-tag {
  background: #DDF5E6;
  color: #176B4D;
}
.notice-change-head h4 {
  min-width: 0;
  margin: 0;
  color: var(--text);
  font-size: 15px;
  line-height: 1.35;
}
.notice-change-copy {
  margin: 7px 0 10px;
  color: #586A7C;
  font-size: 12.5px;
  line-height: 1.5;
  word-break: keep-all;
}
.notice-change-list {
  display: grid;
  gap: 5px;
  margin: 0;
}
.notice-change-row {
  display: grid;
  grid-template-columns: minmax(100px, 1.25fr) minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  padding: 8px 9px;
  border: 1px solid rgba(198, 162, 95, .34);
  border-radius: 7px;
  background: rgba(255, 255, 255, .7);
}
.notice-change-summary.is-notice_info .notice-change-row { border-color: rgba(132, 162, 207, .38); }
.notice-change-summary.is-official .notice-change-row { border-color: rgba(132, 162, 207, .38); }
.notice-change-summary.is-original .notice-change-row { border-color: rgba(104, 170, 126, .38); }
.notice-change-row dt,
.notice-change-row dd { min-width: 0; margin: 0; }
.notice-change-row dt {
  color: #566676;
  font-size: 12.5px;
  font-weight: 700;
  overflow-wrap: anywhere;
}
.notice-change-before,
.notice-change-after {
  color: var(--text);
  font-size: 12.5px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.notice-change-before { color: #7B8793; text-decoration: line-through; text-decoration-color: rgba(123, 135, 147, .45); }
.notice-change-after { color: var(--deep-accent); font-weight: 750; }
.notice-change-arrow { color: #9A6A10; font-weight: 800; }
.notice-change-more { margin-top: 7px; }
.notice-change-more > summary {
  width: fit-content;
  cursor: pointer;
  color: var(--deep-accent);
  font-size: 12.5px;
  font-weight: 750;
}
.notice-change-more .notice-change-list { margin-top: 7px; }
.notice-change-basis {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.45;
  word-break: keep-all;
}
.notice-change-source {
  display: inline-block;
  margin-top: 8px;
  color: #176B4D;
  font-size: 12px;
  font-weight: 750;
  text-underline-offset: 2px;
}
.notice-change-source + .notice-change-source { margin-left: 12px; }
.notice-schedule-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.notice-schedule-item {
  position: relative;
  min-width: 0;
  min-height: 100px;
  padding: 12px 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-left: 4px solid var(--faint);
  border-radius: 8px;
  background: var(--surface);
}
.notice-schedule-item.is-upcoming { border-left-color: var(--accent); }
.notice-schedule-item.is-current {
  border-color: var(--green-border);
  border-left-color: var(--green);
  background: var(--green-soft);
}
.notice-schedule-item-top {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  margin-bottom: 7px;
}
.notice-schedule-phase {
  flex: 0 0 auto;
  padding: 2px 6px;
  border-radius: 5px;
  background: var(--surface-2);
  color: var(--deep-accent);
  font-size: 12px;
  font-weight: 700;
}
.notice-schedule-item.is-current .notice-schedule-phase {
  background: var(--surface);
  color: var(--green);
}
.notice-schedule-label {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.notice-schedule-value {
  display: block;
  color: var(--text);
  font-size: 17px;
  line-height: 1.4;
  word-break: keep-all;
}
.notice-schedule-item-note {
  display: block;
  margin-top: 7px;
  padding-top: 7px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.45;
  word-break: keep-all;
}
.notice-schedule-note {
  margin: 10px 2px 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.5;
}
.notice-schedule-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 22px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}
.fx-enter .notice-schedule-item {
  animation: uiListSettle .55s var(--motion-ease-out) both;
}
.fx-enter .notice-schedule-item:nth-child(2) { animation-delay: 45ms; }
.fx-enter .notice-schedule-item:nth-child(3) { animation-delay: 90ms; }
.fx-enter .notice-schedule-item:nth-child(4) { animation-delay: 135ms; }
.fx-enter .notice-schedule-item:nth-child(5) { animation-delay: 180ms; }
.fx-enter .notice-schedule-item:nth-child(n + 6) { animation-delay: 225ms; }

@media (max-width: 600px) {
  .notice-schedule-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }
  .notice-schedule-item { min-height: 92px; padding: 10px 9px; }
  .notice-schedule-item-top { align-items: flex-start; gap: 5px; }
  .notice-schedule-phase { padding-inline: 5px; font-size: 11.5px; }
  .notice-schedule-label {
    overflow: visible;
    font-size: 12px;
    line-height: 1.3;
    text-overflow: clip;
    white-space: normal;
    word-break: keep-all;
  }
  .notice-schedule-value { font-size: 14.5px; line-height: 1.4; overflow-wrap: anywhere; }
  .notice-schedule-item-note { font-size: 11.5px; line-height: 1.4; }
  .notice-supply-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 10px; gap: 6px; }
  .notice-supply-stat { padding: 9px; }
  .notice-supply-stat strong { font-size: 16px; }
  .notice-data-trust > summary { align-items: flex-start; gap: 7px; padding: 9px 10px; }
  .notice-data-trust-status { margin-top: 1px; }
  .notice-data-trust-summary { font-size: 12.5px; word-break: break-word; }
  .notice-data-trust-body { padding-inline: 10px; }
  .notice-change-summary { padding: 11px 10px; }
  .notice-change-row {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 5px;
    padding: 8px;
  }
  .notice-change-row dt { grid-column: 1 / -1; }
  .notice-change-before,
  .notice-change-after { font-size: 12px; }
}
@media (max-width: 560px) {
  .notice-info .ni-row { padding: 10px 11px; } /* 폰 폭에서도 2열 유지, 셀 여백만 살짝 축소 */
}
@media (max-width: 360px) {
  .notice-info { grid-template-columns: 1fr; } /* 아주 좁은 화면에서만 1열 */
}

/* 표 */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; }
table {
  border-collapse: collapse;
  width: auto;
  font-size: 16px;
}
th, td {
  padding: 9px 13px;
  border-bottom: 1px solid var(--border);
  text-align: center;
  white-space: nowrap;
}
tbody tr:last-child td { border-bottom: none; }
thead th {
  background: var(--surface-2);
  color: var(--muted);
  font-weight: 500;
  position: sticky;
  top: 0;
}
th.col-name, td.col-name { text-align: left; }
th.highlight { color: var(--accent); }

.table-wrap.focus-only .type-other { display: none; }

/* 경쟁률 탭의 특별공급 표만 가로 폭 축소: 박스를 내용 폭에 맞춰 왼쪽 정렬(오른쪽 여백), 셀 가로 패딩 축소로 오밀조밀.
   내용이 카드보다 넓으면 max-width:100% 로 가로 스크롤(헤더-데이터 열 정렬은 표 구조상 유지). */
#special-table .table-wrap { width: fit-content; max-width: 100%; }
#special-table th, #special-table td { padding: 8px 10px; }
/* 경쟁률 탭 표(주택형별) 행 hover — 옅은 블루 */
#special-table tbody tr, #general-table tbody tr { transition: background .15s ease; }
#special-table tbody tr:hover, #general-table tbody tr:hover { background: rgba(79, 140, 255, 0.15); }
/* 8개 열이 다 찬 넓은 표가 grid 1fr 열을 밀어 카드를 우측으로 늘리지 않도록(폭은 그대로, 넘치면 표가 카드 안에서 스크롤) */
main > section.card { min-width: 0; overflow-x: hidden; } /* 슬라이드(translateX) 중 가로 넘침을 카드 안에서 클립(페이지 가로 스크롤 방지) */

td.dim { color: var(--faint); }
td.fail { color: var(--muted); }
.cell-rate { font-weight: 500; font-size: 17px; color: var(--text); }
.cell-sub { display: block; font-size: 13px; color: var(--muted); font-weight: 400; }
.cell-prepar { display: block; font-size: 13px; color: var(--accent); margin-top: 1px; }

.toggle-btn {
  margin-top: 12px;
  padding: 9px 15px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--accent);
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
}
.toggle-btn:hover { border-color: var(--accent); }
.toggle-btn.btn-inline { margin-top: 0; margin-bottom: 8px; padding: 7px 13px; font-size: 15px; }
.toggle-btn[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

/* 배지 — 실측=초록, 가정=파랑 */
.badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 10px;
  margin-right: 6px;
  vertical-align: middle;
}
.badge-measured { background: var(--green-soft); color: var(--green); border: 1px solid var(--green-border); }
.badge-assumed { background: var(--accent-soft); color: var(--accent); border: 1px solid var(--accent-border); }

/* 당첨확률 추정 패널 */
#odds-panel { margin-top: 16px; }
.odds-controls { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 14px; }
.odds-ty-label { font-size: 15px; color: var(--text); }
.odds-ty-label select {
  margin-left: 6px; padding: 6px 10px; font-size: 15px;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: 8px;
}
.odds-ty-label select option { background: var(--surface); color: var(--text); }

/* 선택한 공급타입 분양가 강조 박스(드롭다운 바로 아래). 상단 스탯 톤과 일관, 한 곳만 강조 */
.odds-price {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin-top: 10px;
  padding: 10px 14px;
  background: var(--deep-note-bg);
  border: 1px solid var(--accent-border);
  border-radius: 10px;
}
.odds-price[hidden] { display: none; }
.odds-price-label { font-size: 14px; color: var(--muted); }
.odds-price-value { font-size: 22px; font-weight: 700; color: var(--deep-accent); line-height: 1.1; }
.odds-price-note { font-size: 13px; color: var(--faint); }
.slider-row { margin-top: 12px; }
.slider-row label { display: block; font-size: 15px; color: var(--text); margin-bottom: 6px; }
.slider-row output { color: var(--accent); font-weight: 500; }
.slider-row input[type="range"] { width: 100%; accent-color: var(--accent); }
.slider-help { display: block; margin-top: 4px; font-size: 13px; color: var(--muted); }

#odds-result { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 14px; }
.odds-block { flex: 1 1 300px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px; word-break: keep-all; }
.odds-block-title { font-size: 16px; font-weight: 500; color: var(--text); margin-bottom: 10px; }

/* 두 특공 블록 시각 구분: 헤더 accent 색 + 좌측 강조 바(box-shadow inset 라 hover 보더와 충돌 없음).
   신혼부부=딥블루(#0D2B5C), 신생아=부드러운 핑크(#E48AB0). 빨강보다 부드러우며 실측(초록)·가정(파랑) 배지 색과 헷갈리지 않음. */
#odds-result > .odds-block:first-child { box-shadow: inset 4px 0 0 var(--deep-accent); }
#odds-result > .odds-block:first-child .odds-block-title { color: var(--deep-accent); font-weight: 600; }
#odds-result > .odds-block:last-child { box-shadow: inset 4px 0 0 #E48AB0; }
#odds-result > .odds-block:last-child .odds-block-title { color: #E48AB0; font-weight: 600; }
/* 블록이 1개뿐인 경우(드물게) 좌측 바 중복 방지 — 마지막 규칙이 적용돼도 무해 */
.odds-none { color: var(--muted); font-size: 15px; }

/* 신혼 3단계 카드 */
.staged-meta { font-size: 14px; color: var(--muted); margin-bottom: 10px; line-height: 1.7; }
.staged-meta .meta-seg { white-space: nowrap; } /* 구간 내부는 줄바꿈 금지, "·"에서만 끊김 */
.staged-list { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.staged-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.staged-row:last-child { border-bottom: none; }
.staged-row.stage-primary { background: var(--accent-soft); }
.staged-row .stage-body { flex: 1; min-width: 0; }
.staged-row .stage-name { font-size: 15px; font-weight: 500; color: var(--text); }
.staged-row .stage-desc { font-size: 13px; color: var(--muted); margin-top: 1px; }
.staged-row .stage-prob { font-size: 19px; font-weight: 500; color: var(--text); white-space: nowrap; }
.staged-row.stage-primary .stage-prob { color: var(--accent); }

/* 신혼 자녀수별 표 */
.childrank-list { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; margin-top: 4px; }
.childrank-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.childrank-row:last-child { border-bottom: none; }
.childrank-row { transition: background .15s ease; }
.childrank-row:hover { background: rgba(79, 140, 255, 0.16); }
.childrank-row.is-my-child-count { background: #EEF6FF; box-shadow: inset 3px 0 0 var(--accent); }
.childrank-row.is-my-child-count .cr-value { color: #176B4D; }
.childrank-row .cr-body { flex: 1; min-width: 0; }
.childrank-row .cr-name { font-size: 15px; font-weight: 500; color: var(--text); }
.childrank-row .cr-range { font-size: 13px; color: var(--muted); margin-top: 1px; }
.childrank-row .cr-value { font-size: 19px; font-weight: 500; color: var(--deep-accent); white-space: nowrap; }
.cr-my-badge { display: inline-flex; align-items: center; margin-left: 4px; padding: 1px 5px; border-radius: 999px; background: #DCEEFF; color: #175D99; font-size: 11px; font-weight: 700; vertical-align: 1px; }
.cr-hint { margin: 0 0 6px; font-size: 13px; color: var(--accent); }
/* 전체 경쟁률 vs 해당지역(확률 계산 기준) 분리 표시 */
.cr-rates { margin: 4px 0 8px; font-size: 13px; color: var(--muted); line-height: 1.5; }
.cr-rate-line { word-break: keep-all; }
.cr-rate-basis { color: var(--text); font-weight: 500; }
/* 자녀수별 값이 실측이 아니라 '실제 경쟁률 기반 추정'임을 알리는 제목 아래 부제 */
.cr-subtitle { margin: 2px 0 8px; font-size: 13px; color: var(--muted); line-height: 1.5; word-break: keep-all; }
.cr-baseline { margin-top: 8px; font-size: 14px; color: var(--text); }
.cr-baseline-note { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); }
/* 정직성 보강(표시만): 극단·동일·소표본 단서 + 각주 */
.cr-note { display: block; margin-top: 3px; font-size: 12px; color: var(--muted); line-height: 1.5; }
.cr-note .badge { margin-right: 5px; vertical-align: 1px; }
.cr-smallnote { margin: 2px 0 6px; font-size: 13px; color: var(--accent); line-height: 1.5; }
/* N≤2 신생아 '약 OO%'만 크게 강조(경고 문구는 그대로). 잘 안 보이던 확률 수치를 키움 */
.cr-approx-pct { font-size: 22px; font-weight: 700; color: var(--danger); margin-right: 4px; }
/* N≤2 강한 소표본 경고: 범위·경고가 점수치보다 먼저 눈에 들어오게 */
.cr-smallnote-strong { color: var(--danger); font-weight: 600; background: #FDECEC; border: 1px solid #F5B5B5; border-radius: 8px; padding: 8px 10px; }
/* 저경쟁 안내: 경고가 아니라 정보성(자녀수 동일값 오인 방지) */
.cr-lowcomp { margin: 2px 0 6px; font-size: 13px; color: var(--accent); line-height: 1.5; background: #EEF4FF; border: 1px solid #C9DBF7; border-radius: 8px; padding: 8px 10px; }
/* 소표본: 점수치 흐림, 범위 강조 */
.childrank-list.cr-small .cr-value { opacity: .5; font-weight: 400; }
.childrank-list.cr-small .cr-range { color: var(--text); font-weight: 600; }
.cr-foot { margin-top: 8px; font-size: 12px; color: var(--muted); line-height: 1.55; }
.cr-foot span { display: block; }
.odds-foot { margin-top: 8px; font-size: 12px; color: var(--muted); line-height: 1.55; }

/* 시나리오 프리셋 토글 */
.preset-row { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.preset-label { font-size: 15px; color: var(--text); }
.preset-toggle { display: inline-flex; gap: 6px; }
.preset-btn {
  padding: 6px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}
.preset-btn:hover { border-color: var(--accent); }
.preset-btn.active { background: var(--deep-accent); border-color: var(--deep-accent); color: #fff; }
.preset-desc { margin: 8px 0 0; font-size: 13px; color: var(--muted); line-height: 1.6; word-break: keep-all; }
.preset-note { margin: 4px 0 0; font-size: 13px; color: var(--muted); word-break: keep-all; }

/* 당첨확률 안내 박스 */
.odds-guide {
  margin-top: 14px;
  padding: 12px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
}

.staged-final {
  display: flex; align-items: center; gap: 8px;
  margin-top: 12px; padding: 14px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  border-radius: 12px;
}
.staged-final .final-label { flex: 1; }
.staged-final .final-title { font-size: 15px; font-weight: 500; color: var(--text); }
.staged-final .final-sub { font-size: 13px; color: var(--muted); margin-top: 1px; }
.staged-final .final-value { font-size: 26px; font-weight: 500; color: var(--accent); white-space: nowrap; }

/* 신생아 단순 추정(기존 구조 유지) */
.odds-stage { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; padding: 6px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.odds-stage-label { color: var(--muted); flex: 1 0 auto; white-space: nowrap; } /* 라벨 한 덩어리, 폭 부족하면 값이 아래 줄로 */
.odds-stage-value { color: var(--text); font-weight: 500; }
.odds-final { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; padding-top: 10px; }
.odds-final .odds-stage-label { color: var(--text); flex: 1 0 auto; white-space: nowrap; } /* "추정 당첨확률" 한 덩어리 유지 */
.odds-final-value { color: var(--accent); font-weight: 500; font-size: 18px; }
.odds-notes { margin: 12px 0 0; padding-left: 18px; color: var(--muted); font-size: 13px; }
.odds-notes li { margin: 3px 0; }

/* 서울 단지 비교 섹션 */
#compare-section { margin: 24px 0 0; }
.compare-note { color: var(--muted); font-size: 14px; margin: 10px 0; }
.cmp-prob { color: var(--text); font-weight: 500; }
.cmp-prob-sh { color: var(--deep-accent); } /* 신혼 확률 값 딥블루 강조 */
.cmp-price { color: var(--muted); font-size: 13px; }
#compare-table { margin-top: 6px; }
/* 비교표 헤더 딥블루 톤 */
#compare-table thead th { background: var(--deep-note-bg); color: var(--deep-accent-2); }

/* 관련 기사 (왼쪽 단지 목록 아래) */
.news-box { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.news-box[hidden] { display: none; }
.news-list {
  max-height: 116px;
  margin: 0;
  padding: 0 4px 0 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scrollbar-color: #B8C1CF transparent;
  scrollbar-width: thin;
  list-style: none;
}
.news-list:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.news-list::-webkit-scrollbar { width: 8px; }
.news-list::-webkit-scrollbar-thumb { background: #B8C1CF; border: 2px solid var(--surface); border-radius: 8px; }
.news-list li {
  height: 58px;
  min-height: 58px;
  padding: 6px 4px;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
}
.news-list li:last-child { border-bottom: none; }
.news-list a {
  display: -webkit-box;
  overflow: hidden;
  color: var(--accent);
  line-height: 1.3;
  text-decoration: none;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}
.news-list a:hover { text-decoration: underline; }
.news-unit {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  font-size: 12px;
  font-weight: 500;
  color: var(--green);
  background: var(--green-soft);
  border: 1px solid var(--green-border);
  border-radius: 10px;
  vertical-align: middle;
}
.news-special {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  font-size: 12px;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  border-radius: 10px;
  vertical-align: middle;
}
.news-date { display: block; margin-top: 2px; font-size: 13px; color: var(--muted); }
.news-none { color: var(--muted); font-size: 15px; padding: 4px 0; }
.news-note { display: none; margin-top: 8px; font-size: 13px; color: var(--faint); }

.empty-msg { color: var(--muted); padding: 10px 4px; font-size: 16px; }
.placeholder { color: var(--muted); padding: 28px 4px; text-align: center; font-size: 16px; }

/* 랜딩 안내 카드(단지 미선택 시 우측에 표시) */
.landing-guide { text-align: left; padding: 4px 2px; color: var(--text); }
.landing-guide .guide-title { margin: 0; font-size: 20px; font-weight: 600; color: var(--deep-accent); } /* .card h2 보다 우선하도록 스코프 */
/* 첫 화면 우측 상단: 분양 예정 단지 목록(수동 관리 JSON 렌더) */
.upcoming-list { margin-top: 14px; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.upcoming-row {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.upcoming-row:last-child { border-bottom: none; }
.upcoming-row.is-new { background: #FFF7E6; box-shadow: inset 4px 0 0 #F59E0B; }
.upcoming-row .up-body { flex: 1; min-width: 0; }
.upcoming-row .up-name { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; font-size: 16px; font-weight: 600; color: var(--text); }
.upcoming-row .up-new-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 34px; height: 18px; padding: 0 6px;
  border-radius: 5px; background: #D92D20; color: #FFFFFF;
  font-size: 11px; font-weight: 700; line-height: 1; letter-spacing: 0;
  animation: upcomingNewPulse 1.3s ease-in-out infinite;
}
@keyframes upcomingNewPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }
@media (prefers-reduced-motion: reduce) { .upcoming-row .up-new-badge { animation: none; } }
.upcoming-row .up-sub { margin-top: 2px; font-size: 13.5px; color: var(--muted); word-break: keep-all; }
.upcoming-row .up-scale { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.upcoming-row .up-scale-stat {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  min-width: 0;
  padding: 5px 8px;
  border: 1px solid var(--accent-border);
  border-radius: 7px;
  background: var(--accent-soft);
  color: var(--deep-accent);
}
.upcoming-row .up-scale-stat small { color: var(--muted); font-size: 11.5px; font-weight: 600; }
.upcoming-row .up-scale-stat strong { font-size: 14px; line-height: 1.25; overflow-wrap: anywhere; }
.upcoming-row .up-scale-stat.is-sale { border-color: var(--green-border); background: var(--green-soft); color: var(--green); }
.upcoming-row .up-price { margin-top: 3px; font-size: 13.5px; color: var(--text); font-weight: 600; word-break: keep-all; }
.upcoming-row .up-price-current { margin-top: 2px; font-size: 12.5px; color: var(--muted); word-break: keep-all; }
.upcoming-row .up-evidence { margin-top: 4px; font-size: 12.5px; color: var(--muted); }
.upcoming-row .up-evidence summary { width: fit-content; cursor: pointer; color: var(--deep-accent); }
.upcoming-row .up-evidence-scenario { margin-top: 5px; color: var(--deep-accent); line-height: 1.5; word-break: keep-all; }
.upcoming-row .up-evidence-text { margin-top: 5px; line-height: 1.5; word-break: keep-all; }
.upcoming-row .up-household-evidence { margin-top: 6px; }
.upcoming-row .up-source-links { display: flex; flex-wrap: wrap; gap: 5px 10px; margin-top: 4px; }
.upcoming-row .up-source-links a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.upcoming-row .up-when {
  flex-shrink: 0; padding: 4px 10px; border-radius: 999px;
  background: var(--accent-soft); border: 1px solid var(--accent-border);
  color: var(--accent); font-size: 13px; font-weight: 600; white-space: nowrap;
}
/* 사용설명은 예정 목록 아래로 — 구분선으로 분리 */
.landing-howto { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--border); }
.guide-sub { margin: 6px 0 0; font-size: 15px; color: var(--muted); }
.guide-steps { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.guide-steps li { display: flex; align-items: flex-start; gap: 12px; }
.guide-num {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: linear-gradient(120deg, var(--deep-accent) 0%, var(--deep-accent-2) 100%);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
}
.guide-step-body { min-width: 0; }
.guide-step-title { font-size: 16px; font-weight: 600; color: var(--text); }
.guide-step-desc { font-size: 14px; color: var(--muted); margin-top: 1px; }
.guide-note {
  margin-top: 18px;
  padding: 12px 14px;
  background: var(--deep-note-bg);
  border-left: 3px solid var(--deep-accent);
  border-radius: 8px;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
}

/* 모바일에서 헤더가 안 깨지게 패딩·제목만 살짝 축소(좌우 2단은 main 의 820px 쿼리로 세로 적층) */
@media (max-width: 560px) {
  .page { padding: 0 16px; } /* 모바일 좌우 여백 16px */
  header.app-header { margin: 16px 0 0; padding: 24px 20px; }
  header.app-header h1 { font-size: 23px; }
  .hero-house { width: 85.41px; height: 67.86px; right: 16px; opacity: 0.85; } /* 직전 모바일 크기에서 정확히 10% 축소 */
  .hero-content { padding-right: 115.2px; } /* 모바일 집 크기 축소에 맞춘 텍스트 여백 */
  #compare-section { margin: 16px 0 0; } /* 모바일 세로 리듬 16px 통일 */
  main { padding: 16px 0; gap: 16px; }
  .kpi-row { grid-template-columns: 1fr 1fr; } /* 4지표 2×2 */
  .kpi-value { font-size: 20px; }
}
[hidden] { display: none; }

/* 아주 좁은 화면에선 텍스트 가독성 우선 — 집 숨김 */
@media (max-width: 360px) {
  .hero-house { display: none; }
  .hero-content { padding-right: 0; } /* 집 숨김 시 텍스트가 전체 폭 사용 */
  .region-btn { padding-inline: 2px; font-size: 13.5px; }
}

/* ── hover 강조 전면 확대(딥블루 톤). 기존 규칙 뒤에 와서 보강. 클릭=또렷+떠오름, 정보=은은한 색만 ── */
.btn-light, .tab-btn, .toggle-btn, .preset-btn, .region-btn,
.odds-ty-label select, .news-list li, .news-list a,
#compare-table tbody tr, #compare-table tbody a,
.notice-info .ni-row, .odds-block,
.odds-guide, .compare-note, .guide-note, .preset-note {
  transition: transform .16s ease, border-color .16s ease, background-color .16s ease, color .16s ease, box-shadow .16s ease;
}
/* 1. 탭 버튼 */
.tab-btn:hover { color: var(--deep-accent); background: rgba(79, 140, 255, 0.10); border-radius: 6px 6px 0 0; }
/* 2. 헤더 버튼(딥블루 배경 위) — 밝아짐 + 블루 테두리 + 살짝 떠오름 */
.btn-light:hover { background: rgba(255, 255, 255, 0.24); border-color: rgba(79, 140, 255, 0.70); transform: translateY(-1px); }
/* 3. 시나리오 토글(선택 제외) */
.preset-btn:hover:not(.active) { border-color: rgba(79, 140, 255, 0.60); background: rgba(79, 140, 255, 0.12); }
/* 4. 주택형 드롭다운 */
.odds-ty-label select:hover { border-color: rgba(79, 140, 255, 0.60); }
/* 5. 지역 토글(선택 제외) */
.region-btn:hover:not(.active) { border-color: rgba(79, 140, 255, 0.60); background: rgba(79, 140, 255, 0.10); }
/* 토글 버튼(일반공급 보기 등) */
.toggle-btn:hover { border-color: rgba(79, 140, 255, 0.60); background: rgba(79, 140, 255, 0.10); }
/* 6. 관련 기사 항목 */
.news-list li:hover { background: rgba(79, 140, 255, 0.10); border-radius: 8px; }
.news-list li:hover a { color: var(--deep-accent); }
/* 7. 비교표 각 행 */
#compare-table tbody tr:hover { background: rgba(79, 140, 255, 0.12); }
/* 8. 비교표 "보기" 링크 */
#compare-table tbody a:hover { color: var(--deep-accent); text-decoration: underline; }
/* 9·12. 카드형(신생아/자녀수 블록) — 테두리 + 아주 옅은 배경 */
.odds-block { transition: border-color .16s ease, background-color .16s ease; }
.odds-block:hover { border-color: rgba(79, 140, 255, 0.55); background: rgba(79, 140, 255, 0.04); }
/* 신생아 특공 카드 내부 행(실측/가정 항목·추정확률) hover — 자녀수표 행과 톤 일관 */
.odds-stage, .odds-final { transition: background-color .16s ease; border-radius: 6px; }
.odds-stage:hover, .odds-final:hover { background: rgba(79, 140, 255, 0.08); }
/* 10. 모집정보 항목 행 */
.notice-info .ni-row:hover { background: rgba(79, 140, 255, 0.08); }
/* 11. 안내 문구 박스 — 아주 옅게 */
.odds-guide:hover, .compare-note:hover, .guide-note:hover, .preset-note:hover { background: rgba(79, 140, 255, 0.06); border-radius: 8px; }

/* 모션 최소화 선호 시: 슬라이드·떠오름·글로우 끄고 색 강조만 유지 */
/* 예측 블록(접수 전 서울 민영 APT 전용) — 실측과 시각적으로 구분되는 카드 */
.predict-block[hidden] { display: none; }
.predict-card {
  border: 1px solid var(--accent-border);
  background: linear-gradient(180deg, var(--accent-soft) 0%, var(--surface) 60%);
  border-radius: 12px;
  padding: 14px 16px;
}
.predict-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.predict-badge { font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 10px; background: var(--deep-accent); color: #fff; }
.predict-basis { font-size: 13px; color: var(--muted); word-break: keep-all; }
.badge-lowconf { font-size: 12px; padding: 2px 8px; border-radius: 10px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }
/* 저신뢰 사유 블록(숫자 위에 눈에 띄게) */
.badge-lowconf-strong { background: #FDECEC; color: var(--danger); border-color: #F5B5B5; font-weight: 600; }
.predict-lowconf { margin: 8px 0 6px; padding: 8px 10px; background: #FDECEC; border: 1px solid #F5B5B5; border-radius: 8px; }
.predict-lowconf-list { margin: 6px 0 0; padding-left: 18px; font-size: 13px; color: var(--danger); line-height: 1.55; word-break: keep-all; }
.predict-lowconf-list li { margin: 2px 0; }
.predict-section-title { font-size: 14px; font-weight: 600; color: var(--text); margin: 12px 0 2px; }
.predict-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 7px 0; border-top: 1px solid var(--border); font-size: 15px; }
.predict-row .pr-label { color: var(--text); word-break: keep-all; }
.predict-row .pr-range { color: var(--deep-accent); font-weight: 600; white-space: nowrap; }
.predict-row .pr-range.predict-muted { color: var(--faint); font-weight: 500; }
.predict-conf { margin-top: 10px; font-size: 13px; color: var(--muted); line-height: 1.6; word-break: keep-all; }
/* 예측 탭 컨트롤(공급타입 선택 + 시나리오 토글) — 실제 탭과 동일 생김새, 상태는 예측 전용 */
.predict-controls { margin: 10px 0 4px; }
.predict-controls .preset-row { margin-top: 10px; }
.pred-scen-btn {
  padding: 6px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}
.pred-scen-btn:hover { border-color: var(--accent); }
.pred-scen-btn.active { background: var(--deep-accent); border-color: var(--deep-accent); color: #fff; }
.predict-note { display: flex; align-items: baseline; gap: 8px; font-size: 14px; color: var(--muted); padding: 12px 14px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; line-height: 1.6; word-break: keep-all; }

/* 블록 등장(fade + 살짝 위로 슬라이드). 예측/해당 블록에 한정. */
@keyframes fxEnter {
  from { opacity: 0; filter: blur(3px); transform: translateY(12px) scale(.994); }
  to { opacity: 1; filter: blur(0); transform: translateY(0) scale(1); }
}
.fx-enter { animation: fxEnter .56s var(--motion-ease-out) both; }

@media (prefers-reduced-motion: reduce) {
  .detail-animate { animation: none; }
  .fx-enter { animation: none; }
  .complex-card:hover, .kpi-card:hover, .kpi-card.kpi-primary:hover, .btn-light:hover { transform: none; box-shadow: none; }
}

/* 모집정보 상단 공급위치 지도 */
.complex-location {
  min-width: 0;
  scroll-margin-top: 16px;
}
.complex-location-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 2px 0 14px;
}
.complex-location-copy { min-width: 0; }
.complex-location-copy h3 {
  margin: 0;
  color: var(--text);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 0;
}
.complex-location-copy p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
  word-break: keep-all;
}
.complex-map-basis {
  display: inline-block;
  margin-top: 5px;
  color: var(--deep-accent);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
}
.complex-map-basis[data-source="name"] { color: #9A6700; }
.complex-location-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}
.complex-location-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 9px 13px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.25;
  text-decoration: none;
  white-space: nowrap;
}
.complex-location-action:hover { border-color: var(--accent); background: var(--accent-soft); }
.complex-location-action.primary { border-color: var(--deep-accent); background: var(--deep-accent); color: #fff; }
.complex-location-action.primary:hover { background: var(--deep-accent-2); }
.complex-location-action[hidden] { display: none; }
.complex-map-frame {
  position: relative;
  width: 100%;
  height: 320px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
}
.complex-map-canvas {
  width: 100%;
  height: 100%;
  opacity: .45;
  transform: scale(1.012);
  transition: opacity .62s var(--motion-ease-standard), transform .9s var(--motion-ease-out);
}
.complex-map-canvas.map-ready { opacity: 1; transform: scale(1); }
.complex-map-status {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
  text-align: center;
  word-break: keep-all;
}
.complex-map-status[data-state="loading"]::after {
  content: "";
  position: absolute;
  bottom: calc(50% - 30px);
  left: 50%;
  width: 72px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  transform: translateX(-50%) scaleX(.2);
  animation: uiLoadingLine 1.45s var(--motion-ease-standard) infinite;
}
.complex-map-status[data-state="error"] { color: var(--danger); }
.complex-map-status[hidden] { display: none; }
.complex-location-note {
  margin: 10px 0 0;
  color: var(--faint);
  font-size: 14px;
  line-height: 1.55;
  word-break: keep-all;
}

@media (max-width: 560px) {
  .complex-location-head { flex-direction: column; gap: 12px; }
  .complex-location-actions { width: 100%; }
  .complex-location-action { flex: 1 1 0; padding-inline: 8px; }
  .complex-map-frame { height: 240px; }
}

/* 분양금 납부 시뮬레이터 */
.tab-bar {
  overflow-x: auto;
  scrollbar-width: thin;
}
.tab-btn { flex: 0 0 auto; white-space: nowrap; }
.payment-simulator { min-width: 0; }
.payment-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 4px 0 14px;
  border-bottom: 1px solid var(--border);
}
.payment-toolbar h3,
.payment-result-head h3,
.payment-result-section > h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0;
}
.payment-toolbar p,
.payment-result-head p {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.55;
}
.payment-reset {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 7px 11px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--deep-accent);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.payment-reset:hover { border-color: var(--accent); background: var(--accent-soft); }
.payment-form-section {
  min-width: 0;
  margin: 0;
  padding: 18px 0;
  border: 0;
  border-bottom: 1px solid var(--border);
}
.payment-form-section legend {
  width: 100%;
  padding: 0 0 10px;
  font-size: 15px;
  font-weight: 600;
  color: var(--deep-accent);
  letter-spacing: 0;
}
.payment-field-grid,
.payment-subfields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.payment-field,
.payment-check {
  min-width: 0;
  font-size: 14px;
  color: var(--text);
}
.payment-field { display: flex; flex-direction: column; gap: 5px; }
.payment-field > span:first-child { font-weight: 500; }
.payment-field small,
.payment-check small {
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
  word-break: keep-all;
}
.payment-field input,
.payment-field select {
  width: 100%;
  min-width: 0;
  height: 38px;
  padding: 7px 9px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 15px;
}
.payment-field input:focus,
.payment-field select:focus {
  outline: 2px solid rgba(37, 99, 235, 0.18);
  border-color: var(--accent);
}
.payment-input-unit {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  overflow: hidden;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}
.payment-money-unit { grid-template-columns: minmax(64px, 1fr) auto auto; }
.payment-input-unit:focus-within { outline: 2px solid rgba(37, 99, 235, 0.18); border-color: var(--accent); }
.payment-input-unit input {
  height: 36px;
  border: 0;
  border-radius: 0;
  outline: 0;
}
.payment-input-unit input:focus { outline: 0; border: 0; }
.payment-input-unit b {
  padding: 0 9px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}
.payment-eok-preview {
  min-width: 50px;
  padding: 0 8px;
  border-left: 1px solid var(--border);
  color: var(--deep-accent);
  font-size: 12px;
  font-style: normal;
  font-weight: 600;
  text-align: right;
  white-space: nowrap;
}
.payment-field input[readonly] { background: var(--surface-2); color: var(--deep-accent); font-weight: 600; }
.payment-field-wide { grid-column: 1 / -1; }
.payment-bond-calculation {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--border);
  gap: 1px;
}
.payment-bond-calculation.is-empty {
  display: block;
  padding: 11px 12px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 13px;
}
.payment-bond-step {
  min-width: 0;
  padding: 11px 12px;
  background: var(--surface-2);
}
.payment-bond-step span,
.payment-bond-step small { display: block; color: var(--muted); }
.payment-bond-step span { font-size: 12px; }
.payment-bond-step strong {
  display: block;
  margin-top: 3px;
  color: var(--deep-accent);
  font-size: 17px;
  line-height: 1.3;
}
.payment-bond-step small { margin-top: 4px; font-size: 12px; line-height: 1.45; }
.payment-subfields {
  padding: 12px;
  border-left: 3px solid var(--accent-border);
  background: var(--surface-2);
}
.payment-subfields[hidden] { display: none; }
.payment-segment {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(96px, 1fr));
  align-self: flex-start;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}
.payment-segment label { position: relative; cursor: pointer; }
.payment-segment label + label { border-left: 1px solid var(--border); }
.payment-segment input { position: absolute; opacity: 0; pointer-events: none; }
.payment-segment span {
  display: block;
  min-height: 36px;
  padding: 8px 14px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  text-align: center;
}
.payment-segment input:checked + span { background: var(--deep-accent); color: #fff; }
.payment-segment input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: -2px; }
.payment-check {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding-top: 21px;
  cursor: pointer;
}
.payment-check input { width: 17px; height: 17px; accent-color: var(--deep-accent); }
.payment-errors {
  margin-top: 16px;
  padding: 12px 14px;
  border: 1px solid #F5B5B5;
  border-radius: 8px;
  background: #FDECEC;
  color: var(--danger);
  font-size: 14px;
}
.payment-errors ul { margin: 5px 0 0; padding-left: 18px; }
.payment-results { margin-top: 18px; }
.payment-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.payment-summary-card {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}
.payment-summary-card.is-safe { border-top: 3px solid var(--green); }
.payment-summary-card.is-warning { border-top: 3px solid #D97706; }
.payment-summary-card.is-danger { border-top: 3px solid var(--danger); }
.payment-summary-label,
.payment-summary-note { display: block; color: var(--muted); }
.payment-summary-label { font-size: 12px; }
.payment-summary-value {
  display: block;
  margin-top: 4px;
  color: var(--text);
  font-size: 18px;
  line-height: 1.25;
  word-break: keep-all;
}
.payment-summary-card.is-danger .payment-summary-value { color: var(--danger); }
.payment-summary-card.is-safe .payment-summary-value { color: var(--green); }
.payment-summary-note { margin-top: 5px; font-size: 11.5px; line-height: 1.4; word-break: keep-all; }
.payment-funding-answer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 10px;
  padding: 14px;
  border-left: 4px solid var(--deep-accent);
  background: var(--deep-note-bg);
}
.payment-answer-label { display: block; font-size: 13px; color: var(--muted); }
.payment-answer-value { display: block; margin-top: 2px; font-size: 22px; color: var(--deep-accent); }
.payment-funding-answer p { margin: 4px 0 0; font-size: 12px; color: var(--muted); }
.payment-bridge-warning {
  flex: 0 1 260px;
  padding: 8px 10px;
  border: 1px solid #F3C684;
  border-radius: 8px;
  background: #FFF8E8;
  color: #9A5B08;
  font-size: 13px;
  font-weight: 600;
  word-break: keep-all;
}
.payment-result-section { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border); }
.payment-result-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 9px; }
.payment-table-wrap { max-width: 100%; overflow-x: auto; border: 1px solid var(--border); }
.payment-table { width: 100%; min-width: 0; font-size: 13px; }
.payment-table th,
.payment-table td { padding: 7px 4px; }
.payment-table th { font-size: 12px; }
.payment-table td small { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; line-height: 1.35; }
.payment-table .payment-label-cell { text-align: left; }
.payment-schedule-table { table-layout: fixed; }
.payment-schedule-table th,
.payment-schedule-table td { white-space: normal; word-break: keep-all; }
.payment-schedule-table th:first-child,
.payment-schedule-table td:first-child { white-space: nowrap; }
.payment-col-date { width: 12%; }
.payment-col-label { width: 21%; }
.payment-col-due { width: 15%; }
.payment-col-loan { width: 12%; }
.payment-col-interest { width: 10%; }
.payment-col-inflow { width: 14%; }
.payment-col-balance { width: 16%; }
.payment-table tr.is-historical { background: var(--surface-2); color: var(--muted); }
.payment-table tr.is-shortage { background: #FFF7F7; }
.payment-balance-short { color: var(--danger); font-weight: 600; }
.payment-balance-ok { color: var(--green); font-weight: 600; }
.payment-stress-table { min-width: 520px; }
.payment-risk-list {
  margin: 10px 0 0;
  padding: 12px 14px 12px 32px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}
.payment-risk-list li + li { margin-top: 4px; }
.payment-disclaimer {
  margin: 14px 0 0;
  color: var(--faint);
  font-size: 12px;
  line-height: 1.55;
  word-break: keep-all;
}
.payment-disclaimer-details {
  margin-top: 8px;
  color: var(--faint);
  font-size: 12px;
  line-height: 1.55;
}
.payment-disclaimer-details summary {
  width: fit-content;
  cursor: pointer;
  color: var(--muted);
  font-weight: 700;
}
.payment-disclaimer-details p {
  margin: 8px 0 0;
  word-break: keep-all;
}

@media (max-width: 820px) {
  .payment-field-grid,
  .payment-subfields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .payment-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .tab-bar { margin-right: -4px; padding-bottom: 2px; }
  .tab-btn { padding: 10px 11px; font-size: 15px; }
  .payment-toolbar { align-items: stretch; flex-direction: column; }
  .payment-reset { align-self: flex-start; }
  .payment-field-grid,
  .payment-subfields { grid-template-columns: 1fr; }
  .payment-bond-calculation { grid-template-columns: 1fr; }
  .payment-field-wide { grid-column: auto; }
  .payment-subfields.payment-field-wide { grid-column: 1 / -1; }
  .payment-check { padding-top: 4px; }
  .payment-summary-value { font-size: 17px; }
  .payment-funding-answer { align-items: stretch; flex-direction: column; }
  .payment-bridge-warning { flex-basis: auto; }
  .payment-schedule-table { min-width: 650px; }
}

/* 앱형 작업 화면 */
.page {
  width: 100%;
  max-width: 1152px;
  padding: 0 20px;
}

header.app-header {
  min-height: 68px;
  margin: 12px 0 0;
  padding: 11px 18px;
  overflow: visible;
  border: 1px solid var(--deep-2);
  border-radius: 8px;
  background: linear-gradient(120deg, var(--deep-1) 0%, var(--deep-2) 100%);
  box-shadow: 0 1px 2px rgba(10, 26, 58, 0.12);
}
header.app-header .hero-content { padding: 0 0 0 58px; }
header.app-header .hero-label {
  color: var(--deep-label);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
}
header.app-header h1 {
  margin: 1px 0 0;
  font-size: 21px;
  line-height: 1.25;
}
header.app-header p { display: none; }
.hero-house {
  top: 50%;
  right: auto;
  left: 17px;
  width: 42px;
  height: 34px;
  opacity: 1;
}

#compare-section { margin: 8px 0 0; }
#compare-section > .toggle-btn {
  min-height: 38px;
  margin: 0;
  padding: 7px 12px;
  border-radius: 6px;
  background: var(--surface);
  color: var(--deep-accent);
  font-size: 15px;
}

main {
  height: calc(100dvh - 134px);
  min-height: 600px;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 12px;
  padding: 12px 0 16px;
  align-items: stretch;
}
main > section.card {
  min-height: 0;
  height: 100%;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(10, 26, 58, 0.06);
}
.list-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
}
.list-controls { padding: 14px 14px 8px; }
.search-box { margin-bottom: 8px; }
#search {
  height: 44px;
  border-radius: 7px;
  background: var(--surface-2);
}
.region-toggle { gap: 5px; margin-bottom: 10px; }
.region-btn {
  min-height: 38px;
  border-radius: 6px;
  font-size: 14px;
}
.list-summary { margin: 0; padding-top: 1px; }
#complex-list {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  gap: 2px;
  padding: 0 8px 12px;
  scrollbar-width: thin;
}
.complex-card {
  gap: 9px;
  padding: 11px 10px;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 6px;
  background: transparent;
  transition: background-color .14s ease, box-shadow .14s ease;
}
.complex-card:hover {
  transform: none;
  border-color: var(--border);
  background: var(--surface-2);
  box-shadow: none;
}
.complex-card.selected {
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
}
.complex-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
.complex-card .card-name { font-size: 16px; font-weight: 600; }
.news-box {
  flex: 0 0 auto;
  max-height: 190px;
  margin: 0;
  padding: 10px 14px 12px;
  overflow-y: auto;
  background: var(--surface-2);
  border-top: 1px solid var(--border);
}

.detail-card {
  overflow-y: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: var(--surface);
  scrollbar-width: thin;
}
.detail-card > #placeholder { padding: 20px 22px 28px; }
#detail { min-width: 0; padding: 16px 18px 28px; }
.detail-hero {
  padding: 18px;
  border: 1px solid var(--deep-2);
  border-radius: 8px;
  background: linear-gradient(120deg, var(--deep-1) 0%, var(--deep-2) 100%);
}
.detail-hero h2 { font-size: 23px; }
.restriction-chip { background: rgba(255, 255, 255, 0.08); }
.btn-light { border-radius: 6px; }
.kpi-row { gap: 8px; margin-top: 12px; }
.kpi-card {
  min-height: 98px;
  padding: 12px;
  border-radius: 8px;
  transition: border-color .14s ease, background-color .14s ease;
}
.kpi-card:hover,
.kpi-card.kpi-primary:hover {
  transform: none;
  border-color: var(--accent-border);
  box-shadow: none;
}
.kpi-card.kpi-primary {
  border-color: var(--deep-accent);
  background: var(--deep-accent);
}
.tab-bar {
  position: sticky;
  top: -16px;
  z-index: 20;
  gap: 6px;
  margin-top: 16px;
  padding: 7px;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
  box-shadow: 0 2px 8px rgba(10, 26, 58, 0.08);
}
.tab-btn {
  flex: 1 0 auto;
  min-height: 46px;
  margin: 0;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(10, 26, 58, 0.06);
}
.tab-label-mobile { display: none; }
.tab-panels { margin-top: 16px; }
.tab-panel { scroll-margin-top: 58px; }
.notice-info,
.table-wrap,
.upcoming-list,
.odds-block,
.predict-card,
.payment-summary-card { border-radius: 8px; }
.landing-guide .guide-title { color: var(--text); }
.upcoming-row { padding: 10px 12px; }
.mobile-detail-bar { display: none; }

@media (max-width: 820px) {
  html { background: var(--surface); }
  body { min-width: 0; background: var(--surface); }
  .page { max-width: none; padding: 0; }
  header.app-header {
    position: sticky;
    top: 0;
    z-index: 40;
    min-height: 62px;
    margin: 0;
    padding: 10px 14px;
    border-width: 0 0 1px;
    border-radius: 0;
  }
  header.app-header .hero-content { padding-left: 48px; padding-right: 0; }
  header.app-header .hero-label { font-size: 11px; }
  header.app-header h1 { font-size: 19px; }
  .hero-house {
    left: 13px;
    right: auto;
    width: 34px;
    height: 28px;
  }
  #compare-section { margin: 8px 12px 0; }
  #compare-section > .toggle-btn { width: 100%; text-align: left; }
  main {
    display: block;
    height: auto;
    min-height: 0;
    padding: 8px 0 0;
  }
  main > section.card { height: auto; min-height: 0; box-shadow: none; }
  .list-card {
    min-height: calc(100vh - 116px);
    min-height: calc(100dvh - 116px);
    overflow: visible;
    border: 0;
    border-radius: 0;
  }
  .list-controls { padding: 12px 12px 8px; }
  #complex-list {
    display: flex;
    max-height: none;
    overflow: visible;
    padding: 0 8px 18px;
  }
  .complex-card { min-height: 70px; padding: 12px 10px; }
  .complex-card:hover { background: transparent; }
  .complex-card.selected { background: var(--accent-soft); }
  .detail-card { display: none; }
  body.mobile-detail-open header.app-header,
  body.mobile-detail-open #compare-section,
  body.mobile-detail-open .list-card { display: none; }
  body.mobile-detail-open main { padding: 0; }
  body.mobile-detail-open .detail-card {
    display: block;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: visible;
  }
  #detail { padding: 0 14px 28px; }
  .mobile-detail-bar {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 58px;
    margin: 0 -14px;
    padding: 8px 12px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
  }
  .mobile-detail-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--surface);
    color: var(--text);
    font: inherit;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
  }
  .mobile-detail-icon:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
  .mobile-detail-heading { min-width: 0; }
  .mobile-detail-heading span { display: block; color: var(--muted); font-size: 12px; }
  .mobile-detail-heading strong {
    display: block;
    overflow: hidden;
    color: var(--text);
    font-size: 16px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .detail-hero { margin-top: 10px; padding: 14px; }
  .detail-eyebrow {
    flex-wrap: nowrap;
    margin-bottom: 6px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .detail-eyebrow > * { flex: 0 0 auto; }
  .detail-hero h2 { font-size: 21px; }
  .detail-hero .sub { font-size: 15px; }
  .detail-restrictions {
    flex-wrap: nowrap;
    margin-top: 8px;
    padding-bottom: 2px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .restriction-chip { flex: 0 0 auto; }
  .detail-actions {
    flex-wrap: nowrap;
    margin-top: 10px;
    padding-bottom: 2px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .btn-light { flex: 0 0 auto; min-height: 40px; padding: 8px 11px; font-size: 14px; }

  .complex-location { display: flex; flex-direction: column; }
  .complex-map-frame { order: 1; height: 180px; border-radius: 8px; }
  .complex-location-head { order: 2; padding: 8px 0 0; }
  .complex-location-copy,
  .complex-location-note { display: none; }
  .complex-location-actions { width: 100%; }
  .complex-location-action { min-height: 40px; border-radius: 6px; }

  .kpi-row {
    display: flex;
    gap: 7px;
    margin-top: 10px;
    padding-bottom: 4px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }
  .kpi-card {
    flex: 0 0 145px;
    min-height: 84px;
    padding: 10px 11px;
    scroll-snap-align: start;
  }
  .kpi-value { font-size: 20px; }

  .tab-btn:hover { border-radius: 6px; background: var(--surface-2); }
  .tab-label-full { display: none; }
  .tab-label-mobile { display: inline; }
  .tab-panels { margin-top: 12px; }
  .tab-panel { scroll-margin-top: 180px; }
  .notice-info { margin-top: 10px; }
}

@media (max-width: 360px) {
  header.app-header .hero-content { padding-left: 44px; }
  .hero-house { display: block; width: 31px; height: 25px; }
  .region-btn { font-size: 13.5px; }
  .kpi-card { flex-basis: 136px; }
}

/* ETF-Money-Flow의 짧은 진입·상승·눌림 패턴을 현재 색상 체계로 적용한다. */
@keyframes uiListSettle {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes uiTableShellIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes uiTableHeadIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes uiTableRowIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes uiTableEdgeScan {
  0% { opacity: 0; transform: scaleX(0); }
  30% { opacity: 1; }
  100% { opacity: 0; transform: scaleX(1); }
}
@keyframes uiContentItemIn {
  from { opacity: 0; filter: blur(2px); transform: translateY(7px); }
  to { opacity: 1; filter: blur(0); transform: translateY(0); }
}
@keyframes uiContentReadyIn {
  from { opacity: 0; filter: blur(3px); transform: translateY(9px) scale(.996); }
  to { opacity: 1; filter: blur(0); transform: translateY(0) scale(1); }
}
@keyframes uiValueUpdate {
  0% { opacity: .35; filter: blur(2px); transform: translateY(4px); }
  100% { opacity: 1; filter: blur(0); transform: translateY(0); }
}
@keyframes uiControlSettle {
  0% { transform: scale(.985); }
  58% { transform: scale(1.006); }
  100% { transform: scale(1); }
}
@keyframes uiLoadingLine {
  0%, 100% { opacity: .35; transform: translateX(-50%) scaleX(.2); }
  50% { opacity: 1; transform: translateX(-50%) scaleX(1); }
}

.ui-list-enter {
  animation: uiListSettle .46s var(--motion-ease-out) backwards;
  animation-delay: var(--reveal-delay, 0ms);
}
.fx-enter { animation: fxEnter .56s var(--motion-ease-out) both; }
.fx-enter > *,
.content-ready > * {
  animation: uiContentItemIn .5s var(--motion-ease-out) backwards;
}
.fx-enter > :nth-child(1), .content-ready > :nth-child(1) { animation-delay: 65ms; }
.fx-enter > :nth-child(2), .content-ready > :nth-child(2) { animation-delay: 115ms; }
.fx-enter > :nth-child(3), .content-ready > :nth-child(3) { animation-delay: 165ms; }
.fx-enter > :nth-child(n + 4), .content-ready > :nth-child(n + 4) { animation-delay: 210ms; }
.content-ready { animation: uiContentReadyIn .58s var(--motion-ease-out) both; }
.content-ready .news-list li { animation: uiContentItemIn .46s var(--motion-ease-out) backwards; }
.content-ready .news-list li:nth-child(-n + 2) { animation-delay: 90ms; }
.content-ready .news-list li:nth-child(n + 3):nth-child(-n + 4) { animation-delay: 130ms; }
.content-ready .news-list li:nth-child(n + 5):nth-child(-n + 6) { animation-delay: 170ms; }
.content-ready .news-list li:nth-child(n + 7):nth-child(-n + 8) { animation-delay: 210ms; }
.content-ready .news-list li:nth-child(n + 9) { animation-delay: 250ms; }
.value-updated { animation: uiValueUpdate .5s var(--motion-ease-out) both; }
.fx-enter .table-wrap {
  position: relative;
  animation: uiTableShellIn .64s var(--motion-ease-out) both;
}
.fx-enter .table-wrap::after {
  content: "";
  position: absolute;
  z-index: 3;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(37, 99, 235, .72), transparent);
  transform: scaleX(0);
  transform-origin: left center;
  animation: uiTableEdgeScan .88s var(--motion-ease-out) .06s both;
}
.fx-enter .table-wrap thead th {
  animation: uiTableHeadIn .48s var(--motion-ease-out) both;
  animation-delay: 95ms;
}
.fx-enter .table-wrap tbody tr {
  animation: uiTableRowIn .5s var(--motion-ease-out) both;
}
.fx-enter .table-wrap tbody tr:nth-child(1) { animation-delay: 130ms; }
.fx-enter .table-wrap tbody tr:nth-child(2) { animation-delay: 165ms; }
.fx-enter .table-wrap tbody tr:nth-child(3) { animation-delay: 200ms; }
.fx-enter .table-wrap tbody tr:nth-child(4) { animation-delay: 235ms; }
.fx-enter .table-wrap tbody tr:nth-child(5) { animation-delay: 270ms; }
.fx-enter .table-wrap tbody tr:nth-child(6) { animation-delay: 305ms; }
.fx-enter .table-wrap tbody tr:nth-child(n + 7) { animation-delay: 335ms; }

.tab-btn {
  position: relative;
  transition: transform .16s ease, border-color .16s ease, background-color .16s ease, color .16s ease, box-shadow .16s ease;
}
.tab-btn::after { display: none; }
.tab-btn.active {
  border-color: var(--deep-accent);
  background: var(--deep-accent);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(13, 43, 92, 0.22);
  animation: uiControlSettle .46s var(--motion-ease-out) both;
}

#detail .detail-actions .btn-light {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-color: rgba(255, 255, 255, 0.46);
  background: rgba(255, 255, 255, 0.18);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.14);
}
#detail .detail-actions .btn-light[hidden] { display: none; }
#detail .kpi-label { color: var(--muted); font-weight: 600; }
#detail .kpi-primary .kpi-label { color: var(--deep-sub); }
#detail .kpi-sub { color: var(--muted); }
#detail .section-title,
#detail .payment-form-section legend {
  padding-left: 9px;
  border-left: 3px solid var(--accent);
  color: var(--deep-accent);
  font-weight: 700;
}
#detail .payment-form-section legend { padding-bottom: 10px; }
#detail .payment-toolbar h3,
#detail .payment-result-head h3,
#detail .payment-result-section > h3 { font-weight: 700; }
#detail .notice-info .ni-label { color: var(--deep-accent); font-weight: 600; }
#detail .notice-info .ni-value,
#detail .payment-field > span:first-child { font-weight: 600; }

.complex-card,
.complex-card .card-chevron,
.btn-light,
.region-btn,
.toggle-btn,
.preset-btn,
.pred-scen-btn,
.payment-reset,
.complex-location-action,
.mobile-detail-icon,
.payment-segment span,
.payment-check,
.upcoming-row .up-evidence summary,
.news-list a,
.upcoming-row .up-source-links a,
.payment-field input,
.payment-field select,
.odds-ty-label select,
#search {
  transition: transform .16s ease, border-color .16s ease, background-color .16s ease, color .16s ease, box-shadow .16s ease, opacity .16s ease;
}
.complex-card .card-chevron { transform: translateX(0); }
.payment-segment span,
.payment-check,
.upcoming-row .up-evidence summary { cursor: pointer; }
.slider-row input[type="range"] { cursor: pointer; }

@media (hover: hover) and (pointer: fine) {
  #detail .tab-btn:hover:not(.active) {
    transform: translateY(-2px);
    color: var(--deep-accent);
    border-color: var(--accent);
    background: var(--surface);
    box-shadow: 0 5px 14px rgba(37, 99, 235, .14);
  }
  #detail .tab-btn.active:hover { color: #fff; background: var(--deep-accent-2); }
  .complex-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent-border);
    background: var(--surface-2);
    box-shadow: 0 7px 18px rgba(37, 99, 235, .13);
  }
  .complex-card:hover .card-chevron { color: var(--accent); transform: translateX(3px); }
  .btn-light:hover,
  .region-btn:hover:not(.active),
  .toggle-btn:hover,
  .preset-btn:hover:not(.active),
  .pred-scen-btn:hover:not(.active),
  .payment-reset:hover,
  .complex-location-action:hover,
  .mobile-detail-icon:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 14px rgba(37, 99, 235, .12);
  }
  #detail .detail-actions .btn-light:hover {
    border-color: rgba(255, 255, 255, 0.78);
    background: rgba(255, 255, 255, 0.28);
    color: #fff;
    box-shadow: 0 5px 14px rgba(0, 0, 0, 0.18);
  }
  .payment-segment label:hover span,
  .payment-check:hover { background: var(--accent-soft); color: var(--deep-accent); }
  .payment-segment input:checked + span { background: var(--deep-accent); color: #fff; }
  .upcoming-row .up-evidence summary:hover,
  .news-list a:hover,
  .upcoming-row .up-source-links a:hover { color: var(--deep-accent); text-underline-offset: 4px; }
  .payment-field input:hover,
  .payment-field select:hover,
  .odds-ty-label select:hover,
  #search:hover { border-color: var(--accent-border); }
}

.tab-btn:active,
.complex-card:active,
.btn-light:active,
.region-btn:active,
.toggle-btn:active,
.preset-btn:active,
.pred-scen-btn:active,
.payment-reset:active,
.complex-location-action:active,
.mobile-detail-icon:active { transform: translateY(0) scale(.98); }

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible,
[role="button"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  .ui-list-enter,
  .fx-enter,
  .fx-enter > *,
  .content-ready,
  .content-ready > *,
  .content-ready .news-list li,
  .value-updated,
  .tab-btn.active,
  .app-nav-item.active,
  .fx-enter .table-wrap,
  .fx-enter .table-wrap thead th,
  .fx-enter .table-wrap tbody tr { animation: none !important; }
  .fx-enter .table-wrap::after { display: none; }
  .news-loading::after,
  .complex-map-status[data-state="loading"]::after { display: none; }
  .market-card-loading-spinner { animation: none !important; border-right-color: currentColor !important; opacity: .72; }
  .complex-map-canvas { opacity: 1; transform: none; transition: none; }
  .tab-btn,
  .complex-card,
  .complex-card .card-chevron,
  .btn-light,
  .region-btn,
  .toggle-btn,
  .preset-btn,
  .pred-scen-btn,
  .payment-reset,
  .complex-location-action,
  .mobile-detail-icon { transition-duration: .01ms; }
  #detail .tab-btn:hover,
  .complex-card:hover,
  #detail .detail-actions .btn-light:hover,
  .region-btn:hover,
  .toggle-btn:hover,
  .preset-btn:hover,
  .pred-scen-btn:hover,
  .payment-reset:hover,
  .complex-location-action:hover,
  .mobile-detail-icon:hover { transform: none; box-shadow: none; }
}

/* 상위 메뉴로 화면을 분리한 앱 셸. 데이터 기능은 유지하고 화면 간 위계만 명확히 한다. */
body { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
.app-nav {
  position: fixed;
  right: auto;
  bottom: calc(8px + env(safe-area-inset-bottom));
  left: 50%;
  z-index: 80;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  width: calc(100% - 24px);
  max-width: 720px;
  gap: 6px;
  margin: 0;
  padding: 7px;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 20px;
  background: linear-gradient(135deg, #081A39 0%, #0D2B5C 56%, #174579 100%);
  box-shadow: 0 14px 36px rgba(10, 26, 58, .34), 0 4px 12px rgba(10, 26, 58, .22), inset 0 1px 0 rgba(255, 255, 255, .12);
  isolation: isolate;
  transform: translateX(-50%);
}
.app-nav-indicator {
  position: absolute;
  top: 7px;
  bottom: 7px;
  left: 7px;
  z-index: 0;
  width: calc(14.285714% - 7.1429px);
  border: 1px solid #fff;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .24);
  pointer-events: none;
  transform: translate3d(0, 0, 0);
  transition: transform .44s cubic-bezier(.22, 1, .36, 1);
  will-change: transform;
}
body[data-app-view="inbox"] .app-nav-indicator { transform: translate3d(calc(100% + 6px), 0, 0); }
body[data-app-view="eligibility"] .app-nav-indicator { transform: translate3d(calc(200% + 12px), 0, 0); }
body[data-app-view="calendar"] .app-nav-indicator { transform: translate3d(calc(300% + 18px), 0, 0); }
body[data-app-view="upcoming"] .app-nav-indicator { transform: translate3d(calc(400% + 24px), 0, 0); }
body[data-app-view="detail"] .app-nav-indicator { transform: translate3d(calc(500% + 30px), 0, 0); }
body[data-app-view="payment"] .app-nav-indicator { transform: translate3d(calc(600% + 36px), 0, 0); }
.app-nav-item {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 0;
  min-height: 58px;
  padding: 6px 2px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: rgba(255, 255, 255, .06);
  color: #D9E5F5;
  font: inherit;
  cursor: pointer;
  transition: border-color .32s ease, background-color .32s ease, color .36s var(--motion-ease-standard), box-shadow .32s ease;
}
.app-nav-icon { display: block; width: 22px; height: 22px; flex: 0 0 auto; }
.app-nav-label { font-size: 12.5px; font-weight: 700; line-height: 1.1; letter-spacing: -.02em; white-space: nowrap; }
.app-nav-label-compact { display: none; }
.app-nav-meta {
  display: none;
}
.app-nav-item.active {
  border-color: transparent;
  background: transparent;
  color: var(--deep-accent);
  box-shadow: none;
}
.app-nav-item.active .app-nav-meta { color: var(--deep-sub); }
.app-nav-item[aria-disabled="true"] {
  cursor: pointer;
  color: #AFC0D6;
  opacity: 1;
}
.app-nav-item:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.app-nav-item.selection-required {
  animation: appNavLockedButtonPulse 1.8s ease-out both;
}
.app-nav-selection-hint {
  position: absolute;
  top: auto;
  bottom: calc(100% + 8px);
  left: var(--app-nav-hint-x, 50%);
  z-index: 6;
  width: max-content;
  max-width: calc(100vw - 20px);
  margin: 0;
  padding: 9px 13px;
  border: 1px solid #F0B94C;
  border-radius: 6px;
  background: #FFF9E8;
  box-shadow: 0 8px 22px rgba(122, 67, 0, .18);
  color: #7A4300;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0;
  pointer-events: none;
  transform: translateX(-50%);
  text-align: center;
  white-space: normal;
}
.app-nav-selection-hint[hidden] { display: none !important; }
.app-nav-selection-hint::after {
  content: "";
  position: absolute;
  top: auto;
  bottom: -7px;
  left: var(--app-nav-hint-pointer-x, 50%);
  width: 0;
  height: 0;
  border-top: 7px solid #FFF9E8;
  border-right: 7px solid transparent;
  border-bottom: 0;
  border-left: 7px solid transparent;
  filter: drop-shadow(0 1px 0 #F0B94C);
  transform: translateX(-50%);
}
.app-nav-selection-hint.is-visible {
  animation: appNavSelectionHintFlash 1.8s ease-out both;
}
@keyframes appNavSelectionHintFlash {
  0% { opacity: 0; transform: translateX(-50%) translateY(-5px) scale(.98); }
  12%, 42%, 72%, 90% { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); box-shadow: 0 8px 22px rgba(122, 67, 0, .2); }
  27%, 57% { opacity: .42; box-shadow: 0 2px 8px rgba(122, 67, 0, .08); }
  100% { opacity: 0; transform: translateX(-50%) translateY(-2px) scale(1); }
}
@keyframes appNavLockedButtonPulse {
  0%, 100% { opacity: .46; }
  12%, 42%, 72% { border-color: #D99718; background: #FFF9E8; color: #7A4300; opacity: 1; box-shadow: 0 0 0 3px rgba(217, 151, 24, .13); }
  27%, 57% { opacity: .58; box-shadow: none; }
}

main#app-main {
  display: block;
  height: calc(100dvh - 176px - env(safe-area-inset-bottom));
  min-height: 600px;
  padding: 10px 0 16px;
}
main#app-main > .app-view {
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 1px 3px rgba(10, 26, 58, 0.07);
}
.app-view[hidden] { display: none !important; }
@keyframes appViewIn {
  from { opacity: 0; filter: blur(4px); transform: translateY(14px) scale(.994); }
  to { opacity: 1; filter: blur(0); transform: translateY(0) scale(1); }
}
@keyframes appViewChildIn {
  from { opacity: 0; filter: blur(2px); transform: translateY(8px); }
  to { opacity: 1; filter: blur(0); transform: translateY(0); }
}
.app-view-enter { animation: appViewIn .55s var(--motion-ease-out) both; }
.app-view-enter > .view-heading,
.app-view-enter > .list-controls,
.app-view-enter > #complex-list,
.app-view-enter > .landing-guide,
.app-view-enter > .calendar-content,
.app-view-enter > .eligibility-content,
.app-view-enter #detail > .mobile-detail-bar,
.app-view-enter #detail > .detail-overview,
.app-view-enter #detail > .detail-news-box,
.app-view-enter #detail > .tab-bar,
.app-view-enter #detail > .tab-panels {
  animation: appViewChildIn .56s var(--motion-ease-out) backwards;
}
.app-view-enter > .view-heading,
.app-view-enter #detail > .mobile-detail-bar { animation-delay: 55ms; }
.app-view-enter > .list-controls,
.app-view-enter #detail > .detail-overview { animation-delay: 110ms; }
.app-view-enter > #complex-list,
.app-view-enter > .landing-guide,
.app-view-enter > .calendar-content,
.app-view-enter > .eligibility-content,
.app-view-enter #detail > .detail-news-box { animation-delay: 165ms; }
.app-view-enter #detail > .tab-bar { animation-delay: 220ms; }
.app-view-enter #detail > .tab-panels { animation-delay: 275ms; }

.view-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 66px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
}
.view-heading > div { min-width: 0; }
.view-kicker {
  display: block;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}
.view-heading h2,
.landing-guide .view-heading .guide-title {
  margin: 1px 0 0;
  color: var(--text);
  font-size: 21px;
  font-weight: 700;
  line-height: 1.25;
}
.view-heading-meta {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.list-card { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.list-controls {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(360px, .95fr) minmax(180px, auto);
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.list-controls .search-box,
.list-controls .region-toggle,
.list-controls .list-summary { margin: 0; }
.list-controls .list-summary { align-items: center; gap: 12px; padding: 0; }
#complex-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: 8px;
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  padding: 10px 12px 16px;
  overflow-y: auto;
}
#complex-list > .empty-msg { grid-column: 1 / -1; }
.complex-card {
  min-height: 142px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}
.complex-card.selected {
  border: 1px solid var(--accent-border);
  border-left: 4px solid var(--accent);
  background: var(--accent-soft);
}
.news-box { max-height: none; }
.news-box > .section-title {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 8px;
}
.news-count {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 1px 7px;
  border-radius: 5px;
  background: var(--deep-accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}
.news-meta {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 4px 7px;
  margin-top: 3px;
  overflow: hidden;
}
.news-meta .news-special,
.news-meta .news-unit { flex: 0 0 auto; margin-left: 0; }
.news-source,
.news-meta .news-date {
  display: inline-block;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.news-source {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.news-meta .news-date { flex: 0 0 auto; }
.detail-news-box {
  margin: 10px 0 0;
  border: 1px solid var(--border);
  border-radius: 8px;
}
body[data-app-view="payment"] .detail-news-box { display: none !important; }
.news-loading {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 114px;
  overflow: hidden;
  color: var(--muted);
  font-size: 15px;
}
.news-loading::after {
  content: "";
  position: absolute;
  bottom: 14px;
  left: 50%;
  width: 96px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  transform: translateX(-50%) scaleX(.2);
  animation: uiLoadingLine 1.45s var(--motion-ease-standard) infinite;
}

@media (min-width: 821px) {
  .list-card .news-box,
  .detail-card .news-box {
    max-height: none;
    padding: 10px 12px 8px;
  }
  .detail-card .news-box { min-height: 0; }
  .news-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 54px;
    gap: 6px 8px;
    max-height: 114px;
  }
  .news-list li,
  .news-list li:last-child {
    height: 54px;
    min-width: 0;
    min-height: 0;
    padding: 5px 8px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: var(--surface);
  }
  .news-list a {
    display: -webkit-box;
    overflow: hidden;
    color: var(--text);
    font-weight: 600;
    line-height: 1.25;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
  }
  .news-note { display: none; }
}

.upcoming-card { padding: 0; overflow-y: auto; }
.upcoming-card > .landing-guide { padding: 0 18px 28px; }
.upcoming-view-heading { margin: 0 -18px; }
.upcoming-card .guide-sub { margin: 14px 0 0; }
.upcoming-card .upcoming-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin-top: 12px;
  background: var(--border);
}
.upcoming-card .upcoming-row {
  min-width: 0;
  min-height: 132px;
  align-items: flex-start;
  border: 0;
}

/* 청약 캘린더 — 지역을 추가할 때 data-calendar-region 값과 지역 설정만 확장한다. */
.calendar-card { padding: 0; overflow-y: auto; }
.calendar-content { padding: 0 18px 28px; }
.calendar-view-heading { margin: 0 -18px; }
.calendar-view-heading > div { min-width: 0; }
.calendar-source { max-width: 310px; margin: 0; color: #58708D; font-size: 12px; line-height: 1.5; text-align: right; }
.calendar-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin: 16px 0 10px;
}
.calendar-filter-stack { display: grid; min-width: 0; gap: 7px; }
.calendar-filter-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.calendar-filter-label { flex: 0 0 auto; color: #61758D; font-size: 12px; font-weight: 800; }
.calendar-scope-filter,
.calendar-region-filter,
.calendar-event-type-filter { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.calendar-scope-button,
.calendar-region-button,
.calendar-event-type-button,
.calendar-month-button {
  min-height: 36px;
  border: 1px solid #B8CBE5;
  border-radius: 8px;
  background: #FFFFFF;
  color: #46617E;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.calendar-scope-button,
.calendar-region-button,
.calendar-event-type-button { padding: 7px 11px; line-height: 1.25; }
.calendar-event-type-button { white-space: normal; }
.calendar-scope-button.active,
.calendar-region-button.active,
.calendar-event-type-button.active {
  border-color: var(--deep-accent);
  background: #EAF3FF;
  color: #164F88;
  box-shadow: inset 0 0 0 1px rgba(79, 140, 255, .12);
}
/* 일정 단계는 메뉴·달력 안의 단지명 칩·선택일 상세에서 같은 색을 쓴다. */
.calendar-event-type-button[data-calendar-event-type="announcement"] { border-color: #9ABBF4; background: #F1F6FF; color: #245FA8; }
.calendar-event-type-button[data-calendar-event-type="special-reception"] { border-color: #C7A7F5; background: #F7F1FF; color: #7440B1; }
.calendar-event-type-button[data-calendar-event-type="remndr-reception"] { border-color: #E7B56F; background: #FFF7E9; color: #9A5700; }
.calendar-event-type-button[data-calendar-event-type="general-reception"] { border-color: #82CDC8; background: #ECFAF8; color: #08726D; }
.calendar-event-type-button[data-calendar-event-type="rank1-reception"] { border-color: #85C89C; background: #EFFAF2; color: #176C3C; }
.calendar-event-type-button[data-calendar-event-type="rank2-reception"] { border-color: #F2AD75; background: #FFF4EC; color: #B84D04; }
.calendar-event-type-button[data-calendar-event-type="winner"] { border-color: #ECA7BC; background: #FFF1F5; color: #A9365B; }
.calendar-event-type-button[data-calendar-event-type="contract"] { border-color: #AABDD0; background: #F3F6FA; color: #385773; }
.calendar-event-type-button.active[data-calendar-event-type="announcement"] { border-color: #2869C9; background: #2869C9; color: #FFFFFF; box-shadow: 0 3px 8px rgba(40, 105, 201, .26); }
.calendar-event-type-button.active[data-calendar-event-type="special-reception"] { border-color: #7B42BC; background: #7B42BC; color: #FFFFFF; box-shadow: 0 3px 8px rgba(123, 66, 188, .26); }
.calendar-event-type-button.active[data-calendar-event-type="remndr-reception"] { border-color: #A85B00; background: #A85B00; color: #FFFFFF; box-shadow: 0 3px 8px rgba(168, 91, 0, .24); }
.calendar-event-type-button.active[data-calendar-event-type="general-reception"] { border-color: #087C77; background: #087C77; color: #FFFFFF; box-shadow: 0 3px 8px rgba(8, 124, 119, .24); }
.calendar-event-type-button.active[data-calendar-event-type="rank1-reception"] { border-color: #197A45; background: #197A45; color: #FFFFFF; box-shadow: 0 3px 8px rgba(25, 122, 69, .24); }
.calendar-event-type-button.active[data-calendar-event-type="rank2-reception"] { border-color: #C45B0A; background: #C45B0A; color: #FFFFFF; box-shadow: 0 3px 8px rgba(196, 91, 10, .24); }
.calendar-event-type-button.active[data-calendar-event-type="winner"] { border-color: #B23A61; background: #B23A61; color: #FFFFFF; box-shadow: 0 3px 8px rgba(178, 58, 97, .24); }
.calendar-event-type-button.active[data-calendar-event-type="contract"] { border-color: #3B5C79; background: #3B5C79; color: #FFFFFF; box-shadow: 0 3px 8px rgba(59, 92, 121, .24); }
.calendar-month-controls { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 7px; }
.calendar-month-controls h3 { min-width: 100px; margin: 0; color: #183B63; font-size: 18px; text-align: center; }
.calendar-month-button { width: 34px; padding: 0; color: #1E5E99; font-size: 24px; line-height: 1; }
.calendar-scope-button:focus-visible,
.calendar-region-button:focus-visible,
.calendar-event-type-button:focus-visible,
.calendar-month-button:focus-visible,
.notice-calendar-date:focus-visible,
.notice-calendar-chip:focus-visible,
.notice-calendar-event:focus-visible { outline: 3px solid rgba(79, 140, 255, .32); outline-offset: 2px; }
.notice-calendar-chip:focus-visible { outline-offset: -2px; }
.notice-calendar-weekdays,
.notice-calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.notice-calendar-weekdays { border: 1px solid #D6E0EE; border-bottom: 0; border-radius: 10px 10px 0 0; background: #F5F8FC; }
.notice-calendar-weekdays span { padding: 9px 4px; color: #60748B; font-size: 13px; font-weight: 800; text-align: center; }
.notice-calendar-weekdays span:first-child { color: #C13D49; }
.notice-calendar-weekdays span:last-child { color: #2771B2; }
.notice-calendar-grid { overflow: hidden; border: 1px solid #D6E0EE; border-radius: 0 0 10px 10px; background: #DCE5F1; gap: 1px; }
.notice-calendar-day {
  position: relative;
  display: grid;
  grid-template-rows: 28px minmax(0, 1fr);
  min-width: 0;
  min-height: 112px;
  padding: 7px;
  border: 0;
  background: #FFFFFF;
  color: #1E3854;
  overflow: hidden;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.notice-calendar-date:focus-visible { outline-offset: 1px; }
.notice-calendar-day.is-outside { background: #F7F9FC; color: #9AA9BA; }
.notice-calendar-day.is-selected { z-index: 1; box-shadow: inset 0 0 0 2px var(--accent); }
.notice-calendar-day.is-today .notice-calendar-date { background: #123E6C; color: #FFFFFF; }
.notice-calendar-date { display: inline-grid; width: 28px; height: 28px; padding: 0; place-items: center; border: 0; border-radius: 50%; background: transparent; color: inherit; font: inherit; font-size: 14px; font-weight: 800; line-height: 28px; cursor: pointer; }
.notice-calendar-day.is-sunday .notice-calendar-date { color: #C13D49; }
.notice-calendar-day.is-saturday .notice-calendar-date { color: #2771B2; }
.notice-calendar-day.is-today .notice-calendar-date { color: #FFFFFF; }
.notice-calendar-event-count { position: absolute; top: 8px; right: 7px; min-width: 20px; padding: 2px 5px; border-radius: 999px; background: #E8F2FF; color: #1C5C98; font-size: 11px; font-weight: 800; line-height: 1.2; text-align: center; }
.notice-calendar-chip-list { display: flex; grid-row: 2; width: 100%; max-width: 100%; min-width: 0; flex-direction: column; gap: 4px; overflow: hidden; margin: 6px 0 0; padding: 0; list-style: none; }
.notice-calendar-chip-item { min-width: 0; max-width: 100%; }
.notice-calendar-chip { display: block; width: 100%; min-width: 0; min-height: 28px; max-width: 100%; box-sizing: border-box; overflow: hidden; padding: 4px 5px; border: 0; border-left: 3px solid #4F8CFF; border-radius: 3px; background: #EDF5FF; color: #28547D; font: inherit; font-size: 12px; font-weight: 700; line-height: 1.3; text-align: left; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.notice-calendar-chip:hover { filter: brightness(.97); text-decoration: underline; }
.notice-calendar-chip.is-seoul { border-left-color: #4F8CFF; }
.notice-calendar-chip.is-gyeonggi { border-left-color: #8C63D8; background: #F3EDFF; color: #5A3A94; }
.notice-calendar-chip.is-announcement { border-left-color: #2869C9; background: #EDF4FF; color: #174E92; }
.notice-calendar-chip.is-special-reception { border-left-color: #7B42BC; background: #F7F0FF; color: #63309C; }
.notice-calendar-chip.is-remndr-reception { border-left-color: #A85B00; background: #FFF5E5; color: #854700; }
.notice-calendar-chip.is-general-reception { border-left-color: #087C77; background: #EAF9F7; color: #076964; }
.notice-calendar-chip.is-rank1-reception { border-left-color: #197A45; background: #EDF9F1; color: #146137; }
.notice-calendar-chip.is-rank2-reception { border-left-color: #C45B0A; background: #FFF2E9; color: #A44600; }
.notice-calendar-chip.is-winner { border-left-color: #B23A61; background: #FFF0F4; color: #91304E; }
.notice-calendar-chip.is-contract { border-left-color: #3B5C79; background: #EFF3F7; color: #304D67; }
.notice-calendar-chip.is-more { border-left-color: #90A5BE; background: #F2F5F8; color: #61758D; }
.notice-calendar-day-detail { margin-top: 15px; padding: 14px; border: 1px solid #C9DBF0; border-radius: 11px; background: linear-gradient(135deg, #F6FAFF 0%, #FFFFFF 80%); }
.notice-calendar-day-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.notice-calendar-day-head h3 { margin: 0; color: #193C63; font-size: 18px; }
.notice-calendar-day-head p { max-width: 380px; margin: 1px 0 0; color: #59718C; font-size: 13px; line-height: 1.5; text-align: right; }
.notice-calendar-day-list { display: grid; gap: 8px; margin-top: 11px; }
.notice-calendar-empty { margin: 0; padding: 11px 0 2px; color: #6D8095; font-size: 13px; }
.notice-calendar-event {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  width: 100%;
  min-height: 54px;
  align-items: center;
  gap: 9px;
  padding: 11px;
  border: 1px solid #D3E0EF;
  border-radius: 8px;
  background: #FFFFFF;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.notice-calendar-event:hover { border-color: #9EBFE4; box-shadow: 0 4px 12px rgba(43, 91, 138, .1); transform: translateY(-1px); }
.notice-calendar-event.is-gyeonggi { border-left: 4px solid #8C63D8; }
.notice-calendar-event.is-seoul { border-left: 4px solid #4F8CFF; }
.notice-calendar-event-label { display: inline-flex; flex: 0 0 auto; align-items: center; min-height: 26px; padding: 4px 7px; border-radius: 999px; background: #E9F3FF; color: #245D96; font-size: 12px; font-weight: 800; line-height: 1.3; text-align: center; }
.notice-calendar-event.is-gyeonggi .notice-calendar-event-label { background: #F2EBFF; color: #62419B; }
.notice-calendar-event.is-announcement { border-left-color: #2869C9; }
.notice-calendar-event.is-special-reception { border-left-color: #7B42BC; }
.notice-calendar-event.is-remndr-reception { border-left-color: #A85B00; }
.notice-calendar-event.is-general-reception { border-left-color: #087C77; }
.notice-calendar-event.is-rank1-reception { border-left-color: #197A45; }
.notice-calendar-event.is-rank2-reception { border-left-color: #C45B0A; }
.notice-calendar-event.is-winner { border-left-color: #B23A61; }
.notice-calendar-event.is-contract { border-left-color: #3B5C79; }
.notice-calendar-event-label.is-announcement { background: #EDF4FF; color: #174E92; }
.notice-calendar-event-label.is-special-reception { background: #F7F0FF; color: #63309C; }
.notice-calendar-event-label.is-remndr-reception { background: #FFF5E5; color: #854700; }
.notice-calendar-event-label.is-general-reception { background: #EAF9F7; color: #076964; }
.notice-calendar-event-label.is-rank1-reception { background: #EDF9F1; color: #146137; }
.notice-calendar-event-label.is-rank2-reception { background: #FFF2E9; color: #A44600; }
.notice-calendar-event-label.is-winner { background: #FFF0F4; color: #91304E; }
.notice-calendar-event-label.is-contract { background: #EFF3F7; color: #304D67; }
.notice-calendar-event-copy { min-width: 0; }
.notice-calendar-event-copy strong,
.notice-calendar-event-copy small { display: block; overflow-wrap: anywhere; }
.notice-calendar-event-copy strong { color: #244561; font-size: 15px; line-height: 1.35; }
.notice-calendar-event-copy small { margin-top: 2px; color: #6C8198; font-size: 12px; line-height: 1.4; }
.notice-calendar-event-source { display: inline-flex; width: fit-content; max-width: 100%; margin-top: 4px; padding: 2px 5px; border-radius: 999px; background: #EEF5FC; color: #426784; font-size: 11px; font-weight: 800; line-height: 1.25; overflow-wrap: anywhere; }
.notice-calendar-event-open { padding: 6px 8px; border: 1px solid #AAC6E6; border-radius: 6px; background: #FFFFFF; color: #245E99; font-size: 12px; font-weight: 800; white-space: nowrap; }

@media (max-width: 420px) {
  .calendar-filter-row { display: block; }
  .calendar-filter-label { display: block; margin: 0 0 4px; }
  .calendar-scope-filter,
  .calendar-region-filter,
  .calendar-event-type-filter { gap: 4px; }
  .calendar-scope-button,
  .calendar-region-button,
  .calendar-event-type-button { min-height: 34px; padding: 6px 8px; font-size: 12px; }
}

.detail-card {
  padding: 0;
  overflow-y: auto;
  background: var(--surface);
  scrollbar-width: thin;
}
#detail { min-width: 0; padding: 14px 16px 28px; }
.detail-overview {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(360px, 1fr);
  grid-template-areas:
    "hero kpi"
    "trust trust";
  gap: 10px;
  align-items: stretch;
}
.detail-overview .detail-hero {
  grid-area: hero;
  min-height: 212px;
  margin: 0;
}
.detail-overview > .kpi-row {
  grid-area: kpi;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  overflow: visible;
}
.detail-overview > .notice-data-trust-wrap {
  grid-area: trust;
  min-width: 0;
  margin-top: 0;
}
.detail-overview .notice-data-trust.is-live_api:not([open]) {
  width: fit-content;
  max-width: 100%;
  margin-left: auto;
}
.detail-overview .notice-data-trust.is-live_api:not([open]) > summary {
  min-height: 34px;
  padding: 6px 9px;
}
.detail-overview .kpi-card {
  min-height: 0;
  height: auto;
}
#detail > .tab-bar { margin-top: 12px; }
.notice-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
  gap: 14px;
  align-items: start;
}
.notice-overview-grid > * { min-width: 0; }
.notice-overview-grid .notice-info { margin-top: 0; }

@media (min-width: 821px) {
  .notice-overview-grid { align-items: stretch; }
  .notice-overview-grid .complex-location {
    display: flex;
    flex-direction: column;
    min-height: 100%;
  }
  .notice-overview-grid .complex-map-frame {
    flex: 1 1 auto;
    height: auto;
    min-height: 292px;
  }
}

@media (min-width: 821px) and (hover: hover) and (pointer: fine) {
  .app-nav-item:hover:not(.active):not([aria-disabled="true"]) {
    border-color: rgba(255, 255, 255, .32);
    background: rgba(255, 255, 255, .14);
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .14);
  }
  .app-nav-item[aria-disabled="true"]:hover { border-color: #F0B94C; background: #FFF9E8; color: #7A4300; opacity: 1; }
  .app-nav-item.active:hover { border-color: transparent; background: transparent; color: var(--deep-accent); box-shadow: none; }
}

@media (max-width: 1100px) and (min-width: 821px) {
  .list-controls {
    grid-template-columns: minmax(180px, 1fr) minmax(330px, 1.25fr) minmax(140px, auto);
  }
  .list-controls .list-summary { grid-column: auto; }
  .detail-overview { grid-template-columns: minmax(0, 1.25fr) minmax(330px, 1fr); }
  .app-nav-meta { display: none; }
}

@media (max-width: 820px) {
  @keyframes mobileAppViewForwardIn {
    from { opacity: .22; transform: translate3d(24px, 0, 0); }
    to { opacity: 1; transform: translate3d(0, 0, 0); }
  }
  @keyframes mobileAppViewBackwardIn {
    from { opacity: .22; transform: translate3d(-24px, 0, 0); }
    to { opacity: 1; transform: translate3d(0, 0, 0); }
  }
  @keyframes mobileAppViewChildIn {
    from { opacity: 0; transform: translate3d(0, 10px, 0); }
    to { opacity: 1; transform: translate3d(0, 0, 0); }
  }
  @keyframes mobilePanelIn {
    from { opacity: .2; transform: translate3d(0, 12px, 0) scale(.992); }
    to { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
  }
  @keyframes mobileContentItemIn {
    from { opacity: 0; transform: translate3d(0, 8px, 0); }
    to { opacity: 1; transform: translate3d(0, 0, 0); }
  }
  @keyframes mobileContentReadyIn {
    from { opacity: .18; transform: translate3d(0, 10px, 0) scale(.996); }
    to { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
  }
  @keyframes mobileValueUpdate {
    from { opacity: .4; transform: translate3d(0, 5px, 0); }
    to { opacity: 1; transform: translate3d(0, 0, 0); }
  }

  .app-view-enter {
    animation: mobileAppViewForwardIn .55s var(--motion-ease-out) both;
    backface-visibility: hidden;
  }
  .app-view-enter[data-app-enter-direction="backward"] {
    animation-name: mobileAppViewBackwardIn;
  }
  .app-view-enter > .view-heading,
  .app-view-enter > .list-controls,
  .app-view-enter > #complex-list,
  .app-view-enter > .landing-guide,
  .app-view-enter > .calendar-content,
  .app-view-enter #detail > .mobile-detail-bar,
  .app-view-enter #detail > .detail-overview,
  .app-view-enter #detail > .detail-news-box,
  .app-view-enter #detail > .tab-bar,
  .app-view-enter #detail > .tab-panels {
    animation-name: mobileAppViewChildIn;
    backface-visibility: hidden;
  }
  .app-view-enter > .view-heading,
  .app-view-enter #detail > .mobile-detail-bar { animation-delay: 20ms; }
  .app-view-enter > .list-controls,
  .app-view-enter #detail > .detail-overview { animation-delay: 45ms; }
  .app-view-enter > #complex-list,
  .app-view-enter > .landing-guide,
  .app-view-enter > .calendar-content,
  .app-view-enter #detail > .detail-news-box { animation-delay: 70ms; }
  .app-view-enter #detail > .tab-bar { animation-delay: 105ms; }
  .app-view-enter #detail > .tab-panels { animation-delay: 145ms; }

  .fx-enter { animation-name: mobilePanelIn; }
  .fx-enter > *,
  .content-ready > *,
  .content-ready .news-list li { animation-name: mobileContentItemIn; }
  .content-ready { animation-name: mobileContentReadyIn; }
  .value-updated { animation-name: mobileValueUpdate; }

  main#app-main {
    display: block;
    height: auto;
    min-height: 0;
    padding: 8px 0 0;
  }
  main#app-main > .app-view {
    height: auto;
    min-height: calc(100dvh - 138px);
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
  .view-heading { min-height: 62px; padding: 10px 12px; }
  .view-heading h2,
  .landing-guide .view-heading .guide-title { font-size: 20px; }
  .view-heading-meta { font-size: 12px; }

  .list-card { min-height: calc(100dvh - 138px); }
  .list-controls {
    display: block;
    padding: 12px 12px 8px;
    border-bottom: 0;
  }
  .list-controls .search-box { margin-bottom: 8px; }
  .list-controls .region-toggle { margin-bottom: 10px; }
  .list-controls .list-summary { display: flex; }
  #complex-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0 10px 18px;
    overflow: visible;
  }
  .complex-card {
    min-height: 0;
    height: auto;
    padding: 13px 11px;
    border: 0;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
  }
  .complex-card.has-upcoming .card-upcoming { margin-top: 7px; }
  .complex-card.selected { border-left: 3px solid var(--accent); border-bottom-color: var(--border); }

  .upcoming-card { min-height: calc(100dvh - 138px); overflow: visible; }
  .upcoming-card > .landing-guide { padding: 0 12px 24px; }
  .upcoming-view-heading { margin: 0 -12px; }
  .upcoming-card .guide-sub { margin-top: 12px; }
  .upcoming-card .upcoming-list {
    display: block;
    margin-top: 10px;
    background: transparent;
  }
  .upcoming-card .upcoming-row { min-height: 0; border-bottom: 1px solid var(--border); }
  .calendar-card { min-height: calc(100dvh - 138px); overflow: visible; }
  .calendar-content { padding: 0 12px calc(24px + env(safe-area-inset-bottom)); }
  .calendar-view-heading { display: block; margin: 0 -12px; }
  .calendar-source { max-width: none; margin-top: 4px; font-size: 11.5px; text-align: left; }
  .calendar-toolbar { align-items: flex-start; flex-direction: column; gap: 9px; }
  .calendar-filter-stack { width: 100%; }
  .calendar-filter-row { align-items: flex-start; }
  .calendar-filter-label { padding-top: 8px; }
  .calendar-scope-filter,
  .calendar-region-filter,
  .calendar-event-type-filter { flex: 1 1 0; }
  .calendar-month-controls { align-self: flex-end; }
  .notice-calendar-day { min-height: 84px; padding: 5px; }
  .notice-calendar-chip-list { gap: 2px; margin-top: 4px; }
  .notice-calendar-chip { min-height: 28px; padding: 3px 4px; font-size: 11px; }
  .notice-calendar-event-count { top: 5px; right: 4px; min-width: 18px; font-size: 10px; }
  .notice-calendar-day-detail { padding: 12px; }
  .notice-calendar-day-head { display: block; }
  .notice-calendar-day-head p { max-width: none; margin-top: 4px; text-align: left; }
  .notice-calendar-event { grid-template-columns: auto minmax(0, 1fr); align-items: start; }
  .notice-calendar-event-open { grid-column: 2; justify-self: start; }

  body.mobile-detail-open main#app-main {
    padding: 0;
  }
  body.mobile-detail-open .detail-card {
    min-height: calc(100dvh - 96px - env(safe-area-inset-bottom));
  }
  #detail { padding: 0 14px calc(24px + env(safe-area-inset-bottom)); }
  .detail-overview { display: block; }
  .detail-overview .detail-hero { min-height: 0; margin-top: 10px; }
  .detail-overview > .kpi-row {
    display: flex;
    gap: 7px;
    margin-top: 10px;
    padding-bottom: 4px;
    overflow-x: auto;
  }
  .detail-overview > .notice-data-trust-wrap { margin-top: 6px; }
  .detail-overview .notice-data-trust.is-live_api:not([open]) {
    width: 100%;
    margin-left: 0;
  }
  .detail-overview .notice-data-trust.is-live_api:not([open]) > summary {
    min-height: 42px;
    padding: 9px 10px;
  }
  .detail-overview .kpi-card { min-height: 84px; }
  .detail-news-box {
    max-height: none;
    min-height: 0;
    padding: 10px 12px;
  }
  .detail-news-box .news-loading { min-height: 114px; }
  #detail > .tab-bar {
    position: sticky;
    top: 58px;
    z-index: 45;
    display: grid;
    /* 모바일에서도 모든 상세 기능을 한눈에 보이도록 4열 그리드로 고정한다. */
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 5px;
    margin: 10px -6px 0;
    padding: 6px;
    overflow: visible;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-2);
    box-shadow: 0 3px 12px rgba(10, 26, 58, 0.10);
  }
  #detail > .tab-bar .tab-btn {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    margin: 0;
    padding: 7px 4px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--surface);
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    text-overflow: ellipsis;
  }
  #detail > .tab-bar .tab-btn { white-space: normal; }
  #detail > .tab-bar .tab-btn.active {
    border-color: var(--deep-accent);
    background: var(--deep-accent);
    color: #fff;
  }
  .tab-panel { scroll-margin-top: 172px; }
  .notice-overview-grid { display: block; }
  .notice-overview-grid .notice-info { margin-top: 10px; }
}

@media (max-width: 420px) {
  .view-heading-meta { display: none; }
  .notice-calendar-weekdays span { padding: 8px 2px; font-size: 12px; }
  .notice-calendar-day { grid-template-rows: 36px minmax(0, 1fr); min-height: 100px; padding: 4px; }
  .notice-calendar-date { width: 24px; height: 24px; font-size: 13px; line-height: 24px; }
  .notice-calendar-event-count { top: 28px; right: 3px; min-width: 16px; padding: 1px 3px; font-size: 9px; }
  .notice-calendar-chip-list { margin-top: 3px; }
  .notice-calendar-chip {
    display: -webkit-box;
    min-height: 36px;
    max-height: 36px;
    padding: 4px 3px;
    font-size: 11px;
    line-height: 1.25;
    overflow-wrap: anywhere;
    white-space: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }
  .notice-calendar-day-head h3 { font-size: 17px; }
  .notice-calendar-event-copy strong { font-size: 14px; }
  .app-nav { width: calc(100% - 16px); bottom: calc(6px + env(safe-area-inset-bottom)); border-radius: 18px; }
  .app-nav-icon { width: 21px; height: 21px; }
  .app-nav-label { font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .app-view-enter,
  .app-view-enter > .view-heading,
  .app-view-enter > .list-controls,
  .app-view-enter > #complex-list,
  .app-view-enter > .landing-guide,
  .app-view-enter #detail > .mobile-detail-bar,
  .app-view-enter #detail > .detail-overview,
  .app-view-enter #detail > .detail-news-box,
  .app-view-enter #detail > .tab-bar,
  .app-view-enter #detail > .tab-panels,
  .fx-enter .notice-schedule-item { animation: none !important; }
  .app-nav-item { transition-duration: .01ms; }
  .app-nav-indicator { transition: none; }
  .app-nav-item:hover { transform: none; box-shadow: none; }
  .app-nav-selection-hint.is-visible,
  .app-nav-item.selection-required { animation: none !important; }
  .app-nav-selection-hint.is-visible { opacity: 1; transform: translateX(-50%); }
}

/* 개인 청약 인박스 — 관심 공고의 일정·변경 알림을 현재 브라우저에 저장한다. */
.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;
}
.app-nav-badge {
  position: absolute;
  top: 4px;
  right: 5px;
  display: inline-grid;
  min-width: 17px;
  height: 17px;
  place-items: center;
  padding: 0 4px;
  border: 1.5px solid #fff;
  border-radius: 999px;
  background: #E5484D;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 2px 6px rgba(69, 12, 18, .34);
}
.app-nav-badge[hidden] { display: none; }
/* 별 버튼 공간은 제목·상단 정보에만 확보한다. 아래 외부 링크 영역까지 좁히면 모바일에서 버튼 글자가 잘린다. */
#detail .detail-eyebrow,
#detail .detail-hero h2 { padding-right: 60px; }
#detail .detail-watch {
  position: absolute;
  top: -2px;
  right: -2px;
  z-index: 1;
  display: inline-grid;
  width: 46px;
  height: 46px;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 999px;
  background: rgba(255, 255, 255, .17);
  color: #fff;
  box-shadow: 0 5px 15px rgba(0, 0, 0, .24);
  cursor: pointer;
  transition: transform .18s ease, background-color .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease;
}
#detail .detail-watch-icon {
  width: 24px;
  height: 24px;
  overflow: visible;
  fill: transparent;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linejoin: round;
}
#detail .detail-watch.is-watching,
#detail .detail-watch[aria-pressed="true"] {
  border-color: #FFE99C;
  background: #FFD84D;
  color: #4A3B00;
  box-shadow: 0 6px 18px rgba(255, 183, 40, .36);
}
#detail .detail-watch.is-watching .detail-watch-icon,
#detail .detail-watch[aria-pressed="true"] .detail-watch-icon { fill: currentColor; }
#detail .detail-watch:hover {
  transform: translateY(-1px) scale(1.05);
  border-color: #fff;
  background: rgba(255, 255, 255, .3);
  color: #fff;
  box-shadow: 0 8px 19px rgba(0, 0, 0, .3);
}
#detail .detail-watch.is-watching:hover,
#detail .detail-watch[aria-pressed="true"]:hover {
  border-color: #FFF2BE;
  background: #FFE16B;
  color: #4A3B00;
}
#detail .detail-watch:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}
.inbox-card {
  padding: 0;
  overflow-y: auto;
  scrollbar-width: thin;
}
.eligibility-card {
  padding: 0;
  overflow-y: auto;
  scrollbar-width: thin;
}
.inbox-content { padding: 14px 18px 28px; }
.eligibility-content { padding: 0 18px 28px; }
.eligibility-view-heading { margin: 0 -18px; }
.eligibility-empty {
  margin-top: 13px;
  padding: 17px;
  border: 1px dashed #aac2dc;
  border-radius: 12px;
  background: #f8fbff;
}
.eligibility-empty[hidden] { display: none; }
.eligibility-empty h3 { margin: 0; color: #243d5a; font-size: 16px; }
.eligibility-empty p { margin: 6px 0 0; color: #60748a; font-size: 13px; line-height: 1.55; }
.eligibility-open-notices {
  margin-top: 12px;
  padding: 8px 11px;
  border: 1px solid #2869ab;
  border-radius: 8px;
  background: #2869ab;
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}
.detail-snapshot-note {
  margin: 10px 0 0;
  padding: 8px 10px;
  border: 1px solid #d7e5f4;
  border-radius: 8px;
  background: #f5f9fe;
  color: #536d86;
  font-size: 12px;
  line-height: 1.5;
}
.inbox-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 15px;
  border: 1px solid #CFE1FF;
  border-radius: 10px;
  background: linear-gradient(135deg, #F0F6FF, #FBFDFF);
}
.inbox-summary strong {
  display: block;
  color: var(--deep-accent);
  font-size: 17px;
}
.inbox-summary p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.inbox-last-checked {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  text-align: right;
}
.inbox-personal-schedule {
  margin-top: 10px;
  padding: 13px;
  border: 1px solid #C4DDF5;
  border-radius: 10px;
  background: linear-gradient(135deg, #F5FAFF 0%, #FFFFFF 82%);
}
.inbox-personal-schedule-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.inbox-personal-schedule h3 { margin: 0; color: var(--text); font-size: 16px; }
.inbox-personal-schedule-head p {
  max-width: 520px;
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.45;
}
.inbox-personal-schedule-open {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 6px 9px;
  border: 1px solid #AAC6E6;
  border-radius: 7px;
  background: #FFFFFF;
  color: #245E99;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.3;
  cursor: pointer;
}
.inbox-personal-schedule-list { display: grid; gap: 7px; margin-top: 10px; }
.inbox-personal-schedule-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border: 1px solid #D4E1EE;
  border-radius: 8px;
  background: #FFFFFF;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.inbox-personal-schedule-item-date {
  min-width: 44px;
  color: #245E99;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
  text-align: center;
}
.inbox-personal-schedule-item-copy { min-width: 0; }
.inbox-personal-schedule-item-copy strong,
.inbox-personal-schedule-item-copy small {
  display: block;
  overflow-wrap: anywhere;
}
.inbox-personal-schedule-item-copy strong { color: #244561; font-size: 13px; line-height: 1.35; }
.inbox-personal-schedule-item-copy small { margin-top: 2px; color: #6C8198; font-size: 11.5px; line-height: 1.4; }
.inbox-personal-schedule-item-source {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  min-height: 23px;
  padding: 3px 6px;
  border-radius: 999px;
  background: #E9F3FF;
  color: #245D96;
  font-size: 10.5px;
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
}
.inbox-text-button,
.inbox-notification-button,
.inbox-personal-schedule-open,
.inbox-filter,
.inbox-event-read,
.inbox-watch-remove {
  font: inherit;
  cursor: pointer;
}
.inbox-text-button {
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
  color: var(--deep-accent);
  font-size: 13px;
  font-weight: 700;
}
.inbox-notification-setting {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 10px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface-2);
}
.inbox-notification-setting h3,
.inbox-section h3 { margin: 0; color: var(--text); font-size: 16px; }
.inbox-notification-setting p { margin: 3px 0 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.inbox-notification-button {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 7px 11px;
  border: 1px solid var(--deep-accent);
  border-radius: 7px;
  background: var(--deep-accent);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}
.inbox-notification-button.is-active {
  border-color: #A9DCC4;
  background: #EAF8F0;
  color: #146C43;
}
.inbox-notification-button[disabled] { cursor: default; opacity: .72; }
.inbox-profile-alert-setting {
  border-color: #B8DEC8;
  background: linear-gradient(135deg, #F1FAF5 0%, #FBFEFC 100%);
}
.inbox-profile-alert-setting .inbox-section-kicker { color: #19734A; }
.inbox-profile-alert-status {
  min-height: 17px;
  margin-top: 5px !important;
  color: #176B4D !important;
  font-size: 12px !important;
  font-weight: 700;
}
.profile-card {
  margin-top: 13px;
  padding: 13px;
  border: 1px solid #B8CBEA;
  border-radius: 10px;
  background: linear-gradient(135deg, #F4F8FF 0%, #FBFDFF 100%);
}
.profile-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 13px;
}
.profile-card h3 { margin: 0; color: var(--text); font-size: 16px; }
.profile-card h3 + p { margin: 3px 0 0; color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.profile-form {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #D9E4F2;
}
.profile-form[hidden] { display: none; }
.profile-form-guide { margin: 0 0 10px; color: #536881; font-size: 12px; line-height: 1.5; }
.profile-field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.profile-income-rule { padding: 9px 10px; border: 1px solid #C9DBF7; border-radius: 9px; background: #F5F9FF; color: #28445F; font-size: 12px; line-height: 1.5; }
.profile-income-rule strong { display: block; color: #1C4F80; font-size: 12.5px; }
.profile-income-rule p { margin: 3px 0; }
.profile-income-rule a { color: #1D5F9F; font-weight: 700; }
.profile-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  color: var(--text);
  font-size: 12.5px;
  font-weight: 700;
}
.profile-field-wide { grid-column: 1 / -1; }
.profile-field select,
.profile-field input {
  width: 100%;
  min-height: 36px;
  box-sizing: border-box;
  padding: 7px 8px;
  border: 1px solid #B8C9DC;
  border-radius: 7px;
  background: #FFFFFF;
  color: var(--text);
  font: inherit;
  font-size: 12.5px;
  font-weight: 500;
}
.profile-field select:focus,
.profile-field input:focus { outline: 2px solid rgba(79, 140, 255, .28); outline-offset: 1px; border-color: var(--accent); }
.profile-field-help { margin: -1px 0 0; color: #667A91; font-size: 11px; font-weight: 400; line-height: 1.4; }
.profile-field.is-conditional-inactive {
  position: relative;
  padding: 10px;
  border: 1px dashed #AABCCD;
  border-radius: 9px;
  background: #F2F5F8;
  color: #74869B;
}
.profile-field.is-conditional-inactive::before {
  align-self: flex-start;
  padding: 3px 6px;
  border-radius: 999px;
  background: #DEE6EF;
  color: #52677D;
  content: "현재 입력할 필요 없음";
  font-size: 10px;
  font-weight: 800;
  letter-spacing: -.01em;
  line-height: 1.15;
}
.profile-field.is-conditional-inactive select,
.profile-field.is-conditional-inactive input,
.profile-field.is-conditional-inactive select:disabled,
.profile-field.is-conditional-inactive input:disabled {
  border-color: #C7D2DE;
  background: #E4EAF0;
  color: #8494A5;
  cursor: not-allowed;
  opacity: 1;
}
.profile-field-inactive-note { display: block; color: #63768B; font-size: 11px; font-weight: 500; line-height: 1.4; }
.profile-field-inactive-note[hidden] { display: none; }
.profile-form-actions { display: flex; justify-content: flex-end; gap: 7px; margin-top: 12px; }
.profile-save-button { padding: 7px 11px; border: 1px solid var(--deep-accent); background: var(--deep-accent); color: #FFFFFF; }
.profile-clear-button { padding: 7px 10px; border: 1px solid #D4B5B5; background: #FFF9F9; color: #9D3A3A; }
.profile-live-status { min-height: 18px; margin: 8px 0 0; color: #176B4D; font-size: 12px; font-weight: 650; line-height: 1.4; }
.inbox-section { margin-top: 22px; }
.inbox-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 9px;
}
.inbox-section-kicker {
  display: block;
  margin-bottom: 2px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}
.inbox-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
}
.inbox-filter {
  min-height: 29px;
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.inbox-filter.active {
  border-color: var(--deep-accent);
  background: var(--deep-accent);
  color: #fff;
}
.inbox-event-list,
.inbox-watch-list { display: grid; gap: 8px; }
.inbox-empty {
  margin: 0;
  padding: 19px 14px;
  border: 1px dashed #B9C9DC;
  border-radius: 9px;
  background: #FAFCFF;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  text-align: center;
}
.inbox-event {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
}
.inbox-event.is-unread {
  border-color: #A8C7FF;
  box-shadow: inset 4px 0 0 var(--accent);
}
.inbox-event-open {
  min-width: 0;
  padding: 12px 13px 11px 16px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.inbox-event-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.inbox-event-type {
  display: inline-flex;
  align-items: center;
  min-height: 21px;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--deep-accent);
  font-size: 11.5px;
  font-weight: 800;
}
.inbox-event-type.is-change { background: #FFF3D9; color: #8A4B00; }
.inbox-event-type.is-profile { background: #EAF8F0; color: #176C43; }
.inbox-event-type.is-winner { background: #F2EBFF; color: #6246A7; }
.inbox-event-type.is-contract { background: #EAF8F0; color: #146C43; }
.inbox-event-date { flex: 0 0 auto; color: var(--muted); font-size: 12px; font-weight: 600; }
.inbox-event-name {
  display: block;
  margin-top: 7px;
  overflow: hidden;
  color: var(--text);
  font-size: 15px;
  font-weight: 750;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.inbox-event-title { display: block; margin-top: 3px; color: var(--deep-accent); font-size: 13.5px; font-weight: 700; }
.inbox-event-summary { display: block; margin-top: 3px; color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.inbox-event-evidence {
  display: block;
  margin-top: 6px;
  color: #7A5A22;
  font-size: 11.5px;
  font-weight: 650;
  line-height: 1.35;
}
.inbox-event-read {
  align-self: center;
  min-height: 31px;
  margin-right: 10px;
  padding: 5px 8px;
  border: 1px solid #B8C9DC;
  border-radius: 6px;
  background: var(--surface);
  color: var(--deep-accent);
  font-size: 12px;
  font-weight: 700;
}
.inbox-watch-count { color: var(--muted); font-size: 13px; font-weight: 700; }
.inbox-watch-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 11px 10px 13px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
}
.inbox-watch-open {
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.inbox-watch-name {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.inbox-watch-meta { display: block; margin-top: 3px; overflow: hidden; color: var(--muted); font-size: 12.5px; text-overflow: ellipsis; white-space: nowrap; }
.inbox-watch-remove {
  min-height: 31px;
  padding: 5px 8px;
  border: 1px solid #E8C4C4;
  border-radius: 6px;
  background: #FFF9F9;
  color: #A33A3A;
  font-size: 12px;
  font-weight: 700;
}
.inbox-privacy-note { margin: 9px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.app-view-enter > .inbox-content,
.app-view-enter > .eligibility-content { animation: appViewChildIn .56s var(--motion-ease-out) 110ms backwards; }

@media (min-width: 821px) and (hover: hover) and (pointer: fine) {
  .inbox-text-button:hover,
  .inbox-filter:hover,
  .inbox-event-read:hover,
  .inbox-watch-remove:hover,
  .inbox-personal-schedule-open:hover { border-color: var(--accent); color: var(--deep-accent); }
  .inbox-notification-button:hover { filter: brightness(1.08); }
  .inbox-event-open:hover,
  .inbox-watch-open:hover { background: #F7FAFF; }
}

@media (max-width: 820px) {
  #detail .detail-eyebrow,
  #detail .detail-hero h2 { padding-right: 58px; }
  #detail .detail-watch { top: -1px; right: -1px; }
  .inbox-card,
  .eligibility-card { min-height: calc(100dvh - 138px); overflow: visible; }
  .inbox-content { padding: 12px 12px calc(24px + env(safe-area-inset-bottom)); }
  .eligibility-content { padding: 0 12px calc(24px + env(safe-area-inset-bottom)); }
  .eligibility-view-heading { margin: 0 -12px; }
  .inbox-summary { align-items: flex-start; padding: 13px; }
  .inbox-last-checked { max-width: 110px; font-size: 11.5px; line-height: 1.4; }
  .inbox-personal-schedule { padding: 12px; }
  .inbox-personal-schedule-head { flex-direction: column; gap: 9px; }
  .inbox-personal-schedule-open { width: 100%; }
  .inbox-personal-schedule-item { align-items: start; grid-template-columns: auto minmax(0, 1fr); }
  .inbox-personal-schedule-item-source { grid-column: 2; justify-self: start; }
  .inbox-notification-setting { align-items: flex-start; flex-direction: column; gap: 9px; }
  .inbox-notification-button { width: 100%; }
  .profile-card { margin-top: 11px; padding: 12px; }
  .profile-field-grid { grid-template-columns: 1fr; }
  .profile-field-wide { grid-column: auto; }
  .profile-form-actions { flex-direction: column; }
  .profile-save-button,
  .profile-clear-button { width: 100%; }
  .eligibility-diagnosis { padding: 12px; }
  .eligibility-diagnosis-head { gap: 10px; }
  .eligibility-item-top { align-items: flex-start; flex-direction: column; gap: 1px; }
  .eligibility-item-value { text-align: left; }
  .inbox-section { margin-top: 19px; }
  .inbox-section-head { align-items: flex-start; flex-direction: column; gap: 8px; }
  .inbox-filters { width: 100%; flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; padding-bottom: 1px; }
  .inbox-filter { flex: 0 0 auto; }
  .inbox-event-open { padding: 12px 10px 11px 13px; }
  .inbox-event-read { margin-right: 8px; }
  .app-view-enter > .inbox-content,
  .app-view-enter > .eligibility-content { animation: mobileAppViewChildIn .52s var(--motion-ease-out) 80ms backwards; }
}

@media (max-width: 420px) {
  .app-nav { gap: 4px; padding: 6px; }
  .app-nav-indicator { top: 6px; bottom: 6px; left: 6px; width: calc(14.285714% - 5.1429px); }
  body[data-app-view="inbox"] .app-nav-indicator { transform: translate3d(calc(100% + 4px), 0, 0); }
  body[data-app-view="eligibility"] .app-nav-indicator { transform: translate3d(calc(200% + 8px), 0, 0); }
  body[data-app-view="calendar"] .app-nav-indicator { transform: translate3d(calc(300% + 12px), 0, 0); }
  body[data-app-view="upcoming"] .app-nav-indicator { transform: translate3d(calc(400% + 16px), 0, 0); }
  body[data-app-view="detail"] .app-nav-indicator { transform: translate3d(calc(500% + 20px), 0, 0); }
  body[data-app-view="payment"] .app-nav-indicator { transform: translate3d(calc(600% + 24px), 0, 0); }
  .app-nav-label { font-size: 10px; }
  .app-nav-label-wide { display: none; }
  .app-nav-label-compact { display: inline; }
  .app-nav-badge { top: 2px; right: 2px; min-width: 15px; height: 15px; font-size: 9px; }
  .inbox-summary { gap: 8px; }
  .inbox-summary strong { font-size: 16px; }
  .inbox-personal-schedule-item { gap: 7px; padding: 9px; }
  .inbox-personal-schedule-item-date { min-width: 38px; }
  .inbox-event { grid-template-columns: minmax(0, 1fr); }
  .inbox-event-read { justify-self: end; margin: 0 10px 9px; }
}

@media (prefers-reduced-motion: reduce) {
  .app-view-enter > .inbox-content,
  .app-view-enter > .eligibility-content { animation: none !important; }
  #detail .detail-watch { transition: none; }
}

/* 개인 후보 비교와 시장 참고 카드 */
.candidate-workbench-guide,
.candidate-schedule-note,
.market-analysis-guide {
  margin: 0 0 12px;
  color: #637083;
  font-size: 13px;
  line-height: 1.55;
}

.candidate-list,
.candidate-schedule-list {
  display: grid;
  gap: 10px;
}

.candidate-card {
  display: grid;
  gap: 9px;
  padding: 14px;
  border: 1px solid #dbe4ef;
  border-radius: 14px;
  background: linear-gradient(145deg, #ffffff, #f7faff);
}

.candidate-card-head,
.market-card-heading,
.market-analysis-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.candidate-open {
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: transparent;
  color: #172b4d;
  font: inherit;
  font-weight: 800;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.candidate-open:hover,
.candidate-open:focus-visible { color: #075bc8; text-decoration: underline; }

.candidate-status,
.market-card-badge,
.notice-change-impact {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  min-height: 23px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.candidate-status.is-priority { color: #0a6248; background: #e2f8ed; }
.candidate-status.is-consider { color: #1559a8; background: #e8f1ff; }
.candidate-status.is-caution,
.candidate-status.is-not-eligible { color: #a44020; background: #ffebe5; }
.candidate-status.is-needs-info { color: #5b6675; background: #edf1f5; }

.candidate-score { margin: 0; color: #344255; font-size: 13px; line-height: 1.5; }
.candidate-reasons { display: grid; gap: 4px; margin: 0; padding-left: 18px; color: #536275; font-size: 12px; line-height: 1.45; }
.candidate-reasons .is-missing { color: #8a5a18; }

.candidate-remove {
  justify-self: start;
  padding: 5px 0;
  border: 0;
  background: transparent;
  color: #6a7788;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}

.candidate-schedule-row {
  display: grid;
  grid-template-columns: minmax(88px, auto) minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 11px 12px;
  border-left: 3px solid #9fb3c8;
  border-radius: 10px;
  background: #f7f9fc;
}

.candidate-schedule-row.is-ongoing { border-left-color: #1264c3; background: #eef6ff; }
.candidate-schedule-row.is-upcoming { border-left-color: #21815d; background: #f0faf5; }
.candidate-schedule-row.is-past { border-left-color: #b5bdc8; }
.candidate-schedule-row strong { color: #24364e; font-size: 12px; }
.candidate-schedule-row span,
.candidate-schedule-row small { display: block; }
.candidate-schedule-row span { color: #26384f; font-size: 13px; font-weight: 700; line-height: 1.35; }
.candidate-schedule-row small { margin-top: 3px; color: #6c7989; font-size: 11px; }

.market-analysis { display: grid; gap: 15px; }
.market-analysis-head { align-items: flex-start; }
.market-analysis-head h3 { margin: 3px 0 0; }
.market-analysis-kicker { color: #2164aa; font-size: 12px; font-weight: 800; letter-spacing: .03em; }
.market-analysis-status { max-width: 210px; color: #637083; font-size: 12px; line-height: 1.45; text-align: right; }
.market-analysis-status.is-ready { color: #16704e; }
.market-analysis-status.is-error { color: #a44020; }
.market-analysis-status.is-loading { color: #2468aa; }

.market-analysis-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 12px; }
.market-analysis-card,
.market-comparables {
  padding: 15px;
  border: 1px solid #d9e3ee;
  border-radius: 15px;
  background: #fff;
}

.market-card-heading h4,
.market-comparables h4 { min-width: 0; margin: 0; overflow-wrap: anywhere; color: #24364e; font-size: 14px; }
.market-card-value { display: block; margin-top: 11px; color: #172b4d; font-size: 17px; line-height: 1.35; }
.market-analysis-card p { margin: 7px 0 0; color: #5c6b7d; font-size: 12px; line-height: 1.55; }
.market-card-detail { display: block; margin-top: 8px; overflow-wrap: anywhere; white-space: pre-line; color: #667688; font-size: 11px; line-height: 1.45; }
.market-card-badge.is-high { color: #a44020; background: #ffebe5; }
.market-card-badge.is-low { color: #0a6248; background: #e2f8ed; }
.market-card-badge.is-medium { color: #59697a; background: #edf1f5; }
.market-card-badge.is-market-high { color: #825612; background: #fff2d8; }
.market-card-badge.is-market-low { color: #0d6653; background: #e2f7ef; }
.market-card-badge.is-market-neutral { color: #28567f; background: #e7f0fa; }
.market-card-badge.is-market-low-confidence { color: #885c11; background: #fff4d8; }
.market-card-badge.is-loading { gap: 5px; }
.market-card-loading-spinner {
  box-sizing: border-box;
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  border: 1.5px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: marketCardLoadingSpin .8s linear infinite;
}
@keyframes marketCardLoadingSpin { to { transform: rotate(360deg); } }
.market-competitiveness-bands { display: grid; gap: 10px; }
.market-competitiveness-band {
  padding: 11px;
  border: 1px solid #d9e5f1;
  border-radius: 11px;
  background: linear-gradient(145deg, #fbfdff, #f3f8ff);
}
.market-competitiveness-band .market-card-value { margin-top: 8px; font-size: 16px; }
.market-competitiveness-band .market-card-value.market-price-gap {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 3px 5px;
  margin-top: 10px;
}
.market-competitiveness-band .market-card-value.market-price-gap,
.market-supply-stat dd strong {
  color: #14335c;
  font-family: inherit;
  font-size: 20px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  letter-spacing: -.04em;
  line-height: 1.1;
}
.market-price-gap .market-card-value-detail {
  color: #6a7889;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.35;
  white-space: nowrap;
}
.market-price-gap .market-card-value-main { white-space: nowrap; }
.market-supply-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 11px 0 0; }
.market-supply-stat { min-width: 0; padding: 10px; border: 1px solid #d9e5f1; border-radius: 10px; background: #f7f9fc; }
.market-supply-stat.is-subscription { border-color: #bfd6f0; background: #edf5ff; }
.market-supply-stat dt { color: #5f7185; font-size: 11px; font-weight: 800; }
.market-supply-stat dd { min-width: 0; margin: 4px 0 0; }
.market-supply-stat dd strong { display: block; overflow-wrap: anywhere; }
.market-supply-stat dd small { display: block; margin-top: 4px; color: #6a7889; font-size: 10.5px; line-height: 1.35; overflow-wrap: anywhere; }
.market-supply-breakdown { margin-top: 14px; padding-top: 13px; border-top: 1px solid #dfe7f0; }
.market-supply-breakdown h5 { margin: 0; color: #315474; font-size: 12px; }
.market-supply-list { display: grid; gap: 7px; margin: 9px 0 0; padding: 0; list-style: none; }
.market-supply-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 9px 10px;
  border-radius: 9px;
  background: #f5f8fc;
}
.market-supply-name { min-width: 0; overflow-wrap: anywhere; color: #2a3b52; font-size: 12px; line-height: 1.4; white-space: normal; }
.market-supply-meta { display: grid; min-width: 0; justify-items: end; gap: 3px; color: #677587; font-size: 11px; line-height: 1.4; text-align: right; }
.market-supply-counts { display: flex; max-width: 100%; flex-wrap: wrap; justify-content: flex-end; gap: 3px 10px; }
.market-supply-count { display: inline-flex; max-width: 100%; align-items: baseline; gap: 4px; white-space: nowrap; }
.market-supply-count strong { color: #14335c; font-variant-numeric: tabular-nums; }
.market-analysis-card p.market-supply-empty { margin-top: 9px; padding: 10px; border-radius: 9px; background: #f6f8fb; color: #687687; }
.market-comparable-band + .market-comparable-band { margin-top: 15px; padding-top: 14px; border-top: 1px solid #e1e8f0; }
.market-comparable-band h5 { margin: 0; color: #315474; font-size: 13px; }

.market-comparable-note,
.market-empty,
.market-partial-note { margin: 7px 0 10px; color: #667688; font-size: 12px; line-height: 1.5; }
.market-comparable-note { white-space: pre-line; }
.market-partial-note { margin: 10px 0 0; color: #8a5a18; }
.market-comparable-list { display: grid; gap: 7px; }
.market-comparable-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 10px; border-radius: 9px; background: #f6f8fb; }
.market-comparable-row strong { min-width: 0; overflow: hidden; color: #2a3b52; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.market-comparable-row span { min-width: 0; flex: 0 0 auto; overflow-wrap: anywhere; color: #5f6d7e; font-size: 11px; text-align: right; }

.market-existing-reference {
  margin-top: 12px;
  padding: 11px;
  border: 1px solid #d8dee7;
  border-radius: 11px;
  background: #f7f8fa;
}
.market-existing-reference-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.market-existing-reference h6 { margin: 0; color: #3f4d5f; font-size: 12px; }
.market-existing-reference-badge { flex: 0 0 auto; padding: 2px 7px; border-radius: 999px; color: #5f6976; background: #e5e8ed; font-size: 10px; font-weight: 800; white-space: nowrap; }
.market-existing-reference-rule,
.market-existing-reference-empty,
.market-existing-reference-limit { margin: 6px 0 0; color: #687483; font-size: 11px; line-height: 1.5; }
.market-existing-reference-summary { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 9px 0 7px; color: #586575; font-size: 11px; }
.market-existing-reference-summary strong { color: #33445a; font-size: 13px; }
.market-existing-reference-list { display: grid; gap: 6px; }
.market-existing-reference-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 8px; border-radius: 8px; background: #fff; }
.market-existing-reference-row strong { min-width: 0; overflow: hidden; color: #3e4b5d; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.market-existing-reference-row span { min-width: 0; color: #697687; font-size: 11px; overflow-wrap: anywhere; text-align: right; }

@media (max-width: 480px) {
  .market-existing-reference-summary,
  .market-existing-reference-row { align-items: flex-start; flex-direction: column; gap: 3px; }
  .market-existing-reference-row strong { max-width: 100%; overflow-wrap: anywhere; white-space: normal; }
  .market-existing-reference-row span { text-align: left; }
}

.notice-change-row.is-high { border-left-color: #d76c4b; }
.notice-change-row.is-medium { border-left-color: #d09a35; }
.notice-change-row.is-low { border-left-color: #8fa2b8; }
.notice-change-impact { margin-left: 6px; vertical-align: middle; color: #5f6d7e; background: #edf1f5; }
.notice-change-impact.is-high { color: #a44020; background: #ffebe5; }
.notice-change-impact.is-medium { color: #885c11; background: #fff4d8; }

@media (max-width: 820px) {
  /* 시세·납부 탭 추가 뒤 확률 탭이 가로 스크롤 밖으로 밀리지 않게 모든 탭을 고정 그리드로 표시한다. */
  #detail .tab-bar { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); min-width: 0; overflow: visible; scroll-snap-type: none; }
  #detail .tab-btn { min-width: 0; white-space: normal; }
  .market-analysis-grid { grid-template-columns: 1fr; }
  .market-analysis-status { max-width: 150px; }
}

@media (max-width: 480px) {
  .candidate-card,
  .market-analysis-card,
  .market-comparables { padding: 12px; }
  .market-card-heading { gap: 6px; }
  .market-card-badge { padding-right: 7px; padding-left: 7px; font-size: 10px; }
  .market-supply-row { grid-template-columns: 1fr; gap: 4px; }
  .market-supply-meta { justify-items: start; text-align: left; }
  .market-supply-counts { justify-content: flex-start; }
  .candidate-schedule-row { grid-template-columns: 1fr; gap: 3px; }
  .market-analysis-head { align-items: flex-start; flex-direction: column; }
  .market-analysis-status { max-width: none; text-align: left; }
  .market-comparable-row { align-items: flex-start; flex-direction: column; gap: 3px; }
  .market-comparable-row span { text-align: left; }
}

@media (max-width: 360px) {
  .market-supply-summary { grid-template-columns: 1fr; }
  .market-supply-counts { display: grid; justify-content: stretch; }
}

/* 청약드림 C+B 반응형 UI */
:root {
  --bg: #F5F7FC;
  --surface: #FFFFFF;
  --surface-2: #F1F4FA;
  --border: #DFE4EF;
  --text: #172033;
  --muted: #667085;
  --faint: #98A2B3;
  --accent: #3E5CE8;
  --accent-soft: #EEF1FF;
  --accent-border: #BBC7FF;
  --green: #138663;
  --green-soft: #E7F7F0;
  --green-border: #B8E7D5;
  --danger: #D92D20;
  --deep-1: #2E43B8;
  --deep-2: #5B77F2;
  --deep-accent: #3554D1;
  --deep-accent-2: #2947BE;
  --deep-sub: #E9EDFF;
  --deep-label: #DDE4FF;
  --font-base: 16px;
  --dream-shadow-soft: 0 8px 24px rgba(35, 54, 120, .08);
  --dream-shadow-card: 0 10px 28px rgba(35, 54, 120, .10);
}

html,
body {
  background: var(--bg);
  color: var(--text);
}

body {
  padding-bottom: 0;
}

.page {
  width: 100%;
  max-width: 1200px;
  padding: 0 24px 24px;
}

header.app-header {
  min-height: 108px;
  margin: 24px 0 0;
  padding: 22px 28px;
  overflow: hidden;
  border: 0;
  border-radius: 24px;
  background:
    radial-gradient(circle at 86% 18%, rgba(255, 255, 255, .24), transparent 24%),
    linear-gradient(132deg, var(--deep-1) 0%, var(--deep-2) 100%);
  box-shadow: 0 16px 38px rgba(46, 67, 184, .22);
}

header.app-header::after {
  content: "";
  position: absolute;
  right: -54px;
  bottom: -94px;
  width: 220px;
  height: 220px;
  border: 34px solid rgba(255, 255, 255, .10);
  border-radius: 50%;
  pointer-events: none;
}

header.app-header .hero-content {
  position: relative;
  z-index: 1;
  padding: 0 0 0 78.4px;
}

.brand-mark {
  position: absolute;
  top: 50%;
  left: 0;
  width: 62.4px;
  height: 62.4px;
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 19.5px;
  box-shadow: 0 9px 22px rgba(14, 30, 104, .26), inset 0 1px 0 rgba(255, 255, 255, .22);
  transform: translateY(-50%);
}

header.app-header .hero-label {
  color: var(--deep-label);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .02em;
}

header.app-header h1 {
  margin-top: 3px;
  color: #FFFFFF;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -.04em;
}

header.app-header p {
  display: block;
  margin: 6px 0 0;
  color: var(--deep-sub);
  font-size: 14px;
}

.hero-house { display: none; }

#compare-section { margin-top: 12px; }

#compare-section > .toggle-btn {
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--dream-shadow-soft);
}

.error-banner.is-compact {
  padding: 0;
  border-color: var(--accent-border);
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--deep-accent);
  font-size: 13px;
}

.error-banner.is-compact .error-banner-details { width: 100%; }

.error-banner.is-compact summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 40px;
  padding: 8px 12px;
  cursor: pointer;
  list-style: none;
}

.error-banner.is-compact summary::-webkit-details-marker { display: none; }

.error-banner.is-compact summary strong {
  font-size: 13px;
  font-weight: 800;
}

.error-banner.is-compact .error-banner-more {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.error-banner.is-compact p {
  margin: 0;
  padding: 0 12px 11px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.app-nav {
  position: sticky;
  top: 12px;
  right: auto;
  bottom: auto;
  left: auto;
  z-index: 80;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  width: 100%;
  max-width: none;
  gap: 6px;
  margin: 12px 0 0;
  padding: 8px;
  border: 1px solid rgba(218, 225, 241, .92);
  border-radius: 20px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 12px 30px rgba(35, 54, 120, .11);
  backdrop-filter: blur(18px);
  transform: none;
}

.app-nav-indicator {
  top: 8px;
  bottom: 8px;
  left: 8px;
  width: calc((100% - 52px) / 7);
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--deep-accent), var(--accent));
  box-shadow: 0 8px 18px rgba(53, 84, 209, .24);
  transition: transform .42s var(--motion-ease-standard);
}

body[data-app-view="upcoming"] .app-nav-indicator { transform: translate3d(calc(100% + 6px), 0, 0); }
body[data-app-view="eligibility"] .app-nav-indicator { transform: translate3d(calc(200% + 12px), 0, 0); }
body[data-app-view="calendar"] .app-nav-indicator { transform: translate3d(calc(300% + 18px), 0, 0); }
body[data-app-view="inbox"] .app-nav-indicator { transform: translate3d(calc(400% + 24px), 0, 0); }
body[data-app-view="detail"] .app-nav-indicator { transform: translate3d(calc(500% + 30px), 0, 0); }
body[data-app-view="payment"] .app-nav-indicator { transform: translate3d(calc(600% + 36px), 0, 0); }

.app-nav-item {
  min-height: 60px;
  padding: 7px 4px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--muted);
}

.app-nav-label {
  font-size: 12px;
  font-weight: 700;
}

.app-nav-item.active {
  border-color: transparent;
  background: transparent;
  color: #FFFFFF;
}

.app-nav-item[aria-disabled="true"] {
  color: var(--faint);
}

.app-nav-item:focus-visible {
  outline: 3px solid var(--accent-border);
  outline-offset: 2px;
}

main#app-main {
  height: calc(100dvh - 236px);
  min-height: 620px;
  padding: 14px 0 0;
}

main#app-main > .app-view {
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--dream-shadow-soft);
}

.view-heading {
  min-height: 86px;
  padding: 18px 22px 12px;
  border-bottom: 0;
}

.view-kicker {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

.view-heading h2,
.landing-guide .view-heading .guide-title {
  margin-top: 3px;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -.035em;
}

.view-heading-meta {
  color: var(--muted);
  font-weight: 600;
}

.list-card {
  background: var(--surface);
}

.list-controls {
  grid-template-columns: minmax(240px, 1.15fr) minmax(360px, 1fr) minmax(190px, auto);
  gap: 12px;
  padding: 22px 22px 18px;
  border-bottom: 0;
  background: transparent;
}

#search {
  height: 52px;
  padding-left: 46px;
  border: 1px solid transparent;
  border-radius: 16px;
  background: var(--surface-2);
  font-size: 15px;
  transition: border-color .18s ease, background-color .18s ease, box-shadow .18s ease;
}

#search:hover { border-color: var(--accent-border); }

#search:focus {
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: 0 0 0 4px rgba(62, 92, 232, .12);
}

.region-toggle { gap: 8px; }

.region-btn {
  min-height: 46px;
  padding: 8px 10px;
  border-color: var(--border);
  border-radius: 14px;
  background: var(--surface);
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  transition: border-color .18s ease, background-color .18s ease, color .18s ease, transform .18s ease;
}

.region-btn:hover:not(.active) {
  border-color: var(--accent-border);
  background: var(--accent-soft);
}

.region-btn.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #FFFFFF;
  box-shadow: 0 7px 16px rgba(62, 92, 232, .20);
}

.list-summary-label { color: var(--muted); }
.list-summary-count { color: var(--accent); font-weight: 800; }

#complex-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 0 22px 22px;
}

.complex-card {
  min-height: 126px;
  gap: 10px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: 0 5px 18px rgba(35, 54, 120, .06);
  transition: border-color .18s ease, background-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.complex-card:hover {
  border-color: var(--accent-border);
  background: var(--surface);
  box-shadow: var(--dream-shadow-card);
  transform: translateY(-2px);
}

.complex-card.selected {
  border: 1px solid var(--accent);
  border-left: 1px solid var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 3px rgba(62, 92, 232, .10), var(--dream-shadow-card);
}

.complex-card:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.complex-card .card-name {
  margin-top: 9px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -.025em;
}

.complex-card .card-meta {
  gap: 5px;
  margin-top: 8px;
  overflow: hidden;
  font-size: 13px;
}

.complex-card .card-meta-text { flex: 0 0 auto; }

.complex-card .card-meta .card-special-allocation {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.complex-card.has-upcoming {
  min-height: 126px;
}

.card-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.card-status-date {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.card-status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}

.card-status-chip.is-upcoming { background: var(--accent-soft); color: var(--deep-accent); }
.card-status-chip.is-current { background: var(--green-soft); color: #096A4D; }
.card-status-chip.is-complete { background: var(--surface-2); color: var(--muted); }
.card-status-chip.is-undated { background: #FFF4D8; color: #8A5A18; }

.complex-card .card-status-date.card-upcoming {
  display: inline;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--deep-accent);
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
}

.app-nav-selection-hint {
  border-radius: 12px;
}

@media (min-width: 821px) and (hover: hover) and (pointer: fine) {
  .app-nav-item:hover:not(.active):not([aria-disabled="true"]) {
    border-color: transparent;
    background: var(--accent-soft);
    color: var(--deep-accent);
    box-shadow: none;
  }

  .app-nav-item.active:hover {
    background: transparent;
    color: #FFFFFF;
  }
}

@media (max-width: 1100px) and (min-width: 821px) {
  .list-controls {
    grid-template-columns: minmax(190px, 1fr) minmax(330px, 1.2fr) minmax(150px, auto);
  }
}

@media (max-width: 820px) {
  html,
  body { background: var(--bg); }

  body { padding-bottom: calc(104px + env(safe-area-inset-bottom)); }

  .page {
    max-width: none;
    padding: 0;
  }

  header.app-header {
    min-height: 82px;
    margin: 0;
    padding: 13px 18px 15px;
    border: 0;
    border-radius: 0 0 22px 22px;
    box-shadow: 0 10px 24px rgba(46, 67, 184, .20);
  }

  header.app-header .hero-content {
    padding: 0 0 0 62.7px;
  }

  .brand-mark {
    width: 50.7px;
    height: 50.7px;
    border-radius: 15.6px;
    box-shadow: 0 7px 18px rgba(14, 30, 104, .24), inset 0 1px 0 rgba(255, 255, 255, .20);
  }

  header.app-header .hero-label { font-size: 11px; }
  header.app-header h1 { margin-top: 1px; font-size: 22px; }
  header.app-header p { margin-top: 3px; font-size: 12px; }

  .error-banner.is-compact { margin: 10px 14px 0; }

  #compare-section { margin: 10px 14px 0; }

  .app-nav {
    position: fixed;
    top: auto;
    right: auto;
    bottom: calc(8px + env(safe-area-inset-bottom));
    left: 50%;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    width: calc(100% - 24px);
    max-width: 520px;
    gap: 5px;
    margin: 0;
    padding: 7px;
    border-color: rgba(218, 225, 241, .94);
    border-radius: 22px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 16px 38px rgba(35, 54, 120, .20);
    transform: translateX(-50%);
  }

  #app-nav-detail,
  #app-nav-payment { display: none; }

  .app-nav-indicator {
    top: 7px;
    bottom: 7px;
    left: 7px;
    width: calc((100% - 34px) / 5);
    border: 0;
    border-radius: 16px;
    background: var(--accent-soft);
    box-shadow: none;
  }

  body[data-app-view="upcoming"] .app-nav-indicator { transform: translate3d(calc(100% + 5px), 0, 0); }
  body[data-app-view="eligibility"] .app-nav-indicator { transform: translate3d(calc(200% + 10px), 0, 0); }
  body[data-app-view="calendar"] .app-nav-indicator { transform: translate3d(calc(300% + 15px), 0, 0); }
  body[data-app-view="inbox"] .app-nav-indicator { transform: translate3d(calc(400% + 20px), 0, 0); }
  body[data-app-view="detail"] .app-nav-indicator,
  body[data-app-view="payment"] .app-nav-indicator { transform: translate3d(0, 0, 0); }

  .app-nav-item {
    min-height: 62px;
    padding: 7px 2px;
    border-radius: 16px;
    color: var(--muted);
  }

  .app-nav-item.active,
  body[data-app-view="detail"] #app-nav-notices,
  body[data-app-view="payment"] #app-nav-notices {
    color: var(--accent);
  }

  .app-nav-item:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 1px;
  }

  main#app-main {
    height: auto;
    min-height: 0;
    padding: 14px 0 0;
  }

  main#app-main > .app-view {
    min-height: calc(100dvh - 196px);
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .view-heading {
    min-height: 72px;
    padding: 8px 18px 12px;
  }

  .view-heading h2,
  .landing-guide .view-heading .guide-title { font-size: 22px; }

  .list-card { background: transparent; }

  .list-controls {
    display: block;
    margin: 0 14px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: var(--surface);
    box-shadow: var(--dream-shadow-soft);
  }

  .list-controls .search-box { margin-bottom: 10px; }
  .list-controls .region-toggle { margin-bottom: 11px; }

  #search { height: 50px; border-radius: 15px; }

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

  .region-btn {
    min-width: 0;
    min-height: 44px;
    padding: 7px 4px;
    border-radius: 13px;
    font-size: 13px;
    white-space: normal;
  }

  #complex-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 14px 14px 24px;
    overflow: visible;
  }

  .complex-card,
  .complex-card.has-upcoming {
    min-height: 0;
    height: auto;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--surface);
    box-shadow: 0 5px 18px rgba(35, 54, 120, .07);
  }

  .complex-card:hover { background: var(--surface); transform: none; }

  .complex-card.selected {
    border: 1px solid var(--accent);
    background: var(--accent-soft);
  }

  .complex-card .card-name {
    overflow: visible;
    white-space: normal;
  }

  .complex-card .card-meta-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .complex-card .card-meta .card-special-allocation {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.mobile-detail-open .detail-card {
    background: var(--surface);
  }
}

@media (max-width: 420px) {
  header.app-header { padding-right: 14px; padding-left: 14px; }
  .view-heading { padding-right: 14px; padding-left: 14px; }
  .view-heading-meta { display: none; }

  .list-controls {
    margin-right: 12px;
    margin-left: 12px;
    padding: 13px;
    border-radius: 20px;
  }

  #complex-list {
    gap: 10px;
    padding-right: 12px;
    padding-left: 12px;
  }

  .complex-card,
  .complex-card.has-upcoming {
    padding: 14px;
    border-radius: 18px;
  }

  .complex-card .card-name { font-size: 17px; }

  .app-nav {
    width: calc(100% - 16px);
    gap: 4px;
    padding: 6px;
    border-radius: 20px;
  }

  .app-nav-indicator {
    top: 6px;
    bottom: 6px;
    left: 6px;
    width: calc((100% - 28px) / 5);
  }

  body[data-app-view="upcoming"] .app-nav-indicator { transform: translate3d(calc(100% + 4px), 0, 0); }
  body[data-app-view="eligibility"] .app-nav-indicator { transform: translate3d(calc(200% + 8px), 0, 0); }
  body[data-app-view="calendar"] .app-nav-indicator { transform: translate3d(calc(300% + 12px), 0, 0); }
  body[data-app-view="inbox"] .app-nav-indicator { transform: translate3d(calc(400% + 16px), 0, 0); }
  body[data-app-view="detail"] .app-nav-indicator,
  body[data-app-view="payment"] .app-nav-indicator { transform: translate3d(0, 0, 0); }

  .app-nav-label { font-size: 10.5px; }
  .app-nav-icon { width: 21px; height: 21px; }
}

@media (max-width: 360px) {
  .region-btn { font-size: 12px; }
  .card-status-row { gap: 6px; }
  .app-nav-label { font-size: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .card-upcoming,
  .up-new-badge { animation: none !important; }

  .complex-card,
  .region-btn,
  #search { transition: none !important; }
}

/* 자격 진단을 한 단계씩 진행하는 앱형 작업 화면. */
.eligibility-card {
  --eligibility-accent: #4F56E8;
  --eligibility-accent-strong: #3941C9;
  --eligibility-soft: #F0F1FF;
  --eligibility-ink: #171A2B;
  background: #F5F6FA;
}

.eligibility-content {
  width: min(100%, 1000px);
  margin: 0 auto;
  padding: 24px;
}

.eligibility-card [hidden],
.eligibility-card button[hidden],
.eligibility-card .profile-field.is-conditional-inactive[hidden] {
  display: none !important;
}

.eligibility-card .profile-card {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 24px;
  background: transparent;
  box-shadow: none;
}

.eligibility-card .profile-card-head {
  align-items: center;
  gap: 24px;
  padding: 24px 26px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 86% 20%, rgba(255, 255, 255, .24), transparent 26%),
    linear-gradient(135deg, #363DC7 0%, #5960EE 100%);
  box-shadow: 0 16px 36px rgba(52, 60, 185, .2);
}

.eligibility-card .profile-card-kicker {
  display: block;
  margin-bottom: 5px;
  color: #DCDDFF;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
}

.eligibility-card .profile-card h3 {
  color: #FFFFFF;
  font-size: clamp(21px, 2.4vw, 27px);
  font-weight: 800;
  letter-spacing: -.035em;
}

.eligibility-card .profile-card h3 + p {
  margin-top: 6px;
  color: rgba(255, 255, 255, .8);
  font-size: 13.5px;
}

.eligibility-card .profile-edit-button {
  min-height: 46px;
  padding: 10px 16px;
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 14px;
  background: #FFFFFF;
  color: #333AB6;
  font-size: 13px;
  box-shadow: 0 6px 18px rgba(27, 32, 124, .16);
}

.eligibility-card .profile-form {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 16px 20px;
  margin-top: 18px;
  padding: 20px;
  border: 1px solid #E2E5EF;
  border-radius: 24px;
  background: #FFFFFF;
  box-shadow: 0 14px 38px rgba(36, 42, 86, .08);
}

.eligibility-card .profile-privacy-note {
  grid-column: 1 / -1;
  grid-row: 1;
  border: 1px solid #E7E9F1;
  border-radius: 13px;
  background: #FAFAFD;
  color: #5D6274;
}

.eligibility-card .profile-privacy-note summary,
.eligibility-card .profile-step-help summary,
.eligibility-card .profile-income-rule summary,
.eligibility-card .eligibility-result-summary {
  cursor: pointer;
  list-style: none;
}

.eligibility-card .profile-privacy-note summary::-webkit-details-marker,
.eligibility-card .profile-step-help summary::-webkit-details-marker,
.eligibility-card .profile-income-rule summary::-webkit-details-marker,
.eligibility-card .eligibility-result-summary::-webkit-details-marker {
  display: none;
}

.eligibility-card .profile-privacy-note summary {
  min-height: 42px;
  padding: 10px 13px;
  font-size: 12.5px;
  font-weight: 750;
}

.eligibility-card .profile-privacy-note summary::after,
.eligibility-card .profile-income-rule summary::after,
.eligibility-card .eligibility-result-summary::after {
  float: right;
  content: "+";
  color: var(--eligibility-accent);
  font-size: 17px;
  font-weight: 500;
  line-height: 1;
}

.eligibility-card .profile-privacy-note[open] summary::after,
.eligibility-card .profile-income-rule[open] summary::after,
.eligibility-card .eligibility-result-details[open] .eligibility-result-summary::after {
  content: "−";
}

.eligibility-card .profile-privacy-note p {
  margin: 0;
  padding: 0 13px 12px;
  color: #676C7D;
  font-size: 12px;
  line-height: 1.55;
}

.eligibility-card .profile-stepper {
  display: grid;
  grid-column: 1;
  grid-row: 2 / span 2;
  align-content: start;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.eligibility-card .profile-step-button {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 58px;
  padding: 9px 12px;
  border: 1px solid transparent;
  border-radius: 16px;
  background: transparent;
  color: #74798B;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, color .18s ease;
}

.eligibility-card .profile-step-button > span {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid #D8DBE6;
  border-radius: 50%;
  background: #FFFFFF;
  color: #777C8E;
  font-size: 13px;
  font-weight: 800;
}

.eligibility-card .profile-step-button strong {
  min-width: 0;
  font-size: 14px;
  font-weight: 750;
  word-break: keep-all;
}

.eligibility-card .profile-step-button[aria-current="step"] {
  border-color: #D6D9FF;
  background: var(--eligibility-soft);
  color: var(--eligibility-accent-strong);
}

.eligibility-card .profile-step-button[aria-current="step"] > span {
  border-color: var(--eligibility-accent);
  background: var(--eligibility-accent);
  color: #FFFFFF;
  box-shadow: 0 5px 12px rgba(79, 86, 232, .22);
}

.eligibility-card .profile-step-button.is-complete > span {
  border-color: #BFC4FF;
  background: #E9EAFF;
  color: var(--eligibility-accent-strong);
}

.eligibility-card .profile-step-progress {
  grid-column: 2;
  grid-row: 2;
  align-self: center;
  overflow: hidden;
  height: 6px;
  border-radius: 999px;
  background: #ECEEF4;
}

.eligibility-card .profile-step-progress > span {
  display: block;
  width: 25%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #4A51D8, #7176F6);
  transition: width .24s ease;
}

.eligibility-card .profile-step-panels {
  grid-column: 2;
  grid-row: 3;
  min-width: 0;
}

.eligibility-card .profile-step-panel {
  min-width: 0;
  margin: 0;
  padding: 22px;
  border: 1px solid #E1E4EE;
  border-radius: 20px;
  background: #FCFCFE;
}

.eligibility-card .profile-step-panel > legend {
  width: 100%;
  margin: 0;
  padding: 0 0 18px;
  color: var(--eligibility-ink);
}

.eligibility-card .profile-step-panel > legend > span {
  display: block;
  margin-bottom: 3px;
  color: var(--eligibility-accent);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .08em;
}

.eligibility-card .profile-step-panel > legend > strong {
  display: block;
  font-size: 22px;
  font-weight: 820;
  letter-spacing: -.035em;
}

.eligibility-card .profile-step-panel > legend > small {
  display: block;
  margin-top: 5px;
  color: #74798A;
  font-size: 12.5px;
  font-weight: 500;
}

.eligibility-card .profile-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 14px;
}

.eligibility-card .profile-field {
  gap: 8px;
  color: #303445;
  font-size: 13.5px;
  font-weight: 720;
}

.eligibility-card .profile-field > span {
  min-height: 21px;
  word-break: keep-all;
}

.eligibility-card .profile-field select,
.eligibility-card .profile-field input {
  min-height: 50px;
  padding: 11px 13px;
  border: 1px solid #D7DAE5;
  border-radius: 14px;
  background: #FFFFFF;
  color: #25293A;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 1px 0 rgba(27, 31, 64, .02);
}

.eligibility-card .profile-field select:hover,
.eligibility-card .profile-field input:hover {
  border-color: #AEB3CB;
}

.eligibility-card .profile-field select:focus-visible,
.eligibility-card .profile-field input:focus-visible,
.eligibility-card .profile-step-button:focus-visible,
.eligibility-card .profile-step-panel > legend:focus-visible,
.eligibility-card button:focus-visible,
.eligibility-card summary:focus-visible {
  outline: 3px solid rgba(79, 86, 232, .3);
  outline-offset: 3px;
  border-color: var(--eligibility-accent);
}

.eligibility-card .profile-field.is-conditional-inactive::before,
.eligibility-card .profile-field-inactive-note {
  display: none;
}

.eligibility-card .profile-step-help,
.eligibility-card .profile-income-rule {
  grid-column: 1 / -1;
  padding: 0;
  border: 1px solid #E1E4EF;
  border-radius: 13px;
  background: #F7F8FC;
  color: #5B6071;
  font-size: 12px;
}

.eligibility-card .profile-step-help summary,
.eligibility-card .profile-income-rule summary {
  min-height: 44px;
  padding: 11px 13px;
  color: #565B6D;
  font-weight: 750;
}

.eligibility-card .profile-income-rule > p,
.eligibility-card .profile-income-rule > strong,
.eligibility-card .profile-income-rule > a {
  margin-right: 13px;
  margin-left: 13px;
}

.eligibility-card .profile-step-help summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.eligibility-card .profile-help-icon {
  display: inline-flex;
  width: 25px;
  height: 25px;
  flex: 0 0 25px;
  align-items: center;
  justify-content: center;
  border: 1px solid #B8BDF4;
  border-radius: 50%;
  background: #FFFFFF;
  color: var(--eligibility-accent);
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  transition: color .18s ease, background-color .18s ease, border-color .18s ease;
}

.eligibility-card .profile-step-help[open] .profile-help-icon {
  border-color: var(--eligibility-accent);
  background: var(--eligibility-accent);
  color: #FFFFFF;
}

.eligibility-card .profile-step-help-body {
  display: grid;
  gap: 11px;
  padding: 0 13px 13px;
  overflow-wrap: anywhere;
}

.eligibility-card .profile-help-section {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid #E5E7F0;
  border-radius: 12px;
  background: #FFFFFF;
}

.eligibility-card .profile-help-title {
  color: #24283A;
  font-size: 13px;
  line-height: 1.45;
}

.eligibility-card .profile-step-help-body p,
.eligibility-card .profile-step-help-body ul,
.eligibility-card .profile-step-help-body ol {
  margin: 0;
  line-height: 1.62;
}

.eligibility-card .profile-step-help-body ul {
  display: grid;
  gap: 6px;
  padding-left: 19px;
}

.eligibility-card .profile-step-help-body li::marker {
  color: var(--eligibility-accent);
}

.eligibility-card .profile-help-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid #E3E6F0;
  border-radius: 10px;
  background: #FFFFFF;
}

.eligibility-card .profile-help-table-wrap:focus-visible {
  outline: 3px solid rgba(79, 86, 232, .3);
  outline-offset: 2px;
}

.eligibility-card .profile-help-table {
  width: 100%;
  min-width: 500px;
  border-collapse: collapse;
  color: #4E5364;
  font-size: 11.5px;
  text-align: center;
}

.eligibility-card .profile-help-table caption {
  padding: 9px 10px;
  background: #F1F2FC;
  color: #4B5062;
  font-weight: 800;
  text-align: left;
}

.eligibility-card .profile-help-table th,
.eligibility-card .profile-help-table td {
  padding: 9px 8px;
  border-top: 1px solid #E7E9F1;
  border-right: 1px solid #E7E9F1;
  white-space: nowrap;
}

.eligibility-card .profile-help-table th:last-child,
.eligibility-card .profile-help-table td:last-child {
  border-right: 0;
}

.eligibility-card .profile-help-table th {
  background: #FAFAFD;
  color: #303548;
  font-weight: 800;
}

.eligibility-card .profile-help-caption,
.eligibility-card .profile-help-basis {
  color: #686E80;
  font-size: 11.5px;
}

.eligibility-card .profile-help-basis {
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  background: #EEEFFF;
  color: #4B52CF;
  font-weight: 800;
}

.eligibility-card .profile-help-steps {
  display: grid;
  gap: 7px;
  padding: 0;
  list-style: none;
}

.eligibility-card .profile-help-steps li {
  display: grid;
  grid-template-columns: minmax(96px, .34fr) 1fr;
  gap: 8px;
  padding: 9px 10px;
  border-radius: 9px;
  background: #F7F8FC;
}

.eligibility-card .profile-help-steps strong {
  color: #363CC5;
}

.eligibility-card .profile-help-warning {
  padding: 11px 12px;
  border: 1px solid #F2CA85;
  border-radius: 11px;
  background: #FFF8E8;
  color: #6F4A00;
}

.eligibility-card .profile-help-warning strong {
  color: #8A5600;
}

.eligibility-card .profile-help-sources {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 8px;
  padding: 0 2px;
  color: #73788A;
  font-size: 11.5px;
}

.eligibility-card .profile-help-sources a {
  color: #4A50CD;
  font-weight: 750;
  text-underline-offset: 2px;
}

.eligibility-card .profile-income-rule > strong { margin-top: 0; }
.eligibility-card .profile-income-rule > a { margin-bottom: 13px; }

.eligibility-card .profile-review {
  display: grid;
  gap: 4px;
  margin-top: 16px;
  padding: 16px;
  border: 1px solid #D9DCFF;
  border-radius: 16px;
  background: var(--eligibility-soft);
}

.eligibility-card .profile-review > span {
  color: var(--eligibility-accent);
  font-size: 11px;
  font-weight: 850;
}

.eligibility-card .profile-review strong { color: #292E78; font-size: 14px; }
.eligibility-card .profile-review p { margin: 0; color: #666B82; font-size: 12.5px; }

.eligibility-card .profile-step-actions {
  display: grid;
  grid-column: 2;
  grid-row: 4;
  grid-template-columns: minmax(110px, auto) 1fr minmax(150px, auto);
  align-items: center;
  gap: 12px;
}

.eligibility-card #profile-step-prev { grid-column: 1; }
.eligibility-card #profile-step-status { grid-column: 2; }
.eligibility-card #profile-step-next,
.eligibility-card .profile-save-button { grid-column: 3; }

.eligibility-card .profile-step-primary,
.eligibility-card .profile-step-secondary,
.eligibility-card .profile-save-button {
  min-height: 50px;
  padding: 11px 18px;
  border-radius: 14px;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.eligibility-card .profile-step-primary,
.eligibility-card .profile-save-button {
  border: 1px solid var(--eligibility-accent);
  background: var(--eligibility-accent);
  color: #FFFFFF;
  box-shadow: 0 8px 18px rgba(79, 86, 232, .2);
}

.eligibility-card .profile-step-secondary {
  border: 1px solid #D9DCE7;
  background: #FFFFFF;
  color: #555A6B;
}

.eligibility-card .profile-step-status {
  color: #858A9A;
  font-size: 12px;
  font-weight: 750;
  text-align: center;
}

.eligibility-card .profile-clear-button {
  grid-column: 1;
  grid-row: 4;
  justify-self: start;
  align-self: center;
  min-height: 42px;
  padding: 8px 10px;
  border: 0;
  background: transparent;
  color: #898E9E;
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.eligibility-card .profile-live-status {
  min-height: 0;
  margin: 12px 4px 0;
  color: #28704D;
  font-size: 12.5px;
}

body.profile-editing .eligibility-card .eligibility-empty,
body.profile-editing .eligibility-card #eligibility-diagnosis-slot {
  display: none !important;
}

.eligibility-card .eligibility-empty,
.eligibility-card .eligibility-diagnosis {
  margin: 18px 0 0;
  padding: 22px;
  border: 1px solid #E0E3ED;
  border-radius: 22px;
  background: #FFFFFF;
  box-shadow: 0 12px 32px rgba(36, 42, 86, .07);
}

.eligibility-card .eligibility-empty h3 { margin: 0; font-size: 18px; }
.eligibility-card .eligibility-empty p { margin: 7px 0 0; color: #727789; font-size: 13px; }
.eligibility-card .eligibility-open-notices { min-height: 46px; margin-top: 15px; border-radius: 13px; }

.eligibility-card .eligibility-diagnosis-head { align-items: center; }
.eligibility-card .eligibility-diagnosis-list { gap: 12px; }
.eligibility-card .eligibility-result { border-radius: 16px; }
.eligibility-card .eligibility-result-head { padding: 14px 15px; }
.eligibility-card .eligibility-result-copy { padding: 12px 15px 0; }

.eligibility-card .eligibility-result-details { margin-top: 10px; }
.eligibility-card .eligibility-result-summary {
  min-height: 45px;
  padding: 12px 15px;
  border-top: 1px solid #ECEEF3;
  color: #51576A;
  font-size: 12.5px;
  font-weight: 780;
}

.eligibility-card .eligibility-result-summary::after { float: right; }
.eligibility-card .eligibility-result-details .eligibility-item-list { margin-top: 0; }

@media (min-width: 821px) and (hover: hover) and (pointer: fine) {
  .eligibility-card .profile-step-button:hover { background: #F5F6FA; color: #424758; }
  .eligibility-card .profile-step-primary:hover,
  .eligibility-card .profile-save-button:hover { filter: brightness(1.06); }
  .eligibility-card .profile-step-secondary:hover { border-color: #B8BDCF; }
}

@media (max-width: 820px) {
  .eligibility-card { min-height: calc(100dvh - 136px); }
  .eligibility-content { padding: 12px 12px calc(108px + env(safe-area-inset-bottom)); }

  .eligibility-card .profile-card-head {
    gap: 14px;
    padding: 19px 18px;
    border-radius: 20px;
  }

  .eligibility-card .profile-card h3 { font-size: 21px; }
  .eligibility-card .profile-card h3 + p { font-size: 12.5px; }
  .eligibility-card .profile-edit-button { min-height: 44px; padding: 9px 12px; }

  .eligibility-card .profile-form {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    gap: 12px;
    margin-top: 12px;
    padding: 13px;
    border-radius: 20px;
  }

  .eligibility-card .profile-form > * {
    grid-column: 1 !important;
    grid-row: auto !important;
  }

  .eligibility-card .profile-stepper {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 5px;
  }

  .eligibility-card .profile-step-button {
    display: flex;
    min-width: 0;
    min-height: 66px;
    padding: 7px 2px;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    border-radius: 13px;
    text-align: center;
  }

  .eligibility-card .profile-step-button > span { width: 28px; height: 28px; font-size: 11px; }
  .eligibility-card .profile-step-button strong { font-size: 10.5px; line-height: 1.2; }
  .eligibility-card .profile-step-progress { height: 5px; }

  .eligibility-card .profile-step-panel { padding: 18px 15px; border-radius: 18px; }
  .eligibility-card .profile-step-panel > legend { padding-bottom: 15px; }
  .eligibility-card .profile-step-panel > legend > strong { font-size: 20px; }
  .eligibility-card .profile-field-grid { grid-template-columns: minmax(0, 1fr); gap: 15px; }
  .eligibility-card .profile-field-wide,
  .eligibility-card .profile-step-help,
  .eligibility-card .profile-income-rule { grid-column: 1; }
  .eligibility-card .profile-field select,
  .eligibility-card .profile-field input { min-height: 50px; font-size: 16px; }
  .eligibility-card .profile-help-steps li { grid-template-columns: 1fr; gap: 2px; }

  .eligibility-card .profile-step-actions {
    grid-template-columns: minmax(90px, auto) 1fr minmax(118px, auto);
    gap: 8px;
  }

  .eligibility-card .profile-step-primary,
  .eligibility-card .profile-step-secondary,
  .eligibility-card .profile-save-button { min-height: 50px; padding: 10px 13px; }
  .eligibility-card .profile-clear-button { justify-self: center; min-height: 44px; }

  .eligibility-card .eligibility-empty,
  .eligibility-card .eligibility-diagnosis { margin-top: 12px; padding: 17px 15px; border-radius: 19px; }
  .eligibility-card .eligibility-diagnosis-head,
  .eligibility-card .eligibility-result-head { align-items: flex-start; flex-direction: column; }
  .eligibility-card .eligibility-result-status { align-self: flex-start; }
  .eligibility-card .eligibility-item-top { align-items: flex-start; flex-direction: column; gap: 2px; }
  .eligibility-card .eligibility-item-value { text-align: left; }
}

@media (max-width: 380px) {
  .eligibility-card .profile-card-head { align-items: flex-start; }
  .eligibility-card .profile-edit-button { padding-right: 10px; padding-left: 10px; font-size: 12px; }
  .eligibility-card .profile-step-button strong { font-size: 10px; }
  .eligibility-card .profile-step-actions { grid-template-columns: 86px 1fr 112px; }
}

@media (prefers-reduced-motion: reduce) {
  .eligibility-card .profile-step-button,
  .eligibility-card .profile-step-progress > span { transition: none; }
}
