/* 명당로드 — styles
   아트 디렉션(docs/design-direction.md): 심플 모던, "지도가 첫 화면"
   제목 IBM Plex Sans KR 600 · 숫자 Pretendard · 지도 단계색 5단계 한 계열 · 움직임은 경계선 그리기 하나 */
:root {
  --bg: #F5F5F2;
  --surface: #FFFFFF;
  --surface-2: #EDEDE9;
  --ink: #17181B;
  --ink-2: #3D3E42;
  --ink-3: #6A6C70;
  --line: #E3E3DE;
  --brand: #B8452A;
  --brand-ink: #A23C24;
  --btn: #17181B;            /* 주 버튼: 잉크 (포인트 색은 숫자·지도·선택에만) */
  --on-btn: #F5F5F2;
  /* 지도 단계색: 한 계열 5단계 (데이터) */
  --c0: #E9E9E4; --c1: #F0DDD5; --c2: #E1B6A6; --c3: #CE8D76; --c4: #B8654C; --c5: #8F4630;
  --map-stroke: #F5F5F2;
  --b-y: #FBC400; --b-b: #69C8F2; --b-r: #FF7272; --b-k: #AAAAAA; --b-g: #B0D840;
  --r-card: 12px; --r-ctl: 10px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --gutter: 16px;
  --title: "IBM Plex Sans KR", "Pretendard Variable", Pretendard, "Apple SD Gothic Neo", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121314; --surface: #1A1B1D; --surface-2: #232427;
    --ink: #E9E9E6; --ink-2: #C3C4C2; --ink-3: #8D8F93; --line: #2B2C2F;
    --brand: #CF7A63; --brand-ink: #D88B76;
    --btn: #E9E9E6; --on-btn: #121314;
    --c0: #202124; --c1: #33282A; --c2: #4E352F; --c3: #714537; --c4: #9A5C49; --c5: #C47A63;
    --map-stroke: #121314;
    --b-y: #DDB012; --b-b: #64BEE5; --b-r: #F36C6C; --b-k: #A2A2A2; --b-g: #A5CA40;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 70px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
  font-size: 16px; line-height: 1.5; font-weight: 500; letter-spacing: -0.01em; word-break: keep-all; overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
h1, h2, h3, p, dl, dd, ol, ul { margin: 0; }
b, strong { font-weight: 700; }
ol, ul { padding: 0; list-style: none; }
button, input, select { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.ic { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: var(--r-ctl); }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: var(--r-ctl); text-decoration: none; font-weight: 700; }
.skip:focus { top: 12px; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 var(--gutter); }
main.wrap { display: grid; gap: 12px; padding-bottom: 24px; }
.stack { display: grid; gap: 12px; padding-top: 20px; padding-bottom: 8px; }

/* ---------- top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 20; background: var(--bg); border-bottom: 1px solid var(--line); }
.topbar-in { display: flex; align-items: center; gap: 12px; height: 56px; }
.logo { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-family: var(--title); font-weight: 600; font-size: 19px; letter-spacing: -0.03em; }
.topnav { display: none; gap: 2px; margin-left: 16px; }
.topnav a { text-decoration: none; font-size: 14px; font-weight: 500; color: var(--ink-3); padding: 8px 10px; border-radius: var(--r-ctl); }
.topnav a:hover { color: var(--ink); background: var(--surface-2); }
.pill-link { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; height: 36px; padding: 0 12px 0 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 14px; font-weight: 700; text-decoration: none; }
.pill-link:hover { border-color: var(--ink-3); }
.pill-link .ic { width: 16px; height: 16px; color: var(--ink-3); }
@media (min-width: 760px) { .topnav { display: flex; } }

/* ---------- 첫 화면: 지도 ---------- */
.hero { border-bottom: 1px solid var(--line); padding: 20px 0 8px; }
.hero-grid { display: grid; gap: 16px; grid-template-areas: "head" "map" "panel"; }
.hero-head { grid-area: head; min-width: 0; }
.map-box { grid-area: map; min-width: 0; }
.region-panel { grid-area: panel; min-width: 0; }
.hero-k { font-family: var(--title); font-weight: 600; font-size: 16px; color: var(--ink-2); letter-spacing: -0.02em; }
.hero-place { margin-top: 12px; font-family: var(--title); font-weight: 600; font-size: 20px; letter-spacing: -0.03em; }
.hero-big { display: flex; align-items: baseline; gap: 4px; line-height: 1; margin-top: 4px; }
.hero-big b { font-size: clamp(36px, 10vw, 88px); font-weight: 800; letter-spacing: -0.045em; font-variant-numeric: tabular-nums; color: var(--ink); }
.hero-big span { font-size: 20px; font-weight: 700; color: var(--ink-2); }
.hero-meta { margin-top: 8px; font-size: 14px; color: var(--ink-3); }
.hero-meta + .hero-meta { margin-top: 2px; }
.hero-meta:empty { display: none; }
.hero-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 16px; }
.hero-tools .btn { min-height: 44px; font-size: 14px; padding: 0 14px; }

