/* 抄经应用 · 移动端优先样式（无构建、纯 CSS） */
:root {
  --bg: #1a1611;
  --bg-soft: #241e16;
  --ink: #e8ddc8;
  --ink-dim: #a99c80;
  --gold: #c9a24b;
  --gold-deep: #8f6f2a;
  --card: #2b241a;
  --line: #3a3122;
  --red: #c0564d;
  --paper: #f4eddc;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg); color: var(--ink);
  font-family: "Songti SC", "STSong", "Noto Serif SC", serif;
  overscroll-behavior: none;
}

#app { max-width: 560px; margin: 0 auto; min-height: 100dvh; }

.screen { display: none; min-height: 100dvh; padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
.screen.active { display: block; }
/* 顶栏已移除：各屏顶部留出安全距离 */
#screen-library, #screen-work { padding-top: calc(10px + env(safe-area-inset-top)); }

/* 顶栏 */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(12px + env(safe-area-inset-top)) 16px 12px;
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; background: var(--bg); z-index: 10;
}
.topbar h2 { margin: 0; font-size: 20px; letter-spacing: 4px; font-weight: 600; }
.topbar-spacer { width: 48px; }
.topbar .ghost-btn {
  min-height: 36px; padding: 6px 16px; font-size: 14px;
  border-radius: 999px; background: transparent;
}

/* 按钮：触摸友好，最小 48px */
button {
  font-family: inherit; font-size: 16px; min-height: 48px;
  border-radius: 12px; border: 1px solid var(--line);
  background: var(--card); color: var(--ink); padding: 12px 18px;
  cursor: pointer;
}
button:active { transform: scale(0.97); }
.btn-primary { background: var(--gold); border-color: var(--gold); color: #1a1611; font-weight: 700; }
.btn-secondary { background: var(--card); }
.btn-ghost { background: transparent; border: none; font-size: 20px; min-width: 48px; }
.btn-big { width: 100%; font-size: 18px; }

/* 推荐码页 */
#screen-invite { display: none; align-items: center; justify-content: center; padding: 24px; }
#screen-invite.active { display: flex; }
.invite-card { text-align: center; width: 100%; max-width: 340px; }
.invite-seal { font-size: 56px; }
.invite-card h1 { font-size: 44px; letter-spacing: 12px; margin: 16px 0 8px; }
.subtitle { color: var(--ink-dim); letter-spacing: 6px; margin-bottom: 32px; }
#invite-code {
  width: 100%; min-height: 52px; font-size: 18px; text-align: center;
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: 12px;
  color: var(--ink); margin-bottom: 16px; letter-spacing: 2px;
}
#btn-verify { width: 100%; }
.msg { min-height: 24px; color: var(--red); font-size: 14px; }

/* 注册 / 登录 */
#screen-auth { display: none; align-items: center; justify-content: center; padding: 24px; }
#screen-auth.active { display: flex; }
.invite-sub { color: var(--ink-dim); font-size: 14px; margin: 0 0 16px; }
.invite-input {
  width: 100%; min-height: 52px; font-size: 17px; text-align: center;
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: 12px;
  color: var(--ink); margin-bottom: 12px; letter-spacing: 1px; box-sizing: border-box;
}
.code-row { display: flex; gap: 8px; margin-bottom: 12px; }
.code-row .invite-input { flex: 1; min-width: 0; margin-bottom: 0; }
#btn-auth-send-code {
  white-space: nowrap; font-size: 15px; padding: 0 16px; min-height: 52px;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--bg-soft); color: var(--ink);
}
#btn-auth-send-code:disabled { opacity: 0.5; }
#btn-auth-submit { width: 100%; }

