:root {
  color-scheme: light;
  --bg: #fafaf9;
  --fg: #1c1917;
  --muted: #6b7280;
  --border: #e7e5e4;
  --accent: #b45309;
  --card: #ffffff;
  --table-head-bg: #f5f5f4;
  --accent-soft: #fef3e2;
  --fg-soft: #44403c;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  word-break: keep-all;
  line-height: 1.7;
}

a {
  color: var(--accent);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--border);
}

.site-header-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.site-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--fg);
}

.site-title .paw {
  width: 22px;
  height: 22px;
  color: var(--accent);
}

.site-nav {
  display: flex;
  gap: 18px;
}

.site-nav a {
  color: var(--fg-soft);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
}

.site-nav a:hover {
  color: var(--accent);
}

main {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 20px 60px;
}

main.wide {
  max-width: 1080px;
}

.back a {
  text-decoration: none;
  font-size: 0.9rem;
}

article h1 {
  font-size: 1.5rem;
  margin-top: 0.4em;
}

article h2 {
  font-size: 1.15rem;
  margin-top: 1.8em;
  border-bottom: 1px solid var(--border);
  padding-bottom: 6px;
}

article h3 {
  font-size: 1rem;
  color: var(--accent);
}

article ul {
  padding-left: 1.2em;
}

/* 상품 스펙 비교 표 */
article table {
  width: 100%;
  border-collapse: collapse;
  margin: 1em 0;
  font-size: 0.92rem;
}

article table th,
article table td {
  border: 1px solid var(--border);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
  word-break: keep-all;
  overflow-wrap: break-word;
}

article table th {
  background: var(--table-head-bg);
  font-weight: 600;
}

/* 첫 번째 열(항목 라벨: 가격/주요 스펙 등)은 글자 단위로 줄바꿈되지 않게 */
article table td:first-child,
article table th:first-child {
  white-space: nowrap;
  width: 1%;
}

article table tr:first-child td {
  font-weight: 700;
}

/* 제목 아래 메타 라인 (카테고리 · 발행일 · 읽는 시간) */
.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0.4em 0 1.4em;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.article-meta .meta-category {
  color: var(--accent);
  font-weight: 600;
}

.article-meta .meta-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--border);
  display: inline-block;
}

/* 목차 (섹션 4개 이상일 때만 build-site.js가 생성) */
.toc {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 18px;
  margin: 1.4em 0;
}

.toc-title {
  margin: 0 0 8px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.toc ol {
  margin: 0;
  padding-left: 1.3em;
  font-size: 0.92rem;
}

.toc li {
  margin: 4px 0;
}

.toc a {
  text-decoration: none;
}

.toc a:hover {
  text-decoration: underline;
}

/* 핵심 숫자 카드 (가격·용량 등 한눈에 보이는 수치) */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin: 1.4em 0;
}

.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
}

