/* 第 12 轮 · 丙：素材库（文件管理器）与「从素材库选」。
   类名一律 r12l- 开头，不复用老类名；颜色、圆角、时长全部取 r12-system.css 的变量。 */

/* ── 1. 页面骨架：左树 220 + 右内容面板 ───────────────────────── */
/* 外壳四周统一留 8（--r12-gutter）：本页不再自带外边距，四边贴着外壳给的位置 */
.r12l-page {
  height: 100%;
  min-height: 0;
  display: flex;
  gap: 8px;
  padding: 0;
  background: transparent;
}

.r12l-page [hidden],
.r12l-tree-row[hidden] { display: none; }

.r12l-tree {
  width: 220px;
  flex: none;
  min-height: 0;
  padding: 8px;
  overflow: hidden;
}

.r12l-tree-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
}

.r12l-group { display: flex; flex-direction: column; }
.r12l-group + .r12l-group { margin-top: 12px; }

.r12l-group-title {
  padding: 0 8px 4px;
  font-size: var(--r12-fs-small, 12px);
  line-height: var(--r12-lh-small, 18px);
  font-weight: 500;
  color: var(--r12-faint);
}

/* ── 2. 文件夹树 ─────────────────────────────────────────────── */
.r12l-tree-row {
  height: 32px;
  display: flex;
  align-items: center;
  margin-bottom: 2px;
  border-radius: 8px;
  color: var(--r12-muted);
  transition: background-color var(--r12-dur-2) var(--r12-ease), box-shadow var(--r12-dur-2) var(--r12-ease);
}

.r12l-tree-row.is-depth-1 { padding-left: 14px; }
.r12l-tree-row.is-depth-2 { padding-left: 28px; }

.r12l-tree-row:hover { background: var(--r12-hover); }

.r12l-tree-row.is-active {
  background: var(--r12-selected-bg);
  box-shadow: var(--r12-selected-shadow, none);
  color: var(--r12-ink);
}

.r12l-tree-row.is-drop {
  background: var(--r12-selected-bg);
  box-shadow: inset 0 0 0 1px var(--r12-selected-border);
}

.r12l-caret {
  width: 20px;
  height: 32px;
  flex: none;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--r12-faint);
  cursor: pointer;
}

.r12l-caret svg { width: 14px; height: 14px; }
.r12l-caret.is-empty { visibility: hidden; }
.r12l-caret:hover { color: var(--r12-ink); }

.r12l-tree-main {
  flex: 1;
  min-width: 0;
  height: 32px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px 0 2px;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: var(--r12-fs-ui, 13px);
  line-height: var(--r12-lh-ui, 20px);
  font-weight: 500;
  text-align: left;
  cursor: pointer;
}

.r12l-tree-main.is-renaming { padding-right: 8px; }

.r12l-tree-icon { display: grid; place-items: center; flex: none; }
.r12l-tree-icon svg { width: 16px; height: 16px; }

.r12l-tree-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.r12l-tree-count {
  flex: none;
  font-size: var(--r12-fs-small, 12px);
  line-height: var(--r12-lh-small, 18px);
  color: var(--r12-faint);
  font-variant-numeric: tabular-nums;
}

.r12l-tree-row.is-inbox .r12l-tree-icon,
.r12l-tree-row.is-inbox .r12l-tree-label { color: var(--r12-running); }

.r12l-sys-tag {
  flex: none;
  height: 18px;
  padding: 0 6px;
  border-radius: var(--r12-r-pill);
  background: color-mix(in srgb, var(--r12-running) 16%, transparent);
  color: var(--r12-running);
  font-size: var(--r12-fs-small, 12px);
  line-height: var(--r12-lh-small, 18px);
  font-weight: 500;
}

.r12l-rename {
  flex: 1;
  min-width: 0;
  height: 24px;
  padding: 0 6px;
  border: 1px solid var(--r12-selected-border);
  border-radius: 6px;
  background: var(--r12-surface-3);
  color: var(--r12-ink);
  font-size: var(--r12-fs-ui, 13px);
  line-height: var(--r12-lh-ui, 20px);
  outline: none;
}

