:root {
  --bg: #f7f6f2;
  --surface: #ffffff;
  --surface2: #f2f1ec;
  --ink: #17191c;
  --ink2: #50555c;
  --ink3: #8e949b;
  --line: rgba(20, 22, 26, .08);
  --line2: rgba(20, 22, 26, .14);
  --accent: #ff5a1f;
  --c0: #ff5a1f;   /* 맛집 */
  --c1: #a0693f;   /* 카페 */
  --c2: #ec4f86;   /* 디저트 */
  --c3: #7a5cff;   /* 술집 */
  --naver: #03c75a;
  --shadow: 0 10px 30px rgba(20, 22, 26, .12), 0 2px 6px rgba(20, 22, 26, .06);
  --glass: rgba(255, 255, 255, .82);
  --ease-out: cubic-bezier(.23, 1, .32, 1);
  --ease-drawer: cubic-bezier(.32, .72, 0, 1);
  --r: 18px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1012; --surface: #17191c; --surface2: #1f2226; --ink: #f2f3f5; --ink2: #b4b9c0; --ink3: #7d838b;
    --line: rgba(255, 255, 255, .08); --line2: rgba(255, 255, 255, .14); --glass: rgba(23, 25, 28, .82);
    --shadow: 0 10px 30px rgba(0, 0, 0, .45), 0 2px 6px rgba(0, 0, 0, .3); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1012; --surface: #17191c; --surface2: #1f2226; --ink: #f2f3f5; --ink2: #b4b9c0; --ink3: #7d838b;
  --line: rgba(255, 255, 255, .08); --line2: rgba(255, 255, 255, .14); --glass: rgba(23, 25, 28, .82);
  --shadow: 0 10px 30px rgba(0, 0, 0, .45), 0 2px 6px rgba(0, 0, 0, .3); color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  background: var(--bg); color: var(--ink); overflow: hidden;
  font: 14px/1.5 "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  letter-spacing: -.01em; -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
.press { transition: transform 160ms var(--ease-out); }
.press:active { transform: scale(.97); }

#map { position: fixed; inset: 0; z-index: 0; background: var(--surface2); }
.leaflet-container { font: inherit; background: var(--surface2); }
.leaflet-control-attribution { font-size: 10px; background: var(--glass) !important; color: var(--ink3); }
.leaflet-control-attribution a { color: var(--ink2); }

/* ── 상단 ───────────────────────────────────────────────── */
.top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 30;
  padding: calc(env(safe-area-inset-top) + 10px) 12px 0; pointer-events: none;
}
.top > * { pointer-events: auto; }
.bar {
  display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 4px 0 12px;
  background: var(--glass); backdrop-filter: saturate(1.8) blur(18px); -webkit-backdrop-filter: saturate(1.8) blur(18px);
  border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow);
}
.logo { font-weight: 800; font-size: 15.5px; letter-spacing: -.04em; white-space: nowrap; }
.logo b { color: var(--accent); }
.where {
  flex: 1; min-width: 0; height: 32px; display: flex; align-items: center; gap: 6px; padding: 0 10px;
  border-radius: 10px; background: var(--surface2); color: var(--ink2); font-size: 13px;
}
.where span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.where svg { flex: none; }
.icon-btn { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; color: var(--ink2); }
.icon-btn:active { background: var(--surface2); }

