:root {
  --ink: #1e293b;
  --dim: #64748b;
  --faint: #94a3b8;
  --panel: #ffffff;
  --panel-2: #f4f6fb;
  --line: rgba(99, 102, 241, .18);
  --brand: #6366f1;
  --brand-2: #38bdf8;
  --danger: #ef4444;
  --warn: #f59e0b;
  --radius: 14px;
  --mono: "Cascadia Mono", "JetBrains Mono", Consolas, monospace;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  min-height: 100vh;
  background: #f4f6fb;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden], .hidden { display: none !important; }

/* ───────── 顶栏 ───────── */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 22px;
  background: #ffffff;
  border-bottom: 1px solid rgba(99, 102, 241, .15);
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.logo {
  width: 38px; height: 38px; border-radius: 11px; flex: none;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #818cf8, #38bdf8);
  color: #ffffff; font-weight: 800; font-size: 19px;
  box-shadow: 0 8px 24px rgba(99, 102, 241, .3);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.brand-text strong { font-size: 16px; letter-spacing: .02em; }
.brand-text small { color: var(--dim); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }

.badge {
  padding: 4px 10px; border-radius: 999px; font-size: 11.5px;
  border: 1px solid rgba(13, 148, 136, .35);
  background: rgba(13, 148, 136, .1); color: #0d9488;
}
.badge.offline { border-color: rgba(217, 119, 6, .35); background: rgba(217, 119, 6, .1); color: #b45309; }

/* ───────── 按钮 ───────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border-radius: 10px; border: 1px solid var(--line);
  background: #ffffff; color: var(--ink);
  padding: 9px 16px; font-weight: 600; font-size: 13.5px;
  transition: background .15s, border-color .15s, transform .1s, opacity .15s;
  white-space: nowrap;
}
.btn:hover:not(:disabled) { background: #eef0f8; border-color: rgba(99, 102, 241, .4); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .42; cursor: not-allowed; }
.btn.primary {
  border-color: transparent; color: #ffffff;
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  box-shadow: 0 8px 22px rgba(99, 102, 241, .25);
}
.btn.primary:hover:not(:disabled) { filter: brightness(1.06); background: linear-gradient(135deg, #6366f1, #4f46e5); }
.btn.ghost { background: transparent; }
.btn.ghost:hover:not(:disabled) { background: rgba(99, 102, 241, .08); }
.btn.danger { border-color: rgba(239, 68, 68, .35); color: var(--danger); background: rgba(239, 68, 68, .08); }
.btn.block { width: 100%; }
.btn.small { padding: 7px 12px; font-size: 12.5px; border-radius: 9px; }
.btn.tiny { padding: 4px 10px; font-size: 12px; border-radius: 8px; }
.link {
  border: 0; background: none; color: var(--dim);
  text-decoration: underline; text-underline-offset: 3px;
  padding: 8px 0 0; font-size: 12.5px;
}
.link:hover { color: var(--ink); }

/* ───────── 表单 ───────── */
.card {
  background: #ffffff;
  border: 1px solid rgba(99, 102, 241, .18);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .06);
}
.card + .card { margin-top: 14px; }
.card h2 {
  margin: 0; font-size: 14px; font-weight: 700; letter-spacing: .02em;
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
}
.hint { color: var(--faint); font-size: 11.5px; font-weight: 400; }
.field { display: block; margin-top: 12px; font-size: 12.5px; color: var(--dim); }
.field input, .field select, .field textarea, textarea, input[type="text"], input[type="number"], input[type="password"], select {
  width: 100%; margin-top: 5px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 9px 11px;
  color: var(--ink);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, .16);
}
input::placeholder, textarea::placeholder { color: #94a3b8; }
textarea { resize: vertical; line-height: 1.6; }
.row { display: flex; gap: 10px; }
.row > * { flex: 1 1 0; min-width: 0; }
.file-row { display: flex; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.file-btn { cursor: pointer; }
.mono { font-family: var(--mono); font-size: 12.5px; }

/* ───────── 两栏骨架 ───────── */
.layout {
  max-width: 1680px; margin: 0 auto; padding: 18px 22px 18px;
  display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 18px;
  align-items: start;
}
.side { position: sticky; top: 76px; max-height: calc(100vh - 92px); overflow: auto; padding-right: 2px; }
.side::-webkit-scrollbar, .outline-list::-webkit-scrollbar, .filmstrip::-webkit-scrollbar { width: 6px; height: 6px; }
.side::-webkit-scrollbar-thumb, .outline-list::-webkit-scrollbar-thumb, .filmstrip::-webkit-scrollbar-thumb {
  background: #c7cdee; border-radius: 999px;
}

.work { min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.work-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.crumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.crumb {
  font-size: 12px; padding: 5px 11px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--faint); background: rgba(255, 255, 255, .8);
}
.crumb.active { color: #ffffff; background: linear-gradient(135deg, #6366f1, #4f46e5); border-color: transparent; font-weight: 700; }
.deck-meta { color: var(--dim); font-size: 12.5px; }

.work-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 1040px) {
  .layout { grid-template-columns: 1fr; }
  .side { position: static; max-height: none; overflow: visible; }
}

.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.seg { display: inline-flex; padding: 3px; border-radius: 9px; background: var(--panel-2); border: 1px solid var(--line); }
.seg button { border: 0; background: transparent; color: var(--dim); padding: 5px 11px; border-radius: 7px; font-size: 12px; }
.seg button.active { background: #eef0f8; color: var(--ink); font-weight: 700; }
.card-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); flex-wrap: wrap;
}
.foot-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.themes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.theme-btn {
  display: flex; align-items: center; gap: 8px; padding: 8px;
  border-radius: 10px; border: 1px solid var(--line); background: var(--panel-2);
  color: var(--dim); font-size: 12px; text-align: left;
}
.theme-btn:hover { border-color: #6366f1; }
.theme-btn.active { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(99, 102, 241, .18); color: var(--ink); }
.swatch { width: 26px; height: 26px; border-radius: 7px; flex: none; border: 1px solid rgba(255, 255, 255, .16); position: relative; overflow: hidden; }
.swatch i { position: absolute; left: 0; right: 0; bottom: 0; height: 8px; }

/* ───────── 提纲 ───────── */
.outline-card { display: flex; flex-direction: column; min-height: 520px; }
.outline-list { margin-top: 12px; display: flex; flex-direction: column; gap: 9px; max-height: 640px; overflow: auto; padding-right: 4px; }
.empty { color: var(--faint); font-size: 12.5px; margin: 18px 0; text-align: center; line-height: 1.8; }
.ol-item {
  border: 1px solid var(--line); background: var(--panel-2);
  border-radius: 11px; padding: 9px 10px 10px;
}
.ol-item.active { border-color: var(--brand); }
.ol-head { display: flex; align-items: center; gap: 8px; }
.ol-index {
  width: 24px; height: 24px; flex: none; border-radius: 7px;
  display: grid; place-items: center; font-size: 11.5px; font-weight: 700;
  background: #eef0f8; color: #6366f1;
}
.ol-title { flex: 1 1 auto; min-width: 0; margin: 0 !important; padding: 6px 9px !important; font-size: 13px !important; }
.ol-layout { flex: none; width: 118px !important; margin: 0 !important; padding: 6px 8px !important; font-size: 11.5px !important; }
.ol-actions { display: flex; gap: 3px; flex: none; }
.icon-btn {
  width: 24px; height: 24px; border-radius: 6px; border: 1px solid transparent;
  background: transparent; color: var(--faint); font-size: 13px; line-height: 1;
  display: grid; place-items: center;
}
.icon-btn:hover { background: #eef0f8; color: var(--ink); }
.icon-btn.danger:hover { background: rgba(255, 122, 122, .14); color: var(--danger); }
.ol-bullets {
  margin-top: 8px !important; padding: 7px 9px !important;
  font-size: 12px !important; min-height: 48px; background: #f4f6fb !important;
}
.outline-md { margin-top: 12px; min-height: 380px; }
.deck-titles { display: grid; grid-template-columns: 1.25fr 1fr; gap: 8px; margin-top: 10px; }
.deck-titles input { margin: 0 !important; padding: 8px 10px !important; font-size: 13px !important; }
@media (max-width: 560px) { .deck-titles { grid-template-columns: 1fr; } }

/* ───────── 预览 ───────── */
.preview-card { display: flex; flex-direction: column; }
.stage-wrap {
  position: relative; width: 100%; padding-top: 56.25%;
  margin-top: 12px; border-radius: 12px; overflow: hidden;
  background: #070b13; border: 1px solid var(--line);
}
.stage {
  position: absolute; top: 0; left: 0;
  width: 1280px; height: 720px;
  transform-origin: top left;
  background: #0b1020;
}
.stage-empty {
  position: absolute; inset: 0; display: grid; place-content: center; gap: 6px;
  text-align: center; color: var(--faint); font-size: 13px;
}
.stage-empty strong { color: var(--dim); font-size: 16px; }
.preview-tools { display: flex; align-items: center; gap: 8px; }
.preview-tools span { color: var(--dim); font-size: 12px; min-width: 52px; text-align: center; font-variant-numeric: tabular-nums; }
.plan-hint {
  margin-top: 10px; padding: 8px 11px; border-radius: 9px;
  background: rgba(255, 196, 107, .1); border: 1px solid rgba(255, 196, 107, .3);
  color: var(--warn); font-size: 12px;
}
.filmstrip { display: flex; gap: 8px; margin-top: 12px; overflow-x: auto; padding-bottom: 6px; }
.thumb {
  position: relative; flex: none; width: 144px; height: 81px;
  border-radius: 7px; overflow: hidden; border: 1px solid var(--line);
  background: #0b1020; cursor: pointer;
}
.thumb.active { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(111, 140, 247, .28); }
.thumb .s { transform: scale(.1125); transform-origin: top left; pointer-events: none; }
.thumb .thumb-no {
  position: absolute; left: 3px; bottom: 3px; z-index: 2;
  background: rgba(4, 8, 15, .72); color: #cfdaee;
  font-size: 9px; padding: 1px 5px; border-radius: 999px;
}
.thumb .thumb-split {
  position: absolute; right: 3px; bottom: 3px; z-index: 2;
  background: rgba(255, 196, 107, .9); color: #241802;
  font-size: 8.5px; font-weight: 700; padding: 1px 5px; border-radius: 999px;
}

/* ───────── 本页编辑 ───────── */
.slide-editor { margin-top: 0; }
.editor-tools { display: flex; gap: 6px; flex-wrap: wrap; }
.editor-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; margin-top: 12px; }
.editor-fields .field { margin-top: 0; }
.editor-fields .field.wide { grid-column: 1 / -1; }
.editor-fields textarea { min-height: 66px; }
.editor-fields .sub-row { display: flex; gap: 8px; align-items: flex-end; }
.editor-fields .mini-grid { display: grid; gap: 7px; grid-column: 1 / -1; }
.mini-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: 7px; align-items: center; }
.mini-row input { margin: 0 !important; padding: 7px 9px !important; font-size: 12px !important; }
.mini-row .icon-btn { width: 28px; height: 28px; }
.editor-note { grid-column: 1 / -1; }
.add-row { justify-self: start; }

/* ───────── 提示 / 遮罩 ───────── */
.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%);
  z-index: 90; max-width: min(680px, calc(100vw - 40px));
  padding: 11px 16px; border-radius: 11px;
  background: #ffffff; border: 1px solid var(--line); color: var(--ink);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .12); font-size: 13px;
}
.toast.error { border-color: rgba(239, 68, 68, .4); background: #fef2f2; color: #b91c1c; }
.toast.ok { border-color: rgba(16, 185, 129, .4); background: #ecfdf5; color: #047857; }
/* 2026-10-23：原来 inset:0 全屏遮罩 + 模糊，长任务时整个页面都被挡住、像卡死。
   改成右下角小提示条，pointer-events:none ⇒ 不挡点击、不挡滚动。 */
.busy {
  position: fixed; right: 20px; bottom: 20px; z-index: 80;
  display: flex; align-items: center; gap: 10px;
  max-width: min(72vw, 560px);
  padding: 10px 16px; border-radius: 999px;
  background: rgba(16, 24, 40, .94); color: #e6eeff;
  border: 1px solid rgba(120, 150, 210, .28);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .30);
  font-size: 13px; line-height: 1.4;
  pointer-events: none;
}
.busy #busyText {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.spinner {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, .16);
  border-top-color: var(--brand);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ───────── 幻灯片通用（与 deck_render 的坐标/字号对应：1in = 96px） ───────── */
.s {
  position: relative; width: 1280px; height: 720px; overflow: hidden;
  background: var(--bg); color: var(--body);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", system-ui, sans-serif;
  line-height: 1.45;
}
.s * { box-sizing: border-box; }
.s .topline { position: absolute; left: 0; top: 0; width: 100%; height: 5px; background: var(--accent); }
.s:not(.cover):not(.quote):not(.end)::after {
  content: ''; position: absolute; left: 1090px; top: 571px; width: 259px; height: 259px;
  border-radius: 50%; background: var(--accent); opacity: .06; pointer-events: none;
}
.s .hd { position: absolute; left: 88px; right: 88px; }
.s .kick { font-size: 11pt; font-weight: 700; color: var(--accent); letter-spacing: .08em; text-transform: uppercase; }
.s .h1 { margin: 4px 0 0; font-size: 30pt; font-weight: 700; color: var(--title); line-height: 1.15; }
.s .bar { width: 63px; height: 5px; border-radius: 2px; background: var(--accent); margin-top: 10px; }
.s .sub { margin-top: 8px; font-size: 15pt; color: var(--muted); line-height: 1.45; }
.s .foot {
  position: absolute; left: 88px; right: 88px; bottom: 16px;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 9pt; color: var(--muted);
  border-top: 1px solid var(--hair); padding-top: 7px;
}
.s .foot .pg { font-variant-numeric: tabular-nums; }

/* 封面 */
.s.cover .body { position: absolute; left: 106px; top: 148px; width: 917px; }
.s.cover .kick { font-size: 12pt; }
.s.cover .title { margin: 10px 0 0; font-weight: 700; color: var(--title); line-height: 1.12; letter-spacing: -.01em; }
.s.cover .bar { width: 86px; height: 6px; margin-top: 16px; }
.s.cover .sub { font-size: 19pt; color: var(--muted); margin-top: 18px; max-width: 800px; }
.s.cover .meta { position: absolute; left: 106px; top: 622px; font-size: 11pt; color: var(--muted); }
.s.cover .side-bar { position: absolute; left: 0; top: 0; bottom: 0; width: 19px; background: var(--accent); }
.s.cover .dot1 { position: absolute; left: 874px; top: -125px; width: 566px; height: 566px; border-radius: 50%; background: var(--soft); }
.s.cover .dot2 { position: absolute; left: 1085px; top: 437px; width: 259px; height: 259px; border-radius: 50%; background: var(--soft2); }

/* 目录 */
.s.agenda .alist { position: absolute; left: 88px; right: 88px; display: grid; column-gap: 48px; }
.s.agenda .a-item { display: flex; align-items: center; gap: 18px; border-bottom: 1px solid var(--hair); }
.s.agenda .a-no { flex: none; width: 58px; font-size: 20pt; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
.s.agenda .a-tx { font-size: 20pt; color: var(--title); }

/* 章节页 */
.s.section .panel { position: absolute; left: 0; top: 0; bottom: 0; width: 514px; background: var(--accent); }
.s.section .panel .ring { position: absolute; left: 293px; top: 446px; width: 317px; height: 317px; border-radius: 50%; background: var(--accent-ring); }
.s.section .left { position: absolute; left: 88px; top: 106px; width: 394px; color: var(--on); }
.s.section .left .kick { color: var(--on); opacity: .82; font-size: 13pt; }
.s.section .left .title { margin: 8px 0 0; font-size: 40pt; font-weight: 700; line-height: 1.12; color: var(--on); }
.s.section .left .bar { background: var(--on); width: 60px; height: 5px; margin-top: 20px; }
.s.section .right-bar { position: absolute; left: 581px; top: 197px; width: 7px; height: 250px; background: var(--accent); border-radius: 3px; }
.s.section .right { position: absolute; left: 619px; top: 197px; width: 586px; font-size: 24pt; line-height: 1.35; color: var(--title); }
.s.section .stitle { position: absolute; left: 88px; width: 394px; margin: 0; font-weight: 700; line-height: 1.12; color: var(--on); }
.s.section .sbar { position: absolute; left: 88px; width: 60px; height: 5px; background: var(--on); }
/* 要点页 */
.s .blist { position: absolute; left: 88px; right: 88px; font-size: 22pt; overflow: hidden; }
.s .chart { position: absolute; left: 88px; right: 88px; }
.s .c-row { display: flex; align-items: center; gap: 13px; }
.s .c-label { flex: none; font-weight: 700; color: var(--title); font-size: 15pt; }
.s .c-track { flex: none; background: var(--soft); border-radius: 8px; overflow: hidden; }
.s .c-bar { height: 100%; background: var(--accent); border-radius: 8px; }
.s .c-value { flex: none; font-weight: 700; color: var(--accent); font-size: 14pt; }
.s .vchart { position: absolute; left: 88px; right: 88px; bottom: 40px; display: flex; align-items: flex-end; gap: 53px; }
.s .v-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; }
.s .v-value { font-weight: 700; color: var(--accent); font-size: 14pt; margin-bottom: 6px; }
.s .v-bar { width: 100%; background: var(--accent); border-radius: 6px 6px 0 0; }
.s .v-label { margin-top: 8px; font-weight: 700; color: var(--title); font-size: 13pt; }
.s .b-item { display: flex; align-items: flex-start; gap: 22px; margin-bottom: .52em; }
.s .b-item:last-child { margin-bottom: 0; }
.s .b-item .dot { flex: none; width: 10px; height: 10px; border-radius: 3px; background: var(--accent); margin-top: .45em; }
.s .b-item.lvl1 { margin-left: 35px; }
.s .b-item.lvl1 .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent2); }
.s .b-item.lvl1 .tx { font-size: .93em; color: var(--body); }
.s .b-item .tx { flex: 1 1 auto; min-width: 0; color: var(--title); overflow-wrap: anywhere; }