.r12l-tree-main:focus-visible,
.r12l-card-main:focus-visible,
.r12l-tree-row:focus-visible {
  outline: 2px solid var(--r12-ink);
  outline-offset: 2px;
}

/* ── 3. 内容面板：标题行（三栏网格）与归属说明 ─────────────────── */
.r12l-content { flex: 1; min-width: 0; min-height: 0; overflow: hidden; }

.r12l-head {
  flex: none;
  height: 44px;
  min-height: 44px;
  max-height: 44px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 0 16px;
}

.r12l-head.is-batch {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.r12l-head-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
}

.r12l-head-name {
  font-size: var(--r12-fs-title, 15px);
  line-height: var(--r12-lh-title, 22px);
  font-weight: 600;
  color: var(--r12-ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.r12l-head-count {
  flex: none;
  font-size: var(--r12-fs-small, 12px);
  line-height: var(--r12-lh-small, 18px);
  color: var(--r12-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.r12l-head-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
}

.r12l-head-right > * { flex: none; }

.r12l-head-center { justify-self: center; }

.r12l-note {
  flex: none;
  margin: 0;
  padding: 0 16px 6px;
  font-size: var(--r12-fs-small, 12px);
  line-height: var(--r12-lh-small, 18px);
  color: var(--r12-muted);
}

.r12l-note-main { display: block; color: var(--r12-ink); }
.r12l-note-sub { display: block; color: var(--r12-faint); }

/* 搜索：点放大镜在右栏里往左长成 200 宽，不挤动中间的分段 */
.r12l-search {
  width: 200px;
  height: 32px;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 0 2px 0 8px;
  border: 1px solid var(--r12-line);
  border-radius: var(--r12-r-pill);
  background: var(--r12-surface-3);
}

.r12l-search > svg { width: 14px; height: 14px; flex: none; color: var(--r12-muted); }

.r12l-search input {
  flex: 1;
  min-width: 0;
  height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--r12-ink);
  font-size: var(--r12-fs-small, 12px);
  line-height: var(--r12-lh-small, 18px);
  outline: none;
}

/* 视图〔网格｜列表〕 */
.r12l-viewseg .r12-seg-item { padding: 0 8px; }
.r12l-viewseg .r12-seg-item svg { width: 16px; height: 16px; }

.r12l-batch-count {
  font-size: var(--r12-fs-ui, 13px);
  line-height: var(--r12-lh-ui, 20px);
  font-weight: 600;
  color: var(--r12-ink);
}

.r12l-batch-actions { display: flex; align-items: center; gap: 6px; }

/* ── 4. 网格与卡片 ───────────────────────────────────────────── */
.r12l-body { flex: 1; min-height: 0; display: flex; align-items: stretch; }

.r12l-main {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.r12l-grid-wrap {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 2px 16px 16px;
  /* 网格区的滚动条不占布局宽度（macOS 本来就是浮层滚动条）：卡片右边才能和标题行右边对齐 */
  scrollbar-width: none;
}

.r12l-grid-wrap::-webkit-scrollbar { width: 0; height: 0; }

/* 列数随宽度自动增减，列宽在 140 与剩余空间之间伸缩：网格铺满内容区，右边和上面工具条对齐 */
.r12l-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  grid-auto-rows: max-content;
  gap: 10px;
  align-content: start;
}

/* 卡片里的字一律左对齐：老样式里 button 是浏览器默认的居中，这里从卡片到名字、说明逐层定死 */
.r12l-card,
.r12l-card-main,
.r12l-card .r12l-card-body,
.r12l-card .r12-card-name,
.r12l-card .r12-card-meta {
  text-align: left;
}

.r12l-card-main {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
}

/* 缩略图不参与压缩：网格行高被算小的时候也要保持 1:1，卡片高度才是完整的 */
.r12l-card .r12-card-media { flex: none; }

.r12l-card-body {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 2px;
  padding: 0 4px 4px;
  min-width: 0;
  flex: none;
}

.r12l-card-body .r12-card-name,
.r12l-card-body .r12-card-meta {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
}

/* 「从素材库选」的卡：宽 120，其余和素材库同一套 */
.r12l-card--pick { width: 120px; }

.r12l-pick {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  box-shadow: inset 0 0 0 1.5px var(--r12-ink);
  opacity: 0;
  cursor: pointer;
  transition: opacity var(--r12-dur-2) var(--r12-ease);
}

.r12l-card:hover .r12l-pick,
.r12l-card:focus-within .r12l-pick,
.r12l-pick[aria-pressed='true'] { opacity: 1; }

.r12l-pick[aria-pressed='true'] { box-shadow: none; }

.r12l-pick .r12-check {
  position: absolute;
  inset: 0;
  width: 18px;
  height: 18px;
  display: none;
  border-radius: 50%;
}

.r12l-pick[aria-pressed='true'] .r12-check { display: grid; }

.r12l-pick.is-static { position: static; opacity: 1; }

.r12l-media-badge {
  position: absolute;
  left: 6px;
  bottom: 6px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 18px;
  padding: 0 6px;
  border-radius: var(--r12-r-pill);
  background: var(--r12-scrim);
  color: #fff;
  font-size: var(--r12-fs-small, 12px);
  line-height: var(--r12-lh-small, 18px);
  font-variant-numeric: tabular-nums;
}

.r12l-media-badge svg { width: 12px; height: 12px; }

/* 自绘画面（道具等没有真实图片的文件）在缩略图区里铺满，和照片同一块 1:1 的框 */
.r12-card-media svg.artwork { width: 100%; height: 100%; display: block; }

.r12l-folder-tile { display: grid; place-items: center; color: var(--r12-muted); }
.r12l-folder-tile svg { width: 32px; height: 32px; }

/* 没有画面的文件：缩略图区还是同一个 1:1 的框，内容在框里居中，卡片结构、高度和图片卡完全一致 */
.r12l-tile {
  display: grid;
  place-items: center;
  padding: 10px;
  overflow: hidden;
}

.r12l-tile-inner {
  width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  color: var(--r12-muted);
}

.r12l-tile-inner.is-audio { align-items: center; gap: 6px; }

.r12l-tile-inner > svg { width: 20px; height: 20px; flex: none; }

.r12l-tile-duration {
  font-size: var(--r12-fs-small, 12px);
  line-height: var(--r12-lh-small, 18px);
  color: var(--r12-muted);
  font-variant-numeric: tabular-nums;
}

.r12l-doc-lines { width: 100%; min-width: 0; display: flex; flex-direction: column; gap: 2px; }

.r12l-doc-lines span {
  display: block;
  font-size: var(--r12-fs-small, 12px);
  line-height: var(--r12-lh-small, 18px);
  color: var(--r12-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 预览抽屉里的音频波形 */
.r12l-wave { display: flex; align-items: flex-end; gap: 2px; height: 18px; }
.r12l-wave i { width: 2px; border-radius: 1px; background: currentColor; opacity: .5; }
.r12l-wave i:nth-child(1) { height: 5px; }
.r12l-wave i:nth-child(2) { height: 9px; }
.r12l-wave i:nth-child(3) { height: 14px; }
.r12l-wave i:nth-child(4) { height: 8px; }
.r12l-wave i:nth-child(5) { height: 16px; }
.r12l-wave i:nth-child(6) { height: 11px; }
.r12l-wave i:nth-child(7) { height: 6px; }

/* 列表视图 */
.r12l-list { display: flex; flex-direction: column; gap: 2px; }

.r12l-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 64px 84px 108px 24px;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 10px 0 8px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--r12-ink);
  transition: background-color var(--r12-dur-2) var(--r12-ease), border-color var(--r12-dur-2) var(--r12-ease);
}

.r12l-row:hover { background: var(--r12-hover); border-color: var(--r12-line); }
.r12l-row[aria-selected='true'] { border-color: var(--r12-selected-border); box-shadow: 0 0 0 1px var(--r12-selected-border); }

.r12l-row-main {
  grid-column: span 2;
  min-width: 0;
  height: 44px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.r12l-row-thumb {
  width: 28px;
  height: 28px;
  flex: none;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 6px;
  background: var(--r12-surface-3);
  color: var(--r12-muted);
}

.r12l-row-thumb img { width: 100%; height: 100%; object-fit: cover; }
.r12l-row-thumb svg { width: 16px; height: 16px; }

.r12l-row-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--r12-fs-ui, 13px);
  line-height: var(--r12-lh-ui, 20px);
  font-weight: 500;
}

.r12l-row-cell {
  font-size: var(--r12-fs-small, 12px);
  line-height: var(--r12-lh-small, 18px);
  color: var(--r12-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.r12l-row-cell.is-num { text-align: right; font-variant-numeric: tabular-nums; }

/* 空状态 */
.r12l-empty-wrap { padding: 40px 0 0; }

/* ── 5. 预览抽屉（400 宽，在内容面板里） ───────────────────────── */
.r12l-drawer {
  width: 400px;
  flex: none;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--r12-line);
  animation: r12l-drawer-in var(--r12-dur-4) var(--r12-ease-enter);
}

@keyframes r12l-drawer-in {
  from { opacity: 0; transform: translateX(8px); }
  to { opacity: 1; transform: translateX(0); }
}

html[data-motion='reduced'] .r12l-drawer { animation: none; }

.r12l-drawer-head {
  flex: none;
  height: 44px;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 0 8px 0 16px;
  border-bottom: 1px solid var(--r12-line);
}

.r12l-drawer-title {
  flex: 1;
  min-width: 0;
  font-size: var(--r12-fs-ui, 13px);
  line-height: var(--r12-lh-ui, 20px);
  font-weight: 600;
  color: var(--r12-ink);
}

.r12l-drawer-tools { display: flex; align-items: center; gap: 2px; }

.r12l-drawer-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 12px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* 大图：整块图就是「看大图」的点击区（甲给 .r12-zoomable 做悬停放大镜），不再另放放大按钮 */
.r12l-preview {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: var(--r12-r-media);
  overflow: hidden;
  background: var(--r12-surface-3);
  aspect-ratio: 16 / 9;
}

button.r12l-preview { cursor: zoom-in; }
.r12l-preview.is-square { aspect-ratio: 1 / 1; }
.r12l-preview img { width: 100%; height: 100%; display: block; object-fit: cover; }
.r12l-preview .artwork { width: 100%; height: 100%; display: block; }

.r12l-preview-tile {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--r12-muted);
}

.r12l-preview-tile > svg { width: 32px; height: 32px; }
.r12l-preview-tile small { font-size: var(--r12-fs-small, 12px); line-height: var(--r12-lh-small, 18px); color: var(--r12-muted); }

.r12l-lightbox-folder { font-size: var(--r12-fs-small, 12px); line-height: var(--r12-lh-small, 18px); color: var(--r12-muted); }

.r12l-name-field { display: flex; flex-direction: column; gap: 4px; }

.r12l-name-field > span {
  font-size: var(--r12-fs-small, 12px);
  line-height: var(--r12-lh-small, 18px);
  color: var(--r12-muted);
}

.r12l-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 0;
}

