.hidden { display: none !important; }

/* ================= 局部变量（→ 设计令牌别名，裸 hex 清理见阶段 4） ================= */
:root {
  --bg: var(--t-canvas);
  --bg-panel: var(--t-card);
  --bg-panel-solid: var(--t-card);
  --bg-input: var(--t-track);
  --line: var(--t-line);
  --text: var(--t-ink);
  --muted: var(--t-faint);
  /* pending/警示高亮语义 = 陶土 warn */
  --gold: var(--t-warn);
  --gold-dim: var(--t-warnsoft);
  --red: var(--t-dang);
  --red-dim: var(--t-dangsoft);
  --serif: var(--t-font-sans);
  --sans: var(--t-font-sans);
  --mono: var(--t-font-mono);
  --player-h: 76px;
  --ease: var(--t-ease);
}

.num { font-family: var(--mono); font-feature-settings: 'tnum'; }

/* ================= Base ================= */
body:not(.mobile) {
  background-color: var(--t-canvas);
  background-image:
    linear-gradient(color-mix(in srgb, var(--t-acc) 3%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--t-acc) 3%, transparent) 1px, transparent 1px),
    radial-gradient(ellipse 80% 60% at 50% -10%, color-mix(in srgb, var(--t-acc) 6%, transparent), transparent 60%);
  background-size: 28px 28px, 28px 28px, auto;
}
body {
  font-family: var(--sans);
  font-size: 13px;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
button { cursor: pointer; }
button:active { transform: scale(.97); }

::selection { background: var(--t-acc); color: var(--t-onacc); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--t-card2); border-radius: 6px; border: 2px solid var(--t-canvas); }
::-webkit-scrollbar-thumb:hover { background: var(--t-line); }
::-webkit-scrollbar-track { background: transparent; }
:focus-visible { outline: 2px solid color-mix(in srgb, var(--t-acc) 55%, transparent); outline-offset: 2px; }

/* ================= Header / Nav ================= */
.desktop-nav {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 12px;
  height: 62px;
  /* 与正文卡片左缘严格同轴：居中偏移量 + workspace-inner 的内边距 */
  padding-inline: calc(max((100% - 1400px) / 2, 0px) + clamp(16px, 3vw, 32px));
  background: color-mix(in srgb, var(--t-canvas) 86%, transparent);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--sans); font-size: 17px; font-weight: 700; letter-spacing: .5px; color: var(--text); white-space: nowrap; }
.brand-note { display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 auto; color: var(--t-onacc); font-size: 18px; font-family: var(--sans); background: var(--t-acc); border-radius: 12px; box-shadow: 0 6px 16px rgba(var(--brand-rgb), .25); }

.nav-search { position: relative; margin-left: 8px; }
.nav-search svg { position: absolute; left: 11px; top: 50%; width: 15px; height: 15px; transform: translateY(-50%); color: var(--t-faint); pointer-events: none; }
.nav-search input { width: 288px; height: 40px; padding: 0 12px 0 36px; color: var(--t-sub); background: var(--t-card); border: 1px solid var(--line); border-radius: 10px; font-size: 12px; outline: none; transition: width .25s var(--ease), border-color .2s var(--ease); }
.nav-search input::placeholder { color: var(--t-faint); }
.nav-search input:focus { width: 384px; border-color: var(--t-acc); }
.nav-search input::-webkit-search-cancel-button { -webkit-appearance: none; }

.content-tabs { display: flex; gap: 4px; margin-left: auto; padding: 4px; background: var(--t-card); border: 1px solid var(--line); border-radius: 12px; }
.content-tab { padding: 8px 18px; color: var(--t-faint); background: transparent; border: 0; border-radius: 9px; font-size: 13px; font-weight: 500; transition: color .15s var(--ease), background .15s var(--ease); }
.content-tab:hover { color: var(--t-sub); background: var(--t-card2); }
.content-tab.active { color: var(--t-acc); background: var(--t-accsoft); }

.nav-batch { display: flex; gap: 6px; }

.chip-btn { height: 30px; padding: 0 12px; color: var(--t-faint); background: transparent; border: 1px solid var(--line); border-radius: 999px; font-size: 12px; white-space: nowrap; transition: color .15s var(--ease), background .15s var(--ease), border-color .15s var(--ease); }
.chip-btn:hover { color: var(--t-sub); border-color: color-mix(in srgb, var(--t-acc) 40%, var(--t-line)); }
.chip-btn.on { color: var(--t-acc); background: var(--t-accsoft); border-color: transparent; }

