/* v11 motion (Zach's v11.7 + leaderboard motion), ported verbatim from the design cp-portal.css. Short, once, never hides content;
   every animation turns off for reduce motion. Loaded after v11-misc.css so these win over the older lb-in rule. */
   ============================================================ */
/* 1. Progress bars fill from empty */
@keyframes cp-grow { from { width: 0; } }
.cp-meter > span { animation: cp-grow .98s cubic-bezier(.2,.7,.2,1) .21s both; }

/* 2. Catch tracker: dots and lines fill in order, the current step pulses */
@keyframes cp-dot { from { transform: translateX(-50%) scale(0); } }
@keyframes cp-line { from { transform: scaleX(0); } }
@keyframes cp-now { 0% { box-shadow: 0 0 0 0 rgba(183,93,41,.45); } 100% { box-shadow: 0 0 0 9px rgba(183,93,41,0); } }
.cp-track li::before { animation: cp-dot .42s cubic-bezier(.3,1.5,.5,1) both; }
.cp-track li::after { transform-origin: left center; animation: cp-line .35s ease-out both; }
.cp-track li:nth-child(1)::before { animation-delay: .14s; }
.cp-track li:nth-child(2)::after  { animation-delay: .22s; } .cp-track li:nth-child(2)::before { animation-delay: .34s; }
.cp-track li:nth-child(3)::after  { animation-delay: .42s; } .cp-track li:nth-child(3)::before { animation-delay: .53s; }
.cp-track li:nth-child(4)::after  { animation-delay: .62s; } .cp-track li:nth-child(4)::before { animation-delay: .73s; }
.cp-track li:nth-child(5)::after  { animation-delay: .81s; } .cp-track li:nth-child(5)::before { animation-delay: .92s; }
.cp-track li.is-now::before { animation: cp-dot .42s cubic-bezier(.3,1.5,.5,1) both, cp-now 1.68s ease-out 1.26s 3; }

/* 3. "Needs you" count pops once */
@keyframes cp-pop { 0% { transform: scale(0); } 60% { transform: scale(1.3); } 100% { transform: scale(1); } }
.cp-needs__count { animation: cp-pop .63s cubic-bezier(.3,1.5,.5,1) .49s both; }

/* 4. Sent! screen: the circle pops and the check draws itself */
@keyframes cp-draw { from { stroke-dashoffset: 24; } to { stroke-dashoffset: 0; } }
.cp-done__check { animation: cp-pop .63s cubic-bezier(.3,1.5,.5,1) both; }
.cp-done__check svg path { stroke-dasharray: 24; animation: cp-draw .56s ease-out .49s both; }

/* 5. Buttons press in when tapped */
.cp-btn { transition: transform .08s ease, filter .15s ease, background-color .15s ease; }
.cp-btn:active { transform: scale(.97); filter: brightness(.95); }

/* 8. Rewards: the rank badge pops in and a shine sweeps across it once */
@keyframes cp-shine { from { transform: translateX(-120%) rotate(20deg); } to { transform: translateX(220%) rotate(20deg); } }
.cp-rankhero__badge { position: relative; overflow: hidden; animation: cp-pop .7s cubic-bezier(.3,1.5,.5,1) .14s both; }
.cp-rankhero__badge::after { content: ''; position: absolute; top: -20%; bottom: -20%; left: 0; width: 35%;
  background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,.75), rgba(255,255,255,0));
  transform: translateX(-120%) rotate(20deg); animation: cp-shine 1.26s ease-in-out .98s 1 both; pointer-events: none; }

/* Reduce motion: everything above is switched off */
@media (prefers-reduced-motion: reduce) {
  .cp-meter > span, .cp-track li::before, .cp-track li::after, .cp-track li.is-now::before,
  .cp-needs__count, .cp-done__check, .cp-done__check svg path, .cp-rankhero__badge, .cp-rankhero__badge::after { animation: none !important; }
  .cp-rankhero__badge::after { display: none; }
  .cp-btn { transition: none; }
  .cp-btn:active { transform: none; }
}

@media (prefers-reduced-motion: no-preference) {
  @keyframes lb-in { from { opacity: 0; transform: translateX(-18px); } }
  @keyframes lb-crown { 0% { transform: translateY(-14px) rotate(-30deg) scale(.6); opacity: 0; } 60% { transform: translateY(2px) rotate(-8deg) scale(1.1); opacity: 1; } 100% { transform: rotate(-12deg); } }
  @keyframes lb-shine { from { background-position: -200% 0; } to { background-position: 200% 0; } }
  .lb-board .cp-list li { animation: lb-in .55s cubic-bezier(.2,.8,.3,1) both; }
  .lb-board .cp-list li:nth-child(2) { animation-delay: .12s; }
  .lb-board .cp-list li:nth-child(3) { animation-delay: .22s; }
  .lb-board .cp-list li:nth-child(n+4) { animation-delay: .32s; }
  .lb-board .cp-list li:first-child::before { animation: lb-crown .8s cubic-bezier(.3,1.4,.5,1) .35s both; }
  .lb-board .cp-list li:first-child { background-image: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.65) 50%, transparent 70%), linear-gradient(135deg, #fff4cf 0%, #ffe08a 55%, #f4c54d 100%);
    background-size: 200% 100%, 100% 100%; background-repeat: no-repeat; animation: lb-in .55s cubic-bezier(.2,.8,.3,1) both, lb-shine 1.6s ease .7s 1 both; }
}

/* Design classes our markup renders but the live CSS lacked (Send photo thumbnails, Home empty needs line). */
.cp-needs__empty { margin: 6px 0 0; }
.cp-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; margin-top: 10px; }
.cp-thumb { position: relative; aspect-ratio: 1; border: 1px solid var(--cp-rule); border-radius: 6px; overflow: hidden; background: #fff; }
.cp-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cp-thumb__name { display: flex; align-items: center; justify-content: center; height: 100%; padding: 4px; font-size: .7rem; text-align: center; word-break: break-all; color: var(--cp-muted); }
.cp-thumb__rm { position: absolute; top: 4px; right: 4px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(15,35,39,.8); color: #fff; font-size: 18px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.cp-thumb__rm:hover, .cp-thumb__rm:focus-visible { background: var(--cp-bad); }
@media (prefers-reduced-motion: no-preference) { .cp-thumb { animation: cp-pop .35s cubic-bezier(.3,1.5,.5,1) both; } }
