:root {
  --paper: #FCF8E7;
  --paper-2: #F5EAD0;
  --icing: #FFFDF6;
  --tomato: #F55136;
  --tomato-dk: #C8361F;
  --ginger: #9A5530;
  --ginger-dk: #6B3519;
  --teal: #4BA69A;
  --teal-dk: #2D6F68;
  --mustard: #F2A93B;
  --ink: #3E2415;
  --ink-2: #7A5A45;
  --night: #1E3A42;
  --night-2: #162D34;
  --radius: 22px;
  --shadow: 6px 6px 0 rgba(107, 53, 25, .16);
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --hand: "Shantell Sans", "Comic Sans MS", cursive;
  --serif: "Fraunces", Georgia, serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: "Poppins", system-ui, sans-serif;
  color: var(--ink);
  background-color: var(--paper);
  /* soft paper grain */
  background-image:
    radial-gradient(rgba(154, 85, 48, .05) 1px, transparent 1.2px),
    radial-gradient(rgba(154, 85, 48, .04) 1px, transparent 1.2px);
  background-size: 22px 22px, 31px 31px;
  background-position: 0 0, 11px 7px;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

#snow { position: fixed; inset: 0; pointer-events: none; z-index: 50; }

/* ---------------- garland ---------------- */
.garland { position: relative; height: 66px; overflow: hidden; z-index: 20; }
.garland svg { position: absolute; inset: 0 0 auto; width: 100%; height: 34px; }
.garland path { fill: none; stroke: var(--teal-dk); stroke-width: 3px; vector-effect: non-scaling-stroke; }
.bulb {
  --c: #F55136;
  position: absolute; top: 22px;
  width: 16px; height: 26px; margin-left: -8px;
  padding: 0; border: 0;
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  background: radial-gradient(circle at 35% 30%, #fff9 0 15%, transparent 35%), var(--c);
  box-shadow: 0 0 10px 1px color-mix(in srgb, var(--c) 70%, transparent), 0 0 26px 4px color-mix(in srgb, var(--c) 30%, transparent);
  cursor: pointer;
  animation: twinkle 2.6s ease-in-out var(--delay) infinite;
  transition: transform .2s var(--ease-out);
}
.bulb::before { content: ""; position: absolute; left: 3px; top: -7px; width: 10px; height: 8px; border-radius: 2px; background: var(--teal-dk); }
.bulb:hover { transform: scale(1.15) rotate(-6deg); }
.bulb:active { transform: scale(.92); }
.bulb.pop { animation: pop .5s var(--ease-spring), twinkle 2.6s ease-in-out .5s infinite; }
.bulb:nth-child(odd) { rotate: 8deg; }
.bulb:nth-child(even) { rotate: -6deg; }
@keyframes twinkle { 0%, 100% { filter: brightness(1.05); } 50% { filter: brightness(.82) saturate(.85); } }
@keyframes pop { 0% { scale: 1; } 40% { scale: 1.45; } 100% { scale: 1; } }

/* ---------------- hero ---------------- */
.hero {
  position: relative;
  max-width: 1240px;
  margin: 0 auto;
  padding: clamp(20px, 4vw, 50px) clamp(18px, 4vw, 40px) 44px;
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  align-items: center;
  gap: 20px;
  z-index: 10;
}
.eyebrow {
  margin: 0 0 6px;
  font-family: var(--hand);
  font-weight: 600;
  font-size: 18px;
  color: var(--teal-dk);
}
h1 {
  margin: 0;
  font-family: var(--serif);
  font-variation-settings: "SOFT" 100, "opsz" 144;
  font-weight: 600;
  font-size: clamp(54px, 9vw, 120px);
  line-height: .9;
  letter-spacing: -.025em;
  color: var(--tomato);
}
.h1-small {
  display: block;
  font-family: var(--hand);
  font-size: .36em;
  font-weight: 700;
  letter-spacing: 0;
  color: var(--ginger);
  transform: rotate(-3deg);
  transform-origin: left;
  margin-bottom: .12em;
}
.hero-sub { margin: 16px 0 0; font-size: 17px; color: var(--ink-2); }

.countdown { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin: 26px 0 26px; min-height: 76px; }
.cd {
  position: relative;
  display: grid; place-items: center;
  width: 72px; padding: 12px 0 9px;
  border-radius: 16px;
  color: var(--icing);
  background: var(--tomato);
  box-shadow: 4px 4px 0 var(--tomato-dk);
}
.cd:nth-child(2) { background: var(--teal); box-shadow: 4px 4px 0 var(--teal-dk); }
.cd:nth-child(3) { background: var(--mustard); box-shadow: 4px 4px 0 #C9821C; color: var(--ink); }
.cd:nth-child(4) { background: var(--ginger); box-shadow: 4px 4px 0 var(--ginger-dk); }
.cd b { font-family: var(--serif); font-size: 30px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1; }
.cd i { font-style: normal; font-family: var(--hand); font-size: 12px; margin-top: 3px; opacity: .9; }
.cd-label { flex-basis: 100%; font-family: var(--hand); font-size: 15px; color: var(--ink-2); }
.merry { font-family: var(--serif); font-size: 36px; color: var(--tomato); }

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font: 600 16px/1 var(--hand);
  padding: 13px 22px;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform .15s var(--ease-out), box-shadow .15s var(--ease-out);
}
.btn-primary { color: var(--icing); background: var(--tomato); border-color: var(--tomato-dk); box-shadow: 4px 4px 0 var(--tomato-dk); }
.btn-primary:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--tomato-dk); }
.btn-primary:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--tomato-dk); }
.btn-ghost { color: var(--ginger-dk); background: var(--icing); border-color: var(--ginger); box-shadow: 4px 4px 0 rgba(107, 53, 25, .25); }
.btn-ghost:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 rgba(107, 53, 25, .25); }
.btn-ghost:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 rgba(107, 53, 25, .25); }

