/* 출산준비물 (BabyPrep) — 라이트 테마 전용 · 모바일 우선 */
:root {
  --accent: #6ba8d6;
  --accent-dark: #3f7fb5;
  --accent-light: #e8f2fb;
  --bg: #f6fafd;
  --card: #ffffff;
  --text: #24303a;
  --text-sub: #63707c;
  --line: #e2ecf3;
  --good: #16a34a;
  --warn: #d97706;
  --bad: #dc2626;
  --mint: #5bbca6;
  --radius: 13px;
  --shadow: 0 1px 3px rgba(30, 60, 90, 0.06), 0 4px 14px rgba(30, 60, 90, 0.05);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Malgun Gothic', 'Noto Sans KR', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
}
.num, td.num, table.data td { font-variant-numeric: tabular-nums; }
a { color: var(--accent-dark); }

/* ---- 헤더 ---- */
.site-header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.header-inner {
  max-width: 880px; margin: 0 auto; padding: 0 16px;
  display: flex; align-items: center; gap: 18px; height: 56px;
}
.brand { font-weight: 800; font-size: 1.12rem; color: var(--text); text-decoration: none; white-space: nowrap; }
.site-nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.site-nav::-webkit-scrollbar { display: none; }
.site-nav a {
  color: var(--text-sub); text-decoration: none; font-size: 0.9rem;
  padding: 6px 10px; border-radius: 8px; white-space: nowrap;
}
.site-nav a:hover { background: var(--accent-light); color: var(--accent-dark); }

/* ---- 레이아웃 ---- */
.container { max-width: 880px; margin: 0 auto; padding: 24px 16px 40px; }
.page-title { font-size: 1.65rem; margin: 8px 0 4px; letter-spacing: -0.01em; }
.page-desc { color: var(--text-sub); margin: 0 0 20px; font-size: 0.98rem; }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 20px; margin-bottom: 20px;
}
.card h2 { font-size: 1.15rem; margin: 0 0 14px; }
.card h3 { font-size: 1.02rem; margin: 18px 0 8px; }

/* ---- 입력 폼 ---- */
.seg {
  display: inline-flex; border: 1px solid var(--line); border-radius: 999px;
  padding: 3px; background: #fff; margin-bottom: 16px; gap: 2px; flex-wrap: wrap;
}
.seg button {
  border: none; background: transparent; color: var(--text-sub);
  font-size: 0.88rem; font-weight: 600; padding: 7px 16px; border-radius: 999px; cursor: pointer;
}
.seg button.active { background: var(--accent); color: #fff; }

.input-field { margin-bottom: 8px; }
.input-field label { display: block; font-size: 0.86rem; font-weight: 600; color: var(--text-sub); margin-bottom: 5px; }
.input-field input[type='date'], .input-field input[type='number'] {
  width: 100%; max-width: 220px; padding: 9px 11px; border: 1px solid var(--line);
  border-radius: 9px; font-size: 1rem; background: #fff; color: var(--text);
  font-variant-numeric: tabular-nums;
}
.input-field input:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: var(--accent); }
.input-field .hint { font-size: 0.76rem; color: var(--text-sub); margin-top: 4px; }