/* 双栏 */
.s .cols { position: absolute; left: 88px; right: 88px; display: flex; gap: 33px; }
.s .col { flex: 1 1 0; min-width: 0; background: var(--surface); border-radius: 13px; padding: 30px 40px 26px; position: relative; overflow: hidden; }
.s .col::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 7px; background: var(--accent); }
.s .col.right::before { background: var(--accent2); }
.s .col h3 { margin: 0 0 18px; font-size: 18pt; font-weight: 700; color: var(--title); }
.s .col .b-item { gap: 14px; margin-bottom: .50em; }
.s .col .b-item .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-top: .5em; }
.s .col.right .b-item .dot { background: var(--accent2); }
.s .col .b-item .tx { color: var(--body); font-size: 16pt; }

/* 数据卡 */
.s .cards { position: absolute; left: 88px; right: 88px; display: grid; gap: 29px; }
.s .stat { background: var(--surface); border-radius: 15px; padding: 26px 35px 20px; position: relative; overflow: hidden; }
.s .stat::before { content: ""; position: absolute; left: 33px; top: 0; width: 50px; height: 6px; background: var(--accent); }
.s .stat .v { font-size: 38pt; font-weight: 700; color: var(--accent); line-height: 1.05; }
.s .stat .l { margin-top: 10px; font-size: 15pt; font-weight: 700; color: var(--title); }
.s .stat .n { margin-top: 8px; font-size: 11pt; color: var(--muted); line-height: 1.5; }

