:root {
  color-scheme: light;
  --ink: #304c5b;
  --muted: #586d78;
  --paper: #fffcf5;
  --pink: #f3e3e3;
  --line: #d8e0df;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --ease-out: cubic-bezier(.22, 1, .36, 1);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; scrollbar-width: none; }
html::-webkit-scrollbar, body::-webkit-scrollbar { display: none; width: 0; height: 0; }
body { margin: 0; background: #e7eff3; background-image: radial-gradient(ellipse at 10% 25%, #fafcfc 0, transparent 52%), radial-gradient(ellipse at 95% 60%, #d5e4ec 0, transparent 55%); color: var(--ink); font: 16px/1.7 var(--sans); }
[hidden] { display: none !important; }
a { color: inherit; text-underline-offset: 5px; }
a:focus-visible, button:focus-visible { outline: 3px solid #945563; outline-offset: 6px; }
button { font: inherit; }
.music-toggle { position: fixed; z-index: 20; top: max(16px, env(safe-area-inset-top)); right: max(16px, env(safe-area-inset-right)); min-height: 40px; padding: 7px 12px; border: 1px solid #b9cbd1; border-radius: 20px; background: #f8fbfae8; color: var(--ink); font-size: 12px; cursor: pointer; box-shadow: 0 5px 18px #526b7b16; transition: background .2s, transform .2s var(--ease-out), border-color .2s; }
.music-toggle.is-playing { border-color: #a77b83; background: #f4e6e7; }
.music-toggle:active { transform: translateY(2px) scale(.97); }
.masthead { position: relative; max-width: 1100px; margin: auto; padding: max(24px, env(safe-area-inset-top)) 24px 0; display: flex; align-items: center; justify-content: space-between; font-size: 10px; letter-spacing: .19em; }
.masthead { width: 100%; margin: 0 auto; }
main { position: relative; padding: 0 max(18px, env(safe-area-inset-left)) 0 max(18px, env(safe-area-inset-right)); }
.opening { text-align: center; padding: clamp(28px, 6vh, 64px) 0 44px; max-width: 660px; margin: auto; }
.eyebrow { font-size: 10px; font-weight: 600; letter-spacing: .18em; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.22; }
h1 { font-size: clamp(58px, 12vw, 88px); margin: 12px 0 20px; letter-spacing: -.045em; }
.snow-mark { display: inline-block; font-size: .44em; vertical-align: middle; color: #6e8a9b; }
.intro { color: var(--muted); margin: 0; }
.envelope { position: relative; width: min(100%, 330px); height: 204px; margin: 72px auto 38px; background: #d1dfe5; border-radius: 4px; box-shadow: 0 22px 40px -22px #56718480; }
.envelope::after { content: ''; position: absolute; inset: -8px; border: 1px solid transparent; border-radius: 8px; pointer-events: none; }
.opening:not(.is-open) .envelope { animation: cover-breathe 3.2s .4s ease-in-out infinite; }
.envelope-note { position: absolute; z-index: 1; inset: 12px 18px 18px; background: var(--paper); border: 1px solid #e2e4dd; transform: translateY(0); opacity: 0; padding: 25px 12px; font-size: 11px; letter-spacing: .04em; transition: transform .65s var(--ease-out), opacity .15s ease; }
.envelope-note span { display: block; }
.script { font-family: 'Snell Roundhand', 'Segoe Print', 'Bradley Hand', cursive; font-style: italic; font-weight: 400; }
.envelope-note .script { font-size: 27px; margin-top: 6px; }
.envelope-pocket { position: absolute; inset: 0; background: linear-gradient(135deg, #e1ebed, #cedee5); clip-path: polygon(0 0, 50% 52%, 100% 0, 100% 100%, 0 100%); border-radius: 4px; z-index: 2; }
.envelope-flap { position: absolute; inset: 0; background: #eaf0f0; clip-path: polygon(0 0, 100% 0, 50% 55%); transform-origin: top; transition: transform .65s ease; z-index: 3; }
.opening:not(.is-open) .envelope-flap { animation: flap-sheen 4.8s 1.35s ease-in-out infinite; }
.opening:not(.is-open) .button { animation: button-invite-pulse 3.2s 1.05s ease-in-out infinite; }
.opening:not(.is-open) .button:focus-visible,
.opening:not(.is-open) .button:active { animation: none; }
.seal { position: absolute; z-index: 4; top: 78px; left: calc(50% - 23px); width: 46px; height: 46px; background: #dcb7ba; border: 4px double #bd8c94; border-radius: 50%; color: #754c57; font: italic 27px/36px var(--serif); box-shadow: 0 3px 6px #52657420; transition: opacity .3s; }
.opening:not(.is-open) .seal { animation: seal-pulse 3.2s .4s ease-in-out infinite; }
.envelope-to { position: absolute; bottom: 18px; right: 19px; z-index: 3; font: italic 15px var(--serif); }
.is-open .envelope-flap { transform: rotateX(180deg); z-index: 0; }
.is-open .envelope-note { transform: translateY(-76px); opacity: 1; transition-delay: .4s; }
.is-open .seal { opacity: 0; transform: scale(.8); }
.is-opening .envelope { animation: envelope-lift 1s var(--ease-out) both; }
.is-resetting .envelope *, .is-resetting .envelope { transition: none !important; animation: none !important; }
@keyframes envelope-lift { 0% { transform: scale(1); } 18% { transform: translateY(3px) scale(.98); } 60%, 100% { transform: translateY(-5px) scale(1.015); } }
@keyframes cover-breathe {
  0%, 55%, 100% { transform: translateY(0) rotate(0) scale(1); box-shadow: 0 22px 40px -22px #56718480; }
  62% { transform: translateY(-8px) rotate(-1deg) scale(1.025); box-shadow: 0 34px 48px -19px #567184b0; }
  69% { transform: translateY(-5px) rotate(1deg) scale(1.015); box-shadow: 0 30px 45px -20px #5671849c; }
  76% { transform: translateY(0) rotate(0) scale(1); box-shadow: 0 22px 40px -22px #56718480; }
}
@keyframes flap-sheen {
  0%, 60%, 100% { filter: brightness(1); }
  66% { filter: brightness(1.045); }
  72% { filter: brightness(1); }
}
@keyframes seal-pulse {
  0%, 55%, 100% { transform: scale(1); box-shadow: 0 3px 6px #52657420; }
  62% { transform: scale(1.12); box-shadow: 0 5px 13px #bd8c9466; }
  69%, 76% { transform: scale(1); box-shadow: 0 3px 6px #52657420; }
}
@keyframes button-invite-pulse {
  0%, 52%, 100% { transform: scale(1); box-shadow: 0 6px 15px #304c5b13; }
  60% { transform: scale(1.07); box-shadow: 0 13px 30px #304c5b4a; }
  68% { transform: scale(1.015); box-shadow: 0 8px 19px #304c5b22; }
  76% { transform: scale(1); box-shadow: 0 6px 15px #304c5b13; }
}
.button { display: inline-flex; align-items: center; justify-content: center; gap: 24px; min-height: 52px; padding: 13px 24px; border: 1px solid var(--ink); background: var(--ink); color: #fffdf8; border-radius: 5px; text-decoration: none; cursor: pointer; box-shadow: 0 6px 15px #304c5b13; }
.button { transition: transform .25s var(--ease-out), background .25s, box-shadow .25s; touch-action: manipulation; max-width: 100%; }
.button:active { transform: translateY(2px) scale(.975); box-shadow: 0 2px 5px #304c5b20; transition-duration: .09s; }
@media (hover: hover) {
  .button:hover { background: #223c49; transform: translateY(-2px); box-shadow: 0 10px 22px #304c5b25; }
}
.envelope { perspective: 900px; isolation: isolate; }
.envelope-note, .envelope-flap, .seal { transition-timing-function: var(--ease-out); }
.envelope-flap { transition: transform .4s var(--ease-out), z-index 0s linear .2s; }
.handwritten { font: italic 15px/1.6 var(--serif); color: var(--muted); margin: 18px 0 0; }
.letter { width: calc(100% - 16px); max-width: 620px; margin: max(28px, env(safe-area-inset-top)) auto 0; padding: 28px 24px 36px; background: var(--paper); border: 1px solid #fff; border-radius: 5px; box-shadow: 0 16px 60px #526b7b14; scroll-margin-top: 24px; }
.letter:focus { outline: none; }
.letter-top { display: flex; align-items: center; justify-content: space-between; padding-bottom: 22px; border-bottom: 1px solid var(--line); font-size: 10px; letter-spacing: .16em; }
.salutation { font-size: 25px; margin: 34px 0 14px; }
h2 { font-size: clamp(30px, 6vw, 43px); letter-spacing: -.035em; margin: 0 0 22px; }
em { color: #687f89; font-weight: 400; }
.letter > p:not(.salutation) { color: var(--muted); }
.letter-nav { display: flex; gap: 10px 26px; flex-wrap: wrap; margin: 24px 0 30px; }
.letter-nav a { display: inline-flex; gap: 12px; align-items: center; min-height: 48px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 24px; font-size: 15px; text-decoration: none; background: #f3f6f4; transition: background .25s, transform .25s var(--ease-out); }
.letter-nav a:active { transform: scale(.97); background: #e6eeed; }
.date-card { padding: 25px 20px; background: #edf2f2; border: 1px solid #dbe5e7; border-radius: 3px; }
.date-card .eyebrow { margin-top: 0; }
.date-card h3 { font-size: 29px; margin: 16px 0 24px; }
dl { margin: 0; }
dl > div + div { margin-top: 20px; }
dt { font-size: 13px; color: var(--muted); }
dd { margin: 2px 0 0; font-size: 22px; font-family: var(--serif); }
dd span { display: block; font: 14px/1.7 var(--sans); color: var(--muted); }
.date-footnote { border-top: 1px solid #d3dfe2; padding-top: 20px; margin: 24px 0 0; font-size: 14px; color: var(--muted); }
.preparation { padding: 42px 0 28px; }
.preparation h3 { font-size: 30px; margin: 12px 0 24px; }
h4 { font-size: 16px; font-weight: 500; margin: 18px 0 12px; }
h4 span { margin-right: 5px; }
ul { padding-left: 20px; margin: 0; color: var(--muted); }
li { padding: 3px 0 3px 2px; }
li::marker { color: #96abb2; }
.pink-note { padding: 16px 18px; margin: 27px 0 0; border-radius: 3px; background: var(--pink); color: #674b52; font: italic 17px/1.6 var(--serif); }
.packing-list { list-style: none; padding: 0; }
.packing-list li { position: relative; padding: 8px 0 8px 20px; }
.packing-list li::before { content: ''; position: absolute; left: 0; top: 20px; width: 5px; height: 5px; border: 1px solid #8b9da5; border-radius: 50%; }
dt { font-size: 15px; }
dd span, .date-footnote { font-size: 16px; }
.letter.is-revealed { animation: letter-arrive .6s var(--ease-out); }
.letter.open-settle { animation: open-settle .7s var(--ease-out) both; }
@keyframes letter-arrive { from { opacity: 0; transform: translateY(18px) scale(.99); } to { opacity: 1; transform: none; } }
@keyframes open-settle { from { box-shadow: 0 22px 70px #526b7b28; } to { box-shadow: 0 16px 60px #526b7b14; } }
.view-enter { animation: view-arrive .55s var(--ease-out); }
.view-exit { animation: view-depart .26s cubic-bezier(.4, 0, 1, 1) forwards; }
.invitation-leaving { animation-duration: .36s; animation-timing-function: cubic-bezier(.4, 0, 1, 1); }
@keyframes view-arrive { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes view-depart { to { opacity: 0; transform: translateY(-10px) scale(.99); } }
.scroll-ready { opacity: .82; transform: translateY(12px); }
.scroll-enter { animation: section-arrive .65s var(--ease-out); }
.scroll-ready:focus-within { opacity: 1; transform: none; }
@keyframes section-arrive { from { opacity: .82; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.personal-note { text-align: center; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 32px 0 20px; }
.note-rule { display: block; width: 32px; height: 1px; background: #91a6ad; margin: 0 auto 24px; }
.personal-note > p:not(.eyebrow):not(.script) { max-width: 460px; margin: 20px auto; color: var(--muted); }
.personal-note .script { font-size: 24px; }
.letter-ending { text-align: center; padding-top: 36px; }
.letter-ending h3 { font-size: 35px; margin: 0; }
.letter-ending h3 span { font-size: 25px; }
.letter-ending p { font-size: 13px; color: var(--muted); }
.letter-ending a { display: inline-flex; align-items: center; gap: 15px; min-height: 44px; margin-top: 16px; font-size: 13px; }
.page-footer { position: relative; padding: 36px 24px max(30px, env(safe-area-inset-bottom)); text-align: center; color: var(--muted); font-size: 9px; letter-spacing: .16em; }
.snow { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
.snow i { position: absolute; top: -20px; left: 8%; width: 5px; height: 5px; background: #fff; border-radius: 50%; animation: snowfall 15s linear infinite; }
.snow i:nth-child(2) { left: 18%; animation-delay: -7s; animation-duration: 19s; }
.snow i:nth-child(3) { left: 30%; animation-delay: -2s; }
.snow i:nth-child(4) { left: 42%; animation-delay: -12s; animation-duration: 22s; }
.snow i:nth-child(5) { left: 54%; animation-delay: -9s; }
.snow i:nth-child(6) { left: 64%; animation-delay: -4s; animation-duration: 20s; }
.snow i:nth-child(7) { left: 73%; animation-delay: -11s; }
.snow i:nth-child(8) { left: 83%; animation-delay: -6s; animation-duration: 23s; }
.snow i:nth-child(9) { left: 93%; animation-delay: -14s; }
.snow i:nth-child(10) { left: 2%; animation-delay: -10s; animation-duration: 18s; }
@keyframes snowfall { to { transform: translate3d(18px, 105vh, 0); } }
@media (min-width: 600px) {
  .opening { padding-top: 75px; }
  .letter { width: calc(100% - 64px); padding: 34px 40px 42px; }
  .date-card { padding: 28px 30px; }
  dl, .prep-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
  dl > div + div { margin-top: 0; }
}
@media (max-width: 359px) {
  .letter { padding-inline: 19px; }
  .envelope { height: 186px; }
  .seal { top: 67px; }
  .date-card { padding-inline: 16px; }
  .desktop-break { display: none; }
}
@media (max-height: 740px) {
  .opening { padding-top: 22px; padding-bottom: 30px; }
  .envelope { margin-top: 48px; margin-bottom: 26px; height: 180px; }
  .seal { top: 65px; }
  h1 { margin-bottom: 12px; }
}
html { min-height: 100%; }
body { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; overflow-wrap: break-word; }
main { flex: 1 0 auto; min-width: 0; width: 100%; padding-left: max(18px, env(safe-area-inset-left)); padding-right: max(18px, env(safe-area-inset-right)); }
.seal { transition: opacity .2s ease, transform .3s var(--ease-out); }
.restart-button { min-height: 48px; max-width: 100%; margin-top: 20px; padding: 12px 20px; border: 1px solid #bac9cf; border-radius: 5px; background: transparent; color: var(--ink); cursor: pointer; touch-action: manipulation; transition: background .2s, transform .2s var(--ease-out); }
.restart-button:active { transform: translateY(2px) scale(.975); background: #edf2f2; transition-duration: .09s; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .snow { display: none; }
  .scroll-ready { opacity: 1; transform: none; }
  .opening:not(.is-open) .envelope, .opening:not(.is-open) .envelope-flap, .opening:not(.is-open) .seal, .opening:not(.is-open) .button { animation: none; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}