/* 기본 스타일 리셋 및 공통 스타일 */
:root {
  --font-sans: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  color-scheme: light; /* 다크모드 미지원: OS 다크 설정에서도 밝은 화면 유지 */

  /* ===== 디자인 토큰 (색상) — 브랜드 색을 바꾸려면 여기만 고친다 ===== */
  --color-primary: #0077cc;
  --color-primary-hover: #0369a1;
  --color-primary-dark: #005fa3;
  --color-primary-deep: #0a4a8a;
  --color-primary-tint: #e0f0ff;
  --color-primary-tint-2: #e3f2fd;
  --color-primary-bright: #0080ff;
  --color-primary-navy: #003399;
  --color-primary-sky: #00c6ff;
  --color-primary-cyan: #00b4d8;
  --color-brand-navy: #0d3b71;
  --color-link: #2563eb;
  --color-link-strong: #1d4ed8;
  --color-link-deep: #1e40af;
  --color-link-soft: #60a5fa;
  --color-link-soft-2: #93c5fd;
  --color-link-bg: #eff6ff;
  --color-link-bg-hover: #dbeafe;
  --color-link-border: #bfdbfe;
  --color-info-bg: #e0f2fe;
  --color-text-strong: #0f172a;
  --color-text-heading: #1e293b;
  --color-text: #334155;
  --color-text-secondary: #475569;
  --color-text-muted: #64748b;
  --color-text-subtle: #94a3b8;
  --color-border-strong: #cbd5e1;
  --color-border: #e2e8f0;
  --color-surface-2: #f1f5f9;
  --color-surface-1: #f8fafc;
  --color-surface: #ffffff;
  --color-gray-900: #111111;
  --color-gray-800: #333333;
  --color-gray-700: #424242;
  --color-gray-600: #666666;
  --color-gray-400: #999999;
  --color-gray-300: #dddddd;
  --color-gray-250: #e0e0e0;
  --color-gray-200: #e9ecef;
  --color-gray-150: #eeeeee;
  --color-gray-100: #f0f0f0;
  --color-gray-75: #f3f3f3;
  --color-gray-50: #f5f5f5;
  --color-gray-25: #f8f9fa;
  --color-black: #000000;
  --color-star: #f59e0b;
  --color-star-hover: #fbbf24;
  --color-star-bg: #fef3c7;
  --color-memo-bg: #fffbeb;
  --color-memo-border: #fde68a;
  --color-memo-text: #78350f;
  --color-success: #10b981;
  --color-success-hover: #059669;
  --color-success-legacy: #28a745;
  --color-danger: #ef4444;
  --color-danger-strong: #dc2626;
  --color-danger-legacy: #dc3545;
  --color-danger-bg: #fef2f2;
  --color-warning: #ffc107;
  --color-warning-strong: #eab308;
  --color-info-legacy: #17a2b8;
  --color-orange: #f97316;
  --color-indigo: #6366f1;
  --color-highlight: #fff3cd;
  --color-location-dot: #ff4444;
  --color-list-primary-tint: #e6f2fa;
  --color-naver: #03c75a;
  --color-naver-hover: #02b350;
  --color-naver-active: #029a46;
  --color-naver-tint: #e9f9f0;
  --color-naver-text: #03833c;
  --color-naver-border: #c6eed7;
  --color-kakao: #fee500;
  --color-kakao-hover: #fada0a;
  --color-kakao-text: #191919;
  --color-kakao-tint: #fff9cc;
  --color-kakao-border: #f3e27a;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-sans);
  color: var(--color-text-heading);
  line-height: 1.6;
  background-color: var(--color-gray-25);
  overflow-x: hidden;
  font-weight: 400;
  letter-spacing: -0.2px;
  -webkit-font-smoothing: antialiased;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

a {
  color: var(--color-primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button {
  cursor: pointer;
  border: none;
  outline: none;
  background: none;
  min-height: 44px;
  /* 터치 친화적 최소 크기 */
  min-width: 44px;
}

* {
  -webkit-tap-highlight-color: transparent;
}

/* 접근성: 스크린 리더 전용 텍스트 */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* 헤더 스타일 (글래스모피즘) */
.main-header {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(16px) saturate(1.6);
  -webkit-backdrop-filter: blur(16px) saturate(1.6);
  color: var(--color-text-heading);
  padding: 0;
  box-shadow: 0 1px 12px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
}

.main-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  height: 56px;
}

.logo {
  display: flex;
  align-items: center;
  z-index: 1001;
}

.logo a {
  display: flex;
  align-items: center;
  color: var(--color-text-strong);
  text-decoration: none;
  gap: 10px;
  white-space: nowrap;
}

.logo a:hover {
  text-decoration: none;
  opacity: 0.85;
}

.logo i {
  font-size: 1.2rem;
  color: var(--color-surface);
  background: var(--color-primary);
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo h1 {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  white-space: nowrap;
  color: var(--color-text-strong);
}

/* 네비게이션 */
nav {
  position: relative;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 4px;
  align-items: center;
  background: var(--color-surface-2);
  border-radius: 24px;
  padding: 3px;
}

nav ul li {
  margin-left: 0;
}

nav ul li a {
  color: var(--color-text-muted);
  font-weight: 500;
  font-size: 0.85rem;
  padding: 7px 16px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  border-radius: 20px;
  white-space: nowrap;
}

nav ul li a i {
  font-size: 0.82rem;
}

nav ul li a:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--color-text-strong);
  text-decoration: none;
}

nav ul li a.active {
  background: var(--color-text-strong);
  color: var(--color-surface);
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

/* 모바일 햄버거 메뉴 */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--color-text);
  font-size: 1.3rem;
  padding: 8px;
  border-radius: 8px;
  transition: background-color 0.2s;
}

.mobile-menu-toggle:hover {
  background-color: var(--color-surface-2);
}

/* 검색 및 필터 섹션 */
.search-filter-container {
  background: var(--color-surface);
  padding: 10px 0 0 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  position: sticky;
  top: 60px;
  z-index: 999;
}

.search-filter-container .container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* 검색창 영역 */
.search-container {
  position: relative;
  width: 100%;
  max-width: 500px;
}

/* 지역 필터 바 */

.region-chip {
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  border: 1.5px solid var(--color-border);
  background: var(--color-surface-1);
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all 0.18s;
  min-height: 30px;
  min-width: unset;
  white-space: nowrap;
}

.region-chip:hover {
  background: var(--color-primary-tint);
  border-color: var(--color-link-soft-2);
  color: var(--color-link-strong);
}

.region-chip.active {
  background: linear-gradient(135deg, var(--color-primary-deep), var(--color-primary-hover));
  border-color: transparent;
  color: var(--color-surface);
  box-shadow: 0 2px 6px rgba(3, 105, 161, 0.3);
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 12px;
  color: var(--color-gray-600);
  z-index: 2;
}

.search-input {
  width: 100%;
  padding: 12px 40px 12px 35px;
  border: 1px solid var(--color-gray-300);
  border-radius: 30px;
  font-size: 16px;
  /* iOS 줌 방지를 위한 16px */
  transition: border-color 0.3s, box-shadow 0.3s;
  min-height: 44px;
}

.search-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(0, 119, 204, 0.2);
  outline: none;
}

.clear-icon {
  position: absolute;
  right: 12px;
  color: var(--color-gray-600);
  cursor: pointer;
  display: none;
  z-index: 2;
  padding: 5px;
}

.search-input:not(:placeholder-shown)+.search-results+.clear-icon {
  display: block;
}

/* 검색 결과 */
.search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid var(--color-gray-300);
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  max-height: 300px;
  overflow-y: auto;
  z-index: 1000;
  display: none;
}

.search-result-item {
  padding: 12px 15px;
  border-bottom: 1px solid var(--color-gray-100);
  cursor: pointer;
  transition: background-color 0.2s;
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover,
.search-result-item.kb-active {
  background-color: var(--color-surface-2);
}

.search-result-item.kb-active {
  outline: 2px solid var(--color-primary);
  outline-offset: -2px;
}

.search-result-name {
  font-weight: 500;
  margin-bottom: 4px;
}

.search-result-info {
  font-size: 13px;
  color: var(--color-gray-600);
}

/* 필터 컨테이너 */
.filter-container {
  position: relative;
}

.filter-toggle {
  background-color: var(--color-gray-25);
  border: 1px solid var(--color-gray-300);
  border-radius: 8px;
  padding: 10px 15px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
}

.filter-toggle:hover {
  background-color: var(--color-gray-200);
}

.filter-toggle.active {
  background-color: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

/* 지도 컨테이너 */
.map-container {
  position: relative;
  height: calc(100vh - 140px);
  min-height: 400px;
}

#map {
  width: 100%;
  height: 100%;
}

/* 지도 컨트롤 */
.map-controls {
  position: absolute;
  bottom: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 100;
}

.map-controls button {
  width: 44px;
  height: 44px;
  background-color: white;
  border: 1px solid var(--color-gray-300);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  transition: all 0.3s;
  font-size: 16px;
  color: var(--color-gray-800);
}

.map-controls button:hover {
  background-color: var(--color-gray-25);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.map-controls button:active {
  transform: translateY(0);
}

/* 푸터 */
footer {
  background-color: var(--color-gray-800);
  color: var(--color-surface);
  padding: 20px 0;
}

footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* 마커 스타일 */
.marker-container {
  position: relative;
  display: inline-block;
}

.marker-content {
  display: flex;
  align-items: center;
  padding: 6px 10px;
  background: white;
  border: 1px solid var(--color-primary-bright);
  border-radius: 19px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
  white-space: nowrap;
  font-family: var(--font-sans);
}

.icon-circle {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 24px;
  height: 24px;
  background-color: var(--color-primary-bright);
  border-radius: 50%;
}

.marker-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-right: 8px;
}

.marker-text {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-gray-800);
}

