/* =============================================
   ADVENTO KALENDORIUS
   The blue hour and snow: a deep twilight top with a golden straw
   garden, then a snow-white page with blue shadows. Builds on
   /styles.css and /blog/blog.css.
   ============================================= */

.adv {
  --adv-night-0: #081230;
  --adv-night-1: #0E1E47;
  --adv-night-2: #19346F;
  --adv-night-3: #34589F;
  --adv-dusk: #7C9AD6;
  --adv-gold: #EDBE4E;
  --adv-gold-light: #F9E29A;
  --adv-gold-ink: #6B4A00;
  --adv-red: #B3324A;
  --adv-red-deep: #8E2238;
  --adv-green: #2A7A56;
  --adv-green-deep: #17513B;
  --adv-snow-shade: #D5E2F6;
  --adv-on-night: #F4F7FC;
  --adv-soft-on-night: #C7D5F0;
  --adv-hills: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 160' preserveAspectRatio='none'%3E%3Cpath d='M0 58C180 14 360 14 540 46S860 98 1040 72 1260 102 1440 58V160H0Z'/%3E%3C/svg%3E");
  --adv-hills-far: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1100 160' preserveAspectRatio='none'%3E%3Cpath d='M0 70C120 110 250 96 380 52S640 8 760 40 980 30 1100 70V160H0Z'/%3E%3C/svg%3E");
}

html.adv-lock {
  overflow: hidden;
}

.adv-symbols {
  position: absolute;
}

.adv-nw {
  white-space: nowrap;
}

.adv-wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.adv-sec {
  position: relative;
  padding: clamp(72px, 9vw, 120px) 0;
  scroll-margin-top: 64px;
}

.adv-head {
  max-width: 720px;
  margin: 0 auto clamp(32px, 5vw, 56px);
  text-align: center;
}

.adv-head .b-lede {
  margin-left: auto;
  margin-right: auto;
}

.adv-pill-ziema {
  background: #DCEBFA;
  color: #24508F;
}

.adv-nojs {
  margin-top: 18px;
  color: var(--peach-ink);
  font-weight: 600;
}

.js .adv-nojs {
  display: none;
}

/* ---------- The menu over the night sky ---------- */
.adv .nav:not(.nav--scrolled) .nav__logo {
  color: #fff;
}

.adv .nav:not(.nav--scrolled) .nav__link {
  color: rgba(255, 255, 255, 0.84);
}

.adv .nav:not(.nav--scrolled) .nav__link:hover,
.adv .nav:not(.nav--scrolled) .nav__link--strong {
  color: #fff;
}

.adv .nav:not(.nav--scrolled) .nav__menu-btn span {
  background: #fff;
}

/* =============================================
   HERO
   ============================================= */
.adv-hero {
  position: relative;
  isolation: isolate;
  overflow: clip;
  min-height: clamp(720px, 100svh, 1040px);
  padding-top: var(--nav-h);
  color: var(--adv-on-night);
  background:
    linear-gradient(180deg, var(--adv-night-0) 0%, var(--adv-night-1) 26%, var(--adv-night-2) 58%, var(--adv-night-3) 84%, var(--adv-dusk) 100%);
}

.adv-hero__sky,
.adv-hero__stars,
.adv-hero__glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.adv-hero__sky {
  z-index: 0;
}

