:root {
  --bg-0: #030907;
  --bg-1: #08191300;
  --cream: #f4ead6;
  --cream-dim: rgba(244, 234, 214, .62);
  --gold: #d8b25a;
  --gold-hi: #fff1c4;
  --gold-lo: #8a6420;
  --ink: #2a1c12;
  --wine: #5e0f18;
  --foil: linear-gradient(115deg, #8a6420 0%, #e9c977 16%, #fff4cf 28%, #c9973a 44%, #f2d68a 60%, #9c7225 78%, #edcf7e 92%, #8a6420 100%);
  --radius: 10px;
  --display: 'Cormorant Garamond', 'Times New Roman', serif;
  --caps: 'Cinzel', 'Times New Roman', serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; overflow-x: clip; }

body {
  min-height: 100vh;
  background: var(--bg-0);
  color: var(--cream);
  font-family: var(--display);
  -webkit-font-smoothing: antialiased;
}

.defs { position: absolute; }

/* ── Atmosphere ───────────────────────────────────────── */

.sky {
  position: fixed; inset: 0; z-index: -3;
  background:
    radial-gradient(120% 70% at 50% -10%, #12352a 0%, rgba(10, 32, 24, .6) 35%, transparent 70%),
    radial-gradient(80% 60% at 85% 110%, rgba(94, 15, 24, .45), transparent 70%),
    radial-gradient(70% 50% at 0% 100%, rgba(20, 60, 46, .5), transparent 70%),
    linear-gradient(180deg, #06140f 0%, #040c09 55%, #030806 100%);
}
.sky::after {
  content: ''; position: absolute; inset: 0; opacity: .09; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.bokeh {
  position: fixed; inset: -10%; z-index: -2; filter: blur(28px); opacity: .55;
  background:
    radial-gradient(circle at 12% 30%, rgba(255, 196, 110, .22) 0 40px, transparent 41px),
    radial-gradient(circle at 82% 18%, rgba(255, 120, 100, .16) 0 60px, transparent 61px),
    radial-gradient(circle at 70% 62%, rgba(255, 210, 140, .14) 0 34px, transparent 35px),
    radial-gradient(circle at 25% 78%, rgba(130, 220, 170, .10) 0 70px, transparent 71px),
    radial-gradient(circle at 92% 86%, rgba(255, 196, 110, .16) 0 46px, transparent 47px),
    radial-gradient(circle at 45% 12%, rgba(255, 230, 180, .10) 0 30px, transparent 31px);
  animation: drift 40s ease-in-out infinite alternate;
}
@keyframes drift { to { transform: translate3d(2%, -3%, 0) scale(1.05); } }

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

#garland { position: absolute; top: 0; left: 0; width: 100%; height: 120px; z-index: 2; pointer-events: none; overflow: visible; }
#garland .wire { fill: none; stroke: #13251b; stroke-width: 2.2; }
#garland .wire.b { stroke: #22382a; stroke-width: 1.2; }
#garland .socket { fill: #2b2112; stroke: #8a6420; stroke-width: .8; }
#garland .bulb {
  fill: var(--c);
  filter: drop-shadow(0 0 3px var(--c)) drop-shadow(0 0 12px var(--c));
  animation: twinkle var(--d, 3s) ease-in-out var(--delay, 0s) infinite;
}
#garland .shine { fill: rgba(255, 255, 255, .55); }
@keyframes twinkle { 0%, 100% { opacity: 1; } 45% { opacity: .35; } 55% { opacity: .5; } }

/* ── Layout ───────────────────────────────────────────── */

.wrap { position: relative; z-index: 3; max-width: 1180px; margin: 0 auto; padding: 128px 16px 64px; }

.hero { text-align: center; margin-bottom: clamp(36px, 6vw, 64px); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 14px; margin: 0 0 14px;
  font: 600 12px/1 var(--caps); letter-spacing: .42em; text-transform: uppercase; color: var(--gold);
}
.eyebrow .line { width: 38px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold)); }
.eyebrow .line:last-child { transform: scaleX(-1); }

.title {
  margin: 0; font-weight: 500; font-style: italic; line-height: .95;
  font-size: clamp(3.2rem, 11vw, 7.4rem); letter-spacing: -.01em;
  background: var(--foil); background-size: 250% auto;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 4px 24px rgba(216, 178, 90, .22));
  animation: sheen 9s linear infinite;
}
@keyframes sheen { to { background-position: 250% center; } }

