/* Hypuppr giveaway popup (hypuppr.js). Uses the design tokens both V1 and V2 define.
   Spacing on the 4px scale: 4, 8, 12, 16, 24. */
.pup-modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; background: var(--scrim); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.pup-modal.hidden { display: none; }
.pup-box { position: relative; width: 100%; max-width: 440px; max-height: min(90vh, 760px); overflow: auto; overscroll-behavior: contain; padding: 24px; text-align: center; border: 1px solid transparent; border-radius: var(--radius); background: var(--fill-dialog) padding-box, var(--edge-strong) border-box; box-shadow: var(--e-3); animation: pup-rise .22s cubic-bezier(.2,.8,.2,1); }
@keyframes pup-rise { from { opacity: 0; transform: translateY(12px) scale(.985); } }

.pup-x { position: absolute; top: 12px; right: 12px; z-index: 1; width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid transparent; border-radius: var(--r-btn); color: var(--muted); cursor: pointer; background: var(--fill-raised) padding-box, var(--edge) border-box; box-shadow: var(--e-1); transition: color .15s, box-shadow .15s; }
.pup-x:hover { color: var(--text); }
.pup-x:focus { outline: none; }
.pup-x:focus-visible { outline: 2px solid var(--accent2); outline-offset: 2px; }
.pup-x:active { box-shadow: var(--e-sunk); }

.pup-art { width: 192px; aspect-ratio: 1; margin: 0 auto 16px; overflow: hidden; border-radius: var(--radius); background: var(--sunk); box-shadow: var(--e-2); }
.pup-art.wide { width: 100%; aspect-ratio: 3 / 2; }
.pup-art img { display: block; width: 100%; height: 100%; object-fit: cover; }

.pup-kicker { margin: 0 0 8px; color: var(--accent2); font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.pup-box h2 { margin: 0 0 8px; color: var(--text); font-size: 22px; line-height: 28px; font-weight: 700; }
.pup-box p { margin: 0 0 12px; color: var(--text-2); font-size: 15px; line-height: 22px; }
.pup-box .pup-note { color: var(--muted); font-size: 13px; line-height: 18px; }

.pup-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; margin-top: 16px; }
.pup-actions .btn { height: 44px; padding: 0 24px; }
.pup-actions .btn:disabled { opacity: .6; cursor: progress; transform: none; }
.pup-link { padding: 8px; border: 0; background: none; color: var(--muted); font: 500 14px/20px Inter, sans-serif; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.pup-link:hover { color: var(--text); }
.pup-link:focus-visible { outline: 2px solid var(--accent2); outline-offset: 2px; border-radius: var(--r-sm); }

.pup-box .pup-status { min-height: 18px; margin: 12px 0 0; color: var(--muted); font-size: 13px; line-height: 18px; }
.pup-box .pup-status.err { color: var(--bad); }
.pup-status .spin { display: inline-block; width: 12px; height: 12px; margin-right: 8px; vertical-align: -1px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: pup-spin .8s linear infinite; }
@keyframes pup-spin { to { transform: rotate(1turn); } }

@media (max-width: 560px) {
  .pup-modal { place-items: end center; padding: 0; }
  .pup-box { max-height: 92vh; max-height: 92svh; padding: 24px 16px max(16px, env(safe-area-inset-bottom)); border-radius: 12px 12px 0 0; }
}
@media (prefers-reduced-motion: reduce) {
  .pup-box, .pup-status .spin { animation: none; }
}
