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

@font-face {
  font-family: Fraunces;
  src: url("./assets/fraunces.woff2") format("woff2");
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
}

@font-face {
  font-family: Fraunces;
  src: url("./assets/fraunces-italic.woff2") format("woff2");
  font-style: italic;
  font-weight: 500 700;
  font-display: swap;
}

:root {
  --cherry: #a52747;
  --wine: #4d1223;
  --pink: #f3d5d9;
  --cream: #fff8ee;
  --gold: #e8bf80;
  --ink: #3f2230;
  --muted: #785862;
  --paper: #fffcf8;
  --edge: #ede0d5;
  --serif: Fraunces, Georgia, serif;
  --sans: "DM Sans", system-ui, sans-serif;
  color-scheme: light;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--cream);
  scroll-behavior: smooth;
}

*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  background:
    radial-gradient(ellipse at 94% 33%, #f8e3e0 0, transparent 34rem),
    radial-gradient(ellipse at 1% 92%, #f6e0e2 0, transparent 33rem),
    var(--cream);
  min-width: 280px;
}

[hidden] { display: none !important; }
a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
button:focus-visible, a:focus-visible, summary:focus-visible {
  outline: 3px solid var(--cherry);
  outline-offset: 4px;
}
h1, h2, p, figure, ol, ul { margin: 0; }
html:has(dialog[open]) { overflow: hidden; }
.shell { width: min(1152px, calc(100% - 48px)); margin-inline: auto; }
.visually-hidden, .skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip-link:focus {
  position: fixed;
  z-index: 8;
  inset: 8px auto auto 8px;
  padding: 12px 20px;
  background: var(--paper);
  border-radius: 8px;
}

.site-header {
  background: color-mix(in srgb, var(--cream) 76%, white);
  border-bottom: 1px solid var(--edge);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 66px; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  font: 650 20px/1 var(--serif);
  color: var(--wine);
}
.brand-seal {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: var(--gold);
  background: var(--wine);
  border-radius: 11px;
  font: 16px/1 Georgia, serif;
  box-shadow: inset 0 0 0 1px #ffffff20;
}
.music-button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid #e6d4ce;
  background: var(--paper);
  color: var(--wine);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}
.music-button:hover, .music-button[aria-pressed="true"] { background: var(--pink); }
.music-note { color: var(--cherry); font: 19px/1 Georgia, serif; }

