/* =========================================================================
   페이지별 스타일 — 목록 / 상세 / 신청 / 가이드
   ========================================================================= */
.page-head { background: var(--c-surface); padding: 2.5rem 0 2rem; }
.page-head h1 { font-size: var(--fs-h1); line-height: 1.3; }
.page-head p { margin-top: .5rem; color: var(--c-sub); }
.breadcrumb { font-size: var(--fs-min); margin-bottom: .75rem; }
.breadcrumb a { text-decoration: underline; }

/* ---------- 목록 ---------- */
.filters { display: grid; gap: 1.25rem; padding: 1.5rem; border: 1px solid var(--c-line-light); border-radius: var(--radius-lg); background: #fff; }
.filter-group { display: block; }
.filter-group::after { content: ""; display: table; clear: both; }
.filter-group > .fg-title { float: left; width: 10rem; font-weight: 800; padding: .625rem 0 0; }
.filter-group > .chips { margin-left: 10.75rem; }
@media (max-width: 767px) {
  .filter-group > .fg-title { float: none; width: auto; padding: 0; margin-bottom: .5rem; }
  .filter-group > .chips { margin-left: 0; }
}
.filters-foot { display: flex; flex-wrap: wrap; gap: var(--gap-sm); justify-content: space-between; align-items: center; border-top: 1px solid var(--c-line-light); padding-top: 1rem; }
.filters-toggle { display: none; }
@media (max-width: 767px) {
  .filters-toggle { display: flex; }
  .filters.collapsed .filter-group.more { display: none; }
}
.result-bar { display: flex; flex-wrap: wrap; gap: var(--gap-sm); align-items: center; justify-content: space-between; margin: 1.75rem 0 1.25rem; }
.result-count { font-size: var(--fs-lg); font-weight: 800; }
.compare-table td, .compare-table th { min-width: 12rem; }
.compare-hexes { display: grid; grid-template-columns: minmax(0, 30rem) 1fr; gap: 1.5rem; align-items: center; margin-bottom: 1.5rem; }
.compare-hexes svg { width: 100%; height: auto; }
@media (max-width: 767px) { .compare-hexes { grid-template-columns: 1fr; } }

/* ---------- 상세 ---------- */
.detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 22rem; gap: 2.5rem; align-items: start; }
.detail-aside { position: sticky; top: 6rem; display: grid; gap: var(--gap-sm); padding: 1.5rem; border: 1px solid var(--c-line-light); border-radius: var(--radius-lg); background: #fff; }
.detail-aside h2 { font-size: var(--fs-lg); }
@media (max-width: 1023px) { .detail-layout { grid-template-columns: minmax(0, 1fr); } .detail-aside { position: static; } }
.gallery { position: relative; }
.gallery-frame { aspect-ratio: 3 / 2; border-radius: var(--radius-lg); overflow: hidden; background: var(--c-surface); }
.gallery-frame img { width: 100%; height: 100%; object-fit: cover; }
.gallery-ctrl { display: flex; justify-content: center; align-items: center; gap: var(--gap-md); margin-top: .75rem; }
.d-summary h1 { font-size: var(--fs-h1); line-height: 1.3; margin: .75rem 0 .5rem; }
.d-keyprices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap-sm); margin: 1.25rem 0; }
.d-keyprices > div { background: var(--c-surface); border-radius: var(--radius); padding: 1rem; }
.d-keyprices dt { color: var(--c-sub); font-weight: 600; }
.d-keyprices dd { font-size: var(--fs-price); font-weight: 800; }
@media (max-width: 600px) { .d-keyprices { grid-template-columns: 1fr; } }
.d-sec { padding: 2.5rem 0; border-top: 1px solid var(--c-line-light); }
.d-sec > h2 { font-size: var(--fs-h3); margin-bottom: 1.25rem; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.d-sec > h3 { font-size: var(--fs-lg); margin: 1.5rem 0 .75rem; }
.d-note { margin-top: 1rem; padding: 1rem 1.25rem; border-left: 4px solid var(--c-point); background: var(--c-surface); }
.apply4 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap-sm); }
.apply4 .btn { min-height: 3.5rem; }
.detail-aside .apply4 { grid-template-columns: 1fr; }
.infographic { max-width: 34rem; border: 1px solid var(--c-line-light); border-radius: var(--radius-lg); overflow: hidden; }
.infographic svg { width: 100%; height: auto; display: block; }
.ai-badge { position: absolute; left: .75rem; bottom: .75rem; padding: .25rem .625rem; border-radius: 4px; background: rgba(0,0,0,.75); color: #fff; font-size: var(--fs-min); font-weight: 700; }
.gallery-frame { position: relative; }
.care-list { display: grid; gap: .5rem; }
.review { padding: 1.25rem; border-radius: var(--radius-lg); background: var(--c-surface); }
.review p { font-size: var(--fs-lg); }
.review span { display: block; margin-top: .5rem; color: var(--c-sub); font-size: var(--fs-min); }

/* ---------- 신청 폼 ---------- */
.form-wrap { max-width: 50rem; margin: 0 auto; }
.form-call { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--gap-sm); padding: 1rem 1.25rem; border-radius: var(--radius-lg); background: #fdf0e8; border: 1px solid #f0c9b2; margin-bottom: 1.5rem; font-weight: 700; }
.steps { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.25rem; }
.steps-text { font-size: var(--fs-lg); font-weight: 800; white-space: nowrap; }
.steps-bar { flex: 1; height: 6px; border-radius: 3px; background: var(--c-line-light); overflow: hidden; }
.steps-bar i { display: block; height: 100%; background: var(--c-point); transition: width .3s linear; }
.step { display: grid; gap: 1.75rem; }
.step[hidden] { display: none; }
.step h2 { font-size: var(--fs-h3); }
.type-block { padding: 1.5rem; border: 2px solid var(--c-line-light); border-radius: var(--radius-lg); display: grid; gap: 1.25rem; }
.type-block h3 { font-size: var(--fs-lg); color: var(--c-point-dark); }
.fac-list { display: grid; gap: .5rem; }
.fac-opt { display: flex; align-items: flex-start; gap: .75rem; padding: .875rem 1rem; border: 2px solid var(--c-line-light); border-radius: var(--radius); cursor: pointer; }
.fac-opt:has(input:checked) { border-color: var(--c-point); background: var(--c-point-soft); }
.fac-opt input { width: 1.5rem; height: 1.5rem; margin-top: .2rem; accent-color: var(--c-point); flex-shrink: 0; }
.fac-opt small { display: block; color: var(--c-sub); font-size: var(--fs-min); }
.form-nav { display: flex; gap: var(--gap-sm); justify-content: space-between; margin-top: 2rem; }
.form-nav .btn { min-width: 9rem; }
.consent { border: 2px solid var(--c-line-light); border-radius: var(--radius-lg); padding: 1rem 1.25rem; }
.consent + .consent { margin-top: .75rem; }
.consent details summary { cursor: pointer; color: var(--c-point-dark); font-weight: 700; min-height: var(--touch); display: inline-flex; align-items: center; }
.consent .table { min-width: 30rem; font-size: var(--fs-min); }
.consent-all { background: var(--c-surface); }
.done { text-align: center; display: grid; gap: 1rem; justify-items: center; }
.done .big { font-size: var(--fs-h2); font-weight: 800; }
.done .receipt { font-size: var(--fs-h3); font-weight: 800; color: var(--c-point-dark); }
.done .dl-grid { text-align: left; width: 100%; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- 가이드 ---------- */
.guide-step { padding: 2rem 0; border-top: 1px solid var(--c-line-light); }
.guide-step h2 { font-size: var(--fs-h3); margin-bottom: 1.25rem; }
.guide-step .btn { margin-top: 1.5rem; }
.prose h2 { font-size: var(--fs-h3); margin: 2rem 0 .75rem; }
.prose p, .prose li { margin-bottom: .5rem; }
.prose ul { list-style: disc; padding-left: 1.5rem; }

/* =========================================================================
   휴대폰 화면 최적화 (가로 767px 이하) — 본문 18px은 유지, 제목·사진·여백을 줄여 한 화면에 더 많이
   ========================================================================= */
@media (max-width: 767px) {
  html { font-size: calc(16px * var(--scale)); }
  :root { --fs-display: 1.625rem; --fs-h1: 1.5rem; --fs-h2: 1.375rem; --fs-h3: 1.25rem; --fs-title: 1.1875rem; --fs-lg: 1.125rem; --fs-price: 1.125rem; --gap-xl: 2.25rem; }
  .section { padding-top: 2rem; padding-bottom: 2rem; }
  .section-desc { margin-bottom: 1rem; }
  .btn--lg { min-height: var(--touch); padding: .5rem 1.125rem; font-size: var(--fs-body); }

  /* 히어로: 글(왼쪽) + 대표 사진(오른쪽) 나란히 */
  .hero-inner { grid-template-columns: minmax(0, 1fr) 38%; gap: .5rem; align-items: end; padding-top: 1.5rem; }
  .hero-text { padding-bottom: 1.25rem; }
  .hero-eyebrow { font-size: var(--fs-caption); margin-bottom: .5rem; line-height: 1.45; }
  .hero-title { font-size: var(--fs-display); line-height: 1.3; }
  .hero-sub { margin-top: .75rem; font-size: var(--fs-min); line-height: 1.6; }
  .hero-sub, .hero-title { white-space: normal; }
  .hero-cta { margin-top: 1rem; display: grid; gap: .5rem; }
  .hero-cta .btn { width: 100%; padding-left: .375rem; padding-right: .375rem; font-size: .9375rem; letter-spacing: -.03em; white-space: nowrap; gap: .25rem; }
  .hero-person img { max-height: 19rem; }
  .hero-nameplate { left: 0; right: 0; bottom: .5rem; transform: none; width: auto; max-width: none; min-width: 0; padding: .375rem .25rem; border-radius: var(--radius); }
  .hero-nameplate b { font-size: var(--fs-lg); }
  .hero-nameplate span { font-size: .8125rem; line-height: 1.35; }
  .hero-nameplate .np-channel { display: none; }

  /* 간단 찾기: 2칸씩 */
  .finder-band { padding: .75rem 0; }
  .finder-band .finder { grid-template-columns: 1fr 1fr; gap: .625rem; padding: 1rem; }
  .finder-band .finder h2 { font-size: var(--fs-body); }
  .finder-band .finder .field:nth-of-type(3), .finder-band .finder .btn { grid-column: 1 / -1; }
  .finder-band .finder label { font-size: var(--fs-min); }

  /* 대표 소개 + 쇼츠 */
  .profile-inner { gap: 1.5rem; padding-top: 2rem; padding-bottom: 2rem; }
  .profile-headline { font-size: var(--fs-h3); margin-top: .75rem; }
  .profile-intro { font-size: var(--fs-min); }
  .profile-career { margin: 1rem 0; }
  .profile .btn-row { display: grid; grid-template-columns: 1fr 1fr; }
  .profile .btn-row .btn { padding-left: .5rem; padding-right: .5rem; font-size: var(--fs-min); }
  .profile .btn-row .btn:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .shorts-poster { width: min(100%, 14rem); }

  /* 신청 유형 4칸: 낮게 */
  .apply-grid { gap: .625rem; }
  .apply-tile { min-height: 0; padding: 1rem; gap: .25rem; }
  .apply-tile .ico { font-size: 1.5rem; }
  .apply-tile b { font-size: var(--fs-lg); }
  .apply-tile span { font-size: var(--fs-min); line-height: 1.45; }

  /* 지역·유형 배너: 낮게 */
  .kv { min-height: 13rem; }
  .kv-text { padding-top: 2rem; padding-bottom: 1.5rem; }
  .kv-title { font-size: var(--fs-h2); }
  .kv-desc { font-size: var(--fs-min); }
  .kv-cta { margin-top: 1rem; }

  /* 시설 카드: 사진 16:9, 요약 2줄, 육각형 작게 */
  .fcard-img { aspect-ratio: 16 / 9; }
  .fcard-body { padding: 1rem; gap: .375rem; }
  .fcard-summary { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: var(--fs-min); }
  .fcard-prices { font-size: var(--fs-min); }
  .fcard-hex { max-width: 13rem; }
  .fcard-actions { padding: 0 1rem 1rem; }
  .fcard-compare { padding: 0 1rem .5rem; }
  /* 메인의 카드 묶음은 옆으로 넘겨 보기 (한 묶음 = 카드 한 장 높이) */
  #home .card-grid { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 86%; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: .5rem; }
  #home .card-grid > * { scroll-snap-align: start; }

  /* 캐러셀 카드 */
  .carousel-track { grid-auto-columns: 72%; gap: 1rem; }
  .rcard-title { font-size: var(--fs-lg); margin-top: .625rem; }
  .arrow-btn { min-height: var(--touch); padding: .375rem .875rem; font-size: var(--fs-min); }

  /* 목록 필터: 조건 줄마다 옆으로 넘기기 (한 줄씩) */
  .page-head { padding: 1.25rem 0 1rem; }
  .filters { padding: 1rem; gap: .75rem; }
  .filter-group > .fg-title { font-size: var(--fs-min); margin-bottom: .375rem; }
  .filter-group > .chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: .25rem; scrollbar-width: none; }
  .filter-group > .chips::-webkit-scrollbar { display: none; }
  .filter-group > .chips > span { flex-shrink: 0; }
  .chip { padding: .375rem .875rem; font-size: var(--fs-min); }
  .result-bar { margin: 1.25rem 0 .75rem; }
  .result-count { font-size: var(--fs-body); }

  /* 상세 */
  .d-summary h1 { font-size: var(--fs-h1); margin: .5rem 0 .25rem; }
  .d-keyprices { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .375rem; margin: .875rem 0; }
  .d-keyprices > div { padding: .625rem .5rem; }
  .d-keyprices dt { font-size: .875rem; }
  .d-keyprices dd { font-size: var(--fs-min); line-height: 1.35; }
  .d-sec { padding: 1.5rem 0; }
  .d-sec > h2 { font-size: var(--fs-h3); margin-bottom: .875rem; }
  .gallery-frame { aspect-ratio: 16 / 10; }
  .infographic { max-width: 100%; }

  /* 100문 100답·가이드 */
  .qna-item summary { font-size: var(--fs-body); padding: .875rem 1rem; }
  .guide-step { padding: 1.25rem 0; }
}
@media (max-width: 380px) {
  .hero-inner { grid-template-columns: minmax(0, 1fr) 36%; }
  .hero-title { font-size: 1.5rem; }
}
/* 휴대폰 헤더는 글자 크기 설정과 관계없이 한 줄에 들어가게 고정 크기 */
@media (max-width: 767px) {
  .header-inner { min-height: 60px; gap: 8px; }
  .site-header .logo { font-size: 17px; gap: 6px; min-height: 44px; }
  .site-header .logo-mark { width: 28px; height: 28px; font-size: 14px; }
  .site-header .fs-toggle { min-height: 44px; padding: 4px 10px; font-size: 15px; }
  .site-header .call-btn { min-height: 44px; min-width: 44px; padding: 4px 12px; font-size: 16px; }
  .site-header .menu-btn { width: 44px; height: 44px; font-size: 20px; }
  .site-header .header-actions { gap: 6px; flex-shrink: 0; }
}

/* =========================================================================
   가시성 강화 (2차) — 굵은 제목, 강조색, 줄 간격, 대표 사진 크게, 신뢰 표시
   보험·금융사 모바일 사이트의 시니어 친화 패턴 참고: 큰 제목 + 핵심어 1개 강조,
   전화·상담 버튼 2개 상시 노출, 첫 화면에 신뢰 정보, 짧은 문장, 넉넉한 줄 간격
   ========================================================================= */
:root { --c-gold: #f5c64a; --c-gold-deep: #e0a91c; --c-ink: #0d2a21; }
body { line-height: 1.7; }
h1, h2, h3 { letter-spacing: -0.03em; }
.section-title { font-weight: 900; color: var(--c-ink); line-height: 1.3; }
.section-desc { line-height: 1.7; }
.btn { font-weight: 800; }
.btn--gold { background: var(--c-gold); border-color: var(--c-gold); color: #1a1a1a; }
.btn--gold:hover { background: var(--c-gold-deep); border-color: var(--c-gold-deep); color: #111; }
.btn--call { box-shadow: 0 6px 16px rgba(180, 64, 11, .28); }
.hl { font-style: normal; color: var(--c-gold); }

/* 히어로 (PC) */
.hero-inner { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); grid-template-areas: "text person" "actions person"; align-items: end; column-gap: 3rem; row-gap: 0; padding-top: 4.5rem; padding-bottom: 0; }
.hero-text { grid-area: text; align-self: end; padding-bottom: 0; }
.hero-person { grid-area: person; }
.hero-actions { grid-area: actions; align-self: start; padding: 2rem 0 3.5rem; }
.hero-eyebrow { display: inline-flex; align-items: center; gap: .375rem; padding: .375rem .875rem; border-radius: 999px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.3); color: #fff; font-weight: 700; font-size: var(--fs-min); }
.hero-eyebrow span { color: #ff6b5e; }
.hero-title { font-weight: 900; line-height: 1.22; letter-spacing: -0.035em; text-shadow: 0 2px 12px rgba(0,0,0,.25); }
.hero-sub { color: #eef5f1; line-height: 1.7; }
.sub-mo { display: none; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 0; }
.hero-cta .btn b { font-weight: 900; }
.hero-trust { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.25rem; }
.hero-trust li { display: inline-flex; align-items: center; gap: .375rem; padding: .25rem .75rem; border-radius: 999px; background: rgba(0,0,0,.25); color: #fff; font-size: var(--fs-caption); font-weight: 600; }
.hero-trust li::before { content: "✓"; color: var(--c-gold); font-weight: 900; }
.hero-person::before { width: 105%; height: 80%; background: radial-gradient(closest-side, rgba(245,198,74,.38), rgba(245,198,74,.08) 60%, rgba(245,198,74,0)); }
.hero-person img { max-height: 36rem; filter: drop-shadow(0 20px 36px rgba(0,0,0,.5)); }
.hero-nameplate { padding: .75rem 1.5rem; border: 2px solid var(--c-gold); }
.hero-nameplate b small { font-size: .6em; font-weight: 700; color: var(--c-sub); }

/* 카드·타일 */
.fcard { box-shadow: 0 2px 12px rgba(13, 42, 33, .06); }
.fcard-name { font-weight: 900; letter-spacing: -0.03em; }
.fcard-prices dd { color: var(--c-ink); }
.apply-tile .ico { display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: 50%; background: var(--c-point-soft); font-size: 1.5rem; }
.apply-tile b { font-weight: 900; }
.kv-title { font-weight: 900; text-shadow: 0 2px 10px rgba(0,0,0,.35); }
.profile-headline { font-weight: 900; }
.float-btn { font-weight: 900; }

/* 히어로 (휴대폰): 제목 → 대표 사진 크게 → 버튼 2개 + 신뢰 표시 */
@media (max-width: 767px) {
  .hero-inner { grid-template-columns: 1fr; grid-template-areas: "text" "person" "actions"; gap: 0; padding-top: 1.25rem; }
  .hero-text { padding-bottom: 0; text-align: left; }
  .hero-eyebrow { font-size: .875rem; padding: .3rem .75rem; margin-bottom: .75rem; }
  .hero-title { font-size: 1.875rem; line-height: 1.28; }
  .hero-sub { margin-top: .625rem; font-size: 1rem; line-height: 1.65; }
  .sub-pc { display: none; }
  .sub-mo { display: inline; white-space: pre-line; }
  .hero-person { margin-top: .5rem; }
  .hero-person::before { width: 92%; height: 78%; }
  .hero-person img { max-height: 22rem; }
  .hero-nameplate { left: 50%; right: auto; bottom: .75rem; transform: translateX(-50%); width: max-content; max-width: 94%; padding: .5rem 1rem; border-radius: var(--radius-lg); }
  .hero-nameplate b { font-size: 1.25rem; }
  .hero-nameplate span { font-size: .875rem; }
  .hero-actions { padding: 1rem 0 1.5rem; }
  .hero-cta { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
  .hero-cta .btn { min-height: 3.5rem; padding: .375rem .5rem; font-size: 1rem; line-height: 1.25; white-space: normal; letter-spacing: -0.02em; }
  .hero-cta .btn--call > span:last-child { display: flex; flex-direction: column; align-items: flex-start; }
  .hero-cta .btn--call b { font-size: 1.0625rem; }
  .hero-trust { margin-top: .875rem; gap: .375rem; }
  .hero-trust li { font-size: .9375rem; padding: .25rem .625rem; }
}
@media (max-width: 380px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-title { font-size: 1.75rem; }
}
.fcard-notice { font-size: var(--fs-caption); line-height: 1.55; color: #5b3a8a; background: #f4f0fa; border-radius: var(--radius); padding: .375rem .625rem; }

/* ---- 검수 후 보완 ---- */
.hero-eyebrow span { color: var(--c-gold); }                               /* 대비 4.3 → 금색 */
.fcard-name a { display: inline-block; padding: .5rem 0; min-height: 44px; }  /* 시설명 누르기 쉽게 */
.footer-call .num { display: flex; align-items: center; min-height: 44px; }
.shorts-head a { display: inline-flex; align-items: center; min-height: 44px; }
.logo-tag { font-size: .68em; }
@media (max-width: 767px) {
  .hero-eyebrow { font-size: .9375rem; }
  .d-keyprices dt { font-size: .9375rem; }
  .site-header .logo { font-size: 18px; }
  .site-header .logo-text small { font-size: 14px; }
  .site-header .logo-tag { font-size: 13px; padding: 0 5px; }
}
@media (max-width: 380px) {
  .site-header .logo { font-size: 17px; }
  .site-header .fs-toggle { padding: 4px 8px; }
}
@media (max-width: 380px) {
  .site-header .logo { font-size: 16px; gap: 4px; }
  .site-header .logo-mark { display: none; }
  .site-header .logo-text small { font-size: 13px; }
}
@media (max-width: 767px) {
  .hero-nameplate span { font-size: .9375rem; }
  .hero-nameplate b small { font-size: .75em; }
}
.fs-short { display: none; }
@media (max-width: 767px) {
  .site-header .fs-toggle .fs-full { display: none; }
  .site-header .fs-toggle .fs-short { display: inline; }
  .site-header .fs-toggle { min-width: 52px; }
}

/* ---------- 회원가입 ---------- */
.join-head { background: linear-gradient(135deg, #123d31, #1d5c4a); color: #fff; }
.join-head .breadcrumb a, .join-head p { color: #eef5f1; }
.join-head h1 { color: #fff; font-weight: 900; }
.join-benefits { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem 1rem; margin-top: 1rem; }
.join-benefits li { display: flex; gap: .5rem; align-items: baseline; font-weight: 700; }
.join-benefits li::before { content: "✓"; color: var(--c-gold); font-weight: 900; }
.join-form { display: grid; gap: 1.5rem; }
.join-form .step { gap: 1.25rem; padding: 1.25rem; border: 1px solid var(--c-line-light); border-radius: var(--radius-lg); background: #fff; }
.join-form .step h2 { font-size: var(--fs-lg); color: var(--c-point-dark); }
.join-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: .5rem; }
.fcard-hexrow { display: block; }
.fcard-scores { display: none; }

/* =========================================================================
   휴대폰 밀도 조정 (3차) — 9:16 화면(360×640)에 카드·구획 하나가 들어오도록
   누르는 요소는 44px(애플 최소 기준), 간격은 촘촘하게
   ========================================================================= */
@media (max-width: 767px) {
  :root { --touch: 44px; --input-h: 3rem; }
  .btn { min-height: 44px; padding: .375rem .875rem; }
  .btn--lg { min-height: 46px; }
  .chips { gap: .375rem; }
  .chip { min-height: 40px; padding: .25rem .75rem; font-size: .9375rem; border-width: 1.5px; }
  .section { padding-top: 1.5rem; padding-bottom: 1.5rem; }
  .section-title { font-size: 1.3125rem; margin-bottom: .5rem; }
  .section-head { margin-bottom: .875rem; }
  .section-desc { font-size: 1rem; margin-bottom: .875rem; }
  .page-head { padding: 1rem 0 .875rem; }
  .page-head h1 { font-size: 1.375rem; }
  .page-head p { font-size: 1rem; margin-top: .25rem; }
  .breadcrumb { margin-bottom: .375rem; }
  .card-grid { gap: .75rem; }

  /* 시설 카드: 가로형 (사진 왼쪽 · 이름·가격 오른쪽) */
  .fcard { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); column-gap: .75rem; row-gap: .375rem; padding: .75rem; align-content: start; }
  .fcard-body { display: contents; }
  .fcard-img { grid-column: 1; grid-row: 1 / span 3; aspect-ratio: 1 / 1; border-radius: var(--radius); }
  .fcard-img .badge-sample { left: .25rem; top: .25rem; right: .25rem; font-size: .75rem; padding: 0 .25rem; line-height: 1.4; white-space: normal; }
  .fcard-meta, .fcard-region, .fcard-name { grid-column: 2; }
  .fcard-meta { gap: .25rem; }
  .fcard-meta .type-badge, .fcard-meta .loc-badge, .fcard-meta .plan-badge { font-size: .8125rem; padding: 0 .375rem; border-width: 1.5px; }
  .fcard-region { font-size: .9375rem; }
  .fcard-name { font-size: 1.125rem; line-height: 1.3; }
  .fcard-name a { min-height: 0; padding: .125rem 0; }
  .fcard-summary, .fcard-notice, .fcard-prices, .fcard-hexrow, .fcard-tags, .fcard-protect, .fcard-compare, .fcard-actions { grid-column: 1 / -1; }
  .fcard-summary { font-size: .9375rem; line-height: 1.5; -webkit-line-clamp: 2; }
  .fcard-prices { grid-template-columns: auto 1fr auto 1fr; column-gap: .5rem; align-items: baseline; padding: .375rem .5rem; border-radius: var(--radius); background: var(--c-surface); }
  .fcard-prices dt { font-size: .875rem; }
  .fcard-prices dd { font-size: 1rem; }
  .fcard-hexrow { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr); gap: .5rem; align-items: center; }
  .fcard-hex { max-width: 8.5rem; margin: 0; }
  .fcard-hex svg text { display: none; }
  .fcard-scores { display: grid; grid-template-columns: 1fr 1fr; gap: .125rem .75rem; }
  .fcard-scores li { display: flex; justify-content: space-between; border-bottom: 1px dotted var(--c-line); font-size: .9375rem; padding: .125rem 0; }
  .fcard-scores b { color: var(--c-point-dark); font-weight: 900; }
  .fcard-scores b.na { color: #777; font-weight: 600; }
  .fcard-tags { gap: .25rem; }
  .fcard-tags .tag { font-size: .8125rem; padding: 0 .5rem; }
  .fcard-protect { font-size: .875rem; }
  .fcard-protect .status { font-size: .8125rem; }
  .fcard-compare { padding: 0; min-height: 36px; font-size: .9375rem; }
  .fcard-compare input { width: 1.25rem; height: 1.25rem; }
  .fcard-actions { padding: 0; gap: .5rem; }
  .fcard-actions .btn { min-height: 42px; font-size: .9375rem; }

  /* 목록 화면 */
  .filters { padding: .625rem .75rem; gap: .5rem; border-radius: var(--radius); }
  .filter-group > .fg-title { font-size: .875rem; margin-bottom: .125rem; color: var(--c-sub); }
  .filters-foot { padding-top: .375rem; gap: .375rem; flex-wrap: nowrap; }
  .filters-foot .btn { min-height: 40px; font-size: .9375rem; padding: .25rem .75rem; }
  .result-bar { margin: .75rem 0 .5rem; gap: .375rem; }
  .result-bar .chips { flex-wrap: nowrap; overflow-x: auto; }
  .result-bar .chip { white-space: nowrap; }
  #list-page .hint { font-size: .875rem; line-height: 1.5; }
  .compare-bar { padding: .5rem .75rem; gap: .5rem; }
  .compare-bar .btn { min-height: 40px; }

  /* 상세·폼·기타 */
  .d-sec { padding: 1.125rem 0; }
  .dl-grid dt, .dl-grid dd { padding: .5rem .75rem; }
  .dl-grid dd { font-size: 1rem; }
  .table th, .table td { padding: .5rem .625rem; font-size: .9375rem; }
  .apply4 { gap: .5rem; }
  .apply4 .btn { min-height: 46px; font-size: .9375rem; }
  .box { padding: 1.125rem; }
  .step { gap: 1.125rem; }
  .field { gap: .375rem; }
  .form-call { padding: .625rem .875rem; margin-bottom: 1rem; font-size: .9375rem; }
  .consent { padding: .625rem .875rem; }
  .check { min-height: 40px; padding: .25rem 0; }
  .join-benefits { grid-template-columns: 1fr; gap: .25rem; margin-top: .5rem; font-size: .9375rem; }
  .join-form { gap: 1rem; }
  .join-form .step { padding: .875rem; gap: .875rem; }
  .qna-item summary { padding: .625rem .875rem; min-height: 44px; }
  .qna-item .qna-body { padding: 0 .875rem .875rem; }
  .apply-tile { padding: .75rem; }
  .apply-tile .ico { width: 2.5rem; height: 2.5rem; font-size: 1.25rem; }
  .kv { min-height: 11rem; }
  .kv-text { padding-top: 1.5rem; padding-bottom: 1.25rem; }
  .float-bar .float-btn { min-height: 56px; }
  body { padding-bottom: calc(56px + env(safe-area-inset-bottom)); }
}
@media (max-width: 767px) {
  .fcard-scores b { white-space: nowrap; font-variant-numeric: tabular-nums; }
  .fcard-hexrow { grid-template-columns: 7.5rem minmax(0, 1fr); }
  .fcard-hex { max-width: 7.5rem; }
  .fcard-img .badge-unverified { display: none; }             /* 목록 위 안내문으로 대신 */
  .fcard:has(.fcard-notice) .fcard-summary { display: none; } /* 안내문이 있으면 요약은 상세에서 */
  .fcard-tags .tag:nth-child(n+3) { display: none; }
}
@media (max-width: 767px) {
  .fcard-prices { grid-template-columns: auto 1fr; row-gap: 0; }
  .fcard-prices dd { white-space: nowrap; }
}
@media (max-width: 767px) {
  .fcard-compare { grid-column: 1; align-self: center; }
  .fcard-compare + .fcard-actions { grid-column: 2; }
  .fcard-actions .btn { padding-left: .375rem; padding-right: .375rem; }
}
@media (max-width: 767px) {
  .fcard-meta .type-badge, .fcard-meta .loc-badge, .fcard-meta .plan-badge { font-size: .875rem; }
  .filter-group > .fg-title { font-size: .9375rem; }
  .fcard-scores b.na { color: #555; }
  .fcard-tags .tag, .fcard-protect .status { font-size: .875rem; }
}

/* =========================================================================
   4차: 1번(신청 4칸) 형태로 통일 — 둥근 흰 타일 · 원형 아이콘 · 굵은 제목 · 짧은 설명 · "→"
   ========================================================================= */
/* 실버타운 카드 (축약 타일, 카드 전체가 상세로 연결) */
.card-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.ftile { display: flex; flex-direction: column; min-width: 0; }
.ftile-link { display: flex; flex-direction: column; height: 100%; border: 2px solid var(--c-line-light); border-radius: var(--radius-lg); background: #fff; overflow: hidden; text-decoration: none; color: var(--c-text); transition: border-color .2s linear; }
.ftile-link:hover, .ftile-link:focus-visible { border-color: var(--c-point); }
.ftile-img { position: relative; display: block; aspect-ratio: 4 / 3; background: var(--c-surface); }
.ftile-img img { width: 100%; height: 100%; object-fit: cover; }
.ftile-flag { position: absolute; left: .5rem; top: .5rem; }
.ftile-body { display: flex; flex-direction: column; gap: .25rem; padding: .875rem 1rem 1rem; flex: 1; }
.ftile-name { font-size: var(--fs-lg); font-weight: 900; line-height: 1.35; letter-spacing: -0.03em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ftile-meta { font-size: .9375rem; color: var(--c-sub); line-height: 1.45; }
.ftile-price { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; font-size: .9375rem; }
.ftile-price:first-of-type { margin-top: .25rem; padding-top: .5rem; border-top: 1px solid var(--c-line-light); }
.ftile-price span { color: var(--c-sub); }
.ftile-price b { font-weight: 900; color: var(--c-ink); white-space: nowrap; }
.ftile-go { margin-top: auto; padding-top: .5rem; font-weight: 800; color: var(--c-point-dark); }
.ftile-compare { display: flex; align-items: center; justify-content: center; gap: .375rem; min-height: 40px; font-size: .9375rem; font-weight: 700; cursor: pointer; }
.ftile-compare input { width: 1.25rem; height: 1.25rem; accent-color: var(--c-point); }
@media (max-width: 1100px) { .card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 767px) {
  .card-grid, #home .card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-flow: row; grid-auto-columns: auto; overflow: visible; gap: .625rem; }
  .ftile-body { padding: .625rem .75rem .75rem; gap: .125rem; }
  .ftile-name { font-size: 1.0625rem; }
  .ftile-meta { font-size: .875rem; }
  .ftile-price { flex-direction: column; align-items: flex-start; gap: 0; font-size: .875rem; }
  .ftile-price b { font-size: 1rem; }
  .ftile-price:first-of-type { padding-top: .375rem; }
  .ftile-go { font-size: .9375rem; }
  .ftile-flag .plan-badge { font-size: .8125rem; padding: 0 .375rem; }
  .ftile-compare { min-height: 36px; font-size: .875rem; }
}

/* 조건별 찾기: 기준 탭 3칸 격자 + 옵션은 신청 타일 형태 */
@media (max-width: 767px) {
  .qf-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .qf-tab { border: 2px solid var(--c-line-light); background: #fff; }
  .qf-tab[aria-selected="true"] { background: var(--c-point); border-color: var(--c-point); color: #fff; }
  .qf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.qf-tile { display: flex; flex-direction: column; gap: .375rem; padding: 1.25rem; border-radius: var(--radius-lg); background: #fff; border: 2px solid var(--c-line-light); text-decoration: none; color: var(--c-text); }
.qf-tile:hover, .qf-tile:focus-visible { border-color: var(--c-point); }
.qf-tile .ico { display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: 50%; background: var(--c-point-soft); font-size: 1.5rem; }
.qf-tile b { font-size: var(--fs-title); font-weight: 900; line-height: 1.3; }
.qf-tile span { color: var(--c-sub); }
.qf-tile .go { margin-top: auto; font-weight: 800; color: var(--c-point-dark); }

@media (max-width: 767px) {
  .qf-tabs { gap: .375rem; margin-bottom: .875rem; }
  .qf-tab { min-height: 44px; font-size: .9375rem; padding: .25rem; border-radius: var(--radius); }
  .qf-grid { gap: .625rem; }
  .qf-tile { padding: .875rem; gap: .25rem; }
  .qf-tile .ico { width: 2.5rem; height: 2.5rem; font-size: 1.25rem; }
  .qf-tile b { font-size: 1.0625rem; }
  .qf-tile span { font-size: .9375rem; line-height: 1.45; }
}
@media (max-width: 767px) {
  .ftile-img { aspect-ratio: 16 / 10; }
  .ftile-price { flex-direction: row; align-items: baseline; justify-content: flex-start; gap: .375rem; font-size: .875rem; }
  .ftile-price b { font-size: .9375rem; }
  .ftile-price + .ftile-price { margin-top: 0; }
}

/* PC/휴대폰 전용 표시 */
@media (min-width: 768px) { .mo-only { display: none !important; } }
@media (max-width: 767px) { .pc-only { display: none !important; } }

/* =========================================================================
   글자 검수 보완 — 숫자 자간 0, 금액 덩어리 줄바꿈, 상태 설명 줄, 라벨 줄바꿈 방지
   ========================================================================= */
.nw { white-space: nowrap; }
.ftile-price b, .fcard-prices dd, .d-keyprices dd, .rcard-price b, .profile-stats dd, .hero-cta b, .call-btn, .cs-num { letter-spacing: 0; font-variant-numeric: tabular-nums; }
.ftile-price span:not(.nw) { white-space: nowrap; flex-shrink: 0; }
.ftile-price { flex-wrap: wrap; column-gap: .375rem; row-gap: 0; }
.dd-note { display: block; margin-top: .25rem; color: var(--c-sub); font-size: .9375em; line-height: 1.55; }
.dl-grid dd { line-height: 1.6; }
.prose p, .prose li { line-height: 1.75; }
.section-desc, .hero-sub, .profile-intro, .fcard-summary, .d-note, .box p { word-break: keep-all; }

/* 글자 간격 2차 — 본문 자간 -0.01em, 제목 -0.025em, 줄 간격 정리 */
h1, h2, h3 { letter-spacing: -0.025em; }
.section-title, .fcard-name, .ftile-name, .qf-tile b, .apply-tile b, .profile-headline, .kv-title { letter-spacing: -0.025em; }
.hero-title { letter-spacing: -0.03em; }
.ftile-meta { line-height: 1.5; }
@media (max-width: 767px) {
  .ftile-price { flex-direction: column; align-items: flex-start; gap: 0; }
  .ftile-price > span:first-child { font-size: .8125rem; line-height: 1.4; }
  .ftile-price b { font-size: 1rem; line-height: 1.35; }
  .ftile-price + .ftile-price { margin-top: .25rem; }
  .d-keyprices { grid-template-columns: 1fr; gap: .375rem; }
  .d-keyprices > div { display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding: .5rem .75rem; }
  .d-keyprices dt { font-size: .9375rem; }
  .d-keyprices dd { font-size: 1.0625rem; text-align: right; }
  .hero-cta .btn { letter-spacing: -0.01em; }
}

.fcard-prices { align-items: baseline; }

/* ---------- 둥근 개별 상담 버튼 (오른쪽 아래, PC·휴대폰 공통) ---------- */
body { padding-bottom: 0; }
.float-bar, .float-bar.has-chat { position: fixed; z-index: 90; left: auto; top: auto; right: 1.25rem; bottom: calc(1.25rem + env(safe-area-inset-bottom)); display: flex; flex-direction: column; align-items: center; gap: .625rem; background: none; border: 0; padding: 0; grid-template-columns: none; }
.float-bar .float-btn, .float-bar.has-chat .float-btn { width: 5rem; height: 5rem; min-height: 0; padding: 0; border-radius: 50%; border: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .25rem; font-size: .875rem; font-weight: 800; line-height: 1.15; letter-spacing: -0.02em; text-align: center; box-shadow: 0 6px 18px rgba(0,0,0,.22); transition: transform .15s ease, background .15s ease; }
.float-bar .float-btn:active { transform: scale(.94); }
.fab-ic { width: 1.75rem; height: 1.75rem; flex: none; }
.fab-t { display: block; white-space: nowrap; }
.float-bar .float-btn--call { background: var(--c-call); color: #fff; }
.float-bar .float-btn--apply { background: var(--c-point); color: #fff; }
.float-bar .float-btn--chat, .float-bar.has-chat .float-btn--chat { background: #fff; color: var(--c-point-dark); border: 2px solid var(--c-point); }
.float-bar .float-btn--qna { background: #c8a24a; color: #1f1a0e; }
.float-bar .float-btn--qna:hover { background: #b8913a; }
.float-bar .to-top { width: 3rem; height: 3rem; font-size: .8125rem; box-shadow: var(--shadow); }
.float-bar .to-top:not(.show) { display: none; }
html.chat-open .float-bar { display: none; }
@media (max-width: 767px) {
  .float-bar, .float-bar.has-chat { right: .75rem; bottom: calc(.875rem + env(safe-area-inset-bottom)); gap: .5rem; }
  .float-bar .float-btn, .float-bar.has-chat .float-btn { width: 4rem; height: 4rem; font-size: .75rem; gap: .125rem; }
  .fab-ic { width: 1.375rem; height: 1.375rem; }
  .float-bar .to-top { display: none; }
  .compare-bar { bottom: calc(.75rem + env(safe-area-inset-bottom)); left: .75rem; right: 5.5rem; transform: none; }
  footer, .site-footer { padding-bottom: 6rem; }
}

/* ---------- 상담 버튼: 알약(둥근 사각) 모양 + 이모지 아이콘 ---------- */
.float-bar, .float-bar.has-chat { align-items: flex-end; gap: .75rem; }
.float-bar .float-btn, .float-bar.has-chat .float-btn { width: auto; height: auto; min-height: 4rem; padding: 0 1.75rem 0 1.5rem; border-radius: 999px; flex-direction: row; gap: .625rem; font-size: 1.25rem; font-weight: 900; letter-spacing: -0.02em; box-shadow: 0 6px 16px rgba(0,0,0,.2); }
.fab-e { font-size: 1.25em; line-height: 1; }
.float-bar .float-btn--chat, .float-bar.has-chat .float-btn--chat { background: #fff; color: var(--c-point-dark); border: 3px solid var(--c-point); }
.float-bar .float-btn--apply { background: var(--c-point-dark); color: #fff; }
.float-bar .float-btn--qna { background: #fff; color: #7a5a12; border: 3px solid #c8a24a; }
.float-bar .float-btn--qna:hover { background: #fbf5e6; }
.float-bar .to-top { align-self: flex-end; }
@media (max-width: 767px) {
  .float-bar, .float-bar.has-chat { gap: .4375rem; right: .625rem; }
  .float-bar .float-btn, .float-bar.has-chat .float-btn { min-height: 2.75rem; padding: 0 .875rem 0 .75rem; gap: .375rem; font-size: .9375rem; border-width: 2px; box-shadow: 0 4px 12px rgba(0,0,0,.2); }
  .float-bar .float-btn--call, .float-bar .float-btn--apply { border: 0; }
  .compare-bar { right: 7.5rem; }
}
.float-bar .float-btn, .float-bar.has-chat .float-btn { min-width: 10.75rem; justify-content: center; }
@media (max-width: 767px) { .float-bar .float-btn, .float-bar.has-chat .float-btn { min-width: 7.25rem; } }
