/* ==========================================================================
 * 墨匣 XNote — 打印（Ctrl+P → 另存为 PDF）
 *
 * 目标：只打印正文，白底黑字，保留代码块/表格/公式/图表的可读性。
 * 页面里其它部分（工具栏、侧栏、状态栏、浮层）一律隐藏。
 * ========================================================================== */

@page {
  margin: 16mm 14mm;
}

html,
body {
  height: auto !important;
  overflow: visible !important;
  background: #fff !important;
  color: #111 !important;
}

body * {
  visibility: hidden;
}

.app-editor-stack,
.app-editor-stack * {
  visibility: visible;
}

.app-titlebar,
.app-topbar,
.app-activity,
.app-sidebar,
.app-outline,
.app-statusbar,
.app-find,
.app-boot,
.app-empty,
.pwa-banner,
.vditor-toolbar,
.vditor-toolbar *,
.app-skip {
  display: none !important;
}

.xui-shell,
.xui-shell-body,
.app-main,
.app-editor-stack,
.app-editor-host,
.app-vditor,
#vditor,
#vditor .vditor-content {
  display: block !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  background: #fff !important;
  border: 0 !important;
  position: static !important;
}

.app-editor-stack {
  position: static !important;
}

#vditor .vditor-ir,
#vditor .vditor-preview {
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: visible !important;
}

/* Vditor 的真实编辑根是 .vditor-ir > pre.vditor-reset（自带宽 padding 与滚动） */
#vditor .vditor-ir > .vditor-reset,
#vditor .vditor-preview > .vditor-reset {
  max-width: none !important;
  width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  color: #111 !important;
  overflow: visible !important;
  background: #fff !important;
}

/* 编辑标记（# / $$ / 代码围栏）与复制按钮不进纸面 */
#vditor .vditor-ir__marker,
#vditor .vditor-ir [data-type$="-marker"],
#vditor .vditor-ir .vditor-copy,
#vditor .vditor-ir .vditor-tooltipped {
  display: none !important;
}

#vditor .vditor-reset {
  color: #111 !important;
  font-size: 11pt !important;
  line-height: 1.65 !important;
}

#vditor .vditor-reset h1,
#vditor .vditor-reset h2,
#vditor .vditor-reset h3,
#vditor .vditor-reset h4,
#vditor .vditor-reset h5,
#vditor .vditor-reset h6,
#vditor .vditor-reset strong {
  color: #000 !important;
}

#vditor .vditor-reset h1,
#vditor .vditor-reset h2 {
  border-bottom-color: #ddd !important;
}

#vditor .vditor-reset a {
  color: #0645ad !important;
  border-bottom: 0 !important;
}

#vditor .vditor-reset blockquote {
  background: #f6f6f6 !important;
  border-left-color: #bbb !important;
  color: #333 !important;
}

#vditor .vditor-reset pre {
  background: #f7f7f7 !important;
  border-color: #ddd !important;
  color: #111 !important;
  white-space: pre-wrap !important;
  word-break: break-word !important;
}

#vditor .vditor-reset pre code,
#vditor .hljs {
  color: #111 !important;
  background: transparent !important;
}

#vditor .vditor-reset code:not(.hljs) {
  background: #f1f1f1 !important;
  color: #111 !important;
  border-color: #ddd !important;
}

#vditor .vditor-reset table th,
#vditor .vditor-reset table td {
  border-color: #ccc !important;
  color: #111 !important;
}

#vditor .vditor-reset table th {
  background: #f2f2f2 !important;
}

#vditor .vditor-reset table tr:nth-child(2n) td {
  background: #fafafa !important;
}

#vditor .katex {
  color: #111 !important;
}

#vditor .vditor-reset svg {
  max-width: 100% !important;
  height: auto !important;
}

/* 打印时不要出现拖拽光标与焦点环 */
* {
  caret-color: transparent !important;
}
