/* =========================================================
   余杭清廉家书 H5
   视觉：宣纸 × 松墨绿 × 朱砂印
   ========================================================= */

:root {
  --ink: #173b32;
  --ink-deep: #0c2a23;
  --ink-soft: #3e6154;
  --ink-faint: rgba(23, 59, 50, .55);
  --paper: #f4ede0;
  --paper-light: #fbf7ee;
  --paper-deep: #e8decc;
  --seal: #a33b30;
  --seal-deep: #84291f;
  --gold: #b08a56;
  --gold-light: #d4b984;
  --line: rgba(23, 59, 50, .16);
  --line-gold: rgba(176, 138, 86, .38);
  --serif: "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", "STZhongsong", "SimSun", serif;
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --script: "STXingkai", "华文行楷", "FZ Xingkai", "方正行楷简体", "Kaiti SC", "STKaiti", "KaiTi", "楷体", serif;
  --ease: cubic-bezier(.22, .75, .26, 1);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body.is-locked {
  height: 100%;
  overflow: hidden;
  touch-action: none;
}

body.modal-open {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  overflow: hidden;
  touch-action: none;
}

main {
  overflow: clip;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid var(--seal);
  outline-offset: 3px;
}

a {
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

img,
svg {
  display: block;
  max-width: 100%;
}

.name-script {
  font-family: var(--script);
  font-weight: 400;
  font-synthesis: none;
}

p,
h1,
h2,
h3,
blockquote {
  margin: 0;
}

em {
  font-style: normal;
}

::selection {
  background: rgba(163, 59, 48, .2);
  color: var(--ink-deep);
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- 纸纹与阅读进度 ---------- */

.paper-grain {
  position: fixed;
  inset: 0;
  z-index: 9000;
  pointer-events: none;
  opacity: .042;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.9'/%3E%3C/svg%3E");
}

.reading-progress {
  position: fixed;
  inset: 0 0 auto;
  z-index: 1100;
  height: 2px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .4s ease;
}

body.is-open .reading-progress {
  opacity: 1;
}

.reading-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--seal));
  transition: width .12s linear;
}

/* ---------- 顶部栏 ---------- */

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 800;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: calc(10px + var(--safe-top)) 18px 10px;
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
  transition: opacity .5s var(--ease), transform .5s var(--ease), background .3s ease, box-shadow .3s ease;
}

body.is-open .topbar {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.topbar.is-scrolled {
  background: rgba(247, 241, 230, .88);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  backdrop-filter: blur(14px) saturate(1.1);
  box-shadow: 0 1px 0 rgba(23, 59, 50, .08);
}

.topbar__brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.mini-seal {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border: 1px solid var(--seal);
  border-radius: 2px;
  color: var(--seal);
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1;
  background:
    linear-gradient(135deg, rgba(163, 59, 48, .07), transparent 55%),
    rgba(251, 247, 238, .7);
}

.mini-seal--small {
  width: 22px;
  height: 22px;
  font-size: 12px;
}

.topbar__name {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .14em;
  white-space: nowrap;
}

.topbar__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid rgba(23, 59, 50, .17);
  border-radius: 50%;
  background: rgba(251, 247, 238, .55);
  color: var(--ink);
  transition: background .2s ease, transform .2s ease, border-color .2s ease;
}

.icon-btn:active {
  transform: scale(.94);
  background: rgba(23, 59, 50, .08);
}

.icon-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-btn--share {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper-light);
}

.icon-btn.is-speaking {
  border-color: rgba(163, 59, 48, .34);
  color: var(--seal);
  background: rgba(163, 59, 48, .06);
}

.icon-btn.is-speaking svg {
  animation: speakPulse 1.4s ease-in-out infinite;
}

#letter {
  scroll-margin-top: 72px;
}

#sign {
  scroll-margin-top: 72px;
}

/* ---------- 启封封面 ---------- */

.cover {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 72% 19%, rgba(184, 159, 103, .18), transparent 42%),
    radial-gradient(ellipse at 12% 82%, rgba(73, 113, 95, .24), transparent 48%),
    linear-gradient(155deg, #173f34 0%, #10332a 46%, #0a251f 100%);
  color: #f4ecdc;
  opacity: 1;
  visibility: visible;
  transition: opacity .9s var(--ease), visibility 0s linear .9s, transform 1.1s var(--ease);
}

.cover.is-open {
  opacity: 0;
  visibility: hidden;
  transform: scale(1.035);
  pointer-events: none;
}

.cover.is-gone {
  display: none;
}

.cover__wash {
  position: absolute;
  inset: -15%;
  z-index: 0;
  opacity: .7;
  background:
    radial-gradient(ellipse at 47% 32%, rgba(232, 219, 188, .075), transparent 36%),
    radial-gradient(ellipse at 90% 65%, rgba(18, 68, 56, .5), transparent 45%);
  filter: blur(6px);
}

.cover__sun {
  position: absolute;
  z-index: 0;
  top: 15%;
  right: 12%;
  width: clamp(120px, 28vw, 260px);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 42% 38%, rgba(240, 225, 188, .22), rgba(202, 176, 121, .08) 52%, transparent 70%);
  border: 1px solid rgba(220, 199, 154, .2);
  box-shadow: 0 0 80px rgba(213, 188, 136, .08);
}

.cover__sun::before,
.cover__sun::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(220, 199, 154, .09);
}

.cover__sun::before {
  inset: 18%;
}

.cover__sun::after {
  inset: -13%;
}

.cover__landscape {
  position: absolute;
  z-index: 1;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 72%;
  opacity: .96;
}

.cover__dust {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: .75;
}

.cover__frame {
  position: absolute;
  z-index: 4;
  inset: max(10px, env(safe-area-inset-top)) 10px max(10px, env(safe-area-inset-bottom));
  border: 1px solid rgba(217, 195, 148, .2);
  pointer-events: none;
}

.cover__frame::before,
.cover__frame::after {
  content: "";
  position: absolute;
  width: 34px;
  height: 34px;
  border-color: rgba(217, 195, 148, .48);
  border-style: solid;
}

.cover__frame::before {
  top: 9px;
  left: 9px;
  border-width: 1px 0 0 1px;
}

.cover__frame::after {
  right: 9px;
  bottom: 9px;
  border-width: 0 1px 1px 0;
}

.cover__inner {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 1180px;
  min-height: 100%;
  margin: 0 auto;
  padding: calc(22px + var(--safe-top)) 24px calc(18px + var(--safe-bottom));
}

.cover__top {
  display: flex;
  justify-content: center;
  flex: 0 0 auto;
}

.cover__brand {
  display: flex;
  align-items: center;
  gap: 14px;
  color: rgba(242, 233, 214, .72);
  font-size: 10px;
  letter-spacing: .32em;
  white-space: nowrap;
}

.cover__brand-seal {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(198, 111, 91, .8);
  color: #d99a86;
  font-family: var(--serif);
  font-size: 10px;
  line-height: 1.25;
  letter-spacing: .08em;
  text-align: center;
  border-radius: 2px;
  transform: rotate(-2deg);
}

.cover__brand-line {
  width: 38px;
  height: 1px;
  background: rgba(219, 197, 151, .36);
}

