* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #fbf6ec;
  --bg-deep: #f3eadb;
  --card: #fffdf8;
  --text: #2d2823;
  --text-soft: #6e6356;
  --text-muted: #b8ac99;
  --border: #ece2cc;
  --border-soft: #f4ecdb;
  --accent: #6e9577;
  --accent-deep: #547a5d;
  --accent-soft: #e3edd8;
  --accent-warm: #d4a574;
  --warm-soft: #fbecc8;
  --warm-border: #f0dba8;

  --mint: #4d8268;        --mint-soft: #d6e9d9;
  --lilac: #886b9e;       --lilac-soft: #ede2f0;
  --sky:  #6c8eb0;        --sky-soft:  #dfeaf2;
  --peach: #c47a4e;       --peach-soft: #fcdec7;
  --cream-text: #b8854a;  --cream-soft: #fbecc8;

  /* legacy alias */
  --lang: var(--sky);
  --lang-soft: var(--sky-soft);
  --lavender: var(--lilac);
  --lavender-soft: var(--lilac-soft);

  --shadow-soft: 0 1px 2px rgba(0,0,0,0.04), 0 2px 8px rgba(180,140,80,0.06);
  --shadow-tape: 0 1px 2px rgba(0,0,0,0.04), 0 4px 10px rgba(180,140,80,0.08);

  /* 폰트 통일 — 이전 'Gowun Dodum' handy 톤 제거 (2026-05-18, 박스별 폰트 차이 가드). 변수명은 사용처 호환 유지 */
  --font-handy: 'Pretendard', system-ui, -apple-system, "Apple SD Gothic Neo", sans-serif;

  /* 글자/화면 크기(zoom) 배율 — 개인 설정(account)에서 조절, 기기별 저장(localStorage 'moonkle.zoom.v1').
     실제 적용은 각 페이지 <head>의 인라인 로더가 documentElement.style.zoom 으로 함(첫 페인트 전, 깜빡임 방지).
     이 변수는 기본값 + 줌에 영향받지 않아야 하는 요소의 국소 보정용(zoom: calc(1 / var(--app-zoom))). */
  --app-zoom: 1;
}

html, body {
  font-family: 'Pretendard', system-ui, -apple-system, "Apple SD Gothic Neo", sans-serif;
  background: var(--bg-deep);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
  letter-spacing: -0.01em;
  overflow-x: hidden;
  /* 한국어 어절 단위 줄바꿈 — 단어 중간에서 끊기는 것 방지 (전역 default) */
  word-break: keep-all;
  overflow-wrap: break-word;
}

.app-shell {
  max-width: 430px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
  position: relative;
  padding-bottom: 170px;
  box-shadow: 0 0 40px rgba(0,0,0,0.04);
  /* 한국어 어절 단위 줄바꿈 — body inherit가 안 잡혀도 모든 페이지 wrapper에서 강제 */
  word-break: keep-all;
  overflow-wrap: break-word;
}

/* TOP BAR */
.app-top {
  padding: 16px 20px 10px;
  position: sticky;
  top: 0;
  background: rgba(250, 249, 246, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 10;
  border-bottom: 1px solid var(--border-soft);
}
.app-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.child-meta-line {
  text-align: right;
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 6px;
  letter-spacing: -0.01em;
}
.child-meta-line:empty { display: none; }
.child-meta-line.warn { color: #c0392b; }
.app-brand,
.app-brand-bar {
  text-decoration: none;
  color: inherit;
}
.app-brand:hover .app-brand-name,
.app-brand-bar:hover .app-brand-name { color: var(--accent); }
.app-brand {
  display: flex; align-items: center; gap: 5px;
  font-weight: 800;
  color: var(--accent-deep);
  letter-spacing: -0.02em;
}
.app-brand-mark { width: 19px; height: 19px; display: inline-block; vertical-align: middle; }
.app-brand-name { font-size: 17px; }

.app-top-right {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  max-width: 75%;
}
.account-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 50%;
  font-size: 14px;
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  flex-shrink: 0;
}
.account-btn:hover { border-color: var(--accent); background: var(--accent-soft); }

.child-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 8px 6px 10px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  min-width: 0;
  letter-spacing: -0.01em;
}
.child-chip:hover { border-color: var(--accent); background: var(--accent-soft); }
/* 기질 색 단서 — 평가 완료 시 chip 배경/글자에 기질 6색(cardGradient[0]·cardTextColor) 적용. mascot 자리는 avatar 보존.
   hover 시는 일반 accent-soft로 복귀 (드래곤 흰 글자 가독성·일관 단서) */
.child-chip.has-temp-color {
  background: var(--temp-bg);
  color: var(--temp-fg);
  border-color: var(--temp-border);
}
.child-chip.has-temp-color .child-chip-age {
  color: var(--temp-fg);
  opacity: 0.75;
}
.child-chip.has-temp-color:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--text);
}
.child-chip.has-temp-color:hover .child-chip-age {
  color: var(--text-muted);
  opacity: 1;
}
.child-chip-text {
  display: inline-flex; flex-direction: column;
  align-items: flex-start;
  line-height: 1.25;
  min-width: 0;
  overflow: hidden;
}
.child-chip-name {
  font-size: 12.5px; font-weight: 600;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden; text-overflow: ellipsis;
}
.child-chip-age {
  font-size: 10.5px; font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden; text-overflow: ellipsis;
}
.child-chip-edit {
  font-size: 11px; opacity: 0.6;
  margin-left: 2px;
}

/* HEADER (legacy — onboarding 등에서 사용) */
.header {
  padding: 14px 24px 16px;
  position: sticky;
  top: 0;
  background: rgba(250, 249, 246, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 10;
  border-bottom: 1px solid var(--border-soft);
}
.header-top { display: flex; align-items: center; gap: 12px; }
.child-info { flex: 1; min-width: 0; }
.child-name-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.child-name { font-size: 16px; font-weight: 600; }
.temperament-badge {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 2px 8px;
  background: var(--lavender-soft);
  color: var(--lavender);
  font-size: 11px; font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  letter-spacing: -0.01em;
  border: none;
  font-family: inherit;
}
.temperament-badge:hover { background: #e7dff0; }
.temperament-badge.empty {
  background: transparent;
  color: var(--text-muted);
  border: 1px dashed var(--border);
  padding: 1px 7px;
}
.temperament-badge.empty:hover {
  background: var(--border-soft);
  color: var(--text-soft);
  border-color: var(--text-muted);
}
.child-age { font-size: 12px; color: var(--text-soft); margin-top: 2px; }
.menu-btn {
  width: 36px; height: 36px; border-radius: 50%;
  border: none; background: transparent; color: var(--text-soft);
  cursor: pointer; font-size: 18px; flex-shrink: 0;
}
.menu-btn:hover { background: var(--border-soft); }

/* HOME HERO — 발달의 흐름 본진 진입 카드 (cozy 톤 유지) */
.home-hero {
  display: block;
  margin: 18px 20px 22px;
  padding: 18px 18px 14px;
  background: linear-gradient(135deg, #fff4dc 0%, #fbe9c0 100%);
  border-radius: 18px;
  border: 1px solid var(--warm-border);
  box-shadow: 0 2px 10px rgba(212,165,116,0.10);
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: transform 0.18s, box-shadow 0.18s;
}
.home-hero:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(212,165,116,0.16);
}
.home-hero-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 10px;
  gap: 8px;
  border-bottom: 1px dashed rgba(180,140,80,0.22);
}
.home-hero-eyebrow {
  font-size: 14px; font-weight: 700;
  color: var(--text); letter-spacing: -0.01em;
}
.home-hero-more {
  display: inline-flex;
  align-items: center;
  background: none;
  border: none;
  padding: 4px 0;
  font-size: 12px;
  color: #a07332;
  font-weight: 600;
  font-family: inherit;
  flex-shrink: 0;
}
.home-hero-more:hover { color: #8a6a2b; }
/* 큰 타이틀 제거 — 다른 박스와 통일성 위해 */
.home-hero-title { display: none; }
.next-steps-list { list-style: none; display: flex; flex-direction: column; gap: 7px; }
.next-steps-item {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 0;
  font-size: 13.5px;
  color: var(--text);
}
.next-icon {
  width: 26px; height: 26px; border-radius: 50%;
  background: rgba(255,253,248,0.7);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; flex-shrink: 0;
}
.next-text {
  color: var(--text); font-weight: 400;
  font-size: 14px; line-height: 1.4;
  flex: 1;
}

/* EMPTY STATE */
.empty-state {
  text-align: center;
  padding: 28px 20px;
  color: var(--text-muted);
  font-size: 13px;
}
.empty-state-emoji { font-size: 28px; display: block; margin-bottom: 8px; }
/* /words 빈 상태 — 첫 말 전 영아도 부정 신호 없이 기대 톤 (2026-05-22) */
.words-empty-title { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.words-empty-sub { font-size: 13px; color: var(--text-muted); line-height: 1.65; }
.words-empty-link { display: inline-block; margin-top: 16px; font-size: 13px; font-weight: 600; color: var(--accent-deep); text-decoration: none; }
.words-empty-link:hover { text-decoration: underline; }

/* WIDGETS */
.widgets { margin: 0 0 28px; }
.widgets-title {
  font-size: 11px; color: var(--text-muted);
  margin: 0 24px 10px;
  letter-spacing: 1.2px; font-weight: 600;
  text-transform: uppercase;
}
.widgets-scroll {
  display: flex; gap: 12px;
  overflow-x: auto;
  padding: 4px 20px 8px;
  scrollbar-width: none;
}
.widgets-scroll::-webkit-scrollbar { display: none; }
.widget-card {
  flex-shrink: 0;
  width: 168px;
  padding: 16px 14px;
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  box-shadow: var(--shadow-tape);
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.12s;
  text-align: left;
  font-family: inherit;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.widget-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 1px 2px rgba(0,0,0,0.03), 0 6px 16px rgba(180,140,80,0.12);
}
.widget-icon { font-size: 22px; margin-bottom: 4px; }
.widget-title {
  font-family: var(--font-handy);
  font-size: 14.5px; font-weight: 700;
  color: var(--text); letter-spacing: 0;
  line-height: 1.4;
}
.widget-desc {
  font-size: 11.5px; color: var(--text-soft);
  line-height: 1.45; margin-top: 2px;
}
.widget-cta {
  margin-top: auto; padding-top: 10px;
  font-family: var(--font-handy);
  font-size: 11.5px; color: var(--accent-deep);
  font-weight: 700;
}
.widgets-title {
  font-family: var(--font-handy);
  font-weight: 700;
}

/* TIMELINE JUMP — compact 아이콘 버튼 */
.page-section-row {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}
.page-section-row .page-section-title { margin-bottom: 4px; }
.page-section-row .page-section-sub { margin-bottom: 0; }
.timeline-jump-btn {
  position: relative;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px; height: 30px;
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 50%;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
}
.timeline-jump-icon { font-size: 14px; line-height: 1; }
.timeline-jump-btn:hover { background: var(--accent-soft); border-color: var(--accent); }

.timeline-top-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}
/* 📅 chip은 timeline.js가 첫 month-capsule 자식으로 inject — flex space-between으로 우측 끝 자동 정렬 */
.timeline-with-jump { margin-top: 16px; }
.timeline-with-jump > .timeline-jump-btn { display: none; }  /* render 전 일시 숨김, inject 후 capsule 안에서 표시 */
.month-capsule > .timeline-jump-btn { margin-left: auto; }
.timeline-growth-btn {
  flex-shrink: 0;
  width: 36px; height: 36px;
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s;
}
.timeline-growth-btn:hover { background: var(--accent-soft); border-color: var(--accent); }
.timeline-jump-date-hidden {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  border: none;
  background: transparent;
}

/* 홈 — 이전 기록 더 보기 */
.home-timeline-more {
  display: block;
  margin: 4px 24px 24px;
  padding: 12px 16px;
  background: var(--accent-soft);
  border: 1px solid rgba(127,166,135,0.2);
  border-radius: 12px;
  font-size: 13px; font-weight: 600;
  color: var(--accent-deep);
  text-align: center;
  text-decoration: none;
  transition: background 0.12s;
}
.home-timeline-more:hover { background: #d6e4d8; }

.day-group-flash {
  animation: day-flash 1.4s ease-out;
}
@keyframes day-flash {
  0%   { background: var(--accent-soft); border-radius: 14px; }
  100% { background: transparent; }
}

/* TIMELINE */
.timeline-section-title {
  font-size: 11px; color: var(--text-muted);
  margin: 0 24px 4px;
  letter-spacing: 1.2px; font-weight: 600;
  text-transform: uppercase;
}
.timeline-subtitle {
  font-family: var(--font-handy);
  font-size: 22px; font-weight: 700;
  margin: 0 24px 18px;
  letter-spacing: 0;
  color: var(--text);
}
.timeline { padding: 0 24px; position: relative; }
.timeline::before {
  content: ''; position: absolute;
  left: 30px; top: 14px; bottom: 16px;
  width: 1.5px;
  background: repeating-linear-gradient(to bottom, var(--border) 0 5px, transparent 5px 9px);
}
.month-capsule {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  margin: 22px 0 14px;
  padding: 0;
  background: none;
  border: none;
  border-radius: 0;
  font-family: inherit;
  letter-spacing: 0;
  box-shadow: none;
}
.month-capsule-text {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-soft);
  white-space: nowrap;
  letter-spacing: 0.02em;
}
.month-capsule-line {
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* 일반 .card (위젯·next-steps 등에서도 쓰임 — minimal 호환) */
.card {
  position: relative;
  background: var(--card);
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border-soft);
  transition: transform 0.12s, box-shadow 0.12s;
}
.card-meta {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 8px;
  font-size: 11px; color: var(--text-muted);
  flex-wrap: wrap;
}
.card-category {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: 8px;
  background: var(--accent-soft); color: var(--accent-deep);
  font-size: 11px; font-weight: 600;
}
.cat-motor_gross { background: var(--accent-soft); color: var(--accent-deep); }
.cat-motor_fine  { background: var(--mint-soft);   color: var(--mint); }
.cat-cognitive   { background: var(--lilac-soft);  color: var(--lilac); }
.cat-language    { background: var(--sky-soft);    color: var(--sky); }
.cat-social      { background: var(--peach-soft);  color: var(--peach); }
.cat-selfcare    { background: var(--cream-soft);  color: var(--cream-text); }
.cat-emotion     { background: var(--peach-soft);  color: var(--peach); } /* legacy alias */
/* 자유 기록 4종 의미 부여 칩 (마일스톤 카테고리와 분리) */
.cat-development { background: var(--accent-soft); color: var(--accent-deep); }
.cat-cozy-daily  { background: var(--warm-soft);   color: var(--cream-text); }
.cat-special-day { background: var(--lilac-soft);  color: var(--lilac); }
.cat-tough-day   { background: var(--bg-deep);     color: var(--text-soft); }

.card-title {
  font-size: 15px; font-weight: 600;
  color: var(--text); margin-bottom: 4px;
  letter-spacing: -0.01em;
}
.card-emotion {
  font-size: 13.5px; color: var(--text-soft);
  line-height: 1.55;
  border-left: 2px solid var(--accent-soft);
  padding-left: 10px; margin-top: 8px;
}

.timeline-end {
  text-align: center;
  margin: 32px 24px 0;
  padding: 24px;
  color: var(--text-muted);
  font-size: 12px;
  border-top: 1px dashed var(--border);
}
.timeline-end-emoji { font-size: 22px; display: block; margin-bottom: 6px; }

/* ===== DAY GROUP (cozy — 같은 날 단일 박스) ===== */
.day-group { margin-bottom: 16px; position: relative; }
.day-header {
  position: relative;
  display: flex; align-items: baseline; gap: 7px;
  padding: 2px 0 8px 28px;
}
.day-dot {
  position: absolute;
  left: -4px; top: 7px;
  width: 13px; height: 13px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 1px var(--accent);
}
.day-header-date {
  font-family: var(--font-handy);
  font-size: 17px; font-weight: 700;
  color: var(--accent-deep);
}
.day-header-age {
  font-family: var(--font-handy);
  font-size: 11.5px;
  color: var(--text-muted);
  font-weight: 400;
  opacity: 0.85;
}
/* 미숙아 — 교정 월령 hover/tap 라벨 */
.day-header-age.has-corrected {
  cursor: help;
  border-bottom: 1px dotted var(--text-muted);
  position: relative;
}
.day-header-age.has-corrected:hover .corrected-tip,
.day-header-age.has-corrected:focus .corrected-tip,
.day-header-age.has-corrected.show-tip .corrected-tip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}
.corrected-tip {
  position: absolute;
  left: 50%; bottom: calc(100% + 6px);
  transform: translateX(-50%) translateY(4px);
  white-space: nowrap;
  background: var(--text);
  color: white;
  padding: 5px 10px;
  border-radius: 8px;
  font-family: 'Pretendard', sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: -0.01em;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s, transform 0.15s;
  z-index: 5;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.corrected-tip::after {
  content: '';
  position: absolute;
  top: 100%; left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: var(--text);
}

/* 같은 날 = 단일 박스 (폴라로이드 톤) */
.day-card {
  position: relative;
  margin-left: 12px;
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  padding: 12px 16px;
  box-shadow: var(--shadow-tape);
  transition: transform 0.15s, box-shadow 0.15s;
  cursor: default;
}
.day-group:nth-child(3n+1) .day-card { transform: rotate(-0.4deg); }
.day-group:nth-child(3n+2) .day-card { transform: rotate(0.3deg); }
.day-group:nth-child(3n+3) .day-card { transform: rotate(-0.2deg); }
.day-card:hover { transform: rotate(0deg) translateY(-2px); }
/* 마스킹테이프 효과 */
.day-card::before {
  content:''; position:absolute;
  top: -5px; left: 50%; transform: translateX(-50%) rotate(-2deg);
  width: 30px; height: 11px;
  background: rgba(255, 240, 200, 0.7);
  border: 1px solid rgba(180, 140, 80, 0.15);
  border-radius: 1px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

/* entry — 카테고리 chip을 마스킹 테이프 톤으로 본문 첫 줄에 inline (2026-05-19 후속)
   별도 행 차지 X. 본문·사진은 카드 풀폭. chip은 카드 좌측 라벨 같은 시각 무게 */
.entry {
  position: relative;
  padding: 7px 0;
}
.entry + .entry { border-top: 1px dashed var(--border-soft); }
.entry:first-child { padding-top: 2px; }
.entry:last-child { padding-bottom: 2px; }
.entry-cat {
  display: inline-block;
  vertical-align: middle;
  padding: 1px 7px;
  margin-right: 6px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
  letter-spacing: 0.01em;
  transform: rotate(-1.2deg);
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  position: relative;
  top: -1px;
}
.entry-body { min-width: 0; }
.entry-text {
  display: block;
  font-size: 14.5px;
  color: var(--text);
  line-height: 1.5;
  word-break: keep-all;
}
/* 자유 기록 카드의 아이 인용 — 손글씨 톤 따옴표 (2026-05-19) */
.entry-quotes {
  margin-top: 5px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.entry-quote {
  font-family: 'Gowun Dodum', var(--font-body, system-ui), sans-serif;
  font-size: 13.5px;
  color: var(--text-soft, var(--text-muted));
  line-height: 1.45;
  padding: 2px 0 2px 10px;
  border-left: 2px solid rgba(127,166,135,0.35);
  word-break: break-word;
  letter-spacing: -0.005em;
}
.timeline-compact .entry-quote { font-size: 12.5px; }
/* 홈 timeline — 크기 ↓ (timeline 페이지는 14.5px 기본 유지) */
.timeline-compact .entry-text { font-size: 13px; }
.timeline-compact .entry-cat { font-size: 10px; padding: 1px 7px; }
.entry.editable {
  transition: background 0.12s;
}
.entry.editable .entry-text { padding-right: 24px; }
/* ⋯ 탭 = action sheet(수정/삭제). 마일스톤 본문 탭 = 보상 카드 재노출(2026-05-28). 히트 영역 확대 */
.entry-edit-hint {
  position: absolute;
  top: 0;
  right: -6px;
  padding: 6px 10px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.12s, color 0.12s;
}
.entry-edit-hint:hover,
.entry-edit-hint:active {
  background: var(--border-soft);
  color: var(--text);
}
.entry.editable:hover { background: var(--border-soft); border-radius: 6px; }

/* 말 entry — 회상 톤 미니멀 (2026-05-19, /words inject). 자유 기록 인용과 동일 톤 */
.entry.entry-word {
  display: block;
  padding: 3px 0 3px 10px;
  border-left: 2px solid rgba(108,142,176,0.4);
  background: transparent;
  border-radius: 0;
  margin: 0;
}
.entry-word-text {
  font-family: 'Gowun Dodum', var(--font-body, system-ui), sans-serif;
  font-size: 13px;
  color: var(--text-soft, var(--text-muted));
  line-height: 1.45;
  word-break: break-word;
  letter-spacing: -0.005em;
}
.timeline-compact .entry-word-text { font-size: 12.5px; }
.entry-edit-hint {
  grid-column: 3;
  align-self: center;
  color: var(--text-muted);
  font-size: 16px;
  padding: 0 2px;
  user-select: none;
}
.entry-action-row {
  display: flex;
  gap: 8px;
  width: 100%;
  justify-content: center;
}
/* .btn-secondary가 flex:0 0 auto라 명시 override 필요 (specificity 동등, 선언 순서 보강) */
.entry-action-row .entry-action-btn {
  flex: 1 1 0;
  text-align: center;
  justify-content: center;
}
.entry-action-btn.entry-action-delete {
  color: #c0463a;
  border-color: #e8c4be;
}
.entry-action-btn.entry-action-delete:hover {
  background: #fbeeec;
}

/* ===== ASSESS SUMMARY CARD ===== */
.assess-summary-card {
  background: var(--accent-soft);
  border-color: rgba(127,166,135,0.25) !important;
}
.assess-summary-line {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 0;
  font-size: 13px;
  border-top: 1px dashed rgba(127,166,135,0.2);
}
.assess-summary-line:first-of-type { border-top: none; padding-top: 4px; }
.assess-summary-icon { font-size: 15px; }
.assess-summary-cat {
  font-weight: 700; font-size: 11.5px;
  color: var(--accent-deep);
  min-width: 38px;
}
.assess-summary-text {
  flex: 1; min-width: 0;
  color: var(--text);
  letter-spacing: -0.01em;
}

/* ===== MODAL DATE ===== */
.modal-date-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--border-soft);
  background: white;
}
.modal-date-label {
  font-size: 12px; font-weight: 600;
  color: var(--text-soft);
  letter-spacing: -0.01em;
}
.modal-date-input {
  flex: 1;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
}
.modal-date-input:focus {
  outline: none;
  border-color: var(--accent);
}

/* ===== RECORD MODAL ===== */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(20, 20, 20, 0.45);
  z-index: 100;
  display: flex; align-items: flex-end; justify-content: center;
  animation: modal-fade 0.2s ease-out;
}
@keyframes modal-fade { from { opacity: 0; } to { opacity: 1; } }
.modal-card {
  width: 100%;
  max-width: 460px;
  max-height: 90vh;
  max-height: calc(90dvh / var(--app-zoom));
  background: var(--bg);
  border-radius: 20px 20px 0 0;
  display: flex; flex-direction: column;
  animation: modal-slide-up 0.22s ease-out;
  overflow: hidden;
  position: relative;
}
@keyframes modal-slide-up { from { transform: translateY(20px); } to { transform: translateY(0); } }
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--border-soft);
}
.modal-title {
  font-family: var(--font-handy);
  font-size: 17px; font-weight: 700; letter-spacing: 0;
  color: var(--accent-deep);
}
.modal-close {
  width: 32px; height: 32px; border-radius: 50%;
  background: transparent; border: none;
  font-size: 16px; color: var(--text-soft);
  cursor: pointer;
}
.modal-close:hover { background: var(--border-soft); }
.modal-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-soft);
  background: white;
}
.modal-tab {
  flex: 1;
  padding: 12px 8px;
  background: none; border: none;
  font-family: inherit;
  font-size: 13px; font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
}
.modal-tab.active {
  color: var(--accent-deep);
  border-bottom-color: var(--accent);
}
.modal-body { flex: 1; overflow-y: auto; padding: 16px 18px 24px; }
.modal-sub {
  font-size: 12.5px;
  color: var(--text-soft);
  margin-bottom: 12px;
}
.modal-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  margin: 14px 0 8px;
}
.modal-input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  letter-spacing: -0.01em;
}
.modal-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(127,166,135,0.12);
}
.modal-save {
  width: 100%;
  margin-top: 16px;
}

/* 자유 기록 modal (2026-05-19) — 라벨 제거·감성 톤. 두 칸 모두 손글씨 */
.modal-free-title,
.modal-free-quote {
  font-family: 'Gowun Dodum', var(--font-body, system-ui), sans-serif;
  line-height: 1.5;
  letter-spacing: -0.005em;
}
.modal-free-title { margin-top: 4px; font-size: 15px; color: var(--text); }
.modal-free-quote { margin-top: 10px; font-size: 14px; color: var(--text-soft, var(--text-muted)); }
.modal-free-title::placeholder,
.modal-free-quote::placeholder {
  color: var(--text-muted);
  opacity: 0.7;
  font-family: inherit;
}
#modal-pane-free .chip-group { margin-top: 12px; }

