/* Festive Manchester · tree wizard · trees.css
   Loaded after shop.css, which supplies the tokens, fonts, header, buttons,
   eyebrows, tree cards, bundle panel, FAQ toggle, choreography and reduced
   motion. Everything here is specific to the purchase flow. The desktop design
   (1440×900) comes first in rem, so it scales with the root on large screens;
   the narrow-desktop, tablet and phone layouts follow at the end, with the
   same breakpoints as the homepage. */

:root {
  --cm-scale: 0.053125rem;  /* 1 cm of tree height on the size step (0.85px) */
  --room-h: calc(240 * var(--cm-scale) + 2rem); /* the size step's room strip */
}

/* ---------- Page and stage ---------- */

.wizard-page {
  background: var(--night);
}

.wizard {
  position: relative;
  min-height: calc(100vh + 6rem);
  padding: calc(4.875rem + 1.75rem) 0 9rem;
  background:
    radial-gradient(ellipse 48% 56% at 28% 34%, #1f4432 0%, rgba(31, 68, 50, 0) 70%),
    linear-gradient(180deg, var(--night) 0%, var(--evergreen) 42%, var(--evergreen) 100%);
  overflow-x: clip;
}

/* The artificial branch warms the glow a little rather than switching surface. */
.wizard[data-branch="artificial"] {
  background:
    radial-gradient(ellipse 48% 56% at 28% 34%, #2a3b1e 0%, rgba(42, 59, 30, 0) 70%),
    linear-gradient(180deg, var(--night) 0%, var(--evergreen) 42%, var(--evergreen) 100%);
}

.wizard__grid {
  display: grid;
  grid-template-columns: 52rem 17rem;
  gap: 3rem;
  align-items: start;
}

/* The step sits clear of the header's string of lights. */
.wizard__main {
  min-width: 0;
  padding-top: 1.5rem;
}

html.js .wizard__fallback {
  display: none;
}

/* The fallback blames JavaScript only when that is the trouble: when the
   catalogue data printed by the site could not be had, it says so. */
.wizard__fallback-data,
html.no-catalogue .wizard__fallback-js {
  display: none;
}

html.no-catalogue .wizard__fallback-data {
  display: inline;
}

/* Without script: every tree, as links to the trees' own pages. */
.wizard__fallback-kind {
  margin-top: 2.25rem;
  font-size: 1.75rem;
}

.wizard__fallback-kind a,
.wizard__fallback-trees a {
  color: inherit;
  text-underline-offset: 0.2em;
}

.wizard__fallback-trees {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin-top: 0.75rem;
  color: var(--cream-muted);
}

/* While the script is still on its way: the header shows straight away, the
   empty tag stays out of sight, and a small star breathes where the step will
   appear. Everything here is replaced the moment the wizard renders. */
html.js .site-header:not(.is-in) {
  opacity: 1;
  transform: none;
}

.wizard__rail:empty {
  opacity: 0;
}

.wizard__loading {
  display: none;
  min-height: 24rem;
  align-items: center;
  justify-content: center;
}

html.js .wizard__step > .wizard__loading:first-child:last-child,
html.js .wizard__fallback + .wizard__loading:last-child {
  display: flex;
}

.wizard__loading .site-header__star {
  width: 1.75rem;
  height: 1.75rem;
  opacity: 0.8;
}

/* The garland hangs across the seam into the footer, as on the homepage. */
.wizard__garland {
  bottom: 0;
  transform: translateY(50%);
}

.wizard-page .site-footer__inner {
  padding-top: 8.5rem;
}

/* ---------- Step frame ---------- */

html.js .wizard__step {
  transition: opacity 0.22s ease-out, transform 0.22s var(--ease);
}

html.js .wizard__step.is-leaving {
  opacity: 0;
  transform: translate3d(-1.5rem, 0, 0);
}

html.js .wizard__step.is-leaving-back {
  opacity: 0;
  transform: translate3d(1.5rem, 0, 0);
}

html.js .wizard__step.is-entering {
  opacity: 0;
  transform: translate3d(1.5rem, 0, 0);
  transition: none;
}

html.js .wizard__step.is-entering-back {
  opacity: 0;
  transform: translate3d(-1.5rem, 0, 0);
  transition: none;
}

.step__head .eyebrow {
  margin-bottom: 1rem;
}

.wizard__title {
  max-width: 50rem;
  font-size: 2.875rem;
  line-height: 1.02;
  color: var(--cream-text);
}

.wizard__title em {
  color: var(--gold-2);
}

.wizard__title:focus,
.wizard__title:focus-visible {
  outline: none;
}

.step__lede {
  max-width: 42rem;
  margin-top: 0.875rem;
  color: var(--cream-muted);
  font-size: 1.0625rem;
}

.step__lede.is-note {
  color: var(--gold-2);
}

.step__lede a {
  color: var(--gold-2);
  text-decoration: underline;
  text-decoration-color: rgba(241, 213, 155, 0.4);
  text-underline-offset: 0.25rem;
}

.step__nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2.5rem;
}

.step__nav--close {
  margin-top: 1.25rem;
}

.step__nav .button {
  cursor: pointer;
}

.step__nav .button--ghost-light span[aria-hidden] {
  transition: transform 0.3s var(--ease);
}

.step__nav .button--ghost-light:hover span[aria-hidden] {
  transform: translateX(-0.25rem);
}

/* ---------- Choice cards (type, tree, size) ---------- */

.choices {
  display: grid;
  gap: 3.5rem;
  margin-top: 1.5rem;
}

/* Narrower cards with generous space between the frames (Hamed, 5 Oct). */
.choices--2 {
  grid-template-columns: repeat(2, 23.5rem);
  gap: 5rem;
}

.choices--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.choice {
  position: relative;
  width: 100%;
  margin: 0;
  padding: 0 0 0.25rem;
  border: 0;
  border-radius: 0.75rem;
  background: none;
  color: inherit;
  font: inherit;
  text-align: center;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: transform 0.5s var(--ease), opacity 0.4s;
}

.choice:focus-visible {
  outline-offset: 0.625rem;
}

/* Every option sits in a light gold frame with a small ornament at its top,
   so it reads as something to choose. The frame brightens on hover and turns
   solid gold when selected or just chosen. */
.choice::before {
  content: "";
  position: absolute;
  inset: -0.5rem -0.75rem -0.5rem;
  border: 1px solid rgba(217, 178, 106, 0.32);
  border-radius: 1rem;
  background: linear-gradient(180deg, rgba(247, 240, 228, 0.04) 0%, rgba(247, 240, 228, 0.012) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: border-color 0.3s, box-shadow 0.45s, background-color 0.3s;
  pointer-events: none;
}

.choice::after {
  content: "";
  position: absolute;
  top: calc(-0.5rem - 0.1875rem);
  left: 50%;
  width: 0.375rem;
  height: 0.375rem;
  margin-left: -0.1875rem;
  background: var(--gold);
  box-shadow: 0 0 0.375rem rgba(241, 213, 155, 0.5);
  transform: rotate(45deg);
  transition: background-color 0.3s, box-shadow 0.3s, transform 0.45s cubic-bezier(0.3, 1.5, 0.5, 1);
  pointer-events: none;
}

.choice:hover::before {
  border-color: rgba(241, 213, 155, 0.65);
  background-color: rgba(247, 240, 228, 0.035);
  box-shadow: 0 0 1.125rem rgba(241, 190, 100, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.choice:hover::after {
  background: var(--gold-2);
  box-shadow: 0 0 0.5rem rgba(241, 213, 155, 0.9);
}

.choice.is-selected::before,
.choice.is-chosen::before {
  border: 2px solid var(--gold-2);
  background-color: rgba(241, 213, 155, 0.05);
  box-shadow: 0 0 1.5rem rgba(241, 190, 100, 0.35), inset 0 0 0 1px rgba(241, 213, 155, 0.2);
}

.choice.is-selected::after,
.choice.is-chosen::after {
  background: var(--gold-2);
  box-shadow: 0 0 0.625rem rgba(255, 236, 190, 0.95);
  transform: rotate(45deg) scale(1.35);
}

.choice.is-chosen {
  transform: scale(1.02);
}

.choice.is-chosen .tree-card__media::before {
  opacity: 1;
  transform: scale(1.08);
}

.choice.is-chosen .tree-card__price {
  background: var(--gold);
  color: #2a1a09;
}

.choice.is-dimmed {
  opacity: 0.55;
}

.choice[aria-disabled="true"] {
  cursor: not-allowed;
}

.choice[aria-disabled="true"]::before,
.choice[aria-disabled="true"]:hover::before {
  border: 1px dashed rgba(247, 239, 225, 0.16);
  background: none;
  box-shadow: none;
}

.choice[aria-disabled="true"]::after,
.choice[aria-disabled="true"]:hover::after {
  background: rgba(217, 178, 106, 0.3);
  box-shadow: none;
}

.choice[aria-disabled="true"] .tree-card__media img,
.choice[aria-disabled="true"] .size__media img {
  filter: grayscale(1);
  opacity: 0.45;
}

.choice[aria-disabled="true"]:hover .tree-card__media img,
.choice[aria-disabled="true"]:hover .size__media img {
  transform: none;
}

.choice[aria-disabled="true"] .tree-card__price {
  opacity: 0.5;
}

.choice[aria-disabled="true"]:hover .tree-card__price {
  background: none;
  color: var(--gold-2);
}

/* The photo is taken out of flow so the box keeps its own ratio rather than
   growing to the picture's 3:4. */
.choice .tree-card__media img,
.review__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* A touch shallower than 5:4: with the star under the name, the step still
   ends above the fold on a 900px-high screen. */
.choice--type .tree-card__media {
  aspect-ratio: 9 / 7;
}

.choices--3 .tree-card__media {
  aspect-ratio: 5 / 6;
}

/* A card's name is written in gold leaf: ivory at the top of the letters,
   warming to gold at their feet, as if lit by the tree above it. A band of
   light waits off its left edge and crosses it once as the card arrives and
   again under the pointer (see "The name, the star and the line" below). */
.choice .tree-card__name {
  --foil: linear-gradient(180deg, #fff8e6 0%, #f5e3ba 48%, #dcb876 100%);
  margin-top: 0.75rem;
  padding: 0 0.125rem 0.0625rem;
  background:
    linear-gradient(100deg, rgba(255, 255, 255, 0) 38%, rgba(255, 255, 255, 0.95) 50%, rgba(255, 255, 255, 0) 62%) -150% 0 / 60% 100% no-repeat,
    var(--foil);
  -webkit-background-clip: text;
  background-clip: text;
  color: #f5e3ba;
  -webkit-text-fill-color: transparent;
  font-size: 1.625rem;
  letter-spacing: -0.005em;
  filter: drop-shadow(0 0.0625rem 0 rgba(0, 0, 0, 0.35)) drop-shadow(0 0 0.875rem rgba(241, 190, 100, 0.22));
}

/* Chosen: the leaf turns a deeper gold. */
.choice.is-selected .tree-card__name,
.choice.is-chosen .tree-card__name {
  --foil: linear-gradient(180deg, #fff3d0 0%, #efcf8e 50%, #cf9f4f 100%);
}

/* Where colours are forced, plain text: the leaf would vanish. */
@media (forced-colors: active) {
  .choice .tree-card__name {
    background: none;
    -webkit-text-fill-color: currentColor;
    filter: none;
  }
}

.choice--type .tree-card__name {
  margin-top: 0.5rem;
  font-size: 1.875rem;
}

/* (Named twice over so these hold against the general rules further down.) */
.choice.choice--type .choice__flourish,
.choice.choice--type .tree-card__note {
  margin-top: 0.375rem;
}

.choice.choice--type .choice__facts {
  margin-top: 0.625rem;
}

.choice.choice--type .tree-card__price {
  margin-top: 0.75rem;
}

.choice .tree-card__price {
  position: relative;
  margin-top: 0.875rem;
}

/* Badges: "Selected" and "Sold out". */
.choice__badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 2;
  padding: 0.3125rem 0.75rem;
  border-radius: 62.4375rem;
  background: var(--gold);
  color: #2a1a09;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  box-shadow: 0 0.5rem 1.25rem -0.5rem rgba(0, 0, 0, 0.6);
}

.choice__badge--soldout {
  background: var(--berry);
  color: var(--cream-text);
}

/* "Most popular" is a recommendation, not a state, so it is not a pill like
   "Selected": it is a berry ribbon wrapped round the card's left edge, with a
   gold star, stitched gold edges and a swallowtail end. */
.choice__badge--popular {
  top: 0.9375rem;
  right: auto;
  left: -1.125rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.375rem 1rem 0.375rem 0.5625rem;
  border-radius: 0;
  background: none;
  color: #fff3d2;
  font-size: 0.59375rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  line-height: 1.2;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: none;
  filter: drop-shadow(0 0.25rem 0.375rem rgba(0, 0, 0, 0.45));
}

/* The ribbon itself. */
.choice__badge--popular::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(rgba(241, 213, 155, 0.6), rgba(241, 213, 155, 0.6)) 0 0.125rem / 100% 1px no-repeat,
    linear-gradient(rgba(241, 213, 155, 0.6), rgba(241, 213, 155, 0.6)) 0 calc(100% - 0.1875rem) / 100% 1px no-repeat,
    linear-gradient(180deg, #8f2436 0%, var(--berry) 55%, #551320 100%);
  clip-path: polygon(0 0, 100% 0, calc(100% - 0.5rem) 50%, 100% 100%, 0 100%);
}

/* The fold where it tucks behind the card's frame. */
.choice__badge--popular::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 0;
  width: 0.375rem;
  height: 0.3125rem;
  background: #35090f;
  clip-path: polygon(0 0, 100% 0, 100% 100%);
}

.choice__badge--popular .icon-star {
  flex: none;
  width: 0.625rem;
  height: 0.625rem;
  fill: var(--gold-2);
}

/* On a narrow card the ribbon and the "Selected" pill cannot share a line,
   so the ribbon drops beneath the pill. The card's picture is the measure. */
.choices--3 .tree-card__media,
.choices--scroll .tree-card__media {
  container-type: inline-size;
}

@container (max-width: 12.9rem) {
  .is-selected .choice__badge--popular {
    top: 2.625rem;
  }
}

/* Facts under a card: ticked lines centred on the card's axis, or
   label/value rows for comparison. */
.choice__facts {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  width: auto;
  margin: 0.75rem auto 0;
}

.choice__fact {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.1875rem 0;
  color: var(--cream-muted);
  font-size: 0.875rem;
  text-align: left;
}

.choice__fact::before {
  content: "";
  flex: none;
  width: 0.6875rem;
  height: 0.375rem;
  margin-top: -0.25rem;
  border-left: 0.125rem solid var(--gold-2);
  border-bottom: 0.125rem solid var(--gold-2);
  transform: rotate(-45deg);
}

/* ---------- The name, the star and the line ----------
   Under the name, a Christmas star on a gold thread that fades away to
   either side; under that, a line about the tree in the italic of the
   page's headings, like the words on a gift tag. */
.choice__flourish {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  line-height: 0;
}

.choice__flourish::before,
.choice__flourish::after {
  content: "";
  width: 2.5rem;
  height: 1px;
  background: linear-gradient(90deg, rgba(217, 178, 106, 0) 0%, rgba(217, 178, 106, 0.85) 100%);
  transform-origin: 100% 50%;
  transition: transform 0.6s var(--ease);
}

.choice__flourish::after {
  background: linear-gradient(90deg, rgba(217, 178, 106, 0.85) 0%, rgba(217, 178, 106, 0) 100%);
  transform-origin: 0 50%;
}

.choice__flourish .icon-twinkle {
  flex: none;
  width: 0.75rem;
  height: 0.75rem;
  fill: var(--gold-2);
  filter: drop-shadow(0 0 0.3125rem rgba(241, 213, 155, 0.7));
  transition: transform 0.8s cubic-bezier(0.3, 1.5, 0.5, 1), fill 0.3s;
}

/* Chosen: the star burns a little brighter. */
.choice.is-selected .choice__flourish .icon-twinkle,
.choice.is-chosen .choice__flourish .icon-twinkle {
  fill: #fff6dc;
  transform: scale(1.2);
}

/* A short description under a tree's name; the detail unfolds beneath it
   ("More about each tree"). */
.choice__blurb,
.choice .tree-card__note {
  display: block;
  max-width: 14.5rem;
  margin: 0.5rem auto 0;
  color: rgba(247, 239, 225, 0.86);
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-style: italic;
  /* The lightest cut: at this size, pale on dark, the italic reads a weight
     heavier than it is set (Hamed found 400 too bold, 13 October). */
  font-weight: 300;
  line-height: 1.4;
  text-align: center;
  text-wrap: balance;
}

/* Under the pointer the star turns and the thread lengthens; the band of
   light crosses the name. On leaving, the band slips back unseen. */
@media (hover: hover) {
  .choice:hover .choice__flourish::before,
  .choice:hover .choice__flourish::after {
    transform: scaleX(1.4);
  }

  .choice:hover .choice__flourish .icon-twinkle {
    fill: #fff6dc;
    transform: rotate(90deg) scale(1.3);
  }
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .choice:hover .tree-card__name {
    background-position: 250% 0, 0 0;
    transition: background-position 0.9s ease-out;
  }
}

/* As the cards arrive, one after another: the thread is drawn out from the
   star, the star opens, and the light crosses the name. Each once, and as
   animations (not delayed transitions), so leaving a card is never slowed. */
@media (prefers-reduced-motion: no-preference) {
  .choices > .reveal:nth-child(2) { --card: 1; }
  .choices > .reveal:nth-child(3) { --card: 2; }
  .choices > .reveal:nth-child(4) { --card: 3; }
  .choices > .reveal:nth-child(n + 5) { --card: 4; }

  .reveal.is-visible .choice__flourish::before,
  .reveal.is-visible .choice__flourish::after {
    animation: flourish-thread 0.6s var(--ease) calc(0.45s + var(--card, 0) * 0.12s) 1 backwards;
  }

  .reveal.is-visible .choice__flourish .icon-twinkle {
    animation: flourish-star 0.75s cubic-bezier(0.3, 1.5, 0.5, 1) calc(0.45s + var(--card, 0) * 0.12s) 1 backwards;
  }

  .reveal.is-visible .choice .tree-card__name {
    animation: name-glint 1.1s ease-out calc(0.7s + var(--card, 0) * 0.12s) 1 backwards;
  }
}

@keyframes flourish-thread {
  from {
    transform: scaleX(0);
  }
}

@keyframes flourish-star {
  from {
    transform: rotate(-90deg) scale(0);
  }
}

@keyframes name-glint {
  from {
    background-position: -150% 0, 0 0;
  }

  to {
    background-position: 250% 0, 0 0;
  }
}

/* Sparks that fly as a choice lands (the FAQ bulb's sparks, reused). */
.sparks {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0.25rem;
  height: 0.25rem;
  margin: -0.125rem 0 0 -0.125rem;
  border-radius: 50%;
  background: transparent;
  box-shadow:
    -1.5rem -1rem 0 0 var(--gold-2),
    1rem -1.375rem 0 -1px #fff3d2,
    1.5rem 0.75rem 0 0 var(--gold),
    -1.125rem 1.125rem 0 -1px #fff3d2,
    -2.125rem 0.125rem 0 -1px var(--gold-2),
    2.125rem -0.25rem 0 -1px var(--gold-2);
  opacity: 0;
  transform: scale(0.2);
  pointer-events: none;
}

.is-chosen .sparks {
  animation: wiz-sparks 0.9s ease-out 0.05s 1 both;
}

@keyframes wiz-sparks {
  0% {
    opacity: 0;
    transform: scale(0.2) rotate(0deg);
  }

  30% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: scale(1.25) rotate(28deg);
  }
}

/* ---------- Placeholder tile (artwork to come) ---------- */

.placeholder {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  height: 100%;
  padding: 1rem;
  border: 1px dashed rgba(241, 213, 155, 0.4);
  border-radius: 0.75rem;
  background: rgba(23, 54, 40, 0.65);
  color: rgba(247, 239, 225, 0.6);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  line-height: 1.4;
  text-align: center;
}

.placeholder .icon-fir {
  width: 36%;
  max-width: 5rem;
  height: auto;
  fill: rgba(241, 213, 155, 0.28);
}

.placeholder__text {
  display: block;
}

.placeholder__text strong {
  display: block;
  color: rgba(247, 239, 225, 0.85);
  font-weight: 600;
}

/* ---------- "More about each tree" ----------
   A small link under the cards; the details unfold inside every card. */

.choices__more {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.875rem;
  margin-top: 1.25rem;
}

.choices__more-link {
  margin: 0;
  padding: 0.25rem 0.125rem;
  border: 0;
  background: none;
  color: var(--gold-2);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s;
}

.choices__more-link:hover {
  color: #fff6dc;
}

.choices__more-link span[aria-hidden] {
  display: inline-block;
  transition: transform 0.4s var(--ease);
}

.choices__more-link[aria-expanded="true"] span[aria-hidden] {
  transform: rotate(180deg);
}

.choice__more {
  display: grid;
  grid-template-rows: 0fr;
  width: 100%;
  opacity: 0;
  transition: grid-template-rows 0.55s var(--ease), opacity 0.35s ease-out;
}

.choice__more-inner {
  display: flex;
  justify-content: center;
  min-height: 0;
  overflow: hidden;
}

.choice__more .choice__facts {
  margin: 0.625rem auto 0.125rem;
  padding-top: 0.625rem;
  border-top: 1px solid rgba(217, 178, 106, 0.3);
}

.choice__more .choice__fact {
  opacity: 0;
  transform: translateY(0.25rem);
  transition: opacity 0.3s ease-out, transform 0.4s var(--ease);
}

.is-expanded .choice__more {
  grid-template-rows: 1fr;
  opacity: 1;
}

.is-expanded .choice__more .choice__fact {
  opacity: 1;
  transform: none;
  transition-delay: calc(var(--i, 0) * 60ms + 200ms);
}

/* A gold hairline with a diamond at its end, used beside small links. */
.ornament-rule {
  position: relative;
  width: 3rem;
  height: 1px;
  background: linear-gradient(90deg, rgba(217, 178, 106, 0), rgba(217, 178, 106, 0.75));
}

.ornament-rule::after {
  content: "";
  position: absolute;
  top: -0.125rem;
  right: -0.125rem;
  width: 0.3125rem;
  height: 0.3125rem;
  background: var(--gold);
  transform: rotate(45deg);
}

.ornament-rule--end {
  background: linear-gradient(90deg, rgba(217, 178, 106, 0.75), rgba(217, 178, 106, 0));
}

.ornament-rule--end::after {
  right: auto;
  left: -0.125rem;
}

/* ---------- Size step: proportional trees in a room ---------- */

.sizes {
  position: relative;
  margin-top: 1.5rem;
  padding-left: 5.75rem;
}

/* Inside the size step one unit (--u) is 1 cm of height. It is scaled so the
   tallest tree on offer takes the room the 2.4 m ceiling used to, which keeps
   the strip's height and the trees' widths the same whatever is on offer: a
   band up to 9ft simply stands above the ceiling line.
   A tree with fewer than four sizes is drawn larger (a third again for two,
   a sixth for three), so its cards are not left mostly empty; a tree with
   bands above 2.4 m keeps the standard scale and the room grows to its
   tallest band; but never so large that the step stops fitting the screen
   (the clamp's last term), below which everything is drawn smaller. */
.sizes {
  --figure-w: 5.75rem;
  --zoom: max(1, calc(1 + (4 - var(--n, 4)) * 0.175));
  --tall: clamp(calc(240 * var(--cm-scale)), calc(var(--tallest, 240) * var(--cm-scale) * var(--zoom)), calc(100vh - 41rem));
  --u: calc(var(--tall) / var(--tallest, 240));
  --room-h: calc(var(--tall) + 2rem);
}

.sizes__room {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: var(--room-h);
  pointer-events: none;
}

.sizes__ceiling {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(var(--room-h) - 240 * var(--u));
  border-top: 1px dashed rgba(247, 239, 225, 0.32);
}

/* The label sits at the left end, above the figure, clear of the cards'
   badges on the right. */
.sizes__ceiling > span {
  position: absolute;
  left: 0;
  top: -1.375rem;
  white-space: nowrap;
  color: rgba(247, 239, 225, 0.55);
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.sizes__floor {
  position: absolute;
  left: 0;
  right: 0;
  top: var(--room-h);
  border-top: 1px solid rgba(247, 239, 225, 0.25);
}

/* The figure: a photo of an adult of average height, standing on the floor
   line, centred in its column, at the same scale as the trees. */
.sizes__person {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 5.75rem;
  height: calc(175 * var(--u));
  object-fit: contain;
  object-position: 50% 100%;
  filter: drop-shadow(0 0.5rem 0.75rem rgba(0, 0, 0, 0.45));
}

.sizes__person-label {
  position: absolute;
  left: 0;
  top: calc(var(--room-h) + 0.5rem);
  width: 5.75rem;
  color: rgba(247, 239, 225, 0.5);
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
}

.sizes__cards {
  display: grid;
  grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr));
  gap: 2.5rem;
}

/* Two sizes only: the cards are no wider than their trees need, and the
   figure and the two trees share the width evenly. */
.sizes[data-count="2"] .sizes__cards {
  grid-template-columns: repeat(2, minmax(0, 17rem));
  column-gap: 0;
  justify-content: space-evenly;
}

.choice--size {
  padding-bottom: 0.5rem;
}

.choice--size::before {
  inset: -0.5rem;
}

.size__media {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: 100%;
  height: var(--room-h);
}

/* A pool of warm light on the floor under each tree, brighter under the one
   the pointer is on or that was chosen. */
.size__media::before {
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: -0.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 50%, rgba(241, 213, 155, 0.24) 0%, rgba(241, 213, 155, 0.08) 45%, rgba(241, 213, 155, 0) 72%);
  opacity: 0.75;
  transition: opacity 0.4s, transform 0.6s var(--ease);
  pointer-events: none;
}

.choice--size:hover .size__media::before,
.choice--size.is-chosen .size__media::before,
.choice--size.is-selected .size__media::before {
  opacity: 1;
  transform: scale(1.12, 1.2);
}

.choice[aria-disabled="true"] .size__media::before {
  opacity: 0.25;
}

.size__media img {
  position: relative;
  z-index: 1;
  width: auto;
  height: calc(var(--cm) * var(--u));
  max-width: none;
  transform-origin: 50% 100%;
  transition: transform 0.7s var(--ease);
}

.choice--size:hover .size__media img,
.choice--size.is-chosen .size__media img {
  transform: scale(1.03);
}

.size__media .placeholder {
  width: auto;
  height: calc(var(--cm) * var(--u));
  aspect-ratio: 3 / 4;
  padding: 0.5rem;
  font-size: 0.6875rem;
}

.size__label {
  display: block;
  margin-top: 1rem;
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 400;
  line-height: 1.1;
}

.size__cm {
  display: block;
  /* The price pill below is inline, so the room above it is made here. */
  margin: 0.25rem 0 0.625rem;
  color: var(--cream-muted);
  font-size: 0.8125rem;
}

/* With an offer on, the full price stands crossed out over the pill (a line
   of its own, so the pill keeps to the middle under its tree), the pill
   speaks up a little, and what is saved hangs on a ribbon tied across the
   lower edge of the card's frame (which stands 0.5rem outside the card). */
.choice--size .size__was {
  display: table;
  margin: -0.1875rem auto 0.375rem;
  font-size: 0.875rem;
}

/* Room under the row for the ribbons that hang below it. */
.sizes--offer {
  margin-bottom: 0.5rem;
}

.size__was + .tree-card__price {
  padding: 0.3125rem 1.125rem;
  font-size: 1rem;
}

.choice--size.has-saving {
  padding-bottom: 1rem;
}

.size__save {
  position: absolute;
  left: 50%;
  bottom: -0.5rem;
  z-index: 3;
  transform: translate(-50%, 50%);
  filter: drop-shadow(0 0.25rem 0.375rem rgba(0, 0, 0, 0.5));
  pointer-events: none;
}

.size__save .save-ribbon {
  gap: 0.25rem;
}

/* ---------- More than four bands: the row scrolls ----------
   Real trees run from 3ft to 12ft. Past four bands the cards sit in the
   same snapping row as the tree step's (four in view and a slice of the
   fifth, a fade at whichever edge still hides a card, arrows for the mouse,
   lights on phones), while the figure, the ceiling and the floor stay where
   they are, so every tree that slides past is still measured against them.
   The row is padded for the frames, the diamonds and the ribbons (a
   scrolling box clips whatever overflows it), and the room is lowered by
   the same amount so the trees keep their feet on the floor. */
.sizes--scroll .sizes__room {
  top: 1rem;
}

.sizes__cards--scroll {
  display: flex;
  gap: 2.5rem;
  margin: 0 -1.5rem 0 -0.75rem;
  padding: 1rem 1.5rem 1.5rem 0.75rem;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 0.75rem 1.5rem;
  scrollbar-width: none;
  --fade-start: 2.5rem;
  --fade-end: 3rem;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 var(--fade-start), #000 calc(100% - var(--fade-end)), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 var(--fade-start), #000 calc(100% - var(--fade-end)), transparent 100%);
}

.sizes__cards--scroll::-webkit-scrollbar {
  display: none;
}

.sizes__cards--scroll.is-start {
  --fade-start: 0px;
}

.sizes__cards--scroll.is-end {
  --fade-end: 0px;
}

/* Four cards and a slice of the fifth. */
.sizes__cards--scroll > .reveal {
  display: flex;
  flex: 0 0 calc((100% - 3 * 2.5rem - 2.75rem) / 4);
  scroll-snap-align: start;
}

/* The arrows bracket the whole room, the figure included. */
.sizes--scroll .scroller__arrow--prev {
  left: calc(-1 * var(--figure-w) - 1.375rem);
}

/* Nine lights must fit a phone: smaller bulbs, and no hint beside them. */
.sizes--scroll .scroller {
  --light-w: 1.75rem;
}

.sizes--scroll .scroller__hint {
  display: none;
}

/* ---------- Calendar: advent doors ----------
   Every day is a little door. A thin dark door is closed; a lit door with a
   heavier gold frame can be booked; the chosen door swings open on a gold
   interior with the heaviest frame of all. Nothing is written in the grid. */

.cal {
  display: grid;
  grid-template-columns: repeat(2, 25rem);
  gap: 2rem;
  margin-top: 3rem;
}

.cal--single {
  grid-template-columns: 25rem;
  justify-content: center;
}

.cal__month-wrap {
  position: relative;
}

.cal__month {
  position: relative;
  padding: 4.125rem 0.8125rem 1.75rem;
  border: 1px solid rgba(217, 178, 106, 0.6);
  border-radius: 1rem;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(241, 213, 155, 0.16), rgba(241, 213, 155, 0) 70%),
    radial-gradient(ellipse 70% 40% at 50% 100%, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0) 70%),
    linear-gradient(180deg, #1a3f2f 0%, #10291f 100%);
  box-shadow:
    0 0 0 0.25rem rgba(10, 24, 18, 0.55),
    0 1.875rem 3.75rem -2rem rgba(0, 0, 0, 0.75);
  overflow: hidden;
}