.cover__copy {
  flex: 0 0 auto;
  margin-top: clamp(27px, 6.5vh, 74px);
  text-align: center;
  opacity: 0;
  transform: translateY(18px);
  animation: coverCopyIn 1.2s var(--ease) .25s forwards;
}

.cover__eyebrow {
  margin-bottom: 16px;
  color: rgba(229, 216, 191, .62);
  font-size: 10px;
  letter-spacing: .28em;
}

.cover__title {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.04;
  text-shadow: 0 8px 36px rgba(0, 0, 0, .2);
}

.cover__title > span:first-child {
  display: block;
  font-size: clamp(54px, 15.6vw, 92px);
  letter-spacing: .08em;
  background: linear-gradient(180deg, #fbf4e4, #dfcfad 80%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.cover__title-sub {
  display: block;
  margin-top: 10px;
  color: rgba(237, 224, 196, .88);
  font-size: clamp(18px, 5.4vw, 28px);
  letter-spacing: .36em;
  text-indent: .36em;
}

.cover__verse {
  margin-top: 20px;
  color: rgba(224, 211, 183, .56);
  font-family: var(--serif);
  font-size: 12px;
  line-height: 2;
  letter-spacing: .18em;
}

.cover__envelope-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 0 0 auto;
  margin-top: clamp(24px, 5.2vh, 55px);
  opacity: 0;
  transform: translateY(22px);
  animation: coverEnvelopeIn 1.1s var(--ease) .65s forwards;
}

.envelope {
  position: relative;
  display: block;
  width: min(77vw, 360px);
  aspect-ratio: 1.55;
  padding: 0;
  border: 0;
  background: transparent;
  perspective: 900px;
  color: var(--ink);
  filter: drop-shadow(0 25px 30px rgba(0, 0, 0, .22));
}

.envelope__shadow {
  position: absolute;
  left: 9%;
  right: 9%;
  bottom: -16px;
  height: 24px;
  border-radius: 50%;
  background: rgba(0, 0, 0, .35);
  filter: blur(14px);
  pointer-events: none;
}

.envelope__body {
  position: absolute;
  z-index: 2;
  inset: 0;
  overflow: hidden;
  border: 1px solid rgba(153, 124, 82, .38);
  border-radius: 3px;
  background:
    linear-gradient(to bottom right, transparent 49.5%, rgba(142, 114, 74, .16) 49.8%, rgba(142, 114, 74, .16) 50.2%, transparent 50.5%) left bottom / 50.1% 100% no-repeat,
    linear-gradient(to bottom left, transparent 49.5%, rgba(142, 114, 74, .16) 49.8%, rgba(142, 114, 74, .16) 50.2%, transparent 50.5%) right bottom / 50.1% 100% no-repeat,
    linear-gradient(145deg, #f7f0e2, #e7dcc7);
  box-shadow: inset 0 0 0 1px rgba(255, 252, 242, .5);
}

.envelope__body::after {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(176, 138, 86, .18);
  pointer-events: none;
}

.envelope__letter {
  position: absolute;
  z-index: 1;
  top: 7%;
  left: 6.5%;
  right: 6.5%;
  height: 79%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 15px;
  border: 1px solid rgba(176, 138, 86, .3);
  border-radius: 2px;
  background:
    linear-gradient(rgba(176, 138, 86, .08) 1px, transparent 1px) 0 38px / 100% 29px no-repeat,
    #fcf8ee;
  box-shadow: 0 2px 12px rgba(91, 66, 28, .1);
  opacity: .9;
  transform: translateY(10%) scale(.985);
  transition: transform .85s var(--ease), opacity .5s ease;
}

.envelope__letter-title {
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(16px, 4.4vw, 20px);
  letter-spacing: .16em;
}

.envelope__letter-line {
  width: 44px;
  height: 1px;
  margin: 10px 0;
  background: var(--gold);
  opacity: .65;
}

.envelope__letter-sub {
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 9px;
  letter-spacing: .16em;
}

.envelope__flap {
  position: absolute;
  z-index: 3;
  top: 0;
  left: 0;
  width: 100%;
  height: 57%;
  border: 1px solid rgba(153, 124, 82, .29);
  border-bottom: 0;
  background:
    linear-gradient(158deg, rgba(255, 255, 255, .35), transparent 55%),
    linear-gradient(160deg, #f8f1e3, #eadfca);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform-origin: top center;
  backface-visibility: hidden;
  transition: transform .75s cubic-bezier(.45, 0, .3, 1);
}

.envelope__to {
  position: absolute;
  z-index: 4;
  left: 18px;
  bottom: 17px;
  color: rgba(46, 82, 69, .7);
  font-family: var(--serif);
  font-size: 9px;
  letter-spacing: .15em;
}

.envelope__wax {
  position: absolute;
  z-index: 5;
  left: 50%;
  top: 51%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border: 1px solid rgba(255, 226, 201, .32);
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 27%, rgba(255, 200, 169, .38), transparent 30%),
    radial-gradient(circle at 48% 51%, #b54b3b, #932f25 62%, #74211b);
  color: #ffe9d8;
  box-shadow:
    0 7px 16px rgba(62, 16, 12, .35),
    inset 0 0 0 4px rgba(111, 31, 25, .18),
    inset 0 0 0 6px rgba(255, 209, 177, .08);
  transform: translate(-50%, -50%) rotate(-4deg);
  transition: transform .45s ease, opacity .4s ease;
  animation: waxPulse 3s ease-in-out infinite;
}

.envelope__wax::before {
  content: "";
  position: absolute;
  inset: -5px;
  border: 1px solid rgba(183, 101, 76, .34);
  border-radius: 47% 53% 49% 51%;
  transform: rotate(13deg);
}

.envelope__wax b {
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 500;
  line-height: 1;
}

.envelope__wax small {
  margin-top: 3px;
  font-family: var(--serif);
  font-size: 6px;
  letter-spacing: .22em;
  text-indent: .22em;
  opacity: .8;
}

.envelope.is-opening .envelope__flap {
  transform: rotateX(180deg);
  z-index: 0;
}

.envelope.is-opening .envelope__letter {
  opacity: 1;
  transform: translateY(-32%) scale(1);
  z-index: 6;
}

.envelope.is-opening .envelope__wax {
  opacity: 0;
  transform: translate(-50%, -50%) scale(.72) rotate(8deg);
  animation: none;
}

.cover__hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 25px;
  color: rgba(231, 218, 192, .72);
  font-family: var(--serif);
  font-size: 11px;
  letter-spacing: .2em;
  animation: hintBreathe 2.8s ease-in-out infinite;
}

.cover__hint i {
  display: block;
  width: 28px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(210, 185, 132, .55));
}

.cover__hint i:last-child {
  background: linear-gradient(90deg, rgba(210, 185, 132, .55), transparent);
}

