/* ============================================================
   AI 回忆录 — 极简 · 留白 · 暖色纸质质感（移动端优先）
   ============================================================ */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --paper: #faf7f1;         /* 纸面底色 */
  --card: #fffdf8;          /* 卡片 */
  --ink: #3d352c;           /* 主文字（墨色） */
  --ink-light: #8a7f6f;     /* 次级文字 */
  --ink-faint: #b3a893;     /* 弱文字 */
  --accent: #b4824f;        /* 主色（赭金） */
  --accent-deep: #8a5d33;   /* 深主色 */
  --accent-bg: #f5ede1;     /* 主色浅底 */
  --line: #e8e0d3;          /* 分隔线 */
  --danger: #c0564f;
  --ok: #5d8a5f;
  --radius: 14px;
  --shadow: 0 2px 10px rgba(90, 74, 50, 0.07);
  --shadow-lift: 0 6px 20px rgba(90, 74, 50, 0.12);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background-color: var(--paper);
  background-image: radial-gradient(rgba(180, 130, 79, 0.04) 1px, transparent 1px);
  background-size: 24px 24px;
  color: var(--ink);
  line-height: 1.7;
  min-height: 100vh;
}

.serif {
  font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC", STSong, SimSun, serif;
}

/* ========== 布局容器 ========== */
.app-container { min-height: 100vh; display: flex; flex-direction: column; }

.main-content {
  flex: 1;
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  padding: 20px 16px 48px;
}

.page-footer {
  text-align: center;
  color: var(--ink-faint);
  font-size: 12px;
  padding: 20px 0 28px;
  letter-spacing: 2px;
}

.loading-state { text-align: center; color: var(--ink-light); padding: 60px 0; font-size: 15px; }
.empty-state { text-align: center; padding: 70px 20px; }
.empty-state .empty-title { font-size: 20px; margin-bottom: 10px; }
.empty-state .empty-sub { color: var(--ink-light); font-size: 14px; margin-bottom: 26px; line-height: 1.9; }

/* ========== 页头（非 header 模块的业务页头） ========== */
.page-head { display: flex; align-items: center; gap: 12px; margin: 8px 0 20px; flex-wrap: wrap; }
.page-head .back-link {
  color: var(--ink-light); text-decoration: none; font-size: 14px;
  padding: 6px 12px 6px 0; border: none; background: none; cursor: pointer;
}
.page-head .back-link:hover { color: var(--accent-deep); }
.page-title { font-size: 22px; font-weight: 700; flex: 1; min-width: 120px; }
.page-sub { width: 100%; color: var(--ink-light); font-size: 13px; }

/* ========== 按钮 ========== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  font-size: 14px;
  padding: 9px 18px;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  transition: all .18s ease;
  line-height: 1.4;
}
.btn:hover { border-color: var(--accent); color: var(--accent-deep); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary {
  background: linear-gradient(135deg, #c49a6c, #a06a3a);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 3px 10px rgba(160, 106, 58, .28);
}
.btn-primary:hover { color: #fff; filter: brightness(1.05); box-shadow: 0 5px 14px rgba(160, 106, 58, .34); }
.btn-ghost { background: transparent; }
.btn-danger { color: var(--danger); border-color: #ecc7c4; background: #fdf6f5; }
.btn-danger:hover { background: #f9e8e6; border-color: var(--danger); color: var(--danger); }
.btn-sm { padding: 5px 12px; font-size: 12.5px; }
.btn-lg { padding: 12px 28px; font-size: 16px; }
.btn-block { width: 100%; }

/* ========== 卡片 ========== */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  margin-bottom: 16px;
}
.card-title { font-size: 16px; font-weight: 700; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.card-title .hint { font-size: 12px; color: var(--ink-light); font-weight: 400; margin-left: auto; }

/* ========== 书卡片 ========== */
.book-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 640px) { .book-grid { grid-template-columns: repeat(2, 1fr); } }