/* An inner hairline, like the border of a printed card. */
.cal__month::before {
  content: "";
  position: absolute;
  inset: 0.375rem;
  z-index: 0;
  border: 1px solid rgba(217, 178, 106, 0.22);
  border-radius: 0.75rem;
  pointer-events: none;
}

/* The garland swag: the strip photo, sliced and bent along a curve, hung
   from a bow at each hook, with lights along it and baubles below. */
.cal__swag {
  position: absolute;
  top: -2.5rem;
  left: -5%;
  z-index: 3;
  width: 110%;
  height: 7rem;
  filter: drop-shadow(0 0.75rem 0.75rem rgba(0, 0, 0, 0.5));
  pointer-events: none;
}

.cal__swag-slice {
  position: absolute;
  top: 0;
  background: url("../img/real-trees-full-garland-v1.webp") no-repeat;
  transform-origin: 50% 50%;
}

.cal__swag--cedar .cal__swag-slice {
  background-image: url("../img/santa-ivory-cedar-garland-v1.webp");
}

.cal__bauble {
  position: absolute;
  width: 1rem;
  height: 1rem;
  margin-left: -0.5rem;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff6dc 0%, #e8c272 45%, #a4752c 100%);
  box-shadow: 0 0 0.5rem rgba(241, 213, 155, 0.55), inset -0.125rem -0.125rem 0.25rem rgba(90, 50, 10, 0.35);
}