.stat-num {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.stat-label {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 6px;
  line-height: 1.45;
}

/* 본문 흐름 중간에 넣는 용어·개념 풀이 박스 */
.term-box {
  background: var(--table-head-bg);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 10px;
  padding: 16px 18px;
  margin: 1.4em 0;
}

.term-box .term-label {
  margin: 0 0 6px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.term-box p:last-child {
  margin: 0;
  font-size: 0.93rem;
  line-height: 1.7;
}

/* 자주 묻는 질문 (details/summary로 접었다 폈다) */
.faq details {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  padding: 0 16px;
  margin: 8px 0;
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 13px 0;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::before {
  content: "Q. ";
  color: var(--accent);
  font-weight: 700;
}

.faq details[open] summary {
  border-bottom: 1px solid var(--border);
}

.faq details p {
  font-size: 0.93rem;
  line-height: 1.7;
  margin: 12px 0;
}

/* 데이터 출처 */
.sources {
  font-size: 0.85rem;
  color: var(--muted);
}

.sources li {
  margin: 5px 0;
}

/* 한눈에 보기(TL;DR) 요약 박스 */
.tldr {
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  padding: 14px 18px;
  margin: 1.2em 0 1.6em;
}

.tldr p:first-child {
  margin-top: 0;
  font-weight: 700;
  font-size: 0.95rem;
}

.tldr ul {
  margin: 0.4em 0 0;
  padding-left: 1.2em;
}

.tldr li {
  margin: 0.3em 0;
}

/* 상품 핵심 특징 배지 (예: 그레인프리, 중형견용) */
.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0.6em 0;
}

.badge {
  display: inline-block;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  border-radius: 999px;
  padding: 3px 11px;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}

/* 표 안에서 상품 간 실제로 갈리는 스펙 값을 강조 */
article table strong {
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  padding: 0 3px;
  border-radius: 3px;
}

/* 전문용어에 붙이는 짧은 설명 (마우스 오버/길게 누르면 표시) */
article abbr {
  text-decoration: none;
  border-bottom: 1px dotted var(--muted);
  cursor: help;
}

/* "상황별 추천" 핵심 판단을 문단 대신 색으로 구분한 카드로 보여준다 */
.signal-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin: 1.2em 0;
}

.signal {
  border-radius: 10px;
  padding: 14px 16px;
  border: 1px solid transparent;
}

.signal .signal-head {
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.signal p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.6;
}

.signal.green {
  background: rgba(22, 163, 74, 0.07);
  border-color: rgba(22, 163, 74, 0.25);
}
.signal.green .signal-head {
  color: #15803d;
}

.signal.yellow {
  background: rgba(217, 119, 6, 0.07);
  border-color: rgba(217, 119, 6, 0.25);
}
.signal.yellow .signal-head {
  color: #b45309;
}

.signal.red {
  background: rgba(220, 38, 38, 0.06);
  border-color: rgba(220, 38, 38, 0.22);
}
.signal.red .signal-head {
  color: #b91c1c;
}

/* 가격 확인일이 오래된 글에 build-site.js가 자동으로 붙이는 경고줄 */
.price-freshness-warning {
  font-size: 0.82rem;
  color: #b45309;
  background: rgba(217, 119, 6, 0.08);
  border: 1px solid rgba(217, 119, 6, 0.25);
  border-radius: 6px;
  padding: 8px 12px;
  margin: 0 0 1.2em;
}

/* 품절로 확인된 상품이 있는 글에 build-site.js가 자동으로 붙이는 경고줄.
   가격 최신성 경고(주의)보다 더 긴급한 신호라 붉은 계열로 구분한다. */
.availability-warning {
  font-size: 0.82rem;
  font-weight: 600;
  color: #b91c1c;
  background: rgba(220, 38, 38, 0.07);
  border: 1px solid rgba(220, 38, 38, 0.25);
  border-radius: 6px;
  padding: 8px 12px;
  margin: 0 0 1.2em;
}

.price-date {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--muted);
}

/* 텍스트로만 된 쿠팡 구매 링크를 버튼처럼 강조한다. href 패턴이 아니라
   .buy-link 클래스로 스코프한다 — href 패턴으로 매칭하면 위젯/이미지
   embed(<a href="..."><img></a>)까지 걸려서 상품 이미지에 불필요한
   버튼 배경/패딩이 씌워지는 문제가 있었다. */
.buy-link {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 9px 18px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
}

.buy-link:hover {
  opacity: 0.88;
}

/* 구매 행 셀 안에 위젯 이미지가 들어갈 때 표 셀 안에서 자연스럽게 보이도록 */
article table td a img {
  display: block;
  max-width: 100%;
  height: auto;
}

.related-articles {
  margin-top: 2.5em;
  padding-top: 1.2em;
  border-top: 1px solid var(--border);
}

.related-articles h2 {
  font-size: 1.05rem;
  border-bottom: none;
  margin-top: 0;
}

.related-articles ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.related-articles li {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.related-articles a {
  text-decoration: none;
  color: var(--fg);
  font-weight: 500;
  font-size: 0.92rem;
}

.related-articles a:hover {
  color: var(--accent);
}

.ad-banner {
  margin: 2.5em 0 0.5em;
  padding-top: 1.5em;
  border-top: 1px dashed var(--border);
  display: flex;
  justify-content: center;
  overflow-x: auto;
}

.search-widget {
  max-width: 400px;
  margin: 0 auto 14px;
}

.site-footer {
  max-width: 720px;
  margin: 0 auto;
  padding: 20px;
  color: var(--muted);
  font-size: 0.8rem;
  border-top: 1px solid var(--border);
}

.site-footer p {
  margin: 6px 0;
}

.site-footer.wide {
  max-width: 1080px;
}

/* ---------- 홈 ---------- */

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  align-items: center;
  gap: 48px;
  padding: 56px 0 44px;
}

.hero-visual {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 26px 26px 22px;
  box-shadow: 0 24px 50px -28px rgba(28, 25, 23, 0.35);
}

.hv-head {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.hv-head span {
  text-align: center;
  font-weight: 800;
  font-size: 1.15rem;
  padding: 9px 0;
  background: var(--table-head-bg);
  border-radius: 10px;
}

.hv-head b {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--fg);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
}

.hv-label {
  margin: 16px 0 6px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #a8a29e;
}