/* 사진 선택 (자유 기록 모달, 2026-05-19) */
.photo-picker { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.photo-picker-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 14px;
  border: 1px dashed var(--border, #d8d4cd);
  border-radius: 12px;
  background: var(--bg-soft, #faf8f4);
  color: var(--text-soft, var(--text-muted));
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.photo-picker-btn:hover { background: var(--accent-soft, #eef0e8); border-color: var(--accent, #9bb89c); }
.photo-picker-btn[hidden] { display: none; }
.photo-picker-btn-label { pointer-events: none; }
.photo-picker-preview {
  position: relative;
  width: 180px;
  max-width: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  align-self: flex-start;
}
.photo-picker-preview[hidden] { display: none; }
.photo-picker-preview img {
  display: block;
  width: 100%;
  height: 180px;
  object-fit: cover;
}
.photo-picker-remove {
  position: absolute;
  top: 6px; right: 6px;
  width: 28px; height: 28px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.photo-picker-remove:hover { background: rgba(0, 0, 0, 0.85); }
.photo-picker-hint {
  font-size: 12.5px;
  color: var(--text);
  font-weight: 600;
  line-height: 1.45;
  padding: 9px 12px;
  background: var(--warm-soft, #fbecc8);
  border: 1px solid var(--warm-border, #f0dba8);
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 7px;
}
.photo-picker-hint::before {
  content: '📷';
  font-size: 14px;
  flex: 0 0 auto;
}
.photo-picker-hint[hidden] { display: none; }
.photo-picker-status {
  font-size: 12px;
  color: var(--accent-deep, var(--accent));
  padding: 0 4px;
}
.photo-picker-status[hidden] { display: none; }

/* timeline 자유 기록 카드 안 thumb — 포스트잇 안 작게 보이도록 width·height 양쪽 fix */
.entry-photo-btn {
  display: block;
  margin-top: 8px;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: 10px;
  overflow: hidden;
  line-height: 0;
  width: 140px;
  max-width: 100%;
}
.entry-photo-thumb {
  display: block;
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 10px;
  transition: transform 0.15s;
}
.entry-photo-btn:hover .entry-photo-thumb { transform: scale(1.02); }

/* 사진 원본 lightbox */
.photo-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
}
.photo-lightbox[hidden] { display: none; }
.photo-lightbox-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
}
.photo-lightbox-close {
  position: absolute;
  top: 16px; right: 16px;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  color: white;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.photo-lightbox-close:hover { background: rgba(255, 255, 255, 0.3); }

/* FAB 형태 저장 버튼 — 마일스톤 list 길어서 스크롤 끝까지 안 가도 항상 보이게 */
.modal-fab-save {
  position: absolute;
  left: 18px; right: 18px; bottom: 16px;
  box-shadow: 0 4px 14px rgba(45, 40, 35, 0.18);
  z-index: 5;
}
.modal-fab-save[hidden] { display: none; }
.modal-list { display: flex; flex-direction: column; gap: 10px; padding-bottom: 68px; }

/* 발달학적 의미 설명 카드 — record-modal 안 인라인 pane swap + journey 노드 popup 공용 */
.explanation-card {
  background: linear-gradient(135deg, #fff9e0 0%, #ffe7b8 100%);
  border: 1px solid #f0d896;
  border-radius: 14px;
  padding: 18px 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.explanation-eyebrow {
  font-size: 11px;
  font-weight: 700;
  color: #8a5a00;
  letter-spacing: 0.02em;
}
.explanation-title {
  font-size: 14px;
  font-weight: 700;
  color: #5a3a00;
  letter-spacing: -0.01em;
  line-height: 1.4;
}
.explanation-text {
  font-size: 12.5px;
  color: #5a3a00;
  line-height: 1.6;
  letter-spacing: -0.01em;
}
.explanation-close {
  align-self: stretch;
  background: white;
  border: 1px solid #d9b870;
  color: #8a5a00;
  font-weight: 700;
  margin-top: 4px;
}
.explanation-close:hover { background: #fffbe8; }
/* 보상 카드 다음-미리보기 블록 — explanation-card 비주얼 재사용 + 점선 구분 */
.reward-next {
  border-top: 1px dashed #e0c886;
  padding-top: 10px;
  margin-top: 2px;
}
.reward-next[hidden] { display: none; }
.reward-next-label {
  font-size: 11px;
  font-weight: 700;
  color: #8a5a00;
  margin-bottom: 4px;
}
.reward-next-name {
  font-size: 13px;
  font-weight: 600;
  color: #5a3a00;
  line-height: 1.4;
  letter-spacing: -0.01em;
}
.modal-empty {
  text-align: center;
  padding: 30px 10px;
  color: var(--text-muted);
  font-size: 13px;
}
.milestone-card {
  padding: 12px 14px;
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(180,140,80,0.04);
}
.milestone-card.logged {
  background: var(--accent-soft);
  border-color: rgba(127,166,135,0.3);
}
.milestone-card.in-progress {
  background: var(--warm-soft);
  border-color: var(--warm-border);
}
.milestone-card.highlight {
  animation: milestone-highlight 1.8s ease;
}
@keyframes milestone-highlight {
  0%, 100% { box-shadow: 0 1px 2px rgba(180,140,80,0.04); }
  25% { box-shadow: 0 0 0 3px var(--accent-soft), 0 1px 2px rgba(180,140,80,0.04); }
  60% { box-shadow: 0 0 0 3px var(--accent-soft), 0 1px 2px rgba(180,140,80,0.04); }
}
.milestone-card-top {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 6px;
}
.milestone-cat {
  font-family: var(--font-handy);
  font-size: 12px; font-weight: 700;
  color: var(--accent-deep);
  padding: 2px 9px;
  background: var(--accent-soft);
  border-radius: 999px;
}
.milestone-status {
  font-size: 11px;
  color: var(--text-muted);
}
.milestone-name {
  font-family: var(--font-handy);
  font-size: 14.5px;
  font-weight: 400;
  color: var(--text);
  line-height: 1.5;
  margin-bottom: 10px;
  letter-spacing: 0;
}
.milestone-levels {
  display: flex; gap: 6px;
}
.milestone-level {
  flex: 1;
  padding: 9px 6px;
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 999px;
  font-family: var(--font-handy);
  font-size: 12px; font-weight: 700;
  cursor: pointer;
  color: var(--text-soft);
  transition: all 0.12s;
}
.milestone-level:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-deep);
}
.milestone-level.selected {
  border-color: var(--accent);
  background: var(--accent);
  color: white;
}
.milestone-level.selected:hover {
  background: var(--accent-deep);
  color: white;
}
/* 일상 인지(기질 변동형) 캐비어트 — "안 해도 괜찮다" 톤 */
.milestone-caveat {
  font-size: 11.5px;
  color: var(--text-muted);
  margin: -2px 0 9px;
}
/* 다중체크(베이비사인) 옵션 칩 — 폭 가변 wrap, 독립 다중선택 */
.milestone-signs {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.milestone-sign {
  padding: 8px 13px;
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 999px;
  font-family: var(--font-handy);
  font-size: 12px; font-weight: 700;
  cursor: pointer;
  color: var(--text-soft);
  transition: all 0.12s;
}
.milestone-sign:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-deep);
}
.milestone-sign.selected {
  border-color: var(--accent);
  background: var(--accent);
  color: white;
}
.milestone-sign.selected:hover {
  background: var(--accent-deep);
  color: white;
}
.modal-toast {
  position: absolute;
  bottom: 20px; left: 50%; transform: translate(-50%, 20px);
  padding: 9px 16px;
  background: var(--text);
  color: white;
  border-radius: 999px;
  font-size: 12.5px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s;
}
.modal-toast.visible {
  opacity: 0.92;
  transform: translate(-50%, 0);
}

/* 하루 1장 — 사진 교체 확인 시트 (modal-card 내부 오버레이) */
.modal-confirm {
  position: absolute; inset: 0;
  background: rgba(20, 20, 20, 0.35);
  display: flex; align-items: flex-end; justify-content: center;
  z-index: 10;
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s ease-out;
}
.modal-confirm.visible { opacity: 1; pointer-events: auto; }
.modal-confirm[hidden] { display: none; }
.modal-confirm-sheet {
  width: 100%;
  background: var(--bg);
  border-radius: 18px 18px 0 0;
  padding: 22px 20px calc(20px + env(safe-area-inset-bottom));
  box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.12);
  transform: translateY(14px);
  transition: transform 0.22s ease-out;
}
.modal-confirm.visible .modal-confirm-sheet { transform: translateY(0); }
.modal-confirm-title {
  font-family: var(--font-handy);
  font-size: 16px; font-weight: 700; letter-spacing: 0;
  color: var(--accent-deep);
  margin-bottom: 8px;
}
.modal-confirm-text {
  font-size: 13px; color: var(--text-soft); line-height: 1.5;
  margin-bottom: 18px;
}
.modal-confirm-actions { display: flex; gap: 10px; }
.modal-confirm-actions .btn { flex: 1; padding: 13px 14px; font-size: 14px; margin-top: 0; }

/* FAB */
.fab-container {
  position: fixed;
  bottom: 84px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 430px; width: 100%;
  padding: 0 20px;
  z-index: 12;
  pointer-events: none;
}
.fab {
  pointer-events: auto;
  width: 100%;
  padding: 15px 20px;
  background: var(--text); color: white;
  border: none; border-radius: 100px;
  font-size: 14.5px; font-weight: 600;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  gap: 8px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.18);
  transition: transform 0.15s, box-shadow 0.15s;
  font-family: inherit;
  letter-spacing: -0.01em;
}
.fab:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 28px rgba(0,0,0,0.22);
}
.fab-icon { font-size: 18px; font-weight: 300; }

/* TAB BAR */
.tab-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  max-width: 430px; width: 100%;
  height: 70px;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
  display: flex;
  z-index: 15;
  padding-bottom: env(safe-area-inset-bottom);
}
.tab-item {
  flex: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 3px;
  background: none; border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-family: inherit;
  position: relative;
  padding: 8px 0;
}
.tab-icon-wrap { position: relative; font-size: 20px; }
.tab-item.active { color: var(--accent-deep); }
.tab-item.active .tab-icon-wrap::after {
  content: ''; position: absolute;
  top: -8px; left: 50%; transform: translateX(-50%);
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--accent);
}
.tab-label { font-size: 10px; font-weight: 500; letter-spacing: -0.02em; white-space: nowrap; }

/* NEW 배지 — 탭 라벨 우측 작은 점 */
.tab-item.has-new .tab-icon-wrap::before {
  content: '';
  position: absolute;
  top: -2px; right: -6px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #c47a4e;
  border: 1.5px solid var(--card);
  z-index: 1;
}

/* NEW 배지 — 카드 inline 라벨 */
.new-badge {
  display: inline-block;
  background: #c47a4e;
  color: white;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  vertical-align: middle;
  margin-left: 6px;
}

/* LOADING */
.loading {
  text-align: center;
  padding: 20px;
  color: var(--text-muted);
  font-size: 12px;
}

/* ===== ONBOARDING ===== */
.onboarding-shell {
  max-width: 430px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
  position: relative;
  padding: 32px 24px 120px;
  box-shadow: 0 0 40px rgba(0,0,0,0.04);
}

.onboarding-brand {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
  color: var(--accent-deep);
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.onboarding-brand-mark { width: 22px; height: 22px; display: inline-block; }
.onboarding-step-label {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 1.4px;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 6px;
}
.onboarding-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.35;
  margin-bottom: 8px;
}
.onboarding-subtitle {
  font-size: 13.5px;
  color: var(--text-soft);
  line-height: 1.55;
  margin-bottom: 24px;
}

/* progress dots */
.step-dots {
  display: flex;
  gap: 6px;
  margin-bottom: 24px;
}
.step-dot {
  width: 24px; height: 3px;
  border-radius: 2px;
  background: var(--border);
  transition: background 0.2s;
}
.step-dot.active { background: var(--accent); }
.step-dot.done { background: var(--accent-deep); }

/* form */
.form-group { margin-bottom: 20px; }
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}
.form-label-hint {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 11.5px;
  margin-left: 4px;
}
.form-input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 15px;
  font-family: inherit;
  background: white;
  color: var(--text);
  -webkit-appearance: none;
  appearance: none;
}
.form-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(127,166,135,0.12);
}
.form-row { display: flex; gap: 10px; }
.form-row > * { flex: 1; }

/* 생년월일 3칸 */
.date-input-group { display: flex; align-items: center; gap: 6px; }
.date-input-group .form-input { text-align: center; padding: 12px 8px; }
.date-input-year { flex: 2; min-width: 0; }
.date-input-mm, .date-input-dd { flex: 1; min-width: 0; }
.date-sep { color: var(--text-muted); font-size: 14px; user-select: none; }
.date-input-group input[type="number"]::-webkit-outer-spin-button,
.date-input-group input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none; margin: 0;
}
.date-input-group input[type="number"] { -moz-appearance: textfield; }

/* chips */
.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  padding: 9px 14px;
  border: 1px solid var(--border);
  background: white;
  border-radius: 100px;
  font-size: 13.5px;
  color: var(--text-soft);
  font-family: inherit;
  cursor: pointer;
  transition: all 0.12s;
  user-select: none;
}
.chip:hover { border-color: var(--accent); }
.chip.selected {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-deep);
  font-weight: 600;
}

/* toggle (미숙아 등) */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
}
.toggle-row.active { border-color: var(--accent); background: var(--accent-soft); }
.toggle-label { font-size: 14px; font-weight: 500; }
.toggle-switch {
  width: 36px; height: 20px;
  background: var(--border);
  border-radius: 100px;
  position: relative;
  transition: background 0.2s;
  flex-shrink: 0;
}
.toggle-switch::after {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 16px; height: 16px;
  background: white;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.toggle-row.active .toggle-switch { background: var(--accent); }
.toggle-row.active .toggle-switch::after { transform: translateX(16px); }

/* preterm 보강 영역 */
.preterm-fields {
  margin-top: 12px;
  padding: 14px;
  background: var(--accent-soft);
  border-radius: 10px;
  display: none;
}
.preterm-fields.visible { display: block; }
.preterm-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}
.preterm-tab {
  flex: 1;
  padding: 8px;
  border: 1px solid var(--border);
  background: white;
  border-radius: 8px;
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
  color: var(--text-soft);
}
.preterm-tab.selected {
  border-color: var(--accent);
  background: var(--accent);
  color: white;
  font-weight: 600;
}

/* CTA */
.cta-row {
  position: fixed;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  max-width: 430px;
  width: 100%;
  padding: 16px 24px calc(16px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, transparent, var(--bg) 40%);
  display: flex;
  gap: 10px;
  z-index: 20;
}
.btn {
  flex: 1;
  padding: 14px 20px;
  background: var(--text);
  color: white;
  border: none;
  border-radius: 100px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  letter-spacing: -0.01em;
}
.btn:disabled {
  background: var(--text-muted);
  cursor: not-allowed;
}
.btn-secondary {
  background: white;
  color: var(--text);
  border: 1px solid var(--border);
  flex: 0 0 auto;
  padding: 14px 18px;
}
.btn-text {
  background: none;
  color: var(--text-soft);
  border: none;
  font-size: 13px;
  text-decoration: underline;
  cursor: pointer;
  font-family: inherit;
}

/* error */
.error-msg {
  color: #c0392b;
  font-size: 12.5px;
  margin-top: 6px;
}
.form-banner {
  padding: 12px 14px;
  background: #fef4f2;
  border: 1px solid #f5c6c0;
  border-radius: 10px;
  color: #c0392b;
  font-size: 13px;
  margin-bottom: 16px;
}

/* ===== 페이지 섹션 타이틀 (타임라인·읽을거리 등) ===== */
.page-section-title {
  font-family: var(--font-handy);
  font-size: 23px;
  font-weight: 700;
  letter-spacing: 0;
  color: var(--text);
  margin-bottom: 6px;
}
.page-section-sub {
  font-size: 13px;
  color: var(--text-soft);
  line-height: 1.5;
  margin-bottom: 20px;
}

/* ===== 읽을거리 카드 ===== */
.reads-search-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 0 14px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 16px;
  transition: border-color 0.15s;
}
.reads-search-bar:focus-within { border-color: var(--accent); }
.reads-search-icon { font-size: 14px; flex-shrink: 0; opacity: 0.7; }
.reads-search-input {
  flex: 1; min-width: 0;
  border: none; outline: none; background: transparent;
  padding: 11px 0;
  font-size: 14px; color: var(--text); font-family: inherit;
}
.reads-search-input::placeholder { color: var(--text-muted); }
/* 브라우저 기본 search clear(×) 제거 — 자체 버튼 사용 */
.reads-search-input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.reads-search-clear {
  flex-shrink: 0;
  border: none; background: transparent; cursor: pointer;
  color: var(--text-muted); font-size: 14px; line-height: 1;
  padding: 6px; border-radius: 8px;
}
.reads-search-clear:hover { color: var(--text); }

.reads-list { display: flex; flex-direction: column; gap: 12px; }
.read-card {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 16px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 14px;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s, transform 0.05s;
}
.read-card:hover { border-color: var(--accent); }
.read-card:active { transform: scale(0.99); }
.read-emoji { font-size: 26px; line-height: 1.2; flex-shrink: 0; }
.read-body { flex: 1; min-width: 0; }
.read-tag {
  display: inline-block;
  font-size: 10.5px; font-weight: 700;
  color: var(--accent-deep);
  background: var(--accent-soft);
  padding: 2px 8px;
  border-radius: 6px;
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}
.read-title {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
  line-height: 1.4;
  margin-bottom: 4px;
}
.read-summary {
  font-size: 12.5px;
  color: var(--text-soft);
  line-height: 1.55;
}
.reads-end {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  padding: 20px 0;
}

/* ===== PAGE HEADER (마이 등 서브 페이지) ===== */
.page-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 16px 16px;
  border-bottom: 1px solid var(--border-soft);
}
.page-back {
  width: 36px; height: 36px; border-radius: 50%;
  background: transparent; border: none;
  font-size: 20px; color: var(--text);
  cursor: pointer; line-height: 1;
}
.page-back:hover { background: var(--border-soft); }
.page-header-account { margin-left: auto; }

/* account 내 프로필 카드 */
.profile-card {
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 4px 14px;
}
.profile-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-soft);
  font-size: 13px;
}
.profile-row:last-child { border-bottom: none; }
.profile-row-label { color: var(--text-muted); font-weight: 500; }
.profile-row-value { color: var(--text); font-weight: 600; word-break: break-all; text-align: right; }

/* 로그아웃 버튼 — btn-leave 위에 full-width 변형 */
.logout-btn {
  width: 100%;
  padding: 14px;
  font-size: 14px;
}

/* page-section-row 안에서 제목 옆 inline 뒤로 가기 버튼 (journey 등 sub 페이지) */
.page-back-inline {
  width: 32px; height: 32px; border-radius: 50%;
  background: transparent; border: 1px solid var(--border-soft);
  font-size: 16px; color: var(--text);
  cursor: pointer; line-height: 1;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  margin-top: 4px;
}
.page-back-inline:hover { background: var(--border-soft); }
.page-section-row > .page-back-inline + div { flex: 1; min-width: 0; }
.page-title { font-size: 16px; font-weight: 700; letter-spacing: -0.01em; }
.page-body { padding: 20px 24px 120px; }

/* ===== MY PAGE ===== */
.my-section { margin-bottom: 28px; scroll-margin-top: 90px; }
.my-section-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.my-section-hint {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: -6px;
  margin-bottom: 10px;
  line-height: 1.6;
}
.my-temperament-card {
  display: flex; align-items: center; gap: 14px;
  width: 100%;
  padding: 14px 16px;
  background: var(--accent-soft);
  border: none;
  border-radius: 12px;
  margin-bottom: 10px;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s;
}
.my-temperament-card:hover { background: #dde9df; }
.my-temperament-emoji { font-size: 28px; }
.my-temperament-text { flex: 1; min-width: 0; }
.my-temperament-label { font-size: 14.5px; font-weight: 700; color: var(--accent-deep); }
.my-temperament-meta { font-size: 11.5px; color: var(--text-muted); margin-top: 2px; }
.my-temperament-toggle {
  font-size: 14px;
  color: var(--text-muted);
  transition: transform 0.15s;
}
.my-temperament-card.open .my-temperament-toggle { color: var(--accent-deep); }
.my-temperament-detail {
  padding: 6px 2px 14px;
  animation: fade-in 0.2s ease-out;
}
.my-temperament-headline {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.55;
  margin-bottom: 14px;
  letter-spacing: -0.01em;
}
@keyframes fade-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
.my-temperament-empty {
  padding: 14px 16px;
  background: var(--border-soft);
  border-radius: 12px;
  color: var(--text-muted);
  font-size: 13px;
  margin-bottom: 10px;
}
.my-temperament-btn {
  display: block; width: 100%;
  padding: 12px 16px;
  text-align: center;
}
.my-danger-btn {
  display: block; width: 100%;
  padding: 13px 16px;
  background: white;
  color: #c0392b;
  border: 1px solid #f5c6c0;
  border-radius: 10px;
  font-size: 13.5px; font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.my-danger-btn:hover { background: #fef4f2; }
.my-danger-hint {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 8px;
  line-height: 1.5;
}

/* ===== 가족 구성원 ===== */
.members-list { display: flex; flex-direction: column; gap: 10px; }
.members-loading { font-size: 12.5px; color: var(--text-muted); padding: 4px 0; }
.members-empty { font-size: 12.5px; color: var(--text-muted); padding: 4px 0; }
.member-card {
  display: flex; align-items: center; gap: 12px;
  background: white;
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 12px 14px;
}
.member-emoji { font-size: 22px; flex-shrink: 0; width: 32px; text-align: center; }
.member-text { flex: 1; min-width: 0; }
.member-name {
  font-size: 14px; font-weight: 600; color: var(--text);
  display: flex; align-items: center; gap: 6px;
}
.member-name-self {
  font-size: 11px; font-weight: 500; color: var(--accent-deep);
  background: var(--accent-soft);
  padding: 1px 7px; border-radius: 6px;
}
.member-name-pending {
  font-size: 11px; font-weight: 500; color: var(--text-muted);
  background: var(--card);
  border: 1px solid var(--border-soft);
  padding: 1px 7px; border-radius: 6px;
}
/* parent(메인 권한자) chip — 구성원 관리 권한 시각 표시 (2026-05-18 사고 후 권한 가시화) */
.member-name-role.parent {
  font-size: 11px; font-weight: 500; color: var(--cream-text);
  background: var(--warm-soft);
  border: 1px solid var(--warm-border);
  padding: 1px 7px; border-radius: 6px;
}
.member-meta { font-size: 11.5px; color: var(--text-muted); margin-top: 2px; line-height: 1.5; }
.member-role { font-size: 11.5px; color: var(--text-soft); }
.member-action-btn {
  background: transparent; border: none;
  font-size: 12px; color: var(--text-muted);
  cursor: pointer;
  padding: 4px 8px;
}
.member-action-btn:hover { color: #c0392b; }

/* ===== 초대 sheet ===== */
.invite-sheet-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.32);
  z-index: 100;
  opacity: 0;
  transition: opacity 0.18s;
}
.invite-sheet-backdrop[hidden] { display: none; }
.invite-sheet-backdrop.visible { opacity: 1; }
.invite-sheet {
  position: fixed; left: 0; right: 0; bottom: 0;
  background: var(--bg);
  border-radius: 18px 18px 0 0;
  max-width: 430px;
  margin: 0 auto;
  z-index: 101;
  padding: 8px 22px 22px;
  box-shadow: 0 -8px 30px rgba(0,0,0,0.10);
  transform: translateY(100%);
  transition: transform 0.22s;
  display: flex; flex-direction: column;
  max-height: 90vh;
  max-height: calc(90dvh / var(--app-zoom));
}
.invite-sheet[hidden] { display: none; }
.invite-sheet.visible { transform: translateY(0); }
.invite-sheet-handle {
  width: 36px; height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 6px auto 12px;
}
.invite-sheet-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.invite-sheet-title {
  font-family: var(--font-handy);
  font-size: 17px; font-weight: 700;
  color: var(--text);
}
.invite-sheet-close {
  background: transparent; border: none;
  font-size: 22px; color: var(--text-soft);
  cursor: pointer; padding: 4px 8px;
  line-height: 1;
}
.invite-sheet-body {
  overflow-y: auto;
  flex: 1;
  padding-right: 4px;
}
.invite-sheet-cta {
  margin-top: 14px;
  padding-top: 8px;
  display: flex; flex-direction: column; gap: 8px;
}
.invite-sheet-cta .btn,
.invite-sheet-cta .btn-remove,
.invite-sheet-cta .btn-leave {
  width: 100%;
}

/* ===== 멤버 편집 sheet ===== */
.member-menu-btn {
  background: transparent;
  border: none;
  font-size: 20px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 10px;
  border-radius: 8px;
  line-height: 1;
  flex-shrink: 0;
}
.member-menu-btn:hover { background: var(--card); color: var(--text); }
.btn-remove,
.btn-leave {
  background: transparent;
  border: 1px solid #e5b8b3;
  color: #c0392b;
  border-radius: 12px;
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-remove:hover,
.btn-leave:hover { background: #fbecea; }
.btn-remove:disabled,
.btn-leave:disabled { opacity: 0.5; cursor: not-allowed; }
.chip:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.chip:disabled:hover { border-color: var(--border); }

/* ===== ASSESS (발달 점검) ===== */
.assess-progress-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 8px; margin-bottom: 8px;
}
.assess-category-label { font-size: 13px; font-weight: 700; color: var(--accent-deep); }
.assess-category-count { font-size: 11.5px; color: var(--text-muted); }
.assess-back {
  display: inline-flex; align-items: center;
  margin: 0 0 14px 0;
  padding: 6px 12px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-family: inherit;
  font-size: 12px; font-weight: 500;
  color: var(--text-soft);
  cursor: pointer;
  transition: all 0.12s;
}
.assess-back:hover {
  background: var(--border-soft);
  color: var(--text);
  border-color: var(--text-muted);
}
.assess-result-list {
  display: flex; flex-direction: column; gap: 10px;
  margin-top: 18px;
}
.assess-result-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  background: var(--accent-soft);
  border-radius: 12px;
}
.assess-result-item.dim {
  background: var(--border-soft);
  opacity: 0.7;
}
.assess-result-icon { font-size: 22px; }
.assess-result-body { flex: 1; min-width: 0; }
.assess-result-cat {
  font-size: 11px; font-weight: 700;
  color: var(--accent-deep);
  letter-spacing: 0.02em;
  margin-bottom: 2px;
}
.assess-result-item.dim .assess-result-cat { color: var(--text-muted); }
.assess-result-text {
  font-size: 13.5px; color: var(--text);
  line-height: 1.4;
}

/* ===== QUIZ ===== */
.quiz-progress-text {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.quiz-progress-bar {
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 24px;
}
.quiz-progress-fill {
  height: 100%;
  background: var(--accent);
  transition: width 0.25s;
}
.quiz-question {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  margin-bottom: 20px;
  letter-spacing: -0.015em;
}
.quiz-options { display: flex; flex-direction: column; gap: 10px; }
.quiz-option {
  padding: 16px 18px;
  border: 1px solid var(--border);
  background: white;
  border-radius: 12px;
  font-size: 14.5px;
  text-align: left;
  font-family: inherit;
  cursor: pointer;
  color: var(--text);
  line-height: 1.5;
  transition: all 0.12s;
}
.quiz-option:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
}
.quiz-option.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
}
/* '아직 안 나타났어요' — 결측 선택지 (보조 톤) */
.quiz-option-na {
  border-style: dashed;
  color: var(--text-muted);
  font-size: 13.5px;
}
.quiz-hint {
  font-size: 12.5px;
  color: var(--text-muted);
  margin: 0 0 12px;
  line-height: 1.5;
}

/* 부분 성향(낯가림 결측) — 갈래 teaser */
.partial-observed { font-size: 15px; line-height: 1.6; color: var(--text); text-align: center; margin: 6px 0 18px; }
.partial-pair-lead { font-size: 13px; color: var(--text-soft); text-align: center; margin-bottom: 11px; }
.partial-pair { display: flex; gap: 12px; }
.partial-card { flex: 1; min-width: 0; border: 1px solid var(--border-soft); border-radius: 16px; padding: 18px 12px; text-align: center; }
/* 흐릿한 그림 = 아직 또렷하지 않음(teaser). 약올림 X — 라벨·키워드는 또렷하게 줌 */
.partial-card-emoji { font-size: 42px; line-height: 1; filter: blur(3px); opacity: 0.78; }
.partial-card-label { font-weight: 700; font-size: 15px; color: var(--text); margin-top: 10px; }
.partial-card-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 5px; margin-top: 9px; }
.partial-card-tag { font-size: 11px; color: var(--text-soft); background: rgba(255,255,255,0.6); border: 1px solid var(--border-soft); border-radius: 999px; padding: 3px 9px; }
.partial-foot { font-size: 12.5px; color: var(--text-muted); text-align: center; margin-top: 16px; }