.r12l-meta > div { display: flex; align-items: baseline; gap: 12px; }
.r12l-meta dt { width: 56px; flex: none; font-size: var(--r12-fs-small, 12px); line-height: var(--r12-lh-small, 18px); color: var(--r12-muted); }
.r12l-meta dd { margin: 0; min-width: 0; font-size: var(--r12-fs-ui, 13px); line-height: var(--r12-lh-ui, 20px); color: var(--r12-ink); overflow-wrap: anywhere; }

.r12l-doc-preview {
  padding: 12px;
  border: 1px solid var(--r12-line);
  border-radius: var(--r12-r-control);
  background: var(--r12-surface-3);
}

.r12l-doc-preview p {
  margin: 0 0 6px;
  font-size: var(--r12-fs-small, 12px);
  line-height: var(--r12-lh-small, 18px);
  color: var(--r12-muted);
}

.r12l-doc-preview p:last-child { margin-bottom: 0; }

/* ── 6. 文件夹操作弹窗里的目标列表 ─────────────────────────────── */
.r12l-dialog-note {
  margin: 0 0 10px;
  font-size: var(--r12-fs-ui, 13px);
  line-height: var(--r12-lh-ui, 20px);
  color: var(--r12-muted);
}

.r12l-choice {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 260px;
  overflow-y: auto;
}

