/* ============================================================
   LINX 影像工作台 — 暗房工作室 / Studio Console
   ============================================================ */
:root {
  --bg: #0A0A0C;
  --panel: #141418;
  --panel-2: #1B1B21;
  --border: #26262B;
  --border-soft: #1F1F25;
  --text: #F5F5F7;
  --muted: #A1A1AA;
  --muted-2: #6B6B73;
  --accent: #FF4D2E;
  --accent-dim: #FF4D2E26;
  --ok: #2DD4BF;
  --ok-dim: #2DD4BF1f;
  --danger: #EF4444;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 18px 40px -18px rgba(0,0,0,.7);
  --ease: cubic-bezier(.22,.61,.36,1);
  --font-cjk: "Noto Sans SC", system-ui, sans-serif;
  --font-display: "Bricolage Grotesque", var(--font-cjk);
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

html, body { height: 100%; }

body {
  font-family: var(--font-cjk);
  background:
    radial-gradient(900px 500px at 85% -10%, #1a1620 0%, transparent 60%),
    radial-gradient(700px 500px at -5% 110%, #101820 0%, transparent 55%),
    var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  line-height: 1.6;
}

.mono { font-family: var(--font-mono); font-feature-settings: "tnum" 1; }
.muted-sm { color: var(--muted-2); font-size: 12px; }
.hint { color: var(--muted-2); font-size: 12px; font-weight: 400; }

/* ---------- 顶栏 ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 22px;
  border-bottom: 1px solid var(--border-soft);
  background: rgba(10,10,12,.7);
  backdrop-filter: blur(12px);
  position: sticky; top: 0; z-index: 30;
}
.brand { display: flex; align-items: baseline; gap: 10px; }
.brand-mark {
  width: 12px; height: 12px; border-radius: 3px;
  background: var(--accent);
  box-shadow: 0 0 16px var(--accent);
  align-self: center;
}
.brand-name {
  font-family: var(--font-display); font-weight: 800; font-size: 22px;
  letter-spacing: -.02em;
}
.brand-sub { color: var(--muted); font-size: 13px; letter-spacing: .14em; }
.topbar-right { display: flex; align-items: center; gap: 14px; }
.folder-btn {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--panel-2); color: var(--muted); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 7px 12px; cursor: pointer;
  font-family: var(--font-cjk); font-size: 13px; max-width: 240px;
  transition: color .18s, border-color .18s;
}
.folder-btn:hover { color: var(--text); border-color: var(--muted-2); }
.folder-btn.is-set { color: var(--ok); border-color: #2dd4bf40; }
.folder-btn.is-set .icon { color: var(--ok); }
.folder-btn #folder-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.line-select { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.line-select select {
  background: var(--panel-2); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 7px 10px; font-family: var(--font-cjk); font-size: 13px; cursor: pointer;
}

/* ---------- 工作区 ---------- */
.workspace {
  flex: 1;
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 22px;
  padding: 22px;
  max-width: 1480px; width: 100%; margin: 0 auto;
}

/* ---------- 左侧面板 ---------- */
.panel {
  background: linear-gradient(180deg, var(--panel) 0%, #111115 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  align-self: start;
  position: sticky; top: 92px;
}
.tabs {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
  background: var(--bg); border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm); padding: 5px; margin-bottom: 18px;
}
.tab {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px; border: none; background: transparent; color: var(--muted);
  font-family: var(--font-cjk); font-size: 14px; font-weight: 500;
  border-radius: 7px; cursor: pointer; transition: color .2s, background .2s var(--ease);
}
.tab:hover { color: var(--text); }
.tab.is-active { background: var(--panel-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--border); }
.tab.is-active .icon { color: var(--accent); }
.icon { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-lg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field > label { font-size: 13px; font-weight: 500; color: var(--text); display: flex; align-items: center; gap: 6px; }
.field-row { flex-direction: row; align-items: center; justify-content: space-between; }
.field-row input[type="checkbox"], .mj-toggle input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent); cursor: pointer; }

select, textarea, input[type="text"], input[type="number"] {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font-cjk); font-size: 14px;
  padding: 10px 12px;
  transition: border-color .18s, box-shadow .18s;
}
select { cursor: pointer; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23A1A1AA' stroke-width='1.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px;
}
textarea { resize: vertical; min-height: 88px; line-height: 1.6; }
input[type="number"] { appearance: textfield; }
input[type="number"]::-webkit-outer-spin-button, input[type="number"]::-webkit-inner-spin-button { margin: 0; }
.mj-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.mj-option { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.mj-option span { color: var(--muted); font-size: 12px; }
.mj-toggle { flex-direction: row; align-items: center; justify-content: space-between; min-height: 42px; padding: 0 2px; }
/* 富文本提示词编辑器（contenteditable） */
.prompt-edit {
  width: 100%; min-height: 150px; max-height: 38vh; line-height: 1.7;
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text); font-family: var(--font-cjk); font-size: 14px;
  padding: 10px 12px; white-space: pre-wrap; word-break: break-word; overflow-wrap: anywhere;
  overflow-x: hidden; overflow-y: auto;
  cursor: text; transition: border-color .18s, box-shadow .18s;
}
.prompt-edit div { max-width: 100%; white-space: pre-wrap; overflow-wrap: anywhere; }
.prompt-edit:empty:before { content: attr(data-placeholder); color: var(--muted-2); pointer-events: none; }
.prompt-edit:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
/* @图片N 胶囊 */
.pchip {
  display: inline-flex; align-items: center; gap: 4px; vertical-align: middle;
  padding: 1px 5px 1px 7px; margin: 0 2px; border-radius: 6px;
  color: #1a1205; font-weight: 600; font-size: .92em; line-height: 1.5; user-select: none;
}
.pchip-n { white-space: nowrap; }
.pchip-thumb { width: 18px; height: 18px; border-radius: 4px; object-fit: cover; display: inline-block; vertical-align: middle; cursor: zoom-in; }
select:focus-visible, textarea:focus-visible, input:focus-visible, .dropzone:focus-visible {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}
select:disabled { opacity: .55; cursor: not-allowed; }

/* 自定义模型下拉：隐藏原生 select，触发器 + 带右对齐提醒的列表 */
.model-select { position: relative; }
.ms-trigger { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); font-family: var(--font-cjk); font-size: 14px; padding: 10px 12px; cursor: pointer; text-align: left; transition: border-color .18s, box-shadow .18s; }
.ms-trigger:hover { border-color: var(--accent); }
.ms-trigger[aria-expanded="true"] { border-color: var(--accent); }
.ms-cur { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ms-caret { width: 14px; height: 14px; flex-shrink: 0; stroke: var(--muted); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .18s; }
.ms-trigger[aria-expanded="true"] .ms-caret { transform: rotate(180deg); }
.ms-list { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 30; background: var(--panel-2); border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow); max-height: 320px; overflow-y: auto; padding: 4px; }
.ms-item { display: flex; align-items: center; gap: 12px; width: 100%; background: none; border: none; color: var(--text); font-family: var(--font-cjk); font-size: 14px; text-align: left; padding: 9px 10px; border-radius: 7px; cursor: pointer; }
.ms-item:hover, .ms-item.active { background: var(--accent-dim); }
.ms-item.on { background: var(--accent-dim); box-shadow: inset 0 0 0 1px var(--accent); }
.ms-name { white-space: nowrap; }
.ms-hint { margin-left: auto; flex-shrink: 0; font-size: 11.5px; color: var(--accent); opacity: .92; white-space: nowrap; }