.cover__skip {
  margin-top: 10px;
  padding: 6px 10px;
  border: 0;
  background: transparent;
  color: rgba(224, 212, 186, .4);
  font-size: 10px;
  letter-spacing: .08em;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.cover__bottom {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex: 0 0 auto;
  margin-top: auto;
  padding-top: 12px;
  color: rgba(226, 216, 195, .44);
  font-size: 9px;
  letter-spacing: .18em;
}

.cover__bottom i {
  width: 1px;
  height: 10px;
  background: rgba(220, 200, 158, .26);
}

.cover.is-open .cover__copy,
.cover.is-open .cover__envelope-area {
  animation: none;
}

/* ---------- 首屏 ---------- */

.hero {
  position: relative;
  display: flex;
  min-height: 100vh;
  min-height: 100svh;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: calc(94px + var(--safe-top)) 24px 74px;
  background:
    radial-gradient(ellipse at 76% 22%, rgba(205, 184, 140, .24), transparent 33%),
    radial-gradient(ellipse at 18% 84%, rgba(91, 123, 100, .12), transparent 42%),
    linear-gradient(180deg, #f7f1e5 0%, #f3ebdd 68%, #efe6d6 100%);
}

.hero__scene {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero__sun {
  position: absolute;
  top: 16%;
  right: 10%;
  width: clamp(140px, 37vw, 300px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 46% 42%, rgba(198, 158, 94, .34), rgba(198, 158, 94, .05) 58%, transparent 68%);
  box-shadow: 0 0 90px rgba(188, 147, 88, .1);
}

.hero__ring {
  position: absolute;
  top: 16%;
  right: 10%;
  width: clamp(140px, 37vw, 300px);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid rgba(150, 125, 84, .14);
}

.hero__ring--one {
  transform: scale(1.16);
}

.hero__ring--two {
  transform: scale(1.36);
  opacity: .55;
}

.hero__mountains {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 55%;
  min-height: 320px;
  opacity: .82;
}

.hero__content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 720px;
  text-align: center;
}

.hero__kicker {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: var(--ink-soft);
  font-size: 10px;
  letter-spacing: .32em;
  text-indent: .32em;
}

.hero__kicker span {
  width: 30px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold));
}

.hero__kicker span:last-child {
  background: linear-gradient(90deg, var(--gold), transparent);
}

.hero__title {
  margin-top: clamp(18px, 3.4vh, 32px);
  font-family: var(--serif);
  font-weight: 500;
  color: var(--ink-deep);
}

.hero__title-main {
  display: block;
  font-size: clamp(58px, 17.2vw, 106px);
  line-height: 1.08;
  letter-spacing: .09em;
  text-indent: .09em;
  text-shadow: 0 2px 0 rgba(255, 255, 255, .35);
}

.hero__title-sub {
  display: block;
  margin-top: 12px;
  color: var(--ink-soft);
  font-size: clamp(17px, 5.2vw, 26px);
  letter-spacing: .4em;
  text-indent: .4em;
}

.hero__meta {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-top: clamp(28px, 6vh, 52px);
  padding: 10px 16px 10px 10px;
  border: 1px solid rgba(176, 138, 86, .28);
  border-radius: 2px;
  background: rgba(251, 247, 238, .48);
  text-align: left;
}

.hero__seal {
  display: grid;
  place-items: center;
  width: 33px;
  height: 43px;
  border: 1px solid var(--seal);
  color: var(--seal);
  font-family: var(--serif);
  font-size: 12px;
  line-height: 1.15;
  letter-spacing: .08em;
  text-align: center;
  transform: rotate(-2deg);
}

.hero__meta-text p {
  font-family: var(--serif);
  font-size: 12px;
  letter-spacing: .1em;
}

.hero__meta-text span {
  display: block;
  margin-top: 6px;
  color: var(--ink-faint);
  font-size: 9px;
  letter-spacing: .11em;
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: calc(23px + var(--safe-bottom));
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  color: var(--ink-faint);
  font-size: 9px;
  letter-spacing: .26em;
  transform: translateX(-50%);
}

.scroll-cue i {
  position: relative;
  display: block;
  width: 1px;
  height: 32px;
  overflow: hidden;
  background: rgba(23, 59, 50, .13);
}

.scroll-cue i::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--ink-soft);
  transform: translateY(-100%);
  animation: scrollLine 2.4s ease-in-out infinite;
}

/* ---------- 家书 ---------- */

.letter-stage {
  position: relative;
  padding: 8px 18px 88px;
  background:
    radial-gradient(ellipse at 0 40%, rgba(176, 138, 86, .08), transparent 35%),
    linear-gradient(180deg, #efe6d6, #f5eee2 40%, #f3ebdd);
}

.letter-stage__vertical {
  position: absolute;
  top: 96px;
  left: max(28px, calc(50% - 410px));
  display: none;
  writing-mode: vertical-rl;
  color: rgba(23, 59, 50, .32);
  font-family: var(--serif);
  font-size: 10px;
  letter-spacing: .42em;
}

.letter {
  position: relative;
  max-width: 680px;
  margin: 0 auto;
  padding: 44px 23px 34px;
  border: 1px solid rgba(176, 138, 86, .32);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .24), transparent 45%),
    rgba(252, 248, 239, .78);
  box-shadow:
    0 22px 60px rgba(82, 61, 31, .07),
    inset 0 0 0 1px rgba(255, 255, 255, .38);
}

.letter::before {
  content: "";
  position: absolute;
  inset: 9px;
  border: 1px solid rgba(176, 138, 86, .11);
  pointer-events: none;
}

.letter__corner {
  position: absolute;
  z-index: 2;
  width: 28px;
  height: 28px;
  border-color: rgba(163, 59, 48, .52);
  border-style: solid;
  pointer-events: none;
}

.letter__corner--tl {
  top: 16px;
  left: 16px;
  border-width: 1px 0 0 1px;
}

.letter__corner--br {
  right: 16px;
  bottom: 16px;
  border-width: 0 1px 1px 0;
}

.letter__head {
  position: relative;
  text-align: center;
}

.letter__eyebrow {
  color: var(--gold);
  font-size: 9px;
  letter-spacing: .3em;
  text-indent: .3em;
}

.letter__title {
  margin-top: 13px;
  font-family: var(--serif);
  font-size: clamp(36px, 10vw, 48px);
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: .16em;
  text-indent: .16em;
  color: var(--ink-deep);
}

.letter__title span {
  position: relative;
}

.letter__title span::after {
  content: "";
  position: absolute;
  left: 2%;
  right: 2%;
  bottom: 4px;
  height: 7px;
  background: linear-gradient(90deg, transparent, rgba(163, 59, 48, .14), transparent);
  z-index: -1;
}

.letter__to {
  margin-top: 18px;
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: .14em;
}

.letter__issuer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 12px;
}

.letter__issuer span {
  width: 25px;
  height: 1px;
  background: rgba(176, 138, 86, .35);
}

.letter__issuer p {
  color: var(--ink-faint);
  font-size: 9px;
  line-height: 1.8;
  letter-spacing: .12em;
}

.letter__rule {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 28px auto 25px;
  max-width: 300px;
}

.letter__rule i {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(176, 138, 86, .35));
}

.letter__rule i:last-child {
  background: linear-gradient(90deg, rgba(176, 138, 86, .35), transparent);
}

.letter__rule b {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid rgba(163, 59, 48, .5);
  border-radius: 50%;
  color: var(--seal);
  font-family: var(--serif);
  font-size: 11px;
  font-weight: 400;
}

.letter__body {
  position: relative;
  z-index: 1;
}

