@font-face {
  font-family: "Birthday Marker";
  src: url("./assets/birthday-marker.woff") format("woff");
  font-display: swap;
}
@font-face {
  font-family: "Birthday Pen";
  src: url("./assets/birthday-pen.woff") format("woff");
  font-display: swap;
}
@font-face {
  font-family: "Birthday Hand";
  src: url("./assets/birthday-hand.woff") format("woff");
  font-display: swap;
}
@font-face {
  font-family: Gaegu;
  src: url("./assets/gaegu-regular.woff2") format("woff2");
  font-display: swap;
  font-weight: 400;
}
@font-face {
  font-family: Gaegu;
  src: url("./assets/gaegu-bold.woff2") format("woff2");
  font-display: swap;
  font-weight: 700;
}

:root {
  color-scheme: light;
  --paper: #f4efee;
  --ink: #201a18;
  --red: #80160e;
  --button: #741206;
  --marker: "Birthday Marker", Gaegu, cursive;
  --pen: "Birthday Pen", Gaegu, cursive;
  --hand: "Birthday Hand", Gaegu, cursive;
  --sans: system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 clamp(1.08rem, 0.99rem + 0.45vw, 1.32rem)/1.43 var(--hand);
  letter-spacing: 0.043em;
}
h1, h2, h3, p, figure, blockquote { margin: 0; }
img { display: block; max-inline-size: 100%; }
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 3px solid #315a81; outline-offset: 5px; }
.sr-only {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.marker, .pen { font-weight: 400; color: var(--red); }
.marker { font-family: var(--marker); text-transform: uppercase; }
.pen {
  font-family: var(--pen);
  font-size: clamp(1.65rem, 1.1rem + 2vw, 2.5rem);
  line-height: 1.18;
  letter-spacing: 0.09em;
  overflow-wrap: anywhere;
}
.ink-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-block-size: 2.8rem;
  min-inline-size: min(100%, 11rem);
  max-inline-size: 100%;
  padding: 0.42em 1.45em 0.48em;
  border-radius: 0.5em 0.47em 0.51em 0.44em;
  background: var(--button);
  color: #fff6ee;
  text-decoration: none;
  text-align: center;
  font: 400 clamp(1.14rem, 0.99rem + 0.65vw, 1.45rem)/1.15 var(--pen);
  letter-spacing: 0.045em;
  transition: background 160ms ease, transform 160ms ease;
}
.ink-button:hover { background: #962014; transform: translateY(-2px); }
.ink-button:active { transform: translateY(1px); }
.cover {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-block-size: 100vh;
  min-block-size: 100svh;
  padding: max(1.65rem, env(safe-area-inset-top)) 0 max(1rem, env(safe-area-inset-bottom));
}
.cover-layout {
  display: grid;
  grid-template-areas: "title" "art" "open";
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  align-items: center;
  row-gap: clamp(1.1rem, 3.1vh, 2rem);
  inline-size: min(100%, 32.3rem);
}
.cover-title {
  position: relative;
  grid-area: title;
  margin: 0;
  text-align: center;
  font-size: clamp(2.22rem, 0.44rem + 11.3vw, 4.66rem);
  line-height: 1.04;
  letter-spacing: 0.104em;
  padding-inline: 0.15em;
}
.cover-title::after { content: ""; position: absolute; right: 8%; bottom: 0.16em; inline-size: 0.43em; aspect-ratio: 32/44; background: url("./assets/destello.webp") center / contain no-repeat; }
.ink-word { display: inline-block; }
.cover-title > span, .opening-title > span:not(.sr-only) { display: block; }
.cover-title > span + span { margin-block-start: 0.08em; }
.cover-title:focus, .opening-title:focus { outline: none; }
.cover-art {
  grid-area: art;
  position: relative;
  inline-size: 100%;
  aspect-ratio: 576 / 432;
}
.cover-photo {
  position: absolute;
  inline-size: 50%;
  block-size: auto;
  inset-inline-start: 25%;
  inset-block-start: 1%;
}
.bow, .star {
  display: block;
  position: absolute;
  pointer-events: none;
  background: center / contain no-repeat;
}
.bow { aspect-ratio: 71/86; background-image: url("./assets/lazo.webp"); }
.star { aspect-ratio: 32/44; background-image: url("./assets/destello.webp"); }
.cat-sticker { block-size: auto; pointer-events: none; user-select: none; }
.cover-art .cat-sticker--bow {
  position: absolute;
  z-index: 2;
  inset-block-start: 1%;
  inset-inline-end: 1%;
  inline-size: clamp(6rem, 22vw, 8rem);
  transform: rotate(4deg);
}
.cover-art .bow-one { inline-size: 12%; left: 13.3%; top: 0; }
.cover-art .bow-two { inline-size: 12%; right: 12.5%; top: 35%; transform: rotate(3deg); }
.cover-art .bow-three { inline-size: 10%; left: 11.3%; top: 63%; transform: rotate(-6deg); }
.cover-art .star-one { inline-size: 4.8%; left: 15.5%; top: 44%; }
.cover-art .star-two { inline-size: 3%; left: 19.4%; top: 40%; }
.cover-art .star-three { inline-size: 5.4%; right: 16.5%; top: 69%; }
.cover-button { grid-area: open; min-inline-size: min(50%, 15.5rem); }
.cover-credit {
  margin-block-start: clamp(1.55rem, 4.5vh, 3rem);
  font: 550 0.86rem/1.4 var(--sans);
  color: #4c413f;
  letter-spacing: -0.02em;
}
.letter { text-align: center; }
.opening-spread { max-inline-size: 34rem; margin-inline: auto; }
.opening { position: relative; padding-block-start: clamp(1.8rem, 5.5vw, 3rem); }
.opening-title { position: relative; z-index: 1; font-size: clamp(1.75rem, 1.08rem + 3.15vw, 2.7rem); line-height: 1.14; letter-spacing: 0.1em; }
.opening-title > span + span { margin-block-start: 0.12em; }
.opening-art { position: relative; inline-size: 100%; aspect-ratio: 576/662; margin-block-start: 0.45rem; }
.cake-collage { position: absolute; inline-size: 64.25%; block-size: auto; left: 19%; top: 1.1%; }
.custom-age {
  position: absolute;
  top: -0.07em;
  left: 50%;
  transform: translateX(-50%) rotate(2deg);
  color: #a93b3c;
  font: 400 clamp(9rem, 3rem + 46vw, 18rem)/1 var(--marker);
  letter-spacing: -0.09em;
}
.opening-art .bow-one { inline-size: 14%; top: -5%; left: 8%; transform: rotate(-4deg); }
.opening-art .bow-two { inline-size: 14%; top: 27%; right: 6%; }
.opening-art .bow-three { inline-size: 12%; top: 45%; left: 12%; transform: rotate(-6deg); }
.opening-art .star-one { inline-size: 6%; left: 13%; top: 33%; }
.opening-art .star-two { inline-size: 5.5%; right: 19%; top: 36%; }
.opening-art .star-three { inline-size: 5.1%; right: 21.4%; top: 59%; }
.opening::before {
  content: "";
  position: absolute;
  inline-size: 12%;
  aspect-ratio: 71/86;
  top: 2.5%;
  right: 12%;
  background: url("./assets/lazo.webp") center / contain no-repeat;
  transform: rotate(3deg);
}
.opening-words { padding: 1.2rem 1.35rem 0; }
.birthday-quote { max-inline-size: 29rem; margin: 0 auto; }
.birthday-quote figcaption { margin-block-start: 0.95em; }
.music { margin: 1.7rem auto 0; inline-size: min(100%, max(18.6rem, 77%)); max-inline-size: 23rem; }
.player {
  display: flex;
  align-items: stretch;
  gap: clamp(0.5rem, 2.8vw, 1rem);
  border-radius: 0.68rem;
  padding: clamp(0.5rem, 2vw, 0.78rem);
  background: #171312;
  color: #f7f3f0;
  text-align: start;
  font: 400 0.8rem/1.2 var(--sans);
  letter-spacing: 0;
}
.player > img { align-self: center; inline-size: 32%; block-size: auto; aspect-ratio: 1; object-fit: cover; border-radius: 0.51rem; }
.player audio { min-inline-size: 0; inline-size: 100%; align-self: center; }
.player-controls { flex: 1; min-inline-size: 0; display: flex; flex-direction: column; justify-content: center; }
#track-position { margin: 0; inline-size: 100%; block-size: 1.4rem; accent-color: #db8276; cursor: pointer; }
.track-times { display: flex; justify-content: space-between; line-height: 1; color: #e1d6d0; font-variant-numeric: tabular-nums; }
.transport { display: flex; justify-content: space-between; align-items: center; margin-top: 0.15rem; }
.transport button { position: relative; display: grid; place-items: center; min-height: 2.75rem; flex: 1; padding: 0; background: none; border: 0; color: inherit; }
.transport button[aria-pressed="true"] { color: #f09a8c; }
.transport button:focus-visible, .rsvp :focus-visible { outline-color: #fff0c2; outline-offset: 1px; }
.loop-icon { font: 1.55rem/1 var(--sans); }
.play-icon, .restart-icon::after { display: block; width: 0; height: 0; border-block: 0.53rem solid transparent; border-left: 0.84rem solid currentColor; }
.is-playing .play-icon { inline-size: 0.83rem; block-size: 1rem; border: 0; border-inline: 0.27rem solid currentColor; }
.restart-icon { display: flex; align-items: center; block-size: 0.8rem; border-left: 0.12rem solid; }
.restart-icon::after { content: ""; transform: rotate(180deg); border-width: 0.4rem 0 0.4rem 0.6rem; }
.speaker { transform: translateX(-0.13rem); font-size: 1.25rem; }
.sound-waves { position: absolute; font-size: 0.58rem; letter-spacing: -0.09em; transform: translate(0.34rem, -0.02rem); }
#mute[aria-pressed="true"] .sound-waves { text-decoration: line-through; }
.music figcaption { margin-block-start: 0.72rem; font-size: 0.94em; }
.letter-note { max-inline-size: 31rem; margin: clamp(3.4rem, 10vw, 5.25rem) auto 0; }
.letter-note p + p { margin-top: 1em; }
.letter-note .cat-sticker--love { inline-size: clamp(7.5rem, 32vw, 9.5rem); margin: 0.8rem 2% 0 auto; transform: rotate(4deg); }
.signature { padding: clamp(2.6rem, 7vw, 4rem) 1rem 0; }
.portrait-wrap { inline-size: min(100%, 24.5rem); position: relative; margin: 1.35rem auto 0; }
.portrait-wrap > img { inline-size: 62%; block-size: auto; margin: auto; }
.portrait-wrap .star-one { inline-size: 7%; left: 10%; top: 45%; }
.portrait-wrap .star-two { inline-size: 5.4%; right: 12%; top: 12%; }
.portrait-wrap .star-three { inline-size: 6%; right: 9%; top: 65%; }
.party-spread { padding-block: clamp(2.3rem, 7vw, 5.2rem) clamp(3.2rem, 8vw, 5rem); }
.date-art { inline-size: min(100%, 34rem); margin-inline: auto; }
.date-heading { display: flex; justify-content: center; align-items: flex-end; gap: 3%; padding: 0 5% 0 2%; }
.date-heading img { block-size: auto; }
.disco { inline-size: 41.5%; }
.date-words { inline-size: 45.5%; }
.calendar-window { padding-block: clamp(2.3rem, 7vw, 3rem) clamp(1.8rem, 6vw, 2.7rem); overflow: hidden; }
.calendar {
  display: grid;
  grid-template-columns: 1fr 1.15fr 1fr;
  margin-inline: -3%;
  transform: rotate(-4deg);
  border-block: 0.18rem solid var(--red);
  color: var(--red);
  font-family: var(--pen);
}
.calendar > div { position: relative; min-inline-size: 0; }
.calendar > div + div { border-inline-start: 0.17rem solid; }
.weekday { display: block; padding: 0.32em 0.16em; border-block-end: 0.16rem solid; font-size: 1.02em; line-height: 1.1; }
.day-number { display: block; position: relative; padding: 0.28em 0.04em 0.43em; font: 400 clamp(2.8rem, 1.65rem + 5.8vw, 4.7rem)/1 var(--marker); }
.chosen-day .day-number::before, .chosen-day .day-number::after {
  content: "";
  position: absolute;
  inline-size: 1.28em;
  block-size: 1.3em;
  top: 45%;
  left: 50%;
  transform: translate(-50%,-50%) rotate(-9deg);
  border: 1px solid #522f31;
  border-radius: 52% 46% 48% 50%;
}
.chosen-day .day-number::after { transform: translate(-48%,-51%) rotate(17deg) scale(1.045,0.95); }
.day-note { position: absolute; right: 9%; bottom: 0.33em; font-size: 0.85em; transform: rotate(-10deg); }
.party-details { max-inline-size: 28rem; margin-inline: auto; padding: 1.6rem 1.4rem 0; }
.party-details > p, .party-details address { margin-block-start: 1.7rem; }
.party-details address { font-style: normal; }
.party-details address strong { display: block; font: 400 1.03em/1.5 var(--pen); text-transform: uppercase; }
.party-details address span { display: block; }
.party-details .ink-button { margin-block-start: 1.65rem; }
.party-details .cat-sticker--gift { inline-size: clamp(6rem, 24vw, 8rem); margin: 0.6rem 4% 0 auto; transform: rotate(-5deg); }
.rsvp {
  max-inline-size: 39rem;
  margin-inline: auto;
  padding: clamp(1.5rem, 4vw, 2.6rem) clamp(1rem, 4vw, 2rem);
  background: linear-gradient(105deg, #49131e 0%, #66303e 51%, #44141f 100%);
  color: #fff8f6;
  text-align: start;
  font: 400 1rem/1.45 var(--sans);
  letter-spacing: 0;
}
.rsvp h2 { text-align: center; font-size: clamp(2rem, 1.45rem + 2.6vw, 3.05rem); line-height: 1.1; letter-spacing: -0.045em; }
.rsvp-details { margin-block: 1.35rem; }
.rsvp-details p + p { margin-block-start: 0.65rem; }
.rsvp-details span { font-size: 0.91rem; color: #f0dbdd; }
.rsvp-details strong { font-weight: 600; }
.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 7rem), 1fr)); gap: 0.65rem; }
.choices button {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 0.55rem;
  min-height: 5.4rem;
  padding: 0.55rem;
  border: 1px solid transparent;
  border-radius: 0.55rem;
  background: #ffffff21;
  color: inherit;
  font-size: 0.97rem;
}
.choices button:hover, .choices button[aria-pressed="true"] { border-color: #ffe4d8; background: #ffffff30; }
.check-icon, .cross-icon { display: block; position: relative; inline-size: 1.65rem; block-size: 1.55rem; }
.check-icon::after { content: ""; position: absolute; inset: 0.1rem 0.15rem 0.5rem 0; border-left: 0.17rem solid; border-bottom: 0.17rem solid; transform: rotate(-45deg); }
.cross-icon::before, .cross-icon::after { content: ""; position: absolute; left: 50%; top: 2%; height: 1.55rem; border-left: 0.16rem solid; transform: rotate(45deg); }
.cross-icon::after { transform: rotate(-45deg); }
#reply-form { display: grid; gap: 0.45rem; margin-top: 1.2rem; }
#reply-form label { font-size: 0.92rem; }
#reply-form input, #reply-form textarea { width: 100%; min-width: 0; padding: 0.6rem; border: 1px solid #bd9198; border-radius: 0.4rem; background: #fff9f5; color: #281a1b; }
#reply-form textarea { resize: vertical; min-height: 4rem; }
#reply-form label:not(:first-child) { margin-block-start: 0.4rem; }
.reply-submit { justify-self: start; margin-top: 0.45rem; background: #fff3ec; border: 0; border-radius: 0.42rem; min-height: 2.75rem; padding-inline: 1.1rem; color: #561c29; font-weight: 650; }
.delivery-help, .rsvp-status, #wall-empty { font-size: 0.9rem; color: #f6e2e2; }
.rsvp-status:not(:empty), .guest-wall { margin-block-start: 1.1rem; }
.guest-wall h3 { margin: 0 0 0.55rem; font-size: 1rem; font-weight: 600; }
.guest-wall ul { padding: 0; margin: 0; list-style: none; }
.guest-wall li { display: grid; gap: 0.15rem; padding: 0.65rem 0.85rem; margin-block-start: 0.35rem; border-radius: 0.5rem; background: #ffffff16; overflow-wrap: anywhere; }
.guest-wall li strong, .guest-wall li span { font-size: 0.9rem; }
.guest-wall li span { white-space: pre-line; color: #ffece9; }
.story { inline-size: min(100%, 37.5rem); margin: auto; padding: clamp(2.7rem, 6vw, 4.4rem) 1.45rem 0; }
.story h2 { margin-block-end: 1.35rem; }
.story p + p { margin-block-start: 1.4em; }
.story .cat-sticker--meow { inline-size: clamp(7rem, 27vw, 9rem); margin: 1rem 5% 0 auto; transform: rotate(3deg); }
.closing { overflow: hidden; max-inline-size: 44rem; margin: clamp(3.05rem, 8vw, 6rem) auto 0; }
.closing-layout { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 32.5%; align-items: start; padding: 0.7rem 13.5% 0.9rem 5.6%; text-align: start; overflow: hidden; }
.farewell { position: relative; z-index: 1; min-inline-size: 0; container-type: inline-size; }
.farewell h2 { font-size: clamp(1.5rem, 0.66rem + 4.3vw, 3.7rem); line-height: 1.1; letter-spacing: 0.055em; }
.countdown { display: inline-flex; margin-block-start: 0.85rem; color: var(--red); font: 400 clamp(1.1rem, 0.4rem + 3.65vw, 2.85rem)/1 var(--sans); letter-spacing: -0.045em; font-variant-numeric: tabular-nums; }
.countdown div { position: relative; display: grid; justify-items: center; }
.countdown div + div { margin-left: 0.31em; }
.countdown div + div::before { content: ":"; position: absolute; left: -0.23em; top: -0.04em; }
.countdown small { font: 550 clamp(0.61rem, 0.48rem + 0.7vw, 0.78rem)/1.2 var(--sans); text-transform: uppercase; letter-spacing: 0; margin-top: 0.4em; }
.photostrip { display: grid; gap: clamp(0.3rem, 1.45vw, 0.7rem); padding: clamp(0.38rem, 1.8vw, 0.87rem); background: var(--button); transform: rotate(-10deg); transform-origin: 50% 9%; }
.photostrip img { inline-size: 100%; block-size: auto; aspect-ratio: 0.76; object-fit: cover; }
.closing-cake { position: absolute; bottom: 0; left: 0; inline-size: 34%; block-size: auto; }
.colophon { display: flex; justify-content: space-between; align-items: baseline; gap: 0.7rem; flex-wrap: wrap; padding: 1.1rem 1.4rem max(1.1rem, env(safe-area-inset-bottom)); font: 400 0.87rem/1.5 var(--sans); color: #5a4441; letter-spacing: 0; }
.colophon small { font-size: inherit; }
.colophon a { text-underline-offset: 0.2em; min-block-size: 2.75rem; display: inline-flex; align-items: center; }
@container (max-width: 10.5rem) {
  .countdown { display: grid; width: max-content; max-width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.4em 0.15em; }
  .countdown div + div { margin-left: 0; }
  .countdown div + div::before { content: none; }
}

@media (min-width: 54rem) {
  .cover { padding: 3rem 3vw; }
  .cover-layout { inline-size: min(100%, 71rem); grid-template-areas: "title art" "open art"; grid-template-columns: 0.92fr 1.08fr; row-gap: 2.4rem; align-content: center; }
  .cover-title { align-self: end; font-size: clamp(2.8rem, 0.35rem + 5.3vw, 4.65rem); }
  .cover-art { align-self: center; aspect-ratio: 1.12; }
  .cover-photo { inline-size: 57%; left: 21.5%; top: 4%; }
  .cover-art .bow-one { top: 6%; left: 6%; }
  .cover-art .bow-two { top: 34%; right: 4%; }
  .cover-art .bow-three { top: 70%; left: 5%; }
  .cover-art .star-one { top: 44%; left: 10%; }
  .cover-art .star-two { top: 40%; left: 14%; }
  .cover-art .star-three { top: 73%; right: 10%; }
  .cover-button { align-self: start; min-inline-size: 13rem; }
  .cover-credit { margin-block-start: 2.4rem; }
  .opening-spread { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: clamp(1rem, 4vw, 4rem); max-inline-size: 68rem; margin: auto; padding: 3.5rem 2.4rem 0; }
  .opening { padding-block-start: 1rem; }
  .opening-words { padding: 1rem 0 0; }
  .letter-note { margin-top: 2.6rem; }
  .music { margin-top: 2rem; }
  .signature { padding-top: 3.8rem; }
  .portrait-wrap { inline-size: min(100%, 28.5rem); }
  .party-spread { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); align-items: center; max-inline-size: 67rem; gap: 3rem; margin: auto; padding-inline: 2.4rem; }
  .party-details { padding: 1rem 0; }
  .calendar-window { padding-block-end: 1.7rem; }
}
@media (max-height: 36rem) and (min-width: 36rem) and (max-width: 53.99rem) {
  .cover-layout { grid-template-areas: "title art" "open art"; grid-template-columns: 1fr 1fr; inline-size: min(96%, 45rem); row-gap: 1rem; }
  .cover-title { align-self: end; font-size: clamp(2rem, 4.6vw, 3rem); }
  .cover-button { align-self: start; }
  .cover-credit { margin-top: 1rem; }
}
@media (prefers-reduced-motion: no-preference) {
  @keyframes ink-in { from { opacity: 0; transform: translateY(0.12em) rotate(-2deg); } to { opacity: 1; transform: none; } }
  @keyframes unfold { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
  .ink-letter { display: inline-block; animation: ink-in 0.28s backwards; animation-delay: var(--delay, 0s); }
  .just-opened .opening-art { animation: unfold 0.6s ease-out both; }
  .just-opened .opening-words { animation: unfold 0.75s 0.08s ease-out backwards; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
