/* ============================================================
   云笔记模块样式（三栏布局 · 深空玻璃拟态 · 霓虹）
   依赖 variables.css 设计令牌
   ============================================================ */

.notes-module {
  display: grid;
  grid-template-columns: 232px 300px 1fr;
  height: 100%;
  min-height: 0;
  background: var(--bg-0);
  color: var(--tx-1);
  overflow: hidden;
}

/* ---------------- ① 笔记本栏 ---------------- */
.notes-nb-col {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--bg-1);
  border-right: 1px solid var(--line-strong);
}
.notes-nb-head {
  padding: var(--sp-4) var(--sp-4) var(--sp-3);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--tx-3);
  text-transform: uppercase;
}
.notes-nb-list {
  flex: 1;
  overflow-y: auto;
  padding: 0 var(--sp-2) var(--sp-3);
}
.nb-item {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  width: 100%;
  padding: 9px var(--sp-3);
  border-radius: var(--r-md);
  color: var(--tx-2);
  font-size: var(--fs-md);
  text-align: left;
  cursor: pointer;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
  position: relative;
}
.nb-item:hover { background: var(--bg-3); color: var(--tx-1); }
.nb-item.active {
  background: var(--grad-brand-soft);
  color: var(--tx-1);
  box-shadow: inset 0 0 0 1px var(--line-2);
}
.nb-item .nb-dot {
  width: 10px; height: 10px;
  border-radius: var(--r-full);
  flex-shrink: 0;
  box-shadow: 0 0 8px currentColor;
  cursor: pointer;
}
.nb-item .nb-icon { flex-shrink: 0; display: inline-flex; }
.nb-item .nb-icon svg { width: 16px; height: 16px; }
.nb-item .nb-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nb-item .nb-count {
  font-size: var(--fs-xs);
  color: var(--tx-3);
  background: var(--bg-2);
  border-radius: var(--r-full);
  padding: 1px 8px;
}
.nb-item.active .nb-count { background: rgba(0, 229, 255, 0.12); color: var(--neon-cyan); }
.nb-item .nb-ops {
  display: none;
  gap: 2px;
  flex-shrink: 0;
}
.nb-item:hover .nb-ops { display: inline-flex; }
.nb-item:hover .nb-count { display: none; }
.nb-op-btn {
  display: inline-flex;
  padding: 3px;
  border-radius: var(--r-sm);
  color: var(--tx-3);
  transition: color var(--t-fast), background var(--t-fast);
}
.nb-op-btn:hover { color: var(--neon-cyan); background: var(--bg-2); }
.nb-op-btn.danger:hover { color: var(--danger); }
.nb-op-btn svg { width: 14px; height: 14px; }
.notes-nb-foot {
  padding: var(--sp-3);
  border-top: 1px solid var(--line-1);
}
.nb-add-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  width: 100%;
  padding: 9px;
  border-radius: var(--r-md);
  border: 1px dashed var(--line-2);
  color: var(--tx-2);
  font-size: var(--fs-sm);
  transition: all var(--t-fast) var(--ease);
}
.nb-add-btn:hover {
  border-color: var(--line-glow);
  color: var(--neon-cyan);
  box-shadow: var(--glow-cyan);
}
.nb-add-btn svg { width: 14px; height: 14px; }