/* ===== RESULT ===== */
.result-banner {
  margin-bottom: 16px;
  padding: 12px 16px;
  background: var(--accent-soft);
  border-radius: 12px;
  font-size: 13px;
  color: var(--accent-deep);
  line-height: 1.55;
}
.result-banner-secondary {
  background: var(--warm-soft);
  color: #8b6c3d;
  border: 1px solid var(--warm-border);
}
.result-card {
  padding: 28px 24px;
  border-radius: 18px;
  text-align: center;
  margin-bottom: 20px;
  border: 1px solid var(--border-soft);
}
.result-emoji { font-size: 56px; line-height: 1; margin-bottom: 12px; }
.result-type-name {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.result-type-modifier {
  display: inline-block;
  font-size: 13px;
  padding: 3px 10px;
  background: white;
  border-radius: 100px;
  color: var(--text-soft);
  font-weight: 500;
  margin-bottom: 12px;
}
.result-headline {
  font-size: 14.5px;
  color: var(--text);
  line-height: 1.6;
  letter-spacing: -0.01em;
}
.result-section {
  background: white;
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  padding: 18px 18px 16px;
  margin-bottom: 12px;
}
.result-section-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.4px;
  margin-bottom: 8px;
}
.result-section-body {
  font-size: 14px;
  color: var(--text);
  line-height: 1.65;
}
.result-tips {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.result-tips li {
  font-size: 13.5px;
  line-height: 1.55;
  padding-left: 18px;
  position: relative;
  color: var(--text);
}
.result-tips li::before {
  content: '•';
  position: absolute;
  left: 4px;
  color: var(--accent);
  font-weight: 700;
}

/* ===== 기질 결과 본문 — 동물 캐릭터 테마 (2026-05-30) =====
   CSS 변수(--t-ink·--t-accent·--t-accent1·--t-bg·--t-chip·--t-border)는
   temperament-share.js의 hydrateResultDetail()가 섹션별로 inline 주입. */
.result-section[data-temperament-themed] {
  position: relative;
  background: var(--t-bg, #faf8f4);
  border: 1px solid var(--t-border, var(--border-soft));
  border-radius: 18px;
  padding: 15px 16px 14px 18px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}
/* 왼쪽 컬러 액센트 바 (동물 카드 그라데이션) */
.result-section[data-temperament-themed]::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: linear-gradient(var(--t-accent1, var(--t-accent)), var(--t-accent, #cbb89a));
}
.result-section[data-temperament-themed] .result-section-title {
  color: var(--t-ink, var(--text-muted));
  font-weight: 800;
  font-size: 12.5px;
}
.result-section[data-temperament-themed] .result-section-body { font-size: 13.5px; }
.result-section[data-temperament-themed] .result-strength-text { margin: 0; }

/* 옅은 캐릭터 워터마크 (강점 섹션) */
.result-section-deco {
  position: absolute;
  right: -8px; bottom: -14px;
  font-size: 76px; line-height: 1;
  opacity: 0.09;
  transform: rotate(-9deg);
  pointer-events: none;
  user-select: none;
}

/* 강점 키워드 칩 */
.result-tagchips {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-top: 11px;
  position: relative; z-index: 1;
}
.result-tagchip {
  font-size: 11.5px; font-weight: 700;
  color: var(--t-ink, var(--text));
  background: var(--t-chip, rgba(0, 0, 0, 0.05));
  padding: 5px 11px;
  border-radius: 99px;
}

/* 팁 — [라벨 칩] + 핵심 + (부연) 카드 */
.result-section[data-temperament-themed] .result-tips { gap: 9px; }
.result-tips .result-tip {
  list-style: none;
  position: relative;
  padding: 11px 13px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid var(--t-border, var(--border-soft));
  display: flex; flex-direction: column; gap: 4px;
}
.result-tips .result-tip::before { content: none; } /* 기본 • 불릿 제거 */
.result-tip-label {
  align-self: flex-start;
  font-size: 10.5px; font-weight: 800; letter-spacing: 0.2px;
  color: var(--t-ink, var(--text));
  background: var(--t-chip, rgba(0, 0, 0, 0.05));
  padding: 3px 9px;
  border-radius: 99px;
}
.result-tip-body { display: block; }
.result-tip-main {
  font-size: 13px; font-weight: 600; line-height: 1.5;
  color: var(--text);
}
.result-tip-icon { font-weight: 800; margin-right: 5px; }
.result-tip.do .result-tip-icon { color: #2E9E5B; }
.result-tip.dont .result-tip-icon { color: #D0594A; }
.result-tip-sub {
  font-size: 12px; line-height: 1.5;
  color: var(--text-muted);
}

/* ===== 기질 결과 카드 + 모달 (2026-05-18 신규 — γ 통합) =====
   설계서: mockup_temperament_result_v5.html (옵션 2 — 키워드 칩)
   색 매핑: temperament-data.js의 cardGradient·cardTextColor 동적 inline style
*/
.temperament-result-modal {
  /* sheet 기본 스타일(padding 8 18 22)을 override.
     본 모달은 sheet-handle·sheet-head 패턴 X.
     자체 닫기 버튼 + head 영역(1:1 카드 — 모달 모서리까지) + body 구조 */
  padding: 0;
  /* overflow hidden으로 head 카드 둥근 모서리 잘림 처리 */
  overflow-y: auto;
}
.temperament-modal-close {
  position: absolute;
  top: 12px; right: 12px;
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.85);
  color: var(--text);
  font-size: 18px; font-weight: 700;
  cursor: pointer;
  z-index: 10;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}
.temperament-modal-close:hover { background: white; }

/* ─── 1:1 메인 공유 카드 (head 영역) ─── */
.temperament-result-card {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  display: flex; flex-direction: column;
  padding: 24px;
  overflow: hidden;
  /* background·color는 JS에서 동적 inline style */
}
.temperament-result-card::before {
  content: '';
  position: absolute;
  top: -35%; right: -25%;
  width: 75%; height: 75%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.45) 0%, transparent 60%);
  pointer-events: none;
}
.temperament-result-card::after {
  content: '';
  position: absolute;
  bottom: -25%; left: -20%;
  width: 70%; height: 70%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.25) 0%, transparent 60%);
  pointer-events: none;
}
.temperament-result-card .card-top {
  position: relative; z-index: 1;
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.5px; opacity: 0.75;
}
.temperament-result-card .card-content {
  flex: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  position: relative; z-index: 1;
  gap: 12px;
}
.temperament-result-card .card-emoji {
  font-size: 84px;
  line-height: 1;
  filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.18));
}
.temperament-result-card .card-label {
  font-weight: 800;
  font-size: 28px;
  text-align: center;
  letter-spacing: -0.5px;
  line-height: 1.2;
}
.temperament-result-card .card-label .modifier {
  display: block;
  font-weight: 500;
  font-size: 16px;
  opacity: 0.85;
  margin-bottom: 2px;
}
.temperament-result-card .card-headline {
  font-weight: 500;
  font-size: 13.5px;
  text-align: center;
  line-height: 1.55;
  opacity: 0.92;
  max-width: 280px;
  padding: 0 8px;
}
.temperament-result-card .card-keywords {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}
.temperament-result-card .card-keyword-chip {
  background: rgba(255, 255, 255, 0.55);
  padding: 6px 12px;
  border-radius: 99px;
  font-size: 11.5px;
  font-weight: 700;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.temperament-result-card .card-bottom {
  position: relative; z-index: 1;
  text-align: center;
  font-size: 10.5px;
  opacity: 0.7;
  letter-spacing: 0.3px;
}
.temperament-result-card .card-bottom .brand {
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* 드래곤만 글씨 그림자 (흰 글씨 가독성) */
.temperament-result-card[data-text-color="#FFFFFF"] .card-label,
.temperament-result-card[data-text-color="#FFFFFF"] .card-headline {
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
}

/* ─── 모달 본문 영역 ─── */
.temperament-modal-body {
  padding: 22px;
  /* 모달 자체 overflow-y:auto에 맡김 */
}
.temperament-modal-body .result-section { margin-bottom: 18px; }
.temperament-modal-body .result-section:last-of-type { margin-bottom: 0; }

/* ─── 공유 버튼 툴바 ─── */
.temperament-share-toolbar {
  display: flex;
  gap: 8px;
  margin-top: 20px;
}
.temperament-share-btn {
  flex: 1;
  padding: 12px 8px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: white;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.temperament-share-btn:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
}
.temperament-share-btn.primary {
  background: var(--text);
  color: white;
  border-color: var(--text);
}
.temperament-share-btn.primary:hover {
  background: #1a1611;
}
.temperament-share-btn:disabled {
  opacity: 0.5;
  cursor: wait;
}

/* ===== 읽을거리 섹션 + 본문 페이지 ===== */
.reads-section { display: flex; flex-direction: column; gap: 12px; }
.reads-section + .reads-section { margin-top: 24px; }
.reads-section-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  margin-bottom: 2px;
}
.reads-list-inner { display: flex; flex-direction: column; gap: 12px; }
.reads-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 14px;
}
.reads-pager-status {
  font-size: 12px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  min-width: 92px;
  text-align: center;
}
.reads-pager-btn {
  width: 36px; height: 36px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: white;
  color: var(--text);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s, transform 0.05s;
}
.reads-pager-btn:hover:not(:disabled) { border-color: var(--accent); }
.reads-pager-btn:active:not(:disabled) { transform: scale(0.96); }
.reads-pager-btn:disabled { opacity: 0.35; cursor: default; }

.back-link {
  display: inline-flex;
  align-items: center;
  background: rgba(251, 246, 236, 0.92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid var(--border-soft);
  padding: 8px 14px;
  font-size: 12.5px;
  color: var(--text);
  cursor: pointer;
  letter-spacing: -0.01em;
  border-radius: 999px;
  position: sticky;
  top: 12px;
  z-index: 10;
  margin-bottom: 14px;
  font-family: inherit;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.back-link:hover { color: var(--accent-deep); border-color: var(--accent); }

.read-article { padding-bottom: 12px; }
.read-article-head { margin-bottom: 18px; }
.read-article-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-deep);
  background: var(--accent-soft);
  padding: 3px 9px;
  border-radius: 6px;
  margin-bottom: 10px;
  letter-spacing: 0.02em;
}
.read-article-title {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 0 0 8px;
}
.read-article-meta {
  font-size: 12px;
  color: var(--text-muted);
}

.read-article-body {
  font-size: 15px;
  line-height: 1.75;
  color: var(--text);
}
.read-article-body h2 {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 28px 0 10px;
  padding-top: 4px;
}
.read-article-body h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin: 22px 0 8px;
}
.read-article-body p { margin: 0 0 12px; }
.read-article-body strong { font-weight: 700; color: var(--text); }
.read-article-body em { font-style: italic; color: var(--text-soft); }
.read-article-body a { color: var(--accent-deep); text-decoration: underline; }
.read-article-body ul, .read-article-body ol {
  margin: 0 0 14px;
  padding-left: 22px;
}
.read-article-body li { margin-bottom: 6px; }
.read-article-body ol.content-steps { padding-left: 22px; }
.read-article-body ol.content-steps > li { margin-bottom: 10px; }

.read-article-body blockquote.content-lead {
  margin: 0 0 22px;
  padding: 14px 16px;
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  font-size: 14.5px;
  color: var(--text);
  line-height: 1.65;
}
.read-article-body blockquote.content-lead em {
  font-style: italic;
  color: var(--text);
}

.content-table-wrap {
  overflow-x: auto;
  margin: 6px 0 18px;
  -webkit-overflow-scrolling: touch;
}
.content-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 13px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.content-table th, .content-table td {
  padding: 9px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border-soft);
  vertical-align: top;
  line-height: 1.55;
}
.content-table thead th {
  background: var(--border-soft);
  font-weight: 700;
  color: var(--text);
  font-size: 12.5px;
}
.content-table tbody th {
  background: var(--border-soft);
  font-weight: 700;
  font-size: 12.5px;
  color: var(--text-soft);
  white-space: nowrap;
}
.content-table tr:last-child th, .content-table tr:last-child td { border-bottom: none; }

.content-callout {
  margin: 18px 0;
  padding: 14px 16px;
  background: var(--accent-soft);
  border-radius: 10px;
}
.content-callout-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-deep);
  margin-bottom: 8px;
  letter-spacing: 0.01em;
}
.content-callout ul { margin: 0; padding-left: 18px; }
.content-callout li { font-size: 13.5px; line-height: 1.65; }

.content-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 32px 0 20px;
}
.content-references {
  font-size: 12.5px;
  color: var(--text-soft);
  line-height: 1.6;
}
.content-references h3 {
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  margin: 0 0 10px;
}
.content-references ol {
  padding-left: 20px;
  margin: 0;
}
.content-references li { margin-bottom: 6px; }

/* ── 읽을거리 본문 강조 컴포넌트 (stat 박스·헤드라인·단계/예시 카드) ── */
/* 통계 수치 네모 박스 */
.read-article-body .content-stat-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0 18px;
}
.read-article-body .content-stat {
  flex: 1 1 140px;
  min-width: 128px;
  padding: 14px 14px 13px;
  background: var(--border-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  text-align: center;
}
.read-article-body .content-stat-num {
  font-size: 23px;
  font-weight: 800;
  line-height: 1.18;
  color: var(--text);
  letter-spacing: -0.01em;
}
.read-article-body .content-stat-label {
  margin-top: 7px;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--text-soft);
}
.read-article-body .content-stat.warn { background: #fae6e6; border-color: #ebc6c6; }
.read-article-body .content-stat.warn .content-stat-num { color: #b05656; }
.read-article-body .content-stat.good { background: var(--accent-soft); border-color: #cfe0c2; }
.read-article-body .content-stat.good .content-stat-num { color: var(--accent-deep); }

/* 핵심 한 줄 헤드라인 박스 */
.read-article-body .content-highlight {
  margin: 18px 0;
  padding: 15px 18px;
  background: var(--accent-soft);
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.55;
  color: var(--accent-deep);
  text-align: center;
}

/* 월령 단계 카드 */
.read-article-body .content-age-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 14px 0 16px;
}
.read-article-body .content-age-card {
  display: flex;
  gap: 12px;
  padding: 13px 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  align-items: flex-start;
}
.read-article-body .content-age-label {
  flex: 0 0 52px;
  font-size: 12.5px;
  font-weight: 800;
  color: var(--accent-deep);
  line-height: 1.25;
  text-align: center;
  padding-top: 2px;
}
.read-article-body .content-age-body {
  flex: 1;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text);
}

/* 단계(스텝) 카드 */
.read-article-body .content-steps-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 14px 0 16px;
  counter-reset: cstep;
}
.read-article-body .content-step {
  position: relative;
  padding: 13px 14px 13px 44px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.read-article-body .content-step::before {
  counter-increment: cstep;
  content: counter(cstep);
  position: absolute;
  left: 13px;
  top: 13px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.read-article-body .content-step-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.read-article-body .content-step-body {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text);
}

/* 구체적 예시 박스 */
.read-article-body .content-example {
  margin: 16px 0;
  padding: 15px 16px;
  background: var(--warm-soft);
  border: 1px solid var(--warm-border);
  border-radius: 12px;
}
.read-article-body .content-example-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--cream-text);
  margin-bottom: 4px;
}
.read-article-body .content-example h4 {
  font-size: 14.5px;
  margin: 0 0 10px;
  color: var(--text);
}
.read-article-body .content-example-row {
  display: flex;
  gap: 10px;
  padding: 7px 0;
  border-top: 1px dashed var(--warm-border);
}
.read-article-body .content-example-row:first-of-type { border-top: none; padding-top: 0; }
.read-article-body .content-example-stage {
  flex: 0 0 76px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--cream-text);
}
.read-article-body .content-example-action {
  flex: 1;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text);
}

/* 도움 받을 수 있는 곳 박스 */
.read-article-body .content-help {
  margin: 18px 0;
  padding: 15px 16px;
  background: var(--sky-soft);
  border-radius: 12px;
}
.read-article-body .content-help-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #3f5d78;
  margin-bottom: 10px;
}
.read-article-body .content-help-item {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text);
  margin-bottom: 6px;
}
.read-article-body .content-help-num { font-weight: 700; color: #3f5d78; }

/* 체크 가능한 체크리스트 + 체크 개수 (read.js 가 카운트 wiring) */
.read-article-body .content-checklist { margin: 12px 0 8px; display: flex; flex-direction: column; gap: 2px; }
.read-article-body .content-check {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 9px 12px; border-radius: 10px; cursor: pointer;
  font-size: 13.5px; line-height: 1.55; color: var(--text);
  transition: background 0.12s;
}
.read-article-body .content-check:hover { background: var(--border-soft); }
.read-article-body .content-check input {
  appearance: none; -webkit-appearance: none;
  flex: 0 0 18px; width: 18px; height: 18px; margin: 1px 0 0;
  border: 1.5px solid var(--border); border-radius: 5px;
  background: var(--card); cursor: pointer; position: relative;
  transition: background 0.12s, border-color 0.12s;
}
.read-article-body .content-check input:checked { background: var(--accent); border-color: var(--accent); }
.read-article-body .content-check input:checked::after {
  content: ''; position: absolute; left: 5px; top: 1px;
  width: 4px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.read-article-body .content-check input:checked + span { color: var(--text-muted); }
.read-article-body .content-checklist-tally {
  margin-top: 6px; padding: 8px 12px; border-radius: 8px;
  font-size: 12.5px; font-weight: 600; color: var(--text-muted);
}
.read-article-body .content-checklist-tally.active { color: var(--accent-deep); background: var(--accent-soft); }

/* ============================================================
   하루 스케줄 (daily) — mockup_daily_v8 + input_v2 + others_v1
   ============================================================ */

:root {
  --d-feed-bg: #fff0d4;   --d-feed-icon: #d49a5a;  --d-feed-soft: #fff8e8;   --d-feed-border: #f3e4be;
  --d-sleep-bg: #ece8f5;  --d-sleep-icon: #8478b0; --d-sleep-soft: #f4f1fa;  --d-sleep-border: #e0d9ed;
  --d-diaper-bg: #f0e8da; --d-diaper-icon: #a8865e;--d-diaper-soft: #f7f1e3; --d-diaper-border: #e5d8be;
  --d-food-bg: #ffe2d4;   --d-food-icon: #c47a4e;  --d-food-soft: #fff0e3;   --d-food-border: #f5d8be;
  --d-med-bg: #e3ecf2;    --d-med-icon: #5b7d99;   --d-med-soft: #ecf2f6;    --d-med-border: #c8d8e3;
  --d-temp-bg: #f3dada;   --d-temp-icon: #b86060;  --d-temp-soft: #fae6e6;   --d-temp-border: #ebc6c6;
}

/* 홈 공통 카드 박스 (timeline preview / recent-reads 등) */
.home-card {
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  padding: 14px 16px;
  margin: 14px 20px;
  box-shadow: var(--shadow-soft);
}

/* 칭찬 박스 — mastered + level_titles 있는 항목 7일 이내 노출. "우리 ${이름}는 ${mastered title}가 되었어요!" */
.home-celebrate {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #fff9e0 0%, #ffe7b8 100%);
  border: 1px solid #f0d896;
  border-radius: 14px;
  padding: 10px 14px;
  margin: 12px 20px;
}
.home-celebrate[hidden] { display: none !important; }
.home-celebrate-emoji { font-size: 18px; flex-shrink: 0; }

/* dismiss(x) 버튼 — 칭찬·기질 팁 박스 공용. 작고 은은하게 */
.dismiss-btn {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.12s, color 0.12s;
}
.dismiss-btn:hover {
  background: rgba(0,0,0,0.06);
  color: var(--text);
}
.dismiss-btn:active { transform: scale(0.92); }
.home-celebrate-body { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.home-celebrate-text {
  font-size: 13px;
  font-weight: 700;
  color: #8a5a00;
  line-height: 1.4;
  letter-spacing: -0.01em;
}
/* 다음 1칸 미리보기 — 은은하게 (잠긴 칸은 "곧 피어남" 톤, 부정 신호 X) */
.home-celebrate-next {
  font-size: 11px;
  font-weight: 600;
  color: #a9803a;
  line-height: 1.35;
  letter-spacing: -0.01em;
}
.home-celebrate-next[hidden] { display: none; }
/* "✨ 새 분석" 방금 열림 태그 */
.celebrate-new-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  background: #e8a23a;
  border-radius: 6px;
  padding: 1px 6px;
  margin-right: 4px;
}

/* ===== 발달 도감 (진척 컬렉션) — my 페이지 ===== */
.collection-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 2px 0 10px;
}
.collection-tier { font-size: 15px; font-weight: 800; color: var(--text); letter-spacing: -0.01em; }
.collection-progress { font-size: 12px; font-weight: 600; color: var(--text-soft, #9aa0a6); }
.collection-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.collect-card {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 12px 12px 11px;
  border-radius: 12px;
  background: #f6f8f5;
  border: 1px solid #e6ece2;
}
.collect-card-emoji { font-size: 22px; }
.collect-card-label { font-size: 13px; font-weight: 700; color: var(--text); letter-spacing: -0.01em; }
.collect-card-sub { font-size: 11px; font-weight: 600; color: #7a9a6a; line-height: 1.35; }
/* 잠긴 칸 — 흐릿 티저 ('곧 피어남' 톤, 부정 신호 X) */
.collect-card.locked { background: #f4f5f6; border-color: #e9eaec; opacity: 0.7; }
.collect-card.locked .collect-card-emoji { filter: grayscale(1); opacity: 0.5; }
.collect-card.locked .collect-card-label { color: #b3b8be; letter-spacing: 0.1em; }
.collect-card.locked .collect-card-sub { color: #a9803a; }
.collection-foot {
  margin: 12px 2px 0;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-soft, #9aa0a6);
  line-height: 1.4;
}
/* 잠긴 칸 해제 진행 바 */
.collect-bar { display: block; height: 4px; border-radius: 3px; background: #e3e6e9; margin-top: 7px; overflow: hidden; }
.collect-bar-fill { display: block; height: 100%; border-radius: 3px; background: #8bbf6a; transition: width .3s ease; }
/* 열린 칸 = 해당 분석 바로가기 링크 */
.collect-card-link { text-decoration: none; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: transform .1s ease; }
.collect-card-link:active { transform: scale(0.98); }

/* 오늘의 기질 양육 팁 — mini 박스, 1줄 hero 격 (head·body 없이 emoji + 본문) */
.home-tip {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  border-radius: 14px;
  padding: 12px 14px;
  margin: 12px 20px;
  cursor: pointer;}
.home-tip[hidden] { display: none !important; }
.home-tip {
  transition: background 0.12s;
  -webkit-tap-highlight-color: transparent;
}
.home-tip:active { background: var(--accent); }
.home-tip-emoji {
  font-size: 22px;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}
.home-tip-body { flex: 1; min-width: 0; }
.home-tip-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-deep);
  letter-spacing: 0.02em;
  margin-bottom: 3px;
}
.home-tip-text {
  font-size: 13px;
  color: var(--text);
  line-height: 1.5;
  letter-spacing: -0.01em;
}
.home-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 10px;
  gap: 8px;
  border-bottom: 1px dashed var(--border);
}
.home-card-title {
  font-size: 14px;
  color: var(--text);
  letter-spacing: -0.01em;
  font-weight: 700;
}
.home-card-cta {
  display: inline-flex;
  align-items: center;
  background: none;
  border: none;
  padding: 4px 0;
  font-size: 12px;
  color: var(--text-soft);
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
  flex-shrink: 0;
}
.home-card-cta:hover { color: var(--text); }
/* 홈 안 timeline 미리보기에서 월 캡슐(2026년 5월) 숨김 — 성장 탭에선 그대로 노출 */
.home-card .month-capsule { display: none; }

/* home-card 안에 들어가는 timeline 카드 — 외부 padding 제거 */
.home-card .timeline { padding: 0; }
.home-card .timeline::before { display: none; }

/* 홈 최근 콘텐츠 (read posts preview) */
.recent-reads-list { display: flex; flex-direction: column; gap: 8px; }
.recent-read-card {
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: 13px;
  padding: 13px 15px;
  display: grid;
  grid-template-columns: 30px 1fr auto;
  gap: 10px;
  align-items: center;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  text-decoration: none;
  color: inherit;
}
.recent-read-card:hover { border-color: var(--accent); box-shadow: var(--shadow-soft); }
.recent-read-emoji { font-size: 22px; }
.recent-read-body { min-width: 0; }
.recent-read-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
  margin-bottom: 2px;
}
.recent-read-tag {
  font-size: 10.5px;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.5px;
}
.recent-read-arrow { font-size: 12px; color: var(--text-muted); }

/* ============ 홈 화면 widgets — mockup_v3 한눈에 보기 ============ */
.widgets { margin: 0 -16px 22px; }
.widgets-title {
  font-size: 11px;
  color: var(--text-muted);
  margin: 0 16px 10px;
  letter-spacing: 1.2px;
  font-weight: 600;
  text-transform: uppercase;
}
.widgets-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 4px 16px 8px;
  scrollbar-width: none;
}
.widgets-scroll::-webkit-scrollbar { display: none; }
.widget-card {
  flex-shrink: 0;
  width: 168px;
  padding: 16px 14px;
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.12s;
  text-align: left;
  font-family: inherit;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.widget-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 1px 2px rgba(0,0,0,0.03), 0 6px 16px rgba(0,0,0,0.06);
}
.widget-icon { font-size: 22px; margin-bottom: 4px; }
.widget-title {
  font-size: 13.5px; font-weight: 700;
  color: var(--text); letter-spacing: -0.015em;
  line-height: 1.35;
}
.widget-desc {
  font-size: 11.5px; color: var(--text-soft);
  line-height: 1.45; margin-top: 2px;
}
.widget-cta {
  font-size: 11.5px;
  color: var(--accent-deep);
  font-weight: 700;
  margin-top: 6px;
}

/* baby switcher modal */
.baby-switcher-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
/* 행은 컨테이너만 — 선택 박스와 편집 버튼이 각자 테두리·간격으로 분리 (2026-05-21, 어디 누를지 명확히) */
.baby-switcher-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
}
.baby-switcher-row .baby-switcher-item { flex: 1; min-width: 0; }
.baby-switcher-row.active .baby-switcher-item { background: var(--accent-soft); border-color: var(--accent); }
.baby-switcher-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}
.baby-switcher-item:hover { border-color: var(--accent); }
.baby-switcher-item.active { background: var(--accent-soft); border-color: var(--accent); }
.baby-switcher-item-edit {
  flex: 0 0 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  font-family: inherit;
  font-size: 16px;
  color: var(--text-soft);
  cursor: pointer;
  opacity: 0.75;
}
.baby-switcher-item-edit:hover { opacity: 1; border-color: var(--accent); }
.baby-switcher-emoji { font-size: 22px; }
.baby-switcher-name { flex: 1; font-weight: 600; }
.baby-switcher-active-tag {
  font-size: 10.5px;
  color: var(--accent-deep);
  background: white;
  border: 1px solid var(--accent);
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 700;
}
.baby-switcher-add,
.baby-switcher-edit {
  flex: 1;
  padding: 11px 12px;
  background: transparent;
  border: 1px dashed var(--border);
  border-radius: 12px;
  font-family: inherit;
  font-size: 12.5px;
  color: var(--text-soft);
  cursor: pointer;
}
.baby-switcher-add:hover,
.baby-switcher-edit:hover { border-color: var(--accent); color: var(--text); }
.baby-switcher-cta-row { display: flex; gap: 8px; }

/* dual FAB — 하루 기록 + 성장 기록 */
.fab-container.dual { display: flex; flex-direction: column; gap: 10px; align-items: flex-end; }
.fab-container.dual .fab.secondary {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
  padding-right: 18px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.06);
}
.fab-container.dual .fab.secondary:hover { border-color: var(--accent); }

/* 최근 활동 snap (마지막 이벤트 카드) */
.last-snap {
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  padding: 12px 14px;
  margin: 14px 0 12px;
  box-shadow: var(--shadow-soft);
}
/* 홈에서 .next-steps와 너비 정렬 (page-body padding 24 + 추가 20 margin) */
.last-snap.home-snap { margin: 14px 20px 12px; }
.last-snap-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 10px;
  gap: 8px;
  border-bottom: 1px dashed var(--border);
}
.last-snap-title {
  font-size: 14px;
  color: var(--text);
  letter-spacing: -0.01em;
  font-weight: 700;
}
.insight-chip {
  background: none;
  border: none;
  padding: 4px 0;
  font-size: 12px;
  color: var(--text-soft);
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.insight-chip:hover { color: var(--text); }
.last-snap-row {
  display: flex;
  align-items: center;
  padding: 7px 0;
  border-top: 1px dashed var(--border-soft);
  font-size: 13px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.12s;
}
.last-snap-row:first-child { border-top: none; padding-top: 2px; }
.last-snap-row:hover { background: var(--bg-deep); }
.last-snap-row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 6px; }
.last-snap-row:active { background: var(--accent-soft); }
/* 홈 🌱 최근 성장 박스의 빠른 기록 — 성장/감정/말 기록 버튼.
   auto-fit minmax: 정상 폭 3개 한 줄 유지, 글자 크게(zoom)일 때만 아랫줄로 흐름(잘림 방지).
   min은 버튼 컴팩트화 후 실제 최소폭(~81px)보다 약간 큰 84px — 360px 폰 컨테이너(~288px)에서 3개가
   여유(>20px) 있게 들어가도록(문턱 fragile 회피, 2026-05-22 줌 가독성 fix). */
