/* ============ PY 15th Anniversary Badge ============ */
.py-anniv-badge{
  position:absolute;
  top:100%;
  left:-2px;
  margin-top:2px;
  z-index:3;
  display:flex;
  align-items:center;
  gap:10px;
  padding:8px 18px 8px 8px;
  border-radius:999px;
  background:linear-gradient(120deg,#2D2D73 0%,#0071BC 55%,#18A9A1 100%);
  box-shadow:0 14px 32px rgba(45,45,115,.32),0 0 0 3px #fff;
  cursor:pointer;
  border:0;
  user-select:none;
  -webkit-tap-highlight-color:transparent;
  isolation:isolate;
  animation:pyAnnivEntrance .8s cubic-bezier(.22,1.4,.36,1) .2s both, pyAnnivPulseGlow 3.2s ease-in-out 1.2s infinite;
  transition:transform .3s cubic-bezier(.34,1.56,.64,1);
}
.py-anniv-badge:hover{transform:translateY(-3px) scale(1.035)}
.py-anniv-badge:active{transform:translateY(-1px) scale(.97)}
.py-anniv-badge:focus-visible{outline:2px solid #F5B700;outline-offset:3px}

@keyframes pyAnnivEntrance{
  0%{opacity:0;transform:translateY(-14px) scale(.6) rotate(-8deg)}
  60%{opacity:1;transform:translateY(2px) scale(1.06) rotate(2deg)}
  100%{opacity:1;transform:translateY(0) scale(1) rotate(0)}
}
@keyframes pyAnnivPulseGlow{
  0%,100%{box-shadow:0 14px 32px rgba(45,45,115,.32),0 0 0 3px #fff}
  50%{box-shadow:0 14px 36px rgba(245,183,0,.4),0 0 0 3px #fff}
}

.py-anniv-core{
  position:relative;
  flex-shrink:0;
  width:50px;
  height:50px;
  border-radius:50%;
  background:radial-gradient(circle at 34% 28%,#FFF3C4,#F5B700 72%);
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  box-shadow:inset 0 2px 6px rgba(255,255,255,.6),0 4px 10px rgba(0,0,0,.2);
}
.py-anniv-num{font:900 19px/1 "Bristone PY",var(--ac-nav-heading,inherit);color:#2D2D73}
.py-anniv-years{font:800 7.5px/1 "Roboto",Arial,sans-serif;letter-spacing:.1em;color:#6b4a00;margin-top:2px}

.py-anniv-copy{display:flex;flex-direction:column;gap:2px;min-width:0}
.py-anniv-title{font:800 12px/1.15 "Roboto",Arial,sans-serif;color:#fff;white-space:nowrap}
.py-anniv-sub{font:700 10.5px/1.3 "Roboto",Arial,sans-serif;color:#FDE68A;white-space:nowrap;font-variant-numeric:tabular-nums}
.py-anniv-badge.is-live .py-anniv-sub{color:#B6FFB0}
.py-anniv-badge.is-live .py-anniv-core{animation:pyAnnivCoreSpin 2.6s ease-in-out infinite}
@keyframes pyAnnivCoreSpin{0%,100%{transform:rotate(0)}50%{transform:rotate(8deg) scale(1.05)}}

/* ---------- ambient bubbles + sparkles (decorative, CSS-only) ---------- */
.py-anniv-deco{position:absolute;inset:-16px -10px -10px -10px;pointer-events:none;overflow:visible;z-index:-1}
.py-anniv-bubble{
  position:absolute;
  border-radius:50%;
  background:radial-gradient(circle at 32% 28%,rgba(255,255,255,.85),rgba(255,255,255,.08) 70%);
  border:1px solid rgba(255,255,255,.5);
  opacity:0;
  animation:pyBubbleFloat 4.5s ease-in infinite;
}
.py-anniv-bubble.b1{width:10px;height:10px;left:6%;bottom:0;animation-delay:.1s}
.py-anniv-bubble.b2{width:7px;height:7px;left:30%;bottom:0;animation-delay:1.3s}
.py-anniv-bubble.b3{width:12px;height:12px;left:55%;bottom:0;animation-delay:2.4s}
.py-anniv-bubble.b4{width:6px;height:6px;left:75%;bottom:0;animation-delay:.8s}
.py-anniv-bubble.b5{width:9px;height:9px;left:92%;bottom:0;animation-delay:3.1s}
@keyframes pyBubbleFloat{
  0%{opacity:0;transform:translateY(0) scale(.4)}
  12%{opacity:.9}
  85%{opacity:.15}
  100%{opacity:0;transform:translateY(-58px) scale(1.15)}
}

.py-anniv-spark{
  position:absolute;
  width:8px;height:8px;
  opacity:0;
  animation:pySparkleTwinkle 2.6s ease-in-out infinite;
  color:#FFF3C4;
}
.py-anniv-spark svg{width:100%;height:100%;display:block;filter:drop-shadow(0 0 3px rgba(255,215,0,.7))}
.py-anniv-spark.s1{top:-10px;left:14%;animation-delay:.2s}
.py-anniv-spark.s2{top:2px;right:8%;animation-delay:1.1s}
.py-anniv-spark.s3{bottom:-8px;left:46%;animation-delay:1.9s}
.py-anniv-spark.s4{top:-4px;right:26%;animation-delay:.7s}
@keyframes pySparkleTwinkle{
  0%,100%{opacity:0;transform:scale(.3) rotate(0deg)}
  50%{opacity:1;transform:scale(1) rotate(90deg)}
}

/* ---------- click confetti burst (JS-spawned) ---------- */
.py-anniv-confetti-piece{
  position:fixed;
  top:0;left:0;
  width:7px;height:7px;
  border-radius:2px;
  pointer-events:none;
  z-index:9999;
  will-change:transform,opacity;
}

/* ---------- responsive ---------- */
@media(max-width:1180px){
  .py-anniv-title{display:none}
}
@media(max-width:760px){
  .py-anniv-badge{padding:6px 12px 6px 6px;gap:7px}
  .py-anniv-core{width:40px;height:40px}
  .py-anniv-num{font-size:15px}
  .py-anniv-years{font-size:6.5px}
  .py-anniv-sub{font-size:9px}
}
@media(max-width:480px){
  .py-anniv-badge{left:0}
  .py-anniv-sub{max-width:80px;overflow:hidden;text-overflow:ellipsis}
}

@media(prefers-reduced-motion:reduce){
  .py-anniv-badge,
  .py-anniv-badge.is-live .py-anniv-core,
  .py-anniv-bubble,
  .py-anniv-spark{animation:none!important}
  .py-anniv-badge{opacity:1;transform:none}
}
