:root{font-family:system-ui,sans-serif;color:#27221e;background:#fffbf6;line-height:1.6;--ink:#27221e;--plum:#6d3158;--line:#e8dcd3;--paper:#fff;--peach:#f8e4d8}
*{box-sizing:border-box}body{margin:0}a{color:var(--plum);text-underline-offset:.2em}button,input,select,textarea{font:inherit}button,a,input,select,textarea{touch-action:manipulation}:focus-visible{outline:3px solid #8e4275;outline-offset:3px}
.bar,main,footer{width:min(1100px,calc(100% - 2rem));margin:auto}.site-header{background:#fff;border-bottom:1px solid var(--line)}.bar{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:1rem 0;flex-wrap:wrap}.brand{color:var(--ink);font-weight:850;text-decoration:none;font-size:1.22rem}.brand span{color:var(--plum);margin-left:.22em}nav{display:flex;gap:.75rem 1.3rem;flex-wrap:wrap}nav a{text-decoration:none;color:var(--ink);font-weight:600}nav a[aria-current]{color:var(--plum);text-decoration:underline}.urgent-link{color:#951e36;font-weight:750}
main{min-height:72vh;padding:2rem 0 3rem}h1,h2,h3,p{margin-top:0}h1,h2{line-height:1.2}h1{font-size:clamp(2rem,6vw,4rem);letter-spacing:-.045em;margin-bottom:1rem}h2{font-size:1.45rem}h3{font-size:1.12rem;margin-bottom:.4rem}.intro{max-width:62ch;color:#5e4c45}.hero{padding:clamp(1.5rem,5vw,3.5rem);border-radius:2rem;background:radial-gradient(ellipse at 94% 8%,#f3c4bd,transparent 58%),var(--peach);margin-bottom:1.3rem}.eyebrow{font-size:.9rem;font-weight:750;color:#703756}.count{font-size:clamp(2.4rem,9vw,5.2rem);font-weight:850;line-height:1.12;letter-spacing:-.055em}.card{background:var(--paper);border:1px solid var(--line);border-radius:1.15rem;padding:1.25rem;margin-bottom:1rem}.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr));gap:1rem}.grid>.card{margin:0}.stack>*+*{margin-top:1rem}.actions{display:flex;flex-wrap:wrap;gap:.65rem;align-items:center}.button,button{display:inline-block;border:1px solid var(--plum);background:var(--plum);color:white;border-radius:.65rem;padding:.5rem .85rem;text-decoration:none;cursor:pointer;font-weight:650}.secondary{background:white;color:var(--plum)}.alert{background:#fff0ee;border-color:#e7b7b7}.muted{color:#614f49}.timeline{display:grid;grid-template-columns:repeat(auto-fill,minmax(8rem,1fr));gap:.6rem;margin-bottom:1.5rem}.timeline a{padding:.65rem;background:white;border:1px solid var(--line);border-radius:.7rem;text-decoration:none}.timeline a.current{font-weight:750;border-color:var(--plum);background:#f8edf4}label{display:block;font-weight:650}input:not([type=checkbox]),select,textarea{display:block;width:100%;border:1px solid #a68e81;background:white;color:var(--ink);border-radius:.55rem;padding:.5rem;margin:.25rem 0 .8rem}input[type=checkbox]{margin-right:.5rem;accent-color:var(--plum)}form{max-width:40rem}details summary{cursor:pointer;font-weight:700}.check{padding:.4rem 0}.records{padding-left:1.2rem}.records li{margin:.55rem 0}.records button{margin-left:.55rem;padding:.2rem .5rem}.section{margin-top:1.5rem}footer{border-top:1px solid var(--line);padding:1rem 0 2rem;color:#614f49;display:flex;flex-wrap:wrap;justify-content:space-between;gap:.5rem}progress{width:min(100%,30rem);accent-color:var(--plum)}[hidden]{display:none!important}

body.custom-background {
  background: linear-gradient(#fffbf6d9, #fff8f1df), var(--personal-bg) center / cover no-repeat fixed;
}
.custom-background .site-header { background: #fffdfaf5; }
.custom-background footer { background: #fffaf4e8; border-radius: .75rem; padding-inline: 1rem; }
.illustrated-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .92fr);
  align-items: center;
  gap: 1.5rem;
  background: linear-gradient(110deg, #f7ddd6, #fff3ec 72%);
}
.hero-copy { position: relative; z-index: 1; min-width: 0; }
.hero-copy .count { font-size: clamp(2.1rem, 6vw, 4.6rem); overflow-wrap: anywhere; }
.hero-art { display: block; width: 100%; height: auto; border-radius: 1.4rem; mix-blend-mode: multiply; }
.background-preview { display: block; width: min(100%, 38rem); max-height: 22rem; object-fit: cover; border-radius: .85rem; margin-bottom: 1rem; }
button:disabled { opacity: .62; cursor: wait; }
@media (max-width: 650px) {
  .illustrated-hero { grid-template-columns: 1fr; gap: .8rem; }
  .hero-art { width: min(100%, 24rem); justify-self: center; }
  body.custom-background { background-attachment: scroll; }
}
.custom-background .illustrated-hero {
  background: linear-gradient(100deg, #fff3edf7 12%, #fff3eddf 46%, #fff3ed45), var(--personal-bg) center / cover no-repeat;
}
.custom-background .hero-art { mix-blend-mode: normal; }
@media (max-width: 650px) {
  .custom-background .illustrated-hero {
    background: linear-gradient(#fff3edf5 10%, #fff3ede6 52%, #fff3ed70), var(--personal-bg) center / cover no-repeat;
  }
}

[data-pregnancy-mode] { margin: 1rem 0; padding: 0; border: 0; min-width: 0; }
.age-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.countdown-panel {
  display: grid;
  place-items: center;
  min-height: clamp(19rem, 47vw, 32rem);
  margin-bottom: 1.25rem;
  padding: clamp(.65rem, 3vw, 2rem);
  text-align: center;
  color: white;
  border-radius: 1.6rem;
  background: linear-gradient(#17131726,#1713174d), url("assets/baby-feet-countdown.webp") center 51% / cover no-repeat, #342d31;
}
.custom-background .countdown-panel {
  background: linear-gradient(#17131726,#1713174d), var(--personal-bg) center / cover no-repeat, #342d31;
}
.countdown-overlay {
  width: min(100%, 30rem);
  padding: clamp(.8rem, 3vw, 1.6rem);
  border: 1px solid #ffffff3d;
  border-radius: 1.1rem;
  background: #211b20c9;
}
.countdown-overlay h2 { margin-bottom: .8rem; font-size: clamp(1rem, 3vw, 1.45rem); }
.countdown-values { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: .15rem; }
.countdown-values span { display: block; font-size: clamp(.73rem, 2vw, .95rem); }
.countdown-values .countdown-number {
  font-size: clamp(1.25rem, 5.5vw, 3rem);
  font-weight: 850;
  font-variant-numeric: tabular-nums;
  line-height: 1.08;
}
.countdown-caption { margin: .8rem 0 0; }

.growth-card {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 1rem;
  background: #f8edf4;
}
.growth-fruit {
  display: grid;
  width: clamp(4rem, 14vw, 9rem);
  aspect-ratio: 1;
  place-items: center;
  border-radius: 50%;
  background: #fff8f3;
  font-size: clamp(2.2rem, 7vw, 5rem);
}
.growth-size { font-size: 1.2rem; font-weight: 750; }
.family-space .grid { grid-template-columns: repeat(auto-fit,minmax(min(100%,240px),1fr)); }
.family-photo { display: block; margin-bottom: .75rem; }
.family-photo img { display: block; width: 100%; max-height: 18rem; object-fit: contain; background: #faf4ef; border-radius: .75rem; }
.family-note { white-space: pre-wrap; overflow-wrap: anywhere; }
#family-invite { overflow-wrap: anywhere; user-select: all; }
.visit-group { margin: 1rem 0; }
.visit-item { border-bottom: 1px solid var(--line); padding: .7rem 0; }
.visit-item p { margin: .35rem 0; }

@media print {
  body:has(#visit-packet) { color: #000; background: #fff; }
  body:has(#visit-packet) :is(header,footer,main > :not(.family-space),.family-space > :not(#visit-packet),.visit-controls,.visit-group:not(:has(input:checked)),.visit-item:not(:has(input:checked))) {
    display: none !important;
  }
  #visit-packet { background: #fff; border: 0; }
  .visit-item { break-inside: avoid; }
}
