:root {
  --red: #C8102E;
  --pine: #0E4D33;
  --pine-deep: #0A3A26;
  --paper: #FFFFFF;
  --ink: #000000;
  --gold: #FFD23F;
  --gold-pale: #FFE36B; /* 4.6:1 on --red, for small text on the cover */
  --marker: #E10600;
  --elf: #0A8F4E;
  --sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --hand: "Permanent Marker", "Comic Sans MS", "Chalkboard SE", cursive;
  --page: 1120px;
  --gutter: clamp(20px, 5vw, 48px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.45;
}
h1, h2, h3, p { margin: 0; }
button { font: inherit; }
:focus-visible { outline: 3px solid currentColor; outline-offset: 3px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Starburst (shared by the countdown and price tags) ---------- */
.burst {
  display: grid;
  place-items: center;
  align-content: center;
  text-align: center;
  background: var(--gold);
  color: var(--ink);
  clip-path: polygon(100% 50%, 90.21% 58%, 96.19% 69.13%, 84.09% 72.78%, 85.36% 85.36%, 72.78% 84.09%, 69.13% 96.19%, 58% 90.21%, 50% 100%, 42% 90.21%, 30.87% 96.19%, 27.22% 84.09%, 14.64% 85.36%, 15.91% 72.78%, 3.81% 69.13%, 9.79% 58%, 0% 50%, 9.79% 42%, 3.81% 30.87%, 15.91% 27.22%, 14.64% 14.64%, 27.22% 15.91%, 30.87% 3.81%, 42% 9.79%, 50% 0%, 58% 9.79%, 69.13% 3.81%, 72.78% 15.91%, 85.36% 14.64%, 84.09% 27.22%, 96.19% 30.87%, 90.21% 42%);
}

/* ---------- Cover ---------- */
.cover {
  position: relative;
  overflow: hidden;
  color: #fff;
  background-color: var(--red);
  background-image: radial-gradient(rgba(0, 0, 0, .13) 1.2px, transparent 1.7px);
  background-size: 7px 7px;
}
.snow { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.cover-inner {
  position: relative;
  max-width: var(--page);
  margin: 0 auto;
  padding: clamp(40px, 7vw, 88px) var(--gutter) clamp(56px, 8vw, 104px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px 56px;
  align-items: center;
}
.dear {
  font-family: var(--hand);
  color: var(--gold);
  font-size: clamp(1.5rem, 3.2vw, 2.25rem);
  transform: rotate(-3deg);
  transform-origin: left bottom;
  margin-bottom: 14px;
}
.masthead {
  font-weight: 900;
  letter-spacing: -.025em;
  text-shadow: .05em .05em 0 var(--ink);
}
.masthead span { display: block; }
/* The hat and lights are sized in em, so they scale with the name. Its box hugs the word so they line up with the letters. */
.masthead-name {
  position: relative;
  width: -webkit-fit-content;
  width: -moz-fit-content;
  width: fit-content;
  margin: .4em 0 .25em; /* room for the hat above and the bulbs below */
  font-stretch: 125%;
  font-size: clamp(3.25rem, 10vw, 7.75rem);
  line-height: .95;
}
/* The name as snow-capped pine: green letters in a black outline on a dark green 3D block, with snow piled on top.
   Sizes are in em, measured from the top of the word: the snow line sits at .355em, just below the tops of the small letters. */
@supports (-webkit-background-clip: text) or (background-clip: text) {
  .snowy {
    position: relative;
    color: transparent;
    background-image: linear-gradient(180deg, #34C27E .3em, #0E8A4A .55em, #075A30 .82em);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-stroke: .01em #04301A;
    text-shadow: none; /* a text shadow would paint over the fill, so the outline and depth come from the filter */
    filter:
      drop-shadow(.022em 0 0 var(--ink)) drop-shadow(-.022em 0 0 var(--ink)) drop-shadow(0 .022em 0 var(--ink)) drop-shadow(0 -.022em 0 var(--ink))
      drop-shadow(.018em .018em 0 var(--pine-deep)) drop-shadow(.018em .018em 0 var(--pine-deep)) drop-shadow(.018em .018em 0 var(--pine-deep))
      drop-shadow(.03em .03em 0 var(--ink));
  }
  /* The snow: a copy of the word from data-text (keep it the same as the visible word), filled white down to the snow line,
     with drips of two sizes hanging from it. The white shadows make the snow bulge past the letter tops.
     The empty alt text keeps screen readers from reading the name twice. Browsers without that syntax skip the snow. */
  .snowy::after {
    content: attr(data-text) / "";
    position: absolute;
    left: 0;
    top: 0;
    white-space: nowrap;
    pointer-events: none;
    color: transparent;
    background-image:
      radial-gradient(.05em .085em at 50% 0, #EEF6FF 96%, transparent 100%),
      radial-gradient(.032em .05em at 50% 0, #EEF6FF 96%, transparent 100%),
      linear-gradient(180deg, #FFF .2em, #E6F2FF .355em, transparent .355em);
    background-size: .29em .09em, .17em .06em, auto;
    background-position: .02em .35em, .11em .35em, 0 0;
    background-repeat: repeat-x, repeat-x, no-repeat;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-stroke: 0;
    filter: drop-shadow(0 -.035em 0 #FFF) drop-shadow(.016em -.008em 0 #FFF) drop-shadow(-.016em -.008em 0 #FFF);
  }
}
@media (forced-colors: active) {
  .snowy { color: CanvasText; background: none; -webkit-text-stroke: 0; filter: none; }
  .snowy::after { content: none; }
}
/* A Santa hat on the D. SVG units are hundredths of an em, measured from the top left of the word. */
.santa-hat {
  position: absolute;
  left: -.14em;
  top: -.54em;
  width: 1.4em;
  height: .82em;
  overflow: visible;
  filter: drop-shadow(.05em .05em 0 var(--ink));
  pointer-events: none;
}
.hat-red { fill: var(--marker); }
.hat-shade { fill: #A3060B; }
.hat-fur { fill: #FFF; }
/* A strand of lights strung along the bottom of the name, same units as the hat. */
.name-lights {
  position: absolute;
  left: -.1em;
  top: .66em;
  width: 5.34em;
  height: .62em;
  overflow: visible;
  pointer-events: none;
}
.name-lights .wire { fill: none; stroke: var(--pine-deep); stroke-width: 3; stroke-linecap: round; }
.name-bulb .socket { fill: var(--pine-deep); }
.name-bulb .glass { fill: var(--c); stroke: rgba(0, 0, 0, .35); stroke-width: 1; }
.name-bulb .glow { fill: var(--c); filter: url(#bulb-glow); opacity: .75; }
/* Every other bulb blinks, swapping halfway through, so the strand never goes dark. */
.name-bulb .glass { animation: blink-glass 1.6s steps(1, end) infinite; }
.name-bulb .glow { animation: blink-glow 1.6s steps(1, end) infinite; }
.name-bulb:nth-child(even) .glass, .name-bulb:nth-child(even) .glow { animation-delay: -.8s; }
@keyframes blink-glass { 50% { opacity: .7; } }
@keyframes blink-glow { 50% { opacity: 0; } }
/* While the music plays, app.js swaps the bulbs on the beat (with the strand at the top) instead.
   The unlit look matches the 50% frames above. */
@media (prefers-reduced-motion: no-preference) {
  .is-spirit .name-bulb .glass, .is-spirit .name-bulb .glow { animation: none; }
  .is-spirit .name-bulb:not(.is-lit) .glass { opacity: .7; }
  .is-spirit .name-bulb:not(.is-lit) .glow { opacity: 0; }
}
.masthead-sub { margin-top: .2em; font-size: clamp(1.75rem, 4.4vw, 3.5rem); line-height: 1; }
.deck {
  margin-top: 28px;
  max-width: 34ch;
  font-size: clamp(1.125rem, 1.8vw, 1.375rem);
  font-stretch: 87.5%;
  font-weight: 500;
  line-height: 1.35;
}
.cover-actions { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 12px 16px; }
.btn {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 12px 22px;
  border-radius: 999px;
  border: 2px solid var(--ink);
  font-weight: 800;
  font-stretch: 87.5%;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, background-color .12s ease;
  touch-action: manipulation;
}
.btn-gold { background: var(--gold); color: var(--ink); box-shadow: 4px 4px 0 var(--ink); }
.btn-gold:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.btn-ghost { background: transparent; color: #fff; border-color: #fff; }
.btn-ghost[aria-pressed="true"] { background: #fff; color: var(--red); }

.cover-side { display: grid; justify-items: center; gap: 22px; }
.countdown {
  width: clamp(170px, 19vw, 230px);
  aspect-ratio: 1;
  padding: 21%;
  gap: 4px;
  transform: rotate(9deg);
}
.burst-num {
  display: block;
  font-weight: 900;
  font-size: clamp(2.75rem, 5.5vw, 4.25rem);
  line-height: .9;
}
.burst-label {
  display: block;
  font-weight: 700;
  font-stretch: 75%;
  font-size: clamp(.875rem, 1.3vw, 1rem);
  line-height: 1.1;
}
.hint {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  max-width: 17ch;
  font-family: var(--hand);
  color: var(--gold-pale);
  font-size: 1.25rem;
  line-height: 1.15;
  transform: rotate(-4deg);
}
.hint svg { flex: none; width: 40px; height: 68px; margin-top: 16px; }
.hint path { fill: none; stroke: var(--gold-pale); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Catalog page ---------- */
.catalog {
  padding: clamp(56px, 7vw, 96px) var(--gutter) clamp(80px, 9vw, 128px);
  overflow-x: hidden;
  overflow-x: clip;
}
.toolbar {
  max-width: var(--page);
  margin: 0 auto clamp(56px, 6vw, 80px);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px 32px;
}
.section-title {
  font-weight: 800;
  font-stretch: 75%;
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  line-height: 1;
  letter-spacing: -.01em;
}
.noscript { max-width: var(--page); margin: 0 auto; font-weight: 700; }

.grid {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: var(--page);
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-flow: row dense;
  gap: clamp(56px, 5.5vw, 72px) clamp(36px, 4vw, 48px);
}
/* Extra room around circled picks so one ring never runs into the next. */
@media (min-width: 601px) {
  .catalog .grid { gap: clamp(96px, 9vw, 112px) clamp(64px, 7vw, 80px); }
}

/* ---------- Gift ---------- */
.gift { position: relative; grid-column: span 3; display: flex; flex-direction: column; }
.gift.is-circled { grid-column: span 6; }

.cutout {
  position: relative;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  border-radius: 6px;
  background-color: var(--tint, #8EC5FF);
  background-image: radial-gradient(rgba(0, 0, 0, .14) 1.1px, transparent 1.6px);
  background-size: 6px 6px;
}
.is-circled .cutout { aspect-ratio: 5 / 4; }
.icon {
  font-size: clamp(4rem, 7vw, 5.5rem);
  line-height: 1;
  transform: rotate(-8deg);
  filter: drop-shadow(5px 6px 0 rgba(0, 0, 0, .22));
}
.is-circled .icon { font-size: clamp(5rem, 9vw, 7rem); }
.photo {
  width: 78%;
  height: 78%;
  padding: 10px;
  object-fit: contain;
  background: #fff;
  border-radius: 4px;
  box-shadow: 5px 6px 0 rgba(0, 0, 0, .18);
  transform: rotate(-3deg);
}
.price {
  position: absolute;
  top: -18px;
  left: -18px;
  z-index: 4;
  width: 96px;
  height: 96px;
  padding: 14px;
  transform: rotate(-12deg);
  font-weight: 800;
  font-stretch: 75%;
  font-size: 1.15rem;
  line-height: 1;
}
.gift-name {
  font-weight: 800;
  font-stretch: 80%;
  font-size: 1.375rem;
  line-height: 1.1;
  margin-bottom: 8px;
}
.is-circled .gift-name { font-size: 1.75rem; }
.gift-blurb { max-width: 40ch; font-size: 1rem; margin-bottom: 14px; flex: 1; }
.find {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  touch-action: manipulation;
  color: var(--ink);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}
/* Text sits above the marker ring, with a white halo, so it stays readable where the ring crosses it. */
.gift-name, .gift-blurb, .finds { position: relative; z-index: 3; }
.is-circled .gift-name, .is-circled .gift-blurb, .is-circled .find {
  text-shadow: 0 0 2px var(--paper), 0 0 2px var(--paper), 0 0 4px var(--paper);
}
.finds { display: flex; flex-wrap: wrap; gap: 0 20px; }

/* Hand-drawn marker ring around circled gifts */
.ring {
  position: absolute;
  left: -28px;
  top: -24px;
  z-index: 2;
  width: calc(100% + 56px);
  height: calc(100% + 72px);
  overflow: visible;
  pointer-events: none;
}
.ring path {
  fill: none;
  stroke: var(--marker);
  stroke-width: 1.1;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  opacity: 0;
}
.ring.is-drawn path { animation: draw 1s cubic-bezier(.55, .1, .35, 1) var(--delay, 0s) both; }
.elf-ring path { stroke: var(--elf); }
@keyframes draw {
  0% { opacity: 0; stroke-dashoffset: 1; }
  1% { opacity: 1; }
  100% { opacity: 1; stroke-dashoffset: 0; }
}

/* Scribbled margin notes */
.note {
  position: absolute;
  top: -36px;
  right: -8px;
  z-index: 3;
  font-family: var(--hand);
  color: var(--marker);
  font-size: 1.5rem;
  line-height: 1;
  white-space: nowrap;
  transform: rotate(6deg);
  pointer-events: none;
  transition: opacity .35s ease calc(var(--delay, 0s) + .85s);
}
.ring ~ .note { opacity: 0; }
.ring.is-drawn ~ .note:not(.elf-note) { opacity: 1; }
/* The elf's pick: a sticker on the photo, clear of the marker rings. */
.elf-note {
  top: auto;
  right: auto;
  bottom: 12px;
  left: 12px;
  padding: 2px 10px;
  border: 2px solid var(--elf);
  border-radius: 4px;
  background: var(--paper);
  color: var(--pine);
  font-size: 1.25rem;
  transform: rotate(-4deg);
  opacity: 0;
  transition-delay: .7s;
}
.elf-note.is-shown { opacity: 1; }

/* ---------- The present raccoon ---------- */
.raccoon {
  position: absolute;
  z-index: 5;
  width: clamp(138px, 13.5vw, 174px);
  aspect-ratio: 150 / 110;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  translate: var(--x, 0px) 0;
  transition: translate var(--walk, 0s) linear;
}
.raccoon svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: drop-shadow(4px 5px 0 rgba(0, 0, 0, .22));
}
.raccoon.is-facing-left svg { scale: -1 1; }
.r-leg { transform-box: fill-box; transform-origin: 50% 15%; }
.r-tail { transform-box: fill-box; transform-origin: 90% 95%; animation: wag 1.1s ease-in-out infinite alternate; }
.r-sway { transform-box: view-box; transform-origin: 64px 104px; }
.is-walking .r-leg-a { animation: step .28s ease-in-out infinite alternate; }
.is-walking .r-leg-b { animation: step .28s ease-in-out infinite alternate-reverse; }
.is-walking .r-sway { animation: bob .28s ease-in-out infinite alternate; }
.is-tugging .r-sway { animation: heave .45s ease-in-out infinite alternate; }
.is-scared svg { animation: startle .35s ease-out; }
.is-scared .r-leg-a { animation: step .1s linear infinite alternate; }
.is-scared .r-leg-b { animation: step .1s linear infinite alternate-reverse; }
.r-alert { opacity: 0; }
.is-scared .r-alert { opacity: 1; }
.raccoon-note {
  position: absolute;
  bottom: 96%;
  left: 46%;
  font-family: var(--hand);
  color: var(--marker);
  font-size: 1.75rem;
  line-height: 1;
  white-space: nowrap;
  text-shadow: 0 0 2px var(--paper), 0 0 2px var(--paper), 0 0 4px var(--paper); /* readable over a dark photo */
  rotate: -8deg;
  opacity: 0;
  transition: opacity .2s ease;
  pointer-events: none;
}
.raccoon.is-facing-left .raccoon-note { left: auto; right: 46%; rotate: 8deg; }
.is-tugging .raccoon-note { opacity: 1; }
/* The photo being pulled toward the raccoon, and its bounce when saved. */
.gift .cutout .is-tugged { animation: tugged .45s ease-in-out infinite alternate; }
.gift .cutout .is-saved { animation: saved .5s cubic-bezier(.2, .9, .3, 1.4); }
@keyframes step { from { transform: rotate(-24deg); } to { transform: rotate(24deg); } }
@keyframes bob { to { transform: translateY(-3px); } }
@keyframes heave { from { transform: rotate(0deg); } to { transform: rotate(-8deg) translateX(-3px); } }
@keyframes wag { from { transform: rotate(-7deg); } to { transform: rotate(9deg); } }
@keyframes startle { 35% { translate: 0 -24px; } }
@keyframes tugged {
  from { translate: 0 0; rotate: 0deg; }
  to { translate: calc(var(--tug, 1) * 26px) 3px; rotate: calc(var(--tug, 1) * 4deg); }
}
@keyframes saved { 40% { scale: 1.06; } }

/* ---------- Dream tier ---------- */
.dream {
  color: #fff;
  background-color: var(--pine);
  background-image: radial-gradient(rgba(255, 255, 255, .06) 1.1px, transparent 1.6px);
  background-size: 8px 8px;
  padding: clamp(64px, 8vw, 104px) var(--gutter) clamp(80px, 9vw, 120px);
  overflow-x: hidden;
  overflow-x: clip;
}
.dream-head { max-width: var(--page); margin: 0 auto clamp(56px, 6vw, 80px); }
.dream-deck { margin-top: 12px; font-size: 1.25rem; font-stretch: 87.5%; }
.dream .gift { grid-column: span 4; }
.dream .cutout { aspect-ratio: 4 / 3; }
/* The dream list has drawings, not product photos: no white frame, they sit right on the card like the emoji did. */
.dream .photo {
  width: 86%;
  height: 86%;
  padding: 0;
  background: none;
  box-shadow: none;
  filter: drop-shadow(5px 6px 0 rgba(0, 0, 0, .22));
}
.dream .note { color: var(--gold); }
.dream .price { font-stretch: 100%; font-size: 1rem; }

/* ---------- Sign-off ---------- */
.sign-off { background: var(--pine-deep); color: #fff; padding: clamp(48px, 6vw, 72px) var(--gutter); }
.sign-off-inner { max-width: var(--page); margin: 0 auto; display: grid; gap: 10px; }
.sign-off p { max-width: 60ch; }
.credits { margin-top: 20px; font-size: .75rem; color: rgba(255, 255, 255, .72); }
.credits a { color: inherit; }
.signature {
  margin-top: 8px;
  font-family: var(--hand);
  color: var(--gold);
  font-size: 1.75rem;
  transform: rotate(-2deg);
  transform-origin: left;
}
.psst {
  justify-self: start;
  margin-top: 20px;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0;
  touch-action: manipulation;
  border: 0;
  background: none;
  color: rgba(255, 255, 255, .72);
  font-stretch: 87.5%;
  cursor: pointer;
  text-decoration: underline dotted;
  text-underline-offset: 4px;
}

/* ---------- Toast + effects layer ---------- */
.toast {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 24px;
  z-index: 60;
  width: fit-content;
  max-width: 480px;
  margin-inline: auto;
  padding: 12px 22px;
  border-radius: 24px;
  text-align: center;
  background: var(--ink);
  color: #fff;
  font-weight: 700;
  font-stretch: 87.5%;
  box-shadow: 4px 4px 0 var(--gold);
  opacity: 0;
  transform: translateY(calc(100% + 32px));
  transition: transform .3s cubic-bezier(.2, .9, .3, 1.2), opacity .2s ease;
  pointer-events: none;
}
.toast.is-on { opacity: 1; transform: translateY(0); }
.fx { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 50; pointer-events: none; }

/* ---------- Christmas spirit ---------- */
/* YouTube's player, framed like a little TV. YouTube asks for embedded players of at least 200 x 200. */
.radio {
  position: relative;
  width: min(100%, 356px);
  height: 200px;
  margin-top: 24px;
  border: 3px solid #fff;
  border-radius: 8px;
  overflow: hidden;
  background: var(--ink);
  box-shadow: 6px 6px 0 var(--gold);
}
.radio iframe { display: block; width: 100%; height: 100%; border: 0; }

/* A strand of lights that drops in along the top of the screen. */
.lights {
  --gap: 44px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  display: flex;
  height: 48px;
  overflow: hidden;
  pointer-events: none;
  transform: translateY(-100%);
  transition: transform .45s cubic-bezier(.2, .9, .3, 1.2);
}
.lights.is-on { transform: none; }
.lights::before { /* the wire: one scallop per bulb */
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 16px;
  background: radial-gradient(ellipse 50% 100% at 50% 0, transparent 84%, var(--pine-deep) 87%, var(--pine-deep) 100%, transparent 100%) 0 0 / var(--gap) 100% repeat-x;
}
.bulb { position: relative; flex: 0 0 var(--gap); }
.bulb::before { /* socket */
  content: "";
  position: absolute;
  top: 12px;
  left: calc(50% - 4px);
  width: 8px;
  height: 7px;
  border-radius: 2px;
  background: var(--pine-deep);
}
.bulb::after { /* glass */
  content: "";
  position: absolute;
  top: 18px;
  left: calc(50% - 6px);
  width: 12px;
  height: 18px;
  border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%;
  background: var(--c);
  opacity: .35;
  transform: rotate(var(--tilt, 6deg));
  transform-origin: 50% 0;
  transition: opacity .12s ease, box-shadow .12s ease;
}
.bulb:nth-child(even)::after { --tilt: -6deg; }
.bulb.is-lit::after { opacity: 1; box-shadow: 0 0 10px 3px var(--c); }
.bulb:nth-child(4n + 1), .name-bulb:nth-child(4n + 1) { --c: #FF4A4A; }
.bulb:nth-child(4n + 2), .name-bulb:nth-child(4n + 2) { --c: var(--gold); }
.bulb:nth-child(4n + 3), .name-bulb:nth-child(4n + 3) { --c: #2EE58A; }
.bulb:nth-child(4n + 4), .name-bulb:nth-child(4n + 4) { --c: #5AB0FF; }

/* The gifts dance to the beat while the music plays. */
.is-spirit .icon { animation: bop var(--beat, .5s) ease-in-out infinite alternate; }
.is-spirit .photo { animation: bop-photo var(--beat, .5s) ease-in-out infinite alternate; }
@keyframes bop {
  from { transform: rotate(-16deg) translateY(0); }
  to { transform: rotate(2deg) translateY(-6px); }
}
@keyframes bop-photo {
  from { transform: rotate(-5deg) translateY(0); }
  to { transform: rotate(1deg) translateY(-4px); }
}

/* ---------- Hover (mouse and trackpad only) ---------- */
@media (hover: hover) {
  .btn-gold:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink); }
  .btn-ghost:not([aria-pressed="true"]):hover { background: rgba(255, 255, 255, .14); }
  .find:hover { color: var(--red); }
  .psst:hover { color: #fff; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .gift, .gift.is-circled, .dream .gift { grid-column: span 3; }
}
@media (max-width: 720px) {
  .cover-inner { grid-template-columns: 1fr; }
  .cover-side { grid-auto-flow: column; justify-content: start; align-items: center; gap: 12px; }
}
@media (max-width: 600px) {
  .grid { grid-template-columns: 1fr; row-gap: 48px; }
  .catalog .grid { row-gap: 80px; }
  .gift, .gift.is-circled, .dream .gift { grid-column: auto; }
  .is-circled .cutout { aspect-ratio: 16 / 10; }
  .ring { left: -14px; top: -18px; width: calc(100% + 28px); height: calc(100% + 48px); }
  .countdown { width: 150px; }
  .hint { font-size: 1.1rem; }

  /* Compact rows for everything except the circled picks: small photo left, details right. */
  .gift:not(.is-circled) {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    column-gap: 16px;
    align-items: start;
  }
  .gift:not(.is-circled) .cutout { grid-row: 1 / span 3; aspect-ratio: 1 / 1; margin: 0; }
  .gift:not(.is-circled) .icon { font-size: 2.75rem; }
  .gift:not(.is-circled) .price {
    top: -12px;
    left: -12px;
    width: 72px;
    height: 72px;
    padding: 8px;
    font-size: .8125rem;
    white-space: nowrap;
  }
  /* A smaller money burst, tucked into the corner, with the drawing pushed to the bottom so the burst doesn't hide it. */
  .dream .gift .price { top: -16px; left: -16px; width: 56px; height: 56px; padding: 6px; font-size: .55rem; }
  .dream .photo { object-position: 50% 100%; }
  .gift:not(.is-circled) .gift-name { font-size: 1.2rem; margin-bottom: 4px; }
  .gift:not(.is-circled) .gift-blurb { font-size: .9375rem; margin-bottom: 10px; }
  /* The notes come in from the screen edge, so the tilted handwriting stays fully on screen. */
  .note:not(.elf-note) { right: 14px; }
  .dream .note { top: -30px; font-size: 1.25rem; }

  /* Big, obvious shop buttons instead of text links, stacked when there are two. */
  .finds { flex-direction: column; gap: 8px; }
  .find {
    align-self: stretch;
    justify-content: center;
    min-height: 48px;
    border: 2px solid var(--ink);
    border-radius: 999px;
    text-decoration: none;
  }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .ring path, .ring.is-drawn path { animation: none; opacity: 1; stroke-dashoffset: 0; }
  .note, .ring ~ .note { opacity: 1; transition: none; }
  .btn, .toast { transition: none; }
  /* Lights stay steadily on instead of twinkling, and the gifts don't dance. */
  .lights, .bulb::after { transition: none; }
  .bulb::after { opacity: 1; box-shadow: 0 0 10px 3px var(--c); }
  .name-bulb .glass, .name-bulb .glow { animation: none; }
  .is-spirit .icon, .is-spirit .photo { animation: none; }
}
