/* Avent musical 2026: a winter night, a wall of 24 doors, one card per day. */

:root {
  --night-0: #05071a;
  --night-1: #090d24;
  --night-2: #17143d;
  --panel: #111232;
  --ink: #f5efe3;
  --muted: #b8b3cc;
  --line: rgba(245, 239, 227, 0.14);
  --gold: #e9c46a;
  --gold-glow: rgba(233, 196, 106, 0.45);

  /* The paint of the doors, for the look only. */
  --door-0: #b5562f;
  --door-1: #2f7d6d;
  --door-2: #a3264f;
  --door-3: #3e3f94;
  --door-4: #6d3b8e;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --r: 12px;

  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  padding: 0 max(16px, env(safe-area-inset-right)) max(env(safe-area-inset-bottom), 28px) max(16px, env(safe-area-inset-left));
  font: 400 1rem/1.5 var(--sans);
  color: var(--ink);
  background-color: var(--night-1);
  background-image:
    radial-gradient(60rem 40rem at 85% -10%, rgba(233, 196, 106, 0.1), transparent 60%),
    radial-gradient(50rem 50rem at 0% 110%, rgba(62, 63, 148, 0.35), transparent 60%),
    linear-gradient(180deg, var(--night-0), var(--night-1) 35%, var(--night-2));
  background-attachment: fixed;
  overflow-x: hidden;
}