/* 时间线 */
.s .tl { position: absolute; left: 88px; right: 88px; }
.s .tl .axis { position: absolute; height: 2px; background: var(--axis); }
.s .tl .node { position: absolute; width: 29px; height: 29px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; }
.s .tl .node i { width: 12px; height: 12px; border-radius: 50%; background: var(--bg); display: block; }
.s .tl .cell { position: absolute; text-align: center; }
.s .tl .cell .time { font-size: 13pt; font-weight: 700; color: var(--accent); }
.s .tl .cell .name { margin-top: 4px; font-size: 17pt; font-weight: 700; color: var(--title); }
.s .tl .cell .desc { margin-top: 8px; font-size: 12pt; color: var(--muted); }
.s .tlv .row { display: flex; gap: 22px; padding: 12px 0; border-left: 2px solid var(--axis); padding-left: 26px; position: relative; }
.s .tlv .row::before { content: ""; position: absolute; left: -15px; top: 22px; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); }
.s .tlv .time { flex: none; width: 118px; font-size: 13pt; font-weight: 700; color: var(--accent); }
.s .tlv .name { flex: none; width: 210px; font-size: 16pt; font-weight: 700; color: var(--title); }
.s .tlv .desc { flex: 1 1 auto; font-size: 12pt; color: var(--muted); }

