/* ============================================================
   아가자람 — main.css
   디자인 토큰(라이트/다크) + 편집(에디토리얼) 컴포넌트 스타일
   원칙: 1px 얇은 구분선 · 2~4px 모서리 · 넓은 여백 · 큰 제목 ·
         문항 앞 작은 번호(CSS counter) · 미니멀 셀렉트·버튼 ·
         체크박스 스타일 · 390px 가로 넘김 없음
   색은 전부 var() 참조 — 하드코딩 없음. 다크는 tokens.css 자동.
   ============================================================ */

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

* { margin: 0; }

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--text);
  background-color: var(--bg);
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* 작업 48: 한국어 단어 중간 줄바꿈 금지 + 긴 영문·URL 이 폭을 넘지 않도록 */
  word-break: keep-all;
  overflow-wrap: break-word;
}

img,
svg { max-width: 100%; height: auto; }

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }

ul,
ol { list-style: none; padding: 0; }

h1, h2, h3, h4 {
  font-weight: 650;
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--text);
}
h1 { font-size: var(--text-3xl); font-weight: 750; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.15rem; }

p { color: var(--text); }

code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background-color: var(--accent-soft);
  color: var(--text);
  padding: 0.1em 0.4em;
  border-radius: var(--radius-xs);
}

/* ---------- 레이아웃 ---------- */
main {
  /* 작업 48: 본문 폭 52rem 하나로 통일(헤더·푸터는 76rem 유지). 개별 섹션의
     52rem max-width 규칙들은 중복이 되어 정리됨. */
  max-width: 52rem;
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 3rem) clamp(1rem, 4vw, 2.5rem);
}

/* 마크다운 본문 (홈·소개·개인정보) */
.intro h1 { margin-bottom: 1.5rem; }
.body { overflow-wrap: break-word; }
.body > * + * { margin-top: 1em; }
.body h2 {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}
.body h3 { margin-top: 1.75rem; }
.body ul:not(.milestone-list),
.body ol { list-style: disc; padding-left: 1.3rem; }
.body ol { list-style: decimal; }
.body ul li,
.body ol li { margin-top: 0.4rem; }
.body blockquote {
  border-left: 3px solid var(--accent);
  padding: 0.6rem 1rem;
  background-color: var(--accent-soft);
  color: var(--muted);
  font-style: italic;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* 마크다운 표 — 표만 가로 스크롤 (좁은 화면 대응) */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1.25rem 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.table-wrap table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}
.table-wrap th,
.table-wrap td {
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  padding: 0.55rem 0.75rem;
  text-align: left;
  vertical-align: top;
  line-height: 1.55;
  word-break: keep-all;
}
.table-wrap th { background-color: var(--surface-2); font-weight: 650; }
.table-wrap tr:last-child td { border-bottom: none; }
.table-wrap th:last-child,
.table-wrap td:last-child { border-right: none; }

/* ---------- 헤더 ---------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 76rem;
  margin: 0 auto;
  padding: 0.85rem clamp(1rem, 4vw, 2.5rem);
  border-bottom: 1px solid var(--line);
  background-color: var(--bg);
}
.site-logo { flex: none; }
.site-logo img,
.site-logo svg { height: 38px; width: auto; display: block; }

.site-nav {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.25rem 0.75rem;
}
.site-nav a {
  font-size: var(--text-sm);
  color: var(--text);
  white-space: nowrap;
  padding: 0.4rem 0.5rem;
  border-radius: var(--radius-sm);
  flex: 0 0 auto;
}
.site-nav a[aria-current] { color: var(--accent); font-weight: 650; }

/* 월령 드롭다운 — <details>/<summary>, JS 없음 */
.nav-ages { position: relative; flex: 0 1 auto; min-width: 0; }
.nav-ages-summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
  padding: 0.4rem 0.5rem;
  border-radius: var(--radius-sm);
}
.nav-ages-summary::-webkit-details-marker { display: none; }
.nav-ages-summary::after { content: " ▾"; }
.nav-ages[open] .nav-ages-summary::after { content: " ▴"; }
.nav-ages-grid {
  list-style: none;
  position: absolute;
  top: calc(100% + 0.4rem);
  left: 0;
  z-index: 50;
  width: max-content;
  min-width: 16rem;
  max-width: calc(100vw - 2rem);
  margin: 0;
  padding: 0.4rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background-color: var(--surface-2);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.15rem 0.4rem;
}
.nav-ages-grid li { min-width: 0; }
.nav-ages-grid a {
  display: block;
  padding: 0.4rem 0.55rem;
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  color: var(--text);
  white-space: nowrap;
  word-break: keep-all;
}
.nav-ages-grid a:hover { background-color: var(--accent-soft); color: var(--accent); }
.nav-ages-grid a[aria-current] { color: var(--accent); font-weight: 650; }
@media (max-width: 560px) {
  .nav-ages-grid { min-width: 0; }
}
/* 데스크톱(720px+): 월령 드롭다운 오른쪽 끝 정렬 (화면 밖으로 안 나가게) */
@media (min-width: 720px) {
  .nav-ages-grid { left: auto; right: 0; }
}

/* 작업 40b — 머리 메뉴 드롭다운 3개 → 작업 47b: 4개 (월령별 이정표 / 건강·접종 / 이유식 / 생활·돌봄) */
.nav-ages-summary.nav-on { font-weight: 750; text-decoration: underline; text-underline-offset: 4px; }
.nav-grid-1col { grid-template-columns: 1fr; min-width: 0; }
@media (max-width: 719px) {
  /* 좁은 화면에서 가장 오른쪽 드롭다운(생활·돌봄)은 오른쪽 끝에 맞춤 — 화면 밖으로 안 나가게 */
  .nav-menu-end .nav-ages-grid { left: auto; right: 0; }
}

/* ---------- 고지 (disclaimer) ---------- */
.disclaimer {
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  background-color: var(--accent-soft);
  padding: 0.9rem 1.1rem;
  margin: 1.5rem 0;
}
.disclaimer p { font-size: var(--text-sm); color: var(--text); line-height: 1.6; }

/* ---------- 월령 상세 페이지 ---------- */
.age-detail > .body { counter-reset: milestone; }

/* 인덱스 숫자 — 월령 코드·위치 / 영역 번호 (작업 13) */
.age-index {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 0.6rem;
}
/* 작업 19/20: 월령별 삽화 — 최대 720px, 화면 가운데 정렬, 라이트 모드 모서리 4px·테두리 없음 */
/* 작업 48(감독자): 본문 폭 52rem 에 맞춰 왼쪽·오른쪽 끝을 글줄과 같은 선에 — 월령 삽화는 대표 그림이라 본문 폭 전체 */
.age-illust {
  margin: 1.5rem auto;
}
.age-illust img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  border: 0;
}
/* 작업 22: 다크 모드 삽화 mask(가장자리 스며들기) 제거 — 다크도 라이트와 동일(모서리 4px, 가운데 정렬 유지) */
/* 발달 영역: 구분선(상단) + 인덱스·제목 같은 줄, 세로 가운데 정렬 (작업 14) */
.domain {
  margin-top: 2.25rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line-strong);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 0.75rem;
}
.domain:first-of-type { margin-top: 2rem; }
.domain-index {
  flex: none;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  min-width: 3.5rem;
}
.domain h2 {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  padding-top: 0;
  border-top: none;
}
.domain-sub {
  flex: 1 1 100%;
  margin: 0.4rem 0 1.1rem;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.milestone-list { list-style: none; margin-top: 0; flex: 1 1 100%; }
.milestone-item {
  counter-increment: milestone;
  position: relative;
  padding: 0.95rem 0 0.95rem 2.6rem;
  border-bottom: 1px solid var(--line);
}
.milestone-item::before {
  content: counter(milestone, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 1.05rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.milestone-label {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  cursor: pointer;
}
.milestone-label input[type="checkbox"] {
  flex: 0 0 auto;
  margin-top: 0.2rem;
  width: 1.15rem;
  height: 1.15rem;
  accent-color: var(--accent);
  cursor: pointer;
}
.milestone-ko { flex: 1 1 auto; color: var(--text); }

.milestone-en { margin-top: 0.55rem; }
.milestone-en summary {
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.milestone-en summary:hover,
.milestone-en[open] summary { color: var(--accent); }
.milestone-en p {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--line);
  font-size: var(--text-sm);
  line-height: 1.6;
  color: var(--muted);
}

/* ---------- 출처 및 면책 ---------- */
.attribution {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}
.attribution h2 { font-size: 1.25rem; margin-bottom: 0.9rem; }
.attribution-source,
.attribution-text,
.attribution-en { font-size: var(--text-sm); line-height: 1.65; }
.attribution-source { margin-top: 0.6rem; }
.attribution-source a { color: var(--accent); text-decoration: underline; }
.attribution-text { margin-top: 0.6rem; white-space: pre-line; color: var(--text); }
.attribution-en { margin-top: 0.5rem; color: var(--muted); }

/* ---------- '우리 아이 몇 개월?' 선택기 (홈) ---------- */
.age-picker,
.ages-nav {
  margin-top: 2.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background-color: var(--surface-2);
  padding: clamp(1.25rem, 3vw, 1.75rem);
}
.age-picker h2,
.ages-nav h2 { font-size: 1.4rem; margin-bottom: 0.4rem; }
.age-picker-hint {
  font-size: var(--text-sm);
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 1.25rem;
}
.age-picker-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem;
}
.age-picker-form label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: 0.35rem;
}
.age-birth-row {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
}
.age-birth-row select,
.cal-birth-row select {
  flex: 1 1 0;
  min-width: 0;
  height: 48px;
  font-family: var(--font-sans);
  font-size: 1.05rem;
  padding: 0.45rem 0.55rem;
  color: var(--text);
  background-color: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23546159' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.7rem center;
  background-size: 1.1rem 1.1rem;
  padding-right: 2rem;
}
.age-birth-row select#birth-y { flex: 1.6 1 0; }
.age-birth-row select:focus-visible,
.cal-birth-row select:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
/* 작업 23: 다크 모드 화살표 색 — 라이트(#546159) → 다크(--muted #9EAE9F) 매칭 */
[data-theme="dark"] .age-birth-row select,
[data-theme="dark"] .cal-birth-row select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239EAE9F' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .age-birth-row select,
  :root:not([data-theme="light"]) .cal-birth-row select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239EAE9F' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  }
}

