/* ── 디자인 토큰 ─────────────────────────────────────────────────────────── */
:root {
  --bg:           #faf9f5;
  --surface:      #ffffff;
  --text:         #1a1a1a;
  --muted:        #6b7280;
  --border:       #e5e7eb;
  --primary:      #2f6f4e;
  --primary-dk:   #1f5038;
  --primary-lt:   #d1fae5;
  --accent:       #f59e0b;
  --danger:       #dc2626;
  --radius:       10px;
  --shadow:       0 2px 8px rgba(0,0,0,.07);
  --max-w:        1100px;
}

/* ── 리셋 ────────────────────────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
body {
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Apple SD Gothic Neo",
               "Noto Sans KR", sans-serif;
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ── 컨테이너 ────────────────────────────────────────────────────────────── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 16px;
}

/* ── 헤더 ────────────────────────────────────────────────────────────────── */
.site-header {
  background: var(--primary);
  color: #fff;
  padding: 14px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.site-header .container {
  display: flex;
  align-items: center;
  gap: 20px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.logo-mark {
  width: 36px; height: 36px;
  background: rgba(255,255,255,.2);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: -.5px;
}
.logo-text {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -.3px;
}
.site-tagline {
  font-size: 13px;
  color: rgba(255,255,255,.75);
  margin-left: auto;
  text-align: right;
}
@media (max-width: 600px) { .site-tagline { display: none; } }

/* ── 히어로 ──────────────────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, #1f5038 0%, #2f6f4e 55%, #3d8f64 100%);
  color: #fff;
  padding: 56px 0 48px;
  text-align: center;
}
.hero-title {
  font-size: clamp(26px, 5vw, 40px);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -.5px;
  margin-bottom: 12px;
}
.hero-sub {
  font-size: 15px;
  color: rgba(255,255,255,.8);
}

/* ── 컨셉 섹션 ───────────────────────────────────────────────────────────── */
.concept-section {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 28px 0 20px;
}
.concept-lead {
  font-size: 15px;
  color: var(--muted);
  text-align: center;
  margin-bottom: 20px;
  line-height: 1.6;
}
.concept-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.concept-flow-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 20px;
  border-radius: 12px;
  text-align: center;
  width: 160px;
  user-select: none;
}
.concept-flow-card--from {
  background: #f3f4f6;
  border: 1.5px solid #d1d5db;
  color: #6b7280;
}
.concept-flow-card--to {
  background: var(--primary-lt);
  border: 2px solid var(--primary);
  color: var(--primary-dk);
}
.concept-flow-icon { font-size: 32px; }
.concept-flow-title { font-size: 14px; font-weight: 700; }
.concept-flow-desc { font-size: 12px; opacity: .8; line-height: 1.45; margin: 0; }
.concept-flow-arrow { font-size: 24px; color: var(--muted); font-weight: 700; }

/* ── 쉼 유형 필터 바 ─────────────────────────────────────────────────────── */
.rest-type-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}
.rest-type-btn {
  height: 36px;
  padding: 0 14px;
  border: 1.5px solid var(--border);
  border-radius: 99px;
  background: var(--surface);
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
}
.rest-type-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.rest-type-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* ── 피로도 바 ───────────────────────────────────────────────────────────── */
.fatigue-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.fatigue-label {
  font-size: 13px;
  color: var(--text);
  font-weight: 600;
  white-space: nowrap;
}
.fatigue-btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}
.fatigue-btn {
  height: 36px;
  padding: 0 16px;
  border: 1.5px solid var(--border);
  border-radius: 99px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
}
.fatigue-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.fatigue-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.guide-quiet {
  font-size: 12px;
  color: var(--primary);
  font-weight: 600;
  background: var(--primary-lt);
  padding: 3px 10px;
  border-radius: 99px;
  align-self: flex-start;
}

/* ── 검색 ────────────────────────────────────────────────────────────────── */
.search-section {
  padding: 24px 0 8px;
}
.search-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.search-bar {
  display: flex;
  gap: 8px;
}
.search-input {
  flex: 1;
  height: 56px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 0 18px;
  font: inherit;
  font-size: 15px;
  background: var(--surface);
  color: var(--text);
  transition: border-color .15s;
}
.search-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(47,111,78,.12);
}
.btn-search {
  height: 56px;
  padding: 0 28px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s;
}
.btn-search:hover { background: var(--primary-dk); }

.filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.select {
  height: 40px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 0 12px;
  font: inherit;
  font-size: 14px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  flex: 1;
  min-width: 140px;
}
.select:focus {
  outline: none;
  border-color: var(--primary);
}

/* ── 결과 상태 ───────────────────────────────────────────────────────────── */
.results-section { padding: 20px 0 64px; }
.result-status {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 16px;
  min-height: 20px;
}
.result-status.no-result { color: var(--danger); }

/* ── 카드 그리드 ─────────────────────────────────────────────────────────── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

/* ── 카드 ────────────────────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .15s, box-shadow .15s;
  display: flex;
  flex-direction: column;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,.1);
}

/* 썸네일 */
.card-thumb {
  height: 176px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: var(--primary-lt);
  overflow: hidden;
}
.card-thumb::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 50%, rgba(0,0,0,.08) 100%);
  pointer-events: none;
}
.card-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  position: absolute; inset: 0;
}
.card-thumb[data-type="관광지"]  { background: linear-gradient(140deg, #6ee7b7 0%, #10b981 60%, #065f46 100%); }
.card-thumb[data-type="문화시설"] { background: linear-gradient(140deg, #93c5fd 0%, #3b82f6 60%, #1e3a8a 100%); }
.card-thumb[data-type="음식점"]  { background: linear-gradient(140deg, #fde68a 0%, #f59e0b 60%, #92400e 100%); }
.card-thumb[data-type="숙박"]   { background: linear-gradient(140deg, #d8b4fe 0%, #9333ea 60%, #4c1d95 100%); }
.card-thumb[data-type="레포츠"]  { background: linear-gradient(140deg, #fdba74 0%, #ea580c 60%, #7c2d12 100%); }
.card-thumb[data-type="쇼핑"]   { background: linear-gradient(140deg, #fbcfe8 0%, #ec4899 60%, #831843 100%); }

/* 아이콘 */
.card-icon {
  font-size: 56px;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,.18));
  transition: transform .2s;
}
.card:hover .card-icon { transform: scale(1.08); }
.card-thumb img ~ .card-icon { display: none; }

/* 배지 */
.card-badge {
  position: absolute;
  top: 10px; left: 10px;
  background: rgba(0,0,0,.45);
  color: #fff;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 99px;
  backdrop-filter: blur(4px);
}

/* 본문 */
.card-body {
  padding: 14px 16px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.card-area {
  font-size: 11px;
  color: var(--primary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .4px;
}
.card-title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
}
.card-addr {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-footer {
  padding: 0 16px 14px;
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.card-more {
  font-size: 12px;
  color: var(--primary);
  font-weight: 600;
}
.card[role="button"] { cursor: pointer; }
.card[role="button"]:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.card-desc {
  font-size: 13px;
  color: #374151;
  line-height: 1.55;
  margin-top: 2px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── 쉼 유형 태그 ─────────────────────────────────────────────────────────── */
.card-rest-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 4px 0;
}
.rest-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 99px;
  background: var(--primary-lt);
  color: var(--primary);
}

/* ── 추천 이유 ───────────────────────────────────────────────────────────── */
.card-reason {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.55;
  margin-top: 2px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── 조용함 지수 ─────────────────────────────────────────────────────────── */
.quiet-score {
  font-size: 12px;
  color: var(--primary);
  font-weight: 600;
}
.quiet-dots {
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--primary);
}

/* ── 빈 상태 ─────────────────────────────────────────────────────────────── */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 64px 16px;
  color: var(--muted);
}
.empty-state .empty-icon { font-size: 48px; margin-bottom: 12px; }
.empty-state p { font-size: 15px; }

/* ── 푸터 ────────────────────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 20px 0;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

/* ── 모달 ────────────────────────────────────────────────────────────────── */
.modal-overlay[hidden] { display: none !important; }
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 500;
  display: flex;
  align-items: flex-end;       /* 모바일: 바닥에서 슬라이드업 */
  justify-content: center;
  padding: 0;
  animation: fadeIn .18s ease;
}
@media (min-width: 600px) {
  .modal-overlay { align-items: center; padding: 24px; }
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-panel {
  background: var(--surface);
  width: 100%;
  max-width: 720px;
  height: 92dvh;
  border-radius: 20px 20px 0 0;
  overflow-y: auto;
  position: relative;
  animation: slideUp .22s ease;
}
@media (min-width: 600px) {
  .modal-panel { border-radius: 16px; height: 92dvh; }
}
@keyframes slideUp { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }

.modal-close {
  position: absolute; top: 14px; right: 14px;
  z-index: 10;
  width: 32px; height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,.35);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(4px);
}
.modal-close:hover { background: rgba(0,0,0,.55); }

.modal-carousel {
  position: relative;
  width: 100%;
  height: 240px;
  overflow: hidden;
  border-radius: 20px 20px 0 0;
  background: #111;
}
@media (min-width: 600px) { .modal-carousel { height: 300px; border-radius: 16px 16px 0 0; } }

.carousel-track {
  display: flex;
  height: 100%;
  transition: transform 0.3s ease;
}
.carousel-slide {
  min-width: 100%;
  height: 100%;
  object-fit: contain;
  background: #111;
  flex-shrink: 0;
  display: block;
}
.carousel-placeholder {
  min-width: 100%;
  height: 100%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 64px;
}
.carousel-placeholder[data-type="관광지"]  { background: linear-gradient(135deg, #a7f3d0, #34d399); }
.carousel-placeholder[data-type="문화시설"] { background: linear-gradient(135deg, #bfdbfe, #60a5fa); }
.carousel-placeholder[data-type="음식점"]  { background: linear-gradient(135deg, #fde68a, #f59e0b); }
.carousel-placeholder[data-type="숙박"]   { background: linear-gradient(135deg, #e9d5ff, #a855f7); }
.carousel-placeholder[data-type="레포츠"]  { background: linear-gradient(135deg, #fed7aa, #f97316); }
.carousel-placeholder[data-type="쇼핑"]   { background: linear-gradient(135deg, #fce7f3, #ec4899); }

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,.45);
  color: #fff;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  z-index: 1;
}
.carousel-btn:hover { background: rgba(0,0,0,.7); }
.carousel-prev { left: 10px; }
.carousel-next { right: 10px; }

.carousel-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  align-items: center;
  z-index: 1;
}
.carousel-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,.5);
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}
.carousel-dot.active { background: #fff; transform: scale(1.3); }

.modal-content { padding: 20px 20px 32px; }
.modal-area {
  font-size: 12px;
  color: var(--primary);
  font-weight: 600;
  letter-spacing: .4px;
  margin-bottom: 6px;
}
.modal-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 16px;
  line-height: 1.25;
}
.modal-row {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 8px;
  display: flex;
  gap: 8px;
}
.modal-row a { color: var(--primary); }
.modal-label {
  flex-shrink: 0;
  font-weight: 600;
  color: var(--text);
  width: 28px;
}
.modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.modal-score {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 10px;
}
.quiet-label { color: var(--muted); font-weight: 400; }
.modal-reason {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 14px;
  padding: 12px;
  background: var(--bg);
  border-radius: 8px;
  border-left: 3px solid var(--primary);
}
.rest-tip {
  margin-top: 16px;
  padding: 14px;
  background: #f0fdf4;
  border-radius: 10px;
  border: 1px solid var(--primary-lt);
}
.rest-tip-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 6px;
}
.rest-tip-text {
  font-size: 13px;
  color: #374151;
  line-height: 1.6;
}
.modal-desc {
  font-size: 14px;
  line-height: 1.7;
  color: #374151;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

/* ── 모달 코스 추천 ──────────────────────────────────────────────────────── */
.course-loading {
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  padding: 14px 0 0;
}
.modal-course-section {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.modal-course-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 10px;
}
.course-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0;
  margin: 0;
}
.course-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  background: var(--surface);
  border-radius: 8px;
  border: 1px solid var(--border);
}
.course-num {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.course-icon { font-size: 16px; flex-shrink: 0; }
.course-info {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 4px;
  min-width: 0;
  flex-wrap: wrap;
}
.course-item[data-course-idx] {
  cursor: pointer;
  transition: background .12s, border-color .12s;
}
.course-item[data-course-idx]:hover {
  background: var(--primary-lt);
  border-color: var(--primary);
}
.course-item[data-course-idx]:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
.course-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.course-type { font-size: 11px; color: var(--muted); }
.course-type::before { content: '·'; margin-right: 2px; }
.course-dist { font-size: 11px; color: var(--primary); font-weight: 600; }
.course-dist::before { content: '·'; margin-right: 2px; color: var(--muted); }

/* ── 통계 섹션 ───────────────────────────────────────────────────────────── */
.stats-section {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 48px 0;
}
.stats-heading {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 4px;
}
.stats-sub {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 28px;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.stat-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  background: var(--bg);
}
.stat-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 16px;
}
.stat-bars {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.stat-bars li {
  display: grid;
  grid-template-columns: 48px 1fr 28px;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}
.bar-label { color: var(--text); font-weight: 500; }
.bar-track {
  height: 8px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
}
.bar-fill {
  display: block;
  height: 100%;
  width: var(--pct, 0%);
  background: var(--primary);
  border-radius: 99px;
  transition: width .6s ease;
}
.bar-val { color: var(--muted); text-align: right; font-size: 12px; }
.stat-note {
  margin-top: 14px;
  font-size: 11px;
  color: var(--muted);
  font-style: italic;
}

/* ── 쉼 처방 가이드 ──────────────────────────────────────────────────────── */
.guide-section {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 28px 0;
}
.guide-section-heading {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .7px;
  margin-bottom: 14px;
}
.guide-card {
  display: flex;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  min-height: 200px;
}
.guide-visual {
  flex: 0 0 38%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1f5038 0%, #2f6f4e 55%, #3d8f64 100%);
}
.guide-emoji {
  font-size: 80px;
  filter: drop-shadow(0 4px 16px rgba(0,0,0,.2));
}
.guide-content {
  flex: 1;
  padding: 24px 28px;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  gap: 14px;
  justify-content: center;
}
.guide-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  background: var(--primary-lt);
  color: var(--primary);
  border-radius: 99px;
  letter-spacing: .3px;
  align-self: flex-start;
}
.guide-quote {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.5;
  margin: 0;
  padding: 0;
  border: none;
}
.guide-steps {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
}
.guide-steps li {
  font-size: 14px;
  color: #374151;
  padding-left: 18px;
  position: relative;
  line-height: 1.5;
}
.guide-steps li::before {
  content: '●';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-size: 8px;
  top: 5px;
}
@media (max-width: 600px) {
  .guide-card { flex-direction: column; }
  .guide-visual { flex: 0 0 120px; }
  .guide-emoji { font-size: 56px; }
  .guide-content { padding: 20px; gap: 10px; }
  .guide-quote { font-size: 15px; }
}

/* ── 즐겨찾기 버튼 ───────────────────────────────────────────────────────── */
.fav-btn {
  position: absolute;
  top: 8px; right: 8px;
  z-index: 2;
  background: rgba(255,255,255,.85);
  border: none;
  border-radius: 50%;
  width: 36px; height: 36px;
  font-size: 16px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(4px);
  transition: transform .15s;
  line-height: 1;
}
.fav-btn:hover { transform: scale(1.15); }
.fav-btn.fav-active { background: rgba(255,255,255,.95); }

/* 모달 즐겨찾기 버튼 */
.modal-title-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
}
.modal-title-row .modal-title { margin-bottom: 0; flex: 1; }
.modal-fav {
  position: static;
  flex-shrink: 0;
  margin-top: 4px;
  background: var(--bg);
  border: 1.5px solid var(--border);
}
.modal-fav:hover { border-color: var(--primary); }

/* 헤더 즐겨찾기 버튼 */
.fav-header-btn {
  margin-left: auto;
  background: rgba(255,255,255,.15);
  border: none;
  border-radius: 20px;
  color: #fff;
  padding: 6px 14px;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: background .15s;
}
.fav-header-btn:hover { background: rgba(255,255,255,.25); }
#fav-count:empty { display: none; }

/* ── 더 보기 버튼 ────────────────────────────────────────────────────────── */
.btn-load-more {
  display: block;
  margin: 24px auto 0;
  padding: 12px 32px;
  background: var(--surface);
  border: 1.5px solid var(--primary);
  border-radius: 99px;
  color: var(--primary);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
}
.btn-load-more:hover {
  background: var(--primary);
  color: #fff;
}

/* ── 모달 지도 ───────────────────────────────────────────────────────────── */
.modal-map {
  width: 100%;
  height: 200px;
  border-radius: 8px;
  overflow: hidden;
  margin-top: 14px;
  border: 1px solid var(--border);
}


/* ── 반응형 ──────────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .hero { padding: 40px 0 32px; }
  .search-bar { flex-direction: column; }
  .btn-search { width: 100%; }
  .filter-bar { gap: 12px; }
  .filter-bar .select { min-width: 0; height: 44px; }
  /* 검색 섹션 여백 */
  .search-section { padding: 28px 0 32px; }
  .search-form { gap: 16px; }
  /* 검색창 높이 명시 */
  .search-input {
    -webkit-appearance: none;
    height: 56px !important;
    min-height: 56px !important;
    font-size: 16px;
    box-sizing: border-box !important;
  }
  .btn-search { height: 56px !important; }
  /* 터치 타겟 44px */
  .rest-type-btn { height: 44px; }
  .fatigue-btn   { height: 44px; }
  /* 피로도 바 세로 배치 */
  .fatigue-bar { flex-direction: column; align-items: flex-start; gap: 8px; }
  .fatigue-btns { width: 100%; }
  .fatigue-btn { flex: 1; justify-content: center; }
  /* 컨셉 플로우 카드 모바일: 세로 스택 */
  .concept-flow { flex-direction: column; align-items: stretch; gap: 8px; }
  .concept-flow-card {
    width: auto;
    flex-direction: row;
    align-items: center;
    text-align: left;
    padding: 12px 16px;
    gap: 12px;
  }
  .concept-flow-icon { font-size: 26px; flex-shrink: 0; }
  .concept-flow-title { font-size: 13px; }
  .concept-flow-desc { font-size: 11px; }
  .concept-flow-arrow { transform: rotate(90deg); align-self: center; font-size: 20px; }
  /* 지도 높이 줄이기 */
  .modal-map { height: 160px; }
  /* iOS 모달 스크롤 */
  .modal-panel { -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
}
@media (max-width: 320px) {
  .card-grid { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════════════
   TRAVEL PLAN — plan.html
═══════════════════════════════════════════════════════════════ */

/* ── Layout ── */
.plan-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: #f8fafc;
}

/* ── Header ── */
.plan-header {
  position: sticky;
  top: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  min-height: 52px;
}
.plan-back-btn {
  color: #2f6f4e;
  text-decoration: none;
  font-size: 14px;
  white-space: nowrap;
  padding: 4px 0;
}
.plan-title-text {
  flex: 1;
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  margin: 0;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.plan-title-input {
  flex: 1;
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  border: none;
  border-bottom: 2px solid #2f6f4e;
  outline: none;
  background: transparent;
}
.plan-menu-btn {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  position: relative;
}
.plan-menu-dropdown {
  position: absolute;
  top: 100%;
  right: 16px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,.12);
  padding: 4px 0;
  min-width: 140px;
  z-index: 300;
}
.plan-menu-dropdown button {
  display: block;
  width: 100%;
  padding: 10px 16px;
  background: none;
  border: none;
  text-align: left;
  font-size: 14px;
  cursor: pointer;
  color: #dc2626;
}
.plan-menu-dropdown button:hover { background: #fef2f2; }

/* ── Tab bar ── */
.plan-tab-bar {
  position: sticky;
  top: 52px;
  z-index: 190;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  overflow-x: auto;
  scrollbar-width: none;
}
.plan-tab-bar::-webkit-scrollbar { display: none; }
.plan-tab {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border: 1px solid #d1d5db;
  border-radius: 20px;
  background: #f9fafb;
  cursor: pointer;
  font-size: 13px;
  white-space: nowrap;
  transition: background .15s;
}
.plan-tab.active {
  background: #2f6f4e;
  border-color: #2f6f4e;
  color: #fff;
}
.plan-tab-edit,
.plan-tab-del {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 12px;
  padding: 0 2px;
  line-height: 1;
}
.plan-tab.active .plan-tab-edit { color: rgba(255,255,255,.8); }
.plan-add-day-btn {
  padding: 6px 12px;
  border: 1px dashed #9ca3af;
  border-radius: 20px;
  background: none;
  font-size: 13px;
  color: #6b7280;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}
.plan-add-day-btn:hover { border-color: #2f6f4e; color: #2f6f4e; }

/* ── Accommodation banner ── */
.plan-accom-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: #1e3a5f;
  color: #fff;
  font-size: 13px;
  min-height: 44px;
}
.plan-accom-icon { font-size: 16px; }
.plan-accom-name { font-weight: 600; flex: 1; }
.plan-accom-time { opacity: .8; font-size: 12px; }
.plan-accom-change-btn {
  background: rgba(255,255,255,.2);
  border: 1px solid rgba(255,255,255,.4);
  color: #fff;
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
}
.plan-accom-empty-btn {
  width: calc(100% - 32px);
  padding: 10px 16px;
  background: none;
  border: 2px dashed #9ca3af;
  border-radius: 8px;
  color: #6b7280;
  font-size: 13px;
  cursor: pointer;
  margin: 8px 16px;
}
.plan-accom-empty-btn:hover { border-color: #2f6f4e; color: #2f6f4e; }

/* ── Map ── */
.plan-map-wrap { position: relative; }
.plan-map { height: 160px; background: #e8f0e9; transition: height .25s; }
.plan-map-wrap.collapsed .plan-map { height: 0; overflow: hidden; }
.plan-map-toggle {
  display: block;
  width: 100%;
  padding: 6px;
  background: #f3f4f6;
  border: none;
  border-top: 1px solid #e5e7eb;
  font-size: 12px;
  color: #6b7280;
  cursor: pointer;
  text-align: center;
}
.plan-map-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  font-size: 13px;
  color: #9ca3af;
}
.plan-map-pin {
  width: 24px;
  height: 24px;
  background: #2f6f4e;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.3);
}
.plan-map-pin.accom {
  background: #1e3a5f;
  font-size: 13px;
  width: 28px;
  height: 28px;
}

/* ── Timeline ── */
.plan-timeline {
  list-style: none;
  padding: 12px 16px;
  margin: 0;
  display: flex;
  flex-direction: column;
}
.plan-timeline-empty {
  text-align: center;
  color: #9ca3af;
  font-size: 14px;
  padding: 24px 0;
}
.plan-item {
  display: grid;
  grid-template-columns: 52px 16px 1fr;
  align-items: center;
  gap: 0 8px;
  position: relative;
  padding: 6px 0;
}
.plan-item::before {
  content: '';
  position: absolute;
  left: 60px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #e5e7eb;
}
.plan-item:last-child::before { height: 50%; }
.plan-item-time {
  font-size: 12px;
  color: #2f6f4e;
  font-weight: 600;
  background: none;
  border: none;
  cursor: pointer;
  text-align: right;
  padding: 4px;
  border-radius: 4px;
}
.plan-item-time:hover { background: #f0fdf4; }
.plan-item-time-input {
  font-size: 12px;
  color: #2f6f4e;
  font-weight: 600;
  border: 1px solid #2f6f4e;
  border-radius: 4px;
  padding: 2px 4px;
  width: 52px;
}
.plan-item-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #2f6f4e;
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px #2f6f4e;
  z-index: 1;
  flex-shrink: 0;
}
.plan-item-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.plan-item-type {
  font-size: 10px;
  color: #6b7280;
  background: #f3f4f6;
  border-radius: 3px;
  padding: 1px 5px;
  flex-shrink: 0;
}
.plan-item-name {
  flex: 1;
  font-size: 13px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.plan-item-actions {
  display: flex;
  gap: 2px;
  flex-shrink: 0;
}
.plan-item-actions button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 13px;
  padding: 2px 4px;
  border-radius: 4px;
  color: #9ca3af;
}
.plan-item-actions button:hover { background: #f3f4f6; color: #374151; }
.plan-item-actions button:disabled { opacity: .3; cursor: default; }
.plan-item-remove:hover { color: #dc2626 !important; }
.plan-item.dragging { opacity: .4; }
.plan-item.drag-over .plan-item-card { border-color: #2f6f4e; box-shadow: 0 0 0 2px #2f6f4e40; }

/* ── Add buttons ── */
.plan-add-btns {
  display: flex;
  gap: 8px;
  padding: 12px 16px 24px;
}
.plan-add-spot-btn,
.plan-add-accom-btn {
  flex: 1;
  padding: 10px;
  border: 1px dashed #9ca3af;
  border-radius: 8px;
  background: none;
  font-size: 13px;
  color: #6b7280;
  cursor: pointer;
  transition: border-color .15s, color .15s;
}
.plan-add-spot-btn:hover { border-color: #2f6f4e; color: #2f6f4e; }
.plan-add-accom-btn:hover { border-color: #1e3a5f; color: #1e3a5f; }

/* ── Sheet overlay ── */
.plan-sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 500;
  display: flex;
  align-items: flex-end;
}
.plan-sheet-overlay[hidden] { display: none; }
.plan-sheet-panel {
  width: 100%;
  max-height: 80vh;
  background: #fff;
  border-radius: 16px 16px 0 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.plan-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 10px;
  border-bottom: 1px solid #e5e7eb;
}
.plan-sheet-header h2 { font-size: 16px; margin: 0; }
.plan-sheet-close {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: #6b7280;
  padding: 4px 8px;
}
.plan-sheet-tabs {
  display: flex;
  border-bottom: 1px solid #e5e7eb;
}
.plan-stab {
  flex: 1;
  padding: 10px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  font-size: 13px;
  cursor: pointer;
  color: #6b7280;
}
.plan-stab.active { border-bottom-color: #2f6f4e; color: #2f6f4e; font-weight: 600; }
.plan-stab-content { padding: 12px 16px; overflow-y: auto; }
.plan-sheet-input {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 8px;
  box-sizing: border-box;
  outline: none;
}
.plan-sheet-input:focus { border-color: #2f6f4e; }
.plan-sheet-submit {
  width: 100%;
  padding: 12px;
  background: #2f6f4e;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 4px;
}
.plan-sheet-results {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 40vh;
  overflow-y: auto;
}
.plan-sheet-result {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 0;
  border-bottom: 1px solid #f3f4f6;
  cursor: pointer;
}
.plan-sheet-result:hover { background: #f8fafc; }
.plan-result-name { font-size: 14px; font-weight: 500; }
.plan-result-addr { font-size: 12px; color: #6b7280; }
.plan-sheet-loading,
.plan-sheet-empty {
  text-align: center;
  padding: 20px 0;
  color: #9ca3af;
  font-size: 13px;
}

/* ── Toast ── */
.plan-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  background: #1f2937;
  color: #fff;
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 13px;
  opacity: 0;
  transition: opacity .2s, transform .2s;
  pointer-events: none;
  z-index: 999;
  white-space: nowrap;
}
.plan-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Header plan button (index.html) ── */
.plan-header-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border-radius: 20px;
  border: 1px solid #d1d5db;
  background: #fff;
  color: #374151;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s;
  margin-right: 6px;
}
.plan-header-btn:hover { background: #f0fdf4; border-color: #2f6f4e; color: #2f6f4e; }
#plan-spot-count:empty { display: none; }

/* ── Card plan button (index.html) ── */
.btn-add-plan {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  padding: 4px 6px;
  border-radius: 6px;
  line-height: 1;
  color: #6b7280;
  transition: background .15s, color .15s;
}
.btn-add-plan:hover { background: #f0fdf4; color: #2f6f4e; }
.btn-add-plan-modal {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px;
  margin-top: 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
}

/* ── Day picker sheet (index.html) ── */
.day-picker-sheet {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 500;
  display: flex;
  align-items: flex-end;
}
.day-picker-sheet[hidden] { display: none; }
.day-picker-panel {
  width: 100%;
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 16px;
  max-height: 60vh;
  overflow-y: auto;
}
.day-picker-panel h3 {
  font-size: 15px;
  margin: 0 0 12px;
}
.day-picker-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.day-picker-item {
  padding: 12px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  background: #fff;
  text-align: left;
  width: 100%;
  transition: background .15s;
}
.day-picker-item:hover { background: #f0fdf4; border-color: #2f6f4e; }
.day-picker-close {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 10px;
  background: none;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 14px;
  color: #6b7280;
  cursor: pointer;
}

.plan-item-thumb {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}

/* ── Responsive ── */
@media (min-width: 600px) {
  .plan-map { height: 220px; }
  .plan-sheet-panel { max-width: 480px; margin: 0 auto; }
}