/* 上传 dropzone */
.dropzone {
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  padding: 18px; cursor: pointer;
  transition: border-color .2s, background .2s;
}
.dropzone:hover, .dropzone.is-drag { border-color: var(--accent); background: var(--accent-dim); }
.dropzone-empty { display: flex; flex-direction: column; align-items: center; gap: 7px; text-align: center; color: var(--muted); font-size: 13px; }
.dropzone-empty .icon-lg { color: var(--muted-2); margin-bottom: 2px; }
/* 多图缩略图 */
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; }
.thumb { position: relative; border-radius: 8px; overflow: hidden; border: 1px solid var(--border-soft); background: #000; aspect-ratio: 1; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-remove {
  position: absolute; top: 4px; right: 4px; width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(10,10,12,.82); border: 1px solid var(--border); border-radius: 6px;
  color: var(--text); cursor: pointer; padding: 0;
}
.thumb-remove:hover { background: var(--danger); border-color: var(--danger); }
.thumb-remove svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.thumb-meta {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 3px 5px;
  font-size: 10px; color: #d4d4d8; background: linear-gradient(transparent, rgba(0,0,0,.8)); text-align: center;
}
.thumb-add {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  aspect-ratio: 1; border: 1.5px dashed var(--border); border-radius: 8px; background: var(--bg);
  color: var(--muted); cursor: pointer; font-size: 12px; font-family: var(--font-cjk);
  transition: border-color .18s, color .18s;
}
.thumb-add:hover { border-color: var(--accent); color: var(--accent); }
.thumb-add svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

/* 分段时长 */
.segmented { display: flex; gap: 6px; }
.segmented button {
  flex: 1; padding: 9px; cursor: pointer;
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--muted); font-family: var(--font-mono); font-size: 14px;
  transition: all .18s;
}
.segmented button:hover { color: var(--text); border-color: var(--muted-2); }
.segmented button.is-active { background: var(--accent-dim); border-color: var(--accent); color: #fff; }

/* CTA */
.cta {
  margin-top: 4px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 13px; border: none; border-radius: var(--radius-sm); cursor: pointer;
  background: var(--accent); color: #fff;
  font-family: var(--font-cjk); font-size: 15px; font-weight: 700; letter-spacing: .02em;
  box-shadow: 0 8px 24px -8px var(--accent);
  transition: filter .18s, transform .06s, box-shadow .2s;
}
.cta:hover { filter: brightness(1.08); box-shadow: 0 10px 30px -8px var(--accent); }
.cta:active { transform: translateY(1px); }
.cta:disabled { filter: grayscale(.4) brightness(.7); cursor: progress; box-shadow: none; }
.cta-spinner {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.35); border-top-color: #fff;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.form-error { color: var(--danger); font-size: 13px; padding: 8px 11px; background: #ef444415; border: 1px solid #ef444440; border-radius: var(--radius-sm); }

/* ---------- 右侧画布 ---------- */
.canvas {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-height: 60vh;
  padding: 22px;
  position: relative;
}
.canvas-empty {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; color: var(--muted); text-align: center;
}
.canvas-empty-art {
  width: 84px; height: 84px; border-radius: 20px;
  background: conic-gradient(from 140deg, var(--accent), #7c3aed, var(--ok), var(--accent));
  filter: blur(2px) saturate(1.2); opacity: .5;
  margin-bottom: 6px;
  animation: float 6s var(--ease) infinite;
}
@keyframes float { 0%,100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-8px) rotate(8deg); } }

