/* ============================================================
   요양원매매114 레퍼런스 그대로 재현 · 블루톤 프리미엄 버전
   기존 style.css 뒤에 로드되어 override
============================================================ */

/* ★★★ 모바일 · 가로 스크롤 방지 (전역) ★★★ */
html, body { max-width: 100%; overflow-x: hidden; }
* { max-width: 100%; box-sizing: border-box; }
img, video, iframe { max-width: 100%; height: auto; }

/* ★★★ 전체 폰트 크기 확대 · 시니어 접근성 · 데스크톱만 ★★★ */
@media (min-width: 901px) {
  html, body { font-size: 18px !important; line-height: 1.7 !important; }
  h1 { font-size: 36px !important; line-height: 1.3 !important; font-weight: 800; }
  h2 { font-size: 26px !important; line-height: 1.35 !important; font-weight: 800; }
  h3 { font-size: 22px !important; line-height: 1.4 !important; font-weight: 700; }
  h4 { font-size: 20px !important; font-weight: 700; }
  p, li, dd, dt { font-size: 17px !important; line-height: 1.75 !important; }
  label { font-size: 16px !important; font-weight: 600 !important; }
  input, textarea, select, button { font-size: 17px !important; }
  input[type="text"], input[type="tel"], input[type="email"],
  input[type="password"], input[type="number"], input[type="search"],
  input[type="date"], input[type="datetime-local"], textarea, select {
    padding: 13px 15px !important;
  }
  .btn { font-size: 17px !important; padding: 14px 24px !important; font-weight: 700 !important; }
  .btn-sm { font-size: 15px !important; padding: 9px 16px !important; }
  .btn-lg { font-size: 19px !important; padding: 17px 32px !important; }
  table th, table td { font-size: 16px !important; }
  .site-header .brand-logo-image { max-height: 64px !important; }
  .site-header .nav-primary a { font-size: 18px !important; padding: 14px 20px !important; font-weight: 600 !important; }
  small { font-size: 14px !important; }

  .list-hero-title { font-size: 26px !important; }   /* ⭐ 42 → 26 · 축소 */
  .list-hero-desc { font-size: 14px !important; }    /* ⭐ 18 → 14 */
  .ref-hero h1 { font-size: 40px !important; line-height: 1.25 !important; }  /* ⭐ 46 → 40 */
  .ref-hero p { font-size: 18px !important; }
  .ref-hero-eyebrow { font-size: 16px !important; letter-spacing: 0.05em; }

  section.section table th, section.section table td {
    font-size: 17px !important;
    padding: 17px 20px !important;
  }
  section.section h2 { font-size: 24px !important; }
  .alert { font-size: 16px !important; padding: 15px 20px !important; }
}
.container { max-width: 1400px; padding: 0 16px; }

/* ★★★ 모바일 · 정상 크기 폰트 + 로고 축소 + 가로 스크롤 방지 ★★★ */
@media (max-width: 900px) {
  html, body { font-size: 14px !important; line-height: 1.5 !important; overflow-x: hidden !important; }
  body { min-width: 0 !important; width: 100% !important; }
  h1 { font-size: 18px !important; line-height: 1.3 !important; }
  h2 { font-size: 15px !important; line-height: 1.35 !important; }
  h3 { font-size: 14px !important; }
  h4 { font-size: 13px !important; }
  p, li, dd, dt { font-size: 13px !important; line-height: 1.5 !important; }
  label { font-size: 12px !important; }
  input, textarea, select, button { font-size: 14px !important; }
  input[type="text"], input[type="tel"], input[type="email"],
  input[type="password"], input[type="number"], input[type="search"],
  textarea, select {
    padding: 8px 10px !important;
  }
  small { font-size: 11px !important; }

  /* 로고 · 모바일 매우 작게 */
  .site-header .brand-logo-image { max-height: 26px !important; width: auto !important; }
  .site-header .brand-logo { padding: 4px 0 !important; gap: 8px !important; }
  .site-header .brand-logo-text { font-size: 15px !important; font-weight: 800 !important; }

  /* 햄버거 메뉴 · 명확히 표시 · 조금 작게 */
  .site-header .menu-toggle {
    display: flex !important;
    width: 38px !important;
    height: 38px !important;
    background: rgba(255,255,255,0.18) !important;
    border: 1px solid rgba(255,255,255,0.35) !important;
  }

  /* 컨테이너 · 좌우 여백 축소 · 가로 오버플로우 방지 */
  .container { padding: 0 10px !important; max-width: 100% !important; box-sizing: border-box !important; }
  section.section { padding: 12px 0 !important; }
  section.section > .container { padding: 0 10px !important; }

  /* 헤더 축소 */
  .site-header { min-height: auto !important; padding: 0 !important; }
  .site-header .site-inner { padding: 6px 10px !important; min-height: 42px !important; }

  /* 표 · 모바일에서 전체 폭 */
  table { width: 100% !important; max-width: 100% !important; }
  table th, table td { padding: 6px 5px !important; font-size: 11px !important; }

  /* ★ 히어로 · 대폭 축소 ★ */
  .ref-hero { padding: 40px 0 !important; min-height: auto !important; }
  .ref-hero h1 { font-size: 18px !important; line-height: 1.35 !important; margin-bottom: 8px !important; }
  .ref-hero p { font-size: 12px !important; line-height: 1.5 !important; margin: 0 !important; }
  .ref-hero-eyebrow { font-size: 11px !important; margin-bottom: 6px !important; padding: 3px 8px !important; letter-spacing: 0.03em !important; }
  .ref-hero .accent, .ref-hero .accent2 { font-size: 18px !important; }
  .list-hero-title { font-size: 15px !important; }   /* ⭐ 모바일 · 18 → 15 */
  .list-hero-desc { font-size: 11px !important; }

  /* 알림 축소 */
  .alert { font-size: 12px !important; padding: 8px 12px !important; }

  /* 버튼 축소 */
  .btn { font-size: 13px !important; padding: 10px 16px !important; }
  .btn-sm { font-size: 12px !important; padding: 6px 12px !important; }
  .btn-lg { font-size: 14px !important; padding: 12px 20px !important; }

  /* 섹션 헤더 축소 */
  section.section h2 { font-size: 15px !important; }
}
/* 데스크톱 · 관리자 페이지 */
@media (min-width: 901px) {
  .adm-nav a { font-size: 16px !important; padding: 12px 18px !important; }
  .adm-nav-label { font-size: 13px !important; padding: 16px 18px 6px !important; letter-spacing: 0.03em; }
  .admin-topbar h1 { font-size: 28px !important; }
}

/* ★★★ 관리자 편집 폼 · 인라인 font-size 강제 오버라이드 ★★★ */
form table th,
form table td {
  font-size: 16px !important;
  padding: 15px 18px !important;
}
form table input[type="text"],
form table input[type="tel"],
form table input[type="email"],
form table input[type="number"],
form table textarea,
form table select {
  font-size: 16px !important;
  padding: 12px 14px !important;
  line-height: 1.5 !important;
}
form table label { font-size: 16px !important; }
form table small { font-size: 13px !important; }
form table .hint,
form table .helper { font-size: 14px !important; }
form div[style*="font-size:11px"],
form div[style*="font-size:12px"],
form div[style*="font-size:13px"] {
  font-size: 15px !important;
}
form span[style*="font-size:11px"],
form span[style*="font-size:12px"],
form span[style*="font-size:13px"] {
  font-size: 14px !important;
}

/* 노출 설정 카드 */
form div[style*="linear-gradient"] div[style*="font-size:12px"] { font-size: 15px !important; }
form div[style*="linear-gradient"] div[style*="font-size:14px"] { font-size: 17px !important; }
form div[style*="linear-gradient"] label span { font-size: 15px !important; }
form div[style*="linear-gradient"] select { font-size: 16px !important; }

/* 관리자 알림 배너 */
.admin-content .alert { font-size: 16px !important; }
.admin-content h1, .admin-topbar h1 { font-size: 28px !important; }

/* 관리자 사이드바 · 로고 축소 후 밸런스 */
.admin-sidebar .adm-brand-txt { font-size: 16px !important; }
.admin-sidebar .adm-brand-txt small { font-size: 11px !important; }

/* 모바일 · 너무 크지 않게 조정 */
@media (max-width: 768px) {
  html, body { font-size: 16px !important; }
  h1 { font-size: 28px !important; }
  h2 { font-size: 22px !important; }
  h3 { font-size: 19px !important; }
  p { font-size: 16px !important; }
  .btn { font-size: 16px !important; padding: 13px 22px !important; }
  input, textarea, select { font-size: 16px !important; }
  .site-header .brand-logo-image { max-height: 54px !important; }
  .site-header .nav-primary a { font-size: 16px !important; }
  section.section table th, section.section table td {
    font-size: 15px !important; padding: 12px 14px !important;
  }
  .ref-hero h1 { font-size: 30px !important; }
}
/* ★★★ 색상 · 폰트 완전 강제 ★★★ */
:root {
  --accent-red: #0369A1 !important;
  --accent-orange: #1849A9 !important;
  --brand-500: #1849A9 !important;
  --brand-600: #0B2A5B !important;
  --brand-700: #0B2A5B !important;
}

/* ============ 전체 사이트 · 모든 폰트 강제 확대 ============ */
/* 기본 body 폰트 크게 → 상속 요소 자동 확대 */
html, body { font-size: 18px !important; line-height: 1.7 !important; }

/* 상속되지 않는 요소 명시적 확대 */
p, li, dd, dt, div, span, a, td, th, label, button,
input, select, textarea, blockquote {
  font-size: inherit;
}

