:root {
  --pearl: #fffafd;
  --paper: #fff9f3;
  --rose: #ef9ab9;
  --rose-deep: #ad496f;
  --lilac: #d8c8ff;
  --violet: #65466f;
  --gold: #d3a650;
  --gold-soft: #f5dfad;
  --ink: #412837;
  --muted: #7c6270;
  --mint: #d9f1e9;
  --line: rgba(211, 166, 80, 0.36);
  --shadow: 0 26px 90px rgba(128, 63, 93, 0.18);
  --soft-shadow: 0 14px 38px rgba(128, 63, 93, 0.14);
  --radius: 8px;
  --night: #28232d;
  --night-deep: #1f2029;
  --night-card: #20232d;
  --line-rose: rgba(207, 111, 147, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100svh;
  margin: 0;
  color: var(--pearl);
  font-family: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
  background:
    radial-gradient(circle at 50% 55%, rgba(178, 77, 115, 0.16), transparent 35%),
    linear-gradient(180deg, #28232d 0%, #27222c 48%, #2b242f 100%);
  overflow-x: hidden;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  content: "";
  background:
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.018) 50%, transparent),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 22px);
  pointer-events: none;
}

button {
  border: 0;
  font: inherit;
  cursor: pointer;
}

svg {
  display: block;
}

.ambient-layer,
.burst-layer {
  position: fixed;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}

.burst-layer {
  z-index: 20;
}

.ambient-shape {
  position: absolute;
  top: -64px;
  left: var(--x);
  width: var(--size);
  height: var(--size);
  color: rgba(207, 111, 147, 0.28);
  filter: drop-shadow(0 8px 12px rgba(207, 111, 147, 0.12));
  animation: floatDown var(--duration) linear var(--delay) infinite;
}

.ambient-shape--heart,
.ambient-shape--star {
  display: grid;
  place-items: center;
  font-size: var(--size);
}

.ambient-shape--petal {
  border-radius: 70% 15% 70% 15%;
  background: linear-gradient(135deg, rgba(207, 111, 147, 0.32), rgba(255, 255, 255, 0.08));
  transform: rotate(24deg);
}

.heart-pop {
  position: fixed;
  bottom: -44px;
  left: var(--x);
  z-index: 25;
  color: var(--heart-color);
  font-size: var(--size);
  text-shadow: 0 8px 18px rgba(173, 73, 111, 0.2);
  pointer-events: none;
  animation: heartRise var(--duration) ease-out forwards;
}

.letter-experience {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  min-height: 100svh;
  padding: 1.1rem;
}

.cover-stage,
.unlock-stage,
.letter-stage {
  width: min(100%, 980px);
  min-height: min(780px, calc(100svh - 2.2rem));
}

.cover-stage {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 1.2rem;
  width: min(100%, 680px);
  min-height: calc(100svh - 2.2rem);
  margin-inline: auto;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--rose-deep);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.kicker::before,
.kicker::after {
  width: 28px;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, var(--gold));
}

.kicker::after {
  background: linear-gradient(90deg, var(--gold), transparent);
}

.envelope {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  width: clamp(320px, 48vw, 438px);
  aspect-ratio: 1.34;
  min-height: 0;
  margin-inline: auto;
  padding: 0;
  overflow: hidden;
  color: rgba(255, 247, 252, 0.74);
  border: 1px solid rgba(207, 111, 147, 0.56);
  border-radius: 16px;
  background:
    radial-gradient(circle at 50% 52%, rgba(207, 111, 147, 0.07), transparent 26%),
    linear-gradient(145deg, #22252f 0%, #1e2029 100%);
  box-shadow:
    0 26px 74px rgba(13, 13, 18, 0.38),
    0 28px 56px rgba(179, 73, 116, 0.18),
    inset 0 0 38px rgba(255, 255, 255, 0.018);
  transform: translateY(0);
  transition: opacity 520ms ease, transform 520ms ease, box-shadow 260ms ease;
  backdrop-filter: blur(18px);
}

.envelope:hover,
.envelope:focus-visible {
  transform: translateY(-6px);
  box-shadow:
    0 30px 86px rgba(13, 13, 18, 0.42),
    0 34px 76px rgba(207, 111, 147, 0.26),
    inset 0 0 38px rgba(255, 255, 255, 0.024);
}

.envelope::before,
.envelope::after {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
}

.envelope::before {
  background:
    linear-gradient(38deg, transparent calc(50% - 0.7px), var(--line-rose) 50%, transparent calc(50% + 0.7px)),
    linear-gradient(-38deg, transparent calc(50% - 0.7px), var(--line-rose) 50%, transparent calc(50% + 0.7px));
  opacity: 0.7;
}

.envelope::after {
  border-radius: inherit;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.026), transparent 38%),
    linear-gradient(90deg, transparent 0 12%, rgba(207, 111, 147, 0.1) 50%, transparent 88%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.018);
}