.marker-pointer {
  position: absolute;
  bottom: -4px;
  left: 18px;
  width: 8px;
  height: 8px;
  background: white;
  border-right: 1px solid var(--color-primary-bright);
  border-bottom: 1px solid var(--color-primary-bright);
  transform: rotate(45deg);
}

/* 마커 클러스터링 스타일 */
.cluster-marker {
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
  font-weight: bold;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  font-family: var(--font-sans);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cluster-marker:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

.cluster-marker-1 {
  background-color: rgba(0, 119, 204, 0.85);
  width: 40px;
  height: 40px;
  font-size: 13px;
}

.cluster-marker-2 {
  background-color: rgba(0, 119, 204, 0.85);
  width: 50px;
  height: 50px;
  font-size: 15px;
}

.cluster-marker-3 {
  background-color: rgba(0, 119, 204, 0.85);
  width: 60px;
  height: 60px;
  font-size: 17px;
}

.cluster-marker-4 {
  background-color: rgba(0, 119, 204, 0.85);
  width: 70px;
  height: 70px;
  font-size: 19px;
}

.cluster-marker-5 {
  background-color: rgba(0, 119, 204, 0.85);
  width: 80px;
  height: 80px;
  font-size: 21px;
}

/* 정보창 스타일 */
.info-window {
  padding: 15px;
  max-width: 320px;
  font-family: var(--font-sans);
  line-height: 1.5;
}

.info-window-close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: background-color 0.2s;
  flex-shrink: 0;
}

.info-window-close:hover {
  background-color: rgba(255, 255, 255, 0.4);
}

.info-window-close i {
  font-size: 14px;
}

/* 센터 목록 페이지 스타일 */

.stat-card {
  background-color: white;
  border-radius: 8px;
  padding: 15px;
  min-width: 170px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  flex: 1;
  min-width: 150px;
}

.stat-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 5px;
}

.stat-label {
  font-size: 14px;
  color: var(--color-gray-600);
}

.centers-table {
  background-color: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.centers-table table {
  width: 100%;
  border-collapse: collapse;
}

.centers-table th,
.centers-table td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid var(--color-gray-100);
}

.centers-table th {
  background-color: var(--color-gray-25);
  font-weight: 600;
  color: var(--color-gray-800);
}

.centers-table tr:hover {
  background-color: var(--color-gray-25);
}

/* 카드 레이아웃 (모바일용) */

.center-card {
  background-color: white;
  border-radius: 8px;
  padding: 15px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--color-gray-100);
}

.region-badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  background-color: var(--color-gray-150);
  color: var(--color-gray-700);
}

/* 페이지네이션 */
.pagination {
  display: flex;
  justify-content: center;
  margin-top: 20px;
  gap: 5px;
}

/* 로딩 및 빈 상태 */
.loading,
.no-centers {
  text-align: center;
  padding: 40px;
  background-color: white;
  border-radius: 8px;
  color: var(--color-gray-400);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

/* centers-list 페이지 전용 스타일 */
.page-header {
  text-align: center;
  margin-bottom: 30px;
  padding: 20px 0;
}

.page-header h1 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-gray-800);
  margin-bottom: 8px;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--color-gray-75);
  border-top: 4px solid var(--color-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 15px;
}

.center-name {
  font-weight: 600;
  color: var(--color-gray-800);
  margin-bottom: 4px;
}

.center-branch {
  font-size: 13px;
  color: var(--color-primary);
}

/* 카드 그리드 레이아웃 */

/* 연수원 카드 스타일 (centers-list 전용) */
.center-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--color-gray-250);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.center-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 15px;
  gap: 10px;
}

.card-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-gray-800);
  margin: 0;
  flex: 1;
  line-height: 1.3;
}

.card-body {
  flex: 1;
  margin-bottom: 15px;
}

.card-info {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 14px;
  color: var(--color-gray-600);
  line-height: 1.5;
}

.card-info i {
  color: var(--color-primary);
  margin-top: 2px;
  flex-shrink: 0;
  width: 16px;
}

/* 테이블 반응형 래퍼 */

/* 테이블 정렬 헤더 */
.centers-table th[data-sort] {
  user-select: none;
  position: relative;
  padding-right: 30px;
}

.centers-table th[data-sort]:hover {
  background-color: var(--color-gray-200);
}

.centers-table th[data-sort].active {
  background-color: var(--color-primary-tint-2);
  color: var(--color-primary);
}

/* 테이블 셀 특정 스타일 */

/* 페이지네이션 컨트롤 */

/* 결과 카운트 */
#results-count {
  font-size: 14px;
  color: var(--color-gray-600);
  font-weight: 500;
  margin-bottom: 15px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* 토스트 알림 */
.toast-container {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 400px;
}

.toast {
  background-color: white;
  border-radius: 8px;
  padding: 15px 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  gap: 12px;
  animation: slideInRight 0.3s ease-out;
  border-left: 4px solid var(--color-primary);
  min-width: 300px;
}

.toast.success {
  border-left-color: var(--color-success-legacy);
}

.toast.warning {
  border-left-color: var(--color-warning);
}

.toast.error {
  border-left-color: var(--color-danger-legacy);
}

.toast.info {
  border-left-color: var(--color-info-legacy);
}

.toast-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.toast.success .toast-icon {
  color: var(--color-success-legacy);
}

.toast.warning .toast-icon {
  color: var(--color-warning);
}

.toast.error .toast-icon {
  color: var(--color-danger-legacy);
}

.toast.info .toast-icon {
  color: var(--color-info-legacy);
}

.toast-content {
  flex: 1;
}

.toast-title {
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--color-gray-800);
  font-size: 14px;
}

.toast-message {
  font-size: 13px;
  color: var(--color-gray-600);
  line-height: 1.4;
}

.toast-close {
  background: none;
  border: none;
  color: var(--color-gray-400);
  font-size: 18px;
  cursor: pointer;
  padding: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: color 0.2s;
}

.toast-close:hover {
  color: var(--color-gray-800);
}

@keyframes slideInRight {
  from {
    transform: translateX(400px);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOutRight {
  from {
    transform: translateX(0);
    opacity: 1;
  }

  to {
    transform: translateX(400px);
    opacity: 0;
  }
}

.toast.closing {
  animation: slideOutRight 0.3s ease-in;
}

/* 모바일 토스트 */
@media (max-width: 600px) {
  .toast-container {
    top: 60px;
    right: 10px;
    left: 10px;
    max-width: none;
  }

  .toast {
    min-width: auto;
    padding: 12px 15px;
  }

  .toast-title {
    font-size: 13px;
  }

  .toast-message {
    font-size: 12px;
  }
}

/* ================== 반응형 스타일 ================== */

/* 큰 태블릿 (768px 이하) */
@media (max-width: 768px) {
  .container {
    padding: 0 10px;
  }

  /* 헤더 */
  .main-header .container {
    flex-direction: row;
    height: 56px;
  }

  nav ul {
    gap: 2px;
  }

  nav ul li {
    margin: 0;
  }

  /* 검색 필터 */
  .search-filter-container {
    top: 106px;
  }

  .search-filter-container .container {
    flex-direction: column;
    gap: 15px;
  }

  .search-container {
    max-width: 100%;
  }

  /* 지도 */
  .map-container {
    height: calc(100vh - 200px);
    min-height: 300px;
  }

  .map-controls {
    bottom: 15px;
    right: 15px;
  }

  .map-controls button {
    width: 40px;
    height: 40px;
    font-size: 14px;
  }

  /* 푸터 */
  footer .container {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }

  /* 센터 목록 */

  .stat-card {
    min-width: calc(50% - 7.5px);
  }

  /* 테이블을 카드로 변경 */
  .centers-table {
    display: none;
  }

  /* 페이지네이션 */
  .pagination {
    flex-wrap: wrap;
    gap: 3px;
  }

}

/* 작은 태블릿 (600px 이하) */
@media (max-width: 600px) {

  /* 헤더 */
  .logo h1 {
    font-size: 1.2rem;
  }

  .logo i {
    font-size: 1.5rem;
  }

  /* 헤더 컨테이너 롤백 (로고 중앙 정렬 복구) */
  .main-header .container {
    flex-direction: row;
    height: 56px;
  }

  .mobile-menu-toggle {
    display: block;
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
  }

  /* 네비게이션을 햄버거 메뉴로 변경 */
  nav ul {
    position: fixed;
    top: 56px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 56px);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px) saturate(1.4);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    padding: 16px;
    transition: left 0.3s ease;
    z-index: 1000;
    border-top: 1px solid rgba(226, 232, 240, 0.6);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-radius: 0;
    gap: 4px;
  }

  nav ul.show {
    left: 0;
  }

  nav ul li {
    margin: 0;
    width: 100%;
  }

  nav ul li a {
    width: 100%;
    padding: 14px 16px;
    border-radius: 12px;
    justify-content: flex-start;
    font-size: 0.95rem;
    color: var(--color-text);
  }

  nav ul li a:hover {
    background: var(--color-surface-2);
    color: var(--color-text-strong);
  }

  nav ul li a.active {
    background: var(--color-text-strong);
    color: var(--color-surface);
  }

  /* 검색 */
  .search-input {
    font-size: 16px;
    padding: 14px 40px 14px 35px;
  }

  /* 지도 컨트롤 */
  .map-controls {
    bottom: 10px;
    right: 10px;
    gap: 8px;
  }

  .map-controls button {
    width: 36px;
    height: 36px;
    font-size: 13px;
  }

  /* 통계 카드 */
  .stat-card {
    min-width: 100%;
  }

  /* 센터 카드 */

}

