:root {
  color-scheme: dark;
  --ink: #101e18;
  --cream: #fff5e7;
  --gold: #f6d49b;
  --muted: #c8d2c8;
  --border: #e8ddbd37;
  --display: "Cormorant Garamond", Georgia, serif;
  --sans: "DM Sans", system-ui, sans-serif;
  font-family: var(--sans);
  background: var(--ink);
  color: var(--cream);
}

@font-face {
  font-family: "Cormorant Garamond";
  src: url("/fonts/cormorant.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "Cormorant Garamond";
  src: url("/fonts/cormorant-italic.woff2") format("woff2");
  font-style: italic;
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "DM Sans";
  src: url("/fonts/dm-sans.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scrollbar-gutter: stable; }
body {
  margin: 0;
  min-width: 300px;
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 83% 37rem, #264734, transparent 38rem),
    radial-gradient(ellipse at 12% 67rem, #4b2c24, transparent 41rem),
    var(--ink);
}
body:is(.showing-surprise, .showing-welcome) { overflow: hidden; }
[hidden] { display: none !important; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
::selection { background: #ab4345; color: white; }

.shell { width: min(100% - clamp(2rem, 8vw, 7.5rem), 75rem); margin-inline: auto; }
.sr-only, .skip-link:not(:focus) {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip-link:focus {
  position: fixed; z-index: 5; left: 1rem; top: 1rem; padding: .75rem 1rem;
  border-radius: .5rem; color: var(--ink); background: var(--gold);
}

.close-button {
  cursor: pointer; display: inline-flex; align-items: center; gap: .6rem; min-height: 2.6rem;
  padding: .44rem .85rem; border: 1px solid #eed8b534; border-radius: 99px;
  background: #0a130c5c; color: var(--cream); text-align: left; font-size: .88rem;
  transition: background .22s, border-color .22s;
}
.close-button:hover { background: #fff3cd17; border-color: var(--reveal-accent); }
.ui-icon { display: block; width: 1rem; height: 1rem; flex: none; }

.hero {
  --hero-height: clamp(14rem, 27vw, 31.5rem);
  --hero-fill: #0e2118;
  position: relative; isolation: isolate; display: grid; align-items: center;
  min-height: var(--hero-height); overflow: hidden; background: var(--hero-fill);
}
.hero-art {
  position: absolute; inset: 0 0 0 auto;
  inline-size: min(100%, calc(var(--hero-height) * 3.75));
}
.hero-art img {
  display: block; inline-size: 100%; block-size: 100%;
  object-fit: cover; object-position: right top;
}
.hero-art::after {
  position: absolute; inset: 0; pointer-events: none; content: "";
  background: linear-gradient(90deg, var(--hero-fill), transparent 21%),
    linear-gradient(0deg, #14251cb5, transparent 14%);
}
.hero::after { position: absolute; inset: auto 0 0; height: 1px; background: linear-gradient(90deg, transparent, #d9ba6d5c, transparent); content: ""; }
.home-mute {
  position: absolute; inset: .62rem .65rem auto auto; z-index: 1;
  display: grid; place-items: center; inline-size: 2.75rem; block-size: 2.75rem;
  padding: 0; border: 1px solid #fff4cf2e; border-radius: 50%;
  background: #101e184f; color: #ffebc7; backdrop-filter: blur(4px); cursor: pointer;
}
.home-mute:hover, .home-mute:focus-visible { background: #101e18bf; border-color: #fff4cf80; }
.home-mute .home-mute-off, .home-mute[aria-pressed="true"] .home-mute-on { display: none; }
.home-mute[aria-pressed="true"] .home-mute-off { display: block; }
.hero-copy {
  position: relative; z-index: 1; margin-inline: clamp(1rem, 6.4vw, 11rem); padding-block: 2rem;
}
.hero h1 {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: .16em .32em;
  max-inline-size: min(42.5vw, 46rem);
  font: 600 clamp(1.75rem, 4.1vw, 4.6rem)/.95 var(--display);
  letter-spacing: -.045em; margin: 0;
  text-shadow: 0 .25rem 2rem #100c0985;
}
.hero h1 em {
  color: var(--gold); font-size: .84em; font-weight: 600; letter-spacing: -.028em;
}
.surprise-link {
  display: flex; align-items: center; gap: .7rem; text-decoration: none; width: fit-content; min-height: 2.9rem;
  margin: 0 auto;
  padding: .53rem 1rem; border: 1px solid #f8d9aa; border-radius: 2rem; background: #f5ce95;
  color: #28172b; font-weight: 700; font-size: .9rem; transition: background .2s, box-shadow .2s;
}
.surprise-link:hover { background: #ffe3ba; box-shadow: 0 0 1.2rem #f5ce9540; }
.hero-snow { position: fixed; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; }
.snow-grain {
  position: absolute; top: -.65rem; left: var(--x); width: var(--size); aspect-ratio: 1; border-radius: 50%;
  background: #fffaf0; opacity: 0;
  animation: fall var(--speed) var(--delay) linear infinite;
}
.snow-flake {
  width: auto; aspect-ratio: auto; border-radius: 0; background: transparent;
  color: #f0f9ff; font: 500 var(--flake-size)/1 "Segoe UI Symbol", var(--sans); text-shadow: 0 0 .45rem #e9f8ff85;
}
@keyframes fall {
  0% { opacity: 0; transform: translate(0, 0); }
  11%, 87% { opacity: var(--opacity); }
  100% { opacity: 0; transform: translate(var(--drift), calc(100dvh + 1.5rem)) rotate(var(--rotation, 0deg)); }
}

.calendar { padding-top: clamp(1rem, 2.3vw, 2.2rem); scroll-margin: 1.15rem; }
.calendar-heading {
  position: relative; z-index: 1; display: grid; gap: clamp(.85rem, 1.9vw, 1.5rem);
  container-type: inline-size;
}
.calendar h2 {
  margin: .3rem 0 0; font: 600 clamp(1rem, 6vw, 4.4rem)/1 var(--display);
  font-size: min(4.4rem, 6.8cqi);
  letter-spacing: -.03em; text-align: center; white-space: nowrap;
}
.calendar-controls { position: relative; display: flex; align-items: center; justify-content: end; gap: .25rem; }
.calendar-progress { min-width: 11.6rem; padding: .72rem .87rem; border: 1px solid var(--border); border-radius: .78rem; background: #1d3025; }
.progress-label { display: flex; gap: .8rem; justify-content: space-between; color: #e8e4d6; font-size: .8rem; }
.progress-label span:last-child { color: var(--gold); font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.calendar-progress progress {
  display: block; width: 100%; height: .27rem; margin-top: .47rem; overflow: hidden;
  appearance: none; border: 0; border-radius: 1rem; background: #f7edd734; color: var(--gold);
}
.calendar-progress progress::-webkit-progress-bar { border-radius: 1rem; background: #f7edd734; }
.calendar-progress progress::-webkit-progress-value { border-radius: 1rem; background: linear-gradient(90deg, #c78b50, #ffe1a5); }
.calendar-progress progress::-moz-progress-bar { border-radius: 1rem; background: linear-gradient(90deg, #c78b50, #ffe1a5); }
.calendar-status {
  display: flex; align-items: center; flex-wrap: wrap; gap: .55rem 1rem;
  min-height: 1.5rem; margin: .55rem 0 .6rem; color: var(--muted); font-size: .89rem;
}
.pending-button {
  display: inline-flex; align-items: center; gap: .5rem; min-height: 2.6rem; padding: .37rem .7rem;
  border: 1px solid var(--border); border-radius: 50rem; color: var(--cream); background: #1c3026;
  cursor: pointer; font-size: .84rem;
}
.pending-button:is(:hover, [aria-pressed="true"]) { border-color: var(--gold); background: #2c432f; }
.pending-button .ui-icon { color: var(--gold); }
.pending-count { padding: .08rem .37rem; border-radius: 50rem; color: #281d13; background: var(--gold); font-weight: 700; }
.pending-empty { padding: 1.3rem; border: 1px dashed var(--border); border-radius: .85rem; color: var(--muted); text-align: center; }
.gift-info summary {
  display: grid; place-items: center; width: 2.75rem; height: 2.75rem;
  list-style: none; border-radius: .55rem; cursor: pointer;
}
.gift-info summary::-webkit-details-marker { display: none; }
.gift-info summary:focus-visible { outline: 2px solid var(--gold); outline-offset: -3px; }
.gift-info-icon {
  display: grid; place-items: center; width: 1.55rem; height: 1.55rem;
  border: 1px solid #ddb873ad; border-radius: 50%; color: var(--gold); background: #f6d49b0e;
  font-size: .98rem; line-height: 1; font-weight: 700;
}
.gift-info[open] .gift-info-icon, .gift-info summary:hover .gift-info-icon {
  background: var(--gold); color: var(--ink);
}
.gift-help {
  position: absolute; z-index: 3; right: 0; top: calc(100% + .45rem); width: min(21rem, calc(100vw - 3.5rem));
  margin: 0; padding: .82rem 1rem; border: 1px solid #d6ba8075; border-radius: .7rem;
  color: var(--cream); background: #25392d; box-shadow: 0 .55rem 1.2rem #0b0e0b90; font-size: .9rem; line-height: 1.5;
}
.gift-help::before {
  content: ""; position: absolute; top: -.32rem; right: 1.06rem; width: .6rem; height: .6rem;
  rotate: 45deg; border-top: 1px solid #d6ba8075; border-left: 1px solid #d6ba8075; background: inherit;
}
.countdown { margin-inline-start: auto; color: var(--gold); font-weight: 600; font-variant-numeric: tabular-nums; }
.countdown:has(.countdown-clock) { display: inline-flex; align-items: center; gap: .55rem; flex-wrap: wrap; justify-content: flex-end; }
.countdown-clock { display: inline-flex; gap: .18rem; }
.countdown-part {
  display: inline-flex; align-items: baseline; justify-content: center; gap: .16rem;
  padding: .26rem .34rem; min-inline-size: 2.02rem; border: 1px solid #dcb16b46; border-radius: .35rem;
  background: #eecf9210; line-height: 1;
}
.countdown-unit { color: #dfbc82; font-size: .66em; font-weight: 700; }
.countdown[data-finished] { color: #adb5ad; }
.retry-button {
  border: 0; color: var(--gold); background: transparent; padding: .35rem .15rem;
  text-decoration: underline; text-underline-offset: .2rem; cursor: pointer;
}
.fallback-message { padding: .85rem; border: 1px solid var(--border); border-radius: .65rem; color: var(--muted); }

.door-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(.65rem, 1.24vw, 1.1rem); }
.door {
  --tile: #422825;
  --wrap: #d64c4d;
  --paper-top: #ef7670;
  --ribbon: #ffd180;
  --tint: #f5ceaa;
  --pattern-ink: color-mix(in srgb, var(--tint), transparent 70%);
  --pattern: repeating-linear-gradient(123deg, transparent 0 8px, var(--pattern-ink) 8px 9px, transparent 9px 16px);
  --box-inset: 11%;
  --box-top: 31%;
  --gift-lean: -7deg;
  --lid-rise: -104%;
  --lid-tilt: -19deg;
  min-width: 0; min-height: clamp(9.6rem, 12.8vw, 11.75rem);
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; align-items: flex-end; justify-content: flex-start;
  padding: .9rem 1.05rem; border: 1px solid color-mix(in srgb, var(--tint), transparent 68%);
  border-radius: .95rem; color: #fff5e7; cursor: pointer; text-align: left;
  background:
    radial-gradient(ellipse at 73% 25%, color-mix(in srgb, var(--tint), transparent 90%), transparent 72%),
    linear-gradient(137deg, var(--tile), color-mix(in srgb, var(--tile), #101713 48%));
  box-shadow: 0 .55rem 1.15rem #080d0975;
  transition: transform .25s, border-color .25s, box-shadow .25s;
}
.door:nth-child(5n + 2) { --tile: #243e32; --wrap: #269963; --paper-top: #61bf84; --ribbon: #f3deb1; --tint: #c6e3bb; }
.door:nth-child(5n + 3) { --tile: #443827; --wrap: #d4a34a; --paper-top: #f2d395; --ribbon: #a84049; --tint: #f1d8a8; }
.door:nth-child(5n + 4) { --tile: #233f43; --wrap: #359eb2; --paper-top: #71c5cc; --ribbon: #f7d898; --tint: #c3e3db; }
.door:nth-child(5n + 5) { --tile: #442a30; --wrap: #bc476b; --paper-top: #dc7089; --ribbon: #f5b6ad; --tint: #f1c2b3; }
.door:nth-child(6n + 2) {
  --gift-lean: 7deg; --lid-tilt: 18deg; --box-inset: 8%; --box-top: 39%;
  --pattern: radial-gradient(circle at 3px 3px, var(--pattern-ink) 0 1.1px, transparent 1.7px) 0 0 / 9px 9px;
}
.door:nth-child(6n + 3) {
  --gift-lean: -3deg; --box-inset: 19%; --box-top: 26%;
  --pattern: repeating-linear-gradient(90deg, transparent 0 7px, var(--pattern-ink) 7px 9px, transparent 9px 16px);
}
.door:nth-child(6n + 4) {
  --gift-lean: 3deg; --lid-tilt: 15deg; --box-inset: 10%; --box-top: 30%;
  --pattern: repeating-linear-gradient(0deg, transparent 0 10px, var(--pattern-ink) 10px 11px, transparent 11px 17px);
}
.door:nth-child(6n + 5) {
  --gift-lean: -9deg; --box-inset: 6%; --box-top: 41%;
  --pattern: repeating-linear-gradient(48deg, transparent 0 5px, var(--pattern-ink) 5px 6px, transparent 6px 12px);
}
.door:nth-child(6n) {
  --gift-lean: 8deg; --lid-tilt: 20deg; --box-inset: 14%; --box-top: 28%;
  --pattern: radial-gradient(ellipse at 2px 2px, var(--pattern-ink) 0 1.5px, transparent 2.4px) 0 0 / 13px 8px;
}
.door.door-finale {
  --tile: #4e3b21;
  --wrap: #dfa63c;
  --paper-top: #ffe9a4;
  --ribbon: #fff1bb;
  --tint: #ffdea0;
  --gift-lean: -4deg;
  --box-inset: 11%;
  --box-top: 31%;
  grid-column: span 2;
  border-color: #f3d089a6;
  background: radial-gradient(ellipse at 69% 49%, #936534 0%, #594024 55%, #30271c 100%);
  box-shadow: 0 .35rem 1.55rem #efb45044, inset 0 0 1.2rem #f7c36d2b;
}
.door::before {
  content: ""; position: absolute; inset: .32rem; z-index: -1; border: 1px solid var(--tint);
  opacity: .17; border-radius: .69rem; pointer-events: none;
}
.door.door-finale::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(105deg, transparent 37%, #fff0aa1f 49%, transparent 61%);
  animation: gift-shine 8s ease-in-out infinite;
}
@keyframes gift-shine {
  0%, 32% { transform: translateX(-105%); }
  66%, 100% { transform: translateX(105%); }
}
@media (hover: hover) {
  .door:hover {
    transform: translateY(-.22rem); border-color: var(--tint);
    box-shadow: 0 .75rem 1.6rem #0b0e0bb0;
  }
}
.door[aria-busy="true"] { cursor: wait; }
.door[data-state="today"] { border-color: var(--gold); box-shadow: 0 0 1.55rem #eabf7340; }
.door-number {
  position: relative; z-index: 1; display: block; line-height: .78; letter-spacing: -.035em;
  font-family: var(--display); font-weight: 600; font-size: clamp(2.7rem, 4.9vw, 4.9rem);
  font-variant-numeric: lining-nums tabular-nums; padding-bottom: .1em;
  text-shadow: 0 .1rem .55rem #19160ee0;
}
.door.door-finale .door-number { color: #ffedb1; font-size: clamp(3.35rem, 5.65vw, 5.7rem); }
.door.door-finale .ornament { right: 10%; width: min(54%, 14rem); height: 86%; bottom: 7%; }
.door-state {
  position: absolute; z-index: 1; top: .8rem; left: .85rem; min-height: 1.35rem;
  display: inline-flex; align-items: center; padding: .12rem .45rem; border-radius: 1rem;
  background: var(--gold); color: #272218; font-size: .73rem; font-weight: 700;
}
.door-mark {
  position: absolute; z-index: 1; display: grid; place-items: center;
  top: .76rem; right: .8rem; width: 1.7rem; height: 1.7rem; border-radius: 50%;
  background: #101811a8; border: 1px solid #fff6d832; color: var(--tint); font-size: .92rem; line-height: 1;
}
.door-mark .ui-icon { width: .8rem; height: .8rem; }
.ornament {
  position: absolute; right: 5%; bottom: 10%; width: 59%; height: 69%;
  pointer-events: none; transform: rotate(var(--gift-lean));
}
.ornament::before, .ornament::after { content: ""; position: absolute; }
.ornament::before {
  inset: var(--box-top) var(--box-inset) 9%;
  border: 1px solid #ffe8a638; border-radius: .19rem .19rem .46rem .46rem;
  background:
    linear-gradient(90deg, transparent 42%, var(--ribbon) 42% 59%, transparent 59%),
    var(--pattern),
    linear-gradient(147deg, var(--wrap), color-mix(in srgb, var(--wrap), #1d1710 33%));
  box-shadow: .25rem .4rem .8rem #100e0b55, inset -.55rem 0 .65rem #21141545;
  transition: box-shadow .36s;
}
.ornament::after {
  top: var(--box-top); left: calc(var(--box-inset) - 4%); right: calc(var(--box-inset) - 4%);
  height: 19%; translate: 0 -32%;
  border: 1px solid #fff1d76b; border-radius: .25rem;
  background:
    linear-gradient(90deg, transparent 42.8%, var(--ribbon) 42.8% 58.3%, transparent 58.3%),
    var(--pattern), linear-gradient(155deg, var(--paper-top), var(--wrap));
  box-shadow: 0 .28rem .5rem #170e1355;
}
.ornament span {
  position: absolute; z-index: 1; top: calc(var(--box-top) - 5%); left: 50%;
  display: block; width: 12%; height: 12%; border-radius: 50%;
  font-size: 0; translate: -50% -88%; background: var(--ribbon);
}
.ornament span::before, .ornament span::after {
  content: ""; position: absolute; bottom: 12%; width: 210%; height: 122%;
  border: clamp(2px, .34vw, 5px) solid var(--ribbon);
  box-shadow: inset 0 1px 2px #fff7c861, 0 2px 3px #25140b48;
}
.ornament span::before { right: 49%; border-radius: 64% 38% 38% 44%; rotate: 24deg; }
.ornament span::after { left: 49%; border-radius: 38% 64% 44% 38%; rotate: -24deg; }
.ornament::after, .ornament span {
  transform-origin: center;
  transition: transform .48s cubic-bezier(.21,.8,.3,1.15);
}
.door:is([data-opened="true"], [data-state="opened"]) .ornament::before {
  box-shadow: .3rem .43rem .82rem #100e0b55, inset 0 .58rem .62rem #190d0aaf, inset -.55rem 0 .65rem #21141545;
}
.door:is([data-opened="true"], [data-state="opened"]) .ornament::after,
.door:is([data-opened="true"], [data-state="opened"]) .ornament span {
  transform: translateY(var(--lid-rise)) rotate(var(--lid-tilt));
}
.door:is([data-opened="true"], [data-state="opened"]) .ornament span { transform: translateY(-150%) rotate(var(--lid-tilt)); }
.corner-spark { position: absolute; left: 1rem; top: .8rem; color: var(--tint); opacity: .79; font-size: 1rem; }
.door:is([data-opened="true"], [data-state="opened"]) .corner-spark {
  color: #ffe29b; text-shadow: 0 0 .8rem #ffcb70d0; animation: gift-spark .75s both;
}
@keyframes gift-spark { 0% { opacity: 0; scale: .45; } 55% { opacity: 1; scale: 1.43; } 100% { opacity: .79; scale: 1; } }
.door.nudge { animation: nudge .34s ease-out; }
@keyframes nudge {
  25% { transform: translateX(-.23rem) rotate(-.6deg); }
  65% { transform: translateX(.18rem) rotate(.55deg); }
}
.toast {
  display: flex; align-items: center; gap: .75rem; position: fixed; z-index: 4; left: 50%;
  top: max(1rem, calc(env(safe-area-inset-top) + .55rem)); translate: -50% 0;
  width: max-content; max-width: calc(100% - 2rem); padding: .68rem 1rem .68rem .72rem;
  color: var(--cream); background: linear-gradient(120deg, #1d6141, #114533);
  border: 1px solid #efc97ea3; border-radius: .9rem;
  box-shadow: 0 .65rem 2rem #0719128c, inset 0 1px #ffda9d33;
  font-size: .94rem; font-weight: 600; line-height: 1.4;
  pointer-events: none; animation: appear .2s ease-out;
}
.toast-symbol {
  display: grid; place-items: center; flex: none;
  width: 2rem; aspect-ratio: 1; border-radius: 50%;
  color: #322316; background: #f8d389;
}
@keyframes appear { from { opacity: 0; transform: translateY(-.45rem); } }

.site-footer { padding-block: 2.6rem 2.2rem; text-align: center; }
.footer-star { color: var(--gold); }
.site-footer p { color: var(--cream); margin: .55rem 0 0; font: 600 1.3rem/1.2 var(--display); }
.site-footer strong { font-weight: 700; }

.reveal {
  --reveal-base: #16261e;
  --reveal-glow: #35543c;
  --reveal-accent: #f6d49b;
  --reveal-soft: #ebe0c9;
  --reveal-width: 47rem;
  inset: 0; margin: auto; width: min(calc(100% - 2rem), var(--reveal-width)); height: max-content;
  max-width: none; max-height: none; overflow: visible; border: 0; padding: 0; background: transparent; color: var(--cream);
}
.reveal:focus-visible { outline: none; }
.reveal::backdrop { background: #07140fce; backdrop-filter: blur(5px); animation: backdrop-in .385s ease both; }
.reveal.closing::backdrop { animation: backdrop-out .235s ease both; }
@keyframes backdrop-in { from { opacity: 0; } }
@keyframes backdrop-out { to { opacity: 0; } }
.reveal[data-type="letter"] {
  --reveal-base: #261f17; --reveal-glow: #694633; --reveal-accent: #ffdba3; --reveal-width: 44rem;
}
.reveal[data-type="music"] {
  --reveal-base: #122b22; --reveal-glow: #2c5947; --reveal-accent: #dcdf9e;
}
.reveal[data-type="photo"] {
  --reveal-base: #142a28; --reveal-glow: #3c6258; --reveal-accent: #e2ddb0;
}
.reveal[data-type="video"] {
  --reveal-base: #251913; --reveal-glow: #5d392d; --reveal-accent: #ffd59d; --reveal-width: 54rem;
}
.reveal[data-type="experience"] { --reveal-width: 54rem; }
.reveal[data-day="24"] {
  --reveal-base: #2c2218; --reveal-glow: #795033; --reveal-accent: #ffdb91;
}
.reveal-frame {
  overflow: hidden; background: radial-gradient(ellipse at 50% 8%, var(--reveal-glow), transparent 72%), var(--reveal-base);
  border: 1px solid color-mix(in srgb, var(--reveal-accent) 50%, transparent); border-radius: 1.5rem;
  box-shadow: 0 2rem 6rem #060d09d0, inset 0 0 0 .3rem #fbebc50b;
}
.reveal-scroll { overflow: auto; outline: 0; max-height: min(calc(100dvh - 2rem), 55rem); overscroll-behavior: contain; }
@media (forced-colors: none) {
  .reveal-scroll {
    --reveal-scroll-thumb: transparent;
    scrollbar-width: thin; scrollbar-gutter: stable;
    scrollbar-color: var(--reveal-scroll-thumb) transparent;
  }
  .reveal-scroll[data-scrollbar-near] { --reveal-scroll-thumb: #e9cc96a8; }
  .reveal-scroll::-webkit-scrollbar { width: .5rem; }
  .reveal-scroll::-webkit-scrollbar-track { background: transparent; }
  .reveal-scroll::-webkit-scrollbar-thumb { border-radius: 1rem; background: var(--reveal-scroll-thumb); }
}
.reveal-toolbar {
  position: sticky; top: 0; z-index: 2;
  display: flex; align-items: center; justify-content: space-between; gap: .6rem;
  padding: .64rem clamp(1rem, 3.5vw, 1.8rem); border-bottom: 1px solid #f9e6bb24;
  background: color-mix(in srgb, var(--reveal-base) 90%, transparent); backdrop-filter: blur(8px);
}
.close-button .ui-icon { color: var(--reveal-accent); }
.reveal-date { color: var(--reveal-accent); font-size: .85rem; font-weight: 600; text-align: right; }
.surprise {
  display: grid; gap: clamp(1rem, 3.4vw, 1.65rem); min-width: 0;
  padding: clamp(1.25rem, 4.15vw, 2.9rem);
}
.surprise > [data-block] { min-width: 0; }
.surprise:focus { outline: 0; }
.surprise-header { text-align: center; }
.reveal[open]:not(.closing) .surprise-header { animation: unwrap-title .46s ease both; }
@keyframes unwrap-title {
  from { opacity: .4; transform: translateY(.55rem); }
}
.surprise-header::after {
  content: ""; display: block; width: 5rem; height: 1px; margin: 1.05rem auto 0;
  background: linear-gradient(90deg, transparent, var(--reveal-accent), transparent);
}
.surprise h2 {
  margin: 0 auto; color: var(--cream); max-width: 17ch; overflow-wrap: anywhere; text-wrap: balance;
  font: 600 clamp(2.1rem, 5.1vw, 4.05rem)/.98 var(--display); letter-spacing: -.025em;
}
.surprise h2:focus { outline: none; }
.surprise-subtitle { margin: .65rem auto 0; color: var(--reveal-soft); font-size: 1rem; line-height: 1.55; text-wrap: pretty; overflow-wrap: anywhere; }
.surprise-prose { width: min(100%, 55ch); margin: 0 auto; line-height: 1.74; color: var(--reveal-soft); overflow-wrap: anywhere; }
.surprise-prose p { margin: 0 0 1rem; white-space: pre-wrap; }
.surprise-prose p:last-child { margin-bottom: 0; }
.surprise[data-type="letter"] .surprise-prose {
  padding: clamp(1.1rem, 3.4vw, 2rem); border: 1px solid #e0bc84; border-radius: .75rem; color: #36271c;
  background: radial-gradient(ellipse at 10% 0%, #fff7e5, transparent 72%), #f2dfbc;
  box-shadow: 0 .8rem 1.8rem #140b063f, inset 0 0 0 .25rem #af754b22;
}
.surprise-photo {
  display: grid; width: min(100%, 35rem); margin: 0 auto; padding: clamp(.38rem, 1.7vw, .85rem);
  background: #eddcbb; border: 1px solid #ffeacf; border-radius: .65rem; box-shadow: 0 .85rem 2.25rem #0b120f70;
}
.surprise-photo img {
  display: block; width: 100%; aspect-ratio: 3 / 2; max-height: 58dvh; object-fit: contain;
  border-radius: .32rem; background: #1c2821;
}
.surprise-gallery {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start;
  width: min(100%, 46rem); gap: clamp(.6rem, 2vw, 1rem); margin-inline: auto;
}
.surprise-gallery[data-layout="single"] { grid-template-columns: minmax(0, 30rem); justify-content: center; }
.surprise-gallery .surprise-photo {
  width: 100%; margin: 0; border: 1px solid #ffe4ae4f; background: #0d1b15a3;
}
.surprise-gallery img { aspect-ratio: 4 / 3; width: 100%; object-fit: contain; }
.surprise-gallery[data-layout="single"] img { aspect-ratio: auto; object-fit: contain; }
.surprise-gallery figcaption { padding: .65rem .8rem .8rem; color: var(--reveal-soft); font-size: .91rem; line-height: 1.5; }
.surprise-listening {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(.85rem, 3.2vw, 1.5rem); align-items: center;
  width: min(100%, 32.5rem); padding: clamp(.75rem, 2.5vw, 1.15rem); margin: 0 auto;
  background: linear-gradient(120deg, #ead9af27, #0d1c172e 72%), #12251d;
  border: 1px solid #f1d5a258; border-radius: 1rem; box-shadow: 0 1rem 1.65rem #07120e58;
}
.gift-player-sleeve {
  display: grid; place-items: center; width: clamp(5rem, 14vw, 8.1rem); aspect-ratio: 1;
  padding: .42rem; border: 1px solid #e7c4965e; border-radius: .76rem;
  background: linear-gradient(130deg, #5d4740, #302d27 75%);
  box-shadow: inset 0 0 0 .18rem #0e151262, 0 .36rem .85rem #07130e68;
}
.surprise-record {
  display: grid; place-items: center; width: 100%; aspect-ratio: 1;
  border: 1px solid #e8dbb754; border-radius: 50%;
  background: conic-gradient(from 20deg, #10131416, #f5ebc044 16%, #10131400 27%,
    #1013141c 52%, #e4e7d337 66%, #10131402 81%),
    repeating-radial-gradient(circle, #151e21 0 1px, #2e393c 1.5px, #1d2629 2px 3px);
  box-shadow: 0 .24rem .56rem #040907aa, inset 0 0 .32rem #040705;
  animation: gift-record-spin 11s linear infinite paused;
}
.surprise-listening[data-playing] .surprise-record { animation-play-state: running; }
@keyframes gift-record-spin { to { transform: rotate(1turn); } }
.gift-record-label {
  width: 34%; aspect-ratio: 1; border-radius: 50%; border: 1px solid #fce7b28a;
  background: radial-gradient(circle, #171e1d 0 8%, #ebcc96 11% 15%, transparent 17%),
    radial-gradient(circle at 55% 74%, #ffe3aa 0 9%, transparent 12%), linear-gradient(25deg, #a74541 46%, #edcb8c 47%);
  box-shadow: 0 0 0 .15rem #111a1caf;
}
.gift-player-content { min-width: 0; }
.gift-player-controls {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .23rem .65rem; align-items: center;
}
.gift-player-toggle {
  display: grid; place-items: center; width: 2.85rem; aspect-ratio: 1; padding: 0;
  border: 1px solid #fce6b2; border-radius: 50%; background: #f5cc83; color: #17291e;
  cursor: pointer; transition: background .18s, box-shadow .18s;
}
.gift-player-toggle:hover { background: #ffe3ac; box-shadow: 0 0 0 .2rem #eecf9640; }
.gift-player-toggle .ui-icon { width: 1.06rem; height: 1.06rem; fill: currentColor; }
.gift-player-toggle[data-playing] .ui-icon { display: none; }
.gift-player-toggle[data-playing]::after {
  content: ""; width: .68rem; height: .86rem; border-inline: .2rem solid currentColor;
}
.gift-player-position { display: grid; min-width: 0; }
.gift-player-seek {
  appearance: none; width: 100%; min-width: 0; height: 1.35rem; margin: 0;
  background: transparent; cursor: pointer;
}
.gift-player-seek:disabled { opacity: .55; cursor: wait; }
.gift-player-seek::-webkit-slider-runnable-track {
  height: .33rem; border-radius: 1rem;
  background: linear-gradient(90deg, #f8d794 var(--seek-filled, 0%), #f6e4c64d var(--seek-filled, 0%));
}
.gift-player-seek::-webkit-slider-thumb {
  appearance: none; width: .88rem; height: .88rem; margin-top: -.27rem;
  border-radius: 50%; background: #f8d794;
}
.gift-player-seek::-moz-range-track { height: .33rem; border-radius: 1rem; background: #f6e4c64d; }
.gift-player-seek::-moz-range-progress { height: .33rem; border-radius: 1rem; background: #f8d794; }
.gift-player-seek::-moz-range-thumb { width: .88rem; height: .88rem; border: 0; border-radius: 50%; background: #f8d794; }
.gift-player-time { justify-self: end; color: #f0ddbc; font-size: .75rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.gift-player-volume-label {
  grid-column: 2; justify-self: end; display: flex; align-items: center; justify-content: end; gap: .4rem;
  min-width: 0; max-width: 100%; color: #ebdcc0; font-size: .73rem;
}
.gift-player-volume { width: min(4.8rem, 16vw); min-width: 0; height: 1.35rem; margin: 0; accent-color: #f5cc83; cursor: pointer; }
.gift-player-error { margin: .5rem 0 0; color: #ffdbc1; font-size: .84rem; }
.surprise-film {
  width: min(100%, 45rem); min-width: 0; padding: .42rem; margin: 0 auto;
  border: 1px solid #efc98c6b; border-radius: 1rem; background: #0d110f;
  box-shadow: 0 .85rem 2rem #1009058c;
}
.surprise video {
  display: block; width: 100%; max-height: 62dvh; aspect-ratio: 16 / 9;
  border-radius: .64rem;
  object-fit: contain; background: #111410;
}
.surprise-sections { display: grid; gap: .8rem; }
.surprise-section {
  padding: 1rem 1.1rem; background: #f5ce9512; border: 1px solid #f5ce953e;
  border-top: 2px solid var(--reveal-accent); border-radius: .68rem; overflow-wrap: anywhere;
}
.surprise-section h3 { margin: 0 0 .35rem; font-size: 1.05rem; color: var(--reveal-accent); }
.surprise-section p { margin: 0; color: var(--reveal-soft); line-height: 1.63; white-space: pre-wrap; }
.surprise-choices { width: min(100%, 44rem); margin-inline: auto; }
.gift-choice-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); gap: .9rem; }
.gift-choice-card {
  display: grid; align-content: center; gap: .54rem; width: 100%; min-width: 0;
  min-height: 7rem; padding: clamp(.95rem, 2.6vw, 1.3rem);
  border: 1px solid #f3d69c59; border-radius: .92rem; color: var(--cream);
  background: radial-gradient(ellipse at 8% 0%, #f9d58420, transparent 70%), #122c20;
  box-shadow: 0 .5rem 1.1rem #07160f62; text-align: left;
}
button.gift-choice-card {
  cursor: pointer; transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
  -webkit-tap-highlight-color: #f3ce8730;
}
button.gift-choice-card:disabled { opacity: .68; cursor: default; }
@media (hover: hover) {
  button.gift-choice-card:not(:disabled):hover {
    transform: translateY(-.2rem); border-color: var(--reveal-accent); box-shadow: 0 .7rem 1.35rem #07160fb4;
  }
}
button.gift-choice-card:not(:disabled):active { transform: scale(.975); }
.gift-choice-title {
  margin: 0; color: var(--reveal-accent); font: 600 clamp(1.32rem, 3.2vw, 1.78rem)/1.12 var(--display);
  overflow-wrap: anywhere;
}
.gift-choice-text { margin: 0; color: var(--reveal-soft); font-size: .98rem; line-height: 1.5; overflow-wrap: anywhere; white-space: pre-wrap; }
.gift-choice-card.is-selected {
  width: min(100%, 27rem); margin-inline: auto; border-color: #f5d58da6; text-align: center;
  background: radial-gradient(ellipse at 50% 0%, #ffe4a234, transparent 75%), #173222;
  animation: unwrap-title .3s ease both;
}
.gift-choice-badge {
  display: inline-flex; justify-self: center; align-items: center; gap: .35rem; padding: .17rem .58rem;
  background: #f4d694; border-radius: 1rem; color: #213424; font-size: .72rem; font-weight: 700;
}
.gift-choice-badge .ui-icon { width: .8rem; height: .8rem; }
.gift-choice-message {
  width: min(100%, 27rem); margin: .8rem auto 0;
  padding: clamp(.85rem, 2.8vw, 1.1rem) clamp(1rem, 4vw, 1.5rem);
  border: 1px solid #d99c9b82; border-radius: .92rem;
  color: #fff3e6; text-align: center;
  background: radial-gradient(ellipse at 50% 0%, #8b3c54, transparent 85%), #4a1c2d;
  box-shadow: 0 .5rem 1.2rem #16090f61, inset 0 1px #fff2d01a;
  line-height: 1.62; overflow-wrap: anywhere; white-space: pre-wrap;
}
.gift-choice-status { margin: 0; color: var(--reveal-soft); text-align: center; font-size: .9rem; }
.gift-choice-status:not(:empty) { margin-top: .7rem; }
.gift-choice-confirm {
  width: min(100% - 2rem, 27rem); padding: clamp(1.2rem, 4vw, 1.65rem);
  border: 1px solid #f0d19498; border-radius: 1rem; color: var(--cream);
  background: radial-gradient(ellipse at 50% 0%, #355539, transparent 88%), #192f21;
  box-shadow: 0 1.35rem 3.4rem #060d09d1;
  animation: unwrap-title .22s ease-out both;
}
.gift-choice-confirm::backdrop { background: #09170e9c; }
.gift-choice-confirm h2 {
  margin: 0; font: 600 clamp(1.7rem, 4.7vw, 2.25rem)/1.04 var(--display);
  text-wrap: balance;
}
.gift-choice-actions { display: flex; flex-wrap: wrap; gap: .55rem; justify-content: end; margin-top: 1.3rem; }
.gift-choice-actions button {
  min-height: 2.55rem; padding: .5rem .8rem; border: 1px solid #f4d59478; border-radius: .62rem;
  color: var(--cream); background: #102418a6; font-size: .88rem; font-weight: 700; cursor: pointer;
}
.gift-choice-actions button[value="choose"] { background: #f6d497; color: #203021; }
.gift-choice-actions button:hover { border-color: #fce2ad; }
.recipient-access form > p { color: var(--muted); line-height: 1.5; }
.recipient-access label { display: block; margin-bottom: .35rem; color: var(--cream); font-size: .9rem; }
.recipient-code-field { position: relative; }
.recipient-access input {
  display: block; width: 100%; padding: .72rem 3rem .72rem .8rem; border: 1px solid #e8c78565; border-radius: .55rem;
  background: #10231a; color: var(--cream); font: inherit;
}
.recipient-access input:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.recipient-code-field .password-toggle {
  position: absolute; inset: 1px 1px 1px auto; width: 2.65rem; padding: 0;
  border: 0; border-radius: .45rem; color: var(--gold); background: transparent; cursor: pointer;
}
.recipient-code-field .password-toggle:hover { background: #f6d49b20; }
.recipient-access .recipient-status { margin: .55rem 0 0; color: var(--gold); font-size: .88rem; }
.recipient-status:empty { display: none; }
.recipient-access button:disabled { opacity: .65; cursor: wait; }
.welcome {
  width: min(calc(100% - 2rem), 32rem); max-height: calc(100dvh - 2rem); padding: 0; overflow: auto;
  border: 1px solid #f0ca8980; border-radius: 1.2rem; color: var(--cream);
  background: radial-gradient(ellipse at 50% 13%, #33462c, transparent 68%), #15271e;
  box-shadow: 0 1.5rem 5rem #050d08cd; text-align: center;
}
.welcome[open] { animation: welcome-enter .35s cubic-bezier(.19, .84, .29, 1) both; }
.welcome::backdrop { background: #07140ec7; backdrop-filter: blur(7px); }
.welcome-inner {
  margin: .42rem; padding: 2.6rem clamp(1.25rem, 4vw, 2.4rem) clamp(1.25rem, 4vw, 2.4rem);
  border: 1px solid #f0ca8940; border-radius: .84rem;
}
.welcome-envelope {
  position: relative; isolation: isolate; width: 8.8rem; height: 5.85rem;
  margin: .65rem auto 1.4rem; border-radius: .28rem; perspective: 300px;
  background: linear-gradient(145deg, #e7bc76, #ac7841); box-shadow: 0 .65rem 1.6rem #08140c90;
}
.welcome-envelope::after {
  position: absolute; z-index: 1; inset: 0; content: ""; border-radius: inherit;
  clip-path: polygon(0 0, 51% 63%, 100% 0, 100% 100%, 0 100%);
  background: linear-gradient(31deg, #c49655 50%, #e8bb7b 51% 53%, #b27e44 54%);
}
.welcome-letter { position: absolute; inset: .25rem .55rem; border-radius: .16rem; background: #fff0c8; }
.welcome-flap {
  position: absolute; z-index: 2; inset: 0; border-radius: inherit; transform-origin: top;
  clip-path: polygon(0 0, 100% 0, 53% 66%, 47% 66%); background: linear-gradient(155deg, #f3d599, #d5a96e 73%);
}
.welcome-seal {
  position: absolute; z-index: 3; top: 49%; left: 50%; display: grid; place-items: center;
  width: 1.8rem; height: 1.8rem; translate: -50% -3%; border: 1px solid #d5847466; border-radius: 50%;
  background: #76283b; color: #ffd8bb; font-size: .86rem; box-shadow: 0 .2rem .5rem #35121c78;
}
.welcome h2 { margin: 0; font: 600 clamp(2rem, 7vw, 3.05rem)/.99 var(--display); text-wrap: balance; overflow-wrap: anywhere; }
.welcome-message { margin: .9rem 0 .55rem; color: #e6e2cf; font-size: .98rem; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.welcome-message:empty { display: none; }
.welcome-signature { margin: .58rem 0 0; color: var(--gold); font: italic 600 1.45rem/1.2 var(--display); overflow-wrap: anywhere; }
.welcome-open {
  min-height: 2.75rem; margin-top: 1.25rem; padding: .55rem 1.15rem; border: 1px solid #ffe6b8;
  border-radius: 50rem; color: #2b2118; background: #f0cb8b; cursor: pointer; font-weight: 700;
}
.welcome-open:hover { background: #ffe4ad; }
.welcome.is-unsealing .welcome-flap { animation: welcome-flap .34s ease-in-out both; }
.welcome.is-unsealing .welcome-letter { animation: welcome-letter .37s .02s ease-out both; }
.welcome.is-unsealing .welcome-seal { animation: welcome-seal .23s ease-out both; }
.welcome.is-unsealed .welcome-flap { transform: rotateX(157deg); }
.welcome.is-unsealed .welcome-letter { transform: translateY(-1.8rem); }
.welcome.is-unsealed .welcome-seal { opacity: 0; }
.welcome-letter-content:not([hidden]) { animation: welcome-enter .32s ease-out both; }
@keyframes welcome-enter { from { opacity: 0; transform: translateY(.85rem) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes welcome-flap { to { transform: rotateX(157deg); } }
@keyframes welcome-letter { to { transform: translateY(-1.8rem); } }
@keyframes welcome-seal { to { opacity: 0; transform: scale(1.2); } }
.preview-notice {
  width: min(100% - 2rem, 75rem); padding: .55rem .85rem; margin: .65rem auto;
  color: var(--gold); border: 1px solid #d7b97e75; border-radius: .6rem; background: #263728; font-size: .86rem;
}
.preview-notice a { text-underline-offset: .2rem; }

@media (min-width: 651px) {
  .surprise[data-type="experience"] .surprise-sections { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 850px) {
  .door { min-height: 8.8rem; padding: .76rem; }
  .door-state, .corner-spark { left: .75rem; }
  .ornament { width: 64%; right: 4%; }
}

@media (max-width: 1024px) and (forced-colors: none) {
  html {
    --page-scroll-thumb: transparent;
    scrollbar-width: thin;
    scrollbar-color: var(--page-scroll-thumb) transparent;
  }
  html[data-scrollbar-near] { --page-scroll-thumb: #dfc89699; }
  html::-webkit-scrollbar { width: .5rem; }
  html::-webkit-scrollbar-track { background: transparent; }
  html::-webkit-scrollbar-thumb { border-radius: 1rem; background: var(--page-scroll-thumb); }
}

@media (max-width: 650px) {
  .hero { min-height: 0; }
  .hero-art {
    position: relative; inset: auto; inline-size: 100%; aspect-ratio: 1.74;
  }
  .hero-art::after {
    background: linear-gradient(180deg, var(--hero-fill), transparent 9%),
      linear-gradient(0deg, #14251cb5, transparent 14%);
  }
  .hero-copy { margin-inline: 1rem; padding-block: 3.65rem .7rem; }
  .hero h1 {
    max-inline-size: 100%; flex-direction: column; align-items: center; gap: .2em;
    font-size: clamp(2.2rem, 6.95vw, 3.5rem);
    text-align: center;
  }
  .hero h1 em { font-size: 1em; }
  .door-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .door { min-height: clamp(7.35rem, 27vw, 10rem); padding: .62rem; border-radius: .8rem; }
  .door::before { inset: .27rem; border-radius: .55rem; }
  .door-number { font-size: clamp(2.4rem, 8.3vw, 3.85rem); }
  .door-mark { top: .55rem; right: .56rem; width: 1.4rem; height: 1.4rem; }
  .door-state { top: .55rem; left: .53rem; font-size: .67rem; padding-inline: .34rem; }
  .corner-spark { top: .6rem; left: .59rem; }
  .ornament { width: 72%; right: 5%; bottom: 15%; height: 65%; }
  .door.door-finale { min-height: 9.15rem; }
  .calendar-status { margin-block: .8rem; }
  .reveal { width: min(calc(100% - 1rem), var(--reveal-width)); }
  .reveal-frame { border-radius: 1rem; }
  .reveal-scroll { max-height: calc(100dvh - 1.25rem); }
  .reveal-toolbar { gap: .4rem; padding: .62rem .7rem; }
  .reveal-toolbar .close-button { gap: .38rem; min-height: 2.65rem; padding-inline: .62rem; font-size: .8rem; }
  .reveal-date { font-size: .76rem; }
}

@media (max-width: 520px) {
  .door-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .surprise-gallery { grid-template-columns: minmax(0, 1fr); }
  .calendar-progress { min-width: 0; padding: .59rem .65rem; }
  .progress-label { gap: .42rem; font-size: .73rem; }
}

@media (max-width: 350px) {
  .door-state { left: .4rem; padding-inline: .23rem; }
  .door-mark { right: .42rem; }
  .gift-player-sleeve { width: 4rem; }
  .surprise-listening { gap: .65rem; }
}

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