:root {
  --brand: #ff7fa5;
  --brand-dark: #b93d67;
  --ink: #241d28;
  --muted: #6f6378;
  --line: #f0dce4;
  --card: #fff;
  --r: 14px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; overflow: hidden; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard", "Noto Sans KR", sans-serif;
  color: var(--ink); background: #fff;
}
#map { position: fixed; inset: 0; }
.maplibregl-ctrl-bottom-right { bottom: calc(178px + var(--safe-b)) !important; }

/* ---- 상단 바 ---- */
#topbar {
  position: fixed; top: calc(10px + env(safe-area-inset-top, 0px)); left: 12px; right: 12px;
  display: flex; justify-content: space-between; align-items: center;
  z-index: 40; pointer-events: none;
}
#topbar > * { pointer-events: auto; }
.logo {
  margin: 0;
  background: var(--card); border-radius: 999px; padding: 9px 15px;
  font-weight: 800; font-size: 14.5px; box-shadow: 0 3px 12px rgba(0,0,0,0.14);
}
.logo span { color: var(--brand-dark); font-size: 12px; font-weight: 700; }
.top-r { display: flex; gap: 8px; align-items: center; }
.top-link {
  background: var(--card); border-radius: 999px; padding: 9px 13px; height: 42px;
  display: flex; align-items: center; font-weight: 800; font-size: 13px;
  color: var(--ink); text-decoration: none; box-shadow: 0 3px 12px rgba(0,0,0,0.14);
}
#burger {
  width: 42px; height: 42px; border: none; border-radius: 12px;
  background: var(--card); font-size: 19px; color: var(--ink);
  box-shadow: 0 3px 12px rgba(0,0,0,0.14); cursor: pointer;
}

/* ---- 드로어 ---- */
#dim { position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 48; }
#dim.hidden { display: none; }
#drawer {
  position: fixed; top: 0; right: -300px; width: 300px; height: 100%;
  background: var(--card); z-index: 50; transition: right 0.25s ease;
  display: flex; flex-direction: column; padding: 14px 16px calc(14px + var(--safe-b));
  overflow-y: auto;
}
#drawer.open { right: 0; }
.dr-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.dr-head b { font-size: 17px; }
#drawerClose { border: none; background: none; font-size: 17px; color: var(--muted); cursor: pointer; }
.dr-sec { margin: 10px 0; }
.dr-title { font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 8px; }
.dr-title .dim { font-weight: 400; }
#sido {
  width: 100%; padding: 10px 12px; border: 1.5px solid var(--line);
  border-radius: 10px; font-size: 14px; background: #fff;
}
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  border: 1.5px solid var(--line); background: #fff; color: var(--muted);
  border-radius: 999px; padding: 7px 13px; font-size: 13px; cursor: pointer;
}
.chip.on { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 700; }
#favList .fav-item {
  display: flex; align-items: center; gap: 9px; padding: 7px 4px; cursor: pointer;
  border-bottom: 1px solid var(--line);
}
#favList .fav-item img { width: 44px; height: 34px; object-fit: cover; border-radius: 7px; background: var(--line); }
#favList .fav-item .fn { font-size: 13.5px; font-weight: 600; }
#favList .fav-item .fl { font-size: 11px; color: var(--muted); }
#favList .empty { font-size: 12.5px; color: var(--muted); padding: 6px 0; }
.dr-link {
  display: block; padding: 10px 12px; margin-bottom: 6px; border: 1px solid var(--line);
  border-radius: 10px; font-size: 14px; font-weight: 700; color: var(--ink); text-decoration: none;
}
.dr-foot { margin-top: auto; font-size: 11px; color: var(--muted); line-height: 1.6; }
.dr-foot a { color: var(--muted); }
.dr-guides { display: flex; flex-wrap: wrap; gap: 6px; }
.dr-guides a {
  padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px;
  font-size: 13px; font-weight: 700; color: var(--ink); text-decoration: none;
}
.dr-guides small { color: var(--muted); font-weight: 600; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- 바닥 시트 ---- */
#sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
  background: var(--card); border-radius: 18px 18px 0 0;
  box-shadow: 0 -6px 24px rgba(0,0,0,0.14);
  padding-bottom: var(--safe-b);
}
#handle { width: 42px; height: 4.5px; border-radius: 3px; background: #ddd; margin: 8px auto 6px; cursor: pointer; }