/* 引用 */
.s.quote .qmark { position: absolute; left: 105px; top: 113px; font-size: 100pt; font-weight: 700; line-height: 1; color: var(--quote-mark); font-family: Georgia, serif; }
.s.quote .qbar { position: absolute; left: 88px; top: 165px; width: 9px; height: 322px; background: var(--accent); }
.s.quote .qtext { position: absolute; left: 136px; top: 187px; width: 989px; font-size: 32pt; line-height: 1.3; color: var(--title); font-weight: 400; }
.s.quote .qby { position: absolute; left: 136px; font-size: 15pt; color: var(--muted); }
.s.quote .kick { position: absolute; left: 88px; top: 58px; }

/* 对比表 */
.s .table { position: absolute; left: 88px; right: 88px; }
.s .tr { display: flex; }
.s .th { background: var(--accent); color: var(--on); font-weight: 700; font-size: 14pt; height: 60px; }
.s .td { font-size: 15pt; color: var(--body); }
.s .tr.odd .td { background: var(--surface); }
.s .th > div, .s .td > div { padding: 12px 17px; display: flex; align-items: center; border-bottom: 1px solid var(--hair); min-width: 0; overflow-wrap: anywhere; }
.s .th > div { border-bottom: 0; }
.s .td > div:first-child { font-weight: 700; color: var(--title); }