.book-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: box-shadow .2s ease, transform .2s ease;
  display: flex; flex-direction: column;
}
.book-card:hover { box-shadow: var(--shadow-lift); transform: translateY(-2px); }
.book-cover {
  height: 96px;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255, 255, 255, .94);
  position: relative;
}
.book-cover .book-title {
  font-size: 19px; font-weight: 700; letter-spacing: 3px;
  max-width: 82%; text-align: center; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
}
.book-cover.style-classic { background: linear-gradient(135deg, #46586b, #2e3d4d); }
.book-cover.style-elegant { background: linear-gradient(135deg, #7a6a8a, #55486a); }
.book-cover.style-warm { background: linear-gradient(135deg, #b07a4a, #8a5430); }
.book-cover.style-green { background: linear-gradient(135deg, #6d8a6a, #47634a); }
.book-body { padding: 14px 16px 16px; flex: 1; display: flex; flex-direction: column; gap: 10px; }
.book-owner { font-size: 13.5px; color: var(--ink-light); }
.badges { display: flex; gap: 6px; flex-wrap: wrap; }
.badge {
  font-size: 11px; padding: 2px 9px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--ink-light); background: #faf6ef;
}
.badge.unlock { border-color: #d9c49e; color: var(--accent-deep); background: var(--accent-bg); }
.badge.lock { border-style: dashed; }
.chapter-progress { font-size: 12.5px; color: var(--ink-light); display: flex; align-items: center; gap: 8px; }
.progress-track {
  flex: 1; height: 6px; border-radius: 999px; background: var(--line); overflow: hidden;
}
.progress-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #c49a6c, #a06a3a); transition: width .3s; }
.book-quota { font-size: 12px; color: var(--ink-faint); }
.book-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 2px; }

/* ========== 表单 ========== */
.form-row { margin-bottom: 14px; }
.form-row label { display: block; font-size: 13px; color: var(--ink-light); margin-bottom: 6px; }
.form-row input[type="text"], .form-row input[type="number"], .form-row input[type="tel"],
.form-row select, .form-row textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font-size: 15px;
  color: var(--ink);
  font-family: inherit;
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(180, 130, 79, .12);
}
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 480px) { .form-grid-2 { grid-template-columns: 1fr; } }

/* ========== 模态框 ========== */
.modal-mask {
  display: none;
  position: fixed; inset: 0;
  background: rgba(50, 40, 28, .45);
  z-index: 200;
  align-items: flex-end; justify-content: center;
}
@media (min-width: 560px) { .modal-mask { align-items: center; } }
.modal-mask.show { display: flex; }
.modal {
  background: var(--card);
  width: 100%; max-width: 520px;
  border-radius: 18px 18px 0 0;
  padding: 22px 20px 26px;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lift);
}
@media (min-width: 560px) { .modal { border-radius: 18px; } }
.modal-title { font-size: 17px; font-weight: 700; margin-bottom: 16px; display: flex; align-items: center; }
.modal-close {
  margin-left: auto; border: none; background: none; font-size: 20px;
  color: var(--ink-light); cursor: pointer; line-height: 1; padding: 4px;
}
.modal-actions { display: flex; gap: 10px; margin-top: 18px; }
.modal-actions .btn { flex: 1; }

/* ========== Toast ========== */
#toastBox { position: fixed; left: 50%; bottom: 10%; transform: translateX(-50%); z-index: 300; display: flex; flex-direction: column; gap: 8px; width: max-content; max-width: 88vw; }
.toast-item {
  background: rgba(61, 53, 44, .92);
  color: #fff;
  font-size: 13.5px;
  padding: 10px 18px;
  border-radius: 999px;
  animation: toastIn .25s ease;
  max-width: 100%;
}
.toast-item.err { background: rgba(160, 70, 62, .94); }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ========== 编辑器布局 ========== */
.editor-layout { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 860px) { .editor-layout { grid-template-columns: 240px 1fr; align-items: start; } }

.chapter-nav { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.chapter-nav-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; border-bottom: 1px solid var(--line);
  font-size: 13px; color: var(--ink-light);
}
.chapter-list { max-height: 300px; overflow-y: auto; }
@media (min-width: 860px) { .chapter-list { max-height: 520px; } }
.chapter-item {
  display: flex; align-items: center; gap: 8px;
  padding: 11px 14px;
  cursor: pointer;
  border-bottom: 1px solid #f1ebe0;
  font-size: 14.5px;
  transition: background .15s;
}
.chapter-item:last-child { border-bottom: none; }
.chapter-item:hover { background: #faf5ec; }
.chapter-item.active { background: var(--accent-bg); color: var(--accent-deep); font-weight: 700; }
.chapter-item .ch-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chapter-item .ch-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--line); flex: none; }
.chapter-item .ch-dot.filled { background: var(--accent); }
.chapter-item .ch-del, .chapter-item .ch-move {
  border: none; background: none; color: var(--ink-faint); cursor: pointer;
  font-size: 13px; padding: 2px 5px; border-radius: 6px; flex: none;
}
.chapter-item .ch-del:hover { color: var(--danger); background: #f9e8e6; }
.chapter-item .ch-move:hover { color: var(--accent-deep); background: var(--accent-bg); }
.chapter-item .ch-move:disabled { opacity: .25; cursor: default; background: none; }
.add-chapter-row { padding: 10px 14px; display: flex; gap: 8px; }
.add-chapter-row input { flex: 1; min-width: 0; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 13.5px; }

.editor-main { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.editor-toolbar {
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
  padding-bottom: 12px; border-bottom: 1px solid var(--line); margin-bottom: 12px;
}
.save-state { margin-left: auto; font-size: 12px; color: var(--ink-faint); }
.save-state.saving { color: var(--accent); }
.chapter-title-input {
  width: 100%; border: none; font-size: 20px; font-weight: 700; color: var(--ink);
  background: transparent; padding: 4px 2px 10px; font-family: inherit;
}
.chapter-title-input:focus { outline: none; }
.editor-content {
  width: 100%; min-height: 380px;
  border: none; background: transparent;
  font-size: 15.5px; line-height: 2;
  color: var(--ink);
  resize: vertical;
  font-family: inherit;
}
.editor-content:focus { outline: none; }
.word-count { font-size: 12px; color: var(--ink-faint); text-align: right; margin-top: 6px; }

/* ========== 题库抽屉 ========== */
.qa-toggle {
  position: fixed; right: 16px; bottom: 24px; z-index: 90;
  padding: 12px 18px; border-radius: 999px;
  background: linear-gradient(135deg, #c49a6c, #a06a3a);
  color: #fff; font-size: 14px; border: none; cursor: pointer;
  box-shadow: 0 4px 14px rgba(160, 106, 58, .4);
}
.qa-drawer {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 150;
  background: var(--card);
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -6px 30px rgba(90, 74, 50, .18);
  padding: 16px 16px 22px;
  max-height: 62vh; display: none; flex-direction: column;
}
.qa-drawer.show { display: flex; }
.qa-drawer-head { display: flex; align-items: center; margin-bottom: 10px; font-size: 15px; font-weight: 700; }
.qa-theme-tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; flex: none; }
.qa-theme-tab {
  border: 1px solid var(--line); background: #faf6ef; color: var(--ink-light);
  font-size: 12.5px; padding: 4px 13px; border-radius: 999px; cursor: pointer; white-space: nowrap;
}
.qa-theme-tab.active { background: var(--accent-bg); color: var(--accent-deep); border-color: #d9c49e; font-weight: 700; }
.qa-list { overflow-y: auto; }
.qa-item {
  padding: 11px 12px; font-size: 14px; border-bottom: 1px dashed #eee5d6;
  cursor: pointer; transition: background .15s;
}
.qa-item:hover { background: var(--accent-bg); color: var(--accent-deep); }
.qa-item .qa-add-tip { font-size: 11px; color: var(--ink-faint); margin-left: 6px; }

/* ========== 润色 diff 弹层 ========== */
.diff-box { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 640px) { .diff-box { grid-template-columns: 1fr 1fr; } }
.diff-col { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.diff-col .diff-head {
  font-size: 12px; padding: 7px 12px; background: #f7f1e6; color: var(--ink-light);
  border-bottom: 1px solid var(--line); display: flex; justify-content: space-between;
}
.diff-col .diff-body { padding: 10px 12px; font-size: 13.5px; line-height: 1.9; max-height: 300px; overflow-y: auto; white-space: pre-wrap; }

/* ========== 录音机 ========== */
.recorder {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(180deg, #fdfaf4, #f8f1e5);
  padding: 22px 16px; text-align: center;
}
.rec-btn {
  width: 88px; height: 88px; border-radius: 50%;
  border: 4px solid #e3c9a8;
  background: radial-gradient(circle at 35% 30%, #d3a06b, #a06a3a);
  color: #fff; font-size: 15px; cursor: pointer;
  box-shadow: 0 4px 16px rgba(160, 106, 58, .35);
  transition: transform .15s, box-shadow .15s;
  letter-spacing: 2px;
}
.rec-btn:hover { transform: scale(1.04); }
.rec-btn.recording {
  background: radial-gradient(circle at 35% 30%, #d98079, #b04a42);
  border-color: #ecc7c4;
  animation: pulse 1.4s infinite;
}
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(192, 86, 79, .4); } 50% { box-shadow: 0 0 0 14px rgba(192, 86, 79, 0); } }
.rec-timer { font-size: 26px; font-weight: 700; margin: 12px 0 2px; font-variant-numeric: tabular-nums; letter-spacing: 2px; }
.rec-status { font-size: 13px; color: var(--ink-light); min-height: 20px; }
.rec-progress { width: 100%; max-width: 320px; height: 6px; border-radius: 999px; background: var(--line); margin: 12px auto 0; overflow: hidden; display: none; }
.rec-progress.show { display: block; }
.rec-progress .progress-fill { height: 100%; background: linear-gradient(90deg, #c49a6c, #a06a3a); width: 0%; transition: width .2s; }
.rec-note { font-size: 12px; color: var(--ink-faint); margin-top: 12px; line-height: 1.8; }

/* ========== 上传区 ========== */
.upload-zone {
  border: 1.5px dashed #dcc9ab; border-radius: var(--radius);
  background: #fdfaf4; padding: 20px 16px; text-align: center;
  cursor: pointer; transition: border-color .2s, background .2s;
}
.upload-zone:hover { border-color: var(--accent); background: var(--accent-bg); }
.upload-zone .up-title { font-size: 14.5px; font-weight: 700; margin-bottom: 4px; }
.upload-zone .up-sub { font-size: 12.5px; color: var(--ink-light); }
.upload-zone input[type="file"] { display: none; }

/* ========== 锁定卡片 ========== */
.lock-card {
  border: 1.5px dashed #d8c5a5; border-radius: var(--radius);
  background: linear-gradient(180deg, #fbf7ee, #f6eedd);
  padding: 26px 20px; text-align: center;
}
.lock-card .lock-icon {
  width: 46px; height: 46px; margin: 0 auto 12px; border-radius: 50%;
  background: #efe3cd; display: flex; align-items: center; justify-content: center;
}
.lock-card .lock-icon svg { width: 22px; height: 22px; fill: #a5855a; }
.lock-card .lock-title { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.lock-card .lock-desc { font-size: 13px; color: var(--ink-light); line-height: 1.9; margin-bottom: 14px; }
.lock-card .lock-price { font-size: 22px; font-weight: 700; color: var(--accent-deep); }
.lock-card .lock-price small { font-size: 12px; color: var(--ink-light); font-weight: 400; }

/* ========== 配额进度条 ========== */
.quota-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 640px) { .quota-grid { grid-template-columns: 1fr 1fr; } }
.quota-item { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: #fffefb; }
.quota-item .q-head { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 8px; }
.quota-item .q-head .q-label { color: var(--ink-light); }
.quota-item .q-head .q-num { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.quota-item .q-num.warn { color: var(--danger); }

/* ========== 媒体列表 ========== */
.media-filter { display: flex; gap: 8px; margin-bottom: 14px; }
.media-filter button {
  border: 1px solid var(--line); background: var(--card); color: var(--ink-light);
  font-size: 13px; padding: 5px 16px; border-radius: 999px; cursor: pointer;
}
.media-filter button.active { background: var(--accent-bg); color: var(--accent-deep); border-color: #d9c49e; font-weight: 700; }
.media-item { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); padding: 14px 15px; margin-bottom: 12px; }
.media-item-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.type-badge {
  flex: none; width: 26px; height: 26px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: #fff;
}
.type-badge.audio { background: linear-gradient(135deg, #c49a6c, #a06a3a); }
.type-badge.video { background: linear-gradient(135deg, #7d95b8, #55688a); }
.media-title-input {
  flex: 1; min-width: 120px; border: 1px solid transparent; background: transparent;
  font-size: 15px; font-weight: 600; color: var(--ink); padding: 3px 6px; border-radius: 8px;
}
.media-title-input:hover { border-color: var(--line); }
.media-title-input:focus { outline: none; border-color: var(--accent); background: #fff; }
.media-meta { font-size: 12px; color: var(--ink-faint); margin: 6px 0; display: flex; gap: 10px; flex-wrap: wrap; }
.media-loc-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 9px 10px; background: #faf6ef; border-radius: 10px; margin: 8px 0;
}
.media-loc-row select {
  border: 1px solid var(--line); border-radius: 8px; padding: 5px 8px;
  font-size: 13px; background: #fff; color: var(--ink); max-width: 160px;
}
.media-loc-tip { font-size: 12px; color: var(--accent-deep); }
.media-actions { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 4px; }
.transcript-box {
  margin-top: 10px; border-top: 1px dashed #e8dcc8; padding-top: 10px;
}
.transcript-text {
  font-size: 13.5px; line-height: 2; background: #faf6ef;
  border-radius: 10px; padding: 12px; max-height: 220px; overflow-y: auto; white-space: pre-wrap;
}
.status-chip {
  display: inline-block; font-size: 11.5px; padding: 2px 10px; border-radius: 999px;
  background: #f1ece2; color: var(--ink-light);
}
.status-chip.done { background: #e8f1e6; color: var(--ok); }
.status-chip.pending, .status-chip.processing { background: #f7ecd9; color: var(--accent-deep); }
.status-chip.failed { background: #f9e8e6; color: var(--danger); }
.media-player-row { margin-top: 10px; }
.media-player-row audio, .media-player-row video { width: 100%; border-radius: 10px; }
.media-player-row video { max-height: 320px; background: #000; }

/* ========== 印刷页 ========== */
.sku-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 640px) { .sku-grid { grid-template-columns: 1fr 1fr; } }
.sku-card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); padding: 20px; text-align: center; }
.sku-card .sku-name { font-size: 17px; font-weight: 700; margin-bottom: 6px; }
.sku-card .sku-desc { font-size: 12.5px; color: var(--ink-light); line-height: 1.8; min-height: 46px; margin-bottom: 10px; }
.sku-card .sku-price { font-size: 26px; font-weight: 700; color: var(--accent-deep); margin-bottom: 14px; }
.order-item { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); padding: 15px 16px; margin-bottom: 12px; }
.order-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.order-no { font-size: 12px; color: var(--ink-faint); }
.stepper { display: flex; margin: 12px 0 4px; }
.step { flex: 1; text-align: center; position: relative; font-size: 11px; color: var(--ink-faint); }
.step .step-dot {
  width: 20px; height: 20px; border-radius: 50%; margin: 0 auto 4px;
  background: #eee7d9; border: 2px solid #e2d8c5; transition: all .2s;
}
.step.done .step-dot { background: var(--accent); border-color: var(--accent); }
.step.done { color: var(--accent-deep); font-weight: 600; }
.step::before {
  content: ''; position: absolute; top: 10px; left: -50%; width: 100%; height: 2px; background: #eee7d9;
}
.step:first-child::before { display: none; }
.step.done::before { background: var(--accent); }
.receiver-info { font-size: 13px; color: var(--ink-light); background: #faf6ef; border-radius: 10px; padding: 10px 12px; line-height: 1.9; }

/* ========== Markdown 编辑页 ========== */
.md-toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.md-hint { width: 100%; font-size: 12px; color: var(--ink-faint); line-height: 1.8; }
.md-editor {
  width: 100%; min-height: 460px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: #fffdf8; padding: 16px;
  font-family: "SF Mono", Consolas, "Courier New", monospace;
  font-size: 14px; line-height: 1.9; color: var(--ink);
  resize: vertical;
}
.md-editor:focus { outline: none; border-color: var(--accent); }
.md-preview {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: #fffdf8; padding: 18px 20px; min-height: 460px;
  font-size: 14.5px; line-height: 2.1; overflow-wrap: break-word;
}
.md-preview h1 { font-size: 20px; margin: 18px 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.md-preview h2 { font-size: 17px; margin: 16px 0 8px; }
.md-preview h3 { font-size: 15px; margin: 12px 0 6px; }
.md-preview p { margin: 8px 0; }
.md-preview blockquote { border-left: 3px solid #d9c49e; padding: 4px 14px; color: var(--ink-light); background: #faf6ef; border-radius: 0 8px 8px 0; margin: 10px 0; }
.md-preview ul, .md-preview ol { padding-left: 24px; margin: 8px 0; }
.md-preview code { background: #f3ede2; border-radius: 5px; padding: 1px 6px; font-size: 13px; }
.md-preview hr { border: none; border-top: 1px dashed var(--line); margin: 16px 0; }
.md-cols { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 900px) {
  .md-cols { grid-template-columns: 1fr 1fr; }
  .md-cols.preview-off { grid-template-columns: 1fr; }
}

/* ========== 扫码回放页（无 header 极简页） ========== */
.play-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(180deg, #f6efe3, #efe4d2);
  padding: 24px 16px;
}
.play-card {
  background: #fffdf8; border-radius: 20px; box-shadow: var(--shadow-lift);
  padding: 34px 24px 30px; max-width: 460px; width: 100%; text-align: center;
}
.play-brand { font-size: 12px; letter-spacing: 4px; color: var(--ink-faint); margin-bottom: 20px; }
.play-book-title { font-size: 17px; color: var(--accent-deep); margin-bottom: 4px; }
.play-owner { font-size: 13px; color: var(--ink-light); margin-bottom: 20px; }
.play-media-title { font-size: 20px; font-weight: 700; margin-bottom: 18px; }
.play-card audio, .play-card video { width: 100%; }
.play-card video { border-radius: 12px; background: #000; max-height: 60vh; }
.play-dur { font-size: 12px; color: var(--ink-faint); margin-top: 12px; }

/* ========== 通用小元素 ========== */
.divider { height: 1px; background: var(--line); margin: 16px 0; border: none; }
.muted { color: var(--ink-light); font-size: 13px; }
.faint { color: var(--ink-faint); font-size: 12px; }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; } .mt24 { margin-top: 24px; }
.mb8 { margin-bottom: 8px; } .mb12 { margin-bottom: 12px; } .mb16 { margin-bottom: 16px; }
.flex { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.hidden { display: none !important; }
