:root {
  --bg: #f3eee5;
  --paper: #fffdf8;
  --paper-2: #fffefa;
  --wash: #faf7f1;
  --line: #e7dfd1;
  --line-strong: #dcd3c5;
  --ink: #1e293b;
  --ink-2: #334155;
  --body-ink: #322e27;
  --muted: #7d7465;
  --faint: #a89e8c;
  --gold: #aa8149;
  --amber: #f5c75f;
  --amber-deep: #e9b53f;
  --dark: #171e2b;
  --danger: #b4443a;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --serif: "Songti SC", "Noto Serif SC", "Source Han Serif SC", "SimSun", Georgia, serif;
  --shadow: 0 18px 48px -34px rgba(51, 43, 32, .75);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background-color: var(--bg);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.6;
  position: relative;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: .5;
  background-image:
    linear-gradient(rgba(84, 72, 54, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(84, 72, 54, .035) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: linear-gradient(180deg, #000, transparent 80%);
}
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }

.shell { position: relative; z-index: 1; max-width: 1080px; margin: 0 auto; padding: 0 20px 90px; }

/* ── 顶部导航 ───────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 253, 248, .88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(220, 211, 197, .7);
}
.topbar-inner {
  max-width: 1080px; margin: 0 auto; padding: 0 20px;
  height: 64px; display: flex; align-items: center; gap: 14px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 12px; background: var(--dark);
  display: grid; place-items: center;
  box-shadow: 0 5px 14px -8px rgba(23, 30, 43, .9);
}
.brand-mark svg { width: 22px; height: 22px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-name { font-size: 15px; font-weight: 700; letter-spacing: .02em; }
.brand-sub { font-size: 9px; letter-spacing: .18em; color: var(--faint); text-transform: uppercase; }
.nav { display: flex; align-items: center; gap: 26px; margin-left: auto; }
.nav a { font-size: 13px; color: #6d665a; transition: color .2s; white-space: nowrap; }
.nav a:hover, .nav a.on { color: var(--ink); font-weight: 600; }
.nav a.on { position: relative; }
.nav a.on::after {
  content: ""; position: absolute; left: 50%; bottom: -21px; transform: translateX(-50%);
  width: 5px; height: 5px; border-radius: 50%; background: var(--gold);
}
.top-actions { display: flex; align-items: center; gap: 10px; margin-left: 12px; }
.lang-switch { font-size: 11px; color: var(--muted); letter-spacing: .04em; }
.btn-login {
  background: var(--dark); color: #fff; border: 0; border-radius: 999px;
  padding: 9px 19px; font-size: 12px; font-weight: 600; letter-spacing: .04em;
  transition: transform .2s, background .2s;
}
.btn-login:hover { transform: translateY(-1px); background: #26314a; }

/* ── 通用标题区 ─────────────────────────── */
.hero { padding: 52px 4px 26px; }
.hero-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.eyebrow {
  display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .18em;
  color: var(--gold); margin-bottom: 10px;
}
.hero h1 { margin: 0 0 8px; font-size: 32px; line-height: 1.35; font-weight: 700; letter-spacing: -.02em; }
.hero p { margin: 0; font-size: 13.5px; color: var(--muted); line-height: 1.8; }
.hero-side { display: flex; gap: 8px; align-items: center; flex-shrink: 0; padding-bottom: 4px; }
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid rgba(255, 255, 255, .9); background: rgba(255, 255, 255, .65);
  border-radius: 999px; padding: 6px 11px; font-size: 10.5px; color: var(--muted);
}
.dot { width: 6px; height: 6px; border-radius: 50%; background: #34a06a; display: inline-block; }
.dot.warn { background: var(--amber-deep); }

/* ── 信纸编辑器 ─────────────────────────── */
.composer {
  background: var(--paper); border: 1px solid var(--line); border-radius: 22px;
  box-shadow: var(--shadow); padding: 22px 26px 10px;
}
.title-input {
  width: 100%; border: 0; outline: 0; background: transparent;
  font-size: 22px; font-weight: 600; letter-spacing: -.01em; color: var(--ink);
  padding: 2px 0 14px;
}
.title-input::placeholder { color: #c9c0af; font-weight: 400; }
.toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 8px 0;
}
.tool {
  height: 29px; min-width: 29px; padding: 0 7px; border: 0; border-radius: 8px;
  background: transparent; color: #8a8172; font-size: 12px;
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  transition: background .15s, color .15s;
}
.tool:hover { background: #f4efe5; color: var(--ink); }
.tool.on { background: #f9eedb; color: #8a6323; }
.tool.bold { font-weight: 800; }
.tool.italic { font-style: italic; font-family: Georgia, serif; }
.tool.underline { text-decoration: underline; }
.tool-sep { width: 1px; height: 18px; background: var(--line-strong); margin: 0 5px; }
.tool-select {
  height: 29px; border: 1px solid var(--line-strong); background: #faf7f1;
  border-radius: 8px; padding: 0 6px; font-size: 11px; color: #6b6355; outline: 0;
}
.editor {
  min-height: 320px; outline: 0; padding: 18px 2px 22px;
  font-family: var(--serif); font-size: 16px; line-height: 2; color: var(--body-ink);
  word-break: break-word;
}
.editor:empty::before { content: attr(data-placeholder); color: #c4bbab; }
.editor p { margin: 0 0 .7em; }
.editor img { max-width: 100%; border-radius: 8px; margin: 8px 0; }
.editor blockquote { border-left: 2px solid var(--line-strong); padding-left: 14px; color: var(--muted); margin: .8em 0; }
.composer-foot {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  border-top: 1px solid var(--line); padding: 11px 0 12px;
  font-size: 11px; color: var(--faint);
}
.composer-foot select {
  border: 1px solid var(--line-strong); background: #faf7f1; border-radius: 8px;
  padding: 5px 8px; font-size: 11px; color: var(--muted); outline: 0;
}
.counter.over { color: var(--danger); font-weight: 700; }
.draft-note {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: #fffbeb; border: 1px solid #f0dfae; border-radius: 12px;
  padding: 10px 14px; margin-bottom: 14px; font-size: 12px; color: #7c6427;
}
.draft-note button {
  border: 0; background: transparent; color: #7c6427; font-size: 12px;
  text-decoration: underline; text-underline-offset: 3px;
}

/* ── 编号设置卡片 ───────────────────────── */
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: 18px;
  padding: 20px 22px; box-shadow: 0 12px 36px -32px rgba(51, 43, 32, .8);
}
.card--tall { grid-row: span 2; }
.card--wide { grid-column: 1 / -1; }
.card-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.badge {
  width: 29px; height: 29px; border-radius: 50%; background: var(--dark); color: #fff;
  display: grid; place-items: center; font-size: 10.5px; font-weight: 700; flex-shrink: 0;
  letter-spacing: .02em;
}
.card h3 { margin: 1px 0 2px; font-size: 14px; font-weight: 700; }
.card .sub { margin: 0; font-size: 11px; color: var(--faint); }
.field-name { display: block; font-size: 11.5px; color: #6e675b; margin-bottom: 7px; font-weight: 500; }
.input, .select {
  width: 100%; border: 1px solid var(--line-strong); border-radius: 10px;
  background: #fffefa; padding: 9px 12px; font-size: 13px; outline: 0;
  transition: border-color .2s, box-shadow .2s;
}
.input:focus, .select:focus { border-color: #d6b36a; box-shadow: 0 0 0 3px rgba(214, 179, 106, .16); }
.input::placeholder { color: #bdb4a3; }
.two-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.help-link {
  display: inline-block; margin-top: 12px; font-size: 11px; color: var(--gold);
  border-bottom: 1px dashed #d3bd94; padding-bottom: 1px;
}
.hint { margin: 10px 0 0; font-size: 11px; color: var(--faint); line-height: 1.75; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; margin: 12px 0 0; }
.chip {
  border: 1px solid var(--line-strong); background: #fffdf8; border-radius: 999px;
  padding: 5px 12px; font-size: 11px; color: #6b6355;
  transition: background .18s, color .18s, border-color .18s, transform .18s;
}
.chip:hover { transform: translateY(-1px); border-color: #cdbb9f; }
.chip.on { background: var(--dark); color: #fff; border-color: var(--dark); }
.chips-divider { height: 1px; background: var(--line); margin: 16px 0 12px; }
.chips-label { font-size: 11px; color: var(--faint); }
.toggle-row { display: flex; gap: 9px; flex-wrap: wrap; }
.toggle {
  display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid var(--line-strong); background: #fffdf8; border-radius: 999px;
  padding: 8px 16px; font-size: 12px; color: #6b6355;
}
.toggle.on { background: var(--dark); border-color: var(--dark); color: #fff; }
.toggle .mark { font-size: 12px; opacity: .75; }
.fee-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.fee-amount { font-size: 26px; font-weight: 700; color: var(--gold); letter-spacing: -.02em; }
.fee-amount small { font-size: 12px; font-weight: 500; margin-left: 4px; }
.fee-note { font-size: 11.5px; color: var(--muted); line-height: 1.8; max-width: 560px; }

/* ── 底部封缄条 ─────────────────────────── */
.sealbar {
  margin-top: 16px; background: var(--dark); color: #fff; border-radius: 20px;
  padding: 18px 24px; display: flex; align-items: center; justify-content: space-between; gap: 18px;
  box-shadow: 0 20px 46px -34px rgba(23, 30, 43, .95);
}
.sealbar h4 { margin: 0 0 3px; font-size: 15px; font-weight: 700; }
.sealbar p { margin: 0; font-size: 11px; color: #9aa4b5; }
.seal-actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.btn-ghost-light {
  border: 1px solid rgba(255, 255, 255, .22); background: transparent; color: #dfe4ec;
  border-radius: 999px; padding: 10px 18px; font-size: 12px;
}
.btn-ghost-light:hover { background: rgba(255, 255, 255, .08); }
.btn-primary {
  border: 0; background: var(--amber); color: #2b2110; font-weight: 700;
  border-radius: 999px; padding: 11px 24px; font-size: 13px; letter-spacing: .04em;
  box-shadow: 0 8px 20px -10px rgba(245, 199, 95, .9);
  transition: transform .18s, background .18s;
}
.btn-primary:hover { transform: translateY(-1px); background: #ffd271; }
.btn-primary:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.error { margin: 12px 4px 0; color: var(--danger); font-size: 12.5px; }

/* ── 封缄成功 ───────────────────────────── */
.center-card {
  max-width: 620px; margin: 60px auto 0; background: var(--paper);
  border: 1px solid var(--line); border-radius: 22px; padding: 44px 40px;
  text-align: center; box-shadow: var(--shadow);
}
.seal-stamp {
  width: 64px; height: 64px; margin: 0 auto 22px; border-radius: 50%;
  border: 2px solid #b4443a; color: #b4443a; display: grid; place-items: center;
  font-family: var(--serif); font-size: 28px; transform: rotate(-11deg);
  box-shadow: inset 0 0 0 3px var(--paper), inset 0 0 0 4px rgba(180, 68, 58, .45);
}
.center-card h2 { margin: 0 0 8px; font-size: 22px; }
.center-card .sub { margin: 0 0 26px; color: var(--muted); font-size: 13px; }
.link-box { display: flex; gap: 8px; margin: 0 0 14px; }
.link-box input {
  flex: 1; min-width: 0; border: 1px solid var(--line-strong); border-radius: 10px;
  background: var(--wash); padding: 10px 12px; font-size: 12px; color: var(--ink-2);
}
.btn-ghost {
  border: 1px solid var(--line-strong); background: var(--paper); border-radius: 10px;
  padding: 10px 16px; font-size: 12px; white-space: nowrap;
}
.btn-ghost:hover { background: var(--wash); }
.code-box {
  display: inline-block; margin: 4px 0 18px; padding: 10px 20px;
  border: 1px dashed #d6b36a; border-radius: 10px; background: #fffaf0;
  font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 20px;
  letter-spacing: .22em; color: #8a6323;
}
.note { font-size: 12px; color: var(--muted); line-height: 1.9; text-align: left; }
.center-actions { display: flex; justify-content: center; gap: 10px; margin-top: 24px; flex-wrap: wrap; }

/* ── 公开信墙 ───────────────────────────── */
.wall-tools {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  background: var(--paper); border: 1px solid var(--line); border-radius: 16px;
  padding: 14px 16px; margin-bottom: 18px;
}
.search-input { flex: 1; min-width: 200px; border: 0; outline: 0; background: transparent; font-size: 13px; }
.search-input::placeholder { color: #b7ad9c; }
.scene-filters { display: flex; flex-wrap: wrap; gap: 7px; margin: 0 0 20px; }
.section-heading {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin: 26px 2px 14px; font-size: 13px; font-weight: 700;
}
.section-heading .sub { font-size: 11px; font-weight: 400; color: var(--faint); }
.letter-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.letter-card {
  position: relative; display: flex; flex-direction: column; gap: 10px;
  min-height: 190px; background: var(--paper); border: 1px solid var(--line-strong);
  border-radius: 18px; padding: 22px 24px; overflow: hidden;
  box-shadow: 0 20px 50px -40px rgba(51, 43, 32, .8);
  transition: transform .22s, border-color .22s, box-shadow .22s;
}
.letter-card:hover { transform: translateY(-3px); border-color: #cdbb9f; box-shadow: 0 26px 56px -38px rgba(51, 43, 32, .7); }
.letter-card::after {
  content: ""; position: absolute; right: -28px; top: -28px; width: 92px; height: 92px;
  border-radius: 50%; border: 1px solid rgba(170, 129, 73, .16);
}
.card-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tag {
  font-size: 10px; letter-spacing: .08em; padding: 3px 9px; border-radius: 999px;
  background: #f3eee5; color: var(--gold); white-space: nowrap;
}
.tag.delivered { background: #eef4ee; color: #4b7a58; }
.tag.scene { background: #f9eedb; color: #8a6323; }
.letter-card h3 { margin: 2px 0 0; font-size: 16px; font-weight: 700; line-height: 1.5; }
.letter-card .excerpt {
  margin: 0; font-family: var(--serif); font-size: 13px; line-height: 1.9;
  color: #655d50; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.card-foot { display: flex; justify-content: space-between; gap: 10px; font-size: 10.5px; color: var(--faint); border-top: 1px solid var(--line); padding-top: 10px; }
.empty {
  grid-column: 1 / -1; text-align: center; padding: 70px 20px; color: var(--faint);
  background: var(--paper); border: 1px dashed var(--line-strong); border-radius: 18px;
}
.empty h3 { color: var(--ink-2); font-size: 15px; margin: 0 0 8px; }

/* ── 取信页 ─────────────────────────────── */
.letter-sheet {
  max-width: 720px; margin: 40px auto 0; background: var(--paper);
  border: 1px solid var(--line-strong); border-radius: 20px;
  padding: 40px 44px 34px; box-shadow: var(--shadow);
}
.letter-sheet .meta { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 11px; color: var(--faint); border-bottom: 1px solid var(--line); padding-bottom: 14px; margin-bottom: 24px; }
.letter-sheet h1 { margin: 0 0 6px; font-size: 24px; line-height: 1.5; }
.letter-sheet .byline { margin: 0 0 24px; font-size: 12px; color: var(--muted); }
.letter-body { font-family: var(--serif); font-size: 16px; line-height: 2.05; color: var(--body-ink); word-break: break-word; }
.letter-body p { margin: 0 0 .8em; }
.letter-body img { max-width: 100%; border-radius: 8px; }
.letter-body blockquote { border-left: 2px solid #d6b36a; padding-left: 14px; color: var(--muted); }
.countdown { display: flex; gap: 12px; justify-content: center; margin: 28px 0 8px; }
.count-cell { min-width: 78px; text-align: center; background: var(--wash); border: 1px solid var(--line); border-radius: 12px; padding: 14px 8px; }
.count-cell b { display: block; font-size: 26px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.count-cell span { font-size: 10px; color: var(--faint); letter-spacing: .12em; }
.locked-note { text-align: center; color: var(--muted); font-size: 12.5px; line-height: 1.9; }
.locked-seal { width: 54px; height: 54px; margin: 0 auto 16px; border: 1.5px dashed #cbb38a; border-radius: 50%; display: grid; place-items: center; color: var(--gold); font-family: var(--serif); font-size: 20px; }

/* ── 通用内容页 ─────────────────────────── */
.prose { max-width: 720px; margin: 40px auto 0; }
.prose h2 { font-size: 17px; margin: 30px 0 10px; }
.prose p, .prose li { font-size: 13.5px; line-height: 2; color: #5e574b; }
.prose ul { padding-left: 20px; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 26px 28px; margin-bottom: 14px; }
.scene-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 20px; }
.scene-card { background: var(--paper); border: 1px solid var(--line-strong); border-radius: 16px; padding: 20px; transition: transform .2s, border-color .2s; }
.scene-card:hover { transform: translateY(-2px); border-color: #cdbb9f; }
.scene-card .num { font-size: 11px; color: var(--gold); letter-spacing: .14em; }
.scene-card h3 { margin: 8px 0 6px; font-size: 15px; }
.scene-card p { margin: 0; font-size: 11.5px; color: var(--muted); line-height: 1.8; }
.mine-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.mine-row:last-child { border-bottom: 0; }
.mine-row h3 { margin: 0 0 4px; font-size: 14px; }
.mine-row p { margin: 0; font-size: 11.5px; color: var(--faint); }
.status { font-size: 11px; padding: 5px 12px; border-radius: 999px; background: var(--wash); color: var(--muted); white-space: nowrap; }
.status.ready { background: #eef4ee; color: #4b7a58; }
.site-foot { margin-top: 70px; padding-top: 22px; border-top: 1px solid var(--line-strong); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 11px; color: var(--faint); }
.site-foot a { margin-right: 16px; }
.site-foot a:hover { color: var(--ink); }

/* ── 响应式 ─────────────────────────────── */
@media (max-width: 860px) {
  .nav { gap: 14px; }
  .nav a { font-size: 12px; }
  .cards { grid-template-columns: 1fr; }
  .card--tall { grid-row: auto; }
  .letter-grid, .scene-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 26px; }
  .composer { padding: 18px 18px 8px; }
  .letter-sheet { padding: 28px 24px; }
}
@media (max-width: 620px) {
  .nav { display: none; }
  .top-actions { margin-left: auto; }
  .brand-sub, .lang-switch { display: none; }
  .hero { padding: 34px 2px 20px; }
  .hero-side { display: none; }
  .two-fields { grid-template-columns: 1fr; }
  .sealbar { flex-direction: column; align-items: stretch; text-align: center; }
  .seal-actions { justify-content: center; }
  .center-card { padding: 34px 22px; margin-top: 30px; }
  .countdown { gap: 6px; }
  .count-cell { min-width: 66px; padding: 12px 4px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
@media print {
  body::before, .topbar, .site-foot, .sealbar, .wall-tools, .scene-filters { display: none !important; }
  body { background: #fff; }
  .shell { padding: 0; }
  .letter-sheet { box-shadow: none; border: 0; margin: 0; max-width: none; }
}

/* ── 顶栏图标与移动端导航 ───────────────── */
.top-icon { position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%; color: var(--ink-2); text-decoration: none;
  font-size: 15px; border: 1px solid var(--line-strong); background: var(--wash); }
.top-icon:hover { background: #efe8dc; border-color: var(--gold); }
.notif-dot { position: absolute; top: -3px; right: -3px; min-width: 15px; height: 15px; padding: 0 3px;
  border-radius: 8px; background: var(--amber); color: var(--dark); font-size: 10px; font-weight: 700;
  line-height: 15px; text-align: center; }
.notif-dot[hidden] { display: none; }
.bottom-nav { display: none; }
.back-top { position: fixed; right: 22px; bottom: 26px; z-index: 25; width: 38px; height: 38px;
  border-radius: 50%; border: 1px solid var(--line-strong); background: var(--paper);
  color: var(--ink); box-shadow: var(--shadow); cursor: pointer; font-size: 16px; }
.back-top[hidden] { display: none; }

/* ── 选项卡与筛选 ─────────────────────── */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 18px; border-bottom: 1px solid var(--line); }
.tab { appearance: none; border: 0; background: transparent; padding: 10px 16px 12px; cursor: pointer;
  font-family: var(--serif); font-size: 15px; color: var(--muted); border-bottom: 2px solid transparent; }
.tab.on { color: var(--ink); border-bottom-color: var(--danger); }
.filter-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 0 0 18px; }
.filter-chip { appearance: none; border: 1px solid var(--line-strong); background: var(--paper);
  color: var(--muted); border-radius: 999px; padding: 5px 14px; font-size: 12px; cursor: pointer; }
.filter-chip.on { background: var(--dark); color: #fffdf8; border-color: var(--dark); }
.toolbar-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; justify-content: space-between; margin-bottom: 20px; }

/* ── 信件列表卡片 ─────────────────────── */
.mine-card { display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: center;
  background: var(--paper); border: 1px solid var(--line); border-radius: 12px;
  padding: 18px 20px; margin-bottom: 12px; box-shadow: var(--shadow); }
.mine-card h3 { margin: 0 0 6px; font-family: var(--serif); font-size: 17px; color: var(--ink); }
.mine-meta { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.8; }
.mine-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.small-btn { appearance: none; border: 1px solid var(--line-strong); background: var(--wash);
  color: var(--ink-2); border-radius: 8px; padding: 6px 12px; font-size: 12px; cursor: pointer; text-decoration: none; }
.small-btn:hover { border-color: var(--gold); }
.small-btn.danger { color: var(--danger); border-color: #e4c2bd; }
.small-btn.solid { background: var(--dark); color: #fffdf8; border-color: var(--dark); }

/* ── 管理页 / 设置页 ─────────────────── */
.manage-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.manage-block { background: var(--paper); border: 1px solid var(--line); border-radius: 12px;
  padding: 22px; box-shadow: var(--shadow); }
.manage-block h3 { margin: 0 0 4px; font-family: var(--serif); font-size: 17px; }
.manage-block .sub { margin: 0 0 16px; font-size: 12px; color: var(--muted); }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 13px;
  border-bottom: 1px dashed var(--line); }
.kv span:first-child { color: var(--muted); }
.kv b { font-weight: 600; color: var(--ink); }
.settings-row { display: grid; grid-template-columns: 1fr 220px; gap: 14px; align-items: center;
  padding: 16px 0; border-bottom: 1px solid var(--line); }
.settings-row:last-child { border-bottom: 0; }
.settings-row h3 { margin: 0 0 4px; font-size: 15px; }
.settings-row p { margin: 0; color: var(--muted); font-size: 12px; }

/* ── 通知 ─────────────────────────────── */
.notice-row { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 10px; }
.notice-mark { width: 26px; height: 26px; flex: none; border-radius: 50%; background: var(--wash);
  border: 1px solid var(--line-strong); text-align: center; line-height: 24px; font-size: 12px; color: var(--gold); }
.notice-row.unread { border-left: 3px solid var(--danger); }
.notice-row h3 { margin: 0 0 3px; font-size: 14px; }
.notice-row p { margin: 0; color: var(--muted); font-size: 12px; }
.notice-time { color: var(--faint); font-size: 11px; white-space: nowrap; }

/* ── 公开信详情：旅程、档案、互动 ─────── */
.journey { display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: var(--wash); border: 1px solid var(--line); border-radius: 12px; padding: 18px 22px; margin: 18px 0; }
.journey-step { display: flex; flex-direction: column; gap: 2px; }
.journey-step small { color: var(--faint); font-size: 11px; letter-spacing: .08em; }
.journey-step b { font-family: var(--serif); font-size: 14px; font-weight: 600; }
.journey-line { flex: 1; min-width: 24px; height: 1px; background: var(--line-strong); }
.archive { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 18px 0 26px; }
.archive-cell { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 12px; text-align: center; }
.archive-cell b { display: block; font-family: var(--serif); font-size: 17px; color: var(--ink); }
.archive-cell small { color: var(--faint); font-size: 11px; }
.reactions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin: 8px 0 28px; }
.reaction { appearance: none; border: 1px solid var(--line-strong); background: var(--paper);
  border-radius: 999px; padding: 8px 16px; cursor: pointer; font-size: 13px; color: var(--ink-2); }
.reaction.on { background: var(--amber); border-color: var(--amber-deep); color: var(--dark); }
.comment-box { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 22px; }
.comment-box h3, .scene-block h3 { margin: 0 0 14px; font-family: var(--serif); font-size: 18px; }
.comment-input { width: 100%; min-height: 78px; resize: vertical; padding: 10px 12px; font-family: var(--sans);
  font-size: 13px; color: var(--ink); background: var(--wash); border: 1px solid var(--line-strong); border-radius: 8px; }
.comment-item { padding: 13px 0; border-bottom: 1px dashed var(--line); }
.comment-item:last-child { border-bottom: 0; }
.comment-item b { font-size: 12px; color: var(--ink-2); }
.comment-item time { font-size: 11px; color: var(--faint); margin-left: 8px; }
.comment-item p { margin: 5px 0 0; font-size: 13px; color: var(--body-ink); white-space: pre-wrap; word-break: break-word; }

/* ── 场景详情 ─────────────────────────── */
.scene-hero { padding: 32px 0 18px; }
.scene-hero h1 { font-family: var(--serif); font-size: 30px; margin: 6px 0 10px; }
.scene-hero p { color: var(--muted); max-width: 760px; line-height: 1.9; margin: 0; }
.tip-list { margin: 0; padding-left: 20px; color: var(--body-ink); line-height: 2; font-family: var(--serif); }
.scene-block { background: var(--paper); border: 1px solid var(--line); border-radius: 12px;
  padding: 24px; margin-bottom: 18px; box-shadow: var(--shadow); }
.stat-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 24px 0 8px; }
.stat { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 16px 10px; text-align: center; }
.stat b { display: block; font-family: var(--serif); font-size: 22px; color: var(--ink); }
.stat small { color: var(--faint); font-size: 11px; }

/* ── 弹窗与提示 ───────────────────────── */
.dialog-mask { position: fixed; inset: 0; z-index: 60; background: rgba(23,30,43,.5);
  display: flex; align-items: center; justify-content: center; padding: 20px; }
.dialog-mask[hidden] { display: none; }
.dialog { width: min(460px, 100%); background: var(--paper); border-radius: 14px; padding: 26px;
  box-shadow: 0 30px 80px -30px rgba(0,0,0,.6); }
.dialog h3 { margin: 0 0 8px; font-family: var(--serif); font-size: 20px; }
.dialog p { color: var(--muted); font-size: 13px; line-height: 1.8; margin: 0 0 14px; white-space: pre-line; }
.dialog-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 20px; }
.toast { position: fixed; left: 50%; bottom: 34px; transform: translateX(-50%); z-index: 70;
  background: var(--dark); color: #fffdf8; padding: 10px 18px; border-radius: 999px;
  font-size: 13px; box-shadow: var(--shadow); }
.toast[hidden] { display: none; }
.prose h2 { font-family: var(--serif); font-size: 19px; margin: 24px 0 8px; }
.prose p, .prose li { color: var(--body-ink); line-height: 1.95; }
.prose small { color: var(--faint); }

@media (max-width: 860px) {
  .manage-grid, .archive, .stat-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .settings-row { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .mine-card { grid-template-columns: 1fr; }
  .mine-actions { justify-content: flex-start; }
  .bottom-nav { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: var(--dark); border-top: 1px solid rgba(255,255,255,.1); }
  .bottom-nav a { flex: 1; text-align: center; padding: 11px 2px 13px; color: rgba(255,253,248,.7);
    text-decoration: none; font-size: 11px; }
  .bottom-nav a.on { color: var(--amber); }
  body { padding-bottom: 52px; }
  .back-top { bottom: 70px; }
  .archive { grid-template-columns: repeat(2, 1fr); }
  .scene-hero h1 { font-size: 24px; }
}
@media print {
  .bottom-nav, .back-top, .dialog-mask, .toast, .notif-dot, .reactions, .comment-box { display: none !important; }
}

/* ── 账号：顶栏状态与寄信提示 ─────────── */
.account-area { display: inline-flex; align-items: center; gap: 8px; }
.account-link { font-size: 12px; color: var(--ink-2); white-space: nowrap; }
.account-link:hover { color: var(--gold); }
.account-email { font-size: 11.5px; color: var(--ink-2); max-width: 180px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.account-email.warn { color: var(--danger); }
.account-out { padding: 5px 10px; font-size: 11px; }
.auth-note { display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: #f4f8f4; border: 1px solid #cbdcc8; border-radius: 14px;
  padding: 13px 16px; margin-bottom: 14px; font-size: 12px; line-height: 1.9; color: #405b42; }
.auth-note b { color: #2f4a33; }
.auth-note-actions { flex-shrink: 0; white-space: nowrap; }
.auth-note-actions a { font-weight: 600; color: #3c6743; border-bottom: 1px dashed #8fb08f;
  margin-left: 12px; padding-bottom: 1px; }
.auth-note-actions a:hover { color: var(--danger); border-color: var(--danger); }

/* ── 注册 / 登录 / 邮箱确认 ───────────── */
.auth-wrap { padding: 0 0 20px; }
.auth-card { max-width: 640px; margin: 56px auto 0; background: var(--paper);
  border: 1px solid var(--line); border-radius: 22px; padding: 38px 40px;
  box-shadow: var(--shadow); }
.auth-card h1 { font-family: var(--serif); font-size: 27px; margin: 4px 0 10px; }
.auth-lead { font-size: 13px; line-height: 1.95; color: var(--muted); margin: 0 0 22px; }
.auth-card .tabs { margin-bottom: 24px; }
.auth-card .tab { text-decoration: none; }
.field-name.spaced { margin-top: 16px; }
.auth-submit { display: block; width: 100%; margin-top: 20px; padding: 12px 24px; }
.auth-card .seal-stamp { width: 54px; height: 54px; font-size: 23px; margin-bottom: 18px; }
#auth-sent h2 { font-family: var(--serif); font-size: 21px; margin: 0 0 12px; }
.auth-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 20px; }
.auth-actions .input { flex: 1; min-width: 190px; }
.dev-link { background: #fffaf0; border: 1px dashed #d6b36a; border-radius: 12px;
  padding: 14px 16px; margin-top: 18px; text-align: left; }
.dev-link p { margin: 0 0 10px; font-size: 12px; color: #8a6323; }
.dev-link .btn-ghost { display: inline-block; word-break: break-all; white-space: normal; max-width: 100%; }
.auth-faq { margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line); }
.auth-faq b { font-size: 12.5px; color: var(--ink-2); }
.auth-faq p { margin: 8px 0 0; font-size: 11.5px; line-height: 1.9; color: var(--muted); }
.auth-verify { text-align: center; }
.auth-verify .auth-lead { max-width: 480px; margin: 0 auto 18px; }
.auth-verify .auth-faq { text-align: left; }
.auth-verify .center-actions { margin-top: 22px; }

@media (max-width: 620px) {
  .auth-note { flex-direction: column; align-items: flex-start; }
  .auth-card { padding: 28px 22px; margin-top: 30px; }
  .account-email { max-width: 96px; }
  .account-out { display: none; }
}

/* ── 会员中心 / 找回密码 ───────────────── */
.auth-mini-links { text-align: right; margin: -4px 0 12px; }
.auth-mini-links a { font-size: 12px; color: var(--gold); border-bottom: 1px dashed var(--gold); padding-bottom: 1px; }
.member-panel { margin-bottom: 18px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.panel-head h2 { font-family: var(--serif); font-size: 19px; margin: 0; }
.member-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 18px; }
.member-fact { display: flex; flex-direction: column; gap: 2px; background: var(--wash);
  border: 1px solid var(--line); border-radius: 12px; padding: 11px 14px; }
.member-fact-label { font-size: 11px; color: var(--faint); }
.member-fact-value { font-size: 13px; color: var(--ink-2); word-break: break-all; }
.member-form { max-width: 520px; }
.inline-form { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.inline-form .input { flex: 1; min-width: 190px; }
.session-row { display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 12px 0; border-bottom: 1px solid var(--line); }
.session-row:last-child { border-bottom: 0; }
.session-info { display: flex; flex-direction: column; gap: 3px; }
.session-info b { font-size: 13px; }
.session-info .sub { font-size: 11px; }
.danger-panel { border-color: #e7c8c4; background: #fffaf9; }
.small-btn.danger-ghost { color: var(--danger); border-color: #e0b8b3; }
.small-btn.danger-ghost:hover { background: #fdf1ef; }

/* ── 管理后台 ─────────────────────────── */
.admin-body::before { display: none; }
.admin-top { position: sticky; top: 0; z-index: 20; background: var(--dark); color: #fffdf8; }
.admin-top-inner { max-width: 1280px; margin: 0 auto; height: 60px; padding: 0 22px;
  display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.admin-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 14px; }
.admin-brand b { font-size: 11px; font-weight: 500; color: var(--amber);
  border: 1px solid rgba(245, 199, 95, .5); padding: 2px 8px; border-radius: 20px; margin-left: 6px; }
.admin-brand-mark { width: 32px; height: 32px; border-radius: 10px;
  background: rgba(255, 255, 255, .1); display: grid; place-items: center; font-size: 17px; }
.admin-top-right { display: flex; align-items: center; gap: 14px; font-size: 12px; }
.admin-top-link { color: rgba(255, 253, 248, .75); }
.admin-top-link:hover { color: var(--amber); }
.admin-who { color: var(--amber); }
.admin-auth { max-width: 640px; margin: 0 auto; padding: 30px 20px 60px; }
.admin-auth .auth-card { margin-top: 0; }
.admin-layout { display: grid; grid-template-columns: 210px minmax(0, 1fr);
  max-width: 1280px; margin: 0 auto; min-height: calc(100vh - 60px); }
.admin-side { border-right: 1px solid var(--line); background: rgba(255, 253, 248, .55);
  padding: 22px 14px; display: flex; flex-direction: column; justify-content: space-between; }
.admin-side nav { display: flex; flex-direction: column; gap: 4px; }
.admin-side nav a { padding: 10px 14px; border-radius: 10px; font-size: 13px; color: var(--ink-2); }
.admin-side nav a:hover { background: var(--wash); }
.admin-side nav a.on { background: var(--dark); color: #fffdf8; font-weight: 600; }
.side-badge { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 4px;
  background: var(--danger); color: #fff; border-radius: 10px; font-size: 10px; text-align: center; }
.admin-side-foot { font-size: 11px; color: var(--faint); line-height: 1.8;
  padding: 14px; border-top: 1px solid var(--line); }
.admin-main { padding: 26px 28px 60px; min-width: 0; }
.admin-heading h1 { font-family: var(--serif); font-size: 25px; margin: 0 0 4px; }
.admin-heading .sub { margin: 0 0 22px; font-size: 12.5px; }
.admin-mode-banner { display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
  background: #f4f8f4; border: 1px solid #cbdcc8; border-radius: 14px;
  padding: 14px 18px; margin-bottom: 20px; font-size: 12.5px; color: #405b42; }
.admin-mode-banner b { color: #2f4a33; }
.admin-mode-banner span { flex: 1; min-width: 200px; }
.admin-stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px; margin-bottom: 24px; }
.admin-stat { background: var(--paper); border: 1px solid var(--line); border-radius: 14px;
  padding: 15px 16px; display: flex; flex-direction: column; gap: 2px; }
.admin-stat-label { font-size: 11px; color: var(--faint); }
.admin-stat-value { font-family: var(--serif); font-size: 26px; color: var(--ink); }
.admin-stat-note { font-size: 11px; color: var(--muted); }
.admin-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 24px; }
.admin-column { min-width: 0; }
.admin-section-title { font-family: var(--serif); font-size: 17px; margin: 24px 0 12px; }
.admin-table-wrap { overflow-x: auto; background: var(--paper);
  border: 1px solid var(--line); border-radius: 14px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.admin-table th { text-align: left; font-weight: 600; color: var(--muted); background: var(--wash);
  padding: 11px 14px; white-space: nowrap; border-bottom: 1px solid var(--line); }
.admin-table td { padding: 11px 14px; border-bottom: 1px solid var(--line);
  color: var(--ink-2); vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: 0; }
.admin-table .sub { font-size: 11px; color: var(--faint); }
.admin-empty { text-align: center; color: var(--faint); padding: 26px !important; }
.admin-cell-main { display: flex; flex-direction: column; gap: 2px; min-width: 130px; }
.admin-cell-main b { font-weight: 600; color: var(--ink); word-break: break-all; }
.admin-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.admin-tag { display: inline-block; padding: 3px 9px; border-radius: 20px; font-size: 11px;
  background: var(--wash); border: 1px solid var(--line); white-space: nowrap; }
.admin-tag.ok { background: #f0f7ef; border-color: #cbdcc8; color: #3c6743; }
.admin-tag.warn { background: #fff7e8; border-color: #e8d3a2; color: #8a6323; }
.admin-tag.danger { background: #fdf1ef; border-color: #e2bdb9; color: var(--danger); }
.admin-filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; align-items: center; }
.admin-filters .input { width: auto; min-width: 170px; }
.admin-pager { display: flex; gap: 14px; align-items: center;
  justify-content: center; margin-top: 18px; font-size: 12px; }
.admin-detail-mask { position: fixed; inset: 0; z-index: 60; background: rgba(23, 30, 43, .45);
  display: grid; place-items: center; padding: 20px; }
.admin-detail { position: relative; width: min(760px, 100%); max-height: 86vh; overflow-y: auto;
  background: var(--paper); border-radius: 20px; padding: 28px 30px;
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .5); }
.admin-detail h2 { font-family: var(--serif); font-size: 22px; margin: 0 0 18px; }
.admin-detail-close { position: absolute; top: 14px; right: 18px; border: 0;
  background: transparent; font-size: 24px; color: var(--muted); line-height: 1; }
.admin-detail-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px; margin-bottom: 10px; }
.admin-detail-fact { display: flex; flex-direction: column; gap: 2px; background: var(--wash);
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px;
  font-size: 11px; color: var(--faint); word-break: break-all; }
.admin-detail-fact b { font-size: 12.5px; color: var(--ink-2); }
.admin-letter-body { white-space: pre-wrap; line-height: 1.9; font-family: var(--serif); font-size: 14px;
  background: var(--wash); border: 1px solid var(--line); border-radius: 12px;
  padding: 16px 18px; max-height: 320px; overflow-y: auto; }
.admin-mode-form { display: flex; flex-direction: column; gap: 10px; max-width: 640px; }
.admin-mode-option { display: flex; gap: 12px; align-items: flex-start; background: var(--paper);
  border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; cursor: pointer; }
.admin-mode-option input { margin-top: 5px; }
.admin-mode-option span { display: flex; flex-direction: column; gap: 2px; }
.admin-mode-option b { font-size: 13px; }
.admin-mode-option .sub { font-size: 11.5px; color: var(--muted); }
.admin-mode-form > button { align-self: flex-start; margin-top: 6px; }
.admin-ops { display: flex; gap: 10px; flex-wrap: wrap; }
.admin-note { margin-top: 26px; border-top: 1px solid var(--line);
  padding-top: 18px; font-size: 12px; color: var(--muted); }
.admin-note b { color: var(--ink-2); }
.admin-reason { width: 100%; resize: vertical; margin: 10px 0; padding: 10px 12px; }
.dialog-mask { z-index: 80; }
@media (max-width: 900px) {
  .admin-layout { grid-template-columns: 1fr; }
  .admin-side { border-right: 0; border-bottom: 1px solid var(--line); }
  .admin-side nav { flex-direction: row; flex-wrap: wrap; }
  .admin-side-foot { display: none; }
  .admin-main { padding: 20px 16px 50px; }
  .admin-columns { grid-template-columns: 1fr; }
}
