/* ===== 테마 변수: 다크모드는 html[data-theme="dark"] 로 전환 ===== */
:root {
  --bg: #fff8f3;
  --surface: #ffffff;
  --text: #2b2118;
  --muted: #8a7a6d;
  --primary: #ff6b35;
  --primary-hover: #f0571f;
  --border: #f0e4da;
  --danger: #e5484d;
  --good: #16a34a;
  --warn: #d97706;
  --shadow: 0 1px 4px rgba(0, 0, 0, 0.07);
}
html[data-theme='dark'] {
  --bg: #1a1512;
  --surface: #251f1a;
  --text: #f1e9e2;
  --muted: #a89a8d;
  --primary: #ff8c5a;
  --primary-hover: #ff7038;
  --border: #3a312a;
  --shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'Pretendard Variable', Pretendard, 'Apple SD Gothic Neo', 'Malgun Gothic', 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  letter-spacing: -0.01em;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.3; }
hr { border: none; border-top: 1px solid var(--border); margin: 1.2rem 0; }

.container { max-width: 960px; margin: 0 auto; padding: 0 1rem; }
main.container { min-height: 70vh; padding-bottom: 3rem; }

/* ===== 헤더/네비게이션 ===== */
.site-header {
  background: color-mix(in srgb, var(--surface) 75%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
}
.nav { display: flex; align-items: center; gap: 1rem; padding: 0.7rem 1rem; flex-wrap: wrap; }
.logo { font-weight: 800; font-size: 1.2rem; color: var(--text); letter-spacing: -0.02em; }
.logo:hover { text-decoration: none; }
.logo-accent { color: var(--primary); }
.nav-menu { display: flex; align-items: center; gap: 0.9rem; margin-left: auto; flex-wrap: wrap; }
.nav-menu a { color: var(--text); font-weight: 500; }
.nav-user { color: var(--primary) !important; }
.nav-toggle { display: none; background: none; border: none; font-size: 1.4rem; color: var(--text); cursor: pointer; }
.inline-form { display: inline; }

/* ===== 버튼 ===== */
.btn {
  display: inline-block;
  border: none;
  border-radius: 8px;
  padding: 0.55rem 1.1rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-outline { background: transparent; color: var(--primary); border: 1.5px solid var(--primary); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-sm { padding: 0.3rem 0.7rem; font-size: 0.85rem; }
.btn-lg { padding: 0.8rem 1.6rem; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn-row { display: flex; gap: 0.5rem; margin-top: 0.8rem; align-items: center; }
.danger-text { color: var(--danger); }

/* ===== 카드 ===== */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.2rem;
  box-shadow: var(--shadow);
  margin-bottom: 1.2rem;
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
  margin-bottom: 1.2rem;
}
.card-grid .card { margin-bottom: 0; }
a.card { color: var(--text); display: block; transition: transform 0.12s, box-shadow 0.12s; }
a.card:hover { text-decoration: none; transform: translateY(-3px); box-shadow: 0 6px 16px rgba(0,0,0,0.12); }
.card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.4rem; }
.card h3 { margin: 0.3rem 0; }

.badge {
  display: inline-block;
  background: color-mix(in srgb, var(--primary) 14%, transparent);
  color: var(--primary);
  border-radius: 999px;
  padding: 0.12rem 0.65rem;
  font-size: 0.8rem;
  font-weight: 700;
}
.badge-good { background: color-mix(in srgb, var(--good) 14%, transparent); color: var(--good); }
.badge-warn { background: color-mix(in srgb, var(--warn) 14%, transparent); color: var(--warn); }

.muted { color: var(--muted); font-size: 0.92em; }
.center { text-align: center; }

/* ===== 히어로(홈) ===== */
.hero { text-align: center; padding: 3rem 1rem 2rem; }
.hero h1 { font-size: 2.1rem; margin-bottom: 0.5rem; }
.hero-sub { color: var(--muted); font-size: 1.05rem; }
.hero-actions { display: flex; gap: 0.8rem; justify-content: center; margin-top: 1.4rem; flex-wrap: wrap; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.feature-card h3 { margin-top: 0; }

.section-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin: 1.4rem 0 0.8rem; }
.section-head h1, .section-head h2 { margin: 0; }

/* ===== 폼 ===== */
.form { display: flex; flex-direction: column; gap: 0.9rem; }
.form label { display: flex; flex-direction: column; gap: 0.3rem; font-weight: 600; font-size: 0.92rem; }
.form input, .form select, .form textarea {
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 0.6rem 0.8rem;
  font-size: 0.95rem;
  font-family: inherit;
  background: var(--bg);
  color: var(--text);
}
.form input:focus, .form select:focus, .form textarea:focus {
  outline: none;
  border-color: var(--primary);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }
.auth-box, .form-box { max-width: 560px; margin: 2rem auto; }
.auth-box { max-width: 420px; }

/* 이름 / 역선택 / 삭제버튼. minmax(0,..)이 없으면 긴 옵션 텍스트가 칸을 밀어내서 넘친다 */
.participant-row {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr) 2.2rem;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.45rem;
}
.participant-row input,
.participant-row select { min-width: 0; width: 100%; }
.participant-row .btn {
  width: 2.2rem;
  height: 2.2rem;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}

.alert { border-radius: 8px; padding: 0.7rem 1rem; font-size: 0.93rem; }
.alert-error { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); }
.alert-info { background: color-mix(in srgb, var(--primary) 10%, transparent); color: var(--primary); }

