/* ─────────────────────────────────────────────
   Design tokens — 전국 맛집 검색 서비스 MVP.dc.html (Claude Design) 기준
   ───────────────────────────────────────────── */
:root {
  /* color */
  --c-text: #1B160E;          /* primary text */
  --c-text-strong: #302D27;   /* outline button border, chip text */
  --c-muted: #6B7D8D;         /* secondary text */
  --c-surface: #FEFEFE;       /* card / frame */
  --c-header: #FFFFFF;        /* sticky header */
  --c-bg: #F4F4F4;            /* page, info box, card border */
  --c-line: #E3E3E1;          /* dividers, box borders, source chip */
  --c-accent: #FF8F50;        /* tag chip, primary button */
  --c-accent-soft: #FFAA5C;   /* hover border, situation chip border */
  --c-link: #CA4900;          /* link, map chevron */
  --c-info: #DAFBFF;          /* map banner, confirmed badge */

  /* type */
  --ff-base: 'Poppins', 'Noto Sans KR', -apple-system, sans-serif;
  --ff-display: 'Kavoon', 'Noto Sans KR', sans-serif;
  --fs-10: 10px; --lh-10: 15px;
  --fs-13: 13px; --lh-13: 19.5px;
  --fs-16: 16px; --lh-16: 24px;
  --fs-20: 20px; --lh-20: 30px;
  --fs-22: 22px; --lh-22: 33px;

  /* radius */
  --r-12: 12px;
  --r-20: 20px;
  --r-24: 24px;
  --r-30: 30px;
  --r-40: 40px;
  --r-pill: 140px;

  /* elevation */
  --shadow-card: 0 6px 11px rgba(0, 0, 0, 0.1);

  /* layout */
  --frame-w: 390px;
  --gutter: 16px;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--ff-base);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

a { color: var(--c-link); text-decoration: none; }
a:hover { color: var(--c-accent); text-decoration: underline; }

button { font-family: inherit; margin: 0; }

/* ── Frame ───────────────────────────────────
   모바일 우선. 모든 폭에서 화면을 꽉 채우고(가운데 390px 프레임 없음),
   768px 이상은 아래 "Tablet / Desktop" 규칙으로 폭을 넓게 쓴다. */
.page { min-height: 100vh; }

.frame {
  width: 100%;
  min-height: 100vh;
  background: var(--c-surface);
  overflow: clip;                 /* clip (not hidden) so sticky headers keep working */
}

.screen { display: flex; flex-direction: column; }

/* ── Header ──────────────────────────────────── */
.header {
  display: flex;
  align-items: center;
  padding: var(--gutter);
  border-bottom: 1px solid var(--c-line);
  position: sticky;
  top: 0;
  background: var(--c-header);
  z-index: 10;
}
.header--list { justify-content: space-between; }
.header--detail { gap: 12px; }

.brand {
  font-size: var(--fs-20);
  line-height: var(--lh-20);
  font-weight: 700;
  color: var(--c-text);
  cursor: pointer;
}
.brand:hover { color: var(--c-text); text-decoration: none; }

