/* ==========================================================================
   家谱与缅怀 · 设计系统
   1 令牌 · 2 基础 · 3 按钮表单 · 4 外壳 · 5 页头标签 · 6 卡片表格
   7 族谱工作区 · 8 缅怀 · 9 打印宝塔 · 10 弹窗 · 11 响应式 · 12 打印
   ========================================================================== */

/* 1 令牌 ----------------------------------------------------------------- */
:root {
  --ink: #17262a;
  --ink-2: #33474d;
  --muted: #6d7d81;
  --faint: #94a3a6;
  --paper: #eef2f1;
  --panel: #ffffff;
  --panel-2: #f6f9f8;
  --line: #dbe4e3;
  --line-soft: #e9efee;
  --pine: #16565a;
  --pine-dark: #0f3d40;
  --pine-deep: #0a2b2e;
  --pine-soft: #e5efee;
  --accent: #8d3038;
  --accent-dark: #72252c;
  --accent-soft: #f8e9ea;
  --gold: #b8893c;
  --gold-soft: #f7efdb;
  --green: #2f7d5d;
  --radius-sm: 8px;
  --radius: 10px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 2px rgba(18, 44, 48, .06);
  --shadow: 0 10px 30px rgba(18, 44, 48, .08);
  --shadow-lg: 0 26px 64px rgba(11, 32, 35, .24);
  --sidebar-w: 236px;
}

/* 2 基础 ----------------------------------------------------------------- */
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  color: var(--ink);
  background: var(--paper);
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, -apple-system, sans-serif;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { letter-spacing: 0; }
p { margin: 0 0 8px; }
p:last-child { margin-bottom: 0; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon.lg { width: 22px; height: 22px; flex-basis: 22px; }
.icon.sm { width: 14px; height: 14px; flex-basis: 14px; }
::selection { background: rgba(141, 48, 56, .18); }
:focus-visible { outline: 2px solid var(--pine); outline-offset: 2px; }

/* 3 按钮 / 表单 ---------------------------------------------------------- */
.btn {
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 9px 14px;
  background: #e7edec;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 14px;
  line-height: 1.2;
  white-space: nowrap;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.btn:hover { background: #dde5e4; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-pine { background: var(--pine); color: #fff; }
.btn-pine:hover { background: var(--pine-dark); }
.btn-outline { background: transparent; border-color: var(--line); color: var(--ink-2); }
.btn-outline:hover { background: var(--panel-2); border-color: #c6d3d2; }
.btn-ghost { background: transparent; border-color: transparent; color: #cfe0dd; }
.btn-ghost:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.btn-sm { padding: 6px 10px; font-size: 13px; border-radius: 7px; }
.btn-sm .icon { width: 15px; height: 15px; flex-basis: 15px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.icon-btn {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-2);
  display: inline-grid;
  place-items: center;
}
.icon-btn:hover { background: var(--panel-2); color: var(--pine); }
.icon-btn.danger:hover { background: var(--accent-soft); color: var(--accent); border-color: #ecc9cc; }
label { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  padding: 9px 11px;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--pine);
  box-shadow: 0 0 0 3px rgba(22, 86, 90, .13);
}
textarea { min-height: 88px; resize: vertical; line-height: 1.6; }
select[multiple] { padding: 4px; }
.field-row { display: flex; gap: 8px; align-items: center; }

.segmented {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  background: #e7edec;
  border-radius: var(--radius-sm);
  padding: 4px;
  gap: 4px;
}
.segment {
  border: 0;
  background: transparent;
  padding: 9px 0;
  border-radius: 6px;
  color: var(--muted);
  font-size: 14px;
}
.segment.active { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); font-weight: 600; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; }

/* 4 外壳 ----------------------------------------------------------------- */
.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px 20px;
  background:
    radial-gradient(circle at 8% 4%, rgba(184, 137, 60, .16), transparent 38%),
    radial-gradient(circle at 92% 96%, rgba(22, 86, 90, .14), transparent 42%),
    linear-gradient(140deg, #edf3f2 0%, #f8f4ec 52%, #e6eeed 100%);
}
.auth-card {
  width: min(880px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 340px) minmax(0, 1fr);
  background: var(--panel);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.auth-aside { position: relative; min-height: 440px; background: var(--pine-deep); }
.auth-aside img { width: 100%; height: 100%; object-fit: cover; opacity: .5; }
.auth-aside-copy {
  position: absolute;
  inset: auto 0 0 0;
  padding: 26px 24px;
  color: #fff;
  background: linear-gradient(180deg, rgba(10, 43, 46, 0), rgba(10, 43, 46, .92));
}
.auth-aside-copy h1 { margin: 0 0 6px; font-size: 24px; }
.auth-aside-copy p { margin: 0; font-size: 13px; color: rgba(255, 255, 255, .78); line-height: 1.6; }
.auth-main { padding: 34px 34px 30px; display: grid; align-content: center; gap: 20px; }
.auth-form { display: grid; gap: 14px; }
.auth-qrs { display: grid; gap: 10px; padding-top: 18px; border-top: 1px solid var(--line-soft); }
.auth-qrs-title { margin: 0; font-size: 12px; letter-spacing: .12em; color: var(--faint); }
.auth-qr-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.auth-qr {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 8px;
  padding: 12px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel-2);
  color: inherit;
  text-align: center;
  text-decoration: none;
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}
.auth-qr:hover { border-color: var(--pine); background: #fff; box-shadow: var(--shadow-sm); }
.auth-qr:focus-visible { outline: 2px solid var(--pine); outline-offset: 2px; }
.auth-qr-image { display: block; width: 100px; height: 100px; border-radius: 6px; background: #fff; }
.auth-qr-copy { display: grid; justify-items: center; gap: 3px; min-width: 0; }
.auth-qr-copy strong { font-size: 13px; line-height: 1.35; }
.auth-qr-copy span { font-size: 12px; color: var(--muted); line-height: 1.45; }
.auth-back {
  justify-self: start;
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
}
.auth-back:hover { color: var(--pine); }

/* 4b 公共首页 ----------------------------------------------------------- */
.landing-shell {
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 7% 0%, rgba(184, 137, 60, .16), transparent 34%),
    radial-gradient(circle at 95% 24%, rgba(22, 86, 90, .12), transparent 38%),
    linear-gradient(180deg, #f5f8f7 0%, #eef2f1 48%, #f7f4ed 100%);
}
.landing-nav {
  position: sticky;
  top: 0;
  z-index: 30;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 14px 0;
  display: flex;
  align-items: center;
  gap: 22px;
  background: rgba(242, 246, 245, .88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(219, 228, 227, .8);
}
.landing-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: inherit;
  text-decoration: none;
  min-width: 0;
}
.landing-brand-text { display: grid; gap: 2px; }
.landing-brand-text strong { font-size: 17px; letter-spacing: .3px; }
.landing-brand-text small { color: var(--muted); font-size: 11.5px; }
.landing-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  overflow-x: auto;
  scrollbar-width: none;
}
.landing-links::-webkit-scrollbar { display: none; }
.landing-links a {
  padding: 8px 11px;
  border-radius: 7px;
  color: var(--ink-2);
  text-decoration: none;
  font-size: 14px;
  white-space: nowrap;
}
.landing-links a:hover { background: #fff; color: var(--pine); }
.landing-actions { display: flex; gap: 8px; flex: 0 0 auto; }
.landing-main { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 34px 0 72px; }

.landing-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(340px, .94fr);
  gap: clamp(28px, 5vw, 66px);
  align-items: center;
  padding: clamp(24px, 5vw, 62px) 0 42px;
}
.landing-hero-copy h1 {
  margin: 10px 0 16px;
  font-family: "KaiTi", "STKaiti", "Microsoft YaHei", serif;
  font-size: clamp(38px, 5.4vw, 68px);
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--pine-deep);
}
.landing-lead {
  max-width: 36em;
  margin: 0;
  color: var(--ink-2);
  font-size: 16px;
  line-height: 1.85;
}
.landing-cta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 24px; }
.landing-cta .btn { min-height: 40px; padding: 10px 17px; text-decoration: none; }
.landing-text-link { color: var(--pine); font-size: 13.5px; text-decoration: none; padding: 8px 4px; }
.landing-text-link:hover { text-decoration: underline; }
.landing-hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12.5px;
}
.landing-hero-facts span { display: inline-flex; align-items: baseline; gap: 6px; }
.landing-hero-facts strong { color: var(--ink); font-size: 18px; }

.landing-hero-art {
  position: relative;
  min-height: 420px;
  border-radius: 22px;
  overflow: hidden;
  background: var(--pine-deep);
  box-shadow: var(--shadow-lg);
  transform: rotate(1.2deg);
}
.landing-hero-art::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: inherit;
  pointer-events: none;
}
.landing-hero-art img { width: 100%; height: 100%; min-height: 420px; object-fit: cover; opacity: .62; }
.landing-art-caption {
  position: absolute;
  inset: auto 18px 18px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 16px;
  border-radius: 12px;
  color: #fff;
  background: rgba(10, 43, 46, .82);
  backdrop-filter: blur(8px);
}
.landing-art-caption .brand-mark { background: rgba(255, 255, 255, .16); box-shadow: none; }
.landing-art-caption strong { display: block; font-size: 15px; }
.landing-art-caption p { margin: 3px 0 0; color: rgba(255, 255, 255, .72); font-size: 12.5px; }

.landing-section { padding: 66px 0 18px; scroll-margin-top: 82px; }
.landing-section-head { display: grid; gap: 7px; margin-bottom: 25px; }
.landing-section-head-row { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
.landing-section-head h2 {
  margin: 0;
  font-family: "KaiTi", "STKaiti", "Microsoft YaHei", serif;
  font-size: clamp(27px, 3.2vw, 40px);
  line-height: 1.25;
  color: var(--pine-deep);
}
.landing-section-head p { margin: 4px 0 0; max-width: 66ch; color: var(--muted); font-size: 14px; line-height: 1.75; }
.version-pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 13px;
  border: 1px solid #cfdedc;
  border-radius: 999px;
  background: rgba(255, 255, 255, .7);
  color: var(--pine);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.feature-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, .82);
  box-shadow: var(--shadow-sm);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.feature-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: #c5d4d2; }
.feature-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--pine);
  background: var(--pine-soft);
  margin-bottom: 13px;
}
.feature-card h3 { margin: 0 0 8px; font-size: 17px; }
.feature-card p { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.75; }