.home-quick-record {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(84px, 1fr));
  gap: 6px;
  margin: 4px 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-soft);
}
.quick-record-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 10px 6px;
  background: var(--bg-deep);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: all 0.12s;
  -webkit-tap-highlight-color: transparent;
}
.quick-record-btn:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.quick-record-btn:active { transform: scale(0.97); }
.quick-record-emoji { font-size: 17px; flex-shrink: 0; }
.quick-record-label {
  flex: 1;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  min-width: 0;
}
.quick-record-plus {
  font-size: 16px;
  font-weight: 600;
  color: var(--accent-deep);
  line-height: 1;
  flex-shrink: 0;
}
.last-snap-emoji { font-size: 17px; margin-right: 9px; width: 22px; text-align: center; flex-shrink: 0; }
.last-snap-cat { flex: 0 0 44px; color: var(--text); font-weight: 700; }
/* 상세+시간 묶음 — 정상 폭에선 한 줄(시간 우측), 글자 크게(zoom)·협소 폭에선 시간이 아래 줄로 흐름.
   각 조각은 nowrap 이라 '대변→대\n변' 같은 글자 단위 박살을 막음 (2026-05-22 줌 가독성 fix). */
.last-snap-main {
  flex: 1; min-width: 0; padding: 0 6px;
  display: flex; flex-wrap: wrap; align-items: baseline;
  row-gap: 1px; column-gap: 8px;
}
.last-snap-detail { color: var(--text-soft); font-size: 12.5px; min-width: 0; white-space: nowrap; }
.last-snap-time { color: var(--text-muted); font-size: 12px; white-space: nowrap; margin-left: auto; }
.last-snap-row.ongoing {
  background: var(--accent-soft);
  margin: 2px -8px;
  padding: 8px 8px;
  border-radius: 10px;
  border-top: none;
}
.last-snap-row.ongoing + .last-snap-row { border-top: none; }
.last-snap-row.ongoing .last-snap-detail { color: var(--accent-deep); font-weight: 700; }
.last-snap-row.ongoing .last-snap-time { color: var(--accent-deep); font-weight: 700; }
/* 발열 활성 row — 평소 row 위에 차분히 등장(경보 X). 38℃+ 또는 해열제 24h 내. 값은 muted rose. */
.last-snap-row.fever {
  background: #fdf4f1;
  margin: 2px -8px;
  padding: 8px 8px;
  border-radius: 10px;
  border-top: none;
}
.last-snap-row.fever + .last-snap-row { border-top: none; }
.last-snap-row.fever .last-snap-detail { color: #b5706a; font-weight: 700; }
.last-snap-row.fever .last-snap-time { color: #b5706a; }
.daily-recent-row.fever {
  background: #fdf4f1;
  margin: 1px -4px;
  padding: 5px 4px;
  border-radius: 8px;
}
.daily-recent-row.fever .rec-main { color: #b5706a; }
.daily-recent-row.fever .rec-ago { color: #b5706a; }
/* 등장 시 부드러운 fade/slide — '버그성 깜빡임'이 아니라 '아이 상태에 반응'으로 읽히게 */
.fever-snap-in { animation: feverSnapIn 0.28s ease; }
@keyframes feverSnapIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .fever-snap-in { animation: none; }
}
.end-now-btn {
  font-family: inherit;
  background: white;
  border: 1px solid var(--accent);
  color: var(--accent-deep);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 10.5px;
  font-weight: 700;
  margin-left: 8px;
  cursor: pointer;
  white-space: nowrap;
}
.end-now-btn:hover { background: var(--accent-soft); }
/* row + 버튼 — 홈 last-snap 빠른 기록 진입 (수면 ongoing 외 모든 row) */
.row-add-btn {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: white;
  color: var(--text-soft);
  font-size: 15px;
  line-height: 1;
  font-weight: 700;
  margin-left: 8px;
  cursor: pointer;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.row-add-btn:hover, .row-add-btn:focus-visible {
  border-color: var(--accent);
  color: var(--accent-deep);
  outline: none;
}
.row-add-btn[data-add-type="feeding"]:hover,
.row-add-btn[data-add-type="feeding"]:focus-visible { border-color: var(--d-feed-icon); color: var(--d-feed-icon); background: var(--d-feed-bg); }
.row-add-btn[data-add-type="sleep"]:hover,
.row-add-btn[data-add-type="sleep"]:focus-visible { border-color: var(--d-sleep-icon); color: var(--d-sleep-icon); background: var(--d-sleep-bg); }
.row-add-btn[data-add-type="diaper"]:hover,
.row-add-btn[data-add-type="diaper"]:focus-visible { border-color: var(--d-diaper-icon); color: var(--d-diaper-icon); background: var(--d-diaper-bg); }
.row-add-btn[data-add-type="food"]:hover,
.row-add-btn[data-add-type="food"]:focus-visible { border-color: var(--d-food-icon); color: var(--d-food-icon); background: var(--d-food-bg); }

/* 빠른 입력 quick-bar (8개 카테고리 — 일상 4 + 의료 2 + 기타 1 + 관찰 1) */
.quick-bar {
  display: grid;
  /* auto-fit + 작은 min: 가장 작은 글자(zoom 1)에선 320px 폰도 8개 한 줄 유지(줄바뀜 X).
     글자를 크게(zoom↑) 키울 때만, 잘리기 전에 아랫줄로 흐름(2026-05-23). min 28px ≥ 아이콘+패딩이라 잘림 X. */
  grid-template-columns: repeat(auto-fit, minmax(28px, 1fr));
  gap: 4px;
  margin-bottom: 16px;
  position: sticky;
  top: 60px; /* daily.js init에서 .app-top 높이로 동적 갱신 */
  z-index: 9;
  background: rgba(250, 249, 246, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 6px 0 8px;
}
.quick-btn {
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: 13px;
  padding: 11px 2px 9px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.12s, box-shadow 0.12s, border-color 0.12s;
}
.quick-btn[hidden] { display: none; }  /* display:flex가 UA [hidden]을 이기는 문제 — 수유 졸업 시 수유 버튼 hide */
.quick-btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-soft); border-color: var(--accent); }
.quick-btn-icon { font-size: 21px; line-height: 1; }
.quick-btn-label { font-size: 10.5px; color: var(--text-soft); font-weight: 600; }
/* 8개 버튼 배경·테두리·라벨색 통일 (med·observe·other 색 override 제거, 2026-05-23). 카테고리 구분은 아이콘이 담당. */

/* ===== 관찰 행동 (특정 행동 빈도 기록) ===== */
.bhv-grid { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 4px; }
.bhv-chip {
  position: relative;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 11px 14px;
  background: #f3f7fa; border: 1px solid #d9e4ec; border-radius: 13px;
  font-family: inherit; font-size: 14px; color: #3a4a57; font-weight: 600;
  cursor: pointer; user-select: none; -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
  transition: transform 0.1s, box-shadow 0.1s, background 0.1s;
}
.bhv-chip:active { transform: scale(0.96); background: #e6eef4; }
.bhv-chip-emoji { font-size: 16px; line-height: 1; }
.bhv-add-chip { background: transparent; border-style: dashed; color: #5b7a93; }
.bhv-chip.managing { padding-right: 30px; }
.bhv-chip-x {
  position: absolute; top: -6px; right: -6px;
  width: 20px; height: 20px; border-radius: 50%;
  background: #c0392b; color: #fff; font-size: 11px; line-height: 20px; text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.bhv-manage-toggle {
  margin-top: 8px; background: none; border: none; padding: 4px 2px;
  font-family: inherit; font-size: 12px; color: var(--text-soft); cursor: pointer; text-decoration: underline;
}
.bhv-empty { margin: 8px 2px; font-size: 13px; color: var(--text-soft); line-height: 1.5; }
.bhv-confirm {
  margin: 4px 0 2px; padding: 8px 12px;
  background: #eaf3eb; border-radius: 10px;
  font-size: 13px; color: #3f6b46; font-weight: 600;
  opacity: 0; transform: translateY(-4px); transition: opacity 0.2s, transform 0.2s;
}
.bhv-confirm.show { opacity: 1; transform: translateY(0); }

/* 깊은 새벽 수유 정서 지지 토스트 (최상위 fixed, 자동 소멸) */
.day-toast {
  position: fixed;
  left: 50%;
  bottom: 92px;
  transform: translate(-50%, 12px);
  max-width: 320px;
  padding: 12px 18px;
  background: #2d3a4a;
  color: #fdfdfb;
  border-radius: 14px;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.45;
  text-align: center;
  box-shadow: 0 6px 20px rgba(20, 28, 40, 0.28);
  opacity: 0;
  z-index: 130;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
}
.day-toast.show { opacity: 0.97; transform: translate(-50%, 0); }
.bhv-detail-head {
  margin-bottom: 12px; padding: 10px 12px;
  background: #f3f7fa; border-radius: 11px;
  font-size: 15px; font-weight: 700; color: #3a4a57;
}

/* 날짜 네비 */
.date-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 14px;
}
.date-nav-btn {
  background: transparent;
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  font-size: 13px;
  color: var(--text-soft);
  cursor: pointer;
  font-family: inherit;
}
.date-nav-btn:hover:not(:disabled) { background: var(--bg); color: var(--text); }
.date-nav-btn:disabled { opacity: 0.25; cursor: not-allowed; }
.date-nav-current {
  flex: 1;
  background: transparent;
  border: none;
  padding: 6px 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  font-family: inherit;
}
.date-nav-current {
  cursor: pointer;
  border-radius: 9px;
  transition: background 0.12s;
}
.date-nav-current:hover { background: var(--bg); }
.date-nav-emoji { font-size: 13px; opacity: 0.7; }
.date-nav-today-tag {
  font-size: 10px;
  color: var(--accent-deep);
  background: var(--accent-soft);
  padding: 2px 7px;
  border-radius: 999px;
  font-weight: 700;
}
.date-nav-picker {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 1px;
  height: 1px;
}

/* 타임라인 — mockup_daily_v8 정합 (sleep 막대 + connect-stretch + ongoing-fade) */
.timeline-flow { position: relative; margin-top: 4px; }
.tl-row {
  display: grid;
  grid-template-columns: 56px 1fr;
  column-gap: 8px;
  align-items: stretch;
  padding: 4px 0;
  position: relative;
  min-height: 32px;
}
.tl-time-col {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-soft);
  text-align: right;
  letter-spacing: -0.01em;
  white-space: nowrap;
  padding-top: 14px;
  align-self: flex-start;
}
.tl-time-col.ongoing { color: var(--accent-deep); }
.tl-time-col.sleep-start-time,
.tl-time-col.sleep-end-time { color: var(--d-sleep-icon); }
/* 시간 칼럼에 함께 노출되는 수면 깬 시각 — 시작 시각과 구분되게 수면 색 */
.tl-time-wake { color: var(--d-sleep-icon); }

/* sleep 막대 (수면 구간 시각화) */
.tl-event-wrapper { position: relative; align-self: stretch; }
.tl-marker-bar {
  position: absolute;
  left: 0;
  width: 4px;
  background: var(--d-sleep-icon);
  z-index: 2;
}
.tl-marker-bar.cap-top {
  top: 50%;
  bottom: -4px;
  border-radius: 3px 3px 0 0;
}
.tl-marker-bar.full { top: -4px; bottom: -4px; }
.tl-marker-bar.connect-stretch { top: -4px; bottom: -4px; }
.tl-marker-bar.ongoing-fade {
  top: -4px;
  bottom: -25px;
  background: linear-gradient(to bottom,
    var(--d-sleep-icon) 0%,
    var(--d-sleep-icon) 50%,
    rgba(132, 120, 176, 0.3) 80%,
    rgba(132, 120, 176, 0) 100%);
}

/* 이벤트 박스 */
.tl-event-col {
  display: grid;
  grid-template-columns: 30px 1fr auto auto;
  gap: 9px;
  align-items: center;
  padding: 9px 11px 9px 8px;
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-left-width: 4px;
  border-radius: 10px;
  position: relative;
  z-index: 0;
  cursor: pointer;
}
.tl-event-col.feed   { background: var(--d-feed-soft);   border-color: var(--d-feed-border);   border-left-color: var(--d-feed-icon); }
.tl-event-col.sleep  { background: var(--d-sleep-soft);  border-color: var(--d-sleep-border);  border-left-color: var(--d-sleep-icon); }
.tl-event-col.diaper { background: var(--d-diaper-soft); border-color: var(--d-diaper-border); border-left-color: var(--d-diaper-icon); }
.tl-event-col.food   { background: var(--d-food-soft);   border-color: var(--d-food-border);   border-left-color: var(--d-food-icon); }
.tl-event-col.med    { background: var(--d-med-soft);    border-color: var(--d-med-border);    border-left-color: var(--d-med-icon); }
.tl-event-col.temp   { background: var(--d-temp-soft);   border-color: var(--d-temp-border);   border-left-color: var(--d-temp-icon); }
.tl-event-col.custom { background: #f7f5ee;              border-color: #e6e0d2;                border-left-color: #7a715f; }
.tl-event-col.observe { background: #f3f7fa;             border-color: #d9e4ec;                border-left-color: #5b7a93; }

/* sleep 박스 — 좌측 띠 제거 + padding-left 늘림 (막대가 좌측 가장자리 차지) */
.tl-row.sleep-end .tl-event-col.sleep,
.tl-row .tl-event-col.sleep.ongoing {
  border-left-width: 0;
  padding-left: 14px;
}

/* sleep 중 다른 이벤트 (들여쓰기) */
.tl-row.sleep-during .tl-event-col { margin-left: 16px; }

/* 체온에 묶인 해열제 — 수면 중 활동과 같은 들여쓰기, 연결바는 체온 색으로 "이 체온에 딸린 약" 표시 */
.tl-row.temp-rx .tl-event-col { margin-left: 16px; }
.tl-row.temp-rx .tl-marker-bar.full { background: var(--d-temp-icon); }

/* 12:00 sleep 시작 행 — 박스 없음, 마커만 */
.tl-row.sleep-start-row { min-height: 24px; padding: 0; }
.tl-row.sleep-start-row .tl-time-col { padding-top: 4px; }
.tl-row.sleep-start-row .tl-event-wrapper { min-height: 24px; }

.tl-event-icon {
  width: 30px; height: 30px;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}
.tl-event-icon.feed   { background: var(--d-feed-bg); }
.tl-event-icon.sleep  { background: var(--d-sleep-bg); }
.tl-event-icon.diaper { background: var(--d-diaper-bg); }
.tl-event-icon.food   { background: var(--d-food-bg); }
.tl-event-icon.med    { background: var(--d-med-bg);  border: 1.5px solid var(--d-med-border); }
.tl-event-icon.temp   { background: var(--d-temp-bg); border: 1.5px solid var(--d-temp-border); }
.tl-event-icon.custom { background: #f0ede2; }
.tl-event-icon.observe { background: #e6eef4; }

.tl-event-body {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 3px 7px;
  min-width: 0; font-size: 12.5px; line-height: 1.45;
}
.tl-event-cat { font-weight: 700; color: var(--text); }
.tl-event-text { color: var(--text-soft); }
.tl-event-note {
  font-size: 11px; color: var(--text-muted); font-style: italic;
  display: block; width: 100%; margin-top: 2px;
}
.tl-event-care { font-size: 15px; flex-shrink: 0; width: 22px; text-align: center; opacity: 0.85; display: flex; align-items: center; justify-content: center; }

/* caregiver 색 dot (2026-05-18) — emoji 구분 어려운 문제 해소. uid hash → 8색 자동 배정 */
.cg-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(0,0,0,0.15);
  flex-shrink: 0;
  vertical-align: middle;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.6);  /* 작은 흰 테두리 — 어두운 배경에서도 분리 */
}
.cg-dot.is-self {
  /* 본인 입력은 살짝 강조 (테두리 더 진하게) */
  box-shadow: 0 0 0 1.5px rgba(255,255,255,0.9), 0 0 0 2.5px rgba(0,0,0,0.08);
}
.tl-event-ongoing-tag {
  display: inline-block;
  background: var(--d-sleep-icon);
  color: white;
  padding: 1px 7px;
  border-radius: 7px;
  font-size: 9.5px;
  font-weight: 700;
}

/* 공백 카드 (4h+ 기록 없는 구간) */
.tl-gap-row {
  display: grid;
  grid-template-columns: 56px 1fr;
  column-gap: 8px;
  align-items: center;
  padding: 4px 0;
}
.tl-gap-time {
  font-size: 10.5px;
  color: var(--text-muted);
  text-align: right;
  white-space: nowrap;
}
.tl-gap-card {
  background: transparent;
  border: 1px dashed var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
  font-family: inherit;
  cursor: pointer;
  width: 100%;
  text-align: left;
}
.tl-gap-card:hover { border-color: var(--accent); color: var(--text-soft); }
.tl-gap-emoji { font-size: 14px; opacity: 0.55; }

/* ============ Bottom Sheet (daily 입력) ============ */
.sheet-backdrop {
  position: fixed; inset: 0;
  background: rgba(45, 40, 35, 0.42);
  opacity: 0; transition: opacity 0.22s;
  z-index: 60;
}
.sheet-backdrop[hidden] { display: none; }
.sheet-backdrop.visible { opacity: 1; }
.sheet {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: var(--card);
  border-radius: 22px 22px 0 0;
  padding: 8px 18px 22px;
  max-height: 88vh;
  max-height: calc(88dvh / var(--app-zoom));
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.26s;
  z-index: 61;
  box-shadow: 0 -8px 30px rgba(0,0,0,0.10);
  max-width: 430px;
  margin: 0 auto;
}
.sheet[hidden] { display: none; }
.sheet.visible { transform: translateY(0); }
.sheet-handle {
  width: 38px; height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 6px auto 12px;
}
.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.sheet-head-left { display: flex; align-items: center; gap: 9px; }
.sheet-head-icon {
  width: 32px; height: 32px;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px;
}
.sheet-head-icon.feed   { background: var(--d-feed-bg);   color: var(--d-feed-icon); }
.sheet-head-icon.sleep  { background: var(--d-sleep-bg);  color: var(--d-sleep-icon); }
.sheet-head-icon.diaper { background: var(--d-diaper-bg); color: var(--d-diaper-icon); }
.sheet-head-icon.food   { background: var(--d-food-bg);   color: var(--d-food-icon); }
.sheet-head-icon.med    { background: var(--d-med-bg);    color: var(--d-med-icon); }
.sheet-head-icon.temp   { background: var(--d-temp-bg);   color: var(--d-temp-icon); }
.sheet-head-title { font-size: 16px; font-weight: 700; color: var(--text); }
.sheet-head-close {
  width: 32px; height: 32px;
  border: none; background: transparent;
  font-size: 22px; line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 8px;
  font-family: inherit;
}
.sheet-head-close:hover { background: var(--bg); color: var(--text); }
.sheet-head-meta {
  font-size: 11px;
  color: var(--text-muted);
  background: var(--bg-deep);
  padding: 4px 9px;
  border-radius: 999px;
}

/* field */
.field { margin-bottom: 14px; }
.field-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 7px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.field-label .req { color: #b86060; font-size: 11px; }
.field-label .opt-hint { color: var(--text-muted); font-weight: 500; font-size: 11px; }

/* 시각 display + chip 4종 */
.time-display {
  background: var(--bg-deep);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 7px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.time-display input[type="time"] {
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  padding: 0;
  width: auto;
  flex: 1;
  min-width: 0;
}
.time-display input[type="time"]:focus { outline: none; }
.ampm-toggle {
  border: 1px solid var(--border);
  background: white;
  border-radius: 8px;
  padding: 4px 12px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-soft);
  cursor: pointer;
  margin-left: 8px;
  user-select: none;
}
.ampm-toggle:hover { border-color: var(--accent); color: var(--text); }
.ampm-toggle.pm { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-deep); }
.time-chip-group {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.time-chip {
  flex: 1;
  min-width: 0;
  padding: 7px 6px;
  border: 1px solid var(--border);
  background: white;
  border-radius: 8px;
  font-size: 11.5px;
  color: var(--text-soft);
  cursor: pointer;
  font-family: inherit;
}
.time-chip:hover { border-color: var(--accent); }
.time-chip.selected {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-deep);
  font-weight: 700;
}

/* chip group big (수유 좌·우, 종류 등) */
.chip-group.big .chip { flex: 1; text-align: center; padding: 11px 10px; font-size: 13.5px; }
.chip[data-cat="feed"].selected   { background: var(--d-feed-bg);   border-color: var(--d-feed-icon);   color: var(--d-feed-icon); }
.chip[data-cat="sleep"].selected  { background: var(--d-sleep-bg);  border-color: var(--d-sleep-icon);  color: var(--d-sleep-icon); }
.chip[data-cat="diaper"].selected { background: var(--d-diaper-bg); border-color: var(--d-diaper-icon); color: var(--d-diaper-icon); }
.chip[data-cat="food"].selected   { background: var(--d-food-bg);   border-color: var(--d-food-icon);   color: var(--d-food-icon); }
.chip[data-cat="med"].selected    { background: var(--d-med-bg);    border-color: var(--d-med-icon);    color: var(--d-med-icon); }
.chip[data-cat="temp"].selected   { background: var(--d-temp-bg);   border-color: var(--d-temp-icon);   color: var(--d-temp-icon); }

/* stepper */
.amount-input {
  display: flex;
  align-items: center;
  background: var(--bg-deep);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 6px;
  gap: 4px;
}
.amount-step {
  flex: 0 0 38px;
  width: 38px; height: 38px;
  border: 1px solid var(--border);
  background: white;
  border-radius: 8px;
  font-size: 18px;
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
}
.amount-step:hover { border-color: var(--accent); }
.amount-step:disabled { opacity: 0.3; cursor: not-allowed; }
/* 증분 라벨형 stepper (체온: 소수부 ±0.1 안쪽 + 정수부 ±1.0 바깥쪽) — "−1.0" 등 텍스트가 들어가 폭/글자 조정 */
.amount-step.delta { flex: 0 0 auto; width: auto; min-width: 42px; padding: 0 6px; font-size: 13px; font-weight: 700; }
.amount-step.delta.coarse { color: var(--text-soft); }
.amount-input input[type="number"] {
  flex: 1;
  min-width: 0;
  text-align: center;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  -moz-appearance: textfield;
  padding: 0;
}
.amount-input input[type="number"]::-webkit-outer-spin-button,
.amount-input input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.amount-unit { font-size: 12.5px; color: var(--text-soft); padding-right: 8px; font-weight: 600; }

/* free text input */
.text-input {
  width: 100%;
  border: 1px solid var(--border);
  background: white;
  border-radius: 10px;
  padding: 11px 13px;
  font-family: inherit;
  font-size: 13.5px;
  color: var(--text);
}
.text-input:focus { outline: none; border-color: var(--accent); }
textarea.text-input { min-height: 60px; resize: vertical; }

/* collapse (접힘 옵션) */
.collapse-row {
  border: 1px dashed var(--border);
  border-radius: 10px;
  background: transparent;
}
.collapse-btn {
  width: 100%;
  background: transparent;
  border: none;
  padding: 11px 14px;
  font-family: inherit;
  font-size: 12.5px;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.collapse-btn:hover { color: var(--text-soft); }
.collapse-body { padding: 12px 14px 14px; border-top: 1px dashed var(--border); }

/* sheet actions */
.sheet-actions {
  display: flex;
  gap: 8px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border-soft);
}
.btn-cancel {
  flex: 0 0 auto;
  padding: 12px 18px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 11px;
  font-family: inherit;
  font-size: 13.5px;
  color: var(--text-soft);
  cursor: pointer;
}
.btn-cancel:hover { border-color: var(--accent); color: var(--text); }
.btn-save {
  flex: 1;
  padding: 12px 18px;
  background: var(--accent);
  border: 1px solid var(--accent-deep);
  border-radius: 11px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  color: white;
  cursor: pointer;
}
.btn-save:hover { background: var(--accent-deep); }
.btn-save:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-save.feed   { background: var(--d-feed-icon);   border-color: var(--d-feed-icon); }
.btn-save.sleep  { background: var(--d-sleep-icon);  border-color: var(--d-sleep-icon); }
.btn-save.diaper { background: var(--d-diaper-icon); border-color: var(--d-diaper-icon); }
.btn-save.food   { background: var(--d-food-icon);   border-color: var(--d-food-icon); }
.btn-save.med    { background: var(--d-med-icon);    border-color: var(--d-med-icon); }
.btn-save.temp   { background: var(--d-temp-icon);   border-color: var(--d-temp-icon); }
.btn-delete {
  margin-right: auto;
  padding: 12px 16px;
  background: transparent;
  border: 1px solid #ebc6c6;
  border-radius: 11px;
  font-family: inherit;
  font-size: 13.5px;
  color: #b86060;
  cursor: pointer;
}
.btn-delete:hover { background: #fae6e6; }
.btn-delete[hidden] { display: none; }

/* ============================================================
   JOURNEY (발달의 흐름) 페이지 — 2026-05-17
   진실원: mockup_journey_v2.html
   ============================================================ */

/* 영역별 색 변수 */
:root {
  --c-motor-gross: #6e9577;  --c-motor-gross-soft: #e3edd8;
  --c-motor-fine:  #c47a4e;  --c-motor-fine-soft:  #fcdec7;
  --c-cognitive:   #886b9e;  --c-cognitive-soft:   #ede2f0;
  --c-language:    #6c8eb0;  --c-language-soft:    #dfeaf2;
  --c-social:      #b56a8a;  --c-social-soft:      #f4dde6;
  --c-selfcare:    #b8854a;  --c-selfcare-soft:    #fbecc8;
}

/* journey 자체 헤더 */
.j-header {
  padding: 14px 18px 10px;
  position: sticky;
  top: 0;
  background: rgba(250, 249, 246, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 10;
  border-bottom: 1px solid var(--border-soft);
}
.j-header-row { display: flex; align-items: center; gap: 10px; }
.j-back-btn {
  width: 34px; height: 34px;
  border: none; background: transparent;
  font-size: 19px;
  color: var(--text-soft);
  cursor: pointer;
  border-radius: 8px;
  font-family: inherit;
}
.j-back-btn:hover { background: var(--bg-deep); }
.j-header-title { font-size: 16px; font-weight: 700; color: var(--text); flex: 1; }
.j-header-sub {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 2px;
  padding-left: 44px;
}

/* 카테고리 헤더 */
.cat-meta { padding: 14px 20px 10px; }
.cat-meta-title { font-size: 17px; font-weight: 700; color: var(--text); display: flex; align-items: center; gap: 7px; }
.cat-meta-sub { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* CHAIN — 영역별 단일 timeline (chain 헤더는 1줄 통합 후 제거됨) */
.chain { margin: 6px 0 0; padding-bottom: 14px; }
.chain-scroll {
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--border-soft) transparent;
  padding: 6px 16px 22px;
}
.chain-scroll::-webkit-scrollbar { height: 6px; background: transparent; }
.chain-scroll::-webkit-scrollbar-thumb {
  background: var(--border-soft);
  border-radius: 3px;
}
.chain-scroll::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }
.chain-track {
  display: inline-flex;
  align-items: flex-start;
  gap: 0;
  padding-right: 30px;
}

/* NODE */
.node {
  flex: 0 0 auto;
  width: 96px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  background: transparent;
  border: none;
  padding: 0;
  font-family: inherit;
  text-align: center;
}
.node + .node::before {
  content: '';
  position: absolute;
  left: -48px;
  top: 42px;
  width: 96px;
  height: 2px;
  background: var(--border);
  z-index: 0;
}
.node.done + .node::before,
.node.current + .node::before { background: var(--accent); }
.node-dot {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: white;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--text-muted);
  transition: transform 0.15s;
  position: relative;
  z-index: 1;
}
.node:active .node-dot { transform: scale(0.92); }
.node.done .node-dot { background: var(--accent); border-color: var(--accent); color: white; }
.node.partial .node-dot { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-deep); }
.node.current .node-dot {
  background: white;
  border-color: var(--accent);
  color: var(--accent-deep);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.node.future .node-dot {
  background: var(--card);
  border-color: var(--border);
  color: var(--text-muted);
  border-style: dashed;
}

.node-pin {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--accent-deep);
  background: var(--accent-soft);
  padding: 0 8px;
  height: 20px;
  line-height: 20px;
  border-radius: 999px;
  margin-bottom: 5px;
  display: none;
}
.node.current .node-pin { display: inline-block; }
.node-pin-spacer { height: 20px; margin-bottom: 5px; }
.node-label {
  font-size: 11.5px;
  color: var(--text);
  text-align: center;
  margin-top: 8px;
  line-height: 1.35;
  min-height: 32px;
  padding: 0 4px;
  word-break: keep-all;
}
.node.future .node-label { color: var(--text-muted); }
.node-age { font-size: 10px; color: var(--text-muted); margin-top: 3px; }

/* 영역별 색 — j-pane[data-cat-pane=cat] 기준 (6영역 동시 표시 시 각 pane이 자기 색 유지) */
.j-pane[data-cat-pane="motor_gross"] .node.done .node-dot { background: var(--c-motor-gross); border-color: var(--c-motor-gross); }
.j-pane[data-cat-pane="motor_gross"] .node.partial .node-dot { background: var(--c-motor-gross-soft); border-color: var(--c-motor-gross); color: var(--c-motor-gross); }
.j-pane[data-cat-pane="motor_gross"] .node.current .node-dot { border-color: var(--c-motor-gross); color: var(--c-motor-gross); box-shadow: 0 0 0 4px var(--c-motor-gross-soft); }
.j-pane[data-cat-pane="motor_gross"] .node.done + .node::before,
.j-pane[data-cat-pane="motor_gross"] .node.current + .node::before { background: var(--c-motor-gross); }
.j-pane[data-cat-pane="motor_gross"] .node-pin { color: var(--c-motor-gross); background: var(--c-motor-gross-soft); }

.j-pane[data-cat-pane="motor_fine"] .node.done .node-dot { background: var(--c-motor-fine); border-color: var(--c-motor-fine); }
.j-pane[data-cat-pane="motor_fine"] .node.partial .node-dot { background: var(--c-motor-fine-soft); border-color: var(--c-motor-fine); color: var(--c-motor-fine); }
.j-pane[data-cat-pane="motor_fine"] .node.current .node-dot { border-color: var(--c-motor-fine); color: var(--c-motor-fine); box-shadow: 0 0 0 4px var(--c-motor-fine-soft); }
.j-pane[data-cat-pane="motor_fine"] .node.done + .node::before,
.j-pane[data-cat-pane="motor_fine"] .node.current + .node::before { background: var(--c-motor-fine); }
.j-pane[data-cat-pane="motor_fine"] .node-pin { color: var(--c-motor-fine); background: var(--c-motor-fine-soft); }

.j-pane[data-cat-pane="cognitive"] .node.done .node-dot { background: var(--c-cognitive); border-color: var(--c-cognitive); }
.j-pane[data-cat-pane="cognitive"] .node.partial .node-dot { background: var(--c-cognitive-soft); border-color: var(--c-cognitive); color: var(--c-cognitive); }
.j-pane[data-cat-pane="cognitive"] .node.current .node-dot { border-color: var(--c-cognitive); color: var(--c-cognitive); box-shadow: 0 0 0 4px var(--c-cognitive-soft); }
.j-pane[data-cat-pane="cognitive"] .node.done + .node::before,
.j-pane[data-cat-pane="cognitive"] .node.current + .node::before { background: var(--c-cognitive); }
.j-pane[data-cat-pane="cognitive"] .node-pin { color: var(--c-cognitive); background: var(--c-cognitive-soft); }

.j-pane[data-cat-pane="language"] .node.done .node-dot { background: var(--c-language); border-color: var(--c-language); }
.j-pane[data-cat-pane="language"] .node.partial .node-dot { background: var(--c-language-soft); border-color: var(--c-language); color: var(--c-language); }
.j-pane[data-cat-pane="language"] .node.current .node-dot { border-color: var(--c-language); color: var(--c-language); box-shadow: 0 0 0 4px var(--c-language-soft); }
.j-pane[data-cat-pane="language"] .node.done + .node::before,
.j-pane[data-cat-pane="language"] .node.current + .node::before { background: var(--c-language); }
.j-pane[data-cat-pane="language"] .node-pin { color: var(--c-language); background: var(--c-language-soft); }

.j-pane[data-cat-pane="social"] .node.done .node-dot { background: var(--c-social); border-color: var(--c-social); }
.j-pane[data-cat-pane="social"] .node.partial .node-dot { background: var(--c-social-soft); border-color: var(--c-social); color: var(--c-social); }
.j-pane[data-cat-pane="social"] .node.current .node-dot { border-color: var(--c-social); color: var(--c-social); box-shadow: 0 0 0 4px var(--c-social-soft); }
.j-pane[data-cat-pane="social"] .node.done + .node::before,
.j-pane[data-cat-pane="social"] .node.current + .node::before { background: var(--c-social); }
.j-pane[data-cat-pane="social"] .node-pin { color: var(--c-social); background: var(--c-social-soft); }

.j-pane[data-cat-pane="selfcare"] .node.done .node-dot { background: var(--c-selfcare); border-color: var(--c-selfcare); }
.j-pane[data-cat-pane="selfcare"] .node.partial .node-dot { background: var(--c-selfcare-soft); border-color: var(--c-selfcare); color: var(--c-selfcare); }
.j-pane[data-cat-pane="selfcare"] .node.current .node-dot { border-color: var(--c-selfcare); color: var(--c-selfcare); box-shadow: 0 0 0 4px var(--c-selfcare-soft); }
.j-pane[data-cat-pane="selfcare"] .node.done + .node::before,
.j-pane[data-cat-pane="selfcare"] .node.current + .node::before { background: var(--c-selfcare); }
.j-pane[data-cat-pane="selfcare"] .node-pin { color: var(--c-selfcare); background: var(--c-selfcare-soft); }

/* 영역 간 시각 분리 — 첫 영역 외에는 위쪽 패딩으로 호흡 */
.j-pane + .j-pane { margin-top: 10px; padding-top: 14px; border-top: 1px solid var(--border-soft); }

/* 빈 카테고리 안내 */
.empty-cat {
  margin: 30px 20px;
  padding: 36px 20px;
  background: var(--card);
  border: 1px dashed var(--border);
  border-radius: 14px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}
.empty-cat-emoji { font-size: 28px; display: block; margin-bottom: 10px; }

/* 범례 */
.j-legend {
  margin: 24px 20px 0;
  padding: 12px 14px;
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  font-size: 11.5px;
  color: var(--text-soft);
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  row-gap: 7px;
}
.j-legend-item { display: inline-flex; align-items: center; gap: 5px; }
.j-legend-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: white;
  flex-shrink: 0;
}
.j-legend-dot.done { background: var(--accent); border-color: var(--accent); }
.j-legend-dot.current { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.j-legend-dot.future { border-style: dashed; background: var(--card); }

.j-foot-note {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  padding: 28px 20px 14px;
  line-height: 1.55;
}

/* 육각형 요약 카드 */
.radar-card {
  margin: 14px 16px 4px;
  padding: 16px 14px 14px;
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}
.radar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  gap: 8px;
}
.radar-title { font-size: 14px; font-weight: 700; color: var(--text); }
.radar-sub { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.radar-svg-wrap { position: relative; display: flex; justify-content: center; margin: 4px 0 6px; }
.radar-svg { display: block; max-width: 100%; height: auto; }
.radar-grid { fill: none; stroke: var(--border); stroke-width: 1; }
.radar-grid.extended {
  stroke: var(--border-soft);
  stroke-width: 1;
  stroke-dasharray: 2 4;
  opacity: 0.55;
}
.radar-axis { stroke: var(--border-soft); stroke-width: 1; }
.radar-peer { fill: none; stroke: var(--text-muted); stroke-width: 1.5; stroke-dasharray: 4 3; }
.radar-self { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 2; fill-opacity: 0.55; }
.radar-axis-label { font-family: inherit; font-size: 11px; font-weight: 700; fill: var(--text); pointer-events: none; }
.radar-axis-hit { fill: transparent; cursor: pointer; }
.radar-legend {
  display: flex;
  gap: 18px;
  justify-content: center;
  font-size: 11px;
  color: var(--text-soft);
  margin: 8px 0 4px;
  flex-wrap: wrap;
}
.radar-legend-item { display: inline-flex; align-items: center; gap: 6px; }
.radar-legend-swatch.self {
  width: 14px; height: 10px;
  background: var(--accent-soft);
  border: 1.5px solid var(--accent);
  border-radius: 2px;
}
.radar-legend-swatch.peer {
  width: 16px; height: 0;
  border-top: 2px dashed var(--text-muted);
}
.radar-note {
  font-size: 10.5px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 8px;
  line-height: 1.55;
}
.radar-attention {
  margin-top: 6px;
  padding: 9px 12px;
  background: var(--warm-soft);
  border: 1px solid var(--warm-border);
  border-radius: 10px;
  font-size: 12px;
  color: #8a6a2b;
  line-height: 1.5;
  text-align: center;
}
.radar-attention.calm {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-deep);
}
.preview-overlay {
  display: none;
  position: absolute;
  inset: 0;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  text-align: center;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-soft);
  padding: 18px;
  line-height: 1.55;
}
.preview-overlay span {
  background: rgba(255, 253, 248, 0.94);
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px dashed var(--border);
}
.radar-card.preview #radar-svg { opacity: 0.32; }
.radar-card.preview .preview-overlay { display: flex; }

/* journey 노드 popup */
.j-popup-backdrop {
  position: fixed; inset: 0;
  background: rgba(45, 40, 35, 0.42);
  opacity: 0; transition: opacity 0.22s;
  z-index: 60;
}
.j-popup-backdrop[hidden] { display: none; }
.j-popup-backdrop.visible { opacity: 1; }
.j-popup {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: var(--card);
  border-radius: 22px 22px 0 0;
  padding: 8px 20px 24px;
  max-height: 75vh;
  max-height: calc(75dvh / var(--app-zoom));
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.26s;
  z-index: 61;
  box-shadow: 0 -8px 30px rgba(0,0,0,0.10);
  max-width: 430px;
  margin: 0 auto;
}
.j-popup[hidden] { display: none; }
.j-popup.visible { transform: translateY(0); }
.j-popup-handle {
  width: 38px; height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 6px auto 14px;
}
.j-popup-cat {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  color: var(--accent-deep);
  background: var(--accent-soft);
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}
.j-popup-title { font-size: 18px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.j-popup-desc { font-size: 13.5px; color: var(--text-soft); line-height: 1.6; margin-bottom: 14px; }
.j-popup-meta {
  display: flex;
  gap: 18px;
  padding: 10px 14px;
  background: var(--bg-deep);
  border-radius: 10px;
  margin-bottom: 18px;
}
.j-popup-meta-item { flex: 1; text-align: center; }
.j-popup-meta-label { font-size: 10.5px; color: var(--text-muted); margin-bottom: 2px; }
.j-popup-meta-value { font-size: 12.5px; font-weight: 700; color: var(--text); }
.j-popup-status-row { margin-bottom: 16px; }
.j-popup-status-label { font-size: 11.5px; color: var(--text-muted); margin-bottom: 6px; }
.j-popup-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--bg-deep);
  color: var(--text-soft);
}
.j-popup-status-chip.done { background: var(--accent-soft); color: var(--accent-deep); }
.j-popup-actions { display: flex; gap: 8px; margin-top: 8px; }
.j-popup-actions .btn-primary {
  flex: 1;
  padding: 12px 16px;
  border-radius: 12px;
  border: none;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  background: var(--accent);
  color: white;
  transition: background 0.18s;
}
.j-popup-actions .btn-primary:hover { background: var(--accent-deep); }
.j-popup-actions .btn-secondary {
  flex: 0 0 auto;
  padding: 12px 18px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-soft);
  border-radius: 12px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.j-popup-actions .btn-secondary:hover { background: var(--bg-deep); }

/* ====== 입력 sheet 보강 v2 (2026-05-17 — 분석 §8 입력 데이터) ====== */
.field-hint {
  margin-top: 8px;
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.55;
  letter-spacing: -0.01em;
}

/* 분유 브랜드 baseline chip — 1회 입력부터 즉시 활성 */
.baseline-chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.baseline-chip {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 12px;
  font-family: inherit;
  font-size: 12px;
  color: var(--text-soft);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.baseline-chip:hover { border-color: var(--d-feed-icon); color: var(--text); }
.baseline-chip.selected {
  background: var(--d-feed-soft);
  border-color: var(--d-feed-icon);
  color: var(--d-feed-icon);
  font-weight: 700;
}
.baseline-chip .freq {
  font-size: 10.5px;
  color: var(--text-muted);
  margin-left: 2px;
  font-weight: 500;
}
.baseline-chip.selected .freq { color: var(--d-feed-icon); }

/* 수면 깸 list */
.wake-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 8px;
}
.wake-empty {
  font-size: 12px;
  color: var(--text-muted);
  padding: 8px 0;
  text-align: center;
  background: var(--bg-deep);
  border: 1px dashed var(--border-soft);
  border-radius: 8px;
}
.wake-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--d-sleep-soft);
  border: 1px solid var(--d-sleep-border);
  border-radius: 10px;
}
.wake-row.auto { background: var(--bg-deep); border-style: dashed; }
.wake-row-emoji { font-size: 13px; line-height: 1; flex-shrink: 0; }
.wake-row-time {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--d-sleep-icon);
  flex-shrink: 0;
}
.wake-row.auto .wake-row-time { color: var(--text-soft); font-weight: 600; }
.wake-row-time-input {
  font-size: 13px;
  font-weight: 700;
  color: var(--d-sleep-icon);
  background: transparent;
  border: 1px solid var(--d-sleep-border);
  border-radius: 6px;
  padding: 3px 6px;
  font-family: inherit;
}
.wake-row-time-input:focus {
  outline: none;
  border-color: var(--d-sleep-icon);
}
.wake-row-note {
  font-size: 11px;
  color: var(--text-muted);
  margin-left: auto;
  font-style: italic;
}
.wake-row-remove {
  background: none;
  border: none;
  padding: 2px 6px;
  font-size: 16px;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
}
.wake-row-remove:hover { color: var(--d-sleep-icon); }
.wake-add-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: transparent;
  border: 1px dashed var(--border);
  color: var(--text-soft);
  border-radius: 10px;
  padding: 9px 0;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}
