/* ============================================================
   AI-JJ Web 界面 —— 设计系统
   布局: 左侧栏目导航 + 右侧内容区
   组件: 页面头 / 卡片网格 / 统计卡 / 类型选择卡 / 步骤条 / 空状态
   兼容: .card .badge .task .kv .log .shots .shot .sthumb .cand* 等旧类名
   ============================================================ */

:root {
  /* 色板 */
  --bg: #0a0d13;
  --panel: #131923;
  --panel-2: #1a212d;
  --panel-3: #212a38;
  --line: #26303f;
  --line-soft: #1e2634;
  --text: #e9edf5;
  --text-2: #c2cad9;
  --muted: #7f8a9e;
  --accent: #ffd400;
  --accent-dim: rgba(255, 212, 0, .12);
  --ok: #35c48a;
  --warn: #e8a13a;
  --err: #f0625c;
  --blue: #5b9be0;
  --violet: #9b8cf5;

  /* 圆角 */
  --r-s: 7px;
  --r-m: 10px;
  --r-l: 14px;

  /* 间距 */
  --s1: 4px;  --s2: 8px;  --s3: 12px; --s4: 16px;
  --s5: 20px; --s6: 24px; --s7: 32px; --s8: 44px;

  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.28);
  --nav-w: 232px;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.65 "Microsoft YaHei", "PingFang SC", -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ============================================================
   骨架: 侧边栏 + 内容区
   ============================================================ */
.shell { display: flex; min-height: 100vh; }

.sidenav {
  width: var(--nav-w);
  flex: 0 0 var(--nav-w);
  background: var(--panel);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.brand {
  padding: var(--s5) var(--s5) var(--s4);
  border-bottom: 1px solid var(--line-soft);
}
.brand .bname {
  font-size: 18px; font-weight: 800; letter-spacing: 1.5px;
  color: var(--accent); line-height: 1.2;
}
.brand .bsub { color: var(--muted); font-size: 11.5px; margin-top: 3px; }

.navgroup { padding: var(--s4) var(--s3) var(--s1); }
.navgroup > .gtitle {
  color: var(--muted); font-size: 10.5px; letter-spacing: 1.2px;
  text-transform: uppercase; padding: 0 var(--s3) var(--s2);
}
.navitem {
  display: flex; align-items: center; gap: 10px;
  padding: 9px var(--s3); border-radius: var(--r-s);
  color: var(--text-2); font-size: 13.5px; margin-bottom: 2px;
  transition: background .12s, color .12s;
}
.navitem:hover { background: var(--panel-2); color: var(--text); text-decoration: none; }
.navitem.on { background: var(--accent-dim); color: var(--accent); font-weight: 700; }
.navitem.on .ico { opacity: 1; }
.navitem .ico { width: 16px; text-align: center; opacity: .7; font-size: 13px; }
.navitem .tag {
  margin-left: auto; font-size: 10px; padding: 1px 6px; border-radius: 20px;
  background: var(--panel-3); color: var(--muted); font-weight: 400;
}
.navitem.on .tag { background: rgba(255,212,0,.2); color: var(--accent); }

.navfoot {
  margin-top: auto; padding: var(--s4) var(--s5);
  border-top: 1px solid var(--line-soft);
  color: var(--muted); font-size: 11.5px; line-height: 1.8;
}
.navfoot .dot {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--ok); margin-right: 6px; vertical-align: middle;
}
.navfoot .dot.busy { background: var(--warn); }

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

/* ============================================================
   页面头
   ============================================================ */
.pagehead {
  padding: var(--s6) var(--s7) var(--s5);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(26,33,45,.55), rgba(10,13,19,0));
  display: flex; align-items: flex-start; gap: var(--s5);
  flex-wrap: wrap;
}
.pagehead .ph-main { flex: 1; min-width: 260px; }
.pagehead .crumb { color: var(--muted); font-size: 12px; margin-bottom: 5px; }
.pagehead .crumb a { color: var(--muted); }
.pagehead h1 {
  margin: 0; font-size: 22px; font-weight: 800; letter-spacing: .3px;
  display: flex; align-items: center; gap: 10px;
}
.pagehead .ph-sub { color: var(--muted); font-size: 13px; margin-top: 6px; max-width: 720px; }
.pagehead .ph-act { display: flex; gap: var(--s2); align-items: center; padding-top: 4px; }

