/* Original family illustrations, shown briefly on arrival. No visitor controls. */
.family-welcome[hidden] { display: none !important; }
.family-welcome {
  position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center;
  padding: 24px; background: #fffcf2; color: #242424; pointer-events: none;
  animation: family-failsafe 2450ms step-end forwards;
}
.family-welcome-inner { width: min(100%, 340px); text-align: center; }
.family-scene { display: block; width: 100%; height: auto; overflow: visible; }
.family-welcome-brand { margin: 1px 0 5px; font: 700 22px/1.3 Arial, sans-serif; letter-spacing: .015em; }
.family-welcome-line { margin: 0; font: 400 14px/1.5 Arial, sans-serif; }
.family-person, .family-heart, .family-spark { transform-box: fill-box; transform-origin: center bottom; animation: family-pop 580ms cubic-bezier(.22,.75,.25,1) var(--arrival) both; }
.family-wave { transform-box: view-box; transform-origin: 0 0; animation: family-wave 640ms ease-in-out calc(var(--arrival) + 220ms) both; }
@keyframes family-wave {
  0%, 100% { transform: rotate(0deg); }
  20% { transform: rotate(-14deg); }
  40% { transform: rotate(12deg); }
  60% { transform: rotate(-12deg); }
  80% { transform: rotate(8deg); }
}
.family-heart { transform-origin: center; animation-duration: 420ms; }
.family-spark { transform-origin: center; animation-duration: 340ms; }
.family-welcome.is-leaving { opacity: 0; transition: opacity 220ms ease; }
@keyframes family-pop {
  0% { opacity: 0; transform: translateY(20px) scale(.72); }
  65% { opacity: 1; transform: translateY(-5px) scale(1.035); }
  82% { transform: translateY(2px) scale(.985); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
/* An interrupted script must never leave the welcome screen covering content. */
@keyframes family-failsafe { to { visibility: hidden; } }
@media (prefers-reduced-motion: reduce) {
  .family-welcome { display: none !important; }
  html { scroll-behavior: auto; }
}
@media (max-height: 420px) {
  .family-welcome-inner { width: 220px; }
  .family-welcome-brand { font-size: 18px; }
  .family-welcome-line { font-size: 12px; }
}
@media print { .family-welcome { display: none !important; } }