.sub { margin: 16px auto 0; max-width: 34ch; font-size: clamp(1.1rem, 2.6vw, 1.4rem); font-style: italic; color: var(--cream-dim); }

.status { display: flex; flex-direction: column; align-items: center; gap: 18px; margin-top: 30px; }

.clock {
  display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px; border-radius: 99px; max-width: 100%; text-align: center;
  font: 500 11px/1 var(--caps); letter-spacing: .2em; text-transform: uppercase; color: var(--cream-dim);
  border: 1px solid rgba(216, 178, 90, .25); background: rgba(5, 14, 10, .5); backdrop-filter: blur(6px);
}
.pulse { width: 7px; height: 7px; border-radius: 50%; background: #7fe0a8; box-shadow: 0 0 10px #7fe0a8; animation: blink 2s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .3; } }

.countdown { display: flex; flex-direction: column; align-items: center; gap: 12px; min-height: 92px; }
.cd-label { font: italic 500 1.15rem/1 var(--display); color: var(--cream-dim); }
.cd-units { display: flex; gap: 10px; }
.cd-unit {
  position: relative; min-width: 64px; padding: 10px 8px 8px; border-radius: 8px; text-align: center;
  background: linear-gradient(180deg, rgba(30, 22, 10, .75), rgba(10, 8, 4, .85));
  box-shadow: inset 0 0 0 1px rgba(216, 178, 90, .35), inset 0 1px 0 rgba(255, 240, 200, .12), 0 8px 24px rgba(0, 0, 0, .4);
}
.cd-unit::after { content: ''; position: absolute; left: 6px; right: 6px; top: 50%; height: 1px; background: rgba(0, 0, 0, .55); }
.cd-unit b {
  display: block; font: 600 1.9rem/1 var(--caps); font-variant-numeric: tabular-nums;
  background: var(--foil); background-size: 200% auto; -webkit-background-clip: text; background-clip: text; color: transparent;
}
.cd-unit i { display: block; margin-top: 6px; font: 500 9px/1 var(--caps); font-style: normal; letter-spacing: .25em; text-transform: uppercase; color: var(--cream-dim); }
.cd-done { font: italic 500 1.3rem/1.3 var(--display); color: var(--gold-hi); }
.cd-preview { font: 600 10px/1 var(--caps); letter-spacing: .25em; text-transform: uppercase; color: #ff9a8a; }

/* ── Board ────────────────────────────────────────────── */

.board {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
  padding: clamp(14px, 3vw, 28px); border-radius: 18px; position: relative;
  background:
    linear-gradient(180deg, rgba(40, 26, 12, .55), rgba(16, 10, 5, .7)),
    repeating-linear-gradient(90deg, rgba(255, 220, 160, .025) 0 2px, transparent 2px 7px);
  box-shadow:
    inset 0 0 0 1px rgba(216, 178, 90, .45),
    inset 0 0 0 6px rgba(10, 6, 3, .6),
    inset 0 0 0 7px rgba(216, 178, 90, .2),
    0 30px 80px rgba(0, 0, 0, .6), 0 0 120px rgba(216, 178, 90, .06);
}
@media (min-width: 640px) { .board { grid-template-columns: repeat(4, 1fr); gap: 18px; } }
@media (min-width: 980px) { .board { grid-template-columns: repeat(6, 1fr); gap: 22px; } }

/* ── Doors ────────────────────────────────────────────── */

.door {
  --a: #6d1420; --b: #3c0910; --hi: rgba(255, 150, 150, .14);
  position: relative; aspect-ratio: 3 / 4; padding: 0; border: 0; background: none;
  font: inherit; color: inherit; cursor: pointer; perspective: 900px;
  -webkit-tap-highlight-color: transparent; outline: none;
  animation: rise .9s cubic-bezier(.2, .8, .2, 1) both; animation-delay: var(--i, 0s);
}
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
.door.tone-pine { --a: #17503f; --b: #082219; --hi: rgba(150, 255, 200, .1); }
.door.tone-ink { --a: #1e2f52; --b: #0a1224; --hi: rgba(160, 190, 255, .12); }
.door.finale { grid-column: 1 / -1; aspect-ratio: auto; height: clamp(210px, 30vw, 300px); }
.door:focus-visible .front { box-shadow: 0 0 0 2px var(--gold-hi), 0 0 24px rgba(255, 220, 140, .5); }

.cavity {
  position: absolute; inset: 0; border-radius: var(--radius); overflow: hidden;
  display: grid; place-items: center; padding: 12px; text-align: center;
  background: radial-gradient(ellipse at 50% 35%, #2a1a0b 0%, #0d0804 75%);
  box-shadow: inset 0 10px 28px rgba(0, 0, 0, .9), inset 0 0 0 1px rgba(216, 178, 90, .3);
}
.glow {
  position: absolute; inset: 0; opacity: 0; transition: opacity 1.2s;
  background: radial-gradient(ellipse at 50% 45%, rgba(255, 214, 140, .55), rgba(255, 170, 80, .14) 45%, transparent 75%);
}
.door.unlocked .glow { opacity: 1; animation: candle 3.4s ease-in-out infinite; }
@keyframes candle { 0%, 100% { opacity: .9; } 30% { opacity: 1; } 55% { opacity: .75; } 70% { opacity: .95; } }

.inside { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; opacity: 0; transition: opacity .6s .35s; }
.door.open .inside { opacity: 1; }
.in-day { font: 600 10px/1 var(--caps); letter-spacing: .28em; text-transform: uppercase; color: var(--gold); }
.in-title { font: italic 600 clamp(.95rem, 2.2vw, 1.2rem)/1.15 var(--display); color: var(--gold-hi); text-shadow: 0 1px 10px rgba(0, 0, 0, .8); }
.in-kind { font: 500 9px/1 var(--caps); letter-spacing: .2em; text-transform: uppercase; color: var(--cream-dim); }
.in-pick { font: italic 500 .85rem/1 var(--display); color: #a6e8c0; }

.leaf {
  position: absolute; inset: 0; transform-origin: left center; transform-style: preserve-3d;
  transition: transform 1.25s cubic-bezier(.22, .8, .18, 1);
}
.leaf.right { transform-origin: right center; }
.finale .leaf.left { right: 50%; }
.finale .leaf.right { left: 50%; }
.door.no-anim .leaf, .door.no-anim .inside { transition: none; }

.face { position: absolute; inset: 0; border-radius: var(--radius); backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.finale .left .face { border-radius: var(--radius) 2px 2px var(--radius); }
.finale .right .face { border-radius: 2px var(--radius) var(--radius) 2px; }

.front {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; overflow: hidden;
  background:
    radial-gradient(120% 80% at 25% 10%, var(--hi), transparent 55%),
    linear-gradient(160deg, var(--a) 0%, var(--b) 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 230, 170, .14),
    inset 0 0 0 7px rgba(0, 0, 0, .2),
    inset 0 0 0 8px rgba(216, 178, 90, .55),
    inset 0 0 0 9px rgba(0, 0, 0, .25),
    inset 0 -20px 40px rgba(0, 0, 0, .35),
    0 10px 24px rgba(0, 0, 0, .55);
}
/* velvet nap + corner studs */
.front::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .6;
  background:
    radial-gradient(circle at 14px 14px, #f0d488 0 1.6px, transparent 2.2px),
    radial-gradient(circle at calc(100% - 14px) 14px, #f0d488 0 1.6px, transparent 2.2px),
    radial-gradient(circle at 14px calc(100% - 14px), #f0d488 0 1.6px, transparent 2.2px),
    radial-gradient(circle at calc(100% - 14px) calc(100% - 14px), #f0d488 0 1.6px, transparent 2.2px),
    repeating-linear-gradient(115deg, rgba(255, 255, 255, .018) 0 1px, transparent 1px 4px);
}
/* light sweep on doors that are ready */
.front::after {
  content: ''; position: absolute; inset: -40% -60%; pointer-events: none; opacity: 0;
  background: linear-gradient(105deg, transparent 42%, rgba(255, 240, 200, .22) 50%, transparent 58%);
  transform: translateX(-60%);
}
.door.ready .front::after { opacity: 1; animation: sweep 5.5s ease-in-out infinite; animation-delay: var(--sweep, 0s); }
@keyframes sweep { 0%, 55% { transform: translateX(-60%); } 85%, 100% { transform: translateX(60%); } }

.back {
  transform: rotateY(180deg);
  background: linear-gradient(90deg, #1d130a, #2c1d0e 60%, #1a1108);
  box-shadow: inset 0 0 0 1px rgba(216, 178, 90, .25), inset 0 0 0 6px rgba(0, 0, 0, .3), inset 0 0 0 7px rgba(216, 178, 90, .15);
}

.ornament { width: 44%; max-width: 64px; aspect-ratio: 1; position: relative; z-index: 1; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .5)); }
.ornament svg { width: 100%; height: 100%; display: block; overflow: visible; }
.finale .ornament { width: auto; height: 62%; max-width: none; }

.num {
  position: relative; z-index: 1; font: 700 clamp(1.9rem, 6vw, 2.8rem)/1 var(--caps);
  background: var(--foil); background-size: 220% auto; -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .6));
}
.finale .num { font-size: clamp(3.4rem, 10vw, 5.6rem); }
.mon { position: relative; z-index: 1; font: 600 8px/1 var(--caps); letter-spacing: .32em; text-transform: uppercase; color: rgba(240, 212, 136, .7); }
.finale .mon { font-size: 11px; margin-top: 6px; }

.knob {
  position: absolute; right: 10%; top: 50%; width: 9px; height: 9px; border-radius: 50%; transform: translateY(-50%);
  background: radial-gradient(circle at 35% 30%, #fff6d6, #d8b25a 45%, #6e4c14);
  box-shadow: 0 2px 3px rgba(0, 0, 0, .6);
}
.finale .left .knob { right: 14px; }
.finale .right .knob { right: auto; left: 14px; }

.lock { position: absolute; left: 50%; bottom: 12%; width: 13px; height: 13px; transform: translateX(-50%); z-index: 1; opacity: .7; }
.lock svg { width: 100%; height: 100%; display: block; }
.door.unlocked .lock { display: none; }

.tag {
  position: absolute; top: 12%; left: 50%; transform: translateX(-50%); z-index: 1; display: none;
  padding: 4px 8px 3px; border-radius: 99px; white-space: nowrap;
  font: 700 8px/1 var(--caps); letter-spacing: .22em; text-transform: uppercase; color: #2a1c06;
  background: var(--foil); background-size: 200% auto; box-shadow: 0 2px 10px rgba(255, 210, 120, .45);
}
.door.today:not(.open) .tag { display: block; }

.door.locked .front { filter: saturate(.7) brightness(.78); }
.door.locked { cursor: not-allowed; }
.door.today::before {
  content: ''; position: absolute; inset: -5px; border-radius: 14px; pointer-events: none;
  border: 1px solid rgba(255, 220, 140, .7); box-shadow: 0 0 22px rgba(255, 200, 110, .45);
  animation: halo 2.6s ease-in-out infinite;
}
@keyframes halo { 50% { opacity: .35; transform: scale(1.015); } }

/* peek on hover, swing on open */
@media (hover: hover) {
  .door.ready:hover .leaf { transform: rotateY(-16deg); }
  .door.ready:hover .leaf.right { transform: rotateY(16deg); }
}
.door.open { z-index: 4; }
.door.open .leaf { transform: rotateY(-108deg); }
.door.open .leaf.right { transform: rotateY(108deg); }
.door.open .ribbon, .door.open .bow { opacity: 0; transition: opacity .3s; }

.door.shake { animation: shake .5s cubic-bezier(.36, .07, .19, .97); }
@keyframes shake {
  20%, 60% { transform: translateX(-5px) rotate(-.6deg); }
  40%, 80% { transform: translateX(5px) rotate(.6deg); }
}

/* finale ribbon */
.ribbon {
  position: absolute; top: 0; bottom: 0; left: 50%; width: 22px; transform: translateX(-50%); z-index: 2; pointer-events: none;
  background: linear-gradient(90deg, #6e0d16, #b3212f 30%, #e0505b 50%, #b3212f 70%, #6e0d16);
  box-shadow: 0 0 0 1px rgba(216, 178, 90, .5), 0 0 16px rgba(0, 0, 0, .6);
}
.bow { position: absolute; top: -18px; left: 50%; width: 110px; transform: translateX(-50%); z-index: 3; pointer-events: none; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .55)); }

/* ── Footer ───────────────────────────────────────────── */

.foot { text-align: center; margin-top: 48px; color: var(--cream-dim); font-style: italic; font-size: 1.1rem; }
.divider { width: 220px; max-width: 70%; margin: 0 auto 14px; height: 16px; }
.divider svg { width: 100%; height: 100%; display: block; overflow: visible; }

/* ── Card modal ───────────────────────────────────────── */

.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 64px 16px 24px; perspective: 1400px; }
.modal[hidden] { display: none; }
.scrim { position: absolute; inset: 0; background: rgba(2, 6, 4, .74); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); opacity: 0; transition: opacity .45s; }
.modal.show .scrim { opacity: 1; }

.card-wrap {
  position: relative; width: min(540px, 100%); transform-style: preserve-3d;
  opacity: 0; transform: translateY(40px) rotateX(14deg) scale(.94);
  transition: opacity .55s, transform .75s cubic-bezier(.2, .85, .2, 1);
}
.modal.show .card-wrap { opacity: 1; transform: none; }
.card-wrap.flip-out { transform: rotateY(90deg) !important; transition: transform .32s cubic-bezier(.5, 0, .9, .4); }
.card-wrap.flip-in { transform: rotateY(-90deg) !important; transition: none; }

.card {
  position: relative; max-height: calc(100dvh - 100px); overflow-y: auto; overscroll-behavior: contain;
  padding: 62px clamp(24px, 6vw, 48px) 40px; border-radius: 6px; color: var(--ink); text-align: center;
  background:
    radial-gradient(130% 90% at 50% 0%, rgba(255, 252, 244, .9), transparent 60%),
    radial-gradient(150% 120% at 50% 50%, transparent 55%, rgba(150, 110, 50, .22) 100%),
    #f3e8d2;
  box-shadow:
    inset 0 0 0 1px rgba(201, 162, 79, .8),
    inset 0 0 0 8px #f3e8d2,
    inset 0 0 0 9px rgba(201, 162, 79, .55),
    0 40px 100px rgba(0, 0, 0, .7), 0 0 0 1px rgba(0, 0, 0, .3);
  scrollbar-width: thin; scrollbar-color: rgba(138, 100, 32, .5) transparent;
}
.card::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .16; mix-blend-mode: multiply; border-radius: inherit;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.65' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .33 0 0 0 0 .15 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23p)'/%3E%3C/svg%3E");
}

.corner { position: absolute; width: 54px; height: 54px; pointer-events: none; }
.corner svg { width: 100%; height: 100%; display: block; overflow: visible; }
.corner.tl { top: 14px; left: 14px; }
.corner.tr { top: 14px; right: 14px; transform: scaleX(-1); }
.corner.bl { bottom: 14px; left: 14px; transform: scaleY(-1); }
.corner.br { bottom: 14px; right: 14px; transform: scale(-1, -1); }

.seal { position: absolute; top: -46px; left: 50%; width: 96px; height: 96px; transform: translateX(-50%) rotate(-8deg); z-index: 2; filter: drop-shadow(0 8px 12px rgba(0, 0, 0, .5)); }
.seal svg { width: 100%; height: 100%; display: block; }
.seal span {
  position: absolute; inset: 0; display: grid; place-items: center; padding-bottom: 2px;
  font: 700 34px/1 var(--caps); color: #7a111b;
  text-shadow: -1px -1px 0 rgba(0, 0, 0, .45), 1px 1px 0 rgba(255, 140, 140, .35);
}

.close {
  position: absolute; top: 14px; right: 14px; z-index: 3; width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer;
  background: transparent; display: grid; place-items: center;
}
.close svg { width: 18px; height: 18px; stroke: #8a6420; stroke-width: 1.6; stroke-linecap: round; fill: none; }
.close:hover { background: rgba(138, 100, 32, .1); }
.close:focus { outline: none; }
.close:focus-visible { box-shadow: 0 0 0 1px rgba(138, 100, 32, .6); }

.card-inner { position: relative; }
.card-eyebrow { margin: 0 0 12px; font: 600 11px/1.4 var(--caps); letter-spacing: .3em; text-transform: uppercase; color: #8a6420; }
.option-tag {
  display: inline-block; margin: -2px 0 12px; padding: 5px 12px 4px; border-radius: 99px;
  font: 700 9px/1 var(--caps); letter-spacing: .24em; text-transform: uppercase; color: #f3e8d2; background: var(--wine);
}
.option-tag[hidden] { display: none; }
.card h2 { margin: 0 0 14px; font: italic 600 clamp(2rem, 6vw, 2.7rem)/1.02 var(--display); color: var(--wine); text-wrap: balance; }
.card .divider { margin-bottom: 22px; }

.meta { display: grid; grid-template-columns: auto 1fr; gap: 10px 18px; margin: 0 auto 22px; max-width: 400px; text-align: left; }
.meta:empty { display: none; }
.meta dt { font: 700 9.5px/1.9 var(--caps); letter-spacing: .24em; text-transform: uppercase; color: #8a6420; padding-top: 2px; }
.meta dd { margin: 0; font: 500 1.16rem/1.35 var(--display); color: var(--ink); }

.body { font-size: 1.24rem; line-height: 1.55; color: #3a2a1c; }
.body p { margin: 0 0 .9em; }
.body p:last-child { margin-bottom: 0; }

.photo { margin: 22px 0 0; padding: 8px 8px 30px; background: #fffaf0; box-shadow: 0 8px 22px rgba(60, 40, 10, .25); transform: rotate(-1.6deg); }
.photo[hidden] { display: none; }
.photo img { display: block; width: 100%; height: auto; }

.choose { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 28px; }
.choose[hidden] { display: none; }
.btn {
  appearance: none; border: 0; cursor: pointer; padding: 13px 20px 12px; border-radius: 99px;
  font: 700 10.5px/1 var(--caps); letter-spacing: .2em; text-transform: uppercase; transition: transform .2s, box-shadow .2s, opacity .2s;
}
.btn:active { transform: scale(.97); }
.btn.gold { color: #2a1c06; background: var(--foil); background-size: 200% auto; box-shadow: 0 6px 18px rgba(160, 110, 30, .35), inset 0 0 0 1px rgba(255, 255, 255, .4); }
.btn.gold:hover { box-shadow: 0 8px 26px rgba(160, 110, 30, .5), inset 0 0 0 1px rgba(255, 255, 255, .6); }
.btn.gold[disabled] { opacity: .55; cursor: default; }
.btn.ghost { color: var(--wine); background: transparent; box-shadow: inset 0 0 0 1px rgba(94, 15, 24, .45); }
.btn.ghost:hover { background: rgba(94, 15, 24, .06); }

.stamp {
  position: absolute; top: 4px; right: -6px; transform: rotate(14deg); pointer-events: none;
  padding: 7px 12px 6px; border: 2px solid rgba(40, 110, 70, .8); border-radius: 6px;
  font: 700 12px/1 var(--caps); letter-spacing: .25em; text-transform: uppercase; color: rgba(30, 100, 60, .85);
  box-shadow: inset 0 0 0 2px rgba(243, 232, 210, 1), inset 0 0 0 3px rgba(40, 110, 70, .5);
  animation: stamp .45s cubic-bezier(.2, 1.6, .4, 1) both;
}
.stamp[hidden] { display: none; }
@keyframes stamp { from { opacity: 0; transform: rotate(14deg) scale(2.2); } }

.sign { margin: 30px 0 0; font: italic 500 1.25rem/1 var(--display); color: #8a6420; }
.sign:empty { display: none; }

/* ── Toast ────────────────────────────────────────────── */

.toast {
  position: fixed; left: 50%; bottom: max(24px, env(safe-area-inset-bottom)); z-index: 70; max-width: calc(100% - 32px);
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none; transition: opacity .35s, transform .35s;
  padding: 13px 20px; border-radius: 12px; text-align: center;
  font: italic 500 1.08rem/1.3 var(--display); color: var(--cream);
  background: rgba(10, 18, 14, .88); backdrop-filter: blur(10px);
  box-shadow: inset 0 0 0 1px rgba(216, 178, 90, .45), 0 12px 40px rgba(0, 0, 0, .5);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast b { font: 600 11px/1 var(--caps); letter-spacing: .18em; text-transform: uppercase; color: var(--gold); font-style: normal; }

@media (max-width: 420px) {
  .wrap { padding-top: 108px; }
  .cd-unit { min-width: 54px; }
  .cd-unit b { font-size: 1.55rem; }
  .mon { letter-spacing: .2em; font-size: 7px; }
  .knob { width: 7px; height: 7px; }
}

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

/* ── Twelve-month edition ─────────────────────────────── */

.door .num { font-size: clamp(1.45rem, 5.2vw, 2.3rem); letter-spacing: .04em; }
.door .mon { letter-spacing: .18em; }

.photo-bg {
  position: absolute; inset: 0; background-size: cover; background-position: center;
  opacity: 0; transform: scale(1.08); transition: opacity 1.2s .3s, transform 2.4s .3s;
}
.photo-bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8, 5, 2, .35) 0%, rgba(8, 5, 2, .25) 35%, rgba(8, 5, 2, .88) 100%); }
.door.open .photo-bg { opacity: 1; transform: none; }
.door.open .cavity { place-items: end center; padding-bottom: 14px; }
.door.open .glow { opacity: .35; animation: none; }

.photo { margin: 0 auto 22px; max-width: 420px; padding: 8px 8px 10px; }
.photo img { aspect-ratio: 3 / 2; object-fit: cover; }

.option-tag.alt { background: #1d4a38; }
.btn.gold.armed { background: linear-gradient(115deg, #5e0f18, #a81d2a 50%, #5e0f18); color: #f6eedd; animation: armed 1s ease-in-out infinite; }
@keyframes armed { 50% { box-shadow: 0 0 0 4px rgba(168, 29, 42, .25), 0 8px 26px rgba(94, 15, 24, .45); } }
.btn[hidden] { display: none; }
.choose-hint { margin: 12px 0 0; font: italic 500 1rem/1.3 var(--display); color: #8a6420; }
.choose-hint[hidden] { display: none; }
.photo { position: relative; }
.photo .stamp { top: auto; bottom: -14px; right: -10px; background: #f3e8d2; transform: rotate(-8deg); animation-name: stamp2; }
@keyframes stamp2 { from { opacity: 0; transform: rotate(-8deg) scale(2.2); } }