.envelope__flap {
  position: absolute;
  inset: 0;
  transform-origin: 50% 0;
  background:
    linear-gradient(145deg, transparent calc(50% - 0.6px), rgba(207, 111, 147, 0.22) 50%, transparent calc(50% + 0.6px)),
    linear-gradient(35deg, transparent calc(50% - 0.6px), rgba(207, 111, 147, 0.18) 50%, transparent calc(50% + 0.6px));
  opacity: 0.65;
  transition: transform 650ms ease;
}

.cover-stage.is-opening .envelope {
  opacity: 0.16;
  transform: translateY(-10px) scale(0.98);
}

.envelope__seal {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  color: #fff;
  border: 1px solid rgba(255, 210, 225, 0.56);
  border-radius: 999px;
  background: radial-gradient(circle at 38% 28%, #ffd2df, #bf6385 68%, #9c496d 100%);
  box-shadow:
    0 0 0 9px rgba(207, 111, 147, 0.08),
    0 16px 30px rgba(207, 111, 147, 0.28),
    0 0 36px rgba(207, 111, 147, 0.32);
  transform: translate(-50%, -50%);
  font-size: 1rem;
}

.envelope__to,
.envelope__from {
  position: absolute;
  z-index: 3;
  display: inline-flex;
  align-items: baseline;
  gap: 0.28rem;
  color: rgba(255, 247, 252, 0.56);
  font-size: 0.84rem;
  font-weight: 700;
}

.envelope__to {
  top: 63%;
  left: 50%;
  transform: translateX(-50%);
}

.envelope__to::after {
  position: absolute;
  right: 8px;
  bottom: -0.55rem;
  left: 8px;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(207, 111, 147, 0.7), transparent);
}

.envelope__from {
  right: 2.35rem;
  bottom: 3.35rem;
}

.envelope__to strong,
.envelope__from strong {
  color: #d990a8;
  font-family: "Great Vibes", cursive;
  font-size: 1.45rem;
  font-weight: 400;
  line-height: 0.8;
}

.envelope__from strong {
  font-size: 1.25rem;
}

.envelope__corner {
  position: absolute;
  width: 74px;
  height: 58px;
  border-color: rgba(207, 111, 147, 0.09);
  pointer-events: none;
}

.envelope__corner--tl {
  top: 0.55rem;
  left: 0.45rem;
  border-top: 1px solid;
  border-right: 1px solid;
  border-radius: 0 34px 0 0;
  transform: rotate(24deg);
}

.envelope__corner--tr {
  top: 0.55rem;
  right: 0.45rem;
  border-top: 1px solid;
  border-left: 1px solid;
  border-radius: 34px 0 0 0;
  transform: rotate(-24deg);
}

.envelope__corner--bl {
  bottom: 0.55rem;
  left: 0.75rem;
  border-bottom: 1px solid;
  border-right: 1px solid;
  border-radius: 0 0 34px 0;
  transform: rotate(-24deg);
}

.envelope__corner--br {
  right: 0.75rem;
  bottom: 0.55rem;
  border-bottom: 1px solid;
  border-left: 1px solid;
  border-radius: 0 0 0 34px;
  transform: rotate(24deg);
}

.tap-note {
  display: grid;
  gap: 0.2rem;
  place-items: center;
  margin: 0.15rem auto 0;
  color: rgba(255, 247, 252, 0.76);
  font-size: 0.82rem;
  font-weight: 500;
  text-align: center;
}

.tap-note span {
  color: #b86d87;
  font-family: "Great Vibes", cursive;
  font-size: 3rem;
  line-height: 0.8;
  transform: rotate(-18deg);
}

.unlock-stage,
.letter-stage {
  display: grid;
  place-items: center;
  gap: 1rem;
  animation: stageIn 680ms ease both;
}