.icon-button { width: 40px; height: 40px; padding: 0; display: grid; place-items: center; color: var(--t-faint); background: transparent; border: 1px solid var(--line); border-radius: 10px; transition: color .15s var(--ease), background .15s var(--ease), border-color .15s var(--ease); }
.icon-button:hover { color: var(--t-sub); background: var(--t-card2); }
.icon-button.active { color: var(--t-acc); border-color: rgba(var(--brand-rgb), .5); background: var(--t-accsoft); }

.primary-button { height: 40px; padding: 0 18px; color: var(--t-onacc); background: var(--t-acc); border: 0; border-radius: 10px; font-size: 13px; font-weight: 600; white-space: nowrap; box-shadow: 0 8px 20px rgba(var(--brand-rgb), .22); transition: filter .15s var(--ease), box-shadow .15s var(--ease); }
.primary-button:hover { filter: brightness(1.08); box-shadow: 0 10px 26px rgba(var(--brand-rgb), .3); }
#nav-upload-button span { margin-right: 4px; font-size: 15px; vertical-align: -1px; }

.secondary-button { margin-top: 14px; padding: 9px 15px; color: var(--t-sub); background: var(--t-card2); border: 1px solid var(--line); border-radius: 10px; font-size: 12px; transition: color .15s var(--ease), border-color .15s var(--ease); }
.secondary-button:hover { color: var(--t-acc); border-color: rgba(var(--brand-rgb), .45); }

/* ================= Workspace Shell ================= */
#main-container { min-height: 0; flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.desktop-workspace { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; }
.workspace-inner { max-width: 1400px; margin: 0 auto; padding: 26px clamp(16px, 3vw, 32px) calc(var(--player-h) + 42px); }
.content-panel { min-width: 0; }
.content-pane { display: flex; flex-direction: column; gap: 18px; }

.pane-head h2 { margin: 0; font-family: var(--serif); font-size: 22px; font-weight: 600; letter-spacing: .5px; color: var(--text); }
.pane-meta { margin: 5px 0 0; color: var(--muted); font-size: 11px; }

/* 上传 / 整理台视图定宽居中（对齐预览稿 max-w） */
.content-pane[data-pane="upload"] { width: 100%; max-width: 960px; margin: 0 auto; }
.content-pane[data-pane="review"] { width: 100%; max-width: 1080px; margin: 0 auto; }

/* ================= Stat cards ×4 ================= */
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.stat-card { display: flex; flex-direction: column; gap: 8px; padding: 18px 20px; background: var(--t-card); border: 1px solid var(--line); border-radius: var(--t-radius-lg); }
.stat-label { margin: 0; color: var(--t-faint); font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.stat-value { margin: 0; color: var(--t-ink); font-size: 30px; font-weight: 700; line-height: 1.15; }
.stat-value small { margin-left: 2px; color: var(--t-faint); font-size: 13px; font-weight: 500; }
.stat-value.accent-warn { color: var(--t-warn); }
.stat-link { align-self: flex-start; padding: 0; color: var(--t-acc); background: none; border: 0; font-size: 11px; }
.stat-link:hover { text-decoration: underline; }
.sparkbars { display: flex; align-items: flex-end; gap: 4px; height: 20px; margin-top: 2px; }
.sparkbars span { width: 8px; border-radius: 3px; background: var(--t-track); }
.sparkbars span:nth-last-child(-n+2) { background: color-mix(in srgb, var(--t-live) 55%, var(--t-track)); }
.sparkbars span:last-child { background: var(--t-live); }
.meter { height: 8px; margin-top: 4px; overflow: hidden; background: var(--t-track); border-radius: 999px; }
.meter i { display: block; height: 100%; background: var(--t-acc); border-radius: inherit; }

/* ================= Library grid ================= */
.library-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 16px; align-items: start; }
.side-stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

.list-card { overflow: hidden; background: var(--t-card); border: 1px solid var(--line); border-radius: var(--t-radius-lg); }
.list-card-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 15px 20px; border-bottom: 1px solid var(--line); }
.list-card-head h2 { margin: 0; color: var(--t-ink); font-size: 14px; font-weight: 600; }
.head-note { color: var(--t-faint); font-size: 11px; font-weight: 400; }
.list-chips { display: flex; gap: 6px; }
.table-head { display: grid; grid-template-columns: minmax(0, 1fr) 110px 90px 110px; gap: 16px; padding: 8px 20px; background: var(--t-deepband); border-bottom: 1px solid var(--line); color: var(--t-faint); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; }
.table-head .ta-r { text-align: right; }

