:root {
  color-scheme: light;
  --ink:#2c3b30; --muted:#5c6355; --wine:#762d36; --forest:#263b32;
  --paper:#fbf4e7; --edge:#d7cbb7; --heading:"Iowan Old Style", "Baskerville", "Noto Serif CJK SC", "Songti SC", "STSong", Georgia, serif;
  --body:system-ui,-apple-system,"PingFang SC","Microsoft YaHei",sans-serif;
}
*, *::before, *::after {box-sizing:border-box}
body {margin:0; color:var(--ink); background: url(grain.svg),#f6f0e5; font-family:var(--body); line-height:1.55}
button,input,textarea,select {font:inherit}
button {cursor:pointer; color:inherit}
button:disabled {cursor:wait; opacity:.65}
a {color:inherit}
:focus-visible {outline:2px solid #a05047; outline-offset:5px}
.site-header, footer {max-width:1232px; margin:auto; padding:19px clamp(20px,5vw,66px); display:flex; justify-content:space-between; align-items:center; gap:20px}
.site-header {border-bottom:1px solid var(--edge)}
.brand {font:700 2rem/.9 var(--heading); text-decoration:none; letter-spacing:-.07em}
.brand span {color:var(--wine)}
.language,.quiet {border:0; background:none; text-decoration:underline; text-underline-offset:4px; padding:8px; color:var(--muted)}
footer {border-top:1px solid var(--edge); color:var(--muted); font-size:.88rem; flex-wrap:wrap}
footer p {margin:0}
footer a {text-underline-offset:4px}
.hero {max-width:1232px; margin:auto; padding:clamp(28px,7vw,92px) clamp(20px,5vw,66px) clamp(44px,7vw,86px); display:grid; gap:28px; align-items:center}
h1,h2,h3 {font-family:var(--heading); line-height:1.08; font-weight:600; margin:0 0 14px}
h1 {font-size:clamp(2.8rem,7vw,6rem); letter-spacing:-.063em}
:lang(zh) h1 {letter-spacing:-.045em; font-size:clamp(2.5rem,5.6vw,5.2rem); line-height:1.14}
h1 em {color:var(--wine); font-weight:400}
:lang(zh) h1 em {font-style:normal}
h2 {font-size:clamp(1.9rem,4vw,3rem)}
h3 {font-size:1.5rem}
.eyebrow {font-size:.78rem; letter-spacing:.18em; text-transform:uppercase; font-weight:700; color:var(--wine); display:block; margin:0 0 16px}
.lede {color:var(--muted); max-width:32ch; font-size:clamp(1rem,2vw,1.16rem); margin:0 0 25px}
.button {display:inline-flex; align-items:center; justify-content:center; min-height:48px; padding:10px 20px; color:#fff8ed; background:var(--wine); border:1px solid var(--wine); border-radius:4px; text-decoration:none; font-weight:650; text-align:center}
.button:hover {filter:brightness(1.13)}
.button.secondary {color:var(--ink); background:transparent; border-color:var(--edge)}
.hero-copy .button {min-width:174px}
.stage {position:relative; isolation:isolate; display:grid; place-items:center; min-height:280px; aspect-ratio:1.25; padding:32px 24px 48px; border-radius:6px; overflow:hidden; background: url(grain.svg), radial-gradient(ellipse at 50% 45%,#4c5e48 0%,#27392e 62%,#182a22 100%); color:var(--paper)}
.stage::before {content:""; position:absolute; inset:12px; border:1px solid #e0c89854; pointer-events:none}
.stage::after {content:"✧"; color:#d7ae73; font-family:Georgia,serif; position:absolute; top:16px; right:22px; font-size:1.75rem; pointer-events:none}
.stage-caption {position:absolute; bottom:13px; margin:0; font-size:.85rem; color:#f3dfbb; letter-spacing:.05em; text-align:center}
.envelope {position:relative; width:min(91%,355px); aspect-ratio:1.52; margin-top:10px; perspective:900px; filter:drop-shadow(0 16px 16px #101b15aa)}
.envelope::before,.fold,.lid {position:absolute; inset:0; content:""}
.envelope::before {background:url(grain.svg),#d4ac81; border:1px solid #dbb384; border-radius:4px}
.fold {background:url(grain.svg),linear-gradient(156deg,#ead2aa,#d5af85); clip-path:polygon(0 0, 50% 54%,100% 0,100% 100%,0 100%); border-radius:4px; z-index:2}
.fold::after {content:""; position:absolute; inset:0; background:url(grain.svg),linear-gradient(7deg,#e2be91,#f6e4c6); clip-path:polygon(0 100%,50% 37%,100% 100%); border-radius:4px}
.lid {height:70%; background:url(grain.svg),linear-gradient(#f6e2bf,#e3bb92); clip-path:polygon(0 0,100% 0,100% 5%,53% 95%,50% 99%,47% 95%,0 5%); transform-origin:top center; transition:transform .68s cubic-bezier(.26,.85,.2,1); z-index:3}
.peek {position:absolute; z-index:1; left:9%; right:9%; bottom:8%; height:82%; background:var(--paper); border:1px solid var(--edge); color:#927250; display:grid; justify-items:center; padding-top:.3rem; font-family:var(--heading); font-size:1.5rem; transition:transform .65s .25s ease}
.seal {border:0; padding:0; position:absolute; z-index:4; display:grid; place-items:center; top:66%; left:50%; width:clamp(60px,22%,82px); aspect-ratio:1; transform:translate(-50%,-50%); background:transparent; touch-action:manipulation; user-select:none; -webkit-touch-callout:none; -webkit-tap-highlight-color:transparent; border-radius:50%; transition:opacity .24s, scale .24s}
.seal img {width:100%; pointer-events:none; filter:drop-shadow(0 3px 3px #59292d77)}
.ring {position:absolute; width:110%; height:110%; transform:rotate(-90deg); pointer-events:none; fill:none; stroke:#fff1c3; stroke-width:2; stroke-dasharray:100}
.unsealed .seal {opacity:0; scale:1.28; pointer-events:none}
.unsealed .lid {transform:rotateX(174deg); z-index:1}
.unsealed .peek {transform:translateY(-29%)}
.demos {padding:32px clamp(20px,5vw,66px) 64px; max-width:1232px; margin:auto; border-top:1px solid var(--edge)}
.demo-list {display:grid; gap:12px; margin-top:22px}
.demo-card {min-height:127px; display:grid; align-content:center; justify-items:start; padding:16px 20px; border:1px solid var(--edge); background:url(grain.svg),#f9f2e5; text-decoration:none; border-radius:4px}
.demo-card:hover {border-color:#956a5b}
.demo-mark {font:1.5rem var(--heading); color:var(--wine)}
.demo-card strong {font:600 1.35rem var(--heading)}
.demo-card small {color:var(--muted); margin-top:6px}
.page {max-width:1232px; padding:36px clamp(20px,5vw,66px) 68px; margin:auto}
.page h1 {font-size:clamp(2.5rem,5vw,4.3rem)}
.editor {display:grid; gap:24px; align-items:start}
.form-card,.delivery-options {display:grid; gap:16px; min-width:0}
.fields {display:grid; gap:12px}
.field {display:grid; gap:5px; font-weight:650}
.field span {font-size:.92rem}
input,textarea,select {width:100%; min-height:46px; border:1px solid #c5b8a4; background:#fffbf4; border-radius:4px; color:var(--ink); padding:9px 11px; font-weight:400}
textarea {min-height:91px; resize:vertical}
fieldset {margin:0; padding:0; border:none; min-width:0}
legend {font-weight:700; margin-bottom:7px}
.edition {display:grid; grid-template-columns:auto 1fr; gap:10px; align-items:start; padding:12px; margin-bottom:7px; border:1px solid var(--edge); border-radius:4px}
.edition:has(:checked) {border-color:var(--wine); background:#fbede3}
.edition input {width:auto; min-height:auto; margin-top:6px; accent-color:var(--wine)}
.edition small {display:block; color:var(--muted); font-size:.89rem}
.status,.note {font-size:.9rem; color:var(--muted); margin:0}
.status:not(:empty) {color:var(--wine); padding:.35rem 0}
.test-label {border:1px solid #b98356; color:#643523; background:#faead5; border-radius:4px; padding:9px 12px; font-size:.9rem; margin:0 0 12px}
.letter {position:relative; isolation:isolate; overflow:hidden; padding:clamp(23px,6vw,52px); border:1px solid #d8c7a9; border-radius:3px; background:url(grain.svg),#fffaee; box-shadow:0 12px 30px #61452219; overflow-wrap:anywhere}
.letter p {white-space:pre-wrap; font-family:var(--heading); font-size:1.22rem; line-height:1.6}
.letter h2 {color:var(--wine)}
.letter .sign {margin-bottom:0}
.letter .watermark {display:block; margin-top:25px; color:var(--muted)}
.preview-heading {margin-bottom:8px}
.receiver, .share-page {width:min(100%,670px); margin:auto}
.receiver > .scene:not(.scene--gift) > .stage {max-height:410px}
.receiver-tools {display:flex; justify-content:space-between; align-items:center; gap:10px; margin:0 0 10px; flex-wrap:wrap}
.actions {display:flex; flex-wrap:wrap; gap:9px; margin-top:20px}
.link-group {display:grid; gap:8px; margin:21px 0}
.link-group label {font-weight:700}
.link-group input {font-size:.88rem}
.policy {max-width:720px}
.policy p {max-width:66ch}
[hidden] {display:none!important}
@media(min-width:670px) {
  .hero {grid-template-columns:1fr 1.11fr; gap:clamp(28px,5vw,65px)}
  .demo-list {grid-template-columns:repeat(3,1fr)}
  .editor {grid-template-columns:1fr 1fr; grid-template-areas:"fields preview" "options preview"; gap:26px clamp(24px,5vw,66px)}
  .form-card {grid-area:fields}
  .delivery-options {grid-area:options}
  .preview {grid-area:preview; position:sticky; top:20px}
  .fields {grid-template-columns:1fr 1fr}
}
.demo-access {display:inline-block; margin-top:3px; font-size:.87rem}
.receiver-tools button {min-height:44px}
.receiver-tools #sound {margin-inline-start:auto}

/* The public sample and the free envelope keep their original stationery. */
.scene {position:relative; isolation:isolate; min-width:0}
.scene > .stage {width:100%; transition:opacity .4s ease}
.scene-reading {position:relative; z-index:1; min-width:0}
.scene-reading > .letter:focus {outline:none}
.is-reading > .stage {
  position:absolute; inset:0 0 auto; opacity:0; visibility:hidden; pointer-events:none;
  transition:opacity .4s ease, visibility 0s linear .4s
}
.is-reading .scene-reading {animation:letter-arrive .44s ease-out both}
@keyframes letter-arrive {from {opacity:0; transform:translateY(12px)} to {opacity:1; transform:translateY(0)}}
.scene--stationery > .stage {display:none}
.preview-controls {display:flex; flex-wrap:wrap; gap:8px; margin:12px 0 8px}
.preview-version {display:flex; flex:1 1 auto; min-width:0; padding:3px; border:1px solid var(--edge); background:#ede4d4; border-radius:5px}
.preview-version button {flex:1; min-height:42px; padding:6px 10px; border:1px solid transparent; border-radius:3px; background:transparent; font-size:.92rem; white-space:nowrap}
.preview-version button[aria-pressed="true"] {background:var(--paper); border-color:#d9c9ae; box-shadow:0 1px 3px #6e56341a; font-weight:650}
.preview-version button[data-preview="gift"][aria-pressed="true"] {background:var(--forest); border-color:var(--forest); color:var(--paper)}
.preview-theme {flex:1 1 auto; display:flex; min-width:0}
.preview-theme select {background-color:#fffbf4; min-height:48px}
.preview-actions {display:flex; flex-wrap:wrap; justify-content:space-between; align-items:center; margin:0 0 8px; gap:3px}
.preview-actions button {min-height:44px}
.editor-intro {margin:0 0 22px; color:var(--muted); max-width:48ch}
.form-card {padding:17px 0 20px; border-top:1px solid var(--edge); border-bottom:1px solid var(--edge)}
.form-card .field span {color:#3e483b}
.form-card input,.form-card select {
  background-color:#faf4e8; border-width:0 0 1px; border-radius:0
}
.form-card textarea {background:url(grain.svg),#fffaf0; border-color:#d2c3aa}
.form-card textarea {min-height:108px; line-height:1.75}
.delivery-options {border-top:1px solid var(--edge); padding-top:13px}
.delivery-options > .button {justify-self:start}
.edition--gift {border-left:3px solid #96714c}

/* The Gift Edition reception uses the page itself as the backdrop. */
.gift-reception {
  position:relative; isolation:isolate; min-height:100vh; min-height:100svh;
  color:#f5e7cc; background:#111e17
}
.gift-reception::before {
  position:absolute; inset:0 0 auto; z-index:-1; width:100%; height:100vh; height:100svh; content:"";
  background:linear-gradient(0deg,#111e17,transparent 28%),url(gift-velvet.jpg) 48% 58% / cover no-repeat;
  pointer-events:none
}
.gift-reception .site-header {justify-content:flex-end; border-bottom:0; padding-block:12px; min-height:54px}
.gift-reception .site-header .brand,.gift-reception footer > p:first-child {display:none}
.gift-reception .receiver {padding-top:4px; padding-bottom:40px}
.gift-reception .quiet,.gift-reception .language {color:#eee1c7}
.gift-reception footer {color:#dac8a8; border-top-color:#c7b78333; justify-content:center}
.gift-reception .test-label {
  display:table; margin:3px auto 5px; padding:5px 10px;
  background:#2f2c1e; color:#f9dfb4; border-color:#a987576e; font-size:.8rem
}
.scene--gift {
  --stage-height:clamp(400px,63svh,510px);
  --paper-base:#7e383b;
  --paper-lit:#ac6460;
  --paper-edge:#421e28;
  --foil:#f1c88d;
  --note-surface:#fbefda;
  background:#18271d url(gift-velvet.jpg) 50% 63% / cover no-repeat;
  border:1px solid #3d3428;
  border-radius:5px;
  box-shadow:0 13px 28px #372d2425;
  overflow:hidden;
  overflow:clip
}
.scene--christmas {
  --paper-base:#385e4d;
  --paper-lit:#66866c;
  --paper-edge:#172d25;
  --note-surface:#f2efdf
}
.gift-reception .scene--gift {
  --stage-height:clamp(390px,calc(100svh - 197px),615px);
  background:transparent; border:0; box-shadow:none
}
.gift-reception .scene--gift > .stage::before {display:none}
.gift-reception .scene-light {mask-image:radial-gradient(ellipse 49% 46% at center,#000 33%,transparent 99%)}
.gift-reception .scene--gift .scene-reading {padding-inline:clamp(3px,3.2vw,30px)}
.scene--gift .stage {
  z-index:0; min-height:390px; min-height:var(--stage-height); height:var(--stage-height); aspect-ratio:auto;
  border:0; border-radius:0; padding:54px 13px 50px; background:transparent;
  overflow:hidden
}
.scene--gift .stage::before {z-index:1; inset:12px; border-color:#e3be7853}
.scene--gift .stage::after {display:none}
.gift-address {
  position:absolute; inset:clamp(22px,6%,43px) 17px auto; display:grid; justify-items:center;
  text-align:center; color:#f3e4c9; text-shadow:0 2px 18px #100c04;
  transition:opacity .42s ease,transform .55s ease;
  pointer-events:none
}
.gift-address span {
  font-size:.74rem; letter-spacing:.18em; font-weight:650; text-transform:uppercase; color:#e3c18e
}
.gift-dedication {
  margin:5px 0 0; font:400 clamp(2.13rem,8.4vw,3.4rem)/1.06 var(--heading);
  letter-spacing:-.05em; overflow-wrap:anywhere; max-width:100%; max-height:2.14em; overflow:hidden
}
.scene--gift .stage-caption {
  bottom:29px; width:calc(100% - 48px); color:#f0d8af; font-size:.87rem;
  letter-spacing:.035em; text-shadow:0 1px 12px #000; pointer-events:none;
  transition:opacity .22s ease
}
.scene--gift .unsealed .gift-address {opacity:0; transform:translateY(-11px)}
.scene--gift .unsealed .stage-caption {opacity:0}
.scene-light {
  position:absolute; inset:-12%; z-index:-1; pointer-events:none; opacity:.7;
  background:
    radial-gradient(ellipse at 34% 53%,#e5b37630 0%,transparent 59%),
    linear-gradient(118deg,transparent 27%,#e6b87919 44%,transparent 67%);
  transform:translate3d(-3%,0,0)
}
.scene--gift .unsealed .scene-light {animation:light-passes 1.65s cubic-bezier(.2,.5,.38,1) both}
@keyframes light-passes {
  0% {opacity:.7; transform:translate3d(-12%,0,0) scale(.96)}
  53% {opacity:1; transform:translate3d(9%,0,0) scale(1.1)}
  100% {opacity:.4; transform:translate3d(15%,0,0) scale(1.17)}
}

.stage--gift .envelope {
  width:min(96%,440px); aspect-ratio:1.56; margin-top:37px; perspective:680px;
  filter:none; transform:rotate(-7deg);
  transition:transform .87s cubic-bezier(.2,.72,.34,1)
}
.stage--gift.is-holding .envelope {transform:rotate(-5deg) scale(1.035)}
.stage--gift .envelope::before {
  background:url(grain.svg),linear-gradient(120deg,var(--paper-lit),var(--paper-base) 38%,var(--paper-edge));
  border:1px solid color-mix(in srgb,var(--paper-edge) 58%,var(--foil)); border-radius:5px;
  box-shadow:0 1px 2px #100d0cdd, 1px 17px 19px #100c0bcc, 8px 42px 38px -6px #0a0a07b8, 15px 58px 47px -18px #0a100dba
}
.stage--gift .fold {
  background:url(grain.svg), linear-gradient(138deg,var(--paper-lit),var(--paper-base) 29%,var(--paper-edge) 72%);
  border:1px solid var(--paper-edge); border-radius:5px
}
.stage--gift .fold::after {
  background:url(grain.svg),linear-gradient(172deg,var(--paper-edge) 9%,var(--paper-base) 44%,var(--paper-lit) 61%,var(--paper-base) 75%,var(--paper-edge) 102%);
  clip-path:polygon(0 100%,49% 38%,51% 38%,100% 100%)
}
.stage--gift .fold::before {
  content:""; position:absolute; z-index:1; inset:auto 10px 8px; height:12%; border-bottom:1px solid #e2bd8b59; border-radius:0 0 3px 3px
}
.stage--gift .lid {
  height:65%; border-radius:5px 5px 0 0;
  background:url(grain.svg),linear-gradient(145deg,#f0cda030,transparent 54%),linear-gradient(158deg,var(--paper-lit),var(--paper-base) 62%,var(--paper-edge));
  clip-path:polygon(0 0,100% 0,100% 5%,55% 92%,50% 98%,45% 92%,0 5%);
  transition:transform .76s cubic-bezier(.28,.12,.2,1),opacity .42s ease
}
.stage--gift .lid::after {
  content:""; position:absolute; inset:6px 2px 2px;
  background:linear-gradient(116deg,#f5cb93a6,#f2c68844 42%,#e0ad6b63);
  clip-path:polygon(1% 2%,50% 92%,99% 2%,50% 94%)
}
.stage--gift .peek {
  left:8%; right:8%; bottom:10%; height:85%; padding-top:16px;
  background:url(grain.svg),linear-gradient(153deg,#fff8e7,var(--note-surface) 45%,#ddc7a1);
  border:1px solid #f4e4c6; border-radius:3px; box-shadow:0 5px 13px #18120c68, inset 0 0 0 4px #fff7e8a0;
  color:#8d6a39; font-size:1.5rem;
  transform:translate3d(0,8%,0); transition:none
}
.stage--gift .seal {
  top:62%; width:clamp(72px,24%,104px);
  transition:scale .3s ease-out
}
.stage--gift.is-holding .seal {scale:.92}
.stage--gift .seal img {filter:drop-shadow(1px 4px 3px #351019bc) drop-shadow(0 1px 1px #c36a5b45)}
.stage--gift .ring {stroke:#ffdd9b; stroke-width:1.5}
.wax-fracture {position:absolute; inset:0; width:100%; height:100%; opacity:0; fill:none; stroke:#fbd2a0; stroke-width:1.3; stroke-linecap:round; stroke-linejoin:round; pointer-events:none}
.stage--gift.unsealed .seal {
  animation:wax-releases .73s cubic-bezier(.25,.64,.29,1) both; scale:1
}
.stage--gift.unsealed .wax-fracture {animation:wax-crack .52s ease-out both}
.stage--gift.unsealed .lid {transform:rotateX(170deg); transition-delay:.22s; z-index:0}
.stage--gift.unsealed .envelope::before,
.stage--gift.unsealed .fold,
.stage--gift.unsealed .lid {animation:envelope-recedes .39s 1.03s ease-in both}
@keyframes envelope-recedes {from {opacity:1} to {opacity:.07}}
.stage--gift.unsealed .envelope {transform:translate3d(0,13%,0) rotate(-1deg) scale(1.045)}
.stage--gift.unsealed .peek {animation:paper-rises 1.11s .29s cubic-bezier(.28,.74,.33,1) both}
@keyframes wax-releases {
  0% {opacity:1; transform:translate(-50%,-50%) scale(.94)}
  25% {opacity:1; transform:translate(-50%,-50%) scale(1.08) rotate(-3deg)}
  44% {opacity:.9; transform:translate(-39%,-43%) scale(1.04) rotate(5deg)}
  100% {opacity:0; transform:translate(-20%,-25%) scale(.82) rotate(16deg)}
}
@keyframes wax-crack {0%,14% {opacity:0} 37% {opacity:.92} 90%,100% {opacity:0}}
@keyframes paper-rises {
  0%,16% {transform:translate3d(0,8%,0)}
  59% {transform:translate3d(0,-30%,0) rotate(1deg)}
  100% {transform:translate3d(0,-78%,0) rotate(1deg)}
}
.scene--gift .scene-reading {padding:clamp(14px,4vw,28px); min-height:var(--stage-height)}
.scene--gift.is-reading .scene-reading {animation:gift-paper-arrives .62s cubic-bezier(.24,.65,.22,1) both}
.scene--gift.is-reading > .stage {transition-duration:.38s,0s; transition-delay:0s,.38s}
.scene--gift.is-reading .letter > * {animation:ink-emerges .48s .18s ease both}
@keyframes ink-emerges {from {opacity:0} to {opacity:1}}
.scene--gift.scene--stationery .scene-reading {min-height:0}
@keyframes gift-paper-arrives {
  from {opacity:0; transform:translate3d(0,51px,0) scale(.92) rotate(-1deg)}
  to {opacity:1; transform:translate3d(0,0,0) scale(1) rotate(0)}
}
.scene--gift .actions {padding:0 1px 2px}
.scene--gift .actions .secondary {color:#fff3de; border-color:#d9b8879c}
.scene--gift .status {color:#fff0d4}

.letter.premium {
  border:1px solid #9d7f51;
  border-radius:2px;
  padding:clamp(31px,7vw,56px);
  color:#302d24;
  background:url(grain.svg),radial-gradient(ellipse at 16% 3%,#fffaf0 0%,transparent 57%),linear-gradient(118deg,#e5cfab,var(--note-surface,#fbefda) 44%,#f8edd6 71%,#e8d4ae);
  box-shadow:0 2px 3px #19130c55,0 10px 20px #0b110d7a,0 22px 33px #0a100c5c;
  overflow:clip
}
.letter.premium::before {
  content:""; position:absolute; inset:14px clamp(22px,7vw,44px) auto; height:1px;
  background:linear-gradient(90deg,#9d785134,#a48754,#9d785118); pointer-events:none
}
.letter.premium.christmas {
  background:url(grain.svg),radial-gradient(ellipse at top left,#fcf9ee,transparent 64%),linear-gradient(116deg,#cecfb7,#f4f0df 36%,#f4efdf 71%,#d9d6ba)
}
.letter.premium.christmas h2 {color:#325543}
.letter.premium .letter-theme {color:#775739; margin-bottom:17px; letter-spacing:.125em; font-size:.7rem}
.letter.premium h2 {font-size:clamp(2.25rem,8.25vw,3.2rem); margin-bottom:21px; letter-spacing:-.038em; font-weight:500}
.letter.premium p {font-size:clamp(1.15rem,3vw,1.3rem); line-height:1.67}
.letter.premium .sign {text-align:right; color:#6e4637; font-style:italic; margin-top:1.45rem}
.letter.premium.christmas .sign {color:#345844}

@media(prefers-reduced-motion:reduce) {
  *,*::before,*::after {animation-duration:.001ms!important; transition-duration:.001ms!important; transition-delay:0ms!important; animation-delay:0ms!important}
}