/* 颜色选择弹层 */
.nb-color-pop {
  position: fixed;
  z-index: var(--z-dropdown);
  display: flex;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-3);
  background: var(--bg-glass-strong);
  backdrop-filter: blur(18px);
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-2);
}
.nb-color-pop button {
  width: 22px; height: 22px;
  border-radius: var(--r-full);
  border: 2px solid transparent;
  transition: transform var(--t-fast) var(--ease), border-color var(--t-fast);
}
.nb-color-pop button:hover { transform: scale(1.18); }
.nb-color-pop button.cur { border-color: #fff; }

/* ---------------- ② 笔记列表栏 ---------------- */
.notes-list-col {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--bg-1);
  border-right: 1px solid var(--line-strong);
}
.notes-list-head {
  padding: var(--sp-3);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  border-bottom: 1px solid var(--line-1);
}
.notes-search-box {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 8px var(--sp-3);
  background: var(--bg-2);
  border: 1px solid var(--line-1);
  border-radius: var(--r-md);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.notes-search-box:focus-within {
  border-color: var(--line-glow);
  box-shadow: var(--glow-cyan);
}
.notes-search-box svg { width: 15px; height: 15px; color: var(--tx-3); flex-shrink: 0; }
.notes-search-box input {
  flex: 1;
  min-width: 0;
  background: none;
  border: none;
  outline: none;
  font-size: var(--fs-sm);
  color: var(--tx-1);
}
.notes-search-box input::placeholder { color: var(--tx-3); }
.notes-list-row2 { display: flex; gap: var(--sp-2); }
.notes-tag-filter {
  flex: 1;
  min-width: 0;
  padding: 7px var(--sp-3);
  background: var(--bg-2);
  border: 1px solid var(--line-1);
  border-radius: var(--r-md);
  color: var(--tx-2);
  font-size: var(--fs-sm);
  outline: none;
  cursor: pointer;
}
.notes-tag-filter:focus { border-color: var(--line-glow); }
.notes-sort {
  flex: 0 0 auto;
  max-width: 108px;
  padding: 7px var(--sp-2);
  background: var(--bg-2);
  border: 1px solid var(--line-1);
  border-radius: var(--r-md);
  color: var(--tx-2);
  font-size: var(--fs-sm);
  outline: none;
  cursor: pointer;
}
.notes-sort:focus { border-color: var(--line-glow); }
.notes-empty-trash-btn {
  flex: 0 0 auto;
  padding: 7px var(--sp-3);
  border-radius: var(--r-md);
  border: 1px solid rgba(255, 93, 115, .4);
  background: rgba(255, 93, 115, .1);
  color: var(--danger);
  font-size: var(--fs-sm);
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background var(--t-fast), border-color var(--t-fast);
}
.notes-empty-trash-btn:hover { background: rgba(255, 93, 115, .18); border-color: var(--danger); }
.notes-empty-trash-btn[hidden], .notes-new-btn[hidden] { display: none; }
.notes-new-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  padding: 7px var(--sp-3);
  border-radius: var(--r-md);
  background: var(--grad-brand);
  color: var(--tx-on-neon);
  font-size: var(--fs-sm);
  font-weight: 600;
  white-space: nowrap;
  transition: filter var(--t-fast), box-shadow var(--t-fast), opacity var(--t-fast);
}
.notes-new-btn:hover { filter: brightness(1.12); box-shadow: var(--glow-brand); }
.notes-new-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: grayscale(0.5);
  box-shadow: none;
}
.notes-new-btn svg { width: 14px; height: 14px; }
.notes-quota-tip {
  display: none;
  padding: var(--sp-2) var(--sp-3);
  font-size: var(--fs-xs);
  color: var(--tx-2);
  background: var(--bg-glass);
  border: 1px solid var(--line-1);
  border-radius: var(--r-md);
}
.notes-quota-tip b { color: var(--neon-cyan); }
.notes-quota-tip.warn {
  color: var(--neon-gold);
  background: rgba(255, 200, 87, 0.08);
  border-color: rgba(255, 200, 87, 0.25);
  cursor: pointer;
}
.notes-quota-tip.show { display: block; }

.notes-list-body {
  flex: 1;
  overflow-y: auto;
  padding: var(--sp-2);
}
.note-card {
  position: relative;
  padding: var(--sp-3);
  margin-bottom: var(--sp-2);
  background: var(--bg-2);
  border: 1px solid var(--line-1);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: border-color var(--t-fast), background var(--t-fast), transform var(--t-fast) var(--ease);
}
.note-card:hover {
  background: var(--bg-3);
  border-color: var(--line-2);
  transform: translateY(-1px);
}
.note-card.active {
  border-color: var(--line-glow);
  background: var(--grad-brand-soft);
  box-shadow: var(--glow-cyan);
}
.note-card .nc-title {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-1);
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--tx-1);
  line-height: 1.4;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}