.icon-btn {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: var(--r-12);
  border: 1px solid var(--c-line);
  background: var(--c-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
}

.header-title {
  font-size: var(--fs-16);
  line-height: var(--lh-16);
  font-weight: 600;
  color: var(--c-text);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Text styles ─────────────────────────────── */
.t-caption { font-size: var(--fs-13); line-height: var(--lh-13); color: var(--c-muted); }
.t-micro { font-size: var(--fs-10); line-height: var(--lh-10); color: var(--c-muted); }
.t-section {
  font-size: var(--fs-16);
  line-height: var(--lh-16);
  font-weight: 600;
  color: var(--c-text);
}
.t-display {
  font-family: var(--ff-display);
  font-size: var(--fs-22);
  line-height: var(--lh-22);
  font-weight: 400;
  color: var(--c-text);
}

/* ── List: title block ───────────────────────── */
.crumb { padding: 16px 16px 0; }
.list-title { padding: 8px 16px 0; }
.list-count {
  padding: 10px 16px 16px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

/* ── Info box (기준 / 확인정보 / 출처) ─────────── */
.infobox {
  background: var(--c-bg);
  border: 1px solid var(--c-line);
  border-radius: var(--r-24);
  padding: 22px 16px;
}
.infobox__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.section { padding: 0 var(--gutter); margin-bottom: 24px; }
.section--criteria { margin-bottom: 20px; }
.section--list { margin-bottom: 0; }

/* ── Restaurant card ─────────────────────────── */
.card {
  display: block;
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
  padding: 0;
  background: var(--c-surface);
  border: 1px solid var(--c-bg);
  border-radius: var(--r-24);
  overflow: hidden;
  margin-bottom: 16px;
  cursor: pointer;
  box-shadow: var(--shadow-card);
}
.card:hover { border: 2px solid var(--c-accent-soft); }
.card:focus-visible { outline: 2px solid var(--c-accent-soft); outline-offset: 2px; }
.card .slot { height: 180px; border-radius: var(--r-24) var(--r-24) 0 0; }

.card__body {
  padding: 32px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.card__name {
  font-size: var(--fs-20);
  line-height: 28px;
  font-weight: 700;
  color: var(--c-text);
}
.card__menu {
  font-size: var(--fs-16);
  line-height: var(--lh-16);
  font-weight: 600;
  color: var(--c-text);
}
.card__tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
.card__checked { margin-top: 2px; }

/* ── Chips ───────────────────────────────────── */
.chip-tag {
  font-size: var(--fs-13);
  color: var(--c-text);
  background: var(--c-accent);
  padding: 4px 16px;
  border-radius: var(--r-20);
  font-weight: 600;
}
.chip-query {
  font-size: var(--fs-13);
  line-height: var(--lh-13);
  color: var(--c-muted);
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  padding: 8px 16px;
  border-radius: var(--r-30);
}
.chip-situation {
  font-size: var(--fs-13);
  line-height: var(--lh-13);
  font-weight: 600;
  color: var(--c-text-strong);
  background: var(--c-surface);
  border: 1px solid var(--c-accent-soft);
  padding: 8px 16px;
  border-radius: var(--r-40);
}
.chip-source {
  font-size: var(--fs-10);
  color: var(--c-text);
  background: var(--c-line);
  padding: 4px 12px;
  border-radius: var(--r-40);
  font-weight: 600;
}
.badge-confirmed {
  font-size: var(--fs-13);
  line-height: var(--lh-13);
  font-weight: 600;
  color: var(--c-text);
  background: var(--c-info);
  padding: 4px 12px;
  border-radius: var(--r-20);
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }

/* ── Ad placeholder ──────────────────────────── */
.ad {
  border: 1px dashed var(--c-line);
  background: var(--c-bg);
  border-radius: var(--r-12);
  padding: 24px;
  text-align: center;
  margin-bottom: 16px;
}
.ad__label {
  font-size: var(--fs-10);
  line-height: var(--lh-10);
  color: var(--c-muted);
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}
.ad--flush { margin-bottom: 0; }
.ad--last { margin-bottom: 20px; }

/* ── Buttons ─────────────────────────────────── */
.btn {
  padding: 10px 22px;
  border-radius: var(--r-pill);
  font-size: var(--fs-16);
  line-height: 28.8px;
  color: var(--c-text);
  cursor: pointer;
}
.btn--outline { border: 1px solid var(--c-text-strong); background: var(--c-surface); }
.btn--primary { border: none; background: var(--c-accent); }
.btn--primary:hover { background: var(--c-accent-soft); }
.btn--more { width: 100%; font-weight: 600; margin-bottom: 20px; }
.btn-row { display: flex; gap: 10px; }
.btn-row .btn { flex: 1; font-weight: 700; }

.btn-small {
  align-self: flex-start;
  margin-top: 4px;
  padding: 8px 16px;
  border-radius: var(--r-30);
  border: 1px solid var(--c-line);
  background: var(--c-surface);
  color: var(--c-muted);
  font-size: var(--fs-13);
  line-height: var(--lh-13);
  font-weight: 600;
  cursor: pointer;
}

/* ── Map banner ──────────────────────────────── */
.map-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--c-info);
  border-radius: var(--r-24);
  padding: 16px;
  margin-bottom: 24px;
  cursor: pointer;
}
.map-banner__title { margin-bottom: 2px; }
.map-banner__chev { font-size: var(--fs-20); color: var(--c-link); }

.related-queries-title { margin-bottom: 12px; }
.related-queries { margin-bottom: 24px; }

/* ── Footer ──────────────────────────────────── */
.footer {
  padding: 20px 16px 32px;
  border-top: 1px solid var(--c-line);
}

/* ── Detail ──────────────────────────────────── */
.detail-hero { height: 260px; }
.photo-credit { padding: 8px 16px 0; }
.photo-credit__link { color: var(--c-muted); }

/* 대표 사진 (출처 확정된 사진만) + 사진 모달 — 모바일·데스크톱 같은 구성 */
.photo-hero {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  overflow: hidden;
  background: var(--c-bg);
  cursor: zoom-in;
}
.photo-hero img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* 외부 이미지: 로드 확인 전에는 숨김 (실패 시 깨진 이미지 아이콘 방지). 표시는 app.js 가 .is-loaded 로 */
[data-photo-img]:not(.is-loaded),
[data-thumb-img]:not(.is-loaded) { visibility: hidden; }

/* 대표 사진 캐러셀: 영역 크기는 .detail-hero 그대로. 2장 이상(.is-multi)일 때만 버튼·dot·번호 표시 */
.photo-hero { position: relative; }
.photo-hero__track {
  display: flex;
  height: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}
.photo-hero__track::-webkit-scrollbar { display: none; }
.photo-slide {
  flex: 0 0 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  scroll-snap-align: start;
  cursor: zoom-in;
}
.photo-slide:focus-visible { outline: 2px solid var(--c-accent-soft); outline-offset: -2px; }
.photo-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: none;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(0, 0, 0, 0.38);
  cursor: pointer;
}
.photo-nav:hover { background: rgba(0, 0, 0, 0.55); }
.photo-nav--prev { left: 10px; }
.photo-nav--next { right: 10px; }
.photo-hero.is-multi > .photo-nav,
.photo-modal.is-multi .photo-nav { display: grid; }
.photo-hero__dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 6px;
  display: none;
  justify-content: center;
}
.photo-hero.is-multi .photo-hero__dots { display: flex; }
.photo-hero__dot {                /* 8px 점 + 투명 여백으로 누르기 쉬운 크기 */
  box-sizing: content-box;
  width: 8px;
  height: 8px;
  padding: 6px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  background-clip: content-box;
  cursor: pointer;
}
.photo-hero__dot[aria-current] { background-color: #fff; }
.photo-count {
  position: absolute;
  top: 10px;
  right: 10px;
  display: none;
  padding: 2px 8px;
  border-radius: var(--r-pill);
  font-size: 12px;
  line-height: 18px;
  color: #fff;
  background: rgba(0, 0, 0, 0.45);
}
.photo-hero.is-multi .photo-count { display: block; }
.photo-modal__stage { position: relative; }
.photo-modal__count { display: none; margin-left: auto; font-size: var(--fs-13); color: rgba(255, 255, 255, 0.72); }
.photo-modal.is-multi .photo-modal__count { display: inline; }

/* 같은 조건의 다른 곳 썸네일: placeholder(72px) 위에 겹침, 실패 시 img 만 제거 */
.related-thumb { position: relative; flex-shrink: 0; width: 72px; height: 72px; }
.related-thumb__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--r-12);
}
.photo-hero:focus-visible { outline: 2px solid var(--c-accent-soft); outline-offset: 2px; }
.photo-modal {
  width: min(960px, calc(100vw - 2 * var(--gutter)));
  max-width: none;
  max-height: none;
  padding: 0;
  border: 0;
  background: transparent;
}
.photo-modal::backdrop { background: rgba(0, 0, 0, 0.82); }
.photo-modal__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 8px;
}
.photo-modal__source {
  min-width: 0;
  font-size: var(--fs-13);
  line-height: var(--lh-13);
  color: rgba(255, 255, 255, 0.72);
  word-break: keep-all;
}
.photo-modal__source:hover,
.photo-modal__source:focus-visible { color: #fff; }
.photo-modal__close {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  cursor: pointer;
}
.photo-modal__close:hover { background: rgba(255, 255, 255, 0.24); }
.photo-modal__img {
  display: block;
  width: 100%;
  max-height: calc(100dvh - 120px);
  object-fit: contain;
  border-radius: var(--r-12);
  background: #111;
}
.detail-head { padding: 14px 16px 0; }
.detail-name { margin-bottom: 6px; }
.detail-summary { margin-bottom: 16px; }
.situations { padding: 0 16px; margin-bottom: 20px; }

.check-title { margin-bottom: 12px; }
.check-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--c-line);
}
.check-row__label { font-size: var(--fs-16); line-height: var(--lh-16); color: var(--c-muted); }

