/* ---------- Paywall: a sealed booster pack ---------- */
.paywall {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center;
  padding: 16px;
  overflow-y: auto;       /* the payment form can be taller than small screens */
  overscroll-behavior: contain;
  background: rgba(27, 26, 25, .45);
  animation: fade-in .3s ease-out both;
}
.paywall.is-closing { animation: fade-out .25s ease-in both; }

.pack {
  position: relative;
  width: min(100%, 340px);
  padding: 48px 22px 40px;
  text-align: center;
  background: var(--a);
  /* crimped edges, top and bottom */
  --crimp: 12px;
  -webkit-mask:
    conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / var(--crimp) 51% repeat-x,
    conic-gradient(from 135deg at top, #0000, #000 1deg 89deg, #0000 90deg) top / var(--crimp) 51% repeat-x;
  mask:
    conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / var(--crimp) 51% repeat-x,
    conic-gradient(from 135deg at top, #0000, #000 1deg 89deg, #0000 90deg) top / var(--crimp) 51% repeat-x;
  animation: pack-in .6s var(--ease-out) both;
  transition: width .3s var(--ease-out);
}
.pack.is-paying { width: min(100%, 460px); padding-inline: 14px; }
.paywall.is-closing .pack { animation: pack-out .25s ease-in both; }

.pack .card-back__art { position: absolute; inset: 0; width: 100%; height: 100%; }

.pack__inner {
  position: relative;
  padding: 28px 20px 22px;
  border-radius: 16px;
  color: var(--ink);
  background: var(--paper);
}
.pack__tear {
  position: absolute; left: 0; right: 18px; top: 20px;
  border-top: 2px dashed rgba(255,255,255,.8);
}
.pack__tear::after {
  content: "Tear to open";
  position: absolute; right: 0; top: -9px;
  padding-left: 6px;
  font-size: .62rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: #fff;
  background: var(--a);
}
.pack__eyebrow {
  margin: 0 0 6px;
  font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-soft);
}
.pack h2 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.7rem;
  line-height: 1.02;
  letter-spacing: -.03em;
}
.pack p { margin: 0 0 20px; color: var(--ink-soft); line-height: 1.5; font-size: .95rem; }
.pack .actions { display: flex; flex-direction: column; align-items: stretch; gap: 4px; }
.pack .actions .key-btn:disabled { opacity: .5; }

/* Secondary link under the main actions */
.pack__aside {
  margin-top: 14px;
  padding: .4em;
  border: 0; background: none;
  font-size: .85rem; font-weight: 600;
  color: var(--ink-soft);
  text-decoration: underline; text-underline-offset: 3px;
}
.pack__aside:focus-visible { outline: 3px solid #4b4dff; outline-offset: 3px; }

.pack .pack__status { margin: 0 0 12px; min-height: 1.2em; font-size: .88rem; color: var(--ink-soft); }
.pack .pack__status:empty { display: none; }
.pack .pack__status.is-error { color: #c4281c; }
.pack__form { text-align: left; }

/* Code entry and display */
.pack__input, .pack__code {
  display: block;
  width: 100%;
  padding: 14px 12px;
  border-radius: 12px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(.95rem, 4.2vw, 1.1rem);
  letter-spacing: .04em;
  text-align: center;
  color: var(--ink);
  background: var(--surface-sunk);
}
.pack__input { margin-bottom: 12px; padding-inline: 6px; border: 2px solid transparent; text-transform: uppercase; }
.pack__input::placeholder { color: rgba(27,26,25,.3); }
.pack__input:focus { outline: none; border-color: #4b4dff; }
.pack__code { margin-bottom: 12px; user-select: all; }
.pack__copy { display: flex; justify-content: center; gap: 8px; margin-bottom: 18px; }
.pack__copy .soft-btn { min-height: 38px; font-size: .88rem; }
.pack .pack__note { margin: 16px 0 0; font-size: .78rem; }
.pack__note a { color: inherit; }

@keyframes fade-in { from { opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }
@keyframes pack-in { from { opacity: 0; transform: translateY(60px) rotate(-6deg) scale(.92); } }
@keyframes pack-out { to { opacity: 0; transform: translateY(30px) scale(.96); } }