.results { display: flex; flex-direction: column; gap: 18px; }

/* 结果卡片 */
.result-card {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--panel-2); overflow: hidden;
  animation: rise .45s var(--ease) both;
}
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.result-head {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 11px 14px; border-bottom: 1px solid var(--border-soft); font-size: 13px;
}
.result-head .head-prompt { flex: 1; }
.result-head .tag, .result-head .rc-reuse { margin-top: 2px; }
.rc-reuse { flex-shrink: 0; font-size: 11px; padding: 4px 9px; }
/* 结果卡头部：引用的参考图缩略图 */
.rc-refs { flex-shrink: 0; display: inline-flex; gap: 4px; align-items: center; margin-top: 1px; }
.rc-ref { width: 30px; height: 30px; border-radius: 6px; object-fit: cover; border: 2px solid var(--accent); background: var(--panel-2); cursor: zoom-in; }
.gen-time {
  flex-shrink: 0; font-size: 11px; padding: 3px 8px; border-radius: 20px;
  color: var(--ok); background: var(--ok-dim); border: 1px solid #2dd4bf40;
}
/* 每张图右下角小耗时标 */
.cell-time {
  position: absolute; right: 6px; bottom: 6px; z-index: 1;
  font-size: 10px; line-height: 1; padding: 3px 6px; border-radius: 6px;
  color: #d9f8f2; background: rgba(10, 10, 12, .72); border: 1px solid rgba(45, 212, 191, .35);
  pointer-events: none; transition: opacity .18s;
}
.img-cell:hover .cell-time { opacity: 0; }   /* hover 出操作栏时让位 */
/* 放大查看右下角耗时标 */
.g-lb-time {
  position: absolute; right: 22px; bottom: 20px; z-index: 3;
  font-size: 12px; line-height: 1; padding: 5px 9px; border-radius: 8px;
  color: #d9f8f2; background: rgba(10, 10, 12, .72); border: 1px solid rgba(45, 212, 191, .35);
  pointer-events: none;
}
.rc-reuse:hover { color: var(--accent); border-color: var(--accent); }
.saved-badge {
  display: inline-flex; align-items: center; gap: 4px; margin-left: 8px;
  font-size: 11px; color: var(--ok); background: var(--ok-dim);
  border: 1px solid #2dd4bf40; border-radius: 20px; padding: 2px 8px;
}
.saved-badge svg { width: 12px; height: 12px; }
.result-head .tag {
  font-family: var(--font-mono); font-size: 11px; padding: 3px 8px; border-radius: 20px;
  background: var(--bg); border: 1px solid var(--border); color: var(--muted);
}
.result-body { padding: 14px; }

/* 图像网格 */
.img-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.img-cell { position: relative; border-radius: 10px; overflow: hidden; background: #000; border: 1px solid var(--border-soft); aspect-ratio: 1; }
.img-cell img { width: 100%; height: 100%; display: block; object-fit: cover; transition: transform .3s var(--ease); }
.img-cell .skeleton { width: 100%; height: 100%; min-height: 0; }
.img-cell.cell-error { border-color: #ef444450; }
.cell-err-text { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; padding: 14px; text-align: center; font-size: 12px; color: var(--danger); background: #ef44440f; }
.img-cell:hover img:not(.mj-crop-img) { transform: scale(1.03); }
.img-actions { position: absolute; inset: auto 0 0 0; display: flex; gap: 8px; padding: 10px;
  background: linear-gradient(transparent, rgba(0,0,0,.75)); opacity: 0; transition: opacity .2s; }
.img-cell:hover .img-actions, .img-cell:focus-within .img-actions { opacity: 1; }
.chip-btn {
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(20,20,24,.9); color: var(--text); border: 1px solid var(--border);
  border-radius: 8px; padding: 6px 10px; font-size: 12px; cursor: pointer; font-family: var(--font-cjk);
  transition: background .18s, border-color .18s;
}
.chip-btn:hover { background: var(--accent); border-color: var(--accent); }

/* 视频结果 */
.video-wrap { display: flex; flex-direction: column; gap: 14px; }
.video-wrap video { width: 100%; max-height: 70vh; border-radius: 10px; background: #000; }
.video-links { display: flex; flex-wrap: wrap; gap: 10px; }

/* 进度 */
.progress-block { display: flex; flex-direction: column; gap: 12px; padding: 8px 2px; }
.progress-head { display: flex; align-items: center; justify-content: space-between; }
.progress-status { display: flex; align-items: center; gap: 9px; font-size: 14px; }
.progress-pct { font-family: var(--font-mono); font-size: 22px; font-weight: 600; color: var(--accent); }
.progress-bar { height: 8px; background: var(--bg); border-radius: 20px; overflow: hidden; border: 1px solid var(--border-soft); }
.progress-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), #ff8a3d); border-radius: 20px; transition: width .5s var(--ease); }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); animation: pulse 1.2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .4; transform: scale(.7); } }

/* skeleton */
.skeleton { position: relative; overflow: hidden; background: var(--panel-2); border-radius: 10px; min-height: 220px; }
.skeleton::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.05), transparent);
  transform: translateX(-100%); animation: shimmer 1.4s infinite;
}
@keyframes shimmer { to { transform: translateX(100%); } }

