/* ===== 侧栏菜单（Get笔记式） ===== */
.nav-menu-btn {
  width: 44px; height: 44px; border: none; background: none; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 5px; padding: 0; -webkit-tap-highlight-color: transparent;
  position: relative; z-index: 200; touch-action: manipulation;
  flex-shrink: 0;
}
.nav-menu-btn span {
  display: block; width: 18px; height: 2px; background: var(--color-text-primary);
  border-radius: 1px; pointer-events: none;
}
.side-drawer {
  display: none; position: fixed; inset: 0; z-index: 10000;
  -webkit-tap-highlight-color: transparent;
  pointer-events: none;
}
.side-drawer.open { display: block; pointer-events: auto; }
.side-drawer-mask {
  position: absolute; inset: 0; background: rgba(15, 23, 42, 0.45);
}
.side-drawer-panel {
  position: absolute; left: 0; top: 0; bottom: 0; width: min(82vw, 320px);
  background: var(--color-card); box-shadow: 4px 0 24px rgba(15, 23, 42, 0.12);
  display: flex; flex-direction: column; overflow-y: auto;
  padding: calc(52px + env(safe-area-inset-top, 0px)) 0 calc(24px + env(safe-area-inset-bottom, 0px));
  box-sizing: border-box;
}
.side-drawer-profile {
  padding: 16px 20px 16px;
  border-bottom: 1px solid var(--color-border-light);
  text-align: center;
}
.side-drawer-edit-profile {
  display: block; margin-top: 12px; padding: 0; border: none; background: none;
  color: var(--color-brand); font-size: 13px; font-weight: 500; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.side-drawer-edit-profile:active { opacity: 0.75; }
.side-drawer-avatar {
  width: 56px; height: 56px; border-radius: 50%; background: var(--color-brand-light);
  display: flex; align-items: center; justify-content: center; font-size: 28px;
  overflow: hidden; margin: 0 auto 10px;
}
.side-drawer-avatar img { width: 100%; height: 100%; object-fit: cover; }
.side-drawer-name { font-size: 18px; font-weight: 700; color: var(--color-text-primary); }
.side-drawer-team { font-size: 12px; color: var(--color-text-secondary); margin-top: 4px; }
.side-drawer-stats {
  display: flex; gap: 24px; margin-top: 16px; justify-content: center;
}
.side-drawer-stats div { display: flex; flex-direction: column; gap: 2px; }
.side-drawer-stats strong { font-size: 18px; font-weight: 700; color: var(--color-text-primary); }
.side-drawer-stats span { font-size: 11px; color: var(--color-text-secondary); }
.side-drawer-menu { padding: 8px 0; }
.side-drawer-item {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 14px 20px; border: none; background: none; text-align: left;
  font-size: 15px; color: var(--color-text-primary); cursor: pointer;
}
.side-drawer-item:active { background: var(--color-bg-secondary, #f3f4f6); }
.side-drawer-icon { font-size: 20px; width: 28px; text-align: center; }
.side-drawer-item--danger {
  color: var(--color-error, #dc2626);
  border-top: 1px solid var(--color-border-light, rgba(0, 0, 0, 0.06));
  margin-top: 8px;
}

/* ===== 文字笔记 ===== */
.text-note-page .content { padding: 0 16px 24px; }

/* 写笔记 · 全页布局（对齐 get笔记：顶栏操作 + 大标题 + 正文，无分割线） */
.page.text-note-edit-page.active {
  display: flex !important;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  padding-bottom: 0 !important;
  background: var(--color-card, #fff);
}
.page.text-note-edit-page:not(.active) {
  display: none !important;
}
body.text-note-editing #tabBar,
body.kb-text-editing #tabBar,
body.case-edit-editing #tabBar,
body:has(#page-text-note.active) #tabBar,
body:has(#page-case-edit.active) #tabBar,
body:has(#page-kb-upload.active) #tabBar {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}
.text-note-edit-page > .nav-header.text-note-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 48px;
  padding: 0 8px 0 4px;
  flex-shrink: 0;
  box-sizing: border-box;
  border-bottom: none;
  background: var(--color-card, #fff);
}
.text-note-edit-page > .nav-header .nav-back {
  flex-shrink: 0;
  margin-left: 0;
}
.text-note-nav-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
}
.text-note-nav-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--color-text-primary);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.text-note-nav-icon:active:not(:disabled) {
  background: var(--color-bg-secondary, #f3f4f6);
}
.text-note-nav-icon:disabled {
  opacity: 0.25;
  pointer-events: none;
}
.text-note-edit-page > .nav-header .nav-action-text {
  margin-left: 2px;
  margin-right: 4px;
  font-size: 16px;
  font-weight: 600;
}
.text-note-image-input-native {
  position: fixed;
  left: 0;
  top: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
  z-index: -1;
}
.text-note-edit-page > .content.text-note-editor {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 4px 20px;
  padding-bottom: calc(120px + env(safe-area-inset-bottom, 0px));
}
.text-note-editor {
  display: block;
  min-height: auto;
  padding-bottom: 0;
}
.text-note-compose {
  position: relative;
  min-height: 100%;
  padding-bottom: 32px;
}
.text-note-title-input {
  display: block;
  width: 100%;
  border: none;
  padding: 8px 0 4px;
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.35;
  background: transparent;
  outline: none;
  box-sizing: border-box;
  color: var(--color-text-primary);
}
.text-note-title-input::placeholder {
  color: var(--color-text-tertiary);
  font-weight: 700;
}
.text-note-title-count {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.text-note-body-input {
  width: 100%;
  min-height: 200px;
  border: none;
  padding: 0;
  margin: 0;
  font-size: 17px;
  line-height: 1.75;
  background: transparent;
  outline: none;
  box-sizing: border-box;
  overflow: visible;
  -webkit-user-select: text;
  user-select: text;
  word-break: break-word;
  color: var(--color-text-primary);
}
.text-note-body-input:empty::before {
  content: attr(data-placeholder);
  color: var(--color-text-tertiary);
  pointer-events: none;
}
.text-note-body-input h2,
.text-note-body-input h3 {
  font-size: 17px; font-weight: 700; line-height: 1.45;
  margin: 14px 0 8px;
}
.text-note-body-input p { margin: 0 0 10px; min-height: 1.75em; }
.text-note-body-input ul,
.text-note-body-input ol {
  margin: 0 0 10px; padding-left: 1.35em;
}
.text-note-body-input li { margin-bottom: 4px; }
.text-note-body-input blockquote {
  margin: 0 0 10px; padding: 8px 12px;
  border-left: 3px solid var(--color-brand);
  background: var(--color-bg-secondary, #f8fafc);
  color: var(--color-text-secondary);
}
.text-note-body-input hr {
  border: none; border-top: 1px solid var(--color-border);
  margin: 14px 0;
}
.text-note-body-input img.note-inline-img,
.note-markdown-body img.note-inline-img,
.note-markdown-body img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 10px 0;
  border-radius: var(--radius-sm, 8px);
  background: var(--color-bg-secondary, #f3f4f6);
}
.note-image-viewer {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
  background: rgba(15, 23, 42, 0.92);
}
.note-image-viewer img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
}

/* 选图预览 / 裁剪（对齐 get笔记） */
/* ═══════════════════════════════════════════════════════════
   图片选择/裁剪页 — v6.8 强制全屏覆盖
   核心问题：SPA路由下页面不是fixed，导致高度被父容器限制，
   图片无法全屏显示，裁剪手柄位置异常。
   ═══════════════════════════════════════════════════════════ */
.text-note-image-page {
  position: fixed !important;
  inset: 0 !important;
  z-index: 10000 !important;
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  background: #000 !important;
  overflow: hidden !important;
  /* v6.9.3: 覆盖框架 .page 的 padding-bottom（给 Tab 栏留的空间） */
  padding-bottom: 0 !important;
  margin: 0 !important;
}
/* v6.9.3: active 状态也要强制最高层级 */
.text-note-image-page.active {
  z-index: 10000 !important;
}
.text-note-image-page .note-image-picker-page {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100vh !important;
  height: 100dvh !important;
  min-height: 100vh !important;
  min-height: 100dvh !important;
  background: #000;
}
.note-image-picker-body {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
/* v6.9.4: 顶栏/底栏参与 flex 布局，stage 高度 = 中间可视区（不再用 absolute 浮层盖住 stage） */
.note-image-picker-chrome {
  flex-shrink: 0;
  width: 100%;
}
.note-image-picker-chrome--bottom {
  min-height: calc(88px + env(safe-area-inset-bottom, 0px));
}
.note-image-picker-overlay {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 5;
  pointer-events: none;
}
.note-image-picker-overlay > * {
  pointer-events: auto;
}
.note-image-picker-overlay--top { top: 0; }
.note-image-picker-overlay--bottom { bottom: 0; }
.note-image-picker {
  position: fixed;
  inset: 0;
  left: 50%;
  z-index: 10050;
  width: 100%;
  max-width: 480px;
  transform: translateX(-50%);
  background: #000;
  display: none;
  flex-direction: column;
}
.note-image-picker.is-open {
  display: flex !important;
}
.note-image-picker[hidden] { display: none !important; }
.note-image-picker-view {
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
}
.note-image-picker-top {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 48px;
  padding: 0 8px;
  background: #fff;
  color: #000;
  border-bottom: 0.5px solid rgba(0,0,0,0.06);
  box-sizing: border-box;
}
.note-image-picker-top--dark {
  background: #fff;
  border-bottom: 0.5px solid rgba(0,0,0,0.06);
  color: #000;
}
.note-image-picker-counter {
  font-size: 15px;
  font-weight: 500;
  color: #000;
}
.note-image-picker-top-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}
.note-image-picker-icon-btn {
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: #555;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.note-image-picker-icon-btn:active { background: rgba(0,0,0,0.06); }
.note-image-picker-icon-btn.active { color: #2563EB; }
.note-image-picker-svg-icon {
  display: block;
  width: 22px;
  height: 22px;
  color: #555;
}
.note-image-picker-crop-svg {
  width: 20px;
  height: 20px;
}
.note-image-picker-stage,
.note-image-picker-crop-stage {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  position: relative;
  overflow: hidden;
  background: #000;
}
.note-image-picker-stage:not(.note-image-picker-stage--crop) {
  display: flex;
  align-items: center;
  justify-content: center;
}
/* 裁剪模式：img/crop-box 绝对定位，stage 作坐标系 */
.note-image-picker-stage--crop {
  touch-action: none;
  overflow: hidden;
  display: block;
}
.note-image-picker-display-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}
.note-image-picker-bottom {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: #fff;
  border-top: 0.5px solid rgba(0,0,0,0.06);
  box-sizing: border-box;
}
.note-image-picker-thumb-wrap {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid rgba(0, 0, 0, 0.12);
  flex-shrink: 0;
}
.note-image-picker-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.note-image-picker-done {
  flex: 1;
  margin: 0;
  padding: 13px 20px;
  border: none;
  border-radius: 11px;
  background: #2C2C2E;
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.note-image-picker-done:active { opacity: 0.82; }
/* ═══════════════════════════════════════════════════════════
   裁剪手柄 — v6.6 最终版
   策略：JS 内联样式为主 + CSS 为辅，双重保障可见性
   适用于微信 WebView / 各类移动浏览器
   ═══════════════════════════════════════════════════════════ */
.note-img-crop-box {
  position: absolute;
  box-sizing: border-box;
  border: 2.5px solid #fff;
  outline: 2.5px solid rgba(0,0,0,0.55);
  outline-offset: -5px;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.55);
  touch-action: none;
}
/* 手柄触控区 — v6.8 改为裁剪框内部四角 */
.note-img-crop-handle {
  position: absolute;
  width: 44px;
  height: 44px;
  touch-action: none;
  z-index: 10;
}
/* ── 可见圆点（JS 创建的 .crop-handle-dot 元素）── */
.crop-handle-dot {
  display: block !important;
  position: absolute !important;
  width: 20px !important;
  height: 20px !important;
  border-radius: 50% !important;
  background: rgba(0, 0, 0, 0.6) !important;
  border: 2px solid #fff !important;
  box-sizing: border-box !important;
  box-shadow: 0 1px 4px rgba(0,0,0,0.5) !important;
  pointer-events: none;
}
/* 四个手柄位置 — 贴着裁剪框内部四角 */
.note-img-crop-handle[data-handle="nw"] { top: 0; left: 0; cursor: nwse-resize; }
.note-img-crop-handle[data-handle="ne"] { top: 0; right: 0; cursor: nesw-resize; }
.note-img-crop-handle[data-handle="sw"] { bottom: 0; left: 0; cursor: nesw-resize; }
.note-img-crop-handle[data-handle="se"] { bottom: 0; right: 0; cursor: nwse-resize; }
/* 按下效果 */
.note-img-crop-handle:active .crop-handle-dot,
.note-img-crop-handle:active::before {
  background: rgba(37, 99, 235, 0.8) !important;
  border-color: #fff !important;
  transform: scale(1.15);
}

/* 三分法辅助线（P2） */
.note-img-crop-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.note-img-crop-grid::before,
.note-img-crop-grid::after {
  content: '';
  position: absolute;
  background: rgba(255,255,255,0.22);
}
.note-img-crop-grid::before {
  width: 1px;
  height: 100%;
  left: 33.33%;
  top: 0;
  box-shadow: 33.34vw 0 0 rgba(255,255,255,0.22),
             -33.34vw 0 0 rgba(255,255,255,0.22);
}
.note-img-crop-grid::after {
  width: 100%;
  height: 1px;
  top: 33.33%;
  left: 0;
  box-shadow: 0 33.34vw 0 rgba(255,255,255,0.22),
              0 -33.34vw 0 rgba(255,255,255,0.22);
}

/* 比例预设栏（P1） */
.note-image-picker-ratio-bar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 16px;
  background: rgba(0,0,0,0.88);
}
.note-image-picker-ratio-btn {
  padding: 7px 15px;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 20px;
  background: transparent;
  color: rgba(255,255,255,0.72);
  font-size: 13px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.note-image-picker-ratio-btn:active { background: rgba(255,255,255,0.08); }
.note-image-picker-ratio-btn.active {
  background: #fff;
  color: #000;
  border-color: #fff;
  font-weight: 600;
}
.note-image-picker-ratio-btn--reset {
  border-style: dashed;
  margin-left: auto;
}

/* 裁剪底栏 */
.note-image-picker-crop-bottom {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: rgba(0,0,0,0.88);
}
.note-image-picker-crop-hint {
  flex: 1;
  font-size: 12.5px;
  color: rgba(255,255,255,0.45);
  text-align: center;
}

/* 删除确认 Toast（P1） */
.note-image-picker-toast-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 90px;
  background: rgba(0,0,0,0.18);
}
.note-image-picker-toast-overlay.is-active { display: flex; }
.note-image-picker-toast {
  background: rgba(40,40,42,0.95);
  color: #fff;
  font-size: 14px;
  padding: 14px 22px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 16px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.note-image-picker-toast-undo {
  background: none;
  border: none;
  color: #60A5FA;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

.text-note-body-count {
  position: absolute;
  right: 0;
  bottom: 0;
  font-size: 12px;
  line-height: 1;
  color: var(--color-text-tertiary);
  pointer-events: none;
}
.text-note-toolbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1100;
  max-width: 480px;
  margin: 0 auto;
  display: flex; align-items: center; gap: 2px;
  padding: 6px 10px calc(6px + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 255, 255, 0.97);
  border-top: 1px solid var(--color-border);
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  box-shadow: 0 -2px 12px rgba(15, 23, 42, 0.06);
  box-sizing: border-box;
}
.text-note-toolbar-btn {
  flex-shrink: 0; min-width: 36px; height: 36px; padding: 0 8px;
  border: none; border-radius: var(--radius-sm, 8px);
  background: transparent; color: var(--color-text-primary);
  font-size: 15px; font-weight: 600; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s, color 0.15s;
}
.text-note-toolbar-btn > span,
.text-note-toolbar-btn > b,
.text-note-toolbar-btn > i {
  pointer-events: none;
}
.text-note-fmt-bold,
.text-note-fmt-heading { font-weight: 700; }
.text-note-toolbar-btn:active { background: var(--color-bg-secondary, #f3f4f6); }
.text-note-toolbar-btn.active {
  background: var(--color-brand-light, #DBEAFE);
  color: var(--color-brand);
}
.text-note-toolbar-btn.active b,
.text-note-toolbar-btn.active i,
.text-note-toolbar-btn.active span {
  color: var(--color-brand);
}
.text-note-toolbar-btn:disabled { opacity: 0.45; pointer-events: none; }
.text-note-toolbar-ai {
  padding: 0 10px; font-size: 13px; font-weight: 500;
  color: var(--color-brand);
}
.text-note-toolbar-ai-icon { font-size: 14px; line-height: 1; }
.text-note-toolbar-sep {
  flex-shrink: 0; width: 1px; height: 20px; margin: 0 4px;
  background: var(--color-border);
}
.text-note-style-wrap { position: relative; flex-shrink: 0; }
.text-note-style-btn {
  min-width: 56px; font-size: 13px; font-weight: 500; padding: 0 6px;
}
.text-note-style-caret { font-size: 10px; color: var(--color-text-tertiary); margin-left: 2px; }
.text-note-style-menu {
  position: absolute; left: 0; bottom: calc(100% + 6px); z-index: 130;
  min-width: 112px; padding: 4px;
  background: var(--color-card); border: 1px solid var(--color-border);
  border-radius: var(--radius-md, 12px);
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.12);
}
.text-note-style-menu[hidden] { display: none; }
.text-note-style-option {
  display: block; width: 100%; padding: 10px 12px;
  border: none; border-radius: var(--radius-sm, 8px);
  background: transparent; text-align: left;
  font-size: 14px; color: var(--color-text-primary); cursor: pointer;
}
.text-note-style-option:active { background: var(--color-bg-secondary, #f3f4f6); }
.text-note-style-option.active { color: var(--color-brand); font-weight: 600; }
.note-markdown-body { font-size: 16px; line-height: 1.85; color: var(--color-text-primary); }
.note-markdown-body p { margin: 0 0 12px; }
.note-markdown-body p:last-child { margin-bottom: 0; }
.note-markdown-body h2, .note-markdown-body h3 {
  margin: 16px 0 8px; font-weight: 700; line-height: 1.4;
}
.note-markdown-body h2 { font-size: 17px; }
.note-markdown-body h3 { font-size: 16px; }
.note-markdown-body h4 { font-size: 16px; font-weight: 650; }
.note-markdown-body h5 { font-size: 16px; font-weight: 600; }
.note-markdown-body ul, .note-markdown-body ol {
  margin: 0 0 12px; padding-left: 1.4em;
}
.note-markdown-body li { margin-bottom: 6px; }
.note-markdown-body blockquote {
  margin: 0 0 12px; padding: 8px 12px;
  border-left: 3px solid var(--color-brand);
  background: var(--color-bg-secondary, #f8fafc);
  color: var(--color-text-secondary);
}
.note-markdown-body strong { font-weight: 700; }
.note-markdown-body em { font-style: italic; }
.note-md-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 0 16px;
  max-width: 100%;
}
.note-md-table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  line-height: 1.65;
}
.note-md-table th,
.note-md-table td {
  border: 1px solid var(--color-border, #e5e7eb);
  padding: 8px 10px;
  vertical-align: top;
  text-align: left;
  word-break: break-word;
  min-width: 72px;
  max-width: none;
}
.note-md-table th {
  background: var(--color-bg-secondary, #f8fafc);
  font-weight: 700;
  white-space: nowrap;
}
.note-md-table td strong { font-weight: 700; }
.note-md-divider {
  border: none; border-top: 1px solid var(--color-border);
  margin: 16px 0;
}
.text-note-detail-title {
  font-size: 18px; font-weight: 700; margin: 0 0 8px; line-height: 1.4;
}
.text-note-detail-meta {
  font-size: 12px; color: var(--color-text-tertiary); margin: 0;
}
.text-note-detail-body {
  font-size: 16px; line-height: 1.85; white-space: pre-wrap;
  color: var(--color-text-primary); margin: 0;
}

/* ===== 文字笔记详情 v3（阅读态对齐 Get 笔记）===== */
/* 详情 v2：页底奶油灰；白卡留给页头/媒体/正文 */
html.note-detail-v3-open,
body.note-detail-v3-open {
  background: var(--bg-page, #f5f3f0) !important;
}
body.note-detail-v3-open #app,
#page-note.note-detail-page--v3,
#page-note.note-detail-page--v3 .note-tab-panel,
#page-note.note-detail-page--v3 .note-append-list,
.note-detail-page--v3 {
  background: var(--bg-page, #f5f3f0) !important;
}
/* 正文滚动容器即白卡壳：顶边圆角固定，内容在内滚，避免上滑被裁成直角 */
#page-note.note-detail-page--v3 > .content.text-note-detail,
#page-note.note-detail-page--v3 > .content.text-note-detail--v3 {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
  background: #fff !important;
  border-radius: 14px 14px 0 0;
  margin: 0 14px;
  padding: 4px 0 0;
  padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -1px 0 rgba(0, 0, 0, 0.02);
}
.note-detail-page--v3 .note-detail-nav-v3,
.note-detail-page--v3 .note-detail-header-v3,
.note-detail-page--v3 .note-process-hint-v3,
.note-detail-page--v3 .note-detail-tabs--v3 {
  flex-shrink: 0;
}
.note-detail-page--v3 .note-detail-nav-v3 {
  background: rgba(245, 243, 240, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: none;
  position: sticky;
  top: 0;
  z-index: 100;
}
.note-detail-page--v3 .note-detail-header-v3 {
  background: var(--bg-card, #fff);
  margin: 0 14px 10px;
  padding: 16px 18px 18px;
  border-radius: 14px;
  box-shadow: none;
}
/* 设计稿顶栏：星标 + 分享；悟空隐藏；更多保留为功能入口 */
.note-detail-page--v3 #btnNoteDetailNavWukong[hidden],
.note-detail-page--v3 #btnNoteDetailNavWukong {
  display: none !important;
}
.note-detail-page--v3 .note-detail-nav-glyph {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: #b0b6bf;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}
.note-detail-page--v3 .note-detail-nav-glyph:active {
  background: rgba(0, 0, 0, 0.04);
}
.note-detail-page--v3 .note-detail-nav-glyph--star.is-on {
  color: #e8a317;
}
.note-detail-page--v3 .note-detail-nav-glyph--share {
  font-size: 18px;
  font-weight: 300;
}
.note-detail-page--v3 .detail-nav-actions .note-detail-nav-glyph {
  width: 36px !important;
  min-width: 36px !important;
  height: 36px !important;
  font-size: 20px !important;
  line-height: 1 !important;
  color: #b0b6bf !important;
}
.note-detail-page--v3 .detail-nav-actions .note-detail-nav-glyph::before {
  display: none !important;
  content: none !important;
}
.note-detail-page--v3 .detail-nav-actions .note-detail-nav-icon {
  color: #b0b6bf !important;
}
.note-detail-page--v3 .note-detail-nav-v3 .nav-back {
  color: #b0b6bf;
  font-weight: 300;
}
.note-detail-page--v3 .note-process-hint-v3 {
  background: linear-gradient(135deg, #eff6ff 0%, #f5f3ff 100%);
}
.note-detail-page--v3 .note-detail-tabs--v3 {
  background: transparent;
}
.note-detail-page--v3 #noteTabGerminate.note-tab-panel--centered,
.note-detail-page--v3 #noteTabAppend.note-tab-panel--centered,
.trx-draft-page #voiceDraftPanelAppend.note-tab-panel--centered,
.trx-draft-page #recordingDraftPanelAppend.note-tab-panel--centered {
  min-height: calc(100dvh - 300px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.note-detail-page--v3 #noteTabAppend:not(.note-tab-panel--centered) .note-append-panel,
.trx-draft-page #voiceDraftPanelAppend:not(.note-tab-panel--centered) .note-append-panel,
.trx-draft-page #recordingDraftPanelAppend:not(.note-tab-panel--centered) .note-append-panel {
  justify-content: flex-start;
}
.note-append-card-wrap {
  position: relative;
  width: 100%;
}
.note-append-card-wrap--ai .note-append-card-main {
  border: 1.5px solid rgba(59, 130, 246, 0.25);
  background: linear-gradient(135deg, #fafcff, #f8faff);
}
.note-append-ai-ribbon {
  position: absolute;
  top: -1px;
  right: 14px;
  z-index: 2;
  background: var(--color-brand, #3b82f6);
  color: #fff;
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 0 0 6px 6px;
  letter-spacing: 0.5px;
  pointer-events: none;
}
.note-append-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-right: 28px;
}
.note-append-card-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}
.note-append-pin {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.note-append-pin--ai {
  background: linear-gradient(135deg, #dbeafe, #bfdbfe);
}
.note-append-pin-glyph {
  font-size: 14px;
  line-height: 1;
  color: #d97706;
}
.note-append-pin--ai .note-append-pin-glyph {
  color: #2563eb;
}
.note-append-type {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-primary);
}
.note-append-status {
  font-size: 11.5px;
  color: var(--color-text-tertiary, #94a3b8);
  background: #f8fafc;
  padding: 3px 9px;
  border-radius: 6px;
  border: 0.5px solid rgba(0, 0, 0, 0.06);
}
.note-append-status--library {
  color: #047857;
  background: #ecfdf5;
  border-color: rgba(16, 185, 129, 0.15);
}
.note-append-status--draft {
  color: #6b7280;
  background: #f3f4f6;
}
.note-append-card-badges,
.note-append-card-preview {
  display: none !important;
}
.note-detail-page--ai-child .note-detail-tags {
  display: flex !important;
}
.note-detail-page--ai-scene .note-detail-tabs--v3 {
  background: #fff;
}
.note-detail-page--ai-scene #noteTabSceneBtn.active {
  color: var(--color-primary, #2563eb);
  font-weight: 600;
}
.note-ai-child-subtitle {
  margin: 0 0 12px;
  padding: 8px 12px;
  border-radius: 8px;
  background: #f8fafc;
  font-size: 13px;
  line-height: 1.45;
  color: var(--color-text-secondary, #6b7280);
}
.note-append-card-more {
  position: absolute;
  top: 14px;
  right: 10px;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--color-text-tertiary);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.note-append-card-more:active {
  background: var(--color-border-light, #f3f4f6);
}
.note-detail-nav-v3 {
  display: flex;
  align-items: center;
  padding: 4px 14px;
  min-height: 48px;
  background: rgba(245, 243, 240, 0.92);
  border-bottom: none;
}
.note-detail-nav-v3 .nav-back {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 24px;
  line-height: 1;
}
.note-detail-nav-actions {
  display: flex;
  align-items: center;
  gap: 2px;
}
.note-detail-nav-icon {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: transparent;
  font-size: 18px;
  line-height: 1;
  color: var(--color-text-primary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
}
.note-detail-nav-icon:active {
  background: var(--color-border-light, #f3f4f6);
}
.note-detail-header-v3 {
  padding: 16px 18px 18px;
  background: var(--bg-card, #fff);
}
.note-detail-page--v3 .text-note-detail-title {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.45;
  margin: 0 0 8px;
  color: #1a1a1a;
  letter-spacing: 0.01em;
}
.note-reading-retry-btn {
  margin-top: 16px;
  min-width: 140px;
}
.note-detail-page--v3 .text-note-detail-meta {
  font-size: 12px;
  margin: 0;
  color: #9ca3af;
  letter-spacing: 0.01em;
}
.note-detail-page--v3 .note-detail-tags {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 5px;
  min-width: 0;
  overflow: hidden;
  margin: 0 0 8px;
}
.note-detail-page--v3 .note-detail-tags .note-tag-chip:not(.note-tag-more):not(.note-tag-plus):not(.note-tag-collapse) {
  padding: 1px 6px;
  height: 20px;
  box-sizing: border-box;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 400;
  line-height: 18px;
  background: rgba(74, 158, 142, 0.12);
  color: #3d8a7a;
  border: none;
}
/* 设计稿双色标签：青绿 / 暖橙交替 */
.note-detail-page--v3 .note-detail-tags .note-tag-chip--link:nth-of-type(even),
.note-detail-page--v3 .note-detail-tags .note-tag-chip--link.note-tag-chip--tone-warm {
  background: rgba(217, 145, 86, 0.14);
  color: #c47a3a;
}
.note-detail-page--v3 .note-detail-tags .note-tag-chip--tone-teal {
  background: rgba(74, 158, 142, 0.12);
  color: #3d8a7a;
}
.note-detail-page--v3 .note-detail-tags .note-tag-chip--kb {
  background: rgba(74, 158, 142, 0.12);
  color: #3d8a7a;
}
.note-detail-page--v3 .note-detail-tags .note-tag-plus {
  width: 20px;
  height: 20px;
  min-width: 20px;
  border-radius: 4px;
  font-size: 13px;
  line-height: 1;
  color: #9ca3af;
  background: #f3f4f6;
  border: none;
}
.note-detail-page--v3 .note-detail-tags .note-tag-more,
.note-detail-page--v3 .note-detail-tags .note-tag-collapse {
  padding: 1px 6px;
  height: 20px;
  box-sizing: border-box;
  font-size: 10px;
  line-height: 18px;
}
.note-detail-page--v3 .note-detail-tags--expanded {
  flex-wrap: wrap;
  overflow: visible;
}
.note-detail-page--v3 .note-detail-tags--expanded .note-tag-chip,
.note-detail-page--v3 .note-detail-tags--expanded .note-tag-chip--kb {
  flex: 0 0 auto;
  max-width: none;
}
.note-detail-page--v3 .note-detail-tags .note-tag-chip:not(.note-tag-more) {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.note-detail-page--v3 .note-detail-tags .note-tag-more,
.note-detail-page--v3 .note-detail-tags .note-tag-plus,
.note-detail-page--v3 .note-detail-tags .note-tag-collapse {
  flex-shrink: 0;
}
.note-process-hint-v3 {
  margin: 0 16px 12px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #eff6ff 0%, #f5f3ff 100%);
  border: 1.5px solid var(--color-brand);
  border-radius: var(--radius-md);
}
.note-process-hint-v3-title {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 700;
  color: var(--color-brand-dark, #1d4ed8);
}
.note-process-hint-v3-desc {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--color-brand-dark, #1d4ed8);
}
.note-process-hint-v3-arrow {
  display: inline-block;
  animation: note-process-hint-bounce 1.2s infinite;
}
@keyframes note-process-hint-bounce {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(4px); }
}
.note-detail-tabs--v3 {
  padding: 0 6px;
  margin: 0 14px 0;
  background: transparent;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.note-detail-tabs--v3::-webkit-scrollbar { display: none; }
/* v2 Tab：下划线风；青绿激活；AI加工暖橙 */
.page-tab-bar.note-detail-tabs--v3 .page-tab-item {
  flex: 1;
  min-width: 0;
  max-width: none;
  height: auto;
  margin-right: 0;
  padding: 8px 8px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: #9ca3af;
  border-bottom: 2px solid transparent;
}
.page-tab-bar.note-detail-tabs--v3 .page-tab-item.active {
  font-weight: 600;
  color: var(--c-accent, #4A9E8E);
  border-bottom-color: var(--c-accent, #4A9E8E);
}
.page-tab-bar.note-detail-tabs--v3 .page-tab-item[data-note-tab="ai"] {
  color: var(--c-goal, #E8813B);
}
.page-tab-bar.note-detail-tabs--v3 .page-tab-item[data-note-tab="ai"].active {
  color: var(--c-goal, #E8813B);
  border-bottom-color: var(--c-goal, #E8813B);
}
.page-tab-bar.note-detail-tabs--v3 .page-tab-item .note-tab-count {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  margin-left: 2px;
  vertical-align: baseline;
  font-size: 10px;
  font-weight: 600;
}
.note-detail-tabs--v3 .page-tab-item.active::after {
  display: none;
}
/* 正文区：去掉「灰底上再套一张长白卡」；结构化阅读合并为一张长白卡 */
#page-note.note-detail-page--v3 .text-note-detail--v3 .note-tab-panel > .text-note-detail-body,
#page-note.note-detail-page--v3 .note-tab-panel > .note-body-flow {
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  margin: 0;
}
#page-note.note-detail-page--v3 .text-note-detail-body .note-reader-card-body,
#page-note.note-detail-page--v3 .note-body-flow .note-reader-card-body {
  padding: 0;
}
/* Tab 面板与页面同色，禁止 #f8fafc 全宽色带 + 负 margin 错位 */
#page-note.note-detail-page--v3 #noteTabReading,
#page-note.note-detail-page--v3 #noteTabOriginal,
#page-note.note-detail-page--v3 #noteTabKnowledgeGraph {
  background: transparent !important;
  margin: 0 !important;
  padding: 4px 0 8px !important;
}
/* 智能总结：白卡壳已在 .content，内层去圆角/阴影，避免双层 */
#page-note.note-detail-page--v3 .note-body-flow .note-reading-cards {
  gap: 0;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  padding: 18px 18px 26px;
  margin: 0;
}
#page-note.note-detail-page--v3 .note-body-flow .note-reader-card,
#page-note.note-detail-page--v3 .note-body-flow .note-reading-background-card,
#page-note.note-detail-page--v3 .note-body-flow .note-reading-default-block,
#page-note.note-detail-page--v3 .note-body-flow .note-reading-point-card,
#page-note.note-detail-page--v3 .note-body-flow .note-reading-points-group,
#page-note.note-detail-page--v3 .note-body-flow .note-training-action-list {
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
}
#page-note.note-detail-page--v3 .note-body-flow .note-training-action-item {
  background: transparent;
  padding: 0;
  border-radius: 0;
}
#page-note.note-detail-page--v3 .note-body-flow .note-reading-section-icon {
  display: none !important;
}
#page-note.note-detail-page--v3 .note-body-flow .note-reading-section-header {
  gap: 0;
  margin-bottom: 12px;
  padding-left: 0;
  align-items: flex-start;
}
#page-note.note-detail-page--v3 .note-body-flow .note-reading-section + .note-reading-section,
#page-note.note-detail-page--v3 .note-body-flow .note-reading-intro + .note-reading-section {
  margin-top: 28px;
}
#page-note.note-detail-page--v3 .note-body-flow .note-reading-section-title {
  font-size: 16px !important;
  font-weight: 600 !important;
  line-height: 1.45 !important;
  color: #2b2520 !important;
}
#page-note.note-detail-page--v3 .note-body-flow .note-reading-background-card,
#page-note.note-detail-page--v3 .note-body-flow .note-reading-default-block,
#page-note.note-detail-page--v3 .note-body-flow .note-reading-point-body,
#page-note.note-detail-page--v3 .note-body-flow .note-reading-intro {
  font-size: 16px;
  line-height: 1.85;
  color: #2b2520;
}
#page-note.note-detail-page--v3 .note-body-flow .note-reading-background-card p,
#page-note.note-detail-page--v3 .note-body-flow .note-reading-default-block p,
#page-note.note-detail-page--v3 .note-body-flow .note-reading-point-body p,
#page-note.note-detail-page--v3 .note-body-flow .note-reading-intro p,
#page-note.note-detail-page--v3 .note-body-flow .note-detail-prose--structured p {
  margin: 0 0 16px;
  font-size: 16px;
  line-height: 1.85;
  color: #2b2520;
}
#page-note.note-detail-page--v3 .note-body-flow .note-reading-background-card p:last-child,
#page-note.note-detail-page--v3 .note-body-flow .note-reading-default-block p:last-child,
#page-note.note-detail-page--v3 .note-body-flow .note-reading-point-body p:last-child,
#page-note.note-detail-page--v3 .note-body-flow .note-reading-intro p:last-child,
#page-note.note-detail-page--v3 .note-body-flow .note-detail-prose--structured p:last-child {
  margin-bottom: 0;
}
#page-note.note-detail-page--v3 .note-body-flow .note-detail-prose--structured p strong,
#page-note.note-detail-page--v3 .note-body-flow .note-detail-prose--structured p b,
#page-note.note-detail-page--v3 .note-body-flow .note-detail-prose--structured li strong,
#page-note.note-detail-page--v3 .note-body-flow .note-detail-prose--structured li b,
#page-note.note-detail-page--v3 .note-body-flow .note-reading-background-card strong,
#page-note.note-detail-page--v3 .note-body-flow .note-reading-default-block strong,
#page-note.note-detail-page--v3 .note-body-flow .note-reading-point-body strong {
  font-weight: 700 !important;
  color: #5c3d17 !important;
}
#page-note.note-detail-page--v3 .note-body-flow .note-reading-default-block .note-md-table-wrap,
#page-note.note-detail-page--v3 .note-body-flow .note-reading-background-card .note-md-table-wrap {
  margin: 0 0 16px;
  padding: 0;
}
#page-note.note-detail-page--v3 .note-body-flow .note-reader-card + .note-reader-card,
#page-note.note-detail-page--v3 .note-body-flow .note-reading-cards > *:last-child {
  margin-bottom: 0 !important;
}
/* 非结构化纯文：白卡壳已在 .content，内层透明 */
#page-note.note-detail-page--v3 .note-body-flow > .note-detail-prose--readable,
#page-note.note-detail-page--v3 .note-body-flow > .note-detail-prose--original,
#page-note.note-detail-page--v3 .note-body-flow > .note-detail-prose--raw,
#page-note.note-detail-page--v3 .note-body-flow > .note-detail-prose:not(.note-detail-prose--structured) {
  background: transparent;
  border-radius: 0;
  padding: 18px;
  margin: 0;
}
#page-note.note-detail-page--v3 .text-note-detail--v3 .note-tab-panel > .text-note-detail-body p,
#page-note.note-detail-page--v3 .note-tab-panel > .note-body-flow p {
  font-size: 16px;
  line-height: 1.85;
  color: var(--text-p, var(--color-text-primary));
}
/* 保留右上角 ⋮ / 悟空 / 底栏写感悟 — 仅视觉，不改结构 */
/* 转写详情（录音/视频）· Tab 栏与文字笔记详情统一 */
.trx-draft-page .page-tab-bar.note-detail-tabs--v3 {
  top: 0;
  z-index: 10;
  flex-shrink: 0;
}
#page-recording-draft.trx-draft-page--scenes .note-detail-tabs--v3 .page-tab-item.active,
#page-voice-draft.trx-draft-page--scenes .note-detail-tabs--v3 .page-tab-item.active {
  color: var(--ai-scene-brand, #3B82F6);
}
.note-detail-page--v3 #noteTabAppend {
  background: transparent;
  margin: 0;
  padding: 4px 0 24px;
  min-height: calc(100dvh - 280px);
}
.note-detail-page--child .note-detail-header-v3 {
  padding-bottom: 12px;
}
.note-detail-page--child:not(.note-detail-page--ai-scene) .note-detail-tabs--v3 .page-tab-item[data-note-tab="append"] {
  display: none !important;
}
.note-detail-page--ai-scene .note-detail-tabs--v3 .page-tab-item:not([data-note-tab="scene"]):not([data-note-tab="append"]) {
  display: none !important;
}
.note-detail-page--ai-scene .note-detail-tabs--v3 .page-tab-item[data-note-tab="scene"],
.note-detail-page--ai-scene .note-detail-tabs--v3 .page-tab-item[data-note-tab="append"] {
  display: flex !important;
}
.note-detail-page--v3 .text-note-detail--v3 {
  /* 白卡壳样式见上方 #page-note > .content 规则；此处只保布局 */
  display: flex;
  flex-direction: column;
  gap: 0;
}
.note-detail-page--v3 .note-tab-panel {
  background: transparent;
}
.note-detail-toast-strip {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: calc(68px + env(safe-area-inset-bottom));
  z-index: 130;
  max-width: 448px;
  margin: 0 auto;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: rgba(31, 41, 55, 0.92);
  color: #fff;
  font-size: 13px;
  line-height: 1.45;
  text-align: center;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.18);
  transform: translateY(12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}
.note-detail-toast-strip.is-visible {
  transform: translateY(0);
  opacity: 1;
}
.note-ai-pills-wrap .text-note-ai-pills {
  margin-bottom: 8px;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.note-ai-pills-wrap .text-note-ai-pills::-webkit-scrollbar {
  display: none;
}
.note-ai-pills-wrap .text-note-ai-pill {
  flex-shrink: 0;
  padding: 8px 12px;
  font-size: 13px;
}
.note-ai-pills-wrap .note-ai-tab-hint {
  margin: 0;
  font-size: 12px;
  color: var(--color-text-tertiary);
  line-height: 1.5;
}
.note-ai-result-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}
.note-ai-pills-wrap.is-hidden,
.note-ai-result--hidden {
  display: none !important;
}
.note-detail-page--v3 .text-note-detail-body.note-body-flow {
  font-size: 16px;
  line-height: 26px;
  color: var(--color-text-primary);
  white-space: normal;
}
.note-detail-page--v3 .note-detail-prose,
.note-detail-page--v3 .note-detail-prose--html,
.trx-detail-page .note-detail-prose,
.trx-detail-page .note-detail-prose--html,
.trx-detail-page .note-detail-prose--structured {
  font-family: inherit;
  font-size: 16px;
  line-height: 1.85;
  color: var(--color-text-primary);
}
.note-detail-page--v3 .note-detail-prose *,
.note-detail-page--v3 .note-detail-prose--html *,
.trx-detail-page .note-detail-prose *,
.trx-detail-page .note-detail-prose--html *,
.trx-detail-page .note-detail-prose--structured * {
  font-family: inherit !important;
  font-size: inherit;
  color: inherit;
}
.note-detail-page--v3 .note-detail-prose p,
.note-detail-page--v3 .note-detail-prose .note-detail-prose-p,
.note-detail-page--v3 .note-detail-prose--html p,
.note-detail-page--v3 .note-detail-prose li,
.note-detail-page--v3 .note-detail-prose--structured p,
.note-detail-page--v3 .note-detail-prose--structured li,
.note-detail-page--v3 .note-detail-prose--structured .note-reading-default-block,
.note-detail-page--v3 .note-detail-prose--structured .note-reading-background-card,
.note-detail-page--v3 .note-detail-prose--structured .note-reading-point-body,
.note-detail-page--v3 .note-detail-prose--structured .note-reading-intro,
.note-detail-page--v3 .note-detail-prose--structured .note-reading-point-body p,
.note-detail-page--v3 .note-detail-prose--structured .note-reading-default-block p,
.note-detail-page--v3 .note-detail-prose--structured .note-reading-background-card p,
.note-detail-page--v3 .note-detail-prose--readable .note-detail-prose-p,
.trx-detail-page .note-detail-prose p,
.trx-detail-page .note-detail-prose .note-detail-prose-p,
.trx-detail-page .note-detail-prose--html p,
.trx-detail-page .note-detail-prose li {
  line-height: 26px;
}
.note-detail-page--v3 .note-detail-prose p,
.note-detail-page--v3 .note-detail-prose .note-detail-prose-p,
.note-detail-page--v3 .note-detail-prose--html p,
.trx-detail-page .note-detail-prose p,
.trx-detail-page .note-detail-prose .note-detail-prose-p,
.trx-detail-page .note-detail-prose--html p {
  margin: 0 0 18px;
}
.note-detail-page--v3 .note-detail-prose > :last-child,
.note-detail-page--v3 .note-detail-prose p:last-child,
.note-detail-page--v3 .note-detail-prose .note-detail-prose-p:last-child,
.note-detail-page--v3 .note-detail-prose--html p:last-child,
.trx-detail-page .note-detail-prose > :last-child,
.trx-detail-page .note-detail-prose p:last-child,
.trx-detail-page .note-detail-prose .note-detail-prose-p:last-child,
.trx-detail-page .note-detail-prose--html p:last-child {
  margin-bottom: 0;
}
.note-detail-page--v3 .note-detail-prose h2,
.note-detail-page--v3 .note-detail-prose--html h2 {
  font-size: 17px !important;
  font-weight: 700;
  line-height: 1.4;
  margin: 24px 0 10px;
  color: var(--color-text-primary);
}
.note-detail-page--v3 .note-detail-prose h3,
.note-detail-page--v3 .note-detail-prose--html h3 {
  font-size: 16px !important;
  font-weight: 700;
  line-height: 1.4;
  margin: 16px 0 8px;
  color: var(--color-text-primary);
}
.note-detail-page--v3 .note-detail-prose ul,
.note-detail-page--v3 .note-detail-prose ol,
.note-detail-page--v3 .note-detail-prose--html ul,
.note-detail-page--v3 .note-detail-prose--html ol {
  margin: 0 0 18px;
  padding-left: 1.4em;
}
.note-detail-page--v3 .note-detail-prose li,
.note-detail-page--v3 .note-detail-prose--html li {
  margin-bottom: 8px;
}
.note-detail-page--v3 .note-detail-prose strong,
.note-detail-page--v3 .note-detail-prose--html strong,
.note-detail-page--v3 .note-detail-prose b,
.note-detail-page--v3 .note-detail-prose--html b {
  font-weight: 700;
}
/* 原文润色：仅 h2/h3 小节标题加粗，列表与正文不加粗（覆盖上层 strong 规则） */
.note-detail-page--v3 .note-detail-prose--structured li,
.note-detail-page--v3 .note-detail-prose--structured li strong,
.note-detail-page--v3 .note-detail-prose--structured li b,
.note-detail-page--v3 .note-detail-prose--structured p,
.note-detail-page--v3 .note-detail-prose--structured p strong,
.note-detail-page--v3 .note-detail-prose--structured blockquote,
.note-detail-page--v3 .note-detail-prose--structured blockquote strong {
  font-weight: 400;
}
.note-detail-page--v3 .note-detail-prose--structured .note-markdown-body li,
.note-detail-page--v3 .note-detail-prose--structured .note-markdown-body li strong,
.note-detail-page--v3 .note-detail-prose--structured .note-markdown-body li b,
.note-detail-page--v3 .note-detail-prose--structured .note-markdown-body p,
.note-detail-page--v3 .note-detail-prose--structured .note-markdown-body p strong {
  font-weight: 400 !important;
}
.note-detail-page--v3 .note-detail-prose--structured .note-markdown-body h2,
.note-detail-page--v3 .note-detail-prose--structured .note-markdown-body h3,
.note-detail-page--v3 .note-detail-prose--structured .note-markdown-body h2 *,
.note-detail-page--v3 .note-detail-prose--structured .note-markdown-body h3 * {
  font-weight: 700 !important;
}
.note-detail-page--v3 .note-detail-prose .note-md-table-wrap {
  margin: 0 0 18px;
}
.note-detail-page--v3 .note-detail-prose .note-md-table,
.note-detail-page--v3 .note-detail-prose .note-md-table th,
.note-detail-page--v3 .note-detail-prose .note-md-table td {
  font-size: inherit !important;
  line-height: 1.55;
}
.note-detail-page--v3 .note-detail-prose blockquote {
  margin: 14px 0 18px;
  padding: 12px 14px;
  border-left: 3px solid #4A9E8E;
  background: rgba(74, 158, 142, 0.08);
  border-radius: 0 8px 8px 0;
  color: #3d8a7a;
  font-style: italic;
  line-height: 1.75;
}
.note-detail-page--v3 .note-detail-prose blockquote strong,
.note-detail-page--v3 .note-detail-prose blockquote b {
  font-style: normal;
  font-weight: 600;
  color: #3d8a7a;
}
.note-detail-page--v3 .note-detail-prose--raw {
  white-space: pre-wrap;
  word-break: break-word;
}
.note-detail-page--v3 .note-detail-prose--raw .note-detail-raw-text {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: inherit;
  font-size: inherit;
  line-height: 1.85;
  font-weight: inherit;
  color: inherit;
}
.note-detail-page--v3 .note-detail-inbox-link {
  color: #2563EB;
  text-decoration: none;
  word-break: break-all;
}
.note-detail-page--v3 .note-detail-inbox-link:active {
  opacity: 0.75;
}
.note-detail-page--v3 .note-detail-prose--raw.note-detail-prose--html {
  white-space: normal;
}
.note-detail-page--v3 .note-detail-prose--raw.note-detail-prose--html p,
.note-detail-page--v3 .note-detail-prose--raw.note-detail-prose--html div,
.note-detail-page--v3 .note-detail-prose--raw.note-detail-prose--html li {
  margin: 0 0 18px;
  line-height: 1.85;
}
.note-detail-page--v3 .note-detail-prose--raw.note-detail-prose--html p:last-child,
.note-detail-page--v3 .note-detail-prose--raw.note-detail-prose--html div:last-child,
.note-detail-page--v3 .note-detail-prose--raw.note-detail-prose--html li:last-child {
  margin-bottom: 0;
}
.note-detail-page--v3 .note-detail-prose--readable .note-detail-prose-p {
  margin: 0 0 18px;
  text-align: justify;
  font-weight: 400;
}
.note-detail-page--v3 .note-detail-prose--readable .note-detail-prose-section {
  font-weight: 700;
  margin-top: 22px;
  margin-bottom: 10px;
  text-align: left;
}
.note-detail-page--v3 .note-detail-prose--readable .note-detail-prose-section:first-child {
  margin-top: 0;
}
.note-detail-page--v3 .note-detail-prose--structured > p:first-child,
.note-detail-page--v3 .note-detail-prose--structured > p.note-detail-prose-p:first-child {
  margin-bottom: 16px;
  color: var(--color-text-secondary);
}
.note-detail-page--v3 .note-detail-prose--structured ol {
  margin: 20px 0 12px;
  padding-left: 1.35em;
}
.note-detail-page--v3 .note-detail-prose--structured ol > li {
  font-weight: 400;
  margin-bottom: 12px;
  line-height: 1.85;
}
.note-detail-page--v3 .note-detail-prose--structured ul {
  margin: 8px 0 16px;
  padding-left: 1.2em;
}
.note-detail-page--v3 .note-detail-prose--structured ol > li ul,
.note-detail-page--v3 .note-detail-prose--structured > ul {
  margin-top: 8px;
}
.note-detail-page--v3 .note-detail-prose--structured ul > li {
  font-weight: 400;
  margin-bottom: 10px;
  line-height: 1.85;
}
.note-detail-page--v3 .note-detail-prose .consumer-story,
.note-detail-page--v3 .note-detail-prose .note-markdown-body {
  padding: 0;
  margin: 0;
  font-size: inherit;
  line-height: inherit;
  color: inherit;
}
.note-detail-page--v3 .note-header-card,
.note-detail-page--v3 .note-body-card {
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  margin-bottom: 0;
}
.note-tab-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  color: var(--color-text-tertiary);
}
.note-tab-empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.5;
  line-height: 1;
}
.note-tab-empty-title {
  margin: 0;
  font-size: 14px;
  color: var(--color-text-secondary);
}
.note-tab-empty-desc {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.6;
  color: var(--color-text-tertiary);
}
.note-tab-empty-action {
  margin-top: 16px;
  padding: 10px 22px;
  border: none;
  border-radius: 999px;
  background: var(--color-primary, #2563eb);
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.note-tab-empty-action:active {
  opacity: 0.88;
}
.note-link-reading-actions,
#page-note.note-detail-page--v3 #noteReadingActions,
#page-note.note-detail-page--v3 .note-link-reading-actions {
  display: none !important;
}
.note-link-reading-actions {
  justify-content: flex-end;
  padding: 0 0 10px;
}
.note-link-reading-actions .text-note-ai-copy {
  font-size: 12px;
}
.note-link-scenes-panel {
  padding-bottom: 24px;
}
.note-link-scenes-hint {
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.65;
  color: var(--color-text-secondary);
}
.note-link-scenes-hint strong {
  color: var(--color-text-primary);
  font-weight: 600;
}
.note-link-scenes-results {
  margin-bottom: 14px;
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.note-link-scenes-results-head {
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-tertiary);
  background: var(--color-border-light);
}
.note-link-scene-result-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-top: 1px solid var(--color-border-light);
  background: #fff;
  text-align: left;
  font-family: inherit;
}
.note-link-scene-result-label {
  flex-shrink: 0;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--color-brand-light);
  color: var(--color-brand-dark);
}
.note-link-scene-result-title {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  color: var(--color-text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.note-link-scene-result-arrow {
  color: var(--color-text-tertiary);
}
.note-link-scenes-loading {
  display: none !important;
}
.note-ai-extract-loading {
  padding: 28px 16px 20px;
  text-align: center;
}
.note-ai-extract-loading-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 320px;
  margin: 0 auto;
}
.note-ai-extract-mascot {
  width: 120px;
  height: 120px;
  margin: 0 auto 16px;
}
.note-ai-extract-mascot svg,
.note-ai-extract-mascot img {
  width: 120px;
  height: 120px;
  display: block;
  margin: 0 auto;
}
.note-ai-extract-mascot img {
  object-fit: contain;
  object-position: center bottom;
  mix-blend-mode: normal;
}
.note-ai-extract-loading-title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--color-text-primary, #111827);
  line-height: 1.4;
}
.note-ai-extract-loading-desc {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--color-text-secondary, #6B7280);
}
.note-ai-extract-skeleton {
  margin-top: 28px;
  width: 100%;
}
#page-note.note-detail-page--ai-active {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
#page-note.note-detail-page--ai-active .note-detail-header-v3,
#page-note.note-detail-page--ai-active .note-detail-tabs--v3,
#page-note.note-detail-page--ai-active .note-detail-nav-v3,
#page-note.note-detail-page--ai-active .note-process-hint-v3 {
  flex-shrink: 0;
}
#page-note.note-detail-page--ai-active .text-note-detail-scroll,
#page-note.note-detail-page--ai-active .content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(88px + env(safe-area-inset-bottom));
  overflow-x: hidden;
}
#page-note.note-detail-page--ai-active .ai-scene-host,
#page-note.note-detail-page--ai-active .ai-scene-grid {
  overflow: visible;
}
.note-ai-bottom-bar.trx-draft-bottom-bar--hidden { display: none; }
#page-note.note-detail-page--link #noteTabOriginalBtn,
#page-note.note-detail-page--link #noteTabAiBtn {
  display: inline-flex !important;
}
#page-note.note-detail-page--link #noteTabScenesBtn,
#page-note.note-detail-page--link #noteTabGerminateBtn {
  display: none !important;
}
#noteTabGerminateBtn {
  display: none !important;
}
.note-detail-page--link .text-note-detail-meta {
  color: var(--color-text-tertiary, #9ca3af);
  font-size: 12px;
}
.note-detail-page--link .text-note-detail-source,
.note-detail-page--link .note-link-reading-actions {
  display: none !important;
}
.note-detail-page--link .note-detail-header-v3 {
  padding-bottom: 4px;
}
.note-detail-page--link .text-note-detail--v3 {
  padding-top: 8px;
}
.note-ai-pills-wrap {
  margin-bottom: 12px;
}
.note-ai-pills-wrap.note-ai-pills-wrap--highlight {
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--color-brand);
  background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 100%);
}
.note-germinate-result {
  margin-top: 0;
}
.note-detail-bottom-bar-v3 {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  right: auto;
  bottom: 0;
  z-index: 1001;
  width: calc(100% - 32px);
  max-width: 420px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px calc(12px + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--color-border-light, #f3f4f6);
  border-radius: 999px;
  box-sizing: border-box;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.08);
  margin-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
}
.note-detail-bottom-bar-v3::after {
  display: none;
}
.note-detail-bottom-bar-v3.is-hidden {
  display: none;
}
#page-note.note-detail-page--share-visitor .note-detail-bottom-bar-v3,
#page-note.note-detail-page--share-visitor #btnNoteDetailNavWukong,
#page-note.note-detail-page--share-visitor #btnNoteDetailMore,
#page-note.note-detail-page--share-visitor #btnNoteDetailStar,
#page-note.note-detail-page--share-visitor #btnNoteDetailShare {
  display: none !important;
}
#page-note.note-detail-page--share-visitor .note-detail-tabs--v3 .page-tab-item[data-note-tab="append"],
#page-note.note-detail-page--share-visitor .note-detail-tabs--v3 .page-tab-item[data-note-tab="ai"],
#page-note.note-detail-page--share-visitor .note-detail-tabs--v3 .page-tab-item[data-note-tab="scene"] {
  display: none !important;
}
/* 原文改写 · 访客干净文章页：无顶栏 Tab */
#page-note.note-detail-page--article-share .note-detail-tabs--v3 {
  display: none !important;
}
#page-note.note-detail-page--article-share .note-detail-parent-crumb,
#page-note.note-detail-page--article-share #noteDetailBottomBar {
  display: none !important;
}
.note-detail-bottom-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 64px;
  padding: 8px 16px;
  border: none;
  border-radius: var(--radius-sm, 8px);
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.note-detail-bottom-action:active {
  background: var(--color-border-light, #f3f4f6);
}
.note-detail-bottom-icon {
  font-size: 20px;
  line-height: 1;
  margin-bottom: 2px;
}
.note-detail-bottom-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--color-text-secondary);
}
.note-detail-bottom-action--parent {
  display: none;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.note-tab-count {
  display: inline-block;
  margin-left: 4px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--color-brand-light, #DBEAFE);
  color: var(--color-brand-dark, #1D4ED8);
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  vertical-align: 1px;
}
.note-detail-parent-crumb {
  margin-bottom: 10px;
}
.note-detail-parent-crumb-btn {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 6px 12px;
  border: none;
  border-radius: 999px;
  background: var(--color-brand-light, #DBEAFE);
  color: var(--color-brand-dark, #1D4ED8);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.note-detail-parent-crumb-btn:active {
  opacity: 0.85;
}
.note-append-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.note-append-panel {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
}
.note-append-card-main {
  display: block;
  width: 100%;
  padding: 18px;
  border: 0.5px solid transparent;
  border-radius: 14px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 4px 12px -4px rgba(0, 0, 0, 0.06);
  -webkit-tap-highlight-color: transparent;
  font-family: inherit;
}
.note-append-card-main:active {
  opacity: 0.96;
}
.note-append-card-title {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 650;
  color: var(--color-text-primary);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.note-append-row-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.note-append-row {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 14.5px;
  color: #4b5563;
  line-height: 1.65;
}
.note-append-row-text {
  flex: 1;
  min-width: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.note-append-row-text strong {
  color: var(--color-text-primary);
  font-weight: 600;
}
.note-append-row-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 2px;
  border-radius: 5px;
  background: #fef2f2 center/12px no-repeat;
}
.note-append-row-icon--arrow {
  background-color: #fef2f2;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23EF4444' stroke-width='2'%3E%3Cpath d='M5 12h14M12 5l7 7-7 7'/%3E%3C/svg%3E");
}
.note-append-row-icon--clipboard {
  background-color: #fffbeb;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23F59E0B' stroke-width='2'%3E%3Cpath d='M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2'/%3E%3C/svg%3E");
}
.note-append-card-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-top: 14px;
  padding-top: 10px;
  border-top: 0.5px solid rgba(0, 0, 0, 0.04);
}
.note-append-card-foot-time {
  font-size: 11.5px;
  color: var(--color-text-tertiary, #94a3b8);
}
.note-append-add-btn {
  width: 100%;
  padding: 16px;
  margin-top: 4px;
  border-radius: 14px;
  border: 1.5px dashed rgba(59, 130, 246, 0.3);
  background: rgba(59, 130, 246, 0.02);
  color: var(--color-brand, #3b82f6);
  font-size: 14.5px;
  font-weight: 550;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.note-append-add-btn:active {
  background: rgba(59, 130, 246, 0.06);
  border-color: var(--color-brand, #3b82f6);
}
.note-append-add-btn-icon {
  font-size: 18px;
  line-height: 1;
  font-weight: 400;
}
.note-append-card-meta,
.note-append-card-preview-icon,
.note-append-card-preview-text {
  display: none;
}
.note-append-sheet-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
  background: rgba(0, 0, 0, 0.35);
}
.note-append-sheet-overlay.is-open {
  display: flex;
  pointer-events: auto;
}
.note-append-sheet {
  width: 100%;
  max-width: 480px;
  max-height: 85vh;
  overflow: auto;
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 0 0 calc(12px + env(safe-area-inset-bottom));
  animation: note-append-sheet-up 0.25s ease;
}
@keyframes note-append-sheet-up {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
.note-append-sheet-handle {
  width: 36px;
  height: 4px;
  margin: 8px auto 4px;
  border-radius: 999px;
  background: var(--color-border);
}
.note-append-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px 12px;
}
.note-append-sheet-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text-primary);
}
.note-append-sheet-close {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: var(--color-border-light, #f3f4f6);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.note-append-sheet-body {
  padding: 0 8px;
}
.note-append-sheet-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 10px;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
  border-radius: var(--radius-md);
  -webkit-tap-highlight-color: transparent;
}
.note-append-sheet-item:active:not(.is-disabled) {
  background: var(--color-border-light, #f3f4f6);
}
.note-append-sheet-item.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.note-append-sheet-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}
.note-append-sheet-icon--amber { background: #FEF3C7; }
.note-append-sheet-icon--purple { background: #EDE9FE; }
.note-append-sheet-icon--blue { background: #DBEAFE; }
.note-append-sheet-icon--pink { background: #FCE7F3; }
.note-append-sheet-icon--green { background: #D1FAE5; }
.note-append-sheet-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.note-append-sheet-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-primary);
}
.note-append-sheet-desc {
  font-size: 11px;
  color: var(--color-text-tertiary);
  line-height: 1.4;
}
.note-append-sheet-arrow {
  color: var(--color-text-tertiary);
  font-size: 18px;
}
.note-append-sheet-foot {
  margin: 8px 16px 0;
  font-size: 11px;
  color: var(--color-text-tertiary);
  text-align: center;
  line-height: 1.5;
}

.note-detail-page .text-note-detail {
  padding: 16px;
  padding-bottom: calc(88px + env(safe-area-inset-bottom));
}
.note-detail-page .note-detail-tabs {
  position: sticky;
  top: var(--nav-height, 49px);
  z-index: 90;
}
.note-header-card,
.note-body-card,
.note-ai-pills-card {
  padding: 16px;
  background: var(--color-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  margin-bottom: 12px;
}
.note-body-card .consumer-story { white-space: pre-wrap; }
.note-import-kb-btn {
  width: 100%;
  margin-bottom: 12px;
}
.note-ai-pills-card .text-note-ai-label {
  margin: 0 0 10px;
}
.note-ai-pills-card .text-note-ai-pills {
  margin-bottom: 0;
}
.note-ai-pills-card.note-ai-pills-card--highlight {
  border-color: var(--color-brand);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.note-image-actions {
  margin-bottom: 12px;
  padding: 12px 14px;
  background: var(--color-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}
.note-image-actions-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.note-image-actions-mascot {
  font-size: 22px;
  line-height: 1;
  flex-shrink: 0;
}
.note-quick-action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  background: var(--color-card);
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-primary);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.note-quick-action:active {
  background: var(--color-bg-secondary, #f3f4f6);
}
.note-quick-action-icon {
  font-size: 14px;
  line-height: 1;
}
.note-process-hint {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: var(--color-brand-light, #DBEAFE);
  color: var(--color-brand-dark, #1D4ED8);
  font-size: 13px;
  line-height: 1.5;
}
.note-ai-pill-disassemble {
  border-color: var(--color-brand);
  color: var(--color-brand);
  font-weight: 600;
}
.note-detail-bottom-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 120;
  max-width: 480px;
  margin: 0 auto;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid var(--color-border);
  box-sizing: border-box;
}
.note-detail-done-btn {
  width: 100%;
  margin: 0;
}
.text-note-ai-pill .pill-icon { margin-right: 4px; }
.text-note-ai-pill.active {
  background: var(--color-brand-light, #DBEAFE);
  border-color: var(--color-brand);
  color: var(--color-brand-dark, #1D4ED8);
  font-weight: 500;
}
.note-ai-tab-hint {
  font-size: 13px;
  color: var(--color-text-tertiary);
  margin: 0 0 12px;
}
.note-ai-tab-hint--below-scenes {
  margin: 10px 2px 14px;
  padding: 0 4px;
  line-height: 1.55;
  text-align: center;
}
.note-ai-empty {
  padding: 32px 16px;
  text-align: center;
  font-size: 13px;
  color: var(--color-text-tertiary);
  background: var(--color-card);
  border-radius: var(--radius-md);
  border: 1px dashed var(--color-border);
}
.text-note-ai-label {
  font-size: 13px; font-weight: 600; color: var(--color-text-secondary);
  margin: 0 0 10px;
}
.text-note-ai-pills {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px;
}
.text-note-ai-pill {
  padding: 8px 14px; border-radius: var(--radius-full);
  border: 1.5px solid var(--color-border); background: var(--color-card);
  font-size: 13px; font-weight: 500; color: var(--color-text-secondary);
  cursor: pointer;
}
.text-note-ai-pill:active { opacity: 0.7; }
.text-note-ai-pill:disabled { opacity: 0.5; }
.text-note-ai-result {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-card);
}
.text-note-ai-result-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px;
  background: var(--color-brand-light, #DBEAFE);
  margin-bottom: 0;
  font-size: 14px; font-weight: 600;
  color: var(--color-brand-dark, #1D4ED8);
}
.text-note-ai-copy {
  border: none; background: none; color: var(--color-brand);
  font-size: 12px; cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
}
.text-note-ai-copy:active { background: rgba(37, 99, 235, 0.1); }
.text-note-ai-result-body {
  font-size: 14px; line-height: 1.7; white-space: pre-wrap;
  padding: 14px 16px;
}
.note-ai-append-btn {
  width: calc(100% - 32px);
  margin: 12px 16px 16px;
  border-style: dashed;
  color: var(--color-brand);
  background: var(--color-brand-light, #DBEAFE);
}
.upload-list-item--note { border-left: 3px solid #8b5cf6; }
.upload-list-item--link { border-left: 3px solid #2563EB; }

/* ===== 链接提取 ===== */
.link-extract-page {
  --link-extract-kb: 0px;
}
.link-extract-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  min-height: 100%;
  padding: 24px 0 calc(24px + env(safe-area-inset-bottom));
  text-align: center;
}
/* Hero 区域：悟空 mascot + 标题 + 副标题 */
.link-extract-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 28px;
  padding: 0 24px;
  animation: link-extract-hero-in 0.45s ease both;
}
.link-extract-hero-img {
  width: 180px;
  height: auto;
  margin-bottom: 14px;
  -webkit-user-drag: none;
}
.link-extract-hero-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: 6px;
  line-height: 1.3;
}
.link-extract-hero-subtitle {
  font-size: 14px;
  color: var(--color-text-secondary);
  line-height: 1.5;
}
@keyframes link-extract-hero-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
/* 键盘状态下的迷你顶部标题栏 */
.link-extract-mini-header {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: auto;
  padding-top: 8px;
  animation: link-extract-hero-in 0.35s ease both;
}
.link-extract-mini-header img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: contain;
  background: var(--color-brand-light, #DBEAFE);
  padding: 3px;
}
.link-extract-mini-header .mini-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--color-text-primary);
}
/* 大圆角卡片：输入框 + 双按钮 + 提示 */
.link-extract-card {
  width: 100%;
  max-width: 360px;
  background: var(--color-card, #FFFFFF);
  border-radius: 20px;
  padding: 20px 18px 16px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(15, 23, 42, 0.04);
}
.link-extract-card .link-input-wrap {
  background: #F1F5F9;
  border-radius: 14px;
  padding: 14px 14px;
  margin-bottom: 16px;
  border: 1.5px solid transparent;
  transition: border-color 0.2s, background 0.2s;
}
.link-extract-card .link-input-wrap:focus-within {
  border-color: var(--color-brand, #3B82F6);
  background: #fff;
}
.link-extract-card .link-input {
  font-size: 16px;
}
/* 双按钮行 */
.link-extract-btn-row {
  display: flex;
  gap: 12px;
}
.link-extract-btn {
  flex: 1;
  height: 50px;
  border: none;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  transition: transform 0.12s ease, opacity 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.link-extract-btn:active {
  transform: scale(0.97);
}
/* 粘贴链接按钮：默认实心蓝主按钮 */
.link-extract-btn--paste {
  background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
  color: #fff;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}
/* 有链接时粘贴退为白底蓝边次按钮 */
.link-extract-btn--paste.is-secondary {
  background: #fff;
  color: var(--color-brand, #3B82F6);
  border: 1.5px solid var(--color-brand, #3B82F6);
  box-shadow: none;
}
/* 生成笔记按钮：默认灰禁用 */
.link-extract-btn--run {
  background: #E2E8F0;
  color: #94A3B8;
  box-shadow: none;
}
/* 有链接时生成变实心蓝主按钮 */
.link-extract-btn--run.is-active {
  background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
  color: #fff;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}
.link-extract-btn:disabled {
  cursor: default;
  opacity: 1;
}
.link-extract-btn:disabled:active {
  transform: none;
}
.link-extract-card-tip {
  margin-top: 14px;
  text-align: center;
  font-size: 12px;
  color: #94A3B8;
  line-height: 1.5;
}
/* 键盘弹出：保持同一页面，悟空缩小但保留在上方，卡片下移不遮挡 */
.link-extract-page.is-kb-open .link-extract-content {
  justify-content: flex-start;
  padding-top: 8px;
  padding-bottom: calc(24px + env(safe-area-inset-bottom) + var(--link-extract-kb, 0px));
}
.link-extract-page.is-kb-open .link-extract-hero {
  margin-bottom: 8px;
  animation: none;
}
.link-extract-page.is-kb-open .link-extract-hero-img {
  width: 92px;
  margin-bottom: 8px;
}
.link-extract-page.is-kb-open .link-extract-hero-title {
  font-size: 16px;
  margin-bottom: 0;
}
.link-extract-page.is-kb-open .link-extract-hero-subtitle {
  display: none;
}
.link-extract-page.is-kb-open .link-extract-mini-header {
  display: none;
}
.link-extract-page.is-kb-open .link-extract-card {
  margin-top: 0;
}
.link-extract-content .link-extract-error {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: #FEE2E2;
  color: #B91C1C;
  font-size: 13px;
  line-height: 1.5;
}
.link-extract-preview {
  margin: 0 16px 16px;
  padding: 16px;
  border-radius: var(--radius-md);
  background: var(--color-card);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.link-extract-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.link-extract-preview-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.link-extract-preview-platform {
  font-size: 11px;
  color: var(--color-text-tertiary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 65%;
}
.link-extract-preview-title {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.4;
  margin: 0 0 12px;
  color: var(--color-text-primary);
}
.link-extract-preview-body {
  font-size: 14px;
  line-height: 1.65;
  color: var(--color-text-secondary);
  white-space: pre-wrap;
  max-height: 40vh;
  overflow-y: auto;
}
.text-note-detail-source {
  font-size: 12px;
  color: var(--color-text-secondary);
  margin: 0 0 12px;
  word-break: break-all;
}
.text-note-detail-source a { color: var(--color-brand); text-decoration: none; }

/* ===== 剪贴板链接弹窗（GET 笔记式） ===== */
.clipboard-link-sheet {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10020;
}
.clipboard-link-sheet.open { display: block; }
.clipboard-link-sheet-mask {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}
.clipboard-link-sheet-panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--color-card);
  border-radius: 20px 20px 0 0;
  padding: 0 0 calc(16px + env(safe-area-inset-bottom));
  box-shadow: 0 -8px 32px rgba(15, 23, 42, 0.12);
  max-height: 85vh;
  overflow-y: auto;
}
.clipboard-link-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--color-border-light);
}
.clipboard-link-sheet-close {
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  color: var(--color-text-secondary);
  cursor: pointer;
  flex-shrink: 0;
}
.clipboard-link-sheet-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text-primary);
  text-align: center;
  flex: 1;
}
.clipboard-link-sheet-confirm {
  flex-shrink: 0;
  height: 36px;
  padding: 0 16px;
  border: none;
  border-radius: 18px;
  background: #111827;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.clipboard-link-sheet-confirm:disabled {
  opacity: 0.55;
  cursor: default;
}
.clipboard-link-sheet-url {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 16px 10px;
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  background: var(--color-bg-secondary, #f3f4f6);
  border: 1px solid var(--color-border-light);
}
.clipboard-link-sheet-url-icon { font-size: 18px; flex-shrink: 0; }
.clipboard-link-sheet-url-text {
  font-size: 14px;
  color: var(--color-text-primary);
  word-break: break-all;
  line-height: 1.4;
}
.clipboard-link-sheet-hint {
  margin: 0 16px 8px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--color-text-secondary);
}
.clipboard-link-sheet-support {
  margin: 0 16px 8px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--color-text-tertiary);
}
.clipboard-link-sheet-processing {
  padding: 28px 16px 20px;
  text-align: center;
}
.clipboard-link-sheet-processing-icon {
  font-size: 36px;
  margin-bottom: 12px;
}
.clipboard-link-sheet-processing-title {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text-primary);
}
.clipboard-link-sheet-processing-desc {
  margin: 0;
  font-size: 13px;
  color: var(--color-text-secondary);
}

.link-generating-content { padding: 16px 16px calc(24px + env(safe-area-inset-bottom)); }
.link-generating-url-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: #f3f4f6;
  border-radius: 14px;
  margin-bottom: 24px;
}
.link-generating-url-icon { font-size: 18px; flex-shrink: 0; }
.link-generating-url-text {
  font-size: 14px;
  color: var(--color-text-secondary);
  word-break: break-all;
  line-height: 1.45;
}
.link-generating-status {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 28px;
}
.link-generating-mascot {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
}
.link-generating-mascot svg,
.link-generating-mascot img { width: 56px; height: 56px; display: block; object-fit: contain; object-position: center center; mix-blend-mode: normal; border-radius: 0; }
.link-generating-mascot-bounce {
  animation: link-generating-bounce 1.6s ease-in-out infinite;
}
@keyframes link-generating-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
.link-generating-status-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text-primary);
  margin: 0 0 6px;
}
.link-generating-status-desc {
  font-size: 13px;
  line-height: 1.55;
  color: var(--color-text-secondary);
  margin: 0;
}
.link-generating-skeleton { display: flex; flex-direction: column; gap: 12px; }
.link-generating-skeleton-line {
  height: 14px;
  border-radius: 8px;
  background: linear-gradient(90deg, #eef2f7 0%, #f8fafc 50%, #eef2f7 100%);
  background-size: 200% 100%;
  animation: link-generating-shimmer 1.4s ease-in-out infinite;
}
.link-generating-skeleton-line--lg { width: 88%; height: 18px; }
.link-generating-skeleton-line--md { width: 72%; }
.link-generating-skeleton-line--sm { width: 46%; }
@keyframes link-generating-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}
.link-generating-error {
  margin-top: 20px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fef2f2;
  color: #b91c1c;
  font-size: 14px;
  line-height: 1.5;
}

.link-pipeline-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 20px calc(24px + env(safe-area-inset-bottom));
}
.link-pipeline-overlay-inner {
  width: 100%;
  max-width: 360px;
}
.note-reading-generating-mascot {
  width: 168px;
  height: 200px;
  margin: 0 auto 12px;
  overflow: visible;
}
.note-reading-generating-mascot video,
.note-reading-generating-mascot img {
  width: 100%;
  height: 100%;
  display: block;
  margin: 0 auto;
  object-fit: contain;
  object-position: center bottom;
  mix-blend-mode: normal;
}
.note-reading-mascot-bounce { animation: link-generating-bounce 1.6s ease-in-out infinite; }
.note-reading-skeleton {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
  max-width: 280px;
  margin-left: auto;
  margin-right: auto;
}
.note-reading-skeleton-line {
  height: 12px;
  border-radius: 6px;
  background: linear-gradient(90deg, #eef2f7 0%, #f8fafc 50%, #eef2f7 100%);
  background-size: 200% 100%;
  animation: link-generating-shimmer 1.4s ease-in-out infinite;
}
.note-reading-skeleton-line--lg { width: 100%; height: 16px; }
.note-reading-skeleton-line--md { width: 78%; }
.note-reading-stream-wrap { padding: 4px 0; }
.note-reading-stream-pre {
  white-space: pre-wrap;
  word-break: break-word;
  font-family: inherit;
  font-size: 16px;
  line-height: 1.75;
  color: var(--color-text-primary);
  margin: 0;
  background: transparent;
  border: none;
}

.clipboard-link-banner {
  display: none;
  align-items: center;
  gap: 10px;
  width: calc(100% - 32px);
  margin: 12px 16px 4px;
  padding: 12px 14px;
  border: 1px solid #BFDBFE;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%);
  color: #1D4ED8;
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.12);
}
.clipboard-link-banner.is-visible { display: flex !important; }
.clipboard-link-banner.is-loading {
  opacity: 0.88;
  pointer-events: none;
}
.clipboard-link-banner-icon { font-size: 18px; flex-shrink: 0; }
.clipboard-link-banner-text { flex: 1; line-height: 1.4; }
.clipboard-link-banner-arrow { font-size: 18px; opacity: 0.7; flex-shrink: 0; }
.clipboard-paste-capture-input {
  position: fixed;
  left: 0;
  top: 0;
  width: 1px;
  height: 1px;
  opacity: 0.01;
  border: none;
  padding: 0;
  z-index: 10030;
}
.clipboard-paste-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10025;
  background: rgba(15, 23, 42, 0.5);
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.clipboard-paste-overlay.is-visible { display: flex; }
.clipboard-paste-overlay-card {
  width: 100%;
  max-width: 320px;
  background: var(--color-card);
  border-radius: 20px;
  padding: 28px 22px 20px;
  text-align: center;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.2);
}
.clipboard-paste-overlay-icon { font-size: 40px; margin-bottom: 12px; }
.clipboard-paste-overlay-title {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text-primary);
}
.clipboard-paste-overlay-desc {
  margin: 0 0 18px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--color-text-secondary);
}
.clipboard-paste-overlay-cancel {
  border: none;
  background: var(--color-border-light);
  color: var(--color-text-secondary);
  font-size: 15px;
  font-weight: 600;
  height: 42px;
  padding: 0 20px;
  border-radius: 21px;
  cursor: pointer;
}
.clipboard-link-sheet-read-btn {
  display: block;
  width: 100%;
  margin: 0 16px 12px;
  width: calc(100% - 32px);
  padding: 14px 16px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}
.clipboard-link-sheet-read-btn:active { opacity: 0.92; transform: scale(0.99); }

.clipboard-link-sheet-input {
  display: block;
  width: calc(100% - 32px);
  margin: 16px 16px 10px;
  padding: 14px 16px;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-lg);
  font-size: 14px;
  background: var(--color-card);
  color: var(--color-text-primary);
  outline: none;
}
.clipboard-link-sheet-input:focus {
  border-color: var(--color-brand);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* ===== 知识库培训资料 ===== */
.kb-nav-plus {
  font-size: 26px; font-weight: 400; line-height: 1; padding: 0 4px; color: var(--color-brand);
}
.kb-section-toggle {
  display: flex;
  background: var(--color-bg-secondary, #f3f4f6);
  border-bottom: 1px solid var(--color-border-light);
  padding: 8px 12px;
  gap: 8px;
}
.kb-section-btn {
  flex: 1;
  padding: 10px 0;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  border: none;
  border-radius: var(--radius-md, 12px);
  background: transparent;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.kb-section-btn.active {
  color: var(--color-brand);
  font-weight: 600;
  background: var(--color-card);
  box-shadow: var(--shadow-sm, 0 1px 2px rgba(0,0,0,0.05));
}
.kb-source-toggle {
  display: flex;
  background: var(--color-card);
  border-bottom: 1px solid var(--color-border-light);
  padding: 0;
}
.kb-source-btn {
  flex: 1;
  padding: 12px 0;
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  border: none;
  background: none;
  color: var(--color-text-secondary);
  cursor: pointer;
  position: relative;
  transition: color 0.2s;
}
.kb-source-btn.active {
  color: var(--color-brand);
  font-weight: 600;
  background: none;
}
.kb-source-btn.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 25%;
  right: 25%;
  height: 2px;
  background: var(--color-brand);
  border-radius: 1px;
}
.kb-stats-bar {
  display: flex;
  padding: 12px 16px;
  gap: 8px;
  background: var(--color-card);
  border-bottom: 1px solid var(--color-border-light);
}
.kb-stat-item {
  flex: 1;
  text-align: center;
  padding: 0;
  background: transparent;
  border-radius: 0;
}
.kb-stat-num { font-size: 17px; font-weight: 700; color: var(--color-text-primary); line-height: 1.2; }
.kb-stat-label { font-size: 11px; color: var(--color-text-tertiary); margin-top: 2px; }
.kb-stat-item--purple .kb-stat-num { color: #7c3aed; }
.kb-stat-item--green .kb-stat-num { color: var(--color-success, #10b981); }
.kb-stat-item--orange .kb-stat-num { color: #f59e0b; }
.kb-stats-hint {
  padding: 4px 16px 0; font-size: 10px; color: var(--color-text-secondary); line-height: 1.5;
}
.kb-list-tabs {
  display: flex; gap: 8px; padding: 12px 16px 0;
}
.kb-tab {
  flex: 1; padding: 10px 0; border: none; border-radius: var(--radius-full);
  background: var(--color-bg-secondary); color: var(--color-text-secondary);
  font-size: 14px; font-weight: 600; cursor: pointer;
}
.kb-tab.active { background: var(--color-brand-soft); color: var(--color-brand); }
.kb-section-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 16px 10px; font-size: 12px; font-weight: 600; color: var(--color-text-secondary);
}
.kb-folder-list { padding: 8px 16px 16px; display: flex; flex-direction: column; gap: 12px; }
.kb-folder-list--rows {
  padding: 0;
  gap: 0;
  background: #fff;
  border-top: 1px solid var(--color-border-light, var(--color-border));
}
.kb-folder-list--rows .kb-folder-card-wrap {
  position: relative;
  border-bottom: 1px solid var(--color-border-light, #f0f0f0);
}
.kb-folder-list--rows .kb-folder-card-wrap:last-child { border-bottom: none; }
.kb-folder-list--rows .kb-folder-card {
  border: none;
  border-radius: 0;
  box-shadow: none;
  padding: 14px 16px;
  background: #fff;
}
.kb-folder-list--rows .kb-folder-card:active {
  transform: none;
  background: var(--color-bg, #f9fafb);
}
.kb-folder-list--rows .kb-folder-card-wrap--mine .kb-folder-card { padding-right: 44px; }
.kb-folder-list--rows .kb-folder-card-wrap .kb-card-menu {
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  font-size: 20px;
  line-height: 1;
  letter-spacing: 0;
}
.kb-folder-list--grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.kb-folder-list--grid-single {
  grid-template-columns: 1fr;
  max-width: 220px;
}
.kb-folder-list--grid .kb-folder-card-wrap {
  position: relative;
  min-width: 0;
}
.kb-folder-list--grid .kb-folder-card {
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 14px 12px;
  width: 100%;
  box-sizing: border-box;
}
.kb-folder-list--grid .kb-kb-cover {
  width: 52px;
  height: 52px;
  margin-bottom: 10px;
  border-radius: var(--radius-md);
}
.kb-folder-list--grid .kb-folder-info {
  width: 100%;
  margin-left: 0;
  min-width: 0;
}
.kb-folder-list--grid .kb-folder-name {
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.kb-folder-list--grid .kb-folder-meta {
  font-size: 11px;
  margin-top: 2px;
}
.kb-folder-list--grid .kb-folder-card-wrap .kb-card-menu {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 32px;
  height: 32px;
  flex: none;
  transform: none;
  align-self: auto;
}
.kb-folder-list--grid .kb-folder-card--full {
  grid-column: 1 / -1;
  max-width: 220px;
}
.kb-folder-list--grid .kb-folder-card-wrap--full {
  grid-column: 1 / -1;
  max-width: 220px;
}
.kb-learn-map-icon svg {
  width: 22px;
  height: 22px;
  display: block;
}
.kb-dash-member-avatar--initial.kb-dash-member-avatar--blue { background: var(--color-brand, #3B82F6); }
.kb-dash-member-avatar--initial.kb-dash-member-avatar--green { background: #10B981; }
.kb-dash-member-avatar--initial.kb-dash-member-avatar--orange { background: #F97316; }
.kb-dash-member-avatar--initial.kb-dash-member-avatar--purple { background: #7C3AED; }

.kb-kb-card { padding: 12px 14px; gap: 0; }
.kb-kb-cover {
  width: 56px; height: 56px; border-radius: 10px; display: flex; align-items: center;
  justify-content: center; flex-shrink: 0; font-size: 22px; font-weight: 700; color: #374151;
}
.kb-kb-cover--blue { background: linear-gradient(135deg, #dbeafe, #eff6ff); }
.kb-kb-cover--purple { background: linear-gradient(135deg, #ede9fe, #f5f3ff); }
.kb-kb-cover--orange { background: linear-gradient(135deg, #fef3c7, #fffbeb); }
.kb-kb-cover--gray { background: linear-gradient(135deg, #f3f4f6, #e5e7eb); }
.kb-kb-cover--folder {
  background: #f3f4f6;
  color: #6b7280;
}
.kb-kb-cover--folder svg { display: block; }
.kb-kb-cover--img { padding: 0; overflow: hidden; background: #f3f4f6; }
.kb-kb-cover--img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.kb-folder-form-card--cover {
  display: flex; gap: 14px; align-items: flex-start; padding: 16px;
}
.kb-folder-cover-upload {
  width: 88px; height: 88px; border: 1.5px dashed var(--color-border, #D1D5DB);
  border-radius: 12px; background: var(--color-bg, #F9FAFB); padding: 0; flex-shrink: 0;
  cursor: pointer; overflow: hidden; position: relative;
  display: flex; align-items: center; justify-content: center;
}
.kb-folder-cover-upload.has-cover { border-style: solid; border-color: var(--color-border, #E5E7EB); }
.kb-folder-cover-uploading {
  position: absolute; inset: 0; background: rgba(255, 255, 255, 0.85);
  display: flex; align-items: center; justify-content: center; border-radius: 12px;
}
.kb-folder-cover-spinner {
  width: 24px; height: 24px; border: 2.5px solid var(--color-border, #E5E7EB);
  border-top-color: var(--color-brand, #3B82F6); border-radius: 50%;
  animation: kb-folder-spin 0.7s linear infinite;
}
@keyframes kb-folder-spin { to { transform: rotate(360deg); } }
.kb-folder-cover-placeholder {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 100%; height: 100%; color: var(--color-text-secondary);
}
.kb-folder-cover-plus { font-size: 22px; line-height: 1; }
.kb-folder-cover-label { font-size: 11px; margin-top: 4px; }
.kb-folder-cover-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.kb-folder-form-fields { flex: 1; min-width: 0; }
.kb-nav-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0;
  flex-shrink: 0;
  height: 44px;
  padding-right: 4px;
}
/* 勿对 display 使用 !important，否则盖不住 JS 的 style.display=none（根列表会漏出三点） */
.kb-list-nav-header .kb-nav-new.nav-action-text {
  display: inline-flex;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
  width: auto !important;
  min-width: 0 !important;
  height: 44px !important;
  padding: 0 4px !important;
  margin: 0 !important;
  border: none !important;
  background: none !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  line-height: 44px !important;
  white-space: nowrap !important;
  color: var(--color-brand, #2563eb) !important;
  vertical-align: middle;
}
.kb-list-nav-header .kb-nav-more.nav-action {
  display: inline-flex;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
  width: 32px !important;
  min-width: 32px !important;
  height: 44px !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  background: none !important;
  font-size: 0 !important; /* 隐藏字符 ⋮ 的字体基线偏移，改用伪元素居中 */
  font-weight: 400 !important;
  line-height: 0 !important;
  color: var(--color-text-primary, #111827) !important;
  border-radius: 8px;
  vertical-align: middle;
  position: relative;
}
.kb-list-nav-header .kb-nav-more.nav-action::before {
  content: "";
  display: block;
  width: 4px;
  height: 16px;
  background:
    radial-gradient(circle, currentColor 1.6px, transparent 1.7px) 50% 0 / 4px 4px no-repeat,
    radial-gradient(circle, currentColor 1.6px, transparent 1.7px) 50% 50% / 4px 4px no-repeat,
    radial-gradient(circle, currentColor 1.6px, transparent 1.7px) 50% 100% / 4px 4px no-repeat;
}
.kb-perm-option {
  display: flex; align-items: center; width: 100%; padding: 14px 0; border: none; background: none;
  border-bottom: 1px solid var(--color-border-light); cursor: pointer; text-align: left; font-family: inherit;
}
.kb-perm-option:last-of-type { border-bottom: none; }
.kb-perm-option-main { flex: 1; min-width: 0; }
.kb-perm-option-title { display: block; font-size: 15px; font-weight: 600; color: var(--color-text-primary); }
.kb-perm-option-desc { display: block; font-size: 12px; color: var(--color-text-secondary); margin-top: 2px; }
.kb-perm-check { width: 24px; text-align: center; font-size: 16px; font-weight: 700; }
.kb-manage-sheet .kb-perm-option { padding: 14px 16px; }
.kb-manage-sheet .kb-manage-subhead { border-bottom: none; padding-bottom: 8px; }
.kb-manage-sheet .kb-manage-empty-hint {
  padding: 12px 16px;
  font-size: 13px;
  color: var(--color-text-secondary, #6B7280);
}
.kb-folder-card-wrap { position: relative; }
.kb-folder-card {
  display: flex; align-items: center; width: 100%; padding: 14px 16px;
  background: #fff; border-radius: var(--radius-md); border: 1px solid var(--color-border-light, var(--color-border));
  box-shadow: 0 1px 3px rgba(0,0,0,0.06); cursor: pointer; text-align: left;
  transition: transform 0.15s;
}
.kb-folder-card:active { transform: scale(0.98); }
.kb-folder-icon {
  width: 44px; height: 44px; border-radius: var(--radius-sm); display: flex; align-items: center;
  justify-content: center; font-size: 22px; flex-shrink: 0;
}
.kb-folder-icon--blue { background: #eff6ff; }
.kb-folder-icon--purple { background: #ede9fe; }
.kb-folder-icon--orange { background: #fef3c7; }
.kb-folder-info { flex: 1; margin-left: 12px; min-width: 0; }
.kb-folder-name { font-size: 15px; font-weight: 600; color: var(--color-text-primary); }
.kb-folder-meta { font-size: 12px; color: var(--color-text-secondary); margin-top: 2px; }
.kb-folder-meta strong { color: var(--color-brand); font-weight: 600; }
.kb-folder-arrow { color: var(--color-text-secondary); font-size: 18px; flex-shrink: 0; margin-left: 8px; }
.kb-folder-card-wrap .kb-card-menu {
  position: absolute; right: 36px; top: 50%; transform: translateY(-50%); z-index: 2;
}
.kb-loose-list { background: #fff; border-top: 1px solid var(--color-border-light, var(--color-border)); }
.kb-loose-row { position: relative; }
.kb-loose-card {
  display: flex; align-items: center; width: 100%; padding: 12px 16px;
  background: #fff; border: none; border-bottom: 1px solid var(--color-border-light, var(--color-border));
  cursor: pointer; text-align: left;
}
.kb-loose-card:last-child { border-bottom: none; }
.kb-loose-type {
  width: 36px; height: 36px; border-radius: var(--radius-sm); display: flex; align-items: center;
  justify-content: center; font-size: 18px; flex-shrink: 0;
}
.kb-loose-type--video { background: #fee2e2; }
.kb-loose-type--audio { background: #dbeafe; }
.kb-loose-type--text { background: #d1fae5; }
.kb-loose-info { flex: 1; margin-left: 10px; min-width: 0; }
.kb-loose-name {
  font-size: 15px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.kb-loose-meta { font-size: 12px; color: var(--color-text-secondary); margin-top: 1px; }
.kb-loose-status {
  font-size: 10px; padding: 2px 8px; border-radius: 10px; font-weight: 600; flex-shrink: 0; margin-left: 8px;
}
.kb-loose-status--new { background: #f3f4f6; color: var(--color-text-secondary); }
.kb-loose-status--viewed { background: #dbeafe; color: var(--color-brand); }
.kb-loose-status--done { background: #d1fae5; color: var(--color-success, #059669); }
.kb-loose-status--proc { background: #fef3c7; color: #d97706; }
.kb-loose-row .kb-card-menu { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); z-index: 2; }
.kb-loose-row--mine .kb-loose-card { padding-right: 40px; }
.kb-folder-card-wrap--mine .kb-folder-card { padding-right: 40px; }
.kb-asset-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.kb-upload-tags { margin-top: 12px; }
.kb-upload-summary {
  width: 100%; min-height: 72px; margin-top: 12px; border: none; resize: vertical;
  padding: 12px 0; font-size: 15px; line-height: 1.6; background: transparent; outline: none;
  border-bottom: 1px solid var(--color-border);
}
.kb-upload-scope-label {
  display: block; margin-top: 16px; font-size: 13px; color: var(--color-text-secondary);
}
.kb-upload-scope { margin-top: 8px; }
.kb-detail-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.kb-detail-summary {
  font-size: 15px; line-height: 1.6; color: var(--color-text-secondary);
  margin: 0 0 16px; padding: 12px; background: var(--color-bg-secondary);
  border-radius: var(--radius-md);
}
.kb-detail-delete { width: 100%; margin-top: 24px; color: var(--color-danger); }
/* KB v2.5 — empty state + sheet tokens */
.kb-page,
.kb-new-sheet,
.kb-folder-target-sheet {
  --kb-bar-text: #10B981;
  --kb-bar-audio: #3B82F6;
  --kb-bar-video: #EF4444;
  --kb-bar-folder: #7C3AED;
  --kb-icon-bg-text: #D1FAE5;
  --kb-icon-bg-audio: #EFF6FF;
  --kb-icon-bg-video: #FEE2E2;
  --kb-icon-bg-folder: #EDE9FE;
  --kb-tip-bg: #EFF6FF;
  --kb-tip-border: #DBEAFE;
  --kb-tip-strong: #2563EB;
  --kb-btn-shadow: 0 4px 14px rgba(59, 130, 246, 0.25);
  --kb-cancel-bg: #F5F5F7;
}
.kb-empty-state { padding: 48px 24px 32px; text-align: center; }
.kb-empty-state--v25 { padding: 40px 20px 28px; }
.kb-empty-icon { font-size: 48px; margin-bottom: 12px; opacity: 0.55; }
.kb-empty-illustration {
  width: 88px; height: 88px; margin: 0 auto 16px; border-radius: 24px;
  display: flex; align-items: center; justify-content: center; position: relative;
  background: linear-gradient(145deg, #DBEAFE 0%, #6366F1 100%);
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.18);
}
.kb-empty-illustration--root {
  background: linear-gradient(145deg, #E0E7FF 0%, #6366F1 100%);
}
.kb-empty-illustration--search {
  background: linear-gradient(145deg, #F3F4F6 0%, #9CA3AF 100%);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}
.kb-empty-illustration--shared {
  background: linear-gradient(145deg, #DBEAFE 0%, #3B82F6 100%);
}
.kb-empty-illustration svg { width: 48px; height: 48px; }
.kb-empty-sparkle {
  position: absolute; top: 6px; right: 6px; font-size: 18px; line-height: 1;
  opacity: 0.85; pointer-events: none;
}
.kb-empty-tip-card {
  max-width: 300px; margin: 0 auto 16px; padding: 12px 14px;
  background: var(--kb-tip-bg); border: 1px solid var(--kb-tip-border);
  border-radius: var(--radius-md); text-align: center;
}
.kb-empty-tip-card .empty-state-title { color: var(--color-text-primary); margin-bottom: 6px; }
.kb-empty-tip-card .empty-state-desc { font-size: 11px; color: var(--color-text-secondary); }
.kb-empty-btn {
  width: 100%; max-width: 280px; margin-top: 4px;
  box-shadow: var(--kb-btn-shadow);
}
.kb-list-content.is-empty-folder { padding-bottom: 24px; }
.kb-loading { padding: 32px 16px; text-align: center; color: var(--color-text-secondary); }
.kb-section-label { padding: 12px 16px 8px; font-size: 13px; font-weight: 500; color: var(--color-text-tertiary); }
.kb-folder-card .memory-card-title { display: flex; align-items: center; gap: 6px; }
#page-knowledge .content { padding: 0 16px 24px; min-height: 40vh; }
.kb-detail-media { width: 100%; margin-bottom: 16px; border-radius: var(--radius-md); }
video.kb-detail-media {
  aspect-ratio: 16 / 9;
  object-fit: contain;
  display: block;
  background: #000;
}
.kb-detail-transcript { white-space: pre-wrap; line-height: 1.75; }
.memory-card-preview { font-size: 13px; color: var(--color-text-secondary); margin-top: 6px; line-height: 1.5; }

/* Sprint 2A */
.kb-search-bar.note-list-search-wrap {
  padding: 12px 16px 12px;
  background: var(--color-bg-page, #F5F6F8);
  border-bottom: none;
  position: sticky;
  top: 0;
  z-index: 10;
}
.kb-search-bar .note-list-search {
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.kb-search-bar .kb-search-input.note-list-search-input,
.kb-search-bar .note-list-search-input {
  flex: 1;
  min-width: 0;
  width: auto;
  box-sizing: border-box;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  color: var(--color-text-primary);
  background: var(--color-card);
  outline: none;
  box-shadow: var(--shadow-card);
  background-image: none;
}
.kb-search-bar .note-list-search:focus-within .note-list-search-input {
  border-color: var(--color-brand);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}
.kb-search-bar { padding: 12px 16px; background: var(--color-card); border-bottom: none; }
.kb-search-input {
  width: 100%; box-sizing: border-box; padding: 10px 16px;
  border: 1px solid var(--color-border); border-radius: var(--radius-lg);
  font-size: 13px; background: var(--color-card); outline: none;
  background-image: none;
}
.kb-search-input:focus { border-color: var(--color-brand); background-color: #fff; }
.kb-list-content { padding-bottom: 80px; }
.kb-page--in-folder .kb-list-content { padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
.kb-card-row {
  display: flex; align-items: stretch; gap: 0; margin-bottom: 10px;
}
.kb-card-row .memory-card { flex: 1; margin-bottom: 0; text-align: left; }
.kb-card-menu {
  flex: 0 0 44px; border: none; background: var(--color-bg-secondary); border-radius: var(--radius-md);
  color: var(--color-text-secondary); font-size: 20px; cursor: pointer; align-self: stretch;
}
.kb-list-bottom-bar, .kb-detail-bottom-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  background: rgba(255,255,255,0.96); border-top: 1px solid var(--color-border);
  display: flex; gap: 10px;
}
.kb-bottom-btn, .kb-detail-bar-btn { flex: 1; margin: 0; }
.kb-bottom-btn { box-shadow: var(--kb-btn-shadow, 0 4px 14px rgba(59, 130, 246, 0.25)); }
.kb-detail-bar-btn {
  padding: 12px; border: 1px solid var(--color-border); border-radius: var(--radius-full);
  background: #fff; font-size: 15px; font-weight: 600; cursor: pointer;
}
.kb-detail-content { padding-bottom: 88px; }
.kb-nav-more { font-size: 22px; line-height: 1; padding: 0 8px; min-width: 36px; }
.kb-folder-form { padding: 16px; }
.kb-folder-form-card {
  background: #fff; border-radius: var(--radius-lg); padding: 4px 16px 12px; margin-bottom: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.kb-folder-title-input {
  width: 100%; border: none; border-bottom: 1px solid var(--color-border);
  padding: 16px 0 12px; font-size: 17px; font-weight: 600; outline: none; background: transparent;
}
.kb-folder-desc-input {
  width: 100%; min-height: 88px; border: none; resize: vertical; padding: 12px 0 4px;
  font-size: 15px; line-height: 1.6; outline: none; background: transparent;
}
.kb-scope-card { padding: 0; overflow: hidden; }
.kb-scope-label {
  padding: 14px 16px 8px; font-size: 11px; font-weight: 600; color: var(--color-text-tertiary);
  text-transform: uppercase; letter-spacing: 0.5px;
}
.kb-scope-option {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  padding: 14px 16px; border: none; border-bottom: 1px solid var(--color-border);
  background: #fff; text-align: left; cursor: pointer;
}
.kb-scope-option:last-child { border-bottom: none; }
.kb-scope-option-main { flex: 1; min-width: 0; }
.kb-scope-option-title { display: block; font-size: 16px; font-weight: 600; color: var(--color-text-primary); }
.kb-scope-option-desc { display: block; font-size: 13px; color: var(--color-text-secondary); margin-top: 4px; }
.kb-scope-check {
  width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--color-border);
  display: flex; align-items: center; justify-content: center; font-size: 12px; color: transparent; flex-shrink: 0;
}
.kb-scope-option.active .kb-scope-check {
  background: var(--color-brand, #3B82F6); border-color: var(--color-brand, #3B82F6); color: #fff;
}
.kb-folder-delete-btn {
  width: 100%; padding: 14px; border: none; border-radius: var(--radius-lg);
  background: #FEE2E2; color: var(--color-error, #EF4444); font-size: 15px;
  font-weight: 600; cursor: pointer; margin-top: 4px;
}
.kb-folder-delete-btn:active { background: #FECACA; }
.kb-folder-form-overlay {
  position: fixed; inset: 0; max-width: 420px; margin: 0 auto;
  background: rgba(255, 255, 255, 0.7); display: none; align-items: center;
  justify-content: center; z-index: 300; pointer-events: none;
}
.kb-folder-form-overlay[style*="display: block"],
.kb-folder-form-overlay[style*="display:flex"],
.kb-folder-form-overlay[style*="display: flex"] {
  display: flex !important;
  pointer-events: auto;
}
.kb-folder-form-saving-card {
  background: var(--color-card, #fff); border-radius: var(--radius-lg);
  padding: 24px 32px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); text-align: center;
}
.kb-folder-form-spinner {
  width: 32px; height: 32px; margin: 0 auto 12px;
  border: 3px solid var(--color-border, #E5E7EB); border-top-color: var(--color-brand, #3B82F6);
  border-radius: 50%; animation: kb-folder-spin 0.7s linear infinite;
}
.kb-folder-form-saving-text { font-size: 13px; color: var(--color-text-secondary); margin: 0; }
.kb-folder-form-toast {
  position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%);
  max-width: 380px; width: calc(100% - 32px); padding: 12px 16px;
  border-radius: var(--radius-md); font-size: 13px; font-weight: 500;
  display: flex; align-items: center; gap: 10px; z-index: 400;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  background: #FEF2F2; color: var(--color-error, #EF4444); border: 1px solid #FECACA;
}
.kb-folder-form-toast-icon { font-size: 18px; flex-shrink: 0; }
.kb-folder-form-toast-msg { flex: 1; line-height: 1.4; }
.kb-folder-form-toast-retry {
  font-weight: 600; color: var(--color-error, #EF4444); cursor: pointer;
  background: none; border: none; font-size: 13px; white-space: nowrap; padding: 0;
}
.kb-folder-form-hint {
  font-size: 13px; color: var(--color-text-tertiary); line-height: 1.5; padding: 4px 4px 24px; margin: 0;
}
.nav-header .kb-nav-new + .kb-nav-more { margin-left: 0; }
.kb-proc-badge { color: var(--color-brand); font-weight: 600; }
.kb-detail-processing {
  margin: 0 0 12px; padding: 12px; border-radius: var(--radius-md);
  background: var(--color-brand-soft); color: var(--color-text-primary); font-size: 14px; line-height: 1.5;
  display: flex; flex-direction: column; gap: 10px; align-items: flex-start;
}
.kb-detail-processing.is-error { background: var(--color-error-light); color: var(--color-error); }
.kb-detail-retry-btn { font-size: 13px; padding: 6px 12px; }
.kb-media-edit-player { margin-bottom: 12px; }
.kb-media-edit-player .kb-detail-media { width: 100%; border-radius: var(--radius-md); }
.kb-media-mode { margin-top: 16px; }
.kb-media-mode-options { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.kb-media-mode-option { font-size: 14px; line-height: 1.5; display: flex; align-items: flex-start; gap: 8px; }
.kb-media-mode-option input { margin-top: 3px; }

/* Phase 2: learn */
.kb-learn-content { padding-bottom: 24px; }
.kb-learn-summary {
  margin: 12px 16px; padding: 16px; border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--color-brand-soft), #fff);
}
.kb-learn-summary-title { font-size: 15px; font-weight: 600; margin-bottom: 12px; }
.kb-learn-stats { display: flex; gap: 8px; }
.kb-learn-stat { flex: 1; text-align: center; }
.kb-learn-stat-num { font-size: 22px; font-weight: 700; color: var(--color-brand); }
.kb-learn-stat-label { font-size: 12px; color: var(--color-text-secondary); margin-top: 4px; }
.kb-progress-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.kb-progress-row--compact { margin-top: 6px; }
.kb-progress-track {
  flex: 1; height: 6px; border-radius: 999px; background: var(--color-border); overflow: hidden;
}
.kb-progress-fill { height: 100%; background: var(--color-brand); border-radius: 999px; }
.kb-progress-text { font-size: 12px; color: var(--color-text-secondary); min-width: 36px; text-align: right; }
.kb-learn-badge { font-weight: 600; }
.kb-learn-badge--viewed { color: var(--color-brand); }
.kb-learn-badge--done { color: var(--color-success); }
.kb-course-source-options { display: flex; flex-direction: column; gap: 10px; margin: 8px 0 12px; }
.kb-course-asset-picker { max-height: 280px; overflow-y: auto; margin-top: 8px; }
.kb-course-asset-option {
  display: flex; align-items: flex-start; gap: 10px; padding: 10px 0;
  border-bottom: 1px solid var(--color-border-light); font-size: 14px; line-height: 1.4;
}
.kb-course-asset-option input { margin-top: 3px; flex-shrink: 0; }
.kb-course-delete-btn { width: 100%; margin-top: 20px; color: var(--color-error); border-color: var(--color-error); }
.kb-course-delete-nav { color: var(--color-error); margin-right: 8px; }
.kb-course-item {
  display: flex; align-items: center; gap: 10px; width: calc(100% - 32px); margin: 0 16px 8px;
  padding: 14px 12px; border: 1px solid var(--color-border); border-radius: var(--radius-md);
  background: #fff; text-align: left; cursor: pointer;
}
.kb-course-item-icon { width: 28px; text-align: center; flex-shrink: 0; }
.kb-course-item-title { flex: 1; font-size: 15px; font-weight: 600; min-width: 0; }
.kb-course-item-status { font-size: 12px; color: var(--color-text-secondary); flex-shrink: 0; }
.kb-dash-member-row, .kb-dash-asset-row {
  margin: 0 16px 12px; padding: 12px 14px; border-radius: var(--radius-md);
  background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.kb-dash-member-name { font-size: 15px; font-weight: 600; }
.kb-dash-member-meta { font-size: 12px; color: var(--color-text-secondary); margin-top: 4px; }
.kb-detail-learn-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: #fff; border-top: 1px solid var(--color-border);
  max-width: none; transform: none; width: auto; box-sizing: border-box;
}
.kb-detail-learn-count {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 36%;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-secondary);
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.kb-learn-status { flex: 1; font-size: 14px; font-weight: 600; color: var(--color-text-secondary); }
.kb-learn-status--done { color: var(--color-success); }
.kb-learn-complete-btn { flex-shrink: 0; margin: 0; padding: 10px 20px; width: auto; }
.kb-detail-content.has-learn-bar { padding-bottom: 72px; }

/* Learn tab (p2) */
.kb-learn-progress-card {
  margin: 12px 16px 16px; padding: 18px 16px; border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--color-brand-soft), #fff);
}
.kb-learn-progress-head { font-size: 13px; color: var(--color-text-secondary); margin-bottom: 8px; }
.kb-learn-progress-num { display: flex; align-items: baseline; gap: 6px; }
.kb-learn-progress-big { font-size: 36px; font-weight: 700; color: var(--color-brand); line-height: 1; }
.kb-learn-progress-unit { font-size: 15px; color: var(--color-text-secondary); }
.kb-learn-progress-hint { font-size: 13px; color: var(--color-text-secondary); margin-top: 10px; }
.kb-learn-section-title {
  margin: 0 16px 10px; font-size: 14px; font-weight: 600; color: var(--color-text-secondary);
}
.kb-learn-card {
  display: flex; align-items: center; gap: 12px; width: calc(100% - 32px); margin: 0 16px 10px;
  padding: 14px 12px; border: 1px solid var(--color-border); border-radius: var(--radius-md);
  background: #fff; text-align: left; cursor: pointer;
}
.kb-learn-card-icon {
  width: 40px; height: 40px; border-radius: var(--radius-md); display: flex; align-items: center;
  justify-content: center; font-size: 18px; flex-shrink: 0; background: var(--color-brand-soft);
}
.kb-learn-card-icon--audio { background: #fff3e0; }
.kb-learn-card-icon--video { background: #fce4ec; }
.kb-learn-card-icon--text { background: #e8f5e9; }
.kb-learn-card-body { flex: 1; min-width: 0; }
.kb-learn-card-title { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kb-learn-card-meta { font-size: 12px; color: var(--color-text-secondary); margin-top: 4px; }
.kb-learn-card-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.kb-learn-status-pill {
  font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px;
  background: var(--color-border-light); color: var(--color-text-secondary);
}
.kb-learn-status-pill--viewed { background: var(--color-brand-soft); color: var(--color-brand); }
.kb-learn-status-pill--done,
.kb-learn-status-pill--completed { background: #e8f5e9; color: var(--color-success); }
.kb-learn-card-dur { font-size: 11px; color: var(--color-text-tertiary, var(--color-text-secondary)); }
.kb-team-preview {
  margin: 16px; padding: 14px; border-radius: var(--radius-lg);
  background: #fff; border: 1px solid var(--color-border);
}
.kb-team-preview-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.kb-team-preview-title { font-size: 14px; font-weight: 600; }
.kb-team-preview-more {
  font-size: 13px; color: var(--color-brand); background: none; border: none; padding: 0; cursor: pointer;
}
.kb-team-preview-row {
  display: flex; align-items: center; justify-content: space-between; padding: 8px 0;
  border-top: 1px solid var(--color-border-light); font-size: 14px;
}
.kb-team-preview-row:first-of-type { border-top: none; padding-top: 0; }
.kb-team-preview-name { font-weight: 500; }
.kb-team-preview-pct { color: var(--color-brand); font-weight: 600; }

/* Review entry (dashboard) */
.kb-review-entry {
  display: flex; align-items: center; gap: 8px; width: calc(100% - 32px); margin: 12px 16px 0;
  padding: 14px 12px; border-radius: var(--radius-md); border: 1px solid var(--color-warning, #ffb74d);
  background: #fff8e1; text-align: left; cursor: pointer;
}
.kb-review-entry-title { flex: 1; font-size: 15px; font-weight: 600; }
.kb-review-entry-badge {
  font-size: 12px; font-weight: 700; color: #fff; background: var(--color-warning, #ff9800);
  padding: 2px 8px; border-radius: 999px;
}
.kb-review-entry-arrow { font-size: 18px; color: var(--color-text-secondary); }

/* Review list (p10) */
.kb-reviews-content { padding-bottom: 24px; }
.kb-review-stats {
  display: flex; gap: 8px; margin: 12px 16px; padding: 4px;
  background: var(--color-border-light); border-radius: var(--radius-md);
}
.kb-review-stat {
  flex: 1; padding: 8px 4px; border: none; border-radius: var(--radius-sm);
  background: transparent; font-size: 13px; color: var(--color-text-secondary); cursor: pointer;
}
.kb-review-stat.active { background: #fff; font-weight: 600; color: var(--color-text); box-shadow: 0 1px 2px rgba(0,0,0,0.06); }
.kb-review-card {
  margin: 0 16px 12px; padding: 14px; border-radius: var(--radius-md);
  background: #fff; border: 1px solid var(--color-border);
}
.kb-review-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.kb-review-owner { font-size: 13px; font-weight: 600; color: var(--color-brand); }
.kb-review-type { font-size: 12px; color: var(--color-text-secondary); }
.kb-review-title { font-size: 15px; font-weight: 600; line-height: 1.4; }
.kb-review-reason {
  margin-top: 8px; padding: 8px 10px; border-radius: var(--radius-sm);
  background: var(--color-border-light); font-size: 13px; color: var(--color-text-secondary); line-height: 1.4;
}
.kb-review-actions { display: flex; gap: 10px; margin-top: 12px; }
.kb-review-actions .btn-outline,
.kb-review-actions .btn-primary { flex: 1; margin: 0; padding: 10px; }

/* Recommend bar (p4) */
.kb-detail-recommend-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; align-items: center; gap: 12px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: #fff; border-top: 1px solid var(--color-border);
}
.kb-recommend-hint { flex: 1; font-size: 13px; color: var(--color-text-secondary); line-height: 1.4; }
.kb-recommend-btn { flex-shrink: 0; margin: 0; padding: 10px 16px; width: auto; white-space: nowrap; }
.kb-detail-content.has-recommend-bar { padding-bottom: 72px; }

/* 新建培训资料弹窗（设计稿 sheet） */
.kb-new-sheet .share-sheet-panel {
  padding: 8px 16px calc(20px + env(safe-area-inset-bottom));
  border-radius: 20px 20px 0 0;
  position: relative;
}
.kb-new-sheet .share-sheet-panel::before {
  content: '';
  display: block;
  width: 36px;
  height: 4px;
  background: var(--color-border);
  border-radius: 2px;
  margin: 8px auto 16px;
}
.kb-sheet-title { font-size: 15px; font-weight: 600; text-align: left; margin-bottom: 12px; color: var(--color-text-primary); }
.kb-sheet-options { display: flex; flex-direction: column; gap: 4px; }
.kb-sheet-opt {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px;
  border: none; border-radius: var(--radius-md);
  background: #fff; cursor: pointer; text-align: left; transition: background 0.15s;
}
.kb-sheet-opt:active { background: var(--color-border-light); }
.kb-sheet-opt-bar {
  width: 4px; align-self: stretch; border-radius: 2px; flex-shrink: 0; min-height: 44px;
}
.kb-sheet-opt--text .kb-sheet-opt-bar { background: var(--kb-bar-text); }
.kb-sheet-opt--audio .kb-sheet-opt-bar { background: var(--kb-bar-audio); }
.kb-sheet-opt--video .kb-sheet-opt-bar { background: var(--kb-bar-video); }
.kb-sheet-opt--folder .kb-sheet-opt-bar { background: var(--kb-bar-folder); }
.kb-sheet-opt-icon {
  width: 38px; height: 38px; border-radius: var(--radius-sm); display: flex; align-items: center;
  justify-content: center; flex-shrink: 0; color: var(--color-text-primary);
}
.kb-sheet-opt-icon svg { width: 22px; height: 22px; }
.kb-sheet-opt-icon--text { background: var(--kb-icon-bg-text); color: #059669; }
.kb-sheet-opt-icon--audio { background: var(--kb-icon-bg-audio); color: #2563EB; }
.kb-sheet-opt-icon--video { background: var(--kb-icon-bg-video); color: #DC2626; }
.kb-sheet-opt-icon--folder { background: var(--kb-icon-bg-folder); color: #7C3AED; }
.kb-sheet-opt-text { flex: 1; min-width: 0; }
.kb-sheet-opt-name {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  font-size: 15px; font-weight: 700; color: var(--color-text-primary);
}
.kb-sheet-opt-desc { display: block; font-size: 12px; color: var(--color-text-secondary); margin-top: 2px; }
.kb-sheet-opt-ai-badge {
  display: inline-flex; align-items: center; font-size: 10px; font-weight: 700;
  padding: 2px 6px; border-radius: 6px; line-height: 1.3;
  background: linear-gradient(135deg, #FEF3C7, #FDE68A); color: #92400E;
}
.kb-sheet-opt-ai-badge.is-disabled {
  background: #F3F4F6; color: #9CA3AF;
}
.kb-sheet-cancel {
  margin-top: 12px; width: 100%; padding: 14px; border: none; border-radius: var(--radius-md);
  background: var(--kb-cancel-bg, #F5F5F7); color: var(--color-text-secondary);
  font-size: 15px; font-weight: 600; cursor: pointer;
}
.kb-folder-target-sheet .kb-folder-target-desc {
  font-size: 13px; color: var(--color-text-secondary); line-height: 1.5;
  margin: 0 0 12px; text-align: left;
}
.kb-folder-target-sheet .rd-kb-folder-list { max-height: 40vh; }
.kb-folder-target-sheet .rd-kb-folder-new { margin-bottom: 8px; }

/* 文字资料编辑 · 与笔记写作台统一 */
.kb-text-edit-page > .nav-header.text-note-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 48px;
  padding: 0 8px 0 4px;
  flex-shrink: 0;
  box-sizing: border-box;
  border-bottom: none;
  background: var(--color-card, #fff);
}
.kb-text-edit-page > .content.text-note-editor {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 4px 20px;
  padding-bottom: calc(160px + env(safe-area-inset-bottom, 0px));
}
.kb-text-edit-page .kb-upload-tabs {
  flex-shrink: 0;
}
.kb-meta-panel {
  margin: 20px 0 8px;
  border: 1px solid var(--color-border-light, var(--color-border));
  border-radius: var(--radius-md, 12px);
  background: var(--color-bg-secondary, #f8fafc);
  overflow: hidden;
}
.kb-meta-panel-summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-primary);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.kb-meta-panel-summary::-webkit-details-marker { display: none; }
.kb-meta-panel-summary::after {
  content: "›";
  font-size: 16px;
  color: var(--color-text-tertiary);
  transform: rotate(90deg);
  transition: transform 0.15s;
}
.kb-meta-panel[open] > .kb-meta-panel-summary::after {
  transform: rotate(-90deg);
}
.kb-meta-panel-hint {
  margin-left: auto;
  font-size: 12px;
  font-weight: 400;
  color: var(--color-text-tertiary);
}
.kb-meta-panel-body {
  padding: 0 0 12px;
  border-top: 1px solid var(--color-border-light, var(--color-border));
  background: #fff;
}
.kb-meta-panel-body .kb-form-group,
.kb-meta-panel-body .kb-vis-group {
  padding-left: 14px;
  padding-right: 14px;
}
.kb-text-edit-page #kbUploadToolbar {
  z-index: 1100;
}

/* 上传培训资料 p9 */
.kb-upload-tabs {
  display: flex; gap: 0; padding: 0 16px; background: #fff; border-bottom: 1px solid var(--color-border-light, var(--color-border));
}
.kb-upload-tab {
  flex: 1; padding: 12px 4px; border: none; border-bottom: 2px solid transparent;
  background: transparent; font-size: 13px; font-weight: 600; color: var(--color-text-secondary); cursor: pointer;
}
.kb-upload-tab.active { color: var(--color-brand); border-bottom-color: var(--color-brand); }
.kb-upload-form { padding-bottom: 32px; }
.kb-upload-area {
  margin: 16px 16px 0; padding: 32px 20px; border: 2px dashed var(--color-brand); border-radius: var(--radius-lg);
  background: var(--color-brand-soft, #eff6ff); display: flex; flex-direction: column; align-items: center;
  cursor: pointer; transition: background 0.2s;
}
.kb-upload-area:active { background: #dbeafe; }
.kb-upload-area--text { cursor: default; }
.kb-upload-area--text:active { background: var(--color-brand-soft, #eff6ff); }
.kb-ua-icon {
  width: 64px; height: 64px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 28px; margin-bottom: 12px;
}
.kb-ua-icon--video { background: #fee2e2; }
.kb-ua-icon--audio { background: #dbeafe; }
.kb-ua-icon--text { background: #d1fae5; }
.kb-ua-title { font-size: 15px; font-weight: 700; color: var(--color-brand); text-align: center; }
.kb-ua-hint { font-size: 12px; color: var(--color-text-secondary); margin-top: 4px; text-align: center; line-height: 1.5; }
.kb-ua-formats { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; justify-content: center; }
.kb-ua-format {
  font-size: 10px; padding: 3px 10px; border-radius: 10px; background: #fff;
  color: var(--color-text-secondary); font-weight: 600; border: 1px solid var(--color-border);
}
.kb-form-group { padding: 16px 16px 0; }
.kb-form-label { display: block; font-size: 13px; font-weight: 600; color: var(--color-text-primary); margin-bottom: 6px; }
.kb-form-meta { font-weight: 400; color: var(--color-text-secondary); font-size: 12px; }
.kb-required { color: var(--color-error, #ef4444); }
.kb-form-input {
  width: 100%; box-sizing: border-box; padding: 11px 13px; border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md); font-size: 15px; background: #fff; color: var(--color-text-primary); outline: none;
}
.kb-form-input:focus { border-color: var(--color-brand); }
.kb-form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%239CA3AF'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-size: 18px; background-position: right 12px center;
}
.kb-form-textarea { resize: vertical; min-height: 80px; line-height: 1.5; }
.kb-form-textarea--tall { min-height: 160px; }
.kb-form-hint { font-size: 12px; color: var(--color-text-secondary); margin-top: 6px; line-height: 1.5; }
.kb-process-group { padding: 16px 16px 0; }
.kb-process-option {
  display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; margin-bottom: 6px;
  border: 1.5px solid var(--color-border); border-radius: var(--radius-md); cursor: pointer;
}
.kb-process-option--check { margin: 12px 0 0; }
.kb-process-option:has(input:checked) { border-color: var(--color-brand); background: var(--color-brand-soft, #eff6ff); }
.kb-process-option input { margin-top: 3px; flex-shrink: 0; }
.kb-process-main { display: block; font-size: 14px; font-weight: 600; }
.kb-process-sub { display: block; font-size: 12px; color: var(--color-text-secondary); margin-top: 4px; line-height: 1.4; }
.kb-vis-group { padding: 16px 16px 0; }
.kb-vis-options { display: flex; gap: 8px; margin-top: 6px; }
.kb-vis-option {
  flex: 1; padding: 10px; text-align: center; border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md); background: #fff; font-size: 14px; color: var(--color-text-secondary); cursor: pointer;
}
.kb-vis-option.active { border-color: var(--color-brand); background: var(--color-brand-soft, #eff6ff); color: var(--color-brand); font-weight: 600; }
.kb-vis-option.hidden { display: none; }
.kb-vis-hint { font-size: 11px; color: var(--color-text-secondary); margin-top: 6px; line-height: 1.5; }
.kb-vis-select-hidden { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.kb-upload-submit { width: calc(100% - 32px); margin: 20px 16px 0; }

/* 删除确认框须高于 action sheet (10002)，部署包只同步 10-notes.css */
.gc-dialog-overlay.open {
  z-index: 10010 !important;
}

/* ----- 笔记列表（速记 · 全部） ----- */
.note-list-nav-header .nav-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.note-list-nav-header .detail-nav-wukong {
  margin-right: 0;
}
.note-list-page .note-list-content {
  padding: 0 16px calc(16px + env(safe-area-inset-bottom));
  background: var(--color-bg-page, #F5F6F8);
}
.note-list-search-wrap {
  padding: 12px 16px 12px;
  background: var(--color-bg-page, #F5F6F8);
  position: sticky;
  top: 0;
  z-index: 10;
}
.note-list-search {
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  cursor: default;
  box-shadow: none;
}
.note-list-search:focus-within {
  box-shadow: none;
}
.note-list-search-input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  color: var(--color-text-primary);
  background: var(--color-card);
  outline: none;
  box-shadow: var(--shadow-card);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.note-list-search:focus-within .note-list-search-input {
  border-color: var(--color-brand);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}
.note-list-search-icon {
  flex-shrink: 0;
  font-size: 15px;
  opacity: 0.55;
}
.note-list-search-clear {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: var(--color-surface, #F1F3F5);
  color: var(--color-text-secondary);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.note-list-box {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.note-list-loading {
  padding: 48px 16px;
  text-align: center;
  color: var(--color-text-tertiary);
  font-size: 14px;
}
.note-list-memory-card {
  position: relative;
}
.note-list-memory-card-shell {
  border-radius: var(--radius-md);
  background: var(--color-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
@media (hover: hover) {
  .note-list-memory-card-shell:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  }
}
.note-list-memory-card-main:active {
  background: var(--color-bg, #F3F4F6);
}
@media (hover: hover) {
  .note-list-memory-card-shell:has(.note-list-memory-card-main:active) {
    transform: scale(0.99);
    box-shadow: var(--shadow-card-press);
  }
}
.note-list-memory-card .memory-card {
  width: 100%;
  margin: 0;
  padding: 18px 18px 10px;
  align-items: stretch;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.note-list-memory-card .memory-card:active {
  transform: none;
  box-shadow: none;
}
.note-list-memory-card-main {
  width: 100%;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}
.note-list-memory-card--link .note-list-memory-card-main.memory-card {
  padding-bottom: 8px;
}
.note-list-memory-card-shell > .note-list-card-foot {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  justify-content: space-between;
  gap: 10px;
  min-height: 28px;
  line-height: 1;
  padding: 0 18px 14px;
  margin-top: 0;
  pointer-events: auto;
}
.note-list-card-foot-meta,
.note-list-card-foot-actions,
.note-list-card-foot-append,
.note-list-memory-card-more {
  pointer-events: auto;
}
.note-list-memory-card-main .memory-card-head,
.note-list-memory-card-main .memory-card-head-row,
.note-list-memory-card-main .memory-card-head-main,
.note-list-memory-card-main .memory-card-icon,
.note-list-memory-card-main .memory-card-body,
.note-list-memory-card-main .memory-card-title,
.note-list-memory-card-main .memory-card-preview,
.note-list-memory-card-main .memory-card-preview-box,
.note-list-memory-card-main .memory-card-source-box {
  pointer-events: none;
}
.note-list-memory-card-main .memory-card-thumb,
.note-list-memory-card-main .memory-card-expand,
.note-list-memory-card-main .memory-card-preview-text-wrap {
  pointer-events: auto;
}
.note-list-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  flex-wrap: nowrap;
  margin-top: 0;
  box-sizing: border-box;
}
.note-list-card-foot-meta {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: 28px;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
}
.note-list-card-foot-meta .memory-card-meta-dot {
  flex-shrink: 0;
}
.note-list-card-foot-actions {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 32px;
  line-height: 1;
  margin-left: 4px;
}
.note-list-card-foot-append {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}
.note-list-memory-card .memory-card-append-count {
  white-space: nowrap;
  height: 20px;
  align-items: center;
}
.note-list-memory-card-more {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  margin: 0;
  padding: 0;
  border: none;
  background: #EBEDF0;
  color: #6B7280;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s ease, box-shadow 0.15s ease;
  position: relative;
  z-index: 2;
}
.note-list-memory-card-more-icon {
  display: block;
  width: 16px;
  height: 16px;
  pointer-events: none;
}
.note-list-memory-card-more:active {
  background: #DFE1E5;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1);
}

.shorthand-feed-list .note-list-memory-card {
  margin: 0;
}

/* legacy simple cards (fallback) */
.note-list-card {
  position: relative;
  background: var(--color-card);
  border-radius: var(--radius-md);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}
.note-list-card-main {
  display: block;
  width: 100%;
  padding: 14px 44px 12px 14px;
  border: none;
  background: none;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}
.note-list-card-main:active { background: var(--color-bg); }
.note-list-card-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.45;
  color: var(--color-text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.note-list-card-preview {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--color-text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.note-list-card .note-list-card-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  font-size: 12px;
  color: var(--color-text-tertiary);
}
.note-list-card-tag {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  background: var(--color-brand-light, #DBEAFE);
  color: var(--color-brand-dark, #2563EB);
}
.note-list-card-more {
  position: absolute;
  right: 4px;
  bottom: 8px;
  width: 36px;
  height: 36px;
  border: none;
  background: none;
  color: var(--color-text-tertiary);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  border-radius: 8px;
}
.note-list-card-more:active { background: var(--color-bg); }

/* 笔记列表 · 操作面板（参考 Get 笔记） */
.note-list-sheet {
  position: fixed;
  inset: 0;
  z-index: 10003;
  display: none;
  align-items: flex-end;
  justify-content: center;
}
.note-list-sheet.open { display: flex; }
.note-list-sheet-mask {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}
.note-list-sheet-panel {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: #F3F4F6;
  border-radius: 20px 20px 0 0;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  animation: note-list-sheet-up 0.24s ease;
}
@keyframes note-list-sheet-up {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
.note-list-sheet-handle {
  width: 36px;
  height: 4px;
  border-radius: 2px;
  background: #D1D5DB;
  margin: 10px auto 0;
}
.note-list-sheet-inner {
  margin: 10px 12px 0;
  background: var(--color-card);
  border-radius: 16px;
  overflow: hidden;
}
.note-list-sheet-body {
  max-height: min(72vh, 560px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.note-list-sheet-inner--secondary {
  margin-top: 8px;
  margin-bottom: 4px;
}

/* 笔记纠错 · 查找替换 */
.note-correct-overlay .rd-sheet { max-height: min(92vh, 760px); }
.note-correct-sheet .rd-sheet-head { padding-top: 10px; }
.note-correct-replace-btn {
  border: none;
  background: var(--color-bg, #F3F4F6);
  color: var(--color-text-tertiary);
  font-size: 14px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
}
.note-correct-replace-btn:not(:disabled) {
  background: var(--color-brand, #2563EB);
  color: #fff;
}
.note-correct-fields { padding: 12px 16px 0; display: flex; flex-direction: column; gap: 10px; }
.note-correct-field {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  height: 44px;
  border-radius: 12px;
  background: var(--color-bg, #F3F4F6);
}
.note-correct-field input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 15px;
  font-family: inherit;
  outline: none;
}
.note-correct-field-icon { font-size: 16px; opacity: 0.55; }
.note-correct-results {
  flex: 1;
  min-height: 180px;
  padding: 16px;
  overflow-y: auto;
}
.note-correct-empty {
  text-align: center;
  color: var(--color-text-tertiary);
  font-size: 14px;
  padding-top: 48px;
}
.note-correct-count {
  font-size: 13px;
  color: var(--color-text-secondary);
  margin-bottom: 12px;
}
.note-correct-hit {
  padding: 10px 12px;
  margin-bottom: 8px;
  border-radius: 10px;
  background: var(--color-bg, #F9FAFB);
  font-size: 14px;
  line-height: 1.5;
  word-break: break-all;
}
#noteActionTagOverlay,
#caseDetailTagOverlay,
#noteActionKbOverlay,
#noteCorrectOverlay {
  z-index: 10010;
}

/* ===== 添加标签弹窗 v2（设计稿） ===== */
#noteActionTagOverlay .rd-sheet-mask,
#caseDetailTagOverlay .rd-sheet-mask {
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
#noteActionTagOverlay .note-tag-sheet,
#caseDetailTagOverlay .note-tag-sheet {
  max-height: min(85vh, 680px);
  border-radius: var(--radius-lg, 16px) var(--radius-lg, 16px) 0 0;
}
.note-tag-sheet-handle {
  padding: 10px 0 6px;
  display: flex;
  justify-content: center;
  flex-shrink: 0;
}
.note-tag-sheet-handle::after {
  content: "";
  display: block;
  width: 36px;
  height: 4px;
  border-radius: 2px;
  background: var(--color-border-light, #F1F3F5);
}
.note-tag-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 18px 14px;
  flex-shrink: 0;
}
.note-tag-sheet-title {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: var(--color-text-primary, #111827);
  letter-spacing: -0.2px;
}
.note-tag-sheet-close {
  width: 32px;
  height: 32px;
  border: none;
  background: var(--color-border-light, #F1F3F5);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}
.note-tag-sheet-close:active { background: #E5E7EB; }
.note-tag-sheet-close svg {
  width: 16px;
  height: 16px;
  stroke: var(--color-text-secondary, #6B7280);
  stroke-width: 2;
}
.note-tag-sheet-search {
  padding: 0 18px 14px;
  flex-shrink: 0;
}
.note-tag-search-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  background: var(--color-border-light, #F1F3F5);
  border-radius: var(--radius-md, 12px);
  border: 1.5px solid transparent;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.note-tag-search-wrap:focus-within {
  background: #fff;
  border-color: var(--color-brand, #2563EB);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
.note-tag-search-icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  stroke: var(--color-text-tertiary, #9CA3AF);
  stroke-width: 2;
}
.note-tag-search-wrap:focus-within .note-tag-search-icon {
  stroke: var(--color-brand, #2563EB);
}
.note-tag-search-input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  font-size: 14px;
  color: var(--color-text-primary, #111827);
  outline: none;
  font-family: inherit;
}
.note-tag-search-input::placeholder {
  color: var(--color-text-tertiary, #9CA3AF);
}
.note-tag-search-add {
  flex-shrink: 0;
  padding: 5px 12px;
  border: none;
  border-radius: 6px;
  background: var(--color-brand, #2563EB);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
}
.note-tag-search-add.is-visible {
  opacity: 1;
  pointer-events: auto;
}
.note-tag-sheet-selected-wrap {
  padding: 0 18px 10px;
  flex-shrink: 0;
}
.note-tag-sheet-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-tertiary, #9CA3AF);
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}
.note-tag-selected-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 32px;
}
.note-tag-selected-empty {
  margin: 0;
  font-size: 13px;
  color: var(--color-text-tertiary, #9CA3AF);
  line-height: 32px;
}
.note-tag-cloud-empty {
  margin: 0;
  font-size: 13px;
  color: var(--color-text-tertiary, #9CA3AF);
  line-height: 1.5;
}
.note-tag-selected-chip-x {
  font-size: 14px;
  line-height: 1;
  opacity: 0.85;
}
.note-tag-selected-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 32px;
  padding: 0 12px;
  border-radius: 6px;
  border: none;
  background: var(--color-brand, #2563EB);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
}
.note-tag-selected-chip:active {
  background: var(--color-brand-dark, #1D4ED8);
}
.note-tag-check-icon {
  width: 14px;
  height: 14px;
  stroke: #fff;
  stroke-width: 2.5;
  flex-shrink: 0;
}
.note-tag-sheet-divider {
  height: 0.5px;
  background: rgba(0, 0, 0, 0.06);
  margin: 4px 18px;
  flex-shrink: 0;
}
.note-tag-sheet-body {
  flex: 1;
  overflow-y: auto;
  padding: 10px 18px 20px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.note-tag-sheet-body::-webkit-scrollbar { width: 0; height: 0; }
.note-tag-sheet-group { margin-bottom: 20px; }
.note-tag-sheet-group:last-child { margin-bottom: 0; }
.note-tag-group-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-secondary, #6B7280);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.note-tag-group-title::before {
  content: "";
  display: inline-block;
  width: 3px;
  height: 14px;
  border-radius: 1.5px;
  background: var(--color-brand, #2563EB);
  flex-shrink: 0;
}
.note-tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.note-tag-cloud-chip {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 12px;
  border-radius: 6px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #fff;
  color: var(--color-text-secondary, #6B7280);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
}
.note-tag-cloud-chip:active {
  border-color: var(--color-brand, #2563EB);
  color: var(--color-brand, #2563EB);
  background: var(--color-brand-light, #EFF6FF);
  transform: scale(0.96);
}
.note-tag-sheet-foot {
  padding: 12px 18px calc(12px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 0.5px solid rgba(0, 0, 0, 0.06);
  flex-shrink: 0;
}
.note-tag-sheet-done {
  width: 100%;
  padding: 14px 0;
  border: none;
  border-radius: var(--radius-md, 12px);
  background: linear-gradient(135deg, var(--color-brand, #2563EB) 0%, var(--color-brand-dark, #1D4ED8) 100%);
  color: #fff;
  font-size: 15px;
  font-weight: 650;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
  letter-spacing: 0.2px;
}
.note-tag-sheet-done:active {
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}
.note-list-sheet-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 16px;
  border-bottom: 1px solid var(--color-border-light);
}
.note-list-sheet-head-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}
.note-list-sheet-icon--recording { background: #EDE9FE; }
.note-list-sheet-icon--video { background: #FEF3C7; }
.note-list-sheet-icon--note { background: #D1FAE5; }
.note-list-sheet-icon--link { background: #DBEAFE; }
.note-list-sheet-head-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.45;
  color: var(--color-text-primary);
}
.note-list-sheet-head-meta {
  margin-top: 6px;
  font-size: 12px;
  color: var(--color-text-tertiary);
  line-height: 1.5;
}
.note-list-sheet-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  padding: 12px 8px;
  border-bottom: 1px solid var(--color-border-light);
}
.note-list-sheet-grid-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 8px 4px;
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
  color: var(--color-text-primary);
}
.note-list-sheet-grid-btn:active { opacity: 0.7; }
.note-list-sheet-grid-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--color-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}
.note-list-sheet-rows { padding: 4px 0; }
.note-list-sheet-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  border: none;
  background: none;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  font-size: 14px;
  color: var(--color-text-primary);
  border-bottom: 1px solid var(--color-border-light);
}
.note-list-sheet-row:last-child { border-bottom: none; }
.note-list-sheet-row:active { background: var(--color-bg); }
.note-list-sheet-row-icon { font-size: 18px; width: 24px; text-align: center; }
.note-list-sheet-row-extra {
  margin-left: auto;
  font-size: 13px;
  color: var(--color-text-secondary, #6B7280);
  max-width: 42%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.note-list-sheet-row--danger { color: var(--color-error); }
.note-list-sheet-cancel {
  display: block;
  width: calc(100% - 24px);
  margin: 10px 12px 12px;
  padding: 14px;
  background: var(--color-card);
  border: none;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text-primary);
  cursor: pointer;
}

/* ===== 笔记详情 v4 · 润色卡片 / 原文壳层 / 追加笔记质感（全入口统一） ===== */
/* 笔记详情：面板透明，避免灰蓝色带与长白卡叠层；转写草稿仍用浅底 */
.note-detail-page--v3 #noteTabReading,
.note-detail-page--v3 #noteTabOriginal,
.note-detail-page--v3 #noteTabKnowledgeGraph {
  background: transparent;
  margin: 0;
  padding: 4px 0 8px;
}
.trx-draft-page #voiceDraftPanelTranscript,
.trx-draft-page #voiceDraftPanelNote,
.trx-draft-page #recordingDraftPanelTranscript,
.trx-draft-page #recordingDraftPanelNote {
  background: #f8fafc;
  margin: 0;
  padding: 16px 16px 24px;
}
.note-shell-stack {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.note-shell-stack--v2 {
  gap: 12px;
}
.note-reader-card--v2 {
  border-radius: var(--card-radius-lg, 18px);
  box-shadow: var(--card-shadow, 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.03));
}
.trx-draft-page .note-reader-card-body .note-detail-prose--readable,
.trx-draft-page .note-reader-card-body .note-detail-prose--readable .consumer-story-p,
.trx-draft-page .note-reader-card-body .note-detail-prose--readable .note-detail-prose-p,
.trx-draft-page .note-reader-card-body .note-detail-prose--readable p {
  font-size: 16px;
  line-height: 26px;
  color: #374151;
  margin: 0 0 18px;
  font-weight: 400;
}
.trx-draft-page .note-reader-card-body .note-detail-prose--readable p:last-child,
.trx-draft-page .note-reader-card-body .note-detail-prose--readable .consumer-story-p:last-child,
.trx-draft-page .note-reader-card-body .note-detail-prose--readable .note-detail-prose-p:last-child {
  margin-bottom: 0;
}
.note-reader-card {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 4px 12px -4px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}
.note-reader-card-body {
  padding: 18px 18px 20px;
  font-size: 16px;
  line-height: 26px;
  color: #374151;
  word-break: break-word;
  font-family: inherit;
}
.note-reader-card-body p,
.note-reader-card-body .consumer-story-p,
.note-reader-card-body .note-detail-prose-p {
  margin: 0 0 18px;
  font-size: 16px;
  line-height: 26px;
  color: inherit;
  font-family: inherit;
  font-weight: 400;
}
.note-reader-card-body p:last-child,
.note-reader-card-body .consumer-story-p:last-child,
.note-reader-card-body .note-detail-prose-p:last-child {
  margin-bottom: 0;
}
.note-reader-card-body .trx-draft-reading {
  font-size: 16px;
  line-height: 26px;
  color: inherit;
}
.note-reader-card-body .transcript-body p {
  margin-bottom: 18px;
}
.note-reader-card-body .transcript-timestamp {
  display: inline-block;
  font-size: 12px;
  color: var(--color-text-tertiary, #94a3b8);
  font-weight: 500;
  margin-right: 6px;
  vertical-align: 1px;
}
.note-detail-page--v3 .note-detail-tags .note-tag-chip,
.note-detail-page--v3 .note-detail-tags .note-tag-more,
.note-detail-page--v3 .note-detail-tags .note-tag-chip--kb {
  border-radius: 4px !important;
  background: #fff !important;
  border: 1px solid #ebebeb !important;
  color: #999 !important;
  font-weight: 400 !important;
}
.note-detail-page--v3 .note-reading-cards {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.note-detail-page--v3 .note-reading-intro {
  font-size: 16px;
  line-height: 1.85;
  color: var(--color-text-secondary, #6b7280);
}
.note-detail-page--v3 .note-reading-intro p {
  margin: 0 0 14px;
}
.note-detail-page--v3 .note-reading-intro p:last-child {
  margin-bottom: 0;
}
.note-detail-page--v3 .note-detail-prose--structured .note-reader-card-body h2,
.note-detail-page--v3 .note-detail-prose--structured .note-reader-card-body h3,
.note-detail-page--v3 .note-detail-prose--structured .note-reading-default-block h2,
.note-detail-page--v3 .note-detail-prose--structured .note-reading-default-block h3 {
  font-size: 16px;
  font-weight: 700;
  line-height: 26px;
  margin: 18px 0 10px;
  color: var(--color-text-primary);
}
.note-detail-page--v3 .note-detail-prose--structured .note-reader-card-body h2:first-child,
.note-detail-page--v3 .note-detail-prose--structured .note-reader-card-body h3:first-child,
.note-detail-page--v3 .note-detail-prose--structured .note-reading-default-block h2:first-child,
.note-detail-page--v3 .note-detail-prose--structured .note-reading-default-block h3:first-child {
  margin-top: 0;
}
.note-reading-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding-left: 2px;
}
.note-reading-section-icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 16px;
  line-height: 1;
}
.note-reading-section-icon--blue {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
}
.note-reading-section-icon--purple {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}
.note-reading-section-icon--green {
  background: linear-gradient(135deg, #10b981, #059669);
}
.note-reading-section-icon--orange {
  background: linear-gradient(135deg, #f59e0b, #d97706);
}
.note-reading-section-icon--gold {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
}
.note-reading-section-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text-primary);
  line-height: 1.35;
}
.note-detail-page--v3 .note-detail-prose--structured .note-reading-section-title,
.trx-draft-page #voiceDraftNoteSummary .note-detail-prose--structured .note-reading-section-title,
.trx-draft-page #recordingDraftNoteSummary .note-detail-prose--structured .note-reading-section-title {
  margin: 0 !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  color: var(--color-text-primary) !important;
}
.note-detail-page--v3 .note-detail-prose--structured .note-reading-point-title,
.trx-draft-page #voiceDraftNoteSummary .note-detail-prose--structured .note-reading-point-title,
.trx-draft-page #recordingDraftNoteSummary .note-detail-prose--structured .note-reading-point-title {
  margin: 0 !important;
  font-size: 15px !important;
  font-weight: 650 !important;
  color: var(--color-text-primary) !important;
}
.note-detail-page--v3 .note-detail-prose--structured .note-reading-cards--plain h2,
.trx-draft-page #voiceDraftNoteSummary .note-detail-prose--structured .note-reading-cards--plain h2,
.trx-draft-page #recordingDraftNoteSummary .note-detail-prose--structured .note-reading-cards--plain h2 {
  font-size: 17px !important;
}
.note-reading-background-card {
  background: #fff;
  border-radius: 14px;
  padding: 16px 18px;
  box-shadow: none;
  font-size: 16px;
  line-height: 26px;
  color: #374151;
}
.note-reading-background-card p,
.note-reading-default-block p {
  margin: 0 0 18px;
}
.note-reading-point-body p {
  margin: 0 0 18px;
}
.note-reading-point-body p:last-child,
.note-reading-background-card p:last-child,
.note-reading-default-block p:last-child {
  margin-bottom: 0;
}
.note-reading-default-block {
  background: #fff;
  border-radius: 14px;
  padding: 16px 18px;
  box-shadow: none;
  font-size: 16px;
  line-height: 26px;
  color: #374151;
}
.note-reading-default-block .note-md-table-wrap,
.note-reading-background-card .note-md-table-wrap {
  margin: 0 -18px;
  padding: 0 18px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: none;
}
.note-reading-default-block .note-md-table,
.note-reading-background-card .note-md-table {
  width: max-content;
  min-width: 100%;
  font-size: 13px;
}
.note-reading-default-block .note-md-table th,
.note-reading-default-block .note-md-table td,
.note-reading-background-card .note-md-table th,
.note-reading-background-card .note-md-table td {
  min-width: 96px;
  max-width: none;
}
.note-reading-ai-tip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
  padding: 14px 16px;
  border-radius: 14px;
  background: linear-gradient(135deg, #eff6ff 0%, #f0fdf4 100%);
  border: 0.5px solid rgba(59, 130, 246, 0.12);
}
.note-reading-ai-tip-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--color-text-secondary, #6b7280);
}
.note-reading-ai-tip-text strong {
  font-size: 14px;
  color: var(--color-text-primary);
  font-weight: 650;
}
.note-reading-ai-tip-btn {
  flex-shrink: 0;
  padding: 8px 14px;
  border: none;
  border-radius: 999px;
  background: var(--color-brand, #3b82f6);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.note-reading-ai-tip-btn:active {
  opacity: 0.88;
}
.note-detail-page--v3 .note-detail-prose--structured .note-reading-section + .note-reading-section,
.trx-draft-page #voiceDraftNoteSummary .note-detail-prose--structured .note-reading-section + .note-reading-section,
.trx-draft-page #recordingDraftNoteSummary .note-detail-prose--structured .note-reading-section + .note-reading-section {
  margin-top: 4px;
}
.note-detail-page--v3 .note-detail-prose--structured .note-reading-background-card ul,
.note-detail-page--v3 .note-detail-prose--structured .note-reading-default-block ul,
.note-detail-page--v3 .note-detail-prose--structured .note-reading-background-card ol,
.note-detail-page--v3 .note-detail-prose--structured .note-reading-default-block ol,
.trx-draft-page #voiceDraftNoteSummary .note-detail-prose--structured .note-reading-background-card ul,
.trx-draft-page #voiceDraftNoteSummary .note-detail-prose--structured .note-reading-default-block ul,
.trx-draft-page #voiceDraftNoteSummary .note-detail-prose--structured .note-reading-background-card ol,
.trx-draft-page #voiceDraftNoteSummary .note-detail-prose--structured .note-reading-default-block ol,
.trx-draft-page #recordingDraftNoteSummary .note-detail-prose--structured .note-reading-background-card ul,
.trx-draft-page #recordingDraftNoteSummary .note-detail-prose--structured .note-reading-default-block ul,
.trx-draft-page #recordingDraftNoteSummary .note-detail-prose--structured .note-reading-background-card ol,
.trx-draft-page #recordingDraftNoteSummary .note-detail-prose--structured .note-reading-default-block ol {
  margin: 0;
  padding-left: 1.2em;
}
.note-reading-default-block ol > li > ul,
.note-reading-background-card ol > li > ul,
.note-markdown-body ol > li > ul {
  margin: 8px 0 4px;
  padding-left: 1.2em;
}
.note-detail-page--v3 .note-detail-prose--structured .note-reading-background-card li,
.note-detail-page--v3 .note-detail-prose--structured .note-reading-default-block li,
.trx-draft-page #voiceDraftNoteSummary .note-detail-prose--structured .note-reading-background-card li,
.trx-draft-page #voiceDraftNoteSummary .note-detail-prose--structured .note-reading-default-block li,
.trx-draft-page #recordingDraftNoteSummary .note-detail-prose--structured .note-reading-background-card li,
.trx-draft-page #recordingDraftNoteSummary .note-detail-prose--structured .note-reading-default-block li {
  margin-bottom: 10px;
  font-weight: 400;
}
.note-reading-point-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.note-reading-points-group {
  background: #fff;
  border-radius: 14px;
  padding: 16px 18px;
  border: 0.5px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 4px 12px -4px rgba(0, 0, 0, 0.06);
}
.note-reading-points-intro {
  margin-bottom: 16px;
}
.note-reading-points-intro p:last-child {
  margin-bottom: 0;
}
.note-reading-point-item + .note-reading-point-item {
  margin-top: 20px;
}
.note-reading-points-intro + .note-reading-point-item {
  margin-top: 0;
}
.note-reading-point-bullet {
  color: #6b7280;
  font-weight: 400;
}
.note-reading-point-item--bullet .note-reading-point-title {
  font-weight: 400;
}
.note-reading-point-item--prose-only .note-reading-point-body p {
  margin: 0;
  font-size: 16px;
  line-height: 1.7;
  color: #374151;
  font-weight: 400;
}
.note-reading-point-item--orphan .note-reading-point-body p {
  margin: 0 0 18px;
}
.note-reading-point-item--orphan .note-reading-point-body p:last-child {
  margin-bottom: 0;
}
.note-reading-point-item--prose-only + .note-reading-point-item--prose-only {
  margin-top: 12px;
}
.note-reading-point-card {
  background: #fff;
  border-radius: 14px;
  padding: 16px 18px;
  border: 0.5px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 4px 12px -4px rgba(0, 0, 0, 0.06);
}
.note-reading-point-item.is-collapsed-hidden {
  display: none;
}
.note-reading-point-card.is-collapsed-hidden {
  display: none;
}
.note-reading-point-head {
  margin-bottom: 8px;
}
.note-reading-point-num {
  font-weight: inherit;
}
.note-reading-point-title {
  margin: 0;
  font-size: 15px;
  font-weight: 650;
  color: var(--color-text-primary);
  line-height: 1.45;
}
.note-reading-point-body {
  font-size: 16px;
  line-height: 26px;
  color: #4b5563;
  font-weight: 400;
}
.note-reading-point-body p,
.note-reading-point-body p strong,
.note-reading-point-body li,
.note-reading-point-body li strong {
  font-weight: 400;
}
.note-reading-point-body ul,
.note-reading-point-body ol {
  margin: 0;
  padding-left: 1.2em;
}
.note-reading-point-body li {
  margin-bottom: 8px;
  font-weight: 400;
}
.note-reading-point-body li:last-child {
  margin-bottom: 0;
}
.note-training-point-fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 4px;
}
.note-training-point-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.note-training-point-field-label {
  font-size: 12px;
  font-weight: 650;
  color: #6b7280;
  letter-spacing: 0.02em;
}
.note-training-point-field-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
  color: #374151;
  font-weight: 400;
}
.note-training-point-field--mnemonic .note-training-point-field-text {
  color: #047857;
}
.note-training-point-field--usage .note-training-point-field-text {
  color: #1f2937;
}
.note-training-action-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #fff;
  border-radius: 14px;
  padding: 14px 16px;
  border: 0.5px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 4px 12px -4px rgba(0, 0, 0, 0.06);
}
.note-training-action-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f8fafc;
}
.note-training-action-item + .note-training-action-item {
  margin-top: 0;
}
.note-training-action-label {
  font-size: 12px;
  font-weight: 650;
  color: #059669;
}
.note-training-action-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
  color: #374151;
  font-weight: 400;
}
.note-reading-quote-block--gold {
  background: #fffbeb;
  border-left-color: #f59e0b;
  color: #78350f;
}
.note-reading-quote-block {
  background: #eff6ff;
  border-left: 3px solid var(--color-brand, #3b82f6);
  border-radius: 0 10px 10px 0;
  padding: 12px 16px;
  margin-top: 10px;
  font-size: 14px;
  color: var(--color-text-secondary, #6b7280);
  line-height: 1.7;
}
.note-reading-quote-block strong {
  color: var(--color-text-primary);
}
.note-reading-expand-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 14px;
  margin-top: 2px;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.07);
  background: #f8fafc;
  color: var(--color-brand, #3b82f6);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
}
.note-reading-expand-toggle:active {
  background: #eff6ff;
}
.note-reading-expand-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  background: var(--color-brand, #3b82f6);
  color: #fff;
  font-size: 11px;
  font-weight: 650;
  padding: 0 6px;
}
.note-detail-page--v3 .note-detail-prose--original,
.note-reader-card-body.note-detail-prose--original {
  font-size: 16px;
  line-height: 1.85;
  color: #374151;
}
.note-detail-page--v3 .note-detail-prose--original p,
.note-reader-card-body.note-detail-prose--original p {
  margin: 0 0 18px;
  text-align: justify;
}
.note-detail-page--v3 .note-detail-prose--original p:last-child,
.note-reader-card-body.note-detail-prose--original p:last-child {
  margin-bottom: 0;
}
.note-original-divider {
  text-align: center;
  color: var(--color-text-tertiary, #94a3b8);
  font-size: 14px;
  letter-spacing: 8px;
  margin: 24px 0 20px;
}
.note-original-tip-card {
  background: linear-gradient(135deg, #eff6ff 0%, #f0fdf4 100%);
  border-radius: 14px;
  padding: 16px 18px;
  margin-top: 24px;
  border: 0.5px solid rgba(59, 130, 246, 0.12);
}
.note-original-tip-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--color-brand, #3b82f6);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  font-size: 18px;
  line-height: 1;
}
.note-original-tip-title {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 650;
  color: var(--color-text-primary);
}
.note-original-tip-desc {
  margin: 0;
  font-size: 13px;
  color: var(--color-text-secondary, #6b7280);
  line-height: 1.6;
}
.note-original-tip-action {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 12px;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--color-brand, #3b82f6);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
}
.note-original-tip-action:active {
  opacity: 0.88;
}
.note-detail-page--v3 .note-append-list,
.trx-draft-page #voiceDraftPanelAppend .note-append-list,
.trx-draft-page #recordingDraftPanelAppend .note-append-list {
  gap: 14px;
  padding: 4px 0 8px;
}
.note-detail-page--v3 .note-append-card-main,
.trx-draft-page #voiceDraftPanelAppend .note-append-card-main,
.trx-draft-page #recordingDraftPanelAppend .note-append-card-main {
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 4px 12px -4px rgba(0, 0, 0, 0.06);
  border: 0.5px solid transparent;
}
.note-detail-page--v3 .note-append-card-wrap--ai .note-append-card-main,
.trx-draft-page #voiceDraftPanelAppend .note-append-card-wrap--ai .note-append-card-main,
.trx-draft-page #recordingDraftPanelAppend .note-append-card-wrap--ai .note-append-card-main {
  border: 1.5px solid rgba(59, 130, 246, 0.25);
  background: linear-gradient(135deg, #fafcff, #f8faff);
}
.note-detail-page--v3 .note-reading-failed .note-tab-empty-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fef2f2, #fee2e2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  opacity: 1;
}
.note-detail-page--v3 .note-reading-generating .note-reading-skeleton {
  margin-top: 20px;
  width: 100%;
  max-width: 320px;
}
@media screen and (max-width: 360px) {
  .note-detail-page--v3 .note-reading-background-card,
  .note-detail-page--v3 .note-reading-point-card,
  .note-detail-page--v3 .note-reading-default-block,
  .note-detail-page--v3 #noteTabKnowledgeGraph .note-reading-default-block,
  .note-reader-card-body {
    padding: 14px;
  }
  .note-reading-default-block .note-md-table-wrap,
  .note-reading-background-card .note-md-table-wrap {
    margin-left: -14px;
    margin-right: -14px;
    padding-left: 14px;
    padding-right: 14px;
  }
  .note-detail-page--v3 .note-reading-section-title {
    font-size: 15px;
  }
  .note-detail-page--v3 #noteTabKnowledgeGraph .note-reading-default-block .note-kg-list li {
    font-size: 14px;
  }
  .note-detail-page--v3 .note-reading-point-title {
    font-size: 14px;
  }
  .note-detail-page--v3 .note-reading-point-body,
  .note-detail-page--v3 .note-reading-point-body p {
    font-size: 16px;
    line-height: 26px;
  }
  .note-detail-page--v3 .note-append-card-main,
  .trx-draft-page #voiceDraftPanelAppend .note-append-card-main,
  .trx-draft-page #recordingDraftPanelAppend .note-append-card-main {
    padding: 14px;
  }
  .note-original-tip-card {
    padding: 14px;
  }
}

/* 知识图谱 Tab · 与原文润色统一 */
.note-kg-panel-body {
  min-height: 120px;
}
.note-detail-page--v3 #noteTabKnowledgeGraph .note-reading-cards {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.note-detail-page--v3 #noteTabKnowledgeGraph .note-reading-section + .note-reading-section {
  margin-top: 28px;
}
.note-kg-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  padding: 0 2px 2px;
  margin-top: 0;
  overflow: visible;
}
.note-kg-stats .note-tag-chip {
  flex: 0 0 auto;
  max-width: none;
}
.note-kg-source {
  margin-left: auto;
  font-size: 12px;
  color: var(--color-text-tertiary, #94a3b8);
}
.note-detail-page--v3 #noteTabKnowledgeGraph .note-kg-chips {
  margin-top: 0;
  overflow: visible;
}
.note-detail-page--v3 #noteTabKnowledgeGraph .note-kg-chips .note-tag-chip {
  flex: 0 0 auto;
  max-width: none;
}
.note-detail-page--v3 #noteTabKnowledgeGraph .note-reading-default-block .note-kg-list {
  margin: 0;
  padding-left: 1.2em;
}
.note-detail-page--v3 #noteTabKnowledgeGraph .note-reading-default-block .note-kg-list li {
  margin-bottom: 10px;
  font-size: 16px;
  line-height: 1.75;
  color: #374151;
  font-weight: 400;
}
.note-detail-page--v3 #noteTabKnowledgeGraph .note-reading-default-block .note-kg-list li:last-child {
  margin-bottom: 0;
}
.note-detail-page--v3 #noteTabKnowledgeGraph .note-kg-support {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--color-text-tertiary, #94a3b8);
}
.note-detail-page--v3 #noteTabKnowledgeGraph .note-kg-foot {
  margin: 0;
  padding: 0 2px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--color-text-tertiary, #94a3b8);
}
.note-kg-loading {
  padding: 8px 0;
}

/* 知识地图 + 主题聚合 */
.km-page .km-content,
.km-page .km-topic-content {
  padding: 0 16px 24px;
}
.km-hero {
  padding: 12px 0 16px;
}
.km-hero-title {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 600;
  color: var(--color-text-primary, #111827);
}
.km-hero-desc {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--color-text-secondary, #6b7280);
}
.km-body { padding-bottom: 16px; }
.km-loading,
.km-empty {
  padding: 32px 0;
  text-align: center;
  color: var(--color-text-secondary, #6b7280);
}
.km-empty-icon { font-size: 36px; margin-bottom: 8px; }
.km-empty-title { margin: 0 0 6px; font-size: 15px; font-weight: 600; color: var(--color-text-primary, #111827); }
.km-empty-desc { margin: 0; font-size: 13px; line-height: 1.5; }
.km-section { margin-bottom: 20px; }
.km-section-title {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-primary, #111827);
}
.km-tag-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.km-tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: none;
  border-radius: 999px;
  background: var(--color-fill-secondary, #f3f4f6);
  color: var(--color-text-primary, #1f2937);
  font-size: 13px;
  line-height: 1.3;
  cursor: pointer;
}
.km-tag-chip--lg {
  padding: 8px 14px;
  font-size: 14px;
  background: #eef2ff;
  color: #3730a3;
}
.km-tag-count {
  font-size: 12px;
  color: var(--color-text-tertiary, #9ca3af);
}
.km-tag-chip--lg .km-tag-count { color: #6366f1; }
.km-domain-block {
  margin-bottom: 14px;
  padding: 12px;
  border-radius: 12px;
  background: var(--color-fill-secondary, #f9fafb);
}
.km-domain-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0;
  border: none;
  background: transparent;
  font: inherit;
  cursor: pointer;
  text-align: left;
}
.km-domain-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text-primary, #111827);
}
.km-domain-count {
  font-size: 12px;
  color: var(--color-text-tertiary, #9ca3af);
}
.km-domain-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.km-topic-head {
  padding: 8px 16px 12px;
  border-bottom: 1px solid var(--color-border, #f0f0f0);
}
.km-topic-count {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-text-primary, #111827);
}
.km-topic-facet {
  margin-top: 4px;
  font-size: 13px;
  color: var(--color-text-secondary, #6b7280);
}
.km-topic-list { padding-top: 8px; }
.note-tag-chip--link,
.trx-draft-tag-chip--link {
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  appearance: none;
  -webkit-appearance: none;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
.note-tag-chip--link:active,
.trx-draft-tag-chip--link:active {
  opacity: 0.75;
}
.shorthand-km-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 12px;
  padding: 12px 14px;
  border: none;
  border-radius: 12px;
  width: 100%;
  background: linear-gradient(135deg, #eef2ff 0%, #f5f3ff 100%);
  cursor: pointer;
  text-align: left;
}
.shorthand-km-entry-title {
  font-size: 15px;
  font-weight: 600;
  color: #3730a3;
}
.shorthand-km-entry-desc {
  margin-top: 2px;
  font-size: 12px;
  color: #6366f1;
}
.shorthand-km-entry-arrow {
  font-size: 18px;
  color: #6366f1;
}

.note-script-copy-line {
  position: relative;
  display: block;
  margin: 8px 0 0;
  padding: 12px 44px 12px 12px;
  border-radius: 10px;
  background: rgba(124, 58, 237, 0.06);
  border: 0.5px solid rgba(124, 58, 237, 0.12);
}
.note-script-copy-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
  color: var(--color-text-primary, #111827);
  word-break: break-word;
  white-space: pre-wrap;
}
.note-script-copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #7c3aed;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.note-script-copy-btn:active {
  background: rgba(124, 58, 237, 0.12);
}
.note-script-copy-icon {
  display: block;
  width: 18px;
  height: 18px;
  pointer-events: none;
}
.note-script-copy-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.note-script-plain-field {
  margin-top: 6px;
  font-size: 14px;
  line-height: 1.55;
}
.note-moments-copy-block {
  margin-top: 4px;
}
.note-moments-copy-empty {
  margin: 0;
  font-size: 13px;
  color: var(--color-text-secondary, #6b7280);
  line-height: 1.5;
}
.note-moments-copy-block .note-script-copy-line {
  margin-top: 0;
}

.moments-poster-panel {
  margin: 20px 0 8px;
  padding: 16px;
  border-radius: 14px;
  background: linear-gradient(180deg, #f0fdf4 0%, #fff 40%);
  border: 0.5px solid rgba(7, 193, 96, 0.18);
}
.moments-poster-head {
  margin-bottom: 12px;
}
.moments-poster-title {
  font-size: 16px;
  font-weight: 700;
  color: #065f46;
}
.moments-poster-sub {
  margin-top: 4px;
  font-size: 12px;
  color: #6b7280;
  line-height: 1.45;
}
.moments-poster-preview-wrap {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #f3f4f6;
  min-height: 200px;
}
.moments-poster-preview {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: top;
}
.moments-poster-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: #6b7280;
  background: rgba(255, 255, 255, 0.72);
}
.moments-poster-label {
  margin: 14px 0 8px;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
}
.moments-poster-qr-targets {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}
.moments-poster-target {
  flex: 1;
  padding: 10px 12px;
  border-radius: 10px;
  border: 0.5px solid rgba(0, 0, 0, 0.1);
  background: #fff;
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.moments-poster-target.is-active {
  border-color: #07c160;
  background: #ecfdf5;
  color: #047857;
  font-weight: 600;
}
.moments-poster-actions {
  display: flex;
  gap: 10px;
}
.moments-poster-btn {
  flex: 1;
  padding: 12px 14px;
  border-radius: 10px;
  border: 0.5px solid rgba(0, 0, 0, 0.1);
  background: #fff;
  font-size: 15px;
  font-weight: 600;
  color: #374151;
  cursor: pointer;
}
.moments-poster-btn--primary {
  flex: 1.4;
  border: none;
  background: linear-gradient(135deg, #059669 0%, #07c160 100%);
  color: #fff;
  box-shadow: 0 2px 8px rgba(7, 193, 96, 0.28);
}
.moments-poster-tip {
  margin: 10px 0 0;
  font-size: 12px;
  color: #9ca3af;
  line-height: 1.5;
}