.unlock-card {
  position: relative;
  width: min(100%, 560px);
  padding: clamp(2rem, 6vw, 4rem) clamp(1.2rem, 4vw, 2.5rem);
  overflow: hidden;
  text-align: center;
  color: rgba(255, 247, 252, 0.82);
  border: 1px solid rgba(207, 111, 147, 0.5);
  border-radius: 16px;
  background:
    radial-gradient(circle at 50% 0%, rgba(207, 111, 147, 0.13), transparent 34%),
    linear-gradient(145deg, #242733 0%, #1f2029 100%);
  box-shadow:
    0 26px 74px rgba(13, 13, 18, 0.42),
    0 28px 60px rgba(207, 111, 147, 0.18),
    inset 0 0 38px rgba(255, 255, 255, 0.018);
  backdrop-filter: blur(18px);
}

.unlock-card::before {
  position: absolute;
  inset: 14px;
  content: "";
  border: 1px solid rgba(207, 111, 147, 0.18);
  border-radius: 12px;
  pointer-events: none;
}

.unlock-card::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(115deg, transparent 0 42%, rgba(255, 255, 255, 0.1) 50%, transparent 58% 100%);
  transform: translateX(-120%);
  animation: paperGloss 4.8s ease-in-out infinite;
  pointer-events: none;
}

.unlock-card h2 {
  position: relative;
  z-index: 1;
  margin: 0.45rem 0 0;
  color: #d990a8;
  font-family: "Great Vibes", cursive;
  font-size: clamp(4.5rem, 14vw, 7rem);
  font-weight: 400;
  line-height: 0.9;
}

.unlock-card p {
  position: relative;
  z-index: 1;
  margin: 0.7rem 0 0;
  color: rgba(255, 247, 252, 0.7);
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.25rem;
  font-weight: 700;
}

.unlock-button {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  margin-top: 2rem;
  padding: 0.85rem 1.25rem;
  color: #fff;
  font-weight: 700;
  border: 1px solid rgba(255, 210, 225, 0.3);
  border-radius: 999px;
  background: radial-gradient(circle at 36% 24%, #ffd2df, #bf6385 68%, #9c496d 100%);
  box-shadow:
    0 0 0 9px rgba(207, 111, 147, 0.08),
    0 16px 30px rgba(207, 111, 147, 0.26);
}

.letter-card {
  position: relative;
  width: min(100%, 760px);
  min-height: min(720px, calc(100svh - 7.2rem));
  padding: clamp(1.1rem, 3vw, 2rem);
  overflow: hidden;
  color: rgba(255, 247, 252, 0.82);
  border: 1px solid rgba(207, 111, 147, 0.48);
  border-radius: 16px;
  background:
    radial-gradient(circle at 50% 0%, rgba(207, 111, 147, 0.12), transparent 34%),
    linear-gradient(90deg, rgba(207, 111, 147, 0.035) 0 1px, transparent 1px 100%),
    repeating-linear-gradient(180deg, transparent 0 34px, rgba(255, 255, 255, 0.025) 35px 36px),
    linear-gradient(145deg, #242733 0%, #1f2029 100%);
  box-shadow:
    0 28px 84px rgba(13, 13, 18, 0.42),
    0 28px 64px rgba(207, 111, 147, 0.16),
    inset 0 0 42px rgba(255, 255, 255, 0.018);
}

.letter-card::before {
  position: absolute;
  inset: 12px;
  content: "";
  border: 1px solid rgba(207, 111, 147, 0.18);
  border-radius: 12px;
  pointer-events: none;
}

.letter-card::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(115deg, transparent 0 42%, rgba(255, 255, 255, 0.09) 50%, transparent 58% 100%);
  opacity: 0.5;
  transform: translateX(-120%);
  animation: paperGloss 5.5s ease-in-out infinite;
  pointer-events: none;
}

.letter-card__header {
  position: relative;
  z-index: 1;
  text-align: center;
}

.letter-card__header h2 {
  margin: 0.45rem 0 0;
  color: #d990a8;
  font-family: "Great Vibes", cursive;
  font-size: clamp(4rem, 10vw, 6.2rem);
  font-weight: 400;
  line-height: 0.95;
}

.letter-card__header p {
  margin: 0.4rem 0 0;
  color: rgba(255, 247, 252, 0.7);
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.15rem;
  font-weight: 700;
}

.letter-pages {
  position: relative;
  z-index: 1;
  min-height: clamp(420px, 48svh, 540px);
  margin-top: 1.6rem;
}

.letter-page {
  display: none;
  position: relative;
  isolation: isolate;
  min-height: clamp(420px, 48svh, 540px);
  padding: clamp(1.25rem, 4vw, 2.4rem);
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(207, 111, 147, 0.13);
  background: rgba(255, 255, 255, 0.018);
  box-shadow: inset 0 0 28px rgba(255, 255, 255, 0.018);
}

.letter-page::before,
.letter-page::after {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
}

.letter-page::before {
  z-index: 0;
  background-image:
    linear-gradient(90deg, rgba(31, 32, 41, 0.88), rgba(31, 32, 41, 0.64) 48%, rgba(31, 32, 41, 0.9)),
    var(--page-photo);
  background-position: center, var(--page-photo-position-desktop, center center);
  background-size: cover, cover;
  background-repeat: no-repeat;
  filter: blur(1.5px) saturate(0.92) contrast(1.04);
  opacity: 0.6;
  transform: scale(1.045);
}

.letter-page::after {
  z-index: 0;
  background:
    linear-gradient(115deg, transparent 0 37%, rgba(255, 255, 255, 0.1) 45%, transparent 55% 100%),
    radial-gradient(circle at 16% 16%, rgba(207, 111, 147, 0.16), transparent 32%),
    radial-gradient(circle at 88% 88%, rgba(207, 111, 147, 0.1), transparent 34%);
  mix-blend-mode: screen;
  opacity: 0.78;
}

.letter-page > * {
  position: relative;
  z-index: 1;
}

.letter-page.is-active {
  display: block;
  animation: pageTurn 520ms ease both;
}

.page-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  color: #d990a8;
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 700;
  border: 1px solid rgba(207, 111, 147, 0.34);
  border-radius: 999px;
  background: rgba(31, 32, 41, 0.5);
  backdrop-filter: blur(10px);
}