.modes {
  margin-top: 6px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 3px; padding: 3px;
  background: var(--glass); backdrop-filter: saturate(1.8) blur(18px); -webkit-backdrop-filter: saturate(1.8) blur(18px);
  border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); position: relative;
}
.mode {
  height: 31px; border-radius: 9px; font-weight: 650; font-size: 13px; color: var(--ink2);
  display: flex; align-items: center; justify-content: center; gap: 5px; position: relative; z-index: 1;
  transition: color 200ms ease;
}
.mode[aria-selected="true"] { color: #fff; }
.mode-pill {
  position: absolute; top: 3px; bottom: 3px; left: 3px; border-radius: 9px; z-index: 0;
  transition: transform 260ms var(--ease-out), background-color 260ms ease; background: var(--c0);
}
.chips {
  margin: 6px -12px 0; padding: 0 12px 4px; display: flex; gap: 5px; overflow-x: auto; scrollbar-width: none;
  scroll-snap-type: x proximity; scroll-padding-left: 12px;
  -webkit-mask: linear-gradient(90deg, #000 calc(100% - 28px), transparent); mask: linear-gradient(90deg, #000 calc(100% - 28px), transparent);
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; height: 30px; padding: 0 11px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
  background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line); box-shadow: 0 2px 8px rgba(20, 22, 26, .06); color: var(--ink2);
  scroll-snap-align: start; transition: background-color 160ms ease, color 160ms ease, transform 160ms var(--ease-out);
  white-space: nowrap;
}
.chip:active { transform: scale(.96); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: transparent; }
.chip.toggle[aria-pressed="true"] { background: var(--accent); color: #fff; }

/* ── 바텀시트 / 사이드 패널 ─────────────────────────────── */
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; height: 92dvh;
  background: var(--surface); border-radius: 22px 22px 0 0; box-shadow: 0 -8px 30px rgba(20, 22, 26, .14);
  display: flex; flex-direction: column; will-change: transform;
  transition: transform 420ms var(--ease-drawer);
}
.sheet.dragging { transition: none; }
.grab { padding: 8px 0 2px; touch-action: none; cursor: grab; }
.grab::before { content: ""; display: block; width: 38px; height: 5px; border-radius: 3px; background: var(--line2); margin: 0 auto; }
.sheet-head { padding: 4px 16px 8px; touch-action: none; display: flex; align-items: flex-end; gap: 10px; }
.sheet-title { flex: 1; min-width: 0; }
.sheet-title h2 { font-size: 17px; font-weight: 750; letter-spacing: -.03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sheet-title p { font-size: 12px; color: var(--ink3); margin-top: 1px; }
.sort[hidden] { display: none; }
.sort { display: flex; background: var(--surface2); border-radius: 10px; padding: 3px; flex: none; }
.sort button { height: 26px; padding: 0 9px; border-radius: 7px; font-size: 12px; font-weight: 600; color: var(--ink3); }
.sort button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
.sheet-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 0 12px calc(env(safe-area-inset-bottom) + 24px); }

/* 네이버 TOP 블록 */
.top5 {
  margin: 4px 2px 12px; border-radius: 16px; padding: 11px 12px 6px;
  background: linear-gradient(160deg, color-mix(in srgb, var(--naver) 10%, var(--surface)), var(--surface) 60%);
  border: 1px solid color-mix(in srgb, var(--naver) 22%, var(--line));
}
.top5-h { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.nbadge { width: 20px; height: 20px; border-radius: 6px; background: var(--naver); color: #fff; font-weight: 900; font-size: 12px; display: grid; place-items: center; }
.top5-h b { font-size: 14px; font-weight: 750; letter-spacing: -.02em; }
.top5-h small { margin-left: auto; color: var(--ink3); font-size: 11.5px; }
.top5-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 4px -2px 6px; padding: 0 2px; }
.top5-tabs::-webkit-scrollbar { display: none; }
.top5-tabs button { flex: none; height: 26px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 600; color: var(--ink2); background: var(--surface); border: 1px solid var(--line); }
.top5-tabs button[aria-pressed="true"] { background: var(--naver); color: #fff; border-color: transparent; }
.trow { display: flex; align-items: center; gap: 10px; padding: 8px 2px; border-top: 1px solid var(--line); }
.trow:first-of-type { border-top: 0; }
.rank { width: 22px; text-align: center; font-weight: 800; font-size: 16px; color: var(--naver); }
.trow .t { flex: 1; min-width: 0; }
.trow .t b { display: block; font-size: 14px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trow .t span { display: block; font-size: 12.5px; color: var(--ink3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.blogc { flex: none; font-size: 12px; font-weight: 650; color: var(--ink2); background: var(--surface2); border-radius: 8px; padding: 3px 8px; }
.top5-note { font-size: 12px; color: var(--ink3); padding: 6px 2px 8px; }

/* 가게 카드 */
.list-h { display: flex; align-items: center; justify-content: space-between; padding: 6px 6px 8px; color: var(--ink3); font-size: 12.5px; }
.card {
  display: flex; gap: 10px; align-items: center; padding: 9px 8px; border-radius: 12px; width: 100%; text-align: left;
  transition: background-color 120ms ease, transform 160ms var(--ease-out);
}
.card:active { background: var(--surface2); transform: scale(.985); }
@media (hover: hover) and (pointer: fine) { .card:hover { background: var(--surface2); } }
.ico {
  width: 38px; height: 38px; border-radius: 11px; flex: none; display: grid; place-items: center; font-size: 18px;
  background: color-mix(in srgb, var(--mc, var(--c0)) 13%, var(--surface));
}
.card .t { flex: 1; min-width: 0; }
.card .t b { font-size: 14.5px; font-weight: 650; letter-spacing: -.02em; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .t b small { font-weight: 500; color: var(--ink3); font-size: 12px; margin-left: 4px; }
.meta { font-size: 12px; color: var(--ink3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.tags { display: flex; gap: 4px; margin-top: 4px; flex-wrap: wrap; }
.tag { font-size: 10.5px; font-weight: 650; padding: 1px 6px; border-radius: 6px; background: var(--surface2); color: var(--ink2); }
.tag.hot { background: color-mix(in srgb, var(--accent) 14%, var(--surface)); color: var(--accent); }
.dist { flex: none; font-size: 12px; color: var(--ink3); font-weight: 600; }

.region-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 8px; border-radius: 14px; text-align: left; }
.region-row:active { background: var(--surface2); }
.region-row b { flex: 1; font-weight: 650; }
.region-row span { color: var(--ink3); font-size: 13px; }
.empty { text-align: center; color: var(--ink3); padding: 40px 20px; font-size: 14px; }
.more { display: block; width: calc(100% - 8px); margin: 6px 4px; height: 44px; border-radius: 12px; background: var(--surface2); font-weight: 650; color: var(--ink2); }

/* ── 상세 ──────────────────────────────────────────────── */
.scrim { position: fixed; inset: 0; z-index: 40; background: rgba(10, 11, 13, .32); opacity: 0; pointer-events: none; transition: opacity 240ms ease; }
.scrim.on { opacity: 1; pointer-events: auto; }
.detail {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; max-height: 86dvh; overflow-y: auto;
  background: var(--surface); border-radius: 24px 24px 0 0; padding: 8px 20px calc(env(safe-area-inset-bottom) + 20px);
  transform: translateY(100%); transition: transform 380ms var(--ease-drawer); box-shadow: 0 -10px 40px rgba(0, 0, 0, .2);
}
.detail.on { transform: translateY(0); }
.detail .grab { margin: 0 -20px 6px; }
.d-cat { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--mc, var(--c0)); padding: 4px 10px 4px 8px; border-radius: 999px; background: color-mix(in srgb, var(--mc, var(--c0)) 12%, transparent); }
.d-cat i { width: 8px; height: 8px; border-radius: 50%; background: var(--mc, var(--c0)); }
.detail h3 { font-size: 21px; font-weight: 800; letter-spacing: -.04em; line-height: 1.25; margin-top: 4px; }
.detail h3 small { font-size: 16px; font-weight: 600; color: var(--ink3); margin-left: 6px; }
.d-addr { display: flex; align-items: center; gap: 8px; color: var(--ink2); font-size: 14px; margin-top: 8px; }
.d-addr button { font-size: 12px; font-weight: 650; color: var(--ink3); background: var(--surface2); border-radius: 7px; padding: 2px 8px; flex: none; }
.d-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 8px; margin: 14px 0; }
.d-stats > .stat:only-child { display: flex; align-items: baseline; justify-content: space-between; padding: 10px 14px; }
.d-stats > .stat:only-child b { font-size: 16px; margin-top: 0; }
.mode { white-space: nowrap; }
.stat { background: var(--surface2); border-radius: 14px; padding: 12px 14px; }
.stat small { display: block; font-size: 12px; color: var(--ink3); font-weight: 600; }
.stat b { display: block; font-size: 18px; font-weight: 800; letter-spacing: -.03em; margin-top: 2px; }
.stat b.skel { width: 70px; height: 24px; border-radius: 7px; background: linear-gradient(90deg, var(--line), var(--line2), var(--line)); background-size: 200% 100%; animation: sh 1.1s linear infinite; }
@keyframes sh { to { background-position: -200% 0; } }
.d-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.btn {
  height: 44px; border-radius: 12px; font-weight: 700; font-size: 14px; display: flex; align-items: center; justify-content: center; gap: 7px;
  background: var(--surface2); color: var(--ink); transition: transform 160ms var(--ease-out), filter 160ms ease;
}
.btn:active { transform: scale(.97); }
.btn.naver { background: var(--naver); color: #fff; grid-column: 1 / -1; }
.btn.kakao { background: #fee500; color: #191600; }
.d-note { font-size: 12px; color: var(--ink3); margin-top: 14px; line-height: 1.6; }

/* ── 지역 선택 ─────────────────────────────────────────── */
.picker {
  position: fixed; inset: 0; z-index: 60; background: var(--bg); display: flex; flex-direction: column;
  transform: translateY(16px); opacity: 0; pointer-events: none; transition: transform 260ms var(--ease-out), opacity 200ms ease;
}
.picker.on { transform: none; opacity: 1; pointer-events: auto; }
.p-head { padding: calc(env(safe-area-inset-top) + 12px) 14px 10px; display: flex; gap: 8px; align-items: center; }
.p-search { flex: 1; height: 46px; border-radius: 14px; border: 1px solid var(--line2); background: var(--surface); padding: 0 14px; font: inherit; color: var(--ink); outline: none; }
.p-search:focus { border-color: var(--accent); }
.crumbs { display: flex; gap: 6px; padding: 0 14px 8px; flex-wrap: wrap; }
.crumbs button { font-size: 13px; font-weight: 650; color: var(--ink2); background: var(--surface2); border-radius: 999px; padding: 5px 11px; }
.p-body { flex: 1; overflow-y: auto; padding: 4px 14px calc(env(safe-area-inset-bottom) + 20px); }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.cell { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px; text-align: left; min-height: 68px; }
.cell b { display: block; font-size: 14.5px; font-weight: 700; letter-spacing: -.02em; }
.cell span { display: block; font-size: 12px; color: var(--ink3); margin-top: 2px; }
.p-sec { font-size: 13px; font-weight: 700; color: var(--ink3); margin: 14px 2px 8px; }

/* ── 지도 마커 ─────────────────────────────────────────── */
.bubble {
  transform: translate(-50%, -50%); display: inline-flex; flex-direction: column; align-items: center;
  background: var(--surface); color: var(--ink); border-radius: 14px; padding: 5px 10px 6px; white-space: nowrap;
  box-shadow: var(--shadow); border: 1px solid var(--line); font-size: 12px; line-height: 1.25; cursor: pointer;
  transition: transform 160ms var(--ease-out);
}
.bubble:active { transform: translate(-50%, -50%) scale(.96); }
.bubble b { font-size: 13.5px; font-weight: 800; color: var(--mc, var(--c0)); }
.bubble span { color: var(--ink2); font-weight: 600; }
.pin {
  transform: translate(-50%, -100%); padding: 5px 9px; border-radius: 10px; background: var(--ink); color: var(--bg);
  font-size: 12.5px; font-weight: 700; white-space: nowrap; box-shadow: var(--shadow); pointer-events: none;
}
.pin::after { content: ""; position: absolute; left: 50%; bottom: -5px; margin-left: -5px; border: 5px solid transparent; border-bottom: 0; border-top-color: var(--ink); }

.fab {
  position: fixed; right: 12px; z-index: 15; width: 40px; height: 40px; border-radius: 14px; background: var(--glass);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid var(--line); box-shadow: var(--shadow);
  display: grid; place-items: center; color: var(--ink2); transition: transform 160ms var(--ease-out), bottom 420ms var(--ease-drawer);
}
.fab:active { transform: scale(.94); }
.toast {
  position: fixed; left: 50%; top: calc(env(safe-area-inset-top) + 130px); z-index: 70; transform: translate(-50%, -8px); opacity: 0;
  background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 12px; font-size: 13.5px; font-weight: 600;
  transition: opacity 200ms ease, transform 260ms var(--ease-out); pointer-events: none; white-space: nowrap;
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.zoomhint {
  position: fixed; left: 50%; z-index: 15; transform: translateX(-50%); background: var(--glass); backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px); border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; font-size: 13px;
  font-weight: 600; color: var(--ink2); box-shadow: var(--shadow); transition: opacity 200ms ease, bottom 420ms var(--ease-drawer); white-space: nowrap;
}

/* ── 데스크톱: 왼쪽 패널 ──────────────────────────────── */
@media (min-width: 900px) {
  .top { right: auto; width: 420px; padding: 14px 0 0 14px; }
  .chips { margin: 8px 0 0; padding: 0 0 6px; }
  .sheet {
    top: 14px; left: 14px; bottom: 14px; right: auto; width: 420px; height: auto; border-radius: 22px; transform: none !important;
    padding-top: 150px; box-shadow: var(--shadow); border: 1px solid var(--line);
  }
  .grab { display: none; }
  .top .bar, .top .modes { box-shadow: none; }
  .detail {
    left: auto; right: 14px; bottom: 14px; top: auto; width: 400px; border-radius: 22px; max-height: calc(100dvh - 28px);
    transform: translateX(calc(100% + 30px));
  }
  .detail .grab { display: none; }
  .detail.on { transform: none; }
  .scrim { display: none; }
  .fab { bottom: 24px !important; }
  .zoomhint { left: calc(50% + 217px); bottom: 24px !important; }
  .picker { inset: 14px auto 14px 14px; width: 420px; border-radius: 22px; box-shadow: var(--shadow); border: 1px solid var(--line); }
}
@media (prefers-reduced-motion: reduce) {
  .sheet, .detail, .picker, .mode-pill, .fab, .zoomhint { transition-duration: 0ms !important; }
}

/* ── 유튜버 픽 ─────────────────────────────────────────── */
.chip.yt[aria-pressed="true"] { background: #ff0033; color: #fff; }
.tag.ytt { background: color-mix(in srgb, #ff0033 12%, var(--surface)); color: #e0002d; }
.ytb { margin: 4px 4px 14px; }
.ytb-h { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; padding: 0 2px; }
.ytlogo { width: 22px; height: 16px; border-radius: 5px; background: #ff0033; color: #fff; font-size: 8px; display: grid; place-items: center; }
.ytb-h b { font-size: 14px; font-weight: 750; letter-spacing: -.02em; }
.ytb-h small { margin-left: auto; color: var(--ink3); font-size: 12px; }
.ytb-row { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px 4px; scroll-snap-type: x proximity; }
.ytb-row::-webkit-scrollbar { display: none; }
.ytc { flex: none; width: 144px; text-align: left; position: relative; scroll-snap-align: start; }
.ytc img { width: 144px; height: 81px; object-fit: cover; border-radius: 12px; background: var(--surface2); display: block; }
.ytc b { display: block; font-size: 13px; font-weight: 700; margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ytc span { display: block; font-size: 11.5px; color: var(--ink3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ytc .ytn { position: absolute; top: 6px; left: 6px; background: #ff0033; color: #fff; font-size: 11px; font-weight: 800; padding: 2px 7px; border-radius: 6px; }
.d-yt { margin: 0 0 16px; }
.d-yt-h { font-size: 15px; font-weight: 750; margin-bottom: 8px; }
.d-yt-h small { color: var(--ink3); font-weight: 600; font-size: 12.5px; margin-left: 4px; }
.vid { display: flex; gap: 12px; align-items: center; padding: 6px 0; }
.vid img { width: 112px; height: 63px; border-radius: 10px; object-fit: cover; flex: none; background: var(--surface2); }
.vid span { min-width: 0; }
.vid b { display: block; font-size: 12.5px; color: #e0002d; font-weight: 750; }
.vid em { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-style: normal; font-size: 13.5px; font-weight: 600; line-height: 1.35; }
.vid small { font-size: 11.5px; color: var(--ink3); }

/* 목록 범위: 동 전체 / 이 화면만 */
.list-h .scope { display: inline-flex; background: var(--surface2); border-radius: 9px; padding: 2px; }
.list-h .scope button { height: 24px; padding: 0 9px; border-radius: 7px; font-size: 12px; font-weight: 650; color: var(--ink3); }
.list-h .scope button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
@media (min-width: 900px) { .sheet { padding-top: 132px; } }

/* 목록이 올라와 있을 때 — 스와이프가 안 먹는 앱 안 브라우저(카톡 등)에서도 확실히 내리는 버튼 */
.mapbtn {
  position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 18px); z-index: 25;
  transform: translate(-50%, 16px); opacity: 0; pointer-events: none;
  display: flex; align-items: center; gap: 6px; height: 40px; padding: 0 16px; border-radius: 999px;
  background: var(--ink); color: var(--bg); font-weight: 700; font-size: 13.5px; box-shadow: var(--shadow);
  transition: transform 220ms var(--ease-out), opacity 180ms ease;
}
.mapbtn.on { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }
.mapbtn.on:active { transform: translate(-50%, 0) scale(.96); }
@media (min-width: 900px) { .mapbtn { display: none; } }

/* 강조 렌즈 — 필터가 아니라 '이것을 도드라지게' (2026-10-05) */
/* 탭 줄 오른쪽에 붙는 작은 강조 버튼 — 위쪽 조작부를 3줄 → 2줄로 (10-06) */
.row2 { margin-top: 6px; display: flex; gap: 6px; align-items: stretch; }
.row2 .modes { flex: 1; margin-top: 0; min-width: 0; }
.lens { display: flex; gap: 4px; }
.lens button { flex-direction: column; gap: 1px !important; width: 46px; height: auto !important; padding: 4px 0; font-size: 10px !important; border-radius: 12px !important; }
.lens .lt { line-height: 1; letter-spacing: -.03em; }
.lens button {
  height: 30px; border-radius: 10px; font-size: 12.5px; font-weight: 700; color: var(--ink2);
  display: flex; align-items: center; justify-content: center; gap: 5px;
  background: var(--glass); backdrop-filter: saturate(1.8) blur(18px); -webkit-backdrop-filter: saturate(1.8) blur(18px);
  border: 1px solid var(--line); box-shadow: 0 2px 8px rgba(20, 22, 26, .06);
  transition: background-color 180ms ease, color 180ms ease, transform 160ms var(--ease-out);
}
.lens button:active { transform: scale(.97); }
.lens .ylogo { width: 16px; height: 12px; border-radius: 3px; background: #ff0033; color: #fff; font-size: 6px; display: grid; place-items: center; }
.lens .nlogo { width: 14px; height: 14px; border-radius: 4px; background: var(--naver); color: #fff; font-size: 9px; font-weight: 900; display: grid; place-items: center; }
.lens button[data-lens="yt"][aria-pressed="true"] { background: #ff0033; color: #fff; border-color: transparent; }
.lens button[data-lens="nv"][aria-pressed="true"] { background: var(--naver); color: #fff; border-color: transparent; }
.lens button[data-lens="both"][aria-pressed="true"] { background: linear-gradient(100deg, #ff0033, var(--naver)); color: #fff; border-color: transparent; }
.lens button[aria-pressed="true"] .ylogo { background: #fff; color: #ff0033; }
.lens button[aria-pressed="true"] .nlogo { background: #fff; color: var(--naver); }
.rpin {
  transform: translate(-50%, -100%); display: inline-flex; align-items: center; gap: 5px; white-space: nowrap;
  background: var(--naver); color: #fff; font-size: 12px; font-weight: 700; padding: 4px 9px 4px 4px; border-radius: 999px;
  box-shadow: 0 6px 16px rgba(3, 199, 90, .35); cursor: pointer; position: relative;
}
.rpin b { width: 18px; height: 18px; border-radius: 50%; background: #fff; color: var(--naver); font-size: 11px; display: grid; place-items: center; }
.rpin::after { content: ""; position: absolute; left: 50%; bottom: -5px; margin-left: -5px; border: 5px solid transparent; border-bottom: 0; border-top-color: var(--naver); }
.rpin.both { background: linear-gradient(100deg, var(--naver), #ff0033); }
.rpin i { font-style: normal; }
.rpin.mini { padding: 3px; gap: 0; }
.rpin.mini span { display: none; }
@media (min-width: 900px) { .sheet { padding-top: 168px; } }

/* 범위 [동·구·시·이 화면] */
.scopebar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 3px; margin: 2px 2px 12px; padding: 3px; background: var(--surface2); border-radius: 11px; }
.scopebar button { height: 30px; border-radius: 8px; font-size: 12.5px; font-weight: 700; color: var(--ink3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 4px; }
.scopebar button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
.top5-sep { font-size: 11.5px; color: var(--ink3); padding: 8px 2px 4px; border-top: 1px dashed var(--line2); margin-top: 2px; }
#chips[hidden] { display: none; }
@media (min-width: 900px) { .sheet { padding-top: 128px; } }

/* 순위 정렬 토글 */
.rsort { display: inline-flex; background: color-mix(in srgb, var(--naver) 8%, var(--surface)); border-radius: 9px; padding: 2px; margin: 2px 0 4px; }
.rsort button { height: 24px; padding: 0 9px; border-radius: 7px; font-size: 11.5px; font-weight: 700; color: var(--ink3); }
.rsort button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
.top5-sep[hidden] { display: none; }

/* 지역 고르기 — 맨 아래 고정 '전체' 버튼 */
.p-body { padding-bottom: calc(env(safe-area-inset-bottom) + 96px); }
.p-all {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 2; display: flex; gap: 8px;
  padding: 12px 14px calc(env(safe-area-inset-bottom) + 12px);
  background: linear-gradient(to top, var(--bg) 70%, transparent);
}
.p-allbtn { flex: 1; height: 50px; border-radius: 14px; background: var(--ink); color: var(--bg); font-weight: 750; font-size: 15px; }
.p-allbtn.sub { flex: .8; background: var(--surface); color: var(--ink); border: 1px solid var(--line2); }
@media (min-width: 900px) { .p-all { position: sticky; margin: 12px -14px 0; } }