.note-card .nc-pin {
  flex-shrink: 0;
  color: var(--neon-gold);
  display: inline-flex;
  margin-top: 2px;
}
.note-card .nc-pin svg { width: 13px; height: 13px; }
.note-card .nc-excerpt {
  margin-top: var(--sp-1);
  font-size: var(--fs-xs);
  color: var(--tx-3);
  line-height: 1.5;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  word-break: break-all;
}
.note-card .nc-meta {
  margin-top: var(--sp-2);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-xs);
  color: var(--tx-3);
  flex-wrap: wrap;
}
.note-card .nc-tag {
  padding: 0 8px;
  border-radius: var(--r-full);
  background: rgba(139, 92, 246, 0.14);
  color: #c7b9ff;
  font-size: 11px;
  line-height: 18px;
}
.note-card.trashed { opacity: 0.75; }

/* 列表空态 */
.notes-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--sp-7) var(--sp-4);
  text-align: center;
  color: var(--tx-3);
}
.notes-empty svg { width: 120px; height: 120px; margin-bottom: var(--sp-4); opacity: 0.9; }
.notes-empty p { font-size: var(--fs-sm); margin-bottom: var(--sp-3); }
.notes-empty .empty-cta {
  padding: 8px var(--sp-5);
  border-radius: var(--r-md);
  background: var(--grad-brand);
  color: var(--tx-on-neon);
  font-weight: 600;
  font-size: var(--fs-sm);
  transition: filter var(--t-fast), box-shadow var(--t-fast);
}
.notes-empty .empty-cta:hover { filter: brightness(1.12); box-shadow: var(--glow-brand); }

/* 通用小菜单（卡片右键 / 更多菜单 / 移动笔记本） */
.notes-menu {
  position: fixed;
  z-index: var(--z-dropdown);
  min-width: 160px;
  padding: var(--sp-1);
  background: var(--bg-glass-strong);
  backdrop-filter: blur(18px);
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-2);
}
.notes-menu button {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  width: 100%;
  padding: 8px var(--sp-3);
  border-radius: var(--r-sm);
  font-size: var(--fs-sm);
  color: var(--tx-2);
  text-align: left;
  transition: background var(--t-fast), color var(--t-fast);
}
.notes-menu button:hover { background: var(--bg-3); color: var(--tx-1); }
.notes-menu button.danger { color: var(--danger); }
.notes-menu button.danger:hover { background: rgba(255, 93, 115, 0.12); }
.notes-menu button svg { width: 14px; height: 14px; flex-shrink: 0; }
.notes-menu .menu-sep { height: 1px; margin: var(--sp-1) var(--sp-2); background: var(--line-1); }

/* ---------------- ③ 编辑区 ---------------- */
.notes-editor-col {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  background: var(--bg-0);
  position: relative;
}
.notes-editor-placeholder {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--tx-3);
  text-align: center;
  padding: var(--sp-5);
}
.notes-editor-placeholder svg { width: 160px; height: 160px; margin-bottom: var(--sp-5); }
.notes-editor-placeholder h3 {
  font-size: var(--fs-xl);
  font-weight: 600;
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: var(--sp-2);
}
.notes-editor-placeholder p { font-size: var(--fs-sm); }

.ne-topbar {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-4);
  border-bottom: 1px solid var(--line-1);
  background: var(--bg-1);
  flex-wrap: wrap;
}
.ne-toolbar { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.ne-tool-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 30px;
  padding: 0 6px;
  border-radius: var(--r-sm);
  color: var(--tx-3);
  font-size: var(--fs-xs);
  font-weight: 600;
  transition: color var(--t-fast), background var(--t-fast);
}
.ne-tool-btn:hover { color: var(--neon-cyan); background: var(--bg-3); }
.ne-tool-btn svg { width: 15px; height: 15px; }
.ne-tool-sep { width: 1px; height: 18px; margin: 0 var(--sp-1); background: var(--line-1); }