/* 经文库 */
.filter-row { display: flex; gap: 10px; padding: 14px 16px; }
.chip {
  flex: 1; min-height: 44px; border-radius: 999px;
  background: var(--bg-soft); border: 1px solid var(--line); font-size: 15px;
}
.chip.active { background: var(--gold); border-color: var(--gold); color: #1a1611; font-weight: 700; }
.sutra-list { list-style: none; margin: 0; padding: 0 16px; display: flex; flex-direction: column; gap: 12px; }
.sutra-list li {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 16px; min-height: 64px;
}
.sutra-list li:active { border-color: var(--gold); }
.sutra-title { font-size: 18px; margin-bottom: 6px; }
.sutra-meta { font-size: 13px; color: var(--ink-dim); }
.sutra-intro { font-size: 14px; color: var(--ink-dim); margin-top: 8px; line-height: 1.6; }
.badge-todo { color: var(--gold); font-size: 13px; border: 1px solid var(--gold-deep); border-radius: 8px; padding: 2px 8px; margin-left: 8px; }

/* 选择器（字体 / 笔） */
.picker-hint { text-align: center; color: var(--ink-dim); font-size: 14px; margin: 8px 16px 16px; }
.pick-cards { display: flex; flex-direction: column; gap: 12px; padding: 0 20px; }
.pick-card {
  display: flex; align-items: center; gap: 16px;
  background: var(--card); border: 2px solid var(--line); border-radius: 16px;
  padding: 14px 18px; text-align: left; width: 100%;
}
.pick-card.selected { border-color: var(--gold); background: #33291a; }
.pick-card .preview {
  width: 64px; height: 64px; line-height: 64px; text-align: center;
  font-size: 44px; color: var(--ink); background: var(--paper);
  border-radius: 12px; flex-shrink: 0;
}
.pick-card .pick-name { font-size: 19px; letter-spacing: 3px; }
.pick-card .pick-desc { font-size: 13px; color: var(--ink-dim); margin-top: 4px; }
/* 背景音：场景/调制选项 chips */
.chip-row {
  display: flex; flex-wrap: wrap; gap: 10px;
  padding: 0 20px; margin-bottom: 18px;
}
.chip-row .chip {
  border: 1px solid var(--line); border-radius: 999px;
  background: transparent; color: var(--ink);
  font-size: 15px; padding: 8px 16px; cursor: pointer;
}
.chip-row .chip.selected {
  border-color: var(--gold); color: var(--gold);
  background: #33291a;
}
/* 背景音：音量滑杆 */
.vol-row {
  display: flex; align-items: center; gap: 12px;
  padding: 0 20px; margin-bottom: 18px;
}
.vol-row span { font-size: 14px; color: var(--ink-dim); white-space: nowrap; }
.vol-row input[type="range"] { flex: 1; accent-color: var(--gold); }
.picker-foot { padding: 20px; }
.picker-foot .btn-secondary { width: 100%; margin-top: 10px; }

/* 全屏抄写 */
#screen-write {
  position: fixed; inset: 0; z-index: 50;
  padding: 0; min-height: 100dvh; background: var(--paper);
}
#screen-write.active { display: block; }
#paper-canvas, #ink-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  touch-action: none;
}
#paper-canvas { z-index: 1; }
#ink-canvas { z-index: 2; }

/* 开场：经名 / 段落慢读 */
#intro-overlay {
  position: absolute; inset: 0; z-index: 5;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 32px; pointer-events: none;
  transition: opacity 0.6s ease;
}
#intro-overlay.hidden { display: none; }
/* 通用隐藏：所有用 .hidden 控制显隐的元素 */
.hidden { display: none !important; }
#intro-overlay.fading { opacity: 0; }
#intro-title {
  font-size: 40px; letter-spacing: 14px; color: #3a2f1d;
  margin-bottom: 28px; text-align: center; padding-left: 14px;
  text-shadow: 0 1px 0 rgba(255,255,255,.5);
}
#intro-para {
  font-size: 24px; line-height: 2.1; color: #8a7a5c; text-align: center;
  max-width: 92%;
}
#intro-para span { transition: color 0.3s; }
#intro-para span.lit { color: #2b2118; }

