/* Festive Manchester · basket.css · the basket page
   Loaded after base.css and stage.css. The stage (snow, baubles, the two
   trees, the garland) and the gift tag itself (the card, its trimmings, the
   label, title, rule and lede, and how each rises into place) are stage.css.
   This file holds what the basket alone has: a wider tag, each tree on it
   with its picture, its days as calendar leaves and its extras, the one
   thing more the page suggests, the total, and the empty tag. Desktop first in rem, so it scales with the root on large screens;
   tablets and phones follow, on the stage's breakpoints. Everything that
   moves is one CSS animation that runs once, or a transition. */

/* ---------- The tag, wider than the sign-in's ---------- */

.basket-page {
  --tag-w: 46rem;
  --tag-h: 30rem;
}

/* The two trees stand a little shorter, so they stay clear of the tag. */
.basket.stage {
  --tree-h: min(30rem, 52vh, 26vw);
}

.basket-tag {
  padding: 2.875rem 2.75rem 2.5rem;
}

/* Everything on the tag rises in turn, after the tag has come down (the
   stage's own rise; the label, title, rule and lede already have it). */
.basket-tag .slip,
.basket-tag .line,
.basket-tag .total,
.basket-tag .basket-go,
.basket-tag .basket-foot,
.basket-tag .empty {
  animation: tag-rise 0.7s var(--ease) calc(0.55s + var(--i, 0) * 0.07s) backwards;
}

/* ---------- A slip: what has just happened ---------- */

.slip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.5rem 0.875rem;
  margin: 1.5rem 0 0;
  padding: 0.75rem 1.125rem 0.75rem 0.75rem;
  border: 1px solid rgba(169, 128, 63, 0.4);
  border-radius: 0.875rem;
  background: rgba(23, 54, 40, 0.06);
  text-align: left;
}

.slip:has(.slip__act) {
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.slip--bad {
  border-color: rgba(107, 26, 42, 0.3);
  background: rgba(107, 26, 42, 0.06);
}

.slip__mark {
  display: grid;
  place-items: center;
  width: 2.125rem;
  height: 2.125rem;
  border-radius: 50%;
  background: var(--evergreen-2);
  color: var(--gold-2);
}

.slip--bad .slip__mark {
  background: var(--berry);
  color: var(--cream-text);
}

.slip__mark svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.slip__said {
  display: grid;
  gap: 0.125rem;
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.4;
}

.slip__said strong {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.25;
  text-wrap: balance;
}

.slip__said strong + span {
  color: var(--ink-muted);
  font-weight: 400;
  text-wrap: balance;
}

.slip__undo {
  margin: 0;
}

.slip__act {
  cursor: pointer;
}

/* ---------- Each tree ---------- */

.lines {
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
  text-align: left;
}

.line {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr);
  gap: 0 1.5rem;
  padding: 1.625rem 0;
  border-top: 1px dashed rgba(169, 128, 63, 0.4);
}

.line:first-child {
  padding-top: 0.5rem;
  border-top: 0;
}

/* The picture: the tree in a lit window, standing on a little snow. */
.line__pic {
  position: relative;
}

.line__window {
  position: relative;
  display: grid;
  place-items: end center;
  width: 5.5rem;
  height: 7rem;
  overflow: hidden;
  border: 1px solid rgba(169, 128, 63, 0.45);
  border-radius: 0.875rem;
  background:
    radial-gradient(ellipse 80% 30% at 50% 100%, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0) 70%),
    linear-gradient(180deg, #fffefa 0%, #f6efe0 100%);
  box-shadow: inset 0 1px 0 #fff, 0 0.375rem 1rem -0.5rem rgba(0, 0, 0, 0.3);
  transition: transform 0.35s var(--ease), box-shadow 0.35s;
}

/* The snow it stands on. */
.line__window::after {
  content: "";
  position: absolute;
  right: 8%;
  bottom: -0.5rem;
  left: 8%;
  height: 1.125rem;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 -1px 0 rgba(169, 128, 63, 0.18);
}

.line__picture {
  position: relative;
  z-index: 1;
  max-width: 80%;
  max-height: 84%;
  margin-bottom: 0.5rem;
  object-fit: contain;
  filter: drop-shadow(0 0.375rem 0.375rem rgba(0, 0, 0, 0.18));
}

/* A photograph (a Santa visit) fills its window; no snow under it. */
.line__window--photo .line__picture {
  max-width: none;
  max-height: none;
  width: 100%;
  height: 100%;
  margin: 0;
  object-fit: cover;
  filter: none;
}

.line__window--photo::after {
  display: none;
}