.letter__lead {
  color: #294b40;
  font-family: var(--serif);
  font-size: 16px;
  line-height: 2.05;
  letter-spacing: .035em;
  text-align: justify;
  text-justify: inter-ideograph;
}

.dropcap {
  float: left;
  margin: 4px 7px 0 0;
  color: var(--seal);
  font-family: var(--serif);
  font-size: 56px;
  line-height: .84;
  font-weight: 500;
}

.letter__lead em {
  color: var(--ink-deep);
  border-bottom: 1px solid rgba(163, 59, 48, .34);
  padding-bottom: 1px;
}

.letter__mark {
  display: flex;
  justify-content: flex-end;
  gap: 5px;
  margin-top: 32px;
}

.letter__mark span {
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  border: 1px solid rgba(163, 59, 48, .38);
  color: rgba(163, 59, 48, .74);
  font-family: var(--serif);
  font-size: 11px;
  transform: rotate(-1.5deg);
}

.letter__mark span:nth-child(2) {
  transform: rotate(1deg);
}

.letter__mark span:nth-child(3) {
  transform: rotate(-.5deg);
}

/* ---------- 三廉之约 ---------- */

.principles {
  position: relative;
  overflow: hidden;
  padding: 82px 18px 92px;
  background:
    radial-gradient(ellipse at 92% 0, rgba(193, 162, 107, .14), transparent 36%),
    radial-gradient(ellipse at 3% 78%, rgba(163, 59, 48, .1), transparent 34%),
    linear-gradient(178deg, #173d32 0%, #10332a 55%, #153a30 100%);
  color: #f3ebdc;
}

.principles__wash {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .45;
  background:
    radial-gradient(ellipse at 50% 10%, rgba(224, 208, 174, .08), transparent 48%),
    repeating-linear-gradient(115deg, transparent 0 83px, rgba(231, 218, 190, .018) 83px 84px);
}

.principles::before {
  content: "家风";
  position: absolute;
  top: 34px;
  right: -32px;
  color: rgba(236, 222, 193, .035);
  font-family: var(--serif);
  font-size: 168px;
  line-height: 1;
  writing-mode: vertical-rl;
  pointer-events: none;
}

.section-head {
  position: relative;
  z-index: 2;
  max-width: 640px;
  margin: 0 auto 34px;
}

.section-head--light {
  color: #f3ebdc;
  text-align: center;
}

.section-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--gold);
  font-size: 9px;
  letter-spacing: .28em;
  text-indent: .1em;
}

.section-eyebrow span {
  width: 20px;
  height: 1px;
  background: currentColor;
  opacity: .5;
}

.section-head--light .section-eyebrow {
  justify-content: center;
  color: rgba(212, 185, 132, .8);
}

.section-head--center .section-eyebrow {
  justify-content: center;
}

.section-head h2 {
  margin-top: 13px;
  font-family: var(--serif);
  font-size: clamp(31px, 8.3vw, 43px);
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: .09em;
}

.section-head--light h2 {
  color: #f8f0e0;
}

.section-head__desc {
  margin-top: 13px;
  color: var(--ink-faint);
  font-family: var(--serif);
  font-size: 13px;
  line-height: 2;
  letter-spacing: .06em;
}

.section-head--light .section-head__desc {
  color: rgba(230, 218, 194, .55);
}

.lamp-counter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  padding: 7px 12px;
  border: 1px solid rgba(216, 194, 150, .17);
  border-radius: 99px;
  color: rgba(229, 217, 194, .58);
  font-size: 10px;
  letter-spacing: .14em;
  background: rgba(255, 255, 255, .025);
}

.lamp-counter__dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(221, 201, 158, .35);
  transition: background .3s ease, box-shadow .3s ease;
}

.lamp-counter.is-all .lamp-counter__dot {
  background: var(--gold-light);
  box-shadow: 0 0 10px rgba(216, 190, 137, .75);
}

.principles__list {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 20px;
  max-width: 640px;
  margin: 0 auto;
}

.principle {
  position: relative;
  overflow: hidden;
  padding: 23px 21px 20px;
  border: 1px solid rgba(187, 153, 98, .46);
  border-radius: 3px;
  color: var(--ink);
  background:
    linear-gradient(120deg, rgba(255, 255, 255, .5), transparent 38%),
    linear-gradient(145deg, #fbf6ea, #f0e7d6);
  box-shadow: 0 24px 50px rgba(0, 0, 0, .16);
  transition: box-shadow .45s ease, border-color .45s ease, transform .45s var(--ease);
}

.principle::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0;
  transition: opacity .45s ease;
}

.principle::after {
  content: "";
  position: absolute;
  inset: 9px;
  border: 1px solid rgba(176, 138, 86, .12);
  pointer-events: none;
}

.principle.is-lit {
  border-color: rgba(210, 177, 117, .76);
  box-shadow:
    0 26px 54px rgba(0, 0, 0, .2),
    0 0 0 1px rgba(220, 188, 126, .16) inset,
    0 0 32px rgba(196, 159, 96, .07);
}

.principle.is-lit::before {
  opacity: 1;
}

.principle__ghost {
  position: absolute;
  right: 5px;
  bottom: -34px;
  color: rgba(23, 59, 50, .045);
  font-family: var(--serif);
  font-size: 162px;
  line-height: 1;
  pointer-events: none;
}

.principle__icon-shape--1 {
  -webkit-mask-image: url("../assets/liangzhu-1.png");
  mask-image: url("../assets/liangzhu-1.png");
}

.principle__icon-shape--2 {
  -webkit-mask-image: url("../assets/liangzhu-2.png");
  mask-image: url("../assets/liangzhu-2.png");
}

.principle__icon-shape--3 {
  -webkit-mask-image: url("../assets/liangzhu-3.png");
  mask-image: url("../assets/liangzhu-3.png");
}

.principle__head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 34px;
}

.principle__icon {
  display: block;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  color: var(--ink-soft);
  transition: color .35s ease, transform .35s var(--ease);
}

.principle__icon-shape {
  display: block;
  width: 100%;
  height: 100%;
  background-color: currentColor;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  -webkit-mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: contain;
}

.principle.is-lit .principle__icon {
  color: var(--seal);
  transform: scale(1.04);
}

.principle__tag {
  padding: 3px 7px;
  border: 1px solid rgba(163, 59, 48, .35);
  color: rgba(163, 59, 48, .8);
  font-family: var(--serif);
  font-size: 9px;
  letter-spacing: .22em;
  text-indent: .22em;
  transform: rotate(1deg);
}

.principle__copy {
  position: relative;
  z-index: 2;
  max-width: 83%;
  margin-top: 16px;
}

.principle__copy h3 {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: .09em;
}

.principle__sub {
  margin-top: 5px;
  color: var(--gold);
  font-family: var(--serif);
  font-size: 12px;
  letter-spacing: .16em;
}

.principle__text {
  margin-top: 13px;
  color: #335548;
  font-family: var(--serif);
  font-size: 14px;
  line-height: 1.95;
  letter-spacing: .025em;
  text-align: justify;
  text-justify: inter-ideograph;
}