/* 状态徽标 */
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 4px 10px; border-radius: 20px; font-weight: 500; }
.badge.ok { background: var(--ok-dim); color: var(--ok); border: 1px solid #2dd4bf40; }
.badge.warn { background: #ef444415; color: var(--danger); border: 1px solid #ef444440; }

/* 违规提示 */
.violation { color: var(--danger); font-size: 13px; padding: 11px 13px; background: #ef444412; border: 1px solid #ef444438; border-radius: var(--radius-sm); margin-top: 4px; }

/* toast */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--panel-2); border: 1px solid var(--border); color: var(--text);
  padding: 11px 18px; border-radius: 30px; font-size: 13px; box-shadow: var(--shadow);
  opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s var(--ease); z-index: 50;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- 访问密码网关 ---------- */
#gate { position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(700px 500px at 50% 30%, #16131c, var(--bg)); }
.gate-card { display: flex; flex-direction: column; align-items: center; gap: 12px; width: min(340px, 86vw);
  padding: 34px 28px; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.gate-card .brand-mark { width: 14px; height: 14px; border-radius: 4px; background: var(--accent); box-shadow: 0 0 18px var(--accent); }
.gate-card h2 { font-family: var(--font-display); font-weight: 800; font-size: 20px; }
.gate-sub { color: var(--muted); font-size: 13px; margin-top: -6px; }
.gate-card input { width: 100%; }
.gate-card button { width: 100%; padding: 11px; border: none; border-radius: var(--radius-sm); cursor: pointer;
  background: var(--accent); color: #fff; font-family: var(--font-cjk); font-size: 15px; font-weight: 700; box-shadow: 0 8px 24px -8px var(--accent); }
.gate-card button:hover { filter: brightness(1.08); }
.gate-note { align-self: stretch; margin-top: -6px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.gate-err { color: var(--danger); font-size: 13px; }
.gate-tabs { display: flex; gap: 6px; width: 100%; background: var(--bg); border: 1px solid var(--border-soft); border-radius: var(--radius-sm); padding: 4px; }
.gate-tabs .gate-tab { width: 50%; padding: 8px; background: transparent; color: var(--muted); border: none; border-radius: 7px; cursor: pointer; font-size: 14px; box-shadow: none; }
.gate-tabs .gate-tab.on { background: var(--panel-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--border); }
#gate-name-field { width: 100%; }
#gate-turnstile { min-height: 0; align-self: center; }
.user-chip { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text); }
.user-chip #logout-btn { background: var(--panel-2); border: 1px solid var(--border); color: var(--muted); border-radius: 8px; padding: 5px 10px; font-size: 12px; cursor: pointer; }
.user-chip #logout-btn:hover { color: var(--text); border-color: var(--muted-2); }

/* ---------- 生成历史（右侧画布） ---------- */
.history-section { margin-top: 22px; border-top: 1px solid var(--border-soft); padding-top: 16px; }
.history-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.history-title { font-family: var(--font-display); font-weight: 700; font-size: 15px; color: var(--text); }
.history-count { font-size: 12px; color: var(--muted-2); }
/* 瀑布流：混合比例紧凑排列（与画廊一致），列数随宽度自适应 */
.history-grid { columns: 4 200px; column-gap: 12px; }
.hist-card { position: relative; display: block; break-inside: avoid; margin: 0 0 12px; border: 1px solid var(--border-soft); border-radius: 10px; overflow: hidden; background: var(--panel-2); }
.hist-card.expanded { /* 详情在卡内下方展开（瀑布流列内） */ }
.hist-media { position: relative; cursor: zoom-in; }
.hist-media img, .hist-media video { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0; transition: opacity .25s; }
.hist-media.loaded img, .hist-media.loaded video { opacity: 1; }
.hist-media.loaded .g-skel { display: none; }
.hist-media.hist-nofile img, .hist-media.hist-nofile video { display: none; }
.hist-media.hist-nofile { display: flex; align-items: center; justify-content: center; }
.hist-media.hist-nofile::after { content: "图在本地文件夹\A选文件夹后显示"; white-space: pre; text-align: center; color: var(--muted-2); font-size: 11px; line-height: 1.6; }
.hist-media.is-video .g-vplay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; pointer-events: none; }
.hist-media.is-video .g-vplay svg { padding: 8px; border-radius: 50%; background: rgba(0,0,0,.5); }
.hist-detail { display: none; padding: 12px 14px; font-size: 12px; color: var(--muted); max-height: 280px; overflow: auto; }
.hist-card.expanded .hist-detail { display: block; }
.hd-row { display: flex; gap: 8px; padding: 4px 0; border-bottom: 1px solid var(--border-soft); }
.hd-row b { color: var(--muted-2); font-weight: 500; min-width: 44px; flex-shrink: 0; }
.hd-row span { color: var(--text); word-break: break-all; }
.hd-link { color: var(--accent); text-decoration: none; }
.hd-link:hover { text-decoration: underline; }

/* 提示词框：所有显示处统一，固定高度内滚动（防长提示词拉乱排版） */
.pline {
  display: block; min-width: 0;
  white-space: pre-wrap; word-break: break-word;
  max-height: 88px; overflow-y: auto;
  background: var(--bg); border: 1px solid var(--border-soft);
  border-left: 3px solid var(--accent);
  border-radius: 8px; padding: 6px 9px;
  font-size: 12px; line-height: 1.7;
  scrollbar-width: thin; scrollbar-color: var(--border) transparent;
}
.pline::-webkit-scrollbar { width: 4px; }
.pline::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.hd-row .pline { flex: 1; }
.hist-media.hist-haslink { cursor: pointer; }
.hist-actions { position: absolute; top: 6px; right: 6px; display: flex; gap: 6px; z-index: 1; opacity: 0; transition: opacity .18s; }
.hist-card:hover .hist-actions { opacity: 1; }
.hist-reuse, .hist-info { font-size: 11px; padding: 4px 8px; }
.hist-reuse:hover { color: var(--accent); border-color: var(--accent); }
.hist-card.expanded .hist-actions { position: static; opacity: 1; margin: 8px 14px 0; }
.history-pager { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 16px; }
.hp-btn { min-width: 32px; height: 32px; padding: 0 8px; border-radius: 8px; background: var(--panel-2); border: 1px solid var(--border); color: var(--muted); cursor: pointer; font-family: var(--font-mono); font-size: 13px; }
.hp-btn:hover:not(:disabled) { color: var(--text); border-color: var(--muted-2); }
.hp-btn.on { background: var(--accent-dim); border-color: var(--accent); color: #fff; }
.hp-btn:disabled { opacity: .4; cursor: default; }
.hp-ellipsis { min-width: 28px; height: 32px; display: inline-flex; align-items: flex-end; justify-content: center; color: var(--muted-2); font-family: var(--font-mono); font-size: 13px; user-select: none; }

/* ---------- 画廊 Gallery ---------- */
#gallery-overlay { position: fixed; inset: 0; z-index: 60; }
.g-backdrop { position: absolute; inset: 0; background: rgba(5,5,7,.6); backdrop-filter: blur(8px); }
.g-panel {
  position: absolute; inset: 3vh 3vw; display: flex; flex-direction: column;
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
}
.g-head { display: flex; align-items: center; gap: 16px; padding: 14px 18px; border-bottom: 1px solid var(--border-soft); }
.g-title { font-family: var(--font-display); font-weight: 800; font-size: 18px; }
.g-filters { display: flex; gap: 6px; margin-left: 6px; }
.g-fbtn { background: var(--bg); border: 1px solid var(--border); color: var(--muted); border-radius: 20px; padding: 5px 12px; font-family: var(--font-cjk); font-size: 13px; cursor: pointer; transition: all .18s; }
.g-fbtn:hover { color: var(--text); }
.g-fbtn.on { background: var(--accent-dim); border-color: var(--accent); color: #fff; }
.g-date { min-width: 130px; background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: 20px; padding: 5px 12px; font-family: var(--font-cjk); font-size: 13px; }
.g-close { margin-left: auto; background: var(--panel-2); border: 1px solid var(--border); color: var(--muted); border-radius: 9px; width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.g-close:hover { color: var(--text); border-color: var(--muted-2); }
.g-body { flex: 1; overflow-y: auto; padding: 18px; }
.g-loading, .g-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; height: 100%; color: var(--muted); text-align: center; }
.g-pickbtn { background: var(--accent); color: #fff; border: none; border-radius: var(--radius-sm); padding: 10px 18px; font-family: var(--font-cjk); font-size: 14px; font-weight: 700; cursor: pointer; }

/* 瀑布流 */
.g-grid { column-count: 4; column-gap: 14px; }
@media (max-width: 1200px) { .g-grid { column-count: 3; } }
@media (max-width: 760px) { .g-grid { column-count: 2; } .g-head { gap: 8px; flex-wrap: wrap; } .g-close { margin-left: 0; } }
.g-tile { position: relative; break-inside: avoid; margin: 0 0 14px; border-radius: 10px; overflow: hidden; background: var(--panel-2); border: 1px solid var(--border-soft); cursor: pointer; }
.g-media { position: relative; min-height: 90px; background: #000; }
.g-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* 瓦片骨架占位：加载完淡入 */
.g-skel { position: absolute; inset: 0; background: var(--panel-2); overflow: hidden; }
.g-skel::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.06), transparent); transform: translateX(-100%); animation: shimmer 1.3s infinite; }
.g-media img, .g-media video { opacity: 0; transition: opacity .25s; }
.g-media.loaded img, .g-media.loaded video { opacity: 1; }
.g-media.loaded .g-skel { display: none; }
.g-count { font-size: 12px; color: var(--muted-2); white-space: nowrap; }
.g-media.is-video { background: #000; }
.g-media.is-video video { width: 100%; height: 100%; display: block; object-fit: cover; background: #000; }
.g-media.is-video .g-vplay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; pointer-events: none; }
.g-media.is-video .g-vplay svg { width: 42px; height: 42px; padding: 10px; border-radius: 50%; background: rgba(0,0,0,.54); box-shadow: 0 8px 28px rgba(0,0,0,.35); }
.g-cap { padding: 8px 10px; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-tactions { position: absolute; top: 8px; right: 8px; display: flex; gap: 6px; opacity: 0; transition: opacity .18s; }
.g-tile:hover .g-tactions { opacity: 1; }
.g-star, .g-del, .g-reuse { width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; border-radius: 8px; cursor: pointer; background: rgba(10,10,12,.82); border: 1px solid var(--border); color: var(--text); }
.g-reuse:hover { color: var(--accent); border-color: var(--accent); }
.g-star:hover { color: #fbbf24; border-color: #fbbf24; }
.g-star.on { color: #fbbf24; border-color: #fbbf24; background: #fbbf2422; }
.g-del:hover { color: var(--danger); border-color: var(--danger); }

/* Lightbox */
.g-lb { position: fixed; inset: 0; z-index: 70; display: flex; align-items: center; justify-content: center; background: #030305; isolation: isolate; }
.g-lb-backdrop { position: absolute; inset: 0; background: #030305; }
.g-lb-stage { position: relative; width: 88vw; height: 82vh; overflow: hidden; display: flex; align-items: center; justify-content: center; z-index: 1; background: #030305; transform: translateZ(0); }
.g-lb-img { position: absolute; top: 0; left: 0; will-change: transform; user-select: none; -webkit-user-drag: none; }
.g-lb-video { max-width: 88vw; max-height: 82vh; border-radius: 10px; background: #000; transform: translateZ(0); backface-visibility: hidden; contain: paint; }
.g-lb-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 48px; height: 48px; border-radius: 50%; background: rgba(20,20,24,.75); border: 1px solid var(--border); color: var(--text); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background .18s; }
.g-lb-nav:hover { background: var(--accent); border-color: var(--accent); }
.g-lb-nav.prev { left: 20px; } .g-lb-nav.next { right: 20px; }
/* 独立查看器：索引标（n/总数） */
.g-lb-idx {
  position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 3;
  font-size: 12px; padding: 5px 12px; border-radius: 20px;
  color: var(--muted); background: rgba(10,10,12,.72); border: 1px solid var(--border);
  pointer-events: none;
}
.g-lb-bar { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 2; display: flex; align-items: center; gap: 16px; background: rgba(15,15,19,.86); border: 1px solid var(--border); border-radius: 30px; padding: 8px 10px 8px 18px; box-shadow: var(--shadow); }
.g-lb-meta { font-family: var(--font-mono); font-size: 12px; color: var(--muted); max-width: 40vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-lb-actions { display: flex; gap: 6px; }
.g-lb-actions button { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; background: var(--panel-2); border: 1px solid var(--border); color: var(--text); }
.g-lb-reuse:hover { color: var(--accent); border-color: var(--accent); }
.g-lb-star.on { color: #fbbf24; border-color: #fbbf24; }
.g-lb-del:hover { color: var(--danger); border-color: var(--danger); }
.g-lb-close:hover { color: var(--text); border-color: var(--muted-2); }

/* ---------- 素材库 ---------- */
#lib-overlay { position: fixed; inset: 0; z-index: 65; }
.lib-backdrop { position: absolute; inset: 0; background: rgba(5,5,7,.6); backdrop-filter: blur(8px); }
.lib-panel { position: absolute; inset: 6vh 6vw; display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.lib-head { display: flex; align-items: center; gap: 10px; padding: 13px 16px; border-bottom: 1px solid var(--border-soft); flex-wrap: wrap; }
.lib-title { font-family: var(--font-display); font-weight: 800; font-size: 17px; }
.lib-head select { background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 7px 10px; font-family: var(--font-cjk); font-size: 13px; }
.lib-newproj { background: var(--panel-2); color: var(--muted); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 7px 11px; font-size: 13px; cursor: pointer; font-family: var(--font-cjk); }
.lib-newproj:hover { color: var(--text); }
.lib-delproj { background: var(--panel-2); color: var(--muted); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 7px 11px; font-size: 13px; cursor: pointer; font-family: var(--font-cjk); }
.lib-delproj:hover { color: #fff; background: var(--danger); border-color: var(--danger); }
.lib-upload { background: var(--accent); color: #fff; border-radius: var(--radius-sm); padding: 7px 14px; font-size: 13px; font-weight: 700; cursor: pointer; }
.lib-close { margin-left: auto; background: var(--panel-2); border: 1px solid var(--border); color: var(--muted); width: 32px; height: 32px; border-radius: 8px; cursor: pointer; }
.lib-close:hover { color: var(--text); }
.lib-body { flex: 1; overflow-y: auto; padding: 16px; }
.lib-empty { color: var(--muted); text-align: center; padding: 40px; }
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
.lib-cell { margin: 0; border: 1px solid var(--border-soft); border-radius: 10px; overflow: hidden; background: var(--panel-2); transition: border-color .18s; }
.lib-cell.is-sel { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.lib-cell-img { position: relative; cursor: pointer; }
.lib-cell-img img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.lib-cell-badge { position: absolute; top: 6px; left: 6px; background: var(--accent); color: #fff; font-size: 11px; padding: 2px 7px; border-radius: 20px; }
.lib-zoom { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border-radius: 7px; background: rgba(10,10,12,.82); border: 1px solid var(--border); color: var(--text); cursor: pointer; opacity: 0; transition: opacity .18s; font-size: 13px; }
.lib-cell:hover .lib-zoom { opacity: 1; }
.lib-zoom:hover { background: var(--accent); border-color: var(--accent); }
.lib-del { position: absolute; top: 6px; right: 38px; width: 26px; height: 26px; border-radius: 7px; background: rgba(10,10,12,.82); border: 1px solid var(--border); color: var(--text); cursor: pointer; opacity: 0; transition: opacity .18s; font-size: 12px; line-height: 1; }
.lib-cell:hover .lib-del { opacity: 1; }
.lib-del:hover { background: var(--danger); border-color: var(--danger); color: #fff; }
.lib-cell figcaption { padding: 6px 8px 0; font-size: 11px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lib-meta { padding: 1px 8px 7px; font-size: 10px; color: var(--muted-2); }

/* 弹窗底栏：本次选用缩略图 + 确认按钮（靠右挨一起） */
.lib-tray { display: flex; align-items: center; gap: 12px; flex-wrap: nowrap; padding: 10px 16px; border-top: 1px solid var(--border-soft); min-height: 44px; }
.lib-tray-thumbs { display: flex; align-items: center; gap: 8px; overflow-x: auto; min-width: 0; padding-bottom: 2px; }
.lib-confirm { flex-shrink: 0; background: var(--accent); color: #fff; border: none; border-radius: var(--radius-sm); padding: 9px 18px; font-weight: 700; font-size: 13px; cursor: pointer; white-space: nowrap; font-family: var(--font-cjk); }
.lib-confirm:hover { filter: brightness(1.08); }
.lib-tray-label { font-size: 12px; color: var(--muted); }
.lib-tray-item { flex-shrink: 0; display: inline-flex; align-items: center; gap: 5px; background: var(--bg); border: 1px solid var(--border); border-radius: 20px; padding: 3px 6px 3px 4px; }
.lib-tray-item img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; cursor: zoom-in; }
.lib-tray-item .mono { font-size: 11px; color: var(--accent); }
.lib-tray-x { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 11px; }
.lib-tray-x:hover { color: var(--danger); }

/* 参考图栏：工作集缩略图（可拖拽排序） */
.lib-refs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.lib-ref { position: relative; width: 64px; cursor: grab; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: var(--panel-2); }
.lib-ref.dragging { opacity: .4; }
.lib-ref img { width: 100%; height: 64px; object-fit: cover; display: block; pointer-events: none; }
.lib-ref-n { position: absolute; bottom: 0; left: 0; right: 0; background: linear-gradient(transparent, rgba(0,0,0,.8)); color: var(--accent); font-size: 10px; text-align: center; padding: 6px 0 2px; }
.lib-ref-x { position: absolute; top: 2px; right: 2px; width: 18px; height: 18px; border-radius: 5px; background: rgba(10,10,12,.85); border: none; color: #fff; cursor: pointer; font-size: 10px; line-height: 1; }
.lib-ref-x:hover { background: var(--danger); }

/* @ 下拉 */
#lib-at-menu { position: absolute; left: 0; right: 0; top: 100%; z-index: 20; margin-top: 4px; background: var(--panel-2); border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow); max-height: 240px; overflow-y: auto; padding: 4px; }
.lib-at-item { display: flex; align-items: center; gap: 9px; width: 100%; background: none; border: none; color: var(--text); padding: 7px 8px; border-radius: 7px; cursor: pointer; font-family: var(--font-cjk); text-align: left; }
.lib-at-item:hover { background: var(--accent-dim); }
.lib-at-item.is-active { background: var(--accent-dim); box-shadow: inset 0 0 0 1px var(--accent); }
.lib-at-item img { width: 30px; height: 30px; border-radius: 6px; object-fit: cover; }
.lib-at-item .mono { color: var(--accent); font-size: 13px; }
.lib-at-name { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- 响应式 ---------- */
@media (max-width: 980px) {
  .workspace { grid-template-columns: 1fr; }
  .panel { position: static; }
}
/* 手机优化 */
@media (max-width: 640px) {
  .workspace { padding: 12px; gap: 12px; }
  .topbar { padding: 10px 12px; flex-wrap: wrap; gap: 8px; }
  .brand-sub { display: none; }
  .topbar-right { gap: 6px; flex-wrap: wrap; width: 100%; justify-content: flex-end; }
  .folder-btn { padding: 7px 9px; font-size: 12px; gap: 5px; }
  .folder-btn #folder-label { max-width: 72px; }
  .user-chip { font-size: 12px; gap: 5px; }
  select, textarea, .prompt-edit, input[type="text"] { font-size: 16px; } /* 防 iOS 聚焦缩放 */
  .prompt-edit { min-height: 110px; }
  .panel { padding: 16px 14px; }
  .img-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
  .result-head { padding: 9px 10px; }
  .result-body { padding: 10px; }
  .history-grid { columns: 2 120px; column-gap: 8px; }
  .hist-card { margin-bottom: 8px; }
  .hist-actions { opacity: 1; }                          /* 触屏无 hover，常显 */
  .g-tactions { opacity: 1; }
  .g-lb-stage { width: 100vw; height: 78vh; }
  .adm-panel { width: 100vw; height: 92vh; border-radius: 0; }
  .adm-prompt { max-width: none; }
  .adm-table { font-size: 12px; }
  .adm-table th, .adm-table td { padding: 7px 8px; }
  .segmented { flex-wrap: wrap; }
  .dropzone { padding: 14px; }
  .pchip-thumb { width: 16px; height: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::after { animation: none !important; transition: none !important; }
}

/* ============================ 管理后台 ============================ */
.admin-btn .icon { color: var(--accent); }
#admin-overlay { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; }
.adm-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.6); backdrop-filter: blur(4px); }
.adm-panel { position: relative; width: min(1100px, 94vw); height: min(82vh, 820px); display: flex; flex-direction: column;
  background: var(--panel); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); }
.adm-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border-soft); flex-wrap: wrap; }
.adm-title { font-weight: 600; font-size: 15px; }
.adm-tabs { display: flex; gap: 4px; background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 3px; }
.adm-tab { background: none; border: none; color: var(--muted); padding: 6px 14px; border-radius: 7px; cursor: pointer; font-size: 13px; font-family: var(--font-cjk); }
.adm-tab.on { background: var(--accent); color: #1a1205; font-weight: 600; }
.adm-search { flex: 1; min-width: 160px; background: var(--bg); border: 1px solid var(--border); border-radius: 9px; color: var(--text); padding: 8px 12px; font-size: 13px; font-family: var(--font-cjk); }
.adm-refresh, .adm-close { background: var(--panel-2); border: 1px solid var(--border); color: var(--text); width: 34px; height: 34px; border-radius: 9px; cursor: pointer; font-size: 15px; }
.adm-refresh:hover, .adm-close:hover { border-color: var(--accent); color: var(--accent); }
.adm-body { flex: 1; overflow: auto; padding: 8px 4px; }
.adm-empty { color: var(--muted); text-align: center; padding: 48px 0; }
.adm-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.adm-table th { position: sticky; top: 0; background: var(--panel); color: var(--muted-2); text-align: left; font-weight: 500; padding: 8px 12px; border-bottom: 1px solid var(--border); z-index: 1; }
.adm-table td { padding: 9px 12px; border-bottom: 1px solid var(--border-soft); color: var(--text); vertical-align: top; }
.adm-table tr:hover td { background: var(--panel-2); }
.adm-off td { opacity: .55; }
.adm-mut { color: var(--muted-2); font-size: 11px; }
.adm-nowrap { white-space: nowrap; }
.adm-sm { font-size: 11px; color: var(--muted); }
.adm-prompt { max-width: 420px; min-width: 180px; color: var(--muted); }
.adm-badge { font-size: 11px; padding: 2px 8px; border-radius: 20px; }
.adm-badge.on { color: var(--ok); background: var(--ok-dim); }
.adm-badge.off { color: var(--danger); background: #ef444422; }
.adm-badge.admin { color: var(--accent); background: var(--accent-dim); }
.adm-toggle { border: 1px solid var(--border); background: var(--panel-2); color: var(--text); padding: 5px 12px; border-radius: 8px; cursor: pointer; font-size: 12px; font-family: var(--font-cjk); }
.adm-toggle.is-off:hover { border-color: var(--danger); color: var(--danger); }
.adm-toggle.is-on:hover { border-color: var(--ok); color: var(--ok); }
.adm-toggle:disabled { opacity: .5; cursor: default; }
.adm-adminbtn:hover { border-color: var(--accent); color: var(--accent); }
.adm-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.adm-del { border: 1px solid var(--border); background: var(--panel-2); color: var(--muted); padding: 5px 12px; border-radius: 8px; cursor: pointer; font-size: 12px; font-family: var(--font-cjk); }
.adm-del:hover { border-color: var(--danger); color: #fff; background: var(--danger); }
.adm-del:disabled { opacity: .4; cursor: default; }