/* 结束页 */
.s.end { background: var(--accent); color: var(--on); }
.s.end .ring1 { position: absolute; right: -100px; top: -163px; width: 614px; height: 614px; border-radius: 50%; background: var(--ring-light); }
.s.end .ring2 { position: absolute; left: -144px; bottom: -230px; width: 461px; height: 461px; border-radius: 50%; background: var(--ring-dark); }
.s.end .center { position: absolute; left: 134px; right: 134px; top: 245px; text-align: center; }
.s.end .center h1 { margin: 0; font-size: 46pt; font-weight: 700; color: var(--on); }
.s.end .center .sub { margin-top: 18px; font-size: 18pt; color: var(--on-soft); }
.s.end .center .meta { margin-top: 26px; font-size: 12pt; color: var(--on-dim); }
.s.section .pg { position: absolute; right: 88px; bottom: 16px; font-size: 9pt; color: var(--muted); }






/* 右侧对话区（预览下方） */
.chat-card { margin-top: 4px; }
.chat-card .chat-log { max-height: 460px; min-height: 220px; overflow-y: auto; }


/* ───────── 主题专属装饰（2026-10-24：不只是换颜色）───────── */
/* 有专属装饰的主题，去掉默认的右下淡圆 */
.s[data-deco]:not([data-deco="plain"]):not([data-deco="dots"]):not([data-deco="sun"])::after {
  content: none;
}

