/* Shared growth moments: a real gain, one strong focal point, a short settle. */
.unit-card.is-new-arrival{animation:pf-arrival-outline 1.4s ease-out 2}
@keyframes pf-arrival-outline{0%,100%{box-shadow:0 2px 0 #dce1c9}35%{box-shadow:0 0 0 4px #e4c16d,0 4px 18px #c9ad5d66}}
#dialog:not(.mother-modal)[data-kind="unitupgrade"],#dialog:not(.mother-modal)[data-kind="buildingcomplete"]{width:min(392px,calc(100vw - 24px));max-height:90dvh;padding:24px 18px 17px;border:2px solid #c4ce9e;background:radial-gradient(ellipse at 50% 23%,#fff5c9,#fbfaed 66%);overflow:auto;box-shadow:0 10px 0 #344b3b33,0 24px 90px #25382a44}
.pf-celebration{text-align:center;position:relative;isolation:isolate}.pf-celebration header{padding:0 24px}.pf-eyebrow{display:block;font-size:11px;font-weight:800;letter-spacing:1.6px;color:#89976d}.pf-celebration h2{font-size:27px;color:#526d3d;margin:5px 0 0;line-height:1.2;text-shadow:0 2px #fff}.pf-celebration h3{font-size:19px;color:#344f3d;line-height:1.25;margin:12px 0 10px;overflow-wrap:anywhere}
.pf-stage{position:relative;display:grid;place-items:center;height:180px;margin:4px 0 0;isolation:isolate}.pf-stage:before{content:"";position:absolute;inset:4px 36px 12px;border-radius:50%;background:radial-gradient(ellipse,#fffad9 12%,#edc76b57 49%,transparent 70%);animation:pf-halo .7s ease-out both}
.pf-rays{position:absolute;width:224px;height:224px;max-width:85vw;max-height:85vw;top:-16px;left:50%;margin-left:-112px;z-index:-1;background:repeating-conic-gradient(from 0deg,#eec77733 0 10deg,transparent 10deg 30deg);border-radius:50%;mask-image:radial-gradient(circle,#000 10%,#0009 40%,transparent 70%);animation:pf-rays 4s ease-out both;pointer-events:none}
.pf-hero{width:200px;height:166px;position:relative;z-index:1;animation:pf-arrive .6s cubic-bezier(.16,.8,.3,1.25) both}.pf-building-art{width:154px;height:140px;object-fit:contain;filter:drop-shadow(0 5px 1px #53643c22);animation:pf-arrive .65s cubic-bezier(.16,.8,.3,1.25) both}
.pf-level{position:absolute;bottom:0;z-index:2;display:flex;align-items:center;gap:9px;padding:6px 16px;border:2px solid #d7b266;border-radius:22px;background:#fff1b8;box-shadow:0 3px 0 #c5a35f44;font-variant-numeric:tabular-nums;animation:pf-level .6s .14s both}.pf-level small{font-size:14px;color:#9b966e}.pf-level i{font-style:normal;color:#a58b50;font-size:16px}.pf-level b{font-size:22px;color:#65532c}
.pf-power{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:9px;padding:8px 12px;background:linear-gradient(100deg,#e9efcf,#f3f5e2,#e7edcf);border:1px solid #ccd7b0;border-radius:13px;box-shadow:0 3px 0 #d8e0bf;margin-bottom:13px}.pf-power>span{font-size:12px;font-weight:750;color:#75875d;text-align:left}.pf-power>strong{font-size:38px;line-height:1.15;color:#476d3b;font-variant-numeric:tabular-nums;letter-spacing:-1px}.pf-power>em{font-size:16px;font-weight:850;color:#548a42;font-style:normal;text-align:right;animation:pf-gain .6s .35s both}
.pf-stats{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.pf-stat{position:relative;min-width:0;background:#f0f2df;border:1px solid #dce3c3;border-radius:12px;padding:9px 5px 7px;animation:pf-gain .5s .25s both}.pf-stat>span{font-size:12px;color:#7c8b65;display:block;margin-bottom:4px;font-weight:700}.pf-stat>div{display:flex;align-items:center;justify-content:center;gap:5px;flex-wrap:wrap;min-height:23px;font-variant-numeric:tabular-nums}.pf-stat small{font-size:13px;color:#9a9f86}.pf-stat i{font-style:normal;font-size:12px;color:#b1b79b}.pf-stat strong{font-size:18px;color:#47693d}.pf-stat>em{display:block;margin-top:4px;font-size:13px;line-height:1.25;color:#679248;font-style:normal;font-weight:850}.pf-stat:only-child,.pf-stat:last-child:nth-child(odd){grid-column:1/-1}
.pf-note{font-size:11px;line-height:1.3;color:#8a9576;margin:10px 0}.pf-rank{display:flex;align-items:center;justify-content:space-between;gap:8px;background:#fff0bc;border:1px solid #e3c377;border-radius:10px;padding:9px 12px;margin-top:10px;animation:pf-level .7s .35s both}.pf-rank span{font-size:13px;color:#9c7f41}.pf-rank b{font-size:19px;color:#8d682e;white-space:nowrap}.pf-unlocks{display:flex;justify-content:center;align-items:center;gap:10px;border-radius:12px;background:#f5edcb;margin-top:12px;padding:6px}.pf-unlocks>span{font-size:12px;color:#907a42}.pf-unlocks>div{display:flex}.pf-unlocks img{width:43px;height:43px;object-fit:contain}
.pf-celebration footer{display:flex;gap:10px;margin-top:14px}.pf-celebration footer button{flex:1;min-width:0;min-height:47px;font-size:16px;padding:9px 5px;border-radius:12px}.pf-celebration footer .primary:not(.mother-btn){box-shadow:0 4px 0 #456037}.pf-particles{position:absolute;inset:0;pointer-events:none;z-index:2}.pf-particles i{position:absolute;left:50%;top:47%;height:7px;width:7px;background:#e5bc5d;border:1px solid #fff3ad;opacity:0;transform:rotate(var(--a));animation:pf-spark .9s .22s both;border-radius:1px}.pf-particles i:nth-child(3n){background:#a6be76;width:5px;height:10px}
.pf-batch-list{display:grid;gap:10px;margin:18px 0 10px}.pf-batch-list article{display:flex;align-items:center;gap:13px;background:#eef1dc;border:1px solid #d6dfbb;border-radius:12px;padding:7px 12px;text-align:left}.pf-batch-list img{width:64px;height:62px;object-fit:contain}.pf-batch-list h3{font-size:16px;margin:0 0 3px}.pf-batch-list strong{font-size:19px;color:#6e8d42}.pf-batch-list span{display:block;font-size:12px;color:#7c8c65;margin-top:3px}
.pf-unit.is-rank-up h2{color:#a07b30}.pf-unit.is-rank-up .pf-stage:before{background:radial-gradient(ellipse,#fffbd5 10%,var(--pf-quality) 35%,transparent 70%);opacity:.6}
@keyframes pf-arrive{0%{opacity:0;transform:translateY(15px) scale(.65)}55%{opacity:1;transform:translateY(-6px) scale(1.1)}78%{transform:translateY(3px) scale(.97)}100%{transform:none}}
@keyframes pf-level{0%{opacity:0;transform:scale(.65)}65%{opacity:1;transform:scale(1.12)}100%{transform:scale(1)}}
@keyframes pf-halo{0%{opacity:0;transform:scale(.2)}55%{opacity:1;transform:scale(1.18)}100%{transform:scale(1)}}
@keyframes pf-rays{from{transform:rotate(-25deg);opacity:0}20%{opacity:1}to{transform:rotate(15deg);opacity:.65}}
@keyframes pf-gain{from{opacity:0;transform:translateY(9px) scale(.9)}to{opacity:1;transform:none}}
@keyframes pf-spark{0%{opacity:0;transform:rotate(var(--a)) translateY(-10px) rotate(0deg) scale(.4)}20%{opacity:1}100%{opacity:0;transform:rotate(var(--a)) translateY(-107px) rotate(130deg) scale(.7)}}
@media(max-width:350px),(max-height:720px){#dialog:not(.mother-modal)[data-kind="unitupgrade"],#dialog:not(.mother-modal)[data-kind="buildingcomplete"]{padding:20px 13px 14px}.pf-stage{height:148px}.pf-hero{height:140px;width:169px}.pf-building-art{height:114px;width:131px}.pf-celebration h2{font-size:24px}.pf-celebration h3{font-size:17px;margin:10px 0 8px}.pf-power>strong{font-size:32px}.pf-stat strong{font-size:16px}.pf-stat>span{font-size:11px}.pf-level{padding:4px 14px}.pf-rank{padding:6px 10px}.pf-celebration footer{margin-top:11px}.pf-rays{height:180px;width:180px;margin-left:-90px;top:-7px}}
@media(prefers-reduced-motion:reduce){.pf-celebration *{animation:none!important;transition:none!important}.pf-particles{display:none}}
