/* style.css — atlas-engine shared styles (mobile-first).
   브랜드 색상은 토큰(:root)로 분리 — 도메인/브랜드 확정 시 이 값만 교체. */

:root {
  --brand: #c85f7c;          /* 루지 로즈 (메인) */
  --brand-dark: #a8425f;     /* 진한 로즈 (호버·강조 텍스트) */
  --brand-tint: #fbeef2;     /* 연한 로즈 (배경 틴트·선택칩) */
  --brand-tint-strong: #f5d8e1;
  --text: #2b2b2b;
  --text-soft: #6b6b6b;
  --text-faint: #9a9a9a;
  --bg: #faf7f8;             /* 살짝 로즈빛 오프화이트 */
  --surface: #ffffff;
  --line: #ece4e7;
  --line-strong: #ddd0d5;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(80, 40, 55, 0.06);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, "Malgun Gothic", "Apple SD Gothic Neo", "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

a { color: var(--brand-dark); }

/* --- Header --- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}
.site-logo {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--brand-dark);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.site-nav-search {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--surface);
  background: var(--brand);
  padding: 7px 14px;
  border-radius: 999px;
  text-decoration: none;
}

main {
  max-width: 760px;
  margin: 0 auto;
  padding: 16px 16px 40px;
}

h1 {
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 8px 0 10px;
}
h2 {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 28px 0 12px;
}
.lead { color: var(--text-soft); margin: 0 0 16px; }

/* --- Breadcrumb --- */
.breadcrumb {
  max-width: 760px;
  margin: 0 auto;
  padding: 10px 16px 0;
  font-size: 0.8rem;
}
.breadcrumb ol {
  list-style: none; display: flex; flex-wrap: wrap; gap: 4px; margin: 0; padding: 0;
}
.breadcrumb li { color: var(--text-faint); }
.breadcrumb li:not(:last-child)::after { content: "›"; margin-left: 4px; color: var(--text-faint); }
.breadcrumb a { color: var(--text-soft); text-decoration: none; }
.breadcrumb a:hover { color: var(--brand-dark); }

/* --- Search CTA (home) --- */
.search-cta { margin: 4px 0 20px; }
.search-cta a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--brand);
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 12px 20px;
  border-radius: 999px;
  text-decoration: none;
  box-shadow: var(--shadow);
}
.search-cta a::before { content: "🔍"; font-size: 0.9em; }
.search-cta a:hover { background: var(--brand-dark); }

/* --- Price table --- */
.price-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 12px 0 8px;
  font-size: 0.9rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.price-table caption {
  caption-side: top;
  text-align: left;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-soft);
  padding: 0 0 8px;
}
.price-table th, .price-table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
.price-table tr:last-child th, .price-table tr:last-child td { border-bottom: 0; }
.price-table th { font-weight: 600; color: var(--text); width: 40%; background: var(--brand-tint); }
.price-table td { color: var(--text-soft); }

/* --- Region grid (home / gu list) --- */
.region-list { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 10px; }
.region-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.region-card a {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  box-shadow: var(--shadow);
  transition: border-color .12s, transform .12s;
}
.region-card a:hover { border-color: var(--brand); transform: translateY(-1px); }
.region-name { font-weight: 700; font-size: 1.02rem; }
.region-count { font-size: 0.8rem; color: var(--text-faint); }
/* gu list (구 링크) reuse region-card look via region-list li>a fallback */
.region-list li > a:not([class]) {
  display: block; padding: 12px 16px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  text-decoration: none; color: var(--text);
}
.region-list li > a:not([class]):hover { border-color: var(--brand); }

/* --- Shop cards --- */
.shop-list { list-style: none; padding: 0; margin: 10px 0; display: grid; gap: 10px; }
.shop-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: border-color .12s;
}
.shop-card:hover { border-color: var(--brand); }
.shop-card a { display: block; padding: 14px 16px; color: inherit; text-decoration: none; }
.shop-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.shop-card h3 { margin: 0; font-size: 1.02rem; font-weight: 700; }
.shop-loc { margin: 6px 0 0; font-size: 0.83rem; color: var(--text-faint); }
.badge {
  flex: none;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--brand-dark);
  background: var(--brand-tint);
  padding: 3px 9px;
  border-radius: 6px;
  white-space: nowrap;
}