/* ===== 상세 페이지 ===== */
.detail-head h1 { margin: 0.3rem 0; }
.info-list { list-style: none; padding: 0; margin: 0.6rem 0; display: flex; flex-direction: column; gap: 0.25rem; }
.description { background: var(--bg); border-radius: 8px; padding: 0.8rem 1rem; }
.rating-lg { font-size: 1.15rem; }

/* ===== 리뷰 ===== */
.review-list { list-style: none; padding: 0; margin-top: 1rem; }
.review-item { border-top: 1px solid var(--border); padding: 0.8rem 0; }
.review-item p { margin: 0.3rem 0; }
.review-head { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.4rem; }
.review-form { margin-bottom: 0.6rem; }

/* ===== 중간지점 결과 ===== */
.midpoint-result { border: 2px solid var(--primary); }
.midpoint-station { font-size: 1.5rem; margin: 0.4rem 0; }
.weather-chip {
  background: color-mix(in srgb, var(--primary) 8%, transparent);
  border-radius: 8px;
  padding: 0.5rem 0.9rem;
  display: inline-block;
}
.map-box { height: 380px; border-radius: 10px; margin: 1rem 0; border: 1px solid var(--border); }

.table { width: 100%; border-collapse: collapse; margin-top: 0.5rem; }
.table th, .table td { text-align: left; padding: 0.5rem 0.6rem; border-bottom: 1px solid var(--border); }
.table th { color: var(--muted); font-size: 0.85rem; }

/* ===== 코스 타임라인 ===== */
.course-timeline { list-style: none; padding: 0; margin: 1rem 0; }
.course-place { display: flex; gap: 0.8rem; align-items: flex-start; color: var(--text); padding: 0.6rem; border-radius: 10px; }
.course-place:hover { background: var(--bg); text-decoration: none; }
.course-place p { margin: 0.1rem 0; }
.step-num {
  flex-shrink: 0;
  width: 2rem; height: 2rem;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
}
.course-leg {
  margin: 0.2rem 0 0.2rem 0.95rem;
  padding: 0.3rem 0 0.3rem 1.6rem;
  border-left: 3px dashed var(--border);
  font-size: 0.9rem;
  color: var(--muted);
}
.leg-far { color: var(--warn); font-weight: 600; border-left-color: var(--warn); }

/* ===== 대시보드 ===== */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 0.8rem; margin: 1rem 0; }
.stat-card { text-align: center; margin-bottom: 0; }
.stat-num { display: block; font-size: 1.7rem; font-weight: 800; color: var(--primary); }
.dashboard-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-items: start; }
.dashboard-cols .card { margin-bottom: 1rem; }

