/* 챙겨 — 메인(사용자) 스타일. 모바일 우선, 바닐라 CSS */
:root {
  --brand: #2f6bed;
  --brand-d: #2050c8;
  --ink: #1b1f26;
  --muted: #8b919c;
  --line: #eceef2;
  --bg: #ffffff;
  --soft: #f4f6f9;
  --radius: 16px;
  --shadow: 0 6px 18px rgba(20, 30, 60, .06);
  --maxw: 480px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Pretendard", system-ui, -apple-system, "Apple SD Gothic Neo",
    "Malgun Gothic", "Noto Sans KR", sans-serif;
  color: var(--ink);
  background: #e9ecf1;
  -webkit-font-smoothing: antialiased;
  line-height: 1.45;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img { max-width: 100%; display: block; }

/* 모바일 프레임 */
.app {
  max-width: var(--maxw);
  margin: 0 auto;
  background: var(--bg);
  min-height: 100vh;
  position: relative;
}

/* ---- 헤더 ---- */
.hdr {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.logo {
  font-size: 22px;
  font-weight: 800;
  color: var(--brand);
  letter-spacing: -.5px;
}
.logo span { color: var(--brand); }
.topnav { display: none; }    /* 모바일 숨김, PC에서 표시 */
.login-wrap { display: none; } /* 모바일 숨김, PC에서 표시 */
.region-wrap { position: relative; margin-left: auto; }

/* PC 로그인 팝오버(드롭다운) */
.login-pop {
  position: absolute;
  top: calc(100% + 10px); right: 0;
  width: 250px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 14px;
  z-index: 45;
}
.login-pop[hidden] { display: none; }
.lp-title { margin: 0 0 10px; font-size: 13px; font-weight: 700; color: #444b57; text-align: center; }
.region {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 7px 12px;
  border: 1px solid #dfe3ea;
  background: #fff;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}
.region .chev { width: 16px; height: 16px; fill: none; stroke: #6b7280; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.menu {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 26px;
  height: 26px;
  background: none;
  border: 0;
  padding: 0;
}
.menu span { height: 2px; background: var(--ink); border-radius: 2px; }

/* 지역 드롭다운 */
.region-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  margin: 0;
  z-index: 40;
  padding: 6px;
  list-style: none;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  min-width: 120px;
}
.region-menu li {
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
}
.region-menu li:hover { background: var(--soft); }
.region-menu li.is-sel { color: var(--brand); }

/* ---- 본문 ---- */
.main { padding: 14px 16px 28px; }

/* 히어로 */
.hero { margin-bottom: 16px; }
.hero-card {
  position: relative;
  border-radius: var(--radius);
  aspect-ratio: 5 / 2;            /* 배너 권장 규격 1200×480(5:2)과 일치 — 모바일 좌우 잘림 방지 */
  background-size: cover; background-position: center;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}
/* 텍스트 가독용 그늘 — 글자가 놓이는 하단에만. 이미지 상단은 원본 그대로 밝게 */
.hero-card::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0; height: 26%;
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,.6) 100%);
  pointer-events: none;
}
/* 글자 없는 배너(제목 비어있음)면 그늘도 불필요 */
.hero-card:not(:has(.hero-body)):after { display: none; }
.hero-body { position: relative; z-index: 1; padding: 18px; color: #fff; text-align: center; width: 100%; }
.hero-eyebrow { margin: 0; font-size: 12px; opacity: .95; }
.hero-date { margin: 2px 0 8px; font-size: 12px; opacity: .9; }
.hero-title { margin: 0; font-size: 24px; font-weight: 800; line-height: 1.25; text-shadow: 0 2px 8px rgba(0,0,0,.3); }
.hero-en { margin: 8px 0 0; font-size: 11px; letter-spacing: 2px; opacity: .85; }
.dots { display: flex; justify-content: center; gap: 6px; margin-top: 10px; }
.dots i { width: 6px; height: 6px; border-radius: 999px; background: #d2d6dd; }
.dots i.is-on { width: 18px; background: var(--brand); }

/* 카테고리 */
.cats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 4px 0 16px;
}
.cat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  background: none;
  border: 0;
  padding: 6px 0;
}
.cat-ic {
  width: 56px; height: 56px;
  display: grid; place-items: center;
  border-radius: 16px;
  background: #f1f5ff;
  border: 2px solid transparent;
}
.cat-ic svg { width: 26px; height: 26px; fill: none; stroke: var(--brand); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.cat-tx { font-size: 13px; font-weight: 600; color: #4b5160; }
.cat.is-active .cat-ic { border-color: var(--brand); background: #e7efff; }
.cat.is-active .cat-tx { color: var(--brand); }

/* 검색 */
.search {
  position: relative;
  margin-bottom: 22px;
}
.search input {
  width: 100%;
  padding: 14px 46px 14px 16px;
  border: 1px solid #e3e7ee;
  border-radius: 14px;
  font-size: 14px;
  background: #fff;
  outline: none;
}
.search input:focus { border-color: var(--brand); }
.search button {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px; border: 0; background: none; display: grid; place-items: center;
}
.search button svg { width: 20px; height: 20px; fill: none; stroke: #9aa0ab; stroke-width: 2; stroke-linecap: round; }

/* 섹션 공통 */
.sec { margin-bottom: 24px; }
.sec-title { margin: 0 0 12px; font-size: 17px; font-weight: 800; letter-spacing: -.3px; }

/* 가로 캐러셀: 왼쪽 16px 정렬 + 오른쪽 화면밖 bleed(스크롤 암시) */
.hcar {
  display: grid;
  grid-auto-flow: column;
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  margin: 0 -16px;          /* .main 16px 패딩 밖으로 풀블리드 */
  padding: 0 16px;          /* 왼쪽 16px에서 시작 */
  scroll-padding-left: 16px;
}
.hcar::-webkit-scrollbar { display: none; }
.hcar > .card { scroll-snap-align: start; }
.hcar--reco { grid-auto-columns: 46%; }  /* 투어코스: 2개 + 살짝 */
.hcar--hot  { grid-auto-columns: 30%; }  /* 여기 챙겨(운영자 가게): 3개 + 살짝 */
.hcar--hot .card .title { font-size: 12.5px; }
/* 여기 챙겨 썸네일 — 가게 갤러리 첫 사진, 업로드 규격 800×800(1:1)과 일치 */
.hcar--hot .card .thumb { aspect-ratio: 1 / 1; }
.card .thumb {
  border-radius: 12px;
  aspect-ratio: 16 / 9;   /* 대표이미지 업로드 규격 1200×675(16:9)와 일치 — 상하 잘림 방지 */
  margin-bottom: 8px;
}
.card .tag { font-size: 12px; font-weight: 700; color: var(--brand); }
.card .title { margin: 3px 0 0; font-size: 13.5px; font-weight: 600; line-height: 1.4; color: #2a2f39; }

/* 축제·이벤트 원형 프로모 */
.promo-circle {
  display: flex; align-items: center; gap: 16px;
  background: var(--soft);
  border-radius: var(--radius);
  padding: 18px;
}
.pc-thumb { width: 92px; height: 92px; border-radius: 999px; flex: 0 0 auto; }
.pc-sub { font-size: 12.5px; color: #6a707c; }
.pc-title { display: block; margin-top: 4px; font-size: 19px; font-weight: 800; line-height: 1.3; }


/* 프로모션 배너 */
.banner {
  position: relative;
  display: block;
  border-radius: var(--radius);
  padding: 22px 18px;
  min-height: 110px;
  color: #fff;
  overflow: hidden;
}
.banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.28), rgba(0,0,0,0)); }
.bn-sub { position: relative; z-index: 1; font-size: 13px; font-weight: 700; opacity: .95; }
.bn-title { position: relative; z-index: 1; display: block; margin-top: 6px; font-size: 21px; font-weight: 800; line-height: 1.3; text-shadow: 0 2px 8px rgba(0,0,0,.25); }
.bn-emoji { position: absolute; right: 18px; bottom: 16px; font-size: 30px; z-index: 1; }

/* 오늘 댓글 */
.comment {
  display: flex; gap: 12px;
  background: var(--soft);
  border-radius: var(--radius);
  padding: 14px;
}
.comment .thumb { width: 64px; height: 64px; border-radius: 12px; flex: 0 0 auto; }
.comment .c-title { margin: 0; font-size: 14px; font-weight: 700; }
.comment .c-body { margin: 4px 0 0; font-size: 13px; color: #5b616c; line-height: 1.45; }

/* 푸터 */
.foot { text-align: center; color: var(--muted); font-size: 12px; padding: 18px 0 8px; }
.foot p { margin: 2px 0; }
.foot-dim { opacity: .7; }

/* ---- 플레이스홀더(이미지 대체) ---- */
.ph { background: #cfd6e0; background-size: cover; background-position: center; }
.ph--red   { background: linear-gradient(135deg, #f2916f, #d9482f); }
.ph--green { background: linear-gradient(135deg, #79b98a, #3f8a5c); }
.ph--blue  { background: linear-gradient(135deg, #6fa8f0, #2f6bed); }
.ph--lake  { background: linear-gradient(135deg, #8fd0e0, #3f86b8); }
.ph--field { background: linear-gradient(135deg, #b6d98a, #5a9e57); }
.ph--warm  { background: linear-gradient(135deg, #f3b07a, #e07a45); }
.ph--sun   { background: linear-gradient(135deg, #f5c66b, #e08a3c); }

/* ---- 햄버거 드로어 ---- */
.drawer { position: fixed; inset: 0; z-index: 50; }
.drawer[hidden] { display: none; }
.drawer-dim {
  position: absolute; inset: 0;
  background: rgba(0, 0, 0, .45);
  opacity: 0; transition: opacity .25s ease;
}
.drawer-inner {
  position: absolute; inset: 0;
  width: 100%; max-width: var(--maxw);
  left: 50%; transform: translateX(-50%);
  pointer-events: none;
}
.drawer-panel {
  position: absolute; top: 0; right: 0;
  height: 100%; width: 82%; max-width: 320px;
  background: #fff;
  box-shadow: -8px 0 28px rgba(20, 30, 60, .18);
  padding: 16px 18px calc(18px + env(safe-area-inset-bottom));
  transform: translateX(100%);
  transition: transform .25s ease;
  pointer-events: auto;
  overflow-y: auto;
}
.drawer.is-open .drawer-dim { opacity: 1; }
.drawer.is-open .drawer-panel { transform: translateX(0); }

.drawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.drawer-close { width: 34px; height: 34px; border: 0; background: none; display: grid; place-items: center; }
.drawer-close svg { width: 22px; height: 22px; fill: none; stroke: #444; stroke-width: 2; stroke-linecap: round; }

.drawer-login { background: var(--soft); border-radius: 14px; padding: 14px; margin-bottom: 18px; }
.dl-title { margin: 0 0 10px; font-size: 13px; font-weight: 700; color: #444b57; text-align: center; }
.sns {
  display: flex; align-items: center; justify-content: center;
  height: 44px; border-radius: 10px;
  font-size: 14px; font-weight: 700; margin-bottom: 8px;
}
.sns:last-child { margin-bottom: 0; }
.sns--kakao  { background: #fee500; color: #191600; }
.sns--naver  { background: #03c75a; color: #fff; }
.sns--google { background: #fff; color: #1f2330; border: 1px solid #dadce0; }

.drawer-nav { display: flex; flex-direction: column; }
.drawer-nav a {
  padding: 14px 6px;
  font-size: 15px; font-weight: 600;
  border-bottom: 1px solid var(--line);
}
.drawer-nav a:last-child { border-bottom: 0; }

.install-btn {
  width: 100%; height: 46px; margin-top: 18px;
  border: 0; border-radius: 12px;
  background: var(--brand); color: #fff;
  font-size: 14px; font-weight: 700;
}
.install-hint { margin: 10px 2px 0; font-size: 12px; color: var(--muted); line-height: 1.5; }

/* ============================================================
   PC(데스크톱) 레이아웃 — 넓은 화면에서 가로 메뉴 + 다단 그리드
   ============================================================ */
@media (min-width: 860px) {
  body { background: #eef0f4; }
  .app {
    max-width: 1120px;
    min-height: auto;
    margin: 0 auto;
    box-shadow: 0 10px 40px rgba(20, 30, 60, .07);
  }

  /* 헤더: 햄버거 숨김, 가로 메뉴 + 로그인 표시 */
  .hdr { padding: 14px 32px; gap: 18px; }
  .logo { font-size: 24px; }
  .menu { display: none; }
  .topnav { display: flex; align-items: center; gap: 26px; margin-left: 34px; }
  .topnav a { font-size: 15.5px; font-weight: 600; color: #3b424f; padding: 4px 0; border-bottom: 2px solid transparent; }
  .topnav a:hover { color: var(--brand); border-bottom-color: var(--brand); }
  .login-wrap { display: block; position: relative; margin-left: 12px; }
  .login-btn {
    display: inline-flex; align-items: center;
    padding: 9px 18px;
    border: 0; border-radius: 999px;
    background: var(--brand); color: #fff;
    font-size: 14px; font-weight: 700;
  }

  .main { padding: 30px 32px 56px; }

  /* 히어로 — 배너 규격(5:2)로 통일 (PC·모바일 동일, 좌우 잘림 없음) */
  .hero-card { aspect-ratio: 5 / 2; }
  .hero-title { font-size: 36px; }
  .hero-eyebrow, .hero-date { font-size: 13px; }

  /* 카테고리 아이콘 — 가운데 정렬, 폭 제한 */
  .cats { max-width: 600px; margin: 10px auto 24px; gap: 16px; }
  .cat-ic { width: 62px; height: 62px; }

  /* 검색 — 가운데 폭 제한 */
  .search { max-width: 760px; margin: 0 auto 34px; }

  .sec-title { font-size: 20px; margin-bottom: 16px; }

  /* PC: 캐러셀 → 일반 4열 그리드(스크롤 없음) */
  .hcar {
    grid-auto-flow: row;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-columns: auto;
    overflow: visible;
    margin: 0; padding: 0;
    gap: 20px;
  }

  /* 축제·이벤트 + 파크골프 배너를 더 시원하게 */
  .promo-circle { padding: 24px 28px; }
  .pc-thumb { width: 110px; height: 110px; }
  .pc-title { font-size: 22px; }
  .banner { min-height: 150px; padding: 30px; }
  .bn-title { font-size: 24px; }

  /* 오늘 댓글 — 폭 제한해서 너무 넓지 않게 */
  #todayComments { max-width: 720px; }
  .comment .thumb { width: 76px; height: 76px; }

  /* 드로어는 PC에서도 로그인 버튼으로 열림(우측 슬라이드 유지) */
}

/* 큰 데스크톱 — 여백 더 */
@media (min-width: 1200px) {
  .main { padding: 36px 48px 64px; }
}

/* ============================================================
   서브페이지(카테고리 목록 / 상세)
   ============================================================ */
.subhdr {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.subhdr .back { width: 34px; height: 34px; display: grid; place-items: center; border: 0; background: none; padding: 0; }
.subhdr .back svg { width: 24px; height: 24px; fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.subhdr .subtitle { margin: 0; font-size: 17px; font-weight: 800; letter-spacing: -.3px; }
.subhdr .home-link { margin-left: auto; font-size: 13px; font-weight: 700; color: var(--brand); }

/* 목록 그리드(2열 모바일 / 4열 PC) */
.list-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.list-empty { text-align: center; color: var(--muted); padding: 48px 0; font-size: 14px; }

/* 상세 */
.detail-hero { border-radius: var(--radius); aspect-ratio: 16 / 10; margin-bottom: 16px; }
.detail-title { font-size: 22px; font-weight: 800; margin: 0 0 8px; line-height: 1.3; }
.detail-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.chip2 { display: inline-block; padding: 5px 11px; border-radius: 999px; background: #eef2ff; color: var(--brand); font-size: 12.5px; font-weight: 700; }
.chip2.muted { background: var(--soft); color: #5b616c; }
.detail-sec-title { font-size: 16px; font-weight: 800; margin: 22px 0 8px; }
.detail-intro { font-size: 14.5px; color: #3a404b; line-height: 1.65; white-space: pre-wrap; }
.pt-row { display: flex; align-items: center; gap: 12px; padding: 13px 2px; border-bottom: 1px solid var(--line); }
.pt-row:last-child { border-bottom: 0; }
.pt-row .num { width: 26px; height: 26px; border-radius: 999px; background: var(--brand); color: #fff; display: grid; place-items: center; font-size: 13px; font-weight: 700; flex: 0 0 auto; }
.pt-row .nm { font-size: 14.5px; font-weight: 600; }

@media (min-width: 860px) {
  .list-grid { grid-template-columns: repeat(4, 1fr); gap: 20px; }
  .detail-hero { aspect-ratio: 24 / 9; }
}

/* 패스포트 진입 CTA (코스 상세) */
.cta-btn {
  display: block; text-align: center; margin: 16px 0 4px;
  padding: 14px; border-radius: 12px; font-weight: 700;
  background: #2f6bed; color: #fff; text-decoration: none;
}
.cta-btn.ghost { background: #f1f3f6; color: #333; }