/* ---- 工具栏快捷插入：AI 对话 / AI 绘图选择器 ---- */
.ne-ins-list { display: flex; flex-direction: column; gap: var(--sp-2); max-height: 56vh; overflow-y: auto; }
.ne-ins-item {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3);
  padding: 10px var(--sp-3); border-radius: var(--r-md); text-align: left;
  background: var(--bg-2); border: 1px solid var(--line-1); cursor: pointer;
  transition: border-color var(--t-fast), background var(--t-fast);
}
.ne-ins-item:hover { background: var(--bg-3); border-color: var(--line-glow); }
.ne-ins-item:disabled { opacity: .6; cursor: default; }
.ne-ins-item-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--tx-1); font-size: var(--fs-sm); }
.ne-ins-item-sub { flex: none; color: var(--tx-3); font-size: var(--fs-xs); }
.ne-ins-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: var(--sp-2); max-height: 56vh; overflow-y: auto;
}
.ne-ins-cell {
  display: flex; flex-direction: column; gap: 4px; padding: 6px; cursor: pointer;
  background: var(--bg-2); border: 1px solid var(--line-1); border-radius: var(--r-md);
  transition: border-color var(--t-fast), background var(--t-fast);
}
.ne-ins-cell:hover { background: var(--bg-3); border-color: var(--line-glow); }
.ne-ins-cell img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--r-sm); display: block; background: var(--bg-3); }
.ne-ins-cell-p { font-size: var(--fs-xs); color: var(--tx-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ne-ins-tip { padding: var(--sp-5); text-align: center; color: var(--tx-3); font-size: var(--fs-sm); grid-column: 1 / -1; }
.ne-ins-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); padding: 2px 2px 8px; }
.ne-ins-back { display: inline-flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: var(--r-sm); color: var(--tx-2); font-size: var(--fs-sm); transition: color var(--t-fast), background var(--t-fast); }
.ne-ins-back:hover { color: var(--tx-1); background: var(--bg-3); }
.ne-ins-back .i { width: 15px; height: 15px; }
.ne-ins-all { padding: 6px 12px; border-radius: var(--r-sm); border: 1px solid var(--line-2); color: var(--neon-cyan); font-size: var(--fs-sm); transition: border-color var(--t-fast), background var(--t-fast); }
.ne-ins-all:hover { border-color: var(--line-glow); background: rgba(0, 229, 255, 0.06); }
.ne-ins-msg { align-items: flex-start; }
.ne-ins-role { flex: none; margin-top: 1px; font-size: var(--fs-xs); padding: 1px 8px; border-radius: var(--r-full); }
.ne-ins-role.user { color: var(--neon-cyan); border: 1px solid rgba(0, 229, 255, 0.4); }
.ne-ins-role.assistant { color: var(--neon-violet); border: 1px solid rgba(139, 92, 246, 0.45); }
.ne-ins-msg .ne-ins-item-title { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

/* 附件/版本抽屉遮罩：点击空白处即可关闭 */
.ne-att-mask {
  position: absolute; inset: 0; z-index: 19;
  background: rgba(3, 5, 16, 0.45);
  opacity: 0; visibility: hidden;
  transition: opacity var(--t-mid) var(--ease), visibility 0s linear var(--t-mid);
}
.ne-att-mask.show { opacity: 1; visibility: visible; transition-delay: 0s; }

.ne-view-switch {
  display: flex;
  margin-left: auto;
  background: var(--bg-2);
  border: 1px solid var(--line-1);
  border-radius: var(--r-md);
  padding: 2px;
}
.ne-view-switch button {
  padding: 4px var(--sp-3);
  border-radius: var(--r-sm);
  font-size: var(--fs-xs);
  color: var(--tx-3);
  transition: all var(--t-fast);
}
.ne-view-switch button.active {
  background: var(--grad-brand-soft);
  color: var(--neon-cyan);
  box-shadow: inset 0 0 0 1px var(--line-2);
}

.ne-status {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-xs);
  color: var(--tx-3);
  white-space: nowrap;
}
.ne-status .dot {
  width: 8px; height: 8px;
  border-radius: var(--r-full);
  background: var(--neon-green);
  box-shadow: 0 0 8px var(--neon-green);
}
.ne-status.saving .dot { background: var(--neon-gold); box-shadow: 0 0 8px var(--neon-gold); animation: nePulse 1s infinite; }
.ne-status.dirty .dot { background: var(--neon-blue); box-shadow: 0 0 8px var(--neon-blue); }
.ne-status.error .dot { background: var(--danger); box-shadow: 0 0 8px var(--danger); }
@keyframes nePulse { 50% { opacity: 0.35; } }

