/* ========= 全局 ========= */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; background: #f5f6f8; color: #222; overflow: hidden; }
button, select, input { font: inherit; }

/* ========= 顶栏 ========= */
.topbar {
  height: 56px; padding: 0 20px;
  display: flex; align-items: center; gap: 16px;
  background: #fff; border-bottom: 1px solid #e5e7eb;
  position: sticky; top: 0; z-index: 100;
}
.logo { font-weight: 700; font-size: 18px; color: #2563eb; letter-spacing: 0.5px; }
.logo span { color: #64748b; font-weight: 400; font-size: 13px; margin-left: 8px; }
.save-status {
  font-size: 12px; padding: 4px 10px; border-radius: 12px;
  color: #64748b; background: #f1f5f9; transition: all 0.2s; margin-left: 8px;
  white-space: nowrap;
}
.save-status.saving { color: #ea580c; background: #fff7ed; }
.save-status.saved { color: #15803d; background: #f0fdf4; }
.save-status.error { color: #dc2626; background: #fef2f2; }
.topbar-group { display: flex; align-items: center; gap: 8px; }
.topbar-group label { font-size: 12px; color: #64748b; }
.topbar select {
  padding: 6px 10px; border: 1px solid #d1d5db; border-radius: 6px;
  background: #fff; cursor: pointer; min-width: 110px;
}
.topbar select:hover { border-color: #2563eb; }
.spacer { flex: 1; }
.btn {
  padding: 6px 14px; border: 1px solid #d1d5db; border-radius: 6px;
  background: #fff; cursor: pointer; transition: all 0.15s;
}
.btn:hover { border-color: #2563eb; color: #2563eb; }
.btn-primary { background: #2563eb; color: #fff; border-color: #2563eb; }
.btn-primary:hover { background: #1d4ed8; color: #fff; }
.icon-btn {
  width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid #d1d5db; border-radius: 6px; background: #fff; cursor: pointer;
}
.icon-btn:hover { border-color: #2563eb; }

/* ========= 主布局 ========= */
.main {
  display: grid;
  grid-template-columns: 380px 1fr;
  height: calc(100vh - 56px);
}
.editor-pane {
  background: #fff; border-right: 1px solid #e5e7eb;
  display: flex; flex-direction: column;
}
.editor-tabs {
  display: flex; border-bottom: 1px solid #e5e7eb; padding: 0 12px;
}
.tab {
  padding: 10px 14px; cursor: pointer; font-size: 13px; color: #64748b;
  border-bottom: 2px solid transparent;
}
.tab.active { color: #2563eb; border-bottom-color: #2563eb; }
.editor-toolbar {
  padding: 12px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px; border-bottom: 1px solid #f1f5f9;
}
.editor-toolbar .btn {
  min-width: 0; min-height: 38px; padding: 6px 8px; font-size: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  white-space: nowrap; line-height: 1.2;
}
#md-input {
  flex: 1; width: 100%; padding: 16px;
  border: none; outline: none; resize: none;
  font-family: "SF Mono", Menlo, Consolas, monospace;
  font-size: 13px; line-height: 1.6; color: #334155;
}

/* ========= 预览容器 ========= */
.preview-pane {
  position: relative; overflow: hidden;
  display: grid;
  grid-template-columns: 220px 1fr;
}
.toc {
  background: #fafafa; border-right: 1px solid #e5e7eb;
  padding: 24px 16px; overflow-y: auto; font-size: 13px;
}
.toc-title {
  font-size: 11px; color: #94a3b8; letter-spacing: 1px;
  text-transform: uppercase; margin-bottom: 12px;
}
.toc ul { list-style: none; }
.toc li { margin: 4px 0; }
.toc a {
  display: block; padding: 4px 8px; border-radius: 4px;
  color: #475569; text-decoration: none; transition: all 0.15s;
}
.toc a:hover { background: #e0e7ff; color: #2563eb; }
.toc a.active { background: #2563eb; color: #fff; }
.toc .lvl-2 { padding-left: 16px; font-size: 12px; }
.toc .lvl-3 { padding-left: 28px; font-size: 12px; color: #64748b; }

.preview-scroll {
  overflow-y: auto; padding: 40px;
  transition: background 0.2s, color 0.2s;
}
#preview {
  max-width: 760px; margin: 0 auto;
  background: #fff; padding: 60px 70px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 10px 30px rgba(0,0,0,0.04);
  border-radius: 4px;
  transition: all 0.25s;
}

/* ========= 主题样式 ========= */
/* 通用预览 base */
#preview h1, #preview h2, #preview h3, #preview h4 { line-height: 1.3; margin: 1.4em 0 0.6em; }
#preview h1:first-child { margin-top: 0; }
#preview p { line-height: 1.8; margin: 0.8em 0; }
#preview ul, #preview ol { margin: 0.8em 0; padding-left: 1.6em; line-height: 1.8; }
#preview li { margin: 0.3em 0; }
#preview a { color: var(--accent, #2563eb); text-decoration: none; border-bottom: 1px solid currentColor; }
#preview code { background: rgba(0,0,0,0.05); padding: 2px 6px; border-radius: 3px; font-size: 0.9em; font-family: "SF Mono", Menlo, Consolas, monospace; }
#preview pre { margin: 1em 0; border-radius: 6px; overflow-x: auto; }
#preview pre code { background: none; padding: 0; }
#preview blockquote {
  border-left: 3px solid var(--accent, #2563eb); padding: 0.6em 1em; margin: 1em 0;
  background: rgba(0,0,0,0.03); color: #475569;
}
#preview table { border-collapse: collapse; width: 100%; margin: 1em 0; }
#preview th, #preview td { border: 1px solid #e5e7eb; padding: 8px 12px; text-align: left; }
#preview th { background: rgba(0,0,0,0.04); font-weight: 600; }
#preview img { max-width: 100%; border-radius: 4px; margin: 1em 0; }
#preview hr { border: none; border-top: 1px solid #e5e7eb; margin: 2em 0; }

/* 主题：商务正式 */
.theme-business #preview {
  font-family: "Source Han Serif SC", "Songti SC", Georgia, serif;
  color: #1e293b; --accent: #1e3a8a;
}
.theme-business #preview h1 { font-size: 32px; border-bottom: 3px double #1e3a8a; padding-bottom: 12px; color: #1e3a8a; }
.theme-business #preview h2 { font-size: 24px; color: #1e3a8a; }
.theme-business #preview h3 { font-size: 18px; color: #334155; }

/* 主题：现代简洁 */
.theme-modern #preview {
  font-family: -apple-system, "PingFang SC", "Helvetica Neue", sans-serif;
  color: #18181b; --accent: #10b981;
}
.theme-modern #preview h1 { font-size: 36px; font-weight: 800; letter-spacing: -0.5px; }
.theme-modern #preview h2 { font-size: 24px; font-weight: 700; padding-left: 12px; border-left: 4px solid #10b981; }
.theme-modern #preview h3 { font-size: 18px; font-weight: 600; color: #3f3f46; }

/* 主题：杂志感 */
.theme-magazine #preview {
  font-family: "Georgia", "Songti SC", serif;
  color: #292524; --accent: #dc2626;
}
.theme-magazine #preview h1 {
  font-size: 44px; font-weight: 900; line-height: 1.15; color: #dc2626;
  font-family: "Helvetica Neue", "PingFang SC", sans-serif;
}
.theme-magazine #preview h2 {
  font-size: 22px; text-transform: uppercase; letter-spacing: 2px;
  font-family: "Helvetica Neue", "PingFang SC", sans-serif;
  color: #dc2626; border-bottom: 1px solid #dc2626; padding-bottom: 8px;
}
.theme-magazine #preview h3 { font-size: 20px; font-style: italic; }
.theme-magazine #preview p:first-of-type::first-letter {
  font-size: 3.2em; float: left; line-height: 0.9; margin: 4px 8px 0 0;
  color: #dc2626; font-weight: 900;
}

/* 主题：极简黑白 */
.theme-minimal #preview {
  font-family: "PingFang SC", -apple-system, sans-serif;
  color: #000; --accent: #000;
}
.theme-minimal #preview h1 { font-size: 30px; font-weight: 400; border-bottom: 1px solid #000; padding-bottom: 16px; }
.theme-minimal #preview h2 { font-size: 20px; font-weight: 600; }
.theme-minimal #preview h3 { font-size: 16px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; }
.theme-minimal #preview a { border-bottom-style: dotted; }

/* ========= 场景适配 ========= */
/* 场景在 #preview 顶部插入 .cover / .meta 区块 */
.scn-cover {
  text-align: center; padding: 80px 0 60px;
  border-bottom: 1px solid currentColor; margin-bottom: 40px; opacity: 0.95;
}
.scn-cover .cover-tag { font-size: 12px; letter-spacing: 4px; text-transform: uppercase; opacity: 0.6; margin-bottom: 16px; }
.scn-cover .cover-title { font-size: 42px; font-weight: 800; line-height: 1.2; margin-bottom: 12px; }
.scn-cover .cover-date { font-size: 13px; opacity: 0.6; margin-top: 24px; }
.scn-hero {
  background: linear-gradient(135deg, var(--accent, #2563eb) 0%, #7c3aed 100%);
  color: #fff; padding: 50px 40px; border-radius: 8px; margin-bottom: 32px;
}
.scn-hero h1 { color: #fff !important; border: none !important; margin: 0 !important; }
.scn-hero .hero-sub { opacity: 0.9; margin-top: 12px; }

/* ========= 深色模式（预览区） ========= */
.preview-pane.dark { background: #0f172a; }
.preview-pane.dark .toc { background: #1e293b; border-right-color: #334155; }
.preview-pane.dark .toc-title { color: #64748b; }
.preview-pane.dark .toc a { color: #cbd5e1; }
.preview-pane.dark .toc a:hover { background: #334155; color: #fff; }
.preview-pane.dark .preview-scroll { background: #0f172a; }
.preview-pane.dark #preview { background: #1e293b; color: #e2e8f0; box-shadow: 0 1px 3px rgba(0,0,0,0.4); }
.preview-pane.dark #preview code { background: rgba(255,255,255,0.1); }
.preview-pane.dark #preview blockquote { background: rgba(255,255,255,0.05); color: #94a3b8; }
.preview-pane.dark #preview th { background: rgba(255,255,255,0.08); }
.preview-pane.dark #preview hr { border-top-color: #334155; }

/* ========= 弹窗 ========= */
.modal-mask {
  position: fixed; inset: 0; background: rgba(15,23,42,0.5);
  display: none; align-items: center; justify-content: center; z-index: 1000;
}
.modal-mask.show { display: flex; }
.modal {
  background: #fff; border-radius: 10px; padding: 28px;
  width: 460px; max-width: 92vw; box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.modal h3 { margin-bottom: 12px; font-size: 18px; }
.modal p { color: #64748b; font-size: 13px; margin-bottom: 16px; line-height: 1.6; }
.modal input {
  width: 100%; padding: 10px 12px; border: 1px solid #d1d5db; border-radius: 6px;
  margin-bottom: 16px; outline: none;
}
.modal input:focus { border-color: #2563eb; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; }
#qr-canvas { display: block; margin: 16px auto; }
.qr-hint { text-align: center; font-size: 12px; color: #94a3b8; word-break: break-all; }
.qr-publish-btn { width: 100%; justify-content: center; margin-bottom: 14px; }
.qr-separator {
  display: flex; align-items: center; gap: 10px; margin: 10px 0 12px;
  color: #94a3b8; font-size: 12px;
}
.qr-separator::before, .qr-separator::after {
  content: ""; flex: 1; height: 1px; background: #e5e7eb;
}

/* ========= 提示条 ========= */
.toast {
  position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%);
  background: #1e293b; color: #fff; padding: 10px 20px; border-radius: 6px;
  font-size: 13px; opacity: 0; pointer-events: none; transition: all 0.25s;
  z-index: 2000;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(-4px); }

/* ========= AI 工具栏 ========= */
.ai-toolbar {
  padding: 8px 12px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center;
  border-bottom: 1px solid #f1f5f9; background: linear-gradient(180deg, #faf5ff 0%, #fff 100%);
}
.ai-toolbar .ai-label { font-size: 11px; color: #7c3aed; font-weight: 600; margin-right: 4px; }
.ai-btn {
  padding: 4px 10px; font-size: 12px; border: 1px solid #ddd6fe;
  background: #f5f3ff; color: #6d28d9; border-radius: 4px; cursor: pointer; transition: all 0.15s;
}
.ai-btn:hover { background: #ede9fe; border-color: #a78bfa; }
.ai-btn:disabled { opacity: 0.5; cursor: wait; }
.ai-status-dot { width: 8px; height: 8px; border-radius: 50%; background: #cbd5e1; display: inline-block; margin-left: auto; }
.ai-status-dot.on { background: #10b981; box-shadow: 0 0 0 3px rgba(16,185,129,0.15); }
.ai-prompt-row { display: flex; gap: 6px; width: 100%; margin-top: 4px; }
.ai-prompt-row input {
  flex: 1; padding: 5px 10px; font-size: 12px; border: 1px solid #ddd6fe;
  border-radius: 4px; outline: none; background: #fff;
}
.ai-prompt-row input:focus { border-color: #7c3aed; }

/* ========= 设置/AI 结果弹窗 ========= */
.modal.wide { width: 720px; }
.modal .field { margin-bottom: 14px; }
.modal .field label { display: block; font-size: 13px; margin-bottom: 6px; color: #475569; font-weight: 500; }
.modal .field input, .modal .field select {
  width: 100%; padding: 8px 12px; border: 1px solid #d1d5db; border-radius: 6px; outline: none;
}
.modal .field input:focus, .modal .field select:focus { border-color: #2563eb; }
.modal .field-hint { font-size: 11px; color: #94a3b8; margin-top: 4px; line-height: 1.6; }
.ai-result-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ai-result-cols .col-label { font-size: 12px; color: #64748b; margin-bottom: 4px; font-weight: 600; }
.ai-result-cols textarea {
  width: 100%; height: 300px; padding: 10px; border: 1px solid #e5e7eb; border-radius: 6px;
  font-family: "SF Mono", Menlo, Consolas, monospace; font-size: 12px; line-height: 1.6; resize: vertical;
  outline: none;
}
.ai-loading { text-align: center; padding: 50px 0; color: #64748b; font-size: 13px; }
.ai-loading .spinner {
  display: inline-block; width: 28px; height: 28px; border: 3px solid #e5e7eb;
  border-top-color: #7c3aed; border-radius: 50%; animation: spin 0.8s linear infinite;
  margin-bottom: 12px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.ai-error { color: #dc2626; font-size: 13px; padding: 12px; background: #fef2f2; border-radius: 6px; margin-top: 12px; }
.scope-tag { font-size: 11px; padding: 2px 8px; background: #fef3c7; color: #92400e; border-radius: 10px; margin-left: 8px; }

/* ========= 字数对比条 ========= */
.stats-bar {
  display: flex; gap: 20px; align-items: center; padding: 12px 16px;
  background: #f0f9ff; border-radius: 8px; margin-bottom: 12px;
}
.stats-bar .stat-item { display: flex; flex-direction: column; }
.stats-bar .stat-label { font-size: 11px; color: #64748b; }
.stats-bar .stat-num { font-size: 20px; font-weight: 700; color: #0369a1; line-height: 1.2; }
.stats-bar .stat-num.down { color: #16a34a; }
.stats-bar .stat-num.up { color: #dc2626; }
.stats-bar .arrow { font-size: 22px; color: #cbd5e1; }

/* ========= 深度精简：建议列表 ========= */
.ai-btn.deep {
  background: linear-gradient(135deg,#7c3aed 0%,#4f46e5 100%);
  color:#fff; border-color: transparent; font-weight:600;
}
.ai-btn.deep:hover { filter: brightness(1.1); }

.sugg-analysis {
  background: #fefce8; border-left: 3px solid #eab308; padding: 12px 14px;
  border-radius: 4px; font-size: 13px; line-height: 1.7; margin-bottom: 12px; color: #713f12;
}
.sugg-analysis .label {
  font-size: 10px; letter-spacing: 1px; color: #a16207; font-weight: 700;
  text-transform: uppercase; margin-bottom: 6px;
}
.sugg-toolbar {
  display: flex; gap: 8px; align-items: center; padding: 8px 0; font-size: 12px; color: #64748b;
  border-bottom: 1px solid #e5e7eb; margin-bottom: 8px;
}
.sugg-toolbar button { padding: 2px 8px; font-size: 11px; }
.sugg-list { max-height: 48vh; overflow-y: auto; padding-right: 4px; }
.sugg-card {
  border: 1px solid #e5e7eb; border-radius: 6px; padding: 10px 12px; margin-bottom: 6px;
  display: flex; gap: 10px; align-items: flex-start; transition: all 0.15s;
}
.sugg-card.checked { border-color: #7c3aed; background: #faf5ff; }
.sugg-card.disabled { opacity: 0.5; background: #f8fafc; }
.sugg-card input[type=checkbox] { margin-top: 3px; cursor: pointer; width: 16px; height: 16px; flex-shrink: 0; }
.sugg-body { flex: 1; min-width: 0; }
.sugg-title-row { display: flex; gap: 6px; align-items: center; margin-bottom: 3px; flex-wrap: wrap; }
.sugg-title { font-weight: 600; font-size: 13px; color: #1e293b; }
.sugg-tag { font-size: 10px; padding: 1px 6px; border-radius: 8px; }
.sugg-tag.delete { background: #fee2e2; color: #b91c1c; }
.sugg-tag.rewrite { background: #dbeafe; color: #1d4ed8; }
.sugg-tag.merge { background: #dcfce7; color: #166534; }
.sugg-savings { font-size: 11px; color: #16a34a; font-weight: 600; }
.sugg-warn { font-size: 11px; color: #dc2626; }
.sugg-reason { font-size: 12px; color: #64748b; margin: 3px 0 6px; line-height: 1.6; }
.sugg-toggle { font-size: 11px; color: #7c3aed; cursor: pointer; user-select: none; }
.sugg-diff { display: none; margin-top: 8px; gap: 6px; }
.sugg-card.expanded .sugg-diff { display: grid; grid-template-columns: 1fr 1fr; }
.sugg-diff .col { min-width: 0; }
.sugg-diff .col-label { font-size: 10px; color: #94a3b8; letter-spacing: 1px; margin-bottom: 2px; }
.sugg-diff pre {
  background: #f8fafc; padding: 6px 8px; border-radius: 4px; font-size: 11px;
  max-height: 110px; overflow: auto; white-space: pre-wrap; word-break: break-word;
  margin: 0; line-height: 1.5; color: #334155;
}
.sugg-diff .col.del pre { background: #fef2f2; }
.sugg-diff .col.add pre { background: #f0fdf4; }
.sugg-footer {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0 0; border-top: 1px solid #e5e7eb; margin-top: 8px; font-size: 13px;
}
.sugg-footer .summary { color: #475569; }
.sugg-footer .summary b { color: #7c3aed; }

/* ========= 图片插入 ========= */
.img-tabs { display: flex; gap: 0; border-bottom: 1px solid #e5e7eb; margin-bottom: 16px; }
.img-tab { padding: 8px 16px; cursor: pointer; font-size: 13px; color: #64748b; border-bottom: 2px solid transparent; }
.img-tab.active { color: #2563eb; border-bottom-color: #2563eb; }
.img-pane { display: none; }
.img-pane.active { display: block; }
.img-drop {
  border: 2px dashed #cbd5e1; border-radius: 8px; padding: 36px 20px;
  text-align: center; color: #64748b; cursor: pointer; transition: all 0.15s;
}
.img-drop:hover, .img-drop.drag { border-color: #2563eb; background: #eff6ff; color: #2563eb; }
.img-drop .icon { font-size: 32px; margin-bottom: 8px; }
.img-drop .hint { font-size: 12px; color: #94a3b8; margin-top: 6px; }
.img-preview { margin-top: 12px; display: none; }
.img-preview.show { display: block; }
.img-preview img { max-width: 100%; max-height: 200px; border-radius: 6px; border: 1px solid #e5e7eb; }
.img-preview .img-meta { font-size: 11px; color: #64748b; margin-top: 6px; }
.img-options { margin-top: 12px; display: flex; gap: 12px; align-items: center; font-size: 12px; color: #475569; flex-wrap: wrap; }
.img-options label { display: flex; align-items: center; gap: 4px; cursor: pointer; }
.editor-toolbar .btn.img-btn { background: #fef3c7; border-color: #fde68a; color: #92400e; }
.editor-toolbar .btn.img-btn:hover { background: #fde68a; }

/* ========= 图片管理面板 ========= */
.gallery-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 12px; background: #f8fafc; border-radius: 6px; margin-bottom: 12px;
  font-size: 13px; color: #475569;
}
.gallery-header b { color: #0f172a; }
.gallery-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px; max-height: 55vh; overflow-y: auto; padding: 4px;
}
.gallery-item {
  border: 1px solid #e5e7eb; border-radius: 6px; overflow: hidden; background: #fff;
  display: flex; flex-direction: column; position: relative; transition: all 0.15s;
}
.gallery-item:hover { border-color: #2563eb; box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.gallery-item.unused { opacity: 0.7; border-style: dashed; }
.gallery-thumb {
  width: 100%; height: 110px; background: #f1f5f9 center/contain no-repeat;
  display: flex; align-items: center; justify-content: center;
}
.gallery-thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.gallery-info { padding: 6px 8px; font-size: 11px; line-height: 1.4; }
.gallery-info .usage { color: #16a34a; font-weight: 600; }
.gallery-info .usage.unused { color: #94a3b8; }
.gallery-info .size { color: #94a3b8; }
.gallery-del {
  position: absolute; top: 4px; right: 4px; width: 24px; height: 24px;
  border-radius: 50%; background: rgba(220,38,38,0.9); color: #fff; border: none;
  font-size: 14px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.15s;
}
.gallery-item:hover .gallery-del { opacity: 1; }
.gallery-empty { text-align: center; padding: 50px 0; color: #94a3b8; font-size: 13px; }

/* ========= 云端文件 ========= */
.cloud-doc-actions { display: flex; gap: 8px; margin-bottom: 12px; }
.cloud-doc-list {
  border: 1px solid #e5e7eb; border-radius: 8px; overflow: hidden;
  max-height: 50vh; overflow-y: auto; background: #fff;
}
.cloud-doc-item {
  width: 100%; border: 0; border-bottom: 1px solid #eef2f7; background: #fff;
  padding: 12px 14px; display: flex; align-items: center; gap: 12px;
  text-align: left; cursor: pointer;
}
.cloud-doc-item:last-child { border-bottom: 0; }
.cloud-doc-item:hover { background: #f8fafc; }
.cloud-doc-item.active { background: #eff6ff; }
.cloud-doc-title { flex: 1; min-width: 0; font-weight: 600; color: #1e293b; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cloud-doc-meta { font-size: 12px; color: #94a3b8; white-space: nowrap; }
.cloud-doc-empty { padding: 32px; text-align: center; color: #94a3b8; font-size: 13px; }

/* ========= 响应式 ========= */
@media (max-width: 900px) {
  .main { grid-template-columns: 1fr; }
  .editor-pane { display: none; }
  .editor-pane.mobile-show { display: flex; position: fixed; inset: 56px 0 0 0; z-index: 50; }
  .preview-pane { grid-template-columns: 1fr; }
  .toc { display: none; }
}
