/* ==========================================================================
   未来来信 · Dear Future
   主题：暖白纸感 —— 米白纸面、墨色文字、火漆红点缀、赭石金作辅助。
   质感来自三件事：纸纹噪点、极细的分割线、信纸的折痕。
   ========================================================================== */

/* ------------------------------ 1. 变量与重置 ------------------------------ */

:root {
  /* 纸面 */
  --bg: #f7f1e4;
  --surface: #fffdf7;
  --surface-2: #fbf6ea;
  --surface-3: #f2e9d8;

  /* 纸面渐层：全套纸色主题只改这几个 + 上面的纸面色 */
  --bg-top: #faf5ea;
  --bg-bottom: #f8f2e5;
  --wash-1: rgba(255, 255, 255, 0.9);
  --wash-2: rgba(244, 230, 205, 0.85);
  --nav-bg: rgba(249, 243, 232, 0.78);
  --nav-bg-solid: rgba(250, 245, 235, 0.94);
  --band-surface: rgba(255, 253, 247, 0.62);
  --footer-a: rgba(243, 234, 218, 0.5);
  --footer-b: rgba(240, 229, 210, 0.85);

  /* 墨色 */
  --ink: #2b251d;
  --ink-2: #5e5445;
  --ink-3: #958a77;

  /* 线条：全部用带透明度的墨色，纸面上才不会像硬边框 */
  --line: rgba(70, 54, 36, 0.13);
  --line-2: rgba(70, 54, 36, 0.22);
  --line-3: rgba(70, 54, 36, 0.34);

  /* 点缀 */
  --gold: #a87c3f;
  --gold-deep: #8b6330;
  --gold-soft: #f0e2c8;
  --seal: #a9493f;
  --seal-deep: #8a3830;
  --ok: #4c7a58;

  --radius: 14px;
  --radius-lg: 20px;

  --serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", "Georgia", serif;
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --shadow-sm: 0 1px 2px rgba(74, 56, 32, 0.05), 0 6px 14px -10px rgba(74, 56, 32, 0.18);
  --shadow-md: 0 1px 2px rgba(74, 56, 32, 0.05), 0 18px 36px -22px rgba(74, 56, 32, 0.28);
  --shadow-lg: 0 2px 4px rgba(74, 56, 32, 0.06), 0 40px 70px -36px rgba(74, 56, 32, 0.34);
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink);
  background-color: var(--bg);
  background-image:
    radial-gradient(900px 520px at 8% -6%, var(--wash-1), transparent 62%),
    radial-gradient(760px 500px at 96% 2%, var(--wash-2), transparent 60%),
    linear-gradient(180deg, var(--bg-top) 0%, var(--bg) 52%, var(--bg-bottom) 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

a { color: inherit; }

::selection {
  background: rgba(169, 73, 63, 0.16);
  color: var(--ink);
}

:focus-visible {
  outline: 2px solid rgba(169, 73, 63, 0.55);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 999;
  padding: 12px 18px;
  background: var(--ink);
  color: var(--surface);
  border-radius: 0 0 10px 0;
}
.skip:focus { left: 0; }

/* 纸纹：细颗粒噪点，很淡，但去掉之后立刻会显得“数字” */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.05;
  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='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}

main { position: relative; z-index: 2; }

/* ------------------------------ 2. 通用排版 ------------------------------ */

.container {
  width: min(1160px, calc(100% - 48px));
  margin-inline: auto;
  position: relative;
}

.container.narrow { width: min(760px, calc(100% - 48px)); }

.kicker {
  display: inline-block;
  margin: 0 0 14px;
  font-size: 0.72rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
}

.page-head { padding: clamp(42px, 6vw, 78px) 0 clamp(26px, 3.4vw, 40px); }

.page-title {
  margin: 0 0 16px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.8rem, 3.9vw, 2.8rem);
  line-height: 1.32;
  letter-spacing: 0.01em;
  color: var(--ink);
}

.page-title em {
  font-style: normal;
  color: var(--gold-deep);
}

.page-sub {
  margin: 0;
  max-width: 44em;
  color: var(--ink-2);
  font-size: 1rem;
  text-wrap: pretty;
}

code {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.9em;
  padding: 0.1em 0.4em;
  border-radius: 5px;
  background: rgba(70, 54, 36, 0.055);
  border: 1px solid var(--line);
  color: var(--ink-2);
}

/* ------------------------------ 3. 按钮 ------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1;
  padding: 0.95rem 1.6rem;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), background 0.3s, border-color 0.3s, color 0.3s;
}

/* 主按钮：墨色压印，纸面上最稳的一组对比 */
.btn-primary {
  background: linear-gradient(180deg, #3a3229 0%, #2b251d 100%);
  color: #fbf4e6;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.14) inset, 0 10px 22px -14px rgba(43, 37, 29, 0.85);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.16) inset, 0 18px 30px -16px rgba(43, 37, 29, 0.9);
}

.btn-ghost {
  border-color: var(--line-2);
  background: rgba(255, 255, 255, 0.55);
  color: var(--ink);
}

.btn-ghost:hover {
  border-color: var(--line-3);
  background: var(--surface);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.btn-lg { padding: 1.1rem 2rem; font-size: 1rem; }
.btn-sm { padding: 0.7rem 1.2rem; font-size: 0.85rem; }

.btn-arrow { transition: transform 0.3s var(--ease); }
.btn:hover .btn-arrow { transform: translateX(5px); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--gold-deep);
  text-decoration: none;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  border-bottom: 1px solid rgba(168, 124, 63, 0.3);
  padding-bottom: 2px;
  transition: border-color 0.3s, color 0.3s;
}
.link-arrow span { transition: transform 0.3s var(--ease); }
.link-arrow:hover { color: var(--ink); border-bottom-color: var(--ink); }
.link-arrow:hover span { transform: translateX(5px); }

/* ------------------------------ 4. 导航 ------------------------------ */

.nav {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--nav-bg);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  transition: background 0.4s, box-shadow 0.4s, border-color 0.4s;
}

.nav.is-scrolled {
  background: var(--nav-bg-solid);
  border-bottom-color: var(--line-2);
  box-shadow: 0 8px 24px -22px rgba(74, 56, 32, 0.6);
}

.nav-inner {
  width: min(1160px, calc(100% - 48px));
  margin-inline: auto;
  height: 74px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  margin-right: auto;
}

.brand-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  border: 1px solid var(--line-2);
  background: linear-gradient(180deg, #fffdf7, #f6edda);
  color: var(--ink);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset, 0 4px 10px -8px rgba(74, 56, 32, 0.5);
}

.brand-mark { width: 21px; height: 21px; }

.brand-text b {
  display: block;
  font-family: var(--serif);
  font-size: 1.06rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  line-height: 1.3;
}

.brand-text i {
  display: block;
  font-style: normal;
  font-size: 0.54rem;
  letter-spacing: 0.3em;
  color: var(--ink-3);
  line-height: 1.4;
}

.nav-links { display: flex; align-items: center; gap: 30px; }

.nav-link {
  position: relative;
  text-decoration: none;
  font-size: 0.9rem;
  color: var(--ink-2);
  letter-spacing: 0.08em;
  padding: 6px 0;
  transition: color 0.25s;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--seal);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}