.letter-page h3 {
  margin: 1rem 0 0;
  color: rgba(255, 247, 252, 0.92);
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.1;
  text-wrap: balance;
  text-shadow: 0 10px 30px rgba(13, 13, 18, 0.36);
}

.letter-page p {
  margin: 1rem 0 0;
  color: rgba(255, 247, 252, 0.68);
  font-size: 1.05rem;
  line-height: 1.9;
  text-wrap: pretty;
  text-shadow: 0 8px 22px rgba(13, 13, 18, 0.44);
}

.love-list {
  display: grid;
  gap: 0.7rem;
  margin: 1.1rem 0 0;
  padding: 0;
  list-style: none;
}

.love-list li {
  position: relative;
  padding: 0.8rem 0.9rem 0.8rem 2.2rem;
  color: rgba(255, 247, 252, 0.74);
  border: 1px solid rgba(207, 111, 147, 0.22);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.045);
  box-shadow: 0 10px 24px rgba(13, 13, 18, 0.16);
}

.love-list li::before {
  position: absolute;
  left: 0.85rem;
  color: #d990a8;
  content: "\2665";
}

.letter-controls {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 46px;
  align-items: center;
  gap: 0.8rem;
  margin-top: 1rem;
}

.icon-button,
.music-toggle,
.return-button,
.replay-button,
.unlock-button {
  transition: transform 220ms ease, box-shadow 220ms ease, background 220ms ease, color 220ms ease;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  color: #d990a8;
  border: 1px solid rgba(207, 111, 147, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  box-shadow:
    0 14px 34px rgba(13, 13, 18, 0.24),
    inset 0 0 18px rgba(255, 255, 255, 0.018);
}

.icon-button svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.icon-button:not(:disabled):hover,
.icon-button:not(:disabled):focus-visible,
.return-button:hover,
.return-button:focus-visible,
.replay-button:hover,
.replay-button:focus-visible,
.unlock-button:hover,
.unlock-button:focus-visible,
.music-toggle:hover,
.music-toggle:focus-visible {
  transform: translateY(-2px);
  box-shadow:
    0 18px 46px rgba(13, 13, 18, 0.28),
    0 12px 30px rgba(207, 111, 147, 0.16);
}

.icon-button:disabled {
  cursor: not-allowed;
  opacity: 0.35;
}

.page-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  min-width: 0;
}