.r12l-choice-item {
  height: 32px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--r12-ink);
  font-size: var(--r12-fs-ui, 13px);
  line-height: var(--r12-lh-ui, 20px);
  text-align: left;
  cursor: pointer;
}

.r12l-choice-item:hover { background: var(--r12-hover); }
.r12l-choice-item[aria-pressed='true'] { background: var(--r12-selected-bg); font-weight: 600; }
.r12l-choice-item svg { width: 16px; height: 16px; color: var(--r12-muted); }

.r12l-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 28px 16px;
  border: 1px dashed var(--r12-line-strong);
  border-radius: var(--r12-r-control);
  background: var(--r12-surface-3);
  text-align: center;
}

.r12l-dropzone > svg { width: 24px; height: 24px; color: var(--r12-muted); }
.r12l-dropzone strong { font-size: var(--r12-fs-ui, 13px); line-height: var(--r12-lh-ui, 20px); font-weight: 500; color: var(--r12-ink); }
.r12l-dropzone span { font-size: var(--r12-fs-small, 12px); line-height: var(--r12-lh-small, 18px); color: var(--r12-muted); }

/* ── 7. 「从素材库选」弹窗 ─────────────────────────────────────── */
.r12l-picker { display: flex; gap: 12px; height: min(520px, 56vh); }