.principle__art {
  position: absolute;
  z-index: 1;
  top: 64px;
  right: 13px;
  width: 31%;
  max-width: 128px;
  color: var(--ink-soft);
  opacity: .18;
  pointer-events: none;
}

.principle__art svg {
  width: 100%;
  height: auto;
}

.lamp-btn {
  position: relative;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 19px;
  padding: 5px 12px 5px 5px;
  border: 1px solid rgba(23, 59, 50, .16);
  border-radius: 99px;
  background: rgba(255, 252, 245, .45);
  color: var(--ink-soft);
  transition: background .3s ease, border-color .3s ease, color .3s ease;
}

.lamp-btn__stamp {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border: 1px solid rgba(163, 59, 48, .44);
  border-radius: 50%;
  color: var(--seal);
  font-family: var(--serif);
  font-size: 12px;
  transition: background .35s ease, color .35s ease, box-shadow .35s ease, transform .35s var(--ease);
}

.lamp-btn__label {
  font-size: 10px;
  letter-spacing: .1em;
}

.lamp-btn:active .lamp-btn__stamp {
  transform: scale(.9);
}

.lamp-btn.is-lit {
  border-color: rgba(163, 59, 48, .22);
  background: rgba(163, 59, 48, .055);
  color: var(--seal);
}

.lamp-btn.is-lit .lamp-btn__stamp {
  background: var(--seal);
  border-color: var(--seal);
  color: #fff6ea;
  box-shadow: 0 0 0 4px rgba(163, 59, 48, .08), 0 3px 12px rgba(163, 59, 48, .18);
}

/* ---------- 结语 ---------- */

.closing {
  position: relative;
  overflow: hidden;
  padding: 92px 24px 78px;
  background:
    radial-gradient(ellipse at 50% 18%, rgba(199, 171, 118, .16), transparent 36%),
    linear-gradient(180deg, #f3ebdd, #f8f2e7);
  text-align: center;
}

.closing__sun {
  position: absolute;
  top: 24px;
  left: 50%;
  width: clamp(260px, 78vw, 500px);
  aspect-ratio: 1;
  border: 1px solid rgba(176, 138, 86, .1);
  border-radius: 50%;
  transform: translateX(-50%);
  pointer-events: none;
}

.closing__sun::before,
.closing__sun::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(176, 138, 86, .08);
}

.closing__sun::before {
  inset: 14%;
}

.closing__sun::after {
  inset: 28%;
}

.closing__inner {
  position: relative;
  z-index: 1;
  max-width: 660px;
  margin: 0 auto;
}

.section-eyebrow--center {
  justify-content: center;
}

.closing__quote {
  position: relative;
  margin-top: 23px;
  color: var(--ink-deep);
  font-family: var(--serif);
  font-size: clamp(40px, 11vw, 58px);
  font-weight: 500;
  line-height: 1.55;
  letter-spacing: .1em;
}

.closing__quote span {
  color: var(--seal);
}

.closing__text {
  margin-top: 30px;
  color: #335548;
  font-family: var(--serif);
  font-size: 15px;
  line-height: 2.15;
  letter-spacing: .04em;
  text-align: justify;
  text-justify: inter-ideograph;
}

.closing__sign {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 11px;
  margin-top: 34px;
  color: var(--ink-faint);
  font-family: var(--serif);
  font-size: 11px;
  letter-spacing: .1em;
}

.closing__sign i {
  width: 1px;
  height: 11px;
  background: rgba(23, 59, 50, .18);
}

.closing__seal {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  margin: 31px auto 0;
  border: 2px solid rgba(163, 59, 48, .68);
  color: rgba(163, 59, 48, .82);
  font-family: var(--serif);
  font-size: 12px;
  line-height: 1.25;
  letter-spacing: .08em;
  transform: rotate(-5deg);
  box-shadow: inset 0 0 0 2px rgba(244, 237, 224, .8), inset 0 0 0 3px rgba(163, 59, 48, .38);
}

/* ---------- 落款 ---------- */

.sign-section {
  position: relative;
  overflow: hidden;
  padding: 18px 18px 88px;
  background:
    radial-gradient(ellipse at 0 20%, rgba(163, 59, 48, .055), transparent 38%),
    radial-gradient(ellipse at 100% 82%, rgba(176, 138, 86, .12), transparent 38%),
    linear-gradient(180deg, #f7f1e6, #f1e7d7);
}

.section-head--center {
  text-align: center;
}

.promise-wrap {
  position: relative;
  z-index: 2;
  max-width: 620px;
  margin: 0 auto;
}

.lamp-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 16px;
  color: var(--ink-faint);
  font-size: 10px;
  letter-spacing: .08em;
}

.lamp-status__lights {
  display: flex;
  gap: 5px;
}

.lamp-status__lights span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(23, 59, 50, .13);
  transition: background .4s ease, box-shadow .4s ease, transform .4s var(--ease);
}

.lamp-status__lights span.is-lit {
  background: var(--seal);
  box-shadow: 0 0 8px rgba(163, 59, 48, .4);
  transform: scale(1.15);
}

.lamp-status.is-all p {
  color: var(--seal);
}

.promise-card {
  position: relative;
  padding: 26px 20px 25px;
  border: 1px solid rgba(176, 138, 86, .48);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .56), transparent 42%),
    #fcf8ef;
  box-shadow:
    0 20px 55px rgba(87, 62, 26, .09),
    inset 0 0 0 1px rgba(255, 255, 255, .55);
  transition: box-shadow .5s ease, border-color .5s ease;
}

.promise-card::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(176, 138, 86, .13);
  pointer-events: none;
}

.promise-card.is-signed {
  border-color: rgba(163, 59, 48, .36);
  box-shadow:
    0 22px 60px rgba(87, 62, 26, .1),
    0 0 0 1px rgba(176, 138, 86, .08);
}

.promise-card__corner {
  position: absolute;
  width: 24px;
  height: 24px;
  border-color: rgba(163, 59, 48, .45);
  border-style: solid;
  pointer-events: none;
}

.promise-card__corner--tl {
  top: 14px;
  left: 14px;
  border-width: 1px 0 0 1px;
}

.promise-card__corner--br {
  right: 14px;
  bottom: 14px;
  border-width: 0 1px 1px 0;
}

.promise-card__head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 13px;
  border-bottom: 1px solid rgba(176, 138, 86, .18);
}

.promise-card__label {
  color: var(--gold);
  font-size: 9px;
  letter-spacing: .16em;
}

.promise-card__serial {
  color: rgba(23, 59, 50, .38);
  font-family: var(--serif);
  font-size: 8px;
  letter-spacing: .04em;
  white-space: nowrap;
}

.promise-card__serial-prefix {
  letter-spacing: .02em;
}

.promise-card__text {
  position: relative;
  z-index: 1;
  margin-top: 24px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.92;
  letter-spacing: .035em;
  text-align: center;
}

.promise-card__text span {
  display: block;
}

.keep-together {
  white-space: nowrap;
}

.signature-row {
  position: relative;
  z-index: 1;
  margin-top: 29px;
  padding-right: 91px;
}

.signature-main {
  min-width: 0;
}

.signature-caption {
  display: block;
  color: var(--gold);
  font-size: 9px;
  letter-spacing: .18em;
}