.snow {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* ------------------------------------------------------------------ the snow switch */

.snow-switch {
  position: absolute;
  top: max(14px, env(safe-area-inset-top));
  left: max(16px, env(safe-area-inset-left));
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 14px 7px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(9, 13, 36, 0.6);
  color: var(--ink);
  font: 600 0.82rem/1 var(--sans);
  letter-spacing: 0.02em;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.snow-switch__track {
  position: relative;
  width: 44px;
  height: 24px;
  border-radius: 999px;
  background: rgba(245, 239, 227, 0.16);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.4);
  transition: background 0.3s;
}

.snow-switch__knob {
  position: absolute;
  top: 2px;
  left: 2px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
  transition: transform 0.35s cubic-bezier(0.3, 1.4, 0.5, 1);
}

.snow-switch__flake {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: var(--night-1);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.snow-switch[aria-checked="true"] .snow-switch__track {
  background: #8ecbff;
}

.snow-switch[aria-checked="true"] .snow-switch__knob {
  transform: translateX(20px) rotate(180deg);
}

.snow-switch:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

@media (hover: hover) {
  .snow-switch:hover {
    border-color: rgba(233, 196, 106, 0.5);
  }
}

.masthead,
main {
  position: relative;
  z-index: 1;
}

/* ------------------------------------------------------------------ header */

.masthead {
  max-width: 760px;
  margin: 0 auto;
  /* On a phone the title starts below the snow switch; on a wide screen, beside it. */
  padding: 62px 0 clamp(20px, 4vh, 36px);
  text-align: center;
}

@media (min-width: 1024px) {
  .masthead {
    padding-top: 30px;
  }
}

h1 {
  margin: 0 0 0.2em;
  font: 600 clamp(3rem, 11vw, 5.75rem) / 0.95 var(--serif);
  letter-spacing: -0.02em;
  text-wrap: balance; /* the title takes two lines: keep them even */
}

h1 em {
  font-weight: 400;
  color: var(--gold);
}

.lede {
  max-width: 34rem;
  margin: 0 auto 22px;
  font-size: clamp(1rem, 2.6vw, 1.12rem);
  color: var(--muted);
  text-wrap: pretty;
}

.status {
  display: inline-block;
  margin: 0;
  padding: 8px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(245, 239, 227, 0.04);
  font-size: 0.92rem;
  font-variant-numeric: tabular-nums;
}

.status.is-preview {
  border-color: var(--gold);
  color: var(--gold);
}

.status button {
  margin-left: 8px;
  padding: 2px 10px;
  border: 1px solid currentColor;
  border-radius: 999px;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

/* ------------------------------------------------------------------ the wall */

.wall {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 1040px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(10px, 2.4vw, 18px);
}

@media (min-width: 720px) {
  .wall {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

.door {
  --c: #4a4c70;
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  border-radius: var(--r);
  background: transparent;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  perspective: 650px;
  -webkit-tap-highlight-color: transparent;
}

.door[data-colour="0"] { --c: var(--door-0); }
.door[data-colour="1"] { --c: var(--door-1); }
.door[data-colour="2"] { --c: var(--door-2); }
.door[data-colour="3"] { --c: var(--door-3); }
.door[data-colour="4"] { --c: var(--door-4); }

.door:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}

/* What is behind the door: the cover, in a dark recess. */
.door__inside {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: var(--r);
  background: var(--night-0);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06), inset 0 10px 24px rgba(0, 0, 0, 0.6);
}

.door__cover {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.door__badge {
  position: absolute;
  right: 6px;
  bottom: 6px;
  min-width: 1.7em;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(5, 7, 26, 0.72);
  font: 600 0.72rem/1.4 var(--sans);
  text-align: center;
}

/* The leaf swings on its left hinge. */
.door__leaf {
  position: absolute;
  inset: 0;
  transform-origin: left center;
  transform-style: preserve-3d;
  transition: transform 0.75s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.door__front,
.door__back {
  position: absolute;
  inset: 0;
  border-radius: var(--r);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.door__front {
  display: grid;
  place-items: center;
  background:
    radial-gradient(120% 90% at 28% 12%, rgba(255, 255, 255, 0.2), transparent 55%),
    linear-gradient(160deg, color-mix(in srgb, var(--c) 92%, white), color-mix(in srgb, var(--c) 68%, black));
  background-color: var(--c); /* under the gradient: what an older phone without color-mix() shows */
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16), 0 12px 26px -14px rgba(0, 0, 0, 0.8);
  transition: filter 0.3s, box-shadow 0.3s;
}

/* The moulding and the knob, so that it reads as a door. */
.door__front::before {
  content: "";
  position: absolute;
  inset: 8%;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: calc(var(--r) - 5px);
}

.door__front::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 11%;
  width: 7%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff3c9, var(--gold) 55%, #8d6a22);
  transform: translateY(-50%);
}

.door__back {
  transform: rotateY(180deg);
  background: linear-gradient(160deg, color-mix(in srgb, var(--c) 45%, black), color-mix(in srgb, var(--c) 25%, black));
  background-color: #0b0d22; /* under the gradient: what an older phone without color-mix() shows */
}

/* The Christmas motif, painted in gold above the number. */
.door__motif {
  position: absolute;
  top: 11%;
  left: 50%;
  width: 22%;
  height: 22%;
  fill: none;
  stroke: var(--gold);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform: translateX(-50%);
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
}

.door__num {
  font: 600 clamp(1.5rem, 6.2vw, 2.7rem) / 1 var(--serif);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.door__tag {
  position: absolute;
  left: 50%;
  bottom: 13%;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(5, 7, 26, 0.45);
  font: 600 clamp(0.5rem, 1.6vw, 0.64rem) / 1.5 var(--sans);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  transform: translateX(-50%);
}

.door.is-locked {
  cursor: default;
}

.door.is-locked .door__front {
  filter: saturate(0.5) brightness(0.72);
}

.door.is-locked .door__front::after {
  filter: grayscale(1) brightness(0.8);
}

@media (hover: hover) {
  .door.is-ready:hover .door__leaf {
    transform: rotateY(-10deg);
  }
  .door.is-seen:hover .door__leaf {
    transform: rotateY(-80deg);
  }
}

.door.is-seen .door__leaf {
  transform: rotateY(-72deg);
}

.door.is-today .door__front {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2), 0 0 0 2px var(--gold), 0 0 30px 4px var(--gold-glow);
  animation: glow 2.8s ease-in-out infinite;
}

@keyframes glow {
  50% {
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2), 0 0 0 2px var(--gold), 0 0 44px 10px var(--gold-glow);
  }
}

.door.is-shaking {
  animation: shake 0.42s;
}

@keyframes shake {
  20% { transform: translateX(-5px) rotate(-1deg); }
  40% { transform: translateX(5px) rotate(1deg); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(2px); }
}

/* ------------------------------------------------------------------ the 25th: a present */

/* As wide as the wall, after the 24 doors: a berry-red box with a gold ribbon and bow. */
.wall__gift {
  grid-column: 1 / -1;
}

.gift {
  position: relative;
  display: flex;
  align-items: stretch;
  width: 100%;
  min-height: clamp(84px, 15vw, 128px);
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: var(--r);
  background:
    radial-gradient(90% 140% at 20% 0%, rgba(255, 255, 255, 0.18), transparent 60%),
    linear-gradient(160deg, #b8324f, #6e1530);
  background-color: #8f2340;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16), 0 12px 26px -14px rgba(0, 0, 0, 0.8);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: filter 0.3s;
}

.gift__bow {
  position: relative;
  display: grid;
  flex: none;
  place-items: center;
  width: clamp(84px, 20vw, 150px);
}

/* The ribbon, top to bottom, under the bow. */
.gift__bow::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: clamp(14px, 2.4vw, 20px);
  background: linear-gradient(90deg, #b8892f, var(--gold) 40%, #f6e2a6 55%, #b8892f);
  transform: translateX(-50%);
}

.gift__badge {
  position: relative;
  display: grid;
  place-items: center;
  width: clamp(44px, 9vw, 64px);
  aspect-ratio: 1;
  border: 2px solid var(--gold);
  border-radius: 50%;
  background: #7a1a35;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
}

.gift__motif {
  width: 58%;
  height: 58%;
  fill: none;
  stroke: var(--gold);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.gift__text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  padding: 14px 18px 14px 6px;
  min-width: 0;
}

.gift__num {
  font: 600 clamp(1.6rem, 6vw, 2.6rem) / 1 var(--serif);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.gift__line {
  font-size: clamp(0.84rem, 2.6vw, 1.02rem);
  font-weight: 600;
  color: rgba(245, 239, 227, 0.88);
}

.gift.is-locked {
  cursor: default;
  filter: saturate(0.5) brightness(0.72);
}

.gift.is-ready {
  animation: glow 2.8s ease-in-out infinite;
}

.gift.is-shaking {
  animation: shake 0.42s;
}

.gift:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}

@media (hover: hover) {
  .gift:not(.is-locked):hover {
    filter: brightness(1.07);
  }
}

/* Before the 25th: a hint where the present will be, and nothing more. */
.teaser {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 100%;
  min-height: clamp(72px, 12vw, 104px);
  padding: 14px 18px;
  border: 1px dashed rgba(233, 196, 106, 0.55);
  border-radius: var(--r);
  background: rgba(233, 196, 106, 0.06);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.teaser__motif {
  flex: none;
  width: clamp(28px, 6vw, 38px);
  height: clamp(28px, 6vw, 38px);
  fill: none;
  stroke: var(--gold);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  animation: twinkle 2.6s ease-in-out infinite;
}

@keyframes twinkle {
  50% {
    opacity: 0.45;
    transform: scale(0.88) rotate(-8deg);
  }
}

.teaser__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
}

.teaser__line {
  font: italic 600 clamp(1.05rem, 3.4vw, 1.3rem) / 1.2 var(--serif);
}

.teaser__hint {
  font-size: 0.86rem;
  color: var(--muted);
}

.teaser.is-shaking {
  animation: shake 0.42s;
}

.teaser:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}

.noscript {
  position: relative;
  z-index: 1;
  text-align: center;
}

/* ------------------------------------------------------------------ the card */

.card {
  width: min(820px, calc(100vw - 32px));
  max-height: calc(100vh - 32px); /* older phones without dvh */
  max-height: calc(100dvh - 32px);
  overscroll-behavior: contain; /* scrolling the card never scrolls the page behind it */
  padding: 0;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
  color: var(--ink);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.85);
}

/* The page stays put behind an open card (iOS Safari would scroll it). */
html:has(.card[open]) {
  overflow: hidden;
}

.card::backdrop {
  background: rgba(4, 5, 18, 0.72);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.card[open] {
  animation: rise 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
  }
}

.card__inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 720px) {
  .card__inner {
    grid-template-columns: minmax(0, 340px) minmax(0, 1fr);
  }
}

.card__close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(5, 7, 26, 0.7);
  color: var(--ink);
  cursor: pointer;
}

