/* 墨韵 · 样式分片 2/4（源：moyun.single.html，勿手改） */
/* ═══════════════════════════════════════════════
   卡片与交互
   ═══════════════════════════════════════════════ */
.card{
  background:linear-gradient(180deg,var(--bg-card),color-mix(in srgb,var(--bg-card) 94%,var(--accent-soft)));
  border:1px solid var(--bd);border-radius:14px;overflow:hidden;
  transition:box-shadow .2s,border-color .2s,transform .2s;
}
.card:hover{box-shadow:var(--sh2);transform:translateY(-1px)}
.card-active{border-color:var(--accent);box-shadow:var(--sh2)}

.btn-primary{
  background:linear-gradient(135deg,var(--accent),var(--accent-h));color:var(--accent-fg);
  padding:8px 20px;border-radius:12px;font-weight:700;
  box-shadow:0 8px 18px rgba(14,165,233,.18);
  transition:filter .15s,transform .1s,box-shadow .15s;
  display:inline-flex;align-items:center;justify-content:center;gap:6px;
}
.btn-primary:hover{filter:brightness(1.04);box-shadow:0 10px 24px rgba(14,165,233,.24)}
.btn-primary:active{transform:scale(.97)}
.btn-primary:disabled{opacity:.5;cursor:not-allowed;box-shadow:none}

.btn-ghost{
  background:color-mix(in srgb,var(--bg-card) 70%,transparent);color:var(--tx2);
  padding:8px 14px;border-radius:10px;font-weight:600;
  border:1px solid var(--bd);
  transition:background .15s,color .15s,border-color .15s,transform .1s;
  display:inline-flex;align-items:center;justify-content:center;gap:6px;
}
.btn-ghost:hover{background:var(--bg-hover);color:var(--tx);border-color:var(--bd2)}
.btn-ghost:active{transform:scale(.98)}

.badge{
  display:inline-flex;align-items:center;
  height:20px;padding:0 8px;border-radius:999px;
  font-size:11px;font-weight:700;white-space:nowrap;
}
.badge-ok{background:var(--ok-soft);color:var(--ok)}
.badge-err{background:var(--err-soft);color:var(--err)}
.badge-warn{background:var(--warn-soft);color:var(--warn)}
.badge-info{background:var(--info-soft);color:var(--info)}
.badge-muted{background:var(--accent-soft);color:var(--tx3)}

.chip{
  display:inline-flex;align-items:center;
  height:18px;padding:0 7px;border-radius:6px;
  font-size:10px;font-weight:700;white-space:nowrap;
  border:1px solid var(--bd);color:var(--tx3);
  background:var(--accent-soft);
}

/* ═══════════════════════════════════════════════
   大纲/细纲剧情工程台
   ═══════════════════════════════════════════════ */