.wake-add-btn:hover { border-color: var(--d-sleep-icon); color: var(--d-sleep-icon); }

/* 통잠 토글 — 부모가 직접 체크하는 축하 표식(수면 테마). 켜짐=긍정 강조, 꺼짐=차분. 안 한 날 부정 표현 없음. */
.sttn-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--d-sleep-soft);
  border: 1px solid var(--d-sleep-border);
  border-radius: 13px;
  padding: 11px 13px;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.sttn-emoji { font-size: 21px; line-height: 1; flex-shrink: 0; }
.sttn-text { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0; }
.sttn-title { font-size: 13.5px; font-weight: 700; color: var(--text); }
.sttn-sub { font-size: 11px; color: var(--text-soft); }
.sttn-mark {
  flex-shrink: 0;
  width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  border: 1.5px solid var(--d-sleep-border);
  background: #fff;
  color: transparent;
  font-size: 13px; font-weight: 800;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.sttn-toggle[aria-pressed="true"] {
  background: var(--d-sleep-bg);
  border-color: var(--d-sleep-icon);
  box-shadow: 0 1px 6px rgba(132, 120, 176, 0.18);
}
.sttn-toggle[aria-pressed="true"] .sttn-mark {
  background: var(--d-sleep-icon);
  border-color: var(--d-sleep-icon);
  color: #fff;
}
.sttn-toggle[aria-pressed="true"] .sttn-title { color: var(--d-sleep-icon); }

/* 타임라인 통잠 배지 — 완료된 밤 수면 row에 긍정 표식. */
.tl-sttn-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-top: 3px;
  align-self: flex-start;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--d-sleep-bg);
  color: var(--d-sleep-icon);
  font-size: 10.5px;
  font-weight: 700;
}

/* ====== 하루 분석 (analytics.html) — daily_module_spec_v1 §8 4영역 ====== */
.analytics-back-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}
.back-btn {
  background: none;
  border: none;
  padding: 4px 0;
  font-family: inherit;
  font-size: 13px;
  color: var(--text-soft);
  cursor: pointer;
  font-weight: 600;
}
.back-btn:hover { color: var(--text); }

.analytics-coverage {
  margin: 4px 0 14px;
  font-size: 12.5px;
  color: var(--text-muted);
}

.analytics-loading {
  text-align: center;
  padding: 36px 14px;
  color: var(--text-soft);
  font-size: 13px;
}
.analytics-loading .empty-state-emoji { display: block; margin-bottom: 8px; font-size: 28px; }
.btn-retry {
  margin-top: 8px;
  padding: 8px 16px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-weight: 700;
  font-size: 12.5px;
  cursor: pointer;
}
.btn-retry:hover { background: var(--accent-deep); }

/* 새 발견 띠 (변화점 카드 누적) — #7 task */
.discovery-band {
  background: linear-gradient(135deg, var(--warm-soft), var(--cream-soft));
  border: 1px solid var(--warm-border);
  border-radius: 14px;
  padding: 12px 14px;
  margin: 12px 0 18px;
}
.discovery-band-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}
.discovery-band-emoji { font-size: 16px; }
.discovery-band-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--cream-text);
  letter-spacing: -0.01em;
}
.discovery-band-body { display: flex; flex-direction: column; gap: 6px; }