.bar-chart { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.bar-chart li { display: grid; grid-template-columns: 5.5rem 1fr 2rem; align-items: center; gap: 0.5rem; }
.bar-label { font-size: 0.88rem; }
.bar { height: 1.1rem; background: var(--primary); border-radius: 4px; min-width: 4px; }
.bar-count { font-size: 0.85rem; color: var(--muted); }
.rank-list { padding-left: 1.2rem; }
.rank-list li { margin-bottom: 0.35rem; }

/* ===== 마이페이지 글 관리 ===== */
.manage-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  padding: 0.55rem 0.2rem;
  border-bottom: 1px solid var(--border);
}
.manage-item p { margin: 0.1rem 0 0; font-size: 0.85rem; }
.manage-item .btn-row { margin: 0; flex-shrink: 0; }

/* ===== 대시보드 활동 피드 ===== */
.activity-feed { list-style: none; padding: 0; margin: 0.4rem 0 0; }
.activity-feed li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0;
  border-bottom: 1px dashed var(--border);
  font-size: 0.93rem;
}
.activity-feed li:last-child { border-bottom: none; }
.activity-feed a { color: var(--text); flex: 1; }
.activity-feed a:hover { color: var(--primary); }
.activity-icon { font-size: 1.05rem; }

/* ===== 페이지네이션 ===== */
.pagination { display: flex; gap: 0.4rem; justify-content: center; margin: 1.5rem 0; }
.page-link {
  padding: 0.35rem 0.75rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-weight: 600;
}
.page-link.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.page-link:hover { text-decoration: none; border-color: var(--primary); }

/* ===== 기타 ===== */
.empty-state { text-align: center; padding: 3rem 1rem; color: var(--muted); }
.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.2rem 0;
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
}