/* --- Shop detail --- */
.category {
  display: inline-block;
  font-size: 0.8rem; font-weight: 600;
  color: var(--brand-dark); background: var(--brand-tint);
  padding: 4px 12px; border-radius: 999px; margin: 0 0 4px;
}
.shop-info {
  margin: 16px 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 4px 16px;
}
.shop-info dt { font-weight: 600; margin-top: 12px; font-size: 0.8rem; color: var(--text-faint); }
.shop-info dd { margin: 2px 0 12px; }

/* related links (구→업종/동, 인접) */
.type-list, .dong-list {
  list-style: none; padding: 0; margin: 8px 0 4px;
  display: flex; flex-wrap: wrap; gap: 8px;
}
.type-list li a, .dong-list li a {
  display: inline-block;
  font-size: 0.83rem;
  padding: 7px 13px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--text-soft);
  text-decoration: none;
}
.type-list li a:hover, .dong-list li a:hover { border-color: var(--brand); color: var(--brand-dark); }

footer {
  text-align: center;
  padding: 24px 16px;
  font-size: 0.75rem;
  color: var(--text-faint);
  border-top: 1px solid var(--line);
  margin-top: 24px;
}

/* --- AI recommend (natural-language) --- */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.ai-recommend {
  background: var(--brand-tint);
  border: 1px solid var(--brand-tint-strong);
  border-radius: var(--radius);
  padding: 16px;
  margin: 12px 0 20px;
}
.ai-recommend-title {
  margin: 0 0 12px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--brand-dark);
  display: flex;
  align-items: center;
  gap: 8px;
}
.ai-badge {
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
  background: var(--brand);
  padding: 3px 10px;
  border-radius: 999px;
  letter-spacing: 0.02em;
}
.ai-hint { margin: 8px 0 0; font-size: 0.8rem; color: var(--text-soft); }

/* --- Natural-language search --- */
.nl-search {
  display: flex; gap: 8px; margin: 0;
}
.nl-search input {
  flex: 1;
  padding: 12px 14px;
  border: 1.5px solid var(--brand-tint-strong);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  background: var(--surface);
}
.nl-search input:focus { outline: none; border-color: var(--brand); }
.nl-search button {
  padding: 12px 18px;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--brand);
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
}
.nl-search button:hover { background: var(--brand-dark); }
.nl-feedback { font-size: 0.85rem; margin: 4px 0 12px; min-height: 0; }
.nl-feedback .applied { color: var(--brand-dark); }
.nl-feedback .ignored, .nl-feedback .ambiguous { color: var(--text-faint); }

/* --- Search / filter page --- */
.search-hooks { display: flex; gap: 8px; margin: 12px 0; }
.search-hooks button {
  flex: 1; padding: 10px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-faint);
  font-size: 0.88rem;
  cursor: not-allowed;
}

.search-filters { display: grid; gap: 18px; margin: 18px 0; }
.filter-group { display: flex; flex-direction: column; gap: 8px; }
.filter-group > span, .filter-group > label {
  font-size: 0.82rem; font-weight: 700; color: var(--text-soft);
}
#filter-region { flex-direction: row; flex-wrap: wrap; gap: 8px; }
#filter-region select {
  flex: 1; min-width: 92px;
  padding: 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  background: var(--surface);
}
#category-options, #price-options { display: flex; flex-wrap: wrap; gap: 8px; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 0.82rem;
  background: var(--surface);
  color: var(--text-soft);
  cursor: pointer;
  transition: background .1s, border-color .1s, color .1s;
}
.chip:hover { border-color: var(--brand); }
.chip:has(input:checked) {
  background: var(--brand-tint);
  border-color: var(--brand);
  color: var(--brand-dark);
  font-weight: 600;
}
.chip input { position: absolute; opacity: 0; width: 0; height: 0; }

.result-count { font-size: 0.9rem; font-weight: 600; color: var(--text); margin: 16px 0 6px; }
.empty-state {
  padding: 32px 16px; text-align: center; color: var(--text-faint); font-size: 0.9rem;
  background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--radius);
}

@media (min-width: 640px) {
  .search-filters { grid-template-columns: 1fr 1fr; }
  #filter-region { grid-column: 1 / -1; }
}

.post-body { white-space: pre-wrap; }