/* decorations */
.deco { position: absolute; pointer-events: none; }
.deco-flake1 { width: 120px; height: 120px; color: var(--tomato); top: 4px; left: 46%; opacity: .9; animation: spin 40s linear infinite; }
.deco-flake2 { width: 64px; height: 64px; color: var(--teal); bottom: 40px; left: -14px; opacity: .8; animation: spin 30s linear infinite reverse; }
.deco-star { width: 70px; height: 70px; top: 30%; right: 3%; animation: twinkle-star 3s ease-in-out infinite; z-index: 2; }
.deco-ornament { width: 54px; height: 82px; top: -6px; left: 36%; transform-origin: 50% 0; animation: swing 4s ease-in-out infinite; }
@keyframes spin { to { rotate: 360deg; } }
@keyframes swing { 0%, 100% { rotate: -7deg; } 50% { rotate: 7deg; } }
@keyframes twinkle-star { 0%, 100% { scale: 1; rotate: 0deg; } 50% { scale: .82; rotate: 22deg; } }

/* hero art: house + gramophone */
.hero-art { position: relative; justify-self: center; width: min(100%, 380px); }

/* gramophone (Rive canvas) */
.phono {
  position: absolute; z-index: 3;
  left: -40%; bottom: -8%;
  width: 58%;
  padding: 0; border: 0; background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.phono canvas { display: block; width: 100%; aspect-ratio: 500 / 640; transition: transform .35s var(--ease-spring); }
.phono:hover canvas { transform: rotate(-3deg) scale(1.04); }
.phono:active canvas { transform: scale(.96); }
.phono:focus-visible { outline: 3px solid var(--teal); outline-offset: 4px; border-radius: 16px; }
.phono-label {
  position: absolute; left: 50%; bottom: -26px; translate: -50% 0;
  font: 600 15px/1 var(--hand); color: var(--teal-dk);
  white-space: nowrap;
  transform: rotate(-4deg);
}
.phono-label::before { content: "♪ "; color: var(--tomato); }
.phono[aria-pressed="true"] .phono-label { color: var(--tomato); }

/* gingerbread house */
.house-btn { position: relative; display: block; margin-left: auto; width: min(100%, 380px); padding: 0; border: 0; background: none; cursor: pointer; }
.house { width: 100%; height: auto; overflow: visible; filter: drop-shadow(0 12px 16px rgba(107, 53, 25, .18)); transition: transform .4s var(--ease-spring); }
.house-btn:hover .house { transform: rotate(-1.5deg) scale(1.02); }
.house .pane { fill: #4BA69A; transition: fill .4s; }
.house-btn.lit .pane { fill: #FFC85A; }
.house-btn.lit .house { filter: drop-shadow(0 12px 16px rgba(107, 53, 25, .18)) drop-shadow(0 0 30px rgba(255, 200, 90, .55)); }
.house .smoke circle { fill: #E9DFC9; opacity: 0; }
.house-btn.lit .smoke circle { animation: puff 2.4s ease-out infinite; }
.house-btn.lit .smoke circle:nth-child(2) { animation-delay: .6s; }
.house-btn.lit .smoke circle:nth-child(3) { animation-delay: 1.2s; }
@keyframes puff { 0% { opacity: 0; transform: translateY(14px) scale(.5); } 30% { opacity: .9; } 100% { opacity: 0; transform: translateY(-16px) scale(1.2); } }
.house .sprinkles circle { transform-box: fill-box; transform-origin: center; }
.house-btn.lit .sprinkles circle { animation: blink 1.2s ease-in-out infinite; }
.house-btn.lit .sprinkles circle:nth-child(even) { animation-delay: .6s; }
@keyframes blink { 50% { opacity: .35; transform: scale(.8); } }
.house-hint {
  position: absolute; left: 50%; bottom: -30px; translate: -50% 0;
  font-family: var(--hand); font-size: 15px; color: var(--ginger);
  white-space: nowrap;
  transform: rotate(-3deg);
  transition: opacity .3s;
}
.house-hint::before { content: "↑ "; }
.house-btn.lit .house-hint { opacity: 0; }

/* ---------------- toolbar ---------------- */
.toolbar { position: sticky; top: 10px; z-index: 30; display: flex; justify-content: center; margin: 26px 12px 4px; }
.filters {
  display: flex; gap: 4px; flex-wrap: wrap; justify-content: center;
  padding: 6px;
  border-radius: 999px;
  background: rgba(255, 253, 246, .92);
  border: 2px solid var(--ginger);
  box-shadow: 4px 4px 0 rgba(107, 53, 25, .2);
  backdrop-filter: blur(8px);
}
.filters button {
  font: 600 15px/1 var(--hand);
  color: var(--ginger-dk);
  background: none; border: 0;
  padding: 9px 15px; border-radius: 999px;
  cursor: pointer;
  transition: color .2s, background .2s;
}
.filters button small { opacity: .55; margin-left: 2px; }
.filters button:hover { background: var(--paper-2); }
.filters button.on { color: var(--icing); background: var(--tomato); }
.asof { text-align: center; margin: 10px 16px 0; font-family: var(--hand); font-size: 14px; color: var(--ink-2); }

/* ---------------- sections ---------------- */
main { position: relative; z-index: 5; padding-bottom: 30px; }
.section { padding: 46px clamp(14px, 3vw, 32px) 10px; }
.section > * { max-width: 1240px; margin-left: auto; margin-right: auto; }
.section[hidden] { display: none; }
.section h2 {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--serif); font-weight: 600;
  font-variation-settings: "SOFT" 100;
  font-size: clamp(28px, 3.6vw, 42px);
  color: var(--tomato);
  margin-top: 0; margin-bottom: 4px;
}
.section h2 .ico { width: 1.1em; height: 1.1em; flex: none; }
.section h2::after {
  content: ""; flex: 1; height: 12px; margin-left: 8px;
  background: radial-gradient(circle at 6px 6px, var(--tomato) 2.5px, transparent 3px) 0 0 / 18px 12px;
  opacity: .35;
}
.count { font: 700 14px/1 var(--hand); color: var(--icing); background: var(--teal); padding: 6px 10px; border-radius: 999px; }
.sec-note { margin-top: 0; margin-bottom: 6px; color: var(--ink-2); font-size: 15px; }

/* light-kit section = night window band */
.section.night {
  position: relative;
  margin: 50px 0 30px;
  padding-top: 70px; padding-bottom: 60px;
  background: radial-gradient(900px 400px at 70% 0%, #2B5560, transparent 70%), var(--night);
  color: var(--icing);
}
.section.night::before, .section.night::after { /* icing scallops */
  content: ""; position: absolute; left: 0; right: 0; height: 26px;
  background: radial-gradient(circle at 50% 0, var(--paper) 13px, transparent 13.5px) 0 0 / 34px 26px repeat-x;
}
.section.night::before { top: 0; background: radial-gradient(circle at 50% 0, var(--paper) 15px, transparent 15.5px) 0 0 / 34px 26px repeat-x; }
.section.night::after { bottom: -1px; background: radial-gradient(circle at 50% 100%, var(--paper) 15px, transparent 15.5px) 0 0 / 34px 26px repeat-x; }
.section.night h2 { color: var(--mustard); }
.section.night h2::after { background-image: radial-gradient(circle at 6px 6px, var(--mustard) 2.5px, transparent 3px); }
.section.night .sec-note { color: #BFD3D0; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(270px, 100%), 1fr));
  gap: clamp(16px, 2.2vw, 28px);
  margin-top: 22px;
}
.grid-cards { grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); }

/* ---------------- item card ---------------- */
.item {
  --glow: #F2A93B;
  position: relative;
  display: flex; flex-direction: column;
  border-radius: var(--radius);
  background: var(--icing);
  border: 2px solid rgba(154, 85, 48, .35);
  box-shadow: var(--shadow);
  cursor: pointer; outline: none;
  transition: transform .3s var(--ease-out), box-shadow .3s var(--ease-out), border-color .3s;
}
.item:hover, .item:focus-visible { transform: translate(-3px, -4px); box-shadow: 10px 12px 0 rgba(107, 53, 25, .18); border-color: var(--ginger); }
.item:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; }
.night .item { background: #24464F; border-color: rgba(255, 253, 246, .16); box-shadow: 6px 6px 0 rgba(0, 0, 0, .25); color: var(--icing); }
.night .item:hover { border-color: color-mix(in srgb, var(--glow) 70%, transparent); box-shadow: 10px 12px 0 rgba(0, 0, 0, .25), 0 0 50px -10px color-mix(in srgb, var(--glow) 50%, transparent); }

.stage {
  position: relative;
  aspect-ratio: 1 / .88;
  display: grid; place-items: center;
  padding: 28px;
  overflow: hidden;
  border-radius: calc(var(--radius) - 2px) calc(var(--radius) - 2px) 0 0;
}
.spot {
  position: absolute; inset: 14% 12% 4%;
  background: radial-gradient(closest-side, var(--paper-2), transparent 80%);
  transition: transform .5s var(--ease-out);
}
.night .spot { background: radial-gradient(closest-side, color-mix(in srgb, var(--glow) 30%, transparent), transparent 75%); opacity: .7; }
.item:hover .spot { transform: scale(1.1); }
.stage img {
  position: relative;
  max-width: 100%; max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 14px 14px rgba(62, 36, 21, .22));
  transition: transform .5s var(--ease-spring), opacity .5s .2s;
}
.night .stage img { filter: drop-shadow(0 0 22px color-mix(in srgb, var(--glow) 35%, transparent)) drop-shadow(0 14px 16px rgba(0, 0, 0, .4)); }
.item:hover .stage img { transform: translateY(-4px) scale(1.05) rotate(-1.5deg); }

/* price tag hanging on the stage */
.price-tag {
  position: absolute; top: 14px; right: 14px; z-index: 3;
  display: flex; flex-direction: column; align-items: flex-end;
  padding: 7px 12px 6px 20px;
  font-family: var(--hand);
  color: var(--icing);
  background: var(--tomato);
  border-radius: 6px 12px 12px 6px;
  clip-path: polygon(12px 0, 100% 0, 100% 100%, 12px 100%, 0 50%);
  transform: rotate(4deg);
  transition: transform .3s var(--ease-spring), opacity .4s .3s;
}
.price-tag::before { content: ""; position: absolute; left: 9px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: var(--icing); }
.price-tag b { font-size: 19px; line-height: 1; }
.price-tag s { font-size: 12px; opacity: .8; }
.price-tag.sale { background: var(--teal-dk); }
.item:hover .price-tag { transform: rotate(-3deg) scale(1.06); }
.wrapped .price-tag { opacity: 0; }

.deal {
  position: absolute; top: 16px; left: 16px; z-index: 3;
  font: 700 12px/1 var(--hand);
  color: var(--ink); background: var(--mustard);
  padding: 6px 9px; border-radius: 999px;
  transform: rotate(-5deg);
  transition: opacity .4s .3s;
}
.wrapped .deal { opacity: 0; }

.meta { padding: 2px 22px 22px; }
.brand { margin: 0 0 4px; font: 600 14px/1.3 var(--hand); color: var(--teal-dk); }
.night .brand { color: #8FD3C8; }
.meta h3 { margin: 0; font-weight: 600; font-size: 18px; line-height: 1.3; text-wrap: balance; }
.tip-line { margin: 10px 0 0; font-size: 13.5px; line-height: 1.45; color: var(--ink-2); }
.tip-line::before { content: "★ "; color: var(--mustard); }
.night .tip-line { color: #BFD3D0; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 12px 0 0; }
.tags li, .d-tags li {
  position: relative;
  font: 600 13px/1 var(--hand);
  color: var(--ginger-dk);
  background: var(--paper-2);
  border: 1.5px dashed rgba(154, 85, 48, .5);
  padding: 6px 10px 6px 20px;
  border-radius: 4px 999px 999px 4px;
}
.tags li::before, .d-tags li::before { content: ""; position: absolute; left: 7px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: var(--ginger); }

/* ---------------- wrapping paper (unwraps on scroll) ---------------- */
.wrap { position: absolute; inset: 0; pointer-events: none; z-index: 4; }
.lid {
  position: absolute; top: 0; bottom: 0; width: 50.5%;
  background:
    radial-gradient(circle, rgba(255, 253, 246, .9) 3px, transparent 3.5px) 0 0 / 24px 24px,
    radial-gradient(circle, rgba(255, 253, 246, .5) 2px, transparent 2.5px) 12px 12px / 24px 24px,
    var(--tomato);
  transition: transform .8s var(--ease-out), opacity .6s .25s;
}
.lid.l { left: 0; }
.lid.r { right: 0; filter: brightness(.94); }
.ribbon {
  --rib: var(--teal);
  position: absolute; inset: 0; color: var(--rib);
  background:
    linear-gradient(90deg, transparent calc(50% - 13px), var(--rib) calc(50% - 13px) calc(50% + 13px), transparent calc(50% + 13px)),
    linear-gradient(0deg, transparent calc(50% - 13px), var(--rib) calc(50% - 13px) calc(50% + 13px), transparent calc(50% + 13px));
  transition: opacity .3s, transform .5s var(--ease-out);
}
.ribbon svg { position: absolute; left: 50%; top: 50%; width: 110px; height: 64px; translate: -50% -60%; filter: drop-shadow(0 3px 0 rgba(0, 0, 0, .12)); }
/* alternate paper: teal with candy stripes + red ribbon */
.grid > .item:nth-child(even) .lid {
  background:
    repeating-linear-gradient(-45deg, transparent 0 12px, rgba(255, 253, 246, .22) 12px 20px),
    var(--teal);
}
.grid > .item:nth-child(even) .ribbon { --rib: var(--tomato); }
.grid > .item:nth-child(3n) .lid {
  background:
    radial-gradient(circle, rgba(245, 81, 54, .9) 3px, transparent 3.5px) 0 0 / 22px 22px,
    var(--mustard);
}
.grid > .item:nth-child(3n) .ribbon { --rib: var(--ginger-dk); }

.wrapped .stage img, .wrapped .spot { opacity: 0; transform: scale(.85); }
.item:not(.wrapped) .lid.l { transform: translateX(-104%) rotate(-10deg); opacity: 0; }
.item:not(.wrapped) .lid.r { transform: translateX(104%) rotate(10deg); opacity: 0; }
.item:not(.wrapped) .ribbon { opacity: 0; transform: scale(1.4) rotate(8deg); }

.item.chosen { animation: chosen 1.2s var(--ease-out); }
@keyframes chosen { 0% { box-shadow: 0 0 0 0 rgba(245, 81, 54, .8); } 100% { box-shadow: 0 0 0 28px rgba(245, 81, 54, 0); } }

/* ---------------- gift cards ---------------- */
.item-card { background: none; border: 0; box-shadow: none; perspective: 900px; padding: 0; }
.item-card:hover, .item-card:focus-visible { box-shadow: none; transform: none; }
.gc {
  --mx: 50%; --my: 50%;
  position: relative;
  aspect-ratio: 1.586;
  border-radius: 18px;
  padding: 22px 24px;
  overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between;
  box-shadow: 7px 7px 0 rgba(107, 53, 25, .2);
  transition: transform .25s var(--ease-out);
  transform-style: preserve-3d;
}
.gc-shine { position: absolute; inset: 0; background: radial-gradient(400px circle at var(--mx) var(--my), rgba(255, 255, 255, .25), transparent 45%); mix-blend-mode: overlay; pointer-events: none; }
.gc-label, .gc-name, .gc-amt { position: relative; z-index: 1; }
.gc-label { font: 600 13px/1 var(--hand); opacity: .85; }
.gc-name { font-family: var(--serif); font-weight: 700; font-size: 36px; line-height: 1; letter-spacing: -.01em; }
.gc-amt { font: 500 14px/1 var(--hand); opacity: .85; }
.gc-bow { position: absolute; top: 0; bottom: 0; right: 13%; width: 18px; background: var(--tomato); }
.gc-bow svg { position: absolute; left: 50%; top: 8px; width: 74px; height: 44px; translate: -50% 0; color: var(--tomato); filter: drop-shadow(0 2px 0 rgba(0, 0, 0, .15)); }
.gc-delta { color: #fff; background: linear-gradient(125deg, transparent 72%, rgba(200, 16, 46, .9) 72% 78%, transparent 78%), linear-gradient(140deg, #0b2a5b, #0a1f44 60%, #071530); }
.gc-apple { color: #1d1d1f; background: radial-gradient(circle at 20% 0%, #fff, transparent 60%), linear-gradient(140deg, #f5f5f7, #d9dbe0); }
.gc-xbox  { color: #fff; background: radial-gradient(circle at 85% 110%, #3ad13a55, transparent 50%), linear-gradient(140deg, #107c10, #0b5a0b 60%, #063806); }
.gc-apple .gc-bow { background: var(--teal); }
.gc-apple .gc-bow svg { color: var(--teal); }
.card-tip { margin: 14px 4px 0; font-size: 13.5px; line-height: 1.45; color: var(--ink-2); }
.card-tip::before { content: "★ "; color: var(--mustard); }

/* ---------------- detail dialog ---------------- */
dialog {
  --glow: #F2A93B;
  width: min(960px, calc(100% - 24px));
  max-height: calc(100dvh - 24px);
  padding: 0;
  border: 3px solid var(--ginger);
  border-radius: 28px;
  color: var(--ink);
  background: var(--icing);
  box-shadow: 12px 12px 0 rgba(107, 53, 25, .25);
  overflow: auto;
}
dialog::before { /* candy stripe */
  content: ""; position: sticky; top: 0; display: block; grid-column: 1 / -1; height: 12px;
  background: repeating-linear-gradient(-45deg, var(--tomato) 0 14px, var(--icing) 14px 28px);
}
dialog[open] { display: grid; grid-template-columns: 1fr 1.05fr; animation: dlg-in .45s var(--ease-out); }
dialog::backdrop { background: rgba(62, 36, 21, .45); backdrop-filter: blur(4px); animation: fade .3s; }
@keyframes dlg-in { from { opacity: 0; transform: translateY(16px) scale(.96) rotate(-1deg); } }
@keyframes fade { from { opacity: 0; } }
.detail-art {
  display: grid; place-items: center; padding: 40px; min-height: 340px;
  background: radial-gradient(closest-side, var(--paper-2), transparent);
}
dialog.is-night .detail-art { background: radial-gradient(closest-side, color-mix(in srgb, var(--glow) 25%, transparent), transparent 80%), var(--night); border-radius: 0 0 0 24px; }
.detail-art img { max-width: 100%; max-height: 56vh; object-fit: contain; filter: drop-shadow(0 18px 20px rgba(62, 36, 21, .3)); animation: float 5s ease-in-out infinite; }
.detail-art .gc { width: 100%; max-width: 380px; }
@keyframes float { 50% { transform: translateY(-10px) rotate(-1deg); } }
.detail-body { padding: 36px 40px 36px 12px; display: flex; flex-direction: column; }
.detail-body .eyebrow { font-size: 16px; }
.detail-body h2 { font-family: var(--serif); font-variation-settings: "SOFT" 100; font-weight: 700; font-size: clamp(28px, 3.4vw, 38px); line-height: 1.05; margin: 0 0 6px; color: var(--tomato); }
.d-sub { margin: 0; color: var(--ink-2); font-family: var(--hand); }
.d-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; margin-top: 16px; }
.d-price:empty { display: none; }
.d-price b { font-family: var(--serif); font-size: 34px; color: var(--ink); }
.d-price s { color: var(--ink-2); font-size: 16px; }
.d-price .save { font: 700 13px/1 var(--hand); color: var(--icing); background: var(--teal-dk); padding: 5px 9px; border-radius: 999px; }
.d-price small { flex-basis: 100%; color: var(--ink-2); font-size: 13px; }
.d-tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 14px 0 0; }
.d-tags:empty { display: none; }
.d-note { margin: 16px 0 0; padding: 11px 14px; border-left: 4px solid var(--tomato); background: #FDE9E2; border-radius: 0 10px 10px 0; font-size: 14.5px; }
.d-code:empty, .d-tips:empty { display: none; }
.d-code {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-top: 16px; padding: 12px 14px;
  border: 2px dashed var(--teal); border-radius: 14px; background: #EAF5F2;
  font-size: 14px;
}
.d-code code { font: 700 17px/1 var(--hand); letter-spacing: .04em; color: var(--teal-dk); }
.d-code button { font: 600 13px/1 var(--hand); color: var(--icing); background: var(--teal-dk); border: 0; padding: 7px 11px; border-radius: 999px; cursor: pointer; }
.d-code .unv { flex-basis: 100%; font-size: 12px; color: var(--ink-2); }
.d-tips { margin-top: 16px; }
.d-tips h4 { margin: 0 0 6px; font: 700 16px/1 var(--hand); color: var(--ginger-dk); }
.d-tips ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 7px; }
.d-tips li { position: relative; padding-left: 22px; font-size: 14.5px; line-height: 1.45; }
.d-tips li::before { content: "★"; position: absolute; left: 0; color: var(--mustard); }
#dLink { margin-top: 22px; align-self: flex-start; }
.close {
  position: absolute; top: 20px; right: 18px; z-index: 2;
  width: 40px; height: 40px; border-radius: 50%;
  font-size: 24px; line-height: 1;
  color: var(--ginger-dk); background: var(--icing);
  border: 2px solid var(--ginger);
  cursor: pointer;
}
.close:hover { background: var(--paper-2); }

/* ---------------- sparks ---------------- */
.spark { position: fixed; z-index: 100; pointer-events: none; font-size: 18px; translate: -50% -50%; animation: spark .9s var(--ease-out) forwards; }
@keyframes spark { 0% { transform: translate(0, 0) scale(.4); opacity: 1; } 100% { transform: translate(var(--dx), var(--dy)) scale(1.1) rotate(160deg); opacity: 0; } }

/* ---------------- footer ---------------- */
footer { position: relative; z-index: 5; margin-top: 40px; background: var(--ginger); color: var(--icing); text-align: center; }
.footer-icing { position: absolute; left: 0; top: -1px; width: 100%; height: 34px; }
.footer-icing path { fill: var(--paper); }
.footer-inner { padding: 60px 20px 46px; font-family: var(--hand); font-size: 16px; }
.footer-inner p { margin: 4px 0; }
.footer-inner .small { font-size: 13px; opacity: .8; }

/* ---------------- responsive ---------------- */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; text-align: center; }
  .countdown, .hero-actions { justify-content: center; }
  .h1-small { transform-origin: center; }
  .hero-art { order: -1; width: min(78%, 320px); }
  .house-btn { width: 86%; margin: 0 0 0 auto; }
  .phono { left: -22%; width: 54%; }
  .phono-label { font-size: 13px; bottom: -20px; }
  .house-hint { display: none; }
  .deco-flake1 { left: auto; right: 4%; width: 80px; height: 80px; }
  .deco-star { top: 4%; right: auto; left: 6%; width: 50px; height: 50px; }
  .deco-ornament { display: none; }
}
@media (max-width: 720px) {
  dialog[open] { grid-template-columns: 1fr; }
  .detail-art { padding: 46px 30px 10px; min-height: 0; }
  dialog.is-night .detail-art { border-radius: 0; }
  .detail-art img { max-height: 34vh; }
  .detail-body { padding: 16px 24px 28px; }
  .cd { width: 64px; }
  .filters button { padding: 8px 10px; font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}

/* ================= v4: language toggle, Elf line, GIF reel ================= */

/* EN / ES toggle, top right under the lights */
.lang-toggle {
  position: absolute; top: 70px; right: 16px; z-index: 40;
  display: flex; padding: 4px; gap: 2px;
  border-radius: 999px;
  background: var(--icing);
  border: 2px solid var(--ginger);
  box-shadow: 3px 3px 0 rgba(107, 53, 25, .2);
}
.lang-toggle button {
  font: 700 13px/1 var(--hand);
  color: var(--ginger-dk);
  background: none; border: 0;
  padding: 7px 11px; border-radius: 999px;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.lang-toggle button:hover { background: var(--paper-2); }
.lang-toggle button[aria-pressed="true"] { color: var(--icing); background: var(--tomato); }

/* the Elf line */
.hero-sub {
  font-family: var(--hand);
  font-weight: 700;
  font-size: clamp(18px, 2.2vw, 24px);
  color: var(--tomato-dk);
  letter-spacing: .01em;
  transform: rotate(-1.5deg);
  transform-origin: left;
}

/* GIF reel in the footer */
.footer-inner { padding: 64px 0 40px; }
.reel-title {
  margin: 0 0 18px;
  font-family: var(--serif); font-variation-settings: "SOFT" 100;
  font-weight: 600; font-size: clamp(26px, 3.4vw, 36px);
  color: var(--icing);
}
.reel { position: relative; max-width: 1240px; margin: 0 auto; }
.reel-track {
  display: flex; gap: 26px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 calc(50% - 130px);
  padding: 14px calc(50% - 130px) 26px;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}
.reel-track::-webkit-scrollbar { display: none; }
.polaroid {
  flex: none;
  scroll-snap-align: center;
  width: 260px;
  margin: 0;
  padding: 10px 10px 0;
  background: var(--icing);
  border-radius: 6px;
  box-shadow: 6px 8px 0 rgba(62, 36, 21, .35);
  transform: rotate(var(--tilt, -2deg));
  transition: transform .35s var(--ease-spring);
}
.polaroid:nth-child(even) { --tilt: 2deg; }
.polaroid:nth-child(3n) { --tilt: -1deg; }
.polaroid:hover { transform: rotate(0deg) scale(1.04); }
.polaroid video {
  display: block; width: 100%; height: 220px;
  object-fit: cover; border-radius: 3px;
  background: var(--paper-2);
}
.polaroid figcaption {
  min-height: 54px;
  display: grid; place-items: center;
  padding: 8px 6px 10px;
  font: 600 15px/1.25 var(--hand);
  color: var(--ink);
  text-align: center;
}
.reel-btn {
  position: absolute; top: 50%; z-index: 2;
  translate: 0 -60%;
  width: 46px; height: 46px; border-radius: 50%;
  font: 700 28px/1 var(--hand);
  color: var(--icing); background: var(--tomato);
  border: 2px solid var(--tomato-dk);
  box-shadow: 3px 3px 0 var(--tomato-dk);
  cursor: pointer;
  transition: transform .15s var(--ease-out);
}
.reel-btn:hover { transform: scale(1.08); }
.reel-btn:active { transform: scale(.94); }
.reel-btn.prev { left: 12px; }
.reel-btn.next { right: 12px; }
.footer-inner .small { margin: 14px 20px 0; }

@media (max-width: 860px) {
  .lang-toggle { top: 66px; right: 10px; }
  .hero-art { margin-bottom: 34px; }
  .hero-sub { transform-origin: center; }
}
@media (max-width: 560px) {
  .polaroid { width: 220px; }
  .polaroid video { height: 190px; }
  .reel-track { scroll-padding: 0 calc(50% - 110px); padding-left: calc(50% - 110px); padding-right: calc(50% - 110px); }
  .reel-btn { width: 40px; height: 40px; font-size: 24px; }
}

/* ================= v5: gingerbread mansion advent calendar ================= */
@media (min-width: 861px) {
  .hero { grid-template-columns: 1fr 1.15fr; }
  .hero-art { width: min(100%, 540px); }
  .phono { left: -24%; bottom: 4%; width: 40%; }
}

.mansion-wrap { position: relative; }
.mansion { display: block; width: 100%; height: auto; overflow: visible; filter: drop-shadow(0 12px 16px rgba(107, 53, 25, .18)); }
.mansion .smoke circle { fill: #E9DFC9; animation: puff 3s ease-out infinite; opacity: 0; }
.mansion .smoke circle:nth-child(2) { animation-delay: 1s; }
.mansion .smoke circle:nth-child(3) { animation-delay: 2s; }
.mansion .sign-num { font: 700 17px var(--hand); fill: var(--tomato); }

/* windows */
.aw { cursor: pointer; outline: none; }
.aw .pane { fill: #4BA69A; transition: fill .3s; }
.aw .wnum {
  font: 700 17px var(--hand); text-anchor: middle;
  fill: #FFFDF6; paint-order: stroke; stroke: rgba(45, 111, 104, .9); stroke-width: 3px;
  pointer-events: none;
}
.aw.locked .pane { fill: #3F8F85; }
.aw.locked .wnum { fill: #DDEFEA; }
.aw.open .pane { fill: #FFC85A; }
.aw.open .wnum, .aw.today .wnum { fill: var(--ginger-dk); stroke: #FFE7A8; }
.aw.today .pane { fill: #FFD36E; animation: today-glow 1.6s ease-in-out infinite; }
.aw.today { filter: drop-shadow(0 0 8px rgba(255, 200, 90, .9)); }
@keyframes today-glow { 50% { fill: #FFB347; } }
.aw.opened .wnum {   /* small number badge once the picture is showing */
  font-size: 12px; fill: #FFFDF6; stroke: var(--tomato); stroke-width: 4px;
}
.aw:not(.locked):hover .pane, .aw:focus-visible .pane { fill: #FFE08A; }
.aw:focus-visible { filter: drop-shadow(0 0 0 2px var(--teal)) drop-shadow(0 0 6px var(--teal)); }
.aw.nope { animation: nope .45s ease-in-out; transform-box: fill-box; transform-origin: center; }
@keyframes nope { 20% { transform: translateX(-3px) rotate(-3deg); } 40% { transform: translateX(3px) rotate(3deg); } 60% { transform: translateX(-2px); } 80% { transform: translateX(2px); } }

/* the big door (day 25) */
.door .door-light { fill: #FFC85A; }
.door .leaf { fill: #F55136; stroke: #C8361F; stroke-width: 2; transform-box: fill-box; transition: transform .9s var(--ease-spring); }
.door .leaf-l { transform-origin: left center; }
.door .leaf-r { transform-origin: right center; }
.door .knob { fill: #F2A93B; transition: opacity .3s; }
.door.locked .leaf { fill: #E04A31; }
.door:not(.locked):hover .leaf-l, .door.opened .leaf-l { transform: scaleX(.18); }
.door:not(.locked):hover .leaf-r, .door.opened .leaf-r { transform: scaleX(.18); }
.door.opened .knob, .door:not(.locked):hover .knob { opacity: 0; }
.door.today .door-light { animation: today-glow 1.6s ease-in-out infinite; }

.advent-status {
  margin: 6px 0 0; text-align: center;
  font: 600 15px/1.3 var(--hand); color: var(--teal-dk);
}
.advent-toast {
  position: absolute; left: 50%; top: 38%; z-index: 5;
  translate: -50% 0;
  max-width: 90%;
  padding: 10px 16px;
  font: 700 15px/1.3 var(--hand); text-align: center;
  color: var(--icing); background: var(--ginger-dk);
  border-radius: 14px;
  box-shadow: 4px 4px 0 rgba(62, 36, 21, .3);
  opacity: 0; transform: translateY(8px) scale(.96);
  transition: opacity .25s, transform .3s var(--ease-spring);
  pointer-events: none;
}
.advent-toast.show { opacity: 1; transform: none; }

/* day popup */
#advent[open] { display: block; width: min(560px, calc(100% - 24px)); text-align: center; }
#advent .adv-head { padding: 26px 60px 4px; }
#advent .adv-head h2 { margin: 0; font-family: var(--serif); font-variation-settings: "SOFT" 100; font-weight: 700; font-size: clamp(34px, 6vw, 48px); color: var(--tomato); }
#advent .eyebrow { margin: 0; }
#advent .adv-frame {
  margin: 12px auto 0; width: calc(100% - 48px);
  padding: 10px 10px 0; background: var(--icing);
  border-radius: 6px; box-shadow: 6px 8px 0 rgba(62, 36, 21, .2);
  transform: rotate(-1deg);
}
#advent video { display: block; width: 100%; max-height: 52vh; object-fit: contain; background: var(--paper-2); border-radius: 3px; }
#advent .adv-caption { margin: 16px 28px 0; font: 700 19px/1.35 var(--hand); color: var(--ink); }
#advent .adv-nav { display: flex; justify-content: space-between; gap: 10px; padding: 18px 24px 24px; }
#advent .adv-nav .btn[disabled] { opacity: .35; pointer-events: none; }

/* reel extras */
.pol-day { display: block; margin: -2px 0 6px; font: 700 13px/1 var(--hand); color: var(--tomato); text-align: left; }
.polaroid[data-day] { cursor: pointer; }
.polaroid.empty .empty-pic { height: 160px; display: grid; place-items: center; font-size: 56px; background: var(--paper-2); border-radius: 3px; }
.reel.is-empty .reel-btn { display: none; }
.reel.is-empty .reel-track { justify-content: center; padding-left: 0; padding-right: 0; }

@media (max-width: 860px) {
  .hero-art { width: min(100%, 460px); }
  .phono { left: -6%; bottom: 8%; width: 34%; z-index: 4; }
}
.advent-status { margin-top: 34px; }
@media (max-width: 860px) { .advent-status { margin-top: 26px; } }
@media (max-width: 860px) { .advent-status { margin-top: 44px; } }
@media (max-width: 860px) {
  .advent-status { margin-top: 14px; }
  .phono { bottom: 15%; }
  .phono-label { left: 92%; bottom: 18%; translate: 0 0; transform: rotate(-4deg); transform-origin: left; }
}
@media (max-width: 860px) {
  .phono { bottom: 6%; }
  .phono-label { left: 96%; bottom: 4%; }
}
@media (max-width: 860px) { .advent-status { margin-top: 30px; } }
@media (max-width: 860px) {
  .mansion-wrap { display: flex; flex-direction: column; }
  .advent-status { order: -1; margin: 0 0 6px; }
}
/* phones: gramophone gets its own row under the mansion (final word on mobile layout) */
@media (max-width: 860px) {
  .hero-art { display: flex; flex-direction: column; align-items: center; margin-bottom: 18px; }
  .mansion-wrap { order: 1; display: block; width: 100%; }
  .advent-status { order: 0; margin: 4px 0 0; }
  .phono {
    order: 2; position: relative; left: auto; bottom: auto; width: auto;
    display: flex; align-items: center; gap: 6px; margin-top: 6px;
  }
  .phono canvas { width: 84px; }
  .phono-label { position: static; translate: none; transform: rotate(-3deg); font-size: 15px; }
}
.advent-toast { width: max-content; max-width: min(88%, 340px); }

/* ================= v6: festive fonts + decking the halls ================= */
:root {
  --xmas: "Mountains of Christmas", var(--serif);
  --swash: "Berkshire Swash", var(--serif);
  --candy: "Emilys Candy", var(--hand);
}

/* type */
h1 {
  font-family: var(--xmas); font-weight: 700; font-variation-settings: normal;
  font-size: clamp(64px, 10.5vw, 138px); line-height: .86; letter-spacing: 0;
  text-shadow: 3px 4px 0 rgba(107, 53, 25, .16);
}
.h1-small { font-family: var(--candy); font-weight: 400; font-size: .34em; color: var(--ginger); letter-spacing: .02em; }
.eyebrow { font-family: var(--candy); font-weight: 400; letter-spacing: .03em; }
.cd b { font-family: var(--xmas); font-weight: 700; font-size: 34px; }
.merry { font-family: var(--xmas); font-weight: 700; font-size: 44px; }
.section h2 { font-family: var(--swash); font-weight: 400; font-variation-settings: normal; letter-spacing: .01em; }
.detail-body h2, .reel-title { font-family: var(--swash); font-weight: 400; font-variation-settings: normal; }
#advent .adv-head h2 { font-family: var(--xmas); font-weight: 700; font-variation-settings: normal; font-size: clamp(44px, 8vw, 60px); }
.count { font-family: var(--candy); font-weight: 400; }
.filters button, .lang-toggle button { font-family: var(--candy); font-weight: 400; font-size: 15px; }
.btn { font-family: var(--candy); font-weight: 400; font-size: 17px; }

/* pine garland under the lights, with bows */
.garland { height: 74px; }
.garland svg { height: 40px; }
.garland .bough { stroke: #2E6B4F; stroke-width: 15px; stroke-linecap: round; }
.garland .bough-needles { stroke: #3F8A63; stroke-width: 11px; stroke-dasharray: 2 3; }
.garland .bough-tips { stroke: #6FB58A; stroke-width: 5px; stroke-dasharray: 1 6; opacity: .8; }
.bulb { top: 26px; }
.g-bow { position: absolute; top: -2px; width: 34px; height: 22px; translate: -50% 0; color: var(--tomato); z-index: 2; pointer-events: none; filter: drop-shadow(0 2px 0 rgba(0, 0, 0, .15)); }
.g-bow svg { width: 100%; height: 100%; display: block; }
.lang-toggle { top: 78px; }

/* candy-cane outlines */
.filters, .lang-toggle {
  border: 3px solid transparent;
  background: linear-gradient(var(--icing), var(--icing)) padding-box,
              repeating-linear-gradient(-45deg, var(--tomato) 0 7px, var(--icing) 7px 14px) border-box;
}
.section h2::after {
  height: 9px; opacity: 1; border-radius: 6px;
  background: repeating-linear-gradient(-45deg, var(--tomato) 0 8px, var(--icing) 8px 16px);
  box-shadow: 0 0 0 1.5px rgba(200, 54, 31, .35);
}
.section.night h2::after { background: repeating-linear-gradient(-45deg, var(--mustard) 0 8px, var(--night) 8px 16px); box-shadow: none; }

/* snow piled on every gift box */
.item:not(.item-card)::before {
  content: ""; position: absolute; z-index: 6; pointer-events: none;
  top: -9px; left: 8px; right: 8px; height: 24px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 24' preserveAspectRatio='none'%3E%3Cpath fill='%23FFFDF6' d='M0 12C10 2 30 2 40 8C55 0 75 2 90 7C105 1 125 2 140 8C155 1 180 2 200 10V14C196 14 194 22 190 14H160C157 14 155 24 151 14H110C107 14 105 20 101 14H60C57 14 55 23 51 14H20C17 14 15 19 11 14H0Z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  filter: drop-shadow(0 2px 1px rgba(62, 36, 21, .12));
}

/* holly on the popups */
#detail::after, #advent::after {
  content: ""; position: absolute; top: 18px; left: 14px; width: 66px; height: 46px; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 44'%3E%3Cpath fill='%232E7D5B' d='M30 26C22 14 10 14 2 18c6 2 6 8 2 12 8-2 12 2 14 8 4-6 10-6 12-12Z'/%3E%3Cpath fill='%233F8A63' d='M34 26c8-12 20-12 28-8-6 2-6 8-2 12-8-2-12 2-14 8-4-6-10-6-12-12Z'/%3E%3Ccircle cx='28' cy='24' r='5' fill='%23E23B2E'/%3E%3Ccircle cx='36' cy='24' r='5' fill='%23E23B2E'/%3E%3Ccircle cx='32' cy='18' r='5' fill='%23F55136'/%3E%3Ccircle cx='30.5' cy='16.5' r='1.5' fill='%23fff' opacity='.7'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* twinkly stars in the hero */
.twinkle { position: absolute; z-index: 0; pointer-events: none; opacity: .5; animation: star-twinkle 3s ease-in-out infinite; }
@keyframes star-twinkle { 0%, 100% { opacity: .15; transform: scale(.7) rotate(0deg); } 50% { opacity: .75; transform: scale(1.1) rotate(20deg); } }
.hero > *:not(.twinkle):not(.deco) { position: relative; z-index: 1; }
/* very narrow phones: let the title shrink instead of overflowing */
.hero > * { min-width: 0; }
@media (max-width: 420px) { h1 { font-size: clamp(44px, 17vw, 72px); } }
.hero { overflow-x: clip; }