/* ===== 메인 히어로 ===== */
.hero2 {
  position: relative;
  text-align: center;
  padding: 4.2rem 1.5rem 3rem;
  margin: 1.4rem 0 1.6rem;
  border-radius: 24px;
  background:
    radial-gradient(ellipse 90% 70% at 50% -10%, rgba(255, 107, 53, 0.16), transparent),
    var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
}
.hero2-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.45;
  pointer-events: none;
  animation: blob-drift 14s ease-in-out infinite alternate;
}
.blob-a { width: 320px; height: 320px; background: #ff6b35; top: -120px; left: -80px; }
.blob-b { width: 260px; height: 260px; background: #ffb35c; bottom: -120px; right: -60px; animation-delay: 4s; }
.blob-c { width: 180px; height: 180px; background: #f43f5e; top: 30%; right: 12%; opacity: 0.18; animation-delay: 8s; }
html[data-theme='dark'] .hero2-blob { opacity: 0.25; }
@keyframes blob-drift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(30px, 20px) scale(1.15); }
}
.hero-eyebrow {
  display: inline-block;
  position: relative; z-index: 1;
  background: color-mix(in srgb, var(--primary) 12%, transparent);
  color: var(--primary);
  border-radius: 999px;
  padding: 0.3rem 1rem;
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 1rem;
}
.hero2-title {
  position: relative; z-index: 1;
  font-size: 2.7rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.22;
  margin: 0 0 0.7rem;
}
.grad-text {
  background: linear-gradient(92deg, #ff6b35, #f43f5e 60%, #ffb35c);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero2-sub { position: relative; z-index: 1; color: var(--muted); font-size: 1.08rem; margin-bottom: 1.6rem; }
.hero2-search {
  position: relative; z-index: 1;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  max-width: 480px;
  margin: 0 auto 1.1rem;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 0.35rem 0.4rem 0.35rem 0.9rem;
  box-shadow: 0 8px 30px rgba(255, 107, 53, 0.12);
}
.hero2-search:focus-within { border-color: var(--primary); }
.hero2-search input {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 0.98rem;
  font-family: inherit;
  padding: 0.55rem 0.2rem;
}
.hero2-search input:focus { outline: none; }
.hero2-actions { position: relative; z-index: 1; display: flex; gap: 0.7rem; justify-content: center; flex-wrap: wrap; }
.btn-glass {
  background: color-mix(in srgb, var(--text) 6%, transparent);
  color: var(--text);
}
.hero2-stats {
  position: relative; z-index: 1;
  display: flex;
  justify-content: center;
  gap: 2.8rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}
.hero2-stats div { display: flex; flex-direction: column; }
.hero2-stats strong { font-size: 1.6rem; color: var(--primary); }
.hero2-stats span { color: var(--muted); font-size: 0.85rem; }

/* ===== 접속 QR ===== */
.hero-qr {
  position: relative; z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  margin-top: 1.6rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 0.7rem 1.2rem 0.7rem 0.7rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}
.hero-qr img {
  width: 86px;
  height: 86px;
  border-radius: 10px;
  background: #fff;
  padding: 4px;
}
.hero-qr-text { display: flex; flex-direction: column; text-align: left; line-height: 1.4; }
.hero-qr-text strong { font-size: 0.95rem; }
.hero-qr-text span { color: var(--primary); font-weight: 800; font-size: 1.05rem; }

/* ===== 사용 방법 3단계 ===== */
.steps {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 0.6rem;
  margin: 0 0 2.2rem;
}
.step-card {
  flex: 1;
  max-width: 240px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.3rem 1.1rem;
  text-align: center;
  box-shadow: var(--shadow);
}
.step-card h3 { margin: 0.6rem 0 0.3rem; font-size: 1.05rem; }
.step-card p { margin: 0; color: var(--muted); font-size: 0.88rem; }
.step-badge {
  display: inline-flex;
  width: 2.1rem; height: 2.1rem;
  align-items: center; justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff6b35, #f43f5e);
  color: #fff;
  font-weight: 800;
}
.step-arrow { align-self: center; color: var(--muted); font-size: 1.3rem; }

/* ===== 카테고리 카드 ===== */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 0.7rem;
  margin: 0.6rem 0 2rem;
}
.cat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  padding: 1rem 0.5rem;
  border-radius: 16px;
  color: #fff;
  font-weight: 700;
  font-size: 0.92rem;
  box-shadow: var(--shadow);
  transition: transform 0.15s, box-shadow 0.15s;
}
.cat-card:hover { text-decoration: none; transform: translateY(-4px) scale(1.02); box-shadow: 0 10px 24px rgba(0,0,0,0.18); }
.cat-emoji { font-size: 1.7rem; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2)); }
[data-cat='한식'] { background: linear-gradient(135deg, #f97316, #dc2626); }
[data-cat='중식'] { background: linear-gradient(135deg, #ef4444, #991b1b); }
[data-cat='일식'] { background: linear-gradient(135deg, #6366f1, #2563eb); }
[data-cat='양식'] { background: linear-gradient(135deg, #f59e0b, #ea580c); }
[data-cat='분식'] { background: linear-gradient(135deg, #ec4899, #e11d48); }
[data-cat='카페·디저트'] { background: linear-gradient(135deg, #a78bfa, #db2777); }
[data-cat='술집'] { background: linear-gradient(135deg, #0ea5e9, #4f46e5); }

/* ===== 카드 배너(음식 사진, 없으면 카테고리 그라디언트가 뒤에 깔림) ===== */
.hot-card { padding: 0; overflow: hidden; }
.card-banner {
  position: relative;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.card-banner img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s;
}
a.card:hover .card-banner img { transform: scale(1.06); }
.banner-emoji { font-size: 2.6rem; filter: drop-shadow(0 3px 6px rgba(0,0,0,0.25)); }
.hot-rank { position: absolute; top: 0.5rem; right: 0.7rem; font-size: 1.6rem; z-index: 1; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4)); }
.hot-card .card-body { padding: 0.9rem 1.2rem 1.1rem; }

/* 폼 사진 미리보기 */
.form-photo-preview { width: 100%; max-height: 180px; object-fit: cover; border-radius: 10px; }
.form-photo-grid { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.form-photo-grid img { width: 80px; height: 80px; object-fit: cover; border-radius: 8px; }

/* ===== 상세 페이지 사진 갤러리 (모자이크 히어로) ===== */
.detail-with-photo { padding-top: 0; }
.gallery {
  display: grid;
  gap: 6px;
  width: calc(100% + 2.4rem);
  margin: 0 -1.2rem 1rem;
  height: 300px;
  overflow: hidden;
}
.gallery-cell { position: relative; overflow: hidden; cursor: pointer; }
.gallery-cell img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.gallery-cell:hover img { transform: scale(1.05); }
.gallery-more {
  position: absolute; inset: 0;
  background: rgba(0, 0, 0, 0.5);
  color: #fff; font-size: 1.6rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
/* 1장: 와이드 / 2장: 반반 / 3장: 큰거+2 / 4장: 큰거+3 / 5장+: 큰거+4 */
.gallery-1 { grid-template-columns: 1fr; }
.gallery-2 { grid-template-columns: 1fr 1fr; }
.gallery-3 { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.gallery-3 .gallery-cell:first-child { grid-row: 1 / 3; }
.gallery-4 { grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 1fr 1fr; }
.gallery-4 .gallery-cell:first-child { grid-row: 1 / 3; grid-column: 1; }
.gallery-5 { grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 1fr 1fr; }
.gallery-5 .gallery-cell:first-child { grid-row: 1 / 3; grid-column: 1; }

/* 라이트박스 */
.lightbox {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 3000;
  align-items: center; justify-content: center;
}
.lightbox.open { display: flex; }
.lb-img { max-width: 90vw; max-height: 86vh; object-fit: contain; border-radius: 8px; }
.lb-close, .lb-nav {
  position: absolute;
  background: rgba(255, 255, 255, 0.15);
  color: #fff; border: none;
  cursor: pointer;
  border-radius: 50%;
  width: 3rem; height: 3rem;
  font-size: 1.6rem;
  display: flex; align-items: center; justify-content: center;
}
.lb-close:hover, .lb-nav:hover { background: rgba(255, 255, 255, 0.3); }
.lb-close { top: 1.2rem; right: 1.2rem; }
.lb-prev { left: 1.2rem; top: 50%; transform: translateY(-50%); }
.lb-next { right: 1.2rem; top: 50%; transform: translateY(-50%); }
.lb-count { position: absolute; bottom: 1.4rem; left: 50%; transform: translateX(-50%); color: #fff; font-weight: 700; background: rgba(0,0,0,0.4); border-radius: 999px; padding: 0.3rem 1rem; }

@media (max-width: 720px) {
  .gallery { height: 220px; }
  .lb-nav { width: 2.4rem; height: 2.4rem; font-size: 1.3rem; }
}

/* ===== 추천 맛집 스포트라이트 캐러셀 ===== */
.spotlight {
  position: relative;
  height: 340px;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.18);
  margin-bottom: 1.6rem;
}
.spot-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.9s ease;
}
.spot-slide.active { opacity: 1; pointer-events: auto; z-index: 1; }
.spot-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* Ken Burns: 보이는 동안 천천히 줌 */
.spot-slide.active img { animation: kenburns 6s ease-out forwards; }
@keyframes kenburns {
  from { transform: scale(1); }
  to { transform: scale(1.08); }
}
.spot-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(12, 8, 5, 0.82) 0%, rgba(12, 8, 5, 0.25) 45%, transparent 70%);
  display: flex;
  align-items: flex-end;
}
.spot-info { padding: 1.6rem 1.8rem; color: #fff; max-width: 80%; }
.spot-rank {
  display: inline-block;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(6px);
  border-radius: 999px;
  padding: 0.15rem 0.8rem;
  font-size: 0.78rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
}
.spot-name { margin: 0 0 0.35rem; font-size: 1.9rem; font-weight: 800; letter-spacing: -0.02em; text-shadow: 0 2px 12px rgba(0,0,0,0.4); }
.spot-meta { margin: 0 0 0.7rem; font-size: 0.95rem; opacity: 0.95; }
.spot-badge { background: rgba(255, 255, 255, 0.22); color: #fff; }
.spot-cta {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  border-radius: 999px;
  padding: 0.4rem 1.1rem;
  font-weight: 700;
  font-size: 0.9rem;
}
.spot-slide:hover .spot-cta { background: var(--primary-hover); }
/* 상단 진행바 */
.spot-progress {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: rgba(255, 255, 255, 0.25);
  z-index: 3;
}
.spot-progress span { display: block; height: 100%; width: 0; background: var(--primary); }
/* 좌우 화살표 */
.spot-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 2.6rem; height: 2.6rem;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s, background 0.2s;
}
.spotlight:hover .spot-arrow { opacity: 1; }
.spot-arrow:hover { background: rgba(255, 255, 255, 0.4); }
.spot-prev { left: 0.9rem; }
.spot-next { right: 0.9rem; }
/* 점 네비게이션 */
.spot-dots {
  position: absolute;
  bottom: 1rem; right: 1.2rem;
  z-index: 3;
  display: flex;
  gap: 0.4rem;
}
.spot-dot {
  width: 0.6rem; height: 0.6rem;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  padding: 0;
  transition: width 0.25s, background 0.25s;
}
.spot-dot.active { width: 1.5rem; border-radius: 999px; background: #fff; }

/* ===== 홈 맛집지도 미리보기 ===== */
.home-map-wrap {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  margin-bottom: 1.6rem;
}
#home-map { height: 320px; z-index: 1; }
.home-map-cta {
  position: absolute;
  left: 50%; bottom: 1rem;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  text-align: center;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(8px);
  border-radius: 14px;
  padding: 0.6rem 1.3rem;
  color: var(--text);
  box-shadow: 0 6px 20px rgba(0,0,0,0.18);
  white-space: nowrap;
}
.home-map-cta:hover { text-decoration: none; outline: 2px solid var(--primary); }
.home-map-cta span { font-size: 0.83rem; color: var(--muted); }
.food-pin-sm { width: 28px !important; height: 28px !important; font-size: 0.95rem !important; }

/* ===== 리뷰 말풍선 ===== */
.review-bubbles { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0.9rem; margin-bottom: 1.4rem; }
.review-bubble {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px 16px 16px 4px;
  padding: 1rem 1.2rem;
  color: var(--text);
  box-shadow: var(--shadow);
}
.review-bubble:hover { text-decoration: none; border-color: var(--primary); }
.bubble-text { margin: 0 0 0.5rem; font-size: 0.96rem; }
.bubble-meta { margin: 0; font-size: 0.85rem; display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }

/* ===== 하단 CTA ===== */
.cta-band {
  text-align: center;
  background: linear-gradient(120deg, #ff6b35, #f43f5e);
  border-radius: 20px;
  color: #fff;
  padding: 2.4rem 1.5rem;
  margin: 2rem 0 1rem;
}
.cta-band h2 { margin: 0 0 0.3rem; }
.cta-band p { margin: 0 0 1.1rem; opacity: 0.92; }
.cta-btn { background: #fff; color: #e11d48; }
.cta-btn:hover { background: #ffe9df; }

/* ===== 실제 가게 검색/목록 ===== */
.place-search { margin-bottom: 1rem; }
.place-search-bar { display: flex; gap: 0.5rem; }
.place-search-bar input {
  flex: 1;
  border: 1.5px solid var(--primary);
  border-radius: 8px;
  padding: 0.6rem 0.8rem;
  font-family: inherit;
  background: var(--bg);
  color: var(--text);
}
.place-results { list-style: none; padding: 0; margin: 0.4rem 0 0; }
.place-results li {
  padding: 0.55rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 0.3rem;
  cursor: pointer;
}
.place-results li:hover { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 6%, transparent); }
.place-grid { display: flex; flex-direction: column; gap: 0.4rem; }
.place-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
}
.place-row:hover { text-decoration: none; border-color: var(--primary); }
.place-row p { margin: 0.1rem 0 0; }
.place-thumb {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
}
.place-row-body { flex: 1; min-width: 0; }
/* 리스트가 길어도 지도를 안 밀어내게 자체 스크롤 */
.nearby-scroll { max-height: 420px; overflow-y: auto; padding-right: 4px; }
.nearby-filter { margin: 0.7rem 0 0.4rem; }
.place-link { color: var(--primary); font-weight: 700; font-size: 0.85rem; white-space: nowrap; }

/* 중간지점 후보 칩 */
.candidate-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0.7rem; margin: 0.8rem 0; }
.candidate-chip {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 0.7rem 0.9rem;
  color: var(--text);
  font-size: 0.9rem;
}
.candidate-chip:hover { text-decoration: none; border-color: var(--primary); }
.candidate-chip.selected {
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary) 8%, transparent);
}

/* 참가자 입력 블록 (역 선택 + 장소 검색) */
.participant-block {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.7rem 0.8rem;
  margin-bottom: 0.7rem;
  background: var(--bg);
}
.participant-block .place-search-bar { margin-top: 0.1rem; }
.participant-block .place-search-bar input { min-width: 0; }
.participant-block .place-results { margin-top: 0.35rem; }
.participant-block .place-results li { background: var(--surface); }
.psel { margin: 0.4rem 0 0; font-size: 0.85rem; }
.address-input { width: 100%; margin-top: 0.3rem; }
.form .address-input { font-size: 0.88rem; }

.map-box-sm { height: 260px; }

/* ===== 맛집 지도 페이지 ===== */
.map-page { position: relative; margin: 1rem 0; }
#bigmap {
  height: calc(100vh - 170px);
  min-height: 480px;
  border-radius: 18px;
  border: 1px solid var(--border);
  z-index: 1;
}
.map-panel {
  position: absolute;
  top: 0.9rem; left: 0.9rem; right: 0.9rem;
  z-index: 1000;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.7rem 0.9rem;
  box-shadow: 0 8px 24px rgba(0,0,0,0.14);
}
.map-panel-row { display: flex; gap: 0.5rem; margin-bottom: 0.5rem; }
.map-panel-row input {
  flex: 1;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 0.45rem 0.8rem;
  font-family: inherit;
  background: var(--bg);
  color: var(--text);
}
.map-cats { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.map-cat {
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 999px;
  padding: 0.25rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.map-cat.active { background: var(--primary); border-color: var(--primary); color: #fff; }
/* 이모지 마커 */
.food-pin { background: none; border: none; }
.food-pin-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  background: var(--surface);
  border: 2.5px solid var(--primary);
  border-radius: 50% 50% 50% 6px;
  font-size: 1.25rem;
  box-shadow: 0 3px 10px rgba(0,0,0,0.25);
  transition: transform 0.15s;
}
.food-pin:hover .food-pin-inner { transform: scale(1.18); }
/* GPS 버튼 + 펄스 점 */
#gps-btn {
  position: absolute;
  bottom: 1.6rem; right: 1.2rem;
  z-index: 1000;
  border: none;
  border-radius: 999px;
  padding: 0.6rem 1.1rem;
  background: var(--surface);
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0,0,0,0.25);
}
#gps-btn:hover { background: var(--bg); }
.gps-pin { background: none; border: none; }
.gps-dot {
  display: block;
  width: 16px; height: 16px;
  margin: 3px;
  background: #2b7fff;
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 rgba(43, 127, 255, 0.5);
  animation: gps-pulse 2s infinite;
}
@keyframes gps-pulse {
  0% { box-shadow: 0 0 0 0 rgba(43, 127, 255, 0.5); }
  70% { box-shadow: 0 0 0 16px rgba(43, 127, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(43, 127, 255, 0); }
}
.map-count {
  position: absolute;
  bottom: 1.6rem; left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  backdrop-filter: blur(8px);
  border-radius: 999px;
  padding: 0.3rem 1rem;
  font-size: 0.85rem;
  font-weight: 700;
  box-shadow: 0 3px 10px rgba(0,0,0,0.15);
}
/* 마커 팝업 카드 */
.leaflet-popup-content { margin: 0; }
.leaflet-popup-content-wrapper { border-radius: 14px; overflow: hidden; padding: 0; }
.map-pop img { width: 100%; height: 110px; object-fit: cover; display: block; }
.map-pop-body { padding: 0.6rem 0.9rem 0.8rem; font-family: inherit; }
.map-pop-body p { margin: 0.2rem 0; font-size: 0.85rem; color: #666; }
.map-pop-addr { font-size: 0.78rem !important; }
.map-pop-link { font-weight: 700; color: var(--primary); }

/* 목록 페이지: 카테고리 알약 + 검색바 */
.cat-pills { display: flex; gap: 0.4rem; flex-wrap: wrap; margin: 0.4rem 0 0.7rem; }
.cat-pill {
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 999px;
  padding: 0.32rem 0.85rem;
  font-size: 0.88rem;
  font-weight: 600;
}
.cat-pill:hover { border-color: var(--primary); text-decoration: none; }
.cat-pill.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.filter-bar { display: flex; gap: 0.5rem; margin-bottom: 1.1rem; }
.filter-bar input[type='text'] {
  flex: 1;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 0.55rem 0.9rem;
  font-family: inherit;
  background: var(--surface);
  color: var(--text);
}
.filter-bar select {
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 0.55rem 0.7rem;
  font-family: inherit;
  background: var(--surface);
  color: var(--text);
}

/* 지도 검증 배지 */
.vbadge {
  display: inline-block;
  background: color-mix(in srgb, var(--good) 14%, transparent);
  color: var(--good);
  border-radius: 999px;
  padding: 0.08rem 0.5rem;
  font-size: 0.72rem;
  font-weight: 800;
  vertical-align: middle;
}
.vbadge-lg { font-size: 0.85rem; padding: 0.18rem 0.7rem; }
.ref-check { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; font-size: 0.85rem; }
.ref-check .maplink { cursor: pointer; border: none; font-family: inherit; font-size: 0.8rem; padding: 0.3rem 0.7rem; }

/* ===== 지도 앱 바로가기 버튼 ===== */
.map-links { display: flex; gap: 0.5rem; flex-wrap: wrap; margin: 0.8rem 0 0.4rem; }
.maplink {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.88rem;
  border: 1.5px solid transparent;
}
.maplink:hover { text-decoration: none; filter: brightness(1.06); }
.maplink-naver { background: #03c75a; color: #fff; }
.maplink-kakao { background: #fee500; color: #191919; }
.maplink-google { background: #fff; color: #1a73e8; border-color: #1a73e8; }
html[data-theme='dark'] .maplink-google { background: transparent; }
.maplink-go { background: var(--primary); color: #fff; }

/* ===== 대중교통 상세 경로 ===== */
.transit-routes { display: flex; flex-direction: column; gap: 0.6rem; margin: 0.6rem 0; }
.transit-route {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.6rem 0.9rem;
}
.transit-segments { margin: 0.3rem 0 0; padding-left: 1.2rem; }
.transit-segments li { margin-bottom: 0.2rem; font-size: 0.92rem; }

/* ===== 여행 플랜 ===== */
.day-tabs { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-bottom: 1rem; }
.day-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 4.2rem;
  padding: 0.45rem 0.9rem;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font-weight: 700;
  font-size: 0.92rem;
}
.day-tab:hover { text-decoration: none; border-color: var(--primary); }
.day-tab.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.day-tab.active .muted { color: rgba(255,255,255,0.8); }
.trip-cols { display: grid; grid-template-columns: 1fr 1.15fr; gap: 1rem; align-items: start; }
.spot-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.5rem; flex: 1; }
.spot-focus { background: color-mix(in srgb, var(--primary) 8%, transparent); border-radius: 10px; }

/* ===== 반응형(모바일) ===== */
@media (max-width: 720px) {
  .nav-toggle { display: block; margin-left: auto; }
  .nav-menu {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    padding: 0.5rem 0;
  }
  .nav-menu.open { display: flex; }
  .form-row { grid-template-columns: 1fr; }
  .participant-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) 2.2rem; }
  .dashboard-cols { grid-template-columns: 1fr; }
  .trip-cols { grid-template-columns: 1fr; }
  .spotlight { height: 260px; }
  .spot-name { font-size: 1.3rem; }
  .spot-info { max-width: 100%; padding: 1.1rem 1.2rem; }
  .hero h1 { font-size: 1.5rem; }
  .hero2 { padding: 2.6rem 1rem 2rem; }
  .hero2-title { font-size: 1.7rem; }
  .hero2-stats { gap: 1.6rem; }
  .steps { flex-direction: column; align-items: center; }
  .step-card { max-width: 100%; width: 100%; }
  .step-arrow { transform: rotate(90deg); }
  .map-box { height: 280px; }
}