.hero {
  position: relative;
  isolation: isolate;
  min-height: 432px;
  display: flex;
  align-items: center;
  margin-block: 28px 20px;
  overflow: hidden;
  border-radius: 28px;
  background: var(--wine);
  color: #fff8ee;
  box-shadow: 0 18px 40px #64172a25;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 8px;
  z-index: 3;
  border-radius: 21px;
  border: 1px solid #f6c69242;
  pointer-events: none;
}
.hero-art {
  position: absolute;
  inset: 0 0 0 auto;
  width: 77%;
  z-index: -2;
}
.hero-art img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 78% 53%; }
.hero-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--wine) 1%, color-mix(in srgb, var(--wine) 90%, transparent) 19%, color-mix(in srgb, var(--wine) 42%, transparent) 41%, transparent 62%);
}
.hero-copy { flex: 0 1 59%; padding: 44px 0 44px clamp(32px, 5vw, 64px); }
.date-line {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--gold);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .17em;
}
.date-line > :first-child { font-size: 15px; }
.recipient { font: italic 500 19px/1.3 var(--serif); color: #ffd3d3; margin-top: 12px; }
.hero h1 { margin-top: 14px; font: 650 clamp(36px, 5.25vw, 65px)/1.04 var(--serif); letter-spacing: -.052em; text-wrap: balance; }
.hero h1 em { display: block; color: #ffd4d4; font-weight: 550; }
.welcome {
  margin-block: 20px 24px;
  max-width: 435px;
  color: #f8eae4;
  font-size: clamp(14px, 1.4vw, 16px);
  line-height: 1.55;
  text-wrap: pretty;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-height: 46px;
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid transparent;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  transition: translate .2s, background .2s;
}
.button:hover { translate: 0 -2px; }
.button:active { translate: 0 1px; }
.button-hero { background: #fff0d7; color: var(--wine); padding-inline: 18px; }
.button-hero:hover { background: var(--gold); }
.button-hero:focus-visible { outline-color: var(--gold); }
.button-hero > :last-child { font-size: 20px; line-height: 1; }
.external-arrow { position: relative; display: inline-block; flex: 0 0 10px; width: 10px; height: 10px; }
.external-arrow::before, .external-arrow::after { content: ""; position: absolute; }
.external-arrow::before { inset: 0 0 auto auto; width: 7px; height: 7px; border-top: 1.5px solid; border-right: 1.5px solid; }
.external-arrow::after { top: 4px; right: -1px; width: 11px; border-top: 1.5px solid; transform: rotate(-45deg); }
.snow { pointer-events: none; position: absolute; z-index: -1; inset: 0; overflow: hidden; color: #fff1ce; }
.flake {
  position: absolute;
  left: var(--left);
  top: -18px;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background: currentColor;
  animation: snowfall var(--duration) var(--delay) linear infinite;
}
.flake:nth-child(7n) { background: none; font: 11px/1 serif; }
@keyframes snowfall {
  from { opacity: 0; transform: translate3d(0, -8px, 0); }
  14%, 78% { opacity: .65; }
  to { opacity: 0; transform: translate3d(var(--drift), 620px, 0); }
}

.status-panel {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  background: var(--paper);
  border: 1px solid var(--edge);
  border-radius: 18px;
  box-shadow: 0 7px 20px #712d3d09;
}
.progress-area, .countdown-area { display: flex; align-items: center; gap: 14px; padding: 19px 22px; }
.progress-icon {
  flex: 0 0 42px;
  height: 42px;
  border-radius: 13px;
  background: var(--pink);
  color: var(--cherry);
  display: grid;
  place-items: center;
  font: 18px/1 Georgia, serif;
}
.progress-content { flex: 1; min-width: 0; }
.progress-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; margin-bottom: 8px; }
.status-label { display: block; font-size: 14px; font-weight: 700; color: var(--wine); }
#progress-label, .countdown-date { color: var(--muted); font-size: 12px; font-weight: 600; }
#progress-label { white-space: nowrap; }
progress {
  display: block;
  appearance: none;
  width: 100%;
  height: 7px;
  border: 0;
  border-radius: 5px;
  overflow: hidden;
  background: #f3e4e5;
  accent-color: var(--cherry);
}
progress::-webkit-progress-bar { background: #f3e4e5; }
progress::-webkit-progress-value { background: linear-gradient(90deg, #c7677f, var(--cherry)); border-radius: 5px; }
progress::-moz-progress-bar { background: linear-gradient(90deg, #c7677f, var(--cherry)); border-radius: 5px; }
.countdown-area { border-left: 1px solid var(--edge); justify-content: space-between; }
.countdown-date { display: block; margin-top: 3px; }
.countdown { flex-shrink: 0; display: flex; align-items: center; gap: 5px; }
.time-unit {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 2px;
  min-width: 38px;
  border-radius: 7px;
  padding: 5px;
  background: #faedec;
  color: var(--wine);
  font-variant-numeric: tabular-nums;
}
.time-unit b { font-size: 15px; }
.time-unit small { font-size: 10px; font-weight: 700; }
.app-error { margin-block: 20px; padding: 14px; border-radius: 8px; background: #fce2e4; color: var(--wine); }

.calendar { margin-top: clamp(30px, 4vw, 44px); scroll-margin-top: 16px; }
.calendar:focus { outline: none; }
.calendar-heading {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 13px 22px;
  margin-bottom: 18px;
}
.calendar-heading h2 { font: 640 clamp(29px, 3.5vw, 44px)/1.05 var(--serif); letter-spacing: -.045em; color: var(--wine); }
.calendar-heading p { margin-top: 7px; font-size: 14px; color: var(--muted); }
.legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 11px 16px;
  padding: 0 0 3px;
  list-style: none;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}
.legend li { display: inline-flex; align-items: center; gap: 6px; }
.legend-dot { width: 9px; height: 9px; border-radius: 50%; }
.dot-available { background: var(--cherry); }
.dot-opened { background: #e9becb; border: 1px solid #ad6380; }
.lock-icon {
  display: inline-block;
  position: relative;
  width: 10px;
  height: 8px;
  margin: 4px 1px 0;
  border: 1.4px solid currentColor;
  border-radius: 2px;
}
.lock-icon::before {
  content: "";
  position: absolute;
  width: 6.5px;
  height: 5px;
  border: 1.4px solid currentColor;
  border-radius: 4px 4px 0 0;
  border-bottom: 0;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
}

.gift-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 13px; padding: 0; list-style: none; }
.gift-grid li { min-width: 0; }
.gift-card {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  min-height: 146px;
  width: 100%;
  padding: 32px 8px 11px;
  overflow: hidden;
  border: 1px solid var(--edge);
  border-radius: 16px;
  color: var(--wine);
  background: var(--paper);
  text-align: center;
  cursor: pointer;
  scroll-margin: 26px;
  transition: transform .22s, border-color .22s, box-shadow .22s;
}
.gift-card:hover:not(:disabled) {
  transform: translateY(-3px);
  border-color: #d997ab;
  box-shadow: 0 9px 22px #741f3420;
}
.gift-card.is-opened { background: color-mix(in srgb, var(--pink) 43%, var(--paper)); border-color: #e7ccd2; }
.gift-card:disabled { color: #795963; background: #faf2ea; cursor: default; }
.gift-card.is-today {
  color: #fff7ea;
  background: radial-gradient(ellipse at 80% 15%, #c95470, transparent 68%), var(--cherry);
  border-color: var(--cherry);
  box-shadow: 0 8px 19px #a5274730;
}
.gift-card.is-finale {
  color: #fff4df;
  background:
    radial-gradient(circle at 82% 30%, #e8bf8088 0 1px, transparent 1.8px),
    radial-gradient(circle at 24% 63%, #e8bf807d 0 1px, transparent 1.7px),
    radial-gradient(circle at 71% 73%, #e8bf80a3 0 1.3px, transparent 2px),
    radial-gradient(ellipse at 50% 0%, #8b2941, var(--wine) 72%);
  border-color: #7f3c42;
}
.gift-card.is-finale:disabled { border-color: #88616a; }
.gift-card.is-finale .card-day { color: var(--gold); }
.card-day { position: absolute; left: 12px; top: 9px; font: 620 25px/1 var(--serif); font-variant-numeric: lining-nums tabular-nums; }
.card-state {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  top: 9px;
  right: 8px;
  min-height: 19px;
  padding: 2px 5px;
  font-size: 9px;
  font-weight: 750;
  line-height: 1;
  letter-spacing: .045em;
  text-transform: uppercase;
}
.gift-card.is-today .card-state { background: #fff0db; border-radius: 5px; color: var(--wine); }
.card-note { position: relative; margin-top: 5px; min-height: 16px; font-size: 11px; font-weight: 700; }
.gift-card:disabled:not(.is-finale) .gift { opacity: .73; filter: saturate(.46); }
.gift-card .gift { width: 67px; height: 67px; }

.gift {
  display: block;
  position: relative;
  width: 84px;
  height: 84px;
  flex: none;
  --box: #b83455;
  --box-deep: #8d2041;
  --ribbon: #f5ce97;
  --ribbon-deep: #be824a;
  filter: drop-shadow(0 6px 4px #50152222);
}
.gift[data-wrap="1"] { --box: #e9b3be; --box-deep: #cc8599; --ribbon: #fff0d4; --ribbon-deep: #d2a570; }
.gift[data-wrap="2"] { --box: #f3d69e; --box-deep: #d9af72; --ribbon: #b53656; --ribbon-deep: #812c44; }
.gift[data-wrap="3"] { --box: #cd607a; --box-deep: #a63a56; --ribbon: #fff0d4; --ribbon-deep: #d2a570; }
.gift[data-wrap="4"] { --box: #f1d4c9; --box-deep: #d5a58e; --ribbon: #b23d59; --ribbon-deep: #8d344b; }
.gift[data-wrap="5"] { --box: #a82f4d; --box-deep: #821d3a; --ribbon: #f3bdc6; --ribbon-deep: #c36d86; }
.is-today .gift, .is-finale .gift { --box: #f7daaa; --box-deep: #ce9d68; --ribbon: #a32a4b; --ribbon-deep: #771e38; }
.gift-body {
  position: absolute;
  inset: 46% 16% 9%;
  border-radius: 4px 4px 6px 6px;
  background: linear-gradient(145deg, var(--box) 44%, var(--box-deep));
  box-shadow: inset 0 1px 0 #ffffff4a, inset -3px -3px 0 #26121714;
}
.gift-body::after, .gift-lid::after {
  content: "";
  position: absolute;
  width: 22%;
  inset: 0 auto 0 39%;
  background: linear-gradient(90deg, var(--ribbon-deep), var(--ribbon) 36% 74%, var(--ribbon-deep));
}
.gift-top {
  position: absolute;
  inset: 0;
  transform-origin: 73% 44%;
}
.gift-lid {
  position: absolute;
  inset: 36% 12% 49%;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--box), var(--box-deep));
  box-shadow: 0 2px 3px #48172342, inset 0 1px 0 #ffffff65;
}
.gift-bow { position: absolute; bottom: 61%; left: 50%; width: 46%; height: 29%; transform: translateX(-50%); }
.gift-bow::before, .gift-bow::after {
  content: "";
  position: absolute;
  width: 55%;
  height: 83%;
  bottom: 0;
  border: 4px solid var(--ribbon);
  box-shadow: inset 1px 1px 0 var(--ribbon-deep), 0 2px 0 var(--ribbon-deep);
}
.gift-bow::before { left: 0; border-radius: 60% 70% 16% 56%; transform: rotate(20deg); }
.gift-bow::after { right: 0; border-radius: 70% 60% 56% 16%; transform: rotate(-20deg); }
.gift-heart {
  position: absolute;
  top: 17%;
  left: 40%;
  z-index: -1;
  color: var(--cherry);
  font: 16px/1 Georgia, serif;
  opacity: 0;
}
.is-opened .gift-top { transform: translate(5%, -12%) rotate(-12deg); }
.is-opened .gift-heart { opacity: 1; transform: translate(-2px, -6px) rotate(-12deg); }
.is-today .gift-heart, .is-finale .gift-heart { color: #fff0cc; }
.is-today:not(.is-opened) .gift { animation: gift-float 2.9s ease-in-out infinite; }
@keyframes gift-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px) rotate(-3deg); } }

.site-footer { color: var(--muted); padding-block: 49px 43px; text-align: center; }
.footer-mark { display: flex; justify-content: center; align-items: center; gap: 12px; color: var(--cherry); font: 12px/1 Georgia, serif; }
.footer-mark span { width: 34px; height: 1px; background: #d6afaa; }
.site-footer p { margin-top: 11px; font: italic 500 18px/1.4 var(--serif); }

.reveal {
  position: fixed;
  width: min(530px, calc(100% - 28px));
  max-width: none;
  max-height: calc(100dvh - 28px);
  padding: 0;
  border: 1px solid #efcfba;
  border-radius: 24px;
  overflow: hidden;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 24px 100px #2c091e68;
}
.reveal[open] { animation: reveal-in .4s cubic-bezier(.2,.6,.25,1) both; }
.reveal::backdrop { background: #301020b5; backdrop-filter: blur(4px); }
@keyframes reveal-in { from { opacity: 0; transform: translateY(12px) scale(.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
.dialog-scroll { position: relative; overflow-y: auto; overscroll-behavior: contain; max-height: calc(100dvh - 30px); padding: 28px clamp(22px, 6vw, 42px) 32px; scrollbar-gutter: stable both-edges; }
.close-button {
  display: grid;
  place-items: center;
  position: sticky;
  z-index: 3;
  top: 0;
  float: right;
  margin: -12px -11px -38px 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid #e7d1cd;
  background: var(--paper);
  color: var(--wine);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}
.close-button:hover { background: var(--pink); }
.reveal-art { display: grid; place-items: center; width: 108px; height: 108px; margin: 0 auto 13px; border-radius: 50%; border: 1px dashed #dca8a6; background: radial-gradient(#f8e0df, #fff8ed); }
.reveal-art .gift-top { transform: translate(19%, -20%) rotate(-22deg); }
.reveal-art .gift-heart { opacity: 1; transform: translate(-3px, -16px) scale(1.3) rotate(-12deg); }
.reveal.is-new .gift-top { animation: unwrap .65s .12s ease-out both; }
.reveal.is-new .gift-heart { animation: heart-rise .55s .33s ease-out both; }
@keyframes unwrap {
  0%, 19% { transform: translate(0) rotate(0); }
  31% { transform: translate(-4%, 0) rotate(5deg); }
  68% { transform: translate(18%,-34%) rotate(-27deg); }
  to { transform: translate(19%, -20%) rotate(-22deg); }
}
@keyframes heart-rise {
  from { opacity: 0; transform: translateY(15px) scale(.5); }
  to { opacity: 1; transform: translate(-3px, -16px) scale(1.3) rotate(-12deg); }
}
.reveal-copy { text-align: center; }
.reveal-date {
  margin-bottom: 8px;
  color: var(--cherry);
  font-size: 11px;
  line-height: 1.4;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.reveal h2 { color: var(--wine); font: 630 clamp(27px, 5vw, 42px)/1.1 var(--serif); letter-spacing: -.04em; text-wrap: balance; }
.gift-description { color: var(--muted); margin-top: 12px; font-size: 15px; line-height: 1.55; text-wrap: pretty; }
.button-redeem { margin-top: 22px; background: var(--cherry); color: #fff; }
.button-redeem:hover { background: var(--wine); }
.letter, .playlist {
  margin-top: 18px;
  text-align: left;
  border-radius: 12px;
  border: 1px solid #ebd8c5;
  background: #fff9eb;
  color: var(--wine);
}
.letter summary { cursor: pointer; padding: 11px 14px; font-size: 14px; font-weight: 750; min-height: 44px; }
.letter-body { border-top: 1px solid #ebd8c5; padding: 15px; font-size: 14px; line-height: 1.6; }
.letter-body h3 { margin: 0 0 6px; font: 620 22px/1.2 var(--serif); }
.letter-body p + p { margin-top: 11px; }
.letter-body ol { padding-left: 22px; }
.letter-body li + li { margin-top: 7px; }
.letter-sign { margin-top: 12px; font: italic 550 18px/1.4 var(--serif); }
.playlist { list-style: none; padding: 4px 12px; }
.playlist li + li { border-top: 1px solid #ebd8c5; }
.playlist a { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: center; padding: 8px 4px; text-decoration: none; font-size: 14px; }
.playlist a:is(:hover, :focus-visible) strong { text-decoration: underline; }
.playlist a small { display: block; color: var(--muted); font-size: 12px; }
.playlist a > :last-child { color: var(--cherry); }
.memory-photo { max-width: 290px; margin: 18px auto 0; background: #fffbf2; border: 1px solid var(--edge); padding: 7px; border-radius: 8px; transform: rotate(-2deg); box-shadow: 0 5px 14px #48172319; }
.memory-photo img { display: block; width: 100%; height: auto; max-height: 260px; object-fit: cover; border-radius: 3px; }
.memory-photo figcaption { margin: 7px 3px 3px; font: italic 550 15px/1.3 var(--serif); color: var(--wine); }
.gift-link { margin-top: 16px; color: inherit; font-size: 14px; min-height: 44px; text-decoration: underline; }

.reveal--finale {
  width: min(610px, calc(100% - 28px));
  background: radial-gradient(ellipse at 50% 12%, #872a44, transparent 57%), var(--wine);
  color: #fff5e7;
  border-color: #e2b274;
}
.reveal--finale::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid #e8bf8077;
  border-radius: 19px;
  pointer-events: none;
}
.reveal--finale h2, .reveal--finale .gift-description { color: inherit; }
.reveal--finale .reveal-date { color: var(--gold); }
.reveal--finale .button-redeem { color: var(--wine); background: var(--gold); }
.reveal--finale .button-redeem:hover { background: #ffdfb1; }
.reveal--finale .button-redeem:focus-visible { outline-color: var(--gold); }
.reveal--finale .reveal-art { position: relative; width: 182px; height: 129px; background: none; border: 0; margin-bottom: 15px; }
.envelope {
  position: relative;
  display: grid;
  place-items: center;
  width: 106px;
  height: 68px;
  background: linear-gradient(145deg, #fff4d9, #dba773);
  border-radius: 7px;
  box-shadow: 0 7px 23px #29041875;
  font: 18px/1 Georgia, serif;
  color: var(--wine);
  transform: rotate(-7deg);
}
.envelope::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: #ffe8be; clip-path: polygon(0 0, 100% 0, 50% 62%); }
.envelope span { display: grid; place-items: center; z-index: 1; width: 27px; height: 27px; margin-top: 12px; color: #ffd2b4; background: #9d274a; border-radius: 50%; box-shadow: 0 1px 3px #5b1e3a77, inset 0 0 0 2px #ffffff2a; font-size: 14px; }
.reveal--finale.is-new .envelope { animation: envelope-arrive .9s cubic-bezier(.18,.65,.27,1.3) both; }
@keyframes envelope-arrive { from { opacity: 0; transform: translateY(20px) rotate(-19deg) scale(.7); } to { opacity: 1; transform: rotate(-7deg) scale(1); } }
.envelope-star { position: absolute; color: var(--gold); font: 18px/1 Georgia, serif; animation: star-shine 2s ease-in-out infinite alternate; }
.envelope-star:first-of-type { top: 8px; left: 22px; }
.envelope-star:nth-of-type(2) { top: 4px; right: 25px; font-size: 21px; animation-delay: -.8s; }
.envelope-star:nth-of-type(3) { right: 7px; bottom: 13px; font-size: 13px; animation-delay: -1.5s; }
@keyframes star-shine { from { opacity: .55; transform: scale(.85); } to { opacity: 1; transform: scale(1.23); } }

.confetti { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.confetti-piece {
  position: absolute;
  inset: 94px auto auto 50%;
  width: var(--size);
  height: calc(var(--size) * .65);
  border-radius: 2px;
  background: var(--color);
  animation: celebration var(--duration) var(--delay) cubic-bezier(.13,.58,.28,1) both;
}
@keyframes celebration {
  0% { opacity: 0; transform: scale(0); }
  16% { opacity: 1; }
  39% { transform: translate3d(var(--pop-x), var(--pop-y), 0) rotate(var(--spin)); }
  77% { opacity: .9; }
  100% { opacity: 0; transform: translate3d(var(--end-x), 325px, 0) rotate(calc(var(--spin) + 190deg)); }
}

@media (max-width: 960px) {
  .hero-copy { flex-basis: 63%; }
  .hero-art { width: 82%; }
  .hero h1 { font-size: clamp(39px, 6vw, 59px); }
  .gift-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 660px) {
  .shell { width: calc(100% - 28px); }
  .header-inner { min-height: 62px; }
  .brand { font-size: 18px; gap: 8px; }
  .brand-seal { width: 31px; height: 32px; border-radius: 9px; font-size: 14px; }
  .music-button { font-size: 12px; padding-inline: 10px; gap: 6px; }
  .hero { min-height: 0; flex-direction: column-reverse; align-items: stretch; margin-block: 14px 14px; border-radius: 20px; }
  .hero::after { inset: 6px; border-radius: 15px; }
  .hero-copy { padding: 23px clamp(18px, 5vw, 30px) 4px; }
  .date-line { font-size: 10px; letter-spacing: .12em; }
  .hero h1 { margin-top: 10px; font-size: clamp(33px, 9vw, 56px); text-wrap: wrap; }
  .welcome { margin-block: 13px 16px; font-size: 14px; line-height: 1.48; }
  .hero-art { position: relative; inset: auto; width: 100%; height: clamp(147px, 45vw, 228px); margin-top: -12px; }
  .hero-art img { object-position: 72% 65%; }
  .hero-art::after { background: linear-gradient(180deg, var(--wine), color-mix(in srgb, var(--wine) 36%, transparent) 26%, transparent 56%); }
  .status-panel { grid-template-columns: 1fr; border-radius: 14px; }
  .progress-area, .countdown-area { padding: 13px; gap: 10px; }
  .progress-icon { flex-basis: 34px; height: 34px; border-radius: 9px; font-size: 14px; }
  .countdown-area { border-left: 0; border-top: 1px solid var(--edge); }
  .calendar-heading { margin-bottom: 12px; }
  .calendar-heading p { font-size: 13px; line-height: 1.45; }
  .legend { gap: 7px 12px; font-size: 11px; }
  .gift-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .gift-card { min-height: 111px; padding: 27px 4px 7px; border-radius: 11px; }
  .gift-card .gift { width: 55px; height: 55px; }
  .gift-bow::before, .gift-bow::after { border-width: 3px; }
  .card-day { top: 8px; left: 8px; font-size: 22px; }
  .card-state { right: 5px; top: 6px; min-height: 17px; font-size: 8px; }
  .card-note { margin-top: 2px; font-size: 10px; min-height: 14px; }
  .site-footer { padding-block: 34px 31px; }
}

@media (max-width: 355px) {
  .brand { font-size: 15px; }
  .music-button { font-size: 11px; }
  .time-unit { min-width: 31px; }
  .time-unit b { font-size: 13px; }
  .status-label { font-size: 13px; }
  .card-day { font-size: 20px; }
}

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