/* ============================================================
   점심 맛집 지도 — 리디자인 테마 (warm / clean / modern)
   기능·DOM 구조 유지, 외형만 리뉴얼. 팔레트는 아래 변수로 관리.
   ============================================================ */
@font-face {
  font-family: "Pretendard Variable";
  src: url("/static/fonts/PretendardVariable.woff2") format("woff2-variations");
  font-weight: 45 920; font-style: normal; font-display: swap;
}

:root {
  --primary: #f1543f;          /* 따뜻한 토마토 코랄 */
  --primary-dark: #d8412e;
  --primary-soft: #ffeae5;     /* 연한 틴트 */
  --accent: #ff9f1c;           /* 앰버 */
  --mint: #16b98a;             /* 프레시 그린 */
  --gold: #e0a52e;
  --cert: #3b82c4;             /* 인증 블루 */

  --ink: #20262e;
  --ink-2: #4a5560;
  --muted: #8a95a1;
  --bg: #f6f5f2;               /* 웜 오프화이트 */
  --card: #ffffff;
  --line: #eceef1;
  --line-2: #e3e6ea;

  --r-xs: 8px; --r-sm: 11px; --r: 14px; --r-lg: 20px; --r-pill: 999px;
  --sh-sm: 0 1px 2px rgba(20,26,34,.06), 0 1px 3px rgba(20,26,34,.05);
  --sh: 0 6px 20px rgba(20,26,34,.10);
  --sh-lg: 0 16px 40px rgba(20,26,34,.18);
  --font: "Pretendard Variable", Pretendard, -apple-system, "Apple SD Gothic Neo",
          "Malgun Gothic", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; font-family: var(--font); color: var(--ink);
  background: var(--bg); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body { display: flex; flex-direction: column; overflow: hidden; letter-spacing: -.01em; }
.hidden { display: none !important; }
.muted { color: var(--muted); font-size: 12px; }
button { cursor: pointer; font-family: inherit; color: inherit; }
::selection { background: var(--primary-soft); }

/* ---------- 상단바 ---------- */
#topbar {
  display: flex; align-items: center; gap: 10px; padding: 11px 16px;
  background: rgba(255,255,255,.92); backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--line); box-shadow: 0 2px 10px rgba(20,26,34,.04);
  z-index: 1000;
}
.brand { font-weight: 800; font-size: 19px; white-space: nowrap; color: var(--primary);
  letter-spacing: -.02em; display: flex; align-items: center; gap: 4px; }
.brand span { display: inline; color: var(--ink); }
#regionSelect {
  border: 1px solid var(--line-2); border-radius: var(--r-pill); padding: 8px 14px;
  font-size: 14px; background: #fff; color: var(--ink); font-weight: 700; cursor: pointer;
  transition: border-color .15s, box-shadow .15s; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a95a1' stroke-width='3'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center; padding-right: 30px;
}
#regionSelect:hover { border-color: var(--primary); }
.search-wrap { flex: 1; display: flex; align-items: center; background: #f1f2f4;
  border: 1px solid transparent; border-radius: var(--r-pill); overflow: hidden; min-width: 0;
  transition: background .15s, border-color .15s, box-shadow .15s; }
.search-wrap:focus-within { background: #fff; border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-soft); }
.search-wrap input { flex: 1; border: none; padding: 10px 14px; font-size: 14px;
  outline: none; min-width: 0; background: transparent; font-weight: 500; }
.ai-toggle { border: none; background: #e6e8eb; color: var(--muted); font-weight: 800;
  margin: 3px; padding: 6px 11px; font-size: 12px; border-radius: var(--r-pill); transition: .15s; }
.ai-toggle.on { background: var(--accent); color: #fff; box-shadow: 0 2px 8px rgba(255,159,28,.4); }
.ai-toggle.locked { opacity: .8; }
.icon-btn.on { background: var(--primary-soft); color: var(--primary); border-color: var(--primary); }
.search-wrap #searchBtn { border: none; background: var(--primary); color: #fff;
  margin: 3px 4px 3px 0; padding: 8px 14px; font-size: 15px; border-radius: var(--r-pill); transition: .15s; }
.search-wrap #searchBtn:hover { background: var(--primary-dark); }
.icon-btn { border: 1px solid var(--line-2); background: #fff; color: var(--ink-2);
  border-radius: var(--r-pill); width: 40px; height: 40px; font-size: 17px; transition: .15s;
  display: flex; align-items: center; justify-content: center; }
.icon-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }

/* ---------- 축제 배너 ---------- */
/* 배너 컨테이너: 얇은 상단 바. 그라데이션/높이감은 기존 유지, 내부는 마퀴로 교체 */
.festival-banner {
  display: block;            /* flex → block (마퀴가 폭 전체 사용) */
  padding: 6px 0;            /* 좌우 패딩은 마스크/트랙이 처리 → 0 (높이 ≈ 기존 41px 유지) */
  background: linear-gradient(100deg, #ff7a59 0%, var(--primary) 55%, #e0436f 100%);
  color: #fff; font-size: 13px; z-index: 900; font-weight: 500;
  overflow: hidden; white-space: nowrap; cursor: default;
}

/* 흐르는 영역 + 양끝 페이드 (.ds-marquee 관용구 재사용) + 고정 리드인 정렬 */
.ft-marquee {
  display: flex; align-items: stretch;
  overflow: hidden; padding: 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}

/* 고정(비스크롤) 리드인 칩 : 브랜드 + 움직이는 중에도 맥락 제공 */
.ft-lead {
  flex: 0 0 auto;
  display: inline-flex; align-items: center;
  padding: 0 14px; margin-right: 2px;
  font-weight: 800; white-space: nowrap;
  background: rgba(0,0,0,.10);
  box-shadow: 6px 0 14px -6px rgba(0,0,0,.35);   /* 흐르는 텍스트와 분리감 */
  /* 리드인은 마스크 페이드 영향 밖이라 항상 또렷 */
  -webkit-mask-image: none; mask-image: none;
}

/* SEAMLESS FIX: 트랙은 두 개의 동일 .ft-set 만 자식으로 갖고, 그 사이에 어떤 간격도
   두지 않는다(gap:0, padding-left 제거). 모든 칩 간격/세트 끝 여백은 .ft-set 내부에
   존재하므로 setA·setB 의 폭이 정확히 동일 → translateX(-50%) 가 setB 시작점에 정밀
   안착하여 이음새가 없다. (기존엔 track-gap 10px + 비대칭 padding-left 10px 가
   -50% 기준폭에 섞여 매 루프 ~5px 점프가 발생했다.) */
.ft-track {
  display: flex; align-items: stretch; gap: 0;
  width: max-content; padding: 1px 0;
  animation: ft-scroll 30s linear infinite;   /* JS가 duration 덮어씀 */
  will-change: transform;
}
/* 칩 간격(10px) + 세트의 '선행' 여백(10px)을 세트 안에 둔다.
   margin-left 로 각 세트 앞에 동일한 10px 를 부여 → 두 세트가 완전히 동일 폭,
   동시에 setA 와 setB 사이/처음의 시각적 간격도 일정하게 유지된다. */
.ft-set {
  display: flex; align-items: stretch; gap: 10px;
  margin-left: 10px;
}

/* hover / focus(키보드 포커스 포함) 시 정지 */
.ft-marquee:hover .ft-track,
.ft-track:focus-within { animation-play-state: paused; }

@keyframes ft-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }   /* 동일 세트 2개 → 이음새 없음 */
}