.nav-link:hover { color: var(--ink); }
.nav-link:hover::after,
.nav-link.is-active::after { transform: scaleX(1); }
.nav-link.is-active { color: var(--ink); }

/* ------------------------------ 5. 首页 Hero ------------------------------ */

.hero {
  position: relative;
  padding: clamp(44px, 6.5vw, 86px) 0 clamp(34px, 4.5vw, 60px);
  overflow: hidden;
}

/* 横格线：像信纸，且只在中间段出现 */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    180deg,
    rgba(70, 54, 36, 0.05) 0 1px,
    transparent 1px 34px
  );
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 18%, #000 62%, transparent 96%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 18%, #000 62%, transparent 96%);
}

/* 右上角一点暖光，把视线带向信封 */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(620px 380px at 74% 16%, rgba(238, 214, 175, 0.55), transparent 70%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: min(1160px, calc(100% - 48px));
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1.04fr 0.96fr;
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 24px;
  padding: 7px 16px 7px 12px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  color: var(--ink-2);
  background: rgba(255, 253, 247, 0.8);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset;
}

.eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--seal);
  box-shadow: 0 0 0 0 rgba(169, 73, 63, 0.55);
  animation: ripple 2.8s ease-out infinite;
}

.hero-title {
  margin: 0 0 22px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.4rem, 5.6vw, 4.3rem);
  line-height: 1.18;
  letter-spacing: 0.02em;
  color: var(--ink);
}

.hero-title em {
  font-style: normal;
  background: linear-gradient(115deg, #b98a4a 0%, #a87c3f 42%, #8b6330 88%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lede {
  margin: 0;
  max-width: 34em;
  font-size: clamp(0.98rem, 1.2vw, 1.06rem);
  line-height: 1.95;
  color: var(--ink-2);
  text-wrap: balance;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.hero-stats {
  display: flex;
  gap: clamp(22px, 4vw, 48px);
  margin: 42px 0 0;
  padding-top: 24px;
  border-top: 1px dashed var(--line-2);
}

.hero-stats dt {
  font-family: var(--serif);
  font-size: clamp(1.55rem, 2.7vw, 2rem);
  color: var(--ink);
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.hero-stats dd {
  margin: 6px 0 0;
  font-size: 0.78rem;
  color: var(--ink-3);
  letter-spacing: 0.06em;
}

.hero-art {
  position: relative;
  display: grid;
  place-items: center;
  padding: 18px 0 40px;
}

.env-svg {
  position: relative;
  width: 100%;
  max-width: 600px;
  animation: float 8s ease-in-out infinite;
}

.postmark {
  position: absolute;
  top: 1%;
  right: 0;
  width: clamp(92px, 12vw, 130px);
  opacity: 0.9;
  animation: spin 90s linear infinite;
  pointer-events: none;
  z-index: 2;
}

.pm-text {
  font-size: 8.4px;
  letter-spacing: 2.4px;
  fill: rgba(169, 73, 63, 0.5);
  font-family: var(--sans);
}

.pm-year {
  font-size: 12px;
  letter-spacing: 1px;
  fill: rgba(169, 73, 63, 0.62);
  font-family: var(--serif);
}

/* ------------------------------ 6. 首页区块 ------------------------------ */

.section { padding: clamp(38px, 5.2vw, 68px) 0; }

/* 中间这一段换一种纸：整页只变一次调，用来分段 */
.section-steps {
  background: var(--band-surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-head {
  max-width: 40em;
  margin-bottom: clamp(28px, 3.6vw, 46px);
}

.section-head--row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  max-width: none;
}

.section-head h2 {
  margin: 0 0 12px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.5rem, 2.9vw, 2.15rem);
  line-height: 1.38;
  letter-spacing: 0.015em;
}

.section-sub { margin: 0; color: var(--ink-2); font-size: 0.94rem; text-wrap: pretty; }

.section-more { margin-top: 32px; }

/* 距离卡片 */
.distance-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.distance-card {
  position: relative;
  padding: 26px 22px 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform 0.4s var(--ease), border-color 0.4s, box-shadow 0.4s;
}

.distance-card::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--seal), transparent);
  opacity: 0;
  transition: opacity 0.4s;
}

.distance-card:hover {
  transform: translateY(-4px);
  border-color: var(--line-2);
  box-shadow: var(--shadow-md);
}

.distance-card:hover::after { opacity: 0.85; }

.distance-days {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--gold);
}

.distance-card h3 {
  margin: 13px 0 10px;
  font-family: var(--serif);
  font-size: 1.28rem;
  font-weight: 600;
}

.distance-card p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.85;
  color: var(--ink-2);
}

/* 三步 */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(18px, 3vw, 40px);
}

.step {
  position: relative;
  padding-top: 24px;
  border-top: 1px solid var(--line-2);
}

.step::before {
  content: "";
  position: absolute;
  top: -3.5px;
  left: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--seal);
}

.step-num {
  font-family: var(--serif);
  font-size: 0.85rem;
  letter-spacing: 0.3em;
  color: var(--ink-3);
}

.step h3 {
  margin: 10px 0 12px;
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 600;
}

.step p { margin: 0; font-size: 0.9rem; line-height: 1.9; color: var(--ink-2); }

/* 信墙 */
.wall-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.wall-card {
  display: flex;
  flex-direction: column;
  gap: 13px;
  min-height: 228px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: inherit;
  transition: transform 0.4s var(--ease), border-color 0.4s, box-shadow 0.4s;
}

.wall-card:hover {
  transform: translateY(-4px);
  border-color: var(--line-2);
  box-shadow: var(--shadow-md);
}

.wall-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.72rem;
  color: var(--ink-3);
}

.wall-card-stamp {
  padding: 3px 10px;
  border: 1px solid rgba(169, 73, 63, 0.28);
  border-radius: 999px;
  color: var(--seal);
  letter-spacing: 0.06em;
}

.wall-card-days { letter-spacing: 0.1em; }

.wall-card-title {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.12rem;
  font-weight: 600;
  line-height: 1.55;
}

.wall-card-excerpt {
  flex: 1;
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.9;
  color: var(--ink-2);
}

.wall-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 13px;
  border-top: 1px dashed var(--line);
  font-size: 0.76rem;
  color: var(--ink-3);
}

.wall-card-arrow { color: var(--seal); opacity: 0; transform: translateX(-6px); transition: 0.35s var(--ease); }
.wall-card:hover .wall-card-arrow { opacity: 1; transform: none; }

/* 承诺 */
.promise-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  gap: 1px;
}

.promise {
  padding: 28px 28px 32px;
  background: var(--surface);
}

.promise h3 {
  margin: 0 0 9px;
  font-family: var(--serif);
  font-size: 1.08rem;
  font-weight: 600;
  color: var(--ink);
}

.promise h3::before {
  content: "✦";
  margin-right: 8px;
  color: var(--seal);
  font-size: 0.8em;
}

.promise p { margin: 0; font-size: 0.9rem; line-height: 1.9; color: var(--ink-2); }

/* 底部 CTA */
.cta-band {
  position: relative;
  padding: clamp(46px, 6.5vw, 78px) 0;
  text-align: center;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(560px 260px at 50% 0%, rgba(238, 214, 175, 0.5), transparent 72%),
    var(--band-surface);
}