.r12l-picker-tree {
  width: 200px;
  flex: none;
  overflow-y: auto;
  padding-right: 8px;
  border-right: 1px solid var(--r12-line);
}

.r12l-picker-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.r12l-picker-head {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 0 10px;
}

.r12l-picker-head strong { font-size: var(--r12-fs-ui, 13px); line-height: var(--r12-lh-ui, 20px); font-weight: 600; color: var(--r12-ink); }
.r12l-picker-head span { font-size: var(--r12-fs-small, 12px); line-height: var(--r12-lh-small, 18px); color: var(--r12-muted); }

.r12l-picker-grid {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, 120px);
  grid-auto-rows: max-content;
  gap: 10px;
  align-content: start;
  padding: 2px 2px 8px;
}

.r12l-picker-grid .r12-card { width: 120px; }
.r12l-picker-grid .r12-card-media { width: 100%; }
.r12l-picker-grid .r12l-card-main { cursor: pointer; }

.r12l-foot-count {
  margin-right: auto;
  font-size: var(--r12-fs-small, 12px);
  line-height: var(--r12-lh-small, 18px);
  color: var(--r12-muted);
  font-variant-numeric: tabular-nums;
}

/* ── 8. 窄窗口：搜索展开时收起次要按钮，分段位置始终不动 ──────── */
@media (max-width: 1520px) {
  .r12l-head.is-searching .r12l-sort,
  .r12l-head.is-searching .r12l-viewseg { display: none; }
}

@media (max-width: 1339px) {
  .r12l-newfolder-text { display: none; }
  .r12l-head.is-searching .r12l-newfolder { display: none; }
}

/* ═══ 七稿（修正单 6） ═══════════════════════════════════════════ */

/* 1. 页面要定位存储面板 */
.r12l-page { position: relative; }

/* 2. 列表 / 卡片的选中样式：圆圈常驻，选中用强调色底加白勾，不再用整行外框 */