.update-layout { display: grid; grid-template-columns: minmax(0, .84fr) minmax(0, 1.16fr); gap: 16px; align-items: stretch; }
.update-current {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 24px;
  border-radius: 16px;
  color: #fff;
  background:
    radial-gradient(circle at 100% 0%, rgba(184, 137, 60, .32), transparent 40%),
    linear-gradient(145deg, var(--pine-deep), #123d40);
  box-shadow: var(--shadow);
}
.update-current .badge { justify-self: start; background: rgba(255, 255, 255, .14); color: #dbeae8; }
.update-current h3 { margin: 3px 0 0; font-size: 27px; font-family: "KaiTi", "STKaiti", serif; }
.update-current p { margin: 0; color: rgba(255, 255, 255, .76); font-size: 13.5px; line-height: 1.8; }
.update-meta { color: rgba(255, 255, 255, .54) !important; font-size: 12px !important; }
.update-current .btn { justify-self: start; margin-top: 6px; border-color: rgba(255, 255, 255, .3); color: #fff; }
.update-current .btn:hover { background: rgba(255, 255, 255, .1); }
.update-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 4px 22px;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, .8);
}
.update-list li {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 14px;
  padding: 17px 0;
  border-bottom: 1px solid var(--line-soft);
}
.update-list li:last-child { border-bottom: 0; }
.update-list time { padding-top: 2px; color: var(--faint); font-size: 12px; }
.update-list strong { display: block; margin-bottom: 4px; font-size: 14.5px; }
.update-list p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.7; }

.download-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px;
  gap: 30px;
  align-items: center;
  padding: clamp(24px, 4vw, 40px);
  border: 1px solid #d7e2e0;
  border-radius: 20px;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, .9), rgba(246, 249, 248, .86)),
    radial-gradient(circle at 100% 0%, rgba(184, 137, 60, .16), transparent 40%);
  box-shadow: var(--shadow-sm);
}
.download-copy h2 { margin: 8px 0 12px; font-family: "KaiTi", "STKaiti", serif; font-size: clamp(29px, 3.4vw, 42px); color: var(--pine-deep); }
.download-copy > p { max-width: 54ch; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.8; }
.download-points { display: grid; gap: 6px; margin: 16px 0 0; padding: 0; list-style: none; color: var(--ink-2); font-size: 13.5px; }
.download-points li { display: flex; align-items: center; gap: 8px; }
.download-points li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); flex: 0 0 6px; }
.download-qr {
  display: grid;
  justify-items: center;
  gap: 7px;
  padding: 17px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.download-qr img { display: block; width: 132px; height: 132px; border-radius: 8px; }
.download-qr strong { font-size: 14px; }
.download-qr span { color: var(--muted); font-size: 12px; }
.download-qr-meta { max-width: 180px; color: var(--faint) !important; font-size: 11.5px !important; line-height: 1.5; }

.manual-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.manual-card {
  position: relative;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, .78);
}
.manual-step {
  display: inline-grid;
  place-items: center;
  width: 31px;
  height: 31px;
  margin-bottom: 12px;
  border: 1px solid #d6e2e0;
  border-radius: 9px;
  color: var(--pine);
  background: var(--pine-soft);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .4px;
}
.manual-card h3 { margin: 0 0 7px; font-size: 15.5px; }
.manual-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.72; }
.manual-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 15px;
  padding: 14px 16px;
  border: 1px solid #ebdcb9;
  border-radius: 12px;
  background: rgba(255, 248, 236, .78);
  color: #7a5a1f;
}
.manual-note .icon { margin-top: 2px; flex: 0 0 17px; }
.manual-note p { margin: 0; font-size: 13px; line-height: 1.7; }