.cta-band h2 {
  margin: 0 0 28px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.35rem, 2.9vw, 2.05rem);
  line-height: 1.5;
}

/* ------------------------------ 7. 写信页 ------------------------------ */

.write-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.8fr);
  gap: clamp(24px, 3.5vw, 44px);
  align-items: start;
  padding-bottom: clamp(56px, 7vw, 90px);
}

.form-card {
  padding: clamp(22px, 3vw, 36px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.fieldset {
  margin: 0 0 32px;
  padding: 0;
  border: 0;
}

.fieldset:last-of-type { margin-bottom: 8px; }

.fieldset legend {
  padding: 0;
  margin-bottom: 18px;
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  color: var(--gold);
  text-transform: uppercase;
}

.field { margin-bottom: 20px; }
.field:last-child { margin-bottom: 0; }

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.field label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.84rem;
  color: var(--ink-2);
  letter-spacing: 0.04em;
}

.opt {
  margin-left: 8px;
  padding: 1px 7px;
  font-size: 0.66rem;
  color: var(--ink-3);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  vertical-align: middle;
  letter-spacing: 0.06em;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
textarea {
  width: 100%;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  background: #fffdf9;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
  appearance: none;
  -webkit-appearance: none;
  box-shadow: 0 1px 2px rgba(74, 56, 32, 0.03) inset;
}

input[type="date"] { color-scheme: light; min-height: 48px; }
input[type="date"]::-webkit-calendar-picker-indicator { cursor: pointer; opacity: 0.45; }
input[type="date"]::-webkit-calendar-picker-indicator:hover { opacity: 0.8; }

textarea {
  min-height: 240px;
  resize: vertical;
  font-family: var(--serif);
  font-size: 1.02rem;
  line-height: 2;
  background-image: repeating-linear-gradient(
    180deg,
    transparent 0 calc(2em - 1px),
    rgba(70, 54, 36, 0.055) calc(2em - 1px) 2em
  );
  background-attachment: local;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: rgba(169, 73, 63, 0.5);
  background-color: #fffefb;
  box-shadow: 0 0 0 4px rgba(169, 73, 63, 0.1);
}

input.has-error,
textarea.has-error {
  border-color: rgba(169, 73, 63, 0.75);
  box-shadow: 0 0 0 4px rgba(169, 73, 63, 0.12);
}

::placeholder { color: rgba(94, 84, 69, 0.42); }

.hint {
  margin: 8px 0 0;
  font-size: 0.76rem;
  line-height: 1.7;
  color: var(--ink-3);
}

.field-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.counter {
  font-size: 0.74rem;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.counter b { color: var(--ink-2); font-weight: 500; }

.preset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.preset {
  padding: 0.6rem 1.1rem;
  font: inherit;
  font-size: 0.85rem;
  color: var(--ink-2);
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  cursor: pointer;
  transition: 0.25s;
}

.preset:hover { color: var(--ink); border-color: var(--line-3); background: #fffefa; }

.preset.is-active {
  color: #fbf4e6;
  background: var(--ink);
  border-color: transparent;
  font-weight: 600;
  box-shadow: 0 6px 14px -10px rgba(43, 37, 29, 0.9);
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  cursor: pointer;
  transition: border-color 0.3s, background 0.3s;
}

.check:hover { border-color: var(--line-2); background: var(--surface); }

.check input { position: absolute; opacity: 0; width: 0; height: 0; }

.check-box {
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  border: 1px solid var(--line-3);
  border-radius: 5px;
  background: #fffdf9;
  position: relative;
  transition: 0.25s;
}

.check input:checked + .check-box {
  background: var(--ink);
  border-color: transparent;
}

.check input:checked + .check-box::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid #fbf4e6;
  border-width: 0 2px 2px 0;
  transform: rotate(42deg);
}

.check input:focus-visible + .check-box { outline: 2px solid rgba(169, 73, 63, 0.55); outline-offset: 3px; }

.check-text b { display: block; font-size: 0.92rem; font-weight: 600; }
.check-text small { display: block; margin-top: 3px; font-size: 0.76rem; line-height: 1.7; color: var(--ink-3); }

.form-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 26px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.form-note { margin: 0; font-size: 0.76rem; color: var(--ink-3); }
.form-note a { color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; }

.form-error {
  margin-top: 18px;
  padding: 11px 15px;
  border: 1px solid rgba(169, 73, 63, 0.32);
  background: rgba(169, 73, 63, 0.07);
  border-radius: 10px;
  font-size: 0.85rem;
  color: var(--seal-deep);
}

/* 右侧信封预览 */
.preview-sticky { position: sticky; top: 100px; }

.preview-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface-2);
}

.preview-label {
  margin: 0 0 12px;
  font-size: 0.7rem;
  letter-spacing: 0.26em;
  color: var(--ink-3);
  text-transform: uppercase;
}

.preview-env {
  position: relative;
  aspect-ratio: 4 / 3;
  padding: 20px;
  border-radius: 10px;
  overflow: hidden;
  background: linear-gradient(165deg, #e6d3b0 0%, #dcc59d 55%, #cbb187 100%);
  color: #4a3a26;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset, 0 18px 30px -26px rgba(74, 56, 32, 0.75);
}

.preview-env::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #fdf8ec 0%, #f4e9d4 68%, #eee1c7 100%);
  clip-path: polygon(0 0, 100% 0, 50% 56%);
  filter: drop-shadow(0 2px 2px rgba(120, 94, 58, 0.3));
}

.preview-env::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 56%;
  width: 34px;
  height: 34px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 226, 212, 0.34) 0 32%, rgba(255, 226, 212, 0) 34%),
    radial-gradient(circle at 35% 30%, #c96a60, #9d4340 60%, #712a29);
  box-shadow: 0 6px 14px -6px rgba(90, 40, 30, 0.55), inset 0 1px 3px rgba(255, 255, 255, 0.3);
}

.prev-stamp {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 44px;
  height: 52px;
  border: 1px dashed rgba(150, 120, 78, 0.6);
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.4);
  z-index: 2;
}

.prev-stamp::after {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: 50%;
  border: 1px solid rgba(150, 120, 78, 0.5);
}

.prev-to {
  position: relative;
  z-index: 2;
  margin: 0 0 6px;
  font-family: var(--serif);
  font-size: 1.05rem;
  letter-spacing: 0.08em;
  color: #41321f;
  word-break: break-all;
}

.prev-title {
  position: relative;
  z-index: 2;
  margin: 0;
  max-width: 70%;
  font-size: 0.76rem;
  line-height: 1.6;
  color: rgba(74, 60, 40, 0.62);
  word-break: break-all;
}

.prev-date {
  position: absolute;
  left: 20px;
  bottom: 18px;
  z-index: 2;
  margin: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: rgba(74, 60, 40, 0.6);
}

.preview-notes {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.preview-notes li {
  position: relative;
  padding-left: 15px;
  font-size: 0.79rem;
  line-height: 1.8;
  color: var(--ink-3);
}

.preview-notes li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--seal);
  opacity: 0.6;
}

/* 成功卡片 */
.success-card {
  width: min(620px, 100%);
  margin: 0 auto clamp(56px, 7vw, 90px);
  padding: clamp(30px, 5vw, 50px);
  text-align: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}