/* 보조: 개월 수로 고르기 (− / 숫자 / +) */
.age-manual { margin-top: 0.9rem; }
.age-manual summary {
  cursor: pointer;
  user-select: none;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--muted);
  padding: 0.25rem 0;
}
.age-manual summary:hover { color: var(--accent); }
.age-manual-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}
.age-step {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  font-family: var(--font-sans);
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1;
  color: var(--text);
  background-color: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.age-step:hover { background-color: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.age-manual-row input[type="number"] {
  width: 5rem;
  min-height: 44px;
  padding: 0.5rem 0.6rem;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  color: var(--text);
  text-align: center;
  background-color: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
}
.age-manual-row input[type="number"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.age-unit { font-size: var(--text-sm); color: var(--muted); }
.age-picker-form button {
  padding: 0.6rem 1.25rem;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--bg);
  background-color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  cursor: pointer;
  height: 48px;
  box-sizing: border-box;
}
.age-picker-form button:hover { background-color: var(--accent-2); border-color: var(--accent-2); }
.age-picker-form button:active { opacity: 0.9; }

.age-picker-result { margin-top: 1rem; font-size: var(--text-sm); line-height: 1.65; }
.age-picker-result a { color: var(--accent); font-weight: 600; }
.age-picker-link {
  display: inline-block;
  margin-top: 0.9rem;
  padding: 0.6rem 1.25rem;
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--bg);
  background-color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
}
.age-picker-link:hover { background-color: var(--accent-2); }
.age-picker-result .age-picker-link,
.age-picker-result .age-picker-link:hover { color: var(--bg); }

/* 홈의 시기 목록 (noscript) */
.age-links { list-style: none; margin-top: 1rem; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.4rem; }
.age-links a {
  display: block;
  padding: 0.5rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  color: var(--text);
}
.age-links a:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- 광고 슬롯 ---------- */
.ad-slot {
  margin: 2.5rem auto;
  max-width: 40rem;
  text-align: center;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-md);
  background-color: var(--surface-2);
  padding: 2.25rem 1.25rem;
}
.ad-label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-xs);
  padding: 0.2rem 0.55rem;
}
.ad-hint { display: block; margin-top: 0.8rem; font-size: var(--text-sm); color: var(--muted); }

/* ---------- 푸터 ---------- */
.site-footer {
  max-width: 76rem;
  margin: 0 auto;
  padding: 1.75rem clamp(1rem, 4vw, 2.5rem) 2.5rem;
  border-top: 1px solid var(--line);
}
.site-footer p { font-size: var(--text-sm); line-height: 1.7; color: var(--text); }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--accent); }
.muted { color: var(--muted); }

/* ---------- 반응형 : 390px에서 가로 넘김 없음 ---------- */
@media (max-width: 719px) {
  .site-header { flex-wrap: wrap; }
  .site-logo img,
  .site-logo svg { height: 32px; }
  .site-nav { order: 3; width: 100%; justify-content: flex-start; overflow: visible; padding-bottom: 0.2rem; }
  .age-picker-form { flex-direction: column; align-items: stretch; }
  .age-picker-form button { width: 100%; }
  .age-links { grid-template-columns: 1fr; }
}
/* 작업 22: 데스크톱(720px+) — 생일 선택 3개 합쳐 최소 22rem, 개월 수칸 48px */
@media (min-width: 720px) {
  .age-birth-row { min-width: 22rem; }
  .age-step { height: 48px; }
  .age-manual-row input[type="number"] { height: 48px; }
}

/* ---------- 작업 24: 우리 글 (our-note) + /checkup 페이지 ---------- */
/* our-note — 월령 페이지에서 체크리스트·출처와 확실히 구분 (규칙 8) */
.our-note {
  background: var(--warm-soft);
  border-left: 3px solid var(--warm);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
}
.our-note h2 { margin: 0 0 0.5rem; }
.our-note p { margin: 0 0 0.75rem; }
.our-note a { color: var(--warm); font-weight: 600; }
.our-note a:hover { text-decoration: underline; }

/* our-note 내부 그리드 — 720px 미만 한 줄, 720px 이상 2칸 (작업 25). 색은 전부 tokens 변수. */
.our-note-grid { display: grid; gap: 1rem; }
.our-note-col { min-width: 0; }
.our-note-col + .our-note-col { border-top: 1px solid var(--line); padding-top: 1rem; }
@media (min-width: 720px) {
  .our-note-grid { grid-template-columns: 1fr 1fr; gap: 1.25rem; }
  .our-note-col + .our-note-col { border-top: 0; padding-top: 0; }
}
.our-note-col h3 { margin-bottom: 0.4rem; }
.our-note-col ul { list-style: disc; padding-left: 1.25rem; }
.our-note-col li { margin-top: 0.4rem; line-height: 1.6; }
.our-note .our-note-small { color: var(--muted); font-size: var(--text-sm); margin: 0.75rem 0 0; }
.our-note .our-note-src { color: var(--muted); font-size: var(--text-xs); margin: 1rem 0 0; }

/* our-note 라벨 — our-note 박스 안 + /checkup 페이지 맨 위 (작은 글씨 var(--muted)) */
.our-note-label {
  font-size: var(--text-xs);
  font-weight: 650;
  color: var(--muted);
  letter-spacing: 0.02em;
  margin: 0 0 0.75rem;
}

/* /checkup 페이지 — 색은 전부 tokens.css 변수 (규칙 4: 새 색 값 없음) */
.checkup h1 { margin: 0.5rem 0 1rem; }
.checkup-intro {
  font-size: var(--text-lg);
  line-height: 1.65;
  color: var(--muted);
  margin: 0 0 1.75rem;
}
/* 일정표 — .table-wrap(기존)이 overflow-x:auto 담당, 머리줄 배경 var(--surface) */
.checkup-table { width: 100%; }
@media (max-width: 480px) {
  .checkup-table th, .checkup-table td { padding: 0.5rem 0.4rem; font-size: var(--text-xs); }
}
.checkup-table th { background-color: var(--surface); }
.checkup-notes {
  list-style: disc;
  padding-left: 1.3rem;
  margin: 0.25rem 0 0.5rem;
}
.checkup-notes li { margin-top: 0.4rem; line-height: 1.6; }
.checkup-section h2 { margin-top: 2.25rem; }
.checkup-section ul { list-style: disc; padding-left: 1.3rem; margin-top: 0.75rem; }
.checkup-section li { margin-top: 0.5rem; line-height: 1.6; }
.checkup-sources h2 { margin-top: 2.25rem; }
.checkup-sources ul { list-style: disc; padding-left: 1.3rem; margin-top: 0.75rem; }
.checkup-sources li { margin-top: 0.4rem; line-height: 1.6; }
.checkup-sources a { color: var(--accent); }
.checkup-sources a:hover { text-decoration: underline; }
.checkup-checked { color: var(--muted); font-size: var(--text-sm); margin-top: 0.75rem; }

/* ---------- 작업 26: 한눈에 보기 — 바로가기 + 검진·접종 배지 + chip ---------- */
/* 스크롤 부드럽게 — reduced-motion 이면 끄기 (색·상자 없음) */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* 월령 페이지 위쪽 바로가기 한 줄 (고지 아래) — 알약 2개, 모바일도 한 줄(필요하면 줄바꿈) */
.page-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0 0.25rem;
}
.page-jump a {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--accent);
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.page-jump a:hover { background: var(--surface-hover); text-decoration: underline; }

/* our-note 안 "한눈에" 배지 — h3 아래 바로, 두 칸 맨 위 줄 높이를 비슷하게 */
.care-badge { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.4rem 0.55rem; margin: 0 0 0.7rem; }
.care-big { font-size: var(--text-xl); font-weight: 700; line-height: var(--leading-tight); color: var(--text); }
.care-when { color: var(--muted); font-size: var(--text-sm); }
.care-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.12rem 0.6rem;
  border-radius: var(--radius-md);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.care-tag-now { background: var(--accent); color: var(--surface-2); }
.care-tag-next { background: transparent; border: 1px solid var(--line-strong); color: var(--muted); }

/* chip 목록 — our-note 예방접종 + /vaccines 월령별 표 두 칸에 공용 */
.care-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; list-style: none; margin: 0 0 0.7rem; padding: 0; }
.care-chips li {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.72rem;
  border-radius: var(--radius-md);
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: var(--text-xs);
  line-height: 1.4;
}
.care-none { color: var(--muted); font-size: var(--text-sm); }

/* /vaccines 표 — 섹션 제목 간격 + 월령별 표 라벨 링크·chip */
.vaccines h2 { margin-top: 2.25rem; }
.vaccines-byage td { vertical-align: top; }
.vaccines-byage td:first-child { white-space: nowrap; }
.vaccines-byage a { color: var(--accent); font-weight: 600; }
.vaccines-byage a:hover { text-decoration: underline; }
.vaccines-byage .care-chips { margin: 0; }

/* ---------- 작업 27: 길 그림(전체 중 지금 여기) + 접종 지도 ---------- */

/* sr-only — 화면에만 안 보이는 접근성 텍스트 */
.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;
}

/* our-note margin — spec: top 1.25rem, bottom 1.5rem (상자를 위로 옮김) */
.our-note { margin: 1.25rem 0 1.5rem; }