/* 각 축제 = 둥근 알약(pill) 버튼 */
.ft-chip {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; gap: 8px;
  margin: 0; border: 1px solid rgba(255,255,255,.28); cursor: pointer;
  font: inherit; color: #fff; line-height: 1.2;
  background: rgba(255,255,255,.14);
  border-radius: var(--r-pill);
  padding: 4px 13px 4px 6px;
  white-space: nowrap;
  transition: background .15s ease, transform .15s ease;
  -webkit-tap-highlight-color: transparent;
}
.ft-chip:hover { background: rgba(255,255,255,.26); }
.ft-chip:active { transform: scale(.98); }
.ft-chip:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* D-day / 진행중 배지 (기존 .dday 톤 유지) */
.ft-dday {
  flex-shrink: 0;
  background: rgba(255,255,255,.95); color: var(--primary);
  font-weight: 800; font-size: 12px;
  border-radius: var(--r-pill); padding: 3px 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
}
.ft-dday.ft-live { color: var(--primary-dark); }

.ft-name { font-weight: 800; }
.ft-meta { opacity: .95; font-weight: 500; }
.ft-sep  { opacity: .6; margin: 0 6px; }
.ft-go   { opacity: .9; font-weight: 800; margin-left: 2px; }

/* 모션 최소화 선호 → 애니메이션 끄고 가로 스크롤로 읽기 가능하게 */
@media (prefers-reduced-motion: reduce) {
  .festival-banner { overflow: hidden; }   /* 360px 에서 #map 으로 새어나가지 않게 보장 */
  .ft-track {
    animation: none; transform: none;
    padding-right: 10px;
    overflow-x: auto; -webkit-overflow-scrolling: touch;
  }
  .ft-marquee {
    overflow: hidden;
    -webkit-mask-image: none; mask-image: none;
  }
  .ft-set[aria-hidden="true"] { display: none; }   /* 정적 행에 중복 칩 노출 방지 */
  .ft-track::-webkit-scrollbar { height: 0; }
}

.fest-note { margin-top: 8px; padding: 8px 10px; background: rgba(0,0,0,.04);
  border-left: 3px solid var(--primary); border-radius: 0 var(--r) var(--r) 0;
  font-size: 13px; color: var(--ink); line-height: 1.6; white-space: pre-wrap; }

/* ---------- 레이아웃 ---------- */
#map { flex: 1; width: 100%; z-index: 1; background: #e9eef0; }
.filter-panel {
  position: absolute; top: 63px; left: 0; bottom: 0; width: 272px; background: var(--card);
  box-shadow: var(--sh); padding: 18px; overflow-y: auto; z-index: 800;
  transform: translateX(-110%); transition: transform .28s cubic-bezier(.22,.61,.36,1);
  border-right: 1px solid var(--line); }