.success-seal {
  width: 74px;
  height: 74px;
  margin: 0 auto 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-family: var(--serif);
  font-size: 1.55rem;
  color: #fbe4da;
  background: radial-gradient(circle at 35% 28%, #c96a60, #9d4340 60%, #712a29);
  box-shadow: 0 14px 26px -14px rgba(120, 40, 40, 0.75), inset 0 2px 6px rgba(255, 255, 255, 0.24);
}

.success-title {
  margin: 0 0 11px;
  font-family: var(--serif);
  font-size: clamp(1.35rem, 2.9vw, 1.8rem);
  font-weight: 600;
}

.success-sub { margin: 0 0 28px; color: var(--ink-2); font-size: 0.95rem; }
.success-sub b { color: var(--ink); font-weight: 600; }

.code-block {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 11px 11px 16px;
  border: 1px dashed var(--line-3);
  border-radius: 12px;
  background: var(--surface-2);
}

.code-label { font-size: 0.72rem; letter-spacing: 0.18em; color: var(--ink-3); }

.code-block code {
  flex: 1;
  background: none;
  border: 0;
  padding: 0;
  font-size: 1.05rem;
  letter-spacing: 0.14em;
  color: var(--ink);
  text-align: left;
}

.copy-btn {
  flex: none;
  padding: 0.5rem 0.9rem;
  font: inherit;
  font-size: 0.78rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  cursor: pointer;
  transition: 0.25s;
}

.copy-btn:hover { background: var(--surface-3); border-color: var(--line-3); }
.copy-btn.is-done { color: var(--ok); border-color: rgba(76, 122, 88, 0.45); }

.code-hint { margin: 11px 0 0; font-size: 0.76rem; color: var(--ink-3); }

.success-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 28px;
}

/* ------------------------------ 8. 信件页 ------------------------------ */

.letter-page { padding: clamp(32px, 5.5vw, 74px) 0 clamp(60px, 8vw, 100px); }

.letter-frame {
  width: min(780px, calc(100% - 40px));
  margin-inline: auto;
}

.letter-frame--sealed { text-align: center; }

.sealed-art {
  position: relative;
  width: min(400px, 78%);
  margin: 0 auto 4px;
  animation: float 9s ease-in-out infinite;
}

.sealed-title {
  margin: 6px 0 0;
  font-family: var(--serif);
  font-size: clamp(1.45rem, 3.2vw, 2.1rem);
  font-weight: 600;
  line-height: 1.42;
}

.countdown {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 32px 0 16px;
}

.count-unit {
  width: clamp(64px, 15vw, 80px);
  padding: 12px 0 9px;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.count-unit b {
  display: block;
  font-family: var(--serif);
  font-size: clamp(1.45rem, 3.8vw, 1.9rem);
  line-height: 1.1;
  color: var(--seal);
  font-variant-numeric: tabular-nums;
}

.count-unit span {
  display: block;
  margin-top: 4px;
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  color: var(--ink-3);
  text-indent: 0.22em;
}

.sealed-when { margin: 0 0 32px; font-size: 0.9rem; color: var(--ink-2); }
.sealed-when b { color: var(--ink); font-weight: 600; }

.letter-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 0 auto;
  max-width: 560px;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: var(--line);
}

.letter-meta > div { padding: 16px 12px; background: var(--surface); }
.letter-meta dt { font-size: 0.68rem; letter-spacing: 0.18em; color: var(--ink-3); }
.letter-meta dd { margin: 5px 0 0; font-family: var(--serif); font-size: 1rem; color: var(--ink); }

.sealed-note { margin: 28px 0 0; font-size: 0.8rem; color: var(--ink-3); }

/* 打开动画 */
.letter-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: min(62vh, 560px);
}

.letter-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  cursor: pointer;
  background: radial-gradient(56% 44% at 50% 48%, rgba(238, 214, 175, 0.45), transparent 72%);
  transition: opacity 0.85s var(--ease), transform 0.85s var(--ease), visibility 0.85s;
}

.cover-kicker {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  color: var(--ink-3);
}

.cover-art { width: min(520px, 88%); }
.cover-art .env-svg { animation: float 7s ease-in-out infinite; }

.letter-cover:hover .env-seal,
.letter-cover:focus-visible .env-seal {
  transform-box: fill-box;
  transform-origin: center;
  transform: scale(1.08);
  transition: transform 0.4s var(--ease);
}

.cover-hint {
  margin: 0;
  font-size: 0.8rem;
  letter-spacing: 0.22em;
  color: var(--ink-2);
  animation: breathe 3.2s ease-in-out infinite;
}

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

.letter-stage .paper {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 1s var(--ease) 0.15s, transform 1s var(--ease) 0.15s;
}

.letter-stage.is-open .paper { opacity: 1; transform: none; }

/* 没有 JS 时，纸面直接可见 */
.no-js .letter-stage { min-height: 0; }
.no-js .letter-cover { display: none; }
.no-js .letter-stage .paper { opacity: 1; transform: none; }

/* 信纸：比页面更白一档，靠阴影浮起来 */
.paper {
  position: relative;
  width: 100%;
  padding: clamp(30px, 5vw, 56px);
  border-radius: 6px;
  color: #2f2a22;
  background:
    radial-gradient(120% 70% at 12% 0%, rgba(255, 255, 255, 0.85), transparent 55%),
    linear-gradient(178deg, #fffdf8 0%, #fdf8ee 46%, #f8f0e0 100%);
  border: 1px solid rgba(70, 54, 36, 0.1);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 2px 4px rgba(74, 56, 32, 0.06),
    0 44px 80px -46px rgba(74, 56, 32, 0.42);
}

.paper::before {
  content: "";
  position: absolute;
  inset: 11px;
  border: 1px solid rgba(70, 54, 36, 0.08);
  border-radius: 3px;
  pointer-events: none;
}

/* 两道折痕：信纸被折过三折的证据（暗线 + 亮线，像压出来的） */
.paper::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background-image:
    linear-gradient(180deg,
      transparent 0 32.9%,
      rgba(70, 54, 36, 0.055) 33%,
      rgba(255, 255, 255, 0.7) 33.1%,
      transparent 33.25%),
    linear-gradient(180deg,
      transparent 0 65.9%,
      rgba(70, 54, 36, 0.055) 66%,
      rgba(255, 255, 255, 0.7) 66.1%,
      transparent 66.25%);
}

.paper-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.paper-to {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  color: #55483a;
}

.paper-date {
  margin: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: rgba(85, 72, 58, 0.5);
}

.paper-title {
  margin: 0 0 20px;
  padding-bottom: 16px;
  font-family: var(--serif);
  font-size: clamp(1.35rem, 3vw, 1.8rem);
  font-weight: 600;
  line-height: 1.5;
  border-bottom: 1px solid rgba(70, 54, 36, 0.16);
}

.paper-body {
  font-family: var(--serif);
  font-size: 1.04rem;
  line-height: 2.15;
  letter-spacing: 0.01em;
  color: #332d25;
  white-space: pre-wrap;
  word-break: break-word;
}

.paper-sign {
  margin: 40px 0 0;
  text-align: right;
  font-family: var(--serif);
  font-size: 1.02rem;
  color: #4a4034;
}