.audio-list { display: block; }
.audio-list .file-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 110px 90px auto;
  gap: 16px; align-items: center;
  padding: 12px 20px; border-radius: 0;
  border-bottom: 1px solid color-mix(in srgb, var(--t-line) 55%, transparent);
}
.audio-list .file-item:last-child { border-bottom: 0; }
.audio-list .file-item:hover { background: color-mix(in srgb, var(--t-acc) 5%, transparent); }

/* ================= Right column cards ================= */
.cat-card { padding: 18px 18px 12px; background: var(--t-card); border: 1px solid var(--line); border-radius: var(--t-radius-lg); }
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.card-head h2, .quick-card > h2 { margin: 0; color: var(--t-ink); font-size: 14px; font-weight: 600; }

.category-list { max-height: 360px; overflow-y: auto; margin: 0 -6px; padding: 0 6px; }
.category-item { position: relative; display: block; padding: 10px 12px; border-radius: 10px; cursor: pointer; user-select: none; transition: background .15s var(--ease); }
.category-item + .category-item { margin-top: 2px; }
.category-item:hover { background: var(--t-card2); }
.category-item.active { background: var(--t-accsoft); }
.category-item.dragging { opacity: .5; }
.cat-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; padding-right: 24px; }
.category-item .category-name { min-width: 0; overflow: hidden; color: var(--t-sub); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.category-item.active .category-name { color: var(--t-ink); font-weight: 500; }
.category-item .category-count { flex: 0 0 auto; color: var(--t-faint); font-family: var(--mono); font-size: 11px; font-variant-numeric: tabular-nums; }
.category-item.active .category-count { color: var(--t-acc); }
.cat-bar { display: block; height: 5px; overflow: hidden; background: var(--t-track); border-radius: 999px; }
.cat-bar-fill { display: block; height: 100%; border-radius: inherit; transition: width .3s var(--ease); }
.cat-bar-fill.b0 { background: color-mix(in srgb, var(--t-acc) 80%, transparent); }
.cat-bar-fill.b1 { background: color-mix(in srgb, var(--t-ok) 70%, transparent); }
.cat-bar-fill.b2 { background: color-mix(in srgb, var(--t-warn) 70%, transparent); }
.cat-bar-fill.b3 { background: color-mix(in srgb, var(--t-live) 60%, transparent); }
.cat-bar-fill.b4 { background: var(--t-line); }
.category-item .category-actions { position: absolute; top: 8px; right: 8px; display: flex; gap: 2px; opacity: 0; transition: opacity .15s var(--ease); }
.category-item:hover .category-actions, .category-item.active .category-actions { opacity: 1; }
.category-empty { padding: 10px; color: var(--muted); font-size: 12px; text-align: center; }
.category-icon-btn { width: 26px; height: 26px; display: grid; place-items: center; color: var(--t-faint); background: transparent; border: 0; border-radius: 8px; font-size: 16px; cursor: pointer; transition: color .15s var(--ease), background .15s var(--ease); }
.category-icon-btn:hover { color: var(--t-acc); background: var(--t-accsoft); }
.cat-hint { margin: 10px 0 0; color: var(--t-faint); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; text-align: center; border-top: 1px dashed var(--line); padding-top: 10px; }

.quick-card { padding: 18px; background: var(--t-deepband); border: 1px solid var(--line); border-radius: var(--t-radius-lg); }
.quick-card > h2 { display: block; margin-bottom: 12px; }
.quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.quick-btn { height: 38px; padding: 7px 16px; color: var(--t-sub); background: var(--t-card2); border: 0; border-radius: 10px; font-size: 12px; font-weight: 500; transition: color .15s var(--ease), background .15s var(--ease), filter .15s var(--ease); }
.quick-btn:hover { color: var(--t-acc); background: var(--t-accsoft); }
.quick-btn.primary { color: var(--t-onacc); background: var(--t-acc); font-weight: 600; }
.quick-btn.primary:hover { color: var(--t-onacc); filter: brightness(1.08); }
.quick-card .content-tab.quick-btn.active { box-shadow: inset 0 0 0 1px rgba(var(--brand-rgb), .55); }

/* ================= Empty state ================= */
.empty-state { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 64px 24px; color: var(--muted); text-align: center; }
.list-card .empty-state { min-height: 300px; justify-content: center; border-top: 1px solid color-mix(in srgb, var(--t-line) 55%, transparent); }
.empty-state strong { color: var(--text); font-size: 15px; font-family: var(--serif); }
.empty-state span { font-size: 12px; }
.empty-icon { margin-bottom: 7px; color: var(--t-faint); font-size: 52px; }

/* ================= File list rows（JS 渲染 · 新表格行结构） ================= */
.file-item { position: relative; min-height: 56px; user-select: none; transition: background .2s var(--ease), box-shadow .2s var(--ease); }
.file-item.playing { box-shadow: inset 3px 0 0 var(--t-live); background: color-mix(in srgb, var(--t-live) 7%, transparent); }
.file-item.completed .name { color: var(--t-faint); text-decoration: line-through; }
.cell-main { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cell-text { flex: 1; min-width: 0; }
.name-row { min-width: 0; display: flex; align-items: center; gap: 8px; }
.playing-badge { flex: 0 0 auto; color: var(--t-live); font-size: 10px; letter-spacing: .05em; white-space: nowrap; }
.file-item .name { overflow: hidden; color: var(--text); font-size: 13px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.file-item .meta { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; }
.cell-cat { min-width: 0; overflow: hidden; color: var(--t-sub); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.cell-dur { color: var(--t-sub); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.cell-actions { display: flex; justify-content: flex-end; gap: 4px; opacity: .65; transition: opacity .2s var(--ease); }
.file-item:hover .cell-actions, .file-item:focus-within .cell-actions { opacity: 1; }
.file-item .audio-completion-toggle.row-icon-btn { width: 28px; height: 28px; flex: 0 0 28px; padding: 0; display: grid; place-items: center; color: var(--t-acc); background: transparent; border-radius: 8px; font-size: 14px; transition: color .15s var(--ease), background .15s var(--ease); }
.file-item .audio-completion-toggle.row-icon-btn:hover { background: var(--t-accsoft); }
.file-item.completed .audio-completion-toggle.row-icon-btn { color: var(--t-ok); }
.file-item .del-btn { width: 28px; height: 28px; flex: 0 0 28px; margin-left: 2px; padding: 0; color: var(--muted); background: transparent; border: 0; border-radius: 8px; font-size: 18px; transition: color .15s var(--ease), background .15s var(--ease); }
.file-item .del-btn:hover { color: var(--red); background: var(--red-dim); }
.file-item .audio-select-checkbox { width: 16px; height: 16px; flex: 0 0 16px; margin: 0; accent-color: var(--t-acc); cursor: pointer; }
.file-item .file-action-btn { width: 28px; height: 28px; flex: 0 0 28px; padding: 0; color: var(--muted); background: transparent; border: 0; border-radius: 8px; cursor: pointer; transition: color .15s var(--ease), background .15s var(--ease); }
.file-item .file-action-btn:hover { color: var(--t-acc); background: var(--t-accsoft); }
@media (max-width: 1100px) {
  .audio-list .file-item { grid-template-columns: minmax(0, 1fr) auto; }
  .cell-cat, .cell-dur { display: none; }
}

/* ================= Upload pane ================= */
.upload-dropzone { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 230px; flex-shrink: 0; padding: 44px 24px 28px; border: 2px dashed var(--t-line); border-radius: var(--t-radius-lg); background: color-mix(in srgb, var(--t-card) 60%, transparent); text-align: center; outline: 0; cursor: pointer; transition: border-color .25s var(--ease), background .25s var(--ease), transform .25s var(--ease); }
.upload-dropzone:hover, .upload-dropzone:focus-visible { border-color: rgba(var(--brand-rgb), .7); background: rgba(var(--brand-rgb), .05); }
.upload-dropzone.dragover { border-style: solid; border-color: var(--t-acc); background: rgba(var(--brand-rgb), .1); transform: scale(1.01); }
.drop-icon { display: grid; place-items: center; width: 54px; height: 54px; margin-bottom: 14px; color: var(--t-acc); background: var(--t-accsoft); border-radius: 16px; font-size: 24px; transition: transform .25s var(--ease); }
.upload-dropzone:hover .drop-icon { transform: scale(1.06); }
.upload-dropzone h2 { margin: 0 0 6px; color: var(--text); font-family: var(--sans); font-size: 15px; font-weight: 600; }
.upload-dropzone p { margin: 0 0 10px; color: var(--t-acc); font-size: 13px; }
.upload-dropzone small { color: var(--muted); font-size: 11px; }

.queue-section { display: flex; flex-direction: column; gap: 12px; }
.queue-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.queue-head h2 { margin: 0; font-family: var(--serif); font-size: 18px; font-weight: 600; color: var(--text); }
.queue-summary { color: var(--muted); font-size: 12px; white-space: nowrap; }
.upload-queue { display: flex; flex-direction: column; gap: 10px; }
.queue-empty { padding: 18px 0; color: var(--muted); font-size: 13px; }
.upload-item { padding: 15px 16px; background: var(--bg-panel); border: 1px solid var(--line); border-radius: 14px; animation: queue-in .3s var(--ease); }
.upload-item-head, .upload-item-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.upload-item-name { min-width: 0; overflow: hidden; color: var(--text); font-size: 13px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.upload-item-state { flex: 0 0 auto; color: var(--muted); font-size: 12px; }
.upload-item-state.done { color: var(--t-ok); }
.upload-item-state.failed { color: var(--red); }
.progress-track { height: 6px; margin: 13px 0 9px; overflow: hidden; background: var(--t-track); border-radius: 6px; }
.progress-value { width: 0; height: 100%; background: linear-gradient(90deg, color-mix(in srgb, var(--t-acc) 80%, var(--t-onacc)), var(--t-acc)); border-radius: inherit; transition: background .2s var(--ease); will-change: width; }
.progress-value.done { background: var(--t-ok); }
.progress-value.failed { background: var(--red); }
.upload-item-foot { color: var(--muted); font-size: 11px; }
.upload-item-actions { display: flex; justify-content: flex-end; gap: 12px; min-height: 20px; margin-top: 4px; }
.upload-action { padding: 2px 0; color: var(--t-acc); background: none; border: 0; font-size: 12px; }
.upload-action:hover { filter: brightness(1.15); text-decoration: underline; }
.upload-action--cancel:hover { color: var(--red); filter: none; }

.upload-category-selector { display: flex; align-items: center; gap: 10px; margin-top: 20px; padding: 8px 14px; background: var(--t-track); border: 1px solid var(--line); border-radius: 10px; }
.upload-category-label { color: var(--muted); font-size: 12px; }
#upload-category-select { flex: 1; min-width: 120px; padding: 6px 8px; color: var(--text); background: var(--bg-input); border: 1px solid var(--line); border-radius: 8px; font-size: 13px; outline: none; }
#upload-category-select:focus { border-color: var(--t-acc); }

@keyframes queue-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ================= Category context menu ================= */
.category-context-menu { position: fixed; z-index: 100; min-width: 140px; padding: 6px 0; background: color-mix(in srgb, var(--t-deepband) 96%, transparent); border: 1px solid var(--line); border-radius: 11px; box-shadow: 0 16px 40px rgba(0, 0, 0, .4); backdrop-filter: blur(20px); }
.category-context-menu button { width: 100%; padding: 9px 14px; text-align: left; color: var(--text); background: none; border: 0; font-size: 13px; cursor: pointer; }
.category-context-menu button:hover { background: var(--t-card2); }
.category-context-menu button.danger { color: var(--red); }

/* ================= Modal ================= */
.modal-overlay { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, .55); backdrop-filter: blur(5px); }
.modal-panel { width: min(360px, calc(100vw - 40px)); max-height: 70vh; display: flex; flex-direction: column; background: var(--bg-panel-solid); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 24px 70px rgba(0, 0, 0, .5); overflow: hidden; }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.modal-header h3 { margin: 0; font-family: var(--serif); font-size: 17px; font-weight: 600; color: var(--text); }
.modal-close { width: 28px; height: 28px; color: var(--muted); background: transparent; border: 0; border-radius: 8px; font-size: 20px; cursor: pointer; }
.modal-close:hover { color: var(--text); background: var(--t-card2); }
#app-modal { z-index: 240; }
.modal-body { padding: 16px 18px 2px; }
.modal-message { margin: 0; color: var(--text); font-size: 13px; line-height: 1.7; overflow-wrap: anywhere; }
.modal-input { width: 100%; height: 40px; padding: 0 12px; color: var(--text); background: var(--bg-input); border: 1px solid var(--line); border-radius: 10px; outline: 0; transition: border-color .2s var(--ease), box-shadow .2s var(--ease); }
.modal-input:focus { border-color: var(--t-acc); box-shadow: 0 0 0 3px rgba(var(--brand-rgb), .16); }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 18px 18px; }
.modal-actions button { height: 36px; padding: 0 16px; margin-top: 0; font-size: 13px; }
.modal-actions button.danger { background: var(--t-dang); color: rgb(255 255 255 / .94); box-shadow: 0 10px 24px rgba(196, 118, 107, .22); }
.modal-actions button.danger:hover { filter: brightness(1.1); }
.move-category-list { overflow-y: auto; padding: 8px; }
.move-category-option { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; cursor: pointer; }
.move-category-option:hover { background: var(--t-card2); }
.move-category-option.active { background: var(--t-accsoft); }

/* ================= Review workspace ================= */
.review-workspace-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.review-workspace-title h2 { margin: 0; font-family: var(--serif); font-size: 22px; font-weight: 600; letter-spacing: .5px; color: var(--text); }
.review-toolbar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.review-margin { display: flex; align-items: center; gap: 8px; padding: 6px 8px 6px 12px; color: var(--muted); font-size: 12px; background: var(--t-card); border: 1px solid var(--line); border-radius: 10px; }
.review-margin input { width: 58px; padding: 4px 6px; color: var(--text); background: var(--bg-input); border: 1px solid var(--line); border-radius: 8px; font-size: 13px; outline: none; font-variant-numeric: tabular-nums; }
.review-margin input:focus { border-color: var(--t-acc); }
.review-margin input::-webkit-inner-spin-button, .review-margin input::-webkit-outer-spin-button { opacity: 1; }
.review-summary { color: var(--muted); font-size: 12px; white-space: nowrap; }
.review-summary b { color: var(--gold); }
.review-filters { display: flex; gap: 6px; }
.review-filters button { padding: 6px 12px; color: var(--muted); background: transparent; border: 1px solid var(--line); border-radius: 999px; font-size: 12px; cursor: pointer; transition: color .15s var(--ease), background .15s var(--ease), border-color .15s var(--ease); }
.review-filters button:hover { color: var(--t-sub); border-color: color-mix(in srgb, var(--t-acc) 35%, var(--t-line)); }
.review-filters button.active { color: var(--t-warn); background: var(--t-warnsoft); border-color: color-mix(in srgb, var(--t-warn) 30%, transparent); }

.review-player-bar { flex-shrink: 0; display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--t-deepband); border: 1px solid var(--line); border-radius: var(--t-radius-lg); }
.review-player-title { flex: 1; min-width: 0; color: var(--text); font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.review-player-controls { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.review-player-btn { min-width: 40px; height: 34px; padding: 0 10px; color: var(--t-sub); background: var(--t-card2); border: 1px solid var(--line); border-radius: 10px; font-size: 12px; font-weight: 600; cursor: pointer; transition: background .15s var(--ease), color .15s var(--ease), filter .15s var(--ease); }
.review-player-btn:hover { color: var(--t-acc); background: var(--t-accsoft); }
.review-player-toggle { color: var(--t-onacc); background: var(--t-acc); border-color: transparent; }
.review-player-toggle:hover { color: var(--t-onacc); background: var(--t-acc); filter: brightness(1.08); }
.review-player-progress { flex: 0 0 160px; accent-color: var(--t-live); cursor: pointer; }
.review-player-time { flex-shrink: 0; color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }

.review-list { display: flex; flex-direction: column; gap: 10px; }
.review-empty { padding: 30px 0; color: var(--muted); font-size: 13px; text-align: center; }
.review-item { display: flex; align-items: flex-start; gap: 14px; padding: 16px 20px; background: var(--bg-panel); border: 1px solid var(--line); border-radius: var(--t-radius-lg); }
.review-item.done { opacity: .62; background: color-mix(in srgb, var(--t-deepband) 70%, var(--t-card)); }
.review-item-main { flex: 1; min-width: 0; }
.review-item-headrow { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.review-item-title { min-width: 0; overflow: hidden; color: var(--text); font-size: 13px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.review-item-time { flex: 0 0 auto; margin-top: 2px; padding: 8px 12px; color: var(--t-warn); background: var(--t-warnsoft); border: 1px solid color-mix(in srgb, var(--t-warn) 25%, transparent); border-radius: 10px; font-size: 11px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.review-item-status { padding: 1px 8px; border-radius: 10px; font-size: 10px; font-weight: 600; }
.review-item-status.pending { color: var(--gold); background: var(--gold-dim); }
.review-item-status.done { color: var(--t-ok); background: color-mix(in srgb, var(--t-ok) 12%, transparent); }
.review-item-note { flex: 1; min-width: 0; min-height: 58px; padding: 8px 10px; color: var(--text); background: var(--bg-input); border: 1px solid var(--line); border-radius: 8px; font-size: 12px; font-family: inherit; line-height: 1.5; resize: vertical; outline: none; }
.review-item-note:focus { border-color: var(--t-acc); }
.review-item-note.dirty { border-color: var(--gold); }
.review-item-actions { flex: 0 0 auto; display: flex; flex-direction: column; gap: 8px; }
.review-btn { min-width: 76px; padding: 7px 12px; border: 0; border-radius: 8px; font-size: 12px; font-weight: 600; cursor: pointer; color: var(--text); transition: background .15s var(--ease), color .15s var(--ease); }
.review-btn.play { color: var(--t-onacc); background: var(--t-acc); }
.review-btn.play:hover { filter: brightness(1.08); }
.review-btn.done { color: var(--t-acc); background: var(--t-accsoft); }
.review-btn.done.undo { background: transparent; border: 1px solid var(--line); color: var(--muted); }
.review-btn.del { background: transparent; border: 1px solid var(--line); color: var(--muted); }
.review-btn.del:hover { color: var(--red); border-color: color-mix(in srgb, var(--t-dang) 50%, transparent); }

/* ================= Toast ================= */
.toast { position: fixed; right: 24px; bottom: calc(var(--player-h) + 18px); z-index: 80; max-width: min(420px, calc(100vw - 48px)); padding: 12px 14px; color: var(--t-ink); background: color-mix(in srgb, var(--t-deepband) 94%, transparent); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 30px rgba(0, 0, 0, .4); opacity: 0; transform: translateY(10px); pointer-events: none; transition: opacity .25s var(--ease), transform .25s var(--ease); backdrop-filter: blur(18px); }
.toast.visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.toast button { margin-left: 14px; padding: 0; color: var(--t-acc); background: none; border: 0; font-weight: 600; }
.toast button:hover { text-decoration: underline; }

/* ================= Bottom player bar（对齐预览稿 footer 三区结构） ================= */
#statusbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; height: var(--player-h); background: color-mix(in srgb, var(--t-card) 95%, transparent); border-top: 1px solid var(--line); backdrop-filter: blur(22px); color: var(--text); font-size: 13px; box-shadow: 0 -8px 30px rgba(0, 0, 0, .35); }
#statusbar::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: var(--t-track); }

.player-main { position: relative; height: 100%; display: grid; grid-template-columns: 288px minmax(0, 1fr) 288px; align-items: center; gap: 24px; padding: 8px clamp(16px, 3vw, 32px) 0; }
.player-side { display: flex; align-items: center; gap: 14px; min-width: 0; }
.player-side-right { justify-content: flex-end; gap: 10px; }
.player-center { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.player-art { flex: 0 0 48px; width: 48px; height: 48px; display: grid; place-items: center; color: var(--t-acc); font-size: 20px; font-family: var(--sans); background: linear-gradient(135deg, color-mix(in srgb, var(--t-acc) 42%, var(--t-canvas)), var(--t-deepband)); border: 1px solid var(--line); border-radius: 12px; box-shadow: inset 0 1px 0 rgba(255, 235, 200, .08); }
.player-meta { min-width: 0; }
.player-title { overflow: hidden; color: var(--text); font-size: 13px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.player-sub { overflow: hidden; margin-top: 3px; color: var(--t-faint); font-size: 10px; letter-spacing: .08em; text-overflow: ellipsis; white-space: nowrap; }

.player-controls { display: flex; align-items: center; gap: 16px; }
.player-skip { width: 36px; height: 36px; padding: 0; display: grid; place-items: center; color: var(--t-sub); background: transparent; border: 0; border-radius: 10px; transition: color .15s var(--ease), background .15s var(--ease); }
.player-skip:hover { color: var(--t-ink); background: var(--t-card2); }
.player-play, #status-play-btn { width: 44px; height: 44px; padding: 0; display: grid; place-items: center; color: var(--t-onacc); font-size: 17px; background: var(--t-acc); border: 0; border-radius: 12px; box-shadow: 0 10px 26px rgba(var(--brand-rgb), .28); transition: transform .15s var(--ease), filter .15s var(--ease), box-shadow .15s var(--ease); }
.player-play:hover, #status-play-btn:hover { transform: scale(1.05); filter: brightness(1.06); }
.player-play:active, #status-play-btn:active { transform: scale(.95); }

.player-slider-row { display: flex; align-items: center; gap: 12px; width: 100%; max-width: 672px; }
.player-timelabel { flex: 0 0 auto; color: var(--t-faint); font-size: 12px; font-variant-numeric: tabular-nums; }
.player-timelabel.live { color: var(--t-live); font-weight: 600; }

/* 滑杆本体即进度槽：JS 写入 linear-gradient 实现已填充段（webkit），FF 走 range-progress */
#status-progress { flex: 1; height: 6px; margin: 0; padding: 0; background: var(--t-track); border: 0; border-radius: 999px; cursor: pointer; -webkit-appearance: none; appearance: none; outline: none; }
#status-progress::-webkit-slider-runnable-track { height: 6px; border-radius: inherit; background: transparent; }
#status-progress::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 12px; height: 12px; margin-top: -3px; border: 2px solid var(--t-live); border-radius: 50%; background: var(--t-ink); transition: transform .15s var(--ease); }
#status-progress:hover::-webkit-slider-thumb { transform: scale(1.15); }
#status-progress::-moz-range-track { height: 6px; border-radius: inherit; background: transparent; }
#status-progress::-moz-range-progress { height: 6px; border-radius: inherit; background: var(--t-live); }
#status-progress::-moz-range-thumb { width: 9px; height: 9px; border: 2px solid var(--t-live); border-radius: 50%; background: var(--t-ink); }

.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
#seek-input { width: 96px; height: 36px; padding: 0 10px; text-align: center; color: var(--text); background: var(--bg-input); border: 1px solid var(--line); border-radius: 9px; font-size: 12px; outline: none; font-variant-numeric: tabular-nums; transition: border-color .15s var(--ease); }
#seek-input:focus { border-color: var(--t-acc); }
#seek-input::placeholder { color: color-mix(in srgb, var(--t-faint) 70%, transparent); }
#status-speed-btn { height: 36px; min-width: 52px; padding: 0 12px; color: var(--t-ink); background: var(--t-card2); border: 1px solid var(--line); border-radius: 9px; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; transition: color .15s var(--ease), background .15s var(--ease), border-color .15s var(--ease); }
#status-speed-btn:hover { color: var(--t-acc); border-color: rgba(var(--brand-rgb), .5); background: var(--t-accsoft); }

@media (max-width: 1240px) {
  .player-main { grid-template-columns: minmax(0, 220px) minmax(0, 1fr) auto; }
}
@media (max-width: 1100px) {
  .player-sub, #seek-input { display: none; }
  .player-main { grid-template-columns: minmax(0, 180px) minmax(0, 1fr) auto; }
}

/* ================= Login（Hearth 视觉 · 结构不变） ================= */
#login-view { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; background: radial-gradient(900px 620px at 50% 8%, color-mix(in srgb, var(--t-acc) 10%, var(--t-canvas)), var(--t-canvas) 62%); }
#login-box { width: min(380px, calc(100vw - 40px)); padding: 40px 36px 32px; text-align: center; background: var(--t-card); border: 1px solid var(--line); border-radius: var(--t-radius-xl); box-shadow: 0 30px 90px rgba(0, 0, 0, .5); }
.login-mark { width: 52px; height: 52px; margin: 0 auto 16px; display: grid; place-items: center; border-radius: 14px; color: var(--t-onacc); font-size: 24px; background: var(--t-acc); box-shadow: 0 14px 34px rgba(var(--brand-rgb), .3); }
.login-eyebrow { margin: 0; color: var(--t-faint); font-size: 10px; font-weight: 700; letter-spacing: 1.6px; text-transform: uppercase; }
#login-box h1 { margin: 10px 0 6px; color: var(--text); font-family: var(--sans); font-size: 26px; font-weight: 700; letter-spacing: .5px; }
.login-subtitle { margin: 0 0 28px; color: var(--muted); font-size: 14px; }
#password { width: 100%; height: 46px; padding: 0 14px; color: var(--text); background: var(--t-track); border: 1px solid var(--line); border-radius: 12px; outline: 0; text-align: center; transition: border-color .2s var(--ease), box-shadow .2s var(--ease); }
#password:focus { border-color: var(--t-acc); box-shadow: 0 0 0 3px rgba(var(--brand-rgb), .16); }
#login-box .primary-button { width: 100%; height: 46px; margin-top: 14px; font-size: 14px; }
#login-error { min-height: 20px; margin-top: 12px; color: var(--t-dang); font-size: 13px; }

/* ================= Responsive ================= */
@media (max-width: 1280px) {
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .library-grid { grid-template-columns: minmax(0, 1fr); }
  .side-stack { display: grid; grid-template-columns: 1fr 1fr; }
}
@media (max-width: 1080px) {
  .nav-search { display: none; }
}
@media (max-width: 900px) {
  .brand-name { display: none; }
  .table-head span:nth-child(2), .table-head span:nth-child(3) { display: none; }
}
@media (max-width: 720px) {
  .nav-batch { display: none; }
}
