/* ===================== 学习笔记 ===================== */

/* 每种文件类别一组主题色：--c 前景 / --c-soft 浅底 */
.cat-html     { --c: #1565c0; --c-soft: #e3f2fd; }
.cat-markdown { --c: #7b1fa2; --c-soft: #f3e5f5; }
.cat-pdf      { --c: #c62828; --c-soft: #ffebee; }
.cat-word     { --c: #1a5fd0; --c-soft: #e8f0fe; }
.cat-excel    { --c: #2e7d32; --c-soft: #e8f5e9; }
.cat-ppt      { --c: #d84315; --c-soft: #fff3e0; }
.cat-text     { --c: #455a64; --c-soft: #eceff1; }
.cat-json     { --c: #8a5b00; --c-soft: #fff6dc; }
.cat-notebook { --c: #e65100; --c-soft: #fff1e6; }
.cat-image    { --c: #00796b; --c-soft: #e0f2f1; }
.cat-audio    { --c: #ad1457; --c-soft: #fce4ec; }
.cat-video    { --c: #3949ab; --c-soft: #e8eaf6; }
.cat-archive  { --c: #6d4c41; --c-soft: #efebe9; }
.cat-other    { --c: #546e7a; --c-soft: #f0f2f5; }

/* ---------- 顶栏 ---------- */
.notes-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.notes-head h2 { margin: 0; font-size: 20px; margin-right: auto; }
.notes-search { flex: 0 1 280px; min-width: 0; display: flex; }
.notes-filter {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 0 10px;
  font: inherit;
  background: #fff;
  color: var(--text);
}
.notes-filter:focus, .notes-select:focus { outline: 2px solid var(--focus); outline-offset: -1px; }
.notes-select {
  width: auto;
  min-height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 0 8px;
  font: inherit;
  background: #fff;
  color: var(--text);
  cursor: pointer;
}
.notes-view .note-toggle-btn { min-height: 34px; padding: 0 10px; font-size: 14px; }
.nh-icon { padding: 0 10px; font-size: 16px; }
.notes-split { display: inline-flex; }
.notes-split > button:first-child { border-radius: 6px 0 0 6px; }
.notes-split > button:last-child { border-radius: 0 6px 6px 0; border-left: 1px solid rgba(255, 255, 255, 0.35); padding: 0 9px; }
.notes-split > button:hover { background: var(--focus); border-color: var(--focus); color: #fff; }
.notes-head kbd, .notes-foot kbd, .notes-welcome kbd, .note-menu kbd {
  font: 11px ui-monospace, Consolas, monospace;
  padding: 1px 5px;
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: 4px;
  background: #fff;
  color: var(--muted);
}

/* ---------- 分组标签 ---------- */
.notes-folders {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.nf-chip {
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.12s, border-color 0.12s;
}
.nf-chip span {
  font-size: 11px;
  color: var(--muted);
  background: #f0f2f5;
  border-radius: 999px;
  padding: 0 6px;
  line-height: 18px;
}
.nf-chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.nf-chip.active span { background: rgba(255, 255, 255, 0.22); color: #fff; }
.nf-chip.active:hover { color: #fff; }
.nf-add, .nf-more { border-style: dashed; color: var(--muted); }
.nf-more { border-style: solid; padding: 0 10px; }
.drop-hover, .nf-chip.drop-hover {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  background: var(--accent-soft) !important;
  color: var(--accent) !important;
}
.dragging-cards .nf-chip[data-drop-folder] { border-style: dashed; border-color: var(--accent); }

/* ---------- 剪贴板 / 多选操作条 ---------- */
.notes-bar {
  position: sticky;
  top: 80px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px 10px 8px 14px;
  margin-bottom: 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 0 4px 16px rgba(23, 32, 42, 0.08);
  font-size: 13px;
}
.notes-bar button { min-height: 30px; padding: 0 10px; font-size: 13px; }
.notes-bar.sel-bar { border-color: #9fd0dc; background: #f3fafc; }
.notes-bar.clip-bar { border-color: #e6d39a; background: #fffbef; }
.nb-grow { flex: 1 1 auto; }

/* ---------- 分节与网格 ---------- */
.notes-group { margin-bottom: 22px; }
.notes-group-title {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 10px;
  font-size: 15px;
  color: var(--text);
  border-radius: 8px;
}
.notes-group-title > span { color: var(--muted); font-weight: 400; font-size: 13px; }
.ng-name {
  border: none;
  background: transparent;
  padding: 0 4px;
  min-height: 28px;
  font: inherit;
  font-weight: 700;
}
.ng-paste { min-height: 26px; padding: 0 10px; font-size: 12px; margin-left: 6px; }

.notes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}

.note-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  transition: box-shadow 0.15s, border-color 0.15s, transform 0.15s;
}
.note-card:hover { border-color: #9fb3c2; box-shadow: 0 6px 20px rgba(23, 32, 42, 0.09); transform: translateY(-1px); }
.note-card.selected { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft), 0 6px 20px rgba(25, 111, 132, 0.12); }
.note-card.is-cut { opacity: 0.5; }
.note-main {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  min-height: 0;
  padding: 0;
  text-align: left;
  border: none;
  background: transparent;
  border-radius: 12px;
  color: var(--text);
}
.note-main:hover { color: var(--text); }
.note-main:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

.note-thumb {
  position: relative;
  height: 104px;
  border-radius: 11px 11px 0 0;
  background:
    radial-gradient(circle at 85% 15%, rgba(255, 255, 255, 0.7), transparent 45%),
    var(--c-soft, #f0f2f5);
  color: var(--c, #546e7a);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}
.nt-icon { font-size: 34px; line-height: 1; filter: saturate(0.9); }
.nt-ext { font-size: 11px; font-weight: 800; letter-spacing: 1px; opacity: 0.85; }
.note-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.note-thumb.has-img .nt-icon, .note-thumb.has-img .nt-ext { visibility: hidden; }

.note-info { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px 12px; min-width: 0; }
.note-title {
  font-weight: 700;
  font-size: 14px;
  line-height: 1.4;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
  min-height: 2.8em;
}
.note-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 8px;
  font-size: 12px;
  color: var(--muted);
}
.nm-folder { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 卡片上的复选框 / 更多按钮：悬停或多选状态才出现（触屏常显） */
.note-check {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.12s;
}
.note-check input { width: 16px; height: 16px; margin: 0; cursor: pointer; accent-color: var(--accent); }
.note-more {
  position: absolute;
  top: 8px;
  right: 8px;
  min-height: 0;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
  color: var(--muted);
  font-size: 16px;
  line-height: 1;
  opacity: 0;
  transition: opacity 0.12s;
}
.note-card:hover .note-check, .note-card:hover .note-more,
.note-card:focus-within .note-check, .note-card:focus-within .note-more,
.note-card.selected .note-check, .selecting .note-check { opacity: 1; }
@media (hover: none) {
  .note-check, .note-more { opacity: 1; }
}

/* 列表视图 */
.notes-grid.as-list { grid-template-columns: 1fr; gap: 6px; }
.as-list .note-card { border-radius: 10px; }
.as-list .note-card:hover { transform: none; }
.as-list .note-main { flex-direction: row; align-items: center; padding: 8px 44px 8px 44px; gap: 12px; border-radius: 10px; }
.as-list .note-thumb { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 8px; }
.as-list .nt-icon { font-size: 20px; }
.as-list .nt-ext { display: none; }
.as-list .note-info { flex-direction: row; align-items: center; padding: 0; gap: 12px; flex: 1 1 auto; }
.as-list .note-title { -webkit-line-clamp: 1; min-height: 0; flex: 1 1 auto; }
.as-list .note-meta { flex: 0 0 auto; flex-wrap: nowrap; }
.as-list .note-check { top: 50%; transform: translateY(-50%); left: 10px; }
.as-list .note-more { top: 50%; transform: translateY(-50%); }

/* 骨架屏 */
.note-card.skeleton { pointer-events: none; }
.note-card.skeleton .note-thumb, .note-card.skeleton .note-info span {
  background: linear-gradient(90deg, #eef1f4 25%, #f7f8fa 50%, #eef1f4 75%);
  background-size: 200% 100%;
  animation: notes-shimmer 1.2s infinite;
}
.note-card.skeleton .note-info span { display: block; height: 12px; border-radius: 6px; }
.note-card.skeleton .note-info span + span { width: 60%; }
@keyframes notes-shimmer { to { background-position: -200% 0; } }

/* 拖文件进列表区时的提示 */
.notes-drop { min-height: 160px; border-radius: 12px; transition: outline-color 0.15s; outline: 2px dashed transparent; outline-offset: 6px; }
.notes-drop.dragging { outline-color: var(--focus); background: var(--accent-soft); }

.notes-gate p { margin-bottom: 12px; }

.notes-welcome {
  text-align: center;
  padding: 48px 20px;
  border: 2px dashed var(--line-strong);
  border-radius: 16px;
  background: var(--panel);
  color: var(--muted);
}
.nw-icons { font-size: 28px; letter-spacing: 6px; margin-bottom: 10px; }
.notes-welcome h3 { margin: 0 0 8px; color: var(--text); font-size: 18px; }
.notes-welcome p { margin: 0 auto 8px; max-width: 560px; line-height: 1.7; }
.nw-formats { font-size: 12px; }
.nw-actions { display: flex; gap: 10px; justify-content: center; margin-top: 16px; flex-wrap: wrap; }

.notes-empty {
  padding: 28px 20px;
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  background: var(--panel);
  color: var(--muted);
  line-height: 1.7;
}
.notes-empty p { margin: 0 0 6px; }
.notes-empty code,
.notes-foot code { background: #eef2f5; padding: 1px 5px; border-radius: 4px; color: var(--text); }
.notes-foot { color: var(--muted); font-size: 12px; margin: 12px 0 0; }

/* 文件格式角标 */
.note-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10.5px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  line-height: 1.4;
  letter-spacing: 0.4px;
  flex-shrink: 0;
  background: var(--c-soft, #f0f2f5);
  color: var(--c, #4b5563);
}

/* ---------- 浮动菜单 ---------- */
.note-menu {
  position: fixed;
  z-index: 1200;
  min-width: 200px;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 12px 36px rgba(23, 32, 42, 0.18);
  animation: notes-pop 0.12s ease-out;
}
@keyframes notes-pop { from { opacity: 0; transform: translateY(-4px) scale(0.98); } }
.nm-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 32px;
  padding: 0 10px;
  border: none;
  border-radius: 6px;
  background: transparent;
  text-align: left;
  font-size: 13px;
  color: var(--text);
}
.nm-item:hover, .nm-item:focus-visible { background: #f0f5f7; color: var(--text); outline: none; }
.nm-item:disabled { color: #a9b3bd; cursor: default; background: transparent; }
.nm-item.danger { color: var(--red); }
.nm-item.danger:hover { background: #fdf2f1; color: var(--red); }
.nm-ico { width: 18px; text-align: center; flex: 0 0 18px; }
.nm-label { flex: 1 1 auto; }
.nm-sep { height: 1px; background: var(--line); margin: 5px 4px; }

/* ---------- 提示条 ---------- */
.notes-toasts {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 1300;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  width: max-content;
  max-width: calc(100vw - 32px);
}
.notes-toast {
  padding: 9px 16px;
  border-radius: 999px;
  background: #1f2a33;
  color: #fff;
  font-size: 13px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  animation: notes-pop 0.15s ease-out;
  transition: opacity 0.2s, transform 0.2s;
}
.notes-toast.error { background: #a32014; }
.notes-toast.info { background: #155e70; }
.notes-toast.out { opacity: 0; transform: translateY(6px); }

/* ---------- 弹层 ---------- */
.note-dialog .nd-text { margin: 0 0 18px; line-height: 1.7; color: var(--text); }
.nd-actions { display: flex; gap: 8px; justify-content: flex-end; align-items: center; margin-top: 4px; }
.nd-actions > button { width: auto; padding: 0 16px; }
.nd-danger { background: var(--red); border-color: var(--red); }
.nd-danger:hover { background: #8f1c13; border-color: #8f1c13; }
.nd-hint { margin: -4px 0 0; font-size: 12px; color: var(--muted); }
.nd-folders { display: flex; flex-wrap: wrap; gap: 6px; max-height: 40vh; overflow-y: auto; }
.nd-folder { min-height: 32px; border-radius: 999px; font-size: 13px; }
.nd-folder.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.note-dialog .notes-select { display: block; width: 100%; margin-top: 4px; }
.pt-preview {
  margin: 0;
  max-height: 180px;
  overflow: auto;
  padding: 10px 12px;
  background: #f6f8fa;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: 12px/1.6 ui-monospace, Consolas, monospace;
  white-space: pre-wrap;
  word-break: break-all;
  color: var(--muted);
}

.nu-files { display: flex; flex-direction: column; gap: 8px; max-height: 46vh; overflow-y: auto; padding: 2px; }
.nu-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.nu-row.too-big { border-color: #f0c4bf; background: #fdf7f6; }
.nu-ico {
  flex: 0 0 38px;
  height: 38px;
  border-radius: 9px;
  background: var(--c-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}
.nu-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.nu-main input { width: 100%; }
.nu-file { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.nu-state { font-size: 12px; color: var(--muted); flex: 0 0 auto; max-width: 40%; text-align: right; }
.nu-state:empty { display: none; }
.nu-state.ok { color: var(--green); font-size: 16px; }
.nu-state.err { color: var(--red); }
.nu-state.busy { color: var(--accent); }

.ne-file { display: flex; gap: 14px; align-items: flex-start; padding: 12px; background: #f7f9fa; border: 1px solid var(--line); border-radius: 10px; }
.ne-file .nu-ico { flex-basis: 48px; height: 48px; font-size: 26px; }
.ne-props { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 0; font-size: 13px; min-width: 0; }
.ne-props dt { color: var(--muted); }
.ne-props dd { margin: 0; overflow-wrap: anywhere; display: flex; align-items: center; gap: 6px; }
.ne-replace .auth-secondary { width: 100%; }

/* ===================== 查看页 ===================== */
.note-viewer { display: flex; flex-direction: column; gap: 10px; }
.note-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex-wrap: wrap;
  padding: 8px 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.nb-icon { min-width: 36px; padding: 0 8px; font-size: 16px; }
.nb-nav { display: inline-flex; }
.nb-nav .nb-icon:first-child { border-radius: 6px 0 0 6px; }
.nb-nav .nb-icon:last-child { border-radius: 0 6px 6px 0; margin-left: -1px; }
.nb-nav .nb-icon:disabled { opacity: 0.4; cursor: default; color: var(--text); border-color: var(--line-strong); }
.nb-head { display: flex; align-items: center; gap: 10px; flex: 1 1 260px; min-width: 0; }
.nb-titles { display: flex; flex-direction: column; min-width: 0; }
.note-bar-title {
  font-weight: 700;
  font-size: 16px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: text;
  border-radius: 4px;
}
.note-bar-title:hover { background: #f2f5f7; }
.note-bar-meta { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nb-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.nb-actions > button { font-size: 13px; }
.nb-edit { display: none; }
.note-viewer.editing .nb-view { display: none; }
.note-viewer.editing .nb-edit { display: flex; }
.note-viewer.editing .nb-nav { display: none; }

.note-stage {
  height: calc(100vh - 175px);
  height: calc(100dvh - 175px);
  min-height: 460px;
}
.note-stage > .notes-empty, .note-stage > .nv-loading { margin: 0; }
.note-stage:fullscreen { height: 100vh; background: var(--bg); padding: 0; }
.note-stage:fullscreen > .nv-shell, .note-stage:fullscreen > .note-frame { border-radius: 0; border: none; }

/* 基础 iframe */
.note-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

/* ===================== 通用查看器外壳 ===================== */
.nv-shell {
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}
.nv-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 7px 12px;
  background: #f8fafb;
  border-bottom: 1px solid var(--line);
  min-height: 46px;
  flex: 0 0 auto;
}
.nv-spacer { flex: 1 1 auto; }
.nv-chip {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 10px;
}
.nv-info { font-size: 12px; color: var(--muted); }
.nv-muted { color: var(--muted); }
.nv-btn {
  min-height: 30px;
  padding: 0 10px;
  font-size: 12.5px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--text);
}
.nv-btn:hover { border-color: var(--focus); color: var(--focus); }
.nv-btn.active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.nv-search, .nv-page {
  min-height: 30px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 0 8px;
  font: inherit;
  font-size: 13px;
  width: 170px;
}
.nv-page { width: 64px; text-align: center; }
.nv-loading {
  height: 100%;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}
.nv-loading::before {
  content: "";
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--line);
  border-top-color: var(--accent);
  animation: notes-spin 0.8s linear infinite;
}
@keyframes notes-spin { to { transform: rotate(360deg); } }

.note-toggle-group {
  display: inline-flex;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
}
.note-toggle-btn {
  min-height: 28px;
  padding: 0 12px;
  font-size: 12px;
  border: none;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
}
.note-toggle-btn + .note-toggle-btn { border-left: 1px solid var(--line); }
.note-toggle-btn.active { background: var(--accent); color: #fff; font-weight: 600; }
.note-toggle-btn.active:hover { color: #fff; }

/* ---------- 语法高亮配色 ---------- */
.tk-com { color: #6a737d; font-style: italic; }
.tk-str { color: #0a7d32; }
.tk-num { color: #b35900; }
.tk-kw  { color: #a626a4; }
.tk-lit { color: #c2185b; }
.tk-fn  { color: #1f5fbf; }
.tk-key { color: #0b6a8a; }
.tk-dec { color: #8a5b00; }

/* ===================== Markdown 视图 ===================== */
.note-md-body { flex: 1 1 auto; display: flex; min-height: 0; }
.md-toc {
  flex: 0 0 220px;
  overflow-y: auto;
  padding: 14px 10px;
  border-right: 1px solid var(--line);
  background: #fbfcfd;
}
.md-toc-title { font-size: 12px; font-weight: 700; color: var(--muted); margin: 0 6px 8px; letter-spacing: 1px; }
.md-toc-item {
  display: block;
  width: 100%;
  min-height: 0;
  padding: 5px 8px;
  border: none;
  border-radius: 6px;
  background: transparent;
  text-align: left;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.md-toc-item:hover { background: #eef4f6; color: var(--accent); }
.md-toc-item.lv1 { padding-left: 20px; color: #3d4a56; }
.md-toc-item.lv2 { padding-left: 32px; font-size: 12.5px; color: var(--muted); }
.md-toc-item.lv3 { padding-left: 44px; font-size: 12px; color: var(--muted); }
.note-md-stage { flex: 1 1 auto; padding: 28px 36px 48px; overflow-y: auto; min-width: 0; }
#mdRawPane .cv-lines { font: 13px/1.65 ui-monospace, SFMono-Regular, Consolas, monospace; }

.note-md-view {
  max-width: 820px;
  margin: 0 auto;
  line-height: 1.8;
  color: #1f2933;
  font-size: 15.5px;
  overflow-wrap: anywhere;
}
.note-md-view > :first-child { margin-top: 0; }
.note-md-view h1, .note-md-view h2, .note-md-view h3, .note-md-view h4, .note-md-view h5, .note-md-view h6 {
  margin: 1.6em 0 0.6em;
  font-weight: 700;
  line-height: 1.35;
  color: #111a22;
  scroll-margin-top: 12px;
}
.note-md-view h1 { font-size: 1.75em; padding-bottom: 0.3em; border-bottom: 1px solid var(--line); }
.note-md-view h2 { font-size: 1.4em; padding-bottom: 0.25em; border-bottom: 1px solid #eceff2; }
.note-md-view h3 { font-size: 1.17em; }
.note-md-view h4 { font-size: 1.05em; }
.note-md-view p { margin: 0.75em 0; }
.note-md-view a { color: var(--accent); text-decoration: none; border-bottom: 1px solid rgba(25, 111, 132, 0.3); }
.note-md-view a:hover { border-bottom-color: var(--accent); }
.note-md-view ul, .note-md-view ol { padding-left: 1.6em; margin: 0.6em 0; }
.note-md-view li { margin: 0.25em 0; }
.note-md-view li.task { list-style: none; margin-left: -1.4em; }
.note-md-view li.task input { margin: 0 6px 0 0; vertical-align: -1px; accent-color: var(--accent); }
.note-md-view hr { border: none; height: 1px; background: var(--line); margin: 2em 0; }
.note-md-view mark { background: #fff3a3; padding: 0 2px; border-radius: 2px; }
.note-md-view blockquote {
  margin: 1em 0;
  padding: 4px 16px;
  border-left: 4px solid #9fc9d4;
  background: #f5fafb;
  color: #4a5864;
  border-radius: 0 8px 8px 0;
}
.note-md-view blockquote > p { margin: 0.5em 0; }
.note-md-view code {
  background: #eef2f5;
  padding: 1px 6px;
  border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.86em;
  color: #c7254e;
}
.md-alert { margin: 1em 0; padding: 10px 16px; border-radius: 8px; border-left: 4px solid; }
.md-alert > b { display: block; font-size: 13px; margin-bottom: 2px; }
.md-alert > p { margin: 0.3em 0; }
.md-alert-note { border-color: #1a73e8; background: #eef4fe; }
.md-alert-note > b { color: #1a73e8; }
.md-alert-tip { border-color: #2e7d32; background: #eef7ef; }
.md-alert-tip > b { color: #2e7d32; }
.md-alert-important { border-color: #7b1fa2; background: #f6eef9; }
.md-alert-important > b { color: #7b1fa2; }
.md-alert-warning { border-color: #b26a00; background: #fff7e6; }
.md-alert-warning > b { color: #b26a00; }
.md-alert-caution { border-color: #c62828; background: #fdeeee; }
.md-alert-caution > b { color: #c62828; }
.md-front, .md-math {
  margin: 1em 0;
  padding: 10px 14px;
  background: #f7f9fa;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  font: 13px/1.6 ui-monospace, Consolas, monospace;
  color: var(--muted);
  white-space: pre-wrap;
}
.md-math { text-align: center; color: #3d4a56; font-size: 14px; }

/* 代码块（Markdown / Notebook 共用） */
.md-code {
  margin: 1em 0;
  border: 1px solid #e3e8ec;
  border-radius: 10px;
  background: #f7f9fb;
  overflow: hidden;
}
.md-code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 6px 4px 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #8291a0;
  text-transform: uppercase;
  border-bottom: 1px solid #e3e8ec;
  background: #f0f3f6;
}
.md-copy {
  min-height: 24px;
  padding: 0 8px;
  font-size: 11px;
  border-color: transparent;
  background: transparent;
  color: #6b7a88;
  text-transform: none;
  letter-spacing: 0;
}
.md-copy:hover { background: #fff; }
.md-code pre { margin: 0; padding: 12px 14px; overflow-x: auto; }
.md-code code, .note-md-view .md-code code {
  background: transparent;
  padding: 0;
  color: #24292f;
  font: 13px/1.6 ui-monospace, SFMono-Regular, Consolas, monospace;
}
.note-table-wrap { overflow-x: auto; margin: 1em 0; }
/* 抵消 base.css 给成绩表设的全局 table { min-width: 1360px; table-layout: fixed } */
.note-md-table, .note-docx-table, .note-excel-table { min-width: 0; table-layout: auto; }
.note-excel-table { width: auto; }
.note-md-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.note-md-table th, .note-md-table td { border: 1px solid #dfe4e8; padding: 7px 12px; text-align: left; }
.note-md-table th { background: #f5f7f9; font-weight: 700; }
.note-md-table tbody tr:nth-child(even) td { background: #fafbfc; }
.note-md-img { max-width: 100%; border-radius: 8px; margin: 0.5em 0; }

/* ===================== 代码 / 文本视图 ===================== */
.cv-view {
  flex: 1 1 auto;
  overflow: auto;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Microsoft YaHei Mono", monospace;
  font-size: 13px;
  line-height: 1.65;
  background: #fff;
  color: #24292f;
}
.cv-lines { display: table; min-width: 100%; padding: 8px 0; }
.cv-line { display: table-row; }
.cv-line:hover { background: #f6f8fa; }
.cv-ln {
  display: table-cell;
  padding: 0 14px 0 12px;
  text-align: right;
  color: #a8b1ba;
  user-select: none;
  border-right: 1px solid #edf0f2;
  width: 1%;
  min-width: 3em;
  white-space: nowrap;
  position: sticky;
  left: 0;
  background: #fbfcfd;
  vertical-align: top;
}
.cv-lc { display: table-cell; padding: 0 16px; white-space: pre; }
.cv-lines.wrap .cv-lc { white-space: pre-wrap; word-break: break-word; }
.cv-plain { margin: 0; padding: 12px 16px; white-space: pre; }
.cv-plain.wrap { white-space: pre-wrap; word-break: break-word; }

/* ===================== Jupyter Notebook ===================== */
.nb-stage { flex: 1 1 auto; overflow-y: auto; padding: 20px 24px 40px; background: #fff; }
.nb-cell { display: flex; gap: 10px; max-width: 980px; margin: 0 auto 10px; }
.nb-prompt {
  flex: 0 0 70px;
  text-align: right;
  font: 12px/1.6 ui-monospace, Consolas, monospace;
  color: #307fc1;
  padding-top: 32px;
}
.nb-cell.md .nb-prompt { padding-top: 0; }
.nb-body { flex: 1 1 auto; min-width: 0; }
.nb-md { flex: 1 1 auto; min-width: 0; margin: 0; max-width: none; }
.nb-src { margin: 0; }
.nb-outs { margin-top: 6px; padding-left: 4px; border-left: 3px solid #f0e0d0; }
.nb-out {
  margin: 4px 0;
  padding: 6px 10px;
  font: 12.5px/1.55 ui-monospace, Consolas, monospace;
  white-space: pre-wrap;
  word-break: break-word;
  color: #333;
  max-height: 420px;
  overflow: auto;
}
.nb-out.err { background: #fdf0f0; color: #a32014; border-radius: 6px; }
.nb-img img { max-width: 100%; background: #fff; }
.nb-html { width: 100%; height: 280px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.hide-out .nb-outs { display: none; }

/* ===================== Excel / CSV 视图 ===================== */
.note-sheet-tabs { display: flex; gap: 4px; overflow-x: auto; max-width: 60%; }
.note-sheet-tab {
  min-height: 28px;
  padding: 0 12px;
  font-size: 12px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  white-space: nowrap;
}
.note-sheet-tab.active {
  background: var(--sheet-accent, #2e7d32);
  color: #fff;
  border-color: var(--sheet-accent, #2e7d32);
  font-weight: 600;
}
.note-excel-grid-wrap { flex: 1 1 auto; overflow: auto; background: #fff; }
.note-excel-table {
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
  font-family: system-ui, -apple-system, "Microsoft YaHei", sans-serif;
}
.note-excel-table th, .note-excel-table td {
  border-right: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  padding: 5px 10px;
  white-space: nowrap;
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.note-excel-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.note-excel-table thead th {
  position: sticky;
  top: 0;
  background: #f1f5f9;
  font-weight: 600;
  color: #475569;
  z-index: 2;
  font-size: 12px;
}
.note-excel-table .col-num, .note-excel-table .row-num {
  background: #f8fafc;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  min-width: 44px;
  position: sticky;
  left: 0;
  z-index: 1;
}
.note-excel-table thead .col-num { z-index: 3; }
.note-excel-table tbody tr:hover td { background: #f3f9f4; }
.note-excel-table tbody tr:hover td.row-num { background: #e6f2e8; color: #2e7d32; }
.grid-empty { text-align: center; color: var(--muted); padding: 30px !important; }

/* ===================== Word (.docx) 视图 ===================== */
.note-docx-shell { flex: 1 1 auto; background: #e9edf1; padding: 28px 16px; overflow-y: auto; }
.note-docx-page {
  max-width: 816px;
  margin: 0 auto;
  background: #fff;
  padding: 72px 80px;
  border-radius: 2px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 8px 28px rgba(0, 0, 0, 0.08);
  min-height: 1056px;
  line-height: 1.8;
  color: #1e293b;
  font-size: 15px;
  overflow-wrap: anywhere;
}
.note-docx-page h1, .note-docx-page h2, .note-docx-page h3, .note-docx-page h4 { margin: 20px 0 10px; color: #0f172a; line-height: 1.4; }
.note-docx-page h1 { font-size: 24px; }
.note-docx-page h1.docx-title { font-size: 28px; text-align: center; }
.note-docx-page h2 { font-size: 20px; }
.note-docx-page h3 { font-size: 17px; }
.note-docx-page h4 { font-size: 15px; }
.note-docx-page p { margin: 6px 0; }
.note-docx-page a { color: #1a5fd0; }
.docx-li { position: relative; }
.docx-li::before { content: "•"; position: absolute; left: -1em; color: #64748b; }
.note-docx-empty-p { height: 14px; }
.note-docx-table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 14px; }
.note-docx-table td { border: 1px solid #cbd5e1; padding: 6px 10px; vertical-align: top; }
.note-docx-table td p { margin: 2px 0; }
.note-docx-img { max-width: 100%; border-radius: 2px; margin: 10px auto; display: block; }

/* ===================== PowerPoint (.pptx) 视图 ===================== */
.note-pptx-shell { flex-direction: row; background: #1b2430; border-color: #1b2430; }
.pptx-rail {
  flex: 0 0 200px;
  overflow-y: auto;
  padding: 12px 10px;
  background: #141b24;
  border-right: 1px solid #2a3542;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.rail-off .pptx-rail { display: none; }
.pptx-thumb {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  min-height: 0;
  padding: 0;
  border: none;
  background: transparent;
  text-align: left;
  color: #94a3b8;
}
.pt-num { flex: 0 0 18px; font-size: 11px; text-align: right; padding-top: 4px; }
.pt-card {
  flex: 1 1 auto;
  min-width: 0;
  aspect-ratio: 16 / 9;
  background: #fff;
  border-radius: 4px;
  padding: 7px 8px;
  border: 2px solid transparent;
  display: flex;
  flex-direction: column;
  gap: 3px;
  overflow: hidden;
}
.pt-title { font-size: 10px; font-weight: 700; color: #0f172a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt-lines { display: flex; flex-direction: column; gap: 2px; }
.pt-lines i { font-style: normal; font-size: 8px; color: #64748b; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pptx-thumb:hover .pt-card { border-color: #64748b; }
.pptx-thumb.active { color: #fff; }
.pptx-thumb.active .pt-card { border-color: #ff8a50; }
.pptx-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.note-pptx-stage-card {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow: auto;
  min-height: 0;
}
.note-slide-canvas {
  width: 100%;
  max-width: 960px;
  max-height: 100%;
  aspect-ratio: 16 / 9;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  padding: 4% 5%;
  overflow-y: auto;
  color: #1e293b;
}
.note-slide-header { border-bottom: 3px solid #ff8a50; padding-bottom: 10px; margin-bottom: 18px; }
.note-slide-num { font-size: 11px; font-weight: 700; color: #94a3b8; letter-spacing: 1px; }
.note-slide-title { font-size: clamp(18px, 2.4vw, 28px); font-weight: 800; margin: 2px 0 0; color: #0f172a; line-height: 1.3; }
.note-slide-body { display: flex; flex-direction: column; gap: 12px; flex: 1 1 auto; min-height: 0; }
.note-slide-body.split { flex-direction: row; }
.slide-texts { flex: 1 1 55%; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.slide-imgs { flex: 1 1 45%; display: flex; flex-direction: column; gap: 10px; align-items: center; justify-content: center; min-width: 0; }
.note-slide-card { margin: 0; padding: 0 0 0 1.2em; font-size: clamp(13px, 1.4vw, 17px); line-height: 1.65; }
.note-slide-card li { margin: 2px 0; }
.note-slide-card li::marker { color: #ff8a50; }
.note-slide-img { max-height: 100%; max-width: 100%; border-radius: 4px; object-fit: contain; }
.note-slide-body:not(.split) .note-slide-img { max-height: 320px; }
.pptx-notes {
  max-height: 120px;
  overflow-y: auto;
  margin: 0 24px 10px;
  padding: 10px 14px;
  background: #222d3a;
  color: #cbd5e1;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
}
.note-pptx-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 16px;
  background: #141b24;
  border-top: 1px solid #2a3542;
}
.note-ctrl-btn {
  min-height: 32px;
  background: #283442;
  color: #e2e8f0;
  border: 1px solid #3a4757;
  padding: 0 14px;
  border-radius: 6px;
  font-size: 13px;
}
.note-ctrl-btn:hover:not(:disabled) { background: #354354; color: #fff; border-color: #4b5b6e; }
.note-ctrl-btn.active { background: #ff8a50; border-color: #ff8a50; color: #1b2430; }
.note-ctrl-btn:disabled { opacity: 0.35; cursor: default; }
.note-ctrl-counter { color: #94a3b8; font-size: 13px; font-weight: 600; min-width: 64px; text-align: center; font-variant-numeric: tabular-nums; }
.note-pptx-shell:fullscreen { border-radius: 0; }
.note-pptx-shell:fullscreen .pptx-rail { display: none; }
.note-pptx-shell:fullscreen .note-slide-canvas { max-width: none; width: min(100%, calc((100vh - 80px) * 16 / 9)); cursor: pointer; }

/* ===================== 图片视图 ===================== */
.niv-stage {
  flex: 1 1 auto;
  position: relative;
  overflow: hidden;
  cursor: grab;
  touch-action: none;
  min-height: 0;
}
.niv-stage.grabbing { cursor: grabbing; }
.niv-img {
  position: absolute;
  left: 50%;
  top: 50%;
  max-width: none;
  transform-origin: center;
  user-select: none;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
  image-rendering: auto;
}
.niv-zoom { min-width: 44px; text-align: center; font-variant-numeric: tabular-nums; }
.bg-check .niv-stage {
  background-color: #fff;
  background-image:
    linear-gradient(45deg, #eef1f4 25%, transparent 25%),
    linear-gradient(-45deg, #eef1f4 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #eef1f4 75%),
    linear-gradient(-45deg, transparent 75%, #eef1f4 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
}
.bg-light .niv-stage { background: #f6f7f8; }
.bg-dark .niv-stage { background: #15191e; }

/* ===================== 音频 / 视频 ===================== */
.nmv-stage { flex: 1 1 auto; display: flex; align-items: center; justify-content: center; min-height: 0; padding: 16px; }
.nmv-shell.video .nmv-stage { background: #0b0f14; padding: 0; }
.nmv-video { max-width: 100%; max-height: 100%; width: 100%; height: 100%; background: #000; }
.nmv-shell.audio .nmv-stage { background: linear-gradient(160deg, #fdf2f6, #eef3fb); }
.nmv-audio-card {
  width: min(440px, 100%);
  padding: 32px 28px 24px;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 14px 40px rgba(173, 20, 87, 0.12);
  text-align: center;
}
.nmv-disc {
  width: 120px;
  height: 120px;
  margin: 0 auto 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  background: radial-gradient(circle, #fff 18%, #fce4ec 19%, #f8bbd0 62%, #ad1457 63%, #ad1457 66%, #fce4ec 67%);
}
.nmv-title { font-weight: 700; font-size: 17px; color: var(--text); overflow-wrap: anywhere; }
.nmv-sub { font-size: 12px; color: var(--muted); margin: 4px 0 18px; overflow-wrap: anywhere; }
.nmv-audio { width: 100%; }
.nmv-skip { display: flex; justify-content: center; gap: 10px; margin-top: 12px; }

/* ===================== PDF（pdf.js） ===================== */
.pdf-shell .note-frame { border: none; border-radius: 0; flex: 1 1 auto; height: auto; }
.pdf-pages {
  flex: 1 1 auto;
  overflow: auto;
  background: #e9edf1;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  min-height: 0;
}
.pdf-page {
  position: relative;
  flex: 0 0 auto;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 6px 20px rgba(0, 0, 0, 0.08);
  max-width: none;
}
.pdf-page canvas { display: block; }
.pdf-page-no {
  position: absolute;
  right: 8px;
  bottom: 6px;
  font-size: 11px;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.85);
  padding: 0 6px;
  border-radius: 4px;
}

/* ===================== ZIP 压缩包 ===================== */
.zip-body { flex: 1 1 auto; display: flex; min-height: 0; }
.zip-list { flex: 0 0 min(380px, 45%); overflow-y: auto; border-right: 1px solid var(--line); padding: 6px; }
.zip-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 0;
  padding: 7px 10px;
  border: none;
  border-radius: 8px;
  background: transparent;
  text-align: left;
  font-size: 13px;
  color: var(--text);
}
.zip-item:hover { background: #f2f6f8; color: var(--text); }
.zip-item.active { background: var(--accent-soft); }
.zip-ico { flex: 0 0 auto; }
.zip-name { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.zip-name b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zip-name i { font-style: normal; font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zip-size { flex: 0 0 auto; font-size: 11px; color: var(--muted); }
.zip-preview { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.zip-preview > .nv-loading { border: none; border-radius: 0; }
.zip-hint { margin: auto; padding: 24px; color: var(--muted); text-align: center; }
.zip-prev-head { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--line); font-size: 13px; font-weight: 600; }
.zip-prev-head > span:first-child { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zip-prev-img { flex: 1 1 auto; display: flex; align-items: center; justify-content: center; padding: 16px; overflow: auto; background: #f6f7f8; }
.zip-prev-img img { max-width: 100%; max-height: 100%; }
.zip-code { font-size: 12.5px; }

/* ===================== 编辑器 ===================== */
.ned-tools { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.ned-tools button {
  min-height: 30px;
  min-width: 30px;
  padding: 0 7px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  font-size: 13px;
  color: #3d4a56;
}
.ned-tools button:hover { background: #fff; border-color: var(--line-strong); }
.ned-sep { width: 1px; height: 18px; background: var(--line); margin: 0 4px; }
.ned-stat { font-variant-numeric: tabular-nums; }
.ned-stat.dirty { color: var(--amber); }
.ned-body { flex: 1 1 auto; display: flex; min-height: 0; }
.ned-input {
  flex: 1 1 50%;
  min-width: 0;
  border: none;
  resize: none;
  outline: none;
  padding: 20px 24px;
  font: 14px/1.75 ui-monospace, SFMono-Regular, Consolas, "Microsoft YaHei Mono", monospace;
  color: #1f2933;
  background: #fff;
  tab-size: 2;
}
.ned-preview-wrap { flex: 1 1 50%; min-width: 0; overflow-y: auto; padding: 20px 28px 40px; border-left: 1px solid var(--line); background: #fcfdfd; }
.ned-body[data-mode="edit"] .ned-preview-wrap { display: none; }
.ned-body[data-mode="preview"] .ned-input { display: none; }
.ned-body[data-mode="preview"] .ned-preview-wrap { border-left: none; background: #fff; }
.ned-body[data-mode="edit"] .ned-input { padding-left: max(24px, calc(50% - 440px)); padding-right: max(24px, calc(50% - 440px)); }
.nb-edit .primary { min-width: 84px; }

/* ===================== 降级 / 提示卡片 ===================== */
.note-fallback-card {
  max-width: 520px;
  margin: 40px auto;
  padding: 36px 28px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  text-align: center;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
}
.nfc-icon {
  width: 92px;
  height: 92px;
  margin: 0 auto 16px;
  border-radius: 22px;
  background: var(--c-soft);
  color: var(--c);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  line-height: 1;
  gap: 4px;
}
.nfc-icon span { font-size: 11px; font-weight: 800; letter-spacing: 1px; }
.nfc-title { margin: 0 0 6px; font-size: 18px; color: var(--text); overflow-wrap: anywhere; }
.nfc-meta { margin: 0 0 16px; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.nfc-notice {
  background: #f8fafb;
  border: 1px solid var(--line);
  padding: 14px 18px;
  border-radius: 10px;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.7;
  text-align: left;
  margin-bottom: 24px;
}
.nfc-actions { display: flex; justify-content: center; }
.nfc-download-btn { font-size: 14px; padding: 0 24px; border-radius: 8px; }

/* ===================== 响应式 ===================== */
@media (max-width: 900px) {
  .md-toc { position: absolute; z-index: 4; height: 100%; box-shadow: 8px 0 24px rgba(0, 0, 0, 0.12); }
  .note-md-body { position: relative; }
  .ned-split-btn { display: none; }
  .note-docx-page { padding: 40px 36px; min-height: 0; }
}
@media (max-width: 640px) {
  .notes-head h2 { flex: 1 1 100%; }
  .notes-search { flex: 1 1 100%; order: 3; }
  .notes-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
  .note-thumb { height: 84px; }
  .as-list .note-meta > span:not(.note-badge):first-of-type { display: none; }
  .notes-bar { top: 72px; }
  .note-bar { padding: 6px; }
  .nb-head { order: -1; flex-basis: 100%; }
  .note-bar { gap: 6px; }
  .nb-actions > button { padding: 0 8px; }
  .nb-icon { min-width: 32px; padding: 0 6px; }
  #noteFullBtn { display: none; }
  .nb-view { margin-left: auto; }
  #noteCopyBtn, #noteDownloadBtn { font-size: 0; }
  #noteCopyBtn::before { content: "⧉"; font-size: 15px; }
  #noteDownloadBtn::before { content: "⬇"; font-size: 15px; }
  .note-stage { height: calc(100dvh - 190px); min-height: 380px; }
  .note-md-stage { padding: 16px; }
  .note-docx-shell { padding: 12px 8px; }
  .note-docx-page { padding: 24px 18px; }
  .note-slide-canvas { padding: 16px; }
  .note-slide-body.split { flex-direction: column; }
  .note-pptx-stage-card { padding: 10px; }
  .zip-body { flex-direction: column; }
  .zip-list { flex: 0 0 40%; border-right: none; border-bottom: 1px solid var(--line); }
  .nb-prompt { display: none; }
  .nb-stage { padding: 12px; }
  .nv-search { width: 120px; }
  .ned-input { padding: 14px; }
}
