/* 星雨 · 夜空与雨 */
:root {
  --paper: #f7f1e2;
  --paper-raised: #fffdf6;
  --paper-sunk: #f2e9d5;
  --ink: #2a231a;
  --ink-2: #6d6152;
  --ink-3: #9a8f7e;
  --line: #e4d8c2;
  --line-soft: #ede3cf;
  --seal: #4a4a7a;
  --seal-deep: #33325a;
  --seal-wash: rgba(74, 74, 122, 0.08);
  --danger: #9c3b2e;
  --danger-wash: rgba(156, 59, 46, 0.08);
  --shadow-sm: 0 1px 2px rgba(43, 39, 35, 0.05);
  --shadow: 0 2px 4px rgba(43, 39, 35, 0.04), 0 18px 40px -22px rgba(43, 39, 35, 0.35);
  --radius: 16px;
  --serif: "Songti SC", "Source Han Serif SC", "Noto Serif SC", "STSong", "SimSun", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100%;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.78;
  background:
    radial-gradient(900px 520px at 50% -12%, rgba(255, 253, 246, 0.6) 0%, rgba(255, 253, 246, 0) 62%),
    url('./bg-stars.jpg?v=1') center top / cover no-repeat,
    var(--paper);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='160' height='160' filter='url(%23n)' opacity='0.22'/></svg>");
  mix-blend-mode: multiply;
}

/* ---------- 顶栏 ---------- */
.site-head {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px clamp(16px, 5vw, 40px);
  backdrop-filter: blur(12px) saturate(1.1);
  background: linear-gradient(to bottom, rgba(246, 241, 230, 0.92), rgba(246, 241, 230, 0.72));
  border-bottom: 1px solid rgba(227, 217, 199, 0.7);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}

.brand-seal {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 7px;
  background: var(--seal);
  color: #fff8f0;
  font-size: 17px;
  line-height: 1;
  letter-spacing: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18), 0 2px 6px rgba(140, 47, 37, 0.25);
}

.brand-name {
  font-size: 19px;
  letter-spacing: 0.26em;
  margin-right: -0.26em;
}

.site-nav {
  display: flex;
  gap: 4px;
}

.site-nav button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink-2);
  font-family: var(--serif);
  font-size: 15px;
  letter-spacing: 0.12em;
  padding: 7px 13px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
}

.site-nav button:hover { color: var(--ink); background: rgba(255, 253, 247, 0.9); }
.site-nav button.active { color: var(--seal); background: var(--seal-wash); }

/* ---------- 容器 ---------- */
.view {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
  margin: 0 auto;
  padding: clamp(28px, 6vw, 64px) clamp(18px, 5vw, 28px) 72px;
  min-height: calc(100vh - 240px);
}

/* ---------- 首页 ---------- */
.hero { text-align: center; padding: 20px 0 clamp(30px, 5vw, 48px); }

.hero-seal {
  width: 62px;
  height: 62px;
  margin: 0 auto 22px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(160deg, #5b5b92, #33325a);
  color: #fff6ec;
  font-size: 34px;
  letter-spacing: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2), 0 14px 28px -14px rgba(140, 47, 37, 0.7);
}

.hero h1 {
  margin: 0;
  font-size: clamp(38px, 10vw, 54px);
  font-weight: 500;
  letter-spacing: 0.3em;
  margin-right: -0.3em;
  line-height: 1.2;
}

.hero .tagline {
  margin: 14px 0 0;
  color: var(--seal);
  font-size: 15px;
  letter-spacing: 0.22em;
  margin-right: -0.22em;
}

.hero .lede {
  margin: 20px auto 0;
  max-width: 30em;
  color: var(--ink-2);
  font-size: 17px;
  line-height: 2;
}

.cta-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