.signature-line {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 54px;
  margin-top: 4px;
  padding-bottom: 5px;
  border-bottom: 1px solid rgba(23, 59, 50, .3);
}

.signature-line::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -3px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
  opacity: .55;
}

#signaturePlaceholder {
  color: rgba(23, 59, 50, .26);
  font-family: var(--serif);
  font-size: 21px;
  letter-spacing: .18em;
  transform: translateY(2px);
}

.signature-name {
  display: block;
  max-width: 100%;
  color: var(--ink-deep);
  font-family: var(--script);
  font-size: clamp(28px, 8.4vw, 36px);
  font-weight: 400;
  font-synthesis: none;
  line-height: 1.24;
  letter-spacing: .03em;
  white-space: normal;
  overflow-wrap: anywhere;
}

.signature-date {
  display: block;
  margin-top: 8px;
  color: var(--ink-faint);
  font-family: var(--serif);
  font-size: 10px;
  letter-spacing: .02em;
  text-align: right;
  white-space: nowrap;
}

.promise-card__stamp {
  position: absolute;
  z-index: 3;
  right: 21px;
  bottom: 22px;
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  border: 2px solid var(--seal);
  color: var(--seal);
  font-family: var(--serif);
  font-size: 11px;
  line-height: 1.18;
  letter-spacing: .04em;
  background: rgba(252, 248, 239, .42);
  box-shadow: inset 0 0 0 2px rgba(252, 248, 239, .76), inset 0 0 0 3px rgba(163, 59, 48, .32);
  opacity: 0;
  transform: scale(1.35) rotate(-7deg);
  pointer-events: none;
}

.promise-card.is-signed .promise-card__stamp {
  opacity: .9;
  transform: scale(1) rotate(-7deg);
  animation: stampDown .5s cubic-bezier(.2, .8, .28, 1.25) both;
}

.sign-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 11px;
  margin-top: 20px;
}

.signed-actions {
  display: flex;
  gap: 10px;
  margin-top: 17px;
}

.signed-actions .btn {
  flex: 1;
}

.privacy-note {
  margin-top: 13px;
  color: rgba(23, 59, 50, .37);
  font-size: 9px;
  line-height: 1.6;
  letter-spacing: .04em;
  text-align: center;
}

/* ---------- 按钮 ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  padding: 0 25px;
  border: 1px solid transparent;
  border-radius: 2px;
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: .1em;
  transition: transform .2s var(--ease), background .25s ease, color .25s ease, border-color .25s ease, box-shadow .25s ease;
}

.btn:active {
  transform: scale(.975);
}

.btn svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn--primary {
  min-width: 188px;
  background: var(--ink);
  border-color: var(--ink);
  color: #f9f3e7;
  box-shadow: 0 10px 26px rgba(23, 59, 50, .16);
}

.btn--primary:hover {
  background: #0f2f27;
}

.btn--ink {
  background: var(--ink);
  border-color: var(--ink);
  color: #f9f3e7;
}

.btn--ghost {
  background: transparent;
  border-color: rgba(23, 59, 50, .22);
  color: var(--ink);
}

.btn--paper {
  background: #f4ecdc;
  border-color: #f4ecdc;
  color: var(--ink-deep);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .16);
}

.btn--outline-light {
  border-color: rgba(239, 225, 201, .36);
  color: #f0e5d1;
  background: rgba(255, 255, 255, .015);
}

.btn--full {
  width: 100%;
}

/* ---------- 接力区与页脚 ---------- */

.outro {
  position: relative;
  overflow: hidden;
  padding: 92px 24px 66px;
  background:
    radial-gradient(ellipse at 50% 0, rgba(197, 166, 108, .15), transparent 38%),
    linear-gradient(155deg, #173d32, #0b2b23 80%);
  color: #f2e9d8;
  text-align: center;
}

.outro__glow {
  position: absolute;
  left: 50%;
  bottom: -260px;
  width: 620px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(189, 155, 97, .13), transparent 68%);
  transform: translateX(-50%);
  pointer-events: none;
}

.outro__ghost {
  position: absolute;
  top: 5%;
  left: 50%;
  color: rgba(238, 223, 192, .028);
  font-family: var(--serif);
  font-size: clamp(280px, 62vw, 500px);
  line-height: 1;
  transform: translateX(-50%);
  pointer-events: none;
}

.outro__inner {
  position: relative;
  z-index: 2;
  max-width: 570px;
  margin: 0 auto;
}

.section-eyebrow--light {
  justify-content: center;
  color: rgba(212, 185, 132, .7);
}

.outro h2 {
  margin-top: 18px;
  color: #f8f1e2;
  font-family: var(--serif);
  font-size: clamp(32px, 8.7vw, 46px);
  font-weight: 500;
  line-height: 1.48;
  letter-spacing: .08em;
}

.outro__inner > p:not(.section-eyebrow) {
  margin-top: 18px;
  color: rgba(228, 216, 192, .57);
  font-family: var(--serif);
  font-size: 13px;
  line-height: 2;
  letter-spacing: .05em;
}

.outro__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 31px;
}

.outro__actions .btn {
  min-width: 148px;
}

.outro__issuer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 40px;
  color: rgba(223, 210, 184, .35);
  font-size: 9px;
  letter-spacing: .15em;
}

.outro__issuer i {
  width: 1px;
  height: 10px;
  background: rgba(222, 199, 152, .22);
}

.footer {
  padding: 26px 20px calc(24px + var(--safe-bottom));
  background: #08221c;
  color: rgba(219, 205, 178, .36);
  text-align: center;
}

.footer__brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: rgba(226, 214, 188, .52);
  font-family: var(--serif);
  font-size: 11px;
  letter-spacing: .14em;
}

.footer p {
  margin-top: 10px;
  font-size: 8px;
  line-height: 1.8;
  letter-spacing: .08em;
}