/* 사이드바 위젯 · 하위 모든 요소 강제 */
.ref-side-left, .ref-side-right,
.ref-side-left p, .ref-side-left span, .ref-side-left div, .ref-side-left a, .ref-side-left li,
.ref-side-right p, .ref-side-right span, .ref-side-right div, .ref-side-right a, .ref-side-right li {
  font-size: 16px !important;
}
.ref-side-left h2, .ref-side-left h3, .ref-side-right h2, .ref-side-right h3,
.ref-rec-widget-head, .ref-urgent-widget-head, .ref-region-widget-head,
.ref-consult-title { font-size: 18px !important; font-weight: 800 !important; }
.ref-side-left small, .ref-side-right small { font-size: 13px !important; }

/* 사이드바 상담센터 · 전화번호 */
.ref-side-left .ref-consult-phone, .ref-consult-box .phone,
[class*="consult"] a[href^="tel"] { font-size: 30px !important; font-weight: 900 !important; }
.ref-side-left button, .ref-side-right button,
.ref-side-left input[type="submit"], .ref-side-left .btn { font-size: 16px !important; padding: 12px 16px !important; }

/* 우측 실버전문가컬럼 위젯 */
.ref-side-right .col-item, .ref-side-right .col-item * { font-size: 15px !important; }
.ref-side-right .col-item strong { font-size: 16px !important; }

/* 사이드바 매물등록/매수등록 버튼 */
.ref-side-left a[href*="seller"], .ref-side-left a[href*="buyer"],
.ref-side-left .side-cta { font-size: 17px !important; font-weight: 800 !important; padding: 14px !important; }

/* 매물 등록 폼 (SMS 상담) */
.ref-side-left textarea, .ref-side-left input[type="tel"],
.ref-side-left input[type="text"] { font-size: 15px !important; padding: 10px 12px !important; }

/* 상단 네비 */
.site-header { font-size: 17px !important; }
.site-header a { font-size: 17px !important; padding: 14px 18px !important; }
.site-header .brand-logo-image { max-height: 60px !important; }
.site-header .nav-primary a { font-size: 18px !important; font-weight: 600 !important; }
.site-header .header-cta,
.site-header a[href*="customer"],
.site-header a[href^="tel"] { font-size: 17px !important; font-weight: 700 !important; }

/* 매물 검색 폼 */
.ref-filter-bar, .ref-filter-inner { font-size: 17px !important; }
.ref-filter-bar select, .ref-filter-bar input, .ref-filter-bar button {
  font-size: 17px !important; padding: 14px 16px !important; height: auto !important;
}
.ref-filter-bar label { font-size: 15px !important; }