/* ---------- 按钮 ---------- */
.btn {
  appearance: none;
  font-family: var(--serif);
  font-size: 16px;
  letter-spacing: 0.14em;
  padding: 12px 26px;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  border: 1px solid var(--line);
  background: var(--paper-raised);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.btn:hover { border-color: #cfc1a8; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn.primary {
  background: linear-gradient(165deg, #56568c, #33325a);
  border-color: transparent;
  color: #fff7ee;
  box-shadow: 0 10px 22px -12px rgba(140, 47, 37, 0.85);
}
.btn.primary:hover { background: linear-gradient(165deg, #b84a3a, #953327); }
.btn.ghost { background: transparent; box-shadow: none; }
.btn.ghost:hover { background: rgba(255, 253, 247, 0.8); }
.btn.small { font-size: 14px; padding: 8px 16px; letter-spacing: 0.1em; }
.btn.danger { color: var(--danger); border-color: rgba(156, 59, 46, 0.3); }
.btn.danger:hover { background: var(--danger-wash); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; transform: none; }

.linkish {
  appearance: none;
  border: 0;
  background: none;
  padding: 0;
  font-family: var(--serif);
  font-size: 14px;
  color: var(--ink-2);
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.linkish:hover { color: var(--seal); border-color: rgba(74, 74, 122, 0.4); }

/* ---------- 区块标题 ---------- */
.sec-title {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: clamp(40px, 7vw, 64px) 0 20px;
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.24em;
  color: var(--ink-3);
}
.sec-title::before,
.sec-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--line), transparent);
}

/* ---------- 场景卡 ---------- */
.cards { display: grid; gap: 12px; }

.card {
  position: relative;
  padding: 22px 24px 22px 22px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 253, 247, 0.95), rgba(255, 253, 247, 0.6));
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 18px;
  bottom: 18px;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(to bottom, rgba(74, 74, 122, 0.55), rgba(74, 74, 122, 0.06));
}

.card-no {
  display: block;
  font-size: 13px;
  letter-spacing: 0.3em;
  color: var(--seal);
  opacity: 0.85;
}

.card h3 {
  margin: 6px 0 8px;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 0.14em;
}

.card p { margin: 0; color: var(--ink-2); font-size: 15px; }

/* ---------- 特点 ---------- */
.traits {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.traits li {
  font-size: 14px;
  letter-spacing: 0.1em;
  color: var(--ink-2);
  padding: 6px 15px;
  border: 1px dashed var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 247, 0.55);
}

/* ---------- 提示 ---------- */
.notice {
  margin-top: clamp(36px, 6vw, 56px);
  padding: 20px 22px;
  border-radius: var(--radius);
  border: 1px solid rgba(74, 74, 122, 0.16);
  background: linear-gradient(180deg, rgba(74, 74, 122, 0.05), rgba(74, 74, 122, 0.015));
}

.notice h4 {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--seal);
}

.notice ul { margin: 0; padding-left: 1.15em; color: var(--ink-2); font-size: 14.5px; }
.notice li + li { margin-top: 4px; }

/* ---------- 页头（内页） ---------- */
.page-head { margin-bottom: 26px; }

.page-head h2 {
  margin: 0;
  font-size: 27px;
  font-weight: 500;
  letter-spacing: 0.2em;
}

.page-head p {
  margin: 8px 0 0;
  color: var(--ink-2);
  font-size: 15px;
}

.back-row { margin-bottom: 18px; }

/* ---------- 表单 ---------- */
.paper-form {
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #fffdf8, #fffcf4);
  box-shadow: var(--shadow);
}

.field { margin-bottom: 20px; }
.field:last-of-type { margin-bottom: 0; }

.field label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  font-size: 15px;
  letter-spacing: 0.14em;
  margin-bottom: 8px;
}

.field label .hint {
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: var(--ink-3);
  font-weight: 400;
}

.field input[type="text"],
.field input[type="password"],
.field textarea {
  width: 100%;
  font-family: var(--serif);
  font-size: 16px;
  color: var(--ink);
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper-sunk);
  outline: none;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
  -webkit-appearance: none;
}

.field input::placeholder,
.field textarea::placeholder { color: #b3a99b; }

.field input:focus,
.field textarea:focus {
  border-color: rgba(74, 74, 122, 0.45);
  background: #fffdf8;
  box-shadow: 0 0 0 3px rgba(74, 74, 122, 0.08);
}

.field textarea {
  min-height: 190px;
  resize: vertical;
  line-height: 2;
}

.counter {
  display: block;
  text-align: right;
  font-size: 12.5px;
  color: var(--ink-3);
  margin-top: 6px;
}

.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: rgba(241, 234, 217, 0.45);
}