/* ① IBM Carbon：细网格 + 左缘强调竖条 */
.s[data-deco="grid"]::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image:
    repeating-linear-gradient(to bottom, transparent 0 65px, var(--hair) 65px 66px),
    repeating-linear-gradient(to right, transparent 0 159px, var(--hair) 159px 160px);
  opacity: .5;
}
.s[data-deco="grid"] { box-shadow: inset 6px 0 0 var(--accent); }

/* ② 商务深蓝：右侧斜切色带 */
.s[data-deco="band"]::before {
  content: ''; position: absolute; right: -150px; top: -140px;
  width: 430px; height: 1000px; transform: rotate(12deg);
  background: var(--soft); pointer-events: none;
}

/* ③ 极简黑白：只有细外框 */
.s[data-deco="frame"]::before {
  content: ''; position: absolute; inset: 33px;
  border: 1px solid var(--hair); pointer-events: none;
}

/* ④ 科技暗紫：底部柔光 + 点阵 */
.s[data-deco="glow"]::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(circle at 88% 88%, var(--soft) 0 260px, transparent 262px),
    radial-gradient(circle at 96% 96%, var(--soft2) 0 130px, transparent 132px),
    radial-gradient(var(--axis) 1.2px, transparent 1.3px);
  background-size: auto, auto, 26px 26px;
  opacity: .95;
}

