:root {
  color-scheme: dark;
  --bg: #0a0c11;
  --bg-soft: #0e1118;
  --panel: #12151e;
  --panel-2: #171b26;
  --panel-3: #1d222f;
  --line: #262c3b;
  --line-soft: #1e2431;
  --text: #e9edf7;
  --text-dim: #aab3c7;
  --muted: #7d879e;
  --accent: #6d8bff;
  --accent-2: #a06bff;
  --ok: #35d3a0;
  --warn: #ffb454;
  --err: #ff6f6f;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  background:
    radial-gradient(900px 480px at 12% -10%, rgba(109, 139, 255, 0.16), transparent 60%),
    radial-gradient(760px 420px at 92% 0%, rgba(160, 107, 255, 0.13), transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: "PingFang SC", "Microsoft YaHei UI", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: 0.2px; }
p { margin: 0; }

/* ── 顶栏 ───────────────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 12px 20px;
  background: rgba(10, 12, 17, 0.86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}

.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center;
  background: linear-gradient(140deg, var(--accent), var(--accent-2));
  box-shadow: 0 6px 18px rgba(109, 139, 255, 0.35);
  flex: none;
}
.brand-mark svg { width: 20px; height: 20px; }
.brand-title { font-size: 15px; font-weight: 700; line-height: 1.2; }
.brand-sub { font-size: 11px; color: var(--muted); line-height: 1.3; }

.spacer { flex: 1 1 auto; }

.chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text-dim);
  font-size: 12px;
  white-space: nowrap;
}
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); flex: none; }
.chip.ok .dot { background: var(--ok); box-shadow: 0 0 0 3px rgba(53, 211, 160, 0.16); }
.chip.warn .dot { background: var(--warn); box-shadow: 0 0 0 3px rgba(255, 180, 84, 0.16); }
.chip.err .dot { background: var(--err); box-shadow: 0 0 0 3px rgba(255, 111, 111, 0.16); }

/* ── 标签页 ─────────────────────────────────────────── */
.tabs {
  display: flex;
  gap: 6px;
  padding: 10px 20px 0;
  border-bottom: 1px solid var(--line-soft);
  background: var(--bg-soft);
}
.tab {
  appearance: none;
  border: 1px solid transparent;
  border-bottom: none;
  background: transparent;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: 11px 11px 0 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color 0.16s ease, background 0.16s ease;
}
.tab:hover { color: var(--text-dim); background: rgba(255, 255, 255, 0.03); }
.tab.active {
  color: var(--text);
  background: var(--panel);
  border-color: var(--line-soft);
  box-shadow: inset 0 2px 0 var(--accent);
}
.tab .ico { font-size: 15px; }

/* ── 视图 ───────────────────────────────────────────── */
main { padding: 18px 20px 60px; }
.view { display: none; }
.view.active { display: block; }

.split {
  display: grid;
  grid-template-columns: minmax(340px, 420px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
@media (max-width: 1080px) {
  .split { grid-template-columns: minmax(0, 1fr); }
}

.card {
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-soft);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.028), transparent);
}
.card-head h2 { font-size: 13.5px; }
.card-head .hint { font-size: 11.5px; color: var(--muted); margin-left: auto; }
.card-body { padding: 14px; display: flex; flex-direction: column; gap: 13px; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field > label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 6px;
}
.field .sub { font-size: 11px; color: var(--muted); font-weight: 400; }

