/* Image-only character rig. One visible drawing per dancer; no ghosted hands. */
/* Raster scenery shares the ending film's apricot wall and sprinkle icing floor. */
.birthday[data-dance=ready]{background:#ffd18d url('../assets/background/concept-star-strawberry-v1.webp') center/cover no-repeat}
.birthday[data-dance=ready] .scene{background:none}
.birthday[data-dance=ready] .scene-glow,.birthday[data-dance=ready] .scene-star,.birthday[data-dance=ready] .scene-heart{display:none}
.dance-stage{position:absolute;inset:0;overflow:hidden;pointer-events:none;z-index:1;opacity:0}
.dance-stage.is-loaded{opacity:1}
.dance-world{position:absolute;left:50%;top:50%;width:1000px;height:700px;transform:translate(-50%,-50%) scale(var(--world-scale,0));transform-origin:50% 50%}
.dancer,.dance-shadow{position:absolute;left:0;top:0;width:0;height:0;transform-origin:0 0}
.birthday.holding .dancer,.birthday[data-phase=gather] .dancer{will-change:transform}
.dance-frame{position:absolute;left:0;top:0;max-width:none;transform-origin:0 0;pointer-events:none;user-select:none;-webkit-user-select:none}
.dance-shadow:before{content:"";position:absolute;left:-105px;top:-7px;width:210px;height:14px;border-radius:50%;background:#9b7866}
.dance-ensemble{position:absolute;inset:0}
.dance-ensemble img{position:absolute;max-width:none;pointer-events:none}
.dance-cake{visibility:hidden}
.dance-ensemble.is-revealing .dance-cake{visibility:visible;animation:cake-uncover 480ms cubic-bezier(.16,1,.3,1) both}
.dance-ensemble.is-shown .dance-cake{visibility:visible;animation:none}
.dance-ensemble.is-shown .dance-ready{visibility:hidden}
.birthday[data-dance=ready] .character{visibility:hidden;animation:none}
.birthday[data-dance=ready] .character-button{inset:0;width:100%;height:100%;z-index:4}
.birthday[data-dance=ready] .ground,.birthday[data-dance=ready] .shake-lines,.birthday[data-dance=ready] .party-scene{display:none}
.birthday[data-dance=ready] .speech{z-index:5;transition:opacity 160ms,transform 200ms}
.birthday[data-dance=ready][data-state=duet] .speech,.birthday[data-dance=ready][data-state=trio] .speech,.birthday[data-dance=ready][data-state=arrival] .speech{opacity:0}
.birthday[data-dance=ready][data-state=peek] .scene-star,.birthday[data-dance=ready][data-state=duet] .scene-star,.birthday[data-dance=ready][data-state=trio] .scene-star,.birthday[data-dance=ready][data-state=trio] .scene-heart{opacity:0}
.birthday[data-dance=ready][data-phase=gather] .speech,.birthday[data-dance=ready][data-phase=ready] .speech{opacity:0}
.birthday[data-dance=ready][data-phase=gather] .hold-button,.birthday[data-dance=ready][data-phase=ready] .hold-button{background:#ca8b96;box-shadow:none;transform:none}
.birthday[data-dance=ready][data-phase=burst] .burst-message{visibility:hidden;animation:none}
.birthday[data-dance=ready][data-phase=burst] .intro{opacity:1}
.birthday[data-dance=ready][data-phase=burst] .intro h1{transition:none}
.birthday[data-dance=ready][data-phase=burst] .intro h1{animation:message-arrives 360ms cubic-bezier(.16,1,.3,1) both}
.birthday[data-dance=ready][data-phase=burst] .intro h1,.birthday[data-dance=ready][data-phase=party] .intro h1{color:#000;font-size:var(--final-size,32px);line-height:1.4;white-space:pre-line;overflow-wrap:anywhere}
.birthday[data-dance=ready][data-phase=party] .dance-stage{overflow:visible}
.birthday[data-dance=ready] .scene-star,.birthday[data-dance=ready] .scene-heart{transition:opacity 180ms}
.birthday[data-dance=ready].long-message[data-phase=burst] .scene{height:200px}
.birthday[data-dance=ready] .meter-fill{transform-origin:0 50%}
@keyframes cake-uncover{
  0%{clip-path:inset(100% 0 0);transform:translateY(8px)}
  65%{clip-path:inset(0 0 0);transform:translateY(-2px)}
  100%{clip-path:inset(0 0 0);transform:translateY(0)}
}
@keyframes message-arrives{from{opacity:0;transform:translateY(5px) scale(.97)}to{opacity:1;transform:translateY(0) scale(1)}}
@media(max-height:620px){.birthday[data-dance=ready].long-message[data-phase=burst] .scene{height:170px}}
@media(prefers-reduced-motion:reduce){
 .dance-ensemble.is-revealing .dance-cake{animation:none;clip-path:none;transform:none}
 .birthday[data-dance=ready][data-phase=burst] .intro h1{animation:none}
}
/* Keep authoring and share copy legible over the sprinkle scenery. */
.birthday[data-dance=ready] .composer,.birthday[data-dance=ready] .link-panel{background:#fffdf9;border:1px solid #ead9ce;border-radius:20px;padding:18px;box-shadow:0 4px 16px #7048290a}
.birthday[data-dance=ready] .field-heading{color:#5e3d40;font-size:14px}
.birthday[data-dance=ready] .field-heading span{color:#6a4a48;font-size:12px}
.birthday[data-dance=ready] .field-help,.birthday[data-dance=ready] .link-help,.birthday[data-dance=ready] .link-status{color:#654a45;font-size:13px;line-height:1.65}
.birthday[data-dance=ready] .secondary-actions .text-button{color:#70404b;font-size:13px;text-decoration:underline;text-decoration-color:#c5a4a5}
.birthday[data-dance=ready] .scene-caption{background:#fffdf9;border-radius:999px;padding:7px 12px;width:max-content;max-width:100%;color:#654a45;font-size:12px;line-height:1.5}
.birthday[data-dance=ready] .scene-caption .tiny-heart{color:#9c4c62}

.birthday[data-phase=surprise] .speech{opacity:1!important;left:50%;right:auto;top:-8px;transform:translateX(-50%);width:116px;height:74px;font-size:20px}
.birthday[data-phase=surprise] .hold-button{background:#b27b89;box-shadow:none;transform:none}

/* Keep the speech tail over Chiika as the duo makes room for Usagi. */
.birthday[data-dance=ready][data-state=surprise] .speech{left:calc(50% + var(--duo-speech-offset,0px));right:auto;transform:translateX(-50%);top:-8px}
.birthday[data-dance=ready][data-state=surprise] .speech{opacity:1}