.landing-footer {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 26px 0 42px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12.5px;
}
.landing-footer > div { display: grid; gap: 5px; }
.landing-footer strong { color: var(--ink); font-size: 14px; }
.landing-footer nav { display: flex; gap: 16px; flex-wrap: wrap; }
.landing-footer a { color: var(--muted); text-decoration: none; }
.landing-footer a:hover { color: var(--pine); }

.brand-mark {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  color: #fff;
  font-family: "KaiTi", "STKaiti", serif;
  font-size: 28px;
  background: linear-gradient(135deg, var(--pine), var(--pine-deep));
  box-shadow: 0 8px 18px rgba(22, 76, 79, .25);
}
.auth-aside-copy .brand-mark { margin-bottom: 14px; box-shadow: none; background: rgba(255, 255, 255, .16); }
.brand-mark.small { width: 40px; height: 40px; flex-basis: 40px; font-size: 22px; border-radius: 11px; }

:root {
  --ic-grid: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7' height='7' rx='1.5'/%3E%3Crect x='14' y='3' width='7' height='7' rx='1.5'/%3E%3Crect x='14' y='14' width='7' height='7' rx='1.5'/%3E%3Crect x='3' y='14' width='7' height='7' rx='1.5'/%3E%3C/svg%3E");
  --ic-flame: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8.5 14.5A2.5 2.5 0 0 0 11 12c0-1.38-.5-2-1-3-1.07-2.14-.22-4.05 2-6 .5 2.5 2 4.9 4 6.5 2 1.6 3 3.5 3 5.5a7 7 0 1 1-14 0c0-1.15.43-2.29 1-3a2.5 2.5 0 0 0 2.5 2.5z'/%3E%3C/svg%3E");
  --ic-user: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E");
  --ic-sliders: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 21v-7M4 10V3M12 21v-9M12 8V3M20 21v-5M20 12V3M1 14h6M9 8h6M17 16h6'/%3E%3C/svg%3E");
}

.app-shell { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  background: linear-gradient(180deg, #14464a 0%, var(--pine-deep) 100%);
  color: #eaf3f1;
  padding: 22px 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  position: sticky;
  top: 0;
  height: 100vh;
}
.sidebar-brand { display: flex; align-items: center; gap: 11px; padding: 2px 8px; }
.sidebar-brand-text strong { display: block; font-size: 16px; letter-spacing: .3px; }
.sidebar-brand-text span { display: block; font-size: 11px; color: #8fb2af; margin-top: 3px; }
.side-nav { display: grid; gap: 4px; }
.nav-item {
  position: relative;
  text-align: left;
  border: 0;
  background: transparent;
  color: #b8d1ce;
  padding: 11px 12px 11px 40px;
  border-radius: var(--radius-sm);
  font-size: 14.5px;
  transition: background .15s ease, color .15s ease;
}
.nav-item:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.nav-item.active { background: rgba(255, 255, 255, .13); color: #fff; font-weight: 600; }
.nav-item.active::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 17px;
  border-radius: 2px;
  background: #d8b46a;
}
.nav-item::before {
  content: "";
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  background-color: currentColor;
  opacity: .9;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: 18px 18px;
  mask-size: 18px 18px;
}
.nav-item[data-nav="dashboard"]::before { -webkit-mask-image: var(--ic-grid); mask-image: var(--ic-grid); }
.nav-item[data-nav="memorial"]::before { -webkit-mask-image: var(--ic-flame); mask-image: var(--ic-flame); }
.nav-item[data-nav="account"]::before { -webkit-mask-image: var(--ic-user); mask-image: var(--ic-user); }
.nav-item[data-nav="admin"]::before { -webkit-mask-image: var(--ic-sliders); mask-image: var(--ic-sliders); }
.sidebar-foot { margin-top: auto; display: grid; gap: 10px; }
.me-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .07);
}
.me-avatar {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, .16);
  font-size: 15px;
  color: #fff;
}
.me-name { font-size: 13.5px; color: #dcebe9; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.content { padding: 30px clamp(20px, 3.2vw, 46px) 76px; width: 100%; max-width: 1360px; }
body.share-mode .sidebar { display: none; }
body.share-mode .app-shell { grid-template-columns: minmax(0, 1fr); }
body.share-mode .content { max-width: 960px; margin: 0 auto; }
/* 5 页头与标签页 --------------------------------------------------------- */
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.page-head h2 { margin: 0; font-size: 26px; }
.page-head p { margin: 6px 0 0; color: var(--muted); font-size: 14px; max-width: 62ch; }
.page-head .head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .9px;
  color: var(--pine);
  margin-bottom: 8px;
}

.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tab { border: 0; background: transparent; padding: 10px 14px; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; font-size: 14px; }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }

.ws-head {
  position: sticky;
  top: 0;
  z-index: 12;
  background: rgba(238, 242, 241, .95);
  backdrop-filter: blur(8px);
  margin: -30px calc(clamp(20px, 3.2vw, 46px) * -1) 0;
  padding: 20px clamp(20px, 3.2vw, 46px) 0;
  border-bottom: 1px solid var(--line);
}
.ws-crumb {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  padding: 0 0 10px;
}
.ws-crumb:hover { color: var(--pine); }
.ws-top { display: flex; align-items: flex-start; gap: 18px; flex-wrap: wrap; margin-bottom: 16px; }
.ws-identity { min-width: 0; flex: 1; }
.ws-identity h2 { margin: 0; font-size: 25px; }
.ws-identity p { margin: 6px 0 0; color: var(--muted); font-size: 13.5px; }
.ws-badges { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
.ws-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.tabbar { display: flex; gap: 4px; overflow-x: auto; }
.tabbar-item {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 10px 14px;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  border-bottom: 2px solid transparent;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 14.5px;
  white-space: nowrap;
}
.tabbar-item:hover { color: var(--ink); background: rgba(255, 255, 255, .7); }
.tabbar-item.active { color: var(--pine); border-bottom-color: var(--pine); font-weight: 700; background: #fff; }
.tabbar-item .icon { opacity: .75; }
.tabbar-item.active .icon { opacity: 1; }

.subtabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 16px 0; }
.subtab {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-2);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
}
.subtab:hover { border-color: #bccbc9; }
.subtab.active { background: var(--pine); border-color: var(--pine); color: #fff; font-weight: 600; }

.workspace-body { padding-top: 4px; }

/* 6 卡片 / 统计 / 表格 --------------------------------------------------- */
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  margin-top: 14px;
}
.workspace-body > .panel:first-child, .panel:first-child { margin-top: 0; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.panel-head h3 { margin: 0; font-size: 16.5px; }
.panel-head p { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.subtle { color: var(--muted); font-size: 13px; }
.divider { height: 1px; background: var(--line-soft); margin: 14px 0; }

.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(158px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 15px 16px;
  display: grid;
  gap: 7px;
}
.stat span { font-size: 12.5px; color: var(--muted); }
.stat strong { font-size: 26px; line-height: 1; font-variant-numeric: tabular-nums; }
.stat .stat-hint { font-size: 12px; color: var(--faint); }
.stat.accent strong { color: var(--accent); }
.stat.pine strong { color: var(--pine); }

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 17px;
  display: flex;
  flex-direction: column;
  gap: 11px;
  transition: box-shadow .15s ease, transform .15s ease, border-color .15s ease;
}
.card:hover { box-shadow: var(--shadow); border-color: #c8d6d4; transform: translateY(-1px); }
.card h3 { margin: 0; font-size: 18px; }
.card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.card-actions { margin-top: auto; display: flex; flex-wrap: wrap; gap: 7px; }
.card-title-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

.meta-line { font-size: 12.5px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; background: var(--pine-soft); font-size: 12px; color: var(--pine); white-space: nowrap; }
.badge.red { background: var(--accent-soft); color: var(--accent); }
.badge.gold { background: var(--gold-soft); color: #7a5a1f; }
.badge.grey { background: #eceff0; color: var(--muted); }
.badge.green { background: #e5f2ea; color: var(--green); }

.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar .spacer { flex: 1; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
table { border-collapse: collapse; width: 100%; min-width: 720px; }
th, td { text-align: left; padding: 11px 13px; border-bottom: 1px solid var(--line-soft); font-size: 14px; vertical-align: top; }
th { background: var(--panel-2); font-weight: 600; white-space: nowrap; font-size: 13px; color: var(--ink-2); }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fafcfc; }
.actions-cell { display: flex; gap: 5px; white-space: nowrap; flex-wrap: wrap; }
.clickable { color: var(--pine); cursor: pointer; }

.empty {
  border: 1px dashed #cfdad9;
  border-radius: var(--radius);
  padding: 36px 24px;
  text-align: center;
  color: var(--muted);
  background: rgba(255, 255, 255, .55);
  display: grid;
  gap: 10px;
  justify-items: center;
}
.empty strong { color: var(--ink); font-size: 15px; }
.empty .icon { width: 28px; height: 28px; flex-basis: 28px; color: #b8c6c4; }

.linked-check {
  border: 1px solid #e6d4ab;
  background: var(--gold-soft);
  color: #6d5320;
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 12px;
  display: grid;
  gap: 6px;
  font-size: 13.5px;
  line-height: 1.6;
}
.linked-check strong { color: #5f4613; font-size: 14px; }
.linked-check p { margin: 0; color: #7a6434; }
.linked-names { display: flex; flex-wrap: wrap; gap: 6px; }
.linked-names button {
  border: 1px solid #e0c99a;
  background: #fffdf7;
  color: #6d5320;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 12.5px;
}
.linked-names button:hover { border-color: var(--gold); background: #fff; }

.quick-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(186px, 1fr)); gap: 12px; }
.quick-tile {
  text-align: left;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: var(--radius);
  padding: 15px;
  display: grid;
  gap: 9px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.quick-tile:hover { border-color: #c3d2d0; box-shadow: var(--shadow-sm); }
.quick-tile .tile-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--pine-soft);
  color: var(--pine);
}
.quick-tile strong { font-size: 14.5px; }
.quick-tile small { color: var(--muted); font-size: 12.5px; line-height: 1.5; }

.list-rows { display: grid; gap: 8px; }
.list-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
}
.list-row .row-main { flex: 1; min-width: 0; }
.list-row strong { display: block; font-size: 14.5px; }
.list-row small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 4px; }
.avatar {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 10px;
  background: var(--pine-soft);
  color: var(--pine);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-family: "KaiTi", "STKaiti", serif;
  font-size: 19px;
  overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.round { border-radius: 50%; }
.avatar.lg { width: 60px; height: 60px; flex-basis: 60px; font-size: 26px; border-radius: 14px; }
/* 7 族谱工作区 ----------------------------------------------------------- */
.tree-list, .tree-list ul { list-style: none; margin: 0; padding-left: 22px; }
.tree-root { padding-left: 0 !important; }
.tree-list li { position: relative; padding: 4px 0; }
.tree-list li::before {
  content: "";
  position: absolute;
  left: -15px;
  top: 0;
  bottom: 50%;
  width: 14px;
  border-left: 1px solid #a9bab8;
  border-bottom: 1px solid #a9bab8;
}
.tree-list > li:first-child::before { border: 0; }
.tree-person {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 7px 11px;
}
.tree-person strong { font-size: 14px; }
.tree-person small { color: var(--muted); }

.section-sheet { padding-top: 8px; padding-bottom: 8px; }
.section-editor { padding: 16px 0; border-top: 1px solid var(--line-soft); }
.section-editor:first-of-type { border-top: 0; }
.section-editor-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 9px; }
.section-editor-head h4 { margin: 0; font-size: 15px; }
.section-editor textarea { min-height: 170px; }
.preface-list, .attachment-list, .lineage-list { display: grid; gap: 10px; }
.preface-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 13px;
  background: #fff;
}
.preface-card h4 { margin: 0 0 6px; }
.preface-card p { margin: 0; color: var(--muted); line-height: 1.65; white-space: pre-wrap; }
.asset-editor { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 20px; align-items: start; }
.cover-preview {
  width: 100%;
  max-width: 170px;
  aspect-ratio: 210 / 297;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel-2);
}
.asset-actions { display: grid; justify-items: start; gap: 10px; align-content: start; }
.asset-actions p { margin: 0; font-size: 12.5px; }
.cover-mode-switch { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.cover-mode-switch label {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  padding: 8px 11px;
  font-size: 13px;
  white-space: nowrap;
  cursor: pointer;
}
.cover-mode-switch label:has(input:checked) {
  border-color: var(--pine);
  background: var(--pine-soft);
  color: var(--pine);
}
.custom-cover-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}
.custom-cover-preview {
  position: relative;
  width: 100%;
  max-width: 260px;
  aspect-ratio: 210 / 297;
  overflow: hidden;
  border: 3px solid #202020;
  border-radius: 2px;
  background: #d7191c;
  box-shadow: 0 16px 34px rgba(55, 35, 24, 0.16);
  isolation: isolate;
}
.custom-cover-background {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}
.custom-cover-spine {
  position: absolute;
  z-index: 1;
  inset: 0 auto 0 0;
  width: 3.2%;
  background: #202020;
  border-right: 1px solid rgba(255, 255, 255, 0.18);
  pointer-events: none;
}
.custom-cover-label {
  position: absolute;
  z-index: 2;
  width: 27%;
  height: 42%;
  padding: 2.5%;
  box-sizing: border-box;
  transform: translate(-50%, -50%);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}
.custom-cover-preview.horizontal .custom-cover-label {
  width: 58%;
  height: 28%;
}
.custom-cover-inner {
  position: absolute;
  inset: 8%;
  box-sizing: border-box;
  border: 1px solid #202020;
  pointer-events: none;
}
.custom-cover-title {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  line-height: 1.08;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
  width: 78%;
  max-height: 96%;
  overflow: hidden;
}
.custom-cover-title.vertical {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.custom-cover-title.vertical span {
  display: block;
  flex: 0 0 auto;
}
.custom-cover-title.horizontal {
  width: 86%;
  white-space: normal;
  word-break: break-word;
}
.custom-cover-subtitle {
  position: absolute;
  z-index: 2;
  left: 8%;
  right: 8%;
  bottom: 17%;
  color: #f6e6c8;
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0.12em;
}
.custom-cover-description {
  position: absolute;
  z-index: 2;
  left: 10%;
  right: 6%;
  bottom: 10%;
  color: #fff4e2;
  text-align: center;
  font-size: 9px;
  line-height: 1.45;
  white-space: pre-wrap;
}
.custom-cover-form { display: grid; gap: 13px; min-width: 0; }
.cover-field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
}
.cover-field-grid label { min-width: 0; }
.cover-field-wide { grid-column: 1 / -1; }
.cover-field-grid input,
.cover-field-grid select { width: 100%; min-width: 0; }
.cover-field-grid input[type="color"] { min-height: 38px; padding: 3px; }
.custom-cover-form textarea { min-height: 66px; }
.cover-background-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}
.cover-background-actions .muted { font-size: 12px; }
.pp-complete-cover {
  display: grid;
  place-items: center;
  height: calc(100% - 26px);
  padding: 20px;
  background: #f4efe4;
}
.pp-complete-frame {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  width: 54%;
  min-height: 78%;
  padding: 18px 14px 12px;
  border: 5px double #8b1e1e;
  color: #8b1e1e;
  font-family: "SimSun", "Songti SC", serif;
  text-align: center;
}
.pp-complete-frame span {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.35;
}
.pp-complete-frame small {
  padding-top: 8px;
  border-top: 1px solid #b68b3c;
  font-size: 10px;
}
.pp-complete-foot {
  padding: 7px 10px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
  text-align: center;
}
.print-preview-sheet.is-custom-cover {
  padding: 0;
  border-color: #202020;
  background: #d7191c;
}
.pp-custom-cover {
  position: absolute;
  inset: 0;
}
.pp-custom-cover .custom-cover-preview {
  width: 100%;
  max-width: none;
  height: 100%;
  aspect-ratio: auto;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.attachment-card {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 11px;
  background: #fff;
}
.attachment-card img, .pdf-mark {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: var(--panel-2);
}
.pdf-mark { display: grid; place-items: center; color: var(--accent); font-weight: 700; }
.attachment-card strong, .attachment-card small { display: block; }
.attachment-card small { color: var(--muted); margin-top: 5px; }
.lineage-card {
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  gap: 26px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 18px 26px;
}
.lineage-photo { width: 96px; height: 96px; justify-self: center; display: grid; place-items: center; overflow: hidden; }
.lineage-photo span { font-size: 62px; line-height: 1; }
.lineage-photo img { width: 96px; height: 96px; object-fit: cover; border-radius: var(--radius-sm); }
.lineage-content h4 { margin: 0 0 12px; font-size: 17px; }
.lineage-content p { margin: 5px 0; line-height: 1.6; font-size: 13.5px; }
.lineage-content .lineage-bio { color: var(--muted); margin-top: 10px; }
.share-url { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 6px 0; }
.share-url code {
  flex: 1;
  min-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  font-size: 12.5px;
}
.member-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px 18px; }
.member-facts div { font-size: 13.5px; }
.member-facts dt { color: var(--muted); font-size: 12px; }

/* 8 缅怀模块 ------------------------------------------------------------- */
.memorial-grid {
  display: grid;
  grid-template-columns: minmax(280px, 348px) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}
.memorial-side { display: grid; gap: 12px; }
.soul-list { display: grid; gap: 8px; }
.soul-item {
  text-align: left;
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: var(--radius);
  padding: 11px 12px;
  display: flex;
  gap: 11px;
  align-items: flex-start;
  transition: border-color .15s ease, background .15s ease;
}
.soul-item:hover { border-color: #c3d2d0; }
.soul-item.active { border-color: var(--pine); background: var(--pine-soft); }
.soul-item .row-main { flex: 1; min-width: 0; }
.soul-item .name-row { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.soul-item strong { font-size: 15px; }
.soul-item small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 5px; line-height: 1.5; }
.soul-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 9px; }

.chat-main {
  background: #eef1f0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  height: min(720px, calc(100vh - 220px));
  min-height: 520px;
  overflow: hidden;
}
.chat-head {
  padding: 12px 16px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.chat-head-main { display: flex; align-items: center; gap: 11px; min-width: 0; }
.chat-head h3 { margin: 0; font-size: 16px; }
.chat-head .chat-sub { display: block; font-size: 12px; color: var(--muted); margin-top: 3px; }
.chat-scroll { flex: 1; overflow-y: auto; padding: 18px 16px; display: flex; flex-direction: column; gap: 14px; }
.msg-row { display: flex; gap: 9px; align-items: flex-end; }
.msg-row .avatar { width: 34px; height: 34px; flex-basis: 34px; font-size: 16px; border-radius: 9px; }
.msg-row.user { justify-content: flex-end; }
.msg-row.user .avatar { background: var(--pine); color: #fff; order: 2; }
.bubble {
  max-width: min(70%, 560px);
  background: #fff;
  padding: 10px 13px;
  border-radius: 12px 12px 12px 3px;
  line-height: 1.68;
  white-space: pre-wrap;
  word-break: break-word;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
  font-size: 14.5px;
}
.msg-actions { margin-top: 7px; display: flex; gap: 6px; flex-wrap: wrap; }
.msg-row.user .bubble { background: #cdead0; border-radius: 12px 12px 3px 12px; }
.msg-time { display: block; font-size: 11px; color: #869694; margin-top: 5px; }
.voice-section { border-top: 1px solid var(--line-soft); padding-top: 12px; margin-top: 6px; }
.voice-fields { display: grid; gap: 10px; margin-top: 10px; }
.voice-field { display: grid; gap: 10px; }
.voice-field p { margin: 0; }
.chat-input-bar {
  border-top: 1px solid var(--line);
  background: #fff;
  padding: 10px;
  display: flex;
  gap: 8px;
  align-items: flex-end;
}
.chat-input-bar textarea { flex: 1; min-height: 44px; max-height: 132px; margin: 0; }
.chat-hold-talk {
  flex: 1;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel-2);
  color: var(--ink);
  user-select: none;
  cursor: pointer;
}
.chat-hold-talk.recording { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.chat-empty { margin: auto; color: var(--muted); text-align: center; max-width: 340px; display: grid; gap: 8px; justify-items: center; }
.greeting-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  border-top: 1px solid var(--line-soft);
  padding: 10px 0;
}
.greeting-row:first-of-type { border-top: 0; }
.persona-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 13px;
  display: grid;
  gap: 9px;
}
.persona-card .row { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.persona-card h4 { margin: 0; font-size: 15.5px; }
.persona-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #b9c6c5; display: inline-block; }
.status-dot.on { background: #3d9a6e; }

.conversation-layout {
  display: grid;
  grid-template-columns: minmax(250px, 340px) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}
.call-panel {
  position: sticky;
  top: 170px;
  display: grid;
  gap: 9px;
  padding: 14px;
  border-radius: var(--radius);
  background: #1c2726;
  color: #fff;
}
.call-media {
  aspect-ratio: 3 / 4;
  min-height: 320px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: var(--radius-sm);
  border: 2px solid rgba(255, 255, 255, .7);
  background: linear-gradient(160deg, #4d5f5c, #1e2625);
}
.call-media img, .call-media video { width: 100%; height: 100%; object-fit: cover; }
.call-fallback { font-size: 64px; color: #fff; font-family: "KaiTi", "STKaiti", serif; }
.call-panel strong { font-size: 17px; }
.call-state { color: rgba(255, 255, 255, .72); font-size: 12px; }
.video-call-close { display: none; }
.conversation-layout.video-call-mode .chat-main { display: none; }
.conversation-layout.video-call-mode .call-panel {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border-radius: 0;
  padding: 24px;
  background: #0f1817;
}
.video-call-mode .video-call-close { display: inline-flex; position: absolute; top: 20px; right: 20px; }
.video-call-mode .call-media {
  width: min(70vw, 680px);
  height: calc(100vh - 150px);
  min-height: 0;
  aspect-ratio: auto;
}
.distill-result { display: grid; gap: 10px; }
.distill-block {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  background: #fbfaf7;
}
.distill-block h4 { margin: 0 0 7px; font-size: 14px; color: var(--pine); }
.distill-block p { margin: 0; white-space: pre-wrap; line-height: 1.7; color: var(--ink); }
/* 9 打印与宝塔图 --------------------------------------------------------- */
.pagoda-panel { padding: 0; overflow: hidden; }
.pagoda-head { margin: 0; padding: 18px 18px 0; align-items: center; }
.pagoda-stat {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  color: var(--muted);
  background: var(--panel-2);
  font-size: 12px;
}
.pagoda-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 13px 18px; }
.pagoda-stage {
  position: relative;
  height: min(72vh, 780px);
  min-height: 540px;
  overflow: hidden;
  border-top: 1px solid var(--line);
  background: #f5f0eb;
  cursor: grab;
  touch-action: none;
  user-select: none;
}
.pagoda-stage.dragging { cursor: grabbing; }
#pagodaSvg { display: block; width: 100%; height: 100%; }
.pagoda-level-line { stroke: #b08968; stroke-width: 2; }
.pagoda-edge { fill: none; stroke: #b08968; stroke-width: 2.5; stroke-linejoin: round; }
.pagoda-node rect { cursor: pointer; transition: filter .15s ease; }
.pagoda-node:hover rect { filter: brightness(.94); }
.pagoda-node-name { pointer-events: none; font-size: 13px; font-weight: 700; fill: #333; }
.pagoda-node-meta { pointer-events: none; font-size: 10px; fill: #888; }
.pagoda-node-spouse { pointer-events: none; font-size: 9px; fill: #777; }
.pagoda-collapse { fill: #fff; stroke: #b08968; stroke-width: 1.5; cursor: pointer; }
.pagoda-collapse-mark { pointer-events: none; fill: #b08968; font-size: 14px; font-weight: 700; }
.pagoda-empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); }
.pagoda-export summary { cursor: pointer; color: var(--pine); font-weight: 700; }
.pagoda-export[open] summary { margin-bottom: 14px; }
.pagoda-print-root { display: none; }

/* 9.1 家谱打印工作台 ------------------------------------------------------ */
.print-studio {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, .75fr);
  gap: 16px;
  align-items: start;
}
.print-config { padding: 20px; }
.print-page-head { margin: 0 0 18px; align-items: flex-start; }
.print-page-head h3 { margin: 0 0 5px; }
.print-format-pill {
  flex: 0 0 auto;
  border: 1px solid #d9e2de;
  border-radius: 999px;
  background: var(--panel-2);
  color: var(--pine);
  padding: 6px 11px;
  font-size: 12px;
  white-space: nowrap;
}
.print-style-fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.print-style-fieldset legend {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
}
.print-style-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.print-style-option {
  position: relative;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 8px;
  align-items: center;
  min-height: 70px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.print-style-option:hover { border-color: #b9cbc7; background: #fbfdfc; }
.print-style-option:has(input:checked) {
  border-color: var(--accent);
  background: #fffafa;
  box-shadow: inset 0 0 0 1px rgba(141, 48, 56, .14);
}
.print-style-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.print-style-icon {
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 7px;
  background: var(--pine-soft);
  color: var(--pine);
}
.print-style-option:has(input:checked) .print-style-icon {
  background: var(--accent-soft);
  color: var(--accent);
}
.print-style-option strong { font-size: 14px; line-height: 1.15; }
.print-style-option small { color: var(--muted); font-size: 11px; line-height: 1.2; }
.print-style-option.is-complete {
  grid-column: 1 / -1;
  min-height: 56px;
}
.print-form-grid,
.print-conditional-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
  gap: 12px;
  margin-top: 16px;
}
.print-control { display: grid; gap: 6px; color: var(--muted); font-size: 13px; }
.print-segmented { height: 38px; padding: 3px; }
.print-segmented .segment { padding: 0 10px; }
.print-conditional-grid {
  padding: 13px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fbfcfb;
}
.print-hanging-fields { border-left: 3px solid var(--gold); }
.print-advanced {
  margin-top: 16px;
  padding-top: 13px;
  border-top: 1px solid var(--line-soft);
}
.print-advanced summary {
  color: var(--pine);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.print-advanced .print-form-grid { margin-top: 12px; }
.print-preview-panel {
  position: sticky;
  top: 18px;
  padding: 18px;
}
.print-preview-head { margin-bottom: 12px; }
.print-preview-head h3 { margin: 0; }
.print-preview-head .icon { color: var(--muted); }
.print-preview-stage {
  min-height: 360px;
  display: grid;
  place-items: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(22, 86, 90, .035) 1px, transparent 1px),
    linear-gradient(rgba(22, 86, 90, .035) 1px, transparent 1px),
    #f2f5f3;
  background-size: 18px 18px;
  overflow: hidden;
}
.print-preview-sheet {
  position: relative;
  max-height: 390px;
  min-height: 250px;
  overflow: hidden;
  padding: 4%;
  border: 1px solid #ddd3c4;
  border-radius: 2px;
  background: #fffdf8;
  box-shadow: 0 14px 34px rgba(44, 34, 24, .16);
  transition: width .2s ease, aspect-ratio .2s ease;
}
.print-preview-summary {
  min-height: 36px;
  padding: 11px 2px 8px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.55;
}
.pp-title {
  margin: 0 auto 4%;
  color: var(--accent);
  text-align: center;
  font-family: "SimSun", "Songti SC", serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .12em;
}
.pp-tree { display: block; width: 100%; height: auto; overflow: visible; }
.pp-link { fill: none; stroke: #b48a62; stroke-width: 1.5; }
.pp-node rect { fill: #e3eff0; stroke: #5c9ca6; stroke-width: 1; }
.pp-node.subdued rect { fill: #f5eadf; stroke: #b99c7c; }
.pp-node text {
  fill: #293a3d;
  text-anchor: middle;
  font-size: 7px;
  font-family: "Microsoft YaHei", sans-serif;
}
.pp-hang-grid {
  display: grid;
  grid-template-columns: 15px repeat(var(--hang-cols), minmax(0, 1fr));
  grid-template-rows: repeat(var(--hang-rows), minmax(24px, 1fr));
  gap: 3px;
}
.pp-hang-label {
  display: grid;
  place-items: center;
  color: var(--accent);
  background: #f5e9e5;
  font-size: 5px;
  font-weight: 700;
  text-align: center;
  line-height: 1.1;
}
.pp-hang-cell {
  min-height: 24px;
  border: 1px solid #bdcdd0;
  background: #e5f0f1;
}
.pp-hang-cell.primary { border-color: var(--accent); background: #f1e1dc; }
.pp-table { border: 1px solid #b77d75; }
.pp-table-head,
.pp-table-row {
  display: grid;
  grid-template-columns: .7fr 1fr 2fr;
  min-height: 22px;
}
.pp-table-head { background: #f1e6e1; }
.pp-table-head span {
  display: grid;
  place-items: center;
  border-right: 1px solid #d8c5bf;
  color: var(--accent);
  font-size: 6px;
  font-weight: 700;
}
.pp-table-head span:last-child { border-right: 0; }
.pp-table-row {
  border-top: 1px solid #e4dcd6;
  background: rgba(255, 255, 255, .55);
}
.pp-table-row i { border-right: 1px solid #e4dcd6; }
.pp-table-row i:last-child { border-right: 0; }
.pp-euro-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  padding-bottom: 5px;
  border-bottom: 1px solid #3f3b35;
  color: #292620;
  font-family: "SimSun", "Songti SC", serif;
}
.pp-euro-header strong {
  min-width: 0;
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pp-euro-header span {
  flex: 0 0 auto;
  color: #766e63;
  font-size: 5.5px;
}
.pp-euro-grid {
  display: grid;
  direction: rtl;
  grid-template-columns: .72fr .92fr .76fr 1.08fr 2.05fr;
  grid-auto-rows: minmax(27px, 1fr);
  min-height: 245px;
  border: 1px solid #3f3b35;
  background: #fffdf7;
}
.pp-euro-grid > * {
  direction: ltr;
  min-width: 0;
  border-left: 1px solid #aca49a;
  border-bottom: 1px solid #aca49a;
}
.pp-euro-grid > *:nth-child(5n + 1) { border-left: 0; }
.pp-euro-head {
  display: grid;
  place-items: center;
  background: #e9e5dc;
  color: #292620;
  font-family: "SimSun", "Songti SC", serif;
  font-size: 6.5px;
  font-weight: 700;
}
.pp-euro-cell {
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 3px 2px;
  color: #3a352f;
  text-align: center;
  font-family: "SimSun", "Songti SC", serif;
  font-size: 5.5px;
  line-height: 1.35;
}
.pp-euro-generation,
.pp-euro-name {
  writing-mode: vertical-rl;
  text-orientation: upright;
  letter-spacing: .08em;
}
.pp-euro-name {
  font-size: 10px;
  font-weight: 700;
}
.pp-euro-bio {
  align-content: center;
  justify-items: start;
  color: #504a43;
  font-size: 5px;
  line-height: 1.55;
  text-align: left;
}
.pp-euro-foot {
  margin-top: 5px;
  color: #776f64;
  text-align: center;
  font-family: "SimSun", "Songti SC", serif;
  font-size: 5.5px;
}
.pp-sushi-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: #6e675f;
  font-family: "SimSun", "Songti SC", serif;
  font-size: 5.5px;
}
.pp-sushi-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 18px 14px;
  gap: 4px;
  height: calc(100% - 32px);
  min-height: 0;
  margin-top: 5px;
}
.pp-sushi-canvas {
  min-width: 0;
  border-top: 1px solid rgba(44, 40, 34, .16);
  border-bottom: 1px solid rgba(44, 40, 34, .16);
}
.pp-sushi-canvas svg {
  display: block;
  width: 100%;
  height: 100%;
}
.pp-sushi-links {
  fill: none;
  stroke: #26231f;
  stroke-width: 1.05;
  stroke-linecap: square;
  stroke-linejoin: miter;
  vector-effect: non-scaling-stroke;
}
.pp-sushi-node circle {
  fill: #fffdf8;
  stroke: #26231f;
  stroke-width: .8;
}
.pp-sushi-node text {
  fill: #26231f;
  font-family: "SimSun", "Songti SC", serif;
  font-size: 10px;
  text-anchor: middle;
}
.pp-sushi-node .pp-sushi-note {
  fill: #8b433f;
  font-size: 3.6px;
  text-anchor: start;
}
.pp-sushi-spine {
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  padding: 3px 0;
  border: 1px solid #292621;
  color: #1f1d1a;
  text-align: center;
  font-family: "SimSun", "Songti SC", serif;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.15;
}
.pp-sushi-generations {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-items: stretch;
  gap: 8px;
}
.pp-sushi-generations span {
  display: grid;
  flex: 1;
  place-items: center;
  padding: 2px 0;
  border-radius: 2px;
  background: #26231f;
  color: #fff;
  font-family: "SimSun", "Songti SC", serif;
  font-size: 4.8px;
  font-weight: 700;
  line-height: 1.1;
  text-align: center;
  writing-mode: vertical-rl;
}
.pp-sushi-foot {
  margin-top: 4px;
  color: #857d72;
  text-align: right;
  font-family: "SimSun", "Songti SC", serif;
  font-size: 5px;
}

/* 10 弹窗 / 提示 --------------------------------------------------------- */
.modal {
  position: fixed;
  z-index: 40;
  inset: 0;
  margin: auto;
  width: min(900px, calc(100vw - 24px));
  max-height: calc(100vh - 40px);
  overflow: auto;
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 22px;
}
.overlay { position: fixed; inset: 0; background: rgba(9, 28, 30, .48); z-index: 30; }
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.modal-head h3 { margin: 0; font-size: 19px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 13px; }
.form-full { grid-column: 1 / -1; }
.form-section-title {
  grid-column: 1 / -1;
  margin: 10px 0 0;
  color: var(--pine);
  font-weight: 700;
  font-size: 13.5px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 7px;
}
.profile-tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  margin: 4px 0 18px;
}
.profile-tab {
  appearance: none;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  padding: 9px 14px;
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  white-space: nowrap;
  cursor: pointer;
}
.profile-tab:hover { color: var(--pine); background: var(--panel-2); }
.profile-tab.active {
  color: var(--pine);
  border-bottom-color: var(--pine);
  font-weight: 700;
}
.profile-identity {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  padding: 16px;
  background: var(--panel-2);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
}
.profile-photo {
  width: 132px;
  height: 160px;
  flex: 0 0 132px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
}
.profile-photo img { width: 100%; height: 100%; object-fit: cover; }
.profile-identity-main { flex: 1; min-width: 0; display: grid; gap: 8px; }
.profile-identity-main h4 { margin: 0; font-size: 20px; }
.profile-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 4px 16px;
  margin-top: 14px;
}
.profile-field { display: grid; gap: 3px; padding: 8px 0; border-bottom: 1px dashed var(--line-soft); }
.profile-field span { font-size: 12px; color: var(--muted); }
.profile-field strong { font-size: 14px; font-weight: 600; word-break: break-word; }
.profile-section { margin-top: 20px; }
.profile-section h4 { margin: 0 0 8px; color: var(--pine); font-size: 14.5px; }
.profile-text { margin: 0; white-space: pre-wrap; line-height: 1.75; }
.profile-event-list { margin: 0; padding-left: 20px; line-height: 1.8; }
.digital-material-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}
.digital-material {
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: var(--panel-2);
}
.digital-material h5 { margin: 0; color: var(--pine); font-size: 13.5px; }
.digital-material p { margin: 0; }
.digital-material input[type="file"] { width: 100%; }
.digital-preview { margin-top: 14px; display: grid; gap: 8px; }
.digital-preview video { width: 100%; max-height: 360px; border-radius: var(--radius-sm); background: #000; }
.digital-preview img { max-width: 100%; border-radius: var(--radius-sm); }
.row-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; flex-wrap: wrap; }
.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  background: var(--pine-deep);
  color: #fff;
  border-radius: var(--radius-sm);
  padding: 11px 18px;
  box-shadow: var(--shadow);
  z-index: 50;
  font-size: 14px;
  max-width: calc(100vw - 32px);
}
.toast.error { background: var(--accent-dark); }

/* 11 响应式 -------------------------------------------------------------- */
@media (max-width: 620px) {
  .auth-qr-image { width: 88px; height: 88px; }
}
@media (max-width: 440px) {
  .auth-main { padding: 24px 18px 22px; }
  .auth-qr-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 980px) {
  .landing-hero { grid-template-columns: minmax(0, 1fr); padding-top: 26px; }
  .landing-hero-art { min-height: 320px; transform: none; }
  .landing-hero-art img { min-height: 320px; }
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .update-layout { grid-template-columns: minmax(0, 1fr); }
  .manual-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .landing-nav { flex-wrap: wrap; gap: 10px 14px; }
  .landing-actions { margin-left: auto; }
  .landing-links { order: 3; width: 100%; margin-left: 0; padding-bottom: 2px; }
  .landing-links a { padding: 6px 9px; font-size: 13px; }
}
@media (max-width: 620px) {
  .landing-nav, .landing-main, .landing-footer { width: calc(100% - 24px); }
  .landing-brand-text small { display: none; }
  .landing-hero { gap: 24px; }
  .landing-hero-copy h1 { font-size: 36px; letter-spacing: 0; }
  .landing-lead { font-size: 14.5px; }
  .landing-hero-facts { gap: 8px 16px; }
  .landing-section { padding-top: 48px; }
  .landing-section-head-row { grid-template-columns: minmax(0, 1fr); }
  .version-pill { justify-self: start; }
  .feature-grid, .manual-grid { grid-template-columns: minmax(0, 1fr); }
  .download-card { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .download-qr { justify-self: start; }
  .update-list { padding: 4px 16px; }
  .update-list li { grid-template-columns: minmax(0, 1fr); gap: 5px; }
  .landing-footer { flex-direction: column; }
}
@media (max-width: 1180px) {
  .memorial-grid { grid-template-columns: minmax(0, 1fr); }
  .memorial-side { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
}
@media (max-width: 980px) {
  .conversation-layout { grid-template-columns: minmax(0, 1fr); }
  .call-panel { position: static; }
  .call-media { min-height: 260px; aspect-ratio: 4 / 3; }
  .auth-card { grid-template-columns: minmax(0, 1fr); }
  .auth-aside { min-height: 190px; }

  .print-studio { grid-template-columns: minmax(0, 1fr); }
  .print-preview-panel { position: static; }
}
@media (max-width: 860px) {
  .app-shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar {
    position: sticky;
    top: 0;
    height: auto;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    z-index: 20;
  }
  .sidebar-brand-text { display: none; }
  .side-nav { display: flex; gap: 4px; flex: 1; overflow-x: auto; }
  .nav-item { padding: 9px 12px 9px 34px; white-space: nowrap; font-size: 13.5px; }
  .nav-item.active::after { display: none; }
  .nav-item::before { left: 11px; width: 16px; height: 16px; -webkit-mask-size: 16px 16px; mask-size: 16px 16px; }
  .sidebar-foot { margin-top: 0; display: flex; align-items: center; gap: 8px; }
  .me-chip { display: none; }
  .content { padding: 20px 14px 60px; }
  .ws-head { margin: -20px -14px 0; padding: 16px 14px 0; }
  .asset-editor, .lineage-card, .custom-cover-layout { grid-template-columns: minmax(0, 1fr); }
  .custom-cover-preview { justify-self: center; max-width: 230px; }
  .lineage-photo { justify-self: start; }
  .preface-card { flex-direction: column; }
  .attachment-card { grid-template-columns: 64px minmax(0, 1fr); }
  .attachment-card .actions-cell { grid-column: 1 / -1; }
  .tree-list, .tree-list ul { padding-left: 18px; }
  .chat-main { height: calc(100vh - 210px); min-height: 420px; }
  .bubble { max-width: 84%; }
  .pagoda-stage { height: 64vh; min-height: 420px; }
  .pagoda-head { align-items: flex-start; }
  .print-style-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .print-config { padding: 16px; }
  .print-preview-stage { min-height: 300px; }
  .page-head h2 { font-size: 22px; }
}

/* 12 打印 ---------------------------------------------------------------- */
@media print {
  @page { size: landscape; margin: 8mm; }
  body.pagoda-printing > :not(.pagoda-print-root) { display: none !important; }
  body.pagoda-printing .pagoda-print-root {
    display: block !important;
    position: fixed;
    inset: 0;
    background: #f5f0eb;
  }
  body.pagoda-printing .pagoda-print-root svg { display: block; width: 100vw; height: 100vh; }
}
/* 补充：缅怀卡片与聊天细节 ---------------------------------------------- */
.soul-head { display: flex; align-items: center; gap: 11px; min-width: 0; }
.soul-head .row-main { min-width: 0; }
.soul-head strong { display: block; font-size: 16px; }
.soul-head small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 4px; }
.chat-video-btn { background: var(--pine-soft); border-color: #cfe0dd; color: var(--pine); }
.chat-video-btn:hover { background: #d8e8e6; }
.chat-input-bar .icon-btn { flex: 0 0 34px; align-self: center; }
.msg-row .avatar img { width: 100%; height: 100%; object-fit: cover; }
.ws-actions .btn { flex: 0 0 auto; }
/* 补充：走查后的细节调整 ------------------------------------------------ */
.quick-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.member-facts dd { margin: 0; }
.member-facts dt { margin-bottom: 3px; }
.sheet-title { display: block; font-size: 16.5px; margin-bottom: 4px; }
.lineage-card { grid-template-columns: 108px minmax(0, 1fr); gap: 20px; padding: 14px 20px; }
.lineage-photo, .lineage-photo img { width: 72px; height: 72px; }
.lineage-photo span { font-size: 48px; }
.lineage-content p { margin: 3px 0; }
.soul-hero { display: flex; align-items: center; gap: 16px; }
.soul-hero-main { min-width: 0; }
.soul-hero-main h3 { margin: 0 0 5px; font-size: 20px; }
.soul-preview { color: var(--ink-2); font-size: 14px; line-height: 1.7; }
.soul-detail .soul-actions { margin-top: 18px; }
@media (max-width: 620px) {
  .profile-identity { flex-direction: column; }
  .profile-photo { width: 100%; height: 210px; flex-basis: auto; }
  .profile-tab { padding: 9px 11px; font-size: 13.5px; }
  .digital-material-grid { grid-template-columns: minmax(0, 1fr); }
}