/* 길 그림 — care-path: 한 줄에 모든 점, 점 사이 가로선 (감독자 수정) */
.our-note-col .care-path,
.our-note-col .care-chips { list-style: none; padding-left: 0; }
.our-note-col .care-path li,
.our-note-col .care-chips li { margin-top: 0; }
.care-path-note {
  font-size: var(--text-xs);
  color: var(--muted);
  font-weight: 650;
  margin: 0 0 0.2rem;
}
.care-path {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  position: relative;
  margin: 0 0 1rem;
  padding: 1.5rem 0 0;
}
.care-path::before {
  content: "";
  position: absolute;
  top: calc(1.5rem + 1.2rem - 1px);
  left: 5%;
  right: 5%;
  height: 2px;
  background: var(--line-strong);
}
.care-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  min-width: 0;
}
.care-dot {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 1.9rem;
  height: 1.9rem;
  margin: 0.25rem 0;
  border-radius: 50%;
  background: var(--surface-2);
  border: 2px solid var(--line-strong);
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: 750;
  line-height: 1;
  position: relative;
  z-index: 1;
}
.care-step-top {
  display: block;
  margin-top: 0.3rem;
  font-size: var(--text-xs);
  font-weight: 650;
  line-height: 1.2;
  white-space: nowrap;
  color: var(--muted);
}
.care-step-unit {
  display: block;
  font-size: 0.68rem;
  line-height: 1.3;
  color: var(--muted);
}
/* 지난 시기 — 흐리게 */
.care-step.is-past .care-dot { background: var(--line); border-color: var(--line); }
.care-step.is-past .care-step-top,
.care-step.is-past .care-step-unit { color: var(--muted); }
/* 지금 — 크고 진하게 */
.care-step.is-now .care-dot,
.care-step.is-next .care-dot { width: 2.4rem; height: 2.4rem; margin: 0; font-size: var(--text-sm); }
.care-step.is-now .care-dot { background: var(--accent); border-color: var(--accent); color: var(--surface-2); }
.care-step.is-now .care-step-top,
.care-step.is-now .care-step-unit { color: var(--text); font-weight: 750; }
/* 다음 — 점선 동그라미 */
.care-step.is-next .care-dot { border: 2px dashed var(--accent); color: var(--accent); }
.care-step.is-next .care-step-top { color: var(--text); font-weight: 750; }
/* 지금/다음 말풍선 — 점 바로 위 */
.care-flag {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 0.2rem;
  padding: 0 0.45rem;
  border-radius: var(--radius-md);
  font-size: var(--text-xs);
  font-weight: 750;
  line-height: 1.6;
  white-space: nowrap;
}
.care-step .care-flag { bottom: auto; top: -1.4rem; }
.care-step.is-now .care-flag { background: var(--accent); color: var(--surface-2); }
.care-step.is-next .care-flag { border: 1px dashed var(--accent); color: var(--accent); background: var(--surface-2); }
@media (max-width: 480px) {
  .our-note { padding: 1.1rem 1rem; }
  .care-path::before { top: calc(1.5rem + 1rem - 1px); }
  .care-dot { width: 1.6rem; height: 1.6rem; margin: 0.2rem 0; font-size: 0.66rem; }
  .care-step.is-now .care-dot,
  .care-step.is-next .care-dot { width: 2rem; height: 2rem; font-size: var(--text-xs); }
  .care-step-top { font-size: 0.66rem; }
  .care-step-unit { font-size: 0.6rem; }
}

/* ---------- 접종 지도 (vaccines.html) ---------- */
.vac-map h2 { margin-top: 2.25rem; }
.vac-grid {
  display: grid;
  grid-template-columns: 7.5rem repeat(var(--cols), minmax(2.6rem, 1fr));
  min-width: 40rem;
}
.vac-corner {
  font-size: var(--text-xs);
  font-weight: 750;
  color: var(--muted);
  padding: 0.4rem 0.5rem;
  text-align: left;
  background: var(--surface);
}
.vac-head {
  font-size: var(--text-xs);
  font-weight: 650;
  color: var(--muted);
  padding: 0.35rem 0.3rem;
  text-align: center;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.vac-head-top { font-weight: 700; color: var(--text); }
.vac-name {
  font-size: var(--text-sm);
  font-weight: 650;
  padding: 0.4rem 0.5rem;
  text-align: left;
  white-space: nowrap;
}
.vac-name-alt { background: var(--surface); }
.vac-bar {
  margin: 0.2rem;
  border-radius: var(--radius-md);
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  color: var(--text);
  font-size: var(--text-xs);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.vac-bar-yearly { border-style: dashed; }

/* 접종 지도 — 휴대폰에서 옆으로 밀 때 백신 이름 칸 고정 (감독자 수정) */
.vac-corner, .vac-name { position: sticky; left: 0; z-index: 2; }
.vac-name { background: var(--surface-2); }
.vac-name.vac-name-alt { background: var(--surface); }
.vac-hint { display: none; font-size: var(--text-xs); color: var(--muted); margin: 0 0 0.4rem; }
@media (max-width: 760px) {
  .vac-hint { display: block; }
  .vac-grid { grid-template-columns: 6.2rem repeat(var(--cols), minmax(2.9rem, 1fr)); min-width: 38rem; }
  .vac-name { font-size: var(--text-xs); white-space: normal; line-height: 1.3; }
}

/* ---------- 작업 28: 고지·출처 영역 비중 줄이기 (문구는 그대로, 모양만) ---------- */
/* 맨 위 고지 — 상자 대신 작은 회색 한 줄 */
.disclaimer {
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0.9rem 0 0.4rem;
}
.disclaimer p {
  font-size: var(--text-xs);
  color: var(--muted);
  line-height: 1.55;
}
.disclaimer p::before { content: "ⓘ "; }
/* 맨 아래 출처 — 작은 글씨, 전체 문구는 접기 */
.attribution { margin-top: 2.5rem; padding-top: 1rem; }
.attribution h2 { font-size: var(--text-sm); color: var(--muted); margin-bottom: 0.4rem; }
.attribution-source,
.attribution-short,
.attribution-en,
.attribution-text { font-size: var(--text-xs); line-height: 1.6; color: var(--muted); }
.attribution-short { margin-top: 0.4rem; }
.attribution-en { margin-top: 0.4rem; }
.attribution-more { margin-top: 0.6rem; }
.attribution-more summary {
  cursor: pointer;
  font-size: var(--text-xs);
  color: var(--accent);
  font-weight: 600;
}
.attribution-more .attribution-text { margin-top: 0.5rem; }

/* ---------- 작업 29: our-note 구분 표시를 오른쪽 아래 작게 ---------- */
.our-note-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.3rem 1rem;
  margin-top: 1rem;
}
.our-note .our-note-foot .our-note-src { margin: 0; }
.our-note .our-note-label-foot {
  margin: 0 0 0 auto;
  font-size: 0.7rem;
  font-weight: 600;
  text-align: right;
}

/* ---------- 작업 30: 고지 문구 — 오른쪽 아래, 작은 회색 ---------- */
.disclaimer { margin: 1.5rem 0 0; text-align: right; }
.disclaimer p { font-size: 0.7rem; color: var(--muted); line-height: 1.5; }
.disclaimer p::before { content: none; }

/* ---------- 작업 31: 고지·출처를 푸터에 한데 모음 — 푸터 전체 작은 회색 ---------- */
.site-footer p { font-size: var(--text-xs); color: var(--muted); line-height: 1.6; }
.footer-notes { margin-bottom: 1.25rem; padding-bottom: 1.25rem; border-bottom: 1px solid var(--line); }
.footer-notes .disclaimer { margin: 0 0 0.75rem; text-align: left; }
.footer-notes .disclaimer p { font-size: var(--text-xs); }
.footer-notes .attribution { margin: 0; padding: 0; border: 0; }
.footer-notes .attribution h2 { font-size: var(--text-xs); font-weight: 700; color: var(--muted); margin: 0 0 0.3rem; }
.footer-notes .attribution-source,
.footer-notes .attribution-short,
.footer-notes .attribution-en,
.footer-notes .attribution-text { font-size: var(--text-xs); color: var(--muted); }
.footer-notes .attribution-source a { color: var(--muted); }

/* ---------- 작업 32: 푸터 한 곳 고지 ---------- */
.footer-notice { margin-bottom: 1rem; }
.footer-notice p { margin: 0 0 0.3rem; }

/* ---------- 작업 33: 푸터 일반 선언 하나 + 월령 원문 링크 ---------- */
.footer-decl { margin: 0 0 0.6rem; }
.footer-cdc { margin: 0 0 0.9rem; }
.footer-cdc p { margin: 0 0 0.2rem; }
.footer-cdc a { text-decoration: underline; }

/* ---------- 작업 34: "이 시기에 챙길 것" 상자 녹색 계열로 통일 ---------- */
.our-note { background: var(--accent-soft); border-left-color: var(--accent); }
.our-note a { color: var(--accent); }

/* ---------- 작업 35: 사이트 소개 등 "월령별 이정표" 상자 정렬 — 라벨 위, 고르기 칸·버튼 같은 높이 한 줄 ---------- */
.ages-nav .age-picker-form {
  display: grid;
  grid-template-columns: minmax(0, 22rem) auto;
  justify-content: start;
  align-items: stretch;
  gap: 0.4rem 0.6rem;
  margin-top: 0.6rem;
}
.ages-nav .age-picker-form label { grid-column: 1 / -1; margin: 0; }
.ages-nav .age-picker-form select {
  height: 48px;
  min-width: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  padding: 0 2rem 0 0.75rem;
  color: var(--text);
  background-color: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23546159' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.7rem center;
  background-size: 1.1rem 1.1rem;
}
.ages-nav .age-picker-form select:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.ages-nav .age-picker-form button { height: 48px; padding: 0 1.4rem; white-space: nowrap; }
[data-theme="dark"] .ages-nav .age-picker-form select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239EAE9F' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .ages-nav .age-picker-form select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239EAE9F' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); }
}
@media (max-width: 480px) {
  .ages-nav .age-picker-form { grid-template-columns: 1fr; }
  .ages-nav .age-picker-form button { width: 100%; }
}