.paper-foot {
  margin: 13px 0 0;
  padding-top: 13px;
  border-top: 1px dashed rgba(70, 54, 36, 0.2);
  text-align: right;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: rgba(85, 72, 58, 0.5);
}

/* 加锁 */
.lock-card {
  width: min(540px, 100%);
  margin: 0 auto;
  padding: clamp(28px, 5vw, 46px);
  text-align: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.lock-title {
  margin: 0 0 11px;
  font-family: var(--serif);
  font-size: clamp(1.45rem, 3.2vw, 1.95rem);
  font-weight: 600;
}

.lock-sub { margin: 0 0 28px; color: var(--ink-2); font-size: 0.94rem; line-height: 1.9; }

.lock-form { display: flex; gap: 10px; }
.lock-form input { flex: 1; text-align: center; letter-spacing: 0.18em; }
.lock-form .btn { flex: none; }

.field-error {
  margin: 14px 0 0;
  font-size: 0.84rem;
  color: var(--seal-deep);
  min-height: 1.2em;
}

/* ------------------------------ 9. 信墙页 / 查信页 ------------------------------ */

.empty {
  padding: clamp(46px, 7vw, 84px) 24px;
  text-align: center;
  border: 1px dashed var(--line-2);
  border-radius: var(--radius-lg);
  background: rgba(255, 253, 247, 0.6);
}

.empty-title { margin: 0 0 8px; font-family: var(--serif); font-size: 1.28rem; }
.empty-sub { margin: 0 0 24px; color: var(--ink-3); font-size: 0.9rem; }

.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 40px;
}

.pager-btn {
  padding: 0.6rem 1.1rem;
  font-size: 0.84rem;
  color: var(--ink-2);
  text-decoration: none;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--surface);
  transition: 0.25s;
}

.pager-btn:hover { color: var(--ink); border-color: var(--line-3); }
.pager-btn.is-disabled { opacity: 0.4; }
.pager-info { font-size: 0.8rem; color: var(--ink-3); letter-spacing: 0.1em; }

.page-square .container { padding-bottom: clamp(46px, 6vw, 84px); }

.track-form {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.track-form input {
  flex: 1;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 1.02rem;
  letter-spacing: 0.16em;
  text-align: center;
  text-transform: uppercase;
}

.track-results { display: grid; gap: 10px; }

.track-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 17px 19px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: inherit;
  transition: 0.3s;
}

.track-item:hover { border-color: var(--line-2); box-shadow: var(--shadow-md); transform: translateY(-2px); }

.track-status {
  flex: none;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
}

.track-status.is-sealed { color: var(--seal); border: 1px solid rgba(169, 73, 63, 0.3); background: rgba(169, 73, 63, 0.05); }
.track-status.is-delivered { color: var(--ok); border: 1px solid rgba(76, 122, 88, 0.3); background: rgba(76, 122, 88, 0.06); }

.track-main { flex: 1; min-width: 0; }
.track-main b { display: block; font-family: var(--serif); font-size: 1rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.track-main small { display: block; margin-top: 3px; font-size: 0.75rem; color: var(--ink-3); }
.track-arrow { color: var(--ink-3); }

.track-help { margin: 28px 0 56px; font-size: 0.8rem; line-height: 1.9; color: var(--ink-3); }

/* ------------------------------ 10. 静态页 ------------------------------ */

.prose { padding-bottom: clamp(56px, 7vw, 90px); }

.prose h2 {
  margin: 40px 0 14px;
  font-family: var(--serif);
  font-size: clamp(1.2rem, 2.3vw, 1.45rem);
  font-weight: 600;
}

.prose h2:first-child { margin-top: 8px; }

.prose p { margin: 0 0 15px; color: var(--ink-2); line-height: 2; }

.prose ul { margin: 0 0 18px; padding-left: 1.2em; color: var(--ink-2); line-height: 2; }
.prose li { margin-bottom: 6px; }
.prose li::marker { color: var(--gold); }

.faq { margin: 0; }
.faq dt {
  margin-top: 22px;
  font-family: var(--serif);
  font-size: 1.02rem;
  color: var(--ink);
}
.faq dd { margin: 8px 0 0; color: var(--ink-2); line-height: 1.95; font-size: 0.94rem; }

/* 错误页 */
.error-page {
  min-height: 62vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 56px 24px;
}

.error-code {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(3.2rem, 8vw, 5.6rem);
  line-height: 1;
  color: rgba(70, 54, 36, 0.18);
  letter-spacing: 0.04em;
}

.error-title { margin: 16px 0 10px; font-family: var(--serif); font-size: clamp(1.3rem, 2.9vw, 1.75rem); }
.error-sub { margin: 0 0 30px; color: var(--ink-2); font-size: 0.94rem; }
.error-page .hero-actions { margin-top: 0; }

/* ------------------------------ 11. 页脚 ------------------------------ */

.footer {
  position: relative;
  z-index: 2;
  margin-top: clamp(36px, 5vw, 70px);
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, var(--footer-a), var(--footer-b));
}

.footer-inner {
  width: min(1160px, calc(100% - 48px));
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 32px;
  padding: clamp(38px, 5vw, 58px) 0 clamp(28px, 3.5vw, 40px);
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  font-family: var(--serif);
  font-size: 1.05rem;
  letter-spacing: 0.16em;
}

.footer-logo .brand-icon { width: 34px; height: 34px; border-radius: 9px; }

.footer-brand p {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.95;
  color: var(--ink-3);
  max-width: 22em;
}

.footer-col { display: flex; flex-direction: column; gap: 10px; }

.footer-col h4 {
  margin: 0 0 5px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--ink-3);
  text-transform: uppercase;
}

.footer-col a,
.footer-col span {
  font-size: 0.84rem;
  color: var(--ink-2);
  text-decoration: none;
  transition: color 0.25s;
  width: fit-content;
}

.footer-col a:hover { color: var(--seal); }

.footer-bottom {
  width: min(1160px, calc(100% - 48px));
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  padding: 18px 0 26px;
  border-top: 1px solid var(--line);
  font-size: 0.74rem;
  color: var(--ink-3);
}

.footer-bottom a { color: var(--ink-3); text-decoration: none; }
.footer-bottom a:hover { color: var(--ink-2); }
.footer-dot { opacity: 0.5; }

/* ------------------------------ 12. 动画 ------------------------------ */

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

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

@keyframes ripple {
  0% { box-shadow: 0 0 0 0 rgba(169, 73, 63, 0.45); }
  70% { box-shadow: 0 0 0 9px rgba(169, 73, 63, 0); }
  100% { box-shadow: 0 0 0 0 rgba(169, 73, 63, 0); }
}