.menu-table {
  border: 1px solid var(--c-bg);
  border-radius: var(--r-24);
  overflow: hidden;
}
.menu-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--c-bg);
  font-size: var(--fs-16);
  line-height: var(--lh-16);
  color: var(--c-text);
}
.menu-row__price { font-weight: 600; white-space: nowrap; }
.section-title { margin-bottom: 12px; }

.biz {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: var(--fs-16);
  line-height: var(--lh-16);
  color: var(--c-text-strong);
}
.biz__row { display: flex; justify-content: space-between; gap: 12px; }
.biz__label { color: var(--c-muted); flex-shrink: 0; }
.biz__value { text-align: right; }

.detail-map { height: 180px; }

.verify { display: flex; flex-direction: column; gap: 10px; }
.verify__row {
  display: flex;
  justify-content: space-between;
  font-size: var(--fs-13);
  line-height: var(--lh-13);
}
.verify__date { color: var(--c-text); font-weight: 600; }
.chips--sources { gap: 6px; }

.related-title { margin-bottom: 4px; }
.related-sub { margin-bottom: 12px; }
.related-item {
  display: flex;
  gap: 12px;
  width: 100%;
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid var(--c-bg);
  background: none;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
}
.related-item .slot { width: 72px; height: 72px; flex-shrink: 0; }
.related-item__text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  justify-content: center;
  min-width: 0;
}
.related-item__name {
  font-size: var(--fs-16);
  line-height: var(--lh-16);
  font-weight: 700;
  color: var(--c-text);
}
.section--related-ad { margin-bottom: 20px; }

