/* ── 머물지도 styles.css ── */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;500;700;900&display=swap');

:root {
  --blue:       #2563EB;
  --blue-light: #EFF6FF;
  --blue-dark:  #1D4ED8;
  --green:      #10B981;
  --amber:      #F59E0B;
  --pink:       #EC4899;
  --purple:     #8B5CF6;
  --red:        #EF4444;
  --cyan:       #06B6D4;
  --indigo:     #6366F1;
  --bg:         #F8FAFF;
  --card:       #FFFFFF;
  --text:       #1E293B;
  --text2:      #64748B;
  --text3:      #94A3B8;
  --border:     #E2E8F0;
  --shadow:     0 2px 12px rgba(37,99,235,0.08);
  --shadow-lg:  0 8px 32px rgba(37,99,235,0.14);
  --radius:     16px;
  --radius-sm:  10px;
  --header-h:   60px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Noto Sans KR', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }
button { font-family: 'Noto Sans KR', sans-serif; }

/* ════════════════════════════════
   HEADER
════════════════════════════════ */
.header {
  background: linear-gradient(135deg, var(--blue-dark) 0%, #0EA5E9 100%);
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 2px 20px rgba(29,78,216,0.28);
  height: var(--header-h);
  width: 100%;
}
.header-inner {
  max-width: 1280px; margin: 0 auto;
  padding: 0 clamp(12px, 3vw, 24px);
  height: 100%; display: flex; align-items: center;
  justify-content: space-between; gap: 8px;
  width: 100%;
}
.logo { display: flex; align-items: center; gap: 8px; flex-shrink: 0; min-width: 0; }
.logo-icon {
  width: clamp(28px, 4vw, 36px);
  height: clamp(28px, 4vw, 36px);
  background: rgba(255,255,255,0.2);
  border-radius: 10px; display: flex; align-items: center;
  justify-content: center;
  font-size: clamp(14px, 2.5vw, 18px);
  flex-shrink: 0;
}
.logo-text {
  font-size: clamp(14px, 2.5vw, 18px);
  font-weight: 700; color: #fff; letter-spacing: -.3px;
  white-space: nowrap;
}
.logo-sub { font-size: 11px; color: rgba(255,255,255,.7); white-space: nowrap; }
.tab-nav { display: flex; gap: 2px; flex-shrink: 0; }
.tab-btn {
  background: none; border: none;
  color: rgba(255,255,255,.75);
  font-size: clamp(11px, 1.8vw, 13px);
  font-weight: 500;
  padding: clamp(6px, 1.2vw, 8px) clamp(8px, 1.5vw, 14px);
  border-radius: 8px; cursor: pointer;
  transition: all .2s; display: flex; align-items: center;
  gap: 4px; white-space: nowrap;
}
.tab-btn.active { background: rgba(255,255,255,.22); color: #fff; }
.tab-btn:hover  { background: rgba(255,255,255,.15); color: #fff; }

/* 아주 작은 화면에서만 탭 레이블 숨기기 */
@media (max-width: 360px) {
  .tab-label { display: none; }
  .tab-btn { padding: 6px 10px; }
}

/* ════════════════════════════════
   MAIN
════════════════════════════════ */
.main {
  flex: 1; max-width: 1280px; margin: 0 auto;
  width: 100%;
  padding: clamp(14px, 3vw, 24px) clamp(14px, 3vw, 24px) 40px;
}
.section { display: none; }
.section.active { display: block; }

/* ════════════════════════════════
   HERO
════════════════════════════════ */
.hero {
  background: linear-gradient(135deg, var(--blue-dark) 0%, #0EA5E9 100%);
  border-radius: clamp(16px, 3vw, 24px);
  padding: clamp(24px, 5vw, 44px) clamp(20px, 4vw, 40px);
  color: #fff;
  margin-bottom: clamp(16px, 3vw, 24px);
  position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; right: -40px; top: -40px;
  width: 220px; height: 220px; border-radius: 50%;
  background: rgba(255,255,255,.07);
}
.hero::after {
  content: ''; position: absolute; right: 80px; bottom: -60px;
  width: 160px; height: 160px; border-radius: 50%;
  background: rgba(255,255,255,.05);
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.18); padding: 5px 14px;
  border-radius: 99px; font-size: clamp(11px, 1.8vw, 12px);
  font-weight: 500; margin-bottom: 12px;
}
.hero h1 {
  font-size: clamp(20px, 4.5vw, 34px);
  font-weight: 900; line-height: 1.25;
  margin-bottom: 10px; letter-spacing: -.5px;
}
.hero p {
  font-size: clamp(13px, 2vw, 15px);
  opacity: .85; font-weight: 300; line-height: 1.7;
}
.hero-stats { display: flex; gap: clamp(16px, 3vw, 28px); margin-top: clamp(18px, 3vw, 26px); }
.hero-stat-num   { font-size: clamp(22px, 4vw, 28px); font-weight: 900; letter-spacing: -1px; }
.hero-stat-label { font-size: clamp(10px, 1.5vw, 11px); opacity: .75; margin-top: 2px; }

/* ════════════════════════════════
   DISTRICT BAR
════════════════════════════════ */
.district-bar {
  background: #fff; border-radius: var(--radius);
  padding: clamp(12px, 2vw, 14px) clamp(14px, 2.5vw, 20px);
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: clamp(16px, 3vw, 20px);
  box-shadow: var(--shadow); cursor: pointer; transition: box-shadow .2s;
}
.district-bar:hover { box-shadow: var(--shadow-lg); }
.district-bar-left { display: flex; align-items: center; gap: 12px; }
.district-icon {
  width: 38px; height: 38px; background: var(--blue-light);
  border-radius: 10px; display: flex; align-items: center;
  justify-content: center; font-size: 17px; flex-shrink: 0;
}
.district-bar-text label { font-size: 11px; color: var(--text2); display: block; margin-bottom: 2px; }
.district-name   { font-size: clamp(14px, 2.5vw, 16px); font-weight: 600; }
.district-change { font-size: 13px; color: var(--blue); font-weight: 500; white-space: nowrap; }

/* ════════════════════════════════
   SECTION TITLE
════════════════════════════════ */
.sec-title {
  font-size: clamp(13px, 2vw, 15px); font-weight: 700;
  display: flex; align-items: center; gap: 7px; margin-bottom: 12px;
}
.sec-title .icon { color: var(--blue); }

/* ════════════════════════════════
   AGE CHIPS
════════════════════════════════ */
.age-scroll {
  display: flex; gap: clamp(8px, 1.5vw, 10px); overflow-x: auto;
  padding-bottom: 4px; margin-bottom: clamp(16px, 3vw, 24px);
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.age-scroll::-webkit-scrollbar { display: none; }

.age-chip {
  display: flex; flex-direction: column; align-items: center;
  gap: clamp(5px, 1vw, 7px);
  padding: clamp(10px, 2vw, 14px) clamp(14px, 2.5vw, 18px);
  background: #fff; border: 2px solid var(--border);
  border-radius: var(--radius); cursor: pointer;
  transition: all .2s;
  min-width: clamp(68px, 12vw, 82px);
  flex-shrink: 0; box-shadow: var(--shadow);
}
.age-chip:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.age-chip.active {
  border-color: currentColor;
  background: color-mix(in srgb, currentColor 12%, white);
  box-shadow: 0 4px 16px color-mix(in srgb, currentColor 30%, transparent);
}
.age-chip-icon {
  width: clamp(36px, 6vw, 44px); height: clamp(36px, 6vw, 44px);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: clamp(18px, 3vw, 22px);
  background: color-mix(in srgb, currentColor 10%, white);
  transition: background .2s;
}
.age-chip.active .age-chip-icon { background: color-mix(in srgb, currentColor 22%, white); }
.age-chip-label { font-size: clamp(11px, 1.8vw, 12px); font-weight: 700; color: var(--text); }
.age-chip.active .age-chip-label { color: currentColor; }
.age-chip-count { font-size: clamp(10px, 1.5vw, 11px); color: var(--text2); }

/* ════════════════════════════════
   CATEGORY GRID
════════════════════════════════ */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(clamp(80px, 14vw, 100px), 1fr));
  gap: clamp(8px, 1.5vw, 10px); margin-bottom: clamp(16px, 3vw, 24px);
}
.cat-card {
  background: #fff; border: 2px solid transparent;
  border-radius: var(--radius); padding: clamp(12px, 2vw, 16px) 8px;
  text-align: center; cursor: pointer; transition: all .2s;
  box-shadow: var(--shadow); --cat-color: #94A3B8;
}
.cat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.cat-card.active {
  border-color: var(--cat-color);
  background: color-mix(in srgb, var(--cat-color) 8%, white);
}
.cat-icon {
  width: clamp(36px, 6vw, 42px); height: clamp(36px, 6vw, 42px);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: clamp(16px, 2.5vw, 19px); margin: 0 auto 8px;
  background: color-mix(in srgb, var(--cat-color) 12%, white);
  transition: background .2s;
}
.cat-card.active .cat-icon { background: color-mix(in srgb, var(--cat-color) 22%, white); }
.cat-name  { font-size: clamp(10px, 1.5vw, 11px); font-weight: 600; margin-bottom: 3px; }
.cat-count { font-size: clamp(12px, 2vw, 13px); font-weight: 700; color: var(--cat-color); }

/* ════════════════════════════════
   PLACE CARDS
════════════════════════════════ */
.places-header {
  display: flex; align-items: center;
  justify-content: space-between; margin-bottom: 14px;
}
.places-count { font-size: 13px; color: var(--text2); font-weight: 500; }
.places-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: clamp(10px, 2vw, 14px);
}
.place-card {
  background: #fff; border-radius: var(--radius);
  padding: clamp(12px, 2vw, 16px); box-shadow: var(--shadow);
  cursor: pointer; transition: all .2s;
  border: 1px solid var(--border); position: relative;
}
.place-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: transparent; }
.place-card-top {
  display: flex; align-items: flex-start;
  gap: 12px; margin-bottom: 12px;
  padding-right: 36px;
}
.place-cat-icon {
  width: clamp(38px, 6vw, 44px); height: clamp(38px, 6vw, 44px);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: clamp(18px, 3vw, 20px); flex-shrink: 0;
}
.place-info { flex: 1; min-width: 0; }
.place-name {
  font-size: clamp(13px, 2.2vw, 15px); font-weight: 600; margin-bottom: 6px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.place-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.age-tag {
  font-size: clamp(9px, 1.5vw, 10px); font-weight: 600;
  padding: 2px 8px; border-radius: 99px;
}
.fav-btn {
  background: none; border: none; cursor: pointer;
  font-size: clamp(16px, 2.5vw, 18px); padding: 4px;
  transition: transform .15s;
  position: absolute; top: 10px; right: 10px; z-index: 2;
}
.fav-btn:hover { transform: scale(1.2); }
.place-card-bottom {
  border-top: 1px solid var(--border); padding-top: 10px;
  display: flex; flex-direction: column; gap: 5px;
}
.place-row { display: flex; align-items: center; gap: 6px; font-size: clamp(11px, 1.8vw, 12px); color: var(--text2); }
.place-row-icon  { font-size: 13px; flex-shrink: 0; }
.place-row-text  { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nearby-badge-row { margin-top: 4px; }
.nearby-badge {
  display: inline-flex; align-items: center; gap: 3px;
  background: var(--green); color: #fff;
  font-size: 10px; font-weight: 700;
  padding: 3px 8px; border-radius: 99px;
  box-shadow: 0 1px 4px rgba(16,185,129,0.3);
}

/* ════════════════════════════════
   SEARCH
════════════════════════════════ */
.search-wrap {
  background: #fff; border-radius: var(--radius);
  display: flex; align-items: center; gap: 10px;
  padding: 0 clamp(12px, 2vw, 16px);
  margin-bottom: 14px; border: 1.5px solid var(--border);
  transition: border-color .2s; box-shadow: var(--shadow);
}
.search-wrap:focus-within { border-color: var(--blue); }
.search-wrap input {
  flex: 1; border: none; outline: none;
  font-size: clamp(13px, 2vw, 14px);
  padding: clamp(12px, 2vw, 14px) 0;
  background: transparent;
  font-family: 'Noto Sans KR', sans-serif; color: var(--text);
}
.search-wrap input::placeholder { color: var(--text3); }
.search-icon { color: var(--text3); font-size: 16px; flex-shrink: 0; }
.clear-btn {
  background: none; border: none; cursor: pointer;
  color: var(--text3); font-size: 16px; padding: 4px; display: none; flex-shrink: 0;
}

/* ════════════════════════════════
   CAT FILTER ROW
════════════════════════════════ */
.cat-filter-row {
  display: flex; gap: 7px; overflow-x: auto;
  padding-bottom: 6px; margin-bottom: 14px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.cat-filter-row::-webkit-scrollbar { display: none; }
.filter-chip {
  display: flex; align-items: center; gap: 5px;
  padding: clamp(6px, 1.2vw, 7px) clamp(10px, 2vw, 14px);
  border-radius: 99px; border: 1.5px solid var(--border); background: #fff;
  font-size: clamp(11px, 1.8vw, 12px); font-weight: 500; cursor: pointer;
  white-space: nowrap; transition: all .15s; flex-shrink: 0;
}
.filter-chip.active {
  color: #fff;
  border-color: var(--chip-color, var(--blue));
  background: var(--chip-color, var(--blue));
}

/* ════════════════════════════════
   MAP
════════════════════════════════ */
#naver-map, #kakao-map {
  width: 100%;
  height: clamp(320px, 55vw, 580px);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg); overflow: hidden;
}
.map-placeholder {
  width: 100%;
  height: clamp(320px, 55vw, 580px);
  border-radius: var(--radius);
  background: linear-gradient(135deg, #EFF6FF, #E0F2FE);
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 14px; color: var(--text2);
  padding: 20px;
}
.map-placeholder-icon { font-size: clamp(36px, 6vw, 52px); opacity: .45; }
.map-api-notice {
  background: #FEF3C7; border: 1px solid #FDE68A;
  border-radius: 12px; padding: 14px 18px;
  font-size: clamp(12px, 1.8vw, 13px); color: #92400E; line-height: 1.7;
  margin-top: 10px; max-width: 420px; text-align: center;
}
.map-filter-bar {
  display: flex; gap: 7px; overflow-x: auto;
  padding-bottom: 6px; margin-bottom: 14px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.map-filter-bar::-webkit-scrollbar { display: none; }
.nearby-section { margin-top: 28px; }

/* ════════════════════════════════
   MODALS — 반응형
   모바일: 바텀시트 / 태블릿·PC: 가운데 팝업
════════════════════════════════ */

/* 공통 오버레이 */
.overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 200; display: none;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.overlay.active { display: flex; }

/* ── 모바일: 바텀시트 ── */
.overlay {
  align-items: flex-end;
  justify-content: center;
}
.modal {
  background: #fff;
  border-radius: 24px 24px 0 0;
  width: 100%; max-width: 680px;
  /* dvh: 브라우저 UI 제외한 실제 보이는 높이 기준 */
  max-height: 85dvh;
  max-height: 85svh; /* 구형 브라우저 fallback */
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slideUp .32s cubic-bezier(.32,1,.24,1);
}

/* 모달 스크롤 영역 */
.modal-scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding-bottom: env(safe-area-inset-bottom, 16px);
}

/* 길찾기 버튼 하단 고정 */
.modal-footer {
  padding: 12px 24px;
  padding-bottom: max(env(safe-area-inset-bottom, 12px), 12px);
  background: #fff;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
@keyframes slideUp {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
@keyframes popIn {
  from { transform: scale(.94) translateY(8px); opacity: 0; }
  to   { transform: scale(1)   translateY(0);   opacity: 1; }
}

.modal-handle {
  width: 40px; height: 4px; background: var(--border);
  border-radius: 99px; margin: 12px auto 0;
}

/* ── 태블릿·PC: 가운데 팝업 ── */
@media (min-width: 601px) {
  .overlay {
    align-items: center;
    justify-content: center;
    padding: 24px;
  }
  .modal {
    border-radius: 24px;
    width: 100%; max-width: 560px;
    max-height: min(85dvh, 85vh);
    animation: popIn .28s cubic-bezier(.32,1,.24,1);
    box-shadow: 0 24px 64px rgba(0,0,0,.22);
  }
  .modal-handle { display: none; }

  /* 하단 고정 버튼 PC에서는 radius 추가 */
  .modal-footer {
    border-radius: 0 0 24px 24px;
  }

  /* 구 선택 모달 */
  #dist-overlay .modal { max-width: 480px; }

  /* 정책 모달 */
  .policy-modal {
    border-radius: 24px;
  }
}

.modal-head {
  padding: clamp(14px, 2.5vw, 18px) clamp(16px, 3vw, 24px) 0;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; background: #fff; z-index: 1;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.modal-title { font-size: clamp(15px, 2.5vw, 18px); font-weight: 700; }
.modal-close {
  background: var(--bg); border: none;
  width: 32px; height: 32px; border-radius: 50%;
  cursor: pointer; font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s; flex-shrink: 0;
}
.modal-close:hover { background: var(--border); }
.modal-body {
  padding: clamp(12px, 2.5vw, 16px) clamp(16px, 3vw, 24px) 0;
  user-select: text;
  -webkit-user-select: text;
}

/* district modal */
.dist-search {
  background: var(--bg); border-radius: var(--radius-sm);
  padding: 0 14px; display: flex; align-items: center; gap: 8px;
  margin-bottom: 12px; border: 1px solid var(--border);
}
.dist-search input {
  flex: 1; border: none; outline: none; padding: 12px 0;
  font-size: 14px; background: transparent;
  font-family: 'Noto Sans KR', sans-serif;
}
.dist-all-btn {
  width: 100%; background: var(--blue-light);
  border: 2px solid transparent; border-radius: var(--radius-sm);
  padding: 14px 16px; display: flex; align-items: center; gap: 10px;
  cursor: pointer; margin-bottom: 8px; transition: all .15s;
  font-size: clamp(13px, 2vw, 15px); font-weight: 600;
}
.dist-all-btn.active { background: var(--blue); color: #fff; }
.dist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100px, 30%), 1fr));
  gap: 6px; max-height: 380px; overflow-y: auto;
}
.dist-item {
  padding: clamp(10px, 1.8vw, 12px) 8px;
  border-radius: var(--radius-sm);
  background: var(--bg); border: 1.5px solid var(--border);
  cursor: pointer; font-size: clamp(12px, 1.8vw, 13px); font-weight: 500;
  text-align: center; transition: all .15s;
}
.dist-item:hover { border-color: var(--blue); color: var(--blue); }
.dist-item.active { background: var(--blue); border-color: var(--blue); color: #fff; }

/* detail modal */
.detail-hero {
  border-radius: 18px; padding: clamp(20px, 3vw, 26px) clamp(16px, 3vw, 22px);
  color: #fff; margin-bottom: 14px; position: relative; overflow: hidden;
}
.detail-hero::before {
  content: ''; position: absolute; right: -16px; top: -16px;
  width: 100px; height: 100px; border-radius: 50%;
  background: rgba(255,255,255,.1);
}
.detail-cat-badge {
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(255,255,255,.2); padding: 4px 10px;
  border-radius: 99px; font-size: 12px; font-weight: 500; margin-bottom: 9px;
}
.detail-name { font-size: clamp(18px, 3.5vw, 22px); font-weight: 700; margin-bottom: 10px; letter-spacing: -.3px; }
.detail-age-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.detail-age-tag {
  background: rgba(255,255,255,.25); padding: 3px 10px;
  border-radius: 99px; font-size: 11px; font-weight: 500;
}
.detail-info-card {
  background: var(--bg); border-radius: var(--radius);
  overflow: hidden; margin-bottom: 12px;
}
.detail-row {
  display: flex; align-items: center; gap: 12px;
  padding: clamp(11px, 2vw, 13px) clamp(14px, 2.5vw, 16px);
  border-bottom: 1px solid var(--border); font-size: clamp(13px, 2vw, 14px);
}
.detail-row:last-child { border-bottom: none; }
.detail-row-icon { font-size: 20px; width: 28px; text-align: center; flex-shrink: 0; }
.detail-row-content { flex: 1; min-width: 0; }
.detail-row-label { font-size: 11px; color: var(--text3); margin-bottom: 2px; }
.detail-row-value { font-weight: 500; word-break: keep-all; }
.copy-btn, .call-btn {
  background: none; border: none; cursor: pointer;
  font-size: 16px; padding: 6px; border-radius: 8px;
  transition: background .15s; flex-shrink: 0;
}
.copy-btn:hover, .call-btn:hover { background: var(--border); }
.free-box {
  background: #F0FDF4; border: 1px solid #BBF7D0;
  border-radius: var(--radius); padding: 13px 16px;
  display: flex; align-items: center; gap: 12px; margin-bottom: 12px;
}
.free-badge {
  background: var(--green); color: #fff;
  font-size: 11px; font-weight: 700; padding: 3px 9px;
  border-radius: 6px; flex-shrink: 0;
}
.free-text { font-size: clamp(13px, 2vw, 14px); color: #065F46; font-weight: 500; }
.map-action-btn {
  width: 100%; background: var(--blue); color: #fff;
  border: none; border-radius: var(--radius);
  padding: clamp(13px, 2.5vw, 15px);
  font-size: clamp(14px, 2.2vw, 15px); font-weight: 600; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: background .2s; margin-bottom: 8px;
}
.map-action-btn:hover { background: var(--blue-dark); }

/* policy modal */
.policy-modal {
  border-radius: 24px;
  background: #fff; border-radius: 24px;
  width: 100%; max-width: 720px; max-height: 90vh;
  overflow-y: auto; padding: 0 0 40px;
  animation: slideUp .3s ease;
  user-select: text;
  -webkit-user-select: text; 
}
.policy-content { padding: 0 clamp(16px, 3vw, 28px); }
.policy-content h2 {
  font-size: clamp(14px, 2.2vw, 16px); font-weight: 700; color: var(--text);
  margin: 24px 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--border);
}
.policy-content p {
  font-size: clamp(12px, 1.8vw, 13px); color: var(--text2); line-height: 1.8; margin-bottom: 8px;
}
.policy-content ul { padding-left: 18px; margin-bottom: 8px; }
.policy-content ul li { font-size: clamp(12px, 1.8vw, 13px); color: var(--text2); line-height: 1.8; }

/* ════════════════════════════════
   EMPTY / LOADING
════════════════════════════════ */
.empty { text-align: center; padding: clamp(40px, 8vw, 60px) 20px; color: var(--text2); }
.empty-icon  { font-size: clamp(40px, 8vw, 54px); opacity: .4; margin-bottom: 14px; }
.empty-title { font-size: clamp(15px, 2.5vw, 17px); font-weight: 600; margin-bottom: 7px; color: var(--text); }
.empty-desc  { font-size: clamp(13px, 2vw, 14px); line-height: 1.6; }
.loading {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 60px 20px; gap: 14px; color: var(--text2);
}
.spinner {
  width: 38px; height: 38px;
  border: 3px solid var(--border); border-top-color: var(--blue);
  border-radius: 50%; animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ════════════════════════════════
   TOAST
════════════════════════════════ */
.toast {
  position: fixed; bottom: clamp(16px, 4vw, 28px); left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: #1E293B; color: #fff;
  padding: 12px 22px; border-radius: 99px;
  font-size: clamp(12px, 1.8vw, 13px); font-weight: 500;
  z-index: 300; transition: transform .3s ease; white-space: nowrap;
  box-shadow: 0 4px 20px rgba(0,0,0,.25);
}
.toast.show { transform: translateX(-50%) translateY(0); }

/* ════════════════════════════════
   SEE MORE
════════════════════════════════ */
.see-more-btn {
  display: block; width: fit-content; margin: 18px auto 0;
  background: var(--blue-light); color: var(--blue);
  border: none; padding: clamp(10px, 2vw, 12px) clamp(20px, 4vw, 28px);
  border-radius: 99px; font-size: clamp(13px, 2vw, 14px); font-weight: 600;
  cursor: pointer; transition: background .2s;
}
.see-more-btn:hover { background: #DBEAFE; }

/* ════════════════════════════════
   FOOTER
════════════════════════════════ */
footer { background: #0F172A; color: #94A3B8; margin-top: auto; }

.footer-top {
  max-width: 1280px; margin: 0 auto;
  padding: clamp(32px, 5vw, 52px) clamp(16px, 3vw, 24px) clamp(28px, 4vw, 40px);
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr 1.6fr;
  gap: clamp(24px, 4vw, 44px);
}

.footer-brand .brand-logo {
  display: flex; align-items: center; gap: 10px; margin-bottom: 14px;
}
.footer-brand .brand-logo .logo-icon { background: rgba(255,255,255,.08); }
.footer-brand .brand-logo .logo-text { color: #fff; font-size: 17px; }
.footer-brand p {
  font-size: clamp(12px, 1.8vw, 13px); line-height: 1.8;
  color: #64748B; max-width: 260px;
}
.footer-badges { display: flex; gap: 8px; margin-top: 18px; flex-wrap: wrap; }
.footer-badge {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px; padding: 5px 11px;
  font-size: 11px; font-weight: 500; color: #94A3B8;
}

.footer-col h4 {
  color: #fff; font-size: 13px; font-weight: 700;
  margin-bottom: 16px; letter-spacing: .3px;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col ul li a {
  font-size: clamp(12px, 1.8vw, 13px); color: #64748B;
  transition: color .15s; cursor: pointer;
}
.footer-col ul li a:hover { color: #fff; }

.footer-contact h4 {
  color: #fff; font-size: 13px; font-weight: 700;
  margin-bottom: 16px; letter-spacing: .3px;
}
.contact-form { display: flex; flex-direction: column; gap: 10px; }
.contact-form input,
.contact-form textarea {
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px; padding: 10px 14px;
  font-size: 13px; color: #fff;
  font-family: 'Noto Sans KR', sans-serif;
  outline: none; transition: border-color .2s; resize: none;
}
.contact-form input::placeholder,
.contact-form textarea::placeholder { color: #475569; }
.contact-form input:focus,
.contact-form textarea:focus { border-color: var(--blue); }
.contact-submit {
  background: var(--blue); color: #fff; border: none;
  border-radius: 10px; padding: 11px 20px;
  font-size: 13px; font-weight: 600; cursor: pointer;
  transition: background .2s; align-self: flex-end;
  font-family: 'Noto Sans KR', sans-serif;
}
.contact-submit:hover { background: var(--blue-dark); }

.footer-divider { border-color: rgba(255,255,255,.06); margin: 0; }
.footer-bottom {
  max-width: 1280px; margin: 0 auto;
  padding: clamp(14px, 2vw, 20px) clamp(16px, 3vw, 24px);
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 10px;
}
.footer-bottom-left { font-size: 12px; color: #334155; line-height: 1.6; }
.footer-bottom-left strong { color: #64748B; }
.footer-bottom-right { display: flex; gap: 16px; }
.footer-bottom-right a {
  font-size: 12px; color: #334155; transition: color .15s; cursor: pointer;
}
.footer-bottom-right a:hover { color: #94A3B8; }

/* ════════════════════════════════
   RESPONSIVE BREAKPOINTS
════════════════════════════════ */

/* 태블릿 */
@media (max-width: 900px) {
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-contact { grid-column: 1 / -1; }
}

/* 모바일 */
@media (max-width: 600px) {
  .footer-top { grid-template-columns: 1fr; }
  .footer-brand { grid-column: auto; }
  .footer-contact { grid-column: auto; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 8px; }
  .logo-sub { display: none; }
  .dist-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 400px) {
  .dist-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-stats { gap: 10px; }
}

/* ════════════════════════════════
   ONBOARDING
════════════════════════════════ */
.onboarding-overlay {
  position: fixed; inset: 0;
  background: rgba(15,23,42,0.7);
  z-index: 500;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.onboarding-overlay.hidden { display: none; }

.onboarding-box {
  background: #fff;
  border-radius: 24px;
  width: 100%; max-width: 420px;
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(0,0,0,0.25);
  animation: popIn .35s cubic-bezier(.32,1,.24,1);
}

.ob-step { display: none; padding: 0 0 24px; }
.ob-step.active { display: block; }

.ob-header {
  padding: 20px 24px 0;
  background: linear-gradient(135deg, var(--blue-dark) 0%, #0EA5E9 100%);
}
.ob-progress {
  height: 3px; background: rgba(255,255,255,0.25);
  border-radius: 99px; margin-bottom: 10px; overflow: hidden;
}
.ob-progress-fill {
  display: block; height: 100%;
  background: #fff; border-radius: 99px;
  transition: width .4s ease;
}
.ob-step-label { font-size: 11px; color: rgba(255,255,255,0.7); padding-bottom: 12px; }

.ob-question {
  font-size: clamp(20px, 5vw, 24px); font-weight: 700;
  color: #fff; line-height: 1.35;
  padding: 16px 24px 24px;
  background: linear-gradient(135deg, var(--blue-dark) 0%, #0EA5E9 100%);
}

/* 2x2 그리드 */
.ob-grid-2 {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 10px; padding: 20px 20px 0;
}
.ob-card {
  border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: 16px 12px;
  text-align: center; cursor: pointer; transition: all .2s;
  background: #fff;
}
.ob-card:hover { border-color: var(--blue); transform: translateY(-2px); }
.ob-card.selected {
  border-color: var(--blue);
  background: var(--blue-light);
}
.ob-icon {
  width: 48px; height: 48px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; margin: 0 auto 10px;
}
.ob-card-title { font-size: 13px; font-weight: 700; color: var(--text); }
.ob-card-sub   { font-size: 11px; color: var(--text2); margin-top: 3px; }

/* 리스트 형식 */
.ob-list { padding: 20px 20px 0; display: flex; flex-direction: column; gap: 10px; }
.ob-list-item {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px; border: 1.5px solid var(--border);
  border-radius: var(--radius); cursor: pointer; transition: all .2s;
  background: #fff;
}
.ob-list-item:hover { border-color: var(--blue); }
.ob-list-item.selected { border-color: var(--blue); background: var(--blue-light); }
.ob-list-icon { font-size: 22px; flex-shrink: 0; }
.ob-list-title { font-size: 14px; font-weight: 600; color: var(--text); }
.ob-list-sub   { font-size: 12px; color: var(--text2); margin-top: 2px; }

/* 버튼 영역 */
.ob-actions {
  display: flex; gap: 10px;
  padding: 20px 20px 0;
}
.ob-back {
  flex: 1; background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 13px;
  font-size: 14px; cursor: pointer; color: var(--text2);
  font-family: 'Noto Sans KR', sans-serif;
}
.ob-skip {
  flex: 1; background: none; border: none;
  font-size: 13px; color: var(--text3); cursor: pointer;
  font-family: 'Noto Sans KR', sans-serif;
}
.ob-next {
  flex: 2; background: var(--blue); color: #fff;
  border: none; border-radius: var(--radius-sm); padding: 13px;
  font-size: 14px; font-weight: 600; cursor: pointer;
  font-family: 'Noto Sans KR', sans-serif; transition: all .2s;
}
.ob-next:disabled {
  background: var(--border); color: var(--text3); cursor: not-allowed;
}
.ob-next:not(:disabled):hover { background: var(--blue-dark); }
.ob-finish { background: linear-gradient(135deg, var(--blue-dark), #0EA5E9); }

/* ════════════════════════════════
   RECOMMEND SECTION (온보딩 결과)
════════════════════════════════ */
.recommend-section {
  margin-bottom: 28px;
}
.recommend-header {
  background: linear-gradient(135deg, var(--blue-dark), #0EA5E9);
  border-radius: var(--radius);
  padding: 20px 22px;
  color: #fff;
  margin-bottom: 16px;
  display: flex; align-items: center; justify-content: space-between;
}
.recommend-header-left h2 {
  font-size: 18px; font-weight: 700; margin-bottom: 4px;
}
.recommend-header-left p {
  font-size: 12px; opacity: .8;
}
.recommend-reset-btn {
  background: rgba(255,255,255,0.2); border: none; color: #fff;
  border-radius: 99px; padding: 7px 14px; font-size: 12px;
  font-weight: 600; cursor: pointer; white-space: nowrap;
  font-family: 'Noto Sans KR', sans-serif; flex-shrink: 0;
}
.recommend-reset-btn:hover { background: rgba(255,255,255,0.3); }

/* ════════════════════════════════
   PROGRAM BADGE (문화행사 연동)
════════════════════════════════ */
.program-badge {
  display: inline-flex; align-items: center; gap: 4px;
  background: #FFF7ED; color: #C2410C;
  font-size: 10px; font-weight: 700;
  padding: 2px 8px; border-radius: 99px;
  border: 1px solid #FED7AA;
  margin-top: 4px;
}

/* 상세 모달 탭 */
.detail-tabs {
  display: flex; gap: 0;
  border-bottom: 1.5px solid var(--border);
  margin: 0 0 16px;
}
.detail-tab {
  flex: 1; padding: 12px 8px;
  text-align: center; font-size: 13px; font-weight: 500;
  color: var(--text2); cursor: pointer; border: none;
  background: none; font-family: 'Noto Sans KR', sans-serif;
  border-bottom: 2px solid transparent; margin-bottom: -1.5px;
  transition: all .15s;
}
.detail-tab.active { color: var(--blue); border-bottom-color: var(--blue); }

.detail-tab-content { display: none; }
.detail-tab-content.active { display: block; }

/* 프로그램 카드 */
.program-card {
  background: var(--bg); border-radius: var(--radius-sm);
  padding: 14px 16px; margin-bottom: 10px;
  border-left: 3px solid var(--amber);
}
.program-card-title { font-size: 14px; font-weight: 600; margin-bottom: 5px; }
.program-card-info  { font-size: 12px; color: var(--text2); display: flex; flex-direction: column; gap: 3px; }
.program-free-badge {
  display: inline-flex; align-items: center;
  background: #ECFDF5; color: #065F46;
  font-size: 10px; font-weight: 700;
  padding: 2px 7px; border-radius: 99px; margin-top: 6px;
}

/* ════════════════════════════════
   TODAY SECTION
════════════════════════════════ */
.today-section {
  margin-bottom: 28px;
}
.today-header {
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(135deg, #0F172A, #1E293B);
  border-radius: var(--radius); padding: 20px 22px;
  margin-bottom: 16px; color: #fff;
}
.today-label { font-size: 17px; font-weight: 700; margin-bottom: 4px; }
.today-desc  { font-size: 12px; opacity: .75; }
.today-emoji { font-size: 36px; opacity: .9; }

/* ════════════════════════════════
   감정 필터 섹션 (v11 신규)
════════════════════════════════ */
.emotion-chips-row {
  display: flex; gap: 8px; overflow-x: auto;
  padding-bottom: 4px; margin-bottom: clamp(16px, 3vw, 24px);
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.emotion-chips-row::-webkit-scrollbar { display: none; }

.emotion-chip {
  display: flex; align-items: center; gap: 6px;
  padding: clamp(8px, 1.5vw, 10px) clamp(12px, 2vw, 16px);
  border-radius: 99px;
  border: 1.5px solid var(--border);
  background: #fff;
  font-family: 'Noto Sans KR', sans-serif;
  font-size: clamp(12px, 1.8vw, 13px);
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all .2s;
  color: var(--text2);
}
.emotion-chip:hover {
  border-color: var(--blue);
  color: var(--blue);
  background: var(--blue-light);
  transform: translateY(-1px);
}
.emotion-chip.active {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
  box-shadow: 0 4px 12px rgba(37,99,235,0.3);
}
.emotion-chip.emotion-clear {
  background: var(--bg);
  border-color: var(--border);
  color: var(--text3);
  font-size: 11px;
}
.emotion-chip.emotion-clear:hover {
  background: #FEE2E2;
  border-color: #FCA5A5;
  color: #EF4444;
}
.emotion-emoji { font-size: 15px; }
.emotion-label { font-size: clamp(11px, 1.8vw, 13px); }

/* ════════════════════════════════
   생활형 태그 (v11 신규)
════════════════════════════════ */
.life-tags-row {
  display: flex; flex-wrap: wrap; gap: 5px;
  margin: 8px 0 4px;
}
.life-tag {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: clamp(9px, 1.4vw, 11px); font-weight: 500;
  padding: 3px 8px; border-radius: 6px;
  background: #F1F5F9; color: #475569;
  border: 1px solid #E2E8F0;
  white-space: nowrap;
}
.life-tag-lg {
  font-size: clamp(11px, 1.6vw, 12px);
  padding: 5px 11px;
  border-radius: 8px;
}

/* ════════════════════════════════
   추천 이유 (v11 신규)
════════════════════════════════ */
.place-reason {
  font-size: clamp(11px, 1.6vw, 12px);
  color: #64748B;
  font-style: italic;
  margin: 6px 0 2px;
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* ════════════════════════════════
   혼잡도 배지 (v11 신규)
════════════════════════════════ */
.congestion-badge {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: clamp(9px, 1.4vw, 10px); font-weight: 700;
  padding: 3px 8px; border-radius: 6px;
}

.place-card-footer-row {
  display: flex; align-items: center; gap: 6px;
  flex-wrap: wrap; margin-top: 4px;
}
.place-card-footer-row .nearby-badge {
  /* inherit existing */
}

/* ════════════════════════════════
   상세 모달 — 이유/태그 (v11 신규)
════════════════════════════════ */
.detail-reason-box {
  background: linear-gradient(135deg, #F0F9FF, #E0F2FE);
  border: 1px solid #BAE6FD;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 12px;
  font-size: clamp(13px, 2vw, 14px);
  color: #0369A1;
  font-style: italic;
  font-weight: 500;
  line-height: 1.6;
}

.detail-life-tags {
  display: flex; flex-wrap: wrap; gap: 7px;
  margin-bottom: 14px;
}

/* ════════════════════════════════
   카드 hover 강화 (v11)
════════════════════════════════ */
.place-card {
  border: 1.5px solid var(--border);
}
.place-card:hover {
  border-color: var(--blue);
}

/* 온보딩 감성 강화 */
.ob-finish {
  background: linear-gradient(135deg, #7C3AED, #2563EB) !important;
}

/* ════════════════════════════════
   히어로 태그라인 (v11)
════════════════════════════════ */
.hero-tagline {
  margin-top: clamp(12px, 2vw, 18px);
  font-size: clamp(11px, 1.8vw, 13px);
  opacity: .7;
  font-weight: 300;
  letter-spacing: 0.3px;
}

/* ── 지도 wrap position (구 초기화 버튼 absolute 위치용) */
#map-wrap {
  position: relative;
}

/* ── 탭 스와이프 트랜지션 */
.section {
  transition: opacity 0.15s ease;
}
.section:not(.active) {
  pointer-events: none;
}

/* ── 클러스터 미니 팝업 스크롤바 */
#cluster-mini-popup::-webkit-scrollbar { width: 4px; }
#cluster-mini-popup::-webkit-scrollbar-thumb { background: #E2E8F0; border-radius: 4px; }

/* 더보기 버튼 스타일 */
.load-more-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; margin: 16px 0 8px;
  padding: 14px 20px; border-radius: 12px;
  background: #fff; border: 1.5px solid var(--border);
  font-size: 15px; font-weight: 600; color: var(--blue);
  cursor: pointer; transition: all .2s;
  font-family: 'Noto Sans KR', sans-serif;
}
.load-more-btn:hover {
  background: var(--blue-light); border-color: var(--blue);
}
.load-more-count {
  font-size: 12px; font-weight: 500; color: var(--text2);
  background: var(--bg); padding: 2px 8px; border-radius: 99px;
}
.list-end-msg {
  text-align: center; padding: 16px;
  font-size: 13px; color: var(--text3); font-weight: 500;
}

.personal-recommend-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 18px 24px;
  margin-bottom: clamp(16px, 3vw, 24px);
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--blue-dark), #0EA5E9);
  color: #fff;
  border: none;
  cursor: pointer;
  font-family: 'Noto Sans KR', sans-serif;
  font-size: clamp(15px, 2.5vw, 17px);
  font-weight: 700;
  gap: 4px;
  transition: opacity .2s;
  box-shadow: 0 4px 16px rgba(37,99,235,0.3);
}
.personal-recommend-btn:hover { opacity: .9; }
.personal-recommend-sub {
  font-size: 12px;
  font-weight: 400;
  opacity: .8;
}

body.modal-open {
  overflow: hidden;
}