/* 매물 리스트 · 프리미엄 (이미 있음 · 재확인) */
.ref-list-table thead th { font-size: 15px !important; padding: 14px 12px !important; }
.ref-list-table tbody td { font-size: 17px !important; padding: 16px 12px !important; font-weight: 600 !important; }
.ref-list-table .c-num { font-size: 16px !important; }
.ref-list-table .c-region { font-size: 18px !important; font-weight: 700 !important; }
.ref-list-table .c-type { font-size: 16px !important; }
.ref-list-table .c-price { font-size: 20px !important; font-weight: 900 !important; color: #0369A1 !important; }
.ref-list-table .c-price.lease { color: #1849A9 !important; }
.ref-list-table .c-area, .ref-list-table .c-beds, .ref-list-table .c-key { font-size: 16px !important; }
.ref-list-table .c-date { font-size: 15px !important; color: #6B7280 !important; }

.ref-list-head h2 { font-size: 28px !important; font-weight: 900 !important; letter-spacing: -0.03em !important; }
.ref-list-head .unit { font-size: 14px !important; }
.ref-premium-head h2 { font-size: 20px !important; }
.ref-premium-title { font-size: 17px !important; }
.ref-premium-region { font-size: 15px !important; }
.ref-premium-price { font-size: 20px !important; color: #0369A1 !important; }

.ref-rec-item, .ref-urgent-item { font-size: 15px !important; }
.ref-rec-item .type, .ref-urgent-item .type { font-size: 16px !important; font-weight: 700 !important; }
.ref-rec-item .rows, .ref-urgent-item .rows { font-size: 14px !important; line-height: 1.8 !important; }
.ref-rec-item .rows .price, .ref-urgent-item .rows .price { font-size: 17px !important; color: #0369A1 !important; font-weight: 800 !important; }
.ref-rec-item .rows .label, .ref-urgent-item .rows .label { font-size: 13px !important; color: #6B7280 !important; }

/* 매물 가격/배지 강제 파랑 */
.ref-list-table .c-price, .ref-list-table .c-price.lease,
.ref-urgent-item .rows .price, .ref-urgent-item .badge.sale,
.ref-rec-item .rows .price, [class*="price"]:not(.ref-premium-price):not(.detail-price),
.badge.urgent { color: #0369A1 !important; }
.ref-urgent-item .badge.sale, .badge.urgent { background: #0369A1 !important; color: white !important; }

/* 지역 그리드 · 인원 필터 */
.ref-region-grid a { font-size: 16px !important; padding: 15px !important; font-weight: 600 !important; }
.ref-capacity a { font-size: 16px !important; padding: 14px !important; font-weight: 700 !important; }

/* 매물 상세 페이지 표 */
section.section table th, section.section table td {
  font-size: 17px !important; padding: 17px 20px !important;
}
section.section h1, section.section h2 { font-size: 26px !important; }

/* 회사소개 · 이용약관 · 개인정보처리방침 등 정적 페이지 */
main p, section p, article p, .content p { font-size: 17px !important; line-height: 1.85 !important; }
main li, section li, article li, .content li { font-size: 17px !important; line-height: 1.85 !important; }
main h1, section h1, article h1 { font-size: 32px !important; }
main h2, section h2, article h2 { font-size: 24px !important; }
main h3, section h3, article h3 { font-size: 20px !important; }

/* 고객센터 · 매도의뢰 폼 */
form label { font-size: 16px !important; font-weight: 700 !important; margin-bottom: 8px !important; }
form input, form textarea, form select { font-size: 17px !important; padding: 13px 15px !important; }
form button { font-size: 17px !important; padding: 14px 30px !important; font-weight: 700 !important; }
form .form-desc, form .form-hint { font-size: 14px !important; }

/* 푸터 */
footer, .site-footer { font-size: 15px !important; line-height: 1.9 !important; }
footer a, .site-footer a { font-size: 15px !important; }
footer h4, .site-footer h4 { font-size: 17px !important; }

/* 개인정보동의 등 체크박스 라벨 */
label.checkbox-label, label input[type="checkbox"] + span,
label input[type="radio"] + span { font-size: 15px !important; }

/* 헤더 CTA · 상담문의 버튼 */
.site-header .btn, .header-cta { font-size: 16px !important; padding: 12px 24px !important; font-weight: 700 !important; }

/* 관리자 페이지 */
.adm-nav a { font-size: 16px !important; padding: 12px 18px !important; }
.adm-nav-label { font-size: 13px !important; padding: 16px 18px 6px !important; letter-spacing: 0.03em; }
.admin-topbar h1 { font-size: 28px !important; }
.admin-sidebar .adm-brand-txt { font-size: 16px !important; }
.admin-sidebar .adm-brand-txt small { font-size: 11px !important; }
.admin-content, .admin-main { font-size: 16px !important; }

/* 관리자 폼 */
form table th, form table td { font-size: 16px !important; padding: 15px 18px !important; }
form table input, form table textarea, form table select { font-size: 16px !important; padding: 12px 14px !important; }
form div[style*="font-size:11px"], form div[style*="font-size:12px"], form div[style*="font-size:13px"] { font-size: 15px !important; }
form span[style*="font-size:11px"], form span[style*="font-size:12px"], form span[style*="font-size:13px"] { font-size: 14px !important; }

/* 알림 · 뱃지 */
.alert { font-size: 16px !important; padding: 15px 20px !important; }
.badge { font-size: 13px !important; padding: 3px 8px !important; }
.badge.urgent, .badge.rec, .badge.new { font-size: 12px !important; padding: 3px 8px !important; }

/* 모바일 조정 · 너무 크지 않게 */
@media (max-width: 768px) {
  html, body { font-size: 16px !important; }
  h1 { font-size: 28px !important; }
  h2 { font-size: 22px !important; }
  h3 { font-size: 19px !important; }
  p, li { font-size: 16px !important; }
  .btn, form button { font-size: 16px !important; padding: 13px 22px !important; }
  form input, form textarea, form select { font-size: 16px !important; }
  .site-header .brand-logo-image { max-height: 54px !important; }
  .site-header .nav-primary a { font-size: 16px !important; }
  .ref-list-table thead th, .ref-list-table tbody td { font-size: 14px !important; padding: 10px 8px !important; }
  .ref-list-table .c-price { font-size: 16px !important; }
  section.section table th, section.section table td { font-size: 15px !important; padding: 12px 14px !important; }
  .ref-hero h1 { font-size: 30px !important; }
  .ref-side-left, .ref-side-right,
  .ref-side-left *, .ref-side-right * { font-size: 15px !important; }
}
/* ★★★ 끝 ★★★ */



/* 신뢰성 블루 계열 포인트 색상 · 노란 accent-yellow override */
:root {
  --accent-yellow: #FFFFFF !important;   /* 노랑 → 스카이 블루 */
  --accent-point: #FFFFFF;
  --accent-point-dark: #0284C7;
  --accent-point-light: #60A5FA;
}

/* 배경 · 폰트 크기 · 컨테이너 최대 폭 */
body { background: #F1F5F9; }

/* ============================================================
   상단 카테고리 네비 (레퍼런스 이미지 그대로)
   단독요양원 | 상가요양원 | 공동생활가정 | 주간보호 | 요양병원 | 요양원자리·토지
============================================================ */
.ref-catnav {
  background: var(--white);
  border-bottom: 3px solid var(--brand-700);
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.ref-catnav-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 12px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
}
.ref-catnav a {
  padding: 18px 8px;
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink-800);
  border-bottom: 3px solid transparent;
  transition: all 160ms ease;
  position: relative;
}
.ref-catnav a:hover {
  color: var(--brand-700);
  background: var(--brand-50);
}
.ref-catnav a.active {
  color: var(--brand-700);
  border-bottom-color: var(--brand-700);
}
@media (max-width: 900px) {
  .ref-catnav a { font-size: 13px; padding: 14px 4px; }
}
@media (max-width: 640px) {
  .ref-catnav-inner { grid-template-columns: repeat(3, 1fr); }
  .ref-catnav a { border-bottom: 1px solid var(--gray-100); }
}

/* ============================================================
   와이드 히어로 배너 · 배경 이미지 자리 (관리자 업로드)
   그림 요소 모두 제거 · 배경 이미지 + 오버레이 텍스트만
============================================================ */
.ref-hero {
  background: linear-gradient(135deg, #DBEAFE 0%, #E0F2FE 50%, #F0F9FF 100%);
  padding: 0;
  position: relative;
  overflow: hidden;
  min-height: 260px;
}
.ref-hero.has-bg {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.ref-hero.has-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, var(--hero-overlay, 0.55));
  z-index: 1;
}
.ref-hero.has-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0,0,0,0.45) 0%, rgba(0,0,0,0.15) 45%, rgba(0,0,0,0) 70%);
  z-index: 1;
}
.ref-hero-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 60px 20px;
  position: relative;
  z-index: 2;
  min-height: 260px;
  display: flex;
  align-items: center;
}
.ref-hero-text {
  color: var(--ink-900);
}
.ref-hero.has-bg .ref-hero-text {
  color: var(--white);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5), 0 1px 3px rgba(0, 0, 0, 0.3);
}
.ref-hero-eyebrow {
  font-size: 15px;
  color: inherit;
  opacity: 0.85;
  font-weight: 600;
  margin-bottom: 10px;
}
.ref-hero h1 {
  font-size: 36px;              /* ⭐ 42 → 36 · 약간 축소 */
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.25;
  margin-bottom: 14px;
  color: inherit;
}
/* 히어로 강조 텍스트 · 배경별 색상 분리 */
.ref-hero h1 .accent { color: #1D4ED8; }    /* 밝은 배경 위 진한 파랑 */
.ref-hero h1 .accent2 { color: #0369A1; }   /* 밝은 배경 위 진한 빨강 (인지도 1위!) */
.ref-hero.has-bg h1 .accent { color: #93C5FD; }    /* 이미지 배경 위 밝은 파랑 */
.ref-hero.has-bg h1 .accent2 { color: #FCA5A5; }   /* 이미지 배경 위 밝은 빨강 */
.ref-hero p {
  font-size: 17px;
  color: inherit;
  opacity: 0.9;
  margin: 0;
  font-weight: 500;
}
@media (max-width: 640px) {
  .ref-hero h1 { font-size: 26px; }
  .ref-hero p { font-size: 14px; }
  .ref-hero-inner { padding: 40px 16px; min-height: 180px; }
}

/* ============================================================
   지역 그리드 + 병상 필터 + 오늘 본 매물 위젯 (히어로 아래)
============================================================ */
.ref-filter-bar {
  background: var(--white);
  padding: 20px 0;
  border-bottom: 1px solid var(--gray-200);
}
.ref-filter-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 12px;
  display: grid;
  grid-template-columns: 1fr 120px;
  gap: 10px;
  align-items: start;
}
@media (max-width: 900px) {
  .ref-filter-inner { grid-template-columns: 1fr; }
  .ref-today-viewed { display: none; }
}
.ref-filter-left { min-width: 0; }

/* 오늘 본 매물 위젯 */
.ref-today-viewed {
  background: var(--brand-50);
  border: 1px solid var(--brand-200);
  border-radius: 6px;
  padding: 14px 12px;
  text-align: center;
}
.ref-today-viewed .lbl {
  font-size: 14px;
  color: var(--brand-800);
  font-weight: 800;
  margin-bottom: 6px;
}
.ref-today-viewed .cnt {
  font-size: 24px;
  color: var(--ink-900);
  font-weight: 900;
  margin-bottom: 8px;
  font-variant-numeric: tabular-nums;
}
.ref-today-viewed .btns {
  display: flex;
  gap: 6px;
}
.ref-today-viewed .btns button {
  flex: 1;
  padding: 8px 10px;
  background: var(--white);
  border: 1px solid var(--brand-200);
  border-radius: 4px;
  font-size: 13px;
  color: var(--brand-700);
  cursor: pointer;
  font-weight: 700;
}

/* 지역 그리드 · 6열 × 2행 (레퍼런스 정확) */
.ref-region-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin-bottom: 10px;
}
.ref-region-grid a {
  padding: 16px 8px;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 4px;
  text-align: center;
  color: var(--ink-800);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  transition: all 160ms ease;
}
.ref-region-grid a:hover, .ref-region-grid a.active {
  background: var(--brand-700);
  color: var(--white);
  border-color: var(--brand-700);
}
@media (max-width: 900px) { .ref-region-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 480px) { .ref-region-grid { grid-template-columns: repeat(2, 1fr); } }

/* 병상 필터 · 6개 청록 버튼 (레퍼런스 정확) */
.ref-capacity {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}
.ref-capacity a {
  padding: 15px 10px;
  background: #0891B2;
  color: var(--white);
  text-align: center;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 700;
  transition: background 160ms ease;
}
.ref-capacity a:hover, .ref-capacity a.active { background: var(--brand-800); color: var(--white); }
@media (max-width: 640px) { .ref-capacity { grid-template-columns: repeat(3, 1fr); } }

/* ============================================================
   메인 3열 레이아웃 (좌·중·우)
   레퍼런스 정확한 비율: 220px | 1fr | 220px
============================================================ */
.ref-body {
  max-width: 1400px;
  margin: 0 auto;
  padding: 16px 12px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 900px) {
  .ref-body { grid-template-columns: 200px 1fr; }
}
@media (min-width: 1200px) {
  .ref-body { grid-template-columns: 200px 1fr 200px; }
}

.ref-side-left, .ref-side-right {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
@media (max-width: 899px) {
  .ref-side-left { order: 3; }
  .ref-side-right { display: none; }
}

/* ============================================================
   좌측 위젯들
============================================================ */

/* 고객상담센터 (연한 배경 · 큰 전화번호) */
.ref-contact-widget {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 6px;
  padding: 18px 14px;
  text-align: center;
}
.ref-contact-widget .lbl {
  font-size: 15px;
  color: var(--ink-900);
  font-weight: 800;
  margin-bottom: 4px;
}
.ref-contact-widget .sub {
  font-size: 12px;
  color: var(--gray-500);
  margin-bottom: 12px;
}
.ref-contact-widget .icon {
  width: 42px; height: 42px;
  margin: 0 auto 8px;
  border-radius: 50%;
  background: var(--brand-50);
  color: var(--brand-700);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}
.ref-contact-widget .phone {
  display: block;
  font-size: 26px;
  font-weight: 900;
  color: var(--brand-700) !important;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  margin-bottom: 4px;
}
.ref-contact-widget .mobile {
  font-size: 15px;
  color: var(--brand-700);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* 매물등록 / 매수등록 큰 버튼 */
.ref-side-btn {
  display: block;
  padding: 20px 16px;
  border-radius: 4px;
  color: var(--white);
  font-size: 17px;
  font-weight: 800;
  text-align: center;
  transition: transform 160ms ease;
}
.ref-side-btn:hover { color: var(--white); transform: translateY(-1px); }
.ref-side-btn .lbl { display: block; font-size: 12px; opacity: 0.85; font-weight: 500; margin-bottom: 4px; }
.ref-side-btn-sell { background: linear-gradient(135deg, #7C3AED, #4C1D95); }
.ref-side-btn-buy  { background: linear-gradient(135deg, #06B6D4, #0E7490); }

/* SMS 실시간 상담 폼 */
.ref-sms {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 6px;
  padding: 14px;
}
.ref-sms-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--ink-900);
  margin-bottom: 8px;
  display: flex; align-items: center; gap: 5px;
}
.ref-sms textarea, .ref-sms input {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid var(--gray-200);
  border-radius: 4px;
  font-size: 13px;
  margin-bottom: 6px;
  font-family: inherit;
  color: var(--ink-800);
}
.ref-sms textarea { min-height: 70px; resize: vertical; }
.ref-sms .phone-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 4px; }
.ref-sms .phone-row input { margin-bottom: 6px; text-align: center; }
.ref-sms label {
  font-size: 12px; color: var(--gray-700);
  display: flex; align-items: center; gap: 4px;
  margin-bottom: 8px;
}
.ref-sms label input[type=checkbox] { margin: 0; width: auto; }
.ref-sms button {
  width: 100%;
  padding: 12px;
  background: var(--brand-700);
  color: var(--white);
  border: none;
  border-radius: 4px;
  font-weight: 800;
  font-size: 15px;
  cursor: pointer;
}
.ref-sms button:hover { background: var(--brand-800); }

/* 지역별 매물보기 리스트 */
.ref-region-widget {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 4px;
  overflow: hidden;
}
.ref-region-widget-head {
  padding: 14px 16px;
  background: #BFDBFE;
  color: var(--brand-800);
  font-size: 15px;
  font-weight: 800;
  display: flex; align-items: center; gap: 8px;
  border-bottom: 1px solid var(--gray-200);
  position: relative;
}
.ref-region-widget-head::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 18px;
  background: var(--brand-700);
  border-radius: 2px;
  flex-shrink: 0;
}
.ref-region-widget-head .icon { display: none !important; }
.ref-region-widget a {
  display: flex; align-items: center;
  padding: 12px 15px;
  border-bottom: 1px solid var(--gray-100);
  font-size: 14px;
  color: var(--ink-800);
  gap: 8px;
  transition: background 120ms ease;
}
.ref-region-widget a:last-child { border-bottom: none; }
.ref-region-widget a:hover { background: var(--brand-50); color: var(--brand-700); }
.ref-region-widget a::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 4px;
  background: var(--brand-500);
  border-radius: 50%;
  flex-shrink: 0;
}
.ref-region-widget a .pin { display: none !important; }

/* 추천매물 (작은 카드 리스트) */
.ref-rec-widget {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 4px;
  overflow: hidden;
}
.ref-rec-widget-head {
  padding: 14px 16px;
  background: #BFDBFE;
  color: var(--brand-800);
  font-size: 15px;
  font-weight: 800;
  display: flex; align-items: center; gap: 8px;
  border-bottom: 1px solid var(--gray-200);
}
.ref-rec-widget-head::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 18px;
  background: var(--brand-700);
  border-radius: 2px;
  flex-shrink: 0;
}
.ref-rec-widget-head .star { display: none !important; }
.ref-rec-item {
  display: block;
  padding: 12px 14px;
  border-bottom: 1px solid var(--gray-100);
  color: inherit;
  font-size: 14px;
}
.ref-rec-item:last-child { border-bottom: none; }
.ref-rec-item:hover { background: var(--gray-50); color: inherit; }
.ref-rec-item .badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 800;
  margin-right: 5px;
  vertical-align: middle;
}
.ref-rec-item .badge.sale { background: var(--accent-red); color: var(--white); }
.ref-rec-item .badge.lease { background: var(--brand-600); color: var(--white); }
.ref-rec-item .type { font-size: 14px; font-weight: 700; color: var(--ink-900); }
.ref-rec-item .rows { margin-top: 6px; font-size: 13px; color: var(--gray-700); line-height: 1.7; }
.ref-rec-item .rows .label { color: var(--gray-500); }
.ref-rec-item .rows .price { color: var(--brand-700); font-weight: 700; }

/* ============================================================
   중앙 메인 콘텐츠
============================================================ */
.ref-main { min-width: 0; }

/* 검색바 (아이콘 + 3 select + 검색 버튼) */
.ref-search {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 4px;
  padding: 10px;
  display: grid;
  grid-template-columns: auto 1fr 1fr 1fr auto;
  gap: 6px;
  align-items: center;
  margin-bottom: 16px;
}
.ref-search-icon {
  min-width: 70px;
  padding: 10px 6px;
  height: 48px;
  background: var(--brand-50);
  color: var(--brand-700);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.02em;
  white-space: nowrap;
  flex-shrink: 0;
}
.ref-search select, .ref-search input[type=text] {
  padding: 14px 14px;
  border: 1px solid var(--gray-200);
  border-radius: 4px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-800);
  background: var(--white);
  width: 100%;
}
.ref-search button {
  padding: 14px 30px;
  background: var(--brand-700);
  color: var(--white);
  border: none;
  border-radius: 4px;
  font-weight: 800;
  font-size: 15px;
  cursor: pointer;
  white-space: nowrap;
}
.ref-search button:hover { background: var(--brand-800); }
@media (max-width: 640px) {
  .ref-search { grid-template-columns: 1fr 1fr; }
  .ref-search-icon { display: none; }
  .ref-search button { grid-column: 1 / -1; }
}

/* 섹션 헤드 */
.ref-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 6px;
}
.ref-section-head h2 {
  font-size: 20px;
  font-weight: 800;
  color: var(--ink-900);
  display: flex;
  align-items: center;
  gap: 6px;
  letter-spacing: -0.02em;
}
.ref-section-head h2 .icon { color: var(--accent-yellow); font-size: 22px; }
.ref-section-head .meta {
  font-size: 13px;
  color: var(--gray-600);
}

/* 프리미엄 매물 그리드 (4열) */
.ref-premium-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}
@media (min-width: 640px)  { .ref-premium-grid { grid-template-columns: repeat(4, 1fr); gap: 12px; } }
.ref-premium-card {
  display: block;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 4px;
  overflow: hidden;
  color: inherit;
  transition: all 200ms ease;
}
.ref-premium-card:hover {
  border-color: var(--brand-600);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  color: inherit;
}
.ref-premium-card .img {
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--gray-100);
  position: relative;
}
.ref-premium-card .img img { width: 100%; height: 100%; object-fit: cover; }
.ref-premium-card .body { padding: 10px 10px 12px; text-align: center; }
.ref-premium-card .type {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink-900);
  margin-bottom: 4px;
}
.ref-premium-card .region {
  font-size: 13px;
  color: var(--gray-600);
  margin-bottom: 6px;
}
.ref-premium-card .price {
  font-size: 18px;
  font-weight: 900;
  color: var(--accent-red);
  font-variant-numeric: tabular-nums;
}
.ref-premium-card .price small {
  font-size: 13px;
  color: var(--gray-500);
  font-weight: 500;
}