.adv-hero__stars {
  bottom: 34%;
  background-image:
    radial-gradient(1.3px 1.3px at 6% 14%, #fff 60%, transparent 62%),
    radial-gradient(1px 1px at 13% 46%, #dfe9ff 60%, transparent 62%),
    radial-gradient(1.6px 1.6px at 21% 9%, #fff 60%, transparent 62%),
    radial-gradient(1px 1px at 27% 31%, #fff 60%, transparent 62%),
    radial-gradient(1.2px 1.2px at 34% 62%, #cfdcff 60%, transparent 62%),
    radial-gradient(1px 1px at 41% 18%, #fff 60%, transparent 62%),
    radial-gradient(1.8px 1.8px at 48% 6%, #fff7dc 60%, transparent 62%),
    radial-gradient(1px 1px at 55% 38%, #fff 60%, transparent 62%),
    radial-gradient(1.2px 1.2px at 63% 12%, #dfe9ff 60%, transparent 62%),
    radial-gradient(1px 1px at 69% 52%, #fff 60%, transparent 62%),
    radial-gradient(1.5px 1.5px at 77% 22%, #fff 60%, transparent 62%),
    radial-gradient(1px 1px at 84% 44%, #cfdcff 60%, transparent 62%),
    radial-gradient(1.3px 1.3px at 91% 10%, #fff 60%, transparent 62%),
    radial-gradient(1px 1px at 96% 33%, #fff 60%, transparent 62%);
  opacity: 0.85;
}

.adv-hero__stars--b {
  background-image:
    radial-gradient(1px 1px at 3% 36%, #fff 60%, transparent 62%),
    radial-gradient(1.4px 1.4px at 10% 72%, #fff7dc 60%, transparent 62%),
    radial-gradient(1px 1px at 18% 24%, #fff 60%, transparent 62%),
    radial-gradient(1.2px 1.2px at 30% 82%, #dfe9ff 60%, transparent 62%),
    radial-gradient(1px 1px at 37% 4%, #fff 60%, transparent 62%),
    radial-gradient(1.5px 1.5px at 45% 55%, #fff 60%, transparent 62%),
    radial-gradient(1px 1px at 52% 26%, #cfdcff 60%, transparent 62%),
    radial-gradient(1.2px 1.2px at 59% 74%, #fff 60%, transparent 62%),
    radial-gradient(1px 1px at 66% 30%, #fff 60%, transparent 62%),
    radial-gradient(1.6px 1.6px at 73% 66%, #fff 60%, transparent 62%),
    radial-gradient(1px 1px at 81% 5%, #fff 60%, transparent 62%),
    radial-gradient(1.2px 1.2px at 88% 78%, #dfe9ff 60%, transparent 62%),
    radial-gradient(1px 1px at 94% 58%, #fff 60%, transparent 62%);
  animation: adv-twinkle 5.5s ease-in-out infinite alternate;
}

@keyframes adv-twinkle {
  from { opacity: 0.25; }
  to { opacity: 0.95; }
}

/* the last light on the horizon */
.adv-hero__glow {
  background:
    radial-gradient(120% 46% at 50% 100%, rgba(170, 196, 245, 0.55), transparent 70%);
}

.adv-hero__canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.adv-canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: pan-y;
  cursor: grab;
  opacity: 0;
  transition: opacity 0.9s ease;
  -webkit-tap-highlight-color: transparent;
}

.adv-canvas.is-grabbing {
  cursor: grabbing;
}

.is-live .adv-canvas,
.adv-sheet .adv-canvas {
  opacity: 1;
}

.adv-hero__inner {
  max-width: var(--container);
  min-height: calc(clamp(720px, 100svh, 1040px) - var(--nav-h));
  margin: 0 auto;
  padding: 0 var(--space-lg);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  grid-template-rows: minmax(16px, 0.7fr) auto auto minmax(190px, 1.3fr);
  grid-template-areas:
    ". stage"
    "top stage"
    "more stage"
    ". stage";
  column-gap: 32px;
  pointer-events: none;
}

.adv-hero__top,
.adv-hero__more {
  position: relative;
  z-index: 2;
}

.adv-hero__top > *,
.adv-hero__more > * {
  pointer-events: auto;
}

.adv-hero__top {
  grid-area: top;
}

.adv-hero__more {
  grid-area: more;
  --adv-more-text: var(--adv-soft-on-night);
  --adv-more-strong: #fff;
  --adv-more-field: rgba(255, 255, 255, 0.1);
  --adv-more-line: rgba(255, 255, 255, 0.28);
}

.adv-hero .crumbs {
  margin-bottom: 18px;
  color: var(--adv-soft-on-night);
}

.adv-hero .crumbs a:hover {
  color: #fff;
}

.adv-hero__meta {
  margin-bottom: 18px;
  color: var(--adv-soft-on-night);
}

.adv-hero__title {
  color: #fff;
  font-size: clamp(40px, 5vw, 70px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.02;
}

.adv-hero__eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 0.9em;
  color: var(--adv-gold-light);
  font-size: clamp(13px, 1.05vw, 15px);
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1.2;
  text-transform: uppercase;
}

.adv-hero__eyebrow::before {
  content: '';
  width: 0.72em;
  height: 0.72em;
  border-radius: 2px;
  background: var(--adv-gold);
  transform: rotate(45deg);
  box-shadow: 0 0 14px rgba(237, 190, 78, 0.8);
}

.adv-hero__title .serif-accent {
  display: inline-block;
  padding-right: 0.08em;
  font-size: 1.08em;
  color: var(--adv-gold-light);
  background: linear-gradient(100deg, #FFF1BF 0%, var(--adv-gold) 55%, #F7D67A 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.js .adv-hero__title .b-line:nth-child(2) .b-line__inner { animation-delay: 0.15s; }
.js .adv-hero__title .b-line:nth-child(3) .b-line__inner { animation-delay: 0.27s; }
.js .adv-hero__title .b-line:nth-child(4) .b-line__inner { animation-delay: 0.45s; }

.adv-hero__dek {
  max-width: 31em;
  margin-top: 22px;
  color: var(--adv-more-text);
  font-size: clamp(17px, 1.45vw, 20px);
  line-height: 1.55;
}

.adv-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  padding: 9px 16px 9px 12px;
  border: 1px solid var(--adv-more-line);
  border-radius: var(--radius-full);
  background: var(--adv-more-field);
  color: var(--adv-more-strong);
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.35;
}

.adv-status::before {
  content: '';
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: var(--adv-gold);
  transform: rotate(45deg);
  animation: adv-beat 2.4s ease-in-out infinite;
}

@keyframes adv-beat {
  0%, 100% { box-shadow: 0 0 0 0 rgba(237, 190, 78, 0.7); }
  50% { box-shadow: 0 0 0 7px rgba(237, 190, 78, 0); }
}

/* the elf's name (over the doors) */
.adv-namebox {
  --adv-more-text: var(--text-secondary);
  --adv-more-strong: var(--text);
  --adv-more-field: #fff;
  --adv-more-line: #C9D8EF;
  max-width: 440px;
  margin: calc(-1 * clamp(8px, 2vw, 20px)) auto clamp(30px, 4.6vw, 52px);
  text-align: center;
}

.adv-name {
  text-align: left;
}

.adv-name__label {
  display: block;
  margin-bottom: 8px;
  text-align: center;
  color: var(--adv-more-strong);
  font-size: 14px;
  font-weight: 700;
}

.adv-name__row {
  display: flex;
  gap: 8px;
}

.adv-name__input {
  flex: 1;
  min-width: 0;
  height: 48px;
  padding: 0 16px;
  border: 1.5px solid var(--adv-more-line);
  border-radius: var(--radius-full);
  background: var(--adv-more-field);
  color: var(--adv-more-strong);
  font: 600 16px/1 var(--font);
}

.adv-name__input::placeholder {
  color: var(--adv-more-text);
  opacity: 0.8;
}

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

.adv-name__dice,
.adv-name__ok {
  flex: none;
  height: 48px;
  border: 0;
  border-radius: var(--radius-full);
  font: 700 15px/1 var(--font);
  cursor: pointer;
  transition: transform 0.25s var(--ease-spring), background-color 0.2s ease;
}

.adv-name__dice {
  display: grid;
  place-items: center;
  width: 48px;
  border: 1.5px solid var(--adv-more-line);
  background: var(--adv-more-field);
  color: var(--adv-more-strong);
}

.adv-name__dice svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.adv-name__dice:hover svg {
  animation: adv-roll 0.5s var(--ease-out);
}

@keyframes adv-roll {
  to { transform: rotate(180deg); }
}

.adv-name__ok {
  padding: 0 20px;
  background: var(--adv-gold);
  color: #3B2900;
}

.adv-name__ok:hover,
.adv-name__dice:hover {
  transform: translateY(-2px);
}

.adv-named {
  color: var(--adv-more-text);
  font-size: 17px;
}

.adv-named b {
  color: var(--adv-more-strong);
}

.adv-named__edit {
  margin-left: 6px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.adv-hero__byline {
  justify-content: flex-start;
  margin-top: 26px;
  color: var(--adv-more-text);
}

.adv-hero__byline b {
  color: var(--adv-more-strong);
}

.adv-hero__byline .byline__text span {
  color: var(--adv-more-text);
}

.adv-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.adv-btn-gold {
  background: linear-gradient(180deg, var(--adv-gold-light), var(--adv-gold));
  color: #3B2900;
  box-shadow: 0 10px 30px rgba(237, 190, 78, 0.35);
}

.adv-btn-gold:hover {
  box-shadow: 0 14px 38px rgba(237, 190, 78, 0.5);
}

.adv-btn-ghost {
  border: 1.5px solid var(--adv-more-line);
  background: var(--adv-more-field);
  color: var(--adv-more-strong);
}

.adv-btn-ghost:hover {
  border-color: var(--adv-more-strong);
}

/* ---------- The stage: where the garden hangs ---------- */
.adv-hero__stage {
  grid-area: stage;
  position: relative;
  min-width: 0;
  margin-top: 8px;
}

/* snow under it: behind the garden, so its shadow lies on the hills */
.adv-hills {
  position: absolute;
  left: -100vw;
  right: -100vw;
  bottom: -1px;
  z-index: 0;
  /* a metre of the Christmas trees' world: the hills keep their shape under them at any width */
  --m: clamp(430px, 42vw, 600px);
  --hill: clamp(150px, 21vh, 220px);
  --near-w: calc(var(--m) * 2.4);
  --far-w: calc(var(--m) * 1.8333);
  --far-x: calc(var(--m) * 0.375);
  height: var(--hill);
  pointer-events: none;
}

.adv-hills__far,
.adv-hills__near {
  position: absolute;
  inset: 0;
  -webkit-mask: var(--adv-hills) repeat-x 50% 100% / var(--near-w) 100%;
  mask: var(--adv-hills) repeat-x 50% 100% / var(--near-w) 100%;
}

.adv-hills__far {
  top: -34%;
  bottom: 30%;
  background: linear-gradient(180deg, #8FA9DC, #B5C8EC);
  opacity: 0.75;
  -webkit-mask: var(--adv-hills-far) repeat-x calc(50% + var(--far-x)) 100% / var(--far-w) 100%;
  mask: var(--adv-hills-far) repeat-x calc(50% + var(--far-x)) 100% / var(--far-w) 100%;
}

.adv-hills__near {
  background: linear-gradient(180deg, #C7D7F3 0%, #DDE8F9 34%, var(--tone, #EEF5FD) 78%);
}

/* The Christmas trees on the hills: modelled for the post from the garden's own straw, felt, wool and
   wood, and photographed by its own renderer. The spruces stand behind the crest of the near hill, the
   presents and the lantern on its snow. Their numbers (--x metres from the middle of the stage, --s how
   high the snow is there, --t how tall the picture is in metres) come from the script named below. */
.adv-grove {
  position: absolute;
  inset: 0;
}

.adv-tree {
  position: absolute;
  left: calc(50% + var(--x) * var(--m));
  bottom: calc(var(--s) * var(--hill) - var(--down, 10px));
  height: calc(var(--t) * var(--m) * var(--k, 1));
  translate: -50% 0;
}

.adv-tree > img {
  display: block;
  width: 100%;
  height: 100%;
}

/* candle light: two layers of glow that breathe by turns */
.adv-tree > i {
  position: absolute;
  inset: 0;
  mix-blend-mode: screen;
  animation: adv-candle 3.4s ease-in-out infinite alternate;
}

.adv-tree > i + i {
  animation-duration: 4.6s;
  animation-delay: -2.1s;
}

@keyframes adv-candle {
  from { opacity: 0.5; }
  to { opacity: 1; }
}

/* the one standing further off takes the colour of the air */
.adv-tree--far > img {
  filter: brightness(0.8) saturate(0.8);
}

/* what stands on the near snow throws a little shadow on it */
.adv-grove--front .adv-tree::before {
  content: '';
  position: absolute;
  left: 2%;
  right: 2%;
  bottom: -6%;
  height: 18%;
  background: radial-gradient(closest-side, rgba(52, 88, 159, 0.36), rgba(52, 88, 159, 0));
}

/* GROVE: written by landing-web/blog/advento-kalendorius/scripts/place-trees.mjs */
.adv-tree--mazoji { aspect-ratio: 351 / 354; --t: 0.321; --x: -0.66; --s: 0.986; --down: 6px; --k: 0.75; }
.adv-tree--mazoji > i:nth-of-type(1) { background-image: radial-gradient(ellipse 19.4% 19.3% at 11.3% 68%, rgba(255, 248, 226, 1) 0, rgba(255, 226, 150, 0.9) 9%, rgba(255, 204, 112, 0.42) 26%, rgba(255, 190, 92, 0.14) 56%, rgba(255, 190, 92, 0) 100%); }
.adv-tree--mazoji > i:nth-of-type(2) { background-image: radial-gradient(ellipse 19.4% 19.3% at 66.2% 50.3%, rgba(255, 248, 226, 1) 0, rgba(255, 226, 150, 0.9) 9%, rgba(255, 204, 112, 0.42) 26%, rgba(255, 190, 92, 0.14) 56%, rgba(255, 190, 92, 0) 100%); }
.adv-tree--siaudine { aspect-ratio: 471 / 607; --t: 0.552; --x: -0.37; --s: 0.756; --down: 12px; }
.adv-tree--didzioji { aspect-ratio: 633 / 744; --t: 0.676; --x: 0.45; --s: 0.511; --down: 12px; }
.adv-tree--didzioji > i:nth-of-type(1) { background-image: radial-gradient(ellipse 10.8% 9.2% at 24.3% 47.1%, rgba(255, 248, 226, 1) 0, rgba(255, 226, 150, 0.9) 9%, rgba(255, 204, 112, 0.42) 26%, rgba(255, 190, 92, 0.14) 56%, rgba(255, 190, 92, 0) 100%), radial-gradient(ellipse 10.8% 9.2% at 44.6% 40.3%, rgba(255, 248, 226, 1) 0, rgba(255, 226, 150, 0.9) 9%, rgba(255, 204, 112, 0.42) 26%, rgba(255, 190, 92, 0.14) 56%, rgba(255, 190, 92, 0) 100%), radial-gradient(ellipse 10.8% 9.2% at 27.6% 45.8%, rgba(255, 248, 226, 1) 0, rgba(255, 226, 150, 0.9) 9%, rgba(255, 204, 112, 0.42) 26%, rgba(255, 190, 92, 0.14) 56%, rgba(255, 190, 92, 0) 100%); }
.adv-tree--didzioji > i:nth-of-type(2) { background-image: radial-gradient(ellipse 10.8% 9.2% at 88.4% 78.9%, rgba(255, 248, 226, 1) 0, rgba(255, 226, 150, 0.9) 9%, rgba(255, 204, 112, 0.42) 26%, rgba(255, 190, 92, 0.14) 56%, rgba(255, 190, 92, 0) 100%), radial-gradient(ellipse 10.8% 9.2% at 85.2% 64.3%, rgba(255, 248, 226, 1) 0, rgba(255, 226, 150, 0.9) 9%, rgba(255, 204, 112, 0.42) 26%, rgba(255, 190, 92, 0.14) 56%, rgba(255, 190, 92, 0) 100%), radial-gradient(ellipse 10.8% 9.2% at 63.5% 59.4%, rgba(255, 248, 226, 1) 0, rgba(255, 226, 150, 0.9) 9%, rgba(255, 204, 112, 0.42) 26%, rgba(255, 190, 92, 0.14) 56%, rgba(255, 190, 92, 0) 100%); }
.adv-tree--megzta-balta { aspect-ratio: 182 / 254; --t: 0.23; --x: -0.53; --s: 0.825; --down: 30px; }
.adv-tree--zibintas { aspect-ratio: 161 / 223; --t: 0.203; --x: -0.29; --s: 0.706; --down: 34px; }
.adv-tree--zibintas > i:nth-of-type(1) { background-image: radial-gradient(ellipse 42.4% 30.6% at 50.1% 62.3%, rgba(255, 248, 226, 1) 0, rgba(255, 226, 150, 0.9) 9%, rgba(255, 204, 112, 0.42) 26%, rgba(255, 190, 92, 0.14) 56%, rgba(255, 190, 92, 0) 100%); }
.adv-tree--megzta { aspect-ratio: 224 / 326; --t: 0.296; --x: -0.15; --s: 0.617; --down: 26px; }
.adv-tree--dovanos { aspect-ratio: 423 / 253; --t: 0.23; --x: 0.25; --s: 0.475; --down: 32px; }
.adv-tree--rogutes { aspect-ratio: 446 / 170; --t: 0.155; --x: 0.5; --s: 0.533; --down: 66px; }

@media (max-width: 1023px) {
  .adv-tree--mazoji { display: none; }
  .adv-tree--siaudine { --x: -0.4; --s: 0.66; --down: 8px; --k: 0.8; }
  .adv-tree--didzioji { --x: 0.39; --s: 0.477; --down: 8px; --k: 0.8; }
  .adv-tree--megzta-balta { --x: 0.53; --s: 0.476; --down: 16px; }
  .adv-tree--zibintas { --x: -0.49; --s: 0.692; --down: 24px; }
  .adv-tree--megzta { --x: -0.2; --s: 0.594; --down: 12px; --k: 0.85; }
  .adv-tree--dovanos { --x: 0.14; --s: 0.507; --down: 4px; --k: 0.8; }
  .adv-tree--rogutes { display: none; }
}
/* GROVE ends */

.adv-hero__halo {
  position: absolute;
  left: 50%;
  top: 40%;
  z-index: 0;
  width: min(150%, 760px);
  aspect-ratio: 1;
  translate: -50% -50%;
  background: radial-gradient(closest-side, rgba(255, 214, 130, 0.22), rgba(255, 214, 130, 0.08) 46%, transparent 72%);
  pointer-events: none;
}

.adv-hero__ghost {
  position: absolute;
  left: 50%;
  top: 12%;
  z-index: 0;
  height: 56%;
  translate: -50% 0;
  fill: none;
  stroke: rgba(249, 226, 154, 0.5);
  stroke-width: 1.6;
  stroke-linejoin: round;
  animation: adv-ghost 2.2s ease-in-out infinite alternate;
  transition: opacity 0.6s ease;
}

@keyframes adv-ghost {
  from { opacity: 0.25; }
  to { opacity: 0.8; }
}

.is-live .adv-hero__ghost {
  opacity: 0;
  animation: none;
}

.adv-bubble {
  position: absolute;
  left: 58%;
  top: 30%;
  z-index: 2;
  max-width: 180px;
  padding: 9px 14px;
  border-radius: 16px 16px 16px 4px;
  background: #fff;
  color: var(--text);
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.3;
  box-shadow: 0 10px 30px rgba(8, 18, 48, 0.35);
  pointer-events: none;
}

.adv-bubble.is-in {
  animation: adv-pop 0.4s var(--ease-spring) both;
}

@keyframes adv-pop {
  from { opacity: 0; scale: 0.6; translate: 0 8px; }
}

.adv-turn {
  position: absolute;
  left: 50%;
  bottom: 14px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 12px;
  translate: -50% 0;
  white-space: nowrap;
}

.adv-turn[hidden] {
  display: none;
}

.adv-turn__hint {
  color: #3E5C94;
  font-size: 13px;
  font-weight: 600;
}

.adv-turn__btn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1.5px solid rgba(53, 101, 176, 0.3);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.82);
  color: var(--primary-dark);
  cursor: pointer;
  transition: transform 0.25s var(--ease-spring), background-color 0.2s ease;
}

.adv-turn__btn:hover {
  background: #fff;
  transform: scale(1.08);
}

.adv-turn__btn svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* =============================================
   THE CALENDAR
   ============================================= */
/* a touched hung thing swings back and forth a couple of times before it rests (calendar and shelf) */
.adv-cal,
.adv-shelf {
  --adv-swing: linear(0, 0.198 3%, 0.461 6%, 0.736 8%, 0.98 11%, 1.166 14%, 1.281 17%, 1.327 19%, 1.314 22%, 1.259 25%, 1.181 28%, 1.096 31%, 1.018 33%, 0.958 36%, 0.919 39%, 0.901 42%, 0.902 44%, 0.917 47%, 0.94 50%, 0.966 53%, 0.99 56%, 1.01 58%, 1.023 61%, 1.03 64%, 1.031 67%, 1.027 69%, 1.02 72%, 1.012 75%, 1.004 78%, 0.998 81%, 0.993 83%, 0.991 86%, 0.991 89%, 0.992 92%, 0.993 94%, 0.996 97%, 1);
}

/* The section, its wrap and the net each carry one of the three pendulums of js/motion.js (data-sway
   "2", "3" and "1"); every door mixes the three in its own measure, so no two doors swing alike */
.adv-cal {
  --sw2: var(--sway, 0);
  overflow: clip;
}

.adv-cal > .adv-wrap {
  --sw3: var(--sway, 0);
}

/* The room around the net (--p from js/motion.js): the garden's shadow turns slowly on the white wall
   as the section scrolls past, and straw stars hang from above on red threads */
.adv-cal__room {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.adv-cal__room::before,
.adv-cal__room::after {
  content: '';
  position: absolute;
  width: clamp(220px, 30vw, 420px);
  aspect-ratio: 3 / 4;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 320' fill='none' stroke='%23C3D4F0' stroke-width='5' stroke-linejoin='round'%3E%3Cpath d='M120 0v36M120 36 216 160 120 284 24 160ZM24 160l96 30 96-30M120 36v248M24 160l96-26 96 26M24 160v30M24 190l22 30-22 30-22-30ZM216 160v30M216 190l22 30-22 30-22-30ZM120 284v14'/%3E%3C/svg%3E") center / contain no-repeat;
  filter: blur(5px);
  opacity: 0.55;
  transform: translateY(var(--rise)) rotate(var(--lean)) scaleX(cos(var(--turn)));
}

.adv-cal__room::before {
  --turn: calc((var(--p, 0.5) - 0.5) * 300deg + 20deg);
  --lean: calc((var(--p, 0.5) - 0.5) * 6deg);
  --rise: calc((var(--p, 0.5) - 0.5) * -80px);
  right: -4%;
  top: 2%;
}

.adv-cal__room::after {
  --turn: calc((var(--p, 0.5) - 0.5) * -240deg + 50deg);
  --lean: calc((var(--p, 0.5) - 0.5) * -5deg);
  --rise: calc((var(--p, 0.5) - 0.5) * -36px);
  left: -6%;
  bottom: 4%;
  opacity: 0.4;
}

/* a straw star on its red thread: the thread swings from the top edge, the star turns on it */
.adv-cal__star {
  --len: 90px;
  --size: 32px;
  position: absolute;
  top: 0;
  width: var(--size);
  height: calc(var(--len) + var(--size));
  transform-origin: 50% 0;
  rotate: calc(var(--sway, 0) * 8deg);
}

.adv-cal__star::before {
  content: '';
  position: absolute;
  left: calc(50% - 0.75px);
  top: 0;
  width: 1.5px;
  height: calc(var(--len) + 6px);
  background: linear-gradient(rgba(179, 50, 74, 0), rgba(179, 50, 74, 0.7) 45%);
}

.adv-cal__star::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: var(--size);
  aspect-ratio: 1;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-20 -20 40 40' fill='none' stroke-linecap='round'%3E%3Cpath stroke='%23B98A22' stroke-width='3.4' d='M0-18.5V18.5M-18.5 0H18.5M-9.4-9.4 9.4 9.4M-9.4 9.4 9.4-9.4'/%3E%3Cpath stroke='%23F3CF6B' stroke-width='1.5' d='M0-17.6V17.6M-17.6 0H17.6M-8.8-8.8 8.8 8.8M-8.8 8.8 8.8-8.8'/%3E%3Ccircle r='3.1' fill='%23B3324A'/%3E%3C/svg%3E") center / contain no-repeat;
  transform: scaleX(cos(calc(var(--p, 0.5) * var(--spin) + var(--from))));
}

.adv-cal__star--a { --len: 96px; --size: 46px; --spin: 480deg; --from: 10deg; left: 7%; }
.adv-cal__star--b { --len: 196px; --size: 34px; --spin: -420deg; --from: 70deg; left: 15%; }
.adv-cal__star--c { --len: 150px; --size: 52px; --spin: 380deg; --from: -30deg; right: 8%; }
.adv-cal__star--d { --len: 70px; --size: 36px; --spin: -540deg; --from: 40deg; right: 17%; }

/* narrower: two stars only, high enough to keep clear of the heading */
@media (max-width: 1099px) {
  .adv-cal__star--b,
  .adv-cal__star--d {
    display: none;
  }

  .adv-cal__star--a { --len: 26px; --size: 38px; left: 6%; }
  .adv-cal__star--c { --len: 46px; --size: 42px; right: 7%; }
}

@media (max-width: 639px) {
  .adv-cal__star--a { --len: 18px; --size: 30px; left: 5%; }
  .adv-cal__star--c { --len: 34px; --size: 34px; right: 6%; }
}

/* The elf's name tag: cream paper tied on with a red thread; it straightens up while being written on */
.adv-namebox {
  --eye: 27px 50%;
  position: relative;
  isolation: isolate;
  max-width: 468px;
  padding: 16px 20px 18px 56px;
  rotate: -0.8deg;
  filter: drop-shadow(0 10px 14px rgba(36, 75, 135, 0.12)) drop-shadow(0 1px 1px rgba(36, 75, 135, 0.12));
}

.adv-cal .adv-namebox {
  transition:
    opacity 0.9s var(--ease-out) var(--rd, 0s),
    translate 0.9s var(--ease-out) var(--rd, 0s),
    scale 0.9s var(--ease-out) var(--rd, 0s),
    rotate 0.9s var(--adv-swing);
}

.adv-namebox:focus-within {
  rotate: 0deg;
}

.adv-namebox::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at var(--eye), rgba(237, 190, 78, 0) 6.5px, rgba(205, 160, 60, 0.75) 7px 8.6px, rgba(237, 190, 78, 0) 9.2px),
    repeating-linear-gradient(90deg, rgba(237, 190, 78, 0.5) 0 6px, transparent 6px 11px) 52px calc(100% - 7px) / calc(100% - 64px) 1.5px no-repeat,
    linear-gradient(160deg, #FFFDF6, #FAF0D8);
  clip-path: polygon(18px 0, 100% 0, 100% 100%, 18px 100%, 0 calc(100% - 18px), 0 18px);
  -webkit-mask: radial-gradient(circle at var(--eye), transparent 6.5px, #000 7px);
  mask: radial-gradient(circle at var(--eye), transparent 6.5px, #000 7px);
}

/* the thread: through the hole, knotted, its two ends loose */
.adv-namebox::after {
  content: '';
  position: absolute;
  left: -30px;
  top: calc(50% - 26px);
  width: 64px;
  height: 52px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 52' fill='none' stroke='%23B3324A' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M57 26C49 18 41 20 33 24M57 26C49 34 41 32 33 28'/%3E%3Cpath d='M33 24C25 20 17 9 7 6M33 28C27 32 20 41 11 45'/%3E%3Ccircle cx='33' cy='26' r='3.2' fill='%238E2238' stroke='none'/%3E%3Ccircle cx='6' cy='6' r='2.8' fill='%23B3324A' stroke='none'/%3E%3Ccircle cx='10' cy='46' r='2.8' fill='%23B3324A' stroke='none'/%3E%3C/svg%3E") center / contain no-repeat;
  pointer-events: none;
}

/* on a phone the field needs the whole width: the hole moves up into the corner beside the question
   and the thread leaves it upwards */
@media (max-width: 639px) {
  .adv-namebox {
    --eye: 20px 20px;
    padding: 14px 14px 16px;
  }

  .adv-namebox::before {
    background-position: 0 0, 16px calc(100% - 7px), 0 0;
    background-size: auto, calc(100% - 32px) 1.5px, auto;
  }

  .adv-namebox::after {
    left: -37px;
    top: -6px;
    transform: rotate(50deg) scale(0.78);
    transform-origin: 57px 26px;
  }
}

.adv-doors {
  --sw1: var(--sway, 0);
  --cols: 8;
  --rows: 11;
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  grid-template-rows: repeat(var(--rows), minmax(0, 1fr));
  aspect-ratio: var(--cols) / var(--rows);
  max-width: 460px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

/* the net hangs in snow light, warmest behind the 24th */
.adv-doors::before {
  content: '';
  position: absolute;
  inset: -12% -9% -9%;
  z-index: -1;
  background:
    radial-gradient(28% 32% at 50% 80%, rgba(249, 226, 154, 0.34), rgba(249, 226, 154, 0)),
    radial-gradient(50% 50% at 50% 50%, rgba(213, 226, 246, 0.62), rgba(213, 226, 246, 0));
  pointer-events: none;
  transition: opacity 1.2s ease 0.15s;
}

/* The net comes in door by door, not as one block: the knots first, then each door drops onto its
   knot and swings itself out (--w: when the wave reaches it) */
.js .adv-doors[data-reveal] {
  opacity: 1;
  translate: none;
}

.js .adv-doors:not(.is-in)::before,
.js .adv-doors:not(.is-in) .adv-door__hang,
.js .adv-doors:not(.is-in) .adv-door::after {
  opacity: 0;
}

.js .adv-doors:not(.is-in) .adv-door::before {
  scale: 0;
}

.js .adv-doors.is-in .adv-door__hang {
  animation: adv-door-land 0.8s ease-in-out calc(0.1s + var(--w, 0) * 0.42s) both;
}

@keyframes adv-door-land {
  0% { opacity: 0; transform: translateY(var(--drop, -30%)) rotate(calc(var(--s) * -10deg)); animation-timing-function: cubic-bezier(0.55, 0, 0.85, 0.45); }
  14% { opacity: 1; }
  30% { transform: translateY(0) rotate(calc(var(--s) * 7deg)); }
  50% { transform: translateY(0) rotate(calc(var(--s) * -4deg)); }
  68% { transform: translateY(0) rotate(calc(var(--s) * 2.2deg)); }
  84% { transform: translateY(0) rotate(calc(var(--s) * -0.8deg)); }
  100% { opacity: 1; transform: translateY(0) rotate(0deg); }
}

/* A door hangs from its knot (the top of its cell): the scrolling sways it (three pendulums mixed by
   --a --b --c), a touch pushes it (the hang turns), today's door glows */
.adv-door {
  --a: 1;
  --b: 0.9;
  --c: 0.8;
  --s: 1;
  --amp: 1.8deg;
  position: relative;
  min-width: 0;
  min-height: 0;
  transform-origin: 50% 0;
  rotate: calc((var(--sw1, 0) * var(--a) + var(--sw2, 0) * var(--b) + var(--sw3, 0) * var(--c)) * var(--amp));
  pointer-events: none;
}

.adv-door:nth-child(3n + 1) { --a: 1.3; }
.adv-door:nth-child(3n + 2) { --a: 0.7; }
.adv-door:nth-child(4n + 1) { --b: 0.6; }
.adv-door:nth-child(4n + 2) { --b: 1.2; }
.adv-door:nth-child(4n + 3) { --b: 0.75; }
.adv-door:nth-child(5n + 1) { --c: 1.1; }
.adv-door:nth-child(5n + 2) { --c: 0.5; }
.adv-door:nth-child(5n + 4) { --c: 1.2; }
.adv-door:nth-child(even) { --s: -1; }
.adv-door:nth-child(6n + 3) { --s: -1; }
.adv-door.is-locked { --amp: 1.4deg; }

.adv-door.adv-door--last {
  --a: 0.6;
  --b: 0.45;
  --c: 0.3;
  --drop: -20%;
}

@media (prefers-reduced-motion: no-preference) {
  .js .adv-door {
    will-change: rotate;
  }
}

/* a red wooden bead where the doors are tied together */
.adv-door::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  z-index: 1;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #E07A8E, var(--adv-red) 46%, var(--adv-red-deep));
  translate: -50% -50%;
  box-shadow: 0 1px 2px rgba(60, 10, 20, 0.35);
  transition: scale 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) calc(var(--w, 0) * 0.42s);
}

.adv-door__hang {
  position: absolute;
  inset: 0;
  transform-origin: 50% 0;
  transition: rotate 1.2s var(--adv-swing);
}

.adv-door:is(.is-ready, .is-open) .adv-door__hang:hover {
  rotate: calc(var(--s) * 3deg);
}

.adv-door:is(.is-ready, .is-open) .adv-door__hang:has(> .adv-door__btn:focus-visible) {
  rotate: calc(var(--s) * 3deg);
}

.adv-door__btn {
  position: absolute;
  inset: 16.6%;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 14%;
  background: var(--door-pale, linear-gradient(135deg, #F0F5FD, #DBE6F8));
  color: var(--door-ink, #3F64A6);
  box-shadow: inset 0 0 0 1.5px var(--door-line, rgba(95, 135, 191, 0.3)), 0 8px 18px rgba(36, 75, 135, 0.1);
  transform: rotate(45deg);
  cursor: pointer;
  pointer-events: auto;
  transition: transform 0.4s var(--ease-spring), box-shadow 0.3s ease, background-color 0.3s ease;
  -webkit-tap-highlight-color: transparent;
}

.adv-door__btn:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
}

/* touched: it comes a little closer; pressed: it gives way */
.adv-door:is(.is-ready, .is-open) .adv-door__btn:is(:hover, :focus-visible) {
  transform: rotate(45deg) scale(1.07);
}

.adv-door:is(.is-ready, .is-open) .adv-door__btn:active {
  transform: rotate(45deg) scale(0.94);
  transition-duration: 0.12s;
}

.adv-door__face {
  display: grid;
  justify-items: center;
  gap: 1px;
  transform: rotate(-45deg);
  line-height: 1;
}

.adv-door__num {
  font-family: var(--serif);
  font-size: clamp(19px, 5.4vw, 26px);
  font-style: italic;
  font-weight: 600;
}

.adv-door__icon {
  width: clamp(13px, 3.4vw, 16px);
  height: clamp(13px, 3.4vw, 16px);
  fill: none;
  stroke: currentColor;
  stroke-width: 3.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.75;
}

/* asleep */
.adv-door.is-locked .adv-door__btn {
  cursor: default;
}

/* waiting to be opened */
.adv-door.is-ready .adv-door__btn {
  background: linear-gradient(135deg, #FBE9A9, var(--adv-gold));
  color: #4A3300;
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.55), 0 10px 22px rgba(190, 140, 20, 0.3);
}

.adv-door.is-ready .adv-door__icon {
  display: none;
}

.adv-door.is-ready .adv-door__num {
  font-size: clamp(22px, 6.4vw, 31px);
}

.adv-door.is-ready .adv-door__btn:is(:hover, :focus-visible) {
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.65), 0 16px 30px rgba(190, 140, 20, 0.36);
}

/* Today's door is the star of the net: it breathes, a warm light behind the net shines through the
   cracks around it, a ring of light goes out from it under its neighbours and straw sparkles glint
   on its face. It lies under its neighbours so that the light never washes over their faces; only the
   keyboard brings it to the front, so its focus ring shows whole. */
.adv-door.is-today {
  z-index: -1;
}

/* the door being pointed at, or focused, comes in front of its neighbours */
.adv-door:is(.is-ready, .is-open):not(.is-today):hover {
  z-index: 3;
}

.adv-door:has(.adv-door__btn:focus-visible) {
  z-index: 3;
}

.adv-door.is-today .adv-door__btn {
  animation: adv-today 3.2s ease-in-out infinite;
}

@keyframes adv-today {
  0%, 100% { scale: 1; }
  50% { scale: 1.045; }
}

/* a white running stitch just inside its edge marks it even standing still */
.adv-door.is-today .adv-door__btn::before {
  content: '';
  position: absolute;
  inset: 7%;
  border: 1.5px dashed rgba(255, 255, 255, 0.85);
  border-radius: inherit;
  pointer-events: none;
}

.adv-door.is-today::after {
  content: '';
  position: absolute;
  inset: -42%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 238, 178, 1), rgba(246, 208, 106, 0.85) 46%, rgba(237, 190, 78, 0.3) 72%, rgba(237, 190, 78, 0) 100%);
  animation: adv-halo 3.2s ease-in-out infinite;
  transition: opacity 0.8s ease 0.75s;
  pointer-events: none;
}

@keyframes adv-halo {
  0%, 100% { scale: 0.84; }
  50% { scale: 1.06; }
}

.adv-door.is-today .adv-door__btn::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: inherit;
  box-shadow: 0 0 0 2px rgba(249, 226, 154, 0.95), 0 0 14px rgba(237, 190, 78, 0.5);
  opacity: 0;
  animation: adv-ring 2.6s cubic-bezier(0.22, 1, 0.36, 1) 1.2s infinite;
  pointer-events: none;
}

@keyframes adv-ring {
  0% { opacity: 0.9; scale: 1; }
  70%, 100% { opacity: 0; scale: 1.3; }
}

/* the glints sit on the door's own face, near its edges and corners (the cell's corners belong to
   the neighbours' faces) */
.adv-door.is-today .adv-door__hang::before,
.adv-door.is-today .adv-door__hang::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-10 -10 20 20'%3E%3Cpath fill='%23FFF3C4' d='M0-10L.5-1.2 4.2-4.2 1.2-.5 10 0 1.2.5 4.2 4.2.5 1.2 0 10-.5 1.2-4.2 4.2-1.2.5-10 0-1.2-.5-4.2-4.2-.5-1.2Z'/%3E%3Ccircle r='1.7' fill='%23FFFFFF'/%3E%3C/svg%3E") 21% 21% / 20% no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-10 -10 20 20'%3E%3Cpath fill='%23FFF3C4' d='M0-10L.5-1.2 4.2-4.2 1.2-.5 10 0 1.2.5 4.2 4.2.5 1.2 0 10-.5 1.2-4.2 4.2-1.2.5-10 0-1.2-.5-4.2-4.2-.5-1.2Z'/%3E%3Ccircle r='1.7' fill='%23FFFFFF'/%3E%3C/svg%3E") 90% 52% / 14% no-repeat;
  filter: drop-shadow(0 0 2px rgba(190, 130, 10, 0.55));
  opacity: 0;
  animation: adv-sparkle 2.8s ease-in-out 1s infinite;
  pointer-events: none;
}

.adv-door.is-today .adv-door__hang::after {
  background-position: 57% 10%, 26% 79%;
  background-size: 15%, 17%;
  animation-delay: 2.4s;
}

@keyframes adv-sparkle {
  0%, 100% { opacity: 0; rotate: -6deg; }
  40%, 55% { opacity: 1; rotate: 0deg; }
}

/* already in the garden: a little lit window, the piece hanging inside */
.adv-door.is-open .adv-door__btn {
  background: linear-gradient(135deg, var(--adv-night-3), var(--adv-night-1));
  color: var(--adv-gold-light);
  box-shadow: inset 0 0 0 2px var(--adv-gold), 0 8px 18px rgba(14, 30, 71, 0.24), 0 0 20px rgba(237, 190, 78, 0.16);
}

.adv-door.is-open .adv-door__btn::before {
  content: '';
  position: absolute;
  inset: 6%;
  z-index: -1;
  border-radius: inherit;
  background: radial-gradient(closest-side, rgba(255, 214, 120, 0.46), rgba(255, 214, 120, 0.12) 62%, rgba(255, 214, 120, 0) 100%);
  animation: adv-window 4.8s ease-in-out infinite;
  animation-delay: calc(var(--a) * -2.3s + var(--c) * -1.1s);
  pointer-events: none;
}

@keyframes adv-window {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

.adv-door.is-open .adv-door__btn:is(:hover, :focus-visible) {
  box-shadow: inset 0 0 0 2px var(--adv-gold-light), 0 16px 30px rgba(14, 30, 71, 0.3), 0 0 26px rgba(237, 190, 78, 0.3);
}

.adv-door.is-open .adv-door__icon {
  order: -1;
  width: clamp(24px, 6.6vw, 34px);
  height: clamp(24px, 6.6vw, 34px);
  stroke-width: 2.4;
  opacity: 1;
}

.adv-door.is-open .adv-door__num {
  font-size: clamp(13px, 3.4vw, 16px);
  color: var(--adv-gold-light);
}

.adv-door__pic {
  order: -1;
  width: clamp(42px, 11.6vw, 58px);
  height: auto;
  margin: -7px 0 -4px;
  aspect-ratio: 1;
  object-fit: contain;
  filter: drop-shadow(0 3px 5px rgba(4, 10, 30, 0.45));
  pointer-events: none;
  transform-origin: 50% 4%;
  rotate: calc((var(--sw3, 0) * 3.4 - var(--sw1, 0) * 2.2) * var(--c) * 1deg);
}

@media (prefers-reduced-motion: no-preference) {
  .js .adv-door__pic {
    will-change: rotate;
  }
}

.adv-door__pic ~ .adv-door__icon {
  display: none;
}

.adv-door--last .adv-door__pic {
  width: clamp(76px, 20vw, 104px);
}

.adv-door.is-shaking .adv-door__btn {
  animation: adv-shake 0.5s ease;
}

@keyframes adv-shake {
  20% { transform: rotate(39deg); }
  45% { transform: rotate(50deg); }
  70% { transform: rotate(42deg); }
}

/* the 24th: Kūčios, the biggest door */
.adv-door--last .adv-door__btn {
  inset: 15.6%;
  border-radius: 11%;
}

.adv-door--last.is-locked .adv-door__btn {
  background: linear-gradient(135deg, var(--adv-night-3), var(--adv-night-1));
  color: var(--adv-gold-light);
  box-shadow: inset 0 0 0 2px rgba(249, 226, 154, 0.55), 0 16px 34px rgba(14, 30, 71, 0.28);
}

.adv-door--last .adv-door__num {
  font-size: clamp(34px, 10vw, 54px);
}

.adv-door--last .adv-door__icon {
  width: clamp(20px, 5.4vw, 28px);
  height: clamp(20px, 5.4vw, 28px);
}

.adv-door--last.is-open .adv-door__icon {
  width: clamp(48px, 13vw, 72px);
  height: clamp(48px, 13vw, 72px);
}

.adv-door--last.is-open .adv-door__num {
  font-size: clamp(18px, 4.6vw, 24px);
}

/* A Christmas patchwork: the doors take turns in night blue, spruce green and berry red. A door keeps
   its colour asleep (pale) and open (deep); red keeps away from the doors whose pieces are red themselves */
.adv-door:is(:nth-child(2), :nth-child(5), :nth-child(8), :nth-child(11), :nth-child(14), :nth-child(16), :nth-child(19), :nth-child(21), :nth-child(23)) {
  --door-pale: linear-gradient(135deg, #EAF5EE, #D3EADD);
  --door-ink: #2B7553;
  --door-line: rgba(47, 138, 98, 0.32);
  --door-deep: linear-gradient(135deg, #2F8A62, var(--adv-green-deep));
}

.adv-door:is(:nth-child(3), :nth-child(6), :nth-child(9), :nth-child(12), :nth-child(17)) {
  --door-pale: linear-gradient(135deg, #FCEEF0, #F6D8DE);
  --door-ink: #A22D45;
  --door-line: rgba(179, 50, 74, 0.28);
  --door-deep: linear-gradient(135deg, #C8425D, var(--adv-red-deep));
}

.adv-door.is-open .adv-door__btn {
  background: var(--door-deep, linear-gradient(135deg, var(--adv-night-3), var(--adv-night-1)));
}

/* The net: rows of doors by turns, each row half a door lower (generated); --w is when the wave of the
   entrance reaches the door (0 → 1, from the top left across the net, the 24th last) */
.adv-door:nth-child(1) { grid-area: 1 / 1 / span 2 / span 2; --w: 0; }
.adv-door:nth-child(2) { grid-area: 1 / 3 / span 2 / span 2; --w: 0.19; }
.adv-door:nth-child(3) { grid-area: 1 / 5 / span 2 / span 2; --w: 0.38; }
.adv-door:nth-child(4) { grid-area: 1 / 7 / span 2 / span 2; --w: 0.57; }
.adv-door:nth-child(5) { grid-area: 2 / 2 / span 2 / span 2; --w: 0.17; }
.adv-door:nth-child(6) { grid-area: 2 / 4 / span 2 / span 2; --w: 0.36; }
.adv-door:nth-child(7) { grid-area: 2 / 6 / span 2 / span 2; --w: 0.55; }
.adv-door:nth-child(8) { grid-area: 3 / 1 / span 2 / span 2; --w: 0.14; }
.adv-door:nth-child(9) { grid-area: 3 / 3 / span 2 / span 2; --w: 0.33; }
.adv-door:nth-child(10) { grid-area: 3 / 5 / span 2 / span 2; --w: 0.53; }
.adv-door:nth-child(11) { grid-area: 3 / 7 / span 2 / span 2; --w: 0.72; }
.adv-door:nth-child(12) { grid-area: 4 / 2 / span 2 / span 2; --w: 0.31; }
.adv-door:nth-child(13) { grid-area: 4 / 4 / span 2 / span 2; --w: 0.5; }
.adv-door:nth-child(14) { grid-area: 4 / 6 / span 2 / span 2; --w: 0.69; }
.adv-door:nth-child(15) { grid-area: 5 / 1 / span 2 / span 2; --w: 0.29; }
.adv-door:nth-child(16) { grid-area: 5 / 3 / span 2 / span 2; --w: 0.48; }
.adv-door:nth-child(17) { grid-area: 5 / 5 / span 2 / span 2; --w: 0.67; }
.adv-door:nth-child(18) { grid-area: 5 / 7 / span 2 / span 2; --w: 0.86; }
.adv-door:nth-child(19) { grid-area: 6 / 2 / span 2 / span 2; --w: 0.45; }
.adv-door:nth-child(20) { grid-area: 6 / 4 / span 2 / span 2; --w: 0.65; }
.adv-door:nth-child(21) { grid-area: 6 / 6 / span 2 / span 2; --w: 0.84; }
.adv-door:nth-child(22) { grid-area: 7 / 3 / span 2 / span 2; --w: 0.62; }
.adv-door:nth-child(23) { grid-area: 7 / 5 / span 2 / span 2; --w: 0.81; }
.adv-door:nth-child(24) { grid-area: 8 / 3 / span 4 / span 4; --w: 1; }

@media (min-width: 640px) {
  .adv-door:nth-child(1) { grid-area: 1 / 1 / span 2 / span 2; --w: 0; }
  .adv-door:nth-child(2) { grid-area: 1 / 3 / span 2 / span 2; --w: 0.16; }
  .adv-door:nth-child(3) { grid-area: 1 / 5 / span 2 / span 2; --w: 0.31; }
  .adv-door:nth-child(4) { grid-area: 1 / 7 / span 2 / span 2; --w: 0.47; }
  .adv-door:nth-child(5) { grid-area: 1 / 9 / span 2 / span 2; --w: 0.63; }
  .adv-door:nth-child(6) { grid-area: 2 / 2 / span 2 / span 2; --w: 0.14; }
  .adv-door:nth-child(7) { grid-area: 2 / 4 / span 2 / span 2; --w: 0.29; }
  .adv-door:nth-child(8) { grid-area: 2 / 6 / span 2 / span 2; --w: 0.45; }
  .adv-door:nth-child(9) { grid-area: 2 / 8 / span 2 / span 2; --w: 0.61; }
  .adv-door:nth-child(10) { grid-area: 3 / 1 / span 2 / span 2; --w: 0.12; }
  .adv-door:nth-child(11) { grid-area: 3 / 3 / span 2 / span 2; --w: 0.27; }
  .adv-door:nth-child(12) { grid-area: 3 / 5 / span 2 / span 2; --w: 0.43; }
  .adv-door:nth-child(13) { grid-area: 3 / 7 / span 2 / span 2; --w: 0.59; }
  .adv-door:nth-child(14) { grid-area: 3 / 9 / span 2 / span 2; --w: 0.74; }
  .adv-door:nth-child(15) { grid-area: 4 / 2 / span 2 / span 2; --w: 0.25; }
  .adv-door:nth-child(16) { grid-area: 4 / 4 / span 2 / span 2; --w: 0.41; }
  .adv-door:nth-child(17) { grid-area: 4 / 6 / span 2 / span 2; --w: 0.57; }
  .adv-door:nth-child(18) { grid-area: 4 / 8 / span 2 / span 2; --w: 0.72; }
  .adv-door:nth-child(19) { grid-area: 5 / 1 / span 2 / span 2; --w: 0.23; }
  .adv-door:nth-child(20) { grid-area: 5 / 3 / span 2 / span 2; --w: 0.39; }
  .adv-door:nth-child(21) { grid-area: 5 / 5 / span 2 / span 2; --w: 0.55; }
  .adv-door:nth-child(22) { grid-area: 5 / 7 / span 2 / span 2; --w: 0.7; }
  .adv-door:nth-child(23) { grid-area: 5 / 9 / span 2 / span 2; --w: 0.86; }
  .adv-door:nth-child(24) { grid-area: 7 / 4 / span 4 / span 4; --w: 1; }
}

@media (min-width: 1100px) {
  .adv-door:nth-child(1) { grid-area: 1 / 1 / span 2 / span 2; --w: 0; }
  .adv-door:nth-child(2) { grid-area: 1 / 3 / span 2 / span 2; --w: 0.11; }
  .adv-door:nth-child(3) { grid-area: 1 / 5 / span 2 / span 2; --w: 0.22; }
  .adv-door:nth-child(4) { grid-area: 1 / 7 / span 2 / span 2; --w: 0.33; }
  .adv-door:nth-child(5) { grid-area: 1 / 9 / span 2 / span 2; --w: 0.44; }
  .adv-door:nth-child(6) { grid-area: 1 / 11 / span 2 / span 2; --w: 0.55; }
  .adv-door:nth-child(7) { grid-area: 1 / 13 / span 2 / span 2; --w: 0.67; }
  .adv-door:nth-child(8) { grid-area: 1 / 15 / span 2 / span 2; --w: 0.78; }
  .adv-door:nth-child(9) { grid-area: 2 / 2 / span 2 / span 2; --w: 0.1; }
  .adv-door:nth-child(10) { grid-area: 2 / 4 / span 2 / span 2; --w: 0.21; }
  .adv-door:nth-child(11) { grid-area: 2 / 6 / span 2 / span 2; --w: 0.32; }
  .adv-door:nth-child(12) { grid-area: 2 / 8 / span 2 / span 2; --w: 0.43; }
  .adv-door:nth-child(13) { grid-area: 2 / 10 / span 2 / span 2; --w: 0.54; }
  .adv-door:nth-child(14) { grid-area: 2 / 12 / span 2 / span 2; --w: 0.65; }
  .adv-door:nth-child(15) { grid-area: 2 / 14 / span 2 / span 2; --w: 0.76; }
  .adv-door:nth-child(16) { grid-area: 3 / 1 / span 2 / span 2; --w: 0.08; }
  .adv-door:nth-child(17) { grid-area: 3 / 3 / span 2 / span 2; --w: 0.19; }
  .adv-door:nth-child(18) { grid-area: 3 / 5 / span 2 / span 2; --w: 0.31; }
  .adv-door:nth-child(19) { grid-area: 3 / 7 / span 2 / span 2; --w: 0.42; }
  .adv-door:nth-child(20) { grid-area: 3 / 9 / span 2 / span 2; --w: 0.53; }
  .adv-door:nth-child(21) { grid-area: 3 / 11 / span 2 / span 2; --w: 0.64; }
  .adv-door:nth-child(22) { grid-area: 3 / 13 / span 2 / span 2; --w: 0.75; }
  .adv-door:nth-child(23) { grid-area: 3 / 15 / span 2 / span 2; --w: 0.86; }
  .adv-door:nth-child(24) { grid-area: 4 / 7 / span 4 / span 4; --w: 1; }
}

.adv-cal__msg {
  min-height: 1.5em;
  margin: 22px auto 0;
  color: var(--primary-dark);
  font-weight: 600;
  text-align: center;
}

.adv-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 22px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
}

.adv-legend li {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.adv-legend__dot {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  transform: rotate(45deg);
}

.adv-legend__dot--ready { background: var(--adv-gold); }
.adv-legend__dot--open { background: conic-gradient(from 45deg, var(--adv-night-2) 0 33.4%, var(--adv-green) 0 66.7%, var(--adv-red) 0); box-shadow: inset 0 0 0 2px var(--adv-gold); }
.adv-legend__dot--locked { background: conic-gradient(from 45deg, #DBE6F8 0 33.4%, #D3EADD 0 66.7%, #F6D8DE 0); box-shadow: inset 0 0 0 1.5px rgba(95, 135, 191, 0.4); }

.adv-cal__note {
  margin-top: 14px;
  color: var(--text-tertiary);
  font-size: 13.5px;
  text-align: center;
}

/* calm motion: the net simply hangs there, today's door glows without breathing */
@media (prefers-reduced-motion: reduce) {
  .js .adv-doors.is-in .adv-door__hang,
  .adv-door.is-today .adv-door__btn,
  .adv-door.is-today::after,
  .adv-door.is-open .adv-door__btn::before {
    animation: none;
  }

  .adv-door.is-today .adv-door__btn::after,
  .adv-door.is-today .adv-door__hang::before,
  .adv-door.is-today .adv-door__hang::after {
    animation: none;
    opacity: 0.85;
  }

  .adv-door.is-today .adv-door__btn::after {
    opacity: 0;
  }

  .adv-door::before,
  .adv-door::after,
  .adv-doors::before,
  .adv-door__hang,
  .adv-door__btn,
  .adv-cal .adv-namebox {
    transition: none;
  }

  .adv-door:is(.is-ready, .is-open) .adv-door__hang:hover {
    rotate: none;
  }

  .adv-door:is(.is-ready, .is-open) .adv-door__hang:has(> .adv-door__btn:focus-visible) {
    rotate: none;
  }
}

/* =============================================
   HOW AN EVENING GOES
   A band of spruce-green felt, cut with pinking shears and sewn along both edges with a white running
   stitch. Three cream paper tags hang on red threads from a garland of straws and beads that sags across
   it (the garland is an inline SVG, 1000 units = the width of .adv-line): they swing in one after another
   and sway from their holes while the page scrolls. On narrower screens each tag hangs from its own pin.
   ============================================= */
.adv-how {
  --tooth: 9px;
  --adv-felt: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='a' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' seed='7' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .92 0 0 0 0 1 0 0 0 0 .9 0 0 0 -2.4 1.38'/%3E%3C/filter%3E%3Cfilter id='b' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.022' numOctaves='2' seed='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 .08 0 0 0 0 .04 0 0 0 1.9 -.78'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23b)' opacity='.5'/%3E%3Crect width='240' height='240' filter='url(%23a)' opacity='.26'/%3E%3C/svg%3E");
  --adv-stitch: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='6'%3E%3Cpath d='M6 4.3h12' stroke='%23000' stroke-opacity='.3' stroke-width='2.6' stroke-linecap='round'/%3E%3Cpath d='M6 3h12' stroke='%23FFF7E6' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E");
  --adv-pinked-top: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 9' preserveAspectRatio='none'%3E%3Cpath d='M0 9 9 0l9 9z'/%3E%3C/svg%3E");
  --adv-pinked-bottom: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 9' preserveAspectRatio='none'%3E%3Cpath d='M0 0l9 9 9-9z'/%3E%3C/svg%3E");
  z-index: 2;
  isolation: isolate;
  overflow-x: clip;
  padding: clamp(84px, 8.5vw, 116px) 0 clamp(92px, 9vw, 124px);
}

/* the felt: the section and a tooth more, so its pinked lower edge lies over the top of the wall */
.adv-how::before {
  content: '';
  position: absolute;
  inset: 0 0 calc(-1 * var(--tooth));
  z-index: -1;
  background:
    var(--adv-stitch) 0 calc(var(--tooth) + 14px) / 26px 6px repeat-x,
    var(--adv-stitch) 13px calc(100% - var(--tooth) - 14px) / 26px 6px repeat-x,
    var(--adv-felt) 0 0 / 240px 240px,
    radial-gradient(ellipse 64% 70% at 50% 34%, rgba(126, 196, 150, 0.16), rgba(126, 196, 150, 0) 70%),
    linear-gradient(180deg, #1A5A40 0%, #216A4B 46%, #1B5C42 100%);
  -webkit-mask:
    var(--adv-pinked-top) 0 0 / 18px var(--tooth) repeat-x,
    linear-gradient(#000 0 0) 0 calc(var(--tooth) - 1px) / 100% calc(100% - 2 * var(--tooth) + 2px) no-repeat,
    var(--adv-pinked-bottom) 0 100% / 18px var(--tooth) repeat-x;
  mask:
    var(--adv-pinked-top) 0 0 / 18px var(--tooth) repeat-x,
    linear-gradient(#000 0 0) 0 calc(var(--tooth) - 1px) / 100% calc(100% - 2 * var(--tooth) + 2px) no-repeat,
    var(--adv-pinked-bottom) 0 100% / 18px var(--tooth) repeat-x;
}

.adv-how .section__tag {
  background: rgba(8, 40, 26, 0.38);
  color: var(--adv-gold-light);
  box-shadow: inset 0 0 0 1px rgba(249, 226, 154, 0.34);
}

.adv-how .b-title {
  color: #FFF5DD;
}

.adv-how .b-title .serif-accent {
  color: var(--adv-gold);
}

/* ---------- The garland ---------- */
.adv-line {
  --g0: 1.4cqw;     /* where the garland is tied, under the top of the line */
  --sag: 4.6cqw;    /* how deep it sags in the middle */
  --string: 92px;   /* the thread from the garland to the top of a tag */
  position: relative;
  container-type: inline-size;
}

.adv-garland {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 2;
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  pointer-events: none;
  filter: drop-shadow(0 5px 3px rgba(4, 34, 21, 0.38));
}

.adv-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: 0 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* the line itself is there at once; its tags come in one after another */
.js .adv-steps[data-reveal] {
  opacity: 1;
}

/* ---------- A paper tag ---------- */
.adv-step {
  --f: 0.158;   /* where on the garland it hangs, 0 … 1 */
  --dir: 1;
  position: relative;
  z-index: 0;
  margin-top: calc(84px + 3.4vw);
  margin-top: calc(var(--g0) + 4 * var(--sag) * var(--f) * (1 - var(--f)) + var(--string));
  padding: 62px 26px 30px;
  text-align: center;
  transform-origin: 50% calc(-1 * var(--string));
  rotate: calc(var(--sway, 0) * 6deg);
  filter: drop-shadow(0 14px 12px rgba(4, 32, 20, 0.36));
}

.adv-step:nth-child(2) { --f: 0.5; --dir: -1; }
.adv-step:nth-child(3) { --f: 0.842; }

/* cream paper with its top corners cut off and a hole punched in it */
.adv-step::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 90% 60% at 30% 0%, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0) 70%),
    linear-gradient(174deg, #FFF9EA 0%, #FBF0D8 58%, #F3E3C1 100%);
  clip-path: polygon(34px 0, calc(100% - 34px) 0, 100% 34px, 100% 100%, 0 100%, 0 34px);
  -webkit-mask: radial-gradient(circle at 50% 24px, transparent 6.5px, #000 7.5px);
  mask: radial-gradient(circle at 50% 24px, transparent 6.5px, #000 7.5px);
}

/* the red ring around the hole, and the thread through it up to the garland */
.adv-step__hang {
  position: absolute;
  left: 50%;
  top: 13px;
  z-index: 1;
  width: 22px;
  height: 22px;
  margin-left: -11px;
  border: 4.5px solid var(--adv-red);
  border-radius: 50%;
  box-shadow: inset 0 1px 1.5px rgba(60, 10, 20, 0.35), 0 1px 0 rgba(255, 255, 255, 0.7);
}

.adv-step__hang::before {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 50%;
  width: 2px;
  height: calc(var(--string) + 24px);
  margin-left: -1px;
  border-radius: 1px;
  background: linear-gradient(90deg, #7A1B2E, #CF5069 50%, #7A1B2E);
}

/* where a tag hangs from a pin of its own (narrow screens): a little straw diamond with a bead */
.adv-step__hang::after {
  content: '';
  position: absolute;
  left: 50%;
  top: calc(-1 * var(--string) - 17.5px - 15px);
  display: none;
  width: 24px;
  height: 30px;
  margin-left: -12px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-12 -15 24 30'%3E%3Cdefs%3E%3ClinearGradient id='s' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop offset='0' stop-color='%23FCEBB0'/%3E%3Cstop offset='.5' stop-color='%23EDBE4E'/%3E%3Cstop offset='1' stop-color='%23A9781C'/%3E%3C/linearGradient%3E%3CradialGradient id='b' cx='.36' cy='.32' r='.75'%3E%3Cstop offset='0' stop-color='%23E77A8E'/%3E%3Cstop offset='.45' stop-color='%23B3324A'/%3E%3Cstop offset='1' stop-color='%236E1A2B'/%3E%3C/radialGradient%3E%3C/defs%3E%3Cpath d='M0-13 9 0 0 13-9 0z' fill='none' stroke='url(%23s)' stroke-width='3.4' stroke-linejoin='round'/%3E%3Ccircle r='4.6' fill='url(%23b)'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat;
}

/* its number: a diamond threaded on the string like a bead */
.adv-step__num {
  position: absolute;
  left: 50%;
  top: calc(-0.5 * var(--string) - 18px);
  z-index: 2;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-left: -18px;
  color: #4A3300;
  font: italic 600 20px/1 var(--serif);
}

.adv-step__num::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: 8px;
  background: linear-gradient(135deg, #FBE9A9, var(--adv-gold));
  transform: rotate(45deg);
  box-shadow: 0 0 0 2.5px #FFF3D6, 0 7px 12px rgba(4, 32, 20, 0.4);
}

.adv-step:nth-child(1) .adv-step__num,
.adv-step:nth-child(3) .adv-step__num {
  color: #fff;
}

.adv-step:nth-child(1) .adv-step__num::before {
  background: linear-gradient(135deg, #D2506A, var(--adv-red-deep));
}

.adv-step:nth-child(3) .adv-step__num::before {
  background: linear-gradient(135deg, #3C9468, var(--adv-green-deep));
}

.adv-step h3 {
  margin-bottom: 8px;
  color: var(--text);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.adv-step p {
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 1.6;
}

/* they come in swinging, one after another, and settle */
@media (prefers-reduced-motion: no-preference) {
  .js .adv-steps .adv-step {
    opacity: 0;
  }

  .js .adv-steps.is-in .adv-step {
    opacity: 1;
    animation: adv-tag-in 0.95s ease-in-out both;
  }

  .js .adv-steps.is-in .adv-step:nth-child(2) { animation-delay: 0.12s; }
  .js .adv-steps.is-in .adv-step:nth-child(3) { animation-delay: 0.24s; }
}

@keyframes adv-tag-in {
  0% { opacity: 0; transform: rotate(calc(var(--dir) * -18deg)); }
  20% { opacity: 1; }
  40% { transform: rotate(calc(var(--dir) * 8deg)); }
  62% { transform: rotate(calc(var(--dir) * -3.5deg)); }
  82% { transform: rotate(calc(var(--dir) * 1.2deg)); }
  100% { opacity: 1; transform: none; }
}

/* ---------- The note under the tags, sewn onto the felt ---------- */
.adv-how__tip {
  position: relative;
  max-width: 640px;
  margin: clamp(44px, 5vw, 60px) auto 0;
  padding: 18px 40px 18px;
  border-radius: 3px;
  background: linear-gradient(176deg, #FFF9EA, #F7EBCF);
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 1.6;
  text-align: center;
  text-wrap: balance;
  rotate: -0.8deg;
  box-shadow: 0 12px 22px rgba(4, 32, 20, 0.34), 0 2px 3px rgba(4, 32, 20, 0.2);
}

.adv-how__tip b {
  color: var(--text);
}

/* sewn on at both ends: red stitches over the edge of the paper */
.adv-how__tip::before,
.adv-how__tip::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 14px;
  height: 34px;
  margin-top: -17px;
  background: repeating-linear-gradient(180deg, var(--adv-red) 0 2.4px, rgba(179, 50, 74, 0) 2.4px 10px);
  border-radius: 2px;
}

.adv-how__tip::before { left: -6px; }
.adv-how__tip::after { right: -6px; }

@media (max-width: 1023px) {
  .adv-line {
    --string: 64px;
    container-type: normal;
  }

  .adv-garland {
    display: none;
  }

  .adv-steps {
    grid-template-columns: 1fr;
    max-width: 520px;
    margin: 0 auto;
  }

  .adv-step,
  .adv-step:nth-child(n) {
    margin-top: calc(var(--string) + 34px);
    rotate: calc(var(--sway, 0) * 4deg);
  }

  .adv-step:first-child {
    margin-top: calc(var(--string) + 20px);
  }

  .adv-step__hang::after {
    display: block;
  }
}

@media (max-width: 759px) {
  .adv-step {
    padding: 58px 20px 26px;
  }

  .adv-how__tip {
    padding: 18px 30px;
    font-size: 15px;
  }
}

/* =============================================
   WHAT A SODAS IS
   A wall in the warm light of a candle on the table below it. Across it lies the big soft shadow of a
   straw garden (js/shadow.js draws it on a canvas under the words): it turns as the reader scrolls past
   and keeps drifting slowly on its own, as the copy says. The watercolour hangs from a nail on a red
   thread, the words for a child are written on a paper tag, and the wall sinks into a snowdrift.
   ============================================= */
.adv-about {
  --adv-plaster: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='a' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.016' numOctaves='4' seed='5' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .3 0 0 0 0 .08 0 0 0 1.5 -.62'/%3E%3C/filter%3E%3Crect width='260' height='260' filter='url(%23a)' opacity='.16'/%3E%3C/svg%3E");
  z-index: 1;
  isolation: isolate;
  overflow-x: clip;
  padding: clamp(104px, 10vw, 140px) 0 clamp(150px, 14vw, 200px);
  background:
    linear-gradient(180deg, rgba(74, 46, 8, 0.22), rgba(74, 46, 8, 0) 30px),
    radial-gradient(ellipse 82% 78% at 46% 46%, rgba(122, 78, 18, 0) 52%, rgba(122, 78, 18, 0.18) 100%),
    radial-gradient(ellipse 60% 55% at 44% 86%, rgba(255, 216, 146, 0.6), rgba(255, 216, 146, 0) 72%),
    var(--adv-plaster) 0 0 / 260px 260px,
    linear-gradient(180deg, #F7E8C6 0%, #F3DDB0 58%, #EDD19C 100%);
}

/* the shadow of the sodas (the canvas is added by js/shadow.js) */
.adv-about__shadow {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.4s ease;
}

.adv-about__shadow.is-on {
  opacity: 0.2;
}

/* the wall sinks into the snow: a shaded drift behind, and a drift of the page's own colour in front */
.adv-about::before,
.adv-about::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  pointer-events: none;
}

.adv-about::before {
  height: clamp(74px, 9vw, 124px);
  background: linear-gradient(180deg, #B4C7E8, #CFDCF3 55%, #DDE8F9);
  -webkit-mask: var(--adv-hills-far) repeat-x 22% 100% / max(1100px, 86%) 100%;
  mask: var(--adv-hills-far) repeat-x 22% 100% / max(1100px, 86%) 100%;
}

.adv-about::after {
  height: clamp(56px, 7vw, 98px);
  background: linear-gradient(180deg, rgba(196, 213, 240, 0.95), rgba(196, 213, 240, 0) 58%) var(--tone, #fff);
  transition: background-color 0.9s ease;
  -webkit-mask: var(--adv-hills) repeat-x 64% 100% / max(1440px, 112%) 100%;
  mask: var(--adv-hills) repeat-x 64% 100% / max(1440px, 112%) 100%;
}

.adv-about__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: clamp(28px, 6vw, 88px);
}

.adv-about .section__tag {
  background: rgba(255, 251, 240, 0.78);
  color: var(--adv-gold-ink);
  box-shadow: inset 0 0 0 1px rgba(107, 74, 0, 0.16);
}

.adv-about .b-title .serif-accent {
  color: #9C2A41;
}

.adv-about .b-lede {
  color: #4C3F2C;
}

.adv-about__more {
  max-width: 34em;
  margin-top: 16px;
  color: #4C3F2C;
  font-size: 17px;
  line-height: 1.65;
}

/* ---------- The watercolour on the wall ---------- */
.adv-about__art {
  position: relative;
  margin: 82px 0 0;
  padding: 10px;
  background: #F8F9F4;
  box-shadow: 0 24px 34px -10px rgba(92, 56, 10, 0.4), 0 3px 6px rgba(92, 56, 10, 0.18);
  transform-origin: 50% -66px;
  rotate: calc(-1.2deg + var(--sway, 0) * 2.4deg);
}

.adv-about__art img {
  display: block;
  width: 100%;
  height: auto;
}

/* the straw it hangs from */
.adv-about__art::before {
  content: '';
  position: absolute;
  left: -16px;
  right: -16px;
  top: -7px;
  height: 14px;
  background:
    radial-gradient(circle 7px at 7px 50%, #E77A8E, #B3324A 48%, #6E1A2B 92%, rgba(110, 26, 43, 0) 100%),
    radial-gradient(circle 7px at calc(100% - 7px) 50%, #E77A8E, #B3324A 48%, #6E1A2B 92%, rgba(110, 26, 43, 0) 100%),
    linear-gradient(180deg, #FCEBB0, #EDBE4E 45%, #A9781C) 50% 50% / calc(100% - 20px) 8px no-repeat;
  filter: drop-shadow(0 3px 2px rgba(92, 56, 10, 0.32));
}

/* the red thread up to the nail, and the nail */
.adv-about__art::after {
  content: '';
  position: absolute;
  left: -9px;
  right: -9px;
  bottom: 100%;
  height: 71px;
  background:
    radial-gradient(circle 5.5px at 50% 5.5px, #FFF0BF, #D7A43A 55%, #7A5410 92%, rgba(122, 84, 16, 0) 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M0 100 50 7.7 100 100' fill='none' stroke='%239C2A41' stroke-width='2' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat;
  filter: drop-shadow(0 3px 2px rgba(92, 56, 10, 0.28));
}

/* it comes in swinging from its nail and settles */
@media (prefers-reduced-motion: no-preference) {
  .js .adv-about__art.is-in {
    animation: adv-frame-in 1.15s ease-in-out both;
  }
}

@keyframes adv-frame-in {
  0% { transform: rotate(9deg); }
  34% { transform: rotate(-4.5deg); }
  60% { transform: rotate(2deg); }
  82% { transform: rotate(-0.7deg); }
  100% { transform: none; }
}

/* ---------- The words for a child, on a paper tag ---------- */
.adv-say {
  position: relative;
  z-index: 0;
  max-width: 30em;
  margin-top: 70px;
  padding: 50px 30px 24px;
  color: var(--text);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.5;
  text-align: center;
  transform-origin: 50% -34px;
  rotate: calc(-1deg + var(--sway, 0) * 1.6deg);
  filter: drop-shadow(0 12px 12px rgba(92, 56, 10, 0.3));
}

.adv-say::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 90% 70% at 25% 0%, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0) 70%),
    linear-gradient(174deg, #FFFBEF 0%, #FBF2DC 60%, #F4E6C6 100%);
  clip-path: polygon(30px 0, calc(100% - 30px) 0, 100% 30px, 100% 100%, 0 100%, 0 30px);
  -webkit-mask: radial-gradient(circle at 50% 24px, transparent 6.5px, #000 7.5px);
  mask: radial-gradient(circle at 50% 24px, transparent 6.5px, #000 7.5px);
}

/* the nail, the thread and the red ring around the hole */
.adv-say::after {
  content: '';
  position: absolute;
  left: 50%;
  top: -34px;
  width: 22px;
  height: 69px;
  margin-left: -11px;
  background:
    radial-gradient(circle 5px at 50% 5px, #FFF0BF, #D7A43A 55%, #7A5410 92%, rgba(122, 84, 16, 0) 100%),
    linear-gradient(90deg, #7A1B2E, #CF5069 50%, #7A1B2E) 50% 5px / 2px 53px no-repeat,
    radial-gradient(circle at 50% calc(100% - 11px), rgba(179, 50, 74, 0) 6.2px, var(--adv-red) 6.8px 10.3px, rgba(179, 50, 74, 0) 10.9px);
}

.adv-say__label {
  display: block;
  margin-bottom: 6px;
  color: var(--adv-gold-ink);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@media (max-width: 1023px) {
  .adv-about__grid {
    grid-template-columns: 1fr;
  }

  .adv-about__art {
    width: 100%;
    max-width: 620px;
    margin: 72px auto 8px;
  }

  .adv-about__art::before {
    left: -12px;
    right: -12px;
  }
}

@media (max-width: 759px) {
  .adv-say {
    padding: 48px 22px 22px;
    font-size: 16px;
  }

  /* narrower drifts, so their humps show on a phone */
  .adv-about::before {
    -webkit-mask-size: 640px 100%;
    mask-size: 640px 100%;
  }

  .adv-about::after {
    -webkit-mask-size: 820px 100%;
    mask-size: 820px 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .adv-about__shadow,
  .adv-about::after {
    transition: none;
  }
}

/* =============================================
   THE SHELF OF GAMES: a piece of the night inside the white page
   ============================================= */
.adv-shelf {
  padding-top: clamp(24px, 4vw, 56px);
}

/* A low snowdrift where the calendar meets the shelf: the panel stands in it and the toys in front of
   it; its back rises a little slower than the page (--p) */
.adv-shelf__drift {
  --dh: clamp(92px, 11vw, 150px);
  position: absolute;
  left: 0;
  right: 0;
  top: calc(clamp(24px, 4vw, 56px) - var(--dh) * 0.72);
  z-index: -1;
  height: var(--dh);
  pointer-events: none;
  -webkit-mask: linear-gradient(#000 72%, transparent);
  mask: linear-gradient(#000 72%, transparent);
}

.adv-shelf__drift::before,
.adv-shelf__drift::after {
  content: '';
  position: absolute;
  inset: 0;
  background: center bottom / 100% 100% no-repeat;
}

.adv-shelf__drift::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 150' preserveAspectRatio='none'%3E%3Cpath fill='%23E2EBF8' d='M0 64C120 34 236 32 352 58S566 98 708 72 968 26 1104 52 1332 86 1440 48V150H0Z'/%3E%3C/svg%3E");
  translate: 0 calc((var(--p, 0.5) - 0.5) * 44px);
}

.adv-shelf__drift::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 150' preserveAspectRatio='none'%3E%3Cdefs%3E%3ClinearGradient id='s' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='.4' stop-color='%23fff'/%3E%3Cstop offset='1' stop-color='%23EAF1FB'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath fill='url(%23s)' d='M0 104C146 80 268 80 404 96S650 124 790 104 1052 70 1190 90 1384 114 1440 96V150H0Z'/%3E%3Cpath fill='none' stroke='%23D2DFF3' stroke-width='2' vector-effect='non-scaling-stroke' d='M0 104C146 80 268 80 404 96S650 124 790 104 1052 70 1190 90 1384 114 1440 96'/%3E%3C/svg%3E");
}

.adv-shelf__panel {
  position: relative;
  padding: clamp(36px, 5.4vw, 72px) clamp(18px, 4vw, 56px) clamp(26px, 4vw, 56px);
  overflow: hidden;
  border-radius: clamp(28px, 4vw, 48px);
  background: linear-gradient(170deg, var(--adv-night-0), var(--adv-night-1) 34%, var(--adv-night-2) 78%, #2B4C92);
  color: var(--adv-on-night);
  box-shadow: 0 34px 80px rgba(14, 30, 71, 0.3);
}

/* On top of the shelf stand the elf's own toys: the Christmas trees and the lantern of the hero,
   --toy pixels to a metre. Set out one by one when the shelf comes in, they rock on the scrolling
   like small light things (--sway, --wob each its own), and the candles keep glowing */
.adv-shelf .adv-wrap {
  position: relative;
}

.adv-shelf__top {
  --toy: clamp(190px, 21vw, 300px);
  position: absolute;
  left: var(--space-lg);
  right: var(--space-lg);
  top: 0;
  z-index: 1;
  height: 0;
  pointer-events: none;
}

.adv-shelf__toy {
  position: absolute;
  bottom: -6px;
  height: calc(var(--t) * var(--toy));
  aspect-ratio: var(--ar);
  transform-origin: 50% 100%;
  rotate: calc(var(--sway, 0) * var(--wob));
}

.adv-shelf__toy img {
  display: block;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 8px 8px rgba(14, 30, 71, 0.2));
}

.adv-shelf__toy--lantern { --t: 0.203; --ar: 161 / 223; --wob: 4.5deg; --n: 0; left: 7%; }
.adv-shelf__toy--red { --t: 0.296; --ar: 224 / 326; --wob: -3.2deg; --n: 1; left: calc(7% + var(--toy) * 0.2); }
.adv-shelf__toy--frame { --t: 0.422; --ar: 394 / 465; --wob: 2.6deg; --n: 2; right: calc(6% + var(--toy) * 0.52); }
.adv-shelf__toy--spruce { --t: 0.483; --ar: 491 / 531; --wob: -1.6deg; --n: 3; right: calc(6% + var(--toy) * 0.1); }
.adv-shelf__toy--white { --t: 0.23; --ar: 182 / 254; --wob: 3.8deg; --n: 4; right: 5%; }

.js .adv-shelf__panel:not(.is-in) + .adv-shelf__top .adv-shelf__toy {
  opacity: 0;
}

.js .adv-shelf__panel.is-in + .adv-shelf__top .adv-shelf__toy {
  animation: adv-toy-set 0.9s ease-in-out calc(0.4s + var(--n) * 0.09s) both;
}

@keyframes adv-toy-set {
  0% { opacity: 0; transform: translateY(-22px) rotate(-5deg); animation-timing-function: cubic-bezier(0.55, 0, 0.85, 0.45); }
  22% { opacity: 1; }
  34% { transform: translateY(0) rotate(4deg); }
  54% { transform: translateY(0) rotate(-2.2deg); }
  74% { transform: translateY(0) rotate(1deg); }
  100% { opacity: 1; transform: translateY(0) rotate(0deg); }
}

/* the candle light of the lantern and of the spruce's candles */
.adv-shelf__flame {
  position: absolute;
  left: var(--fx);
  top: var(--fy);
  width: var(--fs);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 249, 226, 0.95), rgba(255, 214, 120, 0.55) 34%, rgba(255, 196, 90, 0.16) 70%, rgba(255, 196, 90, 0) 100%);
  translate: -50% -50%;
  animation: adv-flame 2.4s ease-in-out infinite;
  pointer-events: none;
}

.adv-shelf__toy--lantern .adv-shelf__flame { --fx: 48%; --fy: 59%; --fs: 92%; }
.adv-shelf__flame--1 { --fx: 47.3%; --fy: 48%; --fs: 17%; animation-delay: -0.8s; }
.adv-shelf__flame--2 { --fx: 82.5%; --fy: 56.5%; --fs: 15%; animation-delay: -1.7s; }
.adv-shelf__flame--3 { --fx: 7.8%; --fy: 74%; --fs: 15%; animation-delay: -0.3s; }

@keyframes adv-flame {
  0%, 100% { opacity: 0.68; scale: 0.86; }
  45% { opacity: 1; scale: 1.06; }
  70% { opacity: 0.86; scale: 0.96; }
}

/* the panel's sky: far stars drift slowly, near ones (and a few straw-gold glints) twinkle and drift
   faster; the sky comes up after the panel has arrived */
.adv-shelf__stars {
  position: absolute;
  inset: 0 0 30%;
  pointer-events: none;
  transition: opacity 1s ease 0.35s, scale 1.4s var(--ease-out) 0.35s;
}

.js .adv-shelf__panel:not(.is-in) .adv-shelf__stars {
  opacity: 0;
  scale: 1.08;
}

.adv-shelf__stars::before,
.adv-shelf__stars::after {
  content: '';
  position: absolute;
  inset: -48px 0 0;
}

.adv-shelf__stars::before {
  background-image:
    radial-gradient(1.3px 1.3px at 6% 14%, #fff 60%, transparent 62%),
    radial-gradient(1px 1px at 13% 46%, #dfe9ff 60%, transparent 62%),
    radial-gradient(1.6px 1.6px at 21% 9%, #fff 60%, transparent 62%),
    radial-gradient(1px 1px at 27% 31%, #fff 60%, transparent 62%),
    radial-gradient(1.2px 1.2px at 34% 62%, #cfdcff 60%, transparent 62%),
    radial-gradient(1px 1px at 41% 18%, #fff 60%, transparent 62%),
    radial-gradient(1.8px 1.8px at 48% 6%, #fff7dc 60%, transparent 62%),
    radial-gradient(1px 1px at 55% 38%, #fff 60%, transparent 62%),
    radial-gradient(1.2px 1.2px at 63% 12%, #dfe9ff 60%, transparent 62%),
    radial-gradient(1px 1px at 69% 52%, #fff 60%, transparent 62%),
    radial-gradient(1.5px 1.5px at 77% 22%, #fff 60%, transparent 62%),
    radial-gradient(1px 1px at 84% 44%, #cfdcff 60%, transparent 62%),
    radial-gradient(1.3px 1.3px at 91% 10%, #fff 60%, transparent 62%),
    radial-gradient(1px 1px at 96% 33%, #fff 60%, transparent 62%);
  opacity: 0.75;
  translate: 0 calc((var(--p, 0.5) - 0.5) * -36px);
}

.adv-shelf__stars::after {
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-10 -10 20 20'%3E%3Cpath fill='%23F9E29A' d='M0-10 1.3-1.3 10 0 1.3 1.3 0 10-1.3 1.3-10 0-1.3-1.3Z'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-10 -10 20 20'%3E%3Cpath fill='%23F9E29A' d='M0-10 1.3-1.3 10 0 1.3 1.3 0 10-1.3 1.3-10 0-1.3-1.3Z'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-10 -10 20 20'%3E%3Cpath fill='%23F9E29A' d='M0-10 1.3-1.3 10 0 1.3 1.3 0 10-1.3 1.3-10 0-1.3-1.3Z'/%3E%3C/svg%3E"),
    radial-gradient(1px 1px at 3% 36%, #fff 60%, transparent 62%),
    radial-gradient(1.4px 1.4px at 10% 72%, #fff7dc 60%, transparent 62%),
    radial-gradient(1px 1px at 18% 24%, #fff 60%, transparent 62%),
    radial-gradient(1.2px 1.2px at 30% 82%, #dfe9ff 60%, transparent 62%),
    radial-gradient(1px 1px at 37% 4%, #fff 60%, transparent 62%),
    radial-gradient(1.5px 1.5px at 45% 55%, #fff 60%, transparent 62%),
    radial-gradient(1px 1px at 52% 26%, #cfdcff 60%, transparent 62%),
    radial-gradient(1.2px 1.2px at 59% 74%, #fff 60%, transparent 62%),
    radial-gradient(1px 1px at 66% 30%, #fff 60%, transparent 62%),
    radial-gradient(1.6px 1.6px at 73% 66%, #fff 60%, transparent 62%),
    radial-gradient(1px 1px at 81% 5%, #fff 60%, transparent 62%),
    radial-gradient(1.2px 1.2px at 88% 78%, #dfe9ff 60%, transparent 62%),
    radial-gradient(1px 1px at 94% 58%, #fff 60%, transparent 62%);
  background-position: 9% 34%, 83% 16%, 94% 70%, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0;
  background-size: 13px 13px, 9px 9px, 11px 11px, auto, auto, auto, auto, auto, auto, auto, auto, auto, auto, auto, auto, auto;
  background-repeat: no-repeat;
  translate: 0 calc((var(--p, 0.5) - 0.5) * -70px);
  animation: adv-shelf-twinkle 4.6s ease-in-out infinite alternate;
}

@keyframes adv-shelf-twinkle {
  from { opacity: 0.3; }
  to { opacity: 1; }
}

.adv-shelf__head {
  position: relative;
  max-width: 700px;
  margin: 0 auto clamp(26px, 4vw, 44px);
  text-align: center;
}

.adv-shelf__tag {
  display: inline-block;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: rgba(249, 226, 154, 0.14);
  color: var(--adv-gold-light);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.adv-shelf__title {
  margin-top: 16px;
  color: #fff;
  font-size: clamp(30px, 4.2vw, 50px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.06;
  text-wrap: balance;
}

.adv-shelf__title em {
  color: var(--adv-gold-light);
}

.adv-shelf__lede {
  margin-top: 16px;
  color: var(--adv-soft-on-night);
  font-size: clamp(16px, 1.5vw, 18px);
  line-height: 1.6;
  text-wrap: pretty;
}

/* the heading rises into the panel after it has arrived */
.js .adv-shelf__head > * {
  transition: opacity 0.8s var(--ease-out) 0.15s, translate 0.8s var(--ease-out) 0.15s;
}

.js .adv-shelf__head > :nth-child(2) { transition-delay: 0.24s; }
.js .adv-shelf__head > :nth-child(3) { transition-delay: 0.33s; }

.js .adv-shelf__panel:not(.is-in) .adv-shelf__head > * {
  opacity: 0;
  translate: 0 18px;
}

/* The games are set out on the shelf one by one once the list comes on screen (its own reveal): each
   card drops a little and settles, an unlocked game's diamond turns once as it lands */
.adv-toys {
  --step: 0.07s;
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.js .adv-toys[data-reveal] {
  opacity: 1;
}

.adv-toy {
  --i: 0;
  --tilt: -2.5deg;
  --at: calc(0.08s + var(--i) * var(--step));
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 22px 16px 18px;
  border: 1px solid rgba(199, 213, 240, 0.16);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.055);
  text-align: center;
  transition:
    opacity 0.35s ease var(--at),
    translate 0.75s cubic-bezier(0.34, 1.56, 0.64, 1) var(--at),
    rotate 0.75s cubic-bezier(0.34, 1.56, 0.64, 1) var(--at),
    transform 0.4s var(--ease-spring),
    background-color 0.3s ease,
    border-color 0.3s ease;
}

.adv-toy:nth-child(even) { --tilt: 2deg; }
.adv-toy:nth-child(2) { --i: 1; }
.adv-toy:nth-child(3) { --i: 2; }
.adv-toy:nth-child(4) { --i: 3; }
.adv-toy:nth-child(5) { --i: 4; }
.adv-toy:nth-child(6) { --i: 5; }
.adv-toy:nth-child(7) { --i: 6; }
.adv-toy:nth-child(8) { --i: 7; }

.js .adv-toys:not(.is-in) .adv-toy {
  opacity: 0;
  translate: 0 -30px;
  rotate: var(--tilt);
}

.adv-toy.is-open {
  border-color: rgba(249, 226, 154, 0.5);
  background: rgba(255, 255, 255, 0.1);
}

/* touched: the card lifts and its diamond swings on its thread */
.adv-toy.is-open:is(:hover, :focus-within) {
  border-color: rgba(249, 226, 154, 0.78);
  background-color: rgba(255, 255, 255, 0.13);
  transform: translateY(-5px);
}

/* the picture sits on a diamond, like the doors; an unlocked one hangs on a red thread */
.adv-toy__frame {
  position: relative;
  z-index: 0;
  display: grid;
  place-items: center;
  width: 104px;
  height: 104px;
  margin-bottom: 14px;
  transform-origin: 50% -12px;
  transition:
    rotate 1.2s cubic-bezier(0.22, 1, 0.36, 1) calc(var(--at) + 0.12s),
    transform 1.2s var(--adv-swing);
}

.adv-toy.is-open .adv-toy__frame {
  rotate: y 0deg;
}

.js .adv-toys:not(.is-in) .adv-toy.is-open .adv-toy__frame {
  rotate: y -1turn;
}

.adv-toy.is-open:is(:hover, :focus-within) .adv-toy__frame {
  transform: rotate(calc(var(--tilt) * -3));
}

.adv-toy.is-open .adv-toy__frame::after {
  content: '';
  position: absolute;
  left: calc(50% - 4px);
  top: -16px;
  width: 8px;
  height: 21px;
  background:
    radial-gradient(circle at 50% 4px, #E8909F 0 0.9px, var(--adv-red) 1.6px 3px, var(--adv-red-deep) 3.6px, rgba(142, 34, 56, 0) 4.1px),
    linear-gradient(var(--adv-red), var(--adv-red)) 50% 7px / 1.5px 14px no-repeat;
  pointer-events: none;
}

.adv-toy__frame::before {
  content: '';
  position: absolute;
  inset: 13%;
  z-index: -1;
  border-radius: 18%;
  background: linear-gradient(135deg, #F7FAFF, #CFDDF4);
  box-shadow: 0 10px 24px rgba(4, 10, 30, 0.4), inset 0 0 0 1.5px rgba(255, 255, 255, 0.7);
  transform: rotate(45deg);
}

.adv-toy.is-open .adv-toy__frame::before {
  background: linear-gradient(135deg, #FFF6D6, #F3CF6B);
}

.adv-toy__art {
  width: 74px;
  height: 74px;
  object-fit: contain;
  filter: drop-shadow(0 4px 5px rgba(20, 35, 79, 0.3));
  transition: transform 0.5s var(--ease-spring);
}

.adv-toy.is-open:is(:hover, :focus-within) .adv-toy__art {
  transform: scale(1.12) rotate(-5deg);
}

/* A game still locked is asleep under frost: rime in the corners, its diamond dozing to one side with
   snow on top, the picture as if seen through an iced window */
.adv-toy:not(.is-open) {
  border-color: rgba(213, 226, 246, 0.2);
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' fill='none' stroke='%23fff' stroke-opacity='.42' stroke-width='1.1' stroke-linecap='round'%3E%3Cpath d='M-2 6 60 26M14 11l3-8M14 11l7 5M30 16l4-9M30 16l7 7M45 21l3-7M45 21l6 5M-2-2 44 44M12 12l-1-9M12 12l9 1M24 24l-1-10M24 24l10 1M35 35l-1-7M35 35l7 1M6-2 26 60M11 14l-8 3M11 14l5 7M16 30l-9 4M16 30l7 7M21 45l-7 3M21 45l5 6'/%3E%3C/svg%3E") left top / 92px 92px no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' fill='none' stroke='%23fff' stroke-opacity='.34' stroke-width='1.1' stroke-linecap='round'%3E%3Cg transform='rotate(180 50 50)'%3E%3Cpath d='M-2 6 60 26M14 11l3-8M14 11l7 5M30 16l4-9M30 16l7 7M45 21l3-7M45 21l6 5M-2-2 44 44M12 12l-1-9M12 12l9 1M24 24l-1-10M24 24l10 1M6-2 26 60M11 14l-8 3M11 14l5 7M16 30l-9 4M16 30l7 7'/%3E%3C/g%3E%3C/svg%3E") right bottom / 76px 76px no-repeat,
    linear-gradient(165deg, rgba(213, 226, 246, 0.1), rgba(213, 226, 246, 0.03) 55%, rgba(213, 226, 246, 0.07));
}

.adv-toy:not(.is-open) .adv-toy__frame {
  transform-origin: 50% 92%;
  rotate: -6deg;
}

.adv-toy:not(.is-open) .adv-toy__frame::before {
  background: linear-gradient(135deg, #F1F5FC, #C3D1EA);
  box-shadow: 0 10px 24px rgba(4, 10, 30, 0.4), inset 0 0 0 1.5px rgba(255, 255, 255, 0.85), inset 0 -8px 14px rgba(140, 168, 212, 0.4);
}

.adv-toy:not(.is-open) .adv-toy__frame::after {
  content: '';
  position: absolute;
  left: calc(50% - 20px);
  top: -11px;
  width: 40px;
  height: 24px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 24'%3E%3Cpath fill='%23fff' stroke='%23C9D8EE' stroke-width='.8' d='M9 25C8 19 12 13 17 12.5 19 9.5 24 9.5 25.5 12.5 30 13 33 19 31 25L20 15.5Z'/%3E%3Cpath fill='%23E4ECF8' d='M12 22.4 20 15.5 28.3 22.6C25 21 22.5 19.6 20 19.4 17.5 19.6 15 21 12 22.4Z'/%3E%3C/svg%3E") center / contain no-repeat;
  pointer-events: none;
}

.adv-toy:not(.is-open) .adv-toy__art {
  filter: grayscale(0.85) blur(0.4px) opacity(0.5);
}

.adv-toy__name {
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.adv-toy__blurb {
  margin: 6px 0 14px;
  color: var(--adv-soft-on-night);
  font-size: 14px;
  line-height: 1.45;
}

.adv-toy:not(.is-open) .adv-toy__name {
  color: #E2EAF8;
}

.adv-toy__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: auto;
}

.adv-toy__play {
  min-height: 44px;
  padding: 0 20px;
  border: 0;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, #FBE9A9, var(--adv-gold));
  color: #3D2A00;
  font-size: 15px;
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28), inset 0 0 0 1.5px rgba(255, 255, 255, 0.5);
  backdrop-filter: none;
}

.adv-toy__play:hover {
  background: linear-gradient(135deg, #FFF3C4, #F3CC62);
  color: #3D2A00;
}

.adv-toy__play.btn--ghost {
  background: transparent;
  color: var(--adv-gold-light);
  box-shadow: inset 0 0 0 1.5px rgba(249, 226, 154, 0.6);
}

.adv-toy__play.btn--ghost:hover {
  background: rgba(249, 226, 154, 0.14);
  color: #fff;
}

.adv-toy__play:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

.adv-toy__later {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 5px 12px;
  border-radius: 16px;
  background: rgba(8, 18, 48, 0.4);
  color: var(--adv-soft-on-night);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  text-wrap: balance;
}

.adv-toy__later--lock::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--adv-dusk);
  transform: rotate(45deg);
}

/* phones: the cards are set out quicker, the rime is smaller (it keeps off the words) and the
   smaller diamond's snow sits a little higher */
@media (max-width: 759px) {
  .adv-toys {
    --step: 0.045s;
  }

  .adv-toy:not(.is-open) {
    background-size: 68px 68px, 52px 52px, auto;
  }

  .adv-toy:not(.is-open) .adv-toy__frame::after {
    top: -13px;
  }
}

/* calm motion: the shelf is simply there, toys standing, candles lit, the sky still */
@media (prefers-reduced-motion: reduce) {
  .js .adv-shelf__panel.is-in + .adv-shelf__top .adv-shelf__toy,
  .adv-shelf__flame,
  .adv-shelf__stars::after {
    animation: none;
  }

  .adv-shelf__stars,
  .js .adv-shelf__head > *,
  .adv-toy,
  .adv-toy__frame {
    transition: none;
  }

  .adv-toy.is-open:is(:hover, :focus-within) .adv-toy__frame {
    transform: none;
  }
}

/* =============================================
   A GAME BEING PLAYED
   The box and its bar; what is inside belongs to the game
   (js/games/<id>.js with js/games/<id>.css).
   ============================================= */
.adv-game {
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: hidden;
}

.adv-game[open] {
  display: grid;
  place-items: center;
}

.adv-game::backdrop {
  background: rgba(8, 18, 48, 0.74);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.adv-game__box {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(1120px, calc(100vw - 40px));
  height: min(780px, calc(100dvh - 40px));
  overflow: hidden;
  border-radius: 30px;
  background: var(--adv-night-1);
  color: var(--adv-on-night);
  box-shadow: 0 40px 100px rgba(4, 10, 30, 0.6);
  animation: adv-sheet-in 0.5s var(--ease-out) both;
}

.adv-game__bar {
  position: relative;
  z-index: 2;
  display: flex;
  flex: none;
  align-items: center;
  gap: 12px;
  min-height: 60px;
  padding: 8px 10px 8px 22px;
  background: var(--adv-night-0);
}

.adv-game__title {
  color: #fff;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.adv-game__level {
  padding: 4px 11px;
  border-radius: var(--radius-full);
  background: rgba(249, 226, 154, 0.16);
  color: var(--adv-gold-light);
  font-size: 12.5px;
  font-weight: 700;
}

.adv-game__level:empty {
  display: none;
}

.adv-game__x {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-left: auto;
  border: 0;
  border-radius: 50%;
  background: rgba(244, 247, 252, 0.12);
  color: #fff;
  cursor: pointer;
  transition: transform 0.25s var(--ease-spring), background-color 0.2s ease;
}

.adv-game__x:hover {
  background: rgba(244, 247, 252, 0.22);
  transform: rotate(90deg);
}

.adv-game__x:focus-visible {
  outline: 3px solid var(--adv-gold-light);
  outline-offset: 2px;
}

.adv-game__x svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
}

.adv-game__root {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.adv-game__wait {
  display: grid;
  place-items: center;
  height: 100%;
  padding: 24px;
  color: var(--adv-soft-on-night);
  font: italic 600 22px/1.4 var(--serif);
  text-align: center;
}

/* =============================================
   SOURCES
   ============================================= */
.adv-sources {
  padding: clamp(48px, 7vw, 88px) 0 clamp(64px, 8vw, 104px);
}

.adv-srcbox {
  max-width: 860px;
  margin: 0 auto;
}

.adv-sources {
  --adv-pin: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-12 -15 24 30'%3E%3Cdefs%3E%3ClinearGradient id='s' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop offset='0' stop-color='%23FCEBB0'/%3E%3Cstop offset='.5' stop-color='%23E2B043'/%3E%3Cstop offset='1' stop-color='%23A9781C'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M0-13 9 0 0 13-9 0z' fill='none' stroke='url(%23s)' stroke-width='3.6' stroke-linejoin='round'/%3E%3Ccircle r='4.4' fill='%23B3324A'/%3E%3C/svg%3E");
}

.adv-sources__title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  color: var(--text);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* a straw diamond with a red bead, as the garland's pins */
.adv-sources__title::before {
  content: '';
  flex: none;
  width: 16px;
  height: 20px;
  background: var(--adv-pin) 50% 50% / contain no-repeat;
}

.adv-sources .sources__list--article {
  border-color: #F0E3C4;
  box-shadow: 0 12px 30px rgba(107, 74, 0, 0.06);
}

.adv-sources .sources__list a:hover {
  background: #FFF8E8;
}

.adv-sources .dot {
  width: 12px;
  height: 15px;
  margin-top: 3px;
  border-radius: 0;
  background: var(--adv-pin) 50% 50% / contain no-repeat;
}

/* =============================================
   THE CLOSING SCENE
   On this page the blog's blue box at the end becomes a winter night that closes the page as the hero
   opened it: the same sky and stars, a snow hill, the big felt spruce with its candles breathing, the
   presents and the sledge beside it and the lantern on the other side. --m is a metre of that world: the
   pictures are 1100 px a metre, so a prop is (its picture's height / 1100) × --m tall (--t). The props
   rise a little as the box comes in.
   ============================================= */
.adv-cta .b-cta__inner {
  --snow: clamp(92px, 9vw, 124px);
  max-width: 1160px;
  padding-bottom: calc(clamp(48px, 7vw, 80px) + var(--snow) * 0.62);
  background: linear-gradient(180deg, var(--adv-night-0) 0%, var(--adv-night-1) 30%, var(--adv-night-2) 66%, var(--adv-night-3) 100%);
  box-shadow: 0 34px 80px rgba(14, 30, 71, 0.3);
}

/* moonlight in the corner, and the last light on the horizon */
.adv-cta .cta__orb--1 {
  top: -150px;
  right: auto;
  left: -80px;
  width: 440px;
  height: 440px;
  background: #BFD2FF;
  opacity: 0.17;
  filter: blur(70px);
}

.adv-cta .cta__orb--2 {
  left: 8%;
  right: 8%;
  bottom: 0;
  width: auto;
  height: 48%;
  background: #AAC4F5;
  opacity: 0.28;
  filter: blur(56px);
}

.adv-cta .cta__bg > .adv-hero__stars {
  bottom: 38%;
}

.adv-cta .cta__title {
  text-shadow: 0 2px 22px rgba(8, 18, 48, 0.55);
}

.adv-cta .cta__subtitle {
  color: rgba(244, 247, 252, 0.88);
}

.adv-cta .b-cta__store {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3);
}

/* --low: how far below their places the hills and props still are, 1 … 0; they are up once the box
   is about in the middle of the screen (--p from js/motion.js) */
.adv-cta__scene {
  --m: clamp(300px, 31vw, 460px);
  --low: clamp(0, (0.48 - var(--p, 0.5)) * 4, 1);
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.adv-cta__hill {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  translate: 0 calc(var(--low) * var(--rise));
}

.adv-cta__hill--far {
  --rise: 16px;
  height: calc(var(--snow) * 1.5);
  background: linear-gradient(180deg, #8FA9DC, #B5C8EC);
  opacity: 0.78;
  -webkit-mask: var(--adv-hills-far) repeat-x 74% 100% / calc(var(--m) * 2.3) 100%;
  mask: var(--adv-hills-far) repeat-x 74% 100% / calc(var(--m) * 2.3) 100%;
}

.adv-cta__hill--near {
  --rise: 8px;
  height: var(--snow);
  background: linear-gradient(180deg, #C7D7F3 0%, #DDE8F9 36%, #EEF5FD 82%);
  -webkit-mask: var(--adv-hills) repeat-x 28% 100% / calc(var(--m) * 2.9) 100%;
  mask: var(--adv-hills) repeat-x 28% 100% / calc(var(--m) * 2.9) 100%;
}

.adv-cta__prop {
  position: absolute;
  left: var(--x);
  bottom: calc(var(--snow) * var(--s));
  height: calc(var(--t) * var(--m) * var(--k, 1));
  translate: -50% calc(var(--low) * var(--rise, 34px));
}

.adv-cta__prop > img {
  display: block;
  width: 100%;
  height: 100%;
}

/* what stands on the near snow throws a little shadow on it */
.adv-cta__prop::before {
  content: '';
  position: absolute;
  left: 4%;
  right: 4%;
  bottom: -7%;
  height: 18%;
  z-index: -1;
  background: radial-gradient(closest-side, rgba(52, 88, 159, 0.36), rgba(52, 88, 159, 0));
}

/* candle light: two layers of glow that breathe by turns */
.adv-cta__prop > i {
  position: absolute;
  inset: 0;
  mix-blend-mode: screen;
  animation: adv-cta-breathe 3.4s ease-in-out infinite alternate;
}

.adv-cta__prop > i + i {
  animation-duration: 4.6s;
  animation-delay: -2.1s;
}

@keyframes adv-cta-breathe {
  from { opacity: 0.5; }
  to { opacity: 1; }
}

.adv-cta__prop--straw { aspect-ratio: 471 / 607; --t: 0.552; --k: 0.82; --x: 9%; --s: 0.66; --rise: 22px; }
.adv-cta__prop--spruce { aspect-ratio: 633 / 744; --t: 0.676; --x: 86%; --s: 0.42; --rise: 26px; }
.adv-cta__prop--lantern { aspect-ratio: 161 / 223; --t: 0.203; --k: 1.3; --x: 17%; --s: 0.1; --rise: 40px; }
.adv-cta__prop--gifts { aspect-ratio: 423 / 253; --t: 0.23; --k: 1.05; --x: 73%; --s: 0.08; --rise: 44px; }
.adv-cta__prop--sledge { aspect-ratio: 446 / 170; --t: 0.155; --k: 1.05; --x: 88.5%; --s: 0.03; --rise: 50px; }

.adv-cta__prop--straw > img {
  filter: brightness(0.82) saturate(0.85);
}

.adv-cta__prop--straw::before {
  display: none;
}

.adv-cta__prop--spruce > i:nth-of-type(1) { background-image: radial-gradient(ellipse 10.8% 9.2% at 24.3% 47.1%, rgba(255, 248, 226, 1) 0, rgba(255, 226, 150, 0.9) 9%, rgba(255, 204, 112, 0.42) 26%, rgba(255, 190, 92, 0.14) 56%, rgba(255, 190, 92, 0) 100%), radial-gradient(ellipse 10.8% 9.2% at 44.6% 40.3%, rgba(255, 248, 226, 1) 0, rgba(255, 226, 150, 0.9) 9%, rgba(255, 204, 112, 0.42) 26%, rgba(255, 190, 92, 0.14) 56%, rgba(255, 190, 92, 0) 100%), radial-gradient(ellipse 10.8% 9.2% at 27.6% 45.8%, rgba(255, 248, 226, 1) 0, rgba(255, 226, 150, 0.9) 9%, rgba(255, 204, 112, 0.42) 26%, rgba(255, 190, 92, 0.14) 56%, rgba(255, 190, 92, 0) 100%); }
.adv-cta__prop--spruce > i:nth-of-type(2) { background-image: radial-gradient(ellipse 10.8% 9.2% at 88.4% 78.9%, rgba(255, 248, 226, 1) 0, rgba(255, 226, 150, 0.9) 9%, rgba(255, 204, 112, 0.42) 26%, rgba(255, 190, 92, 0.14) 56%, rgba(255, 190, 92, 0) 100%), radial-gradient(ellipse 10.8% 9.2% at 85.2% 64.3%, rgba(255, 248, 226, 1) 0, rgba(255, 226, 150, 0.9) 9%, rgba(255, 204, 112, 0.42) 26%, rgba(255, 190, 92, 0.14) 56%, rgba(255, 190, 92, 0) 100%), radial-gradient(ellipse 10.8% 9.2% at 63.5% 59.4%, rgba(255, 248, 226, 1) 0, rgba(255, 226, 150, 0.9) 9%, rgba(255, 204, 112, 0.42) 26%, rgba(255, 190, 92, 0.14) 56%, rgba(255, 190, 92, 0) 100%); }
.adv-cta__prop--lantern > i { background-image: radial-gradient(ellipse 42.4% 30.6% at 50.1% 62.3%, rgba(255, 248, 226, 1) 0, rgba(255, 226, 150, 0.9) 9%, rgba(255, 204, 112, 0.42) 26%, rgba(255, 190, 92, 0.14) 56%, rgba(255, 190, 92, 0) 100%); }

/* the lantern's light lies warm on the snow round it */
.adv-cta__prop--lantern::after {
  content: '';
  position: absolute;
  left: -90%;
  right: -90%;
  bottom: -22%;
  height: 52%;
  background: radial-gradient(closest-side, rgba(255, 214, 140, 0.5), rgba(255, 214, 140, 0));
  mix-blend-mode: screen;
  animation: adv-cta-breathe 3.4s ease-in-out infinite alternate;
}

/* below the width where the props fit beside the words, they stand on the snow under the buttons */
@media (max-width: 1023px) {
  .adv-cta .b-cta__inner {
    --snow: clamp(76px, 12vw, 104px);
    padding-bottom: calc(var(--stage) + 28px);
    --stage: clamp(150px, 30vw, 230px);
  }

  .adv-cta__scene {
    --m: clamp(220px, 44vw, 330px);
  }

  .adv-cta__prop--spruce { --x: 79%; --s: 0.3; }
  .adv-cta__prop--gifts { --x: 54%; --k: 0.95; --s: 0.06; }
  .adv-cta__prop--lantern { --x: 21%; --k: 1.2; --s: 0.14; }
  .adv-cta__prop--straw { --x: 7%; --s: 0.6; --k: 0.62; }
  .adv-cta__prop--sledge { display: none; }
}

@media (max-width: 759px) {
  .adv-cta__prop--straw { display: none; }
  .adv-cta__prop--lantern { --x: 17%; }
  .adv-cta__prop--gifts { --x: 48%; }
}

@media (prefers-reduced-motion: reduce) {
  .adv-cta__prop > i,
  .adv-cta__prop--lantern::after {
    animation: none;
  }
}

/* =============================================
   A DOOR, OPENED
   ============================================= */
.adv-sheet {
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: hidden;
}

.adv-sheet[open] {
  display: grid;
  place-items: center;
}

.adv-sheet::backdrop {
  background: rgba(8, 18, 48, 0.66);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.adv-sheet__box {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  width: min(1060px, calc(100vw - 40px));
  height: min(760px, calc(100dvh - 40px));
  overflow: hidden;
  border-radius: 30px;
  background: #fff;
  box-shadow: 0 40px 100px rgba(4, 10, 30, 0.6);
  animation: adv-sheet-in 0.5s var(--ease-out) both;
}

@keyframes adv-sheet-in {
  from { opacity: 0; scale: 0.94; translate: 0 24px; }
}

.adv-sheet__stage {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: linear-gradient(180deg, var(--adv-night-0), var(--adv-night-1) 30%, var(--adv-night-2) 70%, var(--adv-night-3));
}

.adv-sheet__stage .adv-hero__stars {
  bottom: 20%;
}

.adv-sheet__ground {
  position: absolute;
  inset: auto 0 0;
  height: 30%;
  background: radial-gradient(90% 100% at 50% 100%, rgba(255, 214, 130, 0.16), transparent 70%);
}

.adv-sheet__stage .adv-canvas {
  position: absolute;
  inset: 0;
}

.adv-sheet__icon {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(46%, 220px);
  aspect-ratio: 1;
  translate: -50% -50%;
  fill: none;
  stroke: var(--adv-gold-light);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 24px rgba(237, 190, 78, 0.5));
}

.adv-sheet:not(.is-flat) .adv-sheet__icon {
  display: none;
}

.adv-sheet__card {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: clamp(26px, 3.2vw, 44px) clamp(22px, 3.2vw, 42px) clamp(20px, 2.4vw, 30px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.adv-sheet__date {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 9px;
  padding: 6px 14px 6px 11px;
  border-radius: var(--radius-full);
  background: var(--butter-2);
  color: var(--butter-ink);
  font-size: 13.5px;
  font-weight: 700;
}

.adv-sheet__date::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--adv-red);
  transform: rotate(45deg);
}

.adv-sheet__title {
  margin-top: 16px;
  color: var(--text);
  font-size: clamp(30px, 3.4vw, 44px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.05;
  text-wrap: balance;
}

.adv-sheet__tying {
  margin-top: 14px;
  color: var(--primary);
  font: italic 600 22px/1.3 var(--serif);
}

.adv-sheet__tying:empty {
  display: none;
}

.adv-sheet__body {
  margin-top: 14px;
  transition: opacity 0.6s ease, translate 0.6s var(--ease-out);
}

.is-tying .adv-sheet__body {
  opacity: 0;
  translate: 0 14px;
}

.adv-sheet__line {
  color: var(--text-secondary);
  font-size: clamp(17px, 1.5vw, 19.5px);
  line-height: 1.6;
}

.adv-note {
  position: relative;
  margin-top: 16px;
  padding: 14px 18px 16px;
  border-radius: var(--radius-xl);
}

.adv-note__tag {
  margin-bottom: 5px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.adv-note__text {
  color: var(--text);
  font-size: 16px;
  line-height: 1.55;
}

/* the prank: a note the elf left, pinned a little crooked */
.adv-note--prank {
  background: #FDEEF1;
  rotate: -0.6deg;
}

.adv-note--prank::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 22px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--adv-red);
  box-shadow: 0 2px 4px rgba(90, 15, 30, 0.35), inset -2px -2px 0 rgba(0, 0, 0, 0.14);
}

.adv-note--prank .adv-note__tag {
  color: #9B2940;
}

.adv-note--prank .adv-note__text {
  font-family: var(--serif);
  font-size: 18.5px;
  font-style: italic;
  font-weight: 600;
  line-height: 1.4;
}

.adv-note--task {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  background: var(--sky-1);
}

.adv-note--task .adv-note__tag {
  color: var(--sky-ink);
}

.adv-note__pic {
  width: 84px;
  height: 84px;
  object-fit: contain;
  filter: drop-shadow(0 6px 8px rgba(36, 75, 135, 0.18));
}

.adv-note__pic[hidden] {
  display: none;
}

.adv-play {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding: 12px 14px 12px 12px;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, var(--adv-night-2), var(--adv-night-1));
  color: var(--adv-on-night);
}

.adv-play[hidden] {
  display: none;
}

.adv-play__art {
  width: 58px;
  height: 58px;
  padding: 5px;
  border-radius: 16px;
  background: linear-gradient(135deg, #F7FAFF, #D5E2F6);
  object-fit: contain;
}

.adv-play .adv-note__tag {
  margin-bottom: 2px;
  color: var(--adv-gold-light);
}

.adv-play__name {
  font-size: 17.5px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.adv-play__note {
  margin-top: 2px;
  color: var(--adv-soft-on-night);
  font-size: 13.5px;
  line-height: 1.4;
}

/* the golden button: play */
.adv-go {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border: 0;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, #FBE9A9, var(--adv-gold));
  color: #3D2A00;
  font: 800 15.5px/1 var(--font, inherit);
  font-family: inherit;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28), inset 0 0 0 1.5px rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: transform 0.3s var(--ease-spring), box-shadow 0.3s ease;
}

.adv-go:hover {
  transform: translateY(-2px) scale(1.03);
}

.adv-go:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

.adv-go[hidden] {
  display: none;
}

.adv-sheet__actions {
  margin-top: auto;
  padding-top: 18px;
}

.adv-sheet__actions .btn {
  min-height: 44px;
  padding-top: 0;
  padding-bottom: 0;
}

.adv-sheet__x {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(244, 247, 252, 0.92);
  color: var(--text);
  cursor: pointer;
  transition: transform 0.25s var(--ease-spring);
}

.adv-sheet__x:hover {
  transform: rotate(90deg);
}

.adv-sheet__x svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
}

/* =============================================
   CHRISTMAS COLOURS
   Berry red and spruce green beside the night blue and the straw gold: each section's
   tag and the words its heading stresses take one of them, as the doors do.
   ============================================= */
.adv-cal .section__tag {
  background: #FBE4E8;
  color: #A22D45;
}

.adv-cal .b-title .serif-accent {
  color: var(--adv-red);
}

/* (the felt band of "Kaip tai veikia" and the wall of "Kas tas sodas?" set their own colours in their sections) */

/* =============================================
   SMALLER SCREENS
   ============================================= */
@media (max-width: 1023px) {
  .adv-hero {
    min-height: 0;
  }

  .adv-hero__inner {
    display: block;
    min-height: 0;
    padding: 0;
  }

  .adv-hero__top {
    padding: 22px var(--space-lg) 0;
  }

  .adv-hero__title {
    font-size: clamp(38px, 10.6vw, 68px);
  }

  .adv-hero__stage {
    height: clamp(560px, 158vw, 780px);
    margin-top: 0;
  }

  .adv-hills {
    --m: clamp(330px, 84.6vw, 560px);
    --hill: clamp(120px, 30vw, 190px);
    --near-w: calc(var(--m) * 4.3636);
    --far-w: calc(var(--m) * 3.3333);
    --far-x: calc(var(--m) * 0.68);
  }

  .adv-bubble {
    left: 56%;
    top: 26%;
  }

  /* below the garden the text stands on the snow */
  .adv-hero__more {
    --adv-more-text: var(--text-secondary);
    --adv-more-strong: var(--text);
    --adv-more-field: #fff;
    --adv-more-line: #C9D8EF;
    padding: 6px var(--space-lg) 44px;
    background: var(--tone, #EEF5FD);
    transition: background-color 0.9s ease;
  }

  .adv-hero__dek {
    margin-top: 8px;
  }

  .adv-btn-ghost {
    color: var(--primary-dark);
  }
}

@media (max-width: 759px) {
  .adv-sheet__box {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 36%) minmax(0, 1fr);
    width: 100vw;
    height: 100dvh;
    border-radius: 0;
    transition: grid-template-rows 0.8s var(--ease-out);
  }

  /* while the elf is tying the new piece, the garden has the stage */
  .adv-sheet__box:has(.is-tying) {
    grid-template-rows: minmax(0, 54%) minmax(0, 1fr);
  }

  .adv-sheet__card {
    border-radius: 26px 26px 0 0;
    margin-top: -22px;
    background: #fff;
    position: relative;
    z-index: 1;
  }

  .adv-name__ok {
    padding: 0 16px;
  }

  .adv-game__box {
    width: 100vw;
    height: 100dvh;
    border-radius: 0;
  }

  .adv-game__bar {
    min-height: 54px;
    padding-left: 16px;
  }

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

  .adv-go[data-sheet-play] {
    grid-column: 1 / -1;
  }

  .adv-toys {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .adv-toy {
    padding: 16px 10px 14px;
    border-radius: 22px;
  }

  .adv-toy__frame {
    width: 86px;
    height: 86px;
    margin-bottom: 10px;
  }

  .adv-toy__art {
    width: 60px;
    height: 60px;
  }

  .adv-toy__name {
    font-size: 16px;
  }

  .adv-toy__blurb {
    font-size: 13px;
  }
}

/* a phone lying on its side: a game gets the whole screen */
@media (max-height: 560px) {
  .adv-game__box {
    width: 100vw;
    height: 100dvh;
    border-radius: 0;
  }

  .adv-game__bar {
    min-height: 46px;
    padding-top: 2px;
    padding-bottom: 2px;
  }

  .adv-game__x {
    width: 40px;
    height: 40px;
  }
}

@media (min-width: 760px) and (max-width: 1023px) {
  .adv-toys {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 640px) {
  .adv-doors {
    --cols: 10;
    --rows: 10;
    max-width: 700px;
  }

  .adv-door__num { font-size: 30px; }
  .adv-door__icon { width: 18px; height: 18px; }
  .adv-door.is-ready .adv-door__num { font-size: 38px; }
  .adv-door.is-open .adv-door__icon { width: 44px; height: 44px; }
  .adv-door.is-open .adv-door__num { font-size: 18px; }
  .adv-door--last .adv-door__num { font-size: 68px; }
  .adv-door--last .adv-door__icon { width: 34px; height: 34px; }
  .adv-door--last.is-open .adv-door__icon { width: 96px; height: 96px; }
  .adv-door--last.is-open .adv-door__num { font-size: 28px; }
  .adv-door__pic { width: 74px; }
  .adv-door--last .adv-door__pic { width: 138px; }
  .adv-door::before { width: 9px; height: 9px; }
}

@media (min-width: 1100px) {
  .adv-doors {
    --cols: 16;
    --rows: 7;
    max-width: 1080px;
  }

  .adv-door__num { font-size: 29px; }
  .adv-door.is-ready .adv-door__num { font-size: 36px; }
  .adv-door.is-open .adv-door__icon { width: 42px; height: 42px; }
  .adv-door--last .adv-door__num { font-size: 64px; }
  .adv-door--last.is-open .adv-door__icon { width: 92px; height: 92px; }
  .adv-door__pic { width: 70px; }
  .adv-door--last .adv-door__pic { width: 132px; }
}

/* =============================================
   IN THE LAVIJU APP, AND CALM MOTION
   ============================================= */
html.in-app .adv-game__bar {
  padding-top: calc(8px + var(--app-bar));
}

html.in-app .adv-hero__top {
  padding-top: calc(10px + var(--app-bar));
}

@media (prefers-reduced-motion: reduce) {
  .adv-hero__stars--b,
  .adv-tree > i,
  .adv-status::before,
  .adv-door.is-today .adv-door__btn,
  .adv-hero__ghost,
  .adv-sheet__box,
  .adv-game__box {
    animation: none;
  }

  .adv-toy,
  .adv-toy__art,
  .adv-go,
  .adv-shelf__top,
  .adv-sheet__box {
    transition: none;
  }

  .adv-canvas,
  .adv-sheet__body {
    transition: none;
  }
}