.content { padding: var(--s6) var(--s7) var(--s8); flex: 1; }
.content > *:last-child { margin-bottom: 0; }

/* ============================================================
   按钮
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 15px; border-radius: var(--r-s);
  border: 1px solid var(--line); background: var(--panel-2); color: var(--text);
  font-size: 13px; cursor: pointer; font-family: inherit;
  transition: border-color .12s, background .12s;
}
.btn:hover { border-color: var(--blue); color: var(--text); text-decoration: none; }
.btn.primary {
  background: var(--accent); color: #16181c; border-color: var(--accent);
  font-weight: 700;
}
.btn.primary:hover { filter: brightness(1.08); color: #16181c; }
.btn.primary:disabled { background: #333b48; border-color: #333b48; color: #6d7686; cursor: not-allowed; }
.btn.ghost { background: transparent; }
.btn.sm { padding: 5px 11px; font-size: 12px; }
.btn.danger:hover { border-color: var(--err); color: var(--err); }

/* ============================================================
   卡片 / 网格
   ============================================================ */
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-l);
  padding: var(--s5);
  margin-bottom: var(--s5);
}
.card > h2 {
  margin: 0 0 var(--s4); font-size: 14.5px; font-weight: 700;
  display: flex; align-items: center; gap: var(--s2);
}
.card > h2 .count { color: var(--muted); font-weight: 400; font-size: 12px; }
.card > h2 .spacer { flex: 1; }
.card.flat { background: var(--panel-2); }

.grid { display: grid; gap: var(--s4); margin-bottom: var(--s5); }
.grid.g2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid.g3 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.grid.g4 { grid-template-columns: repeat(auto-fit, minmax(175px, 1fr)); }
/* 嵌套在卡片里的窄网格 —— 卡片自己已经是半栏宽了, 里面的卡要更紧凑 */
.grid.tight { grid-template-columns: repeat(auto-fit, minmax(235px, 1fr)); }
/* 素材库卡: 固定三列, 6 个库排成两行, 比 auto-fit 齐整 */
.grid.libs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1250px) { .grid.libs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 820px) { .grid.libs { grid-template-columns: 1fr; } }
.grid.s2 { grid-template-columns: minmax(0, 1fr) 400px; align-items: start; }
@media (max-width: 1150px) { .grid.s2 { grid-template-columns: 1fr; } }
/* 两栏内容长短差很多时, 别把矮的那栏拉高 —— 底部一大片空白很丑 */
.grid.top { align-items: start; }

/* 统计卡 */
.stat {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r-l); padding: var(--s4) var(--s5);
  display: flex; flex-direction: column; gap: 3px;
}
.stat .n { color: var(--muted); font-size: 12px; }
.stat .v {
  font-size: 26px; font-weight: 800; line-height: 1.25;
  font-variant-numeric: tabular-nums; letter-spacing: -.5px;
}
.stat .v small { font-size: 13px; font-weight: 500; color: var(--muted); margin-left: 2px; }
.stat .x { color: var(--muted); font-size: 11.5px; }
.stat.accent .v { color: var(--accent); }

