/* 第 11 轮 · 丙：素材库（文件管理器）、账号与偏好、头像菜单、积分与记录。 */

/* ── 页面骨架：标题行 44，紧贴顶栏，不留空 ───────────────── */
.r11l-page {
  position: relative;
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 0 8px 8px;
  background: var(--bg);
}
.r11l-titlebar {
  flex: none;
  height: 44px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 4px;
}
.r11l-titlebar h1 { margin: 0; font-size: 20px; line-height: 28px; letter-spacing: -.02em; }
.r11l-titlebar span { color: var(--muted); font-size: 12px; line-height: 18px; }

/* ── 素材库：左树 + 右内容 ─────────────────────────────── */
.r11l-body {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 8px;
}
.r11l-tree {
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 8px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}
.r11l-tree-group { display: flex; flex-direction: column; gap: 2px; }
.r11l-tree-group-title { padding: 2px 8px 4px; color: var(--muted); font-size: 12px; line-height: 18px; }
.r11l-tree-row {
  position: relative;
  display: flex;
  align-items: center;
  height: 32px;
  border-radius: 8px;
}
.r11l-tree-row:hover { background: var(--fill-hover); }
.r11l-tree-row.is-active { background: var(--fill-selected); }
.r11l-tree-caret {
  flex: none;
  width: 22px;
  height: 32px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
}
.r11l-tree-caret.is-empty { display: block; width: 22px; }
.r11l-tree-caret svg { width: 12px; height: 12px; }
.r11l-tree-main {
  flex: 1;
  min-width: 0;
  height: 32px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px 0 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  line-height: 20px;
  text-align: left;
}
.r11l-tree-row.is-active .r11l-tree-main { color: var(--accent); }
.r11l-tree-icon { flex: none; display: grid; place-items: center; color: var(--muted); }
.r11l-tree-icon svg { width: 16px; height: 16px; }
.r11l-tree-row.is-active .r11l-tree-icon { color: var(--accent); }
.r11l-tree-row.is-system .r11l-tree-icon { color: #7c9ab5; }
.r11l-tree-row.is-system.is-active .r11l-tree-icon { color: var(--accent); }
.r11l-tree-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.r11l-tree-count { flex: none; color: var(--muted); font-size: 11px; line-height: 16px; font-variant-numeric: tabular-nums; }
.r11l-tree-tag {
  flex: none;
  padding: 0 6px;
  border-radius: 999px;
  background: color-mix(in srgb, #7c9ab5 18%, transparent);
  color: #6f8ea8;
  font-size: 10px;
  line-height: 16px;
}
.r11l-tree-sub { display: flex; flex-direction: column; gap: 2px; padding-left: 14px; }

/* ── 右边内容面板 ─────────────────────────────────────── */
.r11l-main {
  position: relative;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}
.r11l-toolbar { position: relative; flex: none; height: 32px; }
.r11l-toolbar-row {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.r11l-folder-title { flex: none; display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.r11l-folder-title strong { font-size: 14px; line-height: 20px; }
.r11l-folder-title span { color: var(--muted); font-size: 11px; line-height: 16px; white-space: nowrap; }
.r11l-types { flex: none; margin-left: auto; }
.r11l-types > button { min-width: 0; padding: 0 9px; font-size: 12px; }
.r11l-tools { flex: none; margin-left: auto; display: flex; align-items: center; gap: 6px; }

/* 纯图标按钮：灰色圆底，图标居中，悬停出提示 */
.r11l-iconbtn {
  position: relative;
  width: 28px;
  height: 28px;
  min-width: 28px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--muted);
}
.r11l-iconbtn:hover { background: var(--fill-hover); color: var(--ink); }
.r11l-iconbtn svg { width: 16px; height: 16px; }
.r11l-iconbtn.small { width: 24px; height: 24px; min-width: 24px; background: transparent; }
.r11l-iconbtn.tiny { width: 18px; height: 18px; min-width: 18px; min-height: 18px; background: transparent; }
.r11l-iconbtn.tiny svg { width: 12px; height: 12px; }
.r11l-iconbtn.is-active { background: var(--fill-selected); color: var(--accent); }
/* 纯图标按钮的悬停气泡由甲那一路统一接管（读 aria-label），这里不再画第二层。 */
/* 从素材库选的弹窗挂在 body 下，不在甲那一路的观察根里，单独补一层提示。 */
#r11l-overlay-root .r11l-iconbtn[data-tip] { position: relative; }
#r11l-overlay-root .r11l-iconbtn[data-tip]:hover::after {
  content: attr(data-tip);
  position: absolute;
  left: 50%;
  top: calc(100% + 6px);
  transform: translateX(-50%);
  z-index: 420;
  padding: 4px 8px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--bg);
  font-size: 11px;
  line-height: 16px;
  white-space: nowrap;
  pointer-events: none;
}

.r11l-search {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 200px;
  height: 28px;
  padding: 0 8px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--field-bg);
}
.r11l-search svg { flex: none; width: 15px; height: 15px; color: var(--muted); }
.r11l-search input { flex: 1; min-width: 0; height: 26px; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 12px; line-height: 18px; }
.r11l-search-clear { position: relative; width: 20px; height: 20px; min-width: 20px; min-height: 20px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--muted); }
.r11l-search.is-visible { width: 200px; }

