@charset "UTF-8";
/* 글자 굵기 2단계 통일(2026-09-15, KRDS 표준형: regular 400 · bold 700): 이 파일의 font-weight 선언 중 600·800·900→700, 100~500→400 으로 일괄 치환(bold·normal 은 700·400 과 같은 값이라 유지). 원값은 git 이력(치환 커밋 직전) 참조. @font-face 매핑 접기(common.css·style_common.css)는 안전망으로 유지 */
/* ============================================================
   보건복지데이터포털 (메인 포털) — main.css
   메인 화면 전용 스타일 (히어로 / 통계시각화 / 통계 / 동향 / 퀵메뉴)
   · 색상은 common.css 토큰만 사용
   · 모든 텍스트 4.5:1, 비텍스트 3:1 이상 확보
   ============================================================ */

:root {
  /* 카드 경계 — 인접 흰 배경 대비 3.22:1 (KWCAG 5.4.3 비텍스트) */
  --dp-border-strong: #DFE4EC;
  /* 연회색 면 위에서 쓰는 경계 — 3.65:1 */
  --dp-border-on-tint: #767E8C;

  /* 분야별 막대 색 — 트랙(#F0F2F5) 대비 전부 4.7:1 이상 */
  --cat-family: #A83D98;
  --cat-service: #48a1db;
  --cat-health: #e88834;
  --cat-general: #357e9f;
  --cat-income: #308a4d;

  /* 추이 그래프 */
  --line-actual:  #C13A0F;   /* 실측 — 흰 배경 5.41:1 */
  --line-forecast:#1A5AD7;   /* 전망 — 흰 배경 6.02:1 */
  --band-fill:    #E3ECFB;   /* 전망구간 면(장식) — 경계선으로 의미 전달 */
  --grid-line:    #D0D5DD;
  --axis-line:    #8A9099;
}

/* ------------------------------------------------------------
   1. 공통 — 섹션 / 카드
   ------------------------------------------------------------ */
.dp-main { padding-bottom: 0; } /* 하단 여백은 푸터 margin-top(--sp-9)이 담당 — 이중 간격 제거 (2026-09-01) */

.sec { padding-top: var(--sp-9); }
.sec-head {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-5);
}
/* 섹션 표식은 CSS로 그린다 (빈 요소 사용 안 함) */
.sec-head h2 {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  font-size: 2.6rem;
}
.sec-head h2::before {
  content: "";
  flex: none;
  width: 0.4rem;
  height: 2.4rem;
  border-radius: 0.2rem;
  background: var(--dp-heading);
}
.sec-divider {
  height: 1px;
  margin-top: var(--sp-9);
  background: var(--dp-gray-20);
  border: 0;
}

.dp-card {
  background: var(--dp-gray-0);
  border: 1px solid var(--dp-border-strong);
  border-radius: var(--dp-radius-lg);
}

.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-5); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-5); margin-top: var(--sp-5); }
/* 통계 카드 4개(인구통계 카드 제외 — 2026-09-08, 구 .grid-5) */
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sp-4); }
/* 넓은 콘텐츠(표·차트)가 카드를 밀어내지 않도록 축소를 허용한다 */
.grid-2 > *, .grid-3 > *, .grid-4 > * { min-width: 0; }
.vcard figure, .vcard .chart-data { min-width: 0; }

/* ------------------------------------------------------------
   2. 히어로
   ------------------------------------------------------------ */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 64rem);
  gap: var(--sp-8);
  padding: var(--sp-8) 0 var(--sp-2);
  align-items: stretch;
}
.hero-intro {display:flex;flex-direction: column;justify-content: space-between;align-content: flex-start;align-items: flex-start;}

.hero-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 0.9rem 1.8rem;
  border-radius: var(--dp-radius-pill);
  background: var(--dp-gray-10);
  color: var(--dp-gray-70);          /* #F0F2F5 대비 6.4:1 */
  font-size: var(--fs-sm);
  font-weight: 700;
}
.hero-chip::before {
  content: "";
  width: 0.9rem; height: 0.9rem;
  border-radius: 50%;
  background: var(--dp-success);     /* 장식 — 의미는 텍스트가 전달 */
}

.hero h1 {
  margin: var(--sp-6) 0 var(--sp-6);
  font-size: 4.4rem;
  line-height: 1.5;
  letter-spacing: -0.02em;
}
.hero h1 .accent { color: var(--dp-primary-strong); }   /* 6.02:1 */

.hero-btns { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-bottom: var(--sp-6); }