/* 영역 카드 (4영역) */
.domain-card {
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-soft);
}
.domain-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--border);
}
.domain-emoji { font-size: 18px; }
.domain-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}
.domain-card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* 스탯 카드 (영역 안의 한 항목) */
.stat-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
}
.stat-card-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.stat-card-icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.stat-card-body {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.stat-card-text { flex: 1; min-width: 0; }
.stat-card-label {
  font-size: 12px;
  color: var(--text-soft);
  font-weight: 600;
}
.stat-card-value {
  font-size: 14px;
  color: var(--text);
  font-weight: 700;
  letter-spacing: -0.01em;
  flex-shrink: 1;      /* was 0 — 긴 값이 좌측 라벨·note를 1글자씩 세로로 짜부라뜨리던 문제 방지 */
  min-width: 0;
  max-width: 62%;      /* 값이 길어도 좌측 텍스트 폭 확보 */
  text-align: right;
}
.stat-card-note {
  margin-top: 2px;
  font-size: 11px;
  color: var(--text-muted);
}
.stat-card-hint {
  margin-top: 4px;
  padding-top: 6px;
  border-top: 1px dashed var(--border-soft);
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* 항목 설명 ⓘ 버튼 + 팝업 */
.stat-info-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px; height: 16px;
  margin-left: 3px;
  padding: 0;
  border: none;
  background: none;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1;
  vertical-align: -2px;
  cursor: pointer;
  opacity: 0.75;
  -webkit-tap-highlight-color: transparent;
}
.stat-info-btn:hover, .stat-info-btn:focus-visible { opacity: 1; color: var(--accent); outline: none; }
.chart-card-title .stat-info-btn { color: var(--text-muted); }

.info-pop-backdrop {
  position: fixed; inset: 0;
  background: rgba(45, 40, 35, 0.42);
  opacity: 0; transition: opacity 0.2s;
  z-index: 80;
}
.info-pop-backdrop[hidden] { display: none; }
.info-pop-backdrop.visible { opacity: 1; }
.info-pop {
  position: fixed;
  left: 50%; top: 50%;
  transform: translate(-50%, -46%);
  /* 큰 글자(zoom) 모드: vw·px가 zoom에 곱해져 뷰포트 넘어 좌우 잘림 → max-height와 동일하게 zoom 보정 */
  width: calc(min(86vw, 340px) / var(--app-zoom));
  max-height: 72vh;
  max-height: calc(72dvh / var(--app-zoom));
  overflow-y: auto;
  background: var(--card);
  border-radius: 16px;
  padding: 22px 20px 20px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 81;
}
.info-pop[hidden] { display: none; }
.info-pop.visible { opacity: 1; transform: translate(-50%, -50%); }
.info-pop-close {
  position: absolute; top: 8px; right: 10px;
  border: none; background: none;
  font-size: 15px; color: var(--text-muted);
  padding: 6px; line-height: 1; cursor: pointer;
}
.info-pop-title {
  font-size: 15px; font-weight: 700;
  color: var(--text); margin-bottom: 10px;
  padding-right: 22px;
}
.info-pop-body {
  font-size: 13px; line-height: 1.65;
  color: var(--text-soft);
  white-space: pre-line;
}

.preview-card {
  display: flex;
  gap: 10px;
  padding: 12px;
  background: var(--bg-deep);
  border: 1px dashed var(--border);
  border-radius: 12px;
  align-items: flex-start;
}
.preview-emoji { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.preview-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 3px;
}
.preview-msg {
  font-size: 11.5px;
  color: var(--text-soft);
  line-height: 1.55;
  letter-spacing: -0.01em;
}

.awaiting-card {
  padding: 10px 12px;
  background: var(--bg-deep);
  border: 1px dashed var(--border-soft);
  border-radius: 10px;
  font-size: 11.5px;
  color: var(--text-soft);
  letter-spacing: -0.01em;
}
.empty-card {
  padding: 14px;
  background: var(--bg-deep);
  border: 1px dashed var(--border-soft);
  border-radius: 12px;
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
}

.analytics-footer {
  margin: 24px 0 8px;
  padding: 12px 14px;
  background: var(--bg-deep);
  border-radius: 10px;
}
.analytics-footer p {
  margin: 0;
  font-size: 11.5px;
  color: var(--text-soft);
  text-align: center;
  letter-spacing: -0.01em;
  line-height: 1.55;
}

/* ====== 📊 홈 분석 박스 (5박스, spec §8-D) ====== */
.home-analytics {
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  padding: 12px 14px;
  margin: 14px 20px 12px;
  box-shadow: var(--shadow-soft);
}
.home-analytics .home-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 10px;
  gap: 8px;
  border-bottom: 1px dashed var(--border);
}
.home-analytics-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.home-analytics-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 0;
  font-size: 13px;
}
/* primary row(어젯밤 수면)는 일반 row와 동일 톤 — 노란 하이라이트 제거 (2026-05-17 후반 기획자 피드백) */
.home-analytics-emoji { font-size: 16px; flex: 0 0 20px; text-align: center; }
.home-analytics-label {
  font-weight: 700;
  color: var(--text);
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.home-analytics-value {
  color: var(--text-soft);
  font-weight: 600;
  margin-left: auto;
  padding-left: 8px;
  font-size: 12.5px;
  flex: 0 0 auto;
  white-space: nowrap;
}
.home-analytics-text {
  color: var(--text-soft);
  font-size: 12.5px;
  letter-spacing: -0.01em;
  line-height: 1.5;
}

/* ====== daily 상단 2-col (최근활동 좌 + 오늘상황 우, 메인 진입로) ====== */
.daily-top-grid {
  display: grid;
  /* minmax(0,1fr): 트랙 최소폭을 min-content가 아닌 0으로 — 좌측 발열 row의 긴 nowrap 문구가
     트랙을 밀어 우측 '최근 데이터' 박스를 짤리게 하던 것 방지(ellipsis가 정상 발동). */
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
  margin: 8px 0 10px;
}
/* 글자 크게(zoom): 브라우저 zoom은 뷰포트 CSS폭을 안 줄여 2-col 트랙이 좁아진 채라
   텍스트가 글자 단위로 깨짐 → --app-zoom 스타일 쿼리로 감지해 1-col로 쌓음(미디어쿼리 불가). */
@container style(--app-zoom: 1.2) or style(--app-zoom: 1.4) {
  .daily-top-grid { grid-template-columns: 1fr; }
}

/* ===== timeline 상단 journey 진입로 — 단순 list (미니 6각형 제거, 2026-05-18) ===== */
.timeline-journey-card {
  display: block;
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 10px 12px;
  margin: 10px 0 14px;
  text-decoration: none;
  color: inherit;
}

/* timeline 상단 2-col grid (journey + 단어) — daily-top-grid 패턴 mirror (2026-05-18) */
.timeline-top-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
  margin: 10px 0 14px;
}
.timeline-top-grid > .timeline-journey-card,
.timeline-top-grid > .words-card {
  margin: 0;
  display: flex;
  flex-direction: column;
}

/* 단어 카탈로그 sub-section (2026-05-18, words-data.js) — 9mo+ 자동 활성 */
.words-card {
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 10px 12px;
  margin: 0;
  min-width: 0; /* grid 내 overflow 방지 */
}
.words-card[hidden] { display: none !important; }
.words-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 8px;
}
.words-title { font-size: 12.5px; font-weight: 700; color: var(--text); white-space: nowrap; }

/* narrow column 대응 — 2-row stack: 텍스트 input full width / date+button */
.words-form {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "input input"
    "date  add";
  gap: 6px;
  margin-bottom: 8px;
  min-width: 0;
}
.words-form input[type="text"] {
  grid-area: input;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  padding: 7px 10px;
  font-size: 12.5px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: white;
  color: var(--text);
  font-family: inherit;
}
.words-form input[type="date"] {
  grid-area: date;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  padding: 6px 6px;
  font-size: 11px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: white;
  color: var(--text-soft);
  font-family: inherit;
}
.words-add-btn {
  grid-area: add;
  width: 32px;
  flex-shrink: 0;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.words-add-btn:hover { background: var(--accent-deep, var(--accent)); }
.words-error {
  font-size: 11px;
  color: var(--accent-deep, #5d8267);
  background: rgba(127,166,135,0.08);
  padding: 5px 8px;
  border-radius: 6px;
  margin-bottom: 6px;
  line-height: 1.4;
}
.words-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.words-empty {
  width: 100%;
  text-align: center;
  font-size: 11.5px;
  color: var(--text-soft);
  padding: 10px 0;
}
.words-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 4px 3px 10px;
  background: transparent;
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  font-family: 'Gowun Dodum', var(--font-body, system-ui), sans-serif;
  font-size: 13px;
  color: var(--text);
  letter-spacing: -0.005em;
  max-width: 100%;
  min-width: 0;
}
.words-chip-text {
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.words-chip-date {
  font-size: 10px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  font-family: var(--font-body, system-ui), sans-serif;
}
.words-chip-del {
  background: none;
  border: none;
  color: var(--text-muted);
  padding: 1px 5px;
  cursor: pointer;
  font-size: 10.5px;
  border-radius: 50%;
  line-height: 1;
  font-family: inherit;
}
.words-chip-del:hover { background: rgba(0,0,0,0.06); color: var(--text); }

/* 날짜 그룹 (시간순 정렬일 때만) */
.words-day-group {
  margin-bottom: 16px;
}
.words-day-group:last-child { margin-bottom: 4px; }
.words-day-header {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-bottom: 7px;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.words-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

/* /words 상세 페이지 (2026-05-18) */
.words-form-full { margin: 14px 0 10px; }

/* ===== 먹어본 식재료 페이지 (/food) — 2026-05-31 ===== */
.food-empty { margin-top: 18px; }
.food-cats, .food-allergen, .food-nutrients, .food-likes, .food-prefs {
  margin-top: 16px;
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  padding: 16px 14px;
}
.food-sec-head { font-size: 14.5px; font-weight: 700; color: var(--text); margin-bottom: 3px; }
.food-sec-sub { font-size: 11.5px; color: var(--text-muted); margin-bottom: 12px; line-height: 1.5; }
.food-sec-foot { font-size: 11px; color: var(--text-muted); margin-top: 12px; line-height: 1.5; }
.food-cat-block { margin-bottom: 14px; }
.food-cat-block:last-child { margin-bottom: 0; }
.food-cat-head {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 7px;
}
.food-cat-count { font-size: 13px; font-weight: 700; color: var(--d-feed-icon); font-variant-numeric: tabular-nums; }
.food-cat-total { color: var(--text-muted); font-weight: 400; }
.food-chip-row { display: flex; flex-wrap: wrap; gap: 5px; }
.food-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: 999px;
  font-family: 'Gowun Dodum', var(--font-body, system-ui), sans-serif;
  font-size: 12.5px; letter-spacing: -0.005em; border: 1px solid transparent;
}
.food-chip.on { background: var(--d-feed-soft); border-color: var(--d-feed-border); color: var(--d-feed-icon); font-weight: 600; }
.food-chip.off { background: transparent; border-color: var(--border-soft); color: var(--text-muted); opacity: 0.7; }
.food-chip-date {
  font-size: 9.5px; color: var(--d-feed-icon); opacity: 0.75;
  font-variant-numeric: tabular-nums; font-family: var(--font-body, system-ui), sans-serif;
}
.food-allergen-row {
  display: flex; align-items: baseline; gap: 8px;
  padding: 7px 0; border-bottom: 1px solid var(--border-soft);
}
.food-allergen-row:last-child { border-bottom: none; }
.food-allergen-name { font-size: 13px; font-weight: 700; color: var(--text); min-width: 46px; }
.food-allergen-via { flex: 1; font-size: 12px; color: var(--text-soft); }
.food-allergen-date { font-size: 11px; color: var(--text-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.food-allergen-pending-wrap { margin-top: 12px; }
.food-allergen-pending-label, .food-likes-label {
  font-size: 11.5px; color: var(--text-muted); font-weight: 600; margin-bottom: 7px;
}
.food-likes-block + .food-likes-block { margin-top: 14px; }
/* 우리 아이 입맛(선언) */
.food-pref-block { margin-top: 6px; }
.food-pref-block + .food-pref-block { margin-top: 14px; }
.food-pref-label { font-size: 11.5px; color: var(--text-muted); font-weight: 600; margin-bottom: 7px; }
.food-pref-empty { font-size: 11.5px; color: var(--text-muted); font-style: italic; }
.food-pref-input {
  margin-top: 8px; width: 100%; box-sizing: border-box;
  padding: 8px 11px; border: 1px solid var(--border-soft); border-radius: 10px;
  font-family: 'Gowun Dodum', var(--font-body, system-ui), sans-serif;
  font-size: 12.5px; color: var(--text); background: var(--bg);
}
.food-pref-input:focus { outline: none; border-color: var(--d-feed-icon); }
.food-chip.pref { padding: 4px 4px 4px 10px; gap: 2px; }
.food-chip-x {
  background: none; border: none; color: var(--text-muted);
  padding: 0 4px; cursor: pointer; font-size: 10.5px; line-height: 1; border-radius: 50%;
}
.food-chip-x:hover { color: var(--text); }
.food-chip-heart { color: var(--d-feed-icon); font-size: 10px; margin-left: 2px; }
.food-chip.disliked { opacity: 0.55; text-decoration: line-through; text-decoration-thickness: 1px; }
.food-bridge-add {
  background: none; border: none; color: var(--d-feed-icon);
  padding: 0 3px; cursor: pointer; font-size: 12px; line-height: 1;
}
.food-bridge-add:hover { color: var(--accent); }
.food-likes-common {
  font-size: 11.5px; color: var(--d-feed-icon); font-weight: 600;
  margin-bottom: 7px; letter-spacing: -0.01em;
}
/* analytics 식사 도메인 카드 하단 → /food 디테일 링크 */
.food-domain-link {
  display: block; margin-top: 10px; padding-top: 8px;
  border-top: 1px dashed var(--border);
  font-size: 12px; font-weight: 700; color: var(--d-feed-icon);
  text-align: right; text-decoration: none; letter-spacing: -0.01em;
}

/* 백업 내려받기 (2026-05-19) — account.html */
.backup-photo-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  flex-wrap: wrap;
}
.backup-photo-toggle input[type="checkbox"] {
  width: 18px; height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
}
.backup-photo-toggle .form-label-hint {
  flex-basis: 100%;
  padding-left: 26px;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* 어휘 발달 chain — 5개 임계 노드 진행도 (2026-05-19) */
.words-chain {
  margin: 14px 0 10px;
  padding: 14px 12px 12px;
  background: var(--sky-soft);
  border-radius: 12px;
}
.words-chain[hidden] { display: none !important; }
.words-chain-head {
  font-size: 12px;
  font-weight: 700;
  color: var(--sky);
  margin-bottom: 12px;
  letter-spacing: 0.2px;
}
.words-chain-track {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 4px;
  margin-bottom: 10px;
}
.words-chain-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
  min-width: 0;
}
.words-chain-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  background: white;
  border: 1.5px dashed var(--sky);
  color: var(--sky);
}
.words-chain-node.reached .words-chain-circle {
  border-style: solid;
  background: white;
  color: var(--sky);
}
.words-chain-node.done .words-chain-circle {
  border-style: solid;
  background: var(--sky);
  color: white;
  font-size: 14px;
}
.words-chain-count {
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
}
.words-chain-month {
  font-size: 10px;
  color: var(--text-soft);
}
.words-chain-node.future .words-chain-count,
.words-chain-node.future .words-chain-month { color: var(--text-soft); opacity: 0.7; }
.words-chain-conn {
  flex: 1 1 auto;
  height: 1.5px;
  background: var(--sky);
  opacity: 0.35;
  margin-top: 16px;
  min-width: 8px;
}
.words-chain-foot {
  font-size: 11px;
  color: var(--text-soft);
  text-align: center;
  margin-top: 2px;
}

/* 단어가 늘어난 흐름 곡선 (자기 baseline 누적) */
.words-curve {
  margin: 10px 0 14px;
  padding: 14px 12px 12px;
  background: var(--sky-soft);
  border-radius: 12px;
}
.words-curve[hidden] { display: none !important; }
.words-curve-head {
  font-size: 12px;
  font-weight: 700;
  color: var(--sky);
  margin-bottom: 10px;
  letter-spacing: 0.2px;
}
.words-curve-chart { margin-bottom: 8px; }
.words-curve-svg {
  width: 100%;
  height: 72px;
  background: rgba(255,255,255,0.5);
  border-radius: 8px;
  display: block;
}
.words-curve-cap {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-soft);
  text-align: center;
}
.words-curve-phrase {
  font-size: 10.5px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 4px;
}
.words-curve-phrase[hidden] { display: none !important; }

/* 문장 길이 흐름 (누적 최대=실선 / 누적 평균=점선) */
.words-phrase-block { margin-top: 10px; }
.words-phrase-block[hidden] { display: none !important; }
.words-phrase-chart { margin-bottom: 6px; }
.words-phrase-chart[hidden] { display: none !important; }
.words-phrase-svg {
  width: 100%;
  height: 50px;
  background: rgba(255,255,255,0.5);
  border-radius: 8px;
  display: block;
}
.words-phrase-leg { font-weight: 600; }
.words-phrase-leg.max { color: var(--sky); }
.words-phrase-leg.avg { color: var(--sky); opacity: 0.6; }

/* 단어 영역 분포 안내 (기본 어휘만 집계됨 명시) */
.words-cats-foot {
  font-size: 10.5px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 10px;
  line-height: 1.5;
}

/* 단어 영역 분포 (큐레이션 사전 기반 질적 분류) */
.words-cats {
  margin: 10px 0 14px;
  padding: 14px 12px 12px;
  background: rgba(127,166,135,0.05);
  border-radius: 12px;
}
.words-cats[hidden] { display: none !important; }
.words-cats-head {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 12px;
  letter-spacing: 0.2px;
}
.words-cats-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.words-cat-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.words-cat-emoji { font-size: 14px; flex: 0 0 auto; }
.words-cat-label {
  font-size: 11.5px;
  color: var(--text);
  flex: 0 0 60px;
}
.words-cat-bar-wrap {
  flex: 1 1 auto;
  height: 8px;
  background: rgba(0,0,0,0.04);
  border-radius: 4px;
  overflow: hidden;
}
.words-cat-bar {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: 4px;
  opacity: 0.7;
}
.words-cat-count {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-soft);
  flex: 0 0 auto;
  min-width: 14px;
  text-align: right;
}

/* 품사 분포 (운영자/연구 전용 — dev-flag posview) */
.words-pos {
  margin: 10px 0 14px;
  padding: 14px 12px 12px;
  background: rgba(120,130,150,0.06);
  border: 1px dashed rgba(120,130,150,0.3);
  border-radius: 12px;
}
.words-pos[hidden] { display: none !important; }
.words-pos-head {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-soft);
  margin-bottom: 12px;
  letter-spacing: 0.2px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.words-pos-tag {
  font-size: 9.5px;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(120,130,150,0.15);
  border-radius: 6px;
  padding: 1px 6px;
}
.words-pos-foot {
  font-size: 10px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 8px;
}

