/* ============================================
   claim.css — the claim page (/claim/<code>, Nov 24)
   views/claim/index.js. Approved preview: frostys-desk
   projects/stickerbook/design/claim-links/ (option A).
   Colors are theme.css tokens, so light and dark both work.
   ============================================ */

.clm-view {
  display: flex;
  justify-content: center;
  padding: 0 16px calc(120px + env(safe-area-inset-bottom, 0px)); /* clear of Safari's bottom bar */
  font-family: 'Poppins', sans-serif;
  color: var(--th-fg-18181b);
}
.clm {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Sticker on a soft purple-to-teal glow, floating gently */
.clm-stage {
  position: relative;
  width: min(300px, 80vw);
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  margin-top: 4px;
}
.clm-stage::before {
  content: "";
  position: absolute;
  inset: 6%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(109, 40, 217, 0.16), rgba(20, 184, 166, 0.10) 60%, transparent 100%);
}
.clm-img {
  position: relative;
  width: 83%;
  height: 83%;
  object-fit: contain;
  filter: drop-shadow(0 10px 18px rgba(30, 10, 60, 0.18));
  animation: clm-float 4.5s ease-in-out infinite;
}
@keyframes clm-float {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-8px) rotate(1.5deg); }
}
.clm-stage.is-dim .clm-img { filter: grayscale(0.6) opacity(0.45); animation: none; }
@media (prefers-reduced-motion: reduce) {
  .clm-img { animation: none; }
}

.clm-kicker {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--th-fg-6d28d9);
}
.clm-kicker svg { width: 14px; height: 14px; }

.clm-title {
  margin: 6px 0 0;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--th-fg-18181b);
  overflow-wrap: anywhere;
}
.clm-title--done { margin-top: 10px; }
.clm-by { margin-top: 4px; font-size: 14px; color: var(--th-fg-71717a); }
.clm-by b { font-weight: 600; color: var(--th-fg-18181b); }
.clm-line {
  margin: 14px 0 0;
  max-width: 320px;
  padding: 10px 14px;
  border-radius: 14px;
  background: var(--th-bg-f5f3ff);
  color: var(--th-fg-3f3f46);
  font-size: 14px;
  line-height: 1.45;
}
.clm-sub { margin: 8px 0 0; font-size: 14px; line-height: 1.45; color: var(--th-fg-71717a); }
.clm-hint { margin: 12px 0 0; font-size: 12px; color: var(--th-fg-8b8b98); }
.clm-empty { height: 40px; }

/* Same gradient as the Messages gift card's Claim (.sb-gift-btn.is-claim) */
.clm-cta {
  width: 100%;
  max-width: 320px;
  height: 50px;
  margin-top: 20px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(to top right, #6D28D9, #14B8A6);
  color: #ffffff;
  font-family: 'Poppins', sans-serif;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.clm-cta:active { transform: scale(0.98); }
.clm-cta:disabled { opacity: 0.7; cursor: default; transform: none; }
.clm-cta--ghost { margin-top: 10px; background: var(--th-bg-f1f1f4); color: var(--th-fg-18181b); }
.clm-cta--wide { max-width: none; }

.clm-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--th-bg-e6faf6);
  color: var(--th-fg-0f766e);
  font-size: 13px;
  font-weight: 600;
}
.clm-badge svg { width: 15px; height: 15px; }

/* Confetti (skipped under Reduce Motion in the script) */
.clm-spark {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 2px;
  opacity: 0;
  pointer-events: none;
  animation: clm-burst 1s ease-out forwards;
}
@keyframes clm-burst {
  0% { opacity: 1; transform: translate(0, 0) rotate(0); }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) rotate(220deg); }
}

/* New since you were here */
.clm-wn { width: 100%; text-align: left; padding-top: 4px; }
.clm-wn-title { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -0.01em; }
.clm-wn-sub { margin-top: 4px; }
.clm-wn-list { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.clm-wn-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
  border: 1px solid var(--th-line-e4e4ec);
  border-radius: 16px;
  background: var(--th-bg-ffffff-up);
}
.clm-wn-ic {
  flex: 0 0 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--th-bg-f5f3ff);
  color: var(--th-fg-6d28d9);
}
.clm-wn-ic svg { width: 20px; height: 20px; }
.clm-wn-row b { display: block; font-size: 14.5px; font-weight: 600; }
.clm-wn-row span { display: block; margin-top: 2px; font-size: 13px; line-height: 1.4; color: var(--th-fg-71717a); }

/* Sign in to claim: a bottom sheet on the phone, a centered card on a computer */
.clm-sheet-wrap { position: fixed; inset: 0; z-index: 1500; }
.clm-scrim {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  opacity: 0;
  transition: opacity 0.25s;
}
.clm-sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px 20px calc(28px + env(safe-area-inset-bottom, 0px));
  border-radius: 22px 22px 0 0;
  background: var(--th-bg-ffffff-up);
  color: var(--th-fg-18181b);
  font-family: 'Poppins', sans-serif;
  transform: translateY(105%);
  transition: transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.clm-sheet-wrap.is-open .clm-scrim { opacity: 1; }
.clm-sheet-wrap.is-open .clm-sheet { transform: none; }
.clm-grab { width: 38px; height: 5px; margin: 0 auto 14px; border-radius: 3px; background: var(--th-line-e4e4ec); }
.clm-sheet-x {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--th-bg-f1f1f4);
  color: var(--th-fg-3f3f46);
  cursor: pointer;
}
.clm-sheet-x svg { width: 16px; height: 16px; }
.clm-sheet-title { margin: 0; font-size: 19px; font-weight: 700; text-align: center; }
.clm-sheet-sub { margin: 4px 0 18px; font-size: 13.5px; color: var(--th-fg-71717a); text-align: center; }
/* login.html's Continue with buttons (auth-refresh.css look) */
.clm-sheet .clm-sso {
  height: 48px;
  margin-bottom: 10px;
  border: 1px solid var(--th-line-e4e4ec);
  border-radius: 999px;
  background: #ffffff;
  color: #18181b;
  font-family: 'Poppins', sans-serif;
  font-size: 15px;
  font-weight: 600;
}
.clm-sso img, .clm-sso svg { width: 18px; height: 18px; }
.clm-sheet .clm-sso--mail { background: var(--th-bg-ffffff-up); color: var(--th-fg-18181b); }
.clm-sheet-link {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 6px 0;
  border: 0;
  background: none;
  color: var(--th-fg-6d28d9);
  font-family: 'Poppins', sans-serif;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
}
@media (min-width: 769px) {
  .clm-view { padding-top: 40px; }
  .clm-sheet {
    left: 50%;
    right: auto;
    top: 50%;
    bottom: auto;
    width: 400px;
    padding: 24px 24px 20px;
    border-radius: 20px;
    transform: translate(-50%, -46%);
    opacity: 0;
    transition: transform 0.25s ease, opacity 0.25s ease;
  }
  .clm-sheet-wrap.is-open .clm-sheet { transform: translate(-50%, -50%); opacity: 1; }
  .clm-grab { display: none; }
}