@keyframes breathe {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

.section,
.page-head { animation: rise 0.7s var(--ease) both; }

/* ------------------------------ 12.5 纸色主题 ------------------------------ */

html[data-paper="kraft"] {
  --bg: #ede1cb;
  --surface: #fbf4e6;
  --surface-2: #f4ead9;
  --surface-3: #e8dac1;
  --bg-top: #f1e6d2;
  --bg-bottom: #e8dabf;
  --wash-1: rgba(255, 252, 244, 0.7);
  --wash-2: rgba(224, 201, 164, 0.8);
  --nav-bg: rgba(241, 231, 213, 0.8);
  --nav-bg-solid: rgba(242, 232, 214, 0.95);
  --band-surface: rgba(251, 244, 230, 0.6);
  --footer-a: rgba(231, 217, 191, 0.5);
  --footer-b: rgba(226, 210, 180, 0.9);
}

html[data-paper="stone"] {
  --bg: #f1f0ec;
  --surface: #fdfcf9;
  --surface-2: #f7f6f1;
  --surface-3: #eae9e2;
  --bg-top: #f6f5f1;
  --bg-bottom: #eeede7;
  --wash-1: rgba(255, 255, 255, 0.85);
  --wash-2: rgba(222, 221, 212, 0.7);
  --nav-bg: rgba(245, 244, 240, 0.8);
  --nav-bg-solid: rgba(246, 245, 241, 0.95);
  --band-surface: rgba(253, 252, 249, 0.62);
  --footer-a: rgba(236, 235, 228, 0.6);
  --footer-b: rgba(232, 231, 223, 0.9);
}

html[data-paper="celadon"] {
  --bg: #edf0e6;
  --surface: #fbfcf6;
  --surface-2: #f4f8ed;
  --surface-3: #e5ebda;
  --bg-top: #f2f5ea;
  --bg-bottom: #e8ecdd;
  --wash-1: rgba(255, 255, 255, 0.8);
  --wash-2: rgba(216, 226, 203, 0.75);
  --nav-bg: rgba(241, 244, 235, 0.8);
  --nav-bg-solid: rgba(242, 245, 236, 0.95);
  --band-surface: rgba(251, 252, 246, 0.62);
  --footer-a: rgba(228, 234, 219, 0.55);
  --footer-b: rgba(222, 229, 212, 0.9);
}

.paper-picker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-left: auto;
}

.paper-picker-label {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  color: var(--ink-3);
}

.paper-dot {
  width: 17px;
  height: 17px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--line-3);
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s;
}

.paper-dot[data-paper-set="warm"] { background: #f7f1e4; }
.paper-dot[data-paper-set="kraft"] { background: #e3d3b6; }
.paper-dot[data-paper-set="stone"] { background: #e9e8e1; }
.paper-dot[data-paper-set="celadon"] { background: #e0e8d3; }

.paper-dot:hover { transform: scale(1.18); }

.paper-dot.is-active {
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 3.5px var(--seal);
}

/* ------------------------------ 12.6 信纸模板 ------------------------------ */

.paper-tiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.paper-tile {
  position: relative;
  padding: 9px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: var(--surface);
  cursor: pointer;
  text-align: center;
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
}

.paper-tile:hover { transform: translateY(-2px); border-color: var(--line-3); }

.paper-tile input { position: absolute; opacity: 0; width: 0; height: 0; }

.paper-tile.is-active {
  border-color: var(--seal);
  box-shadow: 0 0 0 3px rgba(169, 73, 63, 0.1);
}

.paper-tile-swatch {
  display: grid;
  place-items: center;
  height: 54px;
  margin-bottom: 7px;
  border-radius: 5px;
  border: 1px solid var(--line);
  background-color: #fffdf7;
  color: rgba(70, 54, 36, 0.55);
  font-size: 0.9rem;
  letter-spacing: 0.1em;
}

.paper-tile-swatch--rule {
  background-image: repeating-linear-gradient(180deg, transparent 0 11px, rgba(70, 54, 36, 0.16) 11px 12px);
}

.paper-tile-swatch--grid {
  background-image:
    repeating-linear-gradient(180deg, transparent 0 11px, rgba(70, 54, 36, 0.14) 11px 12px),
    repeating-linear-gradient(90deg, transparent 0 11px, rgba(70, 54, 36, 0.14) 11px 12px);
}

.paper-tile-swatch--hand {
  font-family: "Kaiti SC", "KaiTi", "STKaiti", "楷体", serif;
  font-size: 1.05rem;
  color: rgba(70, 54, 36, 0.7);
}

.paper-tile span { font-size: 0.75rem; color: var(--ink-2); }

/* 信纸本体：用 --paper-pattern 叠加纹理，不破坏原来的纸面渐变 */
.paper {
  background-image:
    var(--paper-pattern, none),
    radial-gradient(120% 70% at 12% 0%, rgba(255, 255, 255, 0.85), transparent 55%),
    linear-gradient(178deg, #fffdf8 0%, #fdf8ee 46%, #f8f0e0 100%);
  background-attachment: local, scroll, scroll;
}

.paper--rule { --paper-pattern: repeating-linear-gradient(180deg, transparent 0 31px, rgba(70, 54, 36, 0.1) 31px 32px); }

.paper--grid {
  --paper-pattern:
    repeating-linear-gradient(180deg, transparent 0 31px, rgba(70, 54, 36, 0.09) 31px 32px),
    repeating-linear-gradient(90deg, transparent 0 31px, rgba(70, 54, 36, 0.09) 31px 32px);
}

.paper--hand .paper-body,
.paper--hand .paper-title,
.paper--hand .paper-to,
.paper--hand .paper-sign {
  font-family: "Kaiti SC", "KaiTi", "STKaiti", "Kaiti TC", "楷体", serif;
}

.paper--hand .paper-body { font-size: 1.12rem; line-height: 2.25; }

/* 随信附上的照片：像夹在信里的一张相纸 */
.paper-photos {
  position: relative;
  z-index: 1; /* 压过信纸的折痕层，照片不该被折 */
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-top: 28px;
}

.paper-photo {
  padding: 7px 7px 9px;
  background: #fffdf9;
  border: 1px solid rgba(70, 54, 36, 0.12);
  box-shadow: 0 10px 22px -18px rgba(74, 56, 32, 0.8);
  transform: rotate(-1.1deg);
}

.paper-photo:nth-child(even) { transform: rotate(1.2deg); }

.paper-photo img {
  width: 100%;
  display: block;
  border-radius: 2px;
}

.paper-photo figcaption {
  margin-top: 7px;
  font-size: 0.72rem;
  color: rgba(85, 72, 58, 0.65);
  text-align: center;
  font-family: var(--sans);
}

/* ------------------------------ 12.7 上传 ------------------------------ */

.uploader { display: grid; gap: 12px; justify-items: start; }

.upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.62rem 1.05rem;
  font: inherit;
  font-size: 0.84rem;
  color: var(--ink-2);
  background: var(--surface);
  border: 1px dashed var(--line-3);
  border-radius: 10px;
  cursor: pointer;
  transition: 0.25s;
}

.upload-btn:hover { color: var(--ink); border-color: var(--seal); background: var(--surface-2); }
.upload-btn.is-busy { opacity: 0.6; pointer-events: none; }

.upload-list { display: flex; flex-wrap: wrap; gap: 10px; }

.upload-item {
  position: relative;
  width: 92px;
  height: 92px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--line-2);
  background: var(--surface-3);
}

.upload-item img { width: 100%; height: 100%; object-fit: cover; }

.upload-item button {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(43, 37, 29, 0.72);
  color: #fbf4e6;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
}

.upload-item.is-uploading::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, 0.55) 50%, transparent 80%);
  animation: shimmer 1.1s linear infinite;
}

@keyframes shimmer {
  from { transform: translateX(-100%); }
  to { transform: translateX(100%); }
}

/* ------------------------------ 12.8 回信 ------------------------------ */