/* ⑤ 国风朱红：水墨晕边 + （右上）印章 */
.s[data-deco="ink"]::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(circle at 8% 4%, var(--soft) 0 300px, transparent 302px),
    radial-gradient(circle at 94% 92%, var(--soft2) 0 340px, transparent 342px);
}
.s[data-deco="ink"] .topline { display: none; }

/* ⑥ 清新青绿：浅圆点散布 */
.s[data-deco="dots"]::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(circle at 6% 92%, var(--soft) 0 70px, transparent 72px),
    radial-gradient(circle at 12% 97%, var(--soft) 0 32px, transparent 34px),
    radial-gradient(circle at 92% 8%, var(--soft) 0 60px, transparent 62px),
    radial-gradient(circle at 97% 16%, var(--soft2) 0 30px, transparent 32px);
}

/* ⑦ 暖阳橙：左上暖色大圆 + 右下圆角块 */
.s[data-deco="sun"]::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(circle at 2% 0%, var(--soft) 0 320px, transparent 322px),
    radial-gradient(circle at 96% 96%, var(--soft2) 0 210px, transparent 212px);
}

/* 正文行距跟随主题节奏 */
.s .blist, .s .desc, .s .col li { line-height: var(--line, 1.45); }

/* 卡片圆角跟随主题 */
.s .card, .s .stat, .s .tl-item, .s .qbox { border-radius: var(--radius, 8px); }

/* 主题缩略图也体现装饰差异 */
.style-thumb[data-deco="grid"] {
  background-image:
    repeating-linear-gradient(to bottom, transparent 0 8px, rgba(120, 140, 170, .28) 8px 9px),
    repeating-linear-gradient(to right, transparent 0 10px, rgba(120, 140, 170, .28) 10px 11px) !important;
}
.style-thumb[data-deco="band"]::after {
  content: ''; position: absolute; right: -8px; top: -10px; width: 26px; height: 70px;
  transform: rotate(12deg); background: rgba(120, 150, 210, .35);
}
.style-thumb[data-deco="frame"] { box-shadow: inset 0 0 0 1px rgba(140, 150, 160, .55); }
.style-thumb[data-deco="frame"] .style-bar { display: none; }
.style-thumb[data-deco="glow"] {
  background-image: radial-gradient(rgba(140, 170, 255, .45) 1px, transparent 1.2px) !important;
  background-size: 6px 6px !important;
}
.style-thumb[data-deco="ink"] {
  background-image: radial-gradient(circle at 12% 8%, rgba(178, 58, 47, .30) 0 18px, transparent 20px) !important;
}
.style-thumb[data-deco="dots"] {
  background-image: radial-gradient(circle at 20% 84%, rgba(18, 163, 138, .32) 0 7px, transparent 9px) !important;
}
.style-thumb[data-deco="sun"] {
  background-image: radial-gradient(circle at 10% 6%, rgba(242, 113, 28, .32) 0 16px, transparent 18px) !important;
}