.cal__bauble::before {
  content: "";
  position: absolute;
  top: -0.875rem;
  left: 50%;
  width: 1px;
  height: 0.875rem;
  background: var(--gold);
}

.cal__bauble::after {
  content: "";
  position: absolute;
  top: -0.25rem;
  left: 50%;
  width: 0.3125rem;
  height: 0.25rem;
  margin-left: -0.15625rem;
  border-radius: 0.0625rem 0.0625rem 0 0;
  background: var(--gold);
}

.cal__bauble--berry {
  background: radial-gradient(circle at 35% 30%, #ff9a9a 0%, #b8323f 50%, #6b1a2a 100%);
  box-shadow: 0 0 0.5rem rgba(184, 50, 63, 0.5), inset -0.125rem -0.125rem 0.25rem rgba(60, 10, 20, 0.4);
}

.cal__bow {
  position: absolute;
  top: -1.5rem;
  z-index: 5;
  width: 2.625rem;
  height: 1.5rem;
  filter: drop-shadow(0 0.25rem 0.375rem rgba(0, 0, 0, 0.45));
  pointer-events: none;
}

.cal__bow--left {
  left: calc(-5% - 0.75rem);
}

.cal__bow--right {
  right: calc(-5% - 0.75rem);
}

.cal__bow .rail__bow {
  position: static;
  width: 100%;
  height: 100%;
  margin: 0;
  filter: none;
}

/* The string of lights follows the same curve as the garland. */
.cal__lights {
  top: calc(-2.5rem + 1.75rem);
  left: -5%;
  right: -5%;
  z-index: 4;
  height: 2.5rem;
}

.cal__name {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: 1.625rem;
  font-weight: 350;
  line-height: 1.1;
  letter-spacing: -0.01em;
  text-align: center;
}

.cal__name em {
  color: var(--gold-2);
  font-style: italic;
  font-weight: 300;
}

.cal__year {
  color: var(--cream-muted);
  font-size: 0.9375rem;
  letter-spacing: 0.08em;
}

.cal__rule {
  position: relative;
  flex: 1;
  max-width: 3.5rem;
  height: 1px;
  background: linear-gradient(90deg, rgba(217, 178, 106, 0), rgba(217, 178, 106, 0.75));
}

.cal__rule::after {
  content: "";
  position: absolute;
  top: -0.125rem;
  right: -0.125rem;
  width: 0.3125rem;
  height: 0.3125rem;
  background: var(--gold);
  transform: rotate(45deg);
}

.cal__rule--end {
  background: linear-gradient(90deg, rgba(217, 178, 106, 0.75), rgba(217, 178, 106, 0));
}

.cal__rule--end::after {
  right: auto;
  left: -0.125rem;
}

.cal__grid {
  position: relative;
  z-index: 2;
}

.cal__row,
.cal__weekdays {
  display: grid;
  grid-template-columns: repeat(7, 3rem);
  gap: 0.375rem;
  justify-content: center;
}

.cal__weekdays {
  margin-bottom: 0.375rem;
}

.cal__row + .cal__row {
  margin-top: 0.375rem;
}

.cal__weekday {
  color: var(--gold);
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-align: center;
  text-transform: uppercase;
}

.cal-cell {
  height: 3rem;
}

/* Snow settles along the bottom edge: a soft drift behind, a brighter one in
   front with a shaded crest, and a few sparkles. */
.cal__drift {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  z-index: 1;
  width: 100%;
  height: 1.75rem;
  filter: drop-shadow(0 -0.375rem 0.75rem rgba(255, 255, 255, 0.14));
  pointer-events: none;
}

.cal__drift-sparkle {
  animation: drift-sparkle 3.2s ease-in-out infinite;
  animation-delay: var(--d, 0s);
  transform-origin: center;
  transform-box: fill-box;
}

@keyframes drift-sparkle {
  0%,
  100% {
    opacity: 0.35;
    transform: scale(0.7);
  }

  50% {
    opacity: 1;
    transform: scale(1.15);
  }
}

/* ---- The door ---- */

.door {
  position: relative;
  display: block;
  width: 2.75rem;
  height: 3rem;
  margin: 0 auto;
  padding: 0;
  border: 0;
  border-radius: 1.375rem 1.375rem 0.375rem 0.375rem / 1.5rem 1.5rem 0.375rem 0.375rem;
  background: none;
  color: inherit;
  font: inherit;
  cursor: default;
  perspective: 14rem;
  appearance: none;
  -webkit-appearance: none;
  transition: transform 0.3s var(--ease);
}

.door:focus-visible {
  outline-offset: 0.25rem;
}

.door__inside,
.door__blind,
.door__leaf {
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

/* The front of the door is a blind: when chosen it rolls up to the top of
   the frame, staying inside its own cell. */
.door__blind {
  z-index: 2;
  transform-origin: 50% 0%;
  transition: transform 0.7s cubic-bezier(0.3, 1.05, 0.4, 1);
}

.door__glow {
  position: absolute;
  inset: -0.625rem -0.75rem;
  z-index: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(241, 190, 100, 0.4), rgba(241, 190, 100, 0) 68%);
  opacity: 0;
  transition: opacity 0.6s, transform 0.7s var(--ease);
}

/* The inside: the heaviest frame, gold, with a tick. */
.door__inside {
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.0625rem;
  border: 3px solid #fff3d2;
  background: radial-gradient(ellipse 90% 80% at 50% 90%, #fff3d2 0%, #f3cd7f 48%, #cf9b45 100%);
  color: #2a1a09;
  box-shadow: inset 0.25rem 0 0.5rem rgba(90, 50, 10, 0.35), inset 0 0 0.5rem rgba(255, 255, 255, 0.6);
  opacity: 0;
  transition: opacity 0.25s;
}

.door__inside-num {
  font-family: var(--font-display);
  font-size: 1.125rem;
  line-height: 1;
}

.door__inside .icon-tick {
  width: 0.6875rem;
  height: 0.6875rem;
}

/* The leaf: closed doors are thin and dark. */
.door__leaf {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(247, 239, 225, 0.16);
  background: linear-gradient(180deg, rgba(12, 30, 22, 0.92) 0%, rgba(7, 19, 14, 0.96) 100%);
  color: rgba(247, 239, 225, 0.42);
  transition: box-shadow 0.35s, border-color 0.3s, background-color 0.3s, color 0.3s;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.door__num {
  font-family: var(--font-display);
  font-size: 1.125rem;
  line-height: 1;
}


.door__snow {
  position: absolute;
  top: -0.125rem;
  left: 12%;
  right: 12%;
  height: 0.375rem;
  border-radius: 50% 50% 45% 45% / 100% 100% 50% 50%;
  background: linear-gradient(180deg, #ffffff 0%, #e9f1ff 100%);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Christmas Day: closed like any other day, with a small label. */
.door--christmas .door__tag {
  margin-top: 0.125rem;
  font-size: 0.5rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

/* Lit: a day that can be booked. A heavier gold frame, light from inside,
   snow on the roof and a bright knob. */
.door--lit {
  cursor: pointer;
}

.door--lit .door__leaf {
  border: 2px solid rgba(241, 213, 155, 0.95);
  background:
    radial-gradient(ellipse 100% 75% at 50% 100%, rgba(255, 214, 140, 0.62) 0%, rgba(255, 214, 140, 0.12) 55%, rgba(255, 214, 140, 0) 100%),
    linear-gradient(180deg, #2d5240 0%, #1c3d2d 100%);
  color: #fff6dc;
  box-shadow: 0 0 0.75rem rgba(241, 190, 100, 0.4), inset 0 -0.375rem 0.75rem rgba(255, 214, 140, 0.18);
  text-shadow: 0 0 0.5rem rgba(255, 225, 160, 0.7);
}

.door--lit .door__num {
  font-size: 1.25rem;
}


.door--lit .door__glow {
  opacity: 0.55;
}

.door--lit:hover,
.door--lit:focus-visible {
  transform: translateY(-2px);
}

.door--lit:hover .door__leaf,
.door--lit:focus-visible .door__leaf {
  border-color: #fff3d2;
  box-shadow: 0 0 1.25rem rgba(241, 190, 100, 0.7), inset 0 -0.375rem 0.75rem rgba(255, 214, 140, 0.28);
}

.door--lit:hover .door__glow,
.door--lit:focus-visible .door__glow {
  opacity: 1;
  transform: scale(1.15);
}

/* Chosen or saved: the blind rolls up, leaving a slim gold roll at the top
   and the lit, ticked interior in view. */
.door.is-chosen .door__blind,
.door.is-open .door__blind {
  transform: scaleY(0.16);
}

.door.is-chosen .door__leaf,
.door.is-open .door__leaf {
  border-color: #fff3d2;
  background: linear-gradient(180deg, #fff3d2 0%, #e2b85f 100%);
  box-shadow: 0 0.125rem 0.375rem rgba(0, 0, 0, 0.45);
}

.door.is-chosen .door__num,
.door.is-open .door__num,
.door.is-chosen .door__snow,
.door.is-open .door__snow {
  opacity: 0;
  transition: opacity 0.15s;
}

.door.is-chosen .door__inside,
.door.is-open .door__inside {
  opacity: 1;
}

.door.is-chosen .door__glow,
.door.is-open .door__glow {
  opacity: 1;
  transform: scale(1.3);
  background: radial-gradient(circle, rgba(255, 225, 160, 0.6), rgba(241, 190, 100, 0) 68%);
}

.door.is-open .door__blind,
.door.is-open .door__inside,
.door.is-open .door__leaf {
  transition: none;
}

/* Rolling shut again (another day was chosen): the gold interior, with its
   number, stays lit until the blind has covered it, and the blind's own
   number fades in as it comes down, so the day never goes blank. */
.door.is-closing .door__inside {
  opacity: 1;
}

.door.is-closing .door__num,
.door.is-closing .door__snow {
  opacity: 1;
  transition: opacity 0.25s 0.12s;
}

.door--lit .door__num,
.door--lit .door__snow {
  transition: opacity 0.25s;
}

/* Fully booked (supported by the renderer, unused in the sample data). */
.door--full {
  cursor: not-allowed;
}

.door--full .door__leaf {
  border-color: rgba(107, 26, 42, 0.6);
}

.door--full .door__num {
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}

/* The key under the calendar: three little doors and a star. */
.cal__legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.375rem 1.5rem;
  margin-top: 0.75rem;
  color: var(--cream-muted);
  font-size: 0.8125rem;
}

.cal__legend li {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.cal__key {
  display: inline-block;
  width: 0.75rem;
  height: 0.875rem;
  border: 1px solid rgba(247, 239, 225, 0.22);
  border-radius: 0.375rem 0.375rem 0.125rem 0.125rem;
  background: rgba(7, 19, 14, 0.9);
}

.cal__key--lit {
  border: 2px solid rgba(241, 213, 155, 0.95);
  background: radial-gradient(ellipse 100% 80% at 50% 100%, rgba(255, 214, 140, 0.7), rgba(255, 214, 140, 0) 80%), #2d5240;
  box-shadow: 0 0 0.375rem rgba(241, 190, 100, 0.5);
}

.cal__key--open {
  border: 3px solid #fff3d2;
  background: linear-gradient(180deg, #fff3d2, #d9ae5f);
}

.cal__legend .icon-star {
  width: 0.75rem;
  height: 0.75rem;
  fill: var(--gold-2);
}

/* ---------- Extras: toggle cards ---------- */

.extras {
  display: grid;
  gap: 0.875rem;
  margin-top: 1.25rem;
}

.extra {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr) auto auto;
  grid-template-areas:
    "thumb name price pill"
    "thumb text price pill";
  align-items: center;
  gap: 0 1.25rem;
  width: 100%;
  margin: 0;
  padding: 0.875rem 1.25rem 0.875rem 0.875rem;
  border: 1px solid rgba(217, 178, 106, 0.35);
  border-radius: 0.875rem;
  background: rgba(247, 240, 228, 0.04);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color 0.3s, background-color 0.3s, box-shadow 0.4s, transform 0.4s var(--ease);
}

.extra:hover {
  border-color: rgba(241, 213, 155, 0.6);
  background: rgba(247, 240, 228, 0.07);
  transform: translateY(-1px);
}

.extra[aria-checked="true"] {
  border-color: var(--gold-2);
  background: rgba(241, 213, 155, 0.08);
  box-shadow: 0 0 1.25rem rgba(241, 190, 100, 0.22);
}

.extra__thumb {
  grid-area: thumb;
  width: 5.5rem;
  height: 5.5rem;
  overflow: hidden;
  border-radius: 50%;
  background: var(--sand);
  box-shadow: 0 0 0 0.1875rem var(--evergreen), 0 0 0 0.25rem rgba(217, 178, 106, 0.55);
}

.extra__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.extra__thumb--placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.125rem;
  border: 1px dashed rgba(241, 213, 155, 0.5);
  background: rgba(23, 54, 40, 0.8);
  color: rgba(247, 239, 225, 0.6);
  font-size: 0.5625rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
}

.extra__thumb--placeholder .icon-fir {
  width: 1.75rem;
  height: 1.75rem;
  fill: rgba(241, 213, 155, 0.35);
}

.extra__text {
  grid-area: text;
  display: block;
  min-width: 0;
  align-self: start;
}

.extra__text > span {
  display: block;
}

.extra__name {
  grid-area: name;
  display: block;
  min-width: 0;
  align-self: end;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1.1;
}

.extra__benefit {
  margin-top: 0.25rem;
  color: var(--cream-muted);
  font-size: 0.9375rem;
}

.extra__context {
  margin-top: 0.3125rem;
  color: var(--gold-2);
  font-size: 0.8125rem;
}

.extra__price {
  grid-area: price;
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 350;
  color: var(--gold-2);
  font-variant-numeric: tabular-nums lining-nums;
  /* The full price, when there is an offer, sits small above the price. */
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.05;
}

.extra__price .was {
  margin: 0 0 0.1875rem;
}

/* A fixed width, so swapping "Add" for "Added" never reflows the card. */
.extra__pill {
  grid-area: pill;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 6.5rem;
  min-height: 2.25rem;
  padding: 0 0.75rem;
  white-space: nowrap;
  border: 1px solid rgba(217, 178, 106, 0.6);
  border-radius: 62.4375rem;
  color: var(--gold-2);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}

.extra:hover .extra__pill {
  border-color: var(--gold-2);
}

.extra[aria-checked="true"] .extra__pill {
  border-color: var(--gold);
  background: linear-gradient(180deg, #f5dea8 0%, #d9ae5f 100%);
  color: #2a1a09;
}

/* ---------- The nudge: a gift tag that drops from a card ----------
   When setup is added without a stand, a small ivory tag unfolds beneath the
   card on a gold thread, swings once, sparkles, and offers the stand in one
   tap, or "I have my own" to fold it away. The cards below slide down with it. */

.extras__nudge {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.5s var(--ease);
}

.extras__nudge.is-on {
  grid-template-rows: 1fr;
}

.extras__nudge-inner {
  min-height: 0;
  overflow: hidden;
}

.nudge {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.25rem;
  width: fit-content;
  max-width: 100%;
  margin: 1.25rem 0 0.375rem 6.75rem;
  padding: 0.6875rem 0.875rem 0.6875rem 1.875rem;
  border: 1px solid rgba(217, 178, 106, 0.65);
  border-radius: 0.625rem;
  background:
    radial-gradient(ellipse 70% 40% at 50% 0%, #fffdf7 0%, rgba(255, 253, 247, 0) 70%),
    var(--paper);
  color: var(--ink);
  box-shadow: 0 1rem 2rem -1.125rem rgba(0, 0, 0, 0.65), 0 0 0 0.1875rem rgba(10, 24, 18, 0.4);
  opacity: 0;
  transform: translateY(-0.875rem) rotate(-2deg);
  transform-origin: 1.25rem -1.25rem;
  transition: opacity 0.25s ease-out, transform 0.3s var(--ease);
}

.extras__nudge.is-on .nudge {
  opacity: 1;
  transform: none;
  transition: opacity 0.35s ease-out 0.08s, transform 0.65s cubic-bezier(0.3, 1.45, 0.5, 1) 0.08s;
  animation: nudge-swing 1.5s ease-in-out 0.75s 1;
}

@keyframes nudge-swing {
  0%,
  100% {
    transform: rotate(0deg);
  }

  30% {
    transform: rotate(1.4deg);
  }

  65% {
    transform: rotate(-0.8deg);
  }
}

/* Inner hairline, like the summary tag. */
.nudge::after {
  content: "";
  position: absolute;
  inset: 0.25rem;
  border: 1px solid rgba(217, 178, 106, 0.3);
  border-radius: 0.4375rem;
  pointer-events: none;
}

.nudge__thread {
  position: absolute;
  top: -1.3125rem;
  left: 1.25rem;
  width: 1px;
  height: 1.3125rem;
  background: linear-gradient(180deg, rgba(217, 178, 106, 0.15), var(--gold));
}

.nudge__hole {
  position: absolute;
  top: 0.5625rem;
  left: 0.9375rem;
  width: 0.5rem;
  height: 0.5rem;
  border: 2px solid rgba(217, 178, 106, 0.85);
  border-radius: 50%;
  background: var(--evergreen-2);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.nudge__text {
  display: flex;
  flex-direction: column;
  gap: 0.0625rem;
  min-width: 0;
}

.nudge__title {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.2;
}

.nudge__copy {
  color: var(--ink-muted);
  font-size: 0.8125rem;
}

.nudge__actions {
  display: flex;
  align-items: center;
  gap: 0.875rem;
}

.nudge__add {
  margin: 0;
  padding: 0.4375rem 0.9375rem;
  border: 1px solid var(--gold);
  border-radius: 62.4375rem;
  background: linear-gradient(180deg, #f5dea8 0%, #d9ae5f 100%);
  color: #2a1a09;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.3s var(--ease), box-shadow 0.3s;
}

.nudge__add:hover {
  transform: translateY(-1px);
  box-shadow: 0 0.5rem 1rem -0.5rem rgba(0, 0, 0, 0.5), 0 0 0.875rem rgba(241, 190, 100, 0.45);
}

/* The quiet way out: "I have my own". */
.nudge__own {
  margin: 0;
  padding: 0.375rem 0.125rem;
  border: 0;
  background: none;
  color: var(--gold-deep);
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: underline;
  text-decoration-color: rgba(138, 101, 38, 0.4);
  text-underline-offset: 0.2rem;
  cursor: pointer;
  transition: color 0.2s, text-decoration-color 0.2s;
}

.nudge__own:hover {
  color: var(--berry);
  text-decoration-color: currentColor;
}

.nudge .sparks {
  left: 1.1875rem;
  top: 0.8125rem;
}

.extras__nudge.is-on .nudge .sparks {
  animation: wiz-sparks 0.9s ease-out 0.5s 1 both;
}

/* ---------- Summary rail ---------- */

/* The bar (small screens only) and its veil are hidden on desktop. */
.rail__bar,
.rail__scrim {
  display: none;
}

/* The summary is a gift tag: ivory card with a double gold frame, hanging
   from the header's lights on a gold thread. */
.wizard__rail {
  --tag-drop: 4rem;         /* how far the tag hangs below the header */
  position: sticky;
  top: calc(4.875rem + var(--tag-drop));
  margin-top: var(--tag-drop);
  padding: 1.75rem 1.375rem 1.375rem;
  border: 1px solid rgba(217, 178, 106, 0.6);
  border-radius: 0.875rem;
  background:
    radial-gradient(circle at 20% 30%, rgba(169, 128, 63, 0.11) 0 1px, transparent 1.6px) 0 0 / 2.875rem 2.875rem,
    radial-gradient(circle at 70% 65%, rgba(169, 128, 63, 0.08) 0 1px, transparent 1.6px) 0 0 / 4.625rem 4.625rem,
    radial-gradient(ellipse 70% 35% at 50% 0%, #fffdf7 0%, rgba(255, 253, 247, 0) 70%),
    var(--paper);
  color: var(--ink);
  box-shadow: 0 1.875rem 3.75rem -2.25rem rgba(40, 25, 10, 0.6), 0 0 0 0.25rem rgba(10, 24, 18, 0.35);
}

/* The thread, from the lights down through the tag's hole. */
.wizard__rail::before {
  content: "";
  position: absolute;
  top: calc(-1.5rem - var(--tag-drop));
  left: 50%;
  width: 1px;
  height: calc(var(--tag-drop) + 2.25rem);
  background: linear-gradient(180deg, rgba(217, 178, 106, 0.2), var(--gold) 30%);
}

/* Shorter screens: the tag hangs a little higher so its total stays in view. */
@media (min-width: 1024px) and (max-height: 820px) {
  .wizard__rail {
    --tag-drop: 2.5rem;
  }
}

@media (min-width: 1024px) and (max-height: 750px) {
  .wizard__rail {
    --tag-drop: 1.5rem;
  }
}

/* The tag settles on its thread when it first appears. */
.wizard__rail.is-hung {
  transform-origin: 50% calc(-1.5rem - var(--tag-drop));
  animation: tag-settle 2.4s ease-out 0.2s 1 both;
}

@keyframes tag-settle {
  0% {
    transform: rotate(-2.4deg);
  }

  22% {
    transform: rotate(1.6deg);
  }

  45% {
    transform: rotate(-0.9deg);
  }

  68% {
    transform: rotate(0.4deg);
  }

  100% {
    transform: rotate(0deg);
  }
}

/* Snow lies along the top edge of the tag, thinning out towards the corners. */
.rail__snow {
  position: absolute;
  left: 0.5rem;
  bottom: calc(100% - 0.125rem);
  z-index: 1;
  width: calc(100% - 1rem);
  height: 0.9375rem;
  filter: drop-shadow(0 -0.125rem 0.375rem rgba(255, 255, 255, 0.18));
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 9%, #000 91%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 9%, #000 91%, transparent 100%);
  pointer-events: none;
}

/* Two fir twigs fan out from behind the bow. */
.rail__sprig {
  position: absolute;
  top: -0.875rem;
  z-index: 2;
  width: 4.75rem;
  height: 1.875rem;
  filter: drop-shadow(0 0.125rem 0.125rem rgba(20, 30, 20, 0.35));
  pointer-events: none;
}

.rail__sprig svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.rail__sprig--right {
  left: 50%;
  transform-origin: 0 65%;
  transform: rotate(-7deg);
}

.rail__sprig--left {
  right: 50%;
  transform-origin: 100% 65%;
  transform: rotate(7deg);
}

.rail__sprig--left svg {
  transform: scaleX(-1);
}

.sprig__stem {
  fill: none;
  stroke: #5a4326;
  stroke-width: 1.4;
  stroke-linecap: round;
}

.sprig__needle {
  stroke: #2f6b45;
  stroke-width: 1.5;
  stroke-linecap: round;
}

.sprig__needle--light {
  stroke: #4c8a5c;
}

/* Inner hairline, like the calendar's card. */
.wizard__rail::after {
  content: "";
  position: absolute;
  inset: 0.375rem;
  border: 1px solid rgba(217, 178, 106, 0.28);
  border-radius: 0.625rem;
  pointer-events: none;
}

.rail__hole {
  position: absolute;
  top: 0.5rem;
  left: 50%;
  z-index: 1;
  width: 0.625rem;
  height: 0.625rem;
  margin-left: -0.3125rem;
  border: 2px solid rgba(217, 178, 106, 0.85);
  border-radius: 50%;
  background: var(--evergreen);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

/* A red bow at the hole, holly with berries in the corners. */
.rail__bow {
  position: absolute;
  top: -0.25rem;
  left: 50%;
  z-index: 3;
  width: 2.75rem;
  height: 1.625rem;
  margin-left: -1.375rem;
  filter: drop-shadow(0 0.125rem 0.25rem rgba(40, 10, 10, 0.35));
  pointer-events: none;
}

.bow__loop,
.bow__tail {
  fill: #b8323f;
}

.bow__knot {
  fill: #8d2431;
}

.bow__shine {
  fill: none;
  stroke: rgba(255, 255, 255, 0.45);
  stroke-width: 1.5;
  stroke-linecap: round;
}

.rail__holly {
  position: absolute;
  top: 0.5rem;
  width: 2.5rem;
  height: 2.5rem;
  pointer-events: none;
}

.rail__holly--left {
  left: 0.5rem;
}

.rail__holly--right {
  right: 0.5rem;
  transform: scaleX(-1);
}

.rail__holly .icon-holly {
  width: 100%;
  height: 100%;
}

.holly__leaf path:first-child {
  fill: #2f6b45;
}

.holly__vein {
  fill: none;
  stroke: rgba(255, 255, 255, 0.35);
  stroke-width: 1;
  stroke-linecap: round;
}

.holly__berry {
  fill: #b8323f;
}

.holly__shine {
  fill: rgba(255, 255, 255, 0.7);
}

.rail__title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 0.5rem 0 0;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.rail__title .site-header__star {
  width: 1rem;
  height: 1rem;
}

.rail__title-rule {
  position: relative;
  display: block;
  width: 4rem;
  height: 1px;
  margin: 0.625rem auto 0;
  background: linear-gradient(90deg, rgba(217, 178, 106, 0), var(--gold), rgba(217, 178, 106, 0));
}

.rail__title-rule::after {
  content: "";
  position: absolute;
  top: -0.1875rem;
  left: 50%;
  width: 0.375rem;
  height: 0.375rem;
  margin-left: -0.1875rem;
  background: var(--gold);
  transform: rotate(45deg);
}

.rail__rows {
  margin: 0.875rem 0 0;
  padding: 0;
  list-style: none;
}

.rail__row {
  display: grid;
  grid-template-columns: 2.5rem 1fr auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0 0.5625rem;
  border-top: 1px solid rgba(217, 178, 106, 0.3);
  transition: opacity 0.3s;
}

.rail__row:first-child {
  border-top: 0;
}

/* Each step marker is a little bauble: a ring with a cap on top. */
.rail__thumb {
  position: relative;
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--sand);
  box-shadow: 0 0 0 0.125rem var(--paper), 0 0 0 0.1875rem rgba(217, 178, 106, 0.55);
  color: var(--berry);
  font-family: var(--font-display);
  font-size: 0.9375rem;
  line-height: 1;
}

.rail__thumb::before {
  content: "";
  position: absolute;
  top: -0.4375rem;
  left: 50%;
  width: 0.375rem;
  height: 0.3125rem;
  margin-left: -0.1875rem;
  border-radius: 0.125rem 0.125rem 0 0;
  background: var(--gold);
}



.rail__thumb img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: contain;
  padding: 0.3125rem 0.25rem 0.1875rem;
}

.rail__thumb .icon-tick {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--gold-deep);
}

.rail__thumb .icon-fir {
  width: 1.25rem;
  height: 1.25rem;
  fill: var(--gold-deep);
}

.rail__thumb .icon-calendar {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--gold-deep);
  fill: var(--gold-deep);
}

/* A height band ("6–7") is a little smaller so it sits inside the bauble. */
.rail__thumb--band {
  font-size: 0.8125rem;
  letter-spacing: -0.01em;
}

/* The current step: a gold star breathing inside its bauble. */
.rail__thumb--current {
  background: var(--paper);
  box-shadow: 0 0 0 0.125rem var(--paper), 0 0 0 0.1875rem var(--gold), 0 0 0.75rem rgba(241, 190, 100, 0.5);
}

.rail__thumb--current .icon-star {
  width: 1.125rem;
  height: 1.125rem;
  fill: var(--gold);
  filter: drop-shadow(0 0 0.375rem rgba(241, 213, 155, 0.9));
  animation: star-breathe 3.6s ease-in-out infinite;
}

.rail__text {
  min-width: 0;
}

.rail__label {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  color: var(--ink-muted);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.rail__row--current .rail__label::before {
  content: "";
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0.375rem rgba(241, 213, 155, 0.8);
}

.rail__value {
  display: block;
  margin-top: 0.125rem;
  color: var(--ink);
  font-size: 0.9375rem;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.rail__row--current .rail__value {
  color: var(--gold-deep);
  font-style: italic;
}

.rail__row--attention .rail__value {
  color: var(--gold-deep);
  font-weight: 600;
}

.rail__reason {
  display: block;
  margin-top: 0.125rem;
  color: var(--ink-muted);
  font-size: 0.75rem;
  line-height: 1.35;
  white-space: normal;
}

.rail__row--changed .rail__reason {
  color: var(--gold-deep);
}

.rail__row--upcoming {
  opacity: 0.42;
}

/* A row that has just been reached settles in. */
.rail__row--new {
  animation: rail-row-in 0.45s var(--ease) 0.15s both;
}

@keyframes rail-row-in {
  from {
    opacity: 0;
    transform: translateY(-0.375rem);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.rail__edit {
  margin: 0;
  padding: 0.25rem 0;
  border: 0;
  background: none;
  color: var(--gold-deep);
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(138, 101, 38, 0.4);
  text-underline-offset: 0.2rem;
  cursor: pointer;
  transition: color 0.2s, text-decoration-color 0.2s;
}

.rail__edit:hover {
  color: var(--berry);
  text-decoration-color: currentColor;
}

/* A gold divider with a diamond above the price, like the site footer's. */
.rail__foot {
  position: relative;
  margin-top: 0.625rem;
  padding-top: 1rem;
}

.rail__foot::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(217, 178, 106, 0), rgba(217, 178, 106, 0.65), rgba(217, 178, 106, 0));
}

.rail__foot::after {
  content: "";
  position: absolute;
  top: -0.1875rem;
  left: 50%;
  width: 0.375rem;
  height: 0.375rem;
  margin-left: -0.1875rem;
  background: var(--gold);
  transform: rotate(45deg);
  box-shadow: 0 0 0.375rem rgba(241, 213, 155, 0.6);
}

/* "Total" on the left, the figure on the right, a quiet note beneath. */
.rail__total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0;
}

.rail__total-label {
  font-family: var(--font-display);
  font-size: 1.125rem;
  color: var(--ink);
}

.rail__total-value {
  display: inline-block;
  color: var(--berry);
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 350;
  line-height: 1;
  font-variant-numeric: tabular-nums lining-nums;
}

.rail__delivery {
  margin-top: 0.25rem;
  color: var(--ink-muted);
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  text-align: right;
}

.rail__total-value.is-counted {
  animation: price-bump 0.5s cubic-bezier(0.3, 1.8, 0.5, 1);
}

/* ---------- Review ---------- */

.review {
  display: grid;
  grid-template-columns: 16rem 1fr;
  gap: 2rem;
  align-items: start;
  margin-top: 1rem;
}

.review__visual {
  text-align: center;
}

.review__media {
  aspect-ratio: 3 / 4;
}

.review__caption {
  margin-top: 0.5rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
}

.review__caption span {
  color: var(--cream-muted);
}

.review__panel {
  padding: 1.25rem 1.5rem 1.375rem;
  color: var(--ink);
}

.review__heading {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.1875rem;
  font-weight: 400;
}

.review__lines {
  width: 100%;
  margin-top: 0.625rem;
}

.review__line {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: baseline;
  gap: 1rem;
  padding: 0.4375rem 0;
  border-top: 1px solid var(--line);
  font-size: 0.9375rem;
}

.review__line--empty {
  grid-template-columns: 1fr auto;
  color: var(--ink-muted);
}

.review__what span {
  color: var(--ink-muted);
}

.review__amount {
  font-variant-numeric: tabular-nums lining-nums;
}

.review__edits {
  display: flex;
  gap: 0.75rem;
}

.review__total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  width: 100%;
  margin-top: 0.25rem;
  padding-top: 0.875rem;
  border-top: 1px solid rgba(217, 178, 106, 0.6);
}

.review__total-label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.review__total-value {
  display: inline-block;
  color: var(--berry);
  font-family: var(--font-display);
  font-size: 2.75rem;
  font-weight: 350;
  line-height: 1;
  font-variant-numeric: tabular-nums lining-nums;
}

.review__total-value.is-counted {
  animation: price-bump 0.5s cubic-bezier(0.3, 1.8, 0.5, 1);
}

.review__add {
  align-self: stretch;
  margin-top: 0.875rem;
  cursor: pointer;
}

/* ---------- Rows with more options than fit: a horizontal scroller ----------
   Four or more cards sit in a snapping row that bleeds into a fade at
   whichever edge still hides a card, with a sliver of the next card showing.
   Arrows for the mouse, a string of position lights underneath (each one
   jumps to its card), and a hint that retires after the first scroll. */

.scroller {
  position: relative;
  --arrow-top: 10rem;
  --lights: 4;
}

.choices--scroll {
  display: flex;
  gap: 3.25rem;
  /* The row reaches 1.5rem past the column on each side: 0.75rem for the
     cards' frames and as much again as slack, so a glow or a card that grows
     on hover or selection never changes the row's width (which made the
     snapping row jump at its end). */
  margin: 1.5rem -1.5rem 0;
  padding: 1.25rem 1.5rem 1.5rem;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 1.5rem;
  scrollbar-width: none;
  --fade-start: 3rem;
  --fade-end: 3rem;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 var(--fade-start), #000 calc(100% - var(--fade-end)), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 var(--fade-start), #000 calc(100% - var(--fade-end)), transparent 100%);
}

.choices--scroll::-webkit-scrollbar {
  display: none;
}

.choices--scroll.is-start {
  --fade-start: 0px;
}

.choices--scroll.is-end {
  --fade-end: 0px;
}

/* Each card keeps a fixed width so a slice of the next one always shows. */
.choices--scroll > .reveal {
  display: flex;
  flex: 0 0 13rem;
  scroll-snap-align: start;
}

.choices--scroll .tree-card__media {
  aspect-ratio: 5 / 6;
}

/* In a scrolling row the glow behind a tree stays within its card's width. */
.choices--scroll .tree-card__media::before {
  inset: 4% 0 6%;
}

/* Cards in the row are the same height; the price pills line up along the
   bottom whatever the length of the blurb above them. */
.choices--scroll .choice__more {
  margin-top: auto;
}

.scroller__arrow {
  position: absolute;
  top: var(--arrow-top);
  z-index: 2;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  margin: -1.375rem 0 0;
  padding: 0;
  border: 1px solid rgba(217, 178, 106, 0.6);
  border-radius: 50%;
  background: rgba(10, 24, 18, 0.84);
  color: var(--gold-2);
  box-shadow: 0 0.5rem 1.25rem rgba(0, 0, 0, 0.35), inset 0 0 0 1px rgba(241, 213, 155, 0.12);
  cursor: pointer;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  transition: opacity 0.35s, transform 0.45s var(--ease), background-color 0.3s, color 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.scroller__arrow svg {
  width: 1rem;
  height: 1rem;
}

.scroller__arrow--prev {
  left: -1.375rem;
}

.scroller__arrow--prev svg {
  transform: scaleX(-1);
}

.scroller__arrow--next {
  right: -1.375rem;
}

.scroller__arrow:hover {
  border-color: var(--gold-2);
  background: var(--gold-2);
  color: #2a1a09;
  box-shadow: 0 0 1.25rem rgba(241, 190, 100, 0.5), 0 0.5rem 1.25rem rgba(0, 0, 0, 0.35);
  transform: scale(1.06);
}

.scroller__arrow.is-off {
  opacity: 0;
  transform: scale(0.75);
  pointer-events: none;
}

/* The string of lights: one bulb per card, the current one lit. Only shown
   where a single card fills the screen (phones); with several cards in view
   the slice of the next card and the arrows are enough. */
.scroller__foot {
  position: relative;
  display: none;
  align-items: center;
  justify-content: center;
  min-height: 2.5rem;
}

.scroller__lights {
  position: relative;
  display: flex;
  align-items: center;
}

.scroller__lights::before {
  content: "";
  position: absolute;
  top: 50%;
  right: 1.25rem;
  left: 1.25rem;
  height: 1px;
  background: linear-gradient(90deg, rgba(217, 178, 106, 0) 0%, rgba(217, 178, 106, 0.5) 18%, rgba(217, 178, 106, 0.5) 82%, rgba(217, 178, 106, 0) 100%);
  pointer-events: none;
}

.scroller__light {
  position: relative;
  width: var(--light-w, 2.5rem);
  height: 2.5rem;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.scroller__light::before {
  content: "";
  display: block;
  width: 0.4375rem;
  height: 0.4375rem;
  margin: auto;
  border-radius: 50%;
  background: rgba(217, 178, 106, 0.42);
  box-shadow: 0 0 0 2px var(--night);
  transition: transform 0.4s var(--ease), background-color 0.3s, box-shadow 0.4s;
}

.scroller__light:hover::before {
  background: rgba(241, 213, 155, 0.85);
}

.scroller__light[aria-current="true"]::before {
  background: #fff4d8;
  transform: scale(1.5);
  box-shadow: 0 0 0 2px var(--night), 0 0 0.625rem 0.125rem rgba(241, 190, 100, 0.7), 0 0 1.25rem 0.25rem rgba(241, 190, 100, 0.3);
}

/* "More trees →" sits just right of the lights without unbalancing them. */
.scroller__hint {
  position: absolute;
  top: 0;
  left: calc(50% + var(--lights) * var(--light-w, 2.5rem) / 2 + 0.375rem);
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  min-height: 2.5rem;
  margin: 0;
  padding: 0 0.375rem;
  border: 0;
  background: none;
  color: var(--gold-2);
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transition: opacity 0.5s, transform 0.5s var(--ease), color 0.2s;
}

.scroller__hint:hover {
  color: #fff6dc;
}

.scroller__hint span {
  font-size: 0.9375rem;
  letter-spacing: 0;
  animation: scroller-nudge 1.6s ease-in-out infinite;
}

/* Once faded it is gone for the keyboard and screen readers too. */
.scroller.is-scrolled .scroller__hint {
  visibility: hidden;
  opacity: 0;
  transform: translateX(0.5rem);
  pointer-events: none;
  transition: opacity 0.5s, transform 0.5s var(--ease), visibility 0s 0.5s;
}

@keyframes scroller-nudge {
  0%,
  100% {
    transform: translateX(0);
  }

  50% {
    transform: translateX(0.25rem);
  }
}

/* ---------- Reveal stagger for cards ---------- */

html.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- The offer: a full price crossed out, and what is saved ----------
   "From" prices say nothing of it. Where a price is exact, the full price is
   written small and crossed out by hand (a berry stroke, tilted, that is
   drawn across as the card arrives); what is saved rides on a berry ribbon
   with stitched gold edges and swallowtail ends, the same cloth as "Most
   popular". Everything here is drawn once: no loop, no timer. */

.was {
  position: relative;
  display: inline-block;
  margin-right: 0.4em;
  color: var(--cream-muted);
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.2;
  font-variant-numeric: tabular-nums lining-nums;
  text-decoration: none;
  white-space: nowrap;
}

.was::after {
  content: "";
  position: absolute;
  left: -0.25em;
  right: -0.25em;
  top: calc(50% + 0.125em);
  height: 0.09375rem;
  border-radius: 62.4375rem;
  background: #e8707f;
  box-shadow: 0 0 0.375rem rgba(232, 112, 127, 0.45);
  transform: rotate(-7deg);
  transform-origin: 0 50%;
}

/* On the ivory tag and the order panel: ink, and the berry of the totals. */
[data-surface="light"] .was,
.rail__tag .was {
  color: var(--ink-muted);
}

[data-surface="light"] .was::after,
.rail__tag .was::after {
  background: var(--berry);
  box-shadow: none;
}

.was--total {
  margin-right: 0;
  font-size: 0.9375rem;
}

/* The ribbon. */
.save-ribbon {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4375rem;
  padding: 0.3125rem 0.9375rem;
  color: #fff3d2;
  font-family: var(--font-body);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  line-height: 1.2;
  text-transform: uppercase;
  white-space: nowrap;
}

.save-ribbon::before,
.save-ribbon::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  clip-path: polygon(0 0, 100% 0, calc(100% - 0.4375rem) 50%, 100% 100%, 0 100%, 0.4375rem 50%);
}

.save-ribbon::before {
  background:
    linear-gradient(rgba(241, 213, 155, 0.6), rgba(241, 213, 155, 0.6)) 0 0.125rem / 100% 1px no-repeat,
    linear-gradient(rgba(241, 213, 155, 0.6), rgba(241, 213, 155, 0.6)) 0 calc(100% - 0.1875rem) / 100% 1px no-repeat,
    linear-gradient(180deg, #8f2436 0%, var(--berry) 55%, #551320 100%);
}

/* A glint that crosses the cloth once (see the motion rules below). */
.save-ribbon::after {
  background: linear-gradient(100deg, rgba(255, 243, 210, 0) 35%, rgba(255, 243, 210, 0.38) 50%, rgba(255, 243, 210, 0) 65%) no-repeat;
  background-size: 60% 100%;
  background-position: -150% 0;
}

.save-ribbon .icon-star {
  flex: none;
  width: 0.625rem;
  height: 0.625rem;
  fill: var(--gold-2);
}

/* The wide one, on the tag and the order: "You save £36", the figure in the
   display face and gold. */
.save-ribbon--band {
  display: flex;
  padding: 0.5rem 1.25rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: none;
}

.save-ribbon--band b {
  display: inline-block;
  margin-left: 0.125em;
  color: var(--gold-2);
  font-family: var(--font-display);
  font-size: 1.3em;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums lining-nums;
  vertical-align: -0.06em;
}

.save-ribbon--band b.is-counted {
  animation: price-bump 0.5s cubic-bezier(0.3, 1.8, 0.5, 1);
}

/* Which offer, and until when: named once where exact prices begin. */
.offer-note {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.875rem 0 0;
  padding: 0.3125rem 0.9375rem 0.3125rem 0.75rem;
  border: 1px solid rgba(217, 178, 106, 0.5);
  border-radius: 62.4375rem;
  background: linear-gradient(180deg, rgba(143, 36, 54, 0.5) 0%, rgba(107, 26, 42, 0.5) 100%);
  color: var(--cream-text);
  font-size: 0.8125rem;
  line-height: 1.3;
}

.offer-note b {
  color: var(--gold-2);
  font-weight: 600;
}

.offer-note .icon-star {
  flex: none;
  width: 0.75rem;
  height: 0.75rem;
  fill: var(--gold-2);
  filter: drop-shadow(0 0 0.25rem rgba(241, 213, 155, 0.8));
}

/* On the tag: the full total crossed out beside the total, then the ribbon.
   The order has the crossed-out total and the offer's line, and no ribbon. */
.rail__total-figures,
.review__total-figures {
  display: inline-flex;
  align-items: baseline;
  gap: 0.5rem;
}

.rail__saving {
  margin: 0.75rem 0 0;
  filter: drop-shadow(0 0.25rem 0.3125rem rgba(74, 16, 29, 0.28));
}

.rail__offer,
.review__offer {
  margin: 0.5rem 0 0;
  color: var(--ink-muted);
  font-size: 0.6875rem;
  letter-spacing: 0.02em;
  line-height: 1.35;
  text-align: center;
}

.rail__offer b,
.review__offer b {
  color: var(--berry);
  font-weight: 600;
}

/* On the order. */
.review__amount .was {
  margin-right: 0.5em;
}

.review__total-figures {
  gap: 0.75rem;
}

.review__total-figures .was--total {
  font-size: 1.125rem;
}

.review__offer {
  align-self: stretch;
  margin-top: 0.625rem;
  font-size: 0.8125rem;
}

/* In the folded bar on small screens: under the total, small and gold. */
.rail__bar-money {
  grid-column: 3;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.1875rem;
}

.rail__bar-save {
  color: var(--gold-2);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  line-height: 1;
  white-space: nowrap;
}

.rail__bar-save b {
  display: inline-block;
  font-weight: 700;
}

/* The movement, each once: the stroke is drawn across a full price as its
   card arrives, a size's ribbon pops on, and the ribbon on the tag unrolls
   (a glint crossing it) the first time there is something saved. */
@media (prefers-reduced-motion: no-preference) {
  .reveal .was::after {
    transform: rotate(-7deg) scaleX(0);
    transition: transform 0.5s var(--ease) 0.6s;
  }

  .reveal.is-visible .was::after {
    transform: rotate(-7deg) scaleX(1);
  }

  .reveal .size__save {
    opacity: 0;
    transform: translate(-50%, 50%) scale(0.6);
    transition: opacity 0.35s ease-out 0.95s, transform 0.5s cubic-bezier(0.3, 1.6, 0.5, 1) 0.95s;
  }

  .reveal.is-visible .size__save {
    opacity: 1;
    transform: translate(-50%, 50%);
  }

  .rail__saving.is-new .save-ribbon {
    animation: ribbon-unroll 0.7s var(--ease) 0.25s 1 both;
  }

  .rail__saving.is-new .save-ribbon::after {
    animation: ribbon-glint 1.1s ease-out 0.95s 1 both;
  }
}

@keyframes ribbon-unroll {
  from {
    clip-path: inset(0 50%);
  }

  to {
    clip-path: inset(0 0);
  }
}

@keyframes ribbon-glint {
  from {
    background-position: -150% 0;
  }

  to {
    background-position: 250% 0;
  }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html.js .wizard__step,
  html.js .wizard__step.is-leaving,
  html.js .wizard__step.is-leaving-back,
  html.js .wizard__step.is-entering,
  html.js .wizard__step.is-entering-back {
    opacity: 1 !important;
    transform: none !important;
  }

  .is-chosen .sparks {
    animation: none !important;
    opacity: 0;
  }

  .choice.is-chosen {
    transform: none;
  }

  .door__blind,
  .door__leaf,
  .door__inside,
  .door__glow {
    transition: none;
  }

  .door--lit:hover,
  .door--lit:focus-visible {
    transform: none;
  }

  .choice__more,
  .choice__more .choice__fact {
    transition-delay: 0s !important;
  }

  .rail__row--new {
    animation: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .scroller__hint span {
    animation: none;
  }

  .extras__nudge,
  .nudge,
  .extras__nudge.is-on .nudge {
    transition: none;
    animation: none;
  }

  .rail__bar-chevron,
  .rail__bar .icon-star,
  .rail__bar.is-grown::after,
  .rail__body,
  .wizard__rail.is-hung {
    animation: none;
    transition: none;
  }


  .choices--scroll {
    scroll-behavior: auto;
  }
}

/* =================================================================
   Narrow desktop (1024 to 1279px): the two columns stay, a little closer,
   and the size room shrinks so four trees still stand side by side.
   ================================================================= */

@media (min-width: 1024px) and (max-width: 1279.98px) {
  :root {
    --cm-scale: clamp(0.55px, calc(0.0962vw - 0.435px), 0.85px);
  }

  .wizard__grid {
    grid-template-columns: minmax(0, 1fr) 16rem;
    gap: 2.5rem;
  }

  .wizard__title {
    font-size: 2.5rem;
  }

  .choices--2 {
    grid-template-columns: repeat(2, minmax(0, 23.5rem));
    gap: 3rem;
  }

  .choices--3 {
    gap: 2.5rem;
  }

  .choices--scroll > .reveal {
    flex-basis: calc((100% - 6.5rem - 3rem) / 3);
  }

  /* Narrower cards: smaller names and badges, and the two badges stack
     rather than collide when the popular tree is the chosen one. */
  .choices--3 .tree-card__name,
  .choices--scroll .tree-card__name {
    font-size: 1.375rem;
  }

  .choices--3 .choice__badge,
  .choices--scroll .choice__badge {
    padding: 0.25rem 0.5625rem;
    font-size: 0.6875rem;
  }

  .choices--3 .choice__badge--popular,
  .choices--scroll .choice__badge--popular {
    padding: 0.3125rem 1rem 0.3125rem 0.5625rem;
    font-size: 0.5625rem;
  }

  .sizes {
    padding-left: 5rem;
    --figure-w: 5rem;
  }

  /* Three bands and a slice of the fourth in the narrower column. */
  .sizes__cards--scroll > .reveal {
    flex-basis: calc((100% - 2 * 2.5rem - 2.75rem) / 3);
  }

  .cal {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
  }

  .cal__month {
    padding: 4.125rem 0.5rem 1.5rem;
  }

  .cal__row,
  .cal__weekdays {
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.25rem;
  }

  .cal-cell {
    height: auto;
  }

  .door {
    width: 100%;
    max-width: 2.75rem;
    height: auto;
    aspect-ratio: 11 / 12;
  }

  .review {
    grid-template-columns: 13rem minmax(0, 1fr);
    gap: 1.5rem;
  }
}

/* =================================================================
   Tablets and phones (under 1024px): one column. The header scrolls away
   with the page and the gift tag folds into a ribbon that stays at the top:
   the choices so far, the running total, and a chevron that unfolds the
   rows with their Edit links.
   ================================================================= */

@media (max-width: 1023.98px) {
  .wizard-page .site-header {
    position: relative;
  }

  html.js .wizard-page .site-header {
    transition: background-color 0.35s, box-shadow 0.35s;
  }

  .wizard {
    min-height: 0;
    padding: 1.125rem 0 7.5rem;
  }

  .wizard__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  /* The gift tag lives at the bottom of the screen, within thumb's reach:
     an evergreen bar with a gold edge, the bow, the breathing star, the
     choices so far, the total in gold and a pulsing ring that invites a tap.
     It stays out of sight until the first choice. The tag itself slides up
     from behind it. */
  .wizard__rail,
  .wizard__rail.is-hung {
    animation: none;
  }

  .wizard__rail {
    position: fixed;
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    color: var(--cream-text);
    box-shadow: none;
  }

  .wizard__rail::before,
  .wizard__rail::after {
    display: none;
  }

  .wizard__rail:empty {
    min-height: 0;
  }

  /* Nothing chosen yet: the bar waits below the screen, then rises with the
     first choice. */
  html.js .wizard__rail {
    transition: transform 0.55s var(--ease), visibility 0s;
  }

  html.js .wizard__rail.is-empty {
    transform: translateY(115%);
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.4s var(--ease), visibility 0s 0.4s;
  }

  .rail__bar {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 0 0.75rem;
    width: 100%;
    min-height: 3.75rem;
    margin: 0;
    padding: 0.625rem var(--gutter) calc(0.625rem + env(safe-area-inset-bottom, 0px));
    border: 0;
    background:
      radial-gradient(ellipse 40% 90% at 88% 50%, rgba(241, 190, 100, 0.14), rgba(241, 190, 100, 0) 70%),
      linear-gradient(180deg, #1b3d2d 0%, #0f241b 100%);
    color: var(--cream-text);
    box-shadow: 0 -0.75rem 2rem rgba(0, 0, 0, 0.5);
    font: inherit;
    text-align: left;
    cursor: pointer;
    overflow: hidden;
  }

  /* A light sweeps across the bar when a new step joins the tag. */
  .rail__bar::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, transparent 30%, rgba(241, 213, 155, 0.22) 50%, transparent 70%);
    transform: translateX(-100%);
    pointer-events: none;
  }

  .rail__bar.is-grown::after {
    animation: bar-glint 1.1s ease-out 0.25s;
  }

  @keyframes bar-glint {
    to {
      transform: translateX(100%);
    }
  }

  /* Snow lies along the top of the bar, the way it does on the calendar. */
  .rail__snow {
    display: block;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 100%;
    z-index: 3;
    width: 100%;
    height: 1.125rem;
    margin-bottom: -1px;
    filter: drop-shadow(0 -0.25rem 0.5rem rgba(255, 255, 255, 0.14));
    -webkit-mask-image: none;
    mask-image: none;
    pointer-events: none;
  }

  .rail__bar .rail__bow {
    position: static;
    width: 2rem;
    height: 1.25rem;
    margin: 0;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.45));
  }

  .rail__bar-words {
    display: flex;
    flex-direction: column;
    gap: 0.0625rem;
    min-width: 0;
  }

  .rail__bar-title {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-family: var(--font-display);
    font-size: 1.0625rem;
    line-height: 1.2;
    white-space: nowrap;
  }

  .rail__bar .icon-star {
    width: 0.8125rem;
    height: 0.8125rem;
    fill: var(--gold);
    filter: drop-shadow(0 0 0.25rem rgba(241, 213, 155, 0.9));
    animation: star-breathe 3.6s ease-in-out infinite;
  }

  .rail__bar-summary {
    overflow: hidden;
    color: var(--cream-muted);
    font-size: 0.75rem;
    line-height: 1.3;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .rail__bar-total {
    grid-column: 3;
    color: var(--gold-2);
    font-family: var(--font-display);
    font-size: 1.375rem;
    font-weight: 350;
    line-height: 1;
    font-variant-numeric: tabular-nums lining-nums;
    white-space: nowrap;
    text-shadow: 0 0 0.75rem rgba(241, 190, 100, 0.5);
  }

  .rail__bar-total.is-counted {
    animation: price-bump 0.5s cubic-bezier(0.3, 1.8, 0.5, 1);
  }

  .rail__bar-chevron {
    grid-column: 4;
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border: 1px solid rgba(241, 213, 155, 0.8);
    border-radius: 50%;
    background: rgba(241, 213, 155, 0.1);
    color: var(--gold-2);
    box-shadow: 0 0 0 0 rgba(241, 190, 100, 0.55);
    animation: ring-breathe 2.8s ease-in-out infinite;
    transition: background-color 0.3s, color 0.3s;
  }

  .rail__bar-chevron svg {
    width: 0.8125rem;
    height: 0.8125rem;
    transform: rotate(-90deg);
    transition: transform 0.4s var(--ease);
  }

  @keyframes ring-breathe {
    0%,
    100% {
      box-shadow: 0 0 0 0 rgba(241, 190, 100, 0.55);
    }

    55% {
      box-shadow: 0 0 0 0.5rem rgba(241, 190, 100, 0);
    }
  }

  .wizard__rail.is-open .rail__bar-chevron {
    background: var(--gold);
    color: #2a1a09;
    animation: none;
  }

  .wizard__rail.is-open .rail__bar-chevron svg {
    transform: rotate(90deg);
  }

  /* The tag: an ivory sheet that rises from behind the bar. */
  .rail__body {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 100%;
    z-index: 1;
    display: block;
    max-height: calc(100vh - 8rem);
    max-height: calc(100dvh - 8rem);
    overflow: hidden;
    border: 1px solid rgba(217, 178, 106, 0.6);
    border-bottom: 0;
    border-radius: 1.25rem 1.25rem 0 0;
    background:
      radial-gradient(circle at 20% 30%, rgba(169, 128, 63, 0.11) 0 1px, transparent 1.6px) 0 0 / 2.875rem 2.875rem,
      radial-gradient(circle at 70% 65%, rgba(169, 128, 63, 0.08) 0 1px, transparent 1.6px) 0 0 / 4.625rem 4.625rem,
      radial-gradient(ellipse 70% 35% at 50% 0%, #fffdf7 0%, rgba(255, 253, 247, 0) 70%),
      var(--paper);
    color: var(--ink);
    box-shadow: 0 -1.5rem 3rem -1.5rem rgba(0, 0, 0, 0.7);
    transform: translateY(calc(100% + 5rem));
    visibility: hidden;
    transition: transform 0.45s var(--ease), visibility 0s 0.45s;
  }

  .wizard__rail.is-open .rail__body {
    transform: none;
    visibility: visible;
    transition: transform 0.55s cubic-bezier(0.22, 0.61, 0.36, 1);
  }

  /* A gold handle at the top of the sheet. */
  .rail__body::before {
    content: "";
    position: absolute;
    top: 0.625rem;
    left: 50%;
    width: 3rem;
    height: 0.1875rem;
    margin-left: -1.5rem;
    border-radius: 1rem;
    background: var(--gold);
    opacity: 0.75;
  }

  .rail__tag {
    max-height: calc(100vh - 8rem);
    max-height: calc(100dvh - 8rem);
    overflow: hidden auto;
    padding: 1.5rem var(--gutter) 2rem;
  }

  .rail__hole,
  .rail__sprig,
  .rail__body .rail__bow,
  .rail__title,
  .rail__title-rule {
    display: none;
  }

  .rail__holly {
    top: 0.75rem;
  }

  .rail__rows {
    margin: 0.25rem 0 0;
  }

  .rail__row:first-child {
    border-top: 0;
  }

  .rail__foot {
    margin-top: 0;
    padding: 0.75rem 0 0.875rem;
  }

  /* The veil behind the open tag. */
  .rail__scrim {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 25;
    background: rgba(10, 24, 18, 0.55);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s;
  }

  .rail__scrim.is-on {
    opacity: 1;
    pointer-events: auto;
  }

  /* Room for the bar at the end of the page, and below anything scrolled
     or focused into view. */
  .wizard-page .site-footer {
    padding-bottom: 4.5rem;
  }

  html {
    scroll-padding-bottom: 5.5rem;
  }

  .wizard__main {
    padding-top: 0;
  }

  .wizard__step {
    padding-top: 2.5rem;
  }

  html.js .wizard__step > .wizard__loading {
    min-height: 60vh;
  }

  .wizard__title {
    max-width: none;
  }

  .step__lede {
    max-width: none;
  }

  .step__nav .button {
    cursor: pointer;
  }

  .review {
    grid-template-columns: minmax(0, 1fr);
  }

  .review__visual {
    max-width: 14rem;
    margin: 0 auto;
  }

  .wizard-page .site-footer__inner {
    padding-top: 7rem;
  }
}

/* =================================================================
   Tablets (600 to 1023px): fluid type and spacing, as on the homepage.
   ================================================================= */

@media (min-width: 600px) and (max-width: 1023.98px) {
  :root {
    --cm-scale: clamp(0.5px, calc(0.0827vw + 0.004px), 0.85px);
  }

  .sizes__cards {
    gap: clamp(28px, 4vw, 40px);
  }

  .wizard__title {
    font-size: clamp(34px, calc(3.2vw + 14px), 46px);
  }

  .choices--2 {
    grid-template-columns: repeat(2, minmax(0, 23.5rem));
    gap: clamp(36px, 5vw, 64px);
  }

  .choices--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(32px, 4vw, 48px);
  }

  /* Three cards show at a time, two under 800px, with a slice of the next.
     The frames reach 12px beyond each card, so the gaps stay generous. */
  .choices--scroll {
    gap: clamp(32px, 4vw, 44px);
  }

  .choices--scroll > .reveal {
    flex-basis: calc((100% - 2 * clamp(32px, 4vw, 44px) - 4rem) / 3);
  }

  .sizes {
    padding-left: clamp(60px, 7vw, 92px);
    --figure-w: clamp(60px, 7vw, 92px);
  }

  .sizes__cards--scroll {
    gap: clamp(28px, 4vw, 40px);
  }

  .sizes__cards--scroll > .reveal {
    flex-basis: calc((100% - 3 * clamp(28px, 4vw, 40px) - 2.5rem) / 4);
  }

  .sizes__person,
  .sizes__person-label {
    width: clamp(56px, 6.5vw, 92px);
  }

  .cal {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(20px, 3vw, 32px);
  }

  .cal--single {
    grid-template-columns: minmax(0, 26rem);
  }

  .cal__month {
    padding: clamp(50px, 6.4vw, 66px) clamp(8px, 1.3vw, 13px) clamp(20px, 2.7vw, 28px);
  }

  .cal__row,
  .cal__weekdays {
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: clamp(4px, 0.6vw, 6px);
  }

  .cal-cell {
    height: auto;
  }

  .door {
    width: 100%;
    max-width: 2.75rem;
    height: auto;
    aspect-ratio: 11 / 12;
  }

  .review {
    grid-template-columns: 14rem minmax(0, 1fr);
    gap: clamp(20px, 3vw, 32px);
  }

  .review__visual {
    max-width: none;
    margin: 0;
  }

  @media (max-width: 799.98px) {
    .choices--scroll > .reveal {
      flex-basis: calc((100% - clamp(32px, 4vw, 44px) - 3rem) / 2);
    }

    /* Three bands in view: "11–12ft" needs the width. */
    .sizes__cards--scroll > .reveal {
      flex-basis: calc((100% - 2 * clamp(28px, 4vw, 40px) - 2.5rem) / 3);
    }
  }

  @media (max-width: 859.98px) {
    .cal {
      grid-template-columns: minmax(0, 26rem);
      justify-content: center;
      gap: 3rem;
    }
  }

  @media (max-width: 759.98px) {
    .review {
      grid-template-columns: minmax(0, 1fr);
    }

    .review__visual {
      max-width: 14rem;
      margin: 0 auto;
    }
  }
}

/* =================================================================
   Phones (under 600px). Most visitors are here. Cards two-up for the type,
   a swipeable edge-to-edge row for the trees, the size room scaled to the
   screen, months stacked, compact extras and a stacked review.
   ================================================================= */

@media (max-width: 599.98px) {
  :root {
    /* Four trees and the figure fit across the screen at any phone width,
       with clear space between the cards (40px gutters, 44px figure column
       and three 14px gaps leave four cards; the 8ft tree is 180 units wide). */
    --cm-scale: clamp(0.26px, calc((100vw - 126px) / 720), 0.5px);
  }

  .wizard {
    padding-bottom: 104px;
  }

  .wizard__step {
    padding-top: 34px;
  }

  .step__head .eyebrow {
    margin-bottom: 12px;
  }

  .wizard__title {
    font-size: clamp(30px, 8.6vw, 36px);
  }

  .step__lede {
    margin-top: 10px;
    font-size: 15px;
  }

  /* Stacked, with the way forward on top and Back beneath it. */
  .step__nav {
    flex-direction: column-reverse;
    align-items: stretch;
    gap: 10px;
    margin-top: 28px;
  }

  .step__nav--close {
    margin-top: 20px;
  }

  .step__nav .button {
    width: 100%;
    justify-content: center;
  }

  /* ---- Choice cards ---- */

  .choices {
    gap: 14px;
    margin-top: 18px;
  }

  .choices--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 24px;
  }

  .choice::before {
    inset: -6px -6px -6px;
    border-radius: 12px;
  }

  .choice::after {
    top: -9px;
  }

  .choice:focus-visible {
    outline-offset: 8px;
  }

  .choice .tree-card__name {
    margin-top: 8px;
    font-size: 24px;
  }

  .choice--type .tree-card__name {
    font-size: 20px;
  }

  .choice--type .tree-card__note {
    font-size: 12.5px;
  }

  .choice__facts {
    margin-top: 8px;
  }

  .choice__fact {
    gap: 6px;
    padding: 2px 0;
    font-size: 12px;
  }

  .choice__fact::before {
    width: 9px;
    height: 5px;
    margin-top: -3px;
  }

  .choice__blurb,
  .choice .tree-card__note {
    max-width: none;
    padding: 0 8px;
    font-size: 14.5px;
  }

  /* The two type cards stand side by side here: a smaller line. */
  .choice--type .tree-card__note {
    padding: 0 2px;
    font-size: 13px;
  }

  .choice__flourish {
    gap: 7px;
    margin-top: 6px;
  }

  .choice__flourish::before,
  .choice__flourish::after {
    width: 34px;
  }

  .choice__flourish .icon-twinkle {
    width: 11px;
    height: 11px;
  }

  .choice .tree-card__price {
    margin-top: 10px;
    padding: 4px 12px;
    font-size: 13px;
  }

  .choice__badge {
    top: 8px;
    right: 8px;
    padding: 3px 8px;
    font-size: 10.5px;
  }

  .choice__badge--popular {
    top: 12px;
    right: auto;
    left: -11px;
    padding: 5px 16px 5px 9px;
    font-size: 9.5px;
  }

  .choice__badge--popular::after {
    width: 5px;
    height: 4px;
  }

  .choices__more {
    gap: 10px;
    margin-top: 14px;
    font-size: 13.5px;
  }

  .choices__more-link {
    padding: 10px 2px;
    font-size: 13.5px;
  }

  .ornament-rule {
    width: 28px;
  }

  /* ---- The tree row: edge to edge, one card and a slice of the next ---- */

  .choices--scroll {
    gap: 24px;
    margin: 18px calc(-1 * var(--gutter)) 0;
    padding: 14px var(--gutter) 16px;
    scroll-padding-inline: var(--gutter);
    --fade-start: 44px;
    --fade-end: 52px;
  }

  .choices--scroll > .reveal {
    flex-basis: 76%;
  }

  /* Nothing travels on its own inside a snapping row (iOS Safari shakes). */
  html.js .choices--scroll > .reveal {
    transform: none;
  }

  .scroller__arrow {
    display: none;
  }

  .scroller__foot {
    display: flex;
    min-height: 40px;
  }

  .scroller__hint {
    font-size: 11px;
  }

  /* ---- Size step ---- */

  .sizes {
    margin-top: 18px;
    padding-left: 44px;
  }

  .sizes__cards {
    gap: 14px;
  }

  /* The scrolling row shows three bands and a slice of the fourth: the
     long labels ("11–12ft") need the width a four-band row cannot give. */
  .sizes {
    --figure-w: 44px;
  }

  .sizes--scroll .sizes__room {
    top: 10px;
  }

  .sizes__cards--scroll {
    gap: 14px;
    margin: 0 calc(-1 * var(--gutter)) 0 -6px;
    padding: 10px var(--gutter) 14px 6px;
    scroll-padding-inline: 6px var(--gutter);
    --fade-start: 24px;
    --fade-end: 36px;
  }

  .sizes__cards--scroll > .reveal {
    flex-basis: calc((100% - 2 * 14px - 18px) / 3);
  }

  /* Nothing travels on its own inside a snapping row (iOS Safari shakes). */
  html.js .sizes__cards--scroll > .reveal {
    transform: none;
  }

  /* "11–12ft" on a card a third of the screen wide. */
  .sizes--scroll .size__label {
    font-size: 17px;
    letter-spacing: -0.01em;
  }

  /* Two sizes stand across the full width here, as any number does. */
  .sizes[data-count="2"] .sizes__cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 14px;
    justify-content: normal;
  }

  .sizes__person,
  .sizes__person-label {
    width: 40px;
  }

  .sizes__person-label {
    font-size: 9px;
    letter-spacing: 0.06em;
  }

  .sizes__ceiling span {
    top: -17px;
    font-size: 9px;
    letter-spacing: 0.06em;
  }

  .choice--size::before {
    inset: -6px -2px;
  }

  /* Centred on the card and kept on one line. */
  .choice--size .choice__badge {
    top: 4px;
    right: auto;
    left: 50%;
    padding: 2px 6px;
    font-size: 9.5px;
    white-space: nowrap;
    transform: translateX(-50%);
  }

  .size__label {
    margin-top: 10px;
    font-size: 20px;
  }

  .size__cm {
    margin: 2px 0 8px;
    font-size: 11px;
  }

  /* "180 cm" and "2.4 m" alone: the narrow columns have no room for more. */
  .size__cm-about,
  .sizes__ceiling-word {
    display: none;
  }

  .choice--size .tree-card__price {
    margin-top: 8px;
    padding: 3px 8px;
    font-size: 12px;
  }

  /* The offer in the narrow columns: the full price a size smaller, and the
     ribbons short enough to leave a gap between neighbours. */
  .choice--size .size__was {
    margin: 6px auto 0;
    font-size: 11.5px;
  }

  .choice--size .size__was + .tree-card__price {
    margin-top: 4px;
    padding: 3px 10px;
    font-size: 13px;
  }

  .size__save .save-ribbon {
    gap: 3px;
    padding: 4px 9px;
    font-size: 8.5px;
    letter-spacing: 0.05em;
  }

  .size__save .save-ribbon::before,
  .size__save .save-ribbon::after {
    clip-path: polygon(0 0, 100% 0, calc(100% - 5px) 50%, 100% 100%, 0 100%, 5px 50%);
  }

  .sizes--offer {
    margin-bottom: 18px;
  }

  /* ---- Calendar: months stacked, doors sized to the screen ---- */

  .cal,
  .cal--single {
    grid-template-columns: minmax(0, 1fr);
    gap: 44px;
    margin: 44px 6px 0;
  }

  .cal__swag {
    left: -4%;
    width: 108%;
  }

  .cal__bow {
    width: 2.25rem;
    height: 1.3125rem;
    top: -1.25rem;
  }

  .cal__bow--left {
    left: calc(-4% - 0.5rem);
  }

  .cal__bow--right {
    right: calc(-4% - 0.5rem);
  }

  .cal__lights {
    left: -4%;
    right: -4%;
  }

  .cal__month {
    padding: 54px 10px 22px;
    border-radius: 14px;
  }

  .cal__name {
    gap: 10px;
    font-size: 22px;
  }

  .cal__year {
    font-size: 14px;
  }

  .cal__rule {
    max-width: 40px;
  }

  .cal__row,
  .cal__weekdays {
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 4px;
  }

  .cal-cell {
    height: auto;
  }

  .door {
    width: 100%;
    max-width: 44px;
    height: auto;
    aspect-ratio: 11 / 12;
  }

  .door__num,
  .door__inside-num {
    font-size: 16px;
  }

  .door--lit .door__num {
    font-size: 17px;
  }

  .door--christmas .door__tag {
    font-size: 7px;
  }

  .cal__legend {
    gap: 6px 16px;
    margin-top: 10px;
    font-size: 12.5px;
  }

  /* ---- Extras: thumb, words, then price over the toggle ---- */

  .extras {
    gap: 10px;
    margin-top: 16px;
  }

  .extra {
    grid-template-columns: 56px minmax(0, 1fr) auto;
    grid-template-areas:
      "thumb name price"
      "thumb text pill";
    align-items: start;
    gap: 2px 12px;
    padding: 12px 12px 12px 10px;
    border-radius: 12px;
  }

  .extra__thumb {
    align-self: center;
    width: 56px;
    height: 56px;
    box-shadow: 0 0 0 2px var(--evergreen), 0 0 0 3px rgba(217, 178, 106, 0.55);
  }

  .extra__thumb--placeholder {
    font-size: 8px;
  }

  .extra__thumb--placeholder .icon-fir {
    width: 20px;
    height: 20px;
  }

  .extra__name {
    align-self: start;
    font-size: 19px;
  }

  .extra__benefit {
    margin-top: 4px;
    font-size: 13px;
  }

  .extra__context {
    margin-top: 3px;
    font-size: 12px;
  }

  .extra__price {
    align-self: start;
    /* Centred over the pill, the full price with it. */
    align-items: center;
    font-size: 20px;
    line-height: 1.2;
    text-align: center;
  }

  .extra__pill {
    align-self: start;
    justify-self: center;
    width: auto;
    min-width: 64px;
    min-height: 28px;
    padding: 0 12px;
    font-size: 11.5px;
  }

  .nudge {
    width: 100%;
    margin: 16px 0 2px;
    padding: 10px 12px 10px 26px;
    gap: 8px 12px;
  }

  .nudge__title {
    font-size: 16px;
  }

  .nudge__copy {
    font-size: 12.5px;
  }

  .nudge__actions {
    width: 100%;
    justify-content: flex-end;
    gap: 12px;
  }

  .nudge__add {
    padding: 7px 13px;
    font-size: 12.5px;
  }

  .nudge__own {
    font-size: 12.5px;
  }


  /* ---- Review: picture, panel, then the dates down a thread ---- */

  .review {
    gap: 20px;
    margin-top: 14px;
  }

  .review__visual {
    max-width: 180px;
  }

  .review__caption {
    font-size: 18px;
  }

  .review__panel {
    padding: 18px 16px;
  }

  .review__line {
    gap: 10px;
    font-size: 14px;
    /* The price is the last line of its cell when a full price stands over it. */
    align-items: last baseline;
  }

  /* No room for the two prices side by side: the full price goes above. */
  .review__amount {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-end;
  }

  .review__amount .was {
    margin: 0 0 1px;
    font-size: 12px;
  }

  .review__total-value {
    font-size: 38px;
  }

  /* ---- Footer seam ---- */

  .wizard-page .site-footer__inner {
    padding-top: 96px;
  }

  /* ---- The bar on a phone ---- */

  .rail__bar {
    gap: 0 10px;
    min-height: 58px;
  }

  .rail__bar .rail__bow {
    width: 28px;
    height: 17px;
  }

  .rail__bar-title {
    font-size: 16px;
  }

  .rail__bar-summary {
    font-size: 11.5px;
  }

  .rail__bar-total {
    font-size: 20px;
  }

  @media (max-width: 379.98px) {
    .choice--type .tree-card__name {
      font-size: 18px;
    }

    .choice__fact {
      font-size: 11px;
    }

    .choice .tree-card__name {
      font-size: 22px;
    }
  }

  @media (max-width: 359.98px) {
    /* Four height bands across a 320px screen. */
    .size__label {
      font-size: 17px;
    }

    .size__cm {
      font-size: 10px;
    }

    /* No room for the word on the ribbon: "−£17" says it. */
    .size__save .save-ribbon__word {
      font-size: 0;
    }

    .size__save .save-ribbon__word::after {
      content: "−";
      font-size: 9px;
    }

    .size__save .save-ribbon {
      gap: 0;
      padding: 4px 8px;
      font-size: 9px;
      letter-spacing: 0.02em;
    }

    /* The words run under the thumb so they get the full width. */
    .extra {
      grid-template-columns: 44px minmax(0, 1fr) auto;
      grid-template-areas:
        "thumb name price"
        "text text text"
        "pill pill pill";
      gap: 4px 10px;
      padding: 10px;
    }

    .extra__thumb {
      align-self: start;
      width: 44px;
      height: 44px;
    }

    .extra__thumb--placeholder {
      font-size: 7px;
    }

    .extra__thumb--placeholder .icon-fir {
      width: 16px;
      height: 16px;
    }

    .extra__name {
      align-self: center;
      font-size: 18px;
    }

    .extra__price {
      align-self: center;
    }

    .extra__pill {
      justify-self: end;
      margin-top: 4px;
    }

    .rail__bar {
      padding-left: 14px;
      padding-right: 14px;
    }

    .rail__tag {
      padding-left: 14px;
      padding-right: 14px;
    }

    .choices--scroll {
      margin-left: -14px;
      margin-right: -14px;
      padding-left: 14px;
      padding-right: 14px;
      scroll-padding-inline: 14px;
    }
  }
}

/* Touch screens: no hover flourishes, and the arrows give way to swiping. */
@media (hover: none) {
  .choice:hover .tree-card__media img,
  .choice--size:hover .size__media img {
    transform: none;
  }

  .scroller__arrow {
    display: none;
  }
}

/* ==========================================================================
   A closer look at a tree (13 October 2026)
   A looking glass on the corner of a tree's picture opens that tree's larger
   picture in a dialog. Only a tree with a larger picture carries one: the
   catalogue gives those a "zoom" address (today, the artificial trees).
   ========================================================================== */

/* The glass is the card's sibling, not its child, because a button cannot sit
   inside the card's own button. So it is placed in the card's wrapper. The
   picture is 5:6, which makes its height 120% of the card's width, and a
   percentage margin is measured on that width: that is what keeps the glass
   on the picture's lower right corner at every card size. */
.choices > .reveal {
  position: relative;
}

.tree-zoom {
  position: absolute;
  top: 0;
  right: 0.125rem;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  margin: calc(120% - 2.5rem) 0 0;
  padding: 0;
  border: 1px solid rgba(217, 178, 106, 0.55);
  border-radius: 50%;
  background: rgba(15, 36, 27, 0.82);
  color: var(--gold-2);
  cursor: zoom-in;
  appearance: none;
  -webkit-appearance: none;
  box-shadow: 0 0.375rem 0.875rem -0.375rem rgba(0, 0, 0, 0.7);
  transition: border-color 0.3s, background-color 0.3s, box-shadow 0.3s, transform 0.3s var(--ease), opacity 0.3s;
}

/* A finger gets 44px, whatever the glass looks like. */
.tree-zoom::after {
  content: "";
  position: absolute;
  inset: -0.25rem;
  border-radius: 50%;
}

.tree-zoom svg {
  width: 1.125rem;
  height: 1.125rem;
}

.tree-zoom:hover,
.tree-zoom:focus-visible {
  border-color: var(--gold-2);
  background: rgba(23, 54, 40, 0.96);
  box-shadow: 0 0 0.875rem rgba(241, 190, 100, 0.35), 0 0.375rem 0.875rem -0.375rem rgba(0, 0, 0, 0.7);
  transform: scale(1.08);
}

.tree-zoom:focus-visible {
  outline-offset: 0.1875rem;
}

/* While a tree is being chosen its card grows and the others dim; the
   glasses step back with them. The glass is its card's next sibling. */
.choice.is-dimmed + .tree-zoom,
.choice.is-chosen + .tree-zoom {
  opacity: 0;
  pointer-events: none;
}

/* The view: the card's own frame and ornament, grown. It is as wide as the
   screen's height allows a 3:4 picture with its name under it, and never
   wider than 36rem, because the pictures are 1400px tall and stay sharp. */
.closer {
  width: min(calc(100vw - 2rem), 36rem, calc((100vh - 9.5rem) * 0.75 + 2.5rem));
  width: min(calc(100vw - 2rem), 36rem, calc((100dvh - 9.5rem) * 0.75 + 2.5rem));
  max-width: none;
  max-height: none;
  padding: 0;
  border: 0;
  background: none;
  color: var(--cream-text);
  overflow: visible;
  overscroll-behavior: contain;
}

/* On a screen too short for that (a phone on its side, a page zoomed in) the
   view would end up smaller than the card's own picture. There it keeps a
   useful width and scrolls instead; the small top padding leaves room for the
   frame's diamond inside the scrolling box. */
@media (max-height: 34rem) {
  .closer {
    width: min(calc(100vw - 2rem), 26rem);
    max-height: calc(100vh - 1rem);
    max-height: calc(100dvh - 1rem);
    padding-top: 0.375rem;
    overflow-y: auto;
  }
}

/* The page behind holds still while the view is open: a finger dragged on the
   picture must not scroll what it cannot see. The gutter keeps the page from
   shifting where a scroll bar takes room. */
html:has(.closer[open]) {
  overflow: hidden;
  scrollbar-gutter: stable;
}

.closer::backdrop {
  background: rgba(6, 15, 11, 0.88);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.closer__frame {
  position: relative;
  padding: 1.25rem 1.25rem 1.375rem;
  border: 1px solid rgba(217, 178, 106, 0.5);
  border-radius: 1rem;
  background: radial-gradient(120% 85% at 50% 40%, #1c4131 0%, var(--evergreen) 64%, #0a1912 100%);
  box-shadow: 0 2rem 4rem -1rem rgba(0, 0, 0, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  text-align: center;
}

/* The small gold diamond every card wears at the top of its frame. */
.closer__frame::after {
  content: "";
  position: absolute;
  top: -0.25rem;
  left: 50%;
  width: 0.4375rem;
  height: 0.4375rem;
  margin-left: -0.21875rem;
  background: var(--gold-2);
  box-shadow: 0 0 0.625rem rgba(255, 236, 190, 0.9);
  transform: rotate(45deg);
}

.closer__stage {
  position: relative;
  aspect-ratio: 3 / 4;
}

/* The same soft light a tree stands in on its card. */
.closer__stage::before {
  content: "";
  position: absolute;
  inset: 6% 2% 4%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(241, 213, 155, 0.2), rgba(241, 213, 155, 0));
}

.closer__picture {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.closer__name {
  margin: 0.875rem 0 0;
  color: var(--gold-2);
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.closer__flourish {
  display: block;
  margin-top: 0.5rem;
  line-height: 0;
}

.closer__flourish svg {
  width: 0.6875rem;
  height: 0.6875rem;
  fill: var(--gold);
}

.closer__close {
  position: absolute;
  top: 0.625rem;
  right: 0.625rem;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 1px solid rgba(217, 178, 106, 0.5);
  border-radius: 50%;
  background: rgba(15, 36, 27, 0.82);
  color: var(--gold-2);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color 0.3s, background-color 0.3s, transform 0.3s var(--ease);
}

.closer__close::after {
  content: "";
  position: absolute;
  inset: -0.125rem;
  border-radius: 50%;
}

.closer__close svg {
  width: 1.125rem;
  height: 1.125rem;
}

.closer__close:hover,
.closer__close:focus-visible {
  border-color: var(--gold-2);
  background: rgba(23, 54, 40, 0.96);
  transform: rotate(90deg);
}

/* It arrives as the cards do: the frame settles, the tree rises into its
   light a moment later, and it leaves quickly. */
@media (prefers-reduced-motion: no-preference) {
  .closer[open] {
    animation: closer-in 0.45s var(--ease-arrive) both;
  }

  .closer[open]::backdrop {
    animation: closer-veil 0.35s ease both;
  }

  .closer[open] .closer__picture {
    animation: closer-rise 0.65s var(--ease-arrive) 0.05s both;
  }

  .closer.is-leaving {
    animation: closer-out 0.18s ease both;
  }

  .closer.is-leaving::backdrop {
    animation: closer-unveil 0.18s ease both;
  }
}

@keyframes closer-in {
  from {
    opacity: 0;
    transform: translateY(0.75rem) scale(0.96);
  }
}

@keyframes closer-out {
  to {
    opacity: 0;
    transform: scale(0.98);
  }
}

@keyframes closer-veil {
  from {
    opacity: 0;
  }
}

@keyframes closer-unveil {
  to {
    opacity: 0;
  }
}

@keyframes closer-rise {
  from {
    opacity: 0.4;
    transform: translateY(1rem) scale(0.97);
  }
}

/* A phone: less air round the picture, a smaller name. */
@media (max-width: 599.98px) {
  .closer__frame {
    padding: 0.875rem 0.875rem 1.125rem;
  }

  .closer__name {
    font-size: 1.5rem;
  }
}