.letter-reply {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 34px;
}

.reply-hint { margin: 0; font-size: 0.8rem; color: var(--ink-3); }

.replies {
  margin-top: 44px;
  padding-top: 26px;
  border-top: 1px dashed var(--line-2);
}

.replies-title {
  margin: 0 0 16px;
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  color: var(--ink-3);
  text-transform: uppercase;
}

.reply-item {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  transition: 0.25s;
}

.reply-item:hover { color: var(--seal); }
.reply-item b { font-family: var(--serif); font-weight: 600; }
.reply-item small { color: var(--ink-3); font-size: 0.76rem; }
.reply-item .reply-item-arrow { margin-left: auto; color: var(--ink-3); }

.reply-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  padding: 12px 14px;
  border: 1px solid rgba(169, 73, 63, 0.24);
  border-radius: 10px;
  background: rgba(169, 73, 63, 0.055);
  font-size: 0.84rem;
  color: var(--seal-deep);
}

.reply-banner a { color: inherit; }

/* ------------------------------ 12.9 账号 ------------------------------ */

.nav-login { color: var(--ink); }

.nav-user {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  padding: 4px 12px 4px 4px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--surface);
  transition: border-color 0.25s, background 0.25s;
}

.nav-user:hover { border-color: var(--seal); }

.nav-avatar {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: #fbf4e6;
  font-family: var(--serif);
  font-size: 0.8rem;
  line-height: 1;
}

.nav-user-name {
  font-size: 0.82rem;
  color: var(--ink-2);
  max-width: 7em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-section {
  display: grid;
  place-items: center;
  padding: clamp(48px, 8vw, 96px) 24px;
  min-height: 62vh;
}

.auth-card {
  width: min(420px, 100%);
  padding: clamp(26px, 4vw, 38px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}

.auth-title {
  margin: 0 0 10px;
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3vw, 1.9rem);
  font-weight: 600;
  line-height: 1.35;
}

.auth-sub { margin: 0 0 24px; font-size: 0.9rem; line-height: 1.9; color: var(--ink-2); }

.auth-form { display: grid; gap: 16px; }

.btn-block { width: 100%; }

.auth-alt {
  margin: 20px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 0.84rem;
  color: var(--ink-3);
  text-align: center;
}

.auth-alt a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

.account-note {
  margin: 0 0 20px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
  font-size: 0.82rem;
  color: var(--ink-2);
}

.account-note a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

.auth-done { text-align: center; }

.auth-done-title {
  margin: 0 0 10px;
  font-family: var(--serif);
  font-size: 1.08rem;
  color: var(--ink);
}

.auth-done-text {
  margin: 0 0 22px;
  font-size: 0.88rem;
  line-height: 1.95;
  color: var(--ink-2);
}

/* 信件列表（我的信箱） */
.letter-list { display: grid; gap: 10px; }

/* 我的信箱：页头下面直接接列表，别留一大段空白 */
.page-me .section { padding-top: clamp(18px, 2.6vw, 30px); }

.letter-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: inherit;
  transition: transform 0.28s var(--ease), border-color 0.28s, box-shadow 0.28s;
}

.letter-item:hover { transform: translateY(-2px); border-color: var(--line-2); box-shadow: var(--shadow-md); }

.letter-item-main { flex: 1; min-width: 0; }
.letter-item-main b {
  display: block;
  font-family: var(--serif);
  font-size: 1.02rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.letter-item-main small { display: block; margin-top: 3px; font-size: 0.76rem; color: var(--ink-3); }
.letter-item-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.08em;
  color: var(--ink-3);
}

.letter-item-side {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
  flex: none;
}
.badge-row { display: flex; gap: 5px; }

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  white-space: nowrap;
}

.badge.is-sealed { color: var(--seal); border-color: rgba(169, 73, 63, 0.28); background: rgba(169, 73, 63, 0.05); }
.badge.is-open { color: var(--ok); border-color: rgba(76, 122, 88, 0.28); background: rgba(76, 122, 88, 0.06); }
.badge.is-lock { color: var(--gold-deep); border-color: rgba(168, 124, 63, 0.3); background: rgba(168, 124, 63, 0.06); }
.badge.is-admin { color: #fff; background: var(--ink); border-color: transparent; }

/* ------------------------------ 12.10 后台 ------------------------------ */

.admin-body { padding-bottom: clamp(52px, 7vw, 88px); }

.admin-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 26px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.admin-tabs { display: flex; gap: 6px; flex-wrap: wrap; }

.admin-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.86rem;
  color: var(--ink-2);
  text-decoration: none;
  transition: 0.25s;
}

.admin-tab:hover { background: var(--surface); border-color: var(--line); color: var(--ink); }

.admin-tab.is-active {
  background: var(--ink);
  border-color: transparent;
  color: #fbf4e6;
  font-weight: 600;
}

.admin-tab span { font-size: 0.72rem; opacity: 0.7; font-variant-numeric: tabular-nums; }

.admin-back { font-size: 0.82rem; color: var(--ink-3); text-decoration: none; }
.admin-back:hover { color: var(--seal); }

.admin-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.38rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: var(--surface);
  font-size: 0.8rem;
  color: var(--ink-2);
  text-decoration: none;
  transition: 0.25s;
}

.chip:hover { border-color: var(--line-3); color: var(--ink); }
.chip.is-active { background: var(--ink); border-color: transparent; color: #fbf4e6; }
.chip span { font-size: 0.72rem; opacity: 0.65; font-variant-numeric: tabular-nums; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 34px;
}

.stat {
  padding: 18px 18px 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.stat-label { display: block; font-size: 0.74rem; letter-spacing: 0.1em; color: var(--ink-3); }
.stat-value {
  display: block;
  margin-top: 8px;
  font-family: var(--serif);
  font-size: 1.85rem;
  line-height: 1.2;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.stat-note { display: block; margin-top: 6px; font-size: 0.74rem; color: var(--ink-3); }

.admin-section { margin-bottom: 36px; }

.admin-h2 {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 0 0 12px;
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 600;
}

.admin-more { margin-left: auto; font-family: var(--sans); font-size: 0.78rem; font-weight: 400; color: var(--ink-3); text-decoration: none; }
.admin-more:hover { color: var(--seal); }

.admin-note { margin: 0 0 16px; font-size: 0.78rem; line-height: 1.85; color: var(--ink-3); }

.table-wrap {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
}

.table { width: 100%; border-collapse: collapse; font-size: 0.86rem; }

.table th {
  padding: 12px 16px;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--ink-3);
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-2);
  vertical-align: middle;
}

.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: rgba(70, 54, 36, 0.02); }

.table-link { color: var(--ink); text-decoration: none; font-weight: 600; }
.table-link:hover { color: var(--seal); }
.table-sub { margin-top: 3px; font-size: 0.72rem; color: var(--ink-3); }
.table-strong { color: var(--ink); font-weight: 600; }
.table-empty { padding: 30px 16px; text-align: center; color: var(--ink-3); }
.table-actions { display: flex; gap: 10px; }
.nowrap { white-space: nowrap; }

.inline-form { display: inline; }

.link-btn {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 0.8rem;
  color: var(--ink-2);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--line-3);
  transition: color 0.2s;
}