.moyun-workbench{
  --wb-gap:12px;
  background:var(--bg-card);
  color:var(--tx);
}
.moyun-wb-header{
  display:flex;align-items:center;justify-content:space-between;gap:14px;
  padding:12px 16px;border-bottom:1px solid var(--bd);
  background:linear-gradient(180deg,var(--bg-inset),color-mix(in srgb,var(--bg-inset) 78%,var(--bg-card)));
}
.moyun-wb-heading{min-width:0;display:flex;flex-direction:column;gap:2px}
.moyun-wb-kicker{font-size:10px;font-weight:800;color:var(--tx3)}
.moyun-wb-title{font-size:18px;font-weight:800;color:var(--tx);line-height:1.2}
.moyun-wb-subtitle{font-size:11px;color:var(--tx3);line-height:1.4}
.moyun-wb-header-actions{display:flex;align-items:center;justify-content:flex-end;gap:7px;flex-wrap:wrap}
.moyun-wb-pill{
  display:inline-flex;align-items:center;gap:5px;height:24px;padding:0 8px;
  border-radius:8px;border:1px solid var(--bd);
  background:var(--bg-card);color:var(--tx3);
  font-size:10px;font-weight:800;white-space:nowrap;
}
.moyun-wb-pill strong{color:var(--tx);font-weight:800}
.moyun-wb-icon-btn{
  width:36px;height:36px;min-width:36px;min-height:36px;border-radius:10px;display:inline-flex;align-items:center;justify-content:center;
  border:1px solid var(--bd);background:var(--bg-card);color:var(--tx3);
  transition:background .15s,border-color .15s,color .15s,transform .1s;
}
.moyun-wb-icon-btn svg{width:18px;height:18px;flex:0 0 auto;stroke-linecap:round;stroke-linejoin:round}
.moyun-wb-icon-btn:hover{background:var(--bg-hover);border-color:var(--bd2);color:var(--tx)}
.moyun-wb-icon-btn:focus-visible,.moyun-entry-card:focus-visible,.moyun-check-item:focus-visible,.moyun-lf-delete-btn:focus-visible,.moyun-do-card-action:focus-visible,.moyun-darkline-send-btn:focus-visible,.moyun-darkline-tool-btn:focus-visible{
  outline:2px solid var(--accent);outline-offset:2px;
}
.moyun-entry-card{
  width:100%;min-height:62px;text-align:left;cursor:pointer;
  transition:border-color .15s,background .15s,box-shadow .15s;
}
.moyun-entry-card:hover{border-color:var(--bd2);background:var(--bg-hover)}
.moyun-entry-card[aria-pressed="true"]{border-color:color-mix(in srgb,var(--accent) 42%,var(--bd));box-shadow:0 0 0 2px var(--accent-soft)}
.moyun-wb-scroll{flex:1;overflow-y:auto;padding:14px}
.moyun-outline-grid{display:grid;grid-template-columns:minmax(0,1fr) 292px;gap:var(--wb-gap);height:100%;min-height:420px}
.moyun-wb-editor,.moyun-wb-inspector,.moyun-wb-band{
  border:1px solid var(--bd);border-radius:8px;background:var(--bg-card);
}
.moyun-wb-editor{display:flex;flex-direction:column;min-height:0;overflow:hidden}
.moyun-wb-editor-head,.moyun-wb-inspector-head{
  display:flex;align-items:center;justify-content:space-between;gap:8px;
  min-height:38px;padding:8px 10px;border-bottom:1px solid var(--bd);
  background:var(--bg-inset);
}
.moyun-wb-editor-title,.moyun-wb-inspector-title{font-size:11px;font-weight:800;color:var(--tx2)}
.moyun-wb-editor-meta{font-size:10px;color:var(--tx3);white-space:nowrap}
.moyun-wb-editor textarea{padding:14px 16px}
.moyun-wb-inspector{display:flex;flex-direction:column;gap:10px;padding:10px;overflow:auto}
.moyun-wb-meter{height:6px;border-radius:999px;overflow:hidden;background:var(--bg-inset)}
.moyun-wb-tag-list{display:flex;flex-wrap:wrap;gap:5px}
.moyun-wb-hint{
  padding:8px 10px;border:1px solid var(--bd);border-radius:8px;
  background:var(--bg-inset);color:var(--tx3);font-size:10px;line-height:1.55;
}
.moyun-wb-stat-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.moyun-wb-stat{
  min-height:48px;padding:8px 10px;border:1px solid var(--bd);border-radius:8px;
  background:var(--bg-card);display:flex;flex-direction:column;justify-content:center;gap:1px;
}
.moyun-wb-stat span{font-size:10px;color:var(--tx3);white-space:nowrap}
.moyun-wb-stat strong{font-size:14px;color:var(--tx);line-height:1.2}
.moyun-wb-operation{
  padding:10px 12px;border-top:1px solid var(--bd);background:var(--bg-inset);
  display:flex;flex-direction:column;gap:8px;
}
.moyun-wb-operation-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.moyun-wb-operation-toolbar{display:flex;align-items:center;gap:6px;flex:1 1 auto;min-width:0;justify-content:flex-end}
.moyun-do-rangebar>span,.moyun-do-rangebar>label{white-space:nowrap}
.moyun-wb-mode-tabs{display:inline-flex;align-items:center;gap:4px;padding:3px;border:1px solid var(--bd);border-radius:8px;background:var(--bg-card)}
.moyun-wb-mode-tabs button{
  appearance:none;-webkit-appearance:none;
  display:inline-flex;align-items:center;justify-content:center;text-align:center;
  min-height:24px;padding:0 8px;border-radius:6px;font-size:10px;font-weight:800;
  color:var(--tx3);transition:background .15s,color .15s;
}
.moyun-wb-mode-tabs button.active{background:var(--accent-soft);color:var(--tx)}
.moyun-wb-alert{
  display:flex;align-items:center;justify-content:space-between;gap:10px;
  padding:9px 10px;border-radius:8px;border:1px solid color-mix(in srgb,var(--err) 34%,var(--bd));
  background:var(--err-soft);color:var(--err);
}
.moyun-wb-alert-title{font-size:11px;font-weight:900}
.moyun-wb-alert-text{font-size:10px;line-height:1.45}
.moyun-do-card{position:relative;border-radius:8px!important;transition:box-shadow .16s,border-color .16s,transform .16s}
.moyun-do-card:hover{transform:none}
.moyun-do-card-head{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:center}
.moyun-do-titleline{display:flex;align-items:center;gap:8px;min-width:0}
.moyun-do-index{
  width:24px;height:24px;border-radius:8px;display:inline-flex;align-items:center;justify-content:center;
  background:var(--bg-inset);border:1px solid var(--bd);font-size:10px;font-weight:900;color:var(--tx3);flex:0 0 auto;
}
.moyun-do-actions{display:flex;align-items:center;gap:6px;flex-wrap:wrap;justify-content:flex-end}
.moyun-do-toolbar{display:flex;justify-content:space-between;align-items:center;gap:8px;flex-wrap:wrap}
.moyun-do-context-card{
  padding:10px;border:1px solid color-mix(in srgb,var(--accent) 24%,var(--bd));border-radius:10px;
  background:linear-gradient(135deg,color-mix(in srgb,var(--accent-soft) 72%,var(--bg-card)),var(--bg-card));
}
.moyun-do-context-head{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.moyun-do-context-title{font-size:11px;font-weight:900;color:var(--tx)}
.moyun-do-context-meta{font-size:10px;color:var(--tx3);margin-top:2px}
.moyun-do-context-manage,.moyun-c3-jump-chip,.moyun-c3-return-btn{
  min-height:44px;display:inline-flex;align-items:center;justify-content:center;gap:5px;padding:6px 10px;
  border:1px solid color-mix(in srgb,var(--accent) 32%,var(--bd));border-radius:9px;
  background:var(--bg-card);color:var(--accent);font-size:10px;font-weight:800;
}
.moyun-do-context-manage:hover,.moyun-c3-jump-chip:hover,.moyun-c3-return-btn:hover{background:var(--accent-soft);border-color:var(--accent)}
.moyun-do-context-chips,.moyun-c3-jump-list{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin-top:8px}
.moyun-do-context-chip{
  display:inline-flex;align-items:center;max-width:180px;padding:3px 7px;border-radius:999px;
  background:var(--bg-inset);border:1px solid var(--bd);color:var(--tx2);font-size:9px;font-weight:700;
}
.moyun-do-context-empty{font-size:9px;color:var(--tx4);line-height:1.45;margin-top:6px}
.moyun-c3-picker-tabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;padding:4px;border:1px solid var(--bd);border-radius:10px;background:var(--bg-inset)}
.moyun-c3-picker-tabs button{min-height:40px;border-radius:8px;color:var(--tx3);font-size:11px;font-weight:800}
.moyun-c3-picker-tabs button.active{background:var(--bg-card);color:var(--accent);box-shadow:var(--sh1)}
.moyun-c3-picker-list{display:flex;flex-direction:column;gap:7px}
.moyun-c3-picker-row{
  width:100%;min-height:52px;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:10px;
  padding:8px 10px;text-align:left;border:1px solid var(--bd);border-radius:11px;background:var(--bg-card);color:var(--tx2);
}
.moyun-c3-picker-row:hover{border-color:var(--bd2);background:var(--bg-hover)}
.moyun-c3-picker-row[aria-pressed="true"]{border-color:color-mix(in srgb,var(--accent) 50%,var(--bd));background:var(--accent-soft)}
.moyun-c3-picker-select{min-width:0;min-height:36px;display:grid;grid-template-columns:24px minmax(0,1fr);align-items:center;gap:10px;text-align:left}
.moyun-c3-picker-check{width:22px;height:22px;border-radius:7px;display:flex;align-items:center;justify-content:center;border:1px solid var(--bd2);background:var(--bg-inset);color:transparent;font-size:12px;font-weight:900}
.moyun-c3-picker-row[aria-pressed="true"] .moyun-c3-picker-check{background:var(--accent);border-color:var(--accent);color:var(--accent-fg)}
.moyun-c3-picker-name{font-size:12px;font-weight:900;color:var(--tx);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.moyun-c3-picker-desc{font-size:9px;color:var(--tx4);margin-top:2px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.moyun-c3-picker-view{min-height:44px;padding:6px 9px;border-radius:8px;background:var(--bg-inset);color:var(--tx3);font-size:9px;font-weight:800}
.moyun-c3-preview-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}
.moyun-c3-preview-stat{padding:8px;border:1px solid var(--bd);border-radius:9px;background:var(--bg-inset)}
.moyun-c3-preview-stat span{display:block;font-size:9px;color:var(--tx4)}
.moyun-c3-preview-stat strong{display:block;margin-top:3px;font-size:12px;color:var(--tx)}
.moyun-event-toolbar{display:grid;grid-template-columns:minmax(220px,1fr) 150px 150px 116px;gap:8px;align-items:center}
.moyun-event-layout{display:grid;grid-template-columns:minmax(280px,360px) minmax(0,1fr);gap:14px;align-items:start}
.moyun-event-timeline{position:relative;display:flex;flex-direction:column;gap:8px;padding-left:20px}
.moyun-event-timeline::before{content:"";position:absolute;left:8px;top:10px;bottom:10px;width:2px;border-radius:999px;background:var(--bd)}
.moyun-event-node{position:relative;width:100%;min-height:74px;padding:11px 12px;text-align:left;border:1px solid var(--bd);border-radius:11px;background:var(--bg-card);color:var(--tx2)}
.moyun-event-node::before{content:"";position:absolute;left:-18px;top:20px;width:10px;height:10px;border-radius:50%;border:2px solid var(--bg);background:var(--bd2);box-shadow:0 0 0 2px var(--bd)}
.moyun-event-node:hover{border-color:var(--bd2);background:var(--bg-hover)}
.moyun-event-node[aria-pressed="true"]{border-color:color-mix(in srgb,var(--accent) 45%,var(--bd));background:var(--accent-soft)}
.moyun-event-node[aria-pressed="true"]::before{background:var(--accent);box-shadow:0 0 0 2px color-mix(in srgb,var(--accent) 28%,var(--bd))}
.moyun-event-node-head{display:flex;align-items:center;justify-content:space-between;gap:8px}
.moyun-event-node-order{font-size:9px;font-weight:900;color:var(--accent)}
.moyun-event-node-time{font-size:9px;color:var(--tx4);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.moyun-event-node-title{margin-top:4px;font-size:12px;font-weight:900;color:var(--tx);overflow-wrap:anywhere}
.moyun-event-node-meta{display:flex;align-items:center;gap:5px;flex-wrap:wrap;margin-top:7px;font-size:9px;color:var(--tx3)}
.moyun-event-badge{display:inline-flex;align-items:center;min-height:22px;padding:2px 7px;border-radius:999px;background:var(--bg-inset);border:1px solid var(--bd);font-size:9px;font-weight:800;color:var(--tx3)}
.moyun-event-editor{display:flex;flex-direction:column;gap:12px;min-width:0}
.moyun-event-editor-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding-bottom:10px;border-bottom:1px solid var(--bd)}
.moyun-event-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.moyun-event-fields.three{grid-template-columns:minmax(0,1.6fr) minmax(0,.6fr) minmax(0,.7fr)}\n.moyun-event-fields label{min-width:0}\n.moyun-event-fields .label{max-width:100%;white-space:normal;word-break:break-word}\n.moyun-event-editor{min-width:0}\n.moyun-event-layout>aside{min-width:0}
.moyun-event-fields .full{grid-column:1 / -1}\n.moyun-event-fields input,.moyun-event-fields textarea,.moyun-event-fields select{min-width:0;width:100%}
.moyun-event-link-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.moyun-pick-list,.moyun-event-check-list{max-height:220px;overflow:auto;border:1px solid var(--bd);border-radius:9px;background:var(--bg-card)}
.moyun-pick-list label,.moyun-event-check-list label{display:flex;align-items:center;gap:8px;min-height:44px;padding:8px 10px;border-bottom:1px solid var(--bd);font-size:10px;color:var(--tx2);cursor:pointer}
.moyun-pick-list label:last-of-type,.moyun-event-check-list label:last-of-type{border-bottom:0}
.moyun-pick-list label:has(input:checked),.moyun-event-check-list label:has(input:checked){background:var(--accent-soft);color:var(--tx)}
.moyun-pick-list input,.moyun-event-check-list input{width:17px;height:17px;accent-color:var(--accent);flex:0 0 auto}
.moyun-pick-empty{padding:14px 12px;text-align:center;font-size:11px;line-height:1.55;color:var(--tx4)}
.moyun-pick-meta{display:flex;align-items:baseline;justify-content:space-between;gap:8px;margin-bottom:6px}
.moyun-preview-empty{min-height:72px;display:flex;align-items:center;justify-content:center;padding:14px 16px;border:1px dashed var(--bd);border-radius:12px;background:transparent;text-align:center;font-size:12px;line-height:1.65;color:var(--tx4)}
.moyun-event-jumps{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin-top:7px}
.moyun-event-jump,.moyun-event-return{
  min-height:44px;display:inline-flex;align-items:center;justify-content:center;padding:7px 10px;border-radius:9px;
  border:1px solid color-mix(in srgb,var(--accent) 30%,var(--bd));background:var(--bg-card);color:var(--accent);font-size:10px;font-weight:800;
}
.moyun-event-jump:hover,.moyun-event-return:hover{background:var(--accent-soft);border-color:var(--accent)}
.moyun-event-empty{padding:36px 16px;text-align:center;border:1px dashed var(--bd);border-radius:11px;background:transparent;font-size:11px;line-height:1.6;color:var(--tx4)}
.moyun-lf-panel{padding:10px;display:flex;flex-direction:column;gap:10px}
.moyun-lf-head{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.moyun-lf-title{font-size:11px;font-weight:900;color:var(--tx2)}
.moyun-lf-subtitle{font-size:10px;color:var(--tx3);line-height:1.45}
.moyun-lf-actions{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.moyun-darkline-boundary{
  display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:center;
  padding:10px;border:1px solid color-mix(in srgb,var(--info) 26%,var(--bd));border-radius:8px;
  background:linear-gradient(135deg,var(--info-soft),var(--bg-card));
}
.moyun-darkline-boundary-title{font-size:11px;font-weight:900;color:var(--tx2)}
.moyun-darkline-boundary-copy{font-size:10px;line-height:1.5;color:var(--tx3);margin-top:2px}
.moyun-darkline-layer-list{display:flex;gap:6px;flex-wrap:wrap;margin-top:6px}
.moyun-darkline-layer{display:inline-flex;align-items:center;gap:4px;padding:3px 6px;border:1px solid var(--bd);border-radius:6px;background:var(--bg-card);font-size:9px;color:var(--tx3)}
.moyun-darkline-layer strong{color:var(--tx2)}
.moyun-darkline-bridge-actions{display:flex;flex-direction:column;align-items:stretch;gap:6px;min-width:150px}
.moyun-darkline-bridge-actions>div{display:flex;gap:6px}
.moyun-darkline-bridge-actions button{min-height:32px;padding:5px 8px;border-radius:7px;font-size:10px;font-weight:900;border:1px solid var(--bd);background:var(--bg-card);color:var(--tx2)}
.moyun-darkline-bridge-note{font-size:9px;line-height:1.35;color:var(--tx3);text-align:right}
.moyun-lf-row{
  display:grid;grid-template-columns:52px minmax(86px,.8fr) minmax(120px,1fr) minmax(180px,1.35fr) minmax(120px,.9fr) auto;
  gap:7px;align-items:start;padding:8px;border:1px solid var(--bd);border-radius:8px;background:var(--bg-card);
}
.moyun-lf-matrix-row{
  display:grid;grid-template-columns:minmax(120px,1.05fr) 72px 82px 88px 88px 88px minmax(130px,1fr) auto;
  gap:7px;align-items:start;padding:8px;border:1px solid var(--bd);border-radius:8px;background:var(--bg-card);
}
.moyun-lf-cell-label{font-size:9px;font-weight:800;color:var(--tx4);margin-bottom:3px}
.moyun-darkline-inline-note{font-size:9px;line-height:1.35;color:var(--tx4);margin-top:3px;overflow-wrap:anywhere}
.moyun-darkline-inline-note[data-level="warn"]{color:var(--warn)}
.moyun-darkline-inline-note[data-level="error"]{color:var(--err)}
.moyun-darkline-row-actions{display:flex;align-items:flex-start;gap:5px;flex-wrap:wrap;justify-content:flex-end}
.moyun-darkline-send-btn,.moyun-darkline-tool-btn{
  min-width:36px;height:36px;display:inline-flex;align-items:center;justify-content:center;
  border-radius:8px;border:1px solid var(--bd);background:var(--info-soft);color:var(--info);font-size:9px;font-weight:900;
}
.moyun-darkline-tool-btn{height:30px;min-width:0;padding:0 8px;background:var(--bg-inset);color:var(--tx3)}
.moyun-darkline-tool-btn:disabled{opacity:.45;cursor:not-allowed}
.moyun-darkline-row-tools{grid-column:1 / -1;display:flex;align-items:center;gap:6px;flex-wrap:wrap;padding-top:7px;border-top:1px dashed var(--bd)}
.moyun-darkline-row-tools .moyun-darkline-inline-note{margin:0 0 0 auto}
.moyun-lf-delete-btn,.moyun-do-card-action{
  width:36px;height:36px;display:inline-flex;align-items:center;justify-content:center;align-self:start;
  border-radius:8px;color:var(--err);background:var(--err-soft);border:1px solid transparent;
}
.moyun-do-card-action{color:var(--tx3);background:var(--bg-inset);flex:0 0 auto}
.moyun-lf-delete-btn:hover{border-color:color-mix(in srgb,var(--err) 38%,var(--bd))}
.moyun-do-card-action:hover{color:var(--err);background:var(--err-soft)}
.moyun-check-list{display:flex;flex-direction:column;gap:7px}
.moyun-check-item{width:100%;padding:9px 10px;border:1px solid var(--bd);border-radius:8px;background:var(--bg-card);text-align:left;cursor:pointer}
.moyun-check-item:hover{filter:brightness(.985);box-shadow:var(--sh1)}
.moyun-check-head{display:flex;align-items:flex-start;justify-content:space-between;gap:8px}
.moyun-check-locate{flex:0 0 auto;font-size:9px;font-weight:900;padding:3px 6px;border-radius:6px;background:var(--bg-card);border:1px solid currentColor}
.moyun-check-title{font-size:11px;font-weight:900;line-height:1.35}
.moyun-check-detail{font-size:10px;line-height:1.45;margin-top:2px;color:inherit;opacity:.82}
.moyun-story-target-flash{animation:moyunStoryTargetFlash 1.35s ease-out}
@keyframes moyunStoryTargetFlash{0%,35%{box-shadow:0 0 0 3px var(--accent-soft);border-color:var(--accent)}100%{box-shadow:none}}
.moyun-action-status{
  display:flex;align-items:center;justify-content:flex-end;gap:7px;min-height:24px;
  color:var(--warn);font-size:10px;font-weight:700;line-height:1.35;
}
.moyun-action-status button{min-height:28px;padding:3px 8px;border-radius:7px;background:var(--bg-card);border:1px solid var(--bd);color:var(--tx2);font-weight:800}
.moyun-character-index{
  width:230px;flex:0 0 230px;flex-direction:column;gap:10px;padding:12px;overflow-y:auto;
  background:var(--bg-inset);border-right:1px solid var(--bd);
}
.moyun-character-index-list{display:flex;flex-direction:column;border-top:1px solid var(--bd)}
.moyun-character-index-row{
  width:100%;display:flex;align-items:flex-start;gap:9px;padding:10px 4px;text-align:left;
  border-bottom:1px solid var(--bd);color:var(--tx2);transition:background .15s,color .15s;
}
.moyun-character-index-row:hover{background:var(--bg-hover)}
.moyun-character-index-row[aria-pressed="true"]{background:var(--accent-soft);color:var(--tx)}
.moyun-character-avatar{
  width:32px;height:32px;flex:0 0 32px;display:flex;align-items:center;justify-content:center;overflow:hidden;
  border:1px solid var(--bd);border-radius:8px;background:var(--bg-card);font-size:12px;font-weight:800;color:var(--tx2);
}
.moyun-character-avatar img{width:100%;height:100%;object-fit:cover}
.moyun-character-index-name,.moyun-character-index-meta,.moyun-character-index-state{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.moyun-character-index-name{font-size:12px;font-weight:800;color:var(--tx)}
.moyun-character-index-meta{margin-top:2px;font-size:9px;color:var(--tx4)}
.moyun-character-index-state{margin-top:3px;font-size:10px;color:var(--tx3)}
.moyun-character-main{padding:18px 20px 28px}
.moyun-character-editor{width:min(100%,920px);margin:0 auto;display:flex;flex-direction:column;gap:12px}
.moyun-character-editor-head{display:flex;align-items:center;justify-content:space-between;gap:12px;min-width:0}
.moyun-character-levels{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;padding:4px;border:1px solid var(--bd);border-radius:8px;background:var(--bg-inset)}
.moyun-character-levels button{min-height:38px;border-radius:6px;font-size:12px;font-weight:800;color:var(--tx3)}
.moyun-character-levels button[aria-checked="true"]{background:var(--bg-card);color:var(--tx);box-shadow:var(--sh1)}
.moyun-character-level-help{font-size:10px;line-height:1.5;color:var(--tx3)}
.moyun-character-section{display:flex;flex-direction:column;gap:12px;padding:14px;border:1px solid var(--bd);border-radius:8px;background:var(--bg-card);min-width:0}
.moyun-character-section-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding-bottom:10px;border-bottom:1px solid var(--bd)}
.moyun-character-section-head h3{font-size:13px;font-weight:900;color:var(--tx);line-height:1.35}
.moyun-character-section-head p{margin-top:3px;font-size:10px;line-height:1.45;color:var(--tx3)}
.moyun-character-fields{display:grid;gap:10px;min-width:0}
.moyun-character-fields.two{grid-template-columns:repeat(2,minmax(0,1fr))}
.moyun-character-fields.three{grid-template-columns:repeat(3,minmax(0,1fr))}
.moyun-character-fields .full{grid-column:1 / -1}
.moyun-character-section label{display:block;min-width:0}
.moyun-character-section textarea{overflow-wrap:anywhere}
.moyun-character-state-compose{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto;gap:10px;align-items:end}
.moyun-character-state-compose .full{grid-column:1 / -1}
.moyun-character-state-compose button{min-height:38px;padding:8px 12px;white-space:nowrap}
.moyun-character-state-row,.moyun-character-relationship-row{padding:10px 0 0;border-top:1px solid var(--bd);min-width:0}
.moyun-character-row-head{display:flex;align-items:center;gap:8px;min-height:28px;margin-bottom:8px;font-size:10px;color:var(--tx3)}
.moyun-character-row-head strong{font-size:11px;color:var(--tx2);overflow-wrap:anywhere}
.moyun-character-row-head span{margin-left:auto}
.moyun-character-delete{width:30px;height:30px;flex:0 0 30px;display:inline-flex;align-items:center;justify-content:center;border-radius:8px;background:var(--err-soft);color:var(--err);font-size:16px;font-weight:800}
.moyun-character-empty{padding:10px 0;text-align:center;font-size:11px;color:var(--tx4)}
.moyun-character-association-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.moyun-character-check-list{max-height:220px;overflow:auto;border:1px solid var(--bd);border-radius:8px;background:var(--bg-card)}
.moyun-character-check-list label{display:flex;align-items:center;gap:8px;min-height:40px;padding:8px 10px;border-bottom:1px solid var(--bd);font-size:11px;color:var(--tx2);cursor:pointer}
.moyun-character-check-list label:last-of-type{border-bottom:0}
.moyun-character-check-list label:has(input:checked){background:var(--accent-soft);color:var(--tx)}
.moyun-character-check-list input{width:16px;height:16px;accent-color:var(--accent);flex:0 0 auto}
.moyun-character-mobile-picker{position:sticky;top:0;z-index:3;grid-template-columns:minmax(0,1fr) auto;gap:8px;padding:0 0 10px;background:var(--bg)}
.moyun-character-mobile-picker select{width:100%}
.moyun-character-inspector{width:220px;flex:0 0 220px;padding:14px;overflow-y:auto;background:var(--bg-inset);border-left:1px solid var(--bd)}
.moyun-character-inspector-stats{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
.moyun-character-inspector-stats span{display:flex;flex-direction:column;gap:2px;padding:8px;border-bottom:1px solid var(--bd);font-size:9px;color:var(--tx3)}
.moyun-character-inspector-stats strong{font-size:14px;color:var(--tx)}
.moyun-character-inspector-note{margin-top:12px;padding-top:10px;border-top:1px solid var(--bd);font-size:10px;line-height:1.55;color:var(--tx3)}
.moyun-character-inspector-note[data-invalid="true"]{color:var(--err)}
.moyun-character-mobile-inspector{border:1px solid var(--bd);border-radius:8px;background:var(--bg-card)}
.moyun-character-mobile-inspector summary{min-height:44px;padding:12px;font-size:11px;font-weight:800;color:var(--tx2);cursor:pointer}
.moyun-character-mobile-inspector>div,.moyun-character-mobile-inspector>p{margin:0 12px 12px}
.moyun-character-mobile-inspector>p{font-size:10px;line-height:1.5;color:var(--tx3)}
.moyun-character-mobile-inspector>p[data-invalid="true"]{color:var(--err)}
@media(max-width:900px){
  .moyun-outline-grid{grid-template-columns:1fr;height:auto;min-height:0}
  .moyun-wb-inspector{overflow:visible}
  .moyun-wb-stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .moyun-lf-row,.moyun-lf-matrix-row{grid-template-columns:1fr}
  .moyun-darkline-boundary{grid-template-columns:1fr}
  .moyun-darkline-bridge-actions{min-width:0}
  .moyun-darkline-bridge-note{text-align:left}
  .moyun-darkline-row-actions{justify-content:flex-start}
  .moyun-darkline-row-tools{grid-column:auto}
}
.moyun-mobile-header{
  padding-top:env(safe-area-inset-top, 0px);
  min-height:var(--moyun-mobile-header-height);
  height:var(--moyun-mobile-header-height);
  box-sizing:border-box;
}
.moyun-mobile-header-spacer{height:var(--moyun-mobile-header-height);flex:0 0 auto;min-height:var(--moyun-mobile-header-height)}
.moyun-main-shell,.moyun-main-body{min-height:0}
.moyun-wb-back-writing{
  display:inline-flex;align-items:center;justify-content:center;
  min-height:36px;padding:0 10px;border-radius:8px;
  border:1px solid var(--bd);background:var(--bg-card);
  color:var(--tx);font-size:12px;font-weight:800;white-space:nowrap;
}
.moyun-composer-reuse-short,.moyun-composer-metric-short{display:none}
.moyun-composer-icon-row{
  display:flex;align-items:center;gap:6px;width:100%;
}
.moyun-composer-icon-btn{
  width:32px;height:32px;min-width:32px;min-height:32px;padding:0;
  border-radius:999px;display:inline-flex;align-items:center;justify-content:center;
  flex:0 0 32px;overflow:hidden;
}
.moyun-composer-icon-label{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(max-width:767px){
  .moyun-workbench{
    top:0!important;
    bottom:0!important;
    height:100%!important;
    max-height:none!important;
  }
  .moyun-wb-header{position:sticky;top:0;z-index:5;align-items:flex-start;padding:10px 12px;gap:10px}
  .moyun-wb-header-actions{gap:5px}
  .moyun-wb-title{font-size:16px}
  .moyun-wb-subtitle{display:none}
  .moyun-wb-scroll{padding:10px;min-height:0}
  .moyun-outline-grid{min-height:100%}
  .moyun-wb-pill{height:22px;padding:0 6px;font-size:9px}
  .moyun-wb-stat-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
  .moyun-wb-operation{padding:9px}
  .moyun-wb-operation-row{align-items:stretch}
  .moyun-wb-operation-toolbar{flex:1 1 100%;justify-content:flex-end}
  .moyun-wb-operation-row .input-field,.moyun-wb-operation-row select{min-height:30px}
  .moyun-workbench .moyun-wb-operation{padding-right:12px}
  .moyun-workbench .moyun-wb-operation .moyun-wb-operation-actions{padding-right:0;display:inline-flex;align-items:center;gap:6px;flex:0 0 auto}
  .moyun-workbench .moyun-wb-operation button{min-height:32px}
  .moyun-workbench .moyun-wb-operation textarea.moyun-wb-outline-prompt{
    min-height:56px;height:auto;max-height:88px;font-size:16px;line-height:1.4;padding:10px 12px;resize:none;
  }
  .moyun-wb-mode-tabs{display:flex;width:auto;max-width:100%;box-sizing:border-box;margin-left:0}
  .moyun-wb-operation-row .moyun-wb-mode-tabs,.moyun-do-rangebar .moyun-wb-mode-tabs{flex:1 1 auto;margin-left:0;width:auto;max-width:none}
  .moyun-workbench .moyun-wb-mode-tabs button{
    flex:1 1 0;min-width:0;min-height:28px;padding:0 6px;
  }
  .moyun-wb-ai-compact{
    min-width:0!important;min-height:32px!important;height:32px;width:auto!important;
    padding:0 10px!important;border-radius:8px!important;font-size:12px!important;font-weight:800;white-space:nowrap;
  }
  .moyun-do-rangebar{overflow:visible}
  .moyun-do-range-hint{white-space:normal!important;overflow-wrap:anywhere;width:100%}
  .moyun-wb-stat span{white-space:normal}
  .moyun-workbench .moyun-do-scroll{padding-bottom:12px}
  .moyun-workbench .moyun-do-footer{gap:7px;padding-top:7px;padding-right:12px}
  .moyun-workbench .moyun-do-footer textarea{min-height:42px;height:42px;max-height:80px;padding:8px 10px}
  .moyun-workbench .moyun-do-footer .moyun-do-footer-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:6px}
  .moyun-workbench .moyun-do-footer .moyun-do-footer-actions button{min-height:32px;width:auto;padding:0 10px;font-size:12px}
  .moyun-do-card-head{grid-template-columns:1fr}
  .moyun-do-actions{justify-content:flex-start}
  .moyun-lf-panel{padding:9px;margin-bottom:18px}
  .moyun-lf-panel .moyun-wb-mode-tabs{max-width:100%;flex-wrap:wrap}
  .moyun-lf-actions{width:100%;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch}
  .moyun-lf-actions button{min-height:34px;width:100%;line-height:1.25}
  .moyun-lf-actions span{grid-column:1 / -1}
  .moyun-entry-card{min-height:64px}
  .moyun-wb-icon-btn,.moyun-lf-delete-btn,.moyun-do-card-action,.moyun-darkline-send-btn{width:44px;height:44px;min-height:44px}
  .moyun-darkline-tool-btn{min-height:38px;height:38px;padding:0 10px}
  .moyun-check-item{min-height:52px;padding:10px 11px}
  .moyun-action-status{justify-content:space-between;min-height:30px}
  .moyun-character-main{padding:10px 10px calc(22px + env(safe-area-inset-bottom))}
  .moyun-character-mobile-picker{display:grid}
  .moyun-character-mobile-picker button,.moyun-character-mobile-picker select{min-height:44px}
  .moyun-character-editor{gap:10px}
  .moyun-character-editor-head{align-items:flex-start}
  .moyun-character-editor-head .btn-ghost{min-height:44px;padding:8px 10px;white-space:nowrap}
  .moyun-character-levels button{min-height:44px}
  .moyun-character-section{padding:12px;gap:11px}
  .moyun-character-section-head{align-items:flex-start}
  .moyun-character-section-head .btn-ghost{min-height:44px;flex:0 0 auto}
  .moyun-character-fields.two,.moyun-character-fields.three,.moyun-character-state-compose,.moyun-character-association-grid{grid-template-columns:1fr}
  .moyun-character-state-compose .full,.moyun-character-fields .full{grid-column:auto}
  .moyun-character-state-compose button{min-height:44px;width:100%}
  .moyun-character-delete{width:44px;height:44px;flex-basis:44px}
  .moyun-character-check-list label{min-height:44px}
  .moyun-do-context-head{align-items:stretch}
  .moyun-do-context-manage,.moyun-c3-jump-chip,.moyun-c3-return-btn{min-height:44px}
  .moyun-do-context-manage{width:100%}
  .moyun-do-context-chip{max-width:100%}
  .moyun-c3-picker-tabs button{min-height:44px}
  .moyun-c3-picker-row{min-height:56px;grid-template-columns:1fr}
  .moyun-c3-picker-select{min-height:44px}
  .moyun-c3-picker-view{min-height:44px;width:100%}
  .moyun-c3-preview-grid{grid-template-columns:1fr}
  .moyun-event-toolbar{grid-template-columns:1fr}
  .moyun-event-layout{grid-template-columns:1fr}
  .moyun-event-fields,.moyun-event-fields.three,.moyun-event-link-grid{grid-template-columns:1fr}
  .moyun-event-fields .full{grid-column:auto}
  .moyun-event-node{min-height:80px}
  .moyun-event-editor-head{align-items:flex-start}
  .moyun-story-bible-mobile-nav button,.moyun-event-toolbar button,[data-story-event-create],.moyun-event-editor-head button{min-height:44px}
}
@media(max-width:767px){
.moyun-vv-short .moyun-workbench .moyun-wb-header{padding:6px 10px;min-height:44px;align-items:center}
.moyun-vv-short .moyun-workbench .moyun-wb-kicker,.moyun-vv-short .moyun-workbench .moyun-wb-subtitle,.moyun-vv-short .moyun-workbench .moyun-wb-pill{display:none}
.moyun-vv-short .moyun-workbench .moyun-wb-title{font-size:14px}
.moyun-vv-short .moyun-workbench .moyun-do-rangebar{flex-wrap:wrap;overflow:visible;padding:5px 8px;min-height:42px}
.moyun-vv-short .moyun-workbench .moyun-do-rangebar .moyun-wb-mode-tabs,.moyun-vv-short .moyun-workbench .moyun-do-range-hint,.moyun-vv-short .moyun-workbench .moyun-do-compact-label,.moyun-vv-short .moyun-workbench .moyun-do-only-empty{display:none}
.moyun-vv-short .moyun-workbench .moyun-do-footer{gap:5px;padding-top:5px;padding-right:12px}
.moyun-vv-short .moyun-workbench .moyun-do-footer textarea{height:36px;min-height:36px}
.moyun-vv-short .moyun-workbench .moyun-do-footer .moyun-do-footer-actions button{min-height:32px;padding:0 10px}
.moyun-vv-short .moyun-workbench .moyun-action-status{min-height:24px}
}