/* 캐러셀 */
#carousel {
  display: flex; gap: 10px; overflow-x: auto; padding: 4px 12px 14px;
  scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
}
#carousel::-webkit-scrollbar { display: none; }
.c-card {
  flex: 0 0 236px; scroll-snap-align: start;
  border: 1px solid var(--line); border-radius: var(--r); overflow: hidden;
  background: #fff; position: relative;
}
.c-card .nm a { color: inherit; text-decoration: none; }
.c-card.active { border-color: var(--brand); box-shadow: 0 4px 14px rgba(232,99,140,0.25); }
.c-card .photo { width: 100%; height: 96px; object-fit: cover; display: block; background: var(--line); }
.c-card .photo-ph { width: 100%; height: 96px; display: flex; align-items: center; justify-content: center; font-size: 34px; background: var(--line); }
.c-card .body { padding: 9px 11px 11px; }
.c-card .nm { font-weight: 800; font-size: 14.5px; letter-spacing: -0.3px; }
.c-card .pr { font-size: 12.5px; color: var(--brand-dark); font-weight: 700; margin-top: 2px; }
.c-card .badges { display: flex; gap: 4px; margin-top: 5px; flex-wrap: wrap; }
.badge {
  font-size: 10.5px; padding: 2.5px 7px; border-radius: 6px;
  background: #f6eef2; color: #6f6378; font-weight: 600;
}
.badge.park { background: #e8f4ec; color: #236a35; }
.badge.nopark { background: #fdeeee; color: #c62838; }
.c-card .row2 { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
.star { border: none; background: none; font-size: 21px; cursor: pointer; color: #f2b824; padding: 2px 4px; }
.star.off { color: #ddd; }
.nav-btn {
  border: none; border-radius: 9px; background: var(--brand-dark); color: #fff;
  font-size: 13px; font-weight: 800; padding: 8px 14px; cursor: pointer;
}
.nav-btn:active { background: var(--brand-dark); }

/* 상세 시트 */
#detail { padding: 0 0 16px; max-height: 74vh; overflow-y: auto; }
#detail.hidden { display: none; }
#detail .hero { width: 100%; height: 190px; object-fit: cover; display: block; background: var(--line); }
#detail .hero-ph { width: 100%; height: 190px; display: flex; align-items: center; justify-content: center; font-size: 56px; background: var(--line); }
#detail .wrap { padding: 13px 16px 0; }
#detail .close {
  position: absolute; top: 10px; right: 12px; z-index: 5;
  width: 32px; height: 32px; border-radius: 999px; border: none;
  background: rgba(255,255,255,0.92); font-size: 15px; cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
#detail h2 { font-size: 19px; letter-spacing: -0.4px; display: flex; align-items: center; gap: 8px; }
#detail h2 .star { font-size: 22px; }
#detail .sub { color: var(--muted); font-size: 12.5px; margin-top: 3px; }
#detail .badges { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 10px; }
#detail .badges .badge { font-size: 12px; padding: 5px 10px; }
.sec {
  margin-top: 13px; background: #faf5f7; border-radius: 12px; padding: 11px 13px;
}
.sec .t { font-size: 12px; font-weight: 800; color: var(--brand-dark); margin-bottom: 6px; }
.sec .row { display: flex; justify-content: space-between; font-size: 13.5px; padding: 3px 0; gap: 10px; }
.sec .row .l { color: var(--ink); }
.sec .row .v { font-weight: 700; white-space: nowrap; }
.sec .note { font-size: 12px; color: var(--muted); margin-top: 5px; line-height: 1.5; }
.sec.cats .note a { color: var(--brand-dark); font-weight: 700; }
#detail .links { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 13px; }
#detail .links a {
  text-decoration: none; font-size: 12.5px; font-weight: 700;
  padding: 9px 13px; border-radius: 10px; background: #fff; color: var(--ink);
  border: 1.5px solid var(--line);
}
#detail .big-nav {
  display: block; width: 100%; margin-top: 14px;
  border: none; border-radius: 13px; background: var(--brand); color: #fff;
  font-size: 16px; font-weight: 800; padding: 14px; cursor: pointer;
}
#detail .big-nav:active { background: var(--brand-dark); }
#detail .src { text-align: center; font-size: 10.5px; color: var(--muted); margin-top: 10px; }

#sheetTop { display: flex; align-items: center; padding: 0 14px; }
#handle { flex: 1; margin: 8px 0 6px; }
#sortBtn {
  border: 1.5px solid var(--line); background: #fff; color: var(--ink);
  border-radius: 999px; padding: 5px 12px; font-size: 12px; font-weight: 700;
  cursor: pointer;
}
#sortBtn.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.kw-badges { display: flex; flex-wrap: wrap; gap: 5px; }
.kw-badge {
  background: #fff; border: 1.5px solid var(--brand); color: var(--brand-dark);
  border-radius: 999px; padding: 4px 10px; font-size: 11.5px; font-weight: 700;
}
.kw-badge small { color: var(--muted); font-weight: 400; }
#gallery { display: flex; gap: 6px; overflow-x: auto; scroll-snap-type: x mandatory; }
#gallery img { width: 72%; height: 180px; object-fit: cover; border-radius: 0; flex: 0 0 auto; scroll-snap-align: center; background: var(--line); }
.hours-row { display: flex; justify-content: space-between; font-size: 13px; padding: 2.5px 0; }
.hours-row .d { color: var(--muted); }
.hours-row.closed .t { color: #c62838; font-weight: 700; }

.suggest-btn {
  display: block; width: 100%; margin-top: 13px;
  border: 1.5px dashed var(--brand); background: #fff; color: var(--brand-dark);
  border-radius: 11px; padding: 11px; font-size: 13px; font-weight: 700; cursor: pointer;
}
.suggest-form { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.suggest-form select, .suggest-form textarea {
  width: 100%; padding: 10px 12px; border: 1.5px solid var(--line);
  border-radius: 10px; font-size: 16px; font-family: inherit; background: var(--bg);
}
#sgSubmit {
  border: none; border-radius: 10px; background: var(--brand-dark); color: #fff;
  font-size: 14px; font-weight: 800; padding: 12px; cursor: pointer;
}
#sgSubmit:disabled { opacity: 0.5; }
#sgMsg { font-size: 12px; color: var(--muted); }
.sg-thanks {
  margin-top: 10px; background: #e8f4ec; color: #2e7d43;
  border-radius: 10px; padding: 11px; font-size: 13px; font-weight: 700; text-align: center;
}