/* 弹窗选择器 */
.picker-overlay {
  position: absolute; inset: 0; z-index: 20;
  display: flex; align-items: center; justify-content: center;
  background: rgba(26, 22, 17, 0.55); padding: 24px;
}
.picker-overlay.hidden { display: none; }
/* 回向/放映/回放等弹窗盖住全局工具按钮（完成屏除外：它的功能按钮就在全局工具按钮里） */
#dedicate-overlay, #inkplay-overlay, #replay-overlay { z-index: 70; }
.picker-card {
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: 20px;
  padding: 24px 20px; width: 100%; max-width: 420px;
  max-height: 82dvh; overflow-y: auto;
}
.picker-card h3 { margin: 0 0 16px; text-align: center; letter-spacing: 6px; font-size: 20px; }
.picker-card .pick-cards { padding: 0; margin-bottom: 16px; }
.done-seal { font-size: 48px; text-align: center; }
.done-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }

/* 左下角：工具 + 橡皮 */
#write-ui {
  position: absolute; z-index: 10;
  left: calc(18px + env(safe-area-inset-left));
  bottom: calc(24px + env(safe-area-inset-bottom));
  display: flex; gap: 14px;
}
.fab {
  width: 60px; height: 60px; min-height: 60px; border-radius: 50%;
  background: rgba(26, 22, 17, 0.85); border: 1px solid var(--gold-deep);
  color: var(--gold); font-size: 24px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,.35);
}

.workview-title { font-size: 20px; margin: 0 0 4px; text-align: center; }

/* 工具菜单：从左下角散布全屏（书写屏与全局共用） */
.tools-menu { position: fixed; inset: 0; z-index: 60; pointer-events: none; }
.tools-menu.hidden { display: none; }
#global-tools {
  position: fixed; z-index: 61;
  left: calc(18px + env(safe-area-inset-left));
  bottom: calc(24px + env(safe-area-inset-bottom));
}
.tool-item {
  position: absolute; pointer-events: auto;
  left: calc(18px + env(safe-area-inset-left));
  bottom: calc(24px + env(safe-area-inset-bottom));
  width: 64px; height: 64px; min-height: 64px; border-radius: 50%; padding: 0;
  background: rgba(26, 22, 17, 0.92); border: 1px solid var(--gold);
  color: var(--ink); font-size: 15px; letter-spacing: 1px;
  opacity: 0; transform: translate(0, 0) scale(0.4);
  transition: transform 0.32s cubic-bezier(0.2, 0.9, 0.3, 1.2), opacity 0.25s;
}
.tools-menu.open .tool-item { opacity: 1; transform: translate(var(--tx), var(--ty)) scale(1); }
.tool-item.off { color: var(--ink-dim); border-color: var(--line); }
.tools-menu.open .tool-item:nth-child(1) { --tx: 12px;  --ty: -190px; }
.tools-menu.open .tool-item:nth-child(2) { --tx: 92px;  --ty: -168px; }
.tools-menu.open .tool-item:nth-child(3) { --tx: 158px; --ty: -118px; }
.tools-menu.open .tool-item:nth-child(4) { --tx: 196px; --ty: -48px; }
.tools-menu.open .tool-item:nth-child(5) { --tx: 150px; --ty: -210px; }
.tools-menu.open .tool-item:nth-child(6) { --tx: 230px; --ty: -140px; }
.tools-menu.open .tool-item:nth-child(7) { --tx: 250px; --ty: -60px; }
.tools-menu.open .tool-item:nth-child(8) { --tx: 60px;  --ty: -250px; }
.tools-menu.open .tool-item:nth-child(9) { --tx: 150px; --ty: -260px; }
.tools-menu.open .tool-item:nth-child(10) { --tx: 230px; --ty: -210px; }

