.代码框 {
  position: relative;
  margin: 0.8rem 0;
  border-radius: 0.6rem;
  overflow: hidden;
  border: 1px solid color-mix(in oklab, var(--color-base-content) 12%, transparent);
}
.代码条 {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.4rem;
  padding: 0.28rem 0.5rem;
  background: color-mix(in oklab, var(--color-base-300) 85%, transparent);
  user-select: none;
}
.代码格式,
.代码主题 {
  max-width: 11rem;
  height: 1.7rem;
  font-size: 0.72rem;
  border-radius: 0.3rem;
  border: 1px solid color-mix(in oklab, var(--color-base-content) 18%, transparent);
  background: var(--color-base-100);
  color: inherit;
  padding: 0 0.35rem;
}
.代码格式 {
  max-width: 8.5rem;
}
.代码复制 {
  height: 1.7rem;
  padding: 0 0.55rem;
  font-size: 0.72rem;
  border-radius: 0.3rem;
  border: 1px solid color-mix(in oklab, var(--color-base-content) 18%, transparent);
  background: var(--color-base-100);
  color: inherit;
  cursor: pointer;
}
.代码复制:hover {
  border-color: var(--color-primary);
}
.代码框 pre,
.markdown-body .代码框 pre,
.马克预览 .代码框 pre {
  margin: 0;
  padding: 0;
  background: transparent;
  border-radius: 0;
  overflow: auto;
}
.代码框 pre code {
  display: block;
  padding: 0;
  overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88rem;
  line-height: 1.5;
  white-space: normal;
}
.代码行 {
  display: block;
  position: relative;
  min-height: 1.5em;
  padding: 0 0.9rem 0 3.2rem;
  white-space: pre;
}
/* 未着色字符用高亮主题默认字色；.hljs-* token 仍走主题。不把字色挂在整个 .代码框，以免工具条变浅。 */
.代码框 pre,
.markdown-body .代码框 pre,
.马克预览 .代码框 pre,
.代码框 pre code,
.markdown-body .代码框 pre code,
.马克预览 .代码框 pre code,
.代码框 .代码行 {
  color: var(--代码字色, #24292e);
  -webkit-text-fill-color: unset;
}
.代码框.代码深色 pre,
.markdown-body .代码框.代码深色 pre,
.马克预览 .代码框.代码深色 pre,
.代码框.代码深色 pre code,
.markdown-body .代码框.代码深色 pre code,
.马克预览 .代码框.代码深色 pre code,
.代码框.代码深色 .代码行 {
  color: var(--代码字色, #c9d1d9);
  -webkit-text-fill-color: unset;
}
.代码行::before {
  content: attr(data-n);
  position: absolute;
  left: 0;
  width: 2.6rem;
  text-align: right;
  opacity: 0.5;
  font-size: 0.75em;
  user-select: none;
  pointer-events: none;
  color: currentColor;
}
.代码行:nth-child(odd) {
  background: rgba(0, 0, 0, 0.035);
}
.代码行:nth-child(even) {
  background: rgba(0, 0, 0, 0.075);
}
.代码框.代码深色 .代码行:nth-child(odd) {
  background: rgba(255, 255, 255, 0.05);
}
.代码框.代码深色 .代码行:nth-child(even) {
  background: rgba(255, 255, 255, 0.1);
}
.markdown-body img,
.马克预览 img,
.封面图 img {
  cursor: zoom-in;
}
.图灯 {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(8, 8, 12, 0.84);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}
.图灯[hidden] {
  display: none !important;
}
.图灯 img {
  max-width: 100vw;
  max-height: 100vh;
  width: auto;
  height: auto;
  object-fit: contain;
  margin: 0;
  border-radius: 0;
  cursor: zoom-out;
}