.switch-row .switch-label { font-size: 15px; letter-spacing: 0.1em; }
.switch-row .switch-desc { font-size: 13px; color: var(--ink-3); letter-spacing: 0.02em; }

.switch {
  position: relative;
  flex: none;
  width: 46px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #e7dfcf;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fffdf7;
  box-shadow: 0 1px 3px rgba(43, 39, 35, 0.25);
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.switch[aria-checked="true"] { background: var(--seal); border-color: var(--seal); }
.switch[aria-checked="true"]::after { transform: translateX(20px); }

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 26px;
}

.form-note {
  margin: 16px 0 0;
  font-size: 13px;
  color: var(--ink-3);
  line-height: 1.8;
}

.error-line {
  margin: 14px 0 0;
  font-size: 14px;
  color: var(--seal);
  letter-spacing: 0.04em;
  min-height: 1.4em;
}

/* ---------- 分享提示条 ---------- */
.share-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  margin-bottom: 20px;
  border-radius: 12px;
  border: 1px solid rgba(74, 74, 122, 0.18);
  background: var(--seal-wash);
  font-size: 14px;
  color: var(--ink-2);
}

.share-banner strong { color: var(--seal); font-weight: 500; }

/* ---------- 笺纸 ---------- */
.letter {
  position: relative;
  padding: clamp(26px, 5vw, 42px) clamp(22px, 5vw, 40px) clamp(20px, 4vw, 30px);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, #fffdf8 0%, #fffdf6 60%, #fdf9ef 100%);
  box-shadow: var(--shadow);
}

.letter::after {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(227, 217, 199, 0.55);
  border-radius: 10px;
  pointer-events: none;
}

.letter-head {
  text-align: center;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line-soft);
}

.letter-name {
  font-size: clamp(25px, 6vw, 32px);
  letter-spacing: 0.24em;
  margin-right: -0.24em;
  line-height: 1.4;
}

.letter-meta {
  margin-top: 6px;
  font-size: 12.5px;
  letter-spacing: 0.16em;
  color: var(--ink-3);
}

.letter-body {
  margin-top: 26px;
  font-size: 17px;
  line-height: 2.05;
  color: #322c26;
  word-break: break-word;
  white-space: pre-wrap;
}

.letter-foot {
  margin-top: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--ink-3);
  font-size: 12.5px;
  letter-spacing: 0.2em;
}

.letter-tools {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 22px;
}

/* ---------- 留言 ---------- */
.whisper-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 40px 0 18px;
  font-size: 14px;
  letter-spacing: 0.22em;
  color: var(--ink-3);
}
.whisper-head::before,
.whisper-head::after {
  content: "";
  height: 1px;
  flex: 1;
  background: linear-gradient(to right, transparent, var(--line), transparent);
}

.whisper-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }

.whisper {
  padding: 14px 18px;
  border-radius: 4px 14px 14px 14px;
  background: rgba(255, 253, 247, 0.9);
  border: 1px solid var(--line-soft);
  font-size: 15.5px;
  color: #3a332c;
  word-break: break-word;
  white-space: pre-wrap;
}

.whisper time {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--ink-3);
}

.whisper-empty {
  padding: 26px 18px;
  text-align: center;
  color: var(--ink-3);
  font-size: 14.5px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: rgba(255, 253, 247, 0.4);
}

.reply-box { margin-top: 16px; }
.reply-box form { display: flex; flex-direction: column; gap: 10px; }

.reply-box textarea {
  width: 100%;
  min-height: 84px;
  font-family: var(--serif);
  font-size: 15.5px;
  line-height: 1.9;
  color: var(--ink);
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper-sunk);
  resize: vertical;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.reply-box textarea:focus {
  border-color: rgba(74, 74, 122, 0.45);
  background: #fffdf8;
  box-shadow: 0 0 0 3px rgba(74, 74, 122, 0.08);
}
.reply-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.reply-actions .tip { font-size: 12.5px; color: var(--ink-3); }