/* ---------- 작업 36: 이유식 식단표 (감독자 작성) — 색은 tokens 변수만 ---------- */
.site-nav-link { margin-left: 1.1rem; font-size: var(--text-sm); font-weight: 650; color: var(--accent); text-decoration: none; }
.site-nav-link[aria-current="page"] { text-decoration: underline; text-underline-offset: 4px; }
.meal-plan h1 { margin: 0.5rem 0 0.5rem; }
.mp-intro { color: var(--muted); line-height: 1.6; margin: 0 0 1.25rem; }
.mp-card { position: relative; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 1rem 1.1rem; }
.mp-field { display: flex; flex-direction: column; gap: 0.4rem; min-width: 0; }
.mp-field + .mp-field, .mp-settings > .mp-field + .mp-row2, .mp-row2 + .mp-row2 { margin-top: 0.9rem; }
.mp-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem; }
.mp-row2 .mp-field + .mp-field { margin-top: 0; }
.mp-label { font-size: var(--text-xs); font-weight: 700; color: var(--muted); }
.mp-hint { font-size: var(--text-xs); color: var(--muted); line-height: 1.55; margin: 0.2rem 0 0; }
.mp-saved { position: absolute; top: 0.7rem; right: 0.9rem; font-size: var(--text-xs); color: var(--muted); opacity: 0; transition: opacity .3s; }
.mp-saved.is-on { opacity: 1; }
.mp-saved.is-warn { color: var(--warm); }
.mp-stages { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.4rem; }
.mp-stage { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 52px; padding: 0.35rem 0.2rem;
  border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface-2); color: var(--text); cursor: pointer; font: inherit; }
.mp-stage-name { font-weight: 750; font-size: var(--text-sm); }
.mp-stage-months { font-size: 0.68rem; color: var(--muted); line-height: 1.3; text-align: center; }
.mp-stage.is-on { background: var(--accent); border-color: var(--accent); color: var(--surface-2); }
.mp-stage.is-on .mp-stage-months { color: var(--surface-2); opacity: .85; }
.mp-seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; width: max-content; }
.mp-seg-btn { min-width: 44px; height: 40px; border: 0; background: var(--surface-2); color: var(--text); font: inherit; font-weight: 700; cursor: pointer; }
.mp-seg-btn + .mp-seg-btn { border-left: 1px solid var(--line); }
.mp-seg-btn.is-on { background: var(--accent); color: var(--surface-2); }
.mp-input { height: 40px; padding: 0 0.6rem; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font: inherit; min-width: 0; width: 100%; box-sizing: border-box; }
.mp-btn { min-height: 40px; padding: 0 0.95rem; border: 1px solid var(--line-strong); border-radius: var(--radius-md); background: var(--surface-2); color: var(--text);
  font: inherit; font-size: var(--text-sm); font-weight: 650; cursor: pointer; white-space: nowrap; }
.mp-btn:hover { background: var(--surface-hover); }
.mp-btn.is-on { border-color: var(--accent); color: var(--accent); }
.mp-btn-primary { background: var(--accent); border-color: var(--accent); color: var(--surface-2); }
.mp-btn-primary:hover { background: var(--accent-2); }
.mp-btn-quiet { border-color: var(--line); color: var(--muted); }
.mp-btn[disabled] { opacity: .45; cursor: default; }
.mp-toolbar { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin: 1rem 0 0.3rem; }
.mp-toolbar-gap { flex: 1; }
.mp-print-hint { font-size: var(--text-xs); color: var(--muted); text-align: right; margin: 0 0 0.9rem; }
.mp-daytabs { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0.25rem; margin-bottom: 0.7rem; }
.mp-daytab { display: flex; flex-direction: column; align-items: center; padding: 0.35rem 0; min-height: 48px; border: 1px solid var(--line); border-radius: var(--radius-md);
  background: var(--surface-2); color: var(--text); font: inherit; cursor: pointer; }
.mp-daytab-wd { font-weight: 750; font-size: var(--text-sm); }
.mp-daytab-md { font-size: 0.68rem; color: var(--muted); }
.mp-daytab.is-on { background: var(--accent); border-color: var(--accent); color: var(--surface-2); }
.mp-daytab.is-on .mp-daytab-md { color: var(--surface-2); }
.mp-day { display: none; flex-direction: column; gap: 0.55rem; }
.mp-day.is-on { display: flex; }
.mp-day-head { display: none; }
.mp-slot { display: flex; flex-direction: column; gap: 0.3rem; width: 100%; text-align: left; padding: 0.8rem 1rem; background: var(--surface-2);
  border: 1px solid var(--line); border-radius: var(--radius-md); color: var(--text); font: inherit; cursor: pointer; }
.mp-slot:hover { border-color: var(--accent); }
.mp-slot-top { display: flex; justify-content: space-between; align-items: baseline; gap: 0.5rem; }
.mp-slot-label { font-size: var(--text-xs); font-weight: 750; color: var(--muted); }
.mp-slot-total { font-size: var(--text-xs); color: var(--muted); }
.mp-slot-name { font-weight: 750; font-size: var(--text-sm); }
.mp-slot-items { font-size: var(--text-sm); line-height: 1.55; }
.mp-slot-empty { border-style: dashed; border-color: var(--line-strong); background: transparent; align-items: center; }
.mp-slot-empty .mp-slot-label { align-self: flex-start; }
.mp-slot-add { color: var(--accent); font-weight: 700; font-size: var(--text-sm); padding: 0.25rem 0 0.15rem; }
@media (min-width: 900px) {
  .mp-daytabs { display: none; }
  .mp-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0.45rem; }
  .mp-day, .mp-day.is-on { display: flex; gap: 0.45rem; }
  .mp-day-head { display: block; text-align: center; font-size: var(--text-sm); padding: 0.3rem 0; border-bottom: 2px solid var(--line); }
  .mp-day-head span { color: var(--muted); font-size: var(--text-xs); }
  .mp-slot { padding: 0.55rem 0.6rem; min-height: 5.2rem; }
  .mp-slot-top { flex-direction: column; gap: 0; }
  .mp-slot-items, .mp-slot-name { font-size: var(--text-xs); }
  .mp-slot-add { font-size: var(--text-xs); }
}
.mp-notes, .mp-sources { margin-top: 2rem; }
.mp-notes h2, .mp-sources h2 { font-size: var(--text-lg); margin-bottom: 0.5rem; }
.mp-notes ul, .mp-sources ul { list-style: disc; padding-left: 1.2rem; }
.mp-notes li, .mp-sources li { font-size: var(--text-sm); line-height: 1.6; margin-top: 0.3rem; }
.mp-sources a { color: var(--accent); }
.mp-checked { font-size: var(--text-xs); color: var(--muted); margin-top: 0.5rem; }

/* 편집 시트 */
.mp-sheet { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100%; height: 100%; margin: 0; }
.mp-sheet[open] { display: flex; align-items: flex-end; justify-content: center; }
.mp-sheet::backdrop { background: rgba(20, 24, 22, 0.45); }
.mp-sheet-inner { width: 100%; max-width: 34rem; max-height: 88vh; overflow-y: auto; background: var(--surface-2); color: var(--text);
  border-radius: var(--radius-md) var(--radius-md) 0 0; padding: 0.4rem 1.1rem 1.4rem; box-sizing: border-box; animation: mp-up .2s ease-out; }