/* 공지 — 링크 하나로 묶고, 잘린 제목은 aria-label로 전문 제공 */
.hero-notice {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: 1.5rem 2rem;
  /* border: 1px solid var(--dp-border-strong); */
  border-radius: var(--dp-radius);
  background: var(--dp-gray-5);
  text-decoration: none;
  color: var(--dp-gray-90);
  width: 100%;
}
.hero-notice:hover { border-color: var(--dp-primary); background: var(--dp-primary-bg); }
.hero-notice .tag {
  flex: none;
  padding: 0.4rem 1.1rem;
  border-radius: var(--dp-radius-sm);
  background: #e4553f;   /* 흰 글자 5.41:1 */
  color: #fff;
  font-size: var(--fs-xs);
  font-weight: 700;
}
.hero-notice .txt {
  min-width: 0;
  font-size: var(--fs-sm);
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hero-notice .go {
  margin-left: auto;
  flex: none;
  /* .vcard .more와 동일 모양(색·굵기·→ 화살표·호버) — 2026-09-03 사용자 지시 */
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--dp-gray-60);     /* 6.02:1 */
  text-decoration: none;
}
.hero-notice .go::after { content:' →'; font-weight:700}
.hero-notice:hover .go { color: var(--dp-primary-hover); text-decoration: underline; }

/* 히어로 우측 현황 패널 */
.hero-panel { padding: var(--sp-5) var(--sp-6) var(--sp-6); }
.hero-panel h2 {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-bottom: var(--sp-4);
  font-size: var(--fs-lg);
}
.hero-panel h2::before {
  content: "";
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 50%;
  background: var(--dp-success);
}

.kpi {
  display: flex;
  gap: var(--sp-3);
  padding: 0 2rem;
  margin-bottom: var(--sp-4);
  border: 1px solid var(--dp-border-strong);
  border-radius: var(--dp-radius);
  font-size: var(--fs-sm);
  color: var(--dp-gray-70);
  align-content: flex-end;
  align-items: baseline;
}
.kpi .v {
  margin-left: auto;
  font-size: 3.2rem;
  font-weight: 700;
  color: var(--dp-heading);
  font-variant-numeric: tabular-nums;
}
.kpi .u { font-size: var(--fs-sm); color: var(--dp-gray-70); }

/* 분야별 막대 */
.fbar {
  padding: var(--sp-4) var(--sp-5);
  border: 1px solid var(--dp-border-strong);
  border-radius: var(--dp-radius);
}
.fbar > h3 {
  margin-bottom: var(--sp-3);
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--dp-gray-80);
}
.fbar-list {display: grid;gap: var(--sp-2);}
.fbar-row { display: flex; align-items: center; gap: var(--sp-3); }
.fbar-row .lab {
  flex: none;
  width: 10.8rem;
  font-size: var(--fs-sm);
  color: var(--dp-gray-70);
}
.fbar-row .track {
  display: block;
  flex: 1;
  min-width: 0;
  height: 2.6rem;
  border-radius: var(--dp-radius-sm);
  background: var(--dp-gray-10);
  overflow: hidden;
}
.fbar-row .fill {
  display: block;
  height: 100%;
  border-radius: var(--dp-radius-sm);
  width: var(--w);
  animation: fbar-grow .9s cubic-bezier(.22,.75,.25,1) both;
}
@keyframes fbar-grow { from { width: 0; } to { width: var(--w); } }

/* ============================================================
   히어로 우측 "조사자료 및 메타 정보 현황" (퍼블 메인수정 안_0923, 2026-09-28)
   · 퍼블 px → rem(1rem = 10px), 굵기 800→700·500→400(전역 2단계 규칙). 색은 퍼블 값,
     단 분야 막대 색은 기존 분야 토큰(--cat-*, .fill-*) 유지(사용자 지시 2026-09-28 — 퍼블의 사회서비스·보건의료 색은 쓰지 않음)
   · 클래스는 hp- 접두 — 기존 .kpi·.fbar(구 카드, 이제 미사용)·.vcard .more 등과 겹치지 않게
   ============================================================ */