/* ---------- 结果卡 ---------- */
.result {
  text-align: center;
  padding: clamp(30px, 6vw, 48px) clamp(20px, 5vw, 40px);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #fffdf8, #fdf8ec);
  box-shadow: var(--shadow);
}

.result .stamp {
  width: 78px;
  height: 78px;
  margin: 0 auto 20px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  border: 2px solid rgba(74, 74, 122, 0.6);
  color: var(--seal);
  font-size: 30px;
  letter-spacing: 0;
  transform: rotate(-4deg);
  background: rgba(74, 74, 122, 0.05);
}

.result h2 {
  margin: 0;
  font-size: 25px;
  font-weight: 500;
  letter-spacing: 0.24em;
  margin-right: -0.24em;
}

.result .sub { margin: 10px auto 0; max-width: 26em; color: var(--ink-2); font-size: 15px; }

.code-card {
  margin: 26px auto 0;
  max-width: 380px;
  padding: 18px 20px;
  border-radius: 12px;
  border: 1px dashed rgba(74, 74, 122, 0.32);
  background: rgba(74, 74, 122, 0.045);
  text-align: left;
}

.code-card .code-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 14px;
  padding: 3px 0;
}
.code-card .code-row span { color: var(--ink-3); letter-spacing: 0.14em; flex: none; width: 4.2em; }
.code-card .code-row b { font-weight: 500; letter-spacing: 0.08em; word-break: break-all; }

.code-card .code-hide {
  margin-top: 10px;
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 26px;
}

/* ---------- 我的笺 ---------- */
.mine-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }

.mine-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: linear-gradient(180deg, #fffdf8, #fffcf3);
  box-shadow: var(--shadow-sm);
}

.mine-main { flex: 1; min-width: 0; }

.mine-name {
  font-size: 18px;
  letter-spacing: 0.14em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mine-meta {
  margin-top: 3px;
  font-size: 12.5px;
  color: var(--ink-3);
  letter-spacing: 0.06em;
}

.mine-actions { display: flex; gap: 8px; flex: none; }

.mine-actions .icon-btn {
  appearance: none;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-2);
  font-family: var(--serif);
  font-size: 13.5px;
  letter-spacing: 0.08em;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.16s ease;
}
.mine-actions .icon-btn:hover { color: var(--seal); border-color: rgba(74, 74, 122, 0.35); background: var(--seal-wash); }

.empty {
  text-align: center;
  padding: 56px 20px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--ink-3);
  background: rgba(255, 253, 247, 0.4);
}
.empty p { margin: 0 0 18px; font-size: 15px; }

/* ---------- 页脚 ---------- */
.site-foot {
  position: relative;
  z-index: 1;
  padding: 34px 20px 46px;
  text-align: center;
  border-top: 1px solid rgba(227, 217, 199, 0.75);
}
.foot-line { margin: 0; font-size: 13.5px; color: var(--ink-3); letter-spacing: 0.14em; }
.foot-fine { margin: 6px 0 0; font-size: 12px; color: #b3a99a; letter-spacing: 0.04em; }

/* ---------- 忙碌 / 提示 ---------- */
.busy {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  background: rgba(246, 241, 230, 0.86);
  backdrop-filter: blur(6px);
  animation: fade 0.2s ease;
}

.busy-seal {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--seal);
  color: #fff7ee;
  font-size: 28px;
  animation: breathe 1.1s ease-in-out infinite;
}

.busy p { margin: 0; font-size: 14px; letter-spacing: 0.24em; color: var(--ink-2); }

@keyframes breathe {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(74, 74, 122, 0.25); }
  50% { transform: scale(1.06); box-shadow: 0 0 0 14px rgba(74, 74, 122, 0); }
}

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.toast {
  position: fixed;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  z-index: 70;
  padding: 10px 20px;
  border-radius: 999px;
  background: rgba(43, 39, 35, 0.92);
  color: #f9f4e9;
  font-size: 14px;
  letter-spacing: 0.08em;
  box-shadow: 0 12px 30px -12px rgba(43, 39, 35, 0.7);
  animation: rise 0.24s ease;
  max-width: min(88vw, 420px);
  text-align: center;
}