input[type="text"], input[type="password"], input[type="number"], textarea, select {
  width: 100%;
  padding: 9px 11px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input:focus, textarea:focus, select:focus {
  border-color: rgba(109, 139, 255, 0.65);
  box-shadow: 0 0 0 3px rgba(109, 139, 255, 0.14);
}
textarea { resize: vertical; min-height: 88px; line-height: 1.6; }
select { cursor: pointer; }
input::placeholder, textarea::placeholder { color: #5f6980; }

.row { display: flex; gap: 10px; }
.row > * { flex: 1 1 0; min-width: 0; }
.row.tight { gap: 8px; }

button {
  font: inherit;
  cursor: pointer;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel-3);
  color: var(--text);
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 600;
  transition: transform 0.08s ease, filter 0.15s ease, background 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}
button:hover { background: #232a39; }
button:active { transform: translateY(1px); }
button:disabled { opacity: 0.55; cursor: not-allowed; }

button.primary {
  border: none;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: 0 8px 22px rgba(109, 139, 255, 0.28);
}
button.primary:hover { filter: brightness(1.08); }
button.ghost { background: transparent; }
button.danger { color: var(--err); border-color: rgba(255, 111, 111, 0.35); background: rgba(255, 111, 111, 0.08); }
button.small { padding: 5px 10px; font-size: 12px; border-radius: 8px; }
button.wide { width: 100%; }

.presets { display: flex; flex-wrap: wrap; gap: 6px; }
.preset {
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text-dim);
  font-size: 11.5px;
  cursor: pointer;
  font-weight: 500;
}
.preset:hover { color: var(--text); border-color: rgba(109, 139, 255, 0.5); }
.preset.active { color: #fff; border-color: transparent; background: linear-gradient(135deg, var(--accent), var(--accent-2)); }

.toggle { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-dim); }
.toggle input { width: 16px; height: 16px; accent-color: var(--accent); }

/* ── 上传 / 缩略图 ───────────────────────────────────── */
.drop {
  border: 1px dashed var(--line);
  border-radius: 12px;
  padding: 12px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
  background: var(--panel-2);
  transition: border-color 0.15s ease, color 0.15s ease;
}
.drop:hover, .drop.hot { border-color: rgba(109, 139, 255, 0.6); color: var(--text-dim); }
.drop input { display: none; }

.thumbs { display: flex; flex-wrap: wrap; gap: 8px; }
.thumb {
  position: relative;
  width: 74px; height: 74px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--panel-3);
  flex: none;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb button {
  position: absolute; top: 3px; right: 3px;
  width: 18px; height: 18px; padding: 0;
  border-radius: 50%;
  font-size: 11px;
  line-height: 1;
  background: rgba(0, 0, 0, 0.65);
  border: none;
  color: #fff;
}

/* ── 进度 ───────────────────────────────────────────── */
.progress {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 11px;
  border-radius: 11px;
  background: var(--panel-2);
  border: 1px solid var(--line-soft);
}
.progress.hidden { display: none; }
.bar {
  height: 6px;
  border-radius: 999px;
  background: var(--panel-3);
  overflow: hidden;
}
.bar > i {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 0.3s ease;
}
.progress-head { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-dim); }
.progress-head .pct { margin-left: auto; color: var(--muted); font-variant-numeric: tabular-nums; }
.events {
  font-size: 11.5px;
  color: var(--muted);
  max-height: 108px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-variant-numeric: tabular-nums;
}
.events div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.spinner {
  width: 13px; height: 13px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-top-color: #fff;
  animation: spin 0.8s linear infinite;
  flex: none;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── 结果 ───────────────────────────────────────────── */
.result { display: flex; flex-direction: column; gap: 10px; }
.result img, .result video {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #05070b;
  display: block;
}
.result .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  font-size: 11.5px;
  color: var(--muted);
}
.result .meta b { color: var(--text-dim); font-weight: 600; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }

.placeholder {
  border: 1px dashed var(--line);
  border-radius: 12px;
  padding: 46px 18px;
  text-align: center;
  color: var(--muted);
  font-size: 12.5px;
  background: repeating-linear-gradient(45deg, rgba(255,255,255,0.012) 0 12px, transparent 12px 24px);
}

/* ── 作品库 ─────────────────────────────────────────── */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}
.gitem {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  background: var(--panel-3);
  aspect-ratio: 1 / 1;
  cursor: pointer;
}
.gitem img, .gitem video { width: 100%; height: 100%; object-fit: cover; display: block; }
.gitem .badge {
  position: absolute; top: 6px; left: 6px;
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(8, 10, 15, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-dim);
  backdrop-filter: blur(6px);
}
.gitem .cap {
  position: absolute;
  inset: auto 0 0 0;
  padding: 18px 8px 7px;
  font-size: 10.5px;
  line-height: 1.35;
  color: #dfe5f2;
  background: linear-gradient(transparent, rgba(5, 7, 11, 0.9));
  max-height: 60%;
  overflow: hidden;
}
.gitem .kill {
  position: absolute; top: 5px; right: 5px;
  width: 20px; height: 20px; padding: 0;
  border-radius: 50%;
  font-size: 11px;
  background: rgba(8, 10, 15, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.14);
  opacity: 0;
  transition: opacity 0.15s ease;
}
.gitem .kill, .gitem .use {
  position: absolute; right: 5px;
  height: 20px; min-width: 20px; padding: 0 6px;
  white-space: nowrap;
  border-radius: 999px;
  font-size: 10.5px;
  background: rgba(8, 10, 15, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--text-dim);
  opacity: 0;
  transition: opacity 0.15s ease;
}
.gitem .kill { top: 5px; width: auto; }
.gitem-media { cursor: zoom-in; }
.gitem .use { top: 29px; }
.gitem:hover .kill, .gitem:hover .use { opacity: 1; }