.ne-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  border-radius: var(--r-sm);
  color: var(--tx-3);
  transition: color var(--t-fast), background var(--t-fast);
  position: relative;
}
.ne-icon-btn:hover { color: var(--tx-1); background: var(--bg-3); }
.ne-icon-btn svg { width: 17px; height: 17px; }
.ne-icon-btn.has-att::after {
  content: attr(data-count);
  position: absolute;
  top: 1px; right: 0;
  min-width: 14px;
  height: 14px;
  padding: 0 3px;
  border-radius: var(--r-full);
  background: var(--grad-brand);
  color: var(--tx-on-neon);
  font-size: 10px;
  line-height: 14px;
  text-align: center;
}

.ne-title-input {
  width: 100%;
  padding: var(--sp-4) var(--sp-5) var(--sp-2);
  background: none;
  border: none;
  outline: none;
  font-size: var(--fs-2xl);
  font-weight: 700;
  color: var(--tx-1);
}
.ne-title-input::placeholder { color: var(--tx-3); }
.ne-title-input:disabled { opacity: 0.7; }

.ne-tags-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--sp-2);
  padding: 0 var(--sp-5) var(--sp-3);
}
.ne-tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px 2px 10px;
  border-radius: var(--r-full);
  background: rgba(139, 92, 246, 0.16);
  border: 1px solid rgba(139, 92, 246, 0.35);
  color: #c7b9ff;
  font-size: var(--fs-xs);
}
.ne-tag-chip button {
  display: inline-flex;
  color: inherit;
  opacity: 0.7;
  border-radius: var(--r-full);
}
.ne-tag-chip button:hover { opacity: 1; color: #fff; }
.ne-tag-chip svg { width: 11px; height: 11px; }
.ne-tag-input {
  flex: 1;
  min-width: 90px;
  background: none;
  border: none;
  outline: none;
  font-size: var(--fs-xs);
  color: var(--tx-1);
  padding: 3px 0;
}
.ne-tag-input::placeholder { color: var(--tx-3); }

.ne-body {
  flex: 1;
  display: flex;
  min-height: 0;
  position: relative;
}
.ne-textarea-wrap, .ne-preview-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.ne-textarea {
  flex: 1;
  width: 100%;
  padding: var(--sp-4) var(--sp-5);
  background: none;
  border: none;
  outline: none;
  resize: none;
  font-family: var(--font-mono);
  font-size: var(--fs-md);
  line-height: 1.75;
  color: var(--tx-1);
}
.ne-textarea::placeholder { color: var(--tx-3); }
.ne-preview {
  flex: 1;
  overflow-y: auto;
  padding: var(--sp-4) var(--sp-5);
  border-left: 1px solid var(--line-strong);
  font-size: var(--fs-md);
  line-height: 1.8;
  color: var(--tx-2);
  word-break: break-word;
}
.ne-preview h1, .ne-preview h2, .ne-preview h3, .ne-preview h4 {
  color: var(--tx-1);
  margin: var(--sp-4) 0 var(--sp-2);
  line-height: 1.4;
}
.ne-preview h1 { font-size: var(--fs-2xl); }
.ne-preview h2 { font-size: var(--fs-xl); }
.ne-preview h3 { font-size: var(--fs-lg); }
.ne-preview p { margin: var(--sp-2) 0; }
.ne-preview a { color: var(--neon-cyan); }
.ne-preview code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--bg-2);
  border: 1px solid var(--line-1);
  border-radius: var(--r-sm);
  padding: 1px 6px;
  color: var(--neon-green);
}
.ne-preview pre {
  background: var(--bg-1);
  border: 1px solid var(--line-1);
  border-radius: var(--r-md);
  padding: var(--sp-3);
  overflow-x: auto;
  margin: var(--sp-3) 0;
}
.ne-preview pre code { background: none; border: none; padding: 0; color: var(--tx-1); }
.ne-preview blockquote {
  border-left: 3px solid var(--neon-violet);
  padding: var(--sp-1) var(--sp-3);
  margin: var(--sp-3) 0;
  color: var(--tx-3);
  background: rgba(139, 92, 246, 0.06);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
}
.ne-preview ul, .ne-preview ol { padding-left: var(--sp-5); margin: var(--sp-2) 0; }
.ne-preview ul li { list-style: disc; }
.ne-preview ol li { list-style: decimal; }
.ne-preview img { max-width: 100%; border-radius: var(--r-md); margin: var(--sp-2) 0; }
.ne-preview table { border-collapse: collapse; margin: var(--sp-3) 0; width: 100%; }
.ne-preview th, .ne-preview td {
  border: 1px solid var(--line-2);
  padding: 6px var(--sp-3);
  font-size: var(--fs-sm);
}
.ne-preview th { background: var(--bg-2); color: var(--tx-1); }
.ne-preview hr { border: none; border-top: 1px solid var(--line-2); margin: var(--sp-4) 0; }