/* ---------- 弹层 ---------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  visibility: hidden;
  pointer-events: none;
}

.modal.is-open {
  visibility: visible;
  pointer-events: auto;
}

.modal__scrim {
  position: absolute;
  inset: 0;
  background: rgba(7, 24, 20, .55);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  opacity: 0;
  transition: opacity .35s ease;
}

.modal.is-open .modal__scrim {
  opacity: 1;
}

.sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-height: 92vh;
  max-height: 92svh;
  margin: 0 auto;
  padding: 12px 20px calc(20px + var(--safe-bottom));
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  border-radius: 20px 20px 0 0;
  background:
    radial-gradient(ellipse at 100% 0, rgba(176, 138, 86, .1), transparent 35%),
    #f7f1e6;
  box-shadow: 0 -20px 70px rgba(0, 0, 0, .22);
  transform: translateY(102%);
  transition: transform .42s var(--ease);
}

.modal.is-open .sheet {
  transform: translateY(0);
}

.sheet__handle {
  width: 38px;
  height: 4px;
  margin: 0 auto 17px;
  border-radius: 99px;
  background: rgba(23, 59, 50, .16);
}

.sheet__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.sheet__head--compact {
  align-items: center;
}

.sheet__eyebrow {
  color: var(--gold);
  font-size: 9px;
  letter-spacing: .2em;
}

.sheet__head h2 {
  margin-top: 8px;
  color: var(--ink-deep);
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: .05em;
}

.sheet__close {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  padding: 0;
  border: 1px solid rgba(23, 59, 50, .14);
  border-radius: 50%;
  background: rgba(255, 252, 245, .4);
  color: var(--ink-soft);
}

.sheet__close svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
}

.sheet__desc {
  margin-top: 12px;
  color: var(--ink-faint);
  font-family: var(--serif);
  font-size: 12px;
  line-height: 1.9;
  letter-spacing: .03em;
}

.sheet__privacy {
  margin-top: 10px;
  color: rgba(23, 59, 50, .36);
  font-size: 9px;
  line-height: 1.6;
  text-align: center;
}

.field {
  display: block;
  margin-top: 18px;
}

.field__label {
  display: block;
  margin-bottom: 7px;
  color: var(--ink-soft);
  font-size: 10px;
  letter-spacing: .1em;
}

.field__label small {
  color: rgba(163, 59, 48, .55);
  font-size: 9px;
}

.field input {
  width: 100%;
  height: 50px;
  padding: 0 14px;
  border: 1px solid rgba(23, 59, 50, .16);
  border-radius: 2px;
  background: rgba(255, 253, 248, .68);
  color: var(--ink-deep);
  font-family: var(--serif);
  font-size: 17px;
  letter-spacing: .06em;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.field input::placeholder {
  color: rgba(23, 59, 50, .25);
  font-size: 13px;
}

.field input:focus {
  border-color: rgba(163, 59, 48, .5);
  box-shadow: 0 0 0 3px rgba(163, 59, 48, .06);
}

#confirmSignature {
  margin-top: 22px;
}

/* 分享 */

.wechat-guide {
  margin-top: 20px;
  padding: 16px 13px 14px;
  border: 1px solid rgba(176, 138, 86, .25);
  border-radius: 4px;
  background: rgba(255, 252, 245, .5);
  text-align: center;
}

.wechat-guide__visual {
  position: relative;
  width: 160px;
  height: 56px;
  margin: 0 auto 4px;
  color: rgba(23, 59, 50, .42);
}

.wechat-guide__dots {
  position: absolute;
  top: 0;
  right: 17px;
  font-family: var(--serif);
  font-size: 25px;
  letter-spacing: .08em;
  line-height: 1;
}

.wechat-guide__visual svg {
  position: absolute;
  top: 17px;
  right: 0;
  width: 160px;
  height: 56px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1;
  stroke-linecap: round;
  stroke-dasharray: 3 4;
}

.wechat-guide p,
.share-browser-tip p {
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 12px;
  line-height: 1.9;
}

.wechat-guide b {
  color: var(--seal);
}

.share-browser-tip {
  margin-top: 20px;
  padding: 13px 14px;
  border-left: 2px solid rgba(176, 138, 86, .55);
  background: rgba(176, 138, 86, .07);
}

.share-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 18px;
}

.share-option {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 14px 12px;
  border: 1px solid rgba(23, 59, 50, .13);
  border-radius: 3px;
  background: rgba(255, 252, 245, .62);
  text-align: left;
  transition: background .2s ease, border-color .2s ease, transform .2s ease;
}

.share-option:active {
  transform: scale(.98);
  background: rgba(255, 252, 245, .9);
}

.share-option--wide {
  grid-column: 1 / -1;
}

.share-option__icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border: 1px solid rgba(176, 138, 86, .3);
  border-radius: 50%;
  color: var(--seal);
  background: rgba(255, 253, 247, .65);
}

.share-option__icon svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.share-option > span:nth-child(2) {
  min-width: 0;
}

.share-option b {
  display: block;
  color: var(--ink);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .04em;
}

.share-option small {
  display: block;
  margin-top: 3px;
  color: rgba(23, 59, 50, .4);
  font-size: 8px;
  line-height: 1.6;
  white-space: normal;
}

.share-option__arrow {
  margin-left: auto;
  color: rgba(23, 59, 50, .3);
  font-family: var(--serif);
  font-size: 17px;
}

.share-footnote {
  margin-top: 15px;
  color: rgba(23, 59, 50, .36);
  font-size: 8px;
  line-height: 1.7;
  text-align: center;
}

.copy-fallback {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(176, 138, 86, .28);
  background: rgba(255, 252, 245, .55);
}

.copy-fallback label {
  display: block;
  margin-bottom: 7px;
  color: var(--ink-soft);
  font-size: 9px;
  line-height: 1.6;
  letter-spacing: .04em;
}

.copy-fallback textarea {
  display: block;
  width: 100%;
  min-height: 76px;
  padding: 9px 10px;
  resize: none;
  border: 1px solid rgba(23, 59, 50, .16);
  border-radius: 2px;
  background: rgba(255, 253, 248, .8);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 11px;
  line-height: 1.7;
  outline: none;
}

/* 海报 */

.sheet--poster {
  padding-bottom: calc(16px + var(--safe-bottom));
}

.poster-preview {
  position: relative;
  display: grid;
  place-items: center;
  height: min(56vh, 500px);
  margin-top: 15px;
  overflow: hidden;
  border-radius: 3px;
  background: rgba(23, 59, 50, .04);
}

.poster-preview img {
  position: absolute;
  inset: 0;
  display: block;
  width: auto;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  margin: auto;
  object-fit: contain;
  border-radius: 2px;
  box-shadow: 0 14px 40px rgba(54, 36, 15, .18);
  opacity: 0;
  transition: opacity .3s ease;
}

.poster-preview.is-ready img {
  opacity: 1;
}

.poster-preview__loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--ink-faint);
  font-family: var(--serif);
  font-size: 10px;
  letter-spacing: .1em;
  transition: opacity .25s ease;
}

.poster-preview.is-ready .poster-preview__loading {
  opacity: 0;
  pointer-events: none;
}

.poster-preview__loading span {
  width: 22px;
  height: 22px;
  border: 1px solid rgba(163, 59, 48, .2);
  border-top-color: var(--seal);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.poster-hint {
  margin-top: 11px;
  color: var(--ink-faint);
  font-family: var(--serif);
  font-size: 10px;
  line-height: 1.7;
  text-align: center;
}

.poster-actions {
  display: flex;
  gap: 9px;
  margin-top: 12px;
}

.poster-actions .btn {
  flex: 1;
  min-height: 44px;
}

/* ---------- 轻提示 ---------- */

.toast {
  position: fixed;
  left: 50%;
  top: calc(66px + var(--safe-top));
  z-index: 2000;
  max-width: calc(100vw - 48px);
  padding: 11px 18px;
  border: 1px solid rgba(220, 200, 160, .16);
  border-radius: 3px;
  background: rgba(12, 42, 35, .94);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .2);
  color: #f2ead9;
  font-size: 11px;
  line-height: 1.5;
  letter-spacing: .05em;
  text-align: center;
  opacity: 0;
  transform: translate(-50%, -12px);
  pointer-events: none;
  transition: opacity .25s ease, transform .3s var(--ease);
}

.toast.is-show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- 动效 ---------- */

[data-reveal].will-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .8s var(--ease), transform .9s var(--ease);
}