.hv-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.hv-row i {
  position: relative;
  height: 14px;
  border-radius: 7px;
  background: var(--border);
  overflow: hidden;
}

.hv-row i::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--w);
  border-radius: 7px;
  background: #d6d3d1;
}

.hv-row i.hi::after {
  background: var(--accent);
}

.hv-calc {
  margin: 20px 0 0;
  padding-top: 16px;
  border-top: 2px dashed var(--border);
  text-align: center;
  font-weight: 800;
  font-size: 1.2rem;
}

.hv-calc em {
  font-style: normal;
  color: var(--accent);
  margin: 0 4px;
}

.hv-calc span {
  font-size: 1rem;
  color: var(--muted);
}

.hero::after {
  content: "";
  position: absolute;
  right: -30px;
  top: 10px;
  width: 340px;
  height: 260px;
  background-image: radial-gradient(var(--border) 2px, transparent 2px);
  background-size: 20px 20px;
  z-index: -1;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--accent);
}

.hero-eyebrow .paw {
  width: 18px;
  height: 18px;
}

.hero-title {
  margin: 14px 0 0;
  font-size: clamp(2rem, 4.6vw, 2.75rem);
  font-weight: 800;
  line-height: 1.22;
  letter-spacing: -0.035em;
}

.hero-title em {
  font-style: normal;
  color: var(--accent);
}

.hero-lead {
  max-width: 620px;
  margin: 18px 0 0;
  font-size: 1.08rem;
  color: var(--fg-soft);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.btn {
  display: inline-block;
  padding: 11px 20px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 6px 16px -8px rgba(180, 83, 9, 0.7);
}

.btn-ghost {
  background: var(--card);
  color: var(--fg);
  border: 1px solid var(--border);
}

.btn:hover {
  transform: translateY(-1px);
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 34px 0 0;
}

.hero-stats div {
  min-width: 128px;
  padding: 14px 18px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.hero-stats dt {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 600;
}

.hero-stats dd {
  margin: 2px 0 0;
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.home-section {
  margin-top: 52px;
  scroll-margin-top: 80px;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 14px;
  margin-bottom: 18px;
}

.section-head h2 {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}

.post-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--fg);
  text-decoration: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.post-card:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
  box-shadow: 0 12px 28px -18px rgba(28, 25, 23, 0.35);
  transform: translateY(-2px);
}

.post-cat {
  align-self: flex-start;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 3px 10px;
}

.post-title {
  font-size: 1.06rem;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: -0.01em;
}

.post-excerpt {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-date {
  margin-top: auto;
  padding-top: 4px;
  font-size: 0.78rem;
  color: #a8a29e;
}

.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
}

.cat-card {
  padding: 22px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  scroll-margin-top: 80px;
}

.cat-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cat-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  font-size: 1.45rem;
  background: var(--accent-soft);
  border-radius: 12px;
  flex-shrink: 0;
}

.cat-head h3 {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 800;
}

.cat-count {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.cat-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 14px 0 6px;
}

.cat-metrics span {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--fg-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px 10px;
}

.cat-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
}

.cat-list li {
  border-top: 1px solid #f0efed;
}

.cat-list a {
  display: block;
  padding: 9px 0;
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.5;
  color: var(--fg);
  text-decoration: none;
}

.cat-list a:hover {
  color: var(--accent);
}

.how-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.how-steps li {
  padding: 22px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
}

.step-no {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--fg);
  color: #fff;
  font-weight: 800;
  font-size: 0.9rem;
}

.how-steps h3 {
  margin: 12px 0 6px;
  font-size: 1.05rem;
  font-weight: 800;
}

.how-steps p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.65;
}

.how-more {
  margin: 14px 0 0;
  font-size: 0.92rem;
  font-weight: 600;
}

.how-more a {
  text-decoration: none;
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
  }
  .hero-visual {
    display: none;
  }
}

@media (max-width: 560px) {
  .site-nav a[href="/#recent"] {
    display: none;
  }
  .hero {
    padding: 32px 0 28px;
  }
  .hero::after {
    display: none;
  }
  .hero-stats {
    gap: 8px;
  }
  .hero-stats div {
    flex: 1 1 0;
    min-width: 0;
    padding: 12px;
  }
  .hero-stats dt,
  .hero-stats dd {
    white-space: nowrap;
  }
  .hero-stats dt {
    font-size: 0.74rem;
  }
  .hero-stats dd {
    font-size: 1.25rem;
  }
  .post-grid,
  .cat-grid {
    grid-template-columns: 1fr;
  }
}