/* 工具菜单内联选项面板：点 字体/背景音 时展开，其他工具按钮收起，不弹新界面 */
.tool-panel {
  position: absolute; pointer-events: auto;
  left: calc(18px + env(safe-area-inset-left));
  bottom: calc(100px + env(safe-area-inset-bottom));
  width: min(340px, calc(100vw - 36px));
  max-height: 62dvh; overflow-y: auto;
  background: rgba(26, 22, 17, 0.96); border: 1px solid var(--gold);
  border-radius: 16px; padding: 14px 0;
}
.tool-panel.hidden { display: none; }
.tool-panel .pick-label { padding: 0 16px; margin-bottom: 8px; }
.tool-panel .chip-row { padding: 0 16px; margin-bottom: 14px; }
.tool-panel .vol-row { padding: 0 16px; margin-bottom: 14px; }
.tool-panel .pick-cards { padding: 0 16px; }
.tools-menu.panel-open .tool-item {
  opacity: 0; transform: translate(0, 0) scale(0.4); pointer-events: none;
}
.tools-menu.panel-open .tool-item.active-tool {
  opacity: 1; transform: translate(0, 0) scale(1); pointer-events: auto;
}

/* 悬浮小按钮 */
.pill {
  position: absolute; z-index: 15;
  left: 50%; transform: translateX(-50%);
  bottom: calc(110px + env(safe-area-inset-bottom));
  background: rgba(26, 22, 17, 0.9); border: 1px solid var(--gold);
  color: var(--gold); border-radius: 999px; font-size: 15px;
  padding: 12px 26px; white-space: nowrap;
}
.pill.hidden { display: none; }
#btn-force-next { border-color: var(--gold-deep); color: var(--ink); }

/* 欣赏 */
#work-head { text-align: center; padding: 18px 16px 6px; }
#work-head h3 { margin: 0 0 6px; font-size: 24px; letter-spacing: 8px; }
#work-head p { margin: 0; color: var(--ink-dim); font-size: 13px; }
.work-sheet {
  display: flex; flex-direction: column; gap: 14px;
  padding: 12px 20px 8px; align-items: center;
}
.work-char {
  background: var(--paper); border-radius: 12px; padding: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,.3); width: 200px;
}
#workview-sheet .work-char { cursor: pointer; }
.work-char img { display: block; width: 100%; border-radius: 6px; }
/* 燃过的纸卡：留灰烬 */
.work-char.burned { box-shadow: 0 2px 10px rgba(0,0,0,.3), inset 0 0 12px rgba(110,100,75,.35); }
.work-empty { color: var(--ink-dim); text-align: center; padding: 40px 0; }

/* 打印：屏幕隐藏，打印时只显示作品 */
#print-sheet { display: none; }
@media print {
  #app { display: none !important; }
  #print-sheet { display: block; color: #000; background: #fff; }
  #print-sheet h1 { text-align: center; letter-spacing: 10px; font-size: 28px; }
  #print-sheet .print-meta { text-align: center; color: #555; font-size: 13px; margin-bottom: 16px; }
  #print-sheet .print-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 8px; }
  #print-sheet .print-grid img { width: 100%; }
}

/* ---- 作品（v8）：画廊卡片 / 作品查看 / 回放 ---- */
.sec-title { font-size: 16px; margin: 20px 16px 8px; color: var(--ink); }
.foot-spacer { height: 40px; }
.work-cards { display: flex; flex-direction: column; gap: 10px; padding: 0 16px; }
.work-card {
  border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px;
  background: var(--card); text-align: left; width: 100%;
}
.work-card:active { border-color: var(--gold); }
.work-card .wc-title { font-size: 15px; font-weight: 600; }
.work-card .wc-meta { font-size: 12px; color: var(--ink-dim); margin-top: 4px; }
.work-card .wc-bar { height: 4px; border-radius: 2px; background: var(--line); margin-top: 8px; overflow: hidden; }
.work-card .wc-bar i { display: block; height: 100%; background: var(--gold); border-radius: 2px; }
.work-empty-hint { font-size: 13px; color: var(--ink-dim); padding: 4px 16px; }