/* ── Image placeholder (image-slot empty state 재현) ── */
.slot {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  background: rgba(127, 127, 127, 0.08);
  color: var(--c-text);
  font: 13px/1.3 system-ui, -apple-system, sans-serif;
}
.slot--r12 { border-radius: var(--r-12); }
.slot::after {                    /* dashed ring */
  content: '';
  position: absolute;
  inset: 0;
  border: 1.5px dashed currentColor;
  border-radius: inherit;
  opacity: 0.35;
  pointer-events: none;
}
.slot__empty {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px;
  text-align: center;
  user-select: none;
}
.slot__empty svg { opacity: 0.45; }
.slot__cap { opacity: 0.75; font-weight: 500; letter-spacing: 0.01em; max-width: 90%; }
.slot--small .slot__empty svg { width: 20px; height: 20px; }
.slot--small .slot__empty { gap: 2px; padding: 4px; font-size: 11px; }

.not-found { padding: 40px 16px; text-align: center; }

/* 카드·상세 이동 링크는 전역 a:hover(색/밑줄) 영향을 받지 않음 */
.card:hover, .related-item:hover, .icon-btn:hover { color: inherit; text-decoration: none; }

/* 미확인 값 */
.is-unknown { color: var(--c-muted); font-weight: 400; }

/* 레이아웃 래퍼: 모바일에서는 영향 없음 (DOM 순서 = 모바일 순서) */
.list-aside { display: none; }
.slot--r16 { border-radius: 16px; }

