*,::before,::after{box-sizing:border-box;border:0 solid}h1,h2,p{margin:0}button{font:inherit;letter-spacing:inherit;color:inherit;background:transparent}img,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}a{text-decoration:none}button{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;white-space:nowrap;transition:all .15s ease;outline:none;user-select:none;border-radius:8px;border:1px solid transparent;font-weight:500}button svg{width:16px;height:16px;flex-shrink:0;pointer-events:none}button:disabled{pointer-events:none;opacity:.5}button:active{transform:translateY(1px)}
:root {
  --background: #710e1b;
  --foreground: #f4ebdd;
  --primary: #f4ebdd;
  --primary-foreground: #710e1b;
  --muted: #8f2831;
  --muted-foreground: #e3c6ad;
  --border: #d7b36a55;
  --ring: #d7b36a;
  --gold: #d7b36a;
  --cream: #f4ebdd;
  --red: #710e1b;
  --serif: 'Songti SC', 'Noto Serif CJK SC', 'STSong', 'SimSun', serif;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  background: #650b17;
}
body {
  margin: 0;
  color: var(--cream);
  font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
  -webkit-font-smoothing: antialiased;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
a {
  color: inherit;
}
a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 5px;
}
button:disabled {
  cursor: wait;
}
img {
  display: block;
}
.greeting {
  min-height: 100svh;
  background: #710e1b;
  position: relative;
  isolation: isolate;
  overflow: hidden;
}
.page-grain {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: url('./assets/crimson-background.webp') center top/auto 1100px
    repeat-y;
  opacity: 0.38;
  pointer-events: none;
}
.cover {
  width: min(100%, 580px);
  min-height: 100svh;
  padding: 28px 28px max(28px, env(safe-area-inset-bottom));
  margin: auto;
  display: flex;
  align-items: center;
  flex-direction: column;
  text-align: center;
}
.occasion {
  width: 100%;
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--gold);
  padding: 0 0 19px;
  border-bottom: 1px solid var(--border);
}
.cover-message {
  padding-top: clamp(36px, 6svh, 68px);
}
.eyebrow {
  color: var(--gold);
  font-size: 10px;
  letter-spacing: 2.8px;
  line-height: 1.6;
  font-weight: 500;
  margin: 0;
}
.cover h1 {
  font-family: var(--serif);
  font-size: clamp(42px, 10.7vw, 62px);
  line-height: 1.28;
  letter-spacing: 6px;
  font-weight: 600;
  margin: 20px 0 22px 6px;
}
.cover h1 span {
  display: block;
}
.recipient {
  font-size: 12px;
  letter-spacing: 1px;
  margin: 0;
  color: #ecd4c3;
}
.envelope-stage {
  width: calc(100% + 48px);
  max-width: 540px;
  margin: -8px -24px -22px;
}
.envelope {
  width: 100%;
  height: auto;
  transition:
    transform 0.65s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.55s ease;
}
.cover-action {
  z-index: 1;
  width: 100%;
}
.open-button {
  width: 216px;
  height: 51px;
  border-radius: 3px;
  background: var(--cream);
  color: var(--red);
  font-size: 16px;
  letter-spacing: 4px;
  gap: 28px;
  border: 1px solid #f7dfb3;
  box-shadow: 0 8px 30px #31010b22;
}
.open-button:hover {
  background: #fff6e8;
  transform: translateY(-2px);
}
.open-button svg {
  width: 18px;
  height: 18px;
}
.cover-action > p {
  color: #d9b8a5;
  font-size: 11px;
  letter-spacing: 1px;
  margin: 15px 0 0;
}
.cover-signature {
  margin-top: auto;
  padding-top: 34px;
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
}
.cover-signature > p {
  font-size: 11px;
  line-height: 1.8;
  color: #e3c6ad;
  letter-spacing: 0.4px;
  margin: 0;
}
.cover-signature > p span {
  display: block;
  font-size: 10px;
  letter-spacing: 2px;
}
.emblems {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
}
.emblem {
  --d: 84px;
  width: var(--d);
  height: var(--d);
  position: relative;
  overflow: hidden;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 0 3px #d7b36a3d;
  background: white;
}
.emblem img {
  max-width: none;
  position: absolute;
}
.emblem-42 img {
  width: calc(var(--d)*5689/5034);
  height: calc(var(--d)*5244/5034);
  left: calc(var(--d)*-332/5034);
  top: calc(var(--d)*-140/5034);
}
.emblem-5 img {
  width: calc(var(--d)*413/337);
  height: calc(var(--d)*390/337);
  left: calc(var(--d)*-38/337);
  top: calc(var(--d)*-38/337);
}
.emblem-divider {
  width: 20px;
  height: 1px;
  background: var(--gold);
  opacity: 0.7;
}
.emblems-small {
  gap: 9px;
}
.emblems-small .emblem {
  --d: 37px;
  box-shadow: 0 0 0 1px #d7b36a66;
}
.emblems-small .emblem-divider {
  display: none;
}
.is-opening .envelope {
  transform: translateY(80px) scale(1.04);
  opacity: 0;
}
.is-opening .cover-message {
  opacity: 0.25;
  transition: opacity 0.6s;
}
.opened-content {
  width: min(100%, 660px);
  margin: auto;
  padding: 0 20px max(28px, env(safe-area-inset-bottom));
  animation: letter-arrive 0.65s ease both;
}
.opened-header {
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--gold);
  font-size: 11px;
  letter-spacing: 2px;
}
.reset-button {
  min-height: 44px;
  color: #ead3b1;
  padding: 0 8px;
  gap: 7px;
  font-size: 11px;
  font-weight: 400;
  background: transparent;
}
.reset-button:hover {
  background: #ffffff0a;
}
.letter {
  background: var(--cream);
  color: #492629;
  padding: 37px 27px 29px;
  text-align: center;
  position: relative;
  border-top: 3px solid var(--gold);
  box-shadow: 0 12px 50px #38040b33;
}
.letter > .eyebrow {
  color: #98713b;
  font-size: 10px;
}
.letter .emblems {
  margin: 28px 0;
}
.letter h1 {
  font-family: var(--serif);
  color: var(--red);
  font-size: clamp(35px, 9vw, 46px);
  letter-spacing: 4px;
  font-weight: 600;
  line-height: 1.3;
  margin: 0 0 26px;
}
.letter h1:focus {
  outline: none;
}
.letter-recipient {
  font-size: 12px;
  line-height: 1.8;
  margin: 0 0 26px;
}
.letter-body {
  font-family: var(--serif);
  font-size: 15px;
  line-height: 2;
}
.letter-body p {
  margin: 0 0 20px;
}
.letter-body strong {
  font-weight: 600;
  color: var(--red);
}
.motto {
  font-family: var(--serif);
  font-size: 20px;
  color: var(--red);
  letter-spacing: 2px;
  margin: 32px 0;
  padding: 20px 0;
  border-top: 1px solid #710e1b22;
  border-bottom: 1px solid #710e1b22;
}
.motto span {
  color: #b28c51;
}
.letter-signature p {
  font-size: 12px;
  line-height: 1.9;
  margin: 0;
  letter-spacing: 1px;
}
.letter-signature > span {
  font-size: 10px;
  color: #876560;
  display: block;
  margin-top: 12px;
  letter-spacing: 2px;
}
.watch-button {
  margin-top: 30px;
  height: 48px;
  width: 100%;
  max-width: 310px;
  color: var(--cream);
  background: var(--red);
  border-radius: 3px;
  font-size: 14px;
  gap: 10px;
}
.watch-button:hover {
  background: #922636;
}
.watch-button > svg:last-child {
  margin-left: auto;
}
.watch-button > svg:first-child {
  margin-right: auto;
}
.film-section {
  padding-top: 56px;
  scroll-margin-top: 24px;
}
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 22px;
}
.section-heading > span {
  font-size: 11px;
  letter-spacing: 1px;
  color: #d9bca2;
  padding-bottom: 3px;
}
h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 29px;
  letter-spacing: 2px;
  margin: 8px 0 0;
}
.video-frame {
  background: #28080c;
  border: 1px solid #d7b36a66;
  padding: 4px;
  box-shadow: 0 8px 28px #36000933;
}
video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16/9;
  object-fit: contain;
  background: #000;
}
.media-note {
  font-size: 11px;
  color: #d9b8a5;
  line-height: 1.8;
  margin: 14px 0 0;
}
.media-note a {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.keepsake {
  text-align: center;
  margin-top: 48px;
  padding-top: 36px;
  border-top: 1px solid var(--border);
}
.keepsake-preview {
  display: block;
  margin-top: 24px;
  border: 1px solid #d7b36a66;
}
.keepsake-preview img {
  width: 100%;
  height: auto;
}
.save-button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 13px;
  color: var(--cream);
  border: 1px solid #d7b36a99;
  padding: 0 24px;
  margin-top: 24px;
  border-radius: 3px;
  text-decoration: none;
}
.save-button:hover {
  background: #ffffff0a;
}
.closing {
  padding-top: 54px;
  margin-top: 40px;
  border-top: 1px solid var(--border);
  text-align: center;
}
.closing p {
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.9;
  letter-spacing: 1px;
  margin: 0;
}
.closing strong {
  display: block;
  font-size: 29px;
  font-weight: 500;
  letter-spacing: 5px;
  margin-top: 7px;
}
.closing > span {
  display: block;
  color: var(--gold);
  font-size: 10px;
  letter-spacing: 2px;
  margin: 22px 0 10px;
}
@keyframes letter-arrive {
  from {
    opacity: 0;
    transform: translateY(25px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (min-width: 700px) {
  .cover {
    padding-top: 36px;
    padding-bottom: 36px;
  }
  .cover-message {
    padding-top: 40px;
  }
  .cover h1 {
    font-size: 62px;
  }
  .envelope-stage {
    margin-top: -18px;
    margin-bottom: -40px;
  }
  .cover-signature {
    padding-top: 34px;
  }
  .letter {
    padding: 44px 60px 38px;
  }
  .letter-body {
    font-size: 17px;
  }
  .letter-recipient {
    font-size: 14px;
  }
  .letter-signature p {
    font-size: 14px;
  }
  .opened-content {
    padding-bottom: 50px;
  }
}
@media (max-width: 360px) {
  .cover {
    padding-left: 22px;
    padding-right: 22px;
  }
  .cover-message {
    padding-top: 30px;
  }
  .cover h1 {
    font-size: 40px;
  }
  .recipient {
    font-size: 11px;
  }
  .cover-signature {
    gap: 10px;
  }
  .cover-signature > p {
    font-size: 10px;
  }
  .letter {
    padding-left: 18px;
    padding-right: 18px;
  }
  .letter-body {
    font-size: 14px;
  }
  .letter-recipient {
    font-size: 11px;
  }
  .motto {
    font-size: 18px;
    letter-spacing: 1px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