.ne-mode-edit .ne-preview-wrap { display: none; }
.ne-mode-preview .ne-textarea-wrap { display: none; }
.ne-mode-preview .ne-preview-wrap { border-left: none; }

.ne-footer {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-2) var(--sp-5);
  border-top: 1px solid var(--line-1);
  font-size: var(--fs-xs);
  color: var(--tx-3);
}

/* 回收站提示条 */
.ne-trash-banner {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-5);
  background: rgba(255, 93, 115, 0.08);
  border-bottom: 1px solid rgba(255, 93, 115, 0.25);
  color: var(--danger);
  font-size: var(--fs-xs);
}

/* 附件抽屉 */
.ne-att-drawer {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 320px;
  max-width: 88%;
  display: flex;
  flex-direction: column;
  background: var(--bg-glass-strong);
  backdrop-filter: blur(20px);
  border-left: 1px solid var(--line-2);
  box-shadow: var(--shadow-2);
  transform: translateX(105%);
  transition: transform var(--t-mid) var(--ease);
  z-index: 20;
}
.ne-att-drawer.open { transform: translateX(0); }
.ne-att-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-4);
  border-bottom: 1px solid var(--line-1);
  font-weight: 600;
}
.ne-att-upload {
  margin: var(--sp-3) var(--sp-4);
  padding: var(--sp-4);
  border: 1px dashed var(--line-2);
  border-radius: var(--r-md);
  text-align: center;
  font-size: var(--fs-xs);
  color: var(--tx-3);
  cursor: pointer;
  transition: all var(--t-fast);
}
.ne-att-upload:hover, .ne-att-upload.dragover {
  border-color: var(--line-glow);
  color: var(--neon-cyan);
  background: rgba(0, 229, 255, 0.05);
}
.ne-att-list { flex: 1; overflow-y: auto; padding: 0 var(--sp-3) var(--sp-3); }
.ne-att-item {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-2);
  border-radius: var(--r-md);
  transition: background var(--t-fast);
}
.ne-att-item:hover { background: var(--bg-3); }
.ne-att-item .att-icon {
  display: inline-flex;
  flex-shrink: 0;
  width: 34px; height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-sm);
  background: var(--grad-brand-soft);
  color: var(--neon-cyan);
}
.ne-att-item .att-icon svg { width: 17px; height: 17px; }
.ne-att-item .att-info { flex: 1; min-width: 0; }
.ne-att-item .att-name {
  font-size: var(--fs-sm);
  color: var(--tx-1);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ne-att-item .att-size { font-size: var(--fs-xs); color: var(--tx-3); }
.ne-att-item .att-ops { display: flex; gap: 2px; flex-shrink: 0; }
.ne-att-item .att-ops button {
  display: inline-flex;
  padding: 5px;
  border-radius: var(--r-sm);
  color: var(--tx-3);
  transition: color var(--t-fast), background var(--t-fast);
}
.ne-att-item .att-ops button:hover { color: var(--neon-cyan); background: var(--bg-2); }
.ne-att-item .att-ops button.danger:hover { color: var(--danger); }
.ne-att-item .att-ops svg { width: 14px; height: 14px; }
.ne-att-empty { padding: var(--sp-5); text-align: center; color: var(--tx-3); font-size: var(--fs-xs); }

/* ---------- 历史版本抽屉 ---------- */
.ne-ver-drawer { z-index: 21; }
.ne-ver-list { flex: 1; overflow-y: auto; padding: var(--sp-2) var(--sp-3); }
.ne-ver-list[hidden] { display: none; }
.ne-ver-item {
  padding: 10px 12px;
  border: 1px solid var(--line-1);
  border-radius: var(--r-md);
  margin: 6px 0;
  cursor: pointer;
  transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.ne-ver-item:hover { border-color: var(--line-2); background: var(--bg-glass); }
.ne-ver-title { font-size: var(--fs-sm); font-weight: 600; color: var(--tx-1); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ne-ver-sub { margin-top: 3px; font-size: var(--fs-xs); color: var(--tx-3); }
.ne-ver-preview { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.ne-ver-preview[hidden] { display: none; }
.ne-ver-meta {
  padding: 8px var(--sp-4);
  font-size: var(--fs-xs); color: var(--tx-3);
  border-bottom: 1px solid var(--line-1);
}
.ne-ver-body { flex: 1; overflow-y: auto; padding: var(--sp-3) var(--sp-4); }
.ne-ver-ops {
  display: flex; gap: 10px; padding: var(--sp-3) var(--sp-4);
  border-top: 1px solid var(--line-1);
}
.ne-ver-restore-btn, .ne-ver-back-btn {
  min-height: 34px; padding: 0 16px; border-radius: var(--r-sm);
  border: 1px solid var(--line-2); cursor: pointer; font-size: var(--fs-xs);
  background: var(--bg-glass); color: var(--tx-1);
  transition: border-color var(--t-fast) var(--ease), filter var(--t-fast) var(--ease);
}
.ne-ver-restore-btn { background: var(--grad-brand); border-color: transparent; color: #04121a; font-weight: 600; }
.ne-ver-restore-btn:hover { filter: brightness(1.1); }
.ne-ver-back-btn:hover { border-color: var(--neon-blue, var(--line-2)); }

/* 拖拽上传遮罩 */
.ne-drop-mask {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(5, 6, 15, 0.72);
  backdrop-filter: blur(4px);
  border: 2px dashed var(--line-glow);
  border-radius: var(--r-lg);
  color: var(--neon-cyan);
  font-size: var(--fs-lg);
  pointer-events: none;
}
.ne-drop-mask.show { display: flex; }

/* ---------------- 响应式 ---------------- */
@media (max-width: 1080px) {
  .notes-module { grid-template-columns: 200px 260px 1fr; }
}
@media (max-width: 860px) {
  .notes-module { grid-template-columns: 56px 1fr; grid-template-rows: 100%;}
  .notes-nb-col { overflow: visible; }
  .notes-nb-head, .nb-item .nb-name, .nb-item .nb-count, .nb-item .nb-ops, .nb-add-btn span { display: none; }
  .nb-item { justify-content: center; padding: 10px 0; }
  .nb-item:hover .nb-ops { display: none; }
  .notes-nb-foot { padding: var(--sp-2); }
  .nb-add-btn { padding: 8px 0; }
  .notes-list-col { border-right: none; }
  .notes-editor-col {
    position: fixed;
    inset: 0;
    z-index: var(--z-modal);
    display: none;
  }
  .notes-module.editing .notes-editor-col { display: flex; }
  .ne-mobile-back { display: inline-flex !important; }
}
.ne-mobile-back { display: none; }