.page-dot {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: rgba(255, 247, 252, 0.56);
  font-size: 0.78rem;
  font-weight: 700;
  border: 1px solid rgba(207, 111, 147, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
}

.page-dot.is-active {
  color: #fff;
  background: radial-gradient(circle at 38% 24%, #ffd2df, #bf6385 68%, #9c496d 100%);
  box-shadow:
    0 0 0 7px rgba(207, 111, 147, 0.08),
    0 10px 24px rgba(207, 111, 147, 0.18);
}

.return-button,
.replay-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.75rem 1.05rem;
  color: #d990a8;
  font-weight: 700;
  border: 1px solid rgba(207, 111, 147, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  box-shadow:
    0 14px 34px rgba(13, 13, 18, 0.24),
    inset 0 0 18px rgba(255, 255, 255, 0.018);
}

.replay-button {
  margin-top: 1rem;
  color: #fff;
  border-color: rgba(255, 210, 225, 0.3);
  background: radial-gradient(circle at 36% 24%, #ffd2df, #bf6385 68%, #9c496d 100%);
  box-shadow:
    0 0 0 9px rgba(207, 111, 147, 0.08),
    0 16px 30px rgba(207, 111, 147, 0.24);
}

.music-toggle {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 10;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  color: #d990a8;
  border: 1px solid rgba(207, 111, 147, 0.3);
  border-radius: 999px;
  background: rgba(31, 32, 41, 0.74);
  box-shadow:
    0 16px 36px rgba(13, 13, 18, 0.3),
    0 12px 26px rgba(207, 111, 147, 0.12);
  backdrop-filter: blur(16px);
}

.music-toggle::after {
  position: absolute;
  right: 62px;
  width: max-content;
  max-width: 180px;
  padding: 0.45rem 0.7rem;
  color: rgba(255, 247, 252, 0.82);
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid rgba(207, 111, 147, 0.26);
  border-radius: var(--radius);
  background: rgba(31, 32, 41, 0.9);
  box-shadow: 0 14px 34px rgba(13, 13, 18, 0.24);
  content: attr(aria-label);
  opacity: 0;
  transform: translateX(8px);
  transition: opacity 200ms ease, transform 200ms ease;
  pointer-events: none;
}

.music-toggle:hover::after,
.music-toggle:focus-visible::after {
  opacity: 1;
  transform: translateX(0);
}

.music-toggle svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.music-toggle.is-playing {
  color: #fff;
  background: radial-gradient(circle at 38% 24%, #ffd2df, #bf6385 68%, #9c496d 100%);
}

[hidden] {
  display: none !important;
}

@keyframes floatDown {
  0% {
    opacity: 0;
    transform: translate3d(0, -70px, 0) rotate(0deg);
  }

  12%,
  82% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translate3d(var(--drift), calc(100svh + 120px), 0) rotate(220deg);
  }
}

@keyframes heartRise {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0) scale(0.7) rotate(-8deg);
  }

  12% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translate3d(var(--drift), -86svh, 0) scale(1.25) rotate(18deg);
  }
}

@keyframes pageTurn {
  from {
    opacity: 0;
    transform: translateY(18px) rotateX(8deg);
  }

  to {
    opacity: 1;
    transform: translateY(0) rotateX(0deg);
  }
}

@keyframes paperGloss {
  0%,
  55% {
    transform: translateX(-120%);
  }

  100% {
    transform: translateX(120%);
  }
}

@keyframes stageIn {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 860px) {
  .cover-stage {
    width: min(100%, 620px);
  }

  .envelope {
    width: min(82vw, 438px);
  }
}

@media (max-width: 560px) {
  .letter-experience {
    padding: 0.75rem;
  }

  .cover-stage,
  .unlock-stage,
  .letter-stage {
    min-height: calc(100svh - 1.5rem);
  }

  .letter-page p {
    font-size: 0.98rem;
    line-height: 1.75;
  }

  .envelope {
    width: min(92vw, 438px);
  }

  .envelope__seal {
    width: 42px;
    height: 42px;
  }

  .envelope__to {
    top: 62%;
  }

  .envelope__from {
    right: 1.5rem;
    bottom: 2.45rem;
  }

  .envelope__to strong {
    font-size: 1.3rem;
  }

  .envelope__from strong {
    font-size: 1.08rem;
  }

  .letter-card {
    min-height: calc(100svh - 5.5rem);
    padding: 1rem;
  }

  .letter-card::before {
    inset: 8px;
  }

  .letter-pages {
    min-height: clamp(440px, 62svh, 620px);
    margin-top: 0.8rem;
  }

  .letter-page {
    min-height: clamp(440px, 62svh, 620px);
    padding: 0.95rem;
  }

  .letter-page::before {
    background-image:
      linear-gradient(90deg, rgba(31, 32, 41, 0.9), rgba(31, 32, 41, 0.72) 52%, rgba(31, 32, 41, 0.92)),
      var(--page-photo);
    background-position: center, var(--page-photo-position-mobile, var(--page-photo-position-desktop, center center));
    filter: blur(1.2px) saturate(0.9) contrast(1.02);
    opacity: 0.64;
  }

  .letter-controls {
    grid-template-columns: 42px minmax(0, 1fr) 42px;
    gap: 0.45rem;
  }

  .icon-button {
    width: 42px;
    height: 42px;
  }

  .page-dots {
    gap: 0.28rem;
  }

  .page-dot {
    width: 28px;
    height: 28px;
    font-size: 0.7rem;
  }

  .music-toggle {
    right: 0.75rem;
    bottom: 0.75rem;
  }

  .music-toggle::after {
    display: none;
  }
}

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