.input-status {
  margin: 10px 0 4px; padding: 9px 13px; border-radius: 9px; font-size: 0.92rem; font-weight: 600;
}
.input-status.ok { background: var(--accent-light); color: var(--accent-dark); }
.input-status.err { background: #fef2f2; color: var(--bad); }

.opt-row { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; margin-top: 14px; }
.opt-row .field-inline { display: flex; align-items: center; gap: 8px; }
.opt-row label { font-size: 0.86rem; font-weight: 600; color: var(--text-sub); }
select {
  padding: 8px 11px; border: 1px solid var(--line); border-radius: 9px;
  font-size: 0.95rem; background: #fff; color: var(--text);
}
.switch { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.switch input { width: 16px; height: 16px; accent-color: var(--accent); }

/* ---- 진행률 ---- */
.progress-wrap { margin: 6px 0 20px; }
.progress-track { height: 12px; background: var(--accent-light); border-radius: 999px; overflow: hidden; }
.progress-bar { height: 100%; width: 0; background: var(--mint); border-radius: 999px; transition: width 0.25s ease; }
.progress-label { font-size: 0.85rem; color: var(--text-sub); margin-top: 6px; font-weight: 600; }

/* ---- 버튼 ---- */
.btn {
  display: inline-flex; align-items: center; gap: 6px; border: none; border-radius: 10px;
  padding: 11px 22px; font-size: 1rem; font-weight: 700; cursor: pointer;
  background: var(--accent); color: #fff; transition: background 0.15s; text-decoration: none;
}
.btn:hover { background: var(--accent-dark); }
.btn-secondary { background: #fff; color: var(--accent-dark); border: 1px solid var(--accent); }
.btn-secondary:hover { background: var(--accent-light); }
.btn-mini {
  border: 1px solid var(--line); background: #fff; color: var(--text-sub);
  font-size: 0.8rem; padding: 6px 12px; border-radius: 8px; cursor: pointer;
}
.btn-mini:hover { border-color: var(--accent); color: var(--accent-dark); }

/* ---- 타임라인 단계 ---- */
.stage {
  background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 18px 16px; margin-bottom: 16px;
}
.stage-current { border-left-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-light), var(--shadow); }
.stage-done { opacity: 0.82; border-left-color: var(--mint); }
.stage-upcoming { border-left-color: #d7e3ec; }

.stage-head { display: flex; align-items: center; gap: 12px; }
.stage-icon { font-size: 1.7rem; line-height: 1; }
.stage-titles { flex: 1; min-width: 0; }
.stage-titles h2 { font-size: 1.12rem; margin: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.stage-range { margin: 2px 0 0; font-size: 0.8rem; color: var(--text-sub); }
.stage-count {
  font-size: 0.9rem; font-weight: 700; color: var(--accent-dark);
  background: var(--accent-light); border-radius: 999px; padding: 4px 12px; white-space: nowrap;
}
.stage-desc { font-size: 0.9rem; color: var(--text-sub); margin: 10px 0 12px; }
.stage-empty { font-size: 0.86rem; color: var(--text-sub); font-style: italic; margin: 8px 0; }

.stage-badge {
  display: inline-block; border-radius: 999px; padding: 2px 10px;
  font-size: 0.74rem; font-weight: 700; vertical-align: middle;
}
.stage-badge.current { background: var(--accent); color: #fff; }
.stage-badge.done { background: #e6f6f1; color: #197a63; }
.stage-badge.upcoming { background: var(--bg); color: var(--text-sub); }

.stage-cta { margin-top: 14px; }
.stage-cta .btn { font-size: 0.92rem; padding: 9px 18px; }

/* ---- 체크리스트 ---- */
.check-list { list-style: none; margin: 0; padding: 0; }
.check-item {
  display: flex; align-items: center; gap: 10px; justify-content: space-between;
  padding: 11px 4px; border-bottom: 1px solid var(--line);
}
.check-item:last-child { border-bottom: none; }
.check-item .ci-main { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; flex: 1; min-width: 0; }
.check-item input[type='checkbox'] { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--mint); flex-shrink: 0; }
.ci-body { display: flex; flex-direction: column; min-width: 0; }
.ci-name { font-weight: 600; font-size: 0.96rem; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.ci-desc { font-size: 0.82rem; color: var(--text-sub); margin-top: 3px; }
.check-item.checked .ci-name { text-decoration: line-through; color: var(--text-sub); }
.check-item.checked { background: #f2faf7; }

.item-tags { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.tag { font-size: 0.68rem; font-weight: 700; border-radius: 6px; padding: 2px 7px; white-space: nowrap; }
.tag-essential { background: #fde8ea; color: #c0344a; }
.tag-optional { background: var(--bg); color: var(--text-sub); border: 1px solid var(--line); }
.tag-qty { background: var(--accent-light); color: var(--accent-dark); }
.tag-season { background: #fff4e6; color: #b26a09; }

.ci-buy {
  flex-shrink: 0; align-self: center; font-size: 0.82rem; font-weight: 700;
  color: var(--accent-dark); border: 1px solid var(--accent); border-radius: 8px;
  padding: 6px 12px; text-decoration: none; white-space: nowrap;
}
.ci-buy:hover { background: var(--accent-light); }

@media (max-width: 520px) {
  .check-item { flex-wrap: wrap; }
  .ci-buy { margin-left: 30px; }
}

/* ---- 주의문 ---- */
.notice {
  background: #fff8ec; border: 1px solid #f6e2bf; color: #8a6415;
  border-radius: 10px; padding: 11px 14px; font-size: 0.85rem; margin-top: 14px;
}
.ad-notice { }

/* ---- SEO 콘텐츠 / FAQ ---- */
.seo-content h2 { font-size: 1.2rem; }
.seo-content p, .seo-content li { font-size: 0.93rem; color: var(--text-sub); }
.seo-content table.data { width: 100%; border-collapse: collapse; font-size: 0.86rem; margin-top: 10px; }
.seo-content table.data th, .seo-content table.data td {
  padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top;
}
.seo-content table.data th { background: var(--bg); color: var(--text-sub); font-weight: 600; }
.table-wrap { overflow-x: auto; }
details.faq { border-bottom: 1px solid var(--line); padding: 10px 0; }
details.faq summary { cursor: pointer; font-weight: 600; font-size: 0.95rem; }
details.faq p { margin: 8px 0 0; font-size: 0.9rem; color: var(--text-sub); }

/* ---- 쿠팡 배너 ---- */
.promo { margin: 16px 0; text-align: center; }
.coupang-wrap { display: flex; justify-content: center; margin: 8px 0; min-height: 90px; overflow-x: hidden; }
.promo-disclosure { font-size: 0.72rem; color: #888; margin-top: 6px; }

/* ---- 양옆 레일 ---- */
.side-rail { display: none; position: fixed; top: 90px; width: 160px; z-index: 5; }
@media (min-width: 1280px) {
  .side-rail { display: block; }
  .side-l { left: calc(50% - 624px); }
  .side-r { left: calc(50% + 464px); }
}

/* ---- 푸터 ---- */
.site-footer {
  border-top: 1px solid var(--line); background: #fff; padding: 26px 16px 34px;
  text-align: center; font-size: 0.82rem; color: var(--text-sub);
}
.site-footer .disclaimer { max-width: 880px; margin: 0 auto 12px; color: var(--warn); font-weight: 600; }
.site-footer .links { margin-bottom: 10px; }
.site-footer .links a { margin: 0 8px; }
.cross-link { font-weight: 700; }

/* ---- 진입 애니메이션 ---- */
@media (prefers-reduced-motion: no-preference) {
  .card, .stage { animation: fadeUp 0.35s ease both; }
  @keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
}

@media (max-width: 640px) {
  .container { padding: 16px 12px 32px; }
  .card { padding: 16px; }
  .page-title { font-size: 1.4rem; }
}