/* 조밀 매물 테이블 (레퍼런스 정확) */
.ref-list-box {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 20px;
}
.ref-list-head {
  padding: 16px 18px;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--white);
}
.ref-list-head h2 {
  font-size: 24px;
  font-weight: 900;
  color: var(--ink-900);
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -0.03em;
}
.ref-list-head h2::before {
  content: "";
  width: 6px; height: 26px;
  background: var(--brand-700);
  border-radius: 2px;
}
.ref-list-head .unit { font-size: 13px; color: var(--gray-600); }

.ref-list-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}
.ref-list-table thead th {
  background: #F8FAFC;
  padding: 14px 6px;
  text-align: center;
  color: var(--gray-700);
  font-size: 14px;
  font-weight: 700;
  border-bottom: 1px solid var(--gray-200);
  white-space: nowrap;
}
.ref-list-table tbody td {
  padding: 14px 6px;
  border-bottom: 1px solid #F1F5F9;
  text-align: center;
  color: var(--ink-800);
  font-size: 15px;
}
.ref-list-table tbody tr {
  cursor: pointer;
  transition: background 120ms ease;
}
.ref-list-table tbody tr:hover { background: var(--brand-50); }
.ref-list-table .c-num { color: var(--gray-500); font-family: ui-monospace, monospace; font-size: 14px; }
.ref-list-table .c-region {
  font-weight: 700;
  color: var(--ink-900);
  text-align: center;
  min-width: 90px;
  font-size: 15px;
}
.ref-list-table .c-region .badge {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 800;
  color: var(--white);
  vertical-align: middle;
  margin-left: 3px;
}
.ref-list-table .c-region .badge.urgent { background: var(--accent-red); }
.ref-list-table .c-region .badge.new { background: var(--brand-700); }
.ref-list-table .c-region .badge.rec { background: #1E40AF; }
.ref-list-table .c-price { color: var(--accent-red); font-weight: 800; font-variant-numeric: tabular-nums; font-size: 16px; }
.ref-list-table .c-price.lease { color: var(--accent-orange); }
.ref-list-table .c-key { color: var(--gray-700); font-variant-numeric: tabular-nums; font-size: 14px; }
.ref-list-table .c-area { color: var(--gray-700); font-variant-numeric: tabular-nums; font-size: 14px; }
.ref-list-table .c-beds { color: var(--ink-800); font-weight: 600; font-variant-numeric: tabular-nums; font-size: 14px; }
.ref-list-table .c-date { color: var(--gray-500); font-variant-numeric: tabular-nums; font-size: 14px; }
.ref-list-table .c-type { color: var(--gray-700); font-size: 14px; }

@media (max-width: 640px) {
  .ref-list-table thead { display: none; }
  .ref-list-table tbody tr {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 4px 8px;
    padding: 12px 14px;
  }
  .ref-list-table tbody td { padding: 0; border-bottom: none; text-align: left; font-size: 13px; }
  .ref-list-table .c-num, .ref-list-table .c-date, .ref-list-table .c-area { display: none; }
  .ref-list-table .c-region { grid-column: 1; }
  .ref-list-table .c-price { grid-column: 2; text-align: right; font-size: 16px; }
  .ref-list-table .c-type { font-size: 11px; color: var(--gray-500); }
  .ref-list-table .c-beds, .ref-list-table .c-key { font-size: 12px; }
}

.ref-list-more {
  padding: 16px;
  text-align: center;
  border-top: 1px solid var(--gray-100);
}
.ref-list-more a {
  display: inline-block;
  padding: 10px 32px;
  background: var(--brand-50);
  color: var(--brand-700);
  border: 1px solid var(--brand-200);
  border-radius: 4px;
  font-weight: 700;
  font-size: 13px;
}
.ref-list-more a:hover { background: var(--brand-700); color: var(--white); }

/* ============================================================
   우측 사이드바
============================================================ */

/* 급매물 위젯 (빨간 헤더) */
.ref-urgent-widget {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 4px;
  overflow: hidden;
}
.ref-urgent-widget-head {
  padding: 14px 16px;
  background: var(--accent-red);
  color: var(--white);
  font-size: 15px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 6px;
}
.ref-urgent-item {
  display: block;
  padding: 12px 14px;
  border-bottom: 1px solid var(--gray-100);
  color: inherit;
  font-size: 14px;
}
.ref-urgent-item:last-child { border-bottom: none; }
.ref-urgent-item:hover { background: var(--gray-50); color: inherit; }
.ref-urgent-item .badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 800;
  margin-right: 5px;
  vertical-align: middle;
}
.ref-urgent-item .badge.sale { background: var(--accent-red); color: var(--white); }
.ref-urgent-item .badge.lease { background: var(--brand-600); color: var(--white); }
.ref-urgent-item .type {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-900);
  display: inline;
}
.ref-urgent-item .rows { margin-top: 6px; font-size: 13px; color: var(--gray-700); line-height: 1.7; }
.ref-urgent-item .rows .label { color: var(--gray-500); }
.ref-urgent-item .rows .price { color: var(--accent-red); font-weight: 800; }

