* { box-sizing: border-box; }
:root {
  color-scheme: light;
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  background: #f5f6f8;
  color: #262a30;
}
body { margin: 0; min-height: 100vh; display: grid; place-items: center; padding: 28px 16px; overflow-x: hidden; }
.app { width: min(760px, 100%); display: flex; flex-direction: column; align-items: center; gap: 18px; }
h1 { margin: 0 0 10px; font-size: clamp(28px, 5vw, 42px); font-weight: 800; letter-spacing: 2px; }
.parents { width: 100%; display: flex; align-items: center; justify-content: center; gap: clamp(14px, 4vw, 38px); }
.avatar-slot { background: #d2d4d8; border: 1px solid #c4c7cc; border-radius: 12px; display: grid; place-items: center; overflow: hidden; position: relative; box-shadow: 0 5px 18px #1d29330c; }
.parent-slot { width: clamp(132px, 28vw, 230px); aspect-ratio: 1; }
.child-slot { width: clamp(150px, 31vw, 250px); aspect-ratio: 1; }
.avatar-slot img { width: 100%; height: 100%; object-fit: contain; display: block; }
.placeholder { color: #8a8e95; font-size: 52px; font-weight: 300; }
.and { font-size: clamp(28px, 5vw, 42px); font-weight: 700; color: #555b64; flex: 0 0 auto; }
.child-area { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.caption { font-size: 23px; font-weight: 650; }
.gender { min-height: 38px; font-size: 27px; font-weight: 800; color: #4c5664; }
button { border: 0; border-radius: 9px; background: #aeb3bb; color: white; padding: 14px 46px; font-size: 18px; font-weight: 700; cursor: pointer; transition: background .18s, transform .18s, opacity .18s; }
button:hover:not(:disabled) { background: #2684e8; transform: translateY(-2px); }
button:disabled { cursor: not-allowed; opacity: .65; }
.status { min-height: 22px; margin: -5px 0 0; color: #777e88; font-size: 13px; }
.celebration { position: fixed; inset: 0; pointer-events: none; z-index: 20; display: none; overflow: hidden; }
.celebration.active { display: block; }
.gold-beam { position: absolute; top: -12%; height: 125%; width: 16vw; min-width: 100px; opacity: 0; filter: blur(2px); background: linear-gradient(90deg, transparent, #fff4a6 28%, #ffc928 50%, #fff4a6 72%, transparent); transform: rotate(12deg); }
.beam-left { left: 9%; }
.beam-right { right: 9%; transform: rotate(-12deg); }
.celebration.active .gold-beam { animation: beamGlow 2.6s ease-in-out forwards; }
@keyframes beamGlow { 0% { opacity: 0; } 25% { opacity: .9; } 70% { opacity: .65; } 100% { opacity: .18; } }
.confetti-piece { position: absolute; top: -20px; width: 9px; height: 15px; opacity: .95; animation: fall var(--duration) linear forwards; transform: rotate(var(--rotate)); }
@keyframes fall { to { transform: translate3d(var(--drift), 110vh, 0) rotate(900deg); } }
.winner-image { position: fixed; z-index: 30; object-fit: contain; border-radius: 14px; box-shadow: 0 0 55px 18px #ffd84d99; transition: left 2.4s cubic-bezier(.18,.72,.2,1), top 2.4s cubic-bezier(.18,.72,.2,1), width 2.4s cubic-bezier(.18,.72,.2,1), height 2.4s cubic-bezier(.18,.72,.2,1); }
body.celebrating::after { content: ""; position: fixed; inset: 0; z-index: 19; pointer-events: none; background: radial-gradient(circle, #fff7cf33, transparent 58%); }
@media (max-width: 420px) { .parents { gap: 10px; } .parent-slot { width: 29vw; } .and { font-size: 25px; } }
