/* Apple Baby — 금사과 디자인 시스템 */

:root {
  /* 금사과 골드 */
  --gold-50:  #FFF9E8;
  --gold-100: #FFF0C4;
  --gold-200: #FFE18C;
  --gold-300: #FFD05A;
  --gold-400: #F5B72C;
  --gold-500: #E09A0C;
  --gold-600: #B87708;
  --gold-700: #8A5806;

  --leaf-400: #6FB65A;
  --leaf-600: #3E8E41;

  /* 시맨틱 */
  --good:       #2E9E6B;
  --good-bg:    #E8F7EF;
  --good-line:  #A9E0C4;
  --warn:       #D98416;
  --warn-bg:    #FFF3DF;
  --warn-line:  #F5CE93;
  --bad:        #D64545;
  --bad-bg:     #FDECEC;
  --bad-line:   #F3B7B7;

  /* 표면 */
  --bg:        #FDFAF3;
  --surface:   #FFFFFF;
  --surface-2: #FBF6EA;
  --line:      #EDE3CE;
  --line-soft: #F5EEE0;

  --text:      #2E2519;
  --text-2:    #6B5E4B;
  --text-3:    #9C8E79;

  --radius:    18px;
  --radius-sm: 12px;
  --radius-lg: 26px;
  --shadow:    0 1px 2px rgba(94,68,18,.06), 0 8px 24px rgba(94,68,18,.07);
  --shadow-lg: 0 2px 4px rgba(94,68,18,.08), 0 18px 48px rgba(94,68,18,.13);
  --ring:      0 0 0 3px rgba(245,183,44,.30);

  --font: "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo",
          "Noto Sans KR", "Malgun Gothic", system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:        #17140F;
    --surface:   #201B14;
    --surface-2: #27211896;
    --line:      #37301F;
    --line-soft: #2B2519;
    --text:      #F3EBDC;
    --text-2:    #BCAF98;
    --text-3:    #8A7E6B;
    --good-bg:   #14372A; --good-line: #245C44; --good: #56C795;
    --warn-bg:   #3A2B12; --warn-line: #6B4E1B; --warn: #F0B45C;
    --bad-bg:    #3B1D1D; --bad-line: #6B2E2E; --bad: #F08585;
    --gold-50:   #2A2216;
    --gold-100:  #35291705;
    --shadow:    0 1px 2px rgba(0,0,0,.35), 0 8px 24px rgba(0,0,0,.30);
    --shadow-lg: 0 2px 4px rgba(0,0,0,.4), 0 18px 48px rgba(0,0,0,.45);
  }
}
:root[data-theme="dark"] {
  --bg: #17140F; --surface: #201B14; --surface-2: #272118; --line: #37301F;
  --line-soft: #2B2519; --text: #F3EBDC; --text-2: #BCAF98; --text-3: #8A7E6B;
  --good-bg: #14372A; --good-line: #245C44; --good: #56C795;
  --warn-bg: #3A2B12; --warn-line: #6B4E1B; --warn: #F0B45C;
  --bad-bg: #3B1D1D; --bad-line: #6B2E2E; --bad: #F08585;
  --gold-50: #2A2216;
  --shadow: 0 1px 2px rgba(0,0,0,.35), 0 8px 24px rgba(0,0,0,.30);
  --shadow-lg: 0 2px 4px rgba(0,0,0,.4), 0 18px 48px rgba(0,0,0,.45);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  line-height: 1.62;
}
/* 은은한 금빛 배경 그라디언트 */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(880px 420px at 8% -10%, rgba(255,209,90,.16), transparent 62%),
    radial-gradient(700px 380px at 96% 4%, rgba(111,182,90,.10), transparent 60%);
}
main, header, footer { position: relative; z-index: 1; }

a { color: inherit; text-decoration: none; }
h1, h2, h3 { line-height: 1.3; letter-spacing: -.02em; margin: 0; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* ---------- 헤더 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.header-inner {
  display: flex; align-items: center; gap: 18px;
  height: 68px; max-width: 1080px; margin: 0 auto; padding: 0 20px;
}
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand img { width: 34px; height: 36px; display: block; }
.brand-name { font-size: 19px; font-weight: 800; letter-spacing: -.03em; }
.brand-name em {
  font-style: normal;
  background: linear-gradient(135deg, var(--gold-400), var(--gold-600));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.nav { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.nav a {
  padding: 8px 13px; border-radius: 999px; font-size: 14.5px; font-weight: 600;
  color: var(--text-2); transition: .16s;
}
.nav a:hover { background: var(--surface-2); color: var(--text); }
.nav a.on { background: var(--gold-100); color: var(--gold-700); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .nav a.on { background: #3A2D14; color: var(--gold-300); }
}
.theme-btn {
  border: 1px solid var(--line); background: var(--surface); color: var(--text-2);
  width: 36px; height: 36px; border-radius: 50%; cursor: pointer; font-size: 15px;
  display: grid; place-items: center; transition: .16s;
}
.theme-btn:hover { border-color: var(--gold-300); color: var(--gold-600); }

/* ---------- 검색 ---------- */
.searchbox { position: relative; flex: 1; max-width: 420px; }
.searchbox input {
  width: 100%; height: 42px; padding: 0 16px 0 42px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--text);
  font-size: 15px; font-family: inherit; transition: .16s;
}
.searchbox input:focus { outline: none; border-color: var(--gold-300); box-shadow: var(--ring); }
.searchbox .icon {
  position: absolute; left: 15px; top: 50%; transform: translateY(-50%);
  color: var(--text-3); font-size: 15px; pointer-events: none;
}
.suggest {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-lg);
  overflow: hidden; display: none; max-height: 420px; overflow-y: auto;
}
.suggest.on { display: block; }
.suggest a {
  display: flex; align-items: center; gap: 10px; padding: 11px 14px;
  border-bottom: 1px solid var(--line-soft); font-size: 14.5px;
}
.suggest a:last-child { border-bottom: 0; }
.suggest a:hover, .suggest a.active { background: var(--gold-50); }
.suggest .s-name { font-weight: 650; flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 홈 대형 검색 */
.hero-search { position: relative; margin: 26px auto 0; max-width: 620px; }
.hero-search input {
  width: 100%; height: 60px; padding: 0 22px 0 54px; font-size: 17px;
  border: 1.5px solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--text); font-family: inherit;
  box-shadow: var(--shadow); transition: .18s;
}
.hero-search input:focus { outline: none; border-color: var(--gold-400); box-shadow: var(--shadow-lg), var(--ring); }
.hero-search .icon { position: absolute; left: 22px; top: 50%; transform: translateY(-50%);
  font-size: 19px; color: var(--text-3); }

/* ---------- 히어로 ---------- */
.hero { text-align: center; padding: 54px 0 8px; }
.hero-logo { width: 78px; height: 84px; margin-bottom: 14px;
  filter: drop-shadow(0 8px 20px rgba(224,154,12,.28)); }
.hero h1 { font-size: 38px; font-weight: 850; letter-spacing: -.035em; }
.hero h1 em {
  font-style: normal;
  background: linear-gradient(135deg, var(--gold-300), var(--gold-600));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p { color: var(--text-2); font-size: 16px; margin: 10px 0 0; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; justify-content: center; margin-top: 18px; }
.chip {
  padding: 6px 13px; border-radius: 999px; font-size: 13.5px; font-weight: 600;
  background: var(--surface); border: 1px solid var(--line); color: var(--text-2);
  transition: .16s;
}
.chip:hover { border-color: var(--gold-300); color: var(--gold-600); background: var(--gold-50); }

/* ---------- 섹션 ---------- */
section { margin: 46px 0; }
.sec-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 16px; }
.sec-head h2 { font-size: 21px; font-weight: 800; }
.sec-head .more { margin-left: auto; font-size: 14px; color: var(--text-3); font-weight: 600; }
.sec-head .more:hover { color: var(--gold-600); }
.sec-sub { color: var(--text-3); font-size: 14px; }

/* ---------- 카테고리 카드 ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(192px, 100%), 1fr)); gap: 14px; }
.cat-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px 19px; display: block;
  transition: .2s cubic-bezier(.2,.7,.3,1); position: relative; overflow: hidden;
}
.cat-card::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(135deg, rgba(255,209,90,.14), transparent 55%);
  opacity: 0; transition: .2s;
}
.cat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--gold-200); }
.cat-card:hover::after { opacity: 1; }
.cat-icon { font-size: 30px; line-height: 1; }
.cat-card h3 { font-size: 17.5px; font-weight: 750; margin: 12px 0 5px; }
.cat-card p { color: var(--text-2); font-size: 13px; margin: 0 0 14px; min-height: 56px; line-height: 1.5; }

/* 안전/주의/금지 비율 바 — 좁은 카드에서도 한 줄에 담긴다 */
.ratio {
  display: flex; height: 7px; border-radius: 999px; overflow: hidden;
  background: var(--line-soft); position: relative; z-index: 1;
}
.ratio i { display: block; height: 100%; }
.ratio i.good { background: var(--good); }
.ratio i.warn { background: var(--warn); }
.ratio i.bad  { background: var(--bad); }
.ratio-legend {
  display: flex; gap: 10px; margin-top: 9px; font-size: 12px; font-weight: 650;
  position: relative; z-index: 1; flex-wrap: wrap;
}
.ratio-legend span { display: inline-flex; align-items: center; gap: 4px; color: var(--text-2); }
.ratio-legend b { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.ratio-legend b.good { background: var(--good); }
.ratio-legend b.warn { background: var(--warn); }
.ratio-legend b.bad  { background: var(--bad); }

/* ---------- 레벨 배지 ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3.5px 10px; border-radius: 999px;
  font-size: 12.5px; font-weight: 700; white-space: nowrap;
  border: 1px solid transparent;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.good { background: var(--good-bg); color: var(--good); border-color: var(--good-line); }
.badge.warn { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-line); }
.badge.bad  { background: var(--bad-bg);  color: var(--bad);  border-color: var(--bad-line); }
.badge.plain { background: var(--surface-2); color: var(--text-2); border-color: var(--line); }
.badge.plain::before { display: none; }
.badge.lg { font-size: 14px; padding: 6px 14px; }

/* ---------- 아이템 카드 ---------- */
.item-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 13px; }
.item-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 19px;
  display: flex; flex-direction: column; gap: 8px;
  transition: .18s cubic-bezier(.2,.7,.3,1);
  border-left: 4px solid var(--line);
}
.item-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.item-card.good { border-left-color: var(--good); }
.item-card.warn { border-left-color: var(--warn); }
.item-card.bad  { border-left-color: var(--bad); }
.item-top { display: flex; align-items: flex-start; gap: 10px; }
.item-card h3 { font-size: 16px; font-weight: 720; flex: 1; }
.item-card .sum { color: var(--text-2); font-size: 13.8px; margin: 0; }
.item-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; padding-top: 6px; }
.tag {
  font-size: 11.5px; padding: 2px 8px; border-radius: 6px;
  background: var(--surface-2); color: var(--text-3); border: 1px solid var(--line-soft);
}

/* ---------- 필터 바 ---------- */
.filters { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 20px; align-items: center; }
.filters .label { font-size: 13px; color: var(--text-3); font-weight: 600; margin-right: 2px; }
.fbtn {
  padding: 7px 14px; border-radius: 999px; font-size: 13.5px; font-weight: 650;
  border: 1px solid var(--line); background: var(--surface); color: var(--text-2);
  cursor: pointer; transition: .16s; font-family: inherit;
}
.fbtn:hover { border-color: var(--gold-300); color: var(--gold-600); }
.fbtn.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.fbtn.on.good { background: var(--good); border-color: var(--good); color: #fff; }
.fbtn.on.warn { background: var(--warn); border-color: var(--warn); color: #fff; }
.fbtn.on.bad  { background: var(--bad);  border-color: var(--bad);  color: #fff; }

/* ---------- 상세 ---------- */
.detail { max-width: 780px; margin: 0 auto; }
.crumb { font-size: 13.5px; color: var(--text-3); margin-bottom: 14px; }
.crumb a:hover { color: var(--gold-600); }
.detail-head {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 28px 30px; box-shadow: var(--shadow);
  border-top: 5px solid var(--line);
}
.detail-head.good { border-top-color: var(--good); }
.detail-head.warn { border-top-color: var(--warn); }
.detail-head.bad  { border-top-color: var(--bad); }
.detail-head h1 { font-size: 28px; font-weight: 820; margin: 12px 0 6px; letter-spacing: -.03em; }
.detail-head .en { color: var(--text-3); font-size: 14px; }
.detail-head .lead { font-size: 16.5px; color: var(--text-2); margin: 14px 0 0; }
.verdict {
  margin-top: 18px; padding: 14px 18px; border-radius: var(--radius-sm);
  font-size: 14.5px; font-weight: 600; border: 1px solid;
}
.verdict.good { background: var(--good-bg); color: var(--good); border-color: var(--good-line); }
.verdict.warn { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-line); }
.verdict.bad  { background: var(--bad-bg);  color: var(--bad);  border-color: var(--bad-line); }

.block {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px 26px; margin-top: 14px;
}
.block h2 { font-size: 15px; font-weight: 750; color: var(--gold-600); margin-bottom: 9px;
  display: flex; align-items: center; gap: 7px; }
.block p { margin: 0; color: var(--text); font-size: 15.3px; }
.alt-list { display: flex; flex-wrap: wrap; gap: 8px; }
.alt-list span {
  padding: 7px 14px; border-radius: 999px; font-size: 14px; font-weight: 600;
  background: var(--good-bg); color: var(--good); border: 1px solid var(--good-line);
}

/* ---------- 임신 현황 카드 ---------- */
.status-card {
  background: linear-gradient(135deg, var(--gold-500), var(--gold-300));
  border-radius: var(--radius-lg); padding: 26px 28px; color: #402A02;
  box-shadow: 0 12px 36px rgba(224,154,12,.28); position: relative; overflow: hidden;
}
.status-card::after {
  content: ""; position: absolute; right: -34px; top: -34px;
  width: 190px; height: 190px; border-radius: 50%;
  background: rgba(255,255,255,.20);
}
.status-card .row { display: flex; align-items: flex-end; gap: 26px;
  flex-wrap: wrap; position: relative; z-index: 1; }
.status-week { font-size: 42px; font-weight: 850; line-height: 1; letter-spacing: -.04em; }
.status-week small { font-size: 17px; font-weight: 700; margin-left: 3px; }
.status-label { font-size: 13.5px; font-weight: 700; opacity: .72; margin-bottom: 4px; }
.status-item { min-width: 92px; }
.status-item .v { font-size: 22px; font-weight: 800; line-height: 1.15; }
.progress {
  height: 9px; border-radius: 999px; background: rgba(255,255,255,.42);
  margin-top: 18px; overflow: hidden; position: relative; z-index: 1;
}
.progress i { display: block; height: 100%; border-radius: 999px; background: #6B4409; }

/* ---------- 수첩 ---------- */
.nb-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(430px, 100%), 1fr)); gap: 16px; }
.panel {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px 24px; box-shadow: var(--shadow);
}
.panel > h2 {
  font-size: 16.5px; font-weight: 780; margin-bottom: 4px;
  display: flex; align-items: center; gap: 8px;
}
.panel .hint { color: var(--text-3); font-size: 13px; margin: 0 0 16px; }

.form-grid {
  display: grid; gap: 11px;
  grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr));
}
.field { display: flex; flex-direction: column; gap: 5px; }
.field.wide { grid-column: 1 / -1; }
.field label { font-size: 12.5px; font-weight: 650; color: var(--text-2); }
.field input, .field select, .field textarea {
  height: 40px; padding: 0 12px; border: 1px solid var(--line);
  border-radius: 10px; background: var(--bg); color: var(--text);
  font-size: 14.5px; font-family: inherit; width: 100%;
  min-width: 0;   /* date/number 입력의 고유 너비가 그리드를 밀지 않도록 */
}
.field textarea { height: auto; min-height: 74px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
/* iOS 사파리: 날짜·시간 입력은 width 를 무시하고 고유 폭으로 옆 칸까지 번진다.
   기본 모양을 벗기고 블록으로 만들어야 그리드 칸 안에 들어간다. */
.field input[type=date], .field input[type=time], .field input[type=month],
.field input[type=datetime-local] {
  -webkit-appearance: none; appearance: none;
  display: flex; align-items: center;
  width: 100%; max-width: 100%; min-width: 0;
  min-height: 40px;
}
.field input::-webkit-date-and-time-value { text-align: left; min-height: 1.3em; margin: 0; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--gold-300); box-shadow: var(--ring);
}
.btn {
  /* <a> 로 써도 글자가 위로 쏠리지 않도록 flex 로 가운데 정렬한다 */
  display: inline-flex; align-items: center; justify-content: center;
  height: 42px; padding: 0 22px; border-radius: 999px; border: 0; cursor: pointer;
  font-size: 14.5px; font-weight: 700; font-family: inherit; line-height: 1;
  background: linear-gradient(135deg, var(--gold-400), var(--gold-600)); color: #fff;
  transition: .16s; box-shadow: 0 3px 10px rgba(224,154,12,.28);
  text-decoration: none; vertical-align: middle;
}
.btn:hover { filter: brightness(1.06); transform: translateY(-1px); }
.btn.ghost {
  background: var(--surface); color: var(--text-2);
  border: 1px solid var(--line); box-shadow: none;
}
.btn.ghost:hover { border-color: var(--gold-300); color: var(--gold-600); }
.btn.tiny { height: 28px; padding: 0 10px; font-size: 12px; }
.btn { white-space: nowrap; }
.form-actions { display: flex; gap: 9px; margin-top: 14px; align-items: center; }

table.log { width: 100%; min-width: 360px; border-collapse: collapse;
  font-size: 14px; margin-top: 14px; }
table.log th {
  text-align: left; font-size: 12px; font-weight: 700; color: var(--text-3);
  padding: 7px 8px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
table.log td { padding: 9px 8px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
table.log td:first-child, table.log td:last-child { white-space: nowrap; }
table.log .badge { white-space: nowrap; }
table.log tr:last-child td { border-bottom: 0; }
table.log .num { font-variant-numeric: tabular-nums; font-weight: 650; white-space: nowrap; }
table.log .muted { color: var(--text-3); font-size: 13px; }
.scroll-x { overflow-x: auto; }

.stat-row { display: flex; gap: 22px; flex-wrap: wrap; margin: 14px 0 4px; }
.stat { }
.stat .k { font-size: 12px; color: var(--text-3); font-weight: 650; }
.stat .v { font-size: 21px; font-weight: 800; letter-spacing: -.02em; }
.stat .v small { font-size: 13px; font-weight: 650; color: var(--text-3); }

.checkup { border-left: 3px solid var(--line); padding: 4px 0 14px 16px; position: relative; }
.checkup:last-child { padding-bottom: 0; }
.checkup::before {
  content: ""; position: absolute; left: -7.5px; top: 9px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--surface); border: 3px solid var(--line);
}
.checkup.now { border-left-color: var(--gold-400); }
.checkup.now::before { border-color: var(--gold-400); background: var(--gold-400); }
.checkup.done { border-left-color: var(--good); }
.checkup.done::before { border-color: var(--good); }
.checkup .wk { font-size: 12.5px; font-weight: 750; color: var(--gold-600); }
.checkup.done .wk { color: var(--good); }
.checkup h3 { font-size: 15px; font-weight: 720; margin: 1px 0 6px; }
.checkup ul { margin: 0; padding-left: 17px; color: var(--text-2); font-size: 13.6px; }
.checkup li { margin-bottom: 2px; }

.chart {
  width: 100%; height: auto; overflow: visible;
  margin: 4px 0 18px; display: block;
}
.chart polyline { fill: none; stroke: var(--gold-500); stroke-width: 5;
  stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.chart polygon { fill: var(--gold-300); opacity: .16; }
.chart circle { fill: var(--surface); stroke: var(--gold-500); stroke-width: 4;
  vector-effect: non-scaling-stroke; }
.chart text { font-size: 21px; fill: var(--text-3); font-family: var(--font); font-weight: 600; }
.chart text.val { fill: var(--gold-600); font-weight: 750; }

/* ---------- 기타 ---------- */
.empty {
  text-align: center; padding: 60px 20px; color: var(--text-3);
  background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius);
}
.empty .em { font-size: 38px; display: block; margin-bottom: 12px; opacity: .55; }

.disclaimer {
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 15px 18px;
  font-size: 13px; color: var(--text-2); line-height: 1.6;
}
.disclaimer strong { color: var(--text); }

.site-footer {
  margin-top: 64px; padding: 30px 0 40px;
  border-top: 1px solid var(--line-soft); text-align: center;
  color: var(--text-3); font-size: 13px;
}
.site-footer .fbrand { display: inline-flex; align-items: center; gap: 7px;
  font-weight: 750; color: var(--text-2); margin-bottom: 8px; }
.site-footer img { width: 20px; height: 21px; }

.fav-btn {
  border: 1px solid var(--line); background: var(--surface); cursor: pointer;
  width: 38px; height: 38px; border-radius: 50%; font-size: 16px;
  display: grid; place-items: center; transition: .16s; flex-shrink: 0;
}
.fav-btn:hover { border-color: var(--gold-300); }
.fav-btn.on { background: var(--gold-100); border-color: var(--gold-300); }

@media (max-width: 720px) {
  .header-inner { height: auto; padding: 12px 16px; flex-wrap: wrap; gap: 10px; }
  .searchbox { order: 3; max-width: none; flex-basis: 100%; }
  .nav { margin-left: auto; }
  .nav a { padding: 7px 10px; font-size: 13.5px; }
  .hero { padding: 34px 0 4px; }
  .hero h1 { font-size: 29px; }
  .status-week { font-size: 34px; }
  .block, .panel { padding: 18px 18px; }
  .detail-head { padding: 22px 20px; }
}

/* ---------- 로그인 ---------- */
.login-body {
  min-height: 100dvh; display: grid; place-items: center; padding: 24px;
  padding-top: calc(24px + env(safe-area-inset-top));
  padding-bottom: calc(24px + env(safe-area-inset-bottom));
}
.login-card {
  width: 100%; max-width: 340px; text-align: center;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 40px 30px 34px;
  box-shadow: var(--shadow-lg); position: relative; z-index: 1;
}
.login-logo { width: 76px; height: 82px; filter: drop-shadow(0 8px 20px rgba(224,154,12,.28)); }
.login-card h1 { font-size: 26px; font-weight: 850; letter-spacing: -.03em; margin: 14px 0 4px; }
.login-card h1 em {
  font-style: normal;
  background: linear-gradient(135deg, var(--gold-300), var(--gold-600));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.login-sub { color: var(--text-3); font-size: 14px; margin: 0 0 26px; }
.login-input {
  width: 100%; height: 52px; padding: 0 20px; text-align: left;
  border: 1.5px solid var(--line); border-radius: 999px;
  background: var(--bg); color: var(--text);
  font-size: 16px; font-family: inherit; letter-spacing: .06em;
}
.login-input:focus { outline: none; border-color: var(--gold-400); box-shadow: var(--ring); }
.login-btn { width: 100%; height: 52px; margin-top: 12px; font-size: 16px; }
.login-error { color: var(--bad); font-size: 13.5px; font-weight: 650; margin: 10px 0 0; }
.shake { animation: shake .4s; border-color: var(--bad); }
@keyframes shake {
  0%,100% { transform: translateX(0); }
  20%,60% { transform: translateX(-7px); }
  40%,80% { transform: translateX(7px); }
}

/* ---------- 아이폰 대응 ---------- */
/* iOS는 글자가 16px보다 작은 입력칸을 누르면 화면을 확대해 버린다 */
.field input, .field select, .field textarea,
.searchbox input, .hero-search input { font-size: 16px; }

/* 노치와 홈 인디케이터를 피해 안쪽으로 */
.site-header { padding-top: env(safe-area-inset-top); }
.wrap { padding-left: calc(20px + env(safe-area-inset-left));
        padding-right: calc(20px + env(safe-area-inset-right)); }
.site-footer { padding-bottom: calc(40px + env(safe-area-inset-bottom)); }

body {
  -webkit-tap-highlight-color: rgba(245,183,44,.18);
  overscroll-behavior-y: none;   /* 당겨서 새로고침으로 앱이 튀는 것 방지 */
}
button, .btn, .fbtn, .chip, .fav-btn, .theme-btn { touch-action: manipulation; }

/* 손가락으로 누르는 것들은 최소 44px 확보 */
@media (pointer: coarse) {
  .fbtn { padding: 10px 16px; }
  .chip { padding: 9px 15px; }
  .nav a { padding: 10px 12px; }
  .btn.tiny { height: 34px; padding: 0 13px; }
  table.log td, table.log th { padding: 11px 8px; }
}

/* 홈 화면에서 실행했을 때(앱 모드) 스크롤 감각을 네이티브에 맞춘다 */
@media (display-mode: standalone) {
  body { overscroll-behavior: none; }
  .site-header { position: sticky; }
}
.nav-logout {
  color: var(--text-3); font-size: 15px; padding: 8px 10px !important;
  border-radius: 999px;
}
.nav-logout:hover { color: var(--bad); background: var(--bad-bg) !important; }

/* ---------- 하단 탭바 (모바일 전용) ---------- */
.tabbar { display: none; }

@media (max-width: 720px) {
  /* 상단의 카테고리 링크는 감추고 아래 탭바로 옮긴다 */
  .nav a:not(.nav-logout) { display: none; }
  .nav { gap: 2px; }

  .tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    background: color-mix(in srgb, var(--bg) 92%, transparent);
    backdrop-filter: saturate(180%) blur(16px);
    border-top: 1px solid var(--line-soft);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .tabbar a {
    flex: 1; display: flex; flex-direction: column; align-items: center;
    justify-content: center; gap: 3px; padding: 9px 4px 7px;
    font-size: 11px; font-weight: 650; color: var(--text-3);
    transition: color .15s;
  }
  .tabbar a span { font-size: 20px; line-height: 1; }
  .tabbar a.on { color: var(--gold-600); }
  .tabbar a.on span { transform: translateY(-1px); }

  /* 탭바에 내용이 가리지 않도록 아래 여백 확보 */
  .site-footer { margin-bottom: calc(62px + env(safe-area-inset-bottom)); }

  /* 가로로 삐져나가는 일이 없게 */
  html, body { overflow-x: hidden; max-width: 100%; }
  /* 기록 표를 가로로 밀어도 수정·삭제 버튼은 오른쪽에 붙어 보이게 */
  table.log th:last-child, table.log tr:not(.edit-row) > td:last-child {
    position: sticky; right: 0; background: var(--surface);
    box-shadow: -8px 0 8px -8px rgba(0,0,0,.12);
  }
  .hero h1 { font-size: 26px; }
  .hero p { font-size: 14.5px; }
  .status-card { padding: 20px 20px; }
  .status-card .row { gap: 16px; }
  .status-week { font-size: 30px; }
  .status-item { min-width: 74px; }
  .status-item .v { font-size: 17px; }
  .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
  .cat-card p { min-height: 0; }
  .item-grid { grid-template-columns: 1fr; }
  .sec-head { flex-wrap: wrap; gap: 6px 10px; }
  .sec-head .more { margin-left: auto; }
}


/* ---- 식약처 임부금기(DUR) ---- */
.dur-list { display: flex; flex-direction: column; gap: 8px; }
.dur-row {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 11px 14px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
details.dur-row { display: block; }
details.dur-row summary {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  cursor: pointer; list-style: none;
}
details.dur-row summary::-webkit-details-marker { display: none; }
.dur-grade {
  flex: none; font-size: 11.5px; font-weight: 800; padding: 3px 9px; border-radius: 999px;
}
.dur-grade.g1 { background: var(--bad-bg); color: var(--bad); }
.dur-grade.g2 { background: var(--warn-bg); color: var(--warn); }
.dur-grade.g3 { background: var(--warn-bg); color: var(--warn); }
.dur-name { font-size: 13.5px; font-weight: 600; color: var(--text-1); word-break: break-all; }
.dur-kind {
  flex: none; font-size: 11px; color: var(--text-3);
  border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px;
}
.dur-forms { margin: 8px 0 0; font-size: 12.5px; color: var(--text-3); line-height: 1.6; }
.dur-note { font-size: 12.5px; color: var(--text-3); line-height: 1.7; margin-top: 12px; }
.dur-search { display: flex; gap: 8px; margin: 18px 0 14px; }
.dur-search input {
  flex: 1; min-width: 0; height: 42px; border-radius: 999px; border: 1.5px solid var(--line);
  background: var(--card); color: var(--text-1); padding: 0 18px; font-size: 16px; font-family: inherit;
}
.dur-search input:focus { outline: none; border-color: var(--gold-400); }
.dur-banner {
  display: flex; align-items: center; gap: 12px; margin: 16px 0 6px;
  background: var(--warn-bg); border: 1px solid var(--warn);
  border-radius: 14px; padding: 13px 16px; text-decoration: none; transition: .15s;
}
.dur-banner:hover { filter: brightness(.97); }
.db-icon { font-size: 20px; flex: none; }
.db-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.db-body b { font-size: 14px; color: var(--text-1); }
.db-body small { font-size: 12px; color: var(--text-3); }
.db-arrow { margin-left: auto; color: var(--warn); font-weight: 800; flex: none; }


/* ---- 임신·출산 혜택 ---- */
.wf-picker { display: flex; gap: 8px; margin: 18px 0 0; }
.wf-picker select {
  flex: 1; min-width: 0; height: 44px; border-radius: 12px; border: 1.5px solid var(--line);
  background: var(--card); color: var(--text-1); padding: 0 12px;
  font-size: 16px; font-family: inherit; appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-3) 50%),
                    linear-gradient(135deg, var(--text-3) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px; background-repeat: no-repeat;
}
.wf-picker select:focus { outline: none; border-color: var(--gold-400); }
.wf-picker select:disabled { opacity: .55; }
.wf-list { display: flex; flex-direction: column; gap: 8px; }
.wf-row {
  display: flex; align-items: center; gap: 12px;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 13px 15px; text-decoration: none; transition: .15s;
}
.wf-row:hover { border-color: var(--gold-300); }
.wf-row.pinned { background: var(--gold-50, var(--card)); border-color: var(--gold-300); }
.wf-main { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 3px; }
.wf-name { font-size: 14.5px; font-weight: 700; color: var(--text-1); }
.wf-star { font-size: 11px; font-weight: 800; color: var(--gold-600); }
.wf-sum {
  margin: 0; font-size: 12.5px; color: var(--text-3); line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.wf-org { font-size: 11.5px; color: var(--text-3); }
.wf-online { color: var(--good); font-weight: 700; }

/* ---- 전국 공통 혜택 카드 ---- */
.bf-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 14px 16px; transition: .15s;
}
.bf-card[open] { border-color: var(--gold-300); box-shadow: var(--shadow, 0 2px 10px rgba(0,0,0,.05)); }
.bf-card summary { cursor: pointer; list-style: none; }
.bf-card summary::-webkit-details-marker { display: none; }
.bf-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.bf-name { font-size: 15px; font-weight: 750; color: var(--text-1); }
.bf-amount {
  font-size: 12px; font-weight: 800; color: var(--gold-600);
  background: var(--gold-50); border-radius: 999px; padding: 3px 10px; white-space: nowrap;
}
.bf-sum { margin: 6px 0 0; font-size: 13px; color: var(--text-3); line-height: 1.6; }
.bf-body { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); }
.bf-body > p { margin: 0 0 12px; font-size: 13.5px; color: var(--text-2); line-height: 1.75; }
.bf-meta { display: grid; grid-template-columns: 44px 1fr; gap: 6px 12px; margin: 0 0 14px; }
.bf-meta dt { font-size: 12px; font-weight: 700; color: var(--text-3); }
.bf-meta dd { margin: 0; font-size: 13px; color: var(--text-2); line-height: 1.6; }
.bf-link { height: 38px; font-size: 13.5px; }
.bf-region {
  font-size: 11px; font-weight: 700; color: var(--text-3);
  border: 1px solid var(--line); border-radius: 999px; padding: 2px 7px; vertical-align: middle;
}

/* --- 로그인 안내 --------------------------------------------------------- */
.login-note {
  margin: 20px 0 0; font-size: 12.5px; line-height: 1.7; color: var(--text-3);
}
.login-note code {
  background: var(--surface-2); border: 1px solid var(--line-soft);
  border-radius: 6px; padding: 1px 5px; font-size: 11.5px;
}
.login-card form .login-input + .login-input { margin-top: 10px; }

/* --- 계정 관리 ----------------------------------------------------------- */
.nav-admin {
  font-size: 13px; font-weight: 700;
}
.ad-flash {
  margin: 0 0 16px; padding: 12px 14px; border-radius: 12px;
  font-size: 14px; font-weight: 650; line-height: 1.6;
}
.ad-flash.ok  { background: var(--good-bg, var(--surface-2)); color: var(--good); }
.ad-flash.bad { background: var(--bad-bg); color: var(--bad); }

.ad-panel {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 16px; padding: 18px; margin-bottom: 18px;
}
.ad-h2 { margin: 0 0 14px; font-size: 16px; font-weight: 800; }
.ad-form { display: grid; gap: 12px; }
.ad-form label {
  display: grid; gap: 6px; font-size: 13px; font-weight: 650; color: var(--text-2);
}
.ad-form input[type=text] {
  height: 44px; padding: 0 14px; font-size: 15px; font-family: inherit;
  border: 1.5px solid var(--line); border-radius: 12px;
  background: var(--surface); color: var(--text);
}
.ad-form input[type=text]:focus { outline: none; border-color: var(--gold-400); }
.ad-opt { font-weight: 500; color: var(--text-3); }
.ad-check { display: flex; align-items: center; gap: 8px; }
.ad-check input { width: 18px; height: 18px; accent-color: var(--gold-400); }
.ad-hint { font-size: 12.5px; line-height: 1.8; color: var(--text-3); margin: 12px 0 0; }
.ad-hint code {
  background: var(--surface-2); border: 1px solid var(--line-soft);
  border-radius: 6px; padding: 1px 6px; font-size: 11.5px;
}

.ad-users { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.ad-user {
  border: 1px solid var(--line); border-radius: 14px;
  padding: 14px; background: var(--surface-2);
}
.ad-user.off { opacity: .62; }
.ad-user-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ad-user-top strong { font-size: 15.5px; }
.ad-tag {
  font-size: 11px; font-weight: 750; padding: 2px 8px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); color: var(--text-3);
}
.ad-tag.admin { background: var(--gold-50); border-color: var(--gold-200, var(--line)); color: #A8710A; }
.ad-tag.off   { background: var(--bad-bg); border-color: transparent; color: var(--bad); }
.ad-tag.me    { background: var(--surface); color: var(--text-2); }
.ad-user-meta { margin: 6px 0 12px; font-size: 12.5px; color: var(--text-3); }
.ad-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ad-actions form { display: flex; gap: 6px; }
.ad-actions input[type=text] {
  width: 150px; height: 34px; padding: 0 10px; font-size: 13px; font-family: inherit;
  border: 1.5px solid var(--line); border-radius: 10px;
  background: var(--surface); color: var(--text);
}
.ad-actions input[type=text]:focus { outline: none; border-color: var(--gold-400); }

/* ================= 추가 화면들 ================= */

/* ---------- 근거 출처 ---------- */
.sources {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin-top: 22px; padding: 14px 16px;
  background: var(--surface-2); border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
}
.sources.tight { margin-top: 12px; padding: 9px 11px; }
.src-label {
  font-size: 12px; font-weight: 800; letter-spacing: .02em;
  color: var(--text-3); text-transform: uppercase;
}
.sources a {
  font-size: 13px; font-weight: 600; color: var(--gold-700);
  padding: 4px 11px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line);
}
.sources a:hover { border-color: var(--gold-300); color: var(--gold-600); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .sources a { color: var(--gold-300); }
}
:root[data-theme="dark"] .sources a { color: var(--gold-300); }

/* ---------- 수첩: 다른 화면으로 가는 입구 ---------- */
.nb-links {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px; margin-bottom: 20px;
}
.nb-link {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); transition: .16s;
}
.nb-link:hover { border-color: var(--gold-300); transform: translateY(-2px); }
.nl-icon { font-size: 24px; }
.nl-body { display: flex; flex-direction: column; min-width: 0; }
.nl-body b { font-size: 15px; font-weight: 750; }
.nl-body small { font-size: 12.5px; color: var(--text-3); }

/* ---------- 기록 수정 줄 ---------- */
.row-act { white-space: nowrap; }          /* td 에 flex 를 주면 표 칸이 깨져 버튼이 세로로 겹친다 */
.row-act .btn, .row-act form { display: inline-flex; vertical-align: middle; }
.row-act .btn + form { margin-left: 5px; }
.btn.tiny.danger:hover { border-color: var(--bad-line); color: var(--bad); }
.edit-row > td {
  background: var(--surface-2);
  border-top: 1px solid var(--gold-200) !important;
  padding: 16px 14px !important;
}
/* 표가 가로로 스크롤돼도 편집 폼은 화면 안에 붙어 있게 (너비는 JS 가 스크롤 상자에 맞춰 준다) */
.edit-row form { position: sticky; left: 0; max-width: 100%; }

/* ---------- 태동 카운터 · 진통 타이머 ---------- */
.counter, .timer {
  display: flex; gap: 18px; align-items: center; flex-wrap: wrap;
  margin: 16px 0 20px; padding: 18px;
  background: var(--surface-2); border: 1px solid var(--line-soft);
  border-radius: var(--radius);
}
.count-btn {
  flex-shrink: 0; width: 132px; height: 132px; border-radius: 50%;
  border: 2px solid var(--gold-300);
  background: linear-gradient(160deg, var(--gold-100), var(--surface));
  color: var(--text); cursor: pointer; font-family: inherit;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; transition: transform .09s, box-shadow .16s;
  box-shadow: var(--shadow);
  -webkit-tap-highlight-color: transparent; user-select: none;
}
.count-btn:active { transform: scale(.94); }
.count-btn:hover { box-shadow: var(--shadow-lg); }
.cb-num { font-size: 40px; font-weight: 850; line-height: 1; letter-spacing: -.03em; }
.count-btn.ct .cb-num { font-size: 27px; }
.cb-label { font-size: 12px; color: var(--text-3); font-weight: 600; text-align: center; line-height: 1.25; white-space: pre-line; padding: 0 14px; }
.counter.done .count-btn { border-color: var(--good); background: linear-gradient(160deg, var(--good-bg), var(--surface)); }
.counter.warn .count-btn { border-color: var(--bad); background: linear-gradient(160deg, var(--bad-bg), var(--surface)); }
.timer.running .count-btn { border-color: var(--bad); background: linear-gradient(160deg, var(--bad-bg), var(--surface)); }
.counter-side { flex: 1; min-width: 180px; display: flex; flex-direction: column; gap: 6px; }
.counter-stat { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.cs-label { font-size: 12.5px; color: var(--text-3); font-weight: 600; }
.cs-value { font-size: 15px; font-weight: 750; font-variant-numeric: tabular-nums; }
.counter-msg { margin: 6px 0 0; font-size: 13px; color: var(--text-2); line-height: 1.5; }
.counter-acts { display: flex; gap: 6px; margin-top: 6px; }

/* ---------- 주수별 ---------- */
.wk-rail {
  display: flex; gap: 6px; overflow-x: auto; padding: 4px 2px 12px;
  scrollbar-width: thin; -webkit-overflow-scrolling: touch;
}
.wk-tick {
  flex-shrink: 0; width: 54px; padding: 8px 0; text-align: center;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); transition: .14s;
}
.wk-tick b { display: block; font-size: 15px; font-weight: 750; }
.wk-tick small { font-size: 10.5px; color: var(--text-3); }
.wk-tick:hover { border-color: var(--gold-300); }
.wk-tick.on { background: var(--gold-400); border-color: var(--gold-500); color: #3A2A06; }
.wk-tick.on small { color: #6B4E0C; }
.wk-tick.now:not(.on) { border-color: var(--gold-400); border-width: 2px; }

.wk-head {
  display: flex; gap: 18px; align-items: center; justify-content: space-between;
  flex-wrap: wrap; margin: 6px 0 20px; padding: 20px;
  background: linear-gradient(140deg, var(--gold-50), var(--surface));
  border: 1px solid var(--gold-200); border-radius: var(--radius-lg);
}
.wk-size { display: flex; align-items: center; gap: 16px; }
.wk-emoji { font-size: 46px; line-height: 1; }
.wk-size-label { font-size: 21px; font-weight: 820; letter-spacing: -.03em; }
.wk-size-num { font-size: 16px; font-weight: 700; color: var(--gold-700); font-variant-numeric: tabular-nums; }
.wk-basis { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.wk-nav { display: flex; gap: 7px; flex-wrap: wrap; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .wk-size-num { color: var(--gold-300); }
}
:root[data-theme="dark"] .wk-size-num { color: var(--gold-300); }

.wk-warn {
  display: flex; gap: 12px; align-items: flex-start; margin-bottom: 20px;
  padding: 15px 17px; background: var(--warn-bg);
  border: 1px solid var(--warn-line); border-radius: var(--radius);
}
.ww-icon { font-size: 19px; line-height: 1.3; }
.wk-warn p { margin: 0; font-size: 14.5px; color: var(--text); line-height: 1.6; }
.wk-todo { margin: 12px 0 0; padding-left: 19px; color: var(--text-2); font-size: 14.6px; }
.wk-todo li { margin-bottom: 5px; }

.wk-peek {
  display: flex; gap: 18px; align-items: center; padding: 18px 20px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); transition: .16s;
}
.wk-peek:hover { border-color: var(--gold-300); transform: translateY(-2px); }
.wp-size { display: flex; flex-direction: column; align-items: center; gap: 3px; flex-shrink: 0; }
.wp-emoji { font-size: 34px; }
.wp-num { font-size: 13px; font-weight: 750; color: var(--gold-700); text-align: center; line-height: 1.35; }
.wk-peek p { margin: 0; font-size: 14.5px; color: var(--text-2); line-height: 1.65; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .wp-num { color: var(--gold-300); }
}
:root[data-theme="dark"] .wp-num { color: var(--gold-300); }

/* ---------- 체크리스트 ---------- */
.fbtn-count {
  margin-left: 5px; font-size: 11.5px; font-weight: 700; opacity: .7;
  font-variant-numeric: tabular-nums;
}
.cl-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 18px; flex-wrap: wrap; margin-bottom: 6px;
}
.cl-when { font-size: 13px; color: var(--gold-700); font-weight: 650; }
.cl-progress { min-width: 190px; flex: 0 1 260px; }
.cl-count { font-size: 13px; font-weight: 700; color: var(--text-2); font-variant-numeric: tabular-nums; }
.cl-progress .progress { margin-top: 6px; }
.cl-group { margin-top: 22px; }
.cl-gname {
  font-size: 13px; font-weight: 800; color: var(--text-3);
  text-transform: uppercase; letter-spacing: .04em; margin-bottom: 8px;
}
.cl-list { list-style: none; margin: 0; padding: 0; }
.cl-item { border-bottom: 1px solid var(--line-soft); }
.cl-item:last-child { border-bottom: 0; }
.cl-item label {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 11px 2px; cursor: pointer;
}
.cl-item input { position: absolute; opacity: 0; width: 0; height: 0; }
.cl-box {
  flex-shrink: 0; width: 22px; height: 22px; margin-top: 1px;
  border: 2px solid var(--line); border-radius: 7px;
  background: var(--surface); transition: .14s;
  display: grid; place-items: center;
}
.cl-item label:hover .cl-box { border-color: var(--gold-400); }
.cl-item input:checked + .cl-box {
  background: var(--gold-400); border-color: var(--gold-500);
}
.cl-item input:checked + .cl-box::after {
  content: "✓"; color: #3A2A06; font-size: 14px; font-weight: 900; line-height: 1;
}
.cl-item input:focus-visible + .cl-box { box-shadow: var(--ring); }
.cl-text { font-size: 15px; line-height: 1.5; }
.cl-item.done .cl-text { color: var(--text-3); text-decoration: line-through; }
.cl-must {
  display: inline-block; margin-left: 6px; padding: 1px 7px;
  font-size: 11px; font-weight: 800; border-radius: 999px;
  background: var(--bad-bg); color: var(--bad); border: 1px solid var(--bad-line);
  text-decoration: none;
}
.cl-note {
  display: block; margin-top: 3px; font-size: 12.8px;
  color: var(--text-3); line-height: 1.5; text-decoration: none;
}

/* ---------- 출산 후 ---------- */
.pp-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 14px;
}
.pp-card {
  padding: 16px 18px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.pp-card.now { border-color: var(--gold-400); border-width: 2px; background: linear-gradient(150deg, var(--gold-50), var(--surface)); }
.pp-card.past { opacity: .62; }
.pp-top { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; margin-bottom: 7px; }
.pp-when {
  font-size: 12px; font-weight: 800; color: var(--gold-700);
  background: var(--gold-100); border-radius: 999px; padding: 2px 10px;
}
.pp-kind { font-size: 12px; color: var(--text-3); font-weight: 650; }
.pp-card h3 { font-size: 16px; font-weight: 780; }
.pp-detail { margin: 7px 0 0; font-size: 14px; color: var(--text-2); line-height: 1.6; }
.pp-items { margin: 9px 0 0; padding-left: 18px; font-size: 13.8px; color: var(--text-2); }
.pp-items li { margin-bottom: 3px; }
.pp-note {
  margin: 10px 0 0; padding: 9px 11px; font-size: 13px; line-height: 1.55;
  background: var(--surface-2); border-radius: var(--radius-sm); color: var(--text-2);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .pp-when { background: #3A2D14; color: var(--gold-300); }
  :root:not([data-theme="light"]) .cl-when { color: var(--gold-300); }
}
:root[data-theme="dark"] .pp-when { background: #3A2D14; color: var(--gold-300); }
:root[data-theme="dark"] .cl-when { color: var(--gold-300); }

/* ---------- 혜택: 지역 저장 · 접히는 목록 ---------- */
.wf-save {
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
  margin-top: 14px;
}
.wf-saved {
  font-size: 13.5px; font-weight: 650; color: var(--good);
  background: var(--good-bg); border: 1px solid var(--good-line);
  border-radius: 999px; padding: 6px 14px;
}
.wf-fold { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.wf-fold > summary {
  display: flex; align-items: center; gap: 10px; padding: 15px 18px;
  cursor: pointer; list-style: none;
}
.wf-fold > summary::-webkit-details-marker { display: none; }
.wf-fold-title { font-size: 16px; font-weight: 750; }
.wf-fold > summary .sec-sub { margin-left: 0; }
.wf-fold > summary .db-arrow { margin-left: auto; transition: transform .18s; }
.wf-fold[open] > summary .db-arrow { transform: rotate(180deg); }
.wf-fold > *:not(summary) { padding: 0 18px; }
.wf-fold > .wf-list { padding-bottom: 18px; }
.wf-row.pinned { border-color: var(--gold-300); }
.wf-star { color: var(--gold-500); }

/* ---------- 인쇄용 수첩 ---------- */
.print-bar {
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px; flex-wrap: wrap; margin: 28px 0 18px; padding: 15px 18px;
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--radius);
}
.print-acts { display: flex; gap: 8px; }
.sheet {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 30px 32px; box-shadow: var(--shadow);
}
.sheet-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 20px; flex-wrap: wrap;
  padding-bottom: 16px; border-bottom: 2px solid var(--gold-400);
}
.sheet-head h1 { font-size: 24px; font-weight: 850; }
.sheet-sub { margin: 5px 0 0; font-size: 14px; color: var(--text-2); }
.sheet-meta { font-size: 13.5px; color: var(--text-2); text-align: right; line-height: 1.7; }
.sheet-when { color: var(--text-3); font-size: 12px; }
.sheet-block { margin-top: 24px; }
.sheet-block h2 {
  font-size: 15px; font-weight: 800; padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}
.sheet-block h2 small { font-weight: 600; color: var(--text-3); margin-left: 6px; }
.sheet-dl { display: grid; grid-template-columns: 130px 1fr; gap: 6px 14px; margin: 12px 0 0; font-size: 14px; }
.sheet-dl dt { color: var(--text-3); font-weight: 650; }
.sheet-dl dd { margin: 0; }
.sheet-table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 13px; }
.sheet-table th {
  text-align: left; font-weight: 750; color: var(--text-3); font-size: 11.5px;
  padding: 6px 8px; border-bottom: 1px solid var(--line);
  text-transform: uppercase; letter-spacing: .03em; white-space: nowrap;
}
.sheet-table td { padding: 7px 8px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.sheet-foot { margin-top: 26px; padding-top: 14px; border-top: 1px solid var(--line);
  font-size: 12px; color: var(--text-3); }

@media print {
  .site-header, .tabbar, .site-footer, .print-bar { display: none !important; }
  body { background: #fff; color: #000; }
  body::before { display: none; }
  .wrap { max-width: none; padding: 0; }
  .sheet { border: 0; box-shadow: none; padding: 0; background: #fff; }
  .sheet-block { break-inside: avoid; }
  .sheet-table { font-size: 10.5pt; }
  .sheet-table tr { break-inside: avoid; }
  a { text-decoration: none; color: #000; }
}

@media (max-width: 720px) {
  .count-btn { width: 108px; height: 108px; }
  .cb-num { font-size: 33px; }
  .sheet { padding: 20px 16px; }
  .sheet-dl { grid-template-columns: 100px 1fr; }
  .wk-head { padding: 16px; }
  .wk-emoji { font-size: 36px; }
  .row-act { flex-direction: column; gap: 3px; align-items: stretch; }
}

/* 성분 고시와 제품 판정이 갈릴 때의 설명 상자 */
.block.conflict-note {
  background: var(--gold-50);
  border: 1px solid var(--gold-200);
}
.block.conflict-note h2 { font-size: 15.5px; }
.block.conflict-note p { font-size: 14.3px; color: var(--text-2); }