/* 마일스톤 등록 confirm 카드 (사용자 명시 confirm UI) */
.words-milestone-confirm {
  margin: 8px 0 14px;
  padding: 12px 14px;
  background: rgba(127,166,135,0.08);
  border: 1px solid rgba(127,166,135,0.25);
  border-radius: 10px;
}
.words-milestone-confirm[hidden] { display: none !important; }
.words-mc-body {
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--text);
  margin-bottom: 10px;
}
.words-mc-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}
.words-mc-no, .words-mc-yes {
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  border: none;
}
.words-mc-no {
  background: transparent;
  color: var(--text-soft);
}
.words-mc-no:hover { background: rgba(0,0,0,0.04); color: var(--text); }
.words-mc-yes {
  background: var(--accent);
  color: white;
}
.words-mc-yes:hover { background: var(--accent-deep, var(--accent)); }
.words-sort {
  display: flex;
  gap: 6px;
  margin: 12px 0;
}
.words-sort[hidden] { display: none !important; }
.words-sort-btn {
  background: white;
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  padding: 5px 12px;
  font-size: 11.5px;
  color: var(--text-soft);
  cursor: pointer;
  font-family: inherit;
}
.words-sort-btn.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}
.words-list-full {
  display: block;
  margin-top: 8px;
}
.words-coming {
  margin-top: 24px;
  padding: 14px 16px;
  background: rgba(127,166,135,0.05);
  border: 1px dashed rgba(127,166,135,0.3);
  border-radius: 12px;
}
.words-coming-head {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-soft);
  margin-bottom: 8px;
}
.words-coming-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.words-coming-list li {
  font-size: 11.5px;
  color: var(--text-soft);
  padding-left: 12px;
  position: relative;
}
.words-coming-list li::before {
  content: '·';
  position: absolute;
  left: 4px;
  color: var(--accent);
}
.timeline-journey-head {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.timeline-next-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.timeline-next-item {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 12.5px;
  color: var(--text);
  line-height: 1.35;
}
.timeline-next-item .next-icon { font-size: 14px; flex-shrink: 0; }
.timeline-next-item .next-text { flex: 1; min-width: 0; }
.timeline-next-item.clickable {
  cursor: pointer;
  padding: 6px 8px;
  margin: 0 -8px;
  border-radius: 8px;
  transition: background 0.12s;
  -webkit-tap-highlight-color: transparent;
}
.timeline-next-item.clickable:active { background: var(--accent-soft); }
.timeline-next-item.clickable:hover { background: var(--accent-soft); }
.timeline-next-list .loading {
  font-size: 12px;
  color: var(--text-muted);
  padding: 2px 0;
}
.timeline-journey-link {
  display: block;
  margin-top: auto;  /* flex column 박스 하단 push — 좌우 박스 link baseline 통일 */
  padding-top: 8px;
  border-top: 1px dashed var(--border);
  font-size: 11.5px;
  color: var(--accent-deep);
  font-weight: 700;
  text-align: right;
  text-decoration: none;
}
.timeline-journey-link:hover { text-decoration: underline; }
.daily-recent {
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 10px 11px 8px;
}
.daily-recent-head {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-soft);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.daily-recent-row {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 4px 0;
  cursor: pointer;
}
.daily-recent-row .rec-emoji {
  font-size: 13px;
  flex-shrink: 0;
  width: 18px;
  text-align: center;
}
.daily-recent-row .rec-body { flex: 1; min-width: 0; }
.daily-recent-row .rec-main {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.01em;
}
.daily-recent-row .rec-ago {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 1px;
  /* 좁은 2-col(특히 글자 크게)에서 '1시간 10분째'가 글자 단위로 깨지던 것 방지 — 한 줄 유지 */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.daily-recent-row.ongoing {
  background: var(--accent-soft);
  margin: 1px -4px;
  padding: 5px 4px;
  border-radius: 8px;
}
.daily-recent-row.ongoing .rec-main { color: var(--accent-deep); }
.daily-recent-row.ongoing .rec-ago { color: var(--accent-deep); font-weight: 600; }
.daily-recent-row .end-now-btn {
  font-family: inherit;
  background: white;
  border: 1px solid var(--accent);
  color: var(--accent-deep);
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 9.5px;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
}
.daily-recent-row .end-now-btn:hover { background: var(--accent-soft); }

.daily-overview {
  background: linear-gradient(168deg, #fbf7ec 0%, #f4ecd9 100%);
  border: 1px solid var(--warm-border);
  border-radius: 12px;
  padding: 10px 11px 8px;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--text);
}
.daily-overview-head {
  font-size: 11px;
  font-weight: 700;
  color: var(--cream-text);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.daily-overview-row {
  display: flex;
  align-items: baseline;
  gap: 5px;
  padding: 3px 0;
}
.daily-overview-row .ov-emoji {
  flex: 0 0 14px;
  text-align: center;
  font-size: 11px;
}
/* 표(table) 모델 — 항목명 열(좌)·값 열(우) 각각 폭 제한 + 넘치면 …
   긴 값이 항목명을 0폭으로 밀어내 사라지던 것 방지(좁은 2-col 박스). */
.daily-overview-row .label {
  flex: 1 1 auto;
  min-width: 0;
  color: var(--text-soft);
  font-size: 10.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.daily-overview-row .val {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 56%;   /* 값 열 상한 — 넘치면 ellipsis. 항목명 열 최소폭 보장 */
  margin-left: auto;
  padding-left: 6px;
  font-weight: 700;
  font-size: 11px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.daily-overview-link {
  font-size: 10.5px;
  color: var(--cream-text);
  font-weight: 700;
  text-align: right;
  margin-top: 6px;
  padding-top: 5px;
  border-top: 1px dashed rgba(180,140,80,0.22);
}
.daily-overview-empty {
  font-size: 10.5px;
  color: var(--text-muted);
  padding: 4px 0;
  font-style: italic;
}
/* '최근 데이터' 하이라이트 row — 새 분석·발열 같은 '새 소식'. 크림 박스 위에 도드라지는 카드 + 화살표로 탭 유도. */
.daily-overview-hl {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 6px;
  margin: 0 -2px 3px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 7px;
}
.daily-overview-hl .hl-emoji { font-size: 12px; flex-shrink: 0; }
.daily-overview-hl .hl-text {
  flex: 1;
  min-width: 0;
  font-size: 10.5px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.daily-overview-hl .hl-text b { color: var(--cream-text); font-weight: 800; }
.daily-overview-hl .hl-arrow { color: var(--cream-text); font-weight: 800; font-size: 11px; flex-shrink: 0; }

/* ====== 일별 mini chart (analytics 영역 카드 안) ====== */
.chart-card {
  background: var(--bg);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 12px;
  margin-top: 4px;
}
.chart-card-title {
  font-size: 11.5px;
  color: var(--text-soft);
  font-weight: 600;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.mini-chart { display: flex; align-items: flex-end; gap: 5px; }
.mini-bar-chart .mini-bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-width: 0;
}
.mini-bar-track {
  width: 100%;
  height: 56px;
  background: rgba(180,140,80,0.08);
  border-radius: 4px;
  position: relative;
  overflow: hidden;
}
.mini-bar-fill {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  border-radius: 4px 4px 0 0;
  min-height: 2px;
}
.mini-bar-fill.sleep { background: linear-gradient(180deg, var(--d-sleep-icon), #b3a8d6); }
.mini-bar-fill.diaper { background: linear-gradient(180deg, var(--d-diaper-icon), #c8a677); }
.mini-bar-fill.feed { background: linear-gradient(180deg, var(--d-feed-icon), #e8c08a); }
.mini-bar-fill.observe { background: linear-gradient(180deg, #5b7a93, #8aa6bd); }  /* 관찰 — 중립 블루그레이 (valence 없음) */
.mini-bar-val {
  font-size: 9.5px;
  color: var(--text-soft);
  font-weight: 600;
}
.mini-bar-day {
  font-size: 9.5px;
  color: var(--text-muted);
}
.mini-bar-col.today .mini-bar-day {
  color: var(--accent-deep);
  font-weight: 700;
}
.mini-bar-col.today .mini-bar-track { background: rgba(110,149,119,0.12); }

/* ====== 관찰(behavior) 분석 — 가치중립 ====== */
.bhv-intro {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 12px;
}
.bhv-intro b { color: var(--text-soft); font-weight: 700; }
.bhv-block { padding: 10px 0; }
.bhv-block + .bhv-block { border-top: 1px solid var(--border-soft); margin-top: 4px; }
.bhv-block-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.bhv-block-emoji { font-size: 15px; }
.bhv-block-label { font-size: 13px; font-weight: 700; color: var(--text); }
.bhv-block-count {
  margin-left: auto;
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
}
.bhv-sub-label {
  font-size: 10.5px;
  color: var(--text-muted);
  margin: 8px 0 5px;
}

.mini-line-chart { flex-direction: column; align-items: stretch; gap: 6px; }
.mini-line-svg {
  width: 100%;
  height: 60px;
  background: rgba(0,0,0,0.03);
  border-radius: 6px;
  display: block;
}
.mini-line-axis {
  display: flex;
  justify-content: space-between;
  font-size: 9.5px;
  color: var(--text-muted);
}
.mini-line-axis .mini-line-range {
  color: var(--d-feed-icon);
  font-weight: 600;
}
/* 일별 라인 차트 (수면·분유 총량) day 라벨 행 — SVG 점 x 위치와 정렬 */
.mini-line-cols { display: flex; }
.mini-line-cols .mini-line-day {
  flex: 1;
  min-width: 0;
  text-align: center;
  font-size: 9.5px;
  color: var(--text-muted);
}
.mini-line-cols .mini-line-day.today {
  color: var(--accent-deep);
  font-weight: 700;
}
.mini-line-cap {
  text-align: center;
  font-size: 9.5px;
  color: var(--text-soft);
  font-weight: 600;
}

/* ====== analytics 타일 — 한 지표 = 한 타일 (숫자 헤드라인 + 그 추세 inline, 탭=디테일). 2026-05-23 ====== */
/* 영역 한 줄 요약 (영역색 배경) */
.domain-summary {
  font-size: 12px;
  color: var(--text-soft);
  line-height: 1.5;
  border-radius: 10px;
  padding: 9px 11px;
  margin-bottom: 11px;
}
.domain-summary b { font-weight: 800; }
.domain-summary.feed   { background: var(--d-feed-soft);   border: 1px solid var(--d-feed-border); }
.domain-summary.feed b { color: var(--d-feed-icon); }
.domain-summary.sleep  { background: var(--d-sleep-soft);  border: 1px solid var(--d-sleep-border); }
.domain-summary.sleep b{ color: var(--d-sleep-icon); }
.domain-summary.diaper { background: var(--d-diaper-soft); border: 1px solid var(--d-diaper-border); }
.domain-summary.diaper b{ color: var(--d-diaper-icon); }

.atile {
  background: var(--bg);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.15s;
}
.atile.tap { cursor: pointer; }
.atile.tap:hover { border-color: var(--border); }
.atile-main { display: flex; align-items: center; gap: 11px; padding: 11px 12px; }
.atile-ico { font-size: 19px; flex-shrink: 0; }
.atile-text { flex: 0 1 auto; min-width: 0; }   /* 짧은 값은 자연폭, 긴 값(양육자별 등)은 줄바꿈 — 오버플로 방지 */
.atile-lbl { font-size: 12px; color: var(--text-soft); font-weight: 600; }
.atile-val { font-size: 16px; color: var(--text); font-weight: 800; letter-spacing: -0.02em; margin-top: 1px; }
.atile-note { font-size: 10.5px; color: var(--text-muted); margin-top: 2px; }
.atile-viz { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; align-items: flex-end; }
.atile-viz .viz-cap { font-size: 9.5px; color: var(--text-muted); }
.atile-chev { flex-shrink: 0; font-size: 11px; color: var(--text-muted); transition: transform 0.2s; }
.atile.open .atile-chev { transform: rotate(180deg); }

/* 글자 크게(zoom): 가로 공간 부족으로 ico+text+viz+chev가 한 줄에서 깨짐
   (제목 중간 줄바꿈·비율 라벨 세로 적층). zoom이면 viz를 다음 줄 전체폭으로 내림.
   브라우저 zoom은 미디어쿼리로 감지 불가 → --app-zoom 스타일 쿼리 사용. */
@container style(--app-zoom: 1.2) or style(--app-zoom: 1.4) {
  .atile-main { flex-wrap: wrap; }
  .atile-text { flex: 1 1 auto; }
  .atile-chev { order: 1; }
  .atile-viz  { order: 2; flex-basis: 100%; align-items: stretch; margin-top: 3px; }
  .atile-viz .atile-ratio { max-width: none; }
  .atile-viz .atile-ratio-lab,
  .atile-viz .atile-bars,
  .atile-viz .atile-chips { justify-content: flex-start; }
}

/* 펼침 디테일 */
.atile-detail { max-height: 0; overflow: hidden; transition: max-height 0.28s ease; border-top: 0 solid var(--border-soft); }
.atile.open .atile-detail { max-height: 340px; border-top-width: 1px; }
.atile-detail-inner { padding: 12px; }
.atile-insight {
  font-size: 11.5px; color: var(--text-soft); line-height: 1.55;
  margin-top: 10px; padding-top: 9px; border-top: 1px dashed var(--border-soft);
}
.atile-insight b { color: var(--accent-deep); }

/* 장기 추세 (탭 펼침=여러 달 궤적) */
.atile-trend-ranges { display: flex; gap: 6px; margin-bottom: 12px; }
.lt-range {
  flex: 1; padding: 6px 0; border: 1px solid var(--border-soft); border-radius: 8px;
  background: var(--surface, #fff); color: var(--text-muted);
  font-size: 11.5px; font-family: inherit; cursor: pointer; transition: all 0.15s;
}
.lt-range:hover { border-color: var(--border); }
.lt-range.on { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.atile-trend-body { min-height: 96px; }
.lt-loading { font-size: 11.5px; color: var(--text-muted); text-align: center; padding: 36px 0; }
/* 장기 추세 라인 차트 — 세로축 눈금(좌측 거터) + 가로 격자 + x라벨 */
.lt-metric-label { font-size: 11px; font-weight: 700; color: var(--text-soft); margin-bottom: 7px; }
.lt-line-chart { display: flex; flex-direction: column; }
/* 장기추세 두 선(밤잠/낮잠) 범례 */
.lt-legend { display: flex; gap: 12px; justify-content: flex-end; padding-left: 44px; margin-bottom: 5px; }
.lt-leg { display: inline-flex; align-items: center; gap: 4px; font-size: 10px; font-weight: 600; color: var(--text-soft); }
.lt-leg i { width: 10px; height: 3px; border-radius: 2px; display: inline-block; }
.lt-svg-wrap { position: relative; padding-left: 44px; }
.lt-line-svg { width: 100%; height: 96px; background: rgba(0,0,0,0.03); border-radius: 6px; display: block; }
.lt-ytick {
  position: absolute; left: 0; width: 40px; text-align: right;
  transform: translateY(-50%); font-size: 9px; line-height: 1;
  color: var(--text-muted); white-space: nowrap;
}
.lt-cols { display: flex; margin-top: 4px; padding-left: 44px; }
.lt-col {
  flex: 1; min-width: 0; text-align: center; font-size: 9.5px; color: var(--text-muted);
  white-space: nowrap; overflow: visible;
}
.lt-col-first { text-align: left; }
.lt-col-last { text-align: right; }

/* viz: 선 스파크 (collapsed) — buildDailyLine compact 모드 svg */
.atile-spark { width: 100%; max-width: 152px; }
.atile-spark .mini-line-svg { height: 34px; }
/* viz: 막대 미니추세 */
.atile-bars { display: flex; align-items: flex-end; gap: 3px; width: 100%; max-width: 152px; height: 34px; }
.atile-bars .b { flex: 1; border-radius: 2px 2px 0 0; min-height: 2px; }
.atile-bars .b.today { outline: 1.5px solid var(--accent); outline-offset: -1px; }
/* viz: 구성비 누적 막대 */
.atile-ratio { width: 100%; max-width: 160px; }
.atile-ratio-bar { display: flex; height: 15px; border-radius: 8px; overflow: hidden; }
.atile-ratio-bar i { display: block; }
.atile-ratio-lab { display: flex; gap: 9px; flex-wrap: wrap; justify-content: flex-end; font-size: 10px; color: var(--text-soft); margin-top: 4px; }
.atile-ratio-lab b { font-weight: 700; }
/* viz: 분포 칩 */
.atile-chips { display: flex; gap: 5px; flex-wrap: wrap; justify-content: flex-end; }
.atile-chips .c { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--border-soft); color: var(--text-soft); }

/* 발열 곡선 카드 (체온·약 영역 episode "열나는 중") — 진단·경보 톤 X, 진료 도움 중립 */
.fever-card { background: var(--d-temp-soft); border: 1px solid var(--d-temp-border); border-radius: 14px; padding: 13px; }
.fever-head { display: flex; align-items: center; gap: 9px; margin-bottom: 3px; }
.fever-ico { font-size: 21px; }
.fever-title { font-size: 14px; font-weight: 800; color: #9c5252; }
.fever-val { font-size: 12.5px; font-weight: 700; color: var(--text); margin-left: auto; text-align: right; }
.fever-sub { font-size: 11px; color: var(--text-soft); margin: 0 0 10px 30px; }
.fever-chart { background: var(--card); border: 1px solid var(--d-temp-border); border-radius: 10px; padding: 10px 10px 8px; }
.fever-svg { width: 100%; height: auto; display: block; overflow: visible; }
.fever-svg .fever-axis { font-size: 8px; fill: var(--text-muted); }
.fever-svg .fever-axis-date { font-size: 8.5px; font-weight: 700; fill: var(--text-soft); }
.fever-svg .fp { cursor: pointer; }
.fever-svg .ftt { opacity: 0; transition: opacity 0.15s; pointer-events: none; }
.fever-svg .fp:hover .ftt, .fever-svg .fp.tapped .ftt { opacity: 1; }
.fever-svg .ftt-bg { fill: var(--gc-tt-bg, #fff); stroke: rgba(0, 0, 0, 0.08); stroke-width: 1; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.12)); }
.fever-svg .ftt-tx { font-size: 8.5px; font-weight: 700; fill: var(--text); }
.fever-legend { display: flex; gap: 14px; justify-content: center; margin-top: 7px; font-size: 10.5px; color: var(--text-soft); }
.fever-legend span { display: inline-flex; align-items: center; gap: 4px; }
.fever-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.fever-dot.ibu { background: #7a9bc4; }
.fever-dot.ace { background: #c4a25b; }
.fever-note { font-size: 11.5px; color: var(--text-soft); line-height: 1.5; margin: 10px 4px 0; }
/* 해열제 투여 패턴 (발열 회차 간격·일별 막대) — 곡선 카드 아래, 동일 중립 톤 */
.fever-pattern { margin-top: 11px; }
.fever-pattern-head { font-size: 11.5px; font-weight: 800; color: #9c5252; margin: 0 2px 6px; }
.fever-pattern-stat { font-size: 12.5px; font-weight: 700; color: var(--text); margin: 0 2px 9px; }
.fever-bar-chart { padding-top: 8px; }
.fever-bar-cap { font-size: 10px; color: var(--text-soft); margin: 0 0 1px 2px; }
.fever-svg .fever-bar-val { font-size: 9px; font-weight: 800; fill: var(--d-temp-icon); }

/* ====== 변화점 카드 (새 발견 띠 안) ====== */
.discovery-card {
  background: rgba(255,255,255,0.7);
  border: 1px solid rgba(180,140,80,0.18);
  border-radius: 10px;
  padding: 10px 12px;
}
.discovery-card-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 5px;
}
.discovery-card-emoji { font-size: 14px; }
.discovery-card-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text);
  flex: 1;
}
.discovery-card-ago {
  font-size: 10.5px;
  color: var(--text-muted);
  font-weight: 600;
}
.discovery-card-detail {
  font-size: 11.5px;
  color: var(--text-soft);
  line-height: 1.5;
  letter-spacing: -0.01em;
}

/* ====== 분석 NEW 점 (홈 📊 박스·daily "자세히 →") ====== */
.home-analytics.has-new .home-card-header {
  position: relative;
}
.home-analytics.has-new .home-card-title::after {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  background: var(--peach);
  border-radius: 50%;
  margin-left: 5px;
  vertical-align: 3px;
}
.daily-overview.has-new .daily-overview-link::after {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--peach);
  border-radius: 50%;
  margin-left: 5px;
  vertical-align: 1px;
}

/* 홈 분석 박스 — 데이터 부족 empty 안내 */
.home-analytics-empty {
  font-size: 12.5px;
  color: var(--text-muted);
  text-align: center;
  padding: 8px 0;
  font-style: italic;
  letter-spacing: -0.01em;
}

/* ===== CONSENT 페이지 — 가입 동의 ===== */
.consent-shell {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
  padding: 32px 24px 40px;
  display: flex;
  flex-direction: column;
}
.consent-head { text-align: center; margin-bottom: 28px; }
.consent-brand {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-handy);
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 18px;
}
.consent-brand-mark { width: 26px; height: 26px; display: inline-block; vertical-align: middle; }
.consent-title {
  font-size: 19px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 8px;
  letter-spacing: -0.015em;
}
.consent-sub {
  font-size: 13px;
  color: var(--text-soft);
  margin: 0;
  line-height: 1.5;
}
.consent-body { flex: 1; }

/* 필수 묶음 — 각 항목 전문 보기 링크 (B안) */
.consent-item-docs {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding-left: 28px;
}

.consent-list {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
}
.consent-loading {
  text-align: center;
  color: var(--text-muted);
  font-size: 12.5px;
  padding: 24px 0;
}
.consent-item {
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.consent-item.required { border-color: var(--border); }
.consent-item-top {
  display: flex;
  align-items: center;
  gap: 10px;
}
.consent-item-hint {
  font-size: 11.5px;
  color: var(--accent-deep);
  background: var(--accent-soft);
  padding: 8px 10px;
  border-radius: 8px;
  line-height: 1.5;
  letter-spacing: -0.01em;
}
.consent-item-row {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  min-width: 0;
}
.consent-check {
  width: 18px; height: 18px;
  flex-shrink: 0;
  cursor: pointer;
  accent-color: var(--accent);
}
.consent-item-label {
  font-size: 13px;
  color: var(--text);
  line-height: 1.4;
  flex: 1;
  min-width: 0;
}
.consent-item-tag {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 999px;
  margin-right: 6px;
  vertical-align: 1px;
  background: var(--bg-deep);
  color: var(--text-muted);
}
.consent-item.required .consent-item-tag {
  background: var(--accent-soft);
  color: var(--accent-deep);
}
.consent-item-more {
  flex-shrink: 0;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 11.5px;
  color: var(--accent-deep);
  cursor: pointer;
  padding: 4px 6px;
}
.consent-item-more:hover { color: var(--text); }
.consent-error {
  background: #fdebeb;
  color: #c0392b;
  font-size: 12.5px;
  padding: 10px 12px;
  border-radius: 10px;
  margin-bottom: 12px;
}
.consent-cta-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
}
.consent-cta {
  width: 100%;
  padding: 14px 18px;
  font-size: 15px;
  font-weight: 700;
}
.consent-cancel {
  background: none;
  border: none;
  font-family: inherit;
  font-size: 12.5px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 8px 12px;
}
.consent-cancel:hover { color: var(--text); }
.consent-foot-note {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.6;
  margin-top: 22px;
}

/* 전문 보기 모달 */
.consent-modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(45, 40, 35, 0.4);
  z-index: 90;
}
.consent-modal-backdrop[hidden] { display: none; }
.consent-modal {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  max-width: 480px;
  margin: 0 auto;
  background: var(--bg);
  border-radius: 18px 18px 0 0;
  padding: 8px 0 20px;
  max-height: 78vh;
  max-height: calc(78dvh / var(--app-zoom));
  display: flex;
  flex-direction: column;
  z-index: 91;
  animation: modal-slide-up 0.22s ease-out;
}
.consent-modal[hidden] { display: none; }
.consent-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px 10px;
  border-bottom: 1px solid var(--border-soft);
}
.consent-modal-title {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text);
}
.consent-modal-close {
  background: none;
  border: none;
  font-size: 22px;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
}
.consent-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  font-size: 13px;
  line-height: 1.65;
  color: var(--text-soft);
  white-space: pre-line;
}
.consent-modal-cta { padding: 12px 20px 4px; }
.consent-modal-cta .btn { width: 100%; }

/* ========== 성장 곡선 페이지 (growth-chart.html) ========== */
:root {
  --gc-band: rgba(120, 120, 120, 0.15);
  --gc-band-line: rgba(90, 90, 90, 0.55);
  --gc-tt-bg: #ffffff;
  --gc-tt-shadow: rgba(0, 0, 0, 0.12);
}
.gc-section-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-soft);
  margin: 18px 2px 8px;
  letter-spacing: 0.02em;
}
.gc-section-title:first-of-type { margin-top: 4px; }

.gc-recent-card {
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  padding: 14px 14px 12px;
  cursor: pointer;
}
.gc-recent-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}
.gc-recent-metric {
  text-align: center;
  padding: 8px 4px;
  border-radius: 10px;
  background: var(--bg-deep);
}
.gc-recent-label { font-size: 10px; color: var(--text-muted); margin-bottom: 3px; }
.gc-recent-value { font-size: 18px; font-weight: 700; color: var(--text); }
.gc-recent-unit { font-size: 10px; color: var(--text-soft); margin-left: 1px; font-weight: 500; }
.gc-recent-meta {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 10px;
  font-size: 11px; color: var(--text-muted);
}
.gc-recent-date { font-weight: 500; }
.gc-recent-add {
  background: var(--accent);
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 18px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.gc-chart-card {
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  padding: 14px 12px 10px;
  margin-bottom: 12px;
}
.gc-chart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 4px 4px;
  gap: 8px;
}
.gc-chart-title-wrap { flex: 1; min-width: 0; }
.gc-chart-title { font-size: 13.5px; font-weight: 700; color: var(--text); }
.gc-chart-recent { font-size: 11px; color: var(--text-soft); margin-top: 1px; }
.gc-chart-recent-value { font-weight: 700; color: var(--text); }

.gc-mode-toggle {
  display: inline-flex;
  background: var(--bg-deep);
  border-radius: 14px;
  padding: 2px;
  flex-shrink: 0;
}
.gc-mode-chip {
  border: none;
  background: transparent;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}
.gc-mode-chip[aria-pressed="true"] {
  background: white;
  color: var(--accent-deep);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.gc-chart-svg-wrap { width: 100%; overflow: visible; margin-top: 8px; }
.gc-chart-svg { width: 100%; height: auto; display: block; overflow: visible; }

/* 브러시 슬라이더 — 차트 아래 미니 타임라인. 창을 끌어 보이는 구간 조절 (touch-action:none = 드래그 시 페이지 스크롤 방지) */
.gc-brush-wrap { width: 100%; margin-top: 4px; touch-action: none; -webkit-user-select: none; user-select: none; }
.gc-brush { width: 100%; height: auto; display: block; }
.gc-brush-track { fill: rgba(120, 130, 140, 0.12); }
.gc-brush-spark { stroke: rgba(108, 142, 176, 0.55); stroke-width: 1.2; }
.gc-brush-window { fill: rgba(108, 142, 176, 0.16); stroke: var(--accent-deep); stroke-width: 1.5; }
.gc-brush-handle { fill: var(--accent-deep); }

/* hover tooltip — overview는 hover만, zoom은 dp-default 자동 노출 */
.gc-chart-svg .dp { cursor: pointer; }
.gc-chart-svg .dp .tt { opacity: 0; transition: opacity 0.15s; pointer-events: none; }
.gc-chart-svg .dp:hover .tt { opacity: 1; }
.gc-chart-svg .dp:hover .dp-dot { r: 4.5; }
.gc-chart-svg .dp-default .tt { opacity: 1; }
/* 다른 점 hover 시 default tooltip 일시 숨김 (SVG z-order 상 dp-default가 마지막이라 가리던 문제) */
.gc-chart-svg .dp:hover ~ .dp-default .tt { opacity: 0; }
.gc-chart-svg .tt-bg {
  fill: var(--gc-tt-bg);
  stroke: rgba(0, 0, 0, 0.08);
  stroke-width: 1;
  filter: drop-shadow(0 2px 4px var(--gc-tt-shadow));
}
.gc-chart-svg .tt-line1 { font-size: 9.5px; font-weight: 700; fill: var(--text); }
.gc-chart-svg .tt-line2 { font-size: 8.5px; fill: var(--text-soft); }

.gc-legend {
  display: flex; gap: 14px; justify-content: center;
  font-size: 10.5px; color: var(--text-muted);
  margin: 8px 0;
  flex-wrap: wrap;
}
.gc-legend-item { display: flex; align-items: center; gap: 5px; }
.gc-legend-band { width: 14px; height: 8px; border-radius: 2px; background: var(--gc-band); }
.gc-legend-line { width: 14px; height: 2px; background: var(--gc-band-line); }
.gc-legend-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent); border: 2px solid white;
  box-shadow: 0 0 0 1px var(--accent);
}

.gc-ref-note {
  font-size: 10.5px;
  color: var(--text-muted);
  text-align: center;
  margin: 0 4px;
}

.gc-info-strip {
  margin: 16px 0 0;
  padding: 10px 12px;
  background: var(--warm-soft, #fbecc8);
  border: 1px solid var(--warm-border, #f0dba8);
  border-radius: 10px;
  font-size: 11.5px;
  color: var(--text-soft);
  line-height: 1.5;
}
.gc-info-strip strong { color: var(--text); font-weight: 700; }
.gc-info-hint { font-size: 10.5px; color: var(--text-muted); }

.gc-loading {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  padding: 40px 0;
}

/* SVG fill/stroke은 attribute 대신 CSS class로 — 브라우저 호환 */
.gc-chart-svg .gc-band-area { fill: var(--gc-band); }
.gc-chart-svg .gc-p50-line { stroke: var(--gc-band-line); }

/* 홈 수유 졸업 확인 박스 */
.home-weaning {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 14px 18px 4px;
  padding: 14px 14px;
  background: var(--warm-soft);
  border: 1px solid var(--warm-border);
  border-radius: 14px;
}
.home-weaning[hidden] { display: none !important; }  /* CSS display:flex가 user agent의 hidden override하던 버그 fix */
.home-weaning-icon { font-size: 24px; flex-shrink: 0; line-height: 1; margin-top: 2px; }
.home-weaning-body { flex: 1; min-width: 0; }
.home-weaning-text { font-size: 13.5px; font-weight: 700; color: var(--text); }
.home-weaning-sub { font-size: 11.5px; color: var(--text-soft); margin-top: 3px; line-height: 1.5; }
.home-weaning-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.home-weaning-btn {
  border: none;
  padding: 7px 12px;
  border-radius: 16px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.home-weaning-yes {
  background: var(--accent);
  color: white;
}
.home-weaning-yes:hover { background: var(--accent-deep); }
.home-weaning-no {
  background: white;
  color: var(--text-soft);
  border: 1px solid var(--border);
}
.home-weaning-no:hover { background: var(--bg-deep); }

/* 깸 예측 popup — 진행 중 sleep + baseline 60%+ */
.wake-popup-backdrop {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 90;
  opacity: 0;
  transition: opacity 0.18s;
}
.wake-popup-backdrop.visible { opacity: 1; }
.wake-popup-backdrop[hidden] { display: none !important; }
.wake-popup {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, calc(-50% + 12px));
  width: calc(100% - 48px); max-width: 340px;
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: 18px;
  padding: 22px 20px 16px;
  z-index: 91;
  text-align: center;
  opacity: 0;
  transition: opacity 0.18s, transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
}
.wake-popup.visible { opacity: 1; transform: translate(-50%, -50%); }
.wake-popup[hidden] { display: none !important; }
.wake-popup-emoji {
  font-size: 36px; line-height: 1; margin-bottom: 8px;
  animation: wake-popup-emoji-pop 0.4s ease-out;
}
@keyframes wake-popup-emoji-pop {
  0%   { transform: scale(0.6); opacity: 0; }
  60%  { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
.wake-popup-title { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.wake-popup-body { font-size: 12.5px; color: var(--text-soft); line-height: 1.55; margin-bottom: 16px; }
.wake-popup-btn {
  background: var(--accent); color: white; border: none;
  padding: 10px 0; border-radius: 12px;
  font-size: 13px; font-weight: 700;
  cursor: pointer; font-family: inherit; width: 100%;
}
.wake-popup-btn:hover { background: var(--accent-deep); }

/* ====================================
   Baseline 카드 (수면·수유 — 본인 14일 평균 100 기준)
   메모리 [[feedback_no_negative_signal_on_home]] 정합 — 절대 평가 X, 100 미만도 정상 표현
   ==================================== */
.bcard-stack { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.bcard-stack[hidden] { display: none !important; }

.bcard {
  display: block;
  background: var(--card-bg, #fff);
  border: 1px solid var(--card-border, rgba(0,0,0,0.06));
  border-radius: 14px;
  padding: 12px 14px;
  text-decoration: none;
  color: inherit;
}
a.bcard { cursor: pointer; }
a.bcard:hover { background: var(--card-bg-hover, rgba(0,0,0,0.015)); }

.bcard-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.bcard-icon { font-size: 16px; }
.bcard-title-wrap { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.bcard-title { font-size: 12.5px; font-weight: 700; color: var(--text); }
.bcard-period { font-size: 10.5px; color: var(--text-soft); margin-top: 1px; }

.bcard-body { display: flex; flex-direction: column; gap: 6px; }
.bcard-row {
  display: grid;
  grid-template-columns: 60px 1fr 32px 28px;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: var(--text-soft);
}
.bcard-row-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bcard-row-bar {
  display: block;
  height: 6px;
  background: rgba(0,0,0,0.06);
  border-radius: 4px;
  overflow: hidden;
}
.bcard-row-bar-fill {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: 4px;
  transition: width 0.3s ease;
}
/* tier 색조 — high/up은 액센트 진하게, normal 액센트, down/low는 soft 색조 (부정 시각 X) */
.bcard-row-bar-fill.tier-high { background: var(--accent-deep, #5d8267); }
.bcard-row-bar-fill.tier-up { background: var(--accent, #7fa687); }
.bcard-row-bar-fill.tier-normal { background: var(--accent, #7fa687); opacity: 0.85; }
.bcard-row-bar-fill.tier-down { background: var(--accent-soft, #c8d7cb); }
.bcard-row-bar-fill.tier-low { background: var(--accent-soft, #c8d7cb); opacity: 0.75; }

.bcard-row-score { text-align: right; font-variant-numeric: tabular-nums; color: var(--text); font-weight: 600; }
.bcard-row-delta { text-align: right; font-variant-numeric: tabular-nums; color: var(--text-soft); font-size: 10.5px; }

.bcard-row-total {
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid rgba(0,0,0,0.05);
  font-weight: 600;
}
.bcard-row-total .bcard-row-name,
.bcard-row-total .bcard-row-score { color: var(--text); font-weight: 700; }

.bcard-foot {
  margin-top: 10px;
  font-size: 11.5px;
  color: var(--text-soft);
  text-align: right;
}
.bcard-foot.tier-high,
.bcard-foot.tier-up { color: var(--accent-deep, #5d8267); font-weight: 600; }

/* 졸업 축하 모먼트 — "네" 누른 직후 박스 변환 */
.home-weaning-celebrate-box { justify-content: center; }
.home-weaning-celebrate { text-align: center; padding: 4px 0; width: 100%; }
.home-weaning-clap {
  font-size: 28px;
  letter-spacing: 4px;
  animation: weaning-clap-pop 0.5s ease-out;
}
.home-weaning-celebrate-text { font-size: 14px; font-weight: 700; color: var(--text); margin-top: 6px; }
.home-weaning-celebrate-sub { font-size: 12px; color: var(--text-soft); margin-top: 2px; }
.home-weaning-fade-out { transition: opacity 0.4s; opacity: 0; }
@keyframes weaning-clap-pop {
  0%   { transform: scale(0.5); opacity: 0; }
  60%  { transform: scale(1.25); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

/* my.html 진입 행 (성장 곡선 등 외부 페이지 진입로) */
.my-link-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 14px;
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: background 0.15s;
}
.my-link-row:hover { background: var(--bg-deep); }
.my-link-row-icon { font-size: 22px; flex-shrink: 0; }
.my-link-row-text { flex: 1; min-width: 0; }
.my-link-row-title { display: block; font-size: 14px; font-weight: 700; color: var(--text); }
.my-link-row-sub { display: block; font-size: 11.5px; color: var(--text-muted); margin-top: 2px; }
.my-link-row-chevron { font-size: 20px; color: var(--text-muted); flex-shrink: 0; }

/* ============================================================
   놀이 탭 (play) — 2026-05-19 본 구현
   진실원: mockup/mockup_play_v2.html
   ============================================================ */

/* 기질 라인 */
.play-temper-line {
  margin: 6px 18px 14px;
  padding: 9px 12px;
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-soft);
  line-height: 1.45;
}
.play-temper-line[hidden] { display: none !important; }
.play-temper-emoji { font-size: 16px; }
.play-temper-line strong { color: var(--text); font-weight: 600; }

/* 연습 중 마일스톤 안내 배너 — 성장(accent) 톤으로 기질 라인과 구분 */
.play-milestone-note {
  margin: 6px 18px 14px;
  padding: 9px 12px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-soft);
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-soft);
  line-height: 1.45;
}
.play-milestone-note[hidden] { display: none !important; }
.play-milestone-note-emoji { font-size: 16px; }
.play-milestone-note strong { color: var(--accent-deep, var(--text)); font-weight: 700; }

/* hero */
.play-hero {
  margin: 0 18px 6px;
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  transition: transform 0.15s ease;
}
.play-hero[hidden] { display: none !important; }
.play-hero:active { transform: scale(0.995); }

.play-hero-tag-row {
  padding: 11px 14px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.play-hero-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 6px;
}
.play-hero-tag .dot,
.play-list-meta .area-dot,
.play-sheet-tag .dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
}
.play-hero-rotate {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-soft);
  font-size: 11.5px;
  padding: 5px 10px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: background 0.15s;
}
.play-hero-rotate:hover { background: var(--bg-deep); }
.play-hero-rotate:active { transform: scale(0.96); }

.play-hero-img {
  width: 100%;
  height: 130px;
  background: var(--bg-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 56px;
  margin-top: 8px;
}
.play-hero-body { padding: 14px 16px 16px; }
.play-hero-title {
  font-size: 15.5px;
  font-weight: 700;
  margin-bottom: 6px;
  line-height: 1.4;
}
.play-hero-why {
  font-size: 12.5px;
  color: var(--text-soft);
  line-height: 1.65;
  margin-bottom: 12px;
}
.play-hero-tags {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.play-hero-counter {
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
  margin: 0 18px 16px;
}
.play-hero-counter[hidden] { display: none !important; }

/* tag */
.play-tag {
  font-size: 10.5px;
  padding: 3px 8px;
  border-radius: 8px;
  background: var(--bg-deep);
  color: var(--text-soft);
  white-space: nowrap;
}
.play-tag.temper {
  background: var(--c-cognitive-soft);
  color: var(--c-cognitive);
  font-weight: 600;
}
.play-tag.practice {
  background: var(--accent-soft);
  color: var(--accent-deep, var(--accent));
  font-weight: 700;
}
/* list item 제목 옆 연습 중 배지 */
.play-list-practice {
  display: inline-block;
  margin-left: 6px;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 7px;
  background: var(--accent-soft);
  color: var(--accent-deep, var(--accent));
  vertical-align: middle;
  white-space: nowrap;
}

/* 영역별 list */
.play-list-head {
  padding: 4px 18px 8px;
  font-size: 13px;
  color: var(--text-soft);
  font-weight: 600;
}
.play-list-head[hidden] { display: none !important; }
.play-list-sub {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 400;
  margin-left: 6px;
}
.play-list { padding: 0 18px; }
.play-list-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border-soft);
  background: transparent;
  border-left: none; border-right: none; border-top: none;
  cursor: pointer;
  text-align: left;
}
.play-list-item:last-child { border-bottom: none; }
.play-list-item:active { transform: scale(0.99); }
.play-list-icon {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.play-list-body { flex: 1; min-width: 0; }
.play-list-title {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 3px;
  line-height: 1.35;
  color: var(--text);
}
.play-list-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-muted);
}
.play-list-arrow {
  color: var(--text-muted);
  font-size: 17px;
}

/* 풀 전체 link */
.play-pool-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 18px 18px 4px;
  padding: 13px;
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  font-size: 12.5px;
  color: var(--text-soft);
  text-decoration: none;
  cursor: pointer;
}
.play-pool-link[hidden] { display: none !important; }
.play-pool-link strong { color: var(--text); }

/* 빈 상태 */
.play-empty {
  margin: 30px 18px;
  text-align: center;
  padding: 32px 18px;
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
}
.play-empty[hidden] { display: none !important; }
.play-empty-emoji { font-size: 32px; margin-bottom: 10px; }
.play-empty-title { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.play-empty-sub { font-size: 12px; color: var(--text-muted); }

/* 영역 색 — dot·bg·fg·gradient (journey 정의 재사용 + play 전용 변형) */
.dot-motor_gross { background: var(--c-motor-gross); }
.dot-motor_fine  { background: var(--c-motor-fine); }
.dot-cognitive   { background: var(--c-cognitive); }
.dot-language    { background: var(--c-language); }
.dot-social      { background: var(--c-social); }
.dot-selfcare    { background: var(--c-selfcare); }

.bg-motor_gross { background: var(--c-motor-gross-soft); }
.bg-motor_fine  { background: var(--c-motor-fine-soft); }
.bg-cognitive   { background: var(--c-cognitive-soft); }
.bg-language    { background: var(--c-language-soft); }
.bg-social      { background: var(--c-social-soft); }
.bg-selfcare    { background: var(--c-selfcare-soft); }

.fg-motor_gross { color: var(--c-motor-gross); }
.fg-motor_fine  { color: var(--c-motor-fine); }
.fg-cognitive   { color: var(--c-cognitive); }
.fg-language    { color: var(--c-language); }
.fg-social      { color: var(--c-social); }
.fg-selfcare    { color: var(--c-selfcare); }

.bg-grad-motor_gross { background: linear-gradient(135deg, var(--c-motor-gross-soft), #fff); }
.bg-grad-motor_fine  { background: linear-gradient(135deg, var(--c-motor-fine-soft), #fff); }
.bg-grad-cognitive   { background: linear-gradient(135deg, var(--c-cognitive-soft), var(--c-social-soft)); }
.bg-grad-language    { background: linear-gradient(135deg, var(--c-language-soft), #fff); }
.bg-grad-social      { background: linear-gradient(135deg, var(--c-social-soft), #fff); }
.bg-grad-selfcare    { background: linear-gradient(135deg, var(--c-selfcare-soft), #fff); }

/* ============================================================
   카드 상세 bottom sheet
   ============================================================ */
.play-sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(45, 40, 35, 0.4);
  z-index: 100;
}
.play-sheet-backdrop[hidden] { display: none !important; }

.play-sheet {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  max-width: 430px;
  margin: 0 auto;
  background: var(--card);
  border-radius: 18px 18px 0 0;
  max-height: 90vh;
  max-height: calc(90dvh / var(--app-zoom));
  overflow-y: auto;
  box-shadow: 0 -4px 18px rgba(0,0,0,0.12);
  z-index: 110;
  padding-bottom: 20px;
}
.play-sheet[hidden] { display: none !important; }

.play-sheet-grip {
  width: 36px; height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 10px auto 6px;
}
.play-sheet-head {
  padding: 10px 18px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  background: var(--card);
  z-index: 5;
  border-bottom: 1px solid var(--border-soft);
}
.play-sheet-close, .play-sheet-foot-btn {
  background: transparent;
  border: none;
  font-size: 20px;
  color: var(--text-muted);
  cursor: pointer;
}
.play-sheet-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 6px;
}
.play-sheet-img {
  width: calc(100% - 36px);
  margin: 0 18px;
  height: 150px;
  background: var(--bg-deep);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 70px;
}
.play-sheet-title {
  padding: 16px 18px 6px;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.4;
}
.play-sheet-tags {
  padding: 4px 18px 14px;
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.play-sheet-section {
  padding: 12px 18px;
  border-top: 1px solid var(--border-soft);
}
.play-sheet-section[hidden] { display: none !important; }
.play-sheet-section-head {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}
.play-sheet-section-body {
  font-size: 13px;
  color: var(--text);
  line-height: 1.65;
}
.play-sheet-materials {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0;
}
.play-sheet-materials li {
  font-size: 13px;
  color: var(--text);
  padding-left: 14px;
  position: relative;
  line-height: 1.5;
}
.play-sheet-materials li::before {
  content: '·';
  position: absolute;
  left: 4px;
  color: var(--text-muted);
}

.play-sheet-link-milestone {
  margin: 12px 18px 14px;
  padding: 12px 14px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
}
.play-sheet-link-milestone[hidden] { display: none !important; }
.play-sheet-link-milestone strong { font-weight: 700; }
.play-sheet-link-text { flex: 1; min-width: 0; }
.play-sheet-link-hint { color: var(--text-muted); font-size: 11px; }
.play-sheet-link-arrow {
  color: var(--text-muted);
  font-size: 18px;
}

body.no-scroll { overflow: hidden; }

/* journey focus 강조 — play 카드 상세에서 마일스톤 chip 진입 시 */
@keyframes node-focus-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(126, 167, 134, 0.6); }
  50%  { box-shadow: 0 0 0 12px rgba(126, 167, 134, 0); }
  100% { box-shadow: 0 0 0 0 rgba(126, 167, 134, 0); }
}
.node.node-focused .node-dot {
  animation: node-focus-pulse 1.2s ease-out 4;
}

/* ===== 2026-05-24 발달 진입로 재구성 (오늘의 기억 모달 새 어휘 · 홈/journey 인라인 기록 · 최근 말 · journey 앵커) ===== */

/* 오늘의 기억 모달 — '아이가 한 말' 새 어휘 자동 감지 박스 */
.modal-newwords { margin: -2px 0 10px; padding: 9px 11px; background: #eef4ee; border: 1px solid #d6e2d8; border-radius: 11px; }
.modal-newwords-row { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.modal-newwords-row input { width: 16px; height: 16px; flex: 0 0 auto; accent-color: #5b7a62; }
.modal-newwords-text { font-size: 13px; font-weight: 700; color: #4f6b56; }
.modal-newwords-hint { font-size: 11px; color: #74807a; margin-top: 5px; }

/* 홈 '곧 만나게 될 변화' next-step 인라인 기록 버튼 */
.next-steps-item { display: flex; align-items: center; gap: 8px; }
.next-arrive { margin-left: auto; flex: 0 0 auto; border: 1px solid #cdd9cf; background: #fff; color: #5b7a62; border-radius: 999px; padding: 5px 10px; font-size: 12px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.next-arrive:active { transform: scale(0.96); }

/* timeline 말 카드 — 최근 말 미리보기 칩 */
.words-recent { display: flex; flex-wrap: wrap; gap: 6px; }
.words-recent-chip { background: #eef4ee; color: #4f6b56; border-radius: 999px; padding: 5px 11px; font-size: 13px; font-weight: 600; max-width: 100%; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.words-recent-empty { font-size: 12.5px; color: #74807a; }

/* journey 지금 위치 앵커 (육각형 하단 이동 보완) */
.j-now-anchor { display: flex; align-items: center; gap: 8px; margin: 4px 0 12px; padding: 10px 13px; background: #fff; border: 1px solid #eceeea; border-radius: 13px; font-size: 13px; color: #2f3a31; }
.j-now-dot { width: 8px; height: 8px; border-radius: 50%; background: #7fa687; flex: 0 0 auto; }

/* journey 현재(다음) 단계 인라인 기록 버튼 — chain-track 내 */
.node-arrive { flex: 0 0 auto; align-self: center; border: 1.5px solid #7fa687; background: #fff; color: #5b7a62; border-radius: 999px; padding: 6px 10px; font-size: 12px; font-weight: 700; cursor: pointer; white-space: nowrap; margin-left: 2px; }
.node-arrive:active { transform: scale(0.96); }

/* journey 관찰 요약 — 영역별 다음 단계 + 관찰 포인트 + 기록 (스캔·기억용, 2026-05-24) */
.j-observe { background: #fff; border: 1px solid #eceeea; border-radius: 16px; padding: 14px; margin-bottom: 14px; }
.j-observe-head { font-weight: 800; font-size: 14.5px; margin-bottom: 4px; }
.j-observe-subhead { font-size: 11.5px; color: #74807a; line-height: 1.4; margin-bottom: 10px; }
.j-observe-list { display: flex; flex-direction: column; }
/* 묶음 = 같은 영역 이웃 노드. 점선 구분은 영역 묶음 사이에만, 묶음 안 행은 구분선 없이 붙임. */
.j-observe-group { border-bottom: 1px dashed #eceeea; padding: 3px 0; }
.j-observe-group:last-child { border-bottom: 0; }
.j-observe-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px dashed #eceeea; }
.j-observe-row:last-child { border-bottom: 0; }
.j-observe-group .j-observe-row { border-bottom: 0; padding: 7px 0; }
.j-observe-row.sub .j-observe-name { font-weight: 600; color: #44524a; }
.j-observe-area { flex: 0 0 66px; font-size: 11.5px; font-weight: 700; color: #5b7a62; line-height: 1.3; }
.j-observe-mid { flex: 1 1 auto; min-width: 0; }
.j-observe-name { font-size: 13.5px; font-weight: 700; color: #2f3a31; }
.j-observe-cue { font-size: 11.5px; color: #74807a; margin-top: 2px; line-height: 1.35; }
.j-observe-arrive { flex: 0 0 auto; align-self: center; border: 1px solid #7fa687; background: #fff; color: #5b7a62; border-radius: 999px; padding: 6px 10px; font-size: 12px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.j-observe-arrive:active { transform: scale(0.96); }
.j-observe-empty { font-size: 12.5px; color: #74807a; padding: 4px 0; }

/* ---- 홈 화면 추가(PWA 설치) 안내 시트 — install-prompt.js ---- */
#install-sheet {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: flex-end; justify-content: center;
  background: rgba(40, 46, 42, .42);
  animation: install-fade .2s ease;
}
@keyframes install-fade { from { opacity: 0; } to { opacity: 1; } }
.install-sheet-card {
  position: relative;
  width: 100%; max-width: 460px;
  background: #fff;
  border-radius: 20px 20px 0 0;
  padding: 26px 22px calc(22px + env(safe-area-inset-bottom));
  text-align: center;
  box-shadow: 0 -8px 30px rgba(40, 46, 42, .18);
  animation: install-rise .26s cubic-bezier(.22, 1, .36, 1);
}
@keyframes install-rise { from { transform: translateY(100%); } to { transform: translateY(0); } }
.install-sheet-x {
  position: absolute; top: 12px; right: 14px;
  width: 30px; height: 30px; border: none; background: none;
  font-size: 22px; line-height: 1; color: #b3bbb4; cursor: pointer;
}
.install-sheet-emoji { font-size: 34px; margin-bottom: 8px; }
.install-sheet-title { font-size: 17px; font-weight: 700; color: #2e352f; margin-bottom: 6px; }
.install-sheet-sub { font-size: 13.5px; line-height: 1.55; color: #6b756d; margin: 0 4px 18px; }
.install-sheet-cta {
  width: 100%; padding: 14px; border: none; border-radius: 14px;
  background: var(--accent); color: #fff; font-size: 15px; font-weight: 700;
  cursor: pointer; transition: background .15s;
}
.install-sheet-cta:hover { background: var(--accent-deep); }
.install-sheet-cta:active { transform: scale(0.99); }
.install-sheet-steps {
  background: var(--accent-soft); border-radius: 14px;
  padding: 14px 16px; margin-bottom: 4px;
}
.install-sheet-steps p { margin: 4px 0; font-size: 13.5px; line-height: 1.5; color: #41514a; }
.install-sheet-steps b { color: var(--accent-deep); }
.install-share-ico { display: inline-flex; vertical-align: -4px; color: #3a83f0; }
.install-sheet-later {
  display: block; width: 100%; margin-top: 12px; padding: 8px;
  border: none; background: none; color: #98a29a; font-size: 13px; cursor: pointer;
}

/* ===== 식사 '메뉴' 컴팩트 피커 (food-catalog-data.js) ===== */
.food-picker { display: flex; flex-direction: column; gap: 8px; }
.food-picked { display: flex; flex-wrap: wrap; gap: 6px; }
.food-picked[hidden] { display: none; }
.food-tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600;
  background: var(--accent-soft); border: 1px solid var(--accent); color: var(--accent-deep);
  border-radius: 999px; padding: 6px 8px 6px 12px;
}
.food-tag-x { color: var(--accent); font-size: 12px; opacity: .7; cursor: pointer; padding: 0 2px; }
.food-search {
  position: relative;
  display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--border); background: #fff; border-radius: 11px; padding: 9px 12px;
}
.food-search-ic { color: #b8ac99; font-size: 14px; flex: 0 0 auto; }
.food-search input { flex: 1; border: none; outline: none; font-size: 14px; font-family: inherit; background: transparent; color: var(--text, #2d2823); min-width: 0; }
/* 자동완성 — in-flow 고정 max-height(검색 중엔 '자주 먹인 것' 자리 대체 → 시프트·클리핑 없음) */
.food-ac {
  max-height: 200px; overflow-y: auto;
  border: 1px solid var(--border); border-radius: 11px; background: #fff;
}
.food-ac[hidden] { display: none; }
.food-ac-row { display: flex; align-items: center; gap: 7px; padding: 10px 13px; font-size: 14px; color: #2d2823; border-bottom: 1px solid #f4ecdb; cursor: pointer; }
.food-ac-row:last-child { border-bottom: none; }
.food-ac-row:active { background: #f7f3ea; }
.food-ac-cat { margin-left: auto; font-size: 10.5px; color: #b8ac99; }
.food-ac-warn { color: #c47a4e; font-size: 11px; }
.food-ac-add { color: #c47a4e; font-weight: 700; }
/* 카테고리에서 찾기 — 드롭다운 맨 아래 한 줄(차분한 톤, 결과와 구분). 전용 row(food-findmore) 폐기 */
.food-ac-catalog { color: var(--text-soft); font-weight: 600; background: #faf7f0; }
.food-ac-catalog .food-ac-cat { color: var(--text-muted); font-weight: 700; }
.food-frequent-label { font-size: 11px; font-weight: 700; color: #b8ac99; margin-top: 2px; }
.food-frequent-label[hidden] { display: none; }

/* 카테고리 전체 시트 — 식사 sheet 위에 겹침 */
.food-catalog-sheet { z-index: 62; }
.food-catalog-done {
  margin-left: auto; border: none; background: var(--accent); color: #fff;
  border-radius: 999px; padding: 7px 16px; font-size: 13px; font-weight: 700; cursor: pointer;
}
.food-cat-row { margin-bottom: 14px; }
.food-cat-name { font-size: 12px; font-weight: 800; color: var(--accent-deep); margin-bottom: 8px; }
.food-chip-warn { color: #c47a4e; font-size: 10px; margin-left: 3px; vertical-align: top; }
.food-catalog-note { font-size: 11px; color: #b8ac99; margin-top: 8px; line-height: 1.5; }
.food-catalog-empty { font-size: 13px; color: #b8ac99; padding: 20px 4px; text-align: center; }


/* ============ 직감 테스트 (instinct.html) — 재미용 N=1 패턴 맞히기 ============ */
/* analytics 수면 진입 카드 */
.atile.instinct-entry { display: block; text-decoration: none; color: inherit; background: var(--accent-soft); border-color: var(--accent-soft); }
.atile.instinct-entry .atile-main { gap: 11px; }
.atile.instinct-entry .atile-lbl { color: var(--accent-deep); font-weight: 800; font-size: 13px; }
.atile.instinct-entry .atile-note { color: var(--accent-deep); opacity: 0.8; }
.atile.instinct-entry .atile-chev { color: var(--accent-deep); font-size: 15px; }

/* 상단 안내 */
.instinct-intro { background: var(--card); border: 1px solid var(--border-soft); border-radius: 14px; padding: 14px 15px; margin-bottom: 16px; }
.instinct-intro p { font-size: 13px; color: var(--text-soft); line-height: 1.6; }
.instinct-intro-note { margin-top: 8px; font-size: 11.5px; color: var(--text-muted); background: var(--bg-deep); border-radius: 9px; padding: 8px 10px; }
.instinct-loading { text-align: center; color: var(--text-muted); padding: 40px 0; font-size: 13px; }

/* 빌더 카드 */
.instinct-builder { margin-bottom: 24px; }
.ib-card { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 16px 15px; box-shadow: var(--shadow-soft); }
.ib-q { font-size: 16px; font-weight: 800; color: var(--text); letter-spacing: -0.02em; line-height: 1.45; margin-bottom: 14px; min-height: 24px; }
.ib-rows { display: flex; flex-direction: column; gap: 9px; }
.ib-field { display: flex; align-items: center; gap: 10px; }
.ib-field-lbl { flex-shrink: 0; width: 76px; font-size: 11.5px; font-weight: 700; color: var(--text-muted); }
.ib-select { flex: 1; min-width: 0; font-family: var(--font-handy); font-size: 13.5px; font-weight: 600; color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 9px 11px; -webkit-appearance: none; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23b8ac99' stroke-width='1.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 11px center; }
.ib-select:focus { outline: none; border-color: var(--accent); }
.ib-run { width: 100%; margin-top: 15px; font-family: var(--font-handy); font-size: 14px; font-weight: 800; color: #fff; background: var(--accent); border: none; border-radius: 11px; padding: 12px; cursor: pointer; transition: background 0.15s; }
.ib-run:hover { background: var(--accent-deep); }

/* 추천 칩 */
.instinct-presets { margin-top: 16px; }
.instinct-presets-lbl { font-size: 11.5px; font-weight: 700; color: var(--text-muted); margin-bottom: 8px; }
.preset-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.preset-chip { font-family: var(--font-handy); font-size: 12px; font-weight: 600; color: var(--text-soft); background: var(--card); border: 1px solid var(--border); border-radius: 999px; padding: 7px 12px; cursor: pointer; transition: all 0.15s; }
.preset-chip:hover { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-deep); }

/* 결과 */
.result-box { margin-top: 18px; background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 16px 15px; box-shadow: var(--shadow-soft); }
.rs-pending { text-align: center; padding: 14px 4px; }
.rs-pending-emoji { font-size: 30px; display: block; margin-bottom: 10px; }
.rs-pending p { font-size: 13px; color: var(--text-soft); line-height: 1.6; }
.rs-pending-sub { margin-top: 8px; font-size: 11.5px; color: var(--text-muted); }
.rs-verdict { display: flex; align-items: center; gap: 8px; justify-content: center; padding: 6px 0 12px; }
.rs-verdict-emoji { font-size: 26px; }
.rs-verdict-label { font-size: 17px; font-weight: 800; letter-spacing: -0.02em; }
.rs-verdict.v-match .rs-verdict-label { color: var(--accent-deep); }
.rs-verdict.v-none .rs-verdict-label { color: var(--text-soft); }
.rs-verdict.v-reverse .rs-verdict-label { color: var(--peach); }
.rs-summary { text-align: center; font-size: 12.5px; color: var(--text-soft); line-height: 1.55; margin-bottom: 14px; }
.rs-groups { display: flex; gap: 10px; }
.rs-group { flex: 1; background: var(--bg-deep); border-radius: 12px; padding: 12px 10px; text-align: center; }
.rs-group-cap { font-size: 10.5px; font-weight: 700; color: var(--text-muted); margin-bottom: 5px; line-height: 1.4; }
.rs-group-cap span { display: block; font-weight: 600; opacity: 0.8; margin-top: 1px; }
.rs-group-val { font-size: 18px; font-weight: 800; color: var(--text); letter-spacing: -0.02em; }
.rs-group-sub { font-size: 10px; color: var(--text-muted); margin-top: 4px; }
.rs-caveat { margin-top: 14px; font-size: 11px; color: var(--text-soft); line-height: 1.6; background: var(--warm-soft); border-radius: 10px; padding: 10px 12px; }
.rs-caveat b { color: var(--cream-text); }

/* 저장 버튼 + footer */
.instinct-save { width: 100%; margin-top: 12px; font-family: var(--font-handy); font-size: 13.5px; font-weight: 800; color: var(--accent-deep); background: var(--accent-soft); border: 1px solid var(--accent-soft); border-radius: 11px; padding: 12px; cursor: pointer; transition: all 0.15s; }
.instinct-save:hover { background: var(--accent); color: #fff; }
.instinct-save:disabled { opacity: 0.7; cursor: default; }
.instinct-foot { margin-top: 16px; font-size: 11px; color: var(--text-muted); line-height: 1.6; text-align: center; }

/* my 페이지 — 직감 노트 모음 */
.my-section-sub { font-size: 11.5px; color: var(--text-muted); line-height: 1.55; margin: -4px 0 12px; }
.instinct-note-list { display: flex; flex-direction: column; gap: 8px; }
.instinct-note { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--border-soft); border-radius: 12px; padding: 11px 12px; }
.in-verdict { font-size: 18px; flex-shrink: 0; }
.in-text { flex: 1; min-width: 0; font-size: 12.5px; color: var(--text-soft); line-height: 1.45; }
.in-text b { color: var(--text); font-weight: 700; }
.in-n { display: block; font-size: 10px; color: var(--text-muted); margin-top: 2px; }
.in-result { flex-shrink: 0; font-size: 11px; font-weight: 700; color: var(--accent-deep); }
.instinct-note-more { display: inline-block; margin-top: 12px; font-size: 12px; font-weight: 700; color: var(--accent-deep); text-decoration: none; }
.instinct-note-more:hover { text-decoration: underline; }

/* ============ 모유 수유 시간 스톱워치 (수유 시트) ============ */
.feed-timer { display: flex; align-items: center; gap: 10px; }
.feed-timer-btn {
  flex: 1; font-family: var(--font-handy); font-size: 14px; font-weight: 700;
  color: #fff; background: var(--d-feed-icon, #d4a574); border: none; border-radius: 11px;
  padding: 12px; cursor: pointer; transition: background 0.15s;
}
.feed-timer-btn[data-state="running"] { background: #c47a4e; }
.feed-timer-btn[data-state="done"] { background: var(--accent); }
.feed-timer-display { font-size: 18px; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; min-width: 52px; text-align: center; }
.feed-timer-reset { flex: none; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--border); background: var(--card); color: var(--text-muted); font-size: 14px; cursor: pointer; }