.card__close svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.card__media {
  position: relative;
  aspect-ratio: 1;
  max-height: 48vh;
  width: 100%;
  background: var(--night-0);
}

@media (min-width: 720px) {
  .card__media {
    max-height: none;
  }
}

/* Playing: the video takes the whole width of the card, at 16:9. */
.card.is-playing .card__media {
  grid-column: 1 / -1;
  aspect-ratio: 16 / 9;
  max-height: none;
}

.card__cover {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card.is-playing .card__cover {
  visibility: hidden;
}

.card__player {
  position: absolute;
  inset: 0;
}

.card__player iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.card__play {
  position: absolute;
  left: 50%;
  bottom: 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  background: rgba(5, 7, 26, 0.72);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: var(--ink);
  font: 600 0.92rem/1 var(--sans);
  white-space: nowrap;
  cursor: pointer;
  transform: translateX(-50%);
}

.card__play svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.card__body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 26px 26px 20px;
  min-width: 0;
}

.card__title {
  margin: 0;
  font: 600 clamp(1.6rem, 4.6vw, 2.2rem) / 1.08 var(--serif);
  overflow-wrap: anywhere;
}

/* Side by side with the cover, the title is the top line of the card: it keeps clear of the
   close button. On a phone the button sits over the cover instead. */
@media (min-width: 720px) {
  .card__title {
    margin-right: 44px;
  }
}

.card__artist {
  margin: 4px 0 0;
  font-size: 1.1rem;
}

.card__album {
  margin: 0;
  font-size: 0.92rem;
  color: var(--muted);
}

/* The genres, as a critic would file the track. */
.card__tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 14px 0 0;
  padding: 0;
}