/* 파트너 · 바로가기 위젯 (레퍼런스 우측 4개 사이트 카드) */
.ref-partner-widget {
  background: var(--brand-800);
  color: var(--white);
  border-radius: 6px;
  padding: 16px;
}
.ref-partner-widget .head {
  font-size: 13px;
  color: rgba(255,255,255,0.85);
  margin-bottom: 4px;
}
.ref-partner-widget .title {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 14px;
}
.ref-partner-widget .items { display: flex; flex-direction: column; gap: 8px; }
.ref-partner-widget .items a {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  background: rgba(255,255,255,0.1);
  border-radius: 4px;
  color: var(--white);
  font-size: 14px;
  font-weight: 700;
  transition: background 160ms ease;
}
.ref-partner-widget .items a:hover { background: rgba(255,255,255,0.2); color: var(--white); }
.ref-partner-widget .items a .icon { display: none !important; }

/* ============================================================
   ref-list-box 를 다시 프리미엄 매물 카드 스타일로 확장
   (프리미엄과 최근매물 사이의 소형 카드 · 실제 요양원매매114 에는 없지만 우리는 있음)
============================================================ */
.ref-badge-featured {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 3px;
  background: var(--brand-700);
  color: var(--white);
  font-size: 11px;
  font-weight: 800;
  margin-right: 6px;
}

/* ============================================================
   하단 파트너 로고 스트립 (푸터 위)
============================================================ */
.ref-partner-bar {
  background: var(--white);
  border-top: 1px solid var(--gray-200);
  padding: 24px 0;
  margin-top: 40px;
}
.ref-partner-bar-inner {
  max-width: 1500px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 16px;
  flex-wrap: wrap;
}
.ref-partner-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--gray-700);
  font-size: 15px;
  font-weight: 700;
  padding: 10px 18px;
  transition: color 160ms ease;
  border-right: 1px solid var(--gray-200);
}
.ref-partner-logo:last-child { border-right: none; }
.ref-partner-logo:hover { color: var(--brand-700); }
.ref-partner-logo .icon { display: none !important; }

/* ============================================================
   상단 사이트 헤더 · 완전 재설계 (강제 override)
============================================================ */

/* 히어로 그림 요소 완전 제거 (캐시 대비 강제) */
.ref-hero::before,
.ref-hero::after {
  content: none !important;
  display: none !important;
  background: none !important;
}
.ref-hero-photo {
  display: none !important;
}

/* site-header 완전 override */
header.site-header,
.site-header {
  background: linear-gradient(90deg, #072252 0%, #0B2A5B 50%, #1849A9 100%) !important;
  border-bottom: none !important;
  box-shadow: 0 2px 16px rgba(7, 34, 82, 0.35) !important;
  height: auto !important;
  min-height: 72px !important;
  padding: 12px 0 !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 100 !important;
}
header.site-header > .container,
.site-header > .container {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 24px !important;
  max-width: 1400px !important;
  padding: 0 20px !important;
  height: auto !important;
}

/* 로고 */
.site-header .brand-logo {
  gap: 12px !important;
  flex-shrink: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
}
.site-header .brand-logo-icon {
  background: var(--white) !important;
  border-radius: 50% !important;
  padding: 6px !important;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.2) !important;
  width: 48px !important;
  height: 48px !important;
  flex-shrink: 0 !important;
}
.site-header .brand-logo-text {
  color: var(--white) !important;
  font-size: 22px !important;
  font-weight: 900 !important;
  letter-spacing: -0.03em !important;
  white-space: nowrap !important;
}

/* ⭐ 핵심 · nav-primary 데스크톱 (1024px+) 만 인라인 · 모바일은 원본 fixed 유지 */
@media (min-width: 1024px) {
  .site-header .nav-primary,
  header.site-header .nav-primary,
  header.site-header nav.nav-primary,
  .site-header nav#navPrimary {
    position: static !important;
    top: auto !important;
    right: auto !important;
    left: auto !important;
    bottom: auto !important;
    width: auto !important;
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 28px !important;
    flex: 1 1 auto !important;
    overflow: visible !important;
    box-shadow: none !important;
    z-index: auto !important;
    transform: none !important;
    transition: none !important;
  }

  .site-header .nav-primary a,
  header.site-header .nav-primary a {
    color: rgba(255, 255, 255, 0.95) !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    padding: 10px 4px !important;
    border: none !important;
    border-bottom: none !important;
    position: relative !important;
    white-space: nowrap !important;
    transition: color 160ms ease !important;
    background: transparent !important;
    text-decoration: none !important;
  }
  .site-header .nav-primary a:hover,
  .site-header .nav-primary a.active,
  header.site-header .nav-primary a:hover,
  header.site-header .nav-primary a.active {
    color: #FFFFFF !important;
    background: transparent !important;
  }
  .site-header .nav-primary a::after {
    content: "" !important;
    display: block !important;
    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    height: 3px !important;
    background: #FFFFFF !important;
    transform: scaleX(0);
    transition: transform 180ms ease;
    border-radius: 2px;
  }
  .site-header .nav-primary a:hover::after,
  .site-header .nav-primary a.active::after {
    transform: scaleX(1);
  }
  .site-header .nav-phone-mobile {
    display: none !important;
  }
}

/* 우측: 전화번호 + CTA */
.site-header .header-right {
  display: flex !important;
  align-items: center !important;
  gap: 16px !important;
  flex-shrink: 0 !important;
}
.site-header .header-phone {
  display: none !important;
}
@media (min-width: 1024px) {
  .site-header .header-phone {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    color: var(--white) !important;
    text-decoration: none !important;
    padding: 6px 4px !important;
  }
  /* 원본 ::before 마스크 아이콘을 흰색으로 override */
  .site-header .header-phone::before {
    background: #FFFFFF !important;
    width: 22px !important;
    height: 22px !important;
    flex-shrink: 0 !important;
  }
  .site-header .header-phone-label,
  .site-header .header-phone-num,
  .site-header .header-phone strong,
  .site-header .header-phone span {
    color: var(--white) !important;
  }
  .site-header .header-phone-num,
  .site-header .header-phone strong {
    font-size: 22px !important;
    font-weight: 900 !important;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
  }
  .site-header .header-phone-label { display: none !important; }
}

/* 상담 문의 CTA · 흰색 배경 + 진한 남색 텍스트 (파란 헤더 위에서 확실히 튐) */
.site-header .btn,
.site-header .header-right .btn,
.site-header .btn-primary {
  background: #FFFFFF !important;
  color: #0B2A5B !important;
  border: none !important;
  font-weight: 900 !important;
  font-size: 15px !important;
  padding: 12px 22px !important;
  border-radius: 6px !important;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.15) !important;
  white-space: nowrap !important;
  text-decoration: none !important;
  display: inline-flex !important;
  align-items: center !important;
  transition: all 180ms ease !important;
}
.site-header .btn:hover,
.site-header .header-right .btn:hover,
.site-header .btn-primary:hover {
  background: #F1F5F9 !important;
  color: #072252 !important;
  transform: translateY(-2px);
  box-shadow: 0 5px 16px rgba(0, 0, 0, 0.22) !important;
}
@media (max-width: 1023px) {
  .site-header .header-right .btn { display: none !important; }
}

/* 햄버거 */
.site-header .nav-toggle {
  background: transparent !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  color: var(--white) !important;
  border-radius: 6px !important;
  padding: 6px 10px !important;
}
.site-header .nav-toggle span,
.site-header .nav-toggle .bar {
  background: var(--white) !important;
}

