.kc-family-popup {
  width: min(480px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 0;
  overflow: auto;
  overscroll-behavior: contain;
  border: 4px solid #ffd66b;
  border-radius: 36px;
  background: #fffaf3;
  color: #193e53;
  box-shadow: 0 28px 100px rgba(0,0,0,.3);
  font-family: var(--kc-font, system-ui, sans-serif);
  text-align: center;
  transform-origin: 50% 80%;
}
.kc-family-popup[open] { animation: kcPopupJelly 1s both; }
.kc-family-popup::backdrop { background: rgba(13,35,49,.65); backdrop-filter: blur(6px); }
.kc-family-popup__card {
  position: relative;
  overflow: hidden;
  padding: 22px 30px 28px;
  background: radial-gradient(ellipse at 100% 0, #ffe9a2 0, #ffe9a2 15%, transparent 15.3%), #fffaf3;
}
.kc-family-popup__close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 11px;
  border: 1px solid rgba(25,62,83,.15);
  border-radius: 50%;
  background: #fff;
  color: #193e53;
  cursor: pointer;
}
.kc-family-popup__close:hover { background: #ffedb3; }
.kc-family-popup__close svg { width: 20px; height: 20px; }
.kc-family-popup__mascot { width: 104px; height: 82px; margin: 0 auto 4px; transform-origin: center bottom; }
.kc-family-popup[open] .kc-family-popup__mascot { animation: kcMascotWobble .7s 1s both; }
.kc-family-popup__mascot svg { display: block; width: 100%; height: 100%; }
.kc-family-popup__eyebrow { margin: 8px 0 12px; color: #977000; font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.kc-family-popup h2 { margin: 0; font-size: clamp(36px, 6vw, 48px); font-weight: 800; letter-spacing: -.055em; line-height: 1.1; }
.kc-family-popup h2 span { display: block; color: #9357be; }
.kc-family-popup__description { max-width: 330px; margin: 18px auto 20px; color: #536b76; font-size: 14px; line-height: 1.65; }
.kc-family-popup__facts { display: grid; grid-template-columns: .8fr 1.2fr; gap: 10px; margin-bottom: 20px; }
.kc-family-popup__facts > span { display: flex; flex-direction: column; justify-content: center; gap: 2px; min-height: 76px; padding: 10px; border-radius: 18px; background: #d9f3ef; font-size: 12px; font-weight: 700; line-height: 1.4; }
.kc-family-popup__facts > span:first-child { background: #ffe2e6; }
.kc-family-popup__facts > span:first-child strong { font-size: 30px; line-height: 1; color: #b83853; }
.kc-family-popup__facts > span:last-child strong { font-size: 17px; }
.kc-family-popup__cta { display: flex; align-items: center; justify-content: center; gap: 14px; min-height: 56px; padding: 13px 18px; border-radius: 18px; background: #193e53; color: #fff; font-size: 15px; font-weight: 800; line-height: 1.4; text-decoration: none; }
.kc-family-popup__cta:hover { background: #285972; }
.kc-family-popup__cta span { font-size: 24px; }
.kc-family-popup__note { margin: 12px 0 0; color: #657781; font-size: 11px; line-height: 1.5; }
.kc-family-popup__details { display: inline-flex; align-items: center; min-height: 44px; margin-top: 4px; color: #705089; font-size: 12px; font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }
.kc-family-popup :focus-visible { outline: 3px solid #218891; outline-offset: 3px; }
@keyframes kcPopupJelly {
  0% { opacity: 0; transform: translateY(65vh) rotate(-14deg) scale(.55, 1.15); }
  38% { opacity: 1; transform: translateY(-24px) rotate(7deg) scale(1.04, .87); }
  55% { transform: translateY(12px) rotate(-5deg) scale(.94, 1.06); }
  70% { transform: translateY(-6px) rotate(3deg) scale(1.03, .97); }
  84% { transform: translateY(2px) rotate(-1.5deg) scale(.99, 1.02); }
  100% { opacity: 1; transform: translateY(0) rotate(0) scale(1); }
}
@keyframes kcMascotWobble {
  0%, 100% { transform: rotate(0) scale(1); }
  30% { transform: rotate(-12deg) scale(1.16, .84); }
  60% { transform: rotate(10deg) scale(.88, 1.12); }
  80% { transform: rotate(-5deg); }
}
@media (max-width: 380px) {
  .kc-family-popup { width: calc(100% - 24px); border-radius: 28px; }
  .kc-family-popup__card { padding: 20px 18px; }
  .kc-family-popup__cta { padding-inline: 12px; font-size: 14px; }
  .kc-family-popup__facts > span:last-child strong { font-size: 13px; white-space: nowrap; }
}
@media (max-height: 700px) {
  .kc-family-popup__mascot { width: 76px; height: 60px; }
  .kc-family-popup__card { padding-block: 16px; }
  .kc-family-popup h2 { font-size: 36px; }
  .kc-family-popup__description { margin-block: 12px; }
  .kc-family-popup__facts { margin-bottom: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .kc-family-popup[open], .kc-family-popup[open] .kc-family-popup__mascot { animation: none; }
}
