/* 민건이의 하루 — 말랑 파스텔 테마 */
:root {
  --bg: #fff4ec;
  --bg2: #ffe9df;
  --card: #ffffff;
  --ink: #5a3f37;
  --ink2: #8c6f66;
  --line: #f6dcd2;
  --pink: #ff8fab;
  --pink-d: #f06a8d;
  --peach: #ffc4a3;
  --butter: #ffe08a;
  --mint: #9fe3c9;
  --sky: #9fd3ff;
  --lav: #c9b6ff;
  --cocoa: #b07b6a;

  --g-great: #4cc38a;
  --g-good: #f6bb3a;
  --g-ok: #ff8f4d;
  --g-off: #f0566a;

  --c-feed: #ff9fb6;
  --c-feed2: #ffc4a3;
  --c-nap: #a7d8ff;
  --c-night: #8f7fe0;
  --c-poo: #d9a066;
  --c-paci: #c9b6ff;

  --r: 22px;
  --shadow: 0 6px 0 #f5d6c9, 0 10px 24px rgba(214, 140, 120, 0.12);
  --font-h: 'Jua', 'Gowun Dodum', system-ui, sans-serif;
  --font: 'Gowun Dodum', system-ui, -apple-system, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  --tabbar-h: 68px;
  color-scheme: light;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 8%, #ffe1ea 0 60px, transparent 61px),
    radial-gradient(circle at 92% 22%, #e3f3ff 0 46px, transparent 47px),
    radial-gradient(circle at 6% 62%, #fff2c2 0 38px, transparent 39px),
    radial-gradient(circle at 96% 80%, #e2f8ef 0 54px, transparent 55px),
    var(--bg);
  background-attachment: fixed;
  min-height: 100vh;
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 16px);
  overflow-x: hidden;
}
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
input, textarea { font: inherit; color: var(--ink); }
img { display: block; max-width: 100%; }
h1, h2, h3 { font-family: var(--font-h); font-weight: 400; margin: 0; letter-spacing: -0.2px; }
h2 { font-size: 20px; }
h3 { font-size: 19px; margin-bottom: 8px; }
.muted { color: var(--ink2); }
.small { font-size: 13px; }

/* ---------- 상단 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: calc(env(safe-area-inset-top) + 10px) 16px 10px;
  background: rgba(255, 244, 236, 0.86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  max-width: 640px; margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 10px; text-align: left; }
.brand img { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; border: 3px solid #fff; box-shadow: 0 0 0 2px var(--pink); }
.brand b { font-family: var(--font-h); font-size: 20px; display: block; line-height: 1.1; }
.brand small { font-size: 12px; color: var(--ink2); }
.top-actions { display: flex; align-items: center; gap: 6px; }
.who-btn { display: flex; align-items: center; gap: 6px; padding: 4px 12px 4px 4px; border-radius: 999px; background: #fff; box-shadow: 0 3px 0 var(--line); font-family: var(--font-h); font-size: 15px; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; background: #fff; box-shadow: 0 3px 0 var(--line); font-size: 18px; display: grid; place-items: center; }

.ava { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; border: 2px solid #fff; flex: none; }
.ava.xs { width: 24px; height: 24px; }
.ava.lg { width: 110px; height: 110px; border-width: 5px; }

#app { max-width: 640px; margin: 0 auto; padding: 4px 16px 0; }

/* ---------- 탭바 ---------- */
.tabbar {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 30;
  width: min(608px, calc(100% - 24px)); height: var(--tabbar-h);
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: #fff; border-radius: 26px;
  box-shadow: 0 6px 0 #f1cfc2, 0 14px 30px rgba(190, 110, 90, 0.18);
  padding: 6px;
}
.tabbar button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border-radius: 20px; font-size: 12px; color: var(--ink2); transition: background 0.2s, transform 0.15s; }
.tabbar button i { font-style: normal; font-size: 22px; transition: transform 0.2s; }
.tabbar button.on { background: linear-gradient(180deg, #ffe3ea, #ffd3df); color: var(--pink-d); font-weight: 700; }
.tabbar button.on i { transform: translateY(-2px) scale(1.12); }
.tabbar button:active { transform: scale(0.94); }

/* ---------- 공용 ---------- */
.card { background: var(--card); border-radius: var(--r); padding: 18px 16px; margin: 14px 0; box-shadow: var(--shadow); }
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.link { color: var(--pink-d); font-weight: 700; font-size: 14px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 46px; padding: 0 20px; border-radius: 16px;
  background: var(--pink); color: #fff; font-family: var(--font-h); font-size: 17px;
  box-shadow: 0 4px 0 var(--pink-d); transition: transform 0.1s, box-shadow 0.1s;
}
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--pink-d); }
.btn.sm { min-height: 36px; padding: 0 14px; font-size: 15px; border-radius: 12px; }
.btn.ghost { background: #fff; color: var(--ink2); box-shadow: 0 4px 0 var(--line), inset 0 0 0 2px var(--line); }
.btn.soft { background: #fff3f6; color: var(--pink-d); box-shadow: 0 3px 0 #ffd6e0; font-size: 15px; min-height: 42px; padding: 0 12px; }
.btn.wide { width: 100%; margin-top: 12px; }
.tag { display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 999px; background: var(--bg2); color: var(--cocoa); margin-left: 6px; vertical-align: 2px; font-family: var(--font); }
.empty { text-align: center; padding: 18px 0 6px; color: var(--ink2); }
.empty img { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; margin: 0 auto 10px; opacity: 0.85; }
.loading { text-align: center; padding: 30px; color: var(--ink2); }

/* ---------- 히어로 ---------- */
.hero { display: flex; align-items: center; gap: 16px; padding: 12px 4px 4px; }
.hero-ava { position: relative; flex: none; }
.hero-ava img { width: 92px; height: 92px; border-radius: 50%; object-fit: cover; border: 5px solid #fff; box-shadow: 0 0 0 3px var(--pink), 0 8px 18px rgba(240, 106, 141, 0.25); animation: bob 3.2s ease-in-out infinite; }
.hero-badge { position: absolute; bottom: -6px; left: 50%; transform: translateX(-50%); white-space: nowrap; background: var(--butter); font-family: var(--font-h); font-size: 13px; padding: 3px 10px; border-radius: 999px; box-shadow: 0 2px 0 #eec65a; }
.hero h1 { font-size: 25px; line-height: 1.2; }
.hero p { margin: 4px 0 0; color: var(--ink2); font-size: 14px; }
@keyframes bob { 50% { transform: translateY(-4px) rotate(-2deg); } }

.date-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 14px 0 0; }
.date-label { flex: 1; height: 44px; border-radius: 16px; background: #fff; box-shadow: 0 3px 0 var(--line); font-family: var(--font-h); font-size: 18px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.date-label em { font-style: normal; font-family: var(--font); font-size: 12px; background: var(--mint); padding: 2px 8px; border-radius: 999px; }
.date-label em.back { background: var(--butter); }

/* ---------- 기상 카드 ---------- */
.wake-card { background: linear-gradient(160deg, #fff7d6, #ffe7c9); }
.wake-card h2 { font-size: 21px; }
.wake-card p { margin: 6px 0 12px; font-size: 14px; }
.wake-row { display: flex; gap: 8px; }
.wake-row input { flex: 1; min-width: 0; height: 50px; border-radius: 16px; border: 2px solid #f6d58e; background: #fff; padding: 0 12px; font-size: 22px; font-family: var(--font-h); }
.wake-set { display: flex; align-items: center; gap: 14px; }
.wake-set .sun { font-size: 34px; animation: spin 12s linear infinite; display: inline-block; }
.wake-set small { display: block; font-size: 12px; color: var(--ink2); }
.wake-set b { font-family: var(--font-h); font-size: 26px; font-weight: 400; }
.wake-set .btn { margin-left: auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 요약 칩 ---------- */
.chips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 14px 0; }
.chip { background: #fff; border-radius: 18px; padding: 10px 10px 9px; box-shadow: 0 4px 0 var(--line); display: flex; flex-direction: column; gap: 1px; position: relative; overflow: hidden; }
.chip i { font-style: normal; font-size: 18px; }
.chip b { font-family: var(--font-h); font-weight: 400; font-size: 24px; line-height: 1.1; }
.chip b small { font-size: 13px; margin-left: 2px; color: var(--ink2); }
.chip span { font-size: 11.5px; color: var(--ink2); }
.chip.feed { background: #fff0f4; }
.chip.sleep { background: #eef7ff; }
.chip.poo { background: #fff5e8; }
.chip.paci { background: #f4efff; }
.chip.night { background: #efedff; }
.chip .bar { height: 6px; background: #ffd9e3; border-radius: 9px; margin-top: 5px; overflow: hidden; }
.chip .bar div { height: 100%; background: var(--pink); border-radius: 9px; transition: width 0.5s; }

.now-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.now-box { background: linear-gradient(150deg, #ffd9e4, #ffc9d7); border-radius: 18px; padding: 12px 14px; box-shadow: 0 4px 0 #f8b7c8; }
.now-box b { display: block; font-family: var(--font-h); font-weight: 400; font-size: 16px; }
.now-box small { font-size: 13px; color: var(--ink2); }
.now-box.next { background: linear-gradient(150deg, #e2f6ee, #cdeedf); box-shadow: 0 4px 0 #b2e2cc; }
.now-box.calm { background: linear-gradient(150deg, #e7ecff, #d8deff); box-shadow: 0 4px 0 #c3cbf6; }
.now-wrap .now-box:only-child { grid-column: 1 / -1; }

/* ---------- 색 범례 ---------- */
.grade-legend { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 12px; color: var(--ink2); margin-bottom: 12px; }
.grade-legend span { display: inline-flex; align-items: center; gap: 4px; }
.grade-legend i { width: 12px; height: 12px; border-radius: 4px; }
.g-great i, .grade-legend .g-great i { background: var(--g-great); }
.grade-legend .g-good i { background: var(--g-good); }
.grade-legend .g-ok i { background: var(--g-ok); }
.grade-legend .g-off i { background: var(--g-off); }

/* ---------- 타임라인 ---------- */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ''; position: absolute; left: 81px; top: 14px; bottom: 14px; width: 4px; border-radius: 4px; background: repeating-linear-gradient(180deg, #ffd6e0 0 8px, transparent 8px 14px); }
.tl-item { display: grid; grid-template-columns: 58px 38px 1fr 28px; align-items: center; gap: 0 6px; padding: 6px 0; cursor: pointer; position: relative; }
.tl-time { text-align: right; line-height: 1.15; padding-right: 2px; }
.tl-time b { font-family: var(--font-h); font-weight: 400; font-size: 17px; display: block; }
.tl-time small { font-size: 12px; color: var(--ink2); display: block; }
.tl-time s { font-size: 10.5px; color: #c4aaa1; display: block; }
.tl-dot { width: 38px; height: 38px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-size: 19px; z-index: 1; box-shadow: 0 0 0 3px #ffe1e8; transition: transform 0.2s; }
.tl-card { background: #fffaf7; border: 2px solid var(--line); border-radius: 16px; padding: 9px 12px; min-width: 0; transition: transform 0.15s, background 0.2s, border-color 0.2s; }
.tl-item:active .tl-card { transform: scale(0.98); }
.tl-head { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.tl-head b { font-family: var(--font-h); font-weight: 400; font-size: 17px; }
.tl-head .tag { margin-left: 0; }
.tl-meta { font-size: 12.5px; color: var(--ink2); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.tl-meta b { color: var(--ink); }
.tl-check { width: 28px; height: 28px; border-radius: 10px; border: 2.5px dashed #f2c3cf; display: grid; place-items: center; color: #fff; font-weight: 900; font-size: 16px; }
.k-nap .tl-card { background: #f4faff; border-color: #dcefff; }
.k-night .tl-card { background: #f3f1ff; border-color: #e0dbff; }
.k-feed .tl-card { background: #fff5f8; border-color: #ffe0e8; }
.k-bath .tl-card, .k-play .tl-card { background: #f3fcf8; border-color: #d5f2e5; }
.k-wake .tl-card { background: #fffbea; border-color: #ffefb3; }

.tl-item.now .tl-dot { transform: scale(1.12); box-shadow: 0 0 0 3px var(--pink), 0 0 0 8px rgba(255, 143, 171, 0.25); animation: pulse 1.6s ease-in-out infinite; }
.tl-item.now .tl-card { border-color: var(--pink); background: #fff0f4; }
.nowtag { font-size: 11px; background: var(--pink); color: #fff; padding: 2px 8px; border-radius: 999px; font-family: var(--font-h); }
.tl-item.past:not(.done) .tl-card { opacity: 0.62; }
@keyframes pulse { 50% { box-shadow: 0 0 0 3px var(--pink), 0 0 0 12px rgba(255, 143, 171, 0.05); } }

.tl-item.done .tl-check { border-style: solid; }
.gbadge { font-size: 11px; padding: 2px 8px; border-radius: 999px; color: #fff; font-family: var(--font-h); }
.tl-item.g-great .tl-check, .tl-item.g-great .gbadge { background: var(--g-great); border-color: var(--g-great); }
.tl-item.g-good .tl-check, .tl-item.g-good .gbadge { background: var(--g-good); border-color: var(--g-good); }
.tl-item.g-ok .tl-check, .tl-item.g-ok .gbadge { background: var(--g-ok); border-color: var(--g-ok); }
.tl-item.g-off .tl-check, .tl-item.g-off .gbadge { background: var(--g-off); border-color: var(--g-off); }
.tl-item.g-great .tl-card { border-color: #a9e6c8; background: #effbf5; }
.tl-item.g-good .tl-card { border-color: #fbe0a0; background: #fffaeb; }
.tl-item.g-ok .tl-card { border-color: #ffc9a8; background: #fff4ec; }
.tl-item.g-off .tl-card { border-color: #f8b2bc; background: #fff0f2; }
.tl-item.done .tl-dot { box-shadow: 0 0 0 3px currentColor; }
.tl-item.g-great .tl-dot { color: var(--g-great); }
.tl-item.g-good .tl-dot { color: var(--g-good); }
.tl-item.g-ok .tl-dot { color: var(--g-ok); }
.tl-item.g-off .tl-dot { color: var(--g-off); }
.tl-item.done .tl-check::after { content: '✓'; }

.quick-night { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.foot-tip { font-size: 13px; color: var(--ink2); background: var(--bg); border-radius: 14px; padding: 10px 12px; margin: 12px 0 0; }

/* ---------- 자는 중 배너 ---------- */
#sleepBanner { max-width: 640px; margin: 0 auto; padding: 0 16px; }
.sleep-banner { display: flex; align-items: center; gap: 10px; background: linear-gradient(120deg, #dff0ff, #e9e3ff); border-radius: 20px; padding: 10px 12px; margin-top: 8px; box-shadow: 0 4px 0 #cbdcf6; }
.sleep-banner.night { background: linear-gradient(120deg, #5c4fb3, #8a77e6); color: #fff; box-shadow: 0 4px 0 #463b94; }
.sleep-banner .zzz { font-size: 26px; animation: bob 2.4s ease-in-out infinite; }
.sleep-banner b { font-family: var(--font-h); font-weight: 400; font-size: 16px; display: block; }
.sleep-banner small { font-size: 12.5px; opacity: 0.8; }
.sleep-banner .btn { margin-left: auto; white-space: nowrap; }
.sleep-banner.night .btn { background: var(--butter); color: var(--ink); box-shadow: 0 4px 0 #e2bc4d; }

/* ---------- 기록 탭 ---------- */
.ago { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.ago div { background: #fff; border-radius: 18px; padding: 10px; box-shadow: 0 4px 0 var(--line); display: flex; flex-direction: column; min-width: 0; }
.ago i { font-style: normal; font-size: 20px; }
.ago span { font-size: 11.5px; color: var(--ink2); }
.ago b { font-family: var(--font-h); font-weight: 400; font-size: 16px; line-height: 1.2; }
.ago small { font-size: 11px; color: var(--ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 10px; }
.quick-grid button { aspect-ratio: 1 / 1; border-radius: 20px; background: #fff7f3; box-shadow: 0 4px 0 var(--line); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 12.5px; transition: transform 0.1s; }
.quick-grid button i { font-style: normal; font-size: 28px; }
.quick-grid button:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--line); }
.q-formula, .q-breast, .q-pumped { background: #fff0f4 !important; }
.q-sleep { background: #eaf5ff !important; }
.q-pee { background: #ecf8ff !important; }
.q-poo { background: #fff3e2 !important; }
.q-pacifier { background: #f3eeff !important; }
.q-bath { background: #e9faf3 !important; }
.mini-sum { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.mini-sum span { font-size: 12.5px; background: var(--bg); padding: 5px 10px; border-radius: 999px; }
.log-list { list-style: none; margin: 0; padding: 0; }
.log-row { display: grid; grid-template-columns: 52px 34px 1fr auto; align-items: center; gap: 8px; padding: 10px 2px; border-bottom: 2px dashed var(--line); cursor: pointer; }
.log-row:last-child { border-bottom: 0; }
.lt { font-family: var(--font-h); font-size: 16px; text-align: right; line-height: 1.1; }
.lt em { display: block; font-style: normal; font-size: 10px; color: var(--c-night); font-family: var(--font); }
.li { width: 34px; height: 34px; border-radius: 50%; background: var(--bg); display: grid; place-items: center; font-size: 18px; }
.ld { font-size: 14.5px; min-width: 0; }
.ld small { display: block; color: var(--ink2); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ld .tag.g-great { background: #d6f5e6; color: #23885a; }
.ld .tag.g-good { background: #fff0c8; color: #a77a0c; }
.ld .tag.g-ok { background: #ffe2d1; color: #c25a1d; }
.ld .tag.g-off { background: #ffdbe0; color: #c1283d; }

/* ---------- 통계 ---------- */
.stats-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.avg-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.avg-cards div { border-radius: 20px; padding: 12px 14px; box-shadow: 0 4px 0 var(--line); display: flex; flex-direction: column; }
.avg-cards i { font-style: normal; font-size: 22px; }
.avg-cards b { font-family: var(--font-h); font-weight: 400; font-size: 28px; line-height: 1.1; }
.avg-cards b small { font-size: 14px; color: var(--ink2); margin-left: 2px; }
.avg-cards span { font-size: 12.5px; color: var(--ink2); }
.c-feed { background: #fff0f4; } .c-sleep { background: #eef1ff; } .c-poo { background: #fff4e6; } .c-ok { background: #eafaf2; }
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid { stroke: #f6e4dc; stroke-width: 1; }
.chart .ax { font-size: 9.5px; fill: #ad918a; font-family: var(--font); }
.chart .goal { stroke: var(--pink-d); stroke-width: 1.5; stroke-dasharray: 5 4; }
.chart .goal-t { font-size: 10px; fill: var(--pink-d); font-family: var(--font-h); }
.legend { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--ink2); margin-top: 6px; }
.legend span { display: inline-flex; align-items: center; gap: 4px; }
.legend i { width: 11px; height: 11px; border-radius: 4px; }
.growth { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.growth div { background: var(--bg); border-radius: 16px; padding: 10px; text-align: center; }
.growth span { font-size: 12px; color: var(--ink2); display: block; }
.growth b { font-family: var(--font-h); font-weight: 400; font-size: 20px; display: block; }
.growth small { font-size: 11px; color: var(--ink2); }

/* ---------- 세그먼트 ---------- */
.seg { display: flex; background: var(--bg); border-radius: 14px; padding: 4px; gap: 4px; }
.seg button { flex: 1; min-height: 38px; padding: 0 12px; border-radius: 11px; font-size: 14.5px; color: var(--ink2); white-space: nowrap; }
.seg button.on { background: #fff; color: var(--pink-d); font-family: var(--font-h); box-shadow: 0 2px 0 var(--line); }

/* ---------- 우리 둘 ---------- */
.us h2 { margin-bottom: 12px; }
.bubble { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 12px; }
.bubble .ava { width: 46px; height: 46px; box-shadow: 0 0 0 2px var(--sky); }
.bubble.mom .ava { box-shadow: 0 0 0 2px var(--pink); }
.b-body { flex: 1; min-width: 0; background: #eef7ff; border-radius: 4px 18px 18px 18px; padding: 10px 12px; position: relative; }
.bubble.mom .b-body { background: #fff0f4; }
.b-body small { font-family: var(--font-h); font-size: 13px; color: var(--ink2); }
.b-body p { margin: 4px 0 0; white-space: pre-wrap; word-break: break-word; line-height: 1.5; }
.b-body textarea { width: 100%; border: 2px dashed rgba(0, 0, 0, 0.08); border-radius: 12px; background: rgba(255, 255, 255, 0.75); padding: 8px 10px; margin: 6px 0 8px; resize: vertical; font-size: 15px; line-height: 1.5; }
.b-body textarea:focus { outline: none; border-color: var(--pink); background: #fff; }
.b-body .btn { float: right; }
.b-body::after { content: ''; display: block; clear: both; }

.polaroids { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 8px; }
.polaroid { margin: 0; background: #fff; padding: 8px 8px 10px; border-radius: 6px; box-shadow: 0 6px 16px rgba(160, 100, 80, 0.18), 0 0 0 1px #f3e3dc; transform: rotate(-2deg); text-align: center; }
.polaroid.mom { transform: rotate(2deg); }
.ph { position: relative; aspect-ratio: 1 / 1; border-radius: 3px; overflow: hidden; background: repeating-linear-gradient(45deg, #fff6f1 0 10px, #ffeee6 10px 20px); }
.ph img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.ph-empty { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; font-size: 14px; color: var(--ink2); font-family: var(--font-h); line-height: 1.5; }
.ph-btn { position: absolute; right: 6px; bottom: 6px; background: var(--pink); color: #fff; font-family: var(--font-h); font-size: 13px; padding: 5px 10px; border-radius: 999px; cursor: pointer; box-shadow: 0 2px 0 var(--pink-d); }
.polaroid:has(.ph-empty) .ph-btn { inset: 0; border-radius: 0; background: transparent; color: transparent; box-shadow: none; }
.polaroid figcaption { margin-top: 8px; font-family: var(--font-h); font-size: 14px; display: flex; align-items: center; justify-content: center; gap: 6px; }
.polaroid .link { margin-top: 4px; }
.album { display: grid; gap: 10px; }
.album-day { text-align: left; background: var(--bg); border-radius: 16px; padding: 10px 12px; }
.album-day b { font-family: var(--font-h); font-weight: 400; font-size: 16px; }
.album-ph { display: flex; gap: 6px; margin: 6px 0; }
.album-ph img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; }
.album-day p { margin: 2px 0 0; font-size: 13px; color: var(--ink2); }

/* ---------- 사람 고르기 ---------- */
.pick-who { text-align: center; padding: 30px 6px; }
.pick-baby { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; margin: 0 auto 14px; border: 6px solid #fff; box-shadow: 0 0 0 3px var(--pink); animation: bob 3s ease-in-out infinite; }
.pick-who h1 { font-size: 28px; }
.who-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 22px; }
.who-choices button { background: #fff; border-radius: 24px; padding: 18px 10px; box-shadow: var(--shadow); display: flex; flex-direction: column; align-items: center; gap: 10px; font-family: var(--font-h); font-size: 20px; }
.who-choices .dad .ava { box-shadow: 0 0 0 4px var(--sky); }
.who-choices .mom .ava { box-shadow: 0 0 0 4px var(--pink); }

/* ---------- 바텀시트 ---------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 50; }
.sheet-dim { position: absolute; inset: 0; background: rgba(90, 63, 55, 0.35); opacity: 0; transition: opacity 0.2s; }
.sheet {
  position: absolute; left: 50%; bottom: 0; width: min(640px, 100%);
  transform: translate(-50%, 100%); transition: transform 0.25s cubic-bezier(0.2, 0.9, 0.3, 1.1);
  background: #fff; border-radius: 28px 28px 0 0; padding: 8px 18px calc(18px + env(safe-area-inset-bottom));
  max-height: 90vh; overflow-y: auto; overscroll-behavior: contain;
}
.sheet-wrap.open .sheet-dim { opacity: 1; }
.sheet-wrap.open .sheet { transform: translate(-50%, 0); }
.sheet-grip { width: 44px; height: 5px; border-radius: 5px; background: var(--line); margin: 4px auto 12px; }
.sheet h3 { font-size: 22px; }
.sheet .muted { margin: 4px 0 10px; font-size: 14px; }
.plan-info { display: flex; justify-content: space-between; align-items: center; background: var(--bg); border-radius: 14px; padding: 10px 12px; margin: 8px 0; font-size: 14px; }
.plan-info b { font-family: var(--font-h); font-weight: 400; font-size: 17px; }
.tip { background: #fffbea; border-radius: 14px; padding: 10px 12px; font-size: 13.5px; line-height: 1.55; margin: 0 0 6px; }
.field { display: block; margin: 12px 0; }
.field > span { display: block; font-size: 13px; color: var(--ink2); margin-bottom: 6px; font-family: var(--font-h); }
.field input, .field textarea { width: 100%; min-height: 48px; border-radius: 14px; border: 2px solid var(--line); background: #fffaf7; padding: 10px 12px; font-size: 17px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--pink); background: #fff; }
.field textarea { font-size: 15px; resize: vertical; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.two .field { margin: 12px 0 0; }
.stepper { display: flex; gap: 8px; }
.stepper button { width: 54px; height: 54px; border-radius: 16px; background: var(--bg2); font-size: 26px; flex: none; }
.stepper input { text-align: center; font-family: var(--font-h); font-size: 26px; min-height: 54px; }
.quick-amt { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.quick-amt button { padding: 7px 12px; border-radius: 999px; background: var(--bg); font-size: 14px; }
.quick-amt button.on, .quick-amt button:active { background: var(--pink); color: #fff; }
.sheet-actions { display: flex; gap: 10px; margin-top: 18px; }
.sheet-actions .btn { flex: 1; }
.sheet-actions .btn.ghost { flex: 0 0 auto; }
.toggle { display: flex; gap: 10px; align-items: flex-start; background: var(--bg); padding: 12px; border-radius: 14px; margin: 14px 0; font-size: 15px; }
.toggle input { width: 22px; height: 22px; accent-color: var(--pink); margin-top: 2px; flex: none; }
.toggle small { display: block; font-size: 12.5px; color: var(--ink2); }
.guide-imgs { display: grid; gap: 10px; }
.guide-imgs img { border-radius: 14px; width: 100%; }
.zoom { width: 100%; border-radius: 16px; }

/* ---------- 토스트 ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + 26px + env(safe-area-inset-bottom)); z-index: 60;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 999px; font-size: 14.5px;
  transition: opacity 0.2s, transform 0.2s; max-width: calc(100% - 32px); text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 작은 폰 ---------- */
@media (max-width: 340px) {
  .chips { grid-template-columns: repeat(2, 1fr); }
  .tl-item { grid-template-columns: 52px 34px 1fr 24px; }
  .timeline::before { left: 73px; }
  .tl-dot { width: 34px; height: 34px; font-size: 17px; }
  .quick-grid { grid-template-columns: repeat(3, 1fr); }
  .hero h1 { font-size: 22px; }
  .brand small { display: none; }
}
@media (min-width: 720px) {
  .hero-ava img { width: 110px; height: 110px; }
  .chips { grid-template-columns: repeat(6, 1fr); }
  .avg-cards { grid-template-columns: repeat(4, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