.r11l-sort { position: relative; flex: none; }
.r11l-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 28px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--ink);
  font-size: 12px;
  line-height: 18px;
  white-space: nowrap;
}
.r11l-chip svg { width: 12px; height: 12px; color: var(--muted); }
.r11l-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 80;
  min-width: 140px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-2);
}
.r11l-dropdown button { height: 32px; display: flex; align-items: center; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; color: var(--ink); font-size: 12px; text-align: left; }
.r11l-dropdown button:hover { background: var(--fill-hover); }
.r11l-dropdown button[aria-pressed='true'] { background: var(--fill-selected); color: var(--accent); }

.r11l-viewseg { flex: none; height: 28px; padding: 2px; }
.r11l-viewseg > button { position: relative; width: 26px; min-width: 26px; height: 24px; min-height: 24px; display: grid; place-items: center; padding: 0; }
.r11l-viewseg > button svg { width: 14px; height: 14px; }

.r11l-newfolder,
.r11l-upload {
  position: relative;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 10px;
  white-space: nowrap;
}
.r11l-newfolder svg,
.r11l-upload svg { flex: none; width: 14px; height: 14px; }
.r11l-openproject { height: 24px; min-height: 24px; padding: 0 8px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); font-size: 12px; line-height: 18px; }
.r11l-openproject svg { flex: none; width: 13px; height: 13px; }
.r11l-openproject:hover { background: var(--fill-hover); }
.r11l-newfolder { height: 24px; min-height: 24px; padding: 0 8px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); font-size: 12px; line-height: 18px; }
.r11l-newfolder:hover { background: var(--fill-hover); }
.r11l-upload { height: 28px; min-height: 28px; padding: 0 12px; border: 1px solid var(--accent); background: var(--accent); color: var(--on-accent); font-size: 12px; line-height: 18px; font-weight: 600; }
.r11l-upload:hover { background: color-mix(in srgb, var(--accent) 88%, var(--ink)); border-color: color-mix(in srgb, var(--accent) 88%, var(--ink)); }

/* 批量条：盖住同一行，高度不变 */
.r11l-batch { background: var(--surface); }
.r11l-batch-count { flex: none; color: var(--ink); font-size: 13px; line-height: 20px; }
.r11l-batch-actions { margin-left: auto; display: flex; align-items: center; gap: 2px; }
.r11l-batch-actions .btn { display: inline-flex; align-items: center; gap: 4px; height: 24px; min-height: 24px; }
.r11l-batch-actions .btn svg { width: 13px; height: 13px; }

/* ── 卡片墙 ───────────────────────────────────────────── */
.r11l-grid-scroll { flex: 1; min-height: 0; overflow: auto; padding: 8px; }
.r11l-grid { display: grid; grid-template-columns: repeat(auto-fill, 140px); gap: 10px; justify-content: start; }
.r11l-card {
  position: relative;
  width: 140px;
  height: 140px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}