/* 모바일 (480px 이하) */
@media (max-width: 480px) {
  .container {
    padding: 0 8px;
  }

  /* 헤더 */
  .main-header {
    padding: 0;
  }

  .logo h1 {
    font-size: 1.05rem;
  }

  .logo i {
    font-size: 1.3rem;
    margin-right: 8px;
  }

  /* 검색 필터 */
  .search-filter-container {
    padding: 12px 0;
  }

  .search-input {
    padding: 12px 35px 12px 30px;
  }

  .search-icon {
    left: 10px;
  }

  .clear-icon {
    right: 10px;
  }

  /* 필터 토글 */
  .filter-toggle {
    padding: 12px;
    font-size: 13px;
  }

  /* 지도 */
  .map-container {
    height: calc(100vh - 180px);
  }

  /* 정보창 */
  .info-window {
    padding: 12px;
    max-width: 280px;
  }

  /* 센터 카드 */
  .center-card {
    padding: 12px;
  }

  /* 푸터 */
  footer {
    padding: 15px 0;
  }

  /* 페이지네이션 */

}

/* 초소형 모바일 (360px 이하) */
@media (max-width: 360px) {
  .container {
    padding: 0 5px;
  }

  .logo h1 {
    font-size: 1rem;
  }

  .search-input {
    padding: 10px 30px 10px 25px;
  }

  .map-controls button {
    width: 32px;
    height: 32px;
    font-size: 12px;
  }

  /* 카드 그리드 모바일 */

  .card-title {
    font-size: 16px;
  }

  .card-info {
    font-size: 13px;
  }

  /* 페이지네이션 모바일 */

  /* 테이블 모바일 */

  .centers-table th,
  .centers-table td {
    padding: 8px;
    font-size: 12px;
  }

  /* 버튼 모바일 */

}

/* 가로 모드 최적화 */
@media (max-height: 600px) and (orientation: landscape) {
  .map-container {
    height: calc(100vh - 120px);
  }
}

/* 모바일 드로어 메뉴(폭 600px 이하)만 화면 높이에 맞춘다. 데스크톱 알약 메뉴에 적용되면 헤더 밖으로 커진다 */
@media (max-height: 600px) and (orientation: landscape) and (max-width: 600px) {
  nav ul {
    height: calc(100vh - 76px);
    overflow-y: auto;
  }
}

/* 터치 디바이스 최적화 */
@media (pointer: coarse) {

  button,
  a,
  .clickable {
    min-height: 44px;
    min-width: 44px;
  }

  .search-result-item {
    padding: 15px;
  }

}

/* 고해상도 디스플레이 최적화 */
@media (-webkit-min-device-pixel-ratio: 2),
(min-resolution: 192dpi) {
  .marker-content {
    border-width: 0.5px;
  }

  .cluster-marker {
    border: 0.5px solid rgba(255, 255, 255, 0.3);
  }
}

/* 다크 모드 지원 */

/* 애니메이션 줄이기 설정 */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* 고대비 모드 지원 */
@media (prefers-contrast: high) {

  .search-input,
  .filter-toggle,
  .filter-option select {
    border-width: 2px;
  }

  .map-controls button {
    border-width: 2px;
  }
}

/* ==================== 연수원 추가 모달 ==================== */
.modal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  overflow-y: auto;
  animation: fadeIn 0.3s ease-out;
}

.modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.modal-content {
  background-color: var(--color-surface);
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
  from {
    transform: translateY(50px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--color-gray-600);
  padding: 8px;
  transition: color 0.2s, transform 0.2s;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  color: var(--color-gray-800);
  background-color: var(--color-gray-50);
  transform: rotate(90deg);
}

/* 폼 스타일 */

/* 모달 반응형 */
@media (max-width: 768px) {
  .modal-content {
    max-width: 100%;
    margin: 0;
    border-radius: 0;
    max-height: 100vh;
  }

}

/* 다크 모드 지원 */

/* 주소 검색 자동완성 */

/* 다크 모드 */

/* 정보창 버튼 레이아웃 */

/* 네이버 지도 InfoWindow 기본 닫기 버튼 강제 숨김 */
.naver-info-window-close,
.iw_close_btn,
.iw_inner_close,
[class*="_close_btn"],
[id*="iwCloseBtn"] {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}























/* ===== 별점·이유 태그 평가 (정보창) ===== */
.rating-section { margin: 10px 0 12px; padding: 10px 12px; background: rgba(241, 245, 249, 0.75); border-radius: 12px; }
.rating-summary { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin-bottom: 8px; }
.rating-avg { font-weight: 800; color: var(--color-text-strong); font-size: 0.98rem; display: inline-flex; align-items: center; gap: 4px; }
.rating-avg i { color: var(--color-star); font-size: 0.85rem; }
.rating-count, .rating-empty { color: var(--color-text-muted); font-size: 0.8rem; }
.rating-tag-counts { display: flex; flex-wrap: wrap; gap: 4px; width: 100%; }
.rating-tag-count { font-size: 0.72rem; color: var(--color-text); background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 999px; padding: 2px 8px; }

.rating-stars { display: flex; gap: 2px; }
.rating-star { background: none; border: none; padding: 2px; cursor: pointer; color: var(--color-border-strong); font-size: 1.05rem; min-width: unset; min-height: unset; line-height: 1; transition: color 0.15s, transform 0.15s; }
.rating-star.on { color: var(--color-star); }
.rating-star:hover { transform: scale(1.15); color: var(--color-star-hover); }
.rating-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.rating-tag { font-size: 0.72rem; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--color-border-strong); background: var(--color-surface); color: var(--color-text-secondary); cursor: pointer; min-width: unset; min-height: unset; line-height: 1.3; }
.rating-tag.on { background: var(--color-primary); border-color: var(--color-primary); color: var(--color-surface); }

/* ===== 헤더 세션 표시 ===== */
.session-indicator { display: flex; align-items: center; gap: 8px; font-size: 0.8rem; color: var(--color-text-secondary); }
.session-indicator:empty { display: none; }
.session-me { white-space: nowrap; }
.session-me i { color: var(--color-star); margin-right: 3px; }
.session-logout { background: none; border: 1px solid var(--color-border); border-radius: 999px; padding: 3px 10px; font-size: 0.75rem; color: var(--color-text-muted); cursor: pointer; min-width: unset; min-height: unset; }
.session-logout:hover { background: var(--color-surface-2); color: var(--color-text); }

/* ===== 목록 페이지 별점 배지 ===== */
.list-rating { font-weight: 700; color: var(--color-text-strong); font-size: 0.85rem; display: inline-flex; align-items: center; gap: 3px; }
.list-rating i { color: var(--color-star); font-size: 0.8rem; }
.list-rating-count { font-weight: 500; color: var(--color-text-muted); }
.list-rating-empty { color: var(--color-text-subtle); font-weight: 500; }
.list-rating-tag { font-size: 0.7rem; color: var(--color-text); background: var(--color-surface-2); border-radius: 999px; padding: 2px 7px; margin-left: 4px; white-space: nowrap; }
.card-rating { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; margin: 6px 0 2px; }

/* ===== 탐색: 시군 칩 · 결과 요약 · 링크 복사 (목록 페이지) ===== */
.result-summary { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.copy-link-btn { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--color-link-border); background: var(--color-link-bg); color: var(--color-link-strong); font-size: 0.8rem; font-weight: 600; cursor: pointer; min-width: unset; min-height: unset; }
.copy-link-btn:hover { background: var(--color-link-bg-hover); }

/* ===== 지도 검색 패널: 지역별로 둘러보기 ===== */

/* ===== 운영자 한 줄 메모 ===== */
.list-memo { display: flex; align-items: flex-start; gap: 6px; margin: 4px 0 6px; color: var(--color-memo-text); font-size: 0.84rem; line-height: 1.4; font-weight: 500; }
.list-memo i { color: var(--color-star); margin-top: 3px; font-size: 0.75rem; flex-shrink: 0; }

/* ===== 별점 섹션 v2: 요약(접힘) ↔ 선택판(펼침) ===== */
.rating-summary-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; cursor: pointer; border-radius: 8px; }
.rating-summary-row .rating-summary { margin-bottom: 0; flex: 1; }
.rating-summary-row:hover .rating-open-btn { background: var(--color-primary-hover); }
.rating-open-btn { flex-shrink: 0; display: inline-flex; align-items: center; gap: 4px; padding: 6px 12px; border-radius: 999px; border: none; background: var(--color-primary); color: var(--color-surface); font-size: 0.78rem; font-weight: 700; cursor: pointer; min-width: unset; min-height: unset; white-space: nowrap; transition: background 0.15s; }
.rating-open-btn i { color: var(--color-memo-border); font-size: 0.72rem; }
.rating-picker { background: var(--color-surface); border: 1px solid var(--color-border); }
.rating-picker-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.rating-picker-row + .rating-picker-row { margin-top: 10px; }
.rating-picker-tags { flex-direction: column; align-items: flex-start; gap: 6px; }
.rating-picker-label { font-size: 0.8rem; color: var(--color-text); font-weight: 600; }
.rating-picker-label small { color: var(--color-text-subtle); font-weight: 500; }
.rating-hint { color: var(--color-danger-strong); font-size: 0.74rem; font-weight: 500; margin-left: 6px; }
.rating-picker .rating-tags { margin-top: 0; }
.rating-picker .rating-star { font-size: 1.25rem; }
/* 별 호버 미리보기: 마우스가 올라간 별까지 채움 */
.rating-stars:hover .rating-star { color: var(--color-star-hover); transform: none; }
.rating-stars .rating-star:hover ~ .rating-star { color: var(--color-border-strong); }
.rating-actions { display: flex; justify-content: flex-end; gap: 6px; margin-top: 12px; }
.rating-cancel { background: none; border: 1px solid var(--color-border-strong); border-radius: 999px; padding: 6px 12px; font-size: 0.78rem; color: var(--color-text-muted); cursor: pointer; min-width: unset; min-height: unset; }
.rating-cancel:hover { background: var(--color-surface-2); }
.rating-save { background: var(--color-primary); border: none; border-radius: 999px; padding: 6px 14px; font-size: 0.78rem; font-weight: 700; color: var(--color-surface); cursor: pointer; min-width: unset; min-height: unset; transition: background 0.15s; }
.rating-save:hover:not(:disabled) { background: var(--color-primary-hover); }
.rating-save:disabled { background: var(--color-border-strong); cursor: not-allowed; }
.rating-save.kakao { background: var(--color-kakao); color: var(--color-kakao-text); }
.rating-save.kakao:hover:not(:disabled) { background: var(--color-kakao-hover); }
/* v3: 비로그인은 요약만(버튼 없음), 요약 줄 자체가 진입점 */
.rating-summary-row:hover { background: rgba(255, 255, 255, 0.6); }
.rating-save.kakao { display: none; }