[data-reveal].will-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes coverCopyIn {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes coverEnvelopeIn {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes waxPulse {
  0%, 100% { box-shadow: 0 7px 16px rgba(62, 16, 12, .35), inset 0 0 0 4px rgba(111, 31, 25, .18), inset 0 0 0 6px rgba(255, 209, 177, .08), 0 0 0 0 rgba(185, 99, 74, 0); }
  50% { box-shadow: 0 8px 20px rgba(62, 16, 12, .4), inset 0 0 0 4px rgba(111, 31, 25, .18), inset 0 0 0 6px rgba(255, 209, 177, .08), 0 0 0 10px rgba(185, 99, 74, .04); }
}

@keyframes hintBreathe {
  0%, 100% { opacity: .62; }
  50% { opacity: 1; }
}

@keyframes scrollLine {
  0% { transform: translateY(-100%); }
  55%, 100% { transform: translateY(100%); }
}

@keyframes stampDown {
  0% { opacity: 0; transform: scale(1.35) rotate(-7deg); }
  70% { opacity: .95; transform: scale(.94) rotate(-7deg); }
  100% { opacity: .9; transform: scale(1) rotate(-7deg); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes speakPulse {
  0%, 100% { opacity: .55; transform: scale(.94); }
  50% { opacity: 1; transform: scale(1.05); }
}

@keyframes petalFall {
  0% { opacity: 0; transform: translate3d(0, -10px, 0) rotate(0deg) scale(.5); }
  15% { opacity: .85; }
  100% { opacity: 0; transform: translate3d(var(--dx), 150px, 0) rotate(var(--rot)) scale(1); }
}

.petal {
  position: fixed;
  z-index: 1300;
  width: 8px;
  height: 5px;
  border-radius: 100% 0 100% 0;
  background: var(--seal);
  pointer-events: none;
  animation: petalFall 1.8s var(--ease) forwards;
}

/* ---------- 响应式 ---------- */

@media (min-width: 700px) {
  .letter {
    padding: 58px 58px 42px;
  }

  .letter-stage {
    padding: 24px 24px 104px;
  }

  .letter-stage__vertical {
    display: block;
  }

  .principle {
    padding: 30px 32px 25px;
  }

  .principle__head {
    min-height: 38px;
  }

  .principle__icon {
    width: 38px;
    height: 38px;
  }

  .principle__copy h3 {
    font-size: 32px;
  }

  .principle__copy {
    max-width: 78%;
  }

  .principle__text {
    font-size: 15px;
    line-height: 2.05;
  }

  .principle__art {
    top: 58px;
    right: 21px;
    width: 27%;
  }

  .promise-card {
    padding: 34px 36px 32px;
  }

  .promise-card__text {
    font-size: 20px;
  }

  .signature-row {
    padding-right: 90px;
  }

  .promise-card__stamp {
    width: 90px;
    height: 90px;
    right: 29px;
    bottom: 26px;
    font-size: 12px;
  }

  .sheet {
    max-width: 540px;
    bottom: 22px;
    border-radius: 18px;
    padding-left: 26px;
    padding-right: 26px;
    transform: translateY(calc(100% + 30px));
  }

  .modal.is-open .sheet {
    transform: translateY(0);
  }

  .poster-preview {
    height: min(58vh, 560px);
  }
}

@media (min-width: 900px) {
  .cover__title > span:first-child {
    font-size: 104px;
  }

  .cover__title-sub {
    font-size: 27px;
  }

  .cover__verse {
    font-size: 13px;
  }

  .cover__copy {
    margin-top: clamp(38px, 7vh, 78px);
  }

  .envelope {
    width: min(40vw, 460px);
  }

  .cover__hint {
    margin-top: 28px;
    font-size: 12px;
  }

  .cover__bottom {
    font-size: 10px;
  }
}

@media (max-width: 370px) {
  .cover__inner {
    padding-left: 18px;
    padding-right: 18px;
  }

  .cover__brand {
    gap: 9px;
    font-size: 9px;
    letter-spacing: .24em;
  }

  .cover__title > span:first-child {
    font-size: 52px;
  }

  .cover__title-sub {
    font-size: 17px;
  }

  .cover__eyebrow {
    font-size: 9px;
    letter-spacing: .18em;
  }

  .cover__verse {
    margin-top: 14px;
    font-size: 11px;
  }

  .cover__envelope-area {
    margin-top: 22px;
  }

  .envelope {
    width: 82vw;
  }

  .cover__hint {
    margin-top: 20px;
    font-size: 10px;
  }

  .cover__brand-line {
    display: none;
  }

  .hero {
    padding-left: 18px;
    padding-right: 18px;
  }

  .hero__meta {
    gap: 10px;
    padding-right: 12px;
  }

  .hero__meta-text p {
    font-size: 11px;
  }

  .letter {
    padding-left: 18px;
    padding-right: 18px;
  }

  .letter__lead {
    font-size: 15px;
  }

  .principle {
    padding-left: 17px;
    padding-right: 17px;
  }

  .principle__copy {
    max-width: 86%;
  }

  .principle__copy h3 {
    font-size: 26px;
  }

  .promise-card {
    padding-left: 17px;
    padding-right: 17px;
  }

  .promise-card__text {
    font-size: 16.5px;
  }

  .signature-row {
    gap: 10px;
    padding-right: 88px;
  }

  .signature-date {
    font-size: 9px;
  }

  .signature-name {
    font-size: 28px;
  }

  .promise-card__serial-prefix {
    display: none;
  }

  .promise-card__serial {
    font-size: 8px;
  }

  .promise-card__label {
    font-size: 8px;
    letter-spacing: .1em;
  }

  .signed-actions {
    flex-direction: column;
  }

  .signed-actions .btn {
    width: 100%;
  }

  .promise-card__stamp {
    width: 66px;
    height: 66px;
    right: 17px;
    bottom: 19px;
    font-size: 10px;
  }

  .share-options {
    grid-template-columns: 1fr;
  }

  .share-option--wide {
    grid-column: auto;
  }
}

@media (max-height: 710px) {
  .cover__inner {
    padding-top: calc(16px + var(--safe-top));
    padding-bottom: calc(12px + var(--safe-bottom));
  }

  .cover__brand-seal {
    width: 32px;
    height: 32px;
    font-size: 9px;
  }

  .cover__copy {
    margin-top: 18px;
  }

  .cover__eyebrow {
    margin-bottom: 9px;
    font-size: 9px;
  }

  .cover__title > span:first-child {
    font-size: clamp(44px, 13.5vw, 68px);
  }

  .cover__title-sub {
    margin-top: 5px;
    font-size: 16px;
  }

  .cover__verse {
    margin-top: 11px;
    font-size: 10px;
    line-height: 1.8;
  }

  .cover__envelope-area {
    margin-top: 17px;
  }

  .envelope {
    width: min(64vw, 300px);
  }

  .cover__hint {
    margin-top: 16px;
    font-size: 10px;
  }

  .cover__skip {
    margin-top: 5px;
  }

  .cover__bottom {
    padding-top: 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }

  [data-reveal].will-reveal {
    opacity: 1;
    transform: none;
  }

  .cover__copy,
  .cover__envelope-area {
    opacity: 1;
    transform: none;
  }

  .cover * {
    animation: none !important;
  }
}