/* ============================================================
   6개 카테고리 nav
============================================================ */
.ref-catnav {
  background: linear-gradient(90deg, #0B2A5B 0%, #1E3A8A 100%) !important;
  border-bottom: 4px solid #FFFFFF !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}
.ref-catnav-inner {
  max-width: 1400px !important;
  margin: 0 auto !important;
  padding: 0 20px !important;
  display: grid !important;
  grid-template-columns: repeat(6, 1fr) !important;
}
.ref-catnav a {
  padding: 18px 8px !important;
  text-align: center !important;
  font-size: 16px !important;
  font-weight: 800 !important;
  color: rgba(255, 255, 255, 0.9) !important;
  border-bottom: 3px solid transparent !important;
  transition: all 160ms ease !important;
  text-decoration: none !important;
}
.ref-catnav a:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  color: var(--white) !important;
}
.ref-catnav a.active {
  color: #FFFFFF !important;
  background: rgba(0, 0, 0, 0.25) !important;
}
@media (max-width: 640px) {
  .ref-catnav-inner { grid-template-columns: repeat(3, 1fr) !important; }
  .ref-catnav a {
    font-size: 14px !important;
    padding: 14px 4px !important;
    border-bottom: 1px solid rgba(255,255,255,0.1) !important;
  }
}

/* ============================================================
   필터 영역 · 지역 그리드 + 병상 필터 세로 스택 (grid 이슈 원천 차단)
============================================================ */
.ref-filter-bar {
  background: var(--white) !important;
  padding: 24px 0 !important;
  border-bottom: 1px solid var(--gray-200) !important;
  position: relative !important;
  z-index: 5 !important;
}
.ref-filter-inner {
  max-width: 1400px !important;
  margin: 0 auto !important;
  padding: 0 16px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
}

.ref-region-grid {
  display: grid !important;
  grid-template-columns: repeat(6, 1fr) !important;
  gap: 8px !important;
  width: 100% !important;
}
@media (max-width: 900px) { .ref-region-grid { grid-template-columns: repeat(3, 1fr) !important; } }
@media (max-width: 480px) { .ref-region-grid { grid-template-columns: repeat(2, 1fr) !important; } }

.ref-capacity {
  display: grid !important;
  grid-template-columns: repeat(6, 1fr) !important;
  gap: 8px !important;
  width: 100% !important;
}
@media (max-width: 640px) { .ref-capacity { grid-template-columns: repeat(3, 1fr) !important; } }

/* 병상 필터 · 청록 → 브랜드 블루로 통일 */
.ref-capacity a {
  padding: 15px 10px !important;
  background: var(--brand-700) !important;
  color: var(--white) !important;
  text-align: center;
  border-radius: 4px;
  font-size: 16px !important;
  font-weight: 700 !important;
  transition: background 160ms ease;
}
.ref-capacity a:hover, .ref-capacity a.active {
  background: var(--brand-800) !important;
  color: var(--white) !important;
}

/* 오늘 본 매물 위젯 · 사용 안 함 (숨김) */
.ref-today-viewed { display: none !important; }
.ref-filter-left { display: contents !important; }

/* 메인 공지 */
.main-notice {
  background: var(--brand-100) !important;
  color: var(--brand-900) !important;
  border-bottom: 1px solid var(--brand-200) !important;
}

/* ============================================================
   서브페이지 헤더 (page-header) · 파란 톤 통일
============================================================ */
.page-header {
  background: linear-gradient(135deg, #0B2A5B 0%, #1849A9 100%) !important;
  color: var(--white) !important;
  padding: 40px 0 !important;
  border-bottom: 4px solid #FFFFFF !important;
}
.page-header h1 {
  font-size: 32px !important;
  font-weight: 900 !important;
  color: var(--white) !important;
  letter-spacing: -0.03em !important;
  margin: 0 0 12px 0 !important;
}
.page-header .breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7) !important;
}
.page-header .breadcrumb a {
  color: rgba(255, 255, 255, 0.85) !important;
  text-decoration: none !important;
  font-weight: 600;
}
.page-header .breadcrumb a:hover { color: #FFFFFF !important; }
.page-header .breadcrumb .sep { color: rgba(255, 255, 255, 0.4); }
.page-header .breadcrumb span:not(.sep) { color: var(--white) !important; font-weight: 700; }

/* ============================================================
   모바일 완전 최적화 (파란 헤더용 override)
============================================================ */

/* 햄버거 버튼 · 파란 헤더 위 흰색 */
.site-header .menu-toggle {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: rgba(255, 255, 255, 0.12) !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  border-radius: 6px !important;
  width: 42px !important;
  height: 42px !important;
  padding: 0 !important;
  cursor: pointer !important;
  z-index: 220 !important;
  position: relative !important;
  flex-shrink: 0 !important;
}
.site-header .menu-toggle:hover {
  background: rgba(255, 255, 255, 0.2) !important;
}
.site-header .menu-toggle span {
  display: block !important;
  width: 22px !important;
  height: 2px !important;
  background: var(--white) !important;
  position: relative !important;
  border-radius: 2px !important;
}
.site-header .menu-toggle span::before,
.site-header .menu-toggle span::after {
  content: "" !important;
  position: absolute !important;
  left: 0 !important;
  width: 100% !important;
  height: 2px !important;
  background: var(--white) !important;
  border-radius: 2px !important;
  transition: transform 180ms ease, top 180ms ease !important;
}
.site-header .menu-toggle span::before { top: -7px !important; }
.site-header .menu-toggle span::after  { top:  7px !important; }
body.menu-open .site-header .menu-toggle span { background: transparent !important; }
body.menu-open .site-header .menu-toggle span::before { top: 0 !important; transform: rotate(45deg) !important; }
body.menu-open .site-header .menu-toggle span::after  { top: 0 !important; transform: rotate(-45deg) !important; }

/* 데스크톱에서는 햄버거 숨김 */
@media (min-width: 1024px) {
  .site-header .menu-toggle { display: none !important; }
}

/* 백드롭 (사이드바 뒤 어두운 배경) */
.nav-backdrop {
  display: none !important;
  position: fixed !important;
  inset: 0 !important;
  background: rgba(15, 23, 42, 0.5) !important;
  z-index: 150 !important;
}
body.menu-open .nav-backdrop {
  display: block !important;
}

/* ========== 모바일 (1023px 이하) ========== */
@media (max-width: 1023px) {
  /* 상단 헤더 */
  .site-header {
    min-height: 60px !important;
    padding: 10px 0 !important;
  }
  .site-header > .container {
    padding: 0 14px !important;
    gap: 10px !important;
  }
  .site-header .brand-logo-icon {
    width: 40px !important;
    height: 40px !important;
    padding: 4px !important;
  }
  .site-header .brand-logo-text {
    font-size: 17px !important;
    max-width: 160px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  /* 헤더 우측: 전화 텍스트 + CTA 버튼 모바일 숨김, 햄버거만 */
  .site-header .header-phone { display: none !important; }
  .site-header .header-right .btn,
  .site-header .header-right .btn-primary {
    display: none !important;
  }
  .site-header .header-right {
    gap: 8px !important;
  }

  /* nav-primary · 오른쪽 사이드바로 슬라이드 */
  .site-header .nav-primary,
  header.site-header .nav-primary,
  header.site-header nav.nav-primary {
    position: fixed !important;
    top: 0 !important;
    right: -100% !important;
    left: auto !important;
    bottom: auto !important;
    width: min(320px, 88vw) !important;
    height: 100vh !important;
    max-height: 100vh !important;
    background: var(--white) !important;
    z-index: 200 !important;
    padding: 80px 24px 40px !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: 0 !important;
    overflow-y: auto !important;
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.15) !important;
    transition: right 240ms ease !important;
    flex: none !important;
  }
  body.menu-open .site-header .nav-primary {
    right: 0 !important;
  }
  .site-header .nav-primary a {
    display: block !important;
    color: var(--ink-800) !important;
    padding: 16px 4px !important;
    border-bottom: 1px solid var(--gray-100) !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    white-space: normal !important;
    text-decoration: none !important;
    background: transparent !important;
  }
  .site-header .nav-primary a:hover,
  .site-header .nav-primary a.active {
    color: var(--brand-700) !important;
    background: var(--brand-50) !important;
    padding-left: 12px !important;
  }
  .site-header .nav-primary a::after { display: none !important; }

  /* 모바일 사이드바 안 전화 버튼 (nav-phone-mobile) */
  .site-header .nav-phone-mobile {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    margin-top: 24px !important;
    padding: 16px 20px !important;
    background: linear-gradient(90deg, var(--brand-700), var(--brand-800)) !important;
    color: var(--white) !important;
    border-radius: 8px !important;
    text-align: center !important;
    font-weight: 800 !important;
    font-size: 18px !important;
    border: none !important;
    text-decoration: none !important;
  }
  .site-header .nav-phone-mobile:hover {
    background: linear-gradient(90deg, var(--brand-800), var(--brand-900)) !important;
    color: var(--white) !important;
  }

  /* ========== 6개 카테고리 nav (ref-catnav) ========== */
  .ref-catnav-inner {
    grid-template-columns: repeat(3, 1fr) !important;
    padding: 0 !important;
  }
  .ref-catnav a {
    padding: 14px 4px !important;
    font-size: 13px !important;
    border-bottom: 1px solid rgba(255,255,255,0.1) !important;
  }
  .ref-catnav a:nth-child(3n) { border-right: none !important; }

  /* ========== 히어로 ========== */
  .ref-hero {
    min-height: 160px !important;
  }
  .ref-hero-inner {
    padding: 30px 16px !important;
    min-height: 160px !important;
    display: block !important;
    text-align: left !important;
  }
  .ref-hero-text {
    padding-left: 0 !important;
    display: block !important;
    width: 100% !important;
  }
  .ref-hero h1 { font-size: 22px !important; line-height: 1.3 !important; }
  .ref-hero p { font-size: 13px !important; margin-top: 6px !important; }
  .ref-hero-eyebrow { font-size: 12px !important; margin-bottom: 6px !important; }

  /* ========== 필터 영역 ========== */
  .ref-filter-inner {
    padding: 0 14px !important;
    gap: 8px !important;
  }
  .ref-region-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 6px !important;
  }
  .ref-region-grid a {
    padding: 12px 6px !important;
    font-size: 13px !important;
  }
  .ref-capacity {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 6px !important;
  }
  .ref-capacity a {
    padding: 12px 6px !important;
    font-size: 14px !important;
  }

  /* ========== 3열 본문 → 1열 세로 스택 ========== */
  .ref-body {
    grid-template-columns: 1fr !important;
    padding: 14px !important;
    gap: 12px !important;
  }
  .ref-side-left { order: 3 !important; }
  .ref-side-right { order: 2 !important; }
  .ref-main { order: 1 !important; }

  /* ========== 검색바 모바일 · 세로 스택 ========== */
  .ref-search {
    grid-template-columns: 1fr 1fr !important;
    padding: 8px !important;
    gap: 5px !important;
    margin-bottom: 10px !important;
  }
  .ref-search-icon { display: none !important; }
  .ref-search select,
  .ref-search input[type=text] {
    padding: 10px 10px !important;
    font-size: 13px !important;
  }
  .ref-search button {
    grid-column: 1 / -1 !important;
    padding: 10px !important;
    font-size: 14px !important;
  }

  /* ========== 리스트 헤드 모바일 ========== */
  .ref-list-head {
    padding: 12px 14px !important;
    flex-wrap: wrap !important;
    gap: 4px !important;
  }
  .ref-list-head h2 { font-size: 15px !important; }
  .ref-list-head .unit { font-size: 11px !important; width: 100% !important; }

  /* ========== 프리미엄 카드 모바일 2열 (조밀) ========== */
  .ref-premium-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 6px !important;
  }
  .ref-premium-card .body { padding: 8px 6px 10px !important; }
  .ref-premium-card .type { font-size: 13px !important; }
  .ref-premium-card .region { font-size: 11px !important; }
  .ref-premium-card .price { font-size: 15px !important; }
  .ref-premium-card .price small { font-size: 10px !important; }

  /* ========== 우측 급매물 위젯 모바일 → 2열 그리드 ========== */
  .ref-urgent-widget { padding: 0 !important; }
  .ref-urgent-widget-head { grid-column: 1 / -1 !important; }
  .ref-urgent-widget {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 0 !important;
  }
  .ref-urgent-item {
    border-right: 1px solid var(--gray-100) !important;
    padding: 10px !important;
    font-size: 12px !important;
  }
  .ref-urgent-item:nth-child(even) { border-right: none !important; }
  .ref-urgent-item .type { font-size: 12px !important; }
  .ref-urgent-item .rows { font-size: 11px !important; line-height: 1.5 !important; }

  /* ========== 좌측 추천매물도 2열 ========== */
  .ref-rec-widget { padding: 0 !important; }
  .ref-rec-widget-head { grid-column: 1 / -1 !important; }
  .ref-rec-widget {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 0 !important;
  }
  .ref-rec-item {
    border-right: 1px solid var(--gray-100) !important;
    padding: 10px !important;
    font-size: 12px !important;
  }
  .ref-rec-item:nth-child(even) { border-right: none !important; }
  .ref-rec-item .type { font-size: 12px !important; }
  .ref-rec-item .rows { font-size: 11px !important; line-height: 1.5 !important; }

  /* ========== 최근매물 테이블 · 모바일 초조밀 카드 ========== */
  .ref-list-table thead { display: none !important; }
  .ref-list-table {
    display: block !important;
  }
  .ref-list-table tbody {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 0 !important;
    border-top: 1px solid var(--gray-100) !important;
  }
  .ref-list-table tbody tr {
    display: block !important;
    padding: 8px 10px !important;
    border-right: 1px solid var(--gray-100) !important;
    border-bottom: 1px solid var(--gray-100) !important;
    min-height: 0 !important;
  }
  .ref-list-table tbody tr:nth-child(even) { border-right: none !important; }
  .ref-list-table tbody td {
    display: inline-block !important;
    padding: 0 !important;
    border-bottom: none !important;
    text-align: left !important;
    font-size: 12px !important;
    line-height: 1.35 !important;
    min-width: 0 !important;
  }
  /* 숨김: 번호, 등록일, 면적, 권리금, 총사업비, 진행상태 */
  .ref-list-table .c-num,
  .ref-list-table .c-date,
  .ref-list-table .c-area,
  .ref-list-table .c-key,
  .ref-list-table td.col-status,
  .ref-list-table td:nth-child(6),
  .ref-list-table td:nth-child(9),
  .ref-list-table td:nth-child(10) {
    display: none !important;
  }
  /* 지역 · 볼드 */
  .ref-list-table .c-region {
    display: block !important;
    text-align: left !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    color: var(--ink-900) !important;
    margin-bottom: 2px !important;
    line-height: 1.2 !important;
  }
  .ref-list-table .c-region br { display: none !important; }
  /* 분류 · 회색 작게 */
  .ref-list-table .c-type {
    display: block !important;
    font-size: 11px !important;
    color: var(--gray-500) !important;
    line-height: 1.3 !important;
    margin-bottom: 4px !important;
  }
  /* 가격 · 크게 */
  .ref-list-table .c-price {
    display: block !important;
    text-align: left !important;
    font-size: 14px !important;
    font-weight: 900 !important;
    margin-top: 2px !important;
  }
  /* 인가 · 회색 */
  .ref-list-table .c-beds {
    display: block !important;
    font-size: 11px !important;
    color: var(--gray-500) !important;
    margin-top: 2px !important;
    font-weight: 500 !important;
  }
  /* 배지 크기 축소 */
  .ref-list-table .c-region .badge {
    font-size: 9px !important;
    padding: 1px 4px !important;
    margin-left: 3px !important;
  }

  /* ========== 파트너 스트립 모바일 ========== */
  .ref-partner-bar-inner {
    gap: 8px !important;
  }
  .ref-partner-logo {
    font-size: 12px !important;
    padding: 6px 10px !important;
    border-right: none !important;
    border-bottom: 1px solid var(--gray-200);
  }

  /* ========== 페이지 헤더 · 서브페이지 ========== */
  .page-header {
    padding: 30px 0 !important;
  }
  .page-header h1 {
    font-size: 24px !important;
  }
}

