/* ===================================================================
   Malek Turns 4 — web-slinger comic birthday page
   Palette and geometry lifted 1:1 from the Claude Design prototype.
   =================================================================== */

:root {
  --ink:    #111318;
  --paper:  #f3efe4;
  --red:    #b5121b;
  --blue:   #1d3fb0;
  --yellow: #f5c518;
  --muted:  #6b6656;
  --night:  #1a1c22;

  --mono: ui-monospace, SFMono-Regular, Menlo, monospace;
  --display: Bangers, cursive;
  --text: Archivo, system-ui, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--night);
  font-family: var(--text);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--red); }
a:hover { color: var(--blue); }

h1, h2, h3, p { margin: 0; }

/* ── Page shell ───────────────────────────────────────────────────── */

.page {
  position: relative;
  min-height: 100vh;
  padding: 0 0 80px;
  overflow-x: hidden;
  background: var(--night);
  background-image:
    radial-gradient(circle at 20% 0%,  #2a2f52 0%, transparent 55%),
    radial-gradient(circle at 85% 12%, #4a1116 0%, transparent 50%);
}

.shell {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ── Spider webs ──────────────────────────────────────────────────────
   Each web is a conic gradient (the radial spokes) layered under a
   repeating radial gradient (the concentric rings), masked to a quarter
   circle anchored on one corner.
   -------------------------------------------------------------------- */

.web {
  position: absolute;
  pointer-events: none;
  width: var(--web-size);
  height: var(--web-size);
  opacity: var(--web-opacity);
  background-image:
    repeating-conic-gradient(from var(--web-from) at var(--web-x) var(--web-y),
      var(--web-color) 0 var(--web-spoke), transparent var(--web-spoke) 11.25deg),
    repeating-radial-gradient(circle at var(--web-x) var(--web-y),
      transparent 0 var(--web-r1), var(--web-color) var(--web-r1) var(--web-r2));
  -webkit-mask-image: radial-gradient(circle at var(--web-x) var(--web-y),
    #000 0 var(--web-mask-in), transparent var(--web-mask-out));
  mask-image: radial-gradient(circle at var(--web-x) var(--web-y),
    #000 0 var(--web-mask-in), transparent var(--web-mask-out));
  --web-spoke: 0.9deg;
  --web-mask-in: 66%;
  --web-mask-out: 71%;
}

/* Page — the big pale web over the top-right corner */
.web--page-a {
  top: 0; right: 0;
  --web-size: 620px;
  --web-opacity: 0.13;
  --web-color: var(--paper);
  --web-from: 180deg;
  --web-x: 100%; --web-y: 0%;
  --web-r1: 78px; --web-r2: 80px;
}

/* Page — a red spoke-only web layered on top of it */
.web--page-b {
  top: 0; right: 0;
  --web-size: 340px;
  --web-opacity: 0.14;
  --web-color: var(--red);
  --web-from: 180deg;
  --web-x: 100%; --web-y: 0%;
  --web-spoke: 1.1deg;
  --web-mask-in: 60%;
  --web-mask-out: 66%;
  background-image:
    repeating-conic-gradient(from var(--web-from) at var(--web-x) var(--web-y),
      var(--web-color) 0 var(--web-spoke), transparent var(--web-spoke) 11.25deg);
}

.web--hero-tl {
  top: -2px; left: -2px;
  --web-size: 300px;
  --web-opacity: 0.2;
  --web-color: var(--ink);
  --web-from: 90deg;
  --web-x: 0%; --web-y: 0%;
  --web-r1: 38px; --web-r2: 40px;
}

.web--hero-br {
  bottom: -2px; right: -2px;
  --web-size: 230px;
  --web-opacity: 0.16;
  --web-color: var(--ink);
  --web-from: 270deg;
  --web-x: 100%; --web-y: 100%;
  --web-r1: 29px; --web-r2: 31px;
}

.web--photo {
  top: 38px; right: -2px;
  --web-size: 190px;
  --web-opacity: 0.18;
  --web-color: var(--ink);
  --web-from: 180deg;
  --web-x: 100%; --web-y: 0%;
  --web-r1: 24px; --web-r2: 26px;
}

.web--countdown {
  bottom: -2px; left: -2px;
  --web-size: 200px;
  --web-opacity: 0.2;
  --web-color: var(--paper);
  --web-from: 0deg;
  --web-x: 0%; --web-y: 100%;
  --web-r1: 25px; --web-r2: 27px;
}

.web--hq {
  bottom: -2px; right: -2px;
  --web-size: 260px;
  --web-opacity: 0.22;
  --web-color: var(--paper);
  --web-from: 180deg;
  --web-x: 100%; --web-y: 100%;
  --web-r1: 33px; --web-r2: 35px;
}

.web--note {
  top: -2px; right: -2px;
  --web-size: 220px;
  --web-opacity: 0.16;
  --web-color: var(--ink);
  --web-from: 180deg;
  --web-x: 100%; --web-y: 0%;
  --web-r1: 28px; --web-r2: 30px;
}

/* ── Spiders ──────────────────────────────────────────────────────── */

.spider {
  width: var(--w);
  transform-origin: 50% 0;
  pointer-events: none;
}

.spider__thread {
  width: var(--thread-w);
  height: var(--thread-h);
  margin: 0 auto;
  background: var(--thread-color);
  opacity: var(--thread-opacity);
}

.spider__body {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--eye-gap);
  width: var(--w);
  height: var(--body-h);
  background: var(--ink);
  border: 3px solid var(--ring);
  border-radius: 50% 50% 46% 46%;
}

.spider__eye {
  width: var(--eye-w);
  height: var(--eye-h);
  background: var(--paper);
  border-radius: 50%;
  animation: blink 5s infinite;
}

/* Hero dangler — drops in on load, then swings */
.hero-spider-rail {
  position: relative;
  padding-top: 34px;
}

.spider--hero {
  position: absolute;
  top: 0;
  right: 26px;
  z-index: 2;
  --w: 40px;
  --body-h: 34px;
  --eye-w: 11px; --eye-h: 8px; --eye-gap: 4px;
  --thread-w: 3px; --thread-h: 118px;
  --thread-color: var(--paper); --thread-opacity: 0.75;
  --ring: var(--paper);
  animation:
    drop 1.1s cubic-bezier(.2, .8, .3, 1) 1,
    dangle 3.6s cubic-bezier(.45, 0, .55, 1) 1.1s infinite;
}

.spider--photo {
  position: absolute;
  top: 46px;
  left: 22px;
  --w: 26px;
  --body-h: 22px;
  --eye-w: 7px; --eye-h: 5px; --eye-gap: 3px;
  --thread-w: 2px; --thread-h: 54px;
  --thread-color: var(--ink); --thread-opacity: 0.55;
  --ring: var(--paper);
  animation: sway 3.1s cubic-bezier(.45, 0, .55, 1) 0s infinite;
}

.spider--gifts {
  position: absolute;
  top: -96px;
  right: -6px;
  --w: 30px;
  --body-h: 26px;
  --eye-w: 8px; --eye-h: 6px; --eye-gap: 3px;
  --thread-w: 3px; --thread-h: 60px;
  --thread-color: var(--paper); --thread-opacity: 0.6;
  --ring: var(--paper);
  animation: sway 2.9s cubic-bezier(.45, 0, .55, 1) 0.7s infinite;
}

.spider--f1 {
  --w: 30px;
  --body-h: 26px;
  --eye-w: 8px; --eye-h: 6px; --eye-gap: 3px;
  --thread-w: 3px; --thread-h: 46px;
  --thread-color: var(--paper); --thread-opacity: 0.5;
  --ring: var(--paper);
  animation: sway 2.4s cubic-bezier(.45, 0, .55, 1) 1.4s infinite;
}

.spider--f2 {
  --w: 22px;
  --body-h: 19px;
  --eye-w: 6px; --eye-h: 4px; --eye-gap: 2px;
  --thread-w: 2px; --thread-h: 74px;
  --thread-color: var(--paper); --thread-opacity: 0.5;
  --ring: var(--paper);
  animation: sway 3.5s cubic-bezier(.45, 0, .55, 1) 2.1s infinite;
}

.spider--f3 {
  --w: 26px;
  --body-h: 22px;
  --eye-w: 7px; --eye-h: 5px; --eye-gap: 3px;
  --thread-w: 3px; --thread-h: 34px;
  --thread-color: var(--paper); --thread-opacity: 0.5;
  --ring: var(--paper);
  animation: sway 2.9s cubic-bezier(.45, 0, .55, 1) 2.8s infinite;
}

/* Walks the dashed line under the parents' note */
.spider--crawler {
  position: absolute;
  top: -16px;
  left: 0;
  --w: 28px;
  --body-h: 24px;
  --eye-w: 8px; --eye-h: 6px; --eye-gap: 3px;
  animation: crawl 14s ease-in-out infinite;
}

.spider--crawler .spider__body { border: 0; }
.spider--crawler .spider__eye { animation: none; }

/* ── Hero ─────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  margin-top: 18px;
  padding: 44px 34px 36px;
  background: var(--paper);
  background-image: radial-gradient(circle, rgba(17, 19, 24, 0.14) 1.6px, transparent 1.7px);
  background-size: 11px 11px;
  border: 6px solid var(--ink);
  box-shadow: 14px 14px 0 var(--red);
}

.hero__deco {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.confetti {
  position: absolute;
  top: -24px;
  display: block;
  border: 2px solid var(--ink);
  pointer-events: none;
  animation-name: confetti;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

.confetti--1 { left:  8%; width: 12px; height:  8px; background: var(--yellow); border-radius: 1px; animation-duration: 7.5s; animation-delay: 0s;   }
.confetti--2 { left: 24%; width:  9px; height:  9px; background: var(--blue);   border-radius: 50%; animation-duration: 8.6s; animation-delay: 1.4s; }
.confetti--3 { left: 41%; width: 14px; height:  6px; background: var(--red);    border-radius: 1px; animation-duration: 7.1s; animation-delay: 2.9s; }
.confetti--4 { left: 58%; width:  8px; height:  8px; background: var(--ink);    border-radius: 50%; animation-duration: 9.2s; animation-delay: 0.7s; }
.confetti--5 { left: 72%; width: 11px; height:  7px; background: var(--yellow); border-radius: 1px; animation-duration: 8.1s; animation-delay: 3.8s; }
.confetti--6 { left: 88%; width:  7px; height: 12px; background: var(--blue);   border-radius: 50%; animation-duration: 7.8s; animation-delay: 2.1s; }

.kicker {
  position: relative;
  display: inline-block;
  padding: 6px 16px 4px;
  background: var(--blue);
  color: var(--paper);
  font-family: var(--display);
  font-size: clamp(18px, 2.4vw, 26px);
  letter-spacing: 2px;
  border: 3px solid var(--ink);
  transform: rotate(-2deg);
}

.hero__title {
  margin: 18px 0 6px;
  font-family: var(--display);
  font-size: clamp(56px, 12vw, 132px);
  font-weight: 400;
  line-height: 0.88;
  letter-spacing: 2px;
  color: var(--red);
  -webkit-text-stroke: 3px var(--ink);
  text-shadow: 7px 7px 0 var(--blue);
}

.hero__lede {
  margin: 16px 0 0;
  max-width: 34ch;
  font-weight: 700;
  font-size: clamp(17px, 2vw, 22px);
  color: var(--ink);
  text-wrap: pretty;
}

.thwip {
  position: absolute;
  right: -14px;
  bottom: -30px;
  padding: 12px 20px 8px;
  background: var(--yellow);
  color: var(--ink);
  border: 5px solid var(--ink);
  font-family: var(--display);
  font-size: clamp(20px, 3vw, 34px);
  transform: rotate(-6deg);
  animation: pulse 3.2s ease-in-out infinite;
}

/* ── Birthday boy + countdown ─────────────────────────────────────── */

.duo {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 26px;
  margin-top: 52px;
  align-items: start;
}

.card-photo {
  position: relative;
  overflow: hidden;
  background: var(--paper);
  border: 6px solid var(--ink);
  box-shadow: 10px 10px 0 var(--blue);
}

.card-photo__bar {
  padding: 10px 16px 6px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--display);
  font-size: 26px;
  font-weight: 400;
  letter-spacing: 1.5px;
}

.card-photo__frame {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  aspect-ratio: 4 / 3;
  background: repeating-linear-gradient(45deg, #e2ddcf 0 12px, #d6d0be 12px 24px);
  border-bottom: 6px solid var(--ink);
}

/* 3:2 to match the artwork — a 4:3 crop would cut the comic's spine off
   the left edge and the badges off the right. */
.card-photo__img {
  display: block;
  width: 100%;
  max-width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-bottom: 6px solid var(--ink);
}

.card-photo--has-photo .web--photo,
.card-photo--has-photo .spider--photo {
  display: none;
}

.card-photo__caption {
  padding: 16px;
  font-weight: 700;
  font-size: 16px;
  color: var(--ink);
}

.placeholder-note {
  padding: 0 20px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}

.card-countdown {
  position: relative;
  overflow: hidden;
  padding: 22px 20px 26px;
  background: var(--red);
  border: 6px solid var(--ink);
  box-shadow: 10px 10px 0 var(--ink);
}

.card-countdown__title {
  position: relative;
  font-family: var(--display);
  font-size: 26px;
  font-weight: 400;
  letter-spacing: 1.5px;
  color: var(--yellow);
}

.countdown {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 16px;
}

.countdown__cell {
  padding: 10px 4px;
  text-align: center;
  background: var(--paper);
  border: 4px solid var(--ink);
}

.countdown__num {
  font-family: var(--display);
  font-size: clamp(26px, 5vw, 40px);
  line-height: 1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.countdown__label {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 1px;
  color: var(--muted);
}

/* Replaces the digits once the party starts, and again once it's over */
.countdown-note {
  margin-top: 16px;
  padding: 14px 10px 10px;
  background: var(--paper);
  border: 4px solid var(--ink);
  font-family: var(--display);
  font-size: clamp(28px, 6vw, 44px);
  line-height: 1;
  letter-spacing: 1px;
  text-align: center;
  color: var(--ink);
}

.card-countdown__foot {
  margin-top: 14px;
  color: var(--paper);
  font-weight: 700;
  font-size: 15px;
}

/* ── Party details ────────────────────────────────────────────────── */

.hq {
  position: relative;
  overflow: hidden;
  margin-top: 52px;
  padding: 30px 28px 34px;
  background: var(--blue);
  color: var(--paper);
  border: 6px solid var(--ink);
  box-shadow: 12px 12px 0 var(--red);
}

.hq__title {
  font-family: var(--display);
  font-size: clamp(30px, 5vw, 46px);
  font-weight: 400;
  letter-spacing: 1.5px;
  color: var(--yellow);
}

.hq__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  gap: 24px;
  margin-top: 20px;
}

.hq__eyebrow {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 2px;
  opacity: 0.7;
}

.hq__value {
  margin-top: 4px;
  font-family: var(--display);
  font-size: 30px;
}

.hq__row {
  position: relative;
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  margin-top: 8px;
}

.hideout {
  padding: 14px 24px 10px;
  background: var(--yellow);
  border: 5px solid var(--ink);
  box-shadow: 8px 8px 0 var(--ink);
  animation: bob 3.8s ease-in-out infinite;
}

.hideout__eyebrow {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 2px;
  color: #6b5a00;
}

.hideout__name {
  font-family: var(--display);
  font-size: clamp(28px, 5.5vw, 52px);
  line-height: 1;
  letter-spacing: 1px;
  color: var(--red);
  -webkit-text-stroke: 2px var(--ink);
}

.hq__intel {
  flex: 1;
  /* Never wider than what's actually available — a bare 230px min-width
     overflows the panel on a 320px screen. */
  min-width: min(230px, 100%);
}

/* A stamp reads as a stamp on one line. Sized against the widest fallback
   face rather than Bangers' metrics, so it can't wrap before the font
   loads either. */
.classified {
  display: inline-block;
  max-width: 100%;
  padding: 5px clamp(7px, 2.6vw, 10px) 3px;
  border: 3px dashed var(--yellow);
  color: var(--yellow);
  font-family: var(--display);
  font-size: clamp(15px, 3.4vw, 20px);
  letter-spacing: clamp(0.2px, 0.35vw, 3px);
  white-space: nowrap;
  transform: rotate(-3deg);
}

/* Below this the stamp's tracking is the last thing standing between
   15px type and the panel edge. Desktop keeps the full 3px. */
@media (max-width: 340px) {
  .classified { letter-spacing: 0.2px; }
}

.hq__copy {
  margin-top: 10px;
  max-width: 34ch;
  font-weight: 700;
  font-size: 15px;
  opacity: 0.92;
  text-wrap: pretty;
}

.hq__mono {
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.5px;
  color: var(--yellow);
}

.bam {
  padding: 10px 18px 6px;
  background: var(--red);
  color: var(--paper);
  border: 5px solid var(--ink);
  font-family: var(--display);
  font-size: 26px;
  transform: rotate(6deg);
}

/* Reads as a sign taped to the wall, not a control: flat (no raised
   shadow) and slightly tilted, so nobody taps it expecting something. */
.coords {
  display: inline-block;
  margin-top: 24px;
  padding: 10px 22px 6px;
  background: var(--yellow);
  color: var(--ink);
  border: 4px solid var(--ink);
  font-family: var(--display);
  font-size: clamp(19px, 2.6vw, 24px);
  letter-spacing: 1px;
  transform: rotate(-1.5deg);
}

/* The gift-list spider hangs 6px past its title, which runs off the screen
   once the title is nearly viewport-wide. Tuck it in on the narrowest
   phones so it isn't sliced by the page's overflow clip. */
@media (max-width: 340px) {
  .spider--gifts { right: 0; }
}

/* ── Gift list ────────────────────────────────────────────────────── */

.gifts__head {
  margin-top: 64px;
  text-align: center;
}

.gifts__title-wrap {
  position: relative;
  display: inline-block;
}

.gifts__title {
  padding: 12px 26px 8px;
  background: var(--yellow);
  color: var(--ink);
  border: 6px solid var(--ink);
  box-shadow: 8px 8px 0 var(--red);
  font-family: var(--display);
  font-size: clamp(30px, 6vw, 54px);
  font-weight: 400;
  letter-spacing: 2px;
}

.gifts__lede {
  margin: 18px auto 0;
  max-width: 56ch;
  font-weight: 700;
  font-size: 16px;
  color: #e6e2d6;
  text-wrap: pretty;
}

.gift-grid {
  display: grid;
  /* Every row the same height, so a gift with a long description doesn't
     make its whole row taller than the one above it. With the photo frame
     fixed at 16:10, that makes all 22 cards identical. */
  grid-auto-rows: 1fr;
  /* Two per row, all the way down to the narrowest phone. The floor is a
     percentage, not a fixed width, so it shrinks with the container instead
     of tripping auto-fit back to one column: two 46% tracks plus the gap
     always fit, while the 290px cap keeps tracks from ballooning on desktop.
     Card padding, type and borders scale with clamp() below to suit the
     ~160px-wide card this produces on a 393px screen. */
  grid-template-columns: repeat(auto-fit, minmax(min(46%, 290px), 1fr));
  gap: clamp(10px, 2vw, 24px);
  margin-top: 34px;
}

.gift {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--paper);
  border: clamp(3px, 0.7vw, 6px) solid var(--ink);
  box-shadow: clamp(4px, 1vw, 9px) clamp(4px, 1vw, 9px) 0 var(--blue);
  transition: opacity 0.18s ease-out;
}

.gift--claimable { cursor: pointer; }
.gift--taken { opacity: 0.72; }

.gift__media {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 10;
  background: repeating-linear-gradient(45deg, #e2ddcf 0 12px, #d6d0be 12px 24px);
  border-bottom: clamp(3px, 0.7vw, 6px) solid var(--ink);
}

.gift__media .placeholder-note {
  padding: 0 18px;
  font-size: 12px;
}

/* Shop photos come at whatever aspect the seller used, so contain rather than
   crop — cover lopped the ends off the long thin ones, like the racket.

   Absolute on purpose: as an in-flow flex item, height:100% had no definite
   parent height to resolve against, so it fell back to the image's intrinsic
   height and stretched the box — a 469x1500 racket shot made a 1884px-tall
   card, and .gift__media's aspect-ratio never got a say. Out of flow, the
   frame sets the size and the photo fits inside it.

   The white ground keeps the placeholder stripes from showing through the
   letterbox bars; most shop photos are on white anyway. */
.gift__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 10px;
  background: #fff;
}

.gift__num {
  position: absolute;
  top: 0;
  left: 0;
  padding: 4px clamp(8px, 1.5vw, 13px) 2px;
  background: var(--red);
  color: var(--paper);
  border-right: 4px solid var(--ink);
  border-bottom: 4px solid var(--ink);
  font-family: var(--display);
  font-size: clamp(16px, 2.4vw, 22px);
  letter-spacing: 1px;
}

.gift__body {
  display: flex;
  flex-direction: column;
  gap: clamp(7px, 1.1vw, 10px);
  flex: 1;
  padding: clamp(11px, 1.6vw, 18px);
}

.gift__name {
  font-family: var(--display);
  font-size: clamp(18px, 3.1vw, 26px);
  font-weight: 400;
  line-height: 1.05;
  color: var(--ink);
}

.gift__desc {
  flex: 1;
  font-weight: 700;
  font-size: clamp(12px, 1.7vw, 15px);
  color: #4a4636;
}

.gift__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(5px, 1vw, 10px);
  padding-top: 2px;
}

.gift__price {
  padding: 4px clamp(7px, 1.1vw, 11px) 2px;
  background: var(--yellow);
  color: var(--ink);
  border: 3px solid var(--ink);
  font-family: var(--display);
  font-size: clamp(15px, 2.2vw, 19px);
  letter-spacing: 0.5px;
}

/* "Where to buy" — secondary to the red claim button, so it reads as a
   chip beside the price rather than a second full-width call to action. */
.gift__link {
  display: inline-block;
  align-self: flex-start;
  padding: 4px clamp(7px, 1.1vw, 11px) 2px;
  background: var(--blue);
  color: var(--paper);
  border: 3px solid var(--ink);
  font-family: var(--display);
  font-size: clamp(15px, 2.2vw, 19px);
  letter-spacing: 0.5px;
  text-decoration: none;
  white-space: nowrap;
}

.gift__link:hover,
.gift__link:focus-visible {
  background: var(--ink);
  color: var(--yellow);
}

.gift__link[hidden] { display: none; }

.gift__vendor {
  font-size: clamp(10px, 1.3vw, 11px);
  font-weight: 900;
  letter-spacing: 1px;
  /* The sheet is typed by hand, so don't depend on the casing it arrives in */
  text-transform: uppercase;
  color: var(--muted);
}

.gift__claim {
  display: flex;
  align-items: center;
  justify-content: center;
  /* 44px floor keeps the tap target honest once the card is half-width */
  min-height: 44px;
  box-sizing: border-box;
  width: 100%;
  margin: 0;
  padding: clamp(8px, 1.3vw, 10px) 8px clamp(5px, 1vw, 7px);
  background: var(--red);
  color: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 0;
  font-family: var(--display);
  font-size: clamp(14px, 2.1vw, 20px);
  letter-spacing: 1px;
  text-align: center;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.gift__claim[disabled] {
  cursor: default;
}

.gift--taken .gift__claim {
  background: var(--ink);
  color: var(--yellow);
}

.gift__who {
  display: flex;
  flex-direction: column;
  gap: 5px;
  cursor: auto;
}

.gift__who[hidden] { display: none; }

.gift__who-label {
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 1px;
  color: var(--muted);
}

.gift__who-input {
  width: 100%;
  padding: 8px 10px;
  background: #fffdf5;
  color: var(--ink);
  border: 3px solid var(--ink);
  border-radius: 0;
  font-family: var(--text);
  font-weight: 700;
  font-size: 15px;
}

/* Claimed by another guest — theirs to undo, not yours */
.gift--theirs,
.gift--theirs .gift__claim {
  cursor: default;
}

.gifts__notice {
  max-width: 52ch;
  margin: 10px auto 0;
  padding: 8px 14px 6px;
  background: var(--yellow);
  color: var(--ink);
  border: 3px solid var(--ink);
  font-weight: 700;
  font-size: 14px;
  text-align: center;
  text-wrap: pretty;
}

.gifts__summary {
  margin-top: 22px;
  text-align: center;
  font-weight: 700;
  font-size: 14px;
  color: #8d897b;
}

/* ── Note from the parents ────────────────────────────────────────── */

.note {
  position: relative;
  overflow: hidden;
  margin-top: 64px;
  padding: 32px 28px;
  background: var(--paper);
  border: 6px solid var(--ink);
  box-shadow: 12px 12px 0 var(--yellow);
}

.note__title {
  font-family: var(--display);
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 400;
  letter-spacing: 1px;
  color: var(--blue);
}

.note__body {
  margin: 14px 0 0;
  max-width: 60ch;
  font-weight: 700;
  font-size: clamp(16px, 1.8vw, 19px);
  color: var(--ink);
  text-wrap: pretty;
}

.note__sign {
  margin: 18px 0 0;
  font-family: var(--display);
  font-size: 26px;
  color: var(--red);
}

.note__rail {
  position: relative;
  height: 34px;
  margin-top: 20px;
  border-top: 3px dashed var(--ink);
}

/* ── Footer ───────────────────────────────────────────────────────── */

.outro {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-top: 44px;
}

.outro__spiders {
  display: flex;
  gap: 38px;
}

.outro__line {
  text-align: center;
  font-family: var(--display);
  /* Floor dropped from 22px so "SEE YOU AT THE HEADQUARTERS" clears one
     line on a phone instead of breaking mid-phrase. */
  font-size: clamp(18px, 3.6vw, 34px);
  letter-spacing: 2px;
  color: var(--paper);
}

/* The signature travels as one unit, so a wrap puts it on its own line
   rather than stranding it against the end of the sign-off. */
.outro__sig { white-space: nowrap; }

.outro__dot { color: var(--red); }

/* ── Farewell (after CONFIG.retiresOn) ────────────────────────────── */

.farewell {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 40px 20px;
  background: var(--night);
  background-image:
    radial-gradient(circle at 20% 0%,  #2a2f52 0%, transparent 55%),
    radial-gradient(circle at 85% 12%, #4a1116 0%, transparent 50%);
}

.farewell__card {
  max-width: 44ch;
  padding: 34px 30px 30px;
  background: var(--paper);
  background-image: radial-gradient(circle, rgba(17, 19, 24, 0.14) 1.6px, transparent 1.7px);
  background-size: 11px 11px;
  border: 6px solid var(--ink);
  box-shadow: 12px 12px 0 var(--red);
}

.farewell__kicker {
  display: inline-block;
  padding: 5px 12px 3px;
  background: var(--blue);
  color: var(--paper);
  border: 3px solid var(--ink);
  font-family: var(--display);
  font-size: 18px;
  letter-spacing: 2px;
  transform: rotate(-2deg);
}

.farewell__title {
  margin-top: 18px;
  font-family: var(--display);
  font-size: clamp(42px, 11vw, 72px);
  line-height: 0.9;
  letter-spacing: 2px;
  color: var(--red);
  -webkit-text-stroke: 2px var(--ink);
  text-shadow: 5px 5px 0 var(--blue);
}

.farewell__body {
  margin-top: 18px;
  font-weight: 700;
  font-size: 16px;
  color: var(--ink);
  text-wrap: pretty;
}

.farewell__sign {
  margin-top: 14px;
  font-family: var(--display);
  font-size: 24px;
  color: var(--red);
}

/* ── Keyframes ────────────────────────────────────────────────────── */

@keyframes dangle {
  0%, 100% { transform: rotate(-7deg); }
  50%      { transform: rotate(7deg); }
}

@keyframes drop {
  0%   { transform: translateY(-260px); }
  100% { transform: translateY(0); }
}

@keyframes pulse {
  0%, 62%, 100% { transform: scale(1, 1) rotate(-6deg); }
  70%           { transform: scale(1.14, 0.86) rotate(-6deg); }
  80%           { transform: scale(0.94, 1.1) rotate(-6deg); }
  90%           { transform: scale(1.03, 0.98) rotate(-6deg); }
}

@keyframes blink {
  0%, 92%, 100% { transform: scaleY(1); }
  96%           { transform: scaleY(0.1); }
}

@keyframes crawl {
  0%   { left: 0; }
  50%  { left: calc(100% - 28px); }
  100% { left: 0; }
}

@keyframes bob {
  0%, 100% { transform: rotate(-2deg) translateY(0); }
  50%      { transform: rotate(-2deg) translateY(-9px); }
}

@keyframes sway {
  0%, 100% { transform: rotate(-14deg); }
  50%      { transform: rotate(14deg); }
}

@keyframes confetti {
  0%   { transform: translateY(-24px) rotate(0deg); opacity: 0; }
  8%   { opacity: 1; }
  100% { transform: translateY(430px) rotate(680deg); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  .confetti { display: none; }
}