/* 이번 주 · 추첨까지 */
.cd { display: grid; gap: 2px; padding-bottom: 16px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.cd-label { font-size: 14px; color: var(--ink-3); }
.cd-label #cd-round { color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; }
.cd-date { font-variant-numeric: tabular-nums; }
.cd-digits { font-size: 28px; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1.2; }
.cd-digits i { font-style: normal; font-size: 14px; font-weight: 600; color: var(--ink-3); margin: 0 2px; }
.cd-foot { font-size: 14px; color: var(--ink-2); }
.cd.live .cd-digits b { color: var(--brand); }

/* ---------- cards ---------- */
.card { background: var(--surface); border-radius: var(--r-card); border: 1px solid var(--line); padding: 20px 16px; min-width: 0; }
.sec-title { font-family: var(--title); font-size: 20px; font-weight: 600; letter-spacing: -0.03em; display: flex; align-items: center; gap: 8px; line-height: 1.35; }
.sec-title .ic { color: var(--ink-3); }
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.sec-desc { margin: 8px 0 14px; font-size: 14px; color: var(--ink-3); line-height: 1.6; }
.wrap-head { flex-wrap: wrap; }
.badge { min-width: 24px; height: 22px; padding: 0 7px; border-radius: 999px; display: inline-grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--surface-2); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.chip-muted { font-size: 12px; color: var(--ink-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.note { margin-top: 12px; font-size: 12px; color: var(--ink-3); line-height: 1.6; }
.hint { margin-top: 8px; font-size: 12px; color: var(--ink-3); }
.empty { font-size: 14px; color: var(--ink-3); padding: 6px 0 2px; }

/* buttons & inputs */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 48px; padding: 0 18px; border-radius: var(--r-ctl); border: 1px solid transparent; font-size: 16px; font-weight: 700; text-decoration: none; transition: background-color .15s, border-color .15s, opacity .15s; }
.btn:active { opacity: .85; }
.btn-primary { color: var(--on-btn); background: var(--btn); }
.btn-primary:hover { background: color-mix(in srgb, var(--btn) 88%, var(--bg)); }
.btn-primary[disabled] { opacity: .6; }
.btn-soft { background: var(--surface-2); color: var(--ink); }
.btn-soft:hover { background: color-mix(in srgb, var(--surface-2) 92%, var(--ink)); }
.btn-outline { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-outline:hover { border-color: var(--ink-3); }
.btn-outline .ic { color: var(--ink-3); }
.btn-block { width: 100%; margin-top: 12px; }
.btn-grow { flex: 1; }
.btn-row { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }

.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: var(--r-ctl); background: var(--surface-2); }
.seg button { border: 1px solid transparent; background: transparent; padding: 6px 12px; min-height: 34px; border-radius: 8px; font-size: 14px; font-weight: 500; color: var(--ink-3); white-space: nowrap; }
.seg button[aria-checked="true"] { background: var(--surface); color: var(--ink); font-weight: 700; border-color: var(--line); }
.seg.small button { padding: 6px 10px; }

.field { display: grid; gap: 6px; font-size: 12px; font-weight: 500; color: var(--ink-3); min-width: 0; }
select, input[type="search"] { width: 100%; min-height: 46px; border-radius: var(--r-ctl); border: 1px solid var(--line); background: var(--surface); padding: 0 12px; font-size: 16px; font-weight: 500; color: var(--ink); }
select { -webkit-appearance: none; appearance: none; padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6.75 9.75 5.25 5.25 5.25-5.25' fill='none' stroke='%236B6E75' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 20px; }
select:focus, input:focus { border-color: var(--ink); outline: none; }
.check { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 500; color: var(--ink-2); white-space: nowrap; }
.check input, .dots-toggle input { width: 17px; height: 17px; accent-color: var(--brand); margin: 0; }

/* ---------- balls: 공식 5색 평면 원 ---------- */
.ball { width: 34px; height: 34px; border-radius: 50%; display: inline-grid; place-items: center; font-weight: 700; font-size: 14px; color: #fff; flex: none; font-variant-numeric: tabular-nums; text-shadow: 0 1px 0 rgba(0, 0, 0, .18); }
.ball.y { background: var(--b-y); } .ball.b { background: var(--b-b); } .ball.r { background: var(--b-r); } .ball.k { background: var(--b-k); } .ball.g { background: var(--b-g); }
.ball.sm { width: 28px; height: 28px; font-size: 12px; }
.plus { color: var(--ink-3); font-weight: 500; padding: 0 2px; }

/* ---------- this week ---------- */
.week-balls { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
/* 본번호 6 + 보너스가 360px 폭에서도 한 줄에 */
.week-balls .ball { width: clamp(26px, calc((100% - 6 * 6px - 18px) / 7), 34px); height: auto; aspect-ratio: 1; font-size: clamp(12px, 3.6vw, 14px); }
.week-balls .plus { padding: 0; }
.week-meta { margin-top: 10px; font-size: 14px; color: var(--ink-2); }
.week-meta b { color: var(--ink); }
.week .store-list { margin-top: 12px; }
.week-nav { margin-top: 12px; display: flex; justify-content: flex-end; }
.sel-wrap select { min-height: 40px; font-size: 14px; width: auto; }

/* ---------- store list ---------- */
.store-list { display: grid; gap: 8px; }
.store { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: start; padding: 12px; border-radius: var(--r-card); background: var(--surface); border: 1px solid var(--line); }
.store-rank { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 14px; border: 1px solid var(--line); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.store-rank.r1, .store-rank.r2, .store-rank.r3 { border-color: var(--ink); color: var(--ink); }
.store-rank.pin { color: var(--ink-2); }
.store-rank.pin .ic { width: 18px; height: 18px; }
.store-body { min-width: 0; }
.store-name { font-weight: 700; font-size: 16px; letter-spacing: -0.02em; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.tag { font-size: 12px; font-weight: 500; padding: 1px 7px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-2); white-space: nowrap; }
.tag.manual { color: var(--ink); border-color: var(--ink-3); }
.tag.closed { border-style: dashed; color: var(--ink-3); }
.store-addr { margin-top: 2px; font-size: 14px; color: var(--ink-3); line-height: 1.45; }
.store-meta { margin-top: 4px; font-size: 12px; color: var(--ink-2); }
.store-links { grid-column: 1 / -1; margin-top: -2px; display: flex; flex-wrap: wrap; gap: 6px; }
.store-links a { font-size: 12px; font-weight: 700; text-decoration: none; padding: 6px 10px; white-space: nowrap; min-height: 32px; display: inline-flex; align-items: center; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); }
.store-links a:hover { border-color: var(--ink-3); color: var(--ink); }
.store-side { display: grid; justify-items: end; gap: 6px; }
.store-count { font-size: 20px; font-weight: 700; color: var(--brand); line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -0.03em; white-space: nowrap; }
.store-count small { font-size: 12px; font-weight: 500; color: var(--ink-3); margin-left: 1px; }
.fav-btn { width: 36px; height: 36px; border-radius: var(--r-ctl); border: 0; background: transparent; color: var(--ink-3); display: grid; place-items: center; }
.fav-btn .ic { width: 20px; height: 20px; }
.fav-btn[aria-pressed="true"] { color: var(--brand); }
.fav-btn:hover { background: var(--surface-2); }
.store-list.compact .store { padding: 10px 12px; }

/* ---------- map ---------- */
.map-box { position: relative; }
.korea { display: block; width: 100%; height: auto; max-height: 64vh; margin: 0 auto; touch-action: manipulation; }
.korea .rg { fill: var(--c0); stroke: var(--map-stroke); stroke-width: .9; stroke-linejoin: round; cursor: pointer; transition: opacity .2s; outline: none; }
.korea .rg:hover, .korea .rg:focus-visible { stroke: var(--ink); stroke-width: 1.2; }
.korea .sel-line { fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linejoin: round; pointer-events: none; }
.korea .sel-line.draw { stroke-dasharray: 1; stroke-dashoffset: 0; animation: drawline .4s var(--ease) both; }
@keyframes drawline { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
.korea.has-sel .rg:not(.sel) { opacity: .45; }
.korea .lbl { font-size: 9.5px; font-weight: 700; fill: var(--ink); pointer-events: none; text-anchor: middle; paint-order: stroke; stroke: var(--bg); stroke-opacity: .85; stroke-width: 2.6px; stroke-linejoin: round; letter-spacing: -0.02em; }
.korea .lbl .n { font-size: 9px; font-weight: 500; fill: var(--ink-2); font-variant-numeric: tabular-nums; }
.korea .dot { fill: var(--ink); stroke: var(--bg); stroke-width: .8; pointer-events: none; }
.korea .dot-ring { display: none; }
.korea.no-dots .dot, .korea.no-dots .dot-ring { display: none; }
.map-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.map-legend { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-3); }
.map-legend .ramp { display: flex; width: 140px; height: 8px; border-radius: 2px; overflow: hidden; }
.map-legend .ramp i { flex: 1; }
.dots-toggle { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; color: var(--ink-2); }

.rp-title { font-family: var(--title); font-weight: 600; font-size: 16px; letter-spacing: -0.02em; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.rp-title span { font-family: "Pretendard Variable", Pretendard, sans-serif; font-weight: 500; font-size: 14px; color: var(--ink-3); margin-left: 4px; }
.region-bars { margin-top: 10px; display: grid; gap: 2px; }
.rbar { display: grid; grid-template-columns: 52px 1fr 40px; align-items: center; gap: 8px; font-size: 12px; font-weight: 500; color: var(--ink-2); border: 0; background: transparent; padding: 4px; border-radius: 8px; text-align: left; }
.rbar:hover { background: var(--surface-2); }
.rbar .track { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.rbar .fill { display: block; height: 100%; border-radius: 99px; background: var(--brand); }
.rbar .v { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; color: var(--ink); }
.chips { display: flex; gap: 6px; overflow-x: auto; padding: 12px 24px 10px 0; -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); border-radius: 999px; padding: 6px 12px; min-height: 34px; font-size: 14px; font-weight: 500; white-space: nowrap; }
.chip b { color: var(--ink-3); margin-left: 4px; font-variant-numeric: tabular-nums; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip[aria-pressed="true"] b { color: inherit; opacity: .7; }

/* ---------- near / rank ---------- */
.near-form { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-items: end; }
.near-form .btn { grid-column: 1 / -1; min-height: 46px; }
.near-list, #near-list { margin-top: 12px; }
.rank-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.search { position: relative; flex: 1 1 100%; }
.search .ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-3); }
.search input { padding-left: 40px; }
.dist-km { color: var(--brand-ink); font-weight: 700; }

/* ---------- stats ---------- */
.stats-sub { font-size: 14px; color: var(--ink-2); margin: 12px 0; }
.hotcold { display: grid; gap: 8px; }
.hc { padding: 12px; border-radius: var(--r-card); border: 1px solid var(--line); }
.hc h3 { font-size: 14px; font-weight: 700; color: var(--ink-2); margin-bottom: 8px; }
.balls { display: flex; flex-wrap: wrap; gap: 6px; }
.ball-wrap { display: grid; justify-items: center; gap: 2px; font-size: 12px; font-weight: 500; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.freq { margin-top: 14px; display: grid; grid-template-columns: repeat(45, 1fr); align-items: end; gap: 2px; height: 150px; padding: 0 2px; border-bottom: 1px solid var(--line); }
.freq .bar { position: relative; border-radius: 2px 2px 0 0; min-height: 2px; background: var(--c3); }
.freq .bar.y { background: var(--b-y); } .freq .bar.b { background: var(--b-b); } .freq .bar.r { background: var(--b-r); } .freq .bar.k { background: var(--b-k); } .freq .bar.g { background: var(--b-g); }
.freq-axis { display: grid; grid-template-columns: repeat(45, 1fr); gap: 2px; padding: 3px 2px 0; font-size: 9px; color: var(--ink-3); font-variant-numeric: tabular-nums; text-align: center; }
.freq-axis span { white-space: nowrap; overflow: visible; display: flex; justify-content: center; }
.dist-grid { margin-top: 16px; display: grid; gap: 14px; }
.dist h3 { font-size: 14px; font-weight: 700; margin-bottom: 8px; }
.dist h3 small { font-weight: 500; color: var(--ink-3); font-size: 12px; }
.drow { display: grid; grid-template-columns: 54px 1fr 74px; gap: 8px; align-items: center; font-size: 12px; font-weight: 500; color: var(--ink-2); padding: 2px 0; font-variant-numeric: tabular-nums; }
.drow .track { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.drow .fill { display: block; height: 100%; border-radius: 99px; background: var(--c4); }
.drow .v { text-align: right; color: var(--ink-3); }
.drow .v b { color: var(--ink); }
.table-toggle { margin-top: 14px; }
/* 계산 설명: 기본은 접어 둔다 */
.how { margin-top: 12px; }
.how summary { cursor: pointer; font-size: 12px; font-weight: 700; color: var(--ink-2); padding: 6px 0; min-height: 32px; }
.how .note { margin-top: 4px; }
.table-toggle summary { cursor: pointer; font-size: 14px; font-weight: 700; color: var(--ink-2); padding: 6px 0; }
.freq-table { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 4px; margin-top: 8px; }
.freq-table div { display: flex; align-items: center; justify-content: space-between; gap: 4px; padding: 4px 8px 4px 4px; border-radius: var(--r-ctl); border: 1px solid var(--line); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------- share ---------- */
.share-row { display: grid; grid-template-columns: 1fr; gap: 8px; margin-bottom: 12px; }
.share-canvas { width: 100%; max-width: 420px; height: auto; aspect-ratio: 1; display: block; margin: 0 auto; border-radius: var(--r-card); border: 1px solid var(--line); background: var(--bg); }

/* ---------- promo ---------- */
.promo { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: var(--r-card); text-decoration: none; background: var(--surface); border: 1px solid var(--line); transition: border-color .15s; }
.promo:hover { border-color: var(--ink-3); }
.promo-txt { flex: 1; display: grid; min-width: 0; }
.promo-txt b { font-size: 16px; letter-spacing: -0.02em; }
.promo-txt span { font-size: 14px; color: var(--ink-3); }
.promo .ic { color: var(--ink-3); }
.notice { margin-top: 20px; }
.notice-list { margin: 12px 0 0; padding-left: 18px; list-style: disc; display: grid; gap: 8px; font-size: 14px; color: var(--ink-2); line-height: 1.65; }
.notice-list b { color: var(--ink); }
.notice-list a { color: var(--ink); font-weight: 700; margin-left: 4px; }

/* ---------- ads: 공용 ../common/ads.css(.jl-ad). 여기선 색과 버튼·링크와의 간격(150px 이상)만 맞춤 ---------- */
.jl-ad { --muted: var(--ink-3); }
.ad-slot .jl-ad { margin: 150px auto; }
.store-list > .feed-ad { grid-column: 1 / -1; list-style: none; min-width: 0; }
.feed-ad .jl-ad { margin: 150px auto; }

/* ---------- footer: 공용 컴포넌트(../common/footer.css) — 색만 이 사이트 토큰에 맞춤 ---------- */
.jl-footer { --muted: var(--ink-3); }
.jl-footer .jf-notes b { color: var(--ink-2); }
.jl-footer .jf-notes a { color: var(--ink); font-weight: 700; }

.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translate(-50%, 0); opacity: 0; pointer-events: none; z-index: 60;
  background: var(--ink); color: var(--bg); padding: 12px 16px; border-radius: var(--r-ctl); font-size: 14px; font-weight: 500; transition: opacity .2s, transform .25s var(--ease); max-width: calc(100% - 32px); }
.toast.show { opacity: 1; }

/* ---------- larger screens ---------- */
@media (min-width: 560px) {
  .hotcold { grid-template-columns: 1fr 1fr; }
  .near-form { grid-template-columns: 1fr 1fr auto; }
  .near-form .btn { grid-column: auto; }
  .search { flex: 1 1 240px; }
  .dist-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
}
@media (min-width: 900px) {
  :root { --gutter: 24px; }
  main.wrap { gap: 16px; }
  .card { padding: 24px; }
  .hero { padding: 40px 0 16px; }
  .hero-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); grid-template-areas: "map head" "map panel"; grid-template-rows: auto 1fr; column-gap: 56px; row-gap: 24px; }
  .korea { max-height: 82vh; }
  .region-panel { max-height: 520px; overflow-y: auto; padding-right: 4px; }
  .region-panel .feed-ad { display: none; } /* 넓은 화면에선 목록이 520px 스크롤 상자 안이라 인피드 광고를 넣지 않음(지도 아래 칸이 지역 광고 역할) */
  .stack { padding-top: 32px; gap: 16px; }
  .freq { height: 190px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
.share-card .share-row, .share-card .btn-row { max-width: 420px; margin-left: auto; margin-right: auto; }
@media (min-width: 900px) {
  .week .store-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #rank-list, #fav-list, #near-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.store-rank.pin .ic { display: none; }
.store-rank.pin::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }
