:root {
  --tone-feed: #FFE9DC; --tone-food: #FFF3CF; --tone-sleep: #EEEAFE; --tone-care: #E2EFFF; --tone-health: #FDE6EE; --tone-misc: #E3F5E8;
  --bg: #F2F4F6;
  --card: #FFFFFF;
  --text: #191F28;
  --sub: #6B7684;
  --faint: #B0B8C1;
  --line: #E5E8EB;
  --chip: #F2F4F6;
  --accent: #3478F6;
  --accent-soft: #E8F1FF;
  --accent-text: #FFFFFF;
  --sleep-soft: #EEEAFE;
  --sleep: #6C5CE7;
  --danger: #F04452;
  --danger-soft: #FEECEE;
  --toast: #191F28;
  --radius: 20px;
  /* 차트 색 (validate_palette 통과: 라이트) */
  --c-feed: #EB6834;
  --c-sleep: #6C5CE7;
  --c-pee: #3478F6;
  --c-poo: #EDA100;
  --c-growth: #1BAF7A;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #101113; --card: #1B1D22; --text: #F2F4F6; --sub: #9EA7B3; --faint: #5B636E;
    --line: #2A2E35; --chip: #24272D; --accent: #4C8DFF; --accent-soft: #1A2A45;
    --sleep-soft: #25213F; --sleep: #A99BFF; --danger: #FF6171; --danger-soft: #3A1E23;
    --toast: #2C3038; color-scheme: dark;
    --tone-feed: #3A2A21; --tone-food: #3A321B; --tone-sleep: #2A2541; --tone-care: #1C2B3F; --tone-health: #3D2129; --tone-misc: #1D3325;
    --c-feed: #D95926; --c-sleep: #8E7FF5; --c-pee: #4C8DFF; --c-poo: #C98500; --c-growth: #199E70;
  }
}
:root[data-theme="dark"] {
  --bg: #101113; --card: #1B1D22; --text: #F2F4F6; --sub: #9EA7B3; --faint: #5B636E;
  --line: #2A2E35; --chip: #24272D; --accent: #4C8DFF; --accent-soft: #1A2A45;
  --sleep-soft: #25213F; --sleep: #A99BFF; --danger: #FF6171; --danger-soft: #3A1E23;
  --toast: #2C3038; color-scheme: dark;
  --tone-feed: #3A2A21; --tone-food: #3A321B; --tone-sleep: #2A2541; --tone-care: #1C2B3F; --tone-health: #3D2129; --tone-misc: #1D3325;
  --c-feed: #D95926; --c-sleep: #8E7FF5; --c-pee: #4C8DFF; --c-poo: #C98500; --c-growth: #199E70;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, "Malgun Gothic", sans-serif;
  font-size: 15px;
  line-height: 1.5;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: inherit; }
a { color: inherit; text-decoration: none; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
h1, h2, p { margin: 0; }

#view {
  max-width: 520px;
  margin: 0 auto;
  padding: calc(env(safe-area-inset-top) + 8px) 16px calc(env(safe-area-inset-bottom) + 96px);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ── 상단 ── */
.top { display: flex; align-items: center; justify-content: space-between; padding: 12px 4px 4px; }
.baby-name { font-size: 24px; font-weight: 700; }
.baby-age { color: var(--sub); font-size: 14px; }
.baby-age b { color: var(--accent); font-weight: 700; }
.page-title { font-size: 24px; font-weight: 700; }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: var(--sub); }
.icon-btn:active { background: var(--chip); }
.icon-btn:disabled { opacity: .3; cursor: default; }