/* ═════════════════════════════════════════════
   Tablet (768px+) — 2열 카드, 넓은 여백
   ═════════════════════════════════════════════ */
@media (min-width: 768px) {
  :root { --gutter-wide: 32px; }

  .header { padding: 20px var(--gutter-wide); }
  .header--detail { gap: 16px; }
  .brand { font-size: var(--fs-22); line-height: var(--lh-22); }
  .icon-btn { width: 40px; height: 40px; }
  .header-title { font-size: 18px; line-height: 27px; }

  /* ── 리스트 ── */
  .list-body {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 32px var(--gutter-wide);
  }
  .list-body .crumb,
  .list-body .list-title,
  .list-body .list-count,
  .list-body .section { padding-left: 0; padding-right: 0; }
  .list-body .crumb { padding-top: 0; font-size: 14px; line-height: 21px; margin-bottom: 8px; }
  .list-body .list-title { padding-top: 0; font-size: 29px; line-height: 43.5px; margin-bottom: 8px !important; }
  .list-body .list-count { padding-top: 0; padding-bottom: 20px; }
  .section--criteria { margin-bottom: 24px; }
  .section--criteria .infobox { padding: 22px 24px; }
  .section--criteria .infobox__list { flex-direction: row; flex-wrap: wrap; gap: 8px 16px; }

  .section--list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    align-items: start;
  }
  .section--list > * { grid-column: 1 / -1; order: 100; }
  .section--list > .card,
  .section--list > [data-more-items] > .card { grid-column: auto; order: var(--d-order, 100); }
  .section--list > [data-more-items]:not([hidden]) { display: contents; }
  .section--list .card { margin-bottom: 0; }
  .section--list .card .slot { height: 200px; }
  .section--list .card__body { padding: 24px 20px; }
  .section--list > .ad { margin-bottom: 0; }
  .section--list > .ad--row { order: var(--d-order, 100); padding: 20px; }
  .section--list > .btn--more { width: 240px; justify-self: center; margin: 12px 0 12px; }
  .section--list > .map-banner { margin-bottom: 4px; }
  .section--list > .related-queries-title { margin-bottom: -8px; }
  .section--list > .related-queries { margin-bottom: 4px; }
  .section--list > .ad--last { margin-bottom: 0; }

  .footer { padding: 24px 40px 40px; text-align: center; }

  /* ── 상세 ── */
  .detail-body {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px var(--gutter-wide) 8px;
  }
  .detail-body .section,
  .detail-body .situations,
  .detail-body .detail-head,
  .detail-body .photo-credit { padding-left: 0; padding-right: 0; }

  .detail-hero { height: 380px; border-radius: var(--r-24); }
  .photo-credit { padding-top: 8px; }
  .detail-head { padding-top: 20px; }
  .detail-name { font-size: 29px; line-height: 43.5px; margin-bottom: 8px; }
  .detail-summary { font-size: 14px; line-height: 21px; }
  .situations { margin-bottom: 24px; }

  .check-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 32px;
  }
  .detail-main .infobox { padding: 24px; }
  .check-title { margin-bottom: 14px; }
  .menu-row { padding: 14px 24px; }
  .biz {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 32px;
  }
  .btn-row .btn { flex: 0 1 auto; padding: 10px 32px; }

  .detail-map { height: 220px; border-radius: 16px; }
  .detail-aside .infobox { padding: 20px; }

  .related-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }
  .related-item {
    padding: 16px;
    border: 1px solid var(--c-bg);
    border-radius: var(--r-24);
    background: var(--c-surface);
    box-shadow: var(--shadow-card);
  }
  .related-item:hover { border-color: var(--c-accent-soft); }
  .section--related-ad { margin-bottom: 24px; }
}