/* 抄本集合屏：按经文归集 */
.collection-group { margin: 6px 0 18px; }
.collection-head { display: flex; align-items: center; justify-content: space-between; padding: 0 16px; margin-bottom: 4px; }
.collection-name { font-size: 15px; font-weight: 600; color: var(--ink); }

#workview-head { padding: 0 16px; }
.workview-actions { display: flex; gap: 10px; margin: 12px 0; }
/* 作品查看已改欣赏式纸卡（.work-char），旧字格样式移除 */

/* 单字欣赏：全屏，界面同首次书写 */
#screen-char {
  position: fixed; inset: 0; z-index: 50;
  padding: 0; min-height: 100dvh; background: var(--paper);
}
#char-paper, #char-ink {
  position: absolute; inset: 0; width: 100%; height: 100%;
  touch-action: none;
}
#char-paper { z-index: 1; }
#char-ink { z-index: 2; }
#screen-char.no-input #char-ink { pointer-events: none; } /* 回放态禁落笔 */
#char-label {
  position: absolute; top: calc(10px + env(safe-area-inset-top)); left: 0; right: 0; z-index: 3;
  text-align: center; color: var(--ink-dim); font-size: 13px; letter-spacing: 2px;
  pointer-events: none;
}
#char-label .char-nav { pointer-events: auto; padding: 6px 18px; font-size: 20px; color: var(--ink-dim); }
#char-ui {
  position: absolute; z-index: 4;
  left: calc(18px + env(safe-area-inset-left)); bottom: calc(24px + env(safe-area-inset-bottom));
  display: flex; gap: 12px;
}
.char-toast {
  position: absolute; z-index: 5; left: 50%; bottom: 110px; transform: translateX(-50%);
  background: rgba(26,22,17,.85); color: var(--gold); font-size: 13px; letter-spacing: 2px;
  padding: 8px 18px; border-radius: 999px; border: 1px solid var(--gold-deep);
  transition: opacity .3s;
}

/* 完成后去向选择 */
.farewell-block { margin: 4px 0 8px; padding: 10px 0 2px; border-top: 1px solid var(--line); }
.farewell-title { text-align: center; font-size: 13px; color: var(--ink-dim); margin: 0 0 8px; letter-spacing: 2px; }
.farewell-row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-bottom: 8px; }