/* ========== 모바일 (640px 이하) 더 좁을 때 ========== */
@media (max-width: 640px) {
  .site-header .brand-logo-text { font-size: 15px !important; max-width: 120px !important; }
  .ref-catnav-inner { grid-template-columns: repeat(2, 1fr) !important; }
  .ref-region-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .ref-capacity { grid-template-columns: repeat(3, 1fr) !important; }
  .ref-premium-grid { grid-template-columns: repeat(2, 1fr) !important; }  /* 2열 유지 */
  .ref-hero h1 { font-size: 22px !important; }
}

/* ========== 초소형 (400px 이하) ========== */
@media (max-width: 400px) {
  .ref-premium-grid { grid-template-columns: repeat(2, 1fr) !important; }  /* 여전히 2열 */
  .ref-list-table tbody { grid-template-columns: 1fr !important; }
  .ref-list-table tbody tr { border-right: none !important; }
  .ref-urgent-widget { grid-template-columns: 1fr !important; }
  .ref-urgent-item { border-right: none !important; }
  .ref-rec-widget { grid-template-columns: 1fr !important; }
  .ref-rec-item { border-right: none !important; }
}

/* ============================================================
   햄버거 사이드바 · 프리미엄 디자인
============================================================ */
@media (max-width: 1023px) {
  /* 사이드바 컨테이너 · 위에서 슬라이드 */
  .site-header .nav-primary {
    background: linear-gradient(180deg, #072252 0%, #0B2A5B 100%) !important;
    color: var(--white) !important;
    padding: 24px 0 40px !important;
    box-shadow: -12px 0 40px rgba(0, 0, 0, 0.3) !important;
    width: min(340px, 90vw) !important;
  }

  /* 링크 스타일 · 어두운 배경 위 흰색 */
  .site-header .nav-primary a {
    display: flex !important;
    align-items: center !important;
    color: rgba(255, 255, 255, 0.9) !important;
    background: transparent !important;
    border-bottom: none !important;
    text-decoration: none !important;
    padding: 16px 24px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    position: relative !important;
    transition: all 180ms ease !important;
  }

  .site-header .nav-primary a:hover,
  .site-header .nav-primary a.active {
    color: #FFFFFF !important;
    background: rgba(255, 255, 255, 0.08) !important;
    padding-left: 30px !important;
  }
  /* 데스크톱 밑줄 인디케이터 제거 */
  .site-header .nav-primary a::after { display: none !important; }

  /* 하단 CTA (nav-phone-mobile) · 큰 파란 강조 버튼 */
  .site-header .nav-phone-mobile {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    margin: 24px 24px 0 !important;
    padding: 18px 20px !important;
    background: #FFFFFF !important;
    color: #072252 !important;
    border-radius: 10px !important;
    text-align: center !important;
    font-weight: 900 !important;
    font-size: 18px !important;
    border: none !important;
    text-decoration: none !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25) !important;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
  }
  .site-header .nav-phone-mobile:hover {
    background: #F1F5F9 !important;
    color: #072252 !important;
    transform: translateY(-1px);
  }
  .site-header .nav-phone-mobile svg {
    width: 20px !important;
    height: 20px !important;
    stroke: #072252 !important;
    flex-shrink: 0 !important;
  }
}

/* ============================================================
   ⭐ 최종 · 햄버거 사이드바 완전 재정의 (파일 맨 끝 · 최우선)
============================================================ */

/* 백드롭 · body 바로 아래에 있어야 backdrop-filter 정상 작동 */
body > .nav-backdrop {
  position: fixed !important;
  inset: 0 !important;
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  left: 0 !important;
  background: rgba(0, 0, 0, 0.75) !important;
  z-index: 150 !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transition: opacity 240ms ease, visibility 240ms ease !important;
}
body.menu-open > .nav-backdrop {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

/* 사이드바 헤딩 · MENU */
.nav-sidebar-head { display: none; }

/* 데스크톱 · nav-sidebar-head 숨김 */
@media (min-width: 1024px) {
  .nav-sidebar-head { display: none !important; }
}

/* 모바일 · 사이드바 열림 상태 */
@media (max-width: 1023px) {
  /* 사이드바 컨테이너 · 남색 그라디언트 · 화면 오른쪽 슬라이드 */
  html body header.site-header nav.nav-primary#navPrimary {
    position: fixed !important;
    top: 0 !important;
    right: -100% !important;
    left: auto !important;
    bottom: auto !important;
    width: 280px !important;
    max-width: 82vw !important;
    height: 100vh !important;
    min-height: 100vh !important;
    background: linear-gradient(180deg, #072252 0%, #0B2A5B 60%, #1849A9 100%) !important;
    background-color: #072252 !important;
    z-index: 250 !important;
    padding: 24px 0 32px !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: 0 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    box-shadow: -24px 0 60px rgba(0, 0, 0, 0.5) !important;
    transition: right 280ms cubic-bezier(0.4, 0, 0.2, 1) !important;
  }

  body.menu-open header.site-header nav.nav-primary#navPrimary {
    right: 0 !important;
  }

  /* MENU 헤딩 */
  html body .nav-sidebar-head {
    display: block !important;
    padding: 4px 22px 16px !important;
    font-size: 11px !important;
    color: rgba(255, 255, 255, 0.6) !important;
    font-weight: 800 !important;
    letter-spacing: 3px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
    margin-bottom: 8px !important;
  }

  /* 링크 · 완전 흰색 텍스트 */
  html body header.site-header nav.nav-primary a:not(.nav-phone-mobile) {
    display: block !important;
    color: #FFFFFF !important;
    background: transparent !important;
    border: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    text-decoration: none !important;
    padding: 15px 22px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    line-height: 1.4 !important;
    position: relative !important;
    transition: all 180ms ease !important;
    letter-spacing: -0.01em !important;
  }

  html body header.site-header nav.nav-primary a:not(.nav-phone-mobile):hover,
  html body header.site-header nav.nav-primary a:not(.nav-phone-mobile).active {
    color: #FFFFFF !important;
    background: rgba(255, 255, 255, 0.12) !important;
    padding-left: 28px !important;
  }

  html body header.site-header nav.nav-primary a:not(.nav-phone-mobile)::before,
  html body header.site-header nav.nav-primary a:not(.nav-phone-mobile)::after {
    display: none !important;
    content: none !important;
  }

  /* 하단 큰 전화 CTA · 흰 배경 + 남색 텍스트 · 확실한 대비 */
  html body header.site-header nav.nav-primary a.nav-phone-mobile {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    margin: 18px 18px 0 !important;
    padding: 16px 18px !important;
    background: #FFFFFF !important;
    background-color: #FFFFFF !important;
    color: #072252 !important;
    border-radius: 10px !important;
    border: none !important;
    border-bottom: none !important;
    text-align: center !important;
    font-weight: 900 !important;
    font-size: 17px !important;
    text-decoration: none !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 0 0 2px rgba(255,255,255,0.15) !important;
    letter-spacing: -0.02em !important;
    font-variant-numeric: tabular-nums !important;
    line-height: 1 !important;
  }
  html body header.site-header nav.nav-primary a.nav-phone-mobile span,
  html body header.site-header nav.nav-primary a.nav-phone-mobile {
    color: #072252 !important;
  }
  html body header.site-header nav.nav-primary a.nav-phone-mobile svg {
    width: 18px !important;
    height: 18px !important;
    stroke: #072252 !important;
    flex-shrink: 0 !important;
    color: #072252 !important;
  }
  html body header.site-header nav.nav-primary a.nav-phone-mobile svg path {
    stroke: #072252 !important;
  }
  html body header.site-header nav.nav-primary a.nav-phone-mobile:hover {
    background: #F1F5F9 !important;
    color: #072252 !important;
  }

  /* body scroll lock (사이드바 열림 시) */
  body.menu-open {
    overflow: hidden !important;
    position: fixed !important;
    width: 100% !important;
  }
}