/* ===== 로그인 확인 레이어 ===== */
.login-modal { position: fixed; inset: 0; z-index: 3000; display: none; align-items: center; justify-content: center; padding: 20px; background: rgba(15, 23, 42, 0.45); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.login-modal.open { display: flex; }
.login-modal-box { width: 100%; max-width: 360px; background: var(--color-surface); border-radius: 18px; padding: 28px 24px 20px; text-align: center; box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25); animation: loginModalIn 0.18s ease-out; }
@keyframes loginModalIn { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
.login-modal-icon { width: 48px; height: 48px; margin: 0 auto 12px; border-radius: 50%; background: var(--color-star-bg); color: var(--color-star); display: flex; align-items: center; justify-content: center; font-size: 1.3rem; }
.login-modal-box h3 { margin: 0 0 18px; font-size: 1.05rem; line-height: 1.4; color: var(--color-text-strong); letter-spacing: -0.3px; }
.login-modal-box p { margin: 0 0 18px; font-size: 0.84rem; line-height: 1.55; color: var(--color-text-muted); }
.login-modal-actions { display: flex; gap: 8px; }
.login-modal-later { flex: 1; padding: 12px; border-radius: 12px; border: 1px solid var(--color-border); background: var(--color-surface); color: var(--color-text-muted); font-size: 0.9rem; font-weight: 600; cursor: pointer; min-width: unset; min-height: unset; }
.login-modal-later:hover { background: var(--color-surface-1); }
.login-modal-kakao { flex: 1.4; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 12px; border-radius: 12px; border: none; background: var(--color-kakao); color: var(--color-kakao-text); font-size: 0.9rem; font-weight: 700; cursor: pointer; min-width: unset; min-height: unset; transition: background 0.15s; }
.login-modal-kakao:hover { background: var(--color-kakao-hover); }
@media (prefers-reduced-motion: reduce) { .login-modal-box { animation: none; } }


/* ===== 목록 페이지 지역 칩 행 ===== */

/* ===== 탐색 보강: 거리 배지, 정보창 링크 복사 ===== */
.list-distance { display: inline-flex; align-items: center; gap: 4px; font-size: 0.78rem; font-weight: 600; color: var(--color-primary-hover); background: var(--color-info-bg); border-radius: 999px; padding: 2px 8px; margin-left: 6px; white-space: nowrap; }
.list-distance i { font-size: 0.7rem; }

/* ===== 권역 프리셋 칩 (광역권·경기 북부/남부·영동/영서) ===== */

/* ===== 지도 지역 칩: 선택 상태와 목록 링크 ===== */

/* ===== 헤더 '지역' 버튼, 지역 패널, 지도 위 필터 표시 ===== */
.nav-pill-btn { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 20px; color: var(--color-text); padding: 7px 14px; cursor: pointer; display: flex; align-items: center; gap: 6px; font-size: 0.85rem; font-weight: 500; font-family: inherit; min-height: unset; min-width: unset; transition: background 0.2s; }
.nav-pill-btn i { font-size: 0.8rem; }
.nav-pill-btn:hover { background: var(--color-surface-2); }
.nav-pill-btn.active { background: var(--color-text-strong); border-color: var(--color-text-strong); color: var(--color-surface); }
.nav-pill-btn.primary { background: var(--color-primary); border-color: var(--color-primary); color: var(--color-surface); }
.nav-pill-btn.primary:hover { filter: brightness(0.95); }
/* 헤더 액션(지역·검색): 데스크톱은 메뉴 오른쪽, 모바일은 햄버거 왼쪽에 상시 노출 */
.header-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.main-header .container { gap: 10px; }
.main-header nav { margin-left: auto; }
@media (max-width: 600px) {
  /* 햄버거를 absolute에서 흐름 안으로 넣어 지역·검색 버튼과 겹치지 않게 한다 */
  .main-header .container { gap: 0; }
  .main-header nav { margin-left: 0; }
  .header-actions { margin-left: auto; }
  .mobile-menu-toggle { position: static; transform: none; margin-left: 6px; padding: 8px 6px; }
  .nav-pill-btn { padding: 6px 10px; font-size: 0.8rem; gap: 4px; }
  .logo a { gap: 8px; }
  .logo h1 { font-size: 1rem; }
}
@media (max-width: 360px) {
  .logo h1 { display: none; }
}
.panel-close { background: none; border: none; color: var(--color-text-muted); cursor: pointer; padding: 6px 8px; border-radius: 6px; min-height: unset; min-width: unset; font-size: 1.1rem; }
.panel-close:hover { background: var(--color-surface-2); color: var(--color-text-strong); }

/* ===== 지역 패널: 권역 5칸 + 시·도 격자 ===== */
.search-panel-slide.region-panel { padding: 18px 0 0; background: var(--color-surface); }
.region-panel-inner { position: relative; max-width: 760px; }
.region-panel-close { position: absolute; top: -8px; right: 12px; }
.region-group + .region-group { margin-top: 18px; }
.region-group-label { margin: 0 0 8px; font-size: 0.75rem; font-weight: 600; color: var(--color-text-muted); letter-spacing: 0.02em; }
.region-grid { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 6px; }
.region-grid-macro { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.region-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 52px; min-width: 0; padding: 7px 2px; border: 1px solid var(--color-border); border-radius: 10px; background: var(--color-surface-1); color: var(--color-text-heading); font-family: inherit; cursor: pointer; transition: background 0.15s, border-color 0.15s; }
.region-tile:hover { background: var(--color-surface-2); border-color: var(--color-border-strong); }
.region-tile-name { font-size: 0.88rem; font-weight: 600; line-height: 1.2; white-space: nowrap; }
.region-tile-count { font-size: 0.72rem; line-height: 1.2; color: var(--color-text-muted); font-variant-numeric: tabular-nums; }
.region-tile.active { background: var(--color-text-strong); border-color: var(--color-text-strong); color: var(--color-surface); }
.region-tile.active .region-tile-count { color: var(--color-border-strong); }
.region-panel-link { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; padding: 14px 2px; border-top: 1px solid var(--color-border); color: var(--color-primary); font-size: 0.9rem; font-weight: 600; text-decoration: none; }
.region-panel-link i { font-size: 0.75rem; }
.region-panel-link:hover { color: var(--color-primary-hover); }
.region-loading { margin: 0; color: var(--color-text-muted); font-size: 0.85rem; }
.panel-scrim { position: fixed; inset: 56px 0 0 0; z-index: 999; background: rgba(15, 23, 42, 0.35); opacity: 0; pointer-events: none; transition: opacity 0.25s; }
body.panel-open .panel-scrim { opacity: 1; pointer-events: auto; }
@media (max-width: 600px) {
  .region-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .region-grid.region-grid-macro { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .region-tile { min-height: 50px; }
  .region-tile-name { font-size: 0.85rem; }
}
@media (prefers-reduced-motion: reduce) { .panel-scrim { transition: none; } }

/* ===== 전국 지도 지역 이름표 ===== */
.region-label { transform: translate(-50%, -50%); display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px 5px 9px; background: var(--color-surface); border: 1px solid var(--color-border-strong); border-radius: 999px; box-shadow: 0 2px 8px rgba(15, 23, 42, 0.18); white-space: nowrap; cursor: pointer; font-size: 13px; line-height: 1.2; transition: transform 0.15s, box-shadow 0.15s; }
.region-label b { color: var(--color-text-strong); font-weight: 700; }
.region-label span { color: var(--color-primary); font-weight: 700; font-variant-numeric: tabular-nums; }
.region-label:hover { transform: translate(-50%, -50%) scale(1.06); box-shadow: 0 4px 14px rgba(15, 23, 42, 0.25); }

/* ===== 지역 목록 시트 (모바일: 아래 / 데스크톱: 왼쪽) ===== */
.region-sheet { position: absolute; z-index: 150; display: flex; flex-direction: column; background: var(--color-surface); box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.14); left: 0; right: 0; bottom: 0; max-height: 46%; border-radius: 16px 16px 0 0; }
.region-sheet[hidden] { display: none; }
.region-sheet[data-state="peek"] .region-sheet-list { display: none; }
.region-sheet[data-state="peek"] .region-sheet-toggle i { transform: rotate(180deg); }
.region-sheet-head { display: flex; align-items: center; gap: 4px; padding: 6px 8px 6px 4px; border-bottom: 1px solid var(--color-border); flex-shrink: 0; }
.region-sheet[data-state="peek"] .region-sheet-head { border-bottom: none; }
.region-sheet-toggle { flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0; padding: 8px 12px; background: none; border: none; font-family: inherit; cursor: pointer; text-align: left; }
.region-sheet-title { font-size: 1.0625rem; font-weight: 700; letter-spacing: -0.01em; color: var(--color-text-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.region-sheet-toggle i { font-size: 0.75rem; color: var(--color-text-muted); transition: transform 0.2s; }
.region-sheet-table { flex-shrink: 0; display: inline-flex; align-items: center; padding: 6px 10px; border-radius: 8px; color: var(--color-primary); font-size: 0.82rem; font-weight: 600; text-decoration: none; }
.region-sheet-table:hover { background: var(--color-primary-tint); }
.region-sheet-close { flex-shrink: 0; width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; background: none; border: none; border-radius: 8px; color: var(--color-text-muted); cursor: pointer; font-size: 1rem; }
.region-sheet-close:hover { background: var(--color-surface-2); color: var(--color-text-strong); }
.region-sheet-list { list-style: none; margin: 0; padding: 0 0 8px; overflow-y: auto; overscroll-behavior: contain; }
.region-sheet-list ul { list-style: none; margin: 0; padding: 0; }
.sheet-group-head { position: sticky; top: 0; z-index: 1; display: flex; align-items: baseline; gap: 6px; margin: 0; padding: 14px 16px 6px; background: var(--color-surface); font-size: 0.8rem; font-weight: 700; color: var(--color-text-secondary); }
.sheet-group-head span { font-weight: 500; color: var(--color-text-subtle); font-variant-numeric: tabular-nums; }
.sheet-group + .sheet-group { border-top: 1px solid var(--color-surface-2); }
.sheet-item { display: flex; flex-direction: column; align-items: stretch; gap: 1px; width: 100%; padding: 7px 16px; background: none; border: none; font-family: inherit; text-align: left; cursor: pointer; min-height: 0; transition: background 0.12s; }
.sheet-item:hover { background: var(--color-surface-1); }
.sheet-item-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.sheet-item-name { font-size: 0.9375rem; font-weight: 500; line-height: 1.4; letter-spacing: -0.01em; color: var(--color-text-strong); }
.sheet-item-sub { font-size: 0.78rem; line-height: 1.35; color: var(--color-text-muted); }
.sheet-item-rating { flex-shrink: 0; font-size: 0.8rem; font-weight: 700; color: var(--color-text-heading); }
.sheet-item-rating i { color: var(--color-star); font-size: 0.72rem; margin-right: 2px; }
.sheet-item-rating small { color: var(--color-text-muted); font-weight: 500; }
.sheet-item-memo { font-size: 0.8rem; color: var(--color-memo-text); }
/* 모바일: 시트가 덮는 만큼 지도 컨트롤을 올린다 */
.map-container .map-controls { transition: bottom 0.2s; }
@media (max-width: 767px) {
  .map-container .map-controls { bottom: calc(var(--sheet-h, 0px) + 12px); }
}
@media (min-width: 768px) {
  .region-sheet { top: 12px; left: 12px; right: auto; bottom: auto; width: 340px; max-height: calc(100% - 24px); border-radius: 14px; box-shadow: 0 6px 24px rgba(15, 23, 42, 0.16); }
}

/* 이름 앞 지역 표시 "[경기 용인]" */
.area-prefix { color: var(--color-text-muted); font-weight: 500; }

/* 헤더 버튼이 링크일 때 / 목록 페이지의 휴대폰 전용 '지도' 버튼 */
a.nav-pill-btn { text-decoration: none; }
a.nav-pill-btn:hover { text-decoration: none; }
.header-actions-mobile { display: none; }
@media (max-width: 600px) {
  .header-actions-mobile { display: flex; }
}

/* ===== 지도 화면: 헤더 아래를 지도가 모두 채운다 (푸터 없음) ===== */
.map-container { height: calc(100vh - 57px); height: calc(100dvh - 57px); min-height: 320px; }
.about-copy { margin: 18px 0 0; font-size: 0.75rem; color: var(--color-text-muted); text-align: center; }
.about-copy a { color: var(--color-text-secondary); text-decoration: none; }

/* 휴대폰 첫 방문 안내 */
.map-hint { position: absolute; left: 12px; bottom: calc(var(--sheet-h, 0px) + 14px); z-index: 140; display: flex; align-items: center; gap: 8px; max-width: calc(100% - 84px); padding: 9px 8px 9px 14px; background: var(--color-text-strong); color: var(--color-surface); border-radius: 12px; box-shadow: 0 6px 20px rgba(15, 23, 42, 0.25); font-size: 0.85rem; line-height: 1.4; word-break: keep-all; }
.map-hint[hidden] { display: none; }
.map-hint b { font-weight: 700; }
.map-hint button { flex-shrink: 0; width: 28px; height: 28px; min-width: 0; min-height: 0; border: none; border-radius: 50%; background: rgba(255, 255, 255, 0.16); color: var(--color-surface); cursor: pointer; font-size: 0.75rem; }

/* PC 전국 개요 패널 (지역 목록 시트와 같은 자리) */
.region-sheet.is-overview .region-sheet-close { display: none; }

/* ===== 인터랙티브 지도 (2026-09-24) ===== */
/* 헤더: 지도 화면은 화면 폭 전체, PC에서는 지도|목록 전환 + ? 아이콘 */
.main-header.is-wide .container { max-width: none; padding-left: 16px; padding-right: 16px; }
@media (min-width: 768px) {
  .main-header.is-wide .header-actions { display: none; }          /* PC: 검색은 헤더 가운데, 지역은 왼쪽 패널 */
  .main-header.is-wide nav { margin-left: auto; }
  .main-header.is-wide .nav-about a { padding: 7px 10px; }
  .main-header.is-wide .nav-about span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

.region-label span { font-variant-numeric: tabular-nums; }
.region-label.is-hot { transform: translate(-50%, -50%) scale(1.08); background: var(--color-text-strong); box-shadow: 0 8px 20px rgba(15, 23, 42, 0.28); }
.region-label.is-hot b, .region-label.is-hot span { color: var(--color-surface); }
.region-label.is-dim { opacity: 0.35; }
.region-label:active { transform: translate(-50%, -50%) scale(0.95); }
.region-label.is-burst { animation: label-burst 0.2s ease-in forwards; }
.region-label.is-intro { animation: label-pop 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.3) both; animation-delay: calc(var(--i, 0) * 45ms); }
@keyframes label-pop { from { opacity: 0; transform: translate(-50%, -30%) scale(0.6); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
@keyframes label-burst { to { opacity: 0; transform: translate(-50%, -50%) scale(1.6); } }

/* 확대 직후 클러스터·마커가 톡 떠오른다 */
.map-container.is-entering .cluster-marker, .map-container.is-entering .marker-container { animation: marker-pop 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.3) both; }
@keyframes marker-pop { from { opacity: 0; transform: scale(0.5); } to { opacity: 1; transform: scale(1); } }

/* 목록에 마우스를 올린 연수원 위치 */
.hover-pin { position: relative; transform: translate(-50%, -50%); width: 18px; height: 18px; pointer-events: none; }
.hover-pin span { position: absolute; inset: 0; border-radius: 50%; background: var(--color-primary); border: 3px solid var(--color-surface); box-shadow: 0 2px 8px rgba(15, 23, 42, 0.35); }
.hover-pin::before { content: ''; position: absolute; inset: -14px; border-radius: 50%; background: var(--color-primary); opacity: 0.25; animation: pin-pulse 1.2s ease-out infinite; }
@keyframes pin-pulse { from { transform: scale(0.4); opacity: 0.45; } to { transform: scale(1.3); opacity: 0; } }

/* 지역 칸: 색 단계 + 반응 (지도 패널·PC 개요 공통) */
.region-tile { transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease; }
.region-tile:hover, .region-tile.is-hot { transform: translateY(-2px); box-shadow: 0 6px 14px rgba(15, 23, 42, 0.16); border-color: var(--color-primary); }
.region-tile:active { transform: scale(0.96); }
@keyframes tile-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* PC 개요 검색 */
.sheet-search-results[hidden], .region-sheet-list[hidden] { display: none; }
.sheet-empty { padding: 16px; color: var(--color-text-muted); font-size: 0.9rem; }
.sheet-item:hover .sheet-item-name { color: var(--color-primary-dark); }

@media (prefers-reduced-motion: reduce) {
  .region-label, .region-tile { transition: none; }
  .region-label.is-intro, .sheet-overview.is-intro .region-tile, .map-container.is-entering .cluster-marker, .map-container.is-entering .marker-container, .hover-pin::before { animation: none; }
}

/* ===== 지도 이름표: 절제된 흰 알약 (색은 경계 채우기가 맡는다) ===== */
.region-label { border: 1px solid rgba(15, 23, 42, 0.08); background: var(--color-surface); box-shadow: 0 2px 10px rgba(15, 23, 42, 0.14); transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease, background 0.18s ease; }
.region-label span { color: var(--color-primary); }

/* ===== PC 전국 개요: 권역별 목록 + 막대 ===== */
.sheet-overview { padding: 2px 8px 4px; }
.region-sheet.is-overview .region-sheet-list { padding-bottom: 0; }
.ov-group + .ov-group { margin-top: 4px; }
.ov-head { display: flex; justify-content: space-between; align-items: baseline; width: 100%; padding: 8px 10px 3px; background: none; border: none; font-family: inherit; font-size: 0.78rem; font-weight: 700; color: var(--color-text-muted); letter-spacing: 0.01em; cursor: pointer; min-height: 0; min-width: 0; }
.ov-head.is-static { cursor: default; }
.ov-head:not(.is-static):hover { color: var(--color-primary); }
.ov-head .ov-num { font-weight: 600; }
.ov-row { display: flex; justify-content: space-between; align-items: center; width: 100%; height: 28px; padding: 0 10px; background: none; border: none; border-radius: 8px; font-family: inherit; cursor: pointer; min-height: 0; min-width: 0; transition: background 0.15s; }
.ov-row:hover, .ov-row.is-hot { background: var(--color-primary-tint); }
.ov-row:active { transform: scale(0.99); }
.ov-name { font-size: 0.9rem; font-weight: 500; color: var(--color-text-heading); text-align: left; }
.ov-row:hover .ov-name, .ov-row.is-hot .ov-name { color: var(--color-primary-dark); }
.ov-num { font-size: 0.82rem; color: var(--color-text-muted); text-align: right; font-variant-numeric: tabular-nums; }

/* 지도를 옮겨 다른 시·도를 보고 있을 때의 전환 알림 */
.region-here { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); z-index: 160; display: inline-flex; align-items: center; gap: 8px; padding: 8px 8px 8px 14px; border: none; border-radius: 999px; background: var(--color-surface); box-shadow: 0 6px 20px rgba(15, 23, 42, 0.18); font-family: inherit; font-size: 0.875rem; color: var(--color-text); cursor: pointer; white-space: nowrap; min-height: 0; animation: here-in 0.25s ease-out; }
.region-here[hidden] { display: none; }
.region-here i { font-size: 0.75rem; color: var(--color-primary); }
.region-here b { font-weight: 700; color: var(--color-text-strong); }
.region-here-go { padding: 4px 10px; border-radius: 999px; background: var(--color-primary); color: var(--color-surface); font-size: 0.8rem; font-weight: 600; }
.region-here:hover .region-here-go { background: var(--color-primary-dark); }
@keyframes here-in { from { opacity: 0; transform: translate(-50%, -6px); } to { opacity: 1; transform: translate(-50%, 0); } }
@media (min-width: 768px) { .region-here { left: calc(50% + 176px); } }   /* PC는 왼쪽 패널을 뺀 지도 가운데 */
@media (max-width: 767px) { .region-here { top: 40px; } }   /* 휴대폰: 오른쪽 위 네이버 저작권 줄 아래로 */
@media (prefers-reduced-motion: reduce) { .region-here { animation: none; } }

/* ===== 정보창: 차분한 흰 카드 ===== */
.map-container.has-infowindow .region-here { display: none; }   /* 정보창이 열려 있으면 전환 알림을 숨긴다 */
.iw-card { position: relative; width: 300px; max-width: calc(100vw - 40px); padding: 14px 16px 14px; background: var(--color-surface); border: 1px solid rgba(15, 23, 42, 0.06); border-radius: 14px; box-shadow: 0 14px 34px rgba(15, 23, 42, 0.18), 0 2px 6px rgba(15, 23, 42, 0.06); font-family: var(--font-sans); color: var(--color-text); animation: iw-in 0.22s cubic-bezier(0.16, 1, 0.3, 1); }
.iw-card::after { content: ''; position: absolute; left: 50%; bottom: -7px; width: 14px; height: 14px; background: var(--color-surface); border-right: 1px solid rgba(15, 23, 42, 0.06); border-bottom: 1px solid rgba(15, 23, 42, 0.06); transform: translateX(-50%) rotate(45deg); }
@keyframes iw-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.iw-close { position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; min-width: 0; min-height: 0; display: inline-flex; align-items: center; justify-content: center; border: none; border-radius: 8px; background: none; color: var(--color-text-subtle); font-size: 0.9rem; cursor: pointer; }
.iw-close:hover { background: var(--color-surface-2); color: var(--color-text-strong); }
.iw-area { margin: 0 34px 3px 0; font-size: 0.78rem; font-weight: 600; color: var(--color-primary-dark); }
.iw-title { margin: 0 34px 0 0; font-size: 1.0625rem; font-weight: 700; line-height: 1.35; letter-spacing: -0.01em; color: var(--color-text-strong); word-break: keep-all; }
.iw-branch { margin: 2px 0 0; font-size: 0.8rem; color: var(--color-text-muted); }
.iw-memo { display: flex; gap: 7px; margin: 10px 0 0; padding: 7px 10px; background: var(--color-memo-bg); border-radius: 8px; font-size: 0.84rem; line-height: 1.45; font-weight: 500; color: var(--color-memo-text); }
.iw-memo i { margin-top: 3px; font-size: 0.75rem; color: var(--color-star); flex-shrink: 0; }
.iw-meta { display: flex; flex-direction: column; gap: 4px; margin-top: 10px; }
.iw-line { display: flex; gap: 7px; margin: 0; font-size: 0.82rem; line-height: 1.45; color: var(--color-text-secondary); }
.iw-line i { width: 12px; margin-top: 4px; font-size: 0.72rem; color: var(--color-text-subtle); text-align: center; flex-shrink: 0; }
.iw-line a { color: inherit; text-decoration: underline; text-underline-offset: 2px; min-height: 0; min-width: 0; }
.iw-clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.iw-actions { display: flex; gap: 6px; margin-top: 12px; }
.iw-btn { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 5px; height: 38px; min-height: 38px; min-width: max-content; padding: 0 12px; border: 1px solid var(--color-border); border-radius: 10px; background: var(--color-surface-2); color: var(--color-text); font-family: inherit; font-size: 0.84rem; font-weight: 600; text-decoration: none; white-space: nowrap; cursor: pointer; transition: filter 0.15s; }
.iw-btn:hover { filter: brightness(0.96); text-decoration: none; color: var(--color-text); }
.iw-btn i { font-size: 0.78rem; }
.iw-btn-naver, .iw-btn-naver:hover { background: var(--color-naver-tint); border-color: var(--color-naver-border); color: var(--color-naver-text); }
.iw-btn-icon { flex: 0 0 38px; min-width: 38px; padding: 0; color: var(--color-text-secondary); }
/* 별점: 상자 대신 구분선 아래 한 줄 */
.iw-card .rating-section { margin: 12px 0 0; padding: 10px 0 0; background: none; border-radius: 0; border-top: 1px solid var(--color-surface-2); }
.iw-card .rating-summary-row:hover { background: none; }
.iw-card .rating-summary { gap: 4px 8px; }
.iw-card .rating-tag-count { border: none; background: var(--color-surface-2); color: var(--color-text-secondary); }
.iw-card .rating-section.rating-picker { padding: 10px 12px; margin-top: 12px; border: 1px solid var(--color-border); border-radius: 10px; }
.iw-btn-kakao, .iw-btn-kakao:hover { background: var(--color-kakao-tint); border-color: var(--color-kakao-border); color: var(--color-kakao-text); }
/* 다녀온 사람들의 글: 제목 한 줄 + 날짜 */
.iw-posts { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--color-surface-2); }
.iw-posts-head { display: flex; justify-content: space-between; align-items: baseline; margin: 0 0 4px; font-size: 0.78rem; font-weight: 600; color: var(--color-text-secondary); }
.iw-posts-head a { min-height: 0; min-width: 0; font-weight: 500; color: var(--color-text-muted); text-decoration: none; }
.iw-posts-head a:hover { color: var(--color-primary-dark); }
.iw-posts ul { list-style: none; margin: 0; padding: 0; }
.iw-posts li a { display: flex; align-items: baseline; gap: 8px; min-height: 0; min-width: 0; padding: 4px 0; color: var(--color-text); text-decoration: none; }
.iw-posts li a:hover .iw-post-title { color: var(--color-primary-dark); text-decoration: underline; text-underline-offset: 2px; }
.iw-post-title { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 0.82rem; line-height: 1.4; }
.iw-post-date { flex-shrink: 0; font-size: 0.72rem; color: var(--color-text-subtle); font-variant-numeric: tabular-nums; }
@media (max-width: 480px) { .iw-card { width: 280px; } }
@media (prefers-reduced-motion: reduce) { .iw-card { animation: none; } }

/* ===== PC 첫 화면 정리 (2026-10-03): 헤더 검색 · 가벼운 지역 패널 · 최근 블로그 글 ===== */
/* 헤더 가운데 검색 */
.header-search { display: none; }
@media (min-width: 768px) {
  .main-header.is-wide .container { position: relative; }
  .header-search { display: block; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(420px, 38vw); }
  .header-search > i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--color-text-subtle); font-size: 0.85rem; pointer-events: none; }
  .header-search input { width: 100%; height: 40px; padding: 0 14px 0 38px; border: 1px solid var(--color-border); border-radius: 20px; background: var(--color-surface-2); font-family: inherit; font-size: 0.9rem; color: var(--color-text-strong); transition: background 0.15s, border-color 0.15s, box-shadow 0.15s; }
  .header-search input::placeholder { color: var(--color-text-muted); }
  .header-search input:focus { outline: none; background: var(--color-surface); border-color: var(--color-primary); box-shadow: 0 0 0 3px var(--color-primary-tint); }
  .header-search-results { position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 1200; max-height: min(60vh, 440px); overflow-y: auto; margin: 0; padding: 6px 0; list-style: none; background: var(--color-surface); border: 1px solid rgba(15, 23, 42, 0.06); border-radius: 14px; box-shadow: 0 14px 34px rgba(15, 23, 42, 0.18); }
  .header-search-results[hidden] { display: none; }
}
/* 왼쪽 개요 패널: 이름과 숫자만, 폭을 줄인다 */
@media (min-width: 768px) {
  .region-sheet.is-overview { width: 240px; }
  .region-sheet.is-overview .region-sheet-toggle { pointer-events: none; padding: 8px 12px; }
  .region-sheet.is-overview .region-sheet-toggle i { display: none; }
  .region-sheet.is-overview .region-sheet-title { font-size: 1rem; }
  .region-sheet.is-overview .region-sheet-table { color: var(--color-text-muted); font-weight: 500; gap: 5px; }
  .region-sheet.is-overview .region-sheet-table i { font-size: 0.62rem; }
  .region-sheet.is-overview .region-sheet-table:hover { background: none; color: var(--color-primary-dark); }
  .region-sheet.is-overview .region-sheet-head { border-bottom: none; padding-bottom: 0; }
  .sheet-overview { padding: 0 8px 8px; }
  .ov-head { padding-top: 10px; font-weight: 600; color: var(--color-text-muted); }
  .ov-head .ov-num { font-weight: 500; }
}
/* 오른쪽: 최근 블로그 글 (1200px 이상, 지역 미선택일 때) */
.recent-posts { position: absolute; z-index: 140; top: 40px; right: 12px; width: 280px; max-height: calc(100% - 330px); overflow-y: auto; scrollbar-width: thin; padding: 14px 6px 6px; background: var(--color-surface); border-radius: 14px; box-shadow: 0 6px 24px rgba(15, 23, 42, 0.16); font-family: var(--font-sans); }
.recent-posts[hidden] { display: none; }
.rp-head { display: flex; align-items: baseline; justify-content: space-between; padding: 0 10px 6px; }
.rp-title { margin: 0; font-size: 1rem; font-weight: 700; letter-spacing: -0.01em; color: var(--color-text-strong); }
.rp-asof { font-size: 0.78rem; color: var(--color-text-muted); font-variant-numeric: tabular-nums; }
.rp-list { list-style: none; margin: 0; padding: 0; }
.rp-item { position: relative; border-radius: 10px; }
.rp-item:hover { background: var(--color-surface-2); }
.rp-main { display: flex; flex-direction: column; gap: 1px; width: 100%; min-height: 0; padding: 8px 10px; background: none; border: none; font-family: inherit; text-align: left; cursor: pointer; }
.rp-line { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.rp-center { min-width: 0; font-size: 0.9rem; font-weight: 600; letter-spacing: -0.01em; color: var(--color-text-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp-item:hover .rp-center { color: var(--color-primary-dark); }
.rp-date { flex-shrink: 0; font-size: 0.72rem; color: var(--color-text-subtle); transition: opacity 0.12s; }
.rp-post { font-size: 0.82rem; line-height: 1.4; color: var(--color-text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp-area { font-size: 0.72rem; color: var(--color-text-subtle); }
.rp-open { position: absolute; top: 5px; right: 6px; width: 26px; height: 26px; min-width: 0; min-height: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: 7px; background: var(--color-surface); color: var(--color-text-muted); font-size: 0.7rem; text-decoration: none; opacity: 0; transition: opacity 0.12s; }
.rp-item:hover .rp-open, .rp-open:focus-visible { opacity: 1; }
.rp-item:hover .rp-date { opacity: 0; }
.rp-open:hover { color: var(--color-primary-dark); }
.rp-more { display: block; width: 100%; min-height: 0; margin-top: 2px; padding: 8px 10px; background: none; border: none; border-top: 1px solid var(--color-surface-2); font-family: inherit; font-size: 0.82rem; font-weight: 600; color: var(--color-primary); text-align: left; cursor: pointer; }
.rp-more:hover { color: var(--color-primary-dark); }
@media (max-width: 1199px) { .recent-posts { display: none !important; } }

/* ===== PC 첫 화면(홈): 가운데 1200px 안에 지역 · 지도 · 최근 블로그 글 세 칸 (js/home-mode.js) ===== */
/* 지역·검색·글을 고르면 body.is-home이 빠지고 지도가 화면 전체로 커진다 */
@media (min-width: 1200px) {
  body.is-home { background: var(--color-surface-2); }
  body.is-home .main-header.is-wide .container { max-width: 1200px; margin: 0 auto; }
  body.is-home .map-container { display: grid; grid-template-columns: 240px minmax(0, 1fr) 300px; grid-template-rows: minmax(0, 1fr); gap: 16px; max-width: 1200px; margin: 0 auto; padding: 20px 16px; box-sizing: border-box; }
  body.is-home.no-posts .map-container { grid-template-columns: 240px minmax(0, 1fr); }
  body.is-home #map { grid-column: 2; grid-row: 1; height: min(100%, 900px); border: 1px solid var(--color-border); border-radius: 16px; overflow: hidden; }
  body.is-home .region-sheet, body.is-home .recent-posts { position: static; grid-row: 1; align-self: start; width: auto; max-height: min(100%, 900px); border: 1px solid var(--color-border); border-radius: 16px; box-shadow: none; }
  body.is-home .region-sheet { grid-column: 1; }
  body.is-home .recent-posts { grid-column: 3; }
  body.is-home .map-controls, body.is-home .region-here { display: none; }
  body.is-home .region-sheet-list { scrollbar-width: thin; }
}
/* 홈 ↔ 전체 화면 전환: 새 배치가 살짝 떠오르며 나타난다 */
.map-container.is-switching { animation: home-switch 0.3s ease-out; }
@keyframes home-switch { from { opacity: 0.35; transform: scale(0.992); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .map-container.is-switching { animation: none; } }

/* ===== 가독성 정리 (2026-10-03 3차): 지역 줄 · 블로그 글 · 홈 머리말 · 로그인 확인창 ===== */
/* 지역 줄: 이름(굵게) + 파란 숫자(지도 이름표와 같은 짝) + 연수원이 많은 시·군 */
@media (min-width: 768px) {
  .region-sheet.is-overview { width: 280px; }
  .sheet-overview { padding: 0 8px 6px; }
  .ov-group + .ov-group { margin-top: 4px; padding-top: 4px; border-top: 1px solid var(--color-surface-2); }
  .ov-head { padding: 4px 10px 0; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.02em; color: var(--color-text-subtle); }
  .ov-head .ov-num { font-size: 0.72rem; font-weight: 500; color: var(--color-text-subtle); }
  .ov-row { display: flex; justify-content: flex-start; align-items: center; gap: 6px; height: 28px; padding: 0 10px; }
  .ov-name { font-size: 0.95rem; font-weight: 600; color: var(--color-text-strong); }
  .ov-row .ov-num { font-size: 0.9rem; font-weight: 700; color: var(--color-primary); text-align: left; }
  .ov-cities { flex: 1; min-width: 0; margin-left: 6px; font-size: 0.76rem; color: var(--color-text-muted); text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .ov-row:hover .ov-cities, .ov-row.is-hot .ov-cities { color: var(--color-text-secondary); }
}
/* 블로그 글: 위에 연수원 이름(파란 작은 줄), 아래에 글 제목 두 줄 */
.rp-item + .rp-item { border-top: 1px solid var(--color-surface-2); border-radius: 0; }
.rp-main { gap: 3px; padding: 10px 10px; }
.rp-line { justify-content: flex-start; gap: 6px; }
.rp-center { font-size: 0.8rem; font-weight: 700; color: var(--color-primary-dark); }
.rp-area { flex-shrink: 0; font-size: 0.74rem; color: var(--color-text-muted); }
.rp-date { margin-left: auto; }
.rp-post { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; white-space: normal; font-size: 0.92rem; font-weight: 500; line-height: 1.45; letter-spacing: -0.01em; color: var(--color-text-strong); word-break: keep-all; overflow-wrap: anywhere; }
.rp-item:hover .rp-post { color: var(--color-primary-dark); }
.rp-item:hover .rp-center { color: var(--color-primary-dark); }
.rp-open { top: 6px; }
/* 홈 머리말: 넉넉한 화면에서만 */
.home-hero { display: none; }
@media (min-width: 1200px) and (min-height: 840px) {
  body.is-home .home-hero { display: flex; align-items: baseline; gap: 14px; grid-column: 1 / -1; grid-row: 1; margin: 0 4px 14px; }
  body.is-home .home-hero h2 { margin: 0; font-size: 1.5rem; font-weight: 800; letter-spacing: -0.03em; color: var(--color-text-strong); }
  body.is-home .home-hero h2 b { color: var(--color-primary); font-variant-numeric: tabular-nums; }
  body.is-home .home-hero p { margin: 0; font-size: 0.95rem; color: var(--color-text-muted); }
}
@media (min-width: 1200px) {
  body.is-home .map-container { grid-template-columns: 280px minmax(0, 1fr) 320px; grid-template-rows: auto minmax(0, 1fr); column-gap: 16px; row-gap: 0; }
  body.is-home.no-posts .map-container { grid-template-columns: 280px minmax(0, 1fr); }
  body.is-home #map, body.is-home .region-sheet, body.is-home .recent-posts { grid-row: 2; }
}
/* 로그인 확인창: 무엇을 받는지 한 줄(방침 링크 포함) → 카카오 버튼 → 조용한 '다음에' */
.login-modal-box { padding: 28px 24px 14px; }
.login-modal-box h3 { margin: 0 0 8px; }
.login-modal-box .login-modal-note { margin: 0 0 20px; font-size: 0.86rem; line-height: 1.55; color: var(--color-text-secondary); word-break: keep-all; }
.login-modal-actions { flex-direction: column; gap: 4px; }
.login-modal-kakao { flex: none; width: 100%; padding: 13px; font-size: 0.95rem; }
.login-modal-later { flex: none; width: 100%; padding: 10px; border: none; background: none; color: var(--color-text-muted); font-size: 0.86rem; font-weight: 500; }
.login-modal-later:hover { background: none; color: var(--color-text-strong); }
.login-modal-note a { color: var(--color-text-muted); white-space: nowrap; text-decoration: underline; text-underline-offset: 2px; min-height: 0; min-width: 0; }
.login-modal-note a:hover { color: var(--color-text-strong); }

/* ===== 헤더: 카카오 로그인 버튼 ===== */
.session-login { display: inline-flex; align-items: center; gap: 6px; min-width: 0; min-height: 0; height: 34px; padding: 0 14px; border: none; border-radius: 999px; background: var(--color-kakao); color: var(--color-kakao-text); font-family: inherit; font-size: 0.82rem; font-weight: 700; white-space: nowrap; cursor: pointer; transition: background 0.15s; }
.session-login:hover { background: var(--color-kakao-hover); }

/* ===== PC 첫 화면(홈) 왼쪽 칸: 대시보드 (js/home-dash.js) ===== */
.home-dash { display: none; }
@media (min-width: 1200px) {
  /* 권역 도넛의 색 단계: 한 가지 파랑의 진하기 (많은 권역이 진하다) */
  body.is-home { --dash-1: #0a4a8a; --dash-2: #0f66b8; --dash-3: #2f86d6; --dash-4: #5fa4e3; --dash-5: #8fc0ec; --dash-6: #b7d6f3; }
  body.is-home .map-container { grid-template-columns: 300px minmax(0, 1fr) 320px; }
  body.is-home.no-posts .map-container { grid-template-columns: 300px minmax(0, 1fr); }
  body.is-home #regionSheet { display: none; }   /* 홈에서는 대시보드의 '연수원이 많은 지역' 카드가 맡는다 */
  body.is-home .home-dash { display: flex; flex-direction: column; gap: 8px; grid-column: 1; grid-row: 2; min-height: 0; height: min(100%, 900px); }
  .dash-scroll { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; scrollbar-width: thin; }
  .dash-card { flex-shrink: 0; padding: 12px 14px 10px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 16px; font-family: var(--font-sans); }
  .dash-title { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 0 0 8px; font-size: 0.9rem; font-weight: 700; letter-spacing: -0.01em; color: var(--color-text-strong); }
  .dash-title small { font-size: 0.7rem; font-weight: 500; color: var(--color-text-subtle); white-space: nowrap; }

  /* 요약 숫자 */
  .dash-kpis { display: grid; grid-template-columns: 1fr 1fr 1.25fr; padding: 12px 6px; }
  .dash-kpi { display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; }
  .dash-kpi + .dash-kpi { border-left: 1px solid var(--color-surface-2); }
  .dash-kpi b { font-size: 1.45rem; font-weight: 800; line-height: 1.15; letter-spacing: -0.03em; color: var(--color-text-strong); font-variant-numeric: tabular-nums; white-space: nowrap; }
  .dash-kpi b em { font-style: normal; color: var(--color-primary); }
  .dash-kpi span { font-size: 0.72rem; color: var(--color-text-muted); }

  /* 권역별 분포: 도넛 + 범례 */
  .dash-donut { display: flex; align-items: center; gap: 12px; }
  .dash-donut-chart { position: relative; flex: 0 0 108px; height: 108px; }
  .dash-donut-chart svg { width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
  .dash-seg { fill: none; stroke-width: 14; stroke-dasharray: var(--len) 100; stroke-dashoffset: var(--off); cursor: pointer; transition: stroke-width 0.15s, opacity 0.15s; }
  .dash-donut.has-hot .dash-seg { opacity: 0.35; }
  .dash-donut.has-hot .dash-seg.is-hot { opacity: 1; stroke-width: 18; }
  .dash-scroll.is-intro .dash-seg { animation: dash-seg-in 0.8s cubic-bezier(0.16, 1, 0.3, 1) both; }
  @keyframes dash-seg-in { from { stroke-dasharray: 0 100; } to { stroke-dasharray: var(--len) 100; } }
  .dash-donut-center { position: absolute; inset: 0; display: flex; align-items: baseline; justify-content: center; gap: 1px; padding-top: 41px; pointer-events: none; }
  .dash-donut-center b { font-size: 1.25rem; font-weight: 800; letter-spacing: -0.03em; color: var(--color-text-strong); }
  .dash-donut-center span { font-size: 0.72rem; color: var(--color-text-muted); }
  .dash-legend { flex: 1; min-width: 0; margin: 0; padding: 0; list-style: none; }
  .dash-legend-row { display: grid; grid-template-columns: 8px minmax(0, 1fr) auto 30px; align-items: center; gap: 6px; width: 100%; min-height: 0; height: 22px; padding: 0 4px; border: none; border-radius: 6px; background: none; font-family: inherit; text-align: left; cursor: pointer; }
  .dash-legend-row.is-static { cursor: default; }
  .dash-legend-row i { width: 8px; height: 8px; border-radius: 2px; }
  .dash-legend-row:hover, .dash-legend-row.is-hot { background: var(--color-primary-tint); }
  .dash-legend-name { font-size: 0.78rem; color: var(--color-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .dash-legend-num { font-size: 0.78rem; font-weight: 700; color: var(--color-text-strong); font-variant-numeric: tabular-nums; }
  .dash-legend-pct { font-size: 0.7rem; color: var(--color-text-muted); text-align: right; font-variant-numeric: tabular-nums; }

  /* 서울에서의 거리: 막대 */
  .dash-bars { display: grid; grid-template-columns: repeat(6, 1fr); gap: 2px 6px; align-items: end; height: 94px; }
  .dash-bar { display: grid; grid-template-rows: auto 1fr auto; justify-items: center; height: 100%; min-width: 0; }
  .dash-bar-num { font-size: 0.72rem; font-weight: 700; color: var(--color-text-strong); font-variant-numeric: tabular-nums; }
  .dash-bar-fill { align-self: end; width: 100%; max-width: 30px; height: var(--h); min-height: 3px; border-radius: 4px 4px 0 0; background: var(--color-primary); transform-origin: bottom; transition: background 0.15s; }
  .dash-bar:hover .dash-bar-fill { background: var(--color-primary-deep); }
  .dash-bar-label { margin-top: 5px; padding-top: 4px; width: 100%; border-top: 1px solid var(--color-border); font-size: 0.64rem; color: var(--color-text-muted); text-align: center; white-space: nowrap; }
  .dash-scroll.is-intro .dash-bar-fill { animation: dash-bar-in 0.7s cubic-bezier(0.16, 1, 0.3, 1) both; }
  @keyframes dash-bar-in { from { transform: scaleY(0); } to { transform: none; } }

  /* 연수원이 많은 지역 */
  .dash-regions { padding: 10px 6px 4px; }
  .dash-head { display: flex; align-items: center; justify-content: space-between; padding: 0 8px; margin-bottom: 4px; }
  .dash-head .dash-title { margin: 0; }
  .dash-toggle { min-width: 0; min-height: 0; padding: 4px 6px; border: none; border-radius: 6px; background: none; font-family: inherit; font-size: 0.76rem; font-weight: 600; color: var(--color-primary); cursor: pointer; }
  .dash-toggle:hover { color: var(--color-primary-dark); }

  /* 동서남북 끝 연수원: 높이가 넉넉할 때만 */
  .dash-extremes { display: none; padding-left: 8px; padding-right: 8px; }
  .dash-extremes .dash-title { padding: 0 6px; }
  .dash-ext-grid { display: flex; flex-direction: column; gap: 2px; }
  .dash-ext { display: flex; align-items: center; gap: 8px; min-width: 0; min-height: 0; height: 30px; padding: 0 6px; border: none; border-radius: 8px; background: none; font-family: inherit; text-align: left; cursor: pointer; }
  .dash-ext:hover { background: var(--color-primary-tint); }
  .dash-ext-dir { flex-shrink: 0; width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--color-surface-2); font-size: 0.72rem; font-weight: 700; color: var(--color-text-secondary); }
  .dash-ext-name { flex: 1; min-width: 0; font-size: 0.8rem; font-weight: 600; color: var(--color-text-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .dash-ext-area { flex-shrink: 0; font-size: 0.7rem; color: var(--color-text-muted); }

  /* 문의하기 · 카피라이트: 칸 바닥에 고정 */
  .dash-foot { flex-shrink: 0; display: flex; flex-direction: column; align-items: stretch; gap: 6px; }
  .dash-contact { display: flex; align-items: center; justify-content: center; gap: 7px; height: 38px; min-height: 0; border: 1px solid var(--color-border); border-radius: 12px; background: var(--color-surface); color: var(--color-text-strong); font-size: 0.86rem; font-weight: 600; text-decoration: none; transition: border-color 0.15s, color 0.15s; }
  .dash-contact:hover { border-color: var(--color-primary); color: var(--color-primary-dark); text-decoration: none; }
  .dash-contact i { font-size: 0.8rem; color: var(--color-text-muted); }
  .dash-copy { margin: 0; font-size: 0.68rem; color: var(--color-text-subtle); text-align: center; white-space: nowrap; }
  .dash-copy a { min-height: 0; min-width: 0; color: inherit; text-decoration: none; }
  .dash-copy a:hover { color: var(--color-text-secondary); text-decoration: underline; }
}
@media (min-width: 1200px) and (min-height: 1080px) { .dash-extremes { display: block; } }
@media (prefers-reduced-motion: reduce) { .dash-scroll.is-intro .dash-seg, .dash-scroll.is-intro .dash-bar-fill { animation: none; } }
/* 헤더 검색: 1200px 미만에서는 가운데 고정 대신 로고와 메뉴 사이 남는 폭을 쓴다 (로그인 버튼과 겹치지 않게) */
@media (min-width: 768px) and (max-width: 1199px) {
  .header-search { position: relative; left: auto; top: auto; transform: none; flex: 1 1 0; min-width: 120px; max-width: 420px; width: auto; margin: 0 16px; }
  .main-header.is-wide nav { margin-left: auto; flex-shrink: 0; }
}

/* 홈: 오른쪽 블로그 글 칸은 지도 카드와 같은 높이로 늘이고, 줄이 그 높이를 고르게 나눠 쓴다 (빈 바닥 없음) */
@media (min-width: 1200px) {
  body.is-home .recent-posts { display: flex; flex-direction: column; align-self: stretch; height: min(100%, 900px); max-height: none; overflow: hidden; padding-bottom: 6px; }
  body.is-home .recent-posts[hidden] { display: none; }
  body.is-home .rp-list { flex: 1; min-height: 0; display: flex; flex-direction: column; }
  body.is-home .rp-item { flex: 1 0 auto; display: flex; }
  body.is-home .rp-main { justify-content: center; }
  .dash-toggle[hidden] { display: none; }
}
