
/* 宽表（CSV 转出来的表格常有十几列）在正文列里不要撑破版面：包一层横向滚动 */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 16px 0; }
.table-wrap > table { margin: 0; }
/* 关键一行：主题常把表格写死 width:100%，那样列会被压扁、永远不触发滚动。
   按内容定宽 + 至少占满容器：内容窄时铺满，内容宽时溢出给外层滚动。 */
.vp-doc .table-wrap > table { width: max-content; min-width: 100%; }
/* mermaid 点击放大：默认按视口满宽（100%）显示，可再放大缩小 */
.mermaid svg { cursor: zoom-in; }
.mermaid-zoom-overlay {
  position: fixed; inset: 0; z-index: 9999; display: none;
  background: rgba(0, 0, 0, .8);
}
.mermaid-zoom-overlay.open { display: block; }
.mermaid-zoom-stage {
  position: absolute; inset: 0; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  cursor: grab; touch-action: none;
}
.mermaid-zoom-stage.dragging { cursor: grabbing; }
.mermaid-zoom-inner {
  transform-origin: center center; will-change: transform;
  background: #fff; border-radius: 8px; padding: 8px;
}
.mermaid-zoom-inner svg { width: 100%; height: auto; max-width: none; display: block; cursor: default; }
.mermaid-zoom-toolbar {
  position: absolute; top: 16px; right: 16px; z-index: 2;
  display: flex; gap: 8px;
}
.mermaid-zoom-toolbar button {
  min-width: 38px; height: 38px; padding: 0 10px;
  border-radius: 10px; border: 1px solid rgba(255, 255, 255, .3);
  background: rgba(20, 20, 24, .88); color: #fff;
  font-size: 15px; line-height: 1; cursor: pointer;
}
.mermaid-zoom-toolbar button:hover { background: rgba(64, 64, 74, .95); }
.mermaid-zoom-hint {
  position: absolute; left: 0; right: 0; bottom: 14px;
  text-align: center; font-size: 12px; color: rgba(255, 255, 255, .72);
  pointer-events: none;
}