.link-btn:hover { color: var(--seal); text-decoration-color: var(--seal); }
.link-btn.is-danger { color: var(--seal); }
.link-btn.is-danger:hover { color: #8a3830; }
.link-btn:disabled { opacity: 0.35; cursor: not-allowed; text-decoration: none; }

.privacy-note {
  padding: 18px 20px;
  border: 1px dashed var(--line-3);
  border-radius: 12px;
  background: var(--surface-2);
}

.privacy-note p { margin: 0 0 10px; font-size: 0.86rem; line-height: 1.95; color: var(--ink-2); }
.privacy-note p:last-child { margin-bottom: 0; }
.privacy-note b { color: var(--ink); }

/* ------------------------------ 12.11 后台独立布局 ------------------------------ */

.admin-top {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 64px;
  padding: 0 clamp(16px, 3vw, 32px);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.admin-top .brand-icon { width: 34px; height: 34px; border-radius: 9px; }
.admin-top .brand-text b { font-size: 1rem; }

.admin-top-right {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.84rem;
}

.admin-top-link { color: var(--ink-3); text-decoration: none; }
.admin-top-link:hover { color: var(--seal); }

.admin-main-wrap { padding: 0; }

.admin-shell {
  display: grid;
  grid-template-columns: 208px minmax(0, 1fr);
  gap: clamp(20px, 3vw, 44px);
  width: min(1280px, calc(100% - 48px));
  margin-inline: auto;
  padding: 30px 0 70px;
  align-items: start;
}

.admin-side {
  position: sticky;
  top: 94px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.admin-side-title {
  margin: 4px 8px 10px;
  font-size: 0.68rem;
  letter-spacing: 0.24em;
  color: var(--ink-3);
  text-transform: uppercase;
}

.admin-nav { display: grid; gap: 2px; }

.admin-nav-item {
  display: flex;
  align-items: center;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 0.9rem;
  color: var(--ink-2);
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.admin-nav-item:hover { background: var(--surface-2); color: var(--ink); }

.admin-nav-item.is-active {
  background: var(--ink);
  color: #fbf4e6;
  font-weight: 600;
}

.admin-side-foot {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}

.admin-side-note {
  margin: 0;
  font-size: 0.7rem;
  line-height: 1.8;
  color: var(--ink-3);
}

.admin-content { min-width: 0; }

.admin-head { margin-bottom: 26px; }

.admin-title {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-size: clamp(1.5rem, 2.8vw, 2rem);
  font-weight: 600;
  line-height: 1.35;
}

.admin-sub { margin: 0; font-size: 0.88rem; color: var(--ink-2); }

/* 设置页 */
.settings-form { display: grid; gap: 16px; margin-bottom: 18px; }

.settings-card {
  padding: clamp(18px, 2.4vw, 26px);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.settings-h2 {
  margin: 0 0 6px;
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 600;
}

.settings-h3 {
  margin: 22px 0 12px;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  color: var(--ink-3);
  text-transform: uppercase;
}

.channel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
  margin: 16px 0 8px;
}

.channel {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: var(--surface-2);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.channel:hover { border-color: var(--line-3); }
.channel input { position: absolute; opacity: 0; width: 0; height: 0; }

.channel.is-checked {
  border-color: var(--seal);
  background: rgba(169, 73, 63, 0.05);
  box-shadow: 0 0 0 3px rgba(169, 73, 63, 0.08);
}

.channel-body { display: block; }
.channel-body b { display: block; font-size: 0.9rem; color: var(--ink); }
.channel-body small { display: block; margin-top: 3px; font-size: 0.72rem; line-height: 1.6; color: var(--ink-3); }

.settings-group { padding-top: 4px; }
.settings-group[hidden] { display: none; }

.settings-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.settings-hint { font-size: 0.76rem; color: var(--ink-3); }

.test-mail-form { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.test-mail-form input { flex: 1; min-width: 200px; max-width: 320px; }

.test-mail-result {
  margin: 12px 0 0;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.82rem;
  line-height: 1.7;
  border: 1px solid var(--line-2);
  background: var(--surface-2);
  color: var(--ink-2);
}

.test-mail-result.is-ok { border-color: rgba(76, 122, 88, 0.35); background: rgba(76, 122, 88, 0.07); color: #3d6448; }
.test-mail-result.is-error { border-color: rgba(169, 73, 63, 0.35); background: rgba(169, 73, 63, 0.07); color: var(--seal-deep); }

.form-ok {
  margin-bottom: 16px;
  padding: 11px 15px;
  border: 1px solid rgba(76, 122, 88, 0.35);
  background: rgba(76, 122, 88, 0.07);
  border-radius: 10px;
  font-size: 0.85rem;
  color: #3d6448;
}

/* ------------------------------ 13. 响应式 ------------------------------ */

@media (max-width: 1000px) {
  .hero-inner { grid-template-columns: 1fr; gap: 26px; }
  .hero-art { order: -1; }
  .env-svg { max-width: 420px; }
  .hero-stats { margin-top: 30px; }
  .distance-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: 1fr; gap: 26px; }
  .write-grid { grid-template-columns: 1fr; }
  .preview-sticky { position: static; }
  .preview-col { order: -1; }
  .preview-env { aspect-ratio: 16 / 9; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 26px; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-shell { grid-template-columns: 1fr; gap: 16px; }
  .admin-side { position: static; flex-direction: row; align-items: center; overflow-x: auto; padding: 10px; }
  .admin-side-title, .admin-side-foot { display: none; }
  .admin-nav { display: flex; gap: 6px; }
  .admin-nav-item { white-space: nowrap; }
}

@media (max-width: 760px) {
  .container, .nav-inner, .hero-inner, .footer-inner, .footer-bottom {
    width: calc(100% - 36px);
  }
  .nav-inner { height: 66px; gap: 16px; }
  .nav-links { gap: 15px; }
  .nav-link { font-size: 0.84rem; }
  .nav-cta { display: none; }
  .nav-user { padding: 3px; border-color: transparent; background: none; }
  .nav-user-name { display: none; }
  .brand-text i { display: none; }
  .stat-grid { grid-template-columns: 1fr; }
  .admin-bar { gap: 10px; }
  .letter-item { flex-direction: column; align-items: flex-start; gap: 10px; }
  .letter-item-side { flex-direction: row; align-items: center; width: 100%; justify-content: space-between; }
  .hero-title { font-size: clamp(2.1rem, 9vw, 2.9rem); }
  .hero-stats { gap: 20px; }
  .hero-stats dd { font-size: 0.7rem; }
  .promise-grid { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .letter-meta { grid-template-columns: 1fr; }
  .letter-meta > div { display: flex; align-items: baseline; justify-content: space-between; padding: 13px 16px; }
  .letter-meta dd { margin: 0; }
  .countdown { gap: 6px; }
  .lock-form { flex-direction: column; }
  .track-form { flex-direction: column; }
  .form-actions { flex-direction: column; align-items: stretch; }
  .form-note { text-align: center; }
  .footer-inner { grid-template-columns: 1fr; gap: 22px; }
  .paper { padding: 26px 20px; }
  .paper-body { font-size: 1rem; line-height: 2; }
}

@media (max-width: 420px) {
  .nav-links { gap: 14px; }
  .hero-actions .btn { width: 100%; }
}

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