/* Baby Album — Web Demo · 奶油 Claymorphism 风 */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
  /* 奶油暖色系 — 宝宝/成长/温柔可爱 */
  --bg:        #FFF8F2;   /* warm cream */
  --bg-tint:   #FFEFE3;
  --paper:     #FFFFFF;
  --ink:       #2A1F1A;   /* warm dark */
  --ink-2:     #6B5A52;
  --ink-3:     #A89A92;
  --line:      #F2E6D9;
  --line-2:    #E6D3BF;

  --primary:   #FF8A9A;   /* soft coral pink */
  --primary-d: #E85D72;
  --pink-tint: #FFE9EE;
  --sage:      #8FBF9E;   /* spring sage */
  --sage-tint: #E6F2E9;
  --butter:    #FFD89E;   /* butter yellow */
  --butter-t:  #FFF1DA;
  --sky:       #A8C8FF;
  --sky-tint:  #E5EEFF;

  --radius:    20px;
  --radius-sm: 14px;
  --radius-xs: 10px;

  /* Claymorphism shadows: outer soft + inner highlight */
  --clay:      0 1px 0 #fff inset,
               0 -2px 6px rgba(232,93,114,0.05) inset,
               0 10px 24px -10px rgba(232,93,114,0.18),
               0 4px 10px -4px rgba(42,31,26,0.06);
  --clay-lg:   0 1px 0 #fff inset,
               0 -3px 8px rgba(232,93,114,0.06) inset,
               0 24px 48px -16px rgba(232,93,114,0.22),
               0 8px 20px -8px rgba(42,31,26,0.08);
  --press:     inset 0 2px 6px rgba(42,31,26,0.10),
               inset 0 -1px 0 rgba(255,255,255,0.6);

  --t-fast:    140ms cubic-bezier(.2,.7,.2,1);
  --t-med:     260ms cubic-bezier(.2,.7,.2,1);
}

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

body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(60% 50% at 10% 0%, #FFE3EC 0%, transparent 60%),
    radial-gradient(50% 40% at 90% 10%, #FFF1DA 0%, transparent 60%),
    var(--bg);
  background-attachment: fixed;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
.serif { font-family: 'Fraunces', 'PingFang SC', serif; font-weight: 600; letter-spacing: -0.005em; }
a { color: inherit; text-decoration: none; }

/* ---- Phone frame ---- */
.phone {
  width: 390px;
  max-width: 100%;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
  background: var(--bg);
  padding-bottom: 92px;
}
.phone-inner { padding: 18px 18px 16px; }

/* Status bar */
.statusbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px 4px;
  font-size: 14px; font-weight: 600; color: var(--ink);
}
.statusbar .icons { display: inline-flex; gap: 6px; align-items: center; opacity: 0.8; }
.statusbar svg { width: 14px; height: 14px; }

/* Top app bar */
.appbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 4px 18px;
}
.appbar .title {
  font: 600 26px/1.1 'Fraunces', serif;
  letter-spacing: -0.01em;
}
.appbar .icon-btn {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--paper); display: grid; place-items: center;
  box-shadow: var(--clay);
  border: 1px solid var(--line);
}
.appbar .icon-btn svg { width: 18px; height: 18px; }

/* Bottom tab bar */
.tabbar {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 84px;
  background: rgba(255,248,242,0.92);
  backdrop-filter: saturate(140%) blur(16px);
  -webkit-backdrop-filter: saturate(140%) blur(16px);
  border-top: 1px solid var(--line);
  display: flex; align-items: stretch; padding: 8px 12px 22px;
  z-index: 5;
}
.tabbar .tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 6px 0;
  color: var(--ink-3);
  font-size: 11px; font-weight: 600;
}
.tabbar .tab.active { color: var(--primary-d); }
.tabbar .tab .ico {
  width: 44px; height: 28px; border-radius: 14px;
  display: grid; place-items: center;
  transition: background var(--t-fast);
}
.tabbar .tab.active .ico {
  background: var(--pink-tint);
}
.tabbar svg { width: 22px; height: 22px; }