/* ── 弹层 / 提示 ─────────────────────────────────────── */
.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(4, 6, 10, 0.72);
  backdrop-filter: blur(4px);
}
.modal.open { display: flex; }
.modal-box {
  width: min(920px, 100%);
  max-height: 82vh;
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}
.modal-box .card-body { overflow: auto; }
.modal-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 15px;
  border-bottom: 1px solid var(--line-soft);
}
.modal-head h3 { font-size: 13.5px; }
.modal-head button { margin-left: auto; }

#toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  padding: 10px 14px;
  border-radius: 11px;
  background: var(--panel-3);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  font-size: 12.5px;
  max-width: 380px;
  animation: pop 0.18s ease;
}
.toast.ok { border-color: rgba(53, 211, 160, 0.45); }
.toast.err { border-color: rgba(255, 111, 111, 0.5); }
@keyframes pop { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.hidden { display: none !important; }
.muted { color: var(--muted); }
.mono { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 11.5px; }
.kv { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--text-dim); }
.kv .k { color: var(--muted); }
.err-box {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 111, 111, 0.09);
  border: 1px solid rgba(255, 111, 111, 0.32);
  color: #ffc9c9;
  font-size: 12px;
  white-space: pre-wrap;
  word-break: break-word;
}
.warn-box {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 180, 84, 0.09);
  border: 1px solid rgba(255, 180, 84, 0.3);
  color: #ffe0b5;
  font-size: 12px;
}

/* ── 顶栏控件 ───────────────────────────────────────── */
.topctl {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--muted);
  white-space: nowrap;
}
.topctl select, .topctl input {
  width: auto;
  min-width: 96px;
  padding: 5px 9px;
  font-size: 12px;
  border-radius: 9px;
}
.topctl input { min-width: 132px; }

.empty {
  padding: 26px 14px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  border: 1px dashed var(--line);
  border-radius: 11px;
}

/* ── 账号闸门 / WorkBuddy 绑定闸门 ─────────────────────────────── */

.gate {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(900px 480px at 18% -10%, rgba(109, 139, 255, 0.16), transparent 60%),
    radial-gradient(760px 420px at 88% 8%, rgba(160, 107, 255, 0.14), transparent 62%),
    rgba(7, 9, 14, 0.92);
  backdrop-filter: blur(6px);
}

.gate.hidden { display: none; }

.gate-box {
  width: min(430px, 100%);
  padding: 28px 26px 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  box-shadow: var(--shadow);
}

.gate-box.wide { width: min(520px, 100%); }

.gate-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.gate-mark {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: grid;
  place-items: center;
  font-size: 17px;
  box-shadow: 0 6px 18px rgba(109, 139, 255, 0.35);
}

.gate-brand-text { line-height: 1.25; }
.gate-brand-text strong { display: block; font-size: 15px; letter-spacing: 0.2px; }
.gate-brand-text span { font-size: 11.5px; color: var(--muted); }

.gate-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-soft);
}

.gate-tab {
  flex: 1;
  padding: 8px 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--text-dim);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.gate-tab:hover { color: var(--text); }

.gate-tab.active {
  background: linear-gradient(135deg, rgba(109, 139, 255, 0.9), rgba(160, 107, 255, 0.9));
  color: #fff;
  font-weight: 600;
}

.gate-form { display: grid; gap: 12px; }

.gate-form label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: var(--text-dim);
}

.gate-form input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 13.5px;
}

.gate-form input:focus {
  outline: none;
  border-color: rgba(109, 139, 255, 0.7);
  box-shadow: 0 0 0 3px rgba(109, 139, 255, 0.14);
}

.gate-form .btn-primary { margin-top: 4px; }