/* 七稿 7：老样式给所有 button 压了 min-width / min-height 24，会把看得见的圆撑成 24×24。
   这里按类名归零，并统一按 border-box 量尺寸：列表圆 16、卡片圆 18。 */
.r12l-page .r12l-pick {
  box-sizing: border-box;
  min-width: 0;
  min-height: 0;
  padding: 0;
}

.r12l-pick {
  width: 16px;
  height: 16px;
  border: 1px solid var(--r12-muted);
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
  color: var(--r12-muted);
  opacity: 0;
}

.r12l-card .r12l-pick {
  width: 18px;
  height: 18px;
  border-color: var(--r12-line-strong);
  background: rgba(255, 255, 255, .92);
}

.r12l-card:hover .r12l-pick,
.r12l-card:focus-within .r12l-pick,
.r12l-row:hover .r12l-pick,
.r12l-row:focus-within .r12l-pick,
.r12l-pick.is-static,
.r12l-pick[aria-pressed='true'] { opacity: 1; }

.r12l-pick .r12-check {
  position: absolute;
  inset: -1px;
  width: 16px;
  height: 16px;
  display: none;
  border-radius: 50%;
  background: var(--r12-accent-user, #3377F7);
  color: #fff;
}

.r12l-card .r12l-pick .r12-check { width: 18px; height: 18px; }
.r12l-pick.is-static .r12-check { position: static; width: 16px; height: 16px; }

/* 七稿 7：列表里选中的勾也正好盖住 16 的圆（老规则把勾改成 static 会偏 1px） */
.r12l-pick.is-static .r12-check { position: absolute; inset: -1px; width: 16px; height: 16px; }

/* 七稿 9：勾是绝对定位，圆圈本身必须是定位元素。
   老规则把 .is-static 设成 position: static，勾会按更外层祖先定位、跑到列表左上角。
   同时清掉卡片圆圈的 top / right，改用 relative 时不能被这两个偏移推走。 */
.r12l-pick.is-static { position: relative; top: auto; right: auto; }

.r12l-pick[aria-pressed='true'] {
  border-color: var(--r12-accent-user, #3377F7);
  background: var(--r12-accent-user, #3377F7);
}

.r12l-pick[aria-pressed='true'] .r12-check { display: grid; }
.r12l-pick .r12-check svg { width: 10px; height: 10px; }
.r12l-card .r12l-pick .r12-check svg { width: 12px; height: 12px; }

.r12l-row {
  border-color: transparent;
  box-shadow: none;
}

.r12l-row[aria-selected='true'] {
  border-color: transparent;
  box-shadow: none;
  background: var(--r12-accent-user-soft, rgba(51, 119, 247, .14));
}

.r12l-row[aria-selected='true']:hover { border-color: transparent; }

.r12l-card[aria-selected='true'],
.r12-card--pick[aria-pressed='true'] {
  border-color: var(--r12-accent-user, #3377F7);
  box-shadow: none;
  background: var(--r12-accent-user-soft, rgba(51, 119, 247, .14));
}

/* 3. 抽屉浮在网格右边，不挤网格；进场动画只在从无到有时播一次 */
.r12l-body { position: relative; }

.r12l-drawer {
  position: absolute;
  top: 12px;
  right: 12px;
  bottom: 12px;
  width: 400px;
  border: 1px solid var(--r12-line);
  border-radius: var(--r12-r-card);
  background: var(--r12-surface);
  box-shadow: var(--r12-shadow-pop);
  overflow: hidden;
  z-index: 5;
}

.r12l-drawer.is-instant { animation: none; }

/* 4. 新建文件夹输入框：四边 1px 细线，聚焦 1px 强调色加 2px 浅色光圈 */
.r12l-dialog-input {
  border-width: 1px;
  border-style: solid;
  border-color: var(--r12-line);
}

.r12l-dialog-input:focus {
  border-color: var(--r12-accent-user, #3377F7);
  outline: none;
  box-shadow: 0 0 0 2px var(--r12-accent-user-soft, rgba(51, 119, 247, .14));
}

/* 5. 项目文件夹：和待整理同一套系统色与「系统」小标 */
.r12l-tree-row.is-project .r12l-tree-icon,
.r12l-tree-row.is-project .r12l-tree-label { color: var(--r12-running); }

.r12l-menu-note {
  padding: 8px 12px 6px;
  font-size: var(--r12-fs-small, 12px);
  line-height: var(--r12-lh-small, 18px);
  color: var(--r12-faint);
}

/* 6. 存储空间 */
.r12l-storage {
  flex: none;
  margin-top: 8px;
  padding: 8px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--r12-muted);
  text-align: left;
  cursor: pointer;
}

.r12l-storage:hover { background: var(--r12-hover); }

.r12l-storage-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: var(--r12-fs-small, 12px);
  line-height: var(--r12-lh-small, 18px);
  font-variant-numeric: tabular-nums;
}

.r12l-storage-bar {
  display: block;
  height: 4px;
  margin-top: 6px;
  border-radius: var(--r12-r-pill);
  background: var(--r12-surface-3);
  overflow: hidden;
}

.r12l-storage-bar i,
.r12l-storage-track i {
  display: block;
  height: 100%;
  border-radius: var(--r12-r-pill);
  background: var(--r12-accent-user, #3377F7);
}

.is-w16 { width: 16%; }
.is-w44 { width: 44%; }
.is-w38 { width: 38%; }
.is-w9 { width: 9%; }

.r12l-storage-panel {
  position: absolute;
  left: 228px;
  bottom: 8px;
  width: 320px;
  max-height: min(480px, calc(100% - 24px));
  display: flex;
  flex-direction: column;
  border: 1px solid var(--r12-line-strong);
  border-radius: var(--r12-r-panel);
  background: var(--r12-pop-bg);
  box-shadow: var(--r12-shadow-pop);
  z-index: 20;
}

.r12l-storage-head {
  flex: none;
  height: 44px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px 0 16px;
  border-bottom: 1px solid var(--r12-line);
}

.r12l-storage-head strong { flex: 1; font-size: var(--r12-fs-ui, 13px); line-height: var(--r12-lh-ui, 20px); font-weight: 600; }

.r12l-storage-body { flex: 1; min-height: 0; overflow-y: auto; padding: 12px 16px; }

.r12l-storage-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 56px;
  align-items: center;
  gap: 8px;
  height: 28px;
  font-size: var(--r12-fs-ui, 13px);
  line-height: var(--r12-lh-ui, 20px);
  color: var(--r12-ink);
}

.r12l-storage-label { color: var(--r12-muted); font-size: var(--r12-fs-small, 12px); line-height: var(--r12-lh-small, 18px); }
.r12l-storage-track { display: block; height: 6px; border-radius: var(--r12-r-pill); background: var(--r12-surface-3); overflow: hidden; }
.r12l-storage-row b { text-align: right; font-weight: 500; font-variant-numeric: tabular-nums; font-size: var(--r12-fs-small, 12px); }

.r12l-storage-total {
  margin-top: 10px;
  font-size: var(--r12-fs-small, 12px);
  line-height: var(--r12-lh-small, 18px);
  color: var(--r12-muted);
  font-variant-numeric: tabular-nums;
}

.r12l-storage-foot {
  flex: none;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 8px 16px 12px;
  border-top: 1px solid var(--r12-line);
}

.r12l-clean-group + .r12l-clean-group { margin-top: 12px; }

.r12l-clean-title {
  display: block;
  margin-bottom: 4px;
  font-size: var(--r12-fs-small, 12px);
  line-height: var(--r12-lh-small, 18px);
  color: var(--r12-muted);
}

.r12l-clean-item { display: flex; align-items: center; gap: 8px; height: 32px; }
.r12l-clean-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--r12-fs-ui, 13px); line-height: var(--r12-lh-ui, 20px); color: var(--r12-ink); }
.r12l-clean-size { flex: none; font-size: var(--r12-fs-small, 12px); line-height: var(--r12-lh-small, 18px); color: var(--r12-muted); font-variant-numeric: tabular-nums; }
.r12l-clean-empty { margin: 0; font-size: var(--r12-fs-small, 12px); line-height: var(--r12-lh-small, 18px); color: var(--r12-faint); }

/* 7. 团队空间 */
.r12l-team-dot {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: var(--team-color, #1A9C8F);
}

.r12l-tree-row.is-team .r12l-tree-icon { color: var(--team-color, #1A9C8F); }
.r12l-card.is-team-file .r12-card-meta { color: var(--r12-muted); }

.r12l-refs { margin-top: 4px; }

.r12l-refs-chip {
  height: 22px;
  padding: 0 8px;
  border: 0;
  border-radius: var(--r12-r-pill);
  background: var(--r12-surface-3);
  color: var(--r12-muted);
  font-size: var(--r12-fs-small, 12px);
  line-height: var(--r12-lh-small, 18px);
  cursor: pointer;
}

.r12l-refs-chip:hover { color: var(--r12-ink); }

/* 8. 排序下拉底色不透明（老规则是半透明，卡片图会透出来） */
.r12-menu.r12l-menu-solid { background-color: var(--r12-pop-bg, #202125); }

/* ═══ 七稿（修正单 10） ═══════════════════════════════════════ */

/* 移动 / 复制：贴着按钮展开的面板，里面是文件夹列表 + 就地新建 */
.r12l-dest-row { min-height: 32px; }
.r12l-dest-newrow { min-height: 32px; border-top: 1px solid var(--r12-line); margin-top: 4px; }

.r12l-dest-new {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  padding: 6px 12px;
  border-top: 1px solid var(--r12-line);
}

.r12l-dest-new > span {
  flex: none;
  font-size: var(--r12-fs-small, 12px);
  line-height: var(--r12-lh-small, 18px);
  color: var(--r12-muted);
}

.r12l-dest-new input {
  flex: 1;
  min-width: 0;
  height: 28px;
}

/* 从素材库选的锚定面板：底部一行「已选 / 取消 / 选用」 */
.r12l-picker-foot {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 10px 0 0;
  border-top: 1px solid var(--r12-line);
}

/* ═══ 九稿（修正单 14） ═══════════════════════════════════════ */

/* 团队卡片：版本 / 引用小标签，中性色 */
.r12l-card-tags {
  min-height: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding-top: 2px;
}

.r12l-tag {
  height: 18px;
  display: inline-flex;
  align-items: center;
  padding: 0 6px;
  border-radius: var(--r12-r-pill);
  background: var(--r12-surface-3);
  color: var(--r12-muted);
  font-size: var(--r12-fs-small, 12px);
  line-height: var(--r12-lh-small, 18px);
  font-variant-numeric: tabular-nums;
}

/* 团队文件带字操作：一行放不下换行 */
.r12l-drawer-head {
  height: auto;
  min-height: 44px;
  flex-wrap: wrap;
  padding-top: 6px;
  padding-bottom: 6px;
}

.r12l-team-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.r12l-textbtn {
  height: 24px;
  padding: 0 8px;
  border: 0;
  border-radius: var(--r12-r-pill);
  background: var(--r12-surface-3);
  color: var(--r12-ink);
  font-size: var(--r12-fs-small, 12px);
  line-height: var(--r12-lh-small, 18px);
  white-space: nowrap;
}

.r12l-textbtn:hover { background: var(--r12-hover); }
.r12l-textbtn[aria-disabled='true'] { color: var(--r12-faint); cursor: not-allowed; }

/* 类型筛选旁边：上传者下拉 */
.r12l-head-center {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* 九稿 15：团队空间的工具栏是一条 flex，按钮各占各位、隔 8，不许相交 */
.r12l-head.is-team-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.r12l-head.is-team-head .r12l-head-left { flex: 0 1 auto; }

.r12l-head-team-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.r12l-head-team-controls > * { flex: none; }
.r12l-head-team-controls .r12l-uploader { margin-right: 0; }