.line__window .twinkle {
  z-index: 2;
  width: 0.75rem;
  height: 0.75rem;
  margin: -0.375rem 0 0 -0.375rem;
}

/* Pointed at, the window lifts and warms, as if its lights came on. */
.line:hover .line__window {
  transform: translateY(-2px);
  box-shadow: 0 0 0 1px rgba(217, 178, 106, 0.6), 0 0.875rem 1.5rem -0.75rem rgba(226, 180, 96, 0.75), inset 0 1px 0 #fff;
}

/* A tree that has just arrived (or come back): a berry ribbon across the
   corner, the picture lands with a bounce, and sparks fly off it once. */
.line__ribbon {
  position: absolute;
  top: 1.625rem;
  left: -1.75rem;
  z-index: 3;
  width: 8rem;
  padding: 0.1875rem 0;
  background: var(--berry);
  color: var(--cream-text);
  font-size: 0.5625rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-align: center;
  text-transform: uppercase;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  transform: rotate(-45deg);
  animation: basket-ribbon 0.6s cubic-bezier(0.3, 1.45, 0.5, 1) 1.2s backwards;
}

@keyframes basket-ribbon {
  from {
    opacity: 0;
    transform: rotate(-45deg) translateY(-1rem);
  }
}

.line.is-lit .line__picture {
  animation: basket-land 0.75s cubic-bezier(0.3, 1.45, 0.5, 1) 1s backwards;
}

@keyframes basket-land {
  from {
    opacity: 0;
    transform: translateY(-1.25rem) scale(0.85);
  }
}

.line__sparks,
.extra__sparks {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0.3125rem;
  height: 0.3125rem;
  margin: -0.15625rem 0 0 -0.15625rem;
  border-radius: 50%;
  box-shadow:
    -1.75rem -1.25rem 0 0 var(--gold),
    1.25rem -1.75rem 0 -1px #c9953a,
    1.875rem 0.875rem 0 0 var(--gold),
    -1.375rem 1.375rem 0 -1px #c9953a,
    -2.375rem 0.125rem 0 -1px var(--berry),
    2.375rem -0.25rem 0 -1px var(--berry),
    0.25rem 2.125rem 0 0 var(--gold-2),
    -0.375rem -2.25rem 0 0 var(--gold-2);
  opacity: 0;
  transform: scale(0.2);
  pointer-events: none;
}

.line__sparks {
  top: 3.5rem;
  left: 2.75rem;
  z-index: 4;
}

.line.is-lit .line__sparks {
  animation: basket-sparks 0.9s ease-out 1.25s 1 both;
}

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

  30% {
    opacity: 1;
  }

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

/* The words. */
.line__what {
  display: grid;
  align-content: start;
  gap: 0.625rem;
  min-width: 0;
}