.gate-note {
  margin: 14px 0 0;
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--muted);
}

.gate-error {
  margin: 0;
  padding: 9px 11px;
  border: 1px solid rgba(255, 111, 111, 0.35);
  border-radius: 10px;
  background: rgba(255, 111, 111, 0.1);
  color: #ffb1b1;
  font-size: 12px;
  line-height: 1.55;
}

.gate-error.hidden, .gate-note.hidden { display: none; }

.gate-block {
  display: grid;
  gap: 10px;
  padding: 14px;
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-soft);
}

.gate-block-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text);
  font-weight: 600;
}

.gate-block-title em {
  font-style: normal;
  font-weight: 400;
  font-size: 11px;
  color: var(--muted);
}

.gate-uri {
  display: block;
  padding: 9px 11px;
  border: 1px dashed var(--line);
  border-radius: 9px;
  background: var(--bg);
  color: var(--accent);
  font-size: 11.5px;
  line-height: 1.5;
  word-break: break-all;
}

.gate-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 14px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.gate-link.hidden { display: none; }

.gate-status {
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-dim);
  white-space: pre-wrap;
}

.gate-row { display: grid; gap: 8px; }

.gate-row select {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 13px;
}

.gate-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
}

.gate-actions .btn-ghost { margin-left: auto; }

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-2);
  font-size: 12px;
  color: var(--text-dim);
  white-space: nowrap;
}

.user-chip.hidden { display: none; }

.user-chip::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 3px rgba(53, 211, 160, 0.15);
}

@media (max-width: 560px) {
  .gate { padding: 14px; }
  .gate-box { padding: 22px 18px 18px; }
  .gate-actions .btn-ghost { margin-left: 0; }
}

/* ── 闸门细节修正（对齐 index.html 的实际结构） ───────────────── */

.gate .field { gap: 6px; }
.gate .field > label { font-size: 12px; }

.gate-head h3 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.gate-head { margin-bottom: 16px; }
.gate-head .gate-note { margin: 0; }

.gate-block .row > button { flex: 0 0 auto; }
.gate-block .row > select { flex: 1 1 auto; min-width: 0; }

.gate-box .gate-tabs { margin-top: 0; }

.gate-uri button,
.gate-note button { margin-left: 6px; }

.gate-box button.primary { width: 100%; }
.gate-block button.primary,
.gate-block button.small { width: auto; }

.gate-link.ghost {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border: 0;
  color: #fff;
}

.hidden { display: none !important; }

/* ───────── 去水印弹层 ───────── */
.dw-box { max-width: min(1180px, 96vw); }
.dw-hint { margin: 0 0 10px; line-height: 1.65; font-size: 12.5px; }
.dw-hint b { color: var(--text); font-weight: 600; }
.dw-stage {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  background: #0b0e15;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px;
  margin-bottom: 12px;
  max-height: 62vh;
  overflow: auto;
}
#dw-canvas { display: block; max-width: 100%; cursor: crosshair; border-radius: 8px; touch-action: none; }
.gitem-acts .dw { color: var(--accent); border-color: rgba(109, 139, 255, .45); }

/* 去水印引擎选择行（本地 canvas / ffmpeg 精修） */
.dw-engine-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0 4px;
}
.dw-engine-row select {
  width: auto;
  min-width: 176px;
  max-width: 240px;
  flex: 0 0 auto;
}
.dw-engine-row #dw-zoom {
  flex: 0 0 auto;
}
.dw-engine-row .hint {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 12px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 闸门里的错误条（绑定的 WorkBuddy 账号失效时显示） */
.gate-error {
  background: rgba(255, 92, 92, .14);
  background: color-mix(in srgb, var(--err) 16%, transparent);
  border: 1px solid rgba(255, 92, 92, .38);
  border-color: color-mix(in srgb, var(--err) 44%, transparent);
  color: #ffd9d9;
  border-radius: 10px;
  padding: 8px 10px;
  margin: 0 0 12px;
  font-size: 12px;
  line-height: 1.55;
}
#wb-expired b { color: #fff; font-weight: 700; }

.gate-error.clickable { cursor: pointer }

.dw-engine-row button { white-space: nowrap; flex: 0 0 auto; }
.dw-engine-row #dw-texture { width: auto; min-width: 104px; max-width: 130px; flex: 0 0 auto; }