.card__tags li {
  padding: 3px 10px;
  border-radius: 6px;
  background: rgba(233, 196, 106, 0.12);
  color: var(--gold);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

/* Who wrote it, who produced it. */
.card__credits {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 3px 12px;
  margin: 14px 0 4px;
  font-size: 0.86rem;
}

.card__credits div {
  display: contents;
}

.card__credits dt {
  color: var(--muted);
}

.card__credits dd {
  margin: 0;
}

.card__note {
  margin: 12px 0 0;
  padding-left: 12px;
  border-left: 2px solid var(--gold);
  font-style: italic;
  color: var(--muted);
}

/* One button per line, both the same width: 250px, or the whole line on a narrower phone.
   250px holds the longest label, "Chercher sur Spotify". */
.card__links {
  display: grid;
  grid-template-columns: min(100%, 250px);
  gap: 8px;
  margin-top: 18px;
}

.listen {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 46px; /* still a comfortable tap target */
  padding: 8px 14px;
  border-radius: 12px;
  font-weight: 650;
  line-height: 1.25;
  text-decoration: none;
  transition: transform 0.15s, filter 0.15s;
}

@media (hover: hover) {
  .listen:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
  }
}

.listen:focus-visible,
.ghost:focus-visible,
.card__play:focus-visible,
.card__close:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* The brands' own colours: Apple Music red, Spotify green (its logo goes black on green). */
.listen--apple {
  background: #fa243c;
  color: #fff;
}

.listen--spotify {
  background: #1ed760;
  color: #000;
}

.listen__icon {
  flex: none;
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.listen__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}


.card__nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

/* On a phone the three do not fit on one line: the arrows keep the first, sharing goes below. */
@media (max-width: 479px) {
  .card__share {
    order: 1;
    flex-basis: 100%;
  }
}

.ghost {
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: none;
  color: var(--ink);
  font: 500 0.88rem/1.2 var(--sans);
  cursor: pointer;
}

.ghost:hover:not(:disabled) {
  border-color: var(--gold);
}

.ghost:disabled {
  opacity: 0.35;
  cursor: default;
}

/* ------------------------------------------------------------------ toast */

.toast {
  position: fixed;
  left: 50%;
  bottom: max(env(safe-area-inset-bottom), 24px);
  z-index: 10;
  max-width: calc(100vw - 32px);
  padding: 11px 18px;
  border: 1px solid rgba(233, 196, 106, 0.4);
  border-radius: 999px;
  background: rgba(17, 18, 50, 0.96);
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.8);
  font-size: 0.92rem;
  text-align: center;
  transform: translateX(-50%);
}

/* ------------------------------------------------------------------ the present's card */

/* Four covers of the playlist, two by two, where a day shows its cover. */
.bonus__covers {
  display: grid;
  grid-template: 1fr 1fr / 1fr 1fr; /* four equal squares, also when a phone caps the height */
  overflow: hidden;
  background: linear-gradient(160deg, #b8324f, #6e1530);
}

.bonus__covers img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
}

/* Fewer than four covers: the berry-red box alone. */
.bonus__covers.is-empty img {
  display: none;
}

/* No playlist yet: a gold star on the berry-red box. */
.bonus__covers.is-empty::after {
  content: "★";
  grid-area: 1 / 1 / -1 / -1;
  place-self: center;
  font: 4rem/1 var(--serif);
  color: var(--gold);
}

.bonus__message p {
  margin: 12px 0 0;
  text-wrap: pretty;
}

.bonus__heading {
  margin: 22px 0 8px;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
}

.bonus__tracks {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: track;
}

.bonus__track {
  display: flex;
  flex-wrap: wrap; /* on a narrow phone the three links go under the title */
  align-items: center;
  gap: 6px 12px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
  counter-increment: track;
}

.bonus__track::before {
  content: counter(track);
  flex: none;
  width: 1.4em;
  font: 600 0.9rem/1 var(--serif);
  color: var(--gold);
}

.bonus__track-text {
  display: flex;
  flex: 1 1 110px; /* with the three links, fits a 390px phone; a narrower one puts them below */
  flex-direction: column;
  min-width: 0;
}

.bonus__track-title {
  font-weight: 600;
  line-height: 1.3;
}

.bonus__track-artist {
  font-size: 0.86rem;
  color: var(--muted);
}

.bonus__track-links {
  display: flex;
  gap: 6px;
  margin-left: auto;
}

.bonus__listen {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
}

.bonus__listen svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.bonus__listen--apple {
  background: #fa243c;
  color: #fff;
}

.bonus__listen--spotify {
  background: #1ed760;
  color: #000;
}

.bonus__listen--youtube {
  background: #ff0000;
  color: #fff;
}

.bonus__listen:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* ------------------------------------------------------------------ less motion */

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