:root {
  color-scheme: light;
  --background: #f7f3ec;
  --paper: #fffdf8;
  --ink: #59493f;
  --muted: #85766b;
  --accent: #a94f4d;
  --line: #e6dcd0;
  --serif: "Noto Serif SC", "Songti SC", "STSong", "SimSun", Georgia, serif;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--background);
  font-synthesis: none;
  -webkit-tap-highlight-color: transparent;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 280px; background: radial-gradient(ellipse at 50% 12%, #fffdf7 0, transparent 65%); }
body::before { content: ""; position: fixed; inset: 0; pointer-events: none; opacity: .26; background-image: radial-gradient(#b7a58d 0.5px, transparent .5px); background-size: 6px 6px; z-index: -1; }
button, input { font: inherit; }
button { -webkit-appearance: none; appearance: none; }
button:focus-visible, input:focus-visible { outline: 3px solid #a94f4d; outline-offset: 5px; }
svg { display: block; }
.icon-library { position: absolute; width: 0; height: 0; overflow: hidden; }
.page-shell { width: min(100% - 44px, 520px); margin: 0 auto; padding-bottom: max(24px, env(safe-area-inset-bottom)); }
.masthead { height: 100px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.wordmark { font: italic 27px Georgia, serif; letter-spacing: -1.4px; }.wordmark span { color: var(--accent); }
.music-player { position: relative; min-width: 0; max-width: calc(100% - 80px); margin-left: auto; }
.music-toggle { display: flex; align-items: center; gap: 8px; }
.music-toggle h2 { min-width: 0; margin: 0; font: 400 12px/1.8 var(--serif); letter-spacing: .5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.music-button { display: grid; place-items: center; flex-shrink: 0; width: 44px; height: 44px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: transparent; color: var(--accent); cursor: pointer; }
.music-button svg { width: 17px; height: 17px; fill: currentColor; }.music-button:disabled { opacity: .5; cursor: default; }.is-playing .music-button { background: #f4e8df; border-color: #d8b4a1; }
.music-player .audio-status { position: absolute; right: 0; top: 100%; z-index: 1; width: 220px; margin-top: 6px; padding: 10px 12px; background: var(--paper); border: 1px solid var(--line); border-radius: 4px; }
.eyebrow { margin: 0; font-size: 9px; line-height: 1.6; letter-spacing: 2px; color: var(--muted); }
.cover { text-align: center; padding-top: clamp(44px, 8vh, 86px); }
.cover h1 { margin: 18px 0 16px; font: 400 clamp(26px, 7vw, 34px)/1.7 var(--serif); letter-spacing: 3px; white-space: pre-line; overflow-wrap: anywhere; }
.cover-note { font-size: 12px; line-height: 1.9; color: var(--muted); margin: 0; }
.envelope { display: block; width: min(100%, 350px); aspect-ratio: 1.53; position: relative; margin: 58px auto 0; padding: 0; border: 0; border-radius: 5px; background: transparent; color: var(--ink); cursor: pointer; perspective: 1000px; isolation: isolate; transition: transform .25s; }
.envelope:hover { transform: translateY(-3px); }
.envelope-back { position: absolute; inset: 0; background: #e5c3ad; border-radius: 5px; box-shadow: 0 15px 35px #74513c18, 0 2px 4px #74513c14; }
.peek-paper { position: absolute; inset: 12% 7% 4%; background: var(--paper); border-radius: 3px; display: flex; align-items: center; flex-direction: column; padding: 18px; color: #8e8172; transition: transform .65s .15s; }
.peek-paper svg { width: 28px; height: 40px; fill: none; stroke: #8e987d; stroke-width: 1.2; }.peek-paper > span { margin-top: 12px; font: italic 14px Georgia, serif; }
.envelope-front { position: absolute; inset: 0; background: #f4dfcf; clip-path: polygon(0 0, 50% 52%, 100% 0, 100% 100%, 0 100%); border-radius: 5px; z-index: 2; }
.envelope-fold { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.envelope-fold.left { background: linear-gradient(130deg, #f6e4d7, #f1dac7); clip-path: polygon(0 0, 53% 58%, 0 100%); border-radius: 5px 0 0 5px; }
.envelope-fold.right { background: linear-gradient(-130deg, #f7e7da, #f2ddcb); clip-path: polygon(100% 0, 47% 58%, 100% 100%); border-radius: 0 5px 5px 0; }
.envelope-flap { position: absolute; inset: 0; background: linear-gradient(#ead0bb, #e5c5af); clip-path: polygon(0 0, 100% 0, 50% 54%); transform-origin: center top; backface-visibility: hidden; transition: transform .55s ease, opacity .45s; z-index: 4; }
.recipient-label { position: absolute; bottom: 20px; left: 23px; z-index: 5; display: flex; gap: 10px; align-items: center; font: 13px var(--serif); letter-spacing: 1px; max-width: calc(100% - 102px); }
.recipient-label > span:first-child { font: 8px Georgia, serif; color: var(--muted); }.recipient-label > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.postage { position: absolute; bottom: 16px; right: 18px; width: 39px; height: 49px; border: 1px dashed #b19e86; color: #7a816b; z-index: 4; display: grid; justify-items: center; align-content: center; gap: 2px; opacity: .8; }
.postage svg { width: 19px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.4; }.postage > span { font-size: 4px; letter-spacing: .5px; }
.wax-seal { position: absolute; top: 42%; left: calc(50% - 23px); width: 46px; height: 46px; border-radius: 48% 53% 49% 46%; background: linear-gradient(145deg, #bb6660, #9c4947); box-shadow: 0 3px 5px #773e3d28, inset 0 0 0 3px #c777704f, inset 0 0 0 5px #99444130; display: grid; place-items: center; z-index: 5; transition: transform .25s, opacity .2s; }
.wax-seal svg { width: 18px; height: 18px; stroke: #f4d4c9; stroke-width: 1.2; fill: none; }
.envelope.is-opening { pointer-events: none; transform: translateY(0); }.is-opening .wax-seal { transform: scale(.5); opacity: 0; }.is-opening .envelope-flap { transform: rotateX(-178deg); opacity: 0; }.is-opening .peek-paper { transform: translateY(-45%); }
.open-hint { margin: 30px 0 0; font-size: 11px; line-height: 1.8; color: var(--muted); letter-spacing: 1px; }.open-hint > span { color: #a48a69; margin-right: 5px; }
.cover-footer { margin: 58px 0 20px; display: flex; align-items: center; justify-content: center; gap: 15px; color: #8c7b6a; font: 10px var(--serif); letter-spacing: 1px; }.cover-footer > span { height: 1px; width: 25px; background: var(--line); }
.letter { padding-top: 20px; animation: unfold .65s ease both; }
@keyframes unfold { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
.letter-paper { position: relative; padding: 22px 20px 28px; background: var(--paper); border: 1px solid #e9dfd3; box-shadow: 0 8px 30px #74513c08; border-radius: 4px; }
.paper-heading { display: flex; justify-content: space-between; align-items: center; }.paper-heading > svg { width: 27px; height: 38px; fill: none; stroke: #8c967a; stroke-width: 1.2; }
.letter-paper h1 { margin: 12px 0 20px; font: 400 30px/1.6 var(--serif); letter-spacing: 3px; overflow-wrap: anywhere; }.letter-paper h1:focus { outline: none; }
.paper-rule { border-top: 1px solid var(--line); height: 18px; text-align: center; }.paper-rule span { position: relative; top: -11px; padding: 0 9px; background: var(--paper); color: #b5a184; font-size: 15px; }
.salutation, .letter-body { font: 15px/2.1 var(--serif); letter-spacing: .5px; overflow-wrap: anywhere; white-space: pre-line; }.salutation { margin: 17px 0; }.letter-body p { margin: 0 0 17px; }
.signature { text-align: right; margin: 30px 0 17px; font: 15px/1.8 var(--serif); overflow-wrap: anywhere; }.signature p { margin: 0; }.signature time { display: block; font: 10px/2.5 Georgia, serif; letter-spacing: 1px; color: var(--muted); }
.paper-heart { width: 15px; height: 15px; margin: 0 auto; fill: none; stroke: #b77d72; stroke-width: 1.2; }
.audio-card { border: 1px solid #ead7cc; border-radius: 8px; padding: 18px 20px; margin-top: 16px; background: #f4e8df; }
.audio-card h2 { font: 400 17px/1.7 var(--serif); letter-spacing: 1px; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.voice-controls { display: flex; align-items: center; gap: 18px; margin: 10px 0 3px; }
.play-button { border: 0; border-radius: 50%; width: 46px; height: 46px; flex-shrink: 0; background: var(--accent); color: #fffaf2; display: grid; place-items: center; cursor: pointer; transition: transform .2s, background .2s; }.play-button:hover:enabled { transform: scale(1.05); background: #974240; }.play-button:disabled { opacity: .5; cursor: default; }.play-button svg { width: 19px; height: 19px; fill: currentColor; }
.waveform { flex: 1; min-width: 0; height: 40px; stroke: #bc8c7e; stroke-width: 2.2; stroke-linecap: round; opacity: .65; }.is-playing .waveform { animation: breathe 1.7s ease-in-out infinite alternate; }@keyframes breathe { to { opacity: 1; } }
.seek { --progress: 0%; appearance: none; -webkit-appearance: none; background: transparent; height: 20px; margin: 0; display: block; width: 100%; cursor: pointer; accent-color: var(--accent); }.seek:disabled { cursor: default; }.seek::-webkit-slider-runnable-track { height: 2px; border-radius: 2px; background: linear-gradient(to right, var(--accent) var(--progress), #d7c4b6 var(--progress)); }.seek::-webkit-slider-thumb { appearance: none; -webkit-appearance: none; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); margin-top: -3.5px; }.seek::-moz-range-track { height: 2px; background: #d7c4b6; }.seek::-moz-range-progress { height: 2px; background: var(--accent); }.seek::-moz-range-thumb { border: 0; width: 9px; height: 9px; background: var(--accent); border-radius: 50%; }.seek:disabled { opacity: .5; }
.audio-times { display: flex; justify-content: space-between; font: 10px/1.8 Georgia, serif; color: var(--muted); font-variant-numeric: tabular-nums; }.audio-status { margin: 10px 0 0; color: #914643; font-size: 11px; line-height: 1.8; }
.letter-footer { margin: 32px 0 10px; font: 11px/1.8 var(--serif); text-align: center; letter-spacing: 1px; color: var(--muted); }.letter-footer svg { width: 12px; height: 12px; fill: none; stroke: #b38b79; stroke-width: 1.2; margin: 0 auto 10px; }
noscript { display: block; margin-top: 20px; font-size: 13px; line-height: 1.8; }
@media (min-width: 700px) { .page-shell { padding-top: 18px; }.cover { padding-bottom: 25px; }.letter { padding-top: 38px; }.letter-paper { padding: 34px 40px 38px; }.audio-card { padding: 20px 24px; } }
@media (max-width: 350px) { .page-shell { width: calc(100% - 32px); }.masthead { height: 78px; }.cover { padding-top: 35px; }.cover h1 { font-size: 25px; letter-spacing: 1px; }.envelope { margin-top: 45px; }.letter-paper { padding: 22px 16px; }.audio-card { padding: 16px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