/* ---- Cards ---- */
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--clay);
  padding: 16px;
}
.card-lg { padding: 20px; border-radius: 24px; box-shadow: var(--clay-lg); }

/* ---- Hero (Welcome) ---- */
.welcome-hero {
  position: relative;
  height: 360px;
  border-radius: 28px;
  background:
    radial-gradient(70% 80% at 20% 20%, #FFD3D9 0%, transparent 60%),
    radial-gradient(60% 70% at 90% 30%, #FFE6B8 0%, transparent 60%),
    radial-gradient(60% 70% at 50% 100%, #C9E5D1 0%, transparent 60%),
    var(--pink-tint);
  border: 1px solid var(--line);
  box-shadow: var(--clay-lg);
  display: grid; place-items: center;
  overflow: hidden;
}
.welcome-hero .float {
  position: absolute;
  font-size: 28px;
  filter: drop-shadow(0 6px 10px rgba(232,93,114,0.18));
}
.welcome-hero .f1 { top: 22px;  left: 28px;  transform: rotate(-8deg); }
.welcome-hero .f2 { top: 56px;  right: 36px; transform: rotate(12deg); font-size: 34px; }
.welcome-hero .f3 { bottom: 30px; left: 40px; transform: rotate(8deg); font-size: 32px; }
.welcome-hero .f4 { bottom: 70px; right: 28px; transform: rotate(-12deg); }
.welcome-hero .logo-circle {
  width: 120px; height: 120px; border-radius: 50%;
  background: linear-gradient(180deg, #FFFFFF, var(--pink-tint));
  border: 4px solid #fff;
  box-shadow: 0 1px 0 rgba(255,255,255,0.9) inset, 0 16px 36px -12px rgba(232,93,114,0.35);
  display: grid; place-items: center;
  font-size: 56px;
}

.h1 {
  font: 600 36px/1.1 'Fraunces', serif;
  letter-spacing: -0.015em;
  margin: 24px 0 8px;
}
.h2 {
  font: 600 26px/1.2 'Fraunces', serif;
  letter-spacing: -0.01em;
  margin: 0;
}
.h3 { font: 600 18px/1.3 'Plus Jakarta Sans', sans-serif; margin: 0; }
.eyebrow {
  font-size: 11px; font-weight: 700; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--primary-d);
}
.lead { color: var(--ink-2); font-size: 16px; line-height: 1.55; }
.muted { color: var(--ink-2); }
.soft { color: var(--ink-3); }
.tiny { font-size: 12px; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; height: 52px; padding: 0 22px;
  border-radius: 16px;
  font: 600 15px/1 'Plus Jakarta Sans', sans-serif;
  border: 0; cursor: pointer;
  transition: transform var(--t-fast), box-shadow var(--t-med);
}
.btn-primary {
  background: linear-gradient(180deg, #FF9CAA, var(--primary));
  color: #fff;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.4) inset,
    0 -3px 0 rgba(232,93,114,0.25) inset,
    0 10px 22px -8px rgba(232,93,114,0.5);
}
.btn-primary:hover { transform: translateY(-1px); }
.btn-ghost {
  background: var(--paper); color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: var(--clay);
}
.btn-block { width: 100%; }
.btn svg { width: 18px; height: 18px; }

/* ---- Onboarding form ---- */
.avatar-pick {
  margin: 8px auto;
  width: 110px; height: 110px; border-radius: 55px;
  background: var(--pink-tint);
  border: 3px dashed var(--line-2);
  display: grid; place-items: center;
  font-size: 44px;
  position: relative;
}
.avatar-pick .plus {
  position: absolute; right: -2px; bottom: -2px;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--primary); color: #fff;
  display: grid; place-items: center;
  border: 3px solid var(--bg);
  font-size: 16px; line-height: 1;
}

.field { display: flex; flex-direction: column; gap: 8px; }
.label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.input, .select {
  height: 52px;
  border-radius: 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 0 16px;
  font: 500 15px 'Plus Jakarta Sans', sans-serif;
  color: var(--ink);
  box-shadow: var(--press);
}
.input::placeholder { color: var(--ink-3); }
.input:focus, .select:focus { outline: none; border-color: var(--primary); }

.segments {
  display: flex; gap: 8px;
  background: var(--bg-tint);
  padding: 4px;
  border-radius: 14px;
  border: 1px solid var(--line);
}
.segments .seg {
  flex: 1; height: 40px; border-radius: 10px;
  display: grid; place-items: center;
  font-size: 13px; font-weight: 600; color: var(--ink-2);
  cursor: pointer;
}
.segments .seg.active {
  background: var(--paper); color: var(--ink);
  box-shadow: 0 2px 6px -2px rgba(42,31,26,0.12);
}

/* Filter pills (Library) */
.pills { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 12px; scrollbar-width: none; }
.pills::-webkit-scrollbar { display: none; }
.pill {
  flex: 0 0 auto;
  padding: 8px 14px; border-radius: 999px;
  font-size: 13px; font-weight: 600;
  background: var(--paper); border: 1px solid var(--line);
  color: var(--ink-2);
  box-shadow: 0 2px 6px -2px rgba(42,31,26,0.06);
}
.pill.active {
  background: var(--ink); color: #fff;
  border-color: var(--ink);
}

/* Tags */
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 700;
  background: var(--pink-tint); color: var(--primary-d);
}
.tag.sage { background: var(--sage-tint); color: #3d8c54; }
.tag.butter { background: var(--butter-t); color: #a5712b; }
.tag.sky { background: var(--sky-tint); color: #3a5fb4; }
.tag.dark { background: var(--ink); color: #fff; }

/* Baby card on home */
.baby-card {
  display: flex; align-items: center; gap: 14px;
  padding: 14px;
  background: linear-gradient(180deg, #fff, var(--pink-tint));
  border-radius: 20px;
  border: 1px solid var(--line);
  box-shadow: var(--clay);
}
.baby-avatar {
  width: 56px; height: 56px; border-radius: 50%;
  background: conic-gradient(from 180deg, #FFD3D9, #FFE6B8, #C9E5D1, #FFD3D9);
  display: grid; place-items: center;
  font-size: 28px;
  border: 3px solid #fff;
  box-shadow: 0 6px 14px -6px rgba(232,93,114,0.4);
}
.baby-meta .name { font: 600 17px 'Fraunces', serif; }
.baby-meta .age { color: var(--ink-2); font-size: 13px; }

/* Timeline */
.timeline { display: flex; flex-direction: column; gap: 22px; }
.tl-group .month-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin: 4px 4px 12px;
}
.tl-group .month-head .month {
  font: 600 18px 'Fraunces', serif;
}
.tl-group .month-head .count { color: var(--ink-3); font-size: 13px; font-weight: 600; }
.tl-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
}
.tl-grid.solo { grid-template-columns: 1fr; }
.tl-photo {
  position: relative;
  aspect-ratio: 1;
  border-radius: 16px;
  overflow: hidden;
  background: var(--bg-tint);
  border: 1px solid var(--line);
  box-shadow: 0 6px 14px -8px rgba(42,31,26,0.15);
}
.tl-photo.big { aspect-ratio: 4/5; grid-column: span 2; }
.tl-photo .grad {
  position: absolute; inset: auto 0 0 0; height: 50%;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,0.55));
}
.tl-photo .meta {
  position: absolute; left: 10px; right: 10px; bottom: 10px;
  display: flex; justify-content: space-between; align-items: end;
  color: #fff;
}
.tl-photo .age-chip {
  background: rgba(255,255,255,0.94); color: var(--ink);
  padding: 4px 9px; border-radius: 999px;
  font-size: 11px; font-weight: 700;
}
.tl-photo .scene { font-size: 12px; font-weight: 600; }

/* Photo stand-in (gradient placeholders that look like real photos) */
.photo {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, var(--c1, #FFD3D9) 0%, var(--c2, #FFE6B8) 60%, var(--c3, #FFB8C4) 100%);
  display: grid; place-items: center;
  font-size: 48px;
  filter: saturate(1.05) contrast(1.02);
}
.photo.sage    { --c1: #C9E5D1; --c2: #E8F4ED; --c3: #A5D2B0; }
.photo.butter  { --c1: #FFE6B8; --c2: #FFF1DA; --c3: #FFD080; }
.photo.sky     { --c1: #C9DCFF; --c2: #E5EEFF; --c3: #A8C8FF; }
.photo.pink    { --c1: #FFD3D9; --c2: #FFE9EE; --c3: #FFB8C4; }
.photo.lilac   { --c1: #E2D5FF; --c2: #F1EAFF; --c3: #C9B5FF; }
.photo.peach   { --c1: #FFD7C2; --c2: #FFEAD9; --c3: #FFC09C; }

/* Detail page */
.detail-hero {
  margin: 0 -18px;
  position: relative;
  aspect-ratio: 4/5;
  background: var(--bg-tint);
}
.detail-hero .photo { font-size: 96px; }
.detail-hero .back {
  position: absolute; top: 14px; left: 14px;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,0.94);
  display: grid; place-items: center;
  box-shadow: 0 6px 14px -6px rgba(0,0,0,0.25);
}
.detail-hero .actions {
  position: absolute; top: 14px; right: 14px;
  display: flex; gap: 8px;
}
.detail-hero .iconbtn {
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,0.94);
  display: grid; place-items: center;
  box-shadow: 0 6px 14px -6px rgba(0,0,0,0.25);
}
.detail-hero svg { width: 18px; height: 18px; }

.detail-meta { padding: 18px 0 0; }
.meta-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 4px;
  border-bottom: 1px solid var(--line);
}
.meta-row:last-child { border-bottom: 0; }
.meta-row .k { color: var(--ink-3); font-size: 13px; font-weight: 600; }
.meta-row .v { font-weight: 600; }
.meta-row .v.muted { color: var(--ink-2); font-weight: 500; }

/* Profile page */
.list-group {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--clay);
}
.list-row {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.list-row:last-child { border-bottom: 0; }
.list-row .ico {
  width: 36px; height: 36px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--pink-tint);
}
.list-row .ico.sage   { background: var(--sage-tint); }
.list-row .ico.butter { background: var(--butter-t); }
.list-row .ico.sky    { background: var(--sky-tint); }
.list-row .ico svg { width: 18px; height: 18px; }
.list-row .body { flex: 1; }
.list-row .body .t { font-weight: 600; font-size: 15px; }
.list-row .body .s { color: var(--ink-3); font-size: 12px; margin-top: 2px; }
.list-row .chev { color: var(--ink-3); }

/* Add page (record) — review queue */
.review-card {
  display: flex; gap: 12px;
  padding: 12px;
  background: var(--paper);
  border-radius: 18px;
  border: 1px solid var(--line);
  box-shadow: var(--clay);
}
.review-thumb {
  width: 92px; height: 92px; border-radius: 14px; overflow: hidden;
  background: var(--bg-tint);
  flex: 0 0 auto;
}
.review-body { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.review-body .t { font: 600 15px 'Fraunces', serif; }
.review-body .row { display: flex; gap: 8px; }
.notice {
  padding: 12px 14px;
  background: var(--butter-t);
  border: 1px solid #F5DDB0;
  border-radius: 14px;
  font-size: 13px; line-height: 1.5;
  color: #7a5318;
}

/* Utility */
.col { display: flex; flex-direction: column; }
.row { display: flex; }
.gap-4 { gap: 4px; } .gap-6 { gap: 6px; } .gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-20 { gap: 20px; } .gap-24 { gap: 24px; }
.mt-4 { margin-top: 4px; } .mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-20 { margin-top: 20px; } .mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; }
.text-center { text-align: center; }
.between { justify-content: space-between; }
.center { align-items: center; }
.grow { flex: 1; }

/* Reveal */
.reveal { opacity: 0; transform: translateY(6px); animation: reveal 540ms forwards cubic-bezier(.2,.7,.2,1); }
.reveal.d1 { animation-delay: .04s; }
.reveal.d2 { animation-delay: .12s; }
.reveal.d3 { animation-delay: .20s; }
.reveal.d4 { animation-delay: .28s; }
@keyframes reveal { to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) {
  .reveal { animation: none; opacity: 1; transform: none; }
}