/* 作品查看：欣赏式纸卡（.work-char），见上方 */
/* 落笔放映 */
.inkplay-card { width: min(94vw, 480px); }
.inkplay-stage { position: relative; width: 100%; aspect-ratio: 3/4; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--paper); margin: 0 auto; }
.inkplay-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.inkplay-bar { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
#inkplay-label { font-size: 14px; color: var(--ink-dim); }

/* 回向 */
.dedication-block { margin: 10px 16px 0; padding: 12px 14px; border-radius: 10px;
  background: #f7f1e3; border: 1px solid #e0d0a8; }
.dedication-label { font-size: 13px; letter-spacing: 3px; color: #8a6d2f; margin-bottom: 6px; }
.dedication-text { font-size: 15px; line-height: 2; color: #4a3b28; margin: 0;
  font-family: "Songti SC", "Noto Serif CJK SC", serif; }
.dedicate-card { width: min(92vw, 420px); }
.dedicate-label2 { display: block; font-size: 13px; color: var(--ink-dim); margin: 10px 0 4px; }
.text-input { width: 100%; box-sizing: border-box; padding: 10px 12px; font-size: 15px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--ink); }
.dedicate-preview { font-size: 14px; line-height: 2; color: #4a3b28;
  font-family: "Songti SC", "Noto Serif CJK SC", serif;
  background: #f7f1e3; border: 1px solid #e0d0a8; border-radius: 8px; padding: 10px 12px; margin: 4px 0 0; }

/* 回向仪式：顶部只有一条薄透条（半透明回向文 + 进度条），下方纸完整可见、燃烧可见 */
#ceremony-overlay { position: fixed; inset: 0; z-index: 80; display: flex; flex-direction: column; }
#ceremony-overlay.hidden { display: none !important; }
.ceremony-veil { display: none; } /* 不再压暗：纸与燃烧全程清晰可见 */
.ceremony-banner { position: relative; z-index: 2; flex: none;
  padding: 8px 16px 16px;
  background: linear-gradient(to bottom, rgba(24,19,12,.88), rgba(24,19,12,.5) 62%, rgba(24,19,12,0));
  border-bottom: none; max-height: 30vh; overflow-y: auto; }
#ceremony-stage { position: relative; z-index: 1; flex: 1; overflow-y: auto; padding-bottom: 28px; }

/* 双视图：逐字 | 整纸 */
.view-toggle { display: flex; gap: 10px; justify-content: center; margin: 12px 0 6px; }
.vt-btn { padding: 6px 26px; border-radius: 20px; border: 1px solid var(--line);
  background: transparent; color: var(--ink-dim); font-size: 14px; letter-spacing: 4px; }
.vt-btn.active { background: var(--gold); border-color: var(--gold); color: #1a1408; font-weight: 700; }

/* 逐字：一列大纸卡，上下滚动浏览，点卡回放 */
.char-list { display: flex; flex-direction: column; gap: 20px; padding: 14px 0 34px; align-items: center; }
.list-card { width: min(80vw, 360px); }
.list-cap { text-align: center; font-size: 13px; color: var(--ink-dim); margin-top: 8px; letter-spacing: 2px; }

/* 整纸：横排，复刻 PDF 版式（等比缩小），只收录写过的字 */
.dual-sheet { display: flex; flex-direction: column; gap: 22px; padding: 14px 0 34px; align-items: center; }
.paper-sheet {
  background: linear-gradient(135deg, #f7f1e0 0%, #f1e7cd 60%, #e9dcc0 100%);
  border: 1px solid #d8c69a; border-radius: 6px;
  box-shadow: 0 4px 18px rgba(0,0,0,.45), inset 0 0 40px rgba(150,120,70,.18);
  padding: 24px 20px; margin: 0 14px 18px; width: calc(100% - 28px); max-width: 760px; box-sizing: border-box;
}
/* 整纸版式复刻 PDF（等比缩小 0.6）：标题 28→17，字格 120→72，间距 10→6 */
.sheet-title {
  text-align: center; white-space: nowrap; overflow: hidden;
  font-size: 17px; color: #2b2118; letter-spacing: 6px; text-indent: 6px;
  margin: 4px 0 6px; line-height: 1.4;
}
.sheet-meta {
  text-align: center; white-space: nowrap; overflow: hidden;
  font-size: 11px; color: #8a7a5f; margin-bottom: 12px;
}
.sheet-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; }
/* 字格：通用正方形（全部字形边框的最大者），同一比例，无格线 */
.sheet-cell { margin: 0; line-height: 0; aspect-ratio: 1; }
.sheet-cell img { width: 100%; height: 100%; display: block; }
.sheet-cell.burned { box-shadow: inset 0 0 10px rgba(110,100,75,.4); border-radius: 4px; }
.sheet-cell.burned img { object-fit: cover; }
.work-empty-hint { color: var(--ink-dim); text-align: center; font-size: 13px; padding: 6px 0 20px; }
.ceremony-title-row { display: flex; align-items: center; justify-content: space-between; }
.ceremony-banner .dedication-label { color: rgba(222,192,132,.92); margin-bottom: 4px;
  text-shadow: 0 1px 6px rgba(0,0,0,.7); }
#ceremony-fold { padding: 2px 8px; font-size: 12px; opacity: .85; }
.ceremony-banner.collapsed #ceremony-text { display: none; }
.ceremony-text { font-size: 14px; line-height: 1.8; color: rgba(232,221,200,.82);
  text-shadow: 0 1px 8px rgba(0,0,0,.75);
  font-family: "Songti SC", "Noto Serif CJK SC", serif; letter-spacing: 1px; }
.ceremony-text .ch-read { color: rgba(255,217,120,.96); text-shadow: 0 0 10px rgba(255,217,120,.65); }
.ceremony-status { margin-top: 6px; font-size: 12px; color: rgba(205,175,115,.85); letter-spacing: 2px;
  text-shadow: 0 1px 6px rgba(0,0,0,.7); }
.ceremony-done-mark { color: #ffd978; font-size: 20px; letter-spacing: 4px; text-align: center; margin-top: 6px; }
/* 回向进度条 */
.ceremony-progress {
  height: 3px; background: rgba(232,179,75,.18); border-radius: 2px;
  margin: 10px 2px 2px; overflow: hidden;
}
.ceremony-progress i {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, #b8862f, #f4d47c);
  border-radius: 2px; transition: width .15s linear;
}
/* 回向文种类选择 */
.dedicate-kinds { display: flex; flex-wrap: wrap; gap: 8px; margin: 2px 0 4px; }
.dedicate-kinds .chip.active { background: #8a6d2f; color: #fff; border-color: #8a6d2f; }
.dedicate-label2 { font-size: 13px; color: #8a6d2f; margin: 10px 0 6px; letter-spacing: 2px; }
/* 经文库回向计数按钮 */
.ded-count { margin-top: 8px; padding: 6px 14px; font-size: 13px; border: 1px solid #c9a86a;
  background: rgba(201,168,106,.12); color: #8a6d2f; border-radius: 999px; letter-spacing: 1px; }
/* 回向记录墙 */
.ded-wall { display: flex; flex-direction: column; gap: 14px; padding: 4px 14px 24px; }
.ded-card { background: linear-gradient(160deg, #f7f1e3, #efe5cf);
  border: 1px solid #d9c9a3; border-radius: 10px; padding: 14px; }
.ded-text { font-size: 15px; line-height: 2; color: #4a3b28; letter-spacing: 1px;
  font-family: "Songti SC", "Noto Serif CJK SC", serif; }
.ded-ash { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 10px;
  padding: 8px; background: rgba(60,50,35,.08); border-radius: 6px; }
.ded-ashcell { width: 16px; height: 16px; border-radius: 3px;
  background: radial-gradient(circle at 40% 35%, #b9ab8f 0%, #8d7f66 55%, #6e6350 100%);
  opacity: .85; }
.ded-ashmore { font-size: 11px; color: #8a6d2f; align-self: center; margin-left: 4px; }
.ded-foot { margin-top: 8px; font-size: 12px; color: #9a8a6a; letter-spacing: 1px; }

/* ---- 上传经书（v54） ---- */
.upload-card { width: min(92vw, 440px); max-height: 88vh; overflow-y: auto; }
.upload-pledge { color: #8a6d2f; }
.upload-textarea { min-height: 120px; resize: vertical; line-height: 1.6; }
.upload-file-label { display: inline-block; margin: 6px 0 2px; font-size: 14px; color: #8a6d2f;
  border: 1px dashed #b49b5e; border-radius: 8px; padding: 8px 12px; cursor: pointer; }
.upload-check { display: flex; align-items: flex-start; gap: 8px; margin: 10px 0 2px;
  font-size: 14px; color: var(--ink); cursor: pointer; }
.upload-check input { margin-top: 3px; width: 16px; height: 16px; }
.badge-upload { display: inline-block; font-size: 11px; border: 1px solid #b49b5e; color: #8a6d2f;
  border-radius: 6px; padding: 1px 6px; margin-left: 6px; vertical-align: 1px; }
.sutra-own-actions { margin-top: 6px; display: flex; gap: 8px; }
.btn-mini { font-size: 12px; padding: 5px 10px; border-radius: 8px; border: 1px solid #b49b5e;
  background: transparent; color: #8a6d2f; }
.btn-mini.danger { border-color: #b05c5c; color: #b05c5c; }