.r11l-card:hover { border-color: var(--line-strong); }
.r11l-card.is-selected { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.r11l-card-main { width: 100%; height: 100%; display: flex; flex-direction: column; padding: 0; border: 0; background: transparent; text-align: left; }
.r11l-thumb { position: relative; flex: none; display: block; width: 100%; height: 96px; overflow: hidden; background: var(--surface-2); }
.r11l-thumb svg { display: block; width: 100%; height: 100%; }
.r11l-card-copy { display: block; height: 42px; padding: 5px 8px 0; min-width: 0; }
.r11l-card-copy strong { display: block; font-size: 12px; line-height: 18px; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.r11l-card-copy span { display: block; color: var(--muted); font-size: 11px; line-height: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.r11l-duration {
  position: absolute;
  right: 6px;
  bottom: 6px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  background: color-mix(in srgb, #000 55%, transparent);
  color: #fff;
  font-size: 10px;
  line-height: 14px;
}
.r11l-duration svg { width: 10px; height: 10px; }

.r11l-thumb.is-file { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 8px; color: var(--muted); }
.r11l-thumb.is-file > svg { width: 22px; height: 22px; }
.r11l-excerpt { display: flex; flex-direction: column; gap: 2px; width: 100%; color: var(--muted); font-size: 9px; line-height: 12px; text-align: left; }
.r11l-excerpt span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.r11l-wave { display: flex; align-items: center; justify-content: center; gap: 2px; height: 18px; }
.r11l-wave i { display: block; width: 2px; border-radius: 1px; background: var(--line-strong); }
.r11l-wave i:nth-child(1) { height: 6px; }
.r11l-wave i:nth-child(2) { height: 12px; }
.r11l-wave i:nth-child(3) { height: 18px; }
.r11l-wave i:nth-child(4) { height: 9px; }
.r11l-wave i:nth-child(5) { height: 15px; }
.r11l-wave i:nth-child(6) { height: 7px; }
.r11l-wave i:nth-child(7) { height: 11px; }
.r11l-file-meta { color: var(--muted); font-size: 10px; line-height: 14px; }

/* 选中：只有一个勾，选中时卡片描一道 2px 主色 */
.r11l-card .r11-check,
.r11l-pick-card .r11-check,
.r11l-row .r11-check {
  position: absolute;
  left: 6px;
  top: 6px;
  z-index: 2;
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  color: transparent;
  opacity: 0;
  transition: opacity .12s var(--ease);
}
.r11l-card:hover .r11-check,
.r11l-card:focus-within .r11-check,
.r11l-pick-card:hover .r11-check,
.r11l-pick-card:focus-within .r11-check { opacity: 1; }
.r11l-card .r11-check.is-checked,
.r11l-pick-card .r11-check.is-checked { opacity: 1; border-color: var(--accent); background: var(--accent); color: var(--on-accent); }
.r11l-card .r11-check svg,
.r11l-pick-card .r11-check svg,
.r11l-row .r11-check svg { width: 12px; height: 12px; }

/* ── 列表视图 ─────────────────────────────────────────── */
.r11l-list { display: flex; flex-direction: column; gap: 2px; }
.r11l-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 64px 88px 108px 24px;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 8px;
  border-radius: 10px;
}
.r11l-row:hover { background: var(--fill-hover); }
.r11l-row.is-selected { background: var(--fill-selected); }
.r11l-row-main { display: flex; align-items: center; gap: 8px; min-width: 0; height: 100%; padding: 0; border: 0; background: transparent; text-align: left; }
.r11l-row-thumb { flex: none; width: 30px; height: 30px; display: grid; place-items: center; overflow: hidden; border-radius: 6px; background: var(--surface-2); color: var(--muted); }
.r11l-row-thumb svg.artwork { width: 100%; height: 100%; }
.r11l-row-thumb svg.icon { width: 16px; height: 16px; }
.r11l-row-name { font-size: 13px; line-height: 20px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.r11l-row-cell { color: var(--muted); font-size: 12px; line-height: 18px; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.r11l-row .r11-check { position: static; left: auto; top: auto; opacity: .35; }
.r11l-row:hover .r11-check,
.r11l-row .r11-check.is-checked { opacity: 1; }

/* ── 空状态 ───────────────────────────────────────────── */
.r11l-empty-wrap { display: grid; place-items: center; min-height: 240px; padding: 24px; }
.r11l-empty-wrap[hidden] { display: none !important; }
.r11l-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--muted); text-align: center; }
.r11l-empty-art { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: var(--surface-2); color: var(--muted); }
.r11l-empty-art svg { width: 22px; height: 22px; }
.r11l-empty strong { color: var(--ink); font-size: 14px; line-height: 22px; }
.r11l-empty p { max-width: 280px; font-size: 12px; line-height: 18px; }
.r11l-empty .btn { margin-top: 4px; }

/* ── 预览抽屉 400 ─────────────────────────────────────── */
.r11l-drawer {
  position: absolute;
  top: 52px;
  right: 8px;
  bottom: 8px;
  z-index: 40;
  width: 400px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-2);
}
.r11l-drawer-head {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  height: 44px;
  padding: 0 8px 0 14px;
  border-bottom: 1px solid var(--line);
}
.r11l-drawer-title { font-size: 13px; line-height: 20px; font-weight: 600; }
.r11l-drawer-actions { display: flex; align-items: center; gap: 2px; }
.r11l-drawer-actions .r11l-iconbtn { width: 28px; height: 28px; min-width: 28px; background: transparent; }
.r11l-drawer-actions .r11l-iconbtn:hover { background: var(--fill-hover); }
.r11l-copy-wrap { position: relative; display: inline-flex; }
.r11l-copy-menu { right: 0; top: calc(100% + 6px); min-width: 170px; }
.r11l-drawer-body { flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; gap: 10px; padding: 12px; }
.r11l-preview-media { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 12px; background: var(--surface-2); }
.r11l-preview-media svg.artwork { width: 100%; height: 100%; }
.r11l-preview-media.is-audio { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: var(--muted); }
.r11l-preview-media.is-audio > svg { width: 32px; height: 32px; }
.r11l-preview-media.is-audio .r11l-wave { height: 32px; }
.r11l-preview-duration {
  position: absolute;
  right: 8px;
  bottom: 8px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  background: color-mix(in srgb, #000 55%, transparent);
  color: #fff;
  font-size: 11px;
}
.r11l-preview-duration svg { width: 11px; height: 11px; }
.r11l-name-field { display: flex; flex-direction: column; gap: 4px; }
.r11l-name-field span { color: var(--muted); font-size: 11px; line-height: 16px; }
.r11l-name-field input {
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--field-bg);
  color: var(--ink);
  font-size: 13px;
  line-height: 20px;
  outline: none;
}
.r11l-name-field input:focus { border-color: var(--focus); }
.r11l-meta { display: flex; flex-direction: column; gap: 6px; margin: 0; }
.r11l-meta div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: 12px; line-height: 18px; }
.r11l-meta dt { color: var(--muted); }
.r11l-meta dd { margin: 0; color: var(--ink); text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.r11l-doc-preview { padding-top: 10px; border-top: 1px solid var(--line); color: var(--ink); font-size: 13px; line-height: 22px; }
.r11l-doc-preview p { margin: 0 0 8px; }

/* ── 弹窗：一律在视口正中 ─────────────────────────────── */
.r11l-backdrop {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: color-mix(in srgb, var(--ink) 32%, transparent);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.r11l-modal-wrap {
  position: fixed;
  inset: 0;
  z-index: 301;
  display: grid;
  place-items: center;
  padding: 24px;
  pointer-events: none;
}
.r11l-modal {
  pointer-events: auto;
  width: min(420px, 100%);
  max-height: calc(100dvh - 48px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow-3);
}
.r11l-modal-head {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  height: 52px;
  padding: 0 10px 0 18px;
  border-bottom: 1px solid var(--line);
}
.r11l-modal-head h2 { margin: 0; font-size: 15px; line-height: 22px; }
.r11l-modal-body { display: flex; flex-direction: column; gap: 10px; padding: 16px 18px; overflow: auto; }
.r11l-modal-foot { flex: none; display: flex; align-items: center; justify-content: flex-end; gap: 8px; min-height: 52px; padding: 10px 18px; }
.r11l-modal-row { display: flex; align-items: flex-end; gap: 8px; }
.r11l-modal-row .r11l-field { flex: 1; min-width: 0; }
.r11l-modal-row .btn { flex: none; height: 32px; min-height: 32px; }
.r11l-field { display: flex; flex-direction: column; gap: 6px; }
.r11l-field span { color: var(--muted); font-size: 12px; line-height: 18px; }
.r11l-field input {
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--field-bg);
  color: var(--ink);
  font-size: 13px;
  line-height: 20px;
  outline: none;
}
.r11l-field input:focus { border-color: var(--focus); }
.r11l-confirm { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }
.r11l-confirm:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 86%, var(--ink)); }
.r11l-modal-note { margin: 0; color: var(--muted); font-size: 12px; line-height: 18px; }
.r11l-target-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; max-height: 240px; overflow: auto; }
.r11l-target {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--ink);
  font-size: 12px;
  text-align: left;
}
.r11l-target svg { flex: none; width: 14px; height: 14px; color: var(--muted); }
.r11l-target.is-selected { border-color: var(--accent); background: var(--fill-selected); color: var(--accent); }
.r11l-target.is-selected svg { color: var(--accent); }
.r11l-avatar-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.r11l-avatar-option { aspect-ratio: 1; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.r11l-avatar-option svg { width: 100%; height: 100%; }
.r11l-avatar-option.is-selected { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }

/* ── 从素材库选 弹窗 ─────────────────────────────────── */
.r11l-picker { width: min(860px, 100%); height: min(600px, calc(100dvh - 48px)); }
.r11l-picker-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 8px; padding: 12px; }
.r11l-picker-tree {
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
}
.r11l-picker-tree .r11l-tree-main {
  width: 100%;
  height: 32px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  line-height: 18px;
  text-align: left;
}
.r11l-picker-tree .r11l-tree-main svg { width: 15px; height: 15px; }
.r11l-picker-tree .r11l-tree-main.is-active { background: var(--surface); color: var(--ink); }
.r11l-picker-main { min-width: 0; min-height: 0; padding: 4px; overflow: auto; }
.r11l-picker-grid { display: grid; grid-template-columns: repeat(auto-fill, 120px); gap: 10px; justify-content: start; }
.r11l-pick-card { position: relative; width: 120px; height: 120px; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.r11l-pick-card.is-selected { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.r11l-pick-main { width: 100%; height: 100%; display: flex; flex-direction: column; padding: 0; border: 0; background: transparent; text-align: left; }
.r11l-pick-thumb { width: 100%; height: 84px; display: grid; place-items: center; overflow: hidden; background: var(--surface-2); }
.r11l-pick-thumb svg.artwork { width: 100%; height: 100%; }
.r11l-pick-thumb.is-file svg { width: 26px; height: 26px; color: var(--muted); }
.r11l-pick-name { display: block; padding: 4px 8px; font-size: 11px; line-height: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.r11l-picker-foot {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 52px;
  padding: 10px 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}
.r11l-picker-foot > div { display: flex; align-items: center; gap: 8px; }
body.r11l-picker-open { overflow: hidden; }

/* ── 账号与偏好 ───────────────────────────────────────── */
.r11l-account { overflow: auto; padding: 0 8px 16px; }
.r11l-account-grid { flex: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; max-width: 880px; }
.r11l-panel { min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.r11l-profile { grid-column: 1 / -1; }
.r11l-profile-head { display: flex; align-items: center; gap: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.r11l-avatar-big {
  position: relative;
  flex: none;
  width: 64px;
  height: 64px;
  min-width: 64px;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface-2);
}
.r11l-avatar-big svg { width: 100%; height: 100%; }
.r11l-avatar-edit {
  position: absolute;
  right: 1px;
  bottom: 1px;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
}
.r11l-avatar-edit svg { width: 11px; height: 11px; }
.r11l-profile-name { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
.r11l-profile-name strong { font-size: 14px; line-height: 22px; font-weight: 600; }
.r11l-profile-role { flex-basis: 100%; color: var(--muted); font-size: 12px; line-height: 18px; }
.r11l-textbtn { display: inline-flex; align-items: center; gap: 4px; padding: 0; border: 0; background: transparent; color: var(--accent); font-size: 12px; line-height: 18px; }
.r11l-textbtn svg { width: 13px; height: 13px; }
.r11l-nickname-input {
  width: 160px;
  height: 28px;
  padding: 0 8px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--field-bg);
  color: var(--ink);
  font-size: 13px;
  line-height: 20px;
  outline: none;
}
.r11l-account-rows { display: flex; flex-direction: column; gap: 2px; padding-top: 8px; }
.r11l-account-row { display: flex; align-items: center; gap: 8px; min-height: 32px; font-size: 13px; line-height: 20px; }
.r11l-account-row > span { flex: none; width: 100px; color: var(--muted); font-size: 12px; line-height: 18px; }
.r11l-account-row strong { min-width: 0; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.r11l-account-row .r11l-iconbtn { margin-left: 2px; }
.r11l-copied { color: var(--accent); font-size: 11px; line-height: 16px; }
.r11l-credit-panel { display: flex; flex-direction: column; gap: 6px; }
.r11l-credit-head { display: flex; align-items: baseline; gap: 8px; color: var(--muted); font-size: 12px; line-height: 18px; }
.r11l-credit-head strong { color: var(--ink); font-size: 32px; line-height: 38px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.r11l-credit-sum { color: var(--muted); font-size: 12px; line-height: 18px; }
.r11l-panel-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 8px; }
.r11l-appearance h2 { margin: 0 0 8px; font-size: 14px; line-height: 22px; }
.r11l-theme-row { display: flex; gap: 6px; margin-bottom: 4px; }
.r11l-theme {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
  line-height: 18px;
}
.r11l-theme svg { width: 16px; height: 16px; }
.r11l-theme.is-active { border-color: var(--accent); background: var(--fill-selected); color: var(--accent); }

/* ── 头像菜单 ─────────────────────────────────────────── */
.r11l-menu { width: 300px; padding: 10px; border-radius: 18px; }
/* 头像菜单要一屏完整显示：r8.css 给 .r7-avatar-menu 限了最高 225，会把后半截菜单裁掉（总策划 10-28 改） */
.r7-avatar-menu.r11l-menu { max-height: calc(100vh - 56px); overflow: visible; scrollbar-gutter: auto; }
.r11l-menu-head { display: flex; align-items: center; gap: 10px; padding: 4px 4px 8px; }
.r11l-menu-avatar {
  flex: none;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 650;
}
.r11l-menu-identity { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.r11l-menu-identity strong { font-size: 14px; line-height: 22px; font-weight: 600; }
.r11l-menu-id { display: flex; align-items: center; gap: 4px; color: var(--muted); font-size: 12px; line-height: 18px; }
.r11l-menu-id em { font-style: normal; color: var(--accent); font-size: 11px; }
.r11l-menu-role { display: block; padding: 2px 4px 8px; color: var(--muted); font-size: 12px; line-height: 18px; }
.r11l-menu-credit {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 44px;
  padding: 0 4px 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
}
.r11l-menu-credit span { color: var(--muted); font-size: 12px; }
.r11l-menu-credit b { font-size: 16px; line-height: 22px; font-variant-numeric: tabular-nums; }
.r11l-menu-recharge {
  margin-left: auto;
  height: 28px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 12px;
}
.r11l-menu-recharge:hover { background: var(--fill-hover); }
.r11l-menu-links { display: flex; flex-direction: column; gap: 2px; margin-top: 8px; }
.r11l-menu-links button {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 36px;
  min-height: 36px;
  padding: 0 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  line-height: 20px;
  text-align: left;
}
.r11l-menu-links button:hover { background: var(--fill-hover); }
.r11l-menu-links svg { width: 16px; height: 16px; color: var(--muted); }
.r11l-menu-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.r11l-theme-pair { display: flex; align-items: center; gap: 4px; }
.r11l-signout { height: 28px; padding: 0 10px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font-size: 12px; line-height: 18px; }
.r11l-signout:hover { background: var(--fill-hover); color: var(--ink); }

/* ── 子页（积分、记录、资源） ─────────────────────────── */
.r11l-subpage { overflow: auto; padding: 0 8px 16px; }
.r11l-subpage .r7-settings-layout { grid-template-columns: 176px minmax(0, 880px); gap: 16px; }
.r11l-settings-main { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.r11l-subpage .r7-settings-nav { padding-top: 4px; }
.r11l-subpage .r7-credit-hero { max-width: none; padding: 16px 18px; }
.r11l-subpage .r7-credit-hero strong { font-size: 32px; line-height: 38px; }
.r11l-subpage .r7-recharge-card { max-width: none; margin-top: 0; padding: 14px 18px; }
.r11l-subpage .r7-amounts { margin-top: 8px; gap: 8px; }
.r11l-subpage .r7-amount { min-height: 58px; padding: 8px 10px; }
.r11l-subpage .r7-recharge-row { margin-top: 10px; }

.r11l-ledger { overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.r11l-ledger-head { display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 8px 16px; border-bottom: 1px solid var(--line); }
.r11l-ledger-head h2 { margin: 0; font-size: 14px; line-height: 22px; }
.r11l-ledger-seg { flex: none; }
.r11l-ledger-tools { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.r11l-ledger-tools .btn { display: inline-flex; align-items: center; gap: 4px; }
.r11l-ledger-tools .btn svg { width: 13px; height: 13px; }
.r11l-ledger-list { padding: 8px 16px 12px; }
.r11l-ledger-count { padding: 8px 0; color: var(--muted); font-size: 12px; line-height: 18px; }
.r11l-ledger-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 100px 120px;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  line-height: 20px;
}
.r11l-ledger-row b { text-align: right; font-variant-numeric: tabular-nums; }
.r11l-ledger-row small { color: var(--muted); font-size: 12px; text-align: right; }

.r11l-list-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 36px; }
.r11l-list-tools { display: flex; align-items: center; gap: 6px; }
.r11l-list-tools .btn { display: inline-flex; align-items: center; gap: 4px; }
.r11l-list-tools .btn svg { width: 13px; height: 13px; }
.r11l-record-seg { flex: none; }

.r11l-record-list, .r11l-resource-list { display: flex; flex-direction: column; gap: 2px; margin-top: 8px; }
.r11l-record, .r11l-resource {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 6px 8px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  text-align: left;
}
.r11l-record:hover, .r11l-resource:hover { background: var(--fill-hover); }
.r11l-record[hidden], .r11l-resource[hidden] { display: none !important; }
.r11l-record-thumb, .r11l-resource-thumb {
  flex: none;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--muted);
}
.r11l-record-thumb svg.artwork, .r11l-resource-thumb svg.artwork { width: 100%; height: 100%; }
.r11l-record-thumb svg.icon, .r11l-resource-thumb svg.icon { width: 20px; height: 20px; }
.r11l-record-copy, .r11l-resource-copy { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.r11l-record-copy strong, .r11l-resource-copy strong { font-size: 13px; line-height: 20px; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.r11l-record-copy span, .r11l-resource-copy span { color: var(--muted); font-size: 12px; line-height: 18px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.r11l-record-state { flex: none; color: var(--muted); font-size: 12px; line-height: 18px; }
.r11l-resource .r11l-textbtn { flex: none; }
.r11l-copy-area { position: fixed; left: -9999px; top: 0; opacity: 0; }

/* ── 窄屏兜底 ─────────────────────────────────────────── */
@media (max-width: 980px) {
  .r11l-body { grid-template-columns: 168px minmax(0, 1fr); }
  .r11l-drawer { position: fixed; left: 8px; right: 8px; top: auto; bottom: 8px; width: auto; max-height: 70vh; }
  .r11l-account-grid { grid-template-columns: minmax(0, 1fr); }
  .r11l-subpage .r7-settings-layout { grid-template-columns: 140px minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .r11l-body { grid-template-columns: minmax(0, 1fr); }
  .r11l-tree { max-height: 180px; }
  .r11l-toolbar-row { gap: 4px; }
  .r11l-types { display: none; }
  .r11l-newfolder { display: none; }
  .r11l-picker-body { grid-template-columns: 130px minmax(0, 1fr); }
  .r11l-picker { height: calc(100dvh - 32px); }
  .r11l-record, .r11l-resource { min-height: 52px; }
  .r11l-subpage .r7-settings-layout { display: block; }
}