.filter-panel.open { transform: translateX(0); }
.fp-section { margin-bottom: 18px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.fp-section:last-child { border-bottom: none; }
.fp-section h4 { font-size: 12px; color: var(--muted); margin-bottom: 10px;
  text-transform: uppercase; letter-spacing: .06em; font-weight: 800; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip { border: 1px solid var(--line-2); background: #fff; border-radius: var(--r-pill);
  padding: 7px 13px; font-size: 13px; color: var(--ink-2); font-weight: 600; transition: .15s; }
.chip:hover { border-color: var(--primary); color: var(--primary); }
.chip.active { background: var(--primary); color: #fff; border-color: var(--primary);
  box-shadow: 0 3px 10px rgba(241,84,63,.32); }
.chip .cnt { opacity: .7; font-size: 11px; margin-left: 4px; font-weight: 700; }
.switch { display: flex; align-items: center; gap: 9px; font-size: 14px; font-weight: 700; cursor: pointer; }
.switch input { width: 17px; height: 17px; accent-color: var(--primary); }
.btn-ghost { border: 1px solid var(--line-2); background: #fff; border-radius: var(--r-sm);
  padding: 10px 14px; font-size: 13px; width: 100%; font-weight: 700; color: var(--ink-2); transition: .15s; }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.legend div { display: flex; align-items: center; gap: 9px; font-size: 13px; margin: 6px 0; color: var(--ink-2); font-weight: 500; }
.lg { width: 22px; text-align: center; display: inline-block; }
.lg.star { color: var(--primary); font-size: 16px; }

.result-count { position: absolute; top: 75px; right: 14px;
  background: rgba(32,38,46,.92); color: #fff; padding: 7px 14px; border-radius: var(--r-pill);
  font-size: 12px; font-weight: 700; z-index: 600; box-shadow: var(--sh); backdrop-filter: blur(4px); }

/* ---------- 마커 핀 ---------- */
.pin { display: flex; align-items: center; justify-content: center;
  border-radius: 50% 50% 50% 0; transform: rotate(-45deg);
  box-shadow: 0 4px 10px rgba(20,26,34,.32); border: 2.5px solid #fff; }
.pin > * { transform: rotate(45deg); font-size: 13px; line-height: 1; }
.pin-star { width: 32px; height: 32px; background: linear-gradient(145deg, #ff6a52, var(--primary)); }
.pin-gold { width: 29px; height: 29px; background: linear-gradient(145deg, #efc25c, var(--gold)); }
.pin-cert { width: 27px; height: 27px; background: linear-gradient(145deg, #5b9fdb, var(--cert)); }
.pin-normal { width: 19px; height: 19px; background: #aab2bd; border-width: 2px; }
.pin-fest { width: 32px; height: 32px; background: linear-gradient(145deg, #a06bd6, #8e44ad); }

/* ---------- 플로팅 버튼 ---------- */
.fab-group { position: absolute; right: 16px; bottom: 24px; display: flex;
  flex-direction: column; gap: 12px; z-index: 700; }
.fab { width: 58px; height: 58px; border-radius: 50%; border: none; background: var(--card);
  box-shadow: var(--sh); font-size: 22px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; position: relative; transition: transform .12s, box-shadow .12s; }
.fab:hover { transform: translateY(-2px); box-shadow: var(--sh-lg); }
.fab:active { transform: scale(.94); }
.fab span { font-size: 9px; color: var(--muted); font-weight: 800; margin-top: 2px; }
.fab#fabRoulette { background: var(--accent); } .fab#fabRoulette span { color: #fff; }
.fab#fabLadder { background: var(--mint); } .fab#fabLadder span { color: #fff; }
.fab#fabToday { background: var(--primary); } .fab#fabToday span { color: #fff; }
.fab-badge { position: absolute; top: -3px; right: -3px; min-width: 21px; height: 21px;
  padding: 0 6px; background: var(--ink); color: #fff; border-radius: var(--r-pill);
  font-size: 11px; font-weight: 800; display: flex; align-items: center; justify-content: center;
  border: 2px solid #fff; }

/* ---------- bottom sheet ---------- */
.sheet { position: absolute; left: 0; right: 0; bottom: 0; background: var(--card);
  border-radius: 22px 22px 0 0; box-shadow: 0 -10px 40px rgba(20,26,34,.20); z-index: 1100;
  max-height: 74vh; overflow-y: auto; padding: 8px 18px 26px; animation: slideUp .3s cubic-bezier(.22,.61,.36,1); }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.sheet-handle { width: 42px; height: 5px; background: #d6dade; border-radius: 3px; margin: 8px auto 14px; }
.detail-head { display: flex; align-items: flex-start; gap: 8px; }
.detail-head h2 { font-size: 22px; flex: 1; font-weight: 800; letter-spacing: -.02em; }
.detail-head .close { border: none; background: #f1f2f4; border-radius: 50%; width: 32px;
  height: 32px; font-size: 15px; color: var(--ink-2); flex-shrink: 0; transition: .15s; }
.detail-head .close:hover { background: var(--primary-soft); color: var(--primary); }
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.tag { font-size: 12px; padding: 4px 11px; border-radius: var(--r-pill); background: #eef0f2;
  color: var(--ink-2); font-weight: 700; }
.tag.직원추천 { background: var(--primary); color: #fff; }
.tag.백년가게 { background: var(--gold); color: #fff; }
.tag.모범음식점, .tag.착한가격, .tag.우수음식점 { background: var(--cert); color: #fff; }
.detail-meta { font-size: 14px; color: var(--ink-2); line-height: 1.75; margin: 8px 0;
  background: var(--bg); border-radius: var(--r); padding: 12px 14px; }
.detail-meta .label { color: var(--muted); display: inline-block; width: 52px; font-weight: 700; }
.detail-actions { display: flex; gap: 8px; margin: 14px 0; }
.btn { border: none; border-radius: var(--r-sm); padding: 12px 14px; font-size: 14px;
  font-weight: 800; flex: 1; transition: .15s; letter-spacing: -.01em; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 4px 12px rgba(241,84,63,.30); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-primary:active { transform: scale(.98); }
.btn-sub { background: #f1f2f4; color: var(--ink-2); }
.btn-sub:hover { background: #e6e8eb; }
.reco-list { margin-top: 12px; }
.reco-list .fp-section { font-size: 14px; font-weight: 800; color: var(--ink); border: none;
  padding: 0; margin: 4px 0 10px; }
.reco-item { border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px;
  margin-bottom: 9px; background: #fff; transition: box-shadow .15s; }
.reco-item:hover { box-shadow: var(--sh-sm); }
.reco-item .rm { display: flex; justify-content: space-between; align-items: center; }
.reco-item .menu { font-weight: 800; font-size: 15px; }
.reco-item .stars { color: var(--accent); font-size: 13px; letter-spacing: 1px; }
.reco-item .by { font-size: 12px; color: var(--muted); margin-top: 4px; font-weight: 500; }
.reco-item .comment { font-size: 13.5px; margin-top: 7px; color: var(--ink-2); line-height: 1.5; }
.reco-item .kw { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 8px; }
.reco-item .kw span { font-size: 11px; background: var(--primary-soft); color: var(--primary-dark);
  border-radius: var(--r-pill); padding: 3px 9px; font-weight: 700; }
.empty { color: var(--muted); font-size: 13px; text-align: center; padding: 22px;
  background: var(--bg); border-radius: var(--r); }

/* ---------- 모달 ---------- */
.modal-overlay { position: fixed; inset: 0; background: rgba(20,26,34,.55);
  backdrop-filter: blur(3px); z-index: 2000; display: flex; align-items: center;
  justify-content: center; padding: 16px; animation: fade .2s; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal { background: var(--card); border-radius: var(--r-lg); width: 100%; max-width: 450px;
  max-height: 90vh; overflow-y: auto; padding: 24px; box-shadow: var(--sh-lg);
  animation: pop .26s cubic-bezier(.22,.61,.36,1); }
@keyframes pop { from { transform: translateY(14px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
.modal h3 { font-size: 20px; margin-bottom: 16px; display: flex; align-items: center; gap: 8px;
  font-weight: 800; letter-spacing: -.02em; }
.modal .mclose { float: right; border: none; background: #f1f2f4; border-radius: 50%;
  width: 32px; height: 32px; font-size: 15px; color: var(--ink-2); transition: .15s; }
.modal .mclose:hover { background: var(--primary-soft); color: var(--primary); }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; color: var(--ink-2); margin-bottom: 6px; font-weight: 700; }
.field input, .field select, .field textarea { width: 100%; border: 1.5px solid var(--line-2);
  border-radius: var(--r-sm); padding: 11px 13px; font-size: 14px; font-family: inherit;
  background: #fbfbfc; transition: border-color .15s, box-shadow .15s; color: var(--ink); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none;
  border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); background: #fff; }
.field textarea { resize: vertical; min-height: 60px; line-height: 1.5; }
.rating-input { display: flex; gap: 6px; font-size: 28px; }
.rating-input span { cursor: pointer; color: #dde0e4; transition: .12s; }
.rating-input span:hover { transform: scale(1.15); }
.rating-input span.on { color: var(--accent); }
.row2 { display: flex; gap: 10px; } .row2 > * { flex: 1; }
.loc-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.loc-row span { font-size: 12px; color: var(--ink-2); font-weight: 600; flex: 1; min-width: 120px; }
.loc-btn { border: 1px solid var(--line-2); background: #fff; border-radius: var(--r-pill); padding: 6px 11px; font-size: 12px; font-weight: 700; color: var(--ink-2); }
.loc-btn:hover { border-color: var(--primary); color: var(--primary); }

/* ---------- 룰렛 ---------- */
#rouletteCanvas { display: block; margin: 0 auto; filter: drop-shadow(0 6px 16px rgba(20,26,34,.18)); }
.roulette-wrap { position: relative; width: 300px; height: 300px; margin: 6px auto 0; }
.roulette-pointer { position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
  font-size: 30px; z-index: 2; color: var(--primary); filter: drop-shadow(0 2px 3px rgba(0,0,0,.25)); }
.winner-box { text-align: center; margin-top: 16px; font-size: 19px; font-weight: 800;
  min-height: 28px; color: var(--primary); letter-spacing: -.01em; }
.mode-tabs { display: flex; gap: 6px; margin-bottom: 16px; background: #f1f2f4;
  padding: 4px; border-radius: var(--r-sm); }
.mode-tabs button { flex: 1; border: none; background: transparent; border-radius: 8px;
  padding: 9px; font-size: 13px; font-weight: 800; color: var(--ink-2); transition: .15s; }
.mode-tabs button.active { background: #fff; color: var(--primary); box-shadow: var(--sh-sm); }

/* ---------- 룰렛: 음식점 선택 ---------- */
.rl-search { width: 100%; border: 1.5px solid var(--line-2); border-radius: var(--r-sm);
  padding: 11px 13px; font-size: 14px; background: #fbfbfc; transition: .15s; }
.rl-search:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); background: #fff; }
.rl-results { max-height: 150px; overflow-y: auto; margin-top: 4px; }
.rl-result { display: flex; align-items: center; gap: 8px; padding: 9px 8px;
  border-bottom: 1px solid var(--line); cursor: pointer; font-size: 13px; border-radius: 8px; transition: .12s; }
.rl-result:hover { background: var(--primary-soft); }
.rl-result-name { font-weight: 700; white-space: nowrap; }
.rl-result .muted { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rl-result .rl-add { color: var(--primary); font-weight: 800; font-size: 19px; }
.rl-pick-head { display: flex; align-items: center; justify-content: space-between; margin: 14px 0 7px; }
.rl-pick-head h4 { font-size: 13px; color: var(--muted); font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.rl-clear { border: none; background: none; color: var(--muted); font-size: 12px;
  text-decoration: underline; font-weight: 600; }
.rl-picks { max-height: 144px; overflow-y: auto; margin-bottom: 10px; }
.rl-pick { display: flex; align-items: center; gap: 9px; padding: 8px 11px; background: var(--bg);
  border-radius: var(--r-sm); margin-bottom: 6px; font-size: 13px; }
.rl-pick-name { font-weight: 700; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rl-pick-cat { font-size: 11px; color: var(--muted); font-weight: 600; }
.rl-rm { border: none; background: var(--primary); color: #fff; width: 22px; height: 22px;
  border-radius: 50%; font-size: 12px; line-height: 1; transition: .15s; flex-shrink: 0; }
.rl-rm:hover { background: var(--primary-dark); }

/* ---------- 시군 경계 라벨 ---------- */
.sigungu-label { background: rgba(32,38,46,.86); color: #fff; border: none;
  border-radius: var(--r-pill); font-size: 12px; font-weight: 800; padding: 3px 10px;
  box-shadow: var(--sh-sm); }
.sigungu-label::before { display: none; }

/* ---------- 사다리 ---------- */
#ladderSvg { width: 100%; max-width: 400px; display: block; margin: 12px auto; }
.ladder-names { display: flex; justify-content: space-around; font-size: 12px; font-weight: 800; margin-bottom: 4px; }
.ladder-prizes { display: flex; justify-content: space-around; font-size: 11px; margin-top: 4px;
  color: var(--ink-2); font-weight: 600; }
.ladder-result { margin-top: 14px; font-size: 14px; background: var(--bg); border-radius: var(--r);
  padding: 12px 14px; line-height: 1.7; }
.ladder-result .hit { font-weight: 800; color: var(--primary); }

/* ---------- 서비스 소개(About) ---------- */
.modal.about { max-width: 480px; }
.about-hero { text-align: center; padding: 6px 0 4px; }
.about-hero .ah-logo { font-size: 40px; }
.about-hero h3 { font-size: 21px; margin: 4px 0 6px; justify-content: center; }
.about-hero p { font-size: 13.5px; color: var(--muted); line-height: 1.6; }
.about-h { font-size: 15px; font-weight: 800; margin: 18px 0 8px; color: var(--ink); }
.about-intro { font-size: 13.5px; line-height: 1.7; color: var(--ink-2); }
.about-intro b { color: var(--ink); }
.about-callout { margin-top: 10px; background: var(--primary-soft); color: var(--primary-dark);
  border-radius: var(--r); padding: 12px 14px; font-size: 13px; line-height: 1.6; font-weight: 600; }
.about-callout b { color: var(--primary-dark); font-weight: 800; }
/* 연결한 데이터 — 오른쪽→왼쪽 흐르는 마퀴 */
.ds-marquee { overflow: hidden; padding: 4px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); }
.ds-track { display: flex; gap: 10px; width: max-content; animation: ds-scroll 26s linear infinite; }
.ds-marquee:hover .ds-track { animation-play-state: paused; }
@keyframes ds-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.ds-card { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 3px;
  background: var(--card); border: 1px solid var(--line-2); border-radius: var(--r); padding: 12px 14px;
  min-width: 116px; box-shadow: var(--sh-sm); }
.ds-ic { font-size: 26px; line-height: 1; }
.ds-n { font-weight: 800; font-size: 12.5px; color: var(--ink); white-space: nowrap; }
.ds-s { font-size: 10.5px; color: var(--primary-dark); white-space: nowrap; font-weight: 600; }
.about-note { font-size: 12px; color: var(--muted); margin-top: 10px; line-height: 1.5; }
.about-foot { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); text-align: center; font-size: 12.5px; color: var(--muted); }
.about-foot b { color: var(--ink); }

/* ---------- 오늘의 추천 기준 배너 ---------- */
.today-basis { display: inline-flex; align-items: center; gap: 5px; background: var(--primary-soft);
  color: var(--primary-dark); font-weight: 800; font-size: 13px; padding: 7px 13px;
  border-radius: var(--r-pill); margin-bottom: 12px; }

/* ---------- 통계 ---------- */
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; margin-bottom: 16px; }
.stat-card { background: var(--bg); border-radius: var(--r); padding: 16px 12px; text-align: center;
  border: 1px solid var(--line); }
.stat-card .num { font-size: 26px; font-weight: 800; color: var(--primary); letter-spacing: -.02em; }
.stat-card .lbl { font-size: 12px; color: var(--muted); margin-top: 2px; font-weight: 600; }
.bar-row { display: flex; align-items: center; gap: 9px; font-size: 13px; margin: 6px 0; font-weight: 600; }
.bar-row .bn { width: 72px; color: var(--ink-2); }
.bar-row .bar { height: 16px; background: linear-gradient(90deg, #ff7a59, var(--primary));
  border-radius: var(--r-pill); min-width: 4px; }

/* ---------- 토스트 ---------- */
.toast { position: fixed; bottom: 88px; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: #fff; padding: 12px 20px; border-radius: var(--r-pill);
  font-size: 14px; font-weight: 600; z-index: 3000; box-shadow: var(--sh-lg);
  animation: toastUp .25s cubic-bezier(.22,.61,.36,1); max-width: 90vw; text-align: center; }
@keyframes toastUp { from { transform: translate(-50%, 12px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }

/* ---------- 데스크탑 ---------- */
@media (min-width: 860px) {
  .filter-panel { transform: translateX(0); top: 63px; }
  #map { margin-left: 272px; }
  .festival-banner ~ .filter-panel { top: 111px; }   /* 티커 배너(≈44px) 아래로 */
  .sheet { left: auto; right: 18px; bottom: 18px; width: 410px; border-radius: var(--r-lg);
    max-height: 82vh; box-shadow: var(--sh-lg); }
}
@media (max-width: 480px) {
  .brand span { display: none; }
  #topbar { padding: 9px 12px; gap: 8px; }
  .fab { width: 52px; height: 52px; font-size: 20px; }
  .result-count { top: 70px; }
  /* 축제 티커: 컴팩트하게 + 넘침 방지 */
  .festival-banner { font-size: 12px; }
  .ft-lead { padding: 0 11px; }
  .ft-chip { padding: 3px 11px 3px 5px; gap: 6px; }
  .ft-dday { font-size: 11px; padding: 3px 9px; }
  .ft-sep { margin: 0 4px; }
}

/* ---------- 대형 디스플레이(대형 모니터·키오스크 ~1080p 65") ---------- */
@media (min-width: 1800px) {
  body { font-size: 17px; }
  #topbar { padding: 16px 28px; gap: 14px; }
  .brand { font-size: 24px; }
  #regionSelect, .search-wrap input, .search-wrap #searchBtn { font-size: 16px; }
  .icon-btn { width: 48px; height: 48px; font-size: 20px; }
  .filter-panel { width: 340px; padding: 24px; top: 72px; }
  #map { margin-left: 340px; }
  .festival-banner { font-size: 15px; padding: 8px 0; }   /* 마퀴 전체폭 사용 — 좌우 패딩 0 */
  .ft-lead { padding: 0 18px; }
  .ft-chip { padding: 5px 16px 5px 7px; gap: 10px; }
  .ft-dday { font-size: 13px; padding: 4px 12px; }
  .festival-banner ~ .filter-panel { top: 140px; }   /* 티커 배너(대형≈54px) 아래로, 4K까지 커버 */
  .chip { font-size: 15px; padding: 9px 16px; }
  .fab { width: 72px; height: 72px; font-size: 28px; }
  .fab span { font-size: 11px; }
  .fab-group { right: 24px; bottom: 32px; gap: 16px; }
  .result-count { font-size: 15px; padding: 9px 18px; top: 86px; }
  .sheet { width: 480px; right: 24px; bottom: 24px; }
  .detail-head h2 { font-size: 26px; }
  .modal { max-width: 560px; padding: 30px; }
  .modal h3 { font-size: 24px; }
  .sigungu-label { font-size: 14px; padding: 4px 12px; }
}
/* ---------- 초대형/4K(65" 4K, 8K 키오스크) ---------- */
@media (min-width: 2560px) {
  body { font-size: 20px; }
  .brand { font-size: 30px; }
  .festival-banner { font-size: 17px; }
  .ft-lead { padding: 0 22px; }
  .ft-chip { padding: 6px 18px 6px 8px; }
  .ft-track { animation-duration: 46s !important; }   /* 넓은 화면 가독성 위해 천천히 */
  .filter-panel { width: 440px; padding: 32px; }
  #map { margin-left: 440px; }
  .chip { font-size: 18px; padding: 11px 20px; }
  .fab { width: 96px; height: 96px; font-size: 38px; }
  .fab span { font-size: 13px; }
  .fab-group { right: 36px; bottom: 44px; gap: 22px; }
  .sheet { width: 600px; }
  .detail-head h2 { font-size: 32px; }
  .modal { max-width: 720px; padding: 40px; }
  .reco-item .menu { font-size: 19px; }
  .leaflet-control-zoom a { width: 44px !important; height: 44px !important; line-height: 44px !important; font-size: 24px !important; }
}