/* 类型选择卡 (向导 Step 1) */
.typecard {
  display: block; position: relative; text-align: left;
  background: var(--panel); border: 1.5px solid var(--line);
  border-radius: var(--r-l); padding: var(--s6);
  cursor: pointer; color: var(--text); font-family: inherit;
  transition: border-color .15s, background .15s, transform .15s;
}
.typecard:hover { border-color: var(--line); background: var(--panel-2); transform: translateY(-2px); }
.typecard.sel { border-color: var(--accent); background: linear-gradient(160deg, rgba(255,212,0,.10), var(--panel) 60%); }
.typecard .tc-ico {
  width: 44px; height: 44px; border-radius: var(--r-m);
  display: flex; align-items: center; justify-content: center;
  font-size: 21px; margin-bottom: var(--s4);
  background: var(--panel-3); color: var(--text);
}
.typecard.sel .tc-ico { background: var(--accent); color: #16181c; }
.typecard h3 { margin: 0 0 var(--s2); font-size: 16px; font-weight: 700; }
.typecard p { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.7; }
.typecard ul { margin: var(--s3) 0 0; padding-left: 18px; color: var(--muted); font-size: 12px; line-height: 1.85; }
.typecard .tc-check {
  position: absolute; top: var(--s4); right: var(--s4);
  width: 20px; height: 20px; border-radius: 50%;
  border: 1.5px solid var(--line); display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: transparent;
}
.typecard.sel .tc-check { border-color: var(--accent); background: var(--accent); color: #16181c; }

/* 步骤条 */
.steps { display: flex; align-items: center; gap: var(--s2); margin-bottom: var(--s6); flex-wrap: wrap; }
.step { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.step .sn {
  width: 22px; height: 22px; border-radius: 50%;
  border: 1.5px solid var(--line); display: flex; align-items: center; justify-content: center;
  font-size: 11.5px; font-weight: 700;
}
.step.on { color: var(--accent); font-weight: 700; }
.step.on .sn { border-color: var(--accent); background: var(--accent); color: #16181c; }
.step.done { color: var(--ok); }
.step.done .sn { border-color: var(--ok); background: rgba(53,196,138,.16); color: var(--ok); }
.step-sep { width: 26px; height: 1px; background: var(--line); }

/* 空状态 */
.empty {
  text-align: center; padding: var(--s8) var(--s5); color: var(--muted);
  border: 1px dashed var(--line); border-radius: var(--r-l); background: var(--panel);
}
.empty .ei { font-size: 30px; opacity: .5; margin-bottom: var(--s3); }
.empty .et { color: var(--text-2); font-weight: 700; margin-bottom: 6px; }
.empty .ed { font-size: 12.5px; margin-bottom: var(--s4); }

/* 提示条 */
.note {
  border-left: 3px solid var(--blue); background: rgba(91,155,224,.07);
  padding: var(--s3) var(--s4); border-radius: 0 var(--r-s) var(--r-s) 0;
  font-size: 12.5px; color: var(--text-2); margin-bottom: var(--s4);
}
.note.warn { border-color: var(--warn); background: rgba(232,161,58,.07); }
.note.ok { border-color: var(--ok); background: rgba(53,196,138,.07); }
.note.accent { border-color: var(--accent); background: rgba(255,212,0,.07); }

/* ============================================================
   素材库卡 / 列表
   ============================================================ */
.libcard {
  display: block; color: var(--text); text-align: left;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r-l); padding: var(--s5); cursor: pointer;
  font-family: inherit; transition: border-color .14s, transform .14s;
}
.libcard:hover { border-color: var(--blue); transform: translateY(-2px); text-decoration: none; }
.libcard.sel { border-color: var(--accent); background: linear-gradient(160deg, rgba(255,212,0,.09), var(--panel) 65%); }
.libcard .ln { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.libcard .lm { color: var(--muted); font-size: 12px; margin-top: 5px; }
.libcard .lp {
  color: var(--muted); font-size: 11px; margin-top: var(--s3);
  word-break: break-all; line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.bar { height: 4px; border-radius: 3px; background: var(--panel-3); overflow: hidden; margin-top: var(--s3); }
.bar > i { display: block; height: 100%; background: var(--accent); }

/* 任务列表 */
.task {
  display: flex; align-items: center; gap: var(--s3);
  padding: 11px var(--s4); border: 1px solid var(--line); border-radius: var(--r-m);
  margin-bottom: var(--s2); background: var(--panel-2); color: var(--text);
}
.task:hover { border-color: var(--blue); text-decoration: none; }
.task .tname { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task .tmeta { color: var(--muted); font-size: 12px; margin-left: auto; white-space: nowrap; }
.task .tmode {
  font-size: 11px; color: var(--muted); background: var(--panel-3);
  padding: 2px 8px; border-radius: 20px; white-space: nowrap;
}

/* 表格 */
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th {
  text-align: left; color: var(--muted); font-weight: 500; font-size: 11.5px;
  padding: 8px 12px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.table td { padding: 10px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr:hover td { background: var(--panel-2); }
.table .num { font-variant-numeric: tabular-nums; color: var(--muted); }
.table a { color: var(--text); font-weight: 600; }

/* 徽章 */
.badge {
  padding: 3px 10px; border-radius: 20px; font-size: 11.5px; font-weight: 700;
  white-space: nowrap; display: inline-block;
}
.badge.queued { background: #2b3340; color: var(--muted); }
.badge.running { background: rgba(91,155,224,.2); color: var(--blue); }
.badge.done   { background: rgba(53,196,138,.18); color: var(--ok); }
.badge.failed { background: rgba(240,98,92,.18); color: var(--err); }
.badge.planned { background: rgba(155,140,245,.14); color: var(--violet); }

/* ============================================================
   表单
   ============================================================ */
label.fld { display: block; margin-bottom: var(--s4); }
label.fld > span { display: block; color: var(--muted); font-size: 12px; margin-bottom: 6px; }
label.fld > span b { color: var(--text-2); font-weight: 600; }
.fldhint { color: var(--muted); font-size: 11.5px; margin-top: 5px; line-height: 1.6; }

select, input[type=number], input[type=text], input[type=search] {
  width: 100%; padding: 9px 11px; background: var(--panel-2);
  border: 1px solid var(--line); border-radius: var(--r-s); color: var(--text);
  font-size: 13px; font-family: inherit;
}
select:focus, input:focus, textarea:focus { outline: none; border-color: var(--blue); }
select:disabled, input:disabled { opacity: .45; cursor: not-allowed; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }
.row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s3); }
@media (max-width: 700px) { .row2, .row3 { grid-template-columns: 1fr; } }

textarea {
  width: 100%; padding: var(--s3) var(--s4); background: var(--panel-2);
  border: 1px solid var(--line); border-radius: var(--r-s); color: var(--text);
  font: 13px/1.8 "Microsoft YaHei", sans-serif; resize: vertical;
}

.check {
  display: flex; align-items: flex-start; gap: 9px; margin-bottom: var(--s3);
  font-size: 13px; cursor: pointer; color: var(--text-2);
}
.check input { width: 16px; height: 16px; accent-color: var(--accent); margin-top: 2px; flex: 0 0 auto; }
.check .cd { font-size: 11.5px; color: var(--muted); margin-top: 2px; }

.hint { color: var(--muted); font-size: 12px; margin: 6px 0 0; line-height: 1.7; }
.hint.warn { color: var(--warn); }

/* ============================================================
   岛屿 / 素材树 (口播自剪)
   ============================================================ */
.island { border: 1px solid var(--line); border-radius: var(--r-m); margin-bottom: var(--s2); overflow: hidden; }
.island > summary {
  cursor: pointer; padding: 11px var(--s4); background: var(--panel-2);
  display: flex; align-items: center; gap: var(--s3); list-style: none;
}
.island > summary::-webkit-details-marker { display: none; }
.island > summary::before { content: "▸"; color: var(--muted); font-size: 11px; }
.island[open] > summary::before { content: "▾"; }
.island .iname { font-weight: 700; }
.island .imeta { color: var(--muted); font-size: 12px; }
.island .icount { margin-left: auto; color: var(--muted); font-size: 12px; }

.files { max-height: 340px; overflow: auto; }
.file {
  display: flex; align-items: center; gap: var(--s3);
  padding: 8px var(--s4); cursor: pointer; border-top: 1px solid var(--line-soft);
  font-size: 13px;
}
.file:hover { background: var(--panel-2); }
.file.sel { background: var(--accent-dim); box-shadow: inset 3px 0 0 var(--accent); }
.file .fname { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file .fsize { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.file .tick { color: var(--accent); width: 12px; }

/* ============================================================
   任务详情 / 日志
   ============================================================ */
.cols { display: grid; grid-template-columns: minmax(0,1fr) 420px; gap: var(--s5); align-items: start; }
@media (max-width: 1150px) { .cols { grid-template-columns: 1fr; } }

.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: var(--s3); }
.kv .k {
  background: var(--panel-2); border: 1px solid var(--line);
  border-radius: var(--r-m); padding: 10px var(--s3);
}
.kv .k .n { color: var(--muted); font-size: 11.5px; }
.kv .k .v { font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }
.kv .k .v small { font-size: 12px; font-weight: 400; color: var(--muted); }

.log {
  background: #070a0e; border: 1px solid var(--line); border-radius: var(--r-m);
  padding: var(--s4); height: 460px; overflow: auto;
  font: 12.5px/1.6 "Cascadia Mono", Consolas, "Courier New", monospace;
  white-space: pre-wrap; word-break: break-all;
}
.log .e { color: var(--err); }

video { width: 100%; max-width: 380px; border-radius: var(--r-m); background: #000; display: block; }

.btnrow { display: flex; gap: var(--s2); flex-wrap: wrap; align-items: center; margin-top: var(--s3); }
.btnrow a, .btnrow button {
  padding: 8px 14px; border-radius: var(--r-s); border: 1px solid var(--line);
  background: var(--panel-2); color: var(--text); font-size: 13px; cursor: pointer;
  font-family: inherit;
}
.btnrow a:hover, .btnrow button:hover { border-color: var(--blue); text-decoration: none; }
.btnrow .accent { border-color: var(--accent); color: var(--accent); }

/* ============================================================
   拼装: 片段编辑器 (旧 class 保持不变)
   ============================================================ */
.shots { max-height: 70vh; overflow: auto; padding-right: 4px; }
.linegrp { margin-bottom: var(--s4); }
.linehead {
  display: flex; align-items: baseline; gap: var(--s3);
  padding: 8px var(--s3); background: var(--panel-2);
  border-left: 3px solid var(--accent); border-radius: 0 var(--r-s) var(--r-s) 0;
  margin-bottom: var(--s2);
}
.linehead .lidx { color: var(--accent); font-weight: 700; font-size: 12px; white-space: nowrap; }
.linehead .ltext { flex: 1; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.linehead .lmeta { color: var(--muted); font-size: 12px; white-space: nowrap; }

.shot {
  display: grid; grid-template-columns: 92px minmax(0,1fr); gap: var(--s3);
  padding: 10px; border: 1px solid var(--line); border-radius: var(--r-m);
  background: var(--panel-2); margin-bottom: var(--s2);
}
.shot:hover { border-color: #3c4759; }
.sthumb {
  width: 92px; height: 155px; border-radius: var(--r-s); overflow: hidden;
  background: #070a0e; display: flex; align-items: center; justify-content: center;
}
.sthumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nothumb { color: var(--muted); font-size: 11px; }
.sbody { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.stags { font-size: 12.5px; line-height: 1.45; color: var(--text); word-break: break-word; }
.sfile { color: var(--muted); font-size: 11px; word-break: break-all; }
.sact { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 2px; }
.sact button {
  padding: 4px 10px; font-size: 12px; border-radius: 6px;
  border: 1px solid var(--line); background: var(--panel);
  color: var(--text); cursor: pointer; font-family: inherit;
}
.sact button:hover { border-color: var(--blue); color: var(--blue); }
.sdur { color: var(--muted); font-size: 12px; display: flex; align-items: center; gap: 5px; }
.sdur input { width: 68px; padding: 4px 7px; }

.cand { grid-column: 1 / -1; }
.candhead { color: var(--muted); font-size: 12px; margin: 6px 0; }
.candlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: var(--s2); }
.canditem {
  cursor: pointer; border: 1px solid var(--line); border-radius: var(--r-s);
  overflow: hidden; background: var(--panel);
}
.canditem:hover { border-color: var(--accent); }
.canditem.used { opacity: .45; }
.canditem img { width: 100%; height: 128px; object-fit: cover; display: block; }
.canditem .cmeta {
  padding: 5px 7px; font-size: 11px; color: var(--muted); line-height: 1.35;
  word-break: break-word; max-height: 54px; overflow: hidden;
}
.canditem .cused { display: block; color: var(--warn); margin-top: 2px; }

/* ============================================================
   向导
   ============================================================ */
.wizpane { display: none; }
.wizpane.on { display: block; }
.wizfoot {
  display: flex; gap: var(--s3); align-items: center;
  padding-top: var(--s5); margin-top: var(--s5); border-top: 1px solid var(--line);
}
.wizfoot .spacer { flex: 1; }

/* ============================================================
   素材库管理页
   ============================================================ */
.libcard .libacts {
  display: flex; gap: 6px; flex-wrap: wrap;
  margin-top: var(--s4); padding-top: var(--s3);
  border-top: 1px solid var(--line-soft);
}
.libcard .libacts .btn { font-size: 11.5px; padding: 5px 10px; }
.libmsg {
  margin-top: var(--s3); font-size: 11.5px; line-height: 1.5;
  color: var(--muted); min-height: 0; word-break: break-word;
}
.libmsg.ok { color: var(--ok); }
.libmsg.err { color: var(--err); }

/* 弹窗 */
.modal { display: none; position: fixed; inset: 0; z-index: 100; }
.modal.on { display: block; }
.modal-bg { position: absolute; inset: 0; background: rgba(0,0,0,.62); backdrop-filter: blur(2px); }
.modal-box {
  position: relative; margin: 5vh auto; max-width: 680px; width: calc(100% - 40px);
  max-height: 88vh; overflow-y: auto;
  background: var(--bg-2, var(--panel)); border: 1px solid var(--line);
  border-radius: var(--r-l); padding: var(--s6);
  box-shadow: 0 24px 70px rgba(0,0,0,.55);
}
.modal-box h2 { margin: 0 0 6px; font-size: 17px; }
.modal-box .mdesc { color: var(--muted); font-size: 12.5px; margin: 0 0 var(--s5); }
.modal-box .btnrow { margin-top: var(--s5); }

/* 盘符栏 —— 素材不一定都在同一个盘, 用户自己挑 */
.drives {
  display: flex; gap: 4px; flex-wrap: wrap;
  padding: 8px 10px; border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.02);
}
.drives .drive {
  display: inline-flex; align-items: center;
  padding: 4px 11px; border-radius: var(--r-s, 5px);
  background: rgba(255,255,255,.05); border: 1px solid var(--line);
  font-size: 12px; font-weight: 600; cursor: pointer;
  color: var(--text-2); font-family: ui-monospace, Consolas, monospace;
  transition: background .14s, border-color .14s, color .14s;
}
.drives .drive:hover { background: rgba(91,155,224,.18); border-color: var(--blue); }
.drives .drive.on {
  background: rgba(255,212,0,.16); border-color: var(--accent); color: var(--accent);
}

/* 手输路径 */
.dirinput { display: flex; gap: 8px; margin-top: var(--s3); }
.dirinput input {
  flex: 1; font-family: ui-monospace, Consolas, monospace; font-size: 12.5px;
}
.dirinput .btn { flex: none; }

/* 目录浏览器 */
.dirtree {
  border: 1px solid var(--line); border-radius: var(--r-m);
  background: var(--bg-1, #0e1116); overflow: hidden;
}
.dirpath {
  padding: 8px 12px; font-size: 11.5px; color: var(--muted);
  border-bottom: 1px solid var(--line); background: rgba(255,255,255,.025);
  font-family: ui-monospace, Consolas, monospace; word-break: break-all;
}
.dirlist { max-height: 300px; overflow-y: auto; }
.dirrow {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; cursor: pointer; font-size: 13px;
  border-bottom: 1px solid rgba(255,255,255,.035);
}
.dirrow:last-child { border-bottom: 0; }
.dirrow:hover { background: rgba(91,155,224,.10); }
.dirrow .di { width: 16px; opacity: .7; flex: none; }
.dirrow .dn { flex: 1; word-break: break-all; }
.dirrow .dm { color: var(--muted); font-size: 11px; flex: none; }
.dirrow.sel { background: rgba(255,212,0,.10); }
.dirrow.sel .di { opacity: 1; color: var(--accent); }
.dirhint { padding: 14px; color: var(--muted); font-size: 12.5px; text-align: center; }
.dirhint.err { color: var(--err); }

/* 已选目录 */
.picked { display: flex; flex-wrap: wrap; gap: 6px; margin-top: var(--s3); min-height: 22px; }
.picked .chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 8px 4px 10px; border-radius: 999px;
  background: rgba(255,212,0,.12); border: 1px solid rgba(255,212,0,.30);
  color: var(--text); font-size: 11.5px;
}
.picked .chip b {
  cursor: pointer; opacity: .6; font-weight: 700;
  font-size: 14px; line-height: 1; padding: 0 2px;
}
.picked .chip b:hover { opacity: 1; color: var(--err); }

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 900px) {
  .shell { flex-direction: column; }
  .sidenav {
    width: 100%; flex: none; height: auto; position: static;
    flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line);
  }
  .brand, .navfoot, .navgroup > .gtitle { display: none; }
  .navgroup { display: flex; padding: var(--s2); }
  .navitem { white-space: nowrap; }
  .content, .pagehead { padding-left: var(--s4); padding-right: var(--s4); }
}