/* ── 카드 ── */
.card { background: var(--card); border-radius: var(--radius); padding: 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.card-head h2 { font-size: 17px; font-weight: 700; }
.link { color: var(--sub); font-size: 14px; }
.muted { color: var(--sub); font-size: 14px; }
.fine { color: var(--faint); font-size: 12px; text-align: center; padding: 8px 0; }
.empty { color: var(--sub); text-align: center; padding: 20px 0; font-size: 14px; }

/* ── 상태 카드 ── */
.status { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stat { display: flex; flex-direction: column; gap: 2px; padding: 18px; min-height: 112px; }
.stat-label { color: var(--sub); font-size: 13px; font-weight: 500; }
.stat-value { font-size: 21px; font-weight: 700; font-variant-numeric: tabular-nums; margin-top: 2px; }
.stat-sub { color: var(--sub); font-size: 12px; margin-top: auto; }
.stat.accent { background: var(--accent); color: var(--accent-text); }
.stat.accent .stat-label, .stat.accent .stat-sub { color: rgba(255,255,255,.85); }
.stat.sleeping { background: var(--sleep-soft); }
.stat.sleeping .stat-label, .stat.sleeping .stat-value { color: var(--sleep); }

/* ── 빠른 기록 ── */
.quick-wrap { padding: 14px 0; position: relative; overflow: hidden; }
.quick { display: flex; gap: 2px; overflow-x: auto; padding: 0 10px; scroll-snap-type: x proximity; scroll-padding: 0 10px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.quick::-webkit-scrollbar { display: none; }
.quick > button { flex: 0 0 70px; scroll-snap-align: start; }
/* 오른쪽 끝을 살짝 흐리게 → 옆으로 더 있다는 신호 */
.quick-wrap::after { content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: 28px; background: linear-gradient(to right, transparent, var(--card)); pointer-events: none; }
.quick button, .pick-grid button {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; color: var(--sub); padding: 6px 0; border-radius: 14px;
}
.quick button:active, .pick-grid button:active { background: var(--chip); }
.q-icon { width: 50px; height: 50px; border-radius: 16px; background: var(--chip); display: grid; place-items: center; font-size: 24px; transition: transform .1s; }
.quick button:active .q-icon { transform: scale(.92); }
.quick button.on .q-icon { background: var(--sleep-soft); }
.quick button.on { color: var(--sleep); }
.pick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px 4px; margin-top: 4px; }

/* ── 다가오는 변화 ── */
.chg-list { display: flex; flex-direction: column; }
.chg { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.chg + .chg { border-top: 1px solid var(--line); }
.chg-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.chg-title { font-weight: 600; }
.chg-desc { color: var(--sub); font-size: 13px; line-height: 1.4; }
.chg-badge { display: inline-block; vertical-align: 1px; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: var(--chip); color: var(--sub); }
.chg-badge.hot { background: var(--accent-soft); color: var(--accent); }
.chg .prep-go { align-self: center; }

/* ── 요약 ── */
.sum-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.sum-grid > div { display: flex; flex-direction: column; }
.sum-label { color: var(--sub); font-size: 12px; }
.sum-grid b { font-size: 17px; font-variant-numeric: tabular-nums; }
.sum-sub { color: var(--faint); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── 가이드 미리보기 ── */
.guide-peek { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.badge { align-self: flex-start; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.peek-title { font-size: 18px; font-weight: 700; }
.peek-sub { color: var(--sub); font-size: 14px; }
.peek-more { display: flex; align-items: center; gap: 2px; color: var(--accent); font-size: 14px; font-weight: 600; margin-top: 4px; }
.peek-more svg { width: 16px; height: 16px; }

/* ── 기록 리스트 ── */
.rec-list { display: flex; flex-direction: column; }
.rec { display: flex; align-items: center; gap: 12px; padding: 10px 0; width: 100%; }
.rec + .rec { border-top: 1px solid var(--line); }
.rec-time { width: 64px; flex-shrink: 0; color: var(--sub); font-size: 13px; font-variant-numeric: tabular-nums; }
.rec-icon { width: 38px; height: 38px; flex-shrink: 0; border-radius: 12px; background: var(--chip); display: grid; place-items: center; font-size: 18px; }
.rec-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rec-title { font-weight: 600; }
.rec-desc { color: var(--sub); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rec-chev { color: var(--faint); }
.rec-chev svg { width: 18px; height: 18px; }

/* ── 날짜 이동 ── */
.day-nav { display: flex; align-items: center; justify-content: space-between; background: var(--card); border-radius: var(--radius); padding: 8px; }
.day-label { display: flex; flex-direction: column; align-items: center; font-weight: 700; font-size: 17px; }
.day-label small { color: var(--sub); font-weight: 400; font-size: 12px; }

/* ── 가이드 ── */
.chips { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px; padding: 0 16px 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex-shrink: 0; background: var(--card); color: var(--sub); padding: 8px 14px; border-radius: 999px; font-size: 14px; font-weight: 600; }
.chip.on { background: var(--accent); color: var(--accent-text); }
.guide-hero { display: flex; flex-direction: column; gap: 8px; }
.guide-hero h2 { font-size: 22px; font-weight: 700; }
.guide-hero p { color: var(--sub); }
.bullets { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.bullets li { position: relative; padding-left: 16px; }
.bullets li::before { content: ""; position: absolute; left: 2px; top: 9px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.prep-list { display: flex; flex-direction: column; }
.prep { display: flex; align-items: center; gap: 12px; padding: 12px 0; }
.prep + .prep { border-top: 1px solid var(--line); }
.prep-body { flex: 1; display: flex; flex-direction: column; }
.prep-name { font-weight: 600; }
.prep-why { color: var(--sub); font-size: 13px; }
.prep-go { flex-shrink: 0; background: var(--accent-soft); color: var(--accent); font-size: 13px; font-weight: 700; padding: 7px 12px; border-radius: 10px; }
.notice { color: var(--faint); font-size: 11px; margin-top: 12px; }

/* ── 설정 ── */
.kv { display: flex; justify-content: space-between; padding: 6px 0; }
.kv span { color: var(--sub); }
.kv small { color: var(--faint); font-weight: 400; font-size: 12px; margin-left: 4px; }
.field-label { color: var(--sub); font-size: 13px; font-weight: 500; margin-bottom: -8px; }
.soon { font-size: 12px; font-weight: 700; color: var(--sub); background: var(--chip); padding: 3px 10px; border-radius: 999px; }
.row-btn { display: block; width: 100%; padding: 12px 0; font-weight: 500; }
.row-btn + .row-btn { border-top: 1px solid var(--line); }
.row-btn.danger { color: var(--danger); }

/* ── 폼 요소 ── */
.form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { color: var(--sub); font-size: 13px; font-weight: 500; }
.field input {
  font: inherit; color: var(--text); background: var(--chip); border: 1.5px solid transparent;
  border-radius: 14px; padding: 14px 16px; width: 100%; min-height: 52px; outline: none;
}
.field input:focus { border-color: var(--accent); }

.btn { display: inline-flex; align-items: center; justify-content: center; font-weight: 700; border-radius: 16px; padding: 0 18px; height: 54px; font-size: 17px; }
.btn.block { width: 100%; }
.btn.primary { background: var(--accent); color: var(--accent-text); }
.btn.primary:active { filter: brightness(.94); }
.btn.danger { background: var(--danger); color: #fff; margin-top: 16px; }
.btn.ghost { color: var(--sub); margin-top: 4px; }
.btn.ghost-danger { color: var(--danger); height: 44px; font-size: 15px; font-weight: 600; }
.btn.small { height: 36px; font-size: 14px; border-radius: 12px; padding: 0 12px; background: var(--card); color: var(--accent); }
.btn.small.tint { background: var(--accent-soft); height: 32px; font-size: 13px; }

.stepper { display: flex; align-items: center; gap: 12px; }
.stepper > button { width: 56px; height: 56px; border-radius: 18px; background: var(--chip); font-size: 26px; font-weight: 500; display: grid; place-items: center; text-align: center; }
.stepper > button:active { background: var(--line); }
.stepper-val { flex: 1; display: flex; align-items: baseline; justify-content: center; gap: 4px; }
.stepper-val input {
  width: 110px; text-align: right; font: inherit; font-size: 40px; font-weight: 700; color: var(--text);
  background: none; border: 0; outline: none; padding: 0; font-variant-numeric: tabular-nums; -moz-appearance: textfield;
}
.stepper-val input::-webkit-outer-spin-button, .stepper-val input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper-val span { font-size: 18px; font-weight: 600; color: var(--sub); }

.seg { display: flex; background: var(--chip); border-radius: 14px; padding: 4px; }
.seg button { flex: 1; text-align: center; padding: 10px 0; border-radius: 10px; color: var(--sub); font-weight: 600; }
.seg button.on { background: var(--card); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.08); }

.choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.choice { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; height: 96px; border-radius: 18px; background: var(--chip); font-weight: 700; text-align: center; }
.choice span { font-size: 26px; }
.choice.on { background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 2px var(--accent); }
.choice:active { transform: scale(.97); }

/* ── 시작 화면 ── */
.onboard { min-height: 88vh; display: flex; flex-direction: column; justify-content: center; gap: 16px; text-align: center; }
.logo { width: 80px; height: 80px; margin: 0 auto; display: block; box-shadow: 0 8px 24px color-mix(in srgb, var(--accent) 30%, transparent); border-radius: 18px; }
.onboard h1 { font-size: 28px; font-weight: 800; }
.lead { color: var(--sub); font-size: 16px; margin-bottom: 12px; }
.onboard .form { text-align: left; }

/* ── 탭바 ── */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: flex; justify-content: center;
  background: color-mix(in srgb, var(--card) 92%, transparent);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
  padding: 6px 8px calc(env(safe-area-inset-bottom) + 6px);
}
.tabbar[hidden] { display: none; }
.tabbar button { flex: 1; max-width: 130px; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; font-weight: 600; color: var(--faint); padding: 6px 0; }
.tabbar button.active { color: var(--text); }

/* ── 바텀시트 ── */
.backdrop { position: fixed; inset: 0; z-index: 20; background: rgba(0,0,0,.4); opacity: 0; pointer-events: none; transition: opacity .2s; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 21;
  max-width: 520px; margin: 0 auto; max-height: 88vh; overflow-y: auto;
  background: var(--card); border-radius: 24px 24px 0 0;
  padding: 8px 20px calc(env(safe-area-inset-bottom) + 20px);
  transform: translateY(105%); transition: transform .25s cubic-bezier(.2,.8,.2,1);
}
.sheet-open .backdrop { opacity: 1; pointer-events: auto; }
.sheet-open .sheet { transform: none; }
.grabber { width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 16px; }
.sheet-title { font-size: 20px; font-weight: 700; margin-bottom: 18px; }
.sheet .muted { margin-bottom: 4px; }

/* ── 토스트 ── */
.toast {
  position: fixed; left: 16px; right: 16px; z-index: 30;
  bottom: calc(env(safe-area-inset-bottom) + 84px);
  max-width: 488px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--toast); color: #fff; border-radius: 16px; padding: 14px 18px; font-size: 14px;
  opacity: 0; transform: translateY(8px); pointer-events: none; transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: none; pointer-events: auto; }
.toast button { color: #7FB0FF; font-weight: 700; flex-shrink: 0; }

@media (min-width: 400px) {
  .stat-value { font-size: 22px; }
}

/* ── 통계 차트 ── */
.chart { display: block; width: 100%; height: auto; fill: none; stroke: none; overflow: visible; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .tick { fill: var(--faint); font-size: 10px; font-variant-numeric: tabular-nums; }
.chart .tick.on { fill: var(--text); font-weight: 700; }
.chart .endlabel { fill: var(--text); font-size: 11px; font-weight: 700; }
.chart .selband { fill: var(--chip); }
.chart .track { fill: var(--chip); }
.chart .hit { fill: transparent; cursor: pointer; }
.chart .dot { stroke: var(--card); stroke-width: 2; }
.chart .m-line { stroke: var(--c-growth); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.m-feed { fill: var(--c-feed); background: var(--c-feed); }
.m-sleep { fill: var(--c-sleep); background: var(--c-sleep); }
.m-pee { fill: var(--c-pee); background: var(--c-pee); }
.m-poo { fill: var(--c-poo); background: var(--c-poo); }
.m-growth { fill: var(--c-growth); background: var(--c-growth); }
.readout { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: -4px 0 10px; }
.readout span { color: var(--sub); font-size: 13px; }
.readout b { font-size: 16px; }
.legend { display: flex; gap: 14px; margin: -6px 0 10px; font-size: 12px; color: var(--sub); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend .sw { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
#view > .seg { background: var(--card); }
#view > .seg button.on { background: var(--chip); box-shadow: none; }

/* ── 스플래시 ── */
#splash { position: fixed; inset: 0; z-index: 50; background: var(--card); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; transition: opacity .35s ease; }
#splash img:first-child { width: 112px; height: auto; animation: splash-pop .55s cubic-bezier(.34, 1.56, .64, 1) both, splash-float 2.6s ease-in-out .55s infinite; }
#splash .wm { width: 196px; height: auto; margin-top: 22px; animation: splash-rise .45s ease-out .3s both; }
#splash b { margin-top: 8px; font-size: 15px; font-weight: 700; color: var(--accent); letter-spacing: 0.02em; animation: splash-rise .45s ease-out .45s both; }
#splash span { margin-top: 6px; font-size: 14px; color: var(--sub); animation: splash-rise .45s ease-out .6s both; }
#splash.hide { opacity: 0; pointer-events: none; }
@keyframes splash-pop { from { opacity: 0; transform: scale(.4) translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes splash-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes splash-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { #splash img, #splash .wm, #splash b, #splash span { animation: none; } }

/* ── 인트로 슬라이드 ── */
.intro { min-height: calc(100vh - 40px); min-height: calc(100dvh - 40px); display: flex; flex-direction: column; }
.intro-track { flex: 1; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 -16px; }
.intro-track::-webkit-scrollbar { display: none; }
.intro-slide { flex: 0 0 100%; scroll-snap-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px 24px 0; }
.intro-slide h1 { font-size: 27px; font-weight: 800; line-height: 1.35; letter-spacing: -0.03em; word-break: keep-all; }
.intro-slide p { color: var(--sub); margin-top: 14px; font-size: 15.5px; line-height: 1.6; word-break: keep-all; text-wrap: balance; }
.intro-slide img { width: 100%; max-width: 320px; max-height: 46vh; object-fit: contain; margin-top: 36px; }
body.onboarding { background: var(--card); }
.intro-foot { display: flex; flex-direction: column; gap: 4px; padding: 16px 0 8px; }
.dots { display: flex; justify-content: center; gap: 6px; margin-bottom: 12px; }
.dots i { width: 6px; height: 6px; border-radius: 3px; background: var(--line); transition: width .2s, background .2s; }
.dots i.on { width: 18px; background: var(--accent); }

/* ── 빈 화면 일러스트 ── */
.empty-art { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 12px 0 16px; text-align: center; }
.empty-art img { width: 110px; height: auto; }
.empty-art.small img { width: 80px; }
.empty-art p { color: var(--sub); font-size: 14px; }

/* ── 자는 중 카드 일러스트 ── */
.stat { position: relative; overflow: hidden; }
.stat-art { position: absolute; right: -4px; bottom: -4px; width: 64px; pointer-events: none; }
.stat.sleeping .stat-sub { padding-right: 52px; }

/* ── 특가 ── */
.deals-sub { color: var(--sub); font-size: 13px; margin: -8px 0 12px; }
.deal-scroll { display: flex; gap: 10px; overflow-x: auto; margin: 0 -20px; padding: 0 20px 4px; scroll-snap-type: x proximity; scroll-padding: 0 20px; scrollbar-width: none; }
.deal-scroll::-webkit-scrollbar { display: none; }
.deal { flex: 0 0 128px; scroll-snap-align: start; display: flex; flex-direction: column; gap: 4px; }
.deal-thumb { position: relative; aspect-ratio: 1; border-radius: 16px; background: var(--chip); display: grid; place-items: center; font-size: 44px; }
.deal-thumb.sm { width: 72px; height: 72px; flex-shrink: 0; font-size: 34px; border-radius: 14px; aspect-ratio: auto; }
.deal-thumb em { position: absolute; left: 8px; top: 8px; font-style: normal; font-size: 10px; font-weight: 700; color: var(--sub); background: var(--card); padding: 1px 6px; border-radius: 6px; }
.deal .deal-name { font-size: 13px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 4px; }
.deal-price { display: flex; align-items: baseline; gap: 4px; flex-wrap: wrap; font-size: 15px; }
.deal-off { color: var(--danger); }
.deal-price s { color: var(--faint); font-size: 12px; }
.deal-meta { color: var(--faint); font-size: 11px; }
.deal-list { display: flex; flex-direction: column; }
.deal-row { display: flex; gap: 14px; align-items: center; padding: 12px 0; }
.deal-row + .deal-row { border-top: 1px solid var(--line); }
.deal-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.deal-row .deal-name { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 가로 목록 끝 여백 (아이폰 Safari는 스크롤 영역 오른쪽 padding을 무시함) */
.deal-scroll::after { content: ''; flex: 0 0 10px; }
/* 가로 목록 끝 '전체 보기' 칸 */
.deal-more { background: none; border: 0; padding: 0; font: inherit; color: var(--text); text-align: center; cursor: pointer; }
.deal-more .deal-thumb { font-size: 28px; color: var(--accent); background: var(--accent-soft); }
.deal-more .deal-name { font-weight: 600; }
/* 품목별 묶음 (가이드 탭) */
.deal-group + .deal-group { margin-top: 18px; }
.deal-group-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; font-size: 15px; }
.deal-group-h .link { font-size: 13px; }

/* ── 기록 종류 확장 ── */
.quick .q-icon { width: 56px; height: 56px; font-size: 28px; border-radius: 18px; }
.quick button { font-size: 13px; white-space: nowrap; }
.q-icon.more { font-size: 22px; color: var(--sub); font-weight: 300; }
.sheet-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.sheet-head .sheet-title { margin-bottom: 14px; }
.field-hint { color: var(--sub); font-size: 12px; margin-top: -6px; }
.qe-list { display: flex; flex-direction: column; margin: 8px 0 16px; }
.qe-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; }
.qe-row + .qe-row { border-top: 1px solid var(--line); }
.qe-row:not(.on) { opacity: .55; }
.qe-check { width: 24px; height: 24px; border-radius: 8px; border: 2px solid var(--line); display: grid; place-items: center; font-size: 14px; font-weight: 800; color: #fff; flex-shrink: 0; }
.qe-row.on .qe-check { background: var(--accent); border-color: var(--accent); }
.qe-name { flex: 1; font-weight: 600; }
.qe-move { width: 34px; height: 34px; border-radius: 10px; background: var(--chip); color: var(--sub); font-size: 12px; display: grid; place-items: center; }

/* ── 종류별 아이콘 톤 ── */
.tone-feed { background: var(--tone-feed) !important; }
.tone-food { background: var(--tone-food) !important; }
.tone-sleep { background: var(--tone-sleep) !important; }
.tone-care { background: var(--tone-care) !important; }
.tone-health { background: var(--tone-health) !important; }
.tone-misc { background: var(--tone-misc) !important; }

/* ── 눈금자 ── */
.ruler { position: relative; }
.ruler-head { display: flex; align-items: baseline; justify-content: center; gap: 4px; margin-bottom: 6px; }
.ruler-num { width: 130px; text-align: right; font: inherit; font-size: 44px; font-weight: 800; color: var(--text); background: none; border: 0; outline: none; padding: 0; -moz-appearance: textfield; font-variant-numeric: tabular-nums; }
.ruler-num::-webkit-outer-spin-button, .ruler-num::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.ruler-head > span { font-size: 20px; font-weight: 700; color: var(--sub); }
.ruler-track { overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 -20px; padding: 0; -webkit-overflow-scrolling: touch; touch-action: pan-x; }
.ruler-track::-webkit-scrollbar { display: none; }
.ruler-strip { display: flex; height: 54px; align-items: flex-start; width: max-content; }
.tk { flex: 0 0 14px; height: 14px; position: relative; scroll-snap-align: center; }
.tk::before { content: ""; position: absolute; left: 50%; top: 0; width: 1.5px; height: 100%; background: var(--line); transform: translateX(-50%); }
.tk.mj { height: 24px; }
.tk.mj::before { background: var(--faint); width: 2px; }
.tk b { position: absolute; top: 30px; left: 50%; transform: translateX(-50%); font-size: 13px; font-weight: 600; color: var(--sub); white-space: nowrap; font-variant-numeric: tabular-nums; }
.ruler-pin { position: absolute; left: 50%; bottom: 22px; width: 4px; height: 34px; border-radius: 2px; background: var(--accent); transform: translateX(-50%); pointer-events: none; }

.ruler.time .tk { flex-basis: 8px; height: 10px; }
.ruler.time .tk.mj { height: 22px; }
.ruler.time .tk::before { width: 1px; }
.ruler.time .ruler-pin { bottom: 64px; height: 28px; }
.ruler.time .ruler-head { flex-direction: column; align-items: center; gap: 0; }
.rt-time { font-size: 30px; font-weight: 800; font-variant-numeric: tabular-nums; }
.rt-date { color: var(--sub); font-size: 13px; }
.time-chips { display: flex; gap: 6px; justify-content: center; margin-top: 4px; }
.time-chips button { padding: 7px 12px; border-radius: 999px; background: var(--chip); font-size: 13px; font-weight: 600; color: var(--sub); }
.time-chips button:active { background: var(--accent-soft); color: var(--accent); }

/* ── 홈 '오늘 기록' 더보기 ── */
.more-link { display: block; width: 100%; text-align: center; padding: 12px 0 2px; color: var(--accent); font-weight: 600; font-size: 14px; border-top: 1px solid var(--line); margin-top: 4px; }
.theme-hint { margin: -6px 0 12px; font-size: 13px; }
.seg-2x2 { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.seg-2x2 button { white-space: nowrap; font-size: 14px; }

/* ── 수면: 자는 중 체크 ── */
.check-row { display: flex; align-items: center; gap: 10px; padding: 4px 2px; font-weight: 600; }
.check-row input { width: 22px; height: 22px; accent-color: var(--accent); }

/* ── 모유 수유 타이머 ── */
.bt-sides { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.bt-side { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 22px 8px; border-radius: 22px; background: var(--tone-feed); text-align: center; }
.bt-side.on { background: var(--accent); color: #fff; }
.bt-label { font-weight: 700; font-size: 16px; }
.bt-time { font-size: 38px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.bt-state { font-size: 13px; font-weight: 600; opacity: .8; }
.bt-total { text-align: center; color: var(--sub); margin: 14px 0; }
.bt-total b { color: var(--text); font-variant-numeric: tabular-nums; }
.bt-hint { margin: -8px 0 14px; }
.bt-banner { display: flex; align-items: center; gap: 12px; width: 100%; background: var(--tone-feed); }
.bt-banner-body { flex: 1; display: flex; flex-direction: column; }
.bt-banner-body span { color: var(--sub); font-size: 13px; }
.bt-banner-body i { font-style: normal; font-variant-numeric: tabular-nums; }
.bt-banner-go { color: var(--accent); font-weight: 700; font-size: 14px; }
.quick button.on.feed { color: var(--accent); }
.quick button.on.feed .q-icon { box-shadow: 0 0 0 2px var(--accent); }

/* ── 주차별 이야기 카드 ── */
.story-hero { height: 120px; border-radius: 20px; display: grid; place-items: center; margin-bottom: 16px; }
.story-hero span { font-size: 56px; }
.story-week { color: var(--accent); font-weight: 700; font-size: 13px; margin-bottom: 4px; }
.story-title { font-size: 21px; font-weight: 800; line-height: 1.4; letter-spacing: -0.02em; word-break: keep-all; margin-bottom: 10px; }
.story-body { color: var(--text); font-size: 15.5px; line-height: 1.7; word-break: keep-all; }
.story-tip { background: var(--chip); border-radius: 14px; padding: 12px 14px; margin: 16px 0; font-size: 14px; line-height: 1.6; word-break: keep-all; }
.story-note { color: var(--faint); font-size: 12px; margin: -6px 0 14px; word-break: keep-all; }
.story-peek { display: flex; align-items: center; gap: 12px; width: 100%; }
.story-peek-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.story-peek-label { color: var(--sub); font-size: 12px; }
.story-peek-body b { font-size: 15px; line-height: 1.4; word-break: keep-all; }
.new-dot { font-style: normal; font-size: 10px; font-weight: 800; color: #fff; background: var(--danger); padding: 1px 6px; border-radius: 999px; vertical-align: 1px; }

/* ── 부부 공유 ── */
.invite-code { font-size: 40px; font-weight: 800; letter-spacing: .12em; text-align: center; padding: 18px 0 6px; font-variant-numeric: tabular-nums; color: var(--accent); }
.center { text-align: center; }
.code-input { font: inherit; font-size: 28px; font-weight: 800; letter-spacing: .15em; text-align: center; text-transform: uppercase; padding: 14px; border-radius: 16px; border: 2px solid var(--line); background: var(--chip); color: var(--text); outline: none; width: 100%; }
.code-input:focus { border-color: var(--accent); }
.share-btns { display: flex; flex-direction: column; gap: 4px; margin-top: 12px; }
.share-on { color: #12B886; font-weight: 700; font-size: 12px; }
.join-link { display: block; margin: 8px auto 0; color: var(--sub); font-size: 14px; }
.join-link b { color: var(--accent); }

/* ── 쿠팡 실제 상품 이미지 ── */
.deal-thumb.live { background: #fff; overflow: hidden; border: 1px solid var(--line); }
.deal-thumb.live img { width: 100%; height: 100%; object-fit: cover; }

/* ── 골드박스 ── */
.deal-thumb em.gold { background: #FEF3C7; color: #B45309; }
.deals-gap { height: 18px; }

/* ── 알림 설정 ── */
.pref-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 0; text-align: left; }
.pref-row + .pref-row, .lead-seg + .pref-row { border-top: 1px solid var(--line); }
.pref-body { flex: 1; display: flex; flex-direction: column; }
.pref-body span { color: var(--sub); font-size: 13px; }
.switch { width: 46px; height: 28px; border-radius: 14px; background: var(--line); position: relative; flex-shrink: 0; transition: background .2s; }
.switch i { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .2s; }
.switch.on { background: var(--accent); }
.switch.on i { transform: translateX(18px); }
.lead-seg { margin: 0 0 10px; }
.guide-steps { padding-left: 20px; margin: 10px 0 18px; line-height: 1.8; }

/* ── 알림 제안 ── */
.offer-list { list-style: none; padding: 0; margin: 8px 0 18px; display: flex; flex-direction: column; gap: 8px; }
.offer-list li { background: var(--chip); border-radius: 12px; padding: 10px 14px; font-weight: 600; font-size: 14.5px; }
.push-banner { display: flex; align-items: center; gap: 10px; background: var(--accent-soft); border-radius: 16px; padding: 10px 10px 10px 14px; }
.push-banner-ic { font-size: 18px; }
.push-banner-text { flex: 1; font-size: 13.5px; font-weight: 600; color: var(--text); word-break: keep-all; line-height: 1.4; }
.push-banner-on { background: var(--accent); color: #fff; font-weight: 700; font-size: 13px; padding: 7px 12px; border-radius: 10px; white-space: nowrap; }
.push-banner-x { color: var(--faint); font-size: 14px; padding: 6px; }

/* ── 동의·약관 ── */
.consents { display: flex; flex-direction: column; gap: 10px; margin: 14px 0 16px; padding: 14px; border-radius: 14px; background: var(--chip); }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; line-height: 1.5; word-break: keep-all; }
.consent input { width: 20px; height: 20px; margin-top: 1px; flex-shrink: 0; accent-color: var(--accent); }
.consent-link { color: var(--accent); font-size: 13px; font-weight: 600; text-decoration: none; }
.policy-note { margin-top: 10px; line-height: 1.6; }
.policy-note a { color: var(--sub); text-decoration: underline; }
a.row-btn { color: var(--text); text-decoration: none; }
.consent-done { font-size: 12px; margin-top: 8px; }

/* [13] 아이폰은 16px보다 작은 입력칸을 누르면 화면을 확대함 → 입력칸 글자를 16px 이상으로 */
.field input, .field select, .field textarea, .comment-form input { font-size: 16px; }

/* 눈금자 양 끝 여백 (아이폰 Safari 대응) */
.ruler-strip .sp { flex: 0 0 auto; height: 1px; }
.ruler-strip .sp::before { display: none; }
/* 알림창 버튼 두 개 (수정 · 되돌리기) */
.toast-btns { display: flex; gap: 14px; flex-shrink: 0; }
/* 상품 이미지를 못 불러왔을 때 대체 그림 */
.deal-thumb .img-fallback { font-style: normal; font-size: 40px; opacity: .6; }
.deal-thumb.sm .img-fallback { font-size: 28px; }
/* 새 주소 이사 안내 */
.move-steps { margin: 4px 0 18px; padding-left: 20px; display: flex; flex-direction: column; gap: 10px; font-size: 15px; line-height: 1.5; }
.move-steps small { color: var(--sub); font-size: 13px; }