/* 데스크톱 · 백드롭 완전 숨김 */
@media (min-width: 1024px) {
  body > .nav-backdrop {
    display: none !important;
  }
}

/* ============================================================
   서브페이지 전 페이지 · 반응형 그리드 통일 (모든 페이지)
============================================================ */
@media (max-width: 640px) {
  /* 3열, 4열 그리드 → 모바일 1열 (인라인 style 도 override) */
  .trust-row,
  .features-grid,
  .form-grid,
  .grid-3,
  .grid-4,
  [style*="grid-template-columns:repeat(3"],
  [style*="grid-template-columns:repeat(4"],
  [style*="grid-template-columns: repeat(3"],
  [style*="grid-template-columns: repeat(4"] {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  /* 서브페이지 컨텐츠 padding 축소 */
  .section {
    padding: 24px 0 !important;
  }
  .container {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  /* 카드 내부 padding */
  .form-card,
  .service-card,
  .content-card {
    padding: 20px !important;
  }

  /* 헤딩 축소 */
  section h2 {
    font-size: 20px !important;
    line-height: 1.3 !important;
  }
  section h3 {
    font-size: 17px !important;
  }
  section p, section li {
    font-size: 14px !important;
    line-height: 1.6 !important;
  }

  /* 리스트 안 컨텐츠 정상 폭 */
  ul li, ol li {
    word-break: keep-all !important;
  }

  /* 테이블 반응형 */
  table.spec-table,
  table.info-table {
    display: block !important;
    overflow-x: auto !important;
  }
}

@media (min-width: 641px) and (max-width: 1023px) {
  /* 4열 → 태블릿 2열 */
  .trust-row[style*="repeat(4"],
  .features-grid,
  .grid-4,
  [style*="grid-template-columns:repeat(4"],
  [style*="grid-template-columns: repeat(4"] {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 16px !important;
  }
  /* 3열은 태블릿에서도 유지 (넉넉하면 3열) */
  .trust-row[style*="repeat(3"],
  [style*="grid-template-columns:repeat(3"],
  [style*="grid-template-columns: repeat(3"] {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 16px !important;
  }
}

/* ============================================================
   매물 검색 페이지 · 카드 그리드 반응형 (property/list.php)
============================================================ */
/* 매물 리스트 페이지에서는 3열 본문 안이므로 3열 그리드로 */
.ref-list-box .ref-premium-grid {
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 12px !important;
}
@media (max-width: 1200px) {
  .ref-list-box .ref-premium-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }
}
@media (max-width: 1023px) {
  /* 3열 사이드바 세로 스택되므로 카드 그리드도 2열 */
  .ref-list-box .ref-premium-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }
}
@media (max-width: 480px) {
  /* 초소형 화면 · 여전히 2열 유지 (홈페이지 프리미엄과 동일) */
  .ref-list-box .ref-premium-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }
}

/* 페이지네이션 카드 그리드 아래 */
.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 12px 0;
}
.pagination a, .pagination span {
  padding: 8px 14px;
  border-radius: 4px;
  color: var(--gray-700);
  text-decoration: none;
  font-size: 13px;
  border: 1px solid var(--gray-200);
  background: white;
}
.pagination a:hover {
  background: var(--brand-50);
  color: var(--brand-700);
  border-color: var(--brand-700);
}
.pagination .current {
  background: var(--brand-700);
  color: white;
  font-weight: 800;
  border-color: var(--brand-700);
}

/* ============================================================
   모바일 최근매물 · 카드형 · 완전 재디자인
============================================================ */
@media (max-width: 900px) {
  /* 최근매물 리스트 컨테이너 · 2컬럼 그리드 */
  .ref-list-box .ref-list-table {
    display: block;
    border: none;
    background: transparent;
  }
  .ref-list-box .ref-list-table thead { display: none; }
  .ref-list-box .ref-list-table tbody {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 4px;
  }
  .ref-list-box .ref-list-table tbody tr {
    display: block !important;
    padding: 14px !important;
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
    transition: all 0.15s;
    cursor: pointer;
    position: relative;
  }
  .ref-list-box .ref-list-table tbody tr:hover,
  .ref-list-box .ref-list-table tbody tr:active {
    border-color: #1849A9;
    box-shadow: 0 4px 12px rgba(24,73,169,0.12);
    transform: translateY(-1px);
  }
  .ref-list-box .ref-list-table tbody td {
    display: block !important;
    padding: 0 !important;
    border: none !important;
    text-align: left !important;
    line-height: 1.4;
  }
  /* 감춘 컬럼 */
  .ref-list-box .ref-list-table .c-num,
  .ref-list-box .ref-list-table .c-date,
  .ref-list-box .ref-list-table .c-area,
  .ref-list-box .ref-list-table .c-key {
    display: none !important;
  }
  /* 지역 · 상단 (제일 눈에 띄게) */
  .ref-list-box .ref-list-table .c-region {
    font-size: 15px !important;
    font-weight: 800 !important;
    color: #0B2A5B !important;
    letter-spacing: -0.02em;
    margin-bottom: 4px;
    display: flex !important;
    align-items: center;
    gap: 6px;
  }
  .ref-list-box .ref-list-table .c-region .badge {
    display: inline-block;
    padding: 1px 6px;
    font-size: 10px;
    font-weight: 800;
    border-radius: 3px;
    letter-spacing: 0;
  }
  .ref-list-box .ref-list-table .c-region .badge.urgent { background:#0369A1; color:white; }
  .ref-list-box .ref-list-table .c-region .badge.rec { background:#1849A9; color:white; }
  .ref-list-box .ref-list-table .c-region .badge.new { background:#059669; color:white; }
  /* 매물유형 · 지역 밑 · 회색 */
  .ref-list-box .ref-list-table .c-type {
    font-size: 12px !important;
    color: #6B7280 !important;
    font-weight: 500;
    margin-bottom: 10px;
  }
  /* 가격 · 강조 · 빨강 */
  .ref-list-box .ref-list-table .c-price {
    font-size: 20px !important;
    font-weight: 900 !important;
    color: #0369A1 !important;
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin-bottom: 4px;
    display: block !important;
  }
  .ref-list-box .ref-list-table .c-price.lease { color: #F59E0B !important; }
  /* 병상 · 하단 */
  .ref-list-box .ref-list-table .c-beds {
    font-size: 12px !important;
    color: #9CA3AF !important;
    font-weight: 500;
    display: block !important;
  }

  /* 리스트 헤더 · 모바일 폰트 조정 */
  .ref-list-box .ref-list-head {
    padding: 12px 14px !important;
  }
  .ref-list-box .ref-list-head h2 {
    font-size: 16px !important;
    letter-spacing: -0.025em;
  }
  .ref-list-box .ref-list-head .unit {
    font-size: 11px !important;
    color: #9CA3AF;
  }

  /* 매물전체보기 버튼 */
  .ref-list-box .ref-list-more {
    padding: 12px !important;
    margin: 6px 4px 0 !important;
  }
  .ref-list-box .ref-list-more a {
    display: block !important;
    padding: 14px !important;
    background: #0B2A5B;
    color: #FFFFFF !important;
    border-radius: 8px;
    text-align: center;
    font-weight: 700;
    font-size: 13px;
    text-decoration: none;
  }
}

/* 초소형 화면 · 1열 그리드 (더 큰 카드) */
@media (max-width: 380px) {
  .ref-list-box .ref-list-table tbody {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .ref-list-box .ref-list-table tbody tr {
    padding: 16px !important;
  }
  .ref-list-box .ref-list-table .c-region { font-size: 16px !important; }
  .ref-list-box .ref-list-table .c-price { font-size: 22px !important; }
}