@keyframes mp-up { from { transform: translateY(24px); opacity: .6; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .mp-sheet-inner { animation: none; } }
@media (min-width: 720px) { .mp-sheet[open] { align-items: center; } .mp-sheet-inner { border-radius: var(--radius-md); } }
.mp-sheet-handle { width: 40px; height: 4px; border-radius: 4px; background: var(--line-strong); margin: 0.3rem auto 0.6rem; }
.mp-sheet-head { display: flex; justify-content: space-between; align-items: center; gap: 0.6rem; position: sticky; top: -0.4rem; background: var(--surface-2); padding: 0.3rem 0 0.6rem; z-index: 1; }
.mp-sheet-head h2 { font-size: var(--text-base); margin: 0; }
.mp-items { list-style: none; padding: 0; margin: 0.4rem 0 0; }
.mp-item { display: flex; align-items: center; gap: 0.5rem; padding: 0.45rem 0; border-bottom: 1px solid var(--line); }
.mp-item.is-zero .mp-item-name { color: var(--muted); }
.mp-item-name { flex: 1; min-width: 0; font-weight: 650; font-size: var(--text-sm); }
.mp-stepper { display: inline-flex; align-items: center; gap: 0.25rem; }
.mp-step { width: 40px; height: 40px; border-radius: var(--radius-md); border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--text);
  font-size: 1.15rem; font-weight: 700; cursor: pointer; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.mp-step:active { background: var(--accent-soft); }
.mp-g { width: 3.6rem; height: 38px; text-align: center; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font: inherit; font-weight: 700; }
.mp-unit { font-size: var(--text-xs); color: var(--muted); }
.mp-x { width: 36px; height: 36px; border: 0; background: transparent; color: var(--muted); font-size: 1.3rem; cursor: pointer; }
.mp-sheet-total { font-size: var(--text-xs); color: var(--muted); text-align: right; margin: 0.5rem 0 0; }
.mp-start-note { font-size: 0.7rem; color: var(--muted); margin: 0.2rem 0 0; text-align: right; }
.mp-sheet-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.9rem 0 0.5rem; }
.mp-chips { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.mp-chip { min-height: 34px; padding: 0 0.75rem; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface-2); color: var(--text); font: inherit; font-size: var(--text-xs); font-weight: 650; cursor: pointer; }
.mp-chip.is-on { background: var(--accent); border-color: var(--accent); color: var(--surface-2); }
.mp-search-wrap { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 0.4rem; }
.mp-results { list-style: none; padding: 0; margin: 0; max-height: 15rem; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--radius-md); }
.mp-results li + li { border-top: 1px solid var(--line); }
.mp-result { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; width: 100%; min-height: 44px; padding: 0.4rem 0.8rem; border: 0; background: transparent; color: var(--text); font: inherit; font-size: var(--text-sm); text-align: left; cursor: pointer; }
.mp-result:hover { background: var(--surface-hover); }
.mp-result.is-later { color: var(--muted); }
.mp-result-custom { color: var(--accent); font-weight: 700; }
.mp-custom-cats { padding: 0.6rem 0.8rem; display: flex; flex-direction: column; gap: 0.4rem; }
.mp-tag { font-size: 0.66rem; padding: 0.05rem 0.45rem; border-radius: var(--radius-md); border: 1px solid var(--line); color: var(--muted); }
.mp-tag-allergen { border-color: var(--warm); color: var(--warm); }
.mp-recipe { flex-direction: column; align-items: flex-start; gap: 0.1rem; }
.mp-recipe-items { font-size: var(--text-xs); color: var(--muted); }
.mp-recipe-wrap { margin-top: 0.4rem; }
.mp-copy { display: flex; flex-direction: column; gap: 0.45rem; margin-top: 1.1rem; padding-top: 0.9rem; border-top: 1px solid var(--line); }
.mp-copy .mp-btn { align-self: flex-start; }
/* 죽 양 계산기 */
.mp-calc { background: var(--accent-soft); border-radius: var(--radius-md); padding: 0.7rem 0.9rem; margin: 0.2rem 0 0.6rem; }
.mp-calc summary { font-weight: 750; font-size: var(--text-sm); cursor: pointer; color: var(--accent); }
.mp-calc-row { display: flex; flex-direction: column; gap: 0.35rem; margin-top: 0.75rem; }
.mp-mix { display: flex; align-items: center; gap: 0.5rem; font-size: var(--text-sm); flex-wrap: wrap; }
.mp-range { flex: 1; min-width: 7rem; accent-color: var(--accent); }
.mp-mix-val { font-size: var(--text-xs); color: var(--muted); min-width: 3.5rem; }
.mp-mix-many { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.mp-mix-one { display: inline-flex; align-items: center; gap: 0.3rem; font-size: var(--text-sm); }
.mp-calc-out { font-size: var(--text-base); line-height: 1.6; margin: 0.9rem 0 0.6rem; }
.mp-calc-out strong { color: var(--text); }
.mp-calc-note { font-size: 0.7rem; color: var(--muted); line-height: 1.5; margin: 0.6rem 0 0; }
.mp-calibrate { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.6rem; padding-top: 0.7rem; border-top: 1px solid var(--line); }
.mp-calibrate .mp-label { flex-basis: 100%; }
/* 토스트 */
.mp-toast { position: fixed; left: 50%; bottom: 1.2rem; transform: translateX(-50%); z-index: 1000; display: flex; align-items: center; gap: 0.9rem;
  max-width: calc(100vw - 2rem); padding: 0.7rem 1rem; border-radius: var(--radius-md); background: var(--text); color: var(--bg); font-size: var(--text-sm); box-sizing: border-box; }
.mp-toast[hidden] { display: none; }
.mp-toast button { border: 0; background: transparent; color: var(--bg); font: inherit; font-weight: 800; text-decoration: underline; cursor: pointer; }
.mp-toast button[hidden] { display: none; }
@media (max-width: 480px) {
  .mp-row2 { grid-template-columns: 1fr; }
  .mp-card { padding: 0.9rem; }
  .mp-stage-months { font-size: 0.62rem; }
  .mp-toolbar-gap { display: none; }
  .mp-print-hint { text-align: left; }
}
/* 인쇄 — A4 가로 한 장, 흑백 */
.mp-print { display: none; }
@media print {
  @page { size: A4 landscape; margin: 10mm; }
  html, body { background: #fff !important; }
  .mp-print-name { font-weight: 700; margin-bottom: 0.5mm; }
  body.mp-printing > *:not(main), .site-header, .site-footer, .mp-app, .mp-intro, .mp-notes, .mp-sources, .meal-plan > h1, .mp-sheet, .mp-toast { display: none !important; }
  .mp-print { display: block !important; color: #000; font-size: 10pt; }
  .mp-print h1 { font-size: 16pt; margin: 0 0 2mm; }
  .mp-print-sub { margin: 0 0 3mm; font-size: 9.5pt; }
  .mp-print table { width: 100%; border-collapse: collapse; table-layout: fixed; }
  .mp-print th, .mp-print td { border: 0.6pt solid #000; padding: 1.5mm; vertical-align: top; font-size: 9.5pt; line-height: 1.35; }
  .mp-print thead th { text-align: center; }
  .mp-print tbody th { width: 14mm; text-align: center; }
  .mp-print td { height: 22mm; }
  .mp-print-total { margin-top: 1mm; font-size: 8.5pt; text-align: right; }
  .mp-print ul { margin: 3mm 0 0; padding-left: 5mm; font-size: 9pt; }
  .mp-print-foot { margin-top: 2mm; font-size: 8pt; }
}
/* 작업 37: 만드는 방식 · 완성량 · 준비 목록 */
.mp-methods { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.4rem; }
.mp-method { display: flex; flex-direction: column; align-items: center; gap: 0.2rem; min-height: 76px; padding: 0.55rem 0.3rem; border: 1px solid var(--line);
  border-radius: var(--radius-md); background: var(--surface-2); color: var(--text); font: inherit; cursor: pointer; text-align: center; }
.mp-method:hover { border-color: var(--accent); }
.mp-method-name { font-weight: 750; font-size: var(--text-sm); line-height: 1.25; }
.mp-method-desc { font-size: 0.68rem; color: var(--muted); line-height: 1.35; }
.mp-method.is-on { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.mp-method.is-on .mp-method-name { color: var(--accent); }
.mp-methods-compact { gap: 0.3rem; }
.mp-methods-compact .mp-method { min-height: 52px; padding: 0.4rem 0.15rem; }
.mp-methods-compact .mp-method-name { font-size: var(--text-xs); }
/* 방식 아이콘: CSS 도형(이미지·이모지 없음) */
.mp-method-ico { position: relative; display: inline-block; width: 22px; height: 18px; flex: none; }
.mp-method-ico::before, .mp-method-ico::after { content: ""; position: absolute; box-sizing: border-box; }
.mp-m-pot .mp-method-ico::before { left: 2px; right: 2px; bottom: 1px; height: 11px; border: 2px solid currentColor; border-top: 0; border-radius: 0 0 9px 9px; }
.mp-m-pot .mp-method-ico::after { left: 0; right: 0; top: 4px; height: 2px; background: currentColor; border-radius: 2px; }
.mp-m-topping .mp-method-ico::before { left: 2px; right: 2px; bottom: 1px; height: 9px; border: 2px solid currentColor; border-top: 0; border-radius: 0 0 9px 9px; }
.mp-m-topping .mp-method-ico::after { left: 4px; top: 1px; width: 5px; height: 5px; border-radius: 50%; background: currentColor; box-shadow: 8px 1px 0 currentColor; }
.mp-m-cube .mp-method-ico::before { left: 1px; top: 1px; width: 9px; height: 7px; border: 2px solid currentColor; border-radius: 2px; box-shadow: 10px 0 0 -0px transparent; }
.mp-m-cube .mp-method-ico::after { left: 11px; top: 1px; width: 9px; height: 7px; border: 2px solid currentColor; border-radius: 2px; }
.mp-m-cube .mp-method-ico { background: linear-gradient(currentColor, currentColor) 1px 10px / 9px 2px no-repeat, linear-gradient(currentColor, currentColor) 11px 10px / 9px 2px no-repeat; }
.mp-m-blw .mp-method-ico::before { left: 7px; top: 0; width: 8px; height: 13px; border: 2px solid currentColor; border-radius: 4px; transform: rotate(-20deg); }
.mp-m-blw .mp-method-ico::after { left: 3px; bottom: 0; width: 16px; height: 2px; background: currentColor; border-radius: 2px; }
.mp-m-store .mp-method-ico::before { left: 4px; top: 4px; width: 14px; height: 13px; border: 2px solid currentColor; border-radius: 2px 2px 4px 4px; }
.mp-m-store .mp-method-ico::after { left: 7px; top: 0; width: 8px; height: 6px; border: 2px solid currentColor; border-bottom: 0; border-radius: 4px 4px 0 0; }
.mp-method .mp-method-ico { color: var(--muted); }
.mp-method.is-on .mp-method-ico { color: var(--accent); }
.mp-cubesize { margin: 0.9rem 0 0.9rem; }
.mp-cube-row { display: flex; flex-wrap: wrap; gap: 0.5rem 1.1rem; }
.mp-cube-one { display: inline-flex; align-items: center; gap: 0.35rem; font-size: var(--text-sm); }
/* 끼니 카드 */
.mp-slot-top { align-items: center; }
.mp-badge { display: inline-flex; align-items: center; gap: 0.25rem; font-size: 0.66rem; font-weight: 700; color: var(--accent); white-space: nowrap; }
.mp-badge .mp-method-ico { transform: scale(.7); transform-origin: right center; width: 22px; margin-left: -6px; }
.mp-slot-big { font-weight: 800; font-size: var(--text-base); color: var(--accent); }
.mp-slot-items { color: var(--muted); }
@media (min-width: 900px) {
  .mp-slot-top { flex-direction: row; justify-content: space-between; }
  .mp-badge { font-size: 0.6rem; }
  .mp-badge .mp-method-ico { display: none; }
  .mp-slot-big { font-size: var(--text-sm); }
}
/* 시트 */
.mp-sheet-method { margin-bottom: 0.8rem; }
.mp-target { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; flex-wrap: wrap; padding: 0.8rem 0.9rem; margin: 0.2rem 0 0.4rem;
  background: var(--accent-soft); border-radius: var(--radius-md); }
.mp-target-text { display: flex; flex-direction: column; gap: 0.15rem; min-width: 9rem; flex: 1; }
.mp-target-label { font-weight: 800; font-size: var(--text-sm); color: var(--accent); }
.mp-target .mp-hint { margin: 0; }
.mp-g-big { width: 4.6rem; height: 46px; font-size: 1.25rem; }
.mp-step-big { width: 46px; height: 46px; }
.mp-ref { font-size: var(--text-xs); color: var(--muted); text-align: right; margin: 0 0 0.3rem; }
.mp-list-label { display: block; margin-top: 0.8rem; }
.mp-how { font-size: var(--text-sm); line-height: 1.6; margin: 0.6rem 0 0.2rem; padding: 0.55rem 0.75rem; border-left: 3px solid var(--accent); background: var(--surface); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.mp-total-line { font-weight: 800; color: var(--accent); margin: 0.2rem 0 0.4rem; }
.mp-part { margin-top: 0.9rem; padding-top: 0.7rem; border-top: 1px solid var(--line); }
.mp-part h3, .mp-part-title { font-size: var(--text-sm); margin: 0 0 0.3rem; }
.mp-item-sub { display: block; font-size: var(--text-xs); color: var(--muted); font-weight: 500; }
.mp-store-row .mp-input { flex: 1; }
.mp-store-row { flex-wrap: wrap; }
.mp-more { margin-top: 0.7rem; }
.mp-more summary { font-size: var(--text-xs); font-weight: 700; color: var(--muted); cursor: pointer; }
.mp-method-notes { margin: 0.8rem 0 0; padding: 0.6rem 0.8rem 0.6rem 1.6rem; background: var(--surface); border-radius: var(--radius-sm); font-size: var(--text-xs); line-height: 1.55; color: var(--muted); }
/* 준비 목록 */
.mp-prep { margin-top: 1.4rem; }
.mp-prep h2 { font-size: var(--text-lg); margin: 0 0 0.2rem; }
.mp-prep-group h3 { font-size: var(--text-sm); margin: 0.9rem 0 0.3rem; color: var(--accent); }
.mp-prep-group ul { list-style: disc; padding-left: 1.2rem; margin: 0; }
.mp-prep-group li { font-size: var(--text-sm); line-height: 1.6; }
@media (max-width: 480px) {
  .mp-methods { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mp-methods-compact { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .mp-method-desc { font-size: 0.62rem; }
}
@media print {
  .mp-print-m { font-size: 7.5pt; border: 0.5pt solid #000; display: inline-block; padding: 0 1mm; margin-bottom: 0.5mm; }
  .mp-print-big { font-weight: 700; }
  .mp-print-small { font-size: 8.5pt; }
  .mp-print-prep { break-before: page; page-break-before: always; }
  .mp-print-prep h2 { font-size: 14pt; margin: 0 0 3mm; }
  .mp-print-prep h3 { font-size: 11pt; margin: 4mm 0 1mm; }
  .mp-print-prep ul { font-size: 10pt; line-height: 1.5; }
  .mp-prep { display: none !important; }
}

/* ============================================================
   작업 38 — "아이 발달이 걱정될 때" (/help)
   색은 tokens.css 변수만 사용(다크 모드 자동).
   표 가로 스크롤은 기존 .table-wrap(overflow-x:auto) 담당.
   ============================================================ */
.help h1 { margin: 0.5rem 0 1rem; }
.help-intro {
  font-size: var(--text-lg);
  line-height: 1.65;
  color: var(--muted);
}

/* 단계 목록 — 왼쪽 번호 원 + 세로 연결선 */
.help-steps {
  list-style: none;
  margin: 1.5rem 0;
  padding: 0;
}
.help-step {
  position: relative;
  display: flex;
  gap: 0.9rem;
  padding: 0 0 1.4rem;
}
.help-step::before {
  content: "";
  position: absolute;
  left: 15px;
  top: 34px;
  bottom: 0;
  width: 2px;
  background: var(--line);
}
.help-step:last-child { padding-bottom: 0; }
.help-step:last-child::before { display: none; }
.help-step-no {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  font-size: var(--text-sm);
}
.help-step-body { flex: 1; min-width: 0; padding-top: 0.1rem; }
.help-step-title {
  font-size: var(--text-base);
  font-weight: 700;
  line-height: var(--leading-tight);
  margin: 0 0 0.2rem;
}
.help-step-body p {
  margin: 0 0 0.3rem;
  font-size: var(--text-sm);
  line-height: 1.6;
}
.help-step-where { font-size: var(--text-xs); color: var(--muted); }

/* 세부 안내 섹션 */
.help-section { margin-top: 2.25rem; }
.help-section h2 { margin: 0 0 0.5rem; font-size: var(--text-lg); }
.help-section ul { list-style: disc; padding-left: 1.3rem; margin: 0.5rem 0 0; }
.help-section li { margin-top: 0.5rem; line-height: 1.6; }
.help-section h3 { margin: 1rem 0 0; font-size: var(--text-sm); }

/* 연락처 — 이름·번호 한 줄, 번호는 높이 44px 이상 버튼 */
.help-contacts-sec { margin-top: 2.25rem; }
.help-contacts-sec h2 { margin: 0 0 0.5rem; font-size: var(--text-lg); }
.help-contacts { list-style: none; margin: 0; padding: 0; }
.help-contact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--line);
}
.help-contact:last-child { border-bottom: none; }
.help-contact-name { font-weight: 650; font-size: var(--text-sm); }
.help-contact-tel {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 8.5rem;
  padding: 0 1.1rem;
  border-radius: var(--radius-md);
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: var(--text-sm);
  letter-spacing: 0.02em;
  text-decoration: none;
}
.help-contact-tel:active { background: var(--surface-hover); }
.help-contact-note {
  flex-basis: 100%;
  font-size: var(--text-xs);
  color: var(--muted);
}

/* 출처 */
.help-sources { margin-top: 2.25rem; }
.help-sources h2 { margin: 0 0 0.5rem; font-size: var(--text-lg); }
.help-sources ul { list-style: disc; padding-left: 1.3rem; margin: 0; }
.help-sources li { margin-top: 0.4rem; line-height: 1.6; }
.help-sources a { color: var(--accent); }
.help-sources a:hover { text-decoration: underline; }
.help-checked { color: var(--muted); font-size: var(--text-sm); margin: 0.75rem 0 0; }

/* 작업 39 — /calendar 검진·접종 날짜 계산 (39a 뼈대 + 39b 계산·그림) */
.cal-intro {
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--muted);
  margin: 0 0 0.5rem;
}
/* 작업 49: 라벨 위, 그 아래 .cal-birth-row 한 줄 (홈과 같은 select 3칸) */
.cal-form { display: block; margin: 1.1rem 0 0; }
.cal-form label { font-size: var(--text-sm); font-weight: 700; }
.cal-privacy { font-size: var(--text-xs); color: var(--muted); line-height: 1.55; margin: 0.45rem 0 0; }
#cal-out { margin-top: 1rem; }
.cal-age { font-size: var(--text-base); font-weight: 750; line-height: 1.5; margin: 0 0 0.75rem; overflow-wrap: anywhere; }
.cal-tabs { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0 0 0.75rem; }
.cal-tab {
  min-height: 38px;
  padding: 0 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-size: var(--text-sm);
  font-weight: 650;
  cursor: pointer;
}
.cal-tab:hover { background: var(--surface-hover); }
.cal-tab.is-on { background: var(--accent); border-color: var(--accent); color: var(--surface-2); }
.cal-print {
  min-height: 38px;
  padding: 0 0.85rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-size: var(--text-sm);
  font-weight: 650;
  cursor: pointer;
}
.cal-print:hover { background: var(--surface-hover); }
.cal-list { display: grid; grid-template-columns: 1fr; gap: 0.6rem; margin: 0.4rem 0 0; }
@media (min-width: 720px) { .cal-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.cal-card {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 0.9rem 1rem;
  min-width: 0;
}
.cal-card-name { margin: 0; font-size: var(--text-base); font-weight: 750; line-height: 1.4; overflow-wrap: anywhere; }
.cal-card-label { margin: 0.2rem 0 0; font-size: var(--text-xs); font-weight: 700; color: var(--muted); }
.cal-card-date { margin: 0.5rem 0 0; font-size: var(--text-sm); line-height: 1.55; overflow-wrap: anywhere; }
.cal-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.6rem;
  margin: 0.55rem 0 0;
  font-size: var(--text-xs);
  color: var(--muted);
}
.cal-badge {
  font-size: var(--text-xs);
  font-weight: 750;
  padding: 0.1rem 0.55rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
}
.cal-badge-now { background: var(--accent); border-color: var(--accent); color: var(--surface-2); }
.cal-badge-next { background: var(--warm-soft); border-color: var(--warm); color: var(--warm); }
.cal-badge-ending { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.cal-card-hint { margin: 0.35rem 0 0; font-size: var(--text-xs); color: var(--muted); line-height: 1.55; }
.cal-card-past { border-style: dashed; }
.cal-card-past .cal-card-name,
.cal-card-past .cal-card-date { color: var(--muted); }
.cal-past {
  margin-top: 1.1rem;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}
.cal-past summary { font-size: var(--text-sm); font-weight: 750; color: var(--muted); cursor: pointer; }
.cal-past .cal-list { margin-top: 0.6rem; }
.cal-bad { font-size: var(--text-sm); color: var(--warm); margin: 0.5rem 0 0; }
.cal-notes, .cal-sources { margin-top: 2.25rem; }
.cal-notes h2, .cal-sources h2 { margin: 0 0 0.5rem; font-size: var(--text-lg); }
.cal-notes ul, .cal-sources ul { list-style: disc; padding-left: 1.3rem; margin: 0; }
.cal-notes li, .cal-sources li { margin-top: 0.5rem; line-height: 1.6; }
.cal-sources a { color: var(--accent); }
.cal-sources a:hover { text-decoration: underline; }
.cal-checked { color: var(--muted); font-size: var(--text-sm); margin: 0.75rem 0 0; }
/* 390px 휴대폰 — 가로 넘침 없음 */
@media (max-width: 420px) {
  .cal-card { padding: 0.8rem 0.9rem; }
}
/* 인쇄 — 입력·탭·버튼 숨김, "지났어요" 묶음은 펼쳐서 인쇄 */
@media print {
  .cal-form, .cal-privacy, .cal-tabs, .cal-print { display: none !important; }
  .cal-past { border: none; background: none; padding: 0; margin-top: 0.75rem; }
  .cal-past summary { display: none; }
  .cal-past > *:not(summary) { display: block !important; }
  .cal-past .cal-card-past { opacity: 1; }
  .cal-card { break-inside: avoid; }
}

/* 작업 40 — /food-safety 이유식 알레르기·주의 음식 (40a: JS 없음, 광고 없음, 토큰 변수만) */
.fs-intro { font-size: var(--text-base); line-height: var(--leading-normal); color: var(--muted); margin: 0 0 0.5rem; }
.fs-avoid-sec { margin-top: 2rem; }
.fs-avoid-sec h2,
.fs-choke-sec h2,
.fs-allergy-sec h2,
.fs-first-sec h2,
.fs-signs-sec h2,
.fs-sources h2 { margin: 0 0 0.5rem; font-size: var(--text-lg); }
.fs-avoid-grid { display: grid; grid-template-columns: 1fr; gap: 0.6rem; }
@media (min-width: 720px) { .fs-avoid-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.fs-avoid-card { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 0.9rem 1rem; min-width: 0; }
.fs-avoid-when { margin: 0 0 0.35rem; }
.fs-when-badge {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 750;
  color: var(--warm);
  background: var(--warm-soft);
  border: 1px solid var(--warm);
  border-radius: var(--radius-md);
  padding: 0.1rem 0.55rem;
}
.fs-avoid-title { margin: 0; font-size: var(--text-base); font-weight: 750; line-height: 1.4; overflow-wrap: anywhere; }
.fs-avoid-body { margin: 0.35rem 0 0; font-size: var(--text-sm); line-height: 1.6; }
.fs-choke-sec { margin-top: 2rem; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 0.9rem 1rem; }
.fs-choke-intro { margin: 0; font-size: var(--text-sm); color: var(--muted); line-height: 1.55; }
.fs-choke-list { margin: 0.5rem 0 0; padding-left: 1.3rem; list-style: disc; }
.fs-choke-list li { margin-top: 0.35rem; font-size: var(--text-sm); line-height: 1.6; }
.fs-choke-tip { margin: 0.6rem 0 0; font-size: var(--text-xs); color: var(--muted); line-height: 1.55; }
.fs-allergy-sec { margin-top: 2rem; }
.fs-allergy-intro { margin: 0; font-size: var(--text-sm); color: var(--muted); line-height: 1.55; }
.fs-chips { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem 0.5rem; margin: 0.75rem 0 0; padding: 0; }
.fs-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: var(--text-sm);
  font-weight: 650;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 0.3rem 0.8rem 0.3rem 0.45rem;
  min-width: 0;
}
.fs-ico { width: 1.15rem; height: 1.15rem; border-radius: 50%; background: var(--accent-soft); border: 1px solid var(--accent); flex: none; }
.fs-nodelay {
  margin: 0.9rem 0 0;
  font-size: var(--text-sm);
  line-height: 1.6;
  font-weight: 650;
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  border-radius: var(--radius-md);
  padding: 0.7rem 0.9rem;
}
.fs-first-sec { margin-top: 2rem; }
.fs-steps { margin: 0; padding-left: 1.3rem; list-style: decimal; }
.fs-steps li { margin-top: 0.5rem; font-size: var(--text-sm); line-height: 1.6; }
.fs-consult {
  margin: 0.75rem 0 0;
  font-size: var(--text-sm);
  line-height: 1.6;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 0.7rem 0.9rem;
}
.fs-signs-sec { margin-top: 2rem; }
.fs-signs-grid { display: grid; grid-template-columns: 1fr; gap: 0.6rem; }
@media (min-width: 720px) { .fs-signs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.fs-sign { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 0.8rem 1rem; min-width: 0; }
.fs-sign-part { margin: 0; font-size: var(--text-lg); font-weight: 750; line-height: 1.4; }
.fs-sign-text { margin: 0.25rem 0 0; font-size: var(--text-sm); line-height: 1.6; }
.fs-signs-do { margin: 0.75rem 0 0; padding-left: 1.3rem; list-style: disc; }
.fs-signs-do li { margin-top: 0.5rem; font-size: var(--text-sm); line-height: 1.6; }
.fs-emergency {
  margin-top: 2rem;
  font-size: var(--text-base);
  line-height: 1.6;
  font-weight: 700;
  color: var(--warm);
  background: var(--warm-soft);
  border: 1px solid var(--warm);
  border-radius: var(--radius-md);
  padding: 0.9rem 1rem;
  overflow-wrap: anywhere;
}
.fs-emergency a { color: var(--warm); }
.fs-meal-link { margin-top: 1.5rem; font-size: var(--text-sm); line-height: 1.6; }
.fs-meal-link a { color: var(--accent); }
.fs-meal-link a:hover { text-decoration: underline; }
.fs-sources { margin-top: 2.25rem; }
.fs-sources ul { list-style: disc; padding-left: 1.3rem; margin: 0; }
.fs-sources li { margin-top: 0.5rem; line-height: 1.6; }
.fs-sources a { color: var(--accent); }
.fs-sources a:hover { text-decoration: underline; }
.fs-checked { color: var(--muted); font-size: var(--text-sm); margin: 0.75rem 0 0; }

/* ---------- 작업 41: /play 월령별 놀이 아이디어 + 월령 페이지 놀이 상자 ---------- */
/* 머리 메뉴 '월령별 이정표' 목록 맨 아래 링크 1줄 */
.nav-ages-item-play { border-top: 1px solid var(--line); padding-top: 0.25rem; margin-top: 0.25rem; }
.nav-ages-item-play a { color: var(--warm); font-weight: 600; }

/* /play 페이지 */
.play-intro { margin: 0 0 1.25rem; line-height: 1.7; }
.play-jump { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0 0 1.75rem; }
.play-jump-chip {
  display: inline-block;
  padding: 0.25rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-2);
  color: var(--text);
  font-size: var(--text-sm);
  line-height: 1.5;
}
.play-jump-chip:hover { border-color: var(--warm); color: var(--warm); }
.play-sec { margin: 2.25rem 0; }
.play-sec h2 { margin: 0 0 0.25rem; }
.play-band { margin: 0 0 1rem; font-size: var(--text-sm); color: var(--muted); line-height: 1.6; }
.play-cards { display: grid; grid-template-columns: 1fr; gap: 0.75rem; }
@media (min-width: 720px) { .play-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.play-card {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  min-width: 0;
}
.play-card-title { margin: 0 0 0.35rem; font-size: var(--text-base); font-weight: 750; }
.play-card-how { margin: 0; font-size: var(--text-sm); line-height: 1.7; }
.play-notes {
  margin: 2.25rem 0 0;
  background: var(--warm-soft);
  border-left: 3px solid var(--warm);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
}
.play-notes p { margin: 0 0 0.6rem; font-size: var(--text-sm); line-height: 1.7; }
.play-notes p:last-child { margin: 0; }
.play-sources { margin-top: 2.25rem; }
.play-sources h2 { margin: 0 0 0.5rem; }
.play-sources ul { list-style: disc; padding-left: 1.3rem; margin: 0; }
.play-sources li { margin-top: 0.5rem; line-height: 1.6; }
.play-sources a { color: var(--accent); }
.play-sources a:hover { text-decoration: underline; }
.play-checked { color: var(--muted); font-size: var(--text-sm); margin: 0.75rem 0 0; }

/* 월령 페이지 놀이 아이디어 상자 (our-note 모양 그대로 + our-note-play) */
.play-box-list { list-style: none; padding: 0; margin: 0 0 0.75rem; }
.play-box-list li { margin: 0 0 0.5rem; font-size: var(--text-sm); line-height: 1.7; }
.play-box-more { margin: 0; font-size: var(--text-sm); }

/* ---------- 작업 42: /safety 우리 아이 안전·생활 습관 ---------- */
/* 신규 페이지 — 기존 토큰만 사용, 1열, JS·광고 없음 */
.safety-intro { margin: 0 0 1.25rem; line-height: 1.7; }
.safety-jump { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; margin: 0 0 1.75rem; }
.safety-jump-label { font-size: var(--text-sm); color: var(--muted); margin-right: 0.25rem; }
.safety-jump-chip {
  display: inline-block;
  padding: 0.25rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-2);
  color: var(--text);
  font-size: var(--text-sm);
  line-height: 1.5;
}
.safety-jump-chip:hover { border-color: var(--warm); color: var(--warm); }
.safety-sec { margin: 2.25rem 0; scroll-margin-top: 1rem; }
.safety-sec h2 { margin: 0 0 0.35rem; }
.safety-when { margin: 0 0 1rem; }
.safety-when-badge {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border-radius: var(--radius-md);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: var(--text-sm);
  font-weight: 600;
}
.safety-items { list-style: none; margin: 0 0 0.75rem; padding: 0; }
.safety-items li { margin: 0 0 0.5rem; font-size: var(--text-sm); line-height: 1.7; }
.safety-tip {
  margin: 1rem 0 0;
  background: var(--surface-2);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  font-size: var(--text-sm);
  line-height: 1.7;
}
.safety-do {
  margin: 1rem 0 0;
  background: var(--warm-soft);
  border-left: 3px solid var(--warm);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
}
.safety-do-title { margin: 0 0 0.5rem; font-weight: 750; font-size: var(--text-sm); }
.safety-do-list { list-style: none; margin: 0; padding: 0; }
.safety-do-list li { margin: 0 0 0.5rem; font-size: var(--text-sm); line-height: 1.7; }
.safety-emergency {
  margin: 2.5rem 0 0;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}
.safety-emergency h2 { margin: 0 0 0.9rem; }
.safety-emg-card { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 0.9rem; }
.safety-emg-name { margin: 0; font-weight: 750; font-size: var(--text-sm); }
.safety-emg-call {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  min-width: 7.5rem;
  padding: 0 1.4rem;
  border-radius: var(--radius-md);
  background: var(--warm-soft);
  color: var(--warm);
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: var(--text-lg);
  letter-spacing: 0.02em;
  text-decoration: none;
}
.safety-emg-call:active { background: var(--surface-hover); }
.safety-emg-note { flex-basis: 100%; margin: 0; font-size: var(--text-xs); color: var(--muted); line-height: 1.6; }
.safety-contacts-note { margin: 1rem 0 0; font-size: var(--text-sm); line-height: 1.7; }
.safety-moonlight { margin: 0.5rem 0 0; font-size: var(--text-sm); }
.safety-moonlight a { color: var(--accent); }
.safety-moonlight a:hover { text-decoration: underline; }
.safety-sources { margin-top: 2.25rem; }
.safety-sources h2 { margin: 0 0 0.5rem; }
.safety-sources ul { list-style: disc; padding-left: 1.3rem; margin: 0; }
.safety-sources li { margin-top: 0.5rem; line-height: 1.6; }
.safety-sources a { color: var(--accent); }
.safety-sources a:hover { text-decoration: underline; }
.safety-checked { color: var(--muted); font-size: var(--text-sm); margin: 0.75rem 0 0; }

/* ============================================================
   작업 43 — 디자인 검토 반영 (CSS만 고침, 화면 글자 변화 없음)
   기존 규칙은 1(문장 너비)·3(opacity)번만 자리에서 고치고,
   나머지 통일 규칙은 이 블록(파일 끝)에 추가한다.
   ============================================================ */

/* 2) 모바일 헤더 메뉴 (719px 이하): 어느 메뉴를 열어도 화면 폭에 맞춰 펼쳐짐 */
@media (max-width: 719px) {
  .site-nav { position: relative; }
  .nav-ages { position: static; }
  /* .site-nav 접두어 = 작업 40b의 .nav-menu-end 규칙과 우선순위 동률에서
     파일 뒤쪽인 이 규칙이 이겨야 맨 오른쪽(생활·돌봄) 메뉴도 전체 폭으로 펼쳐진다. */
  .site-nav .nav-ages-grid { left: 0; right: 0; width: auto; max-width: none; }
  .nav-ages-summary,
  .nav-ages-grid a { min-height: 44px; display: flex; align-items: center; }
}

/* 4) 키보드 포커스 — 전역 */
a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--warm);
  outline-offset: 2px;
}

/* 5) 새 페이지 제목·소개 문장 통일 (홈·월령 페이지는 그대로) */
.checkup h1,
.meal-plan h1,
.help h1,
.cal h1,
.food-safety h1,
.play h1,
.safety h1,
.topic h1 { margin-bottom: 0.75rem; }

.checkup-intro,
.help-intro,
.cal-intro,
.fs-intro,
.play-intro,
.safety-intro,
.topic-intro,
.mp-intro {
  color: var(--muted);
  line-height: var(--leading-normal);
  margin: 0 0 1.5rem;
}

/* 6) 출처 영역 통일 (모두 margin-top 2.5rem + 윗선) */
.checkup-sources,
.help-sources,
.cal-sources,
.fs-sources,
.play-sources,
.safety-sources,
.topic-sources,
.mp-sources {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}
.checkup-sources h2,
.help-sources h2,
.cal-sources h2,
.fs-sources h2,
.play-sources h2,
.safety-sources h2,
.topic-sources h2,
.mp-sources h2 {
  font-size: var(--text-lg);
  margin: 0 0 0.5rem;
}

/* 7) 안내 상자 색 역할 통일 (.our-note·.mp-warning·.fs-when·.fs-when-badge는 그대로) */
.play-notes,
.safety-tip,
.fs-consult,
.fs-nodelay {
  background: var(--accent-soft);
  border: 0;
  border-left: 3px solid var(--accent);
}
.safety-do,
.fs-emergency {
  background: var(--warm-soft);
  border: 0;
  border-left: 3px solid var(--warm);
}
.safety-when-badge {
  font-size: var(--text-xs);
  font-weight: 750;
  color: var(--warm);
  background: var(--warm-soft);
  border: 1px solid var(--warm);
  border-radius: var(--radius-md);
  padding: 0.1rem 0.55rem;
}

/* 8) 전화 버튼 — 두 페이지 같은 규격 */
.help-contact-tel,
.safety-emg-call {
  min-height: 44px;
  font-size: var(--text-base);
}
.help-contact-tel:hover,
.safety-emg-call:hover {
  background: var(--surface-hover);
}
.help-contact-tel { min-width: 9rem; }

/* 9) 알레르기 칩의 빈 원 → 작은 사각 점 */
.fs-ico {
  width: 6px;
  height: 6px;
  border-radius: var(--radius-xs);
  border: 0;
  background: var(--accent);
}

/* 10) 칩 간격 통일 */
.play-jump,
.safety-jump { gap: 0.5rem 0.45rem; }
.play-jump-chip,
.safety-jump-chip { min-height: 36px; }
.mp-toolbar { gap: 0.6rem; }

/* 11) "월령별 놀이 아이디어" 메뉴 링크 — 본문 글자색 (가로 구분선 유지) */
.nav-ages-item-play a { color: var(--text); }

/* ============================================================
   작업 45 — 페이지 삽화 (data/page-illustrations.yaml · 감독자 작성)
   홈·놀이·음식안전·식단표·안전 페이지의 본문 삽화.
   800w/1200w 원본 + srcset·sizes, alt 문구는 yaml 값 그대로.
   작업 48(보정2, 사용자 결정): 모든 삽화를 월령 삽화와 같은 크기(본문 폭 전체)·가운데 정렬로 통일
   (이전 640px / 440px·380px / 480px 규칙은 모두 정리, sizes 는 832px).
   ============================================================ */
.page-illust { margin: 1.5rem auto; max-width: none; } /* 작업 48 보정2: 월령 삽화(.age-illust)와 같은 크기 — 본문 폭 전체, 가운데 */
.page-illust img { display: block; width: 100%; height: auto; border-radius: var(--radius-md); border: 0; }

/* 인쇄: 삽화 숨김 (식단표 인쇄 포함) */
@media print { .page-illust { display: none; } }

/* ============================================================
   작업 47 — 토픽 페이지 (/sleep·/potty·/teething)
   /safety 와 같은 결: 바로 가기 칩·섹션 제목+시기 배지·항목 목록·
   정보 상자(topic-do=accent)·주의 상자(topic-warn=warm)·출처·확인월.
   신규 페이지 — 기존 토큰만 사용, 1열, JS·광고 없음 (규칙 12 준용).
   .topic-intro·.topic-sources 의 색·여백·폰트는 파일 앞쪽 "작업 43"
   통일 블록의 선택자에서 온다(여기서는 그 밖에 있는 속성만).
   ============================================================ */
   .topic-jump { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.45rem; margin: 0 0 1.75rem; }
.topic-jump-label { font-size: var(--text-sm); color: var(--muted); margin-right: 0.25rem; }
.topic-jump-chip {
  display: inline-block;
  min-height: 36px;
  padding: 0.25rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-2);
  color: var(--text);
  font-size: var(--text-sm);
  line-height: 1.5;
}
.topic-jump-chip:hover { border-color: var(--warm); color: var(--warm); }
.topic-table { margin: 0 0 0.5rem; }
.topic-table h2 { margin: 0 0 0.5rem; }
.topic-table-note { margin: 0.75rem 0 0; font-size: var(--text-sm); line-height: 1.7; color: var(--muted); }
.topic-sec { margin: 2.25rem 0; scroll-margin-top: 1rem; }
.topic-sec h2 { margin: 0 0 0.35rem; }
.topic-when { margin: 0 0 1rem; }
.topic-when-badge {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 750;
  color: var(--warm);
  background: var(--warm-soft);
  border: 1px solid var(--warm);
  border-radius: var(--radius-md);
  padding: 0.1rem 0.55rem;
}
.topic-items { list-style: none; margin: 0 0 0.75rem; padding: 0; }
.topic-items li { margin: 0 0 0.5rem; font-size: var(--text-sm); line-height: 1.7; }
.topic-do {
  margin: 1rem 0 0;
  background: var(--accent-soft);
  border: 0;
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
}
.topic-warn {
  margin: 1rem 0 0;
  background: var(--warm-soft);
  border: 0;
  border-left: 3px solid var(--warm);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
}
.topic-box-title { margin: 0 0 0.5rem; font-weight: 750; font-size: var(--text-sm); }
.topic-do ul,
.topic-warn ul { list-style: none; margin: 0; padding: 0; }
.topic-do li,
.topic-warn li { margin: 0 0 0.5rem; font-size: var(--text-sm); line-height: 1.7; }
.topic-related { margin: 2.25rem 0 0; }
.topic-related h2 { margin: 0 0 0.5rem; }
.topic-related ul { list-style: disc; padding-left: 1.3rem; margin: 0; }
.topic-related li { margin-top: 0.5rem; line-height: 1.6; }
.topic-related a { color: var(--accent); }
.topic-related a:hover { text-decoration: underline; }
.topic-sources ul { list-style: disc; padding-left: 1.3rem; margin: 0; }
.topic-sources li { margin-top: 0.5rem; line-height: 1.6; }
.topic-sources a { color: var(--accent); }
.topic-sources a:hover { text-decoration: underline; }
.topic-checked { color: var(--muted); font-size: var(--text-sm); margin: 0.75rem 0 0; }
/* 표 가로 스크롤은 기존 .table-wrap(overflow-x:auto) 이 담당 — 390px 휴대폰에서
   본문 폭을 넘지 않도록 한다. 본문 폭은 main 의 max-width: 52rem(작업 48) 이 통일. */

/* ============================================================
   작업 46 — 페이지 삽화 4장 추가 (help·checkup·calendar + safety 카시트)
   그림·alt 는 data/page-illustrations.yaml. 다크 모드 필터 없음(작업 46 결정).
   인쇄 숨김은 작업 45 의 @media print { .page-illust } 규칙이 이미 덮음.
   작업 48: 개별 폭 규칙(440px·380px)은 삭제 — .page-illust 기본(본문 폭 전체) 통일.
   ============================================================ */
/* calendar 빈 상태 그림(생일 입력 전) — [hidden] 이 다른 스타일에 덮이지 않게 명시 */
#cal-illust[hidden] { display: none; }

/* ============================================================
   작업 49 — /calendar 생일 입력: 홈과 같은 "연도·월·일 고르기" select 3칸
   input type=date 는 아이폰 사파리 등에서 고정 최소 폭을 가져 width:100% 를 무시하고
   모바일에서 페이지를 넘어갔다(사용자 지적). 홈(작업 22)과 같은 구조·모양으로 통일.
   select 모양(높이·화살표·초점)은 홈 규칙(.age-birth-row select)을 공유한다.
   ============================================================ */
.cal-birth-row {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 0.5rem;
  max-width: 26rem;
}
.cal-birth-row select {
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

/* ============================================================
   작업 46b — 마지막 삽화 2장 (safety 화상 섹션 · 404)
   그림·alt 는 data/page-illustrations.yaml. 다크 모드 필터 없음(작업 46과 동일).
   작업 48: 440px·380px 개별 폭 규칙 삭제 — 본문 폭 전체(기본) 통일.
   ============================================================ */