.line__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.line__name {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.line__size {
  color: var(--ink-muted);
  font-family: var(--font-body);
  font-size: 1rem;
  letter-spacing: 0;
  white-space: nowrap;
}

.line__price {
  flex: none;
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.625rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

/* A day, as a leaf torn from a calendar, and the words beside it. */
.line__day {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0;
}

.leaf {
  position: relative;
  display: grid;
  flex: none;
  place-items: center;
  width: 2.75rem;
  height: 3.125rem;
  padding-top: 0.375rem;
  border: 1px solid rgba(169, 128, 63, 0.5);
  border-radius: 0.5rem;
  background: linear-gradient(180deg, #fffefa 0%, #fff 100%);
  color: var(--ink);
  box-shadow: 0 0.25rem 0.5rem -0.25rem rgba(0, 0, 0, 0.25), inset 0 1px 0 #fff;
}

/* The ring at the top, that it hung from. */
.leaf::before {
  content: "";
  position: absolute;
  top: -0.3125rem;
  left: 50%;
  width: 0.5rem;
  height: 0.5rem;
  margin-left: -0.25rem;
  border: 1.5px solid var(--gold);
  border-radius: 50%;
  background: var(--paper);
}

/* The torn edge: the band at the top in colour. */
.leaf::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 0.375rem;
  border-radius: 0.4375rem 0.4375rem 0 0;
  background: var(--berry);
}

.leaf--collection::after {
  background: var(--evergreen-2);
}

.leaf b {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1;
}

.leaf small {
  margin-top: 0.0625rem;
  color: var(--gold-deep);
  font-size: 0.5625rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  line-height: 1;
  text-transform: uppercase;
}

/* A visit at home: a gold star in place of a day. */
.leaf--star {
  padding-top: 0;
  color: var(--gold-deep);
}

.leaf--star::after {
  background: var(--gold);
}

.leaf--star svg {
  width: 1.375rem;
  height: 1.375rem;
  fill: currentColor;
}

/* A tree without a day of its own: the sleigh in place of a leaf. */
.leaf--sleigh {
  padding-top: 0;
  color: var(--gold-deep);
}

.leaf--sleigh::after {
  background: var(--gold);
}

.sleigh {
  width: 1.75rem;
  height: 1.125rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.line__when {
  display: grid;
  gap: 0.0625rem;
  min-width: 0;
  line-height: 1.35;
}

.line__when strong {
  color: var(--gold-deep);
  font-size: 0.9375rem;
  font-weight: 600;
}

.line__when em {
  color: var(--ink-muted);
  font-size: 0.8125rem;
  font-style: normal;
}

/* Its extras, each with a gold tick and the little cross that takes it off. */
.line__extras {
  display: grid;
  gap: 0.375rem;
  margin: 0.125rem 0 0;
  padding: 0;
  list-style: none;
}

.extra {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 0.9375rem;
}

.extra__tick {
  position: relative;
  display: grid;
  flex: none;
  place-items: center;
  width: 1.375rem;
  height: 1.375rem;
  border-radius: 50%;
  background: linear-gradient(180deg, #f5dea8 0%, #d9ae5f 100%);
  box-shadow: 0 0.25rem 0.5rem -0.25rem rgba(226, 180, 96, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.extra__tick svg {
  width: 0.8125rem;
  height: 0.8125rem;
  fill: none;
  stroke: #2a1a09;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.extra__name {
  flex: 1;
  min-width: 0;
}

.extra__price {
  font-size: 1.0625rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.extra__off {
  display: flex;
  margin: 0;
}

.extra__x {
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  margin: -0.1875rem -0.25rem -0.1875rem 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--ink-muted);
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}

.extra__x:hover {
  background: rgba(107, 26, 42, 0.1);
  color: var(--berry);
}

.extra__x svg {
  width: 0.75rem;
  height: 0.75rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
}

/* An extra that has just gone on: its tick pops and sparks fly. */
.extra.is-lit .extra__tick {
  animation: basket-pop 0.5s cubic-bezier(0.3, 1.5, 0.5, 1) 0.9s backwards;
}

.extra.is-lit .extra__sparks {
  animation: basket-sparks 0.9s ease-out 1s 1 both;
}

@keyframes basket-pop {
  from {
    transform: scale(0.3);
  }
}

/* Remove, and what the tree comes to with its extras. */
.line__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.375rem;
}

.line__out {
  margin: 0;
}

/* Quiet, so the eye stays on what is being bought; berry under the pointer. */
.line__remove {
  padding: 0.25rem 0;
  border: 0;
  background: none;
  color: var(--ink-muted);
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: rgba(94, 101, 95, 0.4);
  text-underline-offset: 0.2em;
  cursor: pointer;
  transition: color 0.2s, text-decoration-color 0.2s;
}

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

.line__comes {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.875rem;
}

.line__comes b {
  color: var(--ink);
  font-size: 1.0625rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* Taken out: the tree folds away before its form is sent (basket.js). */
.line.is-folding {
  animation: basket-fold 0.4s var(--ease) forwards;
  pointer-events: none;
}

@keyframes basket-fold {
  to {
    opacity: 0;
    transform: translateX(1.5rem);
  }
}

/* ---------- What it comes to ---------- */

.total {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 2px solid rgba(169, 128, 63, 0.4);
  text-align: left;
}

.total__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin: 0;
}

.total__label {
  color: var(--gold-deep);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.total__value {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 2.75rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

/* Pointed at, the figure catches the light once (the homepage's glint). */
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .total__value {
    padding: 0.08em 0.1em 0.16em 0;
    margin: -0.08em -0.1em -0.16em 0;
    background: linear-gradient(100deg, var(--ink) 0%, var(--ink) 38%, #b8903f 50%, var(--ink) 62%, var(--ink) 100%) 100% 0 / 260% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }

  .total:hover .total__value {
    animation: em-glint 1.2s ease-in-out 1;
  }
}

.total__free {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.375rem 0 0;
  color: var(--gold-deep);
  font-size: 0.875rem;
  font-weight: 500;
}

.total__free .sleigh {
  width: 1.5rem;
  height: 1rem;
}

/* ---------- One thing more ----------
   The one extra the page suggests for the whole basket: an evergreen card on
   the cream, lit from above, with the picture in a gold ring, a line in
   plain words, and one button. */

.gift {
  margin-top: 1.5rem;
  text-align: left;
}

/* In a full basket the card comes after the way on and the foot: a little
   more air above it, so it reads as a postscript and not part of the sum. */
.basket-foot + .gift {
  margin-top: 2.25rem;
}

.gift__label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 0.75rem;
  color: var(--gold-deep);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.gift__label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(217, 178, 106, 0.6), rgba(217, 178, 106, 0));
}

.gift__card {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 1.25rem;
  padding: 1.25rem 1.5rem 1.25rem 1.25rem;
  overflow: hidden;
  border: 1px solid rgba(217, 178, 106, 0.45);
  border-radius: 1rem;
  background:
    radial-gradient(ellipse 60% 90% at 18% 0%, rgba(241, 213, 155, 0.2) 0%, rgba(241, 213, 155, 0) 70%),
    linear-gradient(135deg, #1f4432 0%, var(--evergreen) 60%, var(--night) 100%);
  color: var(--cream-text);
  box-shadow: 0 1.25rem 2.5rem -1.5rem rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.gift__card .twinkle {
  width: 0.875rem;
  height: 0.875rem;
  margin: -0.4375rem 0 0 -0.4375rem;
}

.gift__pic {
  display: grid;
  place-items: center;
  width: 4.5rem;
  height: 4.5rem;
  overflow: hidden;
  border: 2px solid var(--gold);
  border-radius: 50%;
  background: #fffefa;
  box-shadow: 0 0 0 0.25rem rgba(217, 178, 106, 0.18), 0 0 1.5rem rgba(241, 190, 100, 0.25);
}

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

.gift__words {
  min-width: 0;
}

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

.gift__text {
  margin: 0.375rem 0 0;
  color: var(--cream-muted);
  font-size: 0.9375rem;
  line-height: 1.45;
  text-wrap: pretty;
}

.gift__form {
  margin: 0;
}

.gift__add {
  min-height: 3rem;
  padding: 0 1.5rem;
  cursor: pointer;
}

/* Santa: the way to the journey that chooses the visit. */
.gift__buttons {
  display: grid;
  justify-items: center;
  gap: 0.5rem;
}

.gift__save {
  color: var(--gold-2);
  font-size: 0.75rem;
  font-weight: 500;
}

/* On its way: the button waits. */
.gift__add.is-busy {
  pointer-events: none;
  opacity: 0.75;
}

/* ---------- The way on, and the foot ---------- */

/* The checkout button, with the total beside it on phones (below). */
.basket-go {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.75rem;
}

.basket-go__total {
  display: none;
}

.basket-go__button {
  min-width: 18rem;
  min-height: 3.5rem;
  font-size: 1rem;
  cursor: pointer;
}

/* One sweep of light across it after it lands (the stage's, on the sign-in button). */
.basket-go__button::after {
  animation: tag-sweep 0.9s var(--ease) 2.1s 1 backwards;
}

.basket-foot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-top: 1.125rem;
}

/* Another tree: a quiet way back to the chooser under the way on. */
.basket-foot__more {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  color: var(--gold-deep);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(138, 101, 38, 0.35);
  transition: color 0.2s, border-color 0.2s;
}

.basket-foot__more:hover {
  color: var(--ink);
  border-color: var(--ink);
}

.basket-foot__more span {
  transition: transform 0.3s var(--ease);
}

.basket-foot__more:hover span {
  transform: translateX(0.25rem);
}

/* Three things good to know, in a row. */
.trust {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.375rem;
  margin: 0.25rem 0 0;
  padding: 0;
  list-style: none;
  color: var(--ink-muted);
  font-size: 0.8125rem;
  font-weight: 500;
}

.trust li {
  display: flex;
  align-items: center;
  gap: 0.4375rem;
}

.trust .sleigh,
.trust__glyph {
  flex: none;
  width: 1.25rem;
  height: 1.125rem;
  fill: none;
  stroke: var(--gold-deep);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.basket-foot__note {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.8125rem;
}

/* ---------- Nothing in it yet ----------
   Where the tree will stand: a lit window with the tree's outline drawing
   itself in gold and a star that twinkles above it; how far off Christmas
   Day is; the way to the chooser; two popular trees; then the Santa card. */

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.125rem;
  margin-top: 1.5rem;
}

.empty__scene {
  position: relative;
  display: grid;
  place-items: end center;
  width: 9.5rem;
  height: 11.5rem;
  overflow: hidden;
  border: 1px solid rgba(169, 128, 63, 0.45);
  border-radius: 1rem;
  background:
    radial-gradient(ellipse 80% 30% at 50% 100%, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0) 70%),
    radial-gradient(ellipse 60% 40% at 50% 12%, rgba(241, 213, 155, 0.35) 0%, rgba(241, 213, 155, 0) 70%),
    linear-gradient(180deg, #fffefa 0%, #f6efe0 100%);
  box-shadow: inset 0 1px 0 #fff, 0 0.75rem 1.5rem -0.75rem rgba(0, 0, 0, 0.3), 0 0 2rem rgba(241, 190, 100, 0.15);
}

/* The snow it will stand on. */
.empty__scene::after {
  content: "";
  position: absolute;
  right: 8%;
  bottom: -0.5rem;
  left: 8%;
  height: 1.125rem;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 -1px 0 rgba(169, 128, 63, 0.18);
}

.empty__tree {
  position: relative;
  z-index: 1;
  width: 62%;
  height: auto;
  margin-bottom: 0.625rem;
  overflow: visible;
}

/* The outline draws itself in once the tag has come down, and the green fills after. */
.empty__fir,
.empty__trunk {
  fill: rgba(47, 107, 69, 0.1);
  stroke: var(--gold);
  stroke-width: 1.5;
  stroke-linejoin: round;
  stroke-dasharray: 560;
  animation: basket-draw 1.8s var(--ease) 0.9s backwards;
}

.empty__trunk {
  fill: rgba(90, 67, 38, 0.18);
  stroke-dasharray: 60;
  animation-duration: 0.6s;
  animation-delay: 2.5s;
}

@keyframes basket-draw {
  from {
    stroke-dashoffset: 560;
    fill: transparent;
  }

  60% {
    fill: transparent;
  }
}

.empty__star {
  fill: #f1d59b;
  stroke: #d9b26a;
  stroke-width: 1;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 0.375rem rgba(241, 190, 100, 0.9));
  animation: basket-star-in 0.7s cubic-bezier(0.3, 1.45, 0.5, 1) 2.7s backwards;
}

@keyframes basket-star-in {
  from {
    opacity: 0;
    transform: translateY(0.5rem) scale(0.4);
  }
}

.empty__scene .twinkle {
  z-index: 2;
  width: 1.25rem;
  height: 1.25rem;
  margin: -0.625rem 0 0 -0.625rem;
  animation-delay: 3s, 0s;
}

.empty__days {
  margin: 0;
  color: var(--gold-deep);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.empty__go {
  min-width: 16rem;
  min-height: 3.5rem;
  font-size: 1rem;
}

/* One sweep of light across it after it lands. */
.empty__go::after {
  animation: tag-sweep 0.9s var(--ease) 2.1s 1 backwards;
}

.picks__label {
  margin: 0.75rem 0 -0.375rem;
  color: var(--gold-deep);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.picks {
  display: flex;
  justify-content: center;
  gap: 1rem;
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* A tree to tempt with: in its own lit window, with its name, kind and from-price. */
.pick {
  display: grid;
  justify-items: center;
  gap: 0.25rem;
  width: 12rem;
  padding: 0.875rem 0.75rem 1rem;
  border: 1px solid rgba(169, 128, 63, 0.45);
  border-radius: 1rem;
  background: #fffefa;
  color: var(--ink);
  text-decoration: none;
  box-shadow: 0 0.5rem 1.25rem -0.75rem rgba(0, 0, 0, 0.25);
  transition: border-color 0.25s, box-shadow 0.3s, transform 0.3s var(--ease);
}

.pick:hover {
  border-color: var(--gold-deep);
  box-shadow: 0 0 0 0.25rem rgba(217, 178, 106, 0.22), 0 1rem 1.75rem -0.75rem rgba(226, 180, 96, 0.8);
  transform: translateY(-3px);
}

.pick__window {
  position: relative;
  display: grid;
  place-items: end center;
  width: 6.5rem;
  height: 7.5rem;
  margin-bottom: 0.5rem;
  overflow: hidden;
  border: 1px solid rgba(169, 128, 63, 0.35);
  border-radius: 0.875rem;
  background:
    radial-gradient(ellipse 80% 30% at 50% 100%, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0) 70%),
    linear-gradient(180deg, #fffefa 0%, #f6efe0 100%);
  transition: box-shadow 0.35s;
}

.pick__window::after {
  content: "";
  position: absolute;
  right: 8%;
  bottom: -0.5rem;
  left: 8%;
  height: 1.125rem;
  border-radius: 50%;
  background: #fff;
}

.pick:hover .pick__window {
  box-shadow: 0 0 1.25rem rgba(241, 190, 100, 0.45);
}

.pick__window img {
  position: relative;
  z-index: 1;
  max-width: 82%;
  max-height: 84%;
  margin-bottom: 0.5rem;
  object-fit: contain;
  filter: drop-shadow(0 0.375rem 0.375rem rgba(0, 0, 0, 0.18));
}

.pick__name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1.2;
  text-align: center;
}

.pick__type {
  color: var(--ink-muted);
  font-size: 0.75rem;
}

.pick__from {
  margin-top: 0.125rem;
  color: var(--gold-deep);
  font-size: 0.9375rem;
  font-weight: 600;
}

.pick__go {
  display: inline-flex;
  gap: 0.25rem;
  margin-top: 0.375rem;
  color: var(--berry);
  font-size: 0.8125rem;
  font-weight: 600;
}

.pick__go span {
  transition: transform 0.3s var(--ease);
}

.pick:hover .pick__go span {
  transform: translateX(0.25rem);
}

/* Under the empty tag, only what is good to know. */
.basket-foot--empty {
  margin-top: 1.5rem;
}

/* ---------- Narrower desktops: the trees stand down ---------- */

@media (max-width: 1279.98px) {
  .basket .stage__tree {
    display: none;
  }
}

/* ---------- Shorter desktop windows ---------- */

@media (min-width: 1024px) and (max-height: 720px) {
  .basket-tag {
    padding: 2.625rem 2.5rem 2rem;
  }
}

/* =================================================================
   Tablets and phones (under 1024px): the stage's own rules take the
   header, the baubles and the trees; the tag keeps its width until the
   screen is narrower than it.
   ================================================================= */

@media (max-width: 1023.98px) {
  .basket-tag {
    padding: 2.75rem 2.25rem 2.25rem;
  }

  /* The way on stays at the foot of the screen, total beside it, until the
     end of the tag comes up to meet it. Kept inside the tag's hairline. */
  .basket-go {
    position: sticky;
    bottom: 0;
    z-index: 5;
    justify-content: space-between;
    gap: 1rem;
    margin: 1.5rem -1.5rem 0;
    padding: 0.75rem 1.5rem;
    border-top: 1px solid rgba(169, 128, 63, 0.35);
    background: var(--paper);
    box-shadow: 0 -0.75rem 1.5rem -0.75rem rgba(0, 0, 0, 0.3);
  }

  .basket-go__total {
    display: grid;
    line-height: 1.1;
  }

  .basket-go__total small {
    color: var(--gold-deep);
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
  }

  .basket-go__total b {
    font-family: var(--font-display);
    font-size: 1.625rem;
    font-weight: 400;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
  }

  .basket-go__button {
    min-width: 0;
    flex: 1;
    max-width: 20rem;
  }
}

/* =================================================================
   Phones (under 600px): the tag takes the screen's width; the price moves
   under the name, the card stacks.
   ================================================================= */

@media (max-width: 599.98px) {
  .basket-page {
    --tag-h: 34rem;
  }

  .basket-tag {
    padding: 2.75rem 1.125rem 1.5rem;
  }

  .slip {
    margin-top: 1.25rem;
    padding: 0.75rem 0.875rem 0.75rem 0.625rem;
  }

  /* The thing to do drops under the words. */
  .slip:has(.slip__act) {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .slip:has(.slip__act) .slip__mark {
    align-self: start;
    margin-top: 0.125rem;
  }

  .slip__undo,
  .slip__act {
    grid-column: 2;
    justify-self: start;
  }

  .lines {
    margin-top: 1.25rem;
  }

  .line {
    grid-template-columns: 4.25rem minmax(0, 1fr);
    gap: 0 0.875rem;
    padding: 1.375rem 0;
  }

  .line__window {
    width: 4.25rem;
    height: 5.5rem;
    border-radius: 0.75rem;
  }

  .line__ribbon {
    top: 1.5rem;
    left: -2rem;
    font-size: 0.5rem;
  }

  .line__sparks {
    top: 2.75rem;
    left: 2.125rem;
  }

  .line__what {
    gap: 0.5rem;
  }

  .line__head {
    flex-wrap: wrap;
    gap: 0.125rem 0.75rem;
  }

  .line__name {
    font-size: 1.3125rem;
  }

  .line__size {
    font-size: 0.9375rem;
  }

  .line__price {
    font-size: 1.4375rem;
  }

  .leaf {
    width: 2.5rem;
    height: 2.875rem;
  }

  .leaf b {
    font-size: 1.125rem;
  }

  .line__when strong {
    font-size: 0.875rem;
  }

  .line__when em {
    font-size: 0.75rem;
  }

  .extra {
    font-size: 0.875rem;
  }

  .line__foot {
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
  }

  .total__value {
    font-size: 2.25rem;
  }

  /* The card stacks: picture and words, then the button across. */
  .gift__card {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.875rem 1rem;
    padding: 1rem;
  }

  .gift__pic {
    width: 3.75rem;
    height: 3.75rem;
  }

  .gift__title {
    font-size: 1.3125rem;
  }

  .gift__text {
    font-size: 0.875rem;
  }

  .gift__form,
  .gift__buttons {
    grid-column: 1 / -1;
  }

  .gift__buttons {
    justify-items: stretch;
  }

  .gift__add {
    width: 100%;
  }

  .gift__save {
    text-align: center;
  }

  .basket-go {
    margin: 1.25rem -0.625rem 0;
    padding: 0.625rem 0.625rem;
    border-radius: 0.5rem;
  }

  .basket-go__total b {
    font-size: 1.5rem;
  }

  .basket-go__button {
    min-height: 3.125rem;
  }

  .basket-foot {
    gap: 0.875rem;
    margin-top: 1.25rem;
  }

  .basket-foot + .gift {
    margin-top: 1.75rem;
  }

  .trust {
    gap: 0.375rem 1rem;
    font-size: 0.75rem;
  }

  .empty__go {
    width: 100%;
  }

  .empty__scene {
    width: 8.5rem;
    height: 10.5rem;
  }

  .picks {
    gap: 0.75rem;
  }

  .pick {
    width: calc(50% - 0.375rem);
    padding: 0.75rem 0.5rem 0.875rem;
  }

  .pick__window {
    width: 5rem;
    height: 6rem;
  }

  .pick__name {
    font-size: 1.0625rem;
  }
}

/* The narrowest phones. */
@media (max-width: 359.98px) {
  .basket-tag {
    padding-right: 0.875rem;
    padding-left: 0.875rem;
  }

  .line {
    grid-template-columns: 3.75rem minmax(0, 1fr);
    gap: 0 0.75rem;
  }

  .line__window {
    width: 3.75rem;
    height: 4.875rem;
  }

  .line__sparks {
    left: 1.875rem;
  }

  .line__name {
    font-size: 1.1875rem;
  }

  /* A booking's part that can be taken off has a cross after its price
     (the widest row is "Photographer for the visit", with both): the row
     draws in a little, so the longest word of its name still fits beside
     them, and the column never grows wider than the tag to make room. */
  .line__what {
    grid-template-columns: minmax(0, 1fr);
  }

  .line__extras--parts .extra {
    gap: 0.375rem;
    font-size: 0.8125rem;
  }

  .line__extras--parts .extra__detail {
    font-size: inherit;
  }

  .line__extras--parts .extra__tick {
    width: 1.125rem;
    height: 1.125rem;
  }

}

/* ---------- Reduced motion ----------
   The stage's rules already stop the drop and the rise; here nothing lands,
   sparks or folds either. */

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

  .line__sparks,
  .extra__sparks {
    display: none;
  }

}

/* ---------- A Santa visit or a photo session (the Santa and photography journey) ----------
   The day as a leaf with the time beside it, the priced parts ticked, and
   who is coming folded under "Who's coming". (Santa Wizard session, 11 Oct.) */

.extra__detail {
  color: var(--ink-muted);
  font-size: 0.875rem;
}

.line__stale {
  margin: 0;
  padding: 0.5rem 0.75rem;
  border: 1px solid rgba(107, 26, 42, 0.3);
  border-radius: 0.5rem;
  background: rgba(107, 26, 42, 0.06);
  color: var(--berry);
  font-size: 0.875rem;
}

.line__stale a {
  color: var(--berry);
  font-weight: 600;
}

.line__who {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.875rem;
}

.line__who summary {
  display: inline-block;
  padding: 0.125rem 0;
  color: var(--gold-deep);
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: rgba(138, 101, 38, 0.4);
  text-underline-offset: 0.2em;
  list-style: none;
}

.line__who summary::-webkit-details-marker {
  display: none;
}

.line__who summary:hover {
  color: var(--berry);
}

.line__who ul {
  display: grid;
  gap: 0.25rem;
  margin: 0.5rem 0 0;
  padding: 0;
  list-style: none;
  line-height: 1.5;
}

.line__who strong {
  color: var(--ink);
  font-weight: 600;
}

/* The suggestion card without a picture of its own: a wrapped gift (gifts
   from Santa) or a camera (the photographer for the visit) drawn in gold on
   the sand circle. (Santa Wizard session.) */
.gift__pic--icon {
  display: grid;
  place-items: center;
  color: var(--gold-deep);
}

.gift__icon {
  width: 45%;
  height: 45%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linejoin: round;
}

/* ---------- The offer: a full price crossed out, and what the basket saves ----------
   A price that is an offer on a full price has the full price before it,
   small and crossed out by hand: a berry stroke, tilted, drawn across just
   after its line has risen. What the whole basket saves is on the page's one
   ribbon, under the total: berry cloth with stitched gold edges and
   swallowtail ends (the tree chooser's), which unrolls from its middle while
   the figure counts up (basket.js) and catches the light once. Everything
   here happens once as the page opens; nothing keeps running. */

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

.was::after {
  content: "";
  position: absolute;
  left: -0.2em;
  right: -0.2em;
  top: calc(50% + 0.1em);
  height: 0.09375rem;
  border-radius: 62.4375rem;
  background: var(--berry);
  transform: rotate(-7deg);
  transform-origin: 0 50%;
  animation: was-strike 0.5s var(--ease) calc(1.05s + var(--i, 0) * 0.07s) backwards;
}

@keyframes was-strike {
  from {
    transform: rotate(-7deg) scaleX(0);
  }
}

.extra__price .was {
  font-size: 0.8125rem;
}

/* The total: the full total crossed out beside it. */
.total__figures {
  display: inline-flex;
  align-items: baseline;
  gap: 0.875rem;
}

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

/* After the total has counted up (basket.js: 0.7s, then 0.65s). */
.was--total::after {
  animation-delay: calc(1.45s + var(--i, 0) * 0.07s);
}

/* The ribbon. */
.total__saving {
  display: flex;
  justify-content: center;
  margin: 1.25rem 0 0;
  filter: drop-shadow(0 0.3125rem 0.375rem rgba(74, 16, 29, 0.3));
}

.save-ribbon {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5625rem;
  min-width: 18rem;
  padding: 0.5625rem 2.25rem;
  color: #fff3d2;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  line-height: 1.2;
  white-space: nowrap;
  animation: ribbon-unroll 0.75s var(--ease) calc(1.25s + var(--i, 0) * 0.07s) backwards;
}

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

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

/* The glint that crosses the cloth once it has unrolled. */
.save-ribbon::after {
  background: linear-gradient(100deg, rgba(255, 243, 210, 0) 35%, rgba(255, 243, 210, 0.4) 50%, rgba(255, 243, 210, 0) 65%) no-repeat;
  background-size: 60% 100%;
  background-position: -150% 0;
  animation: ribbon-glint 1.1s ease-out calc(2.1s + var(--i, 0) * 0.07s) 1 both;
}

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

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

.save-ribbon__star {
  flex: none;
  width: 0.6875rem;
  height: 0.6875rem;
  fill: var(--gold-2);
}

@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;
  }
}

@keyframes saving-bump {
  40% {
    transform: scale(1.14);
  }
}

/* Which offer, and until when. */
.total__offer {
  margin: 0.625rem 0 0;
  color: var(--ink-muted);
  font-size: 0.8125rem;
  letter-spacing: 0.01em;
  text-align: center;
}

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

/* On the gold button of the one thing more: dark on gold. */
.gift__add .was {
  margin-right: 0.35em;
  color: rgba(42, 26, 9, 0.62);
  font-size: 0.9em;
}

.gift__add .was::after {
  background: var(--berry-deep);
  animation: none;
}

/* In the bar at the foot of small screens, under the total. */
.basket-go__save {
  color: var(--berry);
  font-size: 0.75rem;
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.3;
  white-space: nowrap;
}

/* On the empty tag: the offer named in a pill, before the way to the trees. */
.empty__offer {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  padding: 0.3125rem 0.9375rem 0.3125rem 0.75rem;
  border: 1px solid rgba(169, 128, 63, 0.5);
  border-radius: 62.4375rem;
  background: rgba(107, 26, 42, 0.05);
  color: var(--ink);
  font-size: 0.8125rem;
  line-height: 1.3;
}

.empty__offer .save-ribbon__star {
  fill: var(--gold-deep);
}

@media (max-width: 599.98px) {
  .was {
    font-size: 0.9375rem;
  }

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

  .total__figures {
    gap: 0.625rem;
  }

  .total__saving {
    margin-top: 1rem;
  }

  .save-ribbon {
    min-width: 0;
    width: 100%;
    max-width: 19rem;
    padding: 0.5rem 1.5rem;
    font-size: 0.875rem;
  }

  /* A booking's parts have long names ("Photography, 30 minutes · 5 edited
     photographs"): the full price goes above the price, to leave them room. */
  .line__extras--parts .extra__price {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-end;
    line-height: 1.2;
  }

  .line__extras--parts .extra__price .was {
    margin-right: 0;
  }
}