.hero-panel { min-width: 0; }   /* 퍼블 .panel{min-width:0} — 최근 자료 한 줄 말줄임 제목이 히어로 그리드 칸을 넓혀 모바일 가로 넘침(375px에서 433px) 나던 것 방지 */
.hero-panel .hp-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-2); margin-bottom: 1.6rem; }
.hero-panel .hp-head h2 { margin: 0; font-size: 2.3rem; color: #1E2B5C; }
.hero-panel .hp-head time { flex: none; font-size: 1.5rem; color: #556070; }
.hp-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); background: #F5F7FA; border-radius: 1rem; }
.hp-kpi { position: relative; display: flex; flex-direction: column; gap: .2rem; padding: 1.6rem 1.8rem 1.4rem; border-radius: 1rem; text-decoration: none; }
.hp-kpi + .hp-kpi::before { content: ""; position: absolute; left: 0; top: 1.8rem; bottom: 1.8rem; width: 1px; background: #D6DBE4; }
.hp-kpi:hover { background: #EAEEF5; }
.hp-kpi .k { font-size: 1.5rem; color: #556070; }
.hp-kpi .v { font-size: 3.1rem; font-weight: 700; color: #1E2B5C; line-height: 1.2; font-variant-numeric: tabular-nums; }
.hp-kpi .v small { margin-left: .4rem; font-size: 1.6rem; font-weight: 400; color: #556070; }
.hp-tabs { display: flex; gap: .4rem; margin: 2rem 0 .6rem; border-bottom: 1px solid #E3E7EE; }
.hp-tabs button { min-height: 4.4rem; margin-bottom: -1px; padding: 0 1.4rem; border: 0; border-bottom: 3px solid transparent; background: none; font: inherit; font-size: 1.7rem; letter-spacing: inherit; color: #556070; cursor: pointer; }
.hp-tabs button[aria-selected="true"] { color: #1E2B5C; font-weight: 700; border-bottom-color: #1E2B5C; }
.hp-tabpanel { padding-top: .8rem; min-height: 28rem; }
.hp-tabpanel[hidden] { display: none; }
.hp-recent, .hp-bars { margin: 0; padding: 0; list-style: none; }
.hp-recent a { display: flex; min-width: 0; align-items: center; gap: 1.2rem; min-height: 4.6rem; padding: 0 .8rem; border-bottom: 1px solid #E3E7EE; text-decoration: none; }
.hp-recent li:last-child a { border-bottom: 0; }
.hp-recent a:hover { background: #F5F7FA; }
.hp-recent a:hover .t { text-decoration: underline; text-underline-offset: 3px; }
.hp-badge { flex: none; padding: .2rem .9rem; border-radius: .4rem; font-size: 1.5rem; font-weight: 700; }
.hp-badge.new { background: #E3EEFF; color: #1648AD; }
.hp-badge.upd { background: #E2F5EC; color: #17683F; }
.hp-recent .t { flex: 1; min-width: 0; font-size: 1.7rem; color: #2B3445; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hp-recent time { flex: none; font-size: 1.5rem; color: #556070; }
.hp-more { display: block; margin-top: .6rem; padding: .6rem .8rem; text-align: right; font-size: 1.5rem; font-weight: 700; color: #556070; text-decoration: none; }
.hp-bars a { display: grid; grid-template-columns: 11.8rem minmax(0, 1fr) 6.4rem; align-items: center; gap: 1.4rem; min-height: 4.4rem; padding: 0 .8rem; border-radius: .6rem; text-decoration: none; }
.hp-bars a:hover { background: #F5F7FA; }
.hp-bars a:hover .nm { text-decoration: underline; text-underline-offset: 3px; }
.hp-bars .nm { font-size: 1.6rem; color: #2B3445; }
.hp-bars .tr { display: block; height: 2.2rem; border-radius: .4rem; background: #EEF1F6; overflow: hidden; }
.hp-bars .fill { display: block; height: 100%; border-radius: .4rem; }
.hp-bars .n { text-align: right; font-size: 2rem; font-weight: 700; color: #1E2B5C; }
.hp-bars .n small { margin-left: .2rem; font-size: 1.5rem; font-weight: 400; color: #556070; }
.hp-hint { margin-top: .6rem; padding-left: .8rem; font-size: 1.5rem; color: #556070; }
@media (max-width: 560px) {
  .hp-kpis { grid-template-columns: minmax(0, 1fr); }
  .hp-kpi + .hp-kpi::before { left: 1.8rem; right: 1.8rem; top: 0; bottom: auto; width: auto; height: 1px; }
  .hp-bars a { grid-template-columns: 9.6rem minmax(0, 1fr) 5.4rem; gap: .8rem; }
}
.fbar-row:nth-child(2) .fill { animation-delay: .12s; }
.fbar-row:nth-child(3) .fill { animation-delay: .24s; }
.fbar-row:nth-child(4) .fill { animation-delay: .36s; }
.fbar-row:nth-child(5) .fill { animation-delay: .48s; }
@media (prefers-reduced-motion: reduce) {
  .fbar-row .fill { animation: none; width: var(--w); }
}
.fbar-row .val {
  flex: none;
  width: 6.6rem;
  text-align: right;
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--dp-gray-90);
  font-variant-numeric: tabular-nums;
}
.fbar-row .val .u { font-size: var(--fs-xs); font-weight: 700; color: var(--dp-gray-70); margin-left: 0.3rem; }

.fill-family  { background: var(--cat-family); }
.fill-service { background: var(--cat-service); }
.fill-health  { background: var(--cat-health); }
.fill-general { background: var(--cat-general); }
.fill-income  { background: var(--cat-income); }

/* ------------------------------------------------------------
   3. 통계시각화 카드
   ------------------------------------------------------------ */
.vcard { display: flex; flex-direction: column; padding: var(--sp-5) var(--sp-6) var(--sp-5);  position:relative;}
.vcard-head { display: flex; align-items: flex-start; gap: var(--sp-3); }
.vcard-head h3 { font-size: var(--fs-h3); }
.vcard .more {
  margin-left: auto;
  flex: none;
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--dp-gray-60);     /* 6.02:1 */
  text-decoration: none;
  padding: 0.4rem 0.2rem; position:absolute; right:var(--sp-6); top:var(--sp-5)
}
.vcard .more::after { content:' →'; font-weight:700}
.vcard .more:hover { color: var(--dp-primary-hover); text-decoration: underline; }
.vcard-sub { margin-top: 0.7rem; font-size: var(--fs-xs); color: var(--dp-gray-60); }

.vcard figure { margin-top: var(--sp-5); }
.vcard figcaption { font-size: var(--fs-xs); color: var(--dp-gray-60); margin-bottom: var(--sp-2); }
.vcard-foot { padding-top: var(--sp-4); }

/* 준비 중 안내 */
.vcard-empty {
  margin-top: var(--sp-5);
  padding: var(--sp-6) var(--sp-4);
  border: 1px dashed var(--dp-border-strong);
  border-radius: var(--dp-radius);
  background: var(--dp-gray-5);
  text-align: center;
  font-size: var(--fs-sm);
  color: var(--dp-gray-70);
  min-height: 200px;
}

/* OECD 가로 막대 */
.hbar-list { display: grid; gap: var(--sp-3); padding: var(--sp-4) var(--sp-5); background: var(--dp-gray-5); border-radius: var(--dp-radius); }
.hbar-row { display: flex; align-items: center; gap: var(--sp-3); }
.hbar-row .lab {
  flex: none;
  width: 19rem;
  text-align: right;
  font-size: var(--fs-xs);
  color: var(--dp-gray-70);
}
.hbar-row .track { display: block; flex: 1; min-width: 0; }
.hbar-row .fill {
  height: 2.7rem;
  border-radius: var(--dp-radius-sm);
  background: var(--dp-primary-strong);   /* 흰 글자 6.02:1 */
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 5.2rem;
}
.hbar-row .fill span {
  padding-right: 1.1rem;
  color: #fff;
  font-size: var(--fs-xs);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* 추이 그래프 */
.linechart { width: 100%; height: auto; margin-top: var(--sp-2); }
.lc-axis { font-family: var(--dp-font); font-size: 1.5rem; fill: var(--dp-gray-70); }
.lc-grid { stroke: var(--grid-line); stroke-width: 1; }
.lc-base { stroke: var(--axis-line); stroke-width: 1; }

.legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--sp-3) var(--sp-5);
  margin-top: var(--sp-3);
  font-size: var(--fs-xs);
  color: var(--dp-gray-70);
}
.legend li { display: flex; align-items: center; gap: 0.7rem; }
.legend .k { flex: none; width: 2.2rem; height: 1.2rem; position: relative; }
.legend .k-actual::before,
.legend .k-forecast::before {
  content: "";
  position: absolute; left: 0; right: 0; top: 0.5rem;
  border-top-width: 2px;
}
.legend .k-actual::before   { border-top-style: solid;  border-top-color: var(--line-actual); }
.legend .k-forecast::before { border-top-style: dashed; border-top-color: var(--line-forecast); }
.legend .k-band {
  background: var(--band-fill);
  border: 1px solid var(--dp-gray-60);   /* 면 자체가 옅어도 경계로 식별 가능 */
  border-radius: 0.2rem;
  height: 1.3rem;
}

/* ------------------------------------------------------------
   4. KIHASA 통계 카드
   ------------------------------------------------------------ */
.scard { display: flex; flex-direction: column; padding: var(--sp-5); }
.scard .sico {
    width: 4.4rem;
    height: 4.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 1.6rem;
    border-radius: 1.1rem;
} 
.scard .sico img {  width:100%; height:100%;}
.scard .sico-pop {
    background: #E7EEFB;
}
.scard h3 { font-size: var(--fs-lg); }
.scard p {
  margin: 0.9rem 0;
  font-size: var(--fs-xs);
  color: var(--dp-gray-60);
  line-height: 1.55;
}
.scard-foot {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-top: auto;
  padding-top: var(--sp-4);
  border-top: 1px solid var(--dp-gray-20);
}
.scard-foot .period {
  font-size: var(--fs-sm);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
/* 연도 범위는 상태 정보가 아니므로 시스템 색상(위험·성공)을 쓰지 않고
   의미 없는 색 구분도 두지 않는다 ↳ KRDS 색상 의미 체계 · KWCAG 5.4.1 */
.period--teal,
.period--red { color: var(--dp-gray-70); }   /* #4B5563 — 흰 배경 7.56:1 */
.scard-foot .go {
  margin-left: auto;
  flex: none;
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--dp-gray-60);
  text-decoration: none;
  padding: 0.4rem 0.2rem;
}
.scard-foot .go::after { content:' →'; font-weight:700;}
.scard-foot .go:hover { color: var(--dp-primary-hover); text-decoration: underline; }

/* ------------------------------------------------------------
   5. 동향 & 정보 카드
   ------------------------------------------------------------ */
.tcard { display: flex; flex-direction: column; overflow: hidden; }
.tcard .thumb {
  aspect-ratio: 3 / 2;
  background: var(--dp-gray-10);
  border-bottom: 1px solid var(--dp-gray-20);
  overflow: hidden;
}
.tcard .thumb img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.tcard-body {display: flex;flex-direction: column;gap: var(--sp-3);padding: var(--sp-4) var(--sp-5) var(--sp-5);position: relative;}
.tcard-meta { display: flex; align-items: center; gap: var(--sp-3); }
.dp-badge {
  display: inline-block;
  padding: 0.5rem 1.2rem;
  border-radius: var(--dp-radius-sm);
  color: #fff;
  font-size: var(--fs-xs);
  font-weight: 700;
}
.badge--domestic { background: #1B7A62; }  /* 5.24:1 */
.badge--global   { background: #8A5A05; }  /* 5.92:1 */
.badge--info     { background: #23306E; }  /* 12.21:1 */
.tcard .go {
  margin-left: auto;
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--dp-gray-60);
  text-decoration: none;
  padding: 0.4rem 0.2rem;
  position: absolute;
  top: var(--sp-4);
  right: var(--sp-5);
}
.tcard .go::after { content:' →' ; font-weight:700;}
.tcard .go:hover { color: var(--dp-primary-hover); text-decoration: underline; }
.tcard h3 { font-size: var(--fs-sm); font-weight: 700; line-height: 1.5; color: var(--dp-gray-90); }

/* 국내동향 워드클라우드 (구메인 이식 2026-09-07, 키워드 칩은 미사용 확정으로 제거)
   — 썸네일 자리(3:2)를 rMate WordCloud가 채운다 */
.tcard .thumb--wdcloud { background: #fff; }
.tcard .thumb--wdcloud .word_data { width: 100%; height: 100%; }

/* ------------------------------------------------------------
   5-1. 터치 조작 영역 — KWCAG 6.1.3 (터치 44×44px 이상)
   카드 안의 '자세히 보기 / 바로가기'는 절대 배치라 여백만 키우고
   보이는 글자 위치는 그대로 유지되도록 좌표를 함께 보정한다.
   ------------------------------------------------------------ */
@media (max-width: 1024px), (pointer: coarse) {
  .vcard .more {
    padding: 1rem 0.8rem;
    min-height: 4.4rem;
    top: calc(var(--sp-5) - 0.6rem);
    right: calc(var(--sp-6) - 0.8rem);
  }
  .tcard .go {
    padding: 1rem 0.8rem;
    min-height: 4.4rem;
    top: calc(var(--sp-4) - 0.6rem);
    right: calc(var(--sp-5) - 0.8rem);
  }
  .scard-foot .go {
    display: inline-flex;
    align-items: center;
    min-height: 4.4rem;
    padding: 0.4rem 0.8rem;
  }
}

/* ------------------------------------------------------------
   6. 반응형
   ------------------------------------------------------------ */
@media (max-width: 1280px) {
  .hero { grid-template-columns: minmax(0, 1fr) minmax(0, 52rem); gap: var(--sp-6); }
  .hero h1 { font-size: 3.8rem; }
}

@media (max-width: 1024px) {
  .hero { grid-template-columns: 1fr; gap: var(--sp-6); }
  .hero h1 { font-size: 3.4rem; margin: var(--sp-5) 0; }
  .hbar-row .lab { width: 15rem; }
}

@media (max-width: 768px) {
  .sec { padding-top: var(--sp-8); }
  .sec-head h2 { font-size: 2.2rem; }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .hero h1 { font-size: 3rem; }
  .hero-panel { padding: var(--sp-4) var(--sp-4) var(--sp-5); }
  .vcard { padding: var(--sp-4); }
}

@media (max-width: 560px) {
  .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .hero h1 { font-size: 2.6rem; }
  /* common.css 560 분기의 전역 .dp-btn{width:100%}를 상쇄 — 히어로 버튼 쌓임은 360부터 (2026-09-03) */
  .hero-btns .dp-btn { width: auto; }
  .fbar-row .lab { width: 9.2rem; font-size: var(--fs-xs); }
  .hbar-row { flex-wrap: wrap; }
  .hbar-row .lab { width: 100%; text-align: left; }
  .hbar-row .track { width: 100%; }
}

/* --- 460px 이하: 모바일 최적화 기준 폭 --- */
@media (max-width: 460px) {
  .hero { padding-top: var(--sp-5); }
  .hero h1 { font-size: 2.4rem; line-height: 1.5; }
  /* 모바일: 히어로 좌측 쏠림 방지 — 칩·헤드라인·버튼 가운데 정렬. 안내줄(hero-notice)은 퍼블본 그대로 (2026-09-03 사용자 지시) */
  .hero-intro { align-items: center; text-align: center; }
  .hero-btns { justify-content: center; }
  .hero-notice { text-align: left; }
  .hero-notice { flex-wrap: wrap; gap: var(--sp-2) var(--sp-3); }
  .hero-notice .txt { white-space: normal; overflow: visible; width: 100%; }
  .hero-notice .go { margin-left: 0; }
  .kpi .v { font-size: 2.8rem; }
  .fbar { padding: var(--sp-3) var(--sp-4); }
  .fbar-row { flex-wrap: wrap; gap: var(--sp-2) var(--sp-3); }
  .fbar-row .lab { width: auto; flex: 1; }
  .fbar-row .val { width: auto; }
  .fbar-row .track { width: 100%; flex: none; height: 2.2rem; }
}

/* --- 360px 이하 --- */
@media (max-width: 360px) {
  .hero h1 { font-size: 2.2rem; }
  /* 히어로 버튼 상하 쌓임 분기: 560→360 이동 (2026-09-03 사용자 지시) */
  .hero-btns .dp-btn { width: 100%; }
  .sec-head h2 { font-size: 2rem; }
  .scard .ico { width: 4.2rem; height: 4.2rem; }
  .scard .ico img { width: 3.8rem; height: 3.8rem; }
  .vcard .more { position:relative; top:0; right:0}
}

/* --- 320px 이하: 290px까지 레이아웃 유지 --- */
@media (max-width: 320px) {
  .vcard, .scard, .tcard-body { padding: var(--sp-3); }
  .hero-panel { padding: var(--sp-3); }
  .kpi { padding: 1rem 1.2rem; flex-wrap: wrap; }
  .kpi .v { font-size: 2.4rem; }
  .hero-notice { padding: 1.2rem; }
  .legend { gap: var(--sp-2) var(--sp-3); }
}


/* ------------------------------------------------------------
   7. 다섯 블록 섹션의 단 수 (KIHASA 통계시각화 · KIHASA 통계)
      HTML은 그대로 두고 CSS만으로 흐름을 바꾼다.

      통계시각화 : 3·2  →  (1080px↓) 2·2·1  →  (900px↓) 1
      통계       : 4    →  (1400px↓) 2·2  →  (900px↓) 1   (인구통계 카드 제외로 5→4, 2026-09-08)
   ------------------------------------------------------------ */

/* --- 통계시각화 : .grid-3 + .grid-2 두 덩어리를 한 흐름으로 합친다 ---
   두 래퍼를 display:contents 로 지워 카드 5개가 섹션 그리드의 직접 항목이 되게 하면
   2·2·1 로 자연스럽게 흐른다. 래퍼는 의미 없는 div 라 접근성 트리에 영향이 없다. */
@media (max-width: 1080px) {
  section[aria-labelledby="secViz"] {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--sp-5);
  }
  section[aria-labelledby="secViz"] > .sec-head {
    grid-column: 1 / -1;
    margin-bottom: 0;
  }
  section[aria-labelledby="secViz"] > .grid-3,
  section[aria-labelledby="secViz"] > .grid-2 { display: contents; }
  /* 2·2·1 에서 홀로 남는 마지막 카드는 가로를 꽉 채운다 */
  section[aria-labelledby="secViz"] > .grid-2 > :last-child { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  section[aria-labelledby="secViz"] { grid-template-columns: minmax(0, 1fr); }
}

/* --- 통계 : 한 덩어리(.grid-4) 안에서 단 수만 바꾼다 --- */
/* 1400px 이하 — 2·2 (4개라 짝수로 딱 떨어져 스팬 배분 불필요) */
@media (max-width: 1400px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* 1080px 이하 — 카드 컴팩트형(아이콘 좌측 배치)만 적용, 단 수는 2 유지 */
@media (max-width: 1080px) {
  .scard { position:relative; padding-bottom:var(--sp-2)}
  .scard h3, .scard p {padding-left:55px;margin-top: 0;}
  .scard .sico { position:absolute; margin-bottom:0;}
  .scard-foot {padding-top: 0;padding-bottom: 0;}
}

/* 900px 이하 — 1단 */
@media (max-width: 900px) {
  .grid-4 { grid-template-columns: minmax(0, 1fr); }
}

/* 메인 팝업 — 관리자 팝업관리(BOARD70) 등록 이미지를 모달로 노출 (bcstat·paciis 이식, 2026-09-30) */

.Modal.event_popup_wrap {display:none;background: rgba(0 0 0/70%) !important;position: fixed;left: 0;top: 0;z-index: 1000;width: 100vw;height: 100vh;align-items: center;justify-content: center;}
.Modal.event_popup_wrap.Open {display:flex;}

.event_popup_wrap .center {position: relative;width: auto;margin: 0;} /* 닫기 버튼 위치 기준 */
.event_popup_wrap .event_popup {line-height: normal;}

.event_popup_wrap .event_popup .popup_content {position: relative;padding: 20px;background: #fff;border-radius:12px;margin-bottom: 20px;width: 700px;height: 500px;max-width: calc(100vw - 40px);box-sizing: content-box;}
.event_popup_wrap .event_popup .popup_content a { display:block;width:100%;height:100%;}
.event_popup_wrap .event_popup .popup_content img { width:100%;height:100%;object-fit:contain;}
.event_popup_wrap .event_popup .popup_content button.btn_close {position: absolute;right: 0;gap: 5px;top: -30px;background: none;color:#fff;font-size: 17px;display:flex;align-items: center;}

.event_popup_wrap .event_popup .popup_content button.btn_close::before { content: ''; display: inline-block;  width: 20px; height: 20px; background: url('../img/main/close-w.svg') no-repeat center center;}

.event_popup_wrap .event_popup .popup_foot {display:flex;justify-content: center;}

.event_popup_wrap .event_popup .popup_foot .popfleft button {display: flex;align-items: center;justify-content: center;padding: 15px 25px;width: 100%;background: #fff; border-radius:30px;font-size: 17px;border:0;cursor:pointer;}
.event_popup_wrap .event_popup .popup_foot .popfleft button .chk_img {position: relative;display: inline-block;width: 19px;height: 19px;border-radius: 50%;background: #999;margin-top: 2px;}
.event_popup_wrap .event_popup .popup_foot .popfleft button .chk_img::after { content: ''; display: block; width: 5px; height: 8px; position: absolute; border-right: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(45deg); left: 6px; top: 3px; }
/* 2026-10-13 체크 표시가 원 안에서 왼쪽 위로 쏠림 — 새 퍼블 공통 css 의 전역 box-sizing:border-box 로 위 5x8 이 테두리 포함 크기가 되어 작아짐. bcstat·paciis 원본과 같은 content-box 로 */
.event_popup_wrap .event_popup .popup_foot .popfleft button .chk_img::after { box-sizing: content-box; }
.event_popup_wrap .event_popup .popup_foot .popfleft button .txt {display: inline-block;margin-left: 5px;}

.event_popup_wrap .event_popup .popup_foot .popfleft button:hover .chk_img,
.event_popup_wrap .event_popup .popup_foot .popfleft button:focus .chk_img,
.event_popup_wrap .event_popup .popup_foot .popfleft button:active .chk_img { background: #000 }

.event_popup_wrap .event_popup .popup_foot .popfleft button:hover .txt,
.event_popup_wrap .event_popup .popup_foot .popfleft button:focus .txt,
.event_popup_wrap .event_popup .popup_foot .popfleft button:active .txt { color: #000; }


.event_popup_wrap .event_popup .popup_foot .popfright button.btn_close {color:#fff;font-size:19px;position:absolute;top:-40px;right:0;display:flex;gap:5px;align-items: center;background:none;border:0;cursor:pointer;width:auto;height:auto;}
.event_popup_wrap .event_popup .popup_foot .popfright button.btn_close::before { content:''; display:block; width:18px; height:18px; background:url('../img/main/close-w.svg') no-repeat center center; transition:all 0.2s;}
.event_popup_wrap .event_popup .popup_foot .popfright button.btn_close:hover::before { transform:rotate(90deg);}
.event_popup_wrap .event_popup .popup_foot .popfright button.btn_close span { display:block; line-height:1;}

/* 모바일: 700x500 고정 박스를 풀고 이미지 크기에 박스가 따라가게 (bcstat 과 동일한 축소 동작) */
@media (max-width: 768px) {
    .event_popup_wrap .event_popup .popup_content {width: auto;height: auto;max-width: calc(100vw - 40px);padding: 12px;}
    .event_popup_wrap .event_popup .popup_content a {width: auto;height: auto;}
    .event_popup_wrap .event_popup .popup_content img {width: auto;height: auto;max-width: 100%;max-height: 70vh;object-fit: unset;}
}

/* 2026-10-13 팝업 여러 건 나열 — 관리자 팝업관리 등록 건을 순번 순으로 가로 나열(.is-multi), 화면 폭을 넘으면 좌우 이동 버튼(.has-overflow, korMainLayout 스크립트).
   1건이면 .is-multi 가 없어 위 단일 팝업 모양 그대로. 닫기·오늘 하루 열지 않기는 전체 팝업에 적용.
   팝업 한 칸의 가로·세로는 1건일 때와 같다(위 .popup_content 크기 그대로 — 구: 여러 건이면 420x420 으로 줄임, 담당자 요청으로 변경) */
.event_popup_wrap .popup_stage {position: relative;}
.event_popup_wrap .popup_nav {display: none;}
.event_popup_wrap .event_popup.is-multi .popup_stage {margin-bottom: 20px;}
.event_popup_wrap .event_popup.is-multi .popup_track {display: flex; gap: 20px; overflow-x: auto; max-width: calc(100vw - 180px); scroll-snap-type: x mandatory; scrollbar-width: none;}
.event_popup_wrap .event_popup.is-multi .popup_track::-webkit-scrollbar {display: none;}
.event_popup_wrap .event_popup.is-multi .popup_content {flex: 0 0 auto; margin-bottom: 0; scroll-snap-align: start;}
.event_popup_wrap .event_popup.is-multi.has-overflow .popup_nav {display: flex; align-items: center; justify-content: center; position: absolute; top: 50%; z-index: 2; width: 56px; height: 56px; margin-top: -28px; padding: 0; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 4px 14px rgba(0, 0, 0, .25); cursor: pointer;}
.event_popup_wrap .event_popup.is-multi .popup_prev {left: -76px;}
.event_popup_wrap .event_popup.is-multi .popup_next {right: -76px;}
.event_popup_wrap .event_popup.is-multi .popup_nav::before {content: ''; display: block; width: 12px; height: 12px; border-left: 3px solid #222; border-bottom: 3px solid #222;}
.event_popup_wrap .event_popup.is-multi .popup_prev::before {transform: rotate(45deg); margin-left: 5px;}
.event_popup_wrap .event_popup.is-multi .popup_next::before {transform: rotate(-135deg); margin-right: 5px;}
.event_popup_wrap .event_popup.is-multi .popup_nav:disabled {opacity: .45; cursor: default;}
.event_popup_wrap .event_popup.is-multi .popup_nav:focus-visible {outline: 3px solid #fff; outline-offset: 3px;}
@media (max-width: 768px) {
    /* 모바일: 한 장씩, 칸 폭은 1건일 때 최대 폭(화면 폭 - 40px)과 같게. 이동 버튼은 팝업 가장자리에 겹쳐 둔다 */
    .event_popup_wrap .event_popup.is-multi .popup_track {gap: 12px; max-width: calc(100vw - 40px);}
    .event_popup_wrap .event_popup.is-multi .popup_content {width: calc(100vw - 40px); display: flex; align-items: center; justify-content: center;}
    .event_popup_wrap .event_popup.is-multi.has-overflow .popup_nav {width: 44px; height: 44px; margin-top: -22px;}
    .event_popup_wrap .event_popup.is-multi .popup_prev {left: 4px;}
    .event_popup_wrap .event_popup.is-multi .popup_next {right: 4px;}
}

.Scroll-No { overflow:hidden;}