/* ═════════════════════════════════════════════
   Desktop (1024px+) — 좌측 본문 + 우측 360px 패널
   ═════════════════════════════════════════════ */
@media (min-width: 1024px) {
  :root { --gutter-wide: 40px; }
  .header { position: static; }  /* 데스크톱 디자인은 헤더 고정 없음 */

  /* ── 리스트: 좌측 리스트 / 우측 지도·지역 정보 ── */
  .list-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 40px;
    align-items: start;
  }
  .list-aside { display: block; position: sticky; top: 24px; }
  .section--list > .map-banner--inline { display: none; }

  .map-panel {
    background: var(--c-info);
    border-radius: var(--r-24);
    padding: 20px;
    cursor: pointer;
  }
  .map-panel__title { margin-bottom: 6px; }
  .map-panel__desc { margin-bottom: 16px; }
  .map-panel__map { height: 280px; }

  /* ── 상세: 본문 / 우측 패널 / 하단 관련 맛집 ── */
  .detail-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    grid-template-areas:
      "main   aside"
      "bottom bottom";
    column-gap: 40px;
    align-items: start;
  }
  .detail-main { grid-area: main; }
  .detail-aside { grid-area: aside; position: sticky; top: 24px; }
  .detail-bottom { grid-area: bottom; padding-top: 16px; }
  .detail-main > .section:last-child { margin-bottom: 0; }

  .related-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
}

/* ═════════════════════════════════════════════
   Home (메인) — 기존 토큰·컴포넌트 재사용
   ═════════════════════════════════════════════ */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Hero: 회색 밴드 위 흰 검색창 */
.home-hero {
  background: var(--c-bg);
  border-bottom: 1px solid var(--c-line);
  padding: 32px 20px 28px;
  text-align: center;
}
.home-hero__inner { max-width: 760px; margin: 0 auto; }
.home-hero__title { margin: 0 0 8px; word-break: keep-all; }
.home-hero__desc { word-break: keep-all; }
.home-hero__desc { margin: 0 0 20px; }

.nl-search {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r-24);
  padding: 14px 12px 12px 20px;
  box-shadow: var(--shadow-card);
  text-align: left;
}
.nl-search:focus-within { border-color: var(--c-accent-soft); }
.nl-search__input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  resize: none;
  background: transparent;
  padding: 0;
  font-family: inherit;
  font-size: var(--fs-16);   /* 16px: iOS 확대 방지 */
  word-break: keep-all;
  overflow-wrap: anywhere;
  line-height: var(--lh-16);
  color: var(--c-text);
}
.nl-search__input::placeholder { color: var(--c-muted); }
.nl-search__btn {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--c-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
}
.nl-search__btn:hover { background: var(--c-accent-soft); }
.nl-search__msg { margin: 10px 0 0; }

.home-examples { justify-content: center; margin-top: 16px; }
.chip-example { font-family: inherit; cursor: pointer; }
.chip-link { color: var(--c-text); border-color: var(--c-accent-soft); font-weight: 600; }
.chip-example:hover,
.chip-link:hover { color: var(--c-text); border-color: var(--c-accent-soft); text-decoration: none; }

/* 공개 검색질의 카드 */
.home-body { padding-top: 24px; }
.home-section-title { margin: 0 0 12px; }
.quick-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 16px;
}
.quick-card__body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.home-quick__list > .card:last-child { margin-bottom: 0; }
.section--home-ad { margin-bottom: 32px; }

@media (min-width: 768px) {
  .home-hero { padding: 56px var(--gutter-wide) 44px; }
  .home-hero__title { font-size: 29px; line-height: 43.5px; }
  .home-hero__desc { font-size: 14px; line-height: 21px; margin-bottom: 28px; }
  .nl-search { padding: 18px 14px 14px 24px; }
  .nl-search__btn { width: 52px; height: 52px; }

  .home-body {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 40px var(--gutter-wide) 8px;
  }
  .home-body .section { padding-left: 0; padding-right: 0; }
  .home-quick__list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
  }
  .home-quick__list > .card { margin-bottom: 0; }
  .quick-card { padding: 28px 28px; }
}