@keyframes rise {
  from { opacity: 0; transform: translate(-50%, 10px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* ---------- 弹层 ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(43, 39, 35, 0.32);
  backdrop-filter: blur(4px);
  animation: fade 0.18s ease;
}

.modal-card {
  width: min(400px, 100%);
  padding: 26px 26px 20px;
  border-radius: var(--radius);
  background: var(--paper-raised);
  box-shadow: 0 30px 60px -24px rgba(43, 39, 35, 0.5);
  border: 1px solid var(--line-soft);
}

.modal-card h3 { margin: 0 0 8px; font-size: 19px; font-weight: 500; letter-spacing: 0.14em; }
.modal-card p { margin: 0; color: var(--ink-2); font-size: 14.5px; line-height: 1.85; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.modal-actions .btn { padding: 9px 20px; font-size: 15px; }

/* ---------- 响应式 ---------- */
@media (max-width: 640px) {
  .site-head { padding: 12px 16px; }
  .brand-name { font-size: 17px; }
  .site-nav button { padding: 7px 10px; font-size: 14px; letter-spacing: 0.06em; }
  .hero { padding-top: 12px; }
  .hero .lede { font-size: 16px; }
  .card { padding: 18px 18px 18px 18px; }
  .letter-body { font-size: 16.5px; }
  .mine-item { flex-wrap: wrap; }
  .mine-actions { width: 100%; justify-content: flex-end; }
  .reply-actions { flex-direction: column; align-items: flex-start; }
  .reply-actions .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001s !important; transition-duration: 0.001s !important; }
}

/* ---------- 照片 ---------- */
.photo-pick { margin: 4px 0 14px; }

.photo-hint {
  margin-left: 10px;
  font-size: 13px;
  color: var(--ink-3);
  font-family: var(--sans);
}

.photo-previews { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.photo-previews:empty { display: none; }

.photo-thumb {
  position: relative;
  width: 84px; height: 84px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  background: var(--paper-sunk);
}
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.photo-remove {
  position: absolute; top: 2px; right: 2px;
  width: 20px; height: 20px;
  border: none; border-radius: 50%;
  background: rgba(43, 39, 35, 0.72);
  color: #fffdf7;
  font-size: 13px; line-height: 1;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  padding: 0;
}
.photo-remove:hover { background: var(--danger); }

.photo-grid {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin: 12px 0 4px;
}
.photo-cell {
  width: 108px; height: 108px;
  padding: 0; border: 1px solid var(--line);
  border-radius: 10px; overflow: hidden;
  cursor: zoom-in;
  background: var(--paper-sunk);
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease;
}
.photo-cell:hover { transform: translateY(-2px); }
.photo-cell img { width: 100%; height: 100%; object-fit: cover; display: block; }

.whisper .photo-grid { margin: 6px 0 4px; }
.whisper .photo-cell { width: 84px; height: 84px; }

.lightbox {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(28, 24, 18, 0.9);
  display: flex; align-items: center; justify-content: center;
  cursor: zoom-out;
  animation: lb-in 0.18s ease;
}
.lightbox img {
  max-width: 92vw; max-height: 92vh;
  border-radius: 8px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}
@keyframes lb-in { from { opacity: 0; } to { opacity: 1; } }

@media (max-width: 640px) {
  .photo-cell { width: 88px; height: 88px; }
  .photo-hint { display: block; margin: 6px 0 0; }
}

/* ---------- 火漆信封 ---------- */
.env-sec { margin-top: 60px; text-align: center; }

.env-hint {
  font-size: 14px;
  color: var(--ink-3);
  font-family: var(--sans);
  margin: 4px 0 24px;
}

.env-scene {
  width: min(480px, 92%);
  margin: 0 auto;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  outline-offset: 8px;
}
.env-scene:focus-visible .env-back { box-shadow: 0 0 0 3px rgba(74, 74, 122, 0.28); }

.env { position: relative; height: 216px; perspective: 1000px; }

.env-back, .env-front, .env-flap { position: absolute; left: 0; right: 0; }

.env-back {
  top: 0; bottom: 0; z-index: 1;
  background: linear-gradient(180deg, #eee5d0, #e5d9bf);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.env-front {
  top: 0; bottom: 0; z-index: 3;
  background: linear-gradient(180deg, #fcf8ee, #f4ecda);
  border-radius: 12px;
  clip-path: polygon(0 0, 50% 55%, 100% 0, 100% 100%, 0 100%);
  filter: drop-shadow(0 10px 18px rgba(43, 39, 35, 0.10));
}

.env-flap {
  top: 0; height: 55%; z-index: 4;
  background: linear-gradient(180deg, #f8f1e0, #eee4cd);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  border-radius: 12px 12px 0 0;
  transform-origin: top center;
  transition: transform 0.55s cubic-bezier(0.55, 0.06, 0.3, 1);
}
.env-sec.open .env-flap { transform: rotateX(180deg); z-index: 1; }

.env-seal {
  position: absolute; left: 50%; top: 55%; z-index: 5;
  transform: translate(-50%, -50%);
  width: 66px; height: 66px; border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, #6d6dab, #4a4a7a 55%, #31305a);
  color: #f7f1e2;
  display: flex; align-items: center; justify-content: center;
  font-size: 31px; font-family: var(--serif);
  box-shadow: 0 5px 14px rgba(49, 48, 90, 0.38), inset 0 2px 5px rgba(255, 255, 255, 0.28), inset 0 -3px 6px rgba(0, 0, 0, 0.22);
  transition: transform 0.5s ease, opacity 0.5s ease;
  pointer-events: none;
}
.env-sec.open .env-seal { transform: translate(-50%, calc(-50% + 48px)) scale(0.55); opacity: 0; }

.env-letter-wrap {
  display: grid; grid-template-rows: 0fr;
  transition: grid-template-rows 0.7s ease;
  width: min(580px, 94%);
  margin: 0 auto;
}
.env-sec.open .env-letter-wrap { grid-template-rows: 1fr; }
.env-letter-clip { overflow: hidden; min-height: 0; }

.env-letter {
  margin: 30px auto 0;
  text-align: left;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 32px 36px 26px;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.55s ease 0.3s, transform 0.55s ease 0.3s;
}
.env-sec.open .env-letter { opacity: 1; transform: translateY(0); }

.env-greet { font-size: 20px; margin: 0 0 16px; color: var(--ink); }

.env-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; }
.env-tags span {
  background: var(--paper-sunk);
  border: 1px solid var(--line-soft);
  padding: 4px 13px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--ink-2);
  font-family: var(--sans);
}

.env-letter h4 {
  margin: 0 0 10px;
  color: var(--seal);
  font-size: 15px;
  letter-spacing: 0.12em;
}
.env-letter ul {
  margin: 0 0 20px;
  padding-left: 20px;
  color: var(--ink-2);
  font-size: 14.5px;
  line-height: 1.9;
}
.env-letter li { margin-bottom: 6px; }

.env-end { font-size: 15px; color: var(--ink); margin: 0 0 10px; }
.env-sign { text-align: right; color: var(--ink-3); font-size: 14px; margin: 0; }

@media (max-width: 640px) {
  .env { height: 170px; }
  .env-seal { width: 56px; height: 56px; font-size: 26px; }
  .env-letter { padding: 24px 20px 20px; }
}

/* ---------- 信中三景 ---------- */
.env-scenes { margin: 0 0 24px; display: grid; gap: 12px; }
.env-scene-row {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 12px 16px;
  background: var(--paper-sunk);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
}
.env-scene-row .no {
  flex: none;
  font-family: var(--serif);
  color: var(--seal);
  font-size: 15px;
  padding-top: 2px;
}
.env-scene-row b {
  display: block;
  font-size: 16px;
  letter-spacing: 0.04em;
  color: var(--ink);
  margin-bottom: 2px;
}
.env-scene-row p { margin: 0; font-size: 14px; color: var(--ink-2); line-height: 1.8; }
