/* Prime signature scenes — scoped to the illustration, transform/opacity choreography. */
.pi-gift-scene{left:3%;right:auto;bottom:25px;width:310px;max-width:75%;height:255px;padding:0;display:block;border:0;background:none;box-shadow:none;border-radius:0;isolation:isolate;animation:pi-scene-life 5.6s both;contain:layout style;--gift-color:#dfb86a}
.pi-gift-art{position:absolute;inset:0 0 65px;perspective:500px;color:var(--gift-color)}
.pi-aura{position:absolute;inset:12% 5% -12%;border-radius:50%;background:radial-gradient(ellipse,color-mix(in srgb,var(--gift-color) 35%,transparent),transparent 68%);animation:pi-aura-breathe 2.5s ease-in-out 2}
.pi-gift-hero{position:absolute;left:50%;top:47%;width:100px;height:100px;margin:-50px;color:var(--gift-color);display:grid;place-items:center;filter:drop-shadow(0 0 10px color-mix(in srgb,var(--gift-color) 60%,transparent));animation:pi-hero-star 5.6s both}
.pi-gift-hero svg{width:88px;height:88px;stroke-width:1;fill:color-mix(in srgb,var(--gift-color) 15%,#17111f);filter:drop-shadow(0 2px 0 #fff8)}
.pi-orbit{position:absolute;left:50%;top:47%;width:170px;height:170px;margin:-85px;border:1px solid color-mix(in srgb,var(--gift-color) 65%,transparent);border-radius:50%;box-shadow:inset 0 0 14px #ffffff08;animation:pi-orbit-turn 4s linear both}
.pi-orbit:after{content:'';position:absolute;left:24px;top:18px;width:7px;height:7px;border-radius:50%;background:#fff4d4;box-shadow:0 0 12px 3px var(--gift-color)}
.pi-orbit-two{width:140px;height:140px;margin:-70px;animation-direction:reverse;border-style:dashed;opacity:.55}
.pi-ground-ring{position:absolute;left:50%;top:83%;width:145px;height:27px;margin-left:-72px;border:1px solid var(--gift-color);border-radius:50%;box-shadow:0 0 16px color-mix(in srgb,var(--gift-color) 30%,transparent);animation:pi-ground-pulse 2s ease-out 2}
.pi-gift-spark{position:absolute;top:47%;left:50%;height:4px;width:4px;background:#ffedcd;box-shadow:0 0 6px var(--gift-color);border-radius:1px;animation:pi-spark-burst 2.5s calc(.3s + var(--delay)) both;transform:rotate(var(--spin))}
.pi-gift-copy{position:absolute;bottom:0;left:12px;right:12px;text-align:center;padding:10px 8px 12px;border:1px solid color-mix(in srgb,var(--gift-color) 50%,transparent);border-radius:12px;background:linear-gradient(115deg,#201421ed,#151219f2);box-shadow:0 8px 25px #0005;animation:pi-copy-reveal 5.6s both}
.pi-gift-scene strong{font:400 25px Georgia,serif;color:#fff1da;text-shadow:0 0 18px color-mix(in srgb,var(--gift-color) 40%,transparent)}
.pi-gift-kicker{display:block;color:var(--gift-color);font-size:7px;letter-spacing:1.8px;margin-bottom:4px;font-weight:700}
.pi-gift-scene small{font-size:9px;color:#d4c6cd;margin-top:4px}
.pi-infinity-mark{display:none;position:absolute;left:0;right:0;top:20%;text-align:center;font:110px/.9 Georgia,serif;color:#ffe9bd;text-shadow:0 0 14px #eea9cb,0 0 35px #dc8d9b;animation:pi-infinity-reveal 5.6s both}
.pi-launch-trail{display:none;position:absolute;left:50%;top:45%;height:120px;width:36px;margin-left:-18px;background:linear-gradient(var(--gift-color),transparent);clip-path:polygon(35% 0,65% 0,100% 100%,0 100%);transform-origin:top;animation:pi-trail-lift 5.6s both}
[data-scene=force] .pi-gift-hero{animation:pi-hero-flame 5.6s both}
[data-scene=force] .pi-orbit{border-radius:35% 65% 60% 40%;border-bottom-color:transparent;animation:pi-flame-ring 2s ease-in-out 2}
[data-scene=force] .pi-gift-spark{background:#ffd188;animation-name:pi-ember-rise}
[data-scene=fidele] .pi-gift-hero{animation:pi-hero-crystal 5.6s both}
[data-scene=fidele] .pi-orbit{border-radius:18%;transform:rotate(45deg);animation:pi-crystal-frame 5.6s both}
[data-scene=fidele] .pi-orbit-two{border-radius:50%;animation:pi-orbit-turn 4s linear both}
[data-scene=fidele] .pi-gift-spark{clip-path:polygon(50% 0,65% 35%,100% 50%,65% 65%,50% 100%,35% 65%,0 50%,35% 35%);width:9px;height:9px;background:#d9faff}
[data-scene=patron] .pi-gift-hero{animation:pi-hero-crown 5.6s both}
[data-scene=patron] .pi-aura{background:repeating-conic-gradient(from 0deg,transparent 0 23deg,#c7a4dc18 24deg 27deg,transparent 28deg 45deg);mask-image:radial-gradient(ellipse,#000,transparent 68%);animation:pi-royal-rays 5.6s both}
[data-scene=patron] .pi-orbit{border-top-color:transparent;border-left-color:transparent;animation:pi-royal-arc 5.6s both}
[data-scene=patron] .pi-gift-spark{width:3px;height:10px}
[data-scene=prime] .pi-gift-hero{animation:pi-hero-rocket 5.6s both}
[data-scene=prime] .pi-infinity-mark,[data-scene=prime] .pi-launch-trail{display:block}
[data-scene=prime] .pi-orbit{animation:pi-prime-orbit 5.6s both}
[data-scene=prime] .pi-gift-spark{animation-delay:calc(1.7s + var(--delay));background:#ffe6f6}
@keyframes pi-scene-life{0%{opacity:0;transform:translateY(12px)}8%,87%{opacity:1;transform:translateY(0)}100%{opacity:0;transform:translateY(-8px)}}
@keyframes pi-copy-reveal{0%,8%{opacity:0;transform:translateY(12px)}20%,100%{opacity:1;transform:none}}
@keyframes pi-hero-star{0%{opacity:0;transform:translate(-70px,40px) rotate(-130deg) scale(.1)}22%{opacity:1;transform:rotate(12deg) scale(1.12)}40%,75%{transform:rotate(-5deg) scale(1)}90%,100%{transform:rotate(12deg) scale(.9)}}
@keyframes pi-aura-breathe{0%,100%{opacity:.5;transform:scale(.8)}50%{opacity:1;transform:scale(1.15)}}
@keyframes pi-orbit-turn{from{transform:rotateX(60deg) rotate(-35deg)}to{transform:rotateX(60deg) rotate(325deg)}}
@keyframes pi-ground-pulse{0%{opacity:0;transform:scale(.4)}35%{opacity:.8}100%{opacity:0;transform:scale(1.5)}}
@keyframes pi-spark-burst{0%{opacity:0;transform:scale(0)}20%{opacity:1}100%{opacity:0;transform:translate(var(--x),var(--y)) rotate(var(--spin)) scale(.3)}}
@keyframes pi-hero-flame{0%{opacity:0;transform:translateY(65px) scale(.2)}18%{opacity:1;transform:translateY(-5px) scale(1.15,.95)}35%,65%{transform:translateY(0) scale(.95,1.1)}50%,80%,100%{transform:translateY(-9px) scale(1.05,1)}}
@keyframes pi-flame-ring{0%{opacity:0;transform:translateY(25px) rotate(-30deg) scale(.4)}45%{opacity:.7}100%{opacity:0;transform:translateY(-35px) rotate(35deg) scale(1.1)}}
@keyframes pi-ember-rise{0%{opacity:0;transform:translate(var(--x),50px)}25%{opacity:1}100%{opacity:0;transform:translate(calc(var(--x) * .5),-90px) scale(.1)}}
@keyframes pi-hero-crystal{0%{opacity:0;transform:translateY(-65px) rotateY(90deg) scale(.4)}25%{opacity:1;transform:rotateY(-15deg) scale(1.15)}50%{transform:translateY(-7px) rotateY(20deg)}75%,100%{transform:rotateY(0deg) scale(1)}}
@keyframes pi-crystal-frame{0%{opacity:0;transform:rotate(0) scale(.2)}25%,85%{opacity:.6;transform:rotate(45deg) scale(1)}100%{opacity:0;transform:rotate(90deg) scale(1.2)}}
@keyframes pi-hero-crown{0%{opacity:0;transform:translateY(-80px) scale(1.3)}23%{opacity:1;transform:translateY(5px) scale(.95)}35%,75%{transform:translateY(-5px) scale(1.05)}100%{transform:translateY(0)}}
@keyframes pi-royal-rays{0%{opacity:0;transform:rotate(-15deg) scale(.5)}30%,80%{opacity:1}100%{opacity:0;transform:rotate(25deg) scale(1.1)}}
@keyframes pi-royal-arc{0%{opacity:0;transform:rotate(45deg) scale(.2)}30%,100%{opacity:.6;transform:rotate(45deg) scale(1)}}
@keyframes pi-hero-rocket{0%{opacity:0;transform:translate(-60px,80px) rotate(-20deg) scale(.4)}15%{opacity:1;transform:translate(-15px,15px) rotate(-15deg)}32%{opacity:1;transform:translate(45px,-90px) rotate(10deg) scale(.7)}38%,100%{opacity:0;transform:translate(90px,-160px) scale(.2)}}
@keyframes pi-infinity-reveal{0%,30%{opacity:0;transform:scale(.2) rotate(-15deg)}48%{opacity:1;transform:scale(1.15)}60%,100%{opacity:1;transform:scale(1)}}
@keyframes pi-trail-lift{0%,5%{opacity:0;transform:translate(-50px,55px) rotate(25deg) scaleY(.2)}17%{opacity:.8}35%{opacity:0;transform:translate(70px,-130px) rotate(25deg) scaleY(1.3)}100%{opacity:0}}
@keyframes pi-prime-orbit{0%,28%{opacity:0;transform:rotateX(65deg) rotate(-40deg) scale(.3)}50%{opacity:1}100%{opacity:0;transform:rotateX(65deg) rotate(160deg) scale(1.2)}}
@media(max-width:700px){.pi-gift-scene{width:285px;height:240px;max-width:none;left:-26px;bottom:9px;transform-origin:bottom left;zoom:.66}.pi-gift-scene strong{font-size:25px}.pi-gift-scene small{font-size:11px}.pi-gift-kicker{font-size:8px}}
@media(prefers-reduced-motion:reduce){.pi-gift-scene,.pi-gift-scene *{animation:none!important;transition:none!important}.pi-gift-scene{opacity:1;transform:none}.pi-gift-art .pi-orbit,.pi-gift-art .pi-ground-ring,.pi-gift-art .pi-launch-trail,.pi-gift-art .pi-infinity-mark{display:none}.pi-gift-hero{transform:none;opacity:1}.pi-gift-copy{opacity:1;transform:none}.pi-aura{opacity:.6}}

.pi-gift-hero svg{fill:var(--metal);stroke:color-mix(in srgb,var(--gift-color) 75%,#fff)}
@media(max-width:700px){.pi-gift-scene{left:8px}}

.pi-gift-scene[hidden]{display:none!important}.pi-gift-scene{pointer-events:none}.pi-gift-hero svg{width:88px;height:88px;stroke-width:1;stroke-linejoin:round;stroke-linecap:round;fill:var(--metal);stroke:var(--gift-color)}
.pi-gift-scene{position:absolute;pointer-events:none}.pi-gift-scene strong,.pi-gift-scene small{display:block}.pi-gift-scene small{margin-top:4px}

/* Confirmed gifts appear above chat and the composer, not along the bottom edge. */
.pi-gift-scene{top:10%;bottom:auto}
@media(max-width:820px),(orientation:landscape) and (max-height:520px){.room-page .pi-gift-scene{top:clamp(84px,20dvh,180px);bottom:auto;left:max(14px,calc((100% - 300px)/2))!important;width:min(300px,calc(100% - 28px));height:245px;max-width:none;zoom:1;transform-origin:center}}