@media (min-width: 1024px) {
  .home-hero { padding: 88px var(--gutter-wide) 72px; }
  .home-hero__inner { max-width: 820px; }
  .home-hero__title { font-size: 39px; line-height: 58.5px; margin-bottom: 12px; }
  .home-hero__desc { font-size: var(--fs-16); line-height: var(--lh-16); margin-bottom: 32px; }
  .home-examples { margin-top: 20px; }
  .home-body { padding-top: 48px; }
}

/* 네이버지도 링크 (a 요소) — 전역 a:hover 영향 제거 */
a.map-banner, a.map-panel, a.map-link { display: block; color: inherit; }
a.map-banner { display: flex; }
a.btn { text-align: center; }
a.map-banner:hover, a.map-panel:hover, a.map-link:hover, a.btn:hover { color: var(--c-text); text-decoration: none; }
a.map-link:hover .slot::after, a.map-panel:hover .slot::after { opacity: 0.6; }

/* ═════════════════════════════════════════════
   상단 내비게이션 — 1024px+ 에서만 표시
   (1023px 이하는 기존 헤더 그대로: .gnav 숨김, .header__lead 는 display:contents)
   ═════════════════════════════════════════════ */
.gnav { display: none; }
.header__lead { display: contents; }

@media (min-width: 1024px) {
  .screen { --content-max: 1280px; }
  .screen[data-screen="detail"] { --content-max: 1200px; }

  /* 로고 | 메뉴(가운데) | 우측 버튼 — 본문 최대폭에 맞춰 정렬 */
  .header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    column-gap: 32px;
    padding-left: max(var(--gutter-wide), calc((100% - var(--content-max)) / 2 + var(--gutter-wide)));
    padding-right: max(var(--gutter-wide), calc((100% - var(--content-max)) / 2 + var(--gutter-wide)));
  }
  .header > .brand, .header__lead { grid-column: 1; }
  .header > .gnav { grid-column: 2; }
  .header > .icon-btn { grid-column: 3; justify-self: end; }
  .header__lead { display: flex; align-items: center; gap: 16px; min-width: 0; }

  .gnav { display: flex; align-items: center; gap: 4px; }
  .gnav__link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 14px;
    border-radius: var(--r-30);
    font-size: 15px;
    line-height: 24px;
    font-weight: 600;
    color: var(--c-text);
    white-space: nowrap;
  }
  .gnav__link svg { color: var(--c-muted); }
  .gnav__link:hover {
    color: var(--c-link);
    text-decoration: none;
    box-shadow: inset 0 -2px 0 var(--c-accent);
    border-radius: 0;
  }
  .gnav__link:hover svg { color: var(--c-link); }
  .gnav__link:focus-visible { outline: 2px solid var(--c-accent-soft); outline-offset: 2px; }
}

/* 내 주변 맛집 (메인) — quick-card / chip-tag / btn-small 재사용 */
.home-near__title { margin-bottom: 4px; }
.home-near__desc,
.home-near__status { margin: 0 0 12px; }
.home-near__retry { margin: 0 0 12px; }
.near-card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 4px; }
.near-card__dist { font-size: var(--fs-13); line-height: var(--lh-13); font-weight: 700; color: var(--c-link); }
.near-card__more { flex-shrink: 0; font-size: var(--fs-13); line-height: var(--lh-13); font-weight: 600; color: var(--c-link); }

/* 감사 반영: 푸터 메인 링크, 검색 안내 링크 */
.footer__home { color: var(--c-text-strong); font-weight: 600; }
.footer__home:hover { color: var(--c-text); }
.nl-search__msg a { font-weight: 600; }
a.icon-btn:hover { text-decoration: none; }
