:root {
  --bg: #0a0c0f;
  --panel: #12151a;
  --panel-2: #171b22;
  --panel-3: #1e232b;
  --line: #262c36;
  --line-2: #333a46;
  --text: #e9ecf1;
  --muted: #98a1ae;
  --dim: #6c7684;
  --accent: #7c5cff;
  --accent-soft: #2a2350;
  --ok: #3ddc97;
  --warn: #ffb454;
  --err: #ff6b6b;
  --radius: 14px;
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  font-size: 14px;
}

button, input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

.hidden { display: none !important; }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 56px;
  padding: 0 18px;
  background: rgba(10, 12, 15, 0.86);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 600;
  letter-spacing: 0.2px;
}
.brand svg { color: var(--accent); }

.top-actions { display: flex; align-items: center; gap: 8px; }

.pill {
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 12.5px;
  white-space: nowrap;
}
.pill strong { color: var(--text); font-weight: 600; }

.ghost {
  padding: 6px 12px;
  border-radius: 9px;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  cursor: pointer;
  transition: 0.15s;
}
.ghost:hover { border-color: var(--line-2); color: var(--text); background: var(--panel-2); }
.ghost.small { padding: 4px 10px; font-size: 12.5px; }

.wallet-pop {
  position: absolute;
  top: 54px;
  right: 18px;
  z-index: 60;
  width: 232px;
  padding: 13px 14px;
  background: #151920;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.wp-title { font-size: 12px; color: var(--dim); }
.wp-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--muted);
}
.wp-row strong { color: var(--text); font-weight: 500; }
.wp-note { font-size: 11px; color: var(--dim); line-height: 1.5; }
.wp-raw {
  font-size: 10.5px;
  color: #5b6472;
  font-family: ui-monospace, Consolas, monospace;
  word-break: break-all;
  padding-top: 2px;
  border-top: 1px dashed var(--line);
}
.wallet-pop .ghost { align-self: flex-end; }

/* ---------- 布局 ---------- */
.layout {
  display: grid;
  grid-template-columns: 388px minmax(0, 1fr);
  gap: 18px;
  padding: 18px;
  align-items: start;
  max-width: 1680px;
  margin: 0 auto;
}

.panel {
  position: sticky;
  top: 74px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
}

/* ---------- 分段控件 ---------- */
.seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  background: var(--panel-2);
  border-radius: 11px;
  border: 1px solid var(--line);
}
.seg button {
  padding: 8px 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 500;
  transition: 0.15s;
}
.seg button.on { background: var(--panel-3); color: var(--text); box-shadow: 0 1px 0 rgba(255,255,255,0.04) inset; }

/* ---------- 表单 ---------- */
.field { display: flex; flex-direction: column; gap: 7px; position: relative; }
.field > label {
  font-size: 12.5px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: space-between;
}
.hint { color: var(--dim); font-size: 11.5px; font-weight: 400; }

.select {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
  transition: 0.15s;
  overflow: hidden;
}
.select:hover { border-color: var(--line-2); }
.select span:first-child {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 13.5px;
}
.chev { color: var(--dim); font-size: 11px; }

.pop {
  position: absolute;
  top: 74px;
  left: 0;
  right: 0;
  z-index: 30;
  background: #151920;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.pop input {
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  outline: none;
  font-size: 13px;
}
.model-list { max-height: 320px; overflow-y: auto; padding: 6px; }
.model-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
}
.model-item:hover { background: var(--panel-3); }
.model-item .mi-main { min-width: 0; }
.model-item .mi-name {
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.model-item .mi-sub { font-size: 11.5px; color: var(--dim); margin-top: 2px; }
.model-item .mi-price { font-size: 11.5px; color: var(--ok); white-space: nowrap; }
.rec-badge {
  display: inline-block;
  font-size: 10px;
  line-height: 1;
  padding: 3px 5px;
  margin-right: 6px;
  border-radius: 4px;
  background: rgba(61, 220, 151, 0.14);
  border: 1px solid rgba(61, 220, 151, 0.4);
  color: #6ee7b7;
  vertical-align: 1px;
  font-family: var(--font-sans);
  font-weight: 500;
}
.intl-badge {
  display: inline-block;
  font-size: 10px;
  line-height: 1;
  padding: 3px 5px;
  margin-right: 6px;
  border-radius: 4px;
  background: rgba(124, 92, 255, 0.16);
  border: 1px solid rgba(124, 92, 255, 0.42);
  color: #b9a8ff;
  vertical-align: 1px;
  font-family: var(--font-sans);
  font-weight: 500;
}
.tag.intl { background: rgba(124, 92, 255, 0.16); color: #b9a8ff; border-color: rgba(124, 92, 255, 0.42); }
.model-empty { padding: 18px; text-align: center; color: var(--dim); font-size: 12.5px; }

.meta { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font-size: 11.5px;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: #b9a8ff;
  border: 1px solid #352d63;
}
.tag.gray { background: var(--panel-2); color: var(--dim); border-color: var(--line); }
.tag.ok { background: #10261e; color: #6ee7b7; border-color: #1c4536; }

textarea {
  width: 100%;
  padding: 11px 12px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  resize: vertical;
  outline: none;
  line-height: 1.55;
  transition: 0.15s;
}
textarea:focus, .select:focus-visible, input:focus { border-color: var(--accent); }

.dropzone {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px;
  border: 1px dashed var(--line-2);
  border-radius: 10px;
  color: var(--dim);
  cursor: pointer;
  transition: 0.15s;
  font-size: 13px;
}
.dropzone:hover, .dropzone.over {
  border-color: var(--accent);
  color: var(--muted);
  background: rgba(124, 92, 255, 0.06);
}

.thumbs { display: flex; flex-wrap: wrap; gap: 8px; }
.thumb {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 9px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--panel-2);
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .idx {
  position: absolute;
  left: 3px;
  bottom: 3px;
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 5px;
  background: rgba(0,0,0,0.72);
  color: #fff;
}
.thumb .rm {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: 50%;
  background: rgba(0,0,0,0.66);
  color: #fff;
  cursor: pointer;
  line-height: 1;
  font-size: 12px;
  padding: 0;
}
.thumb.loading::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, #1a1f27 30%, #232a34 50%, #1a1f27 70%);
  background-size: 200% 100%;
  animation: shimmer 1.1s infinite;
}
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ---------- 动态参数 ---------- */
.params { display: flex; flex-direction: column; gap: 12px; }
.prow { display: flex; flex-direction: column; gap: 6px; }
.prow > span.plabel { font-size: 12.5px; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  padding: 6px 11px;
  border-radius: 8px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--muted);
  cursor: pointer;
  font-size: 12.5px;
  transition: 0.12s;
}
.chip:hover { border-color: var(--line-2); color: var(--text); }
.chip.on { background: var(--accent-soft); border-color: #4b3f96; color: #cfc2ff; }

.pinline { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pinline > span { font-size: 12.5px; color: var(--muted); }

.switch {
  position: relative;
  width: 38px;
  height: 21px;
  border-radius: 999px;
  background: var(--panel-3);
  border: 1px solid var(--line-2);
  cursor: pointer;
  transition: 0.18s;
  flex: none;
}
.switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--dim);
  transition: 0.18s;
}
.switch.on { background: var(--accent); border-color: var(--accent); }
.switch.on::after { left: 19px; background: #fff; }

select.sel, input.num {
  padding: 8px 10px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 9px;
  outline: none;
  color: var(--text);
}
input.num { width: 110px; }

.adv {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  background: var(--panel-2);
}
.adv summary { cursor: pointer; color: var(--muted); font-size: 12.5px; }
.adv textarea { margin-top: 9px; font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: 12px; }

.estimate {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 11px 13px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
  font-size: 12.5px;
}
.estimate strong { color: var(--ok); font-size: 17px; font-weight: 600; letter-spacing: 0.2px; }

.primary {
  width: 100%;
  padding: 11px 16px;
  border: 0;
  border-radius: 11px;
  background: linear-gradient(180deg, #8a6dff, #6f4ff2);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: 0.15s;
}
.primary:hover { filter: brightness(1.08); }
.primary:disabled { opacity: 0.55; cursor: not-allowed; filter: none; }
.primary.big { padding: 13px 16px; font-size: 14.5px; }

.foot-note { font-size: 11.5px; color: var(--dim); line-height: 1.55; }

/* ---------- 任务区 ---------- */
.stage { min-height: calc(100vh - 110px); }
.stage-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.stage-actions { display: flex; align-items: center; gap: 14px; }
.sw-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}
.sw-label .switch { width: 34px; height: 19px; }
.sw-label .switch::after { width: 13px; height: 13px; }
.sw-label .switch.on::after { left: 17px; }
.stage-head h2 { margin: 0; font-size: 15px; font-weight: 600; }
.count {
  display: inline-block;
  min-width: 22px;
  padding: 1px 7px;
  margin-left: 6px;
  border-radius: 999px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: pop 0.22s ease-out;
}
@keyframes pop { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.card-top {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}
.card-top .t-model {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 11.5px;
}
.state { display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--dim); }
.state.queued .dot { background: var(--warn); }
.state.running .dot { background: var(--accent); animation: pulse 1.2s infinite; }
.state.success .dot { background: var(--ok); }
.state.failed .dot { background: var(--err); }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.25; } }

.card-body {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--panel-2);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.card-body.vertical { aspect-ratio: 9 / 16; }
.card-body.video16 { aspect-ratio: 16 / 9; }
.card-body img, .card-body video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #000;
}
.sk {
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, #141820 30%, #1d232c 50%, #141820 70%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}
.body-msg { position: relative; padding: 20px; text-align: center; color: var(--dim); font-size: 12.5px; line-height: 1.6; }
.body-msg.err { color: #ff9b9b; }

.progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.06);
}
.progress > i {
  display: block;
  height: 100%;
  background: var(--accent);
  transition: width 0.4s ease;
}

.card-prompt {
  margin: 0;
  padding: 10px 12px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.55;
  max-height: 62px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.card-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  margin-top: auto;
}
.cost {
  font-size: 12px;
  color: var(--ok);
  margin-right: auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mini {
  padding: 6px 11px;
  white-space: nowrap;
  border-radius: 8px;
  border: 1px solid var(--line-2);
  background: var(--panel-2);
  color: var(--text);
  cursor: pointer;
  font-size: 12px;
  text-decoration: none;
  transition: 0.15s;
}
.mini:hover { border-color: var(--accent); color: #cfc2ff; }
.mini.icon { padding: 6px 9px; font-size: 13px; line-height: 1; }
.card-body img, .card-body video { cursor: zoom-in; }
.thumb.previewable { cursor: zoom-in; }
.mini.primary-mini { background: var(--accent); border-color: var(--accent); color: #fff; }
.mini.primary-mini:hover { filter: brightness(1.1); }

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 70px 20px;
  color: var(--dim);
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}
.empty p { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.empty span { font-size: 12.5px; max-width: 320px; line-height: 1.6; }

.find-card {
  max-width: 560px;
  text-align: left;
  gap: 12px;
  padding-top: 18px;
}
.find-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.find-head h1 { font-size: 16px; margin: 0; }
.find-head .dh-close { font-size: 20px; margin-left: 0; }
.find-card img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid var(--line);
  cursor: zoom-in;
  display: block;
}
.find-tip {
  margin: 0;
  font-size: 13px;
  color: var(--text);
  line-height: 1.7;
  text-align: left;
}
.find-sub {
  margin: 0;
  font-size: 11.5px;
  color: var(--dim);
  line-height: 1.6;
  text-align: left;
}
.find-card .primary { margin-top: 2px; }

.share-card { max-width: 430px; }
.share-list { display: flex; flex-direction: column; gap: 8px; }
.share-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
}
.share-tag {
  font-size: 11px;
  color: var(--dim);
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--panel-3);
  border: 1px solid var(--line);
  white-space: nowrap;
}
.share-url {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 12px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.share-warn {
  font-size: 12px;
  line-height: 1.6;
  padding: 10px 12px;
  border-radius: 9px;
  background: rgba(255, 180, 84, 0.08);
  border: 1px solid rgba(255, 180, 84, 0.28);
  color: #ffcf94;
}
.share-warn.ok {
  background: rgba(61, 220, 151, 0.08);
  border-color: rgba(61, 220, 151, 0.28);
  color: #8ff0c4;
}
.share-tips {
  font-size: 11.5px;
  color: var(--dim);
  line-height: 1.75;
  border-top: 1px dashed var(--line);
  padding-top: 10px;
}
.share-tips .tip-title { color: var(--muted); margin-bottom: 4px; }
.share-tips code {
  background: var(--panel-3);
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 11px;
}

.ref-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ref-chip {
  padding: 3px 9px;
  border-radius: 6px;
  background: var(--panel-3);
  border: 1px solid var(--line-2);
  color: #b9a8ff;
  font-size: 11.5px;
  font-family: ui-monospace, Consolas, monospace;
  cursor: pointer;
  transition: 0.12s;
}
.ref-chip:hover { border-color: var(--accent); color: #d8ccff; background: var(--accent-soft); }

/* ---------- 媒体预览 ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(5, 7, 10, 0.95);
  display: flex;
  flex-direction: column;
}
.lb-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  flex: none;
}
.lb-title {
  font-size: 12.5px;
  color: var(--muted);
  font-family: ui-monospace, Consolas, monospace;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lb-actions { display: flex; gap: 8px; flex: none; }
.lb-stage {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 64px 24px;
}
.lb-stage img,
.lb-stage video {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 10px;
  background: #000;
}
.lb-stage audio { width: min(560px, 100%); }
.lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(30, 35, 43, 0.9);
  border: 1px solid var(--line-2);
  color: var(--text);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}
.lb-nav:hover { border-color: var(--accent); }
.lb-nav.prev { left: 14px; }
.lb-nav.next { right: 14px; }

/* ---------- 口令 ---------- */
.gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(6, 8, 11, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.gate-card {
  width: 100%;
  max-width: 360px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 26px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.gate-logo { color: var(--accent); }
.gate-card h1 { margin: 0; font-size: 17px; font-weight: 600; }
.gate-card p { margin: 0; font-size: 12.5px; color: var(--dim); line-height: 1.6; }
.gate-card input {
  padding: 11px 13px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  outline: none;
  text-align: center;
  letter-spacing: 2px;
}
.gate-error { color: var(--err); font-size: 12px; min-height: 15px; }

.keycard { text-align: left; }
.keycard h1 { text-align: center; }
.keycard p { text-align: left; }
.keycard .gate-logo { text-align: center; }
.keycard input {
  text-align: left;
  letter-spacing: normal;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 12.5px;
}
.ttl-block { display: flex; flex-direction: column; gap: 8px; }
.ttl-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  font-size: 12.5px;
  color: var(--muted);
}
.ttl-note { font-size: 11px; color: var(--dim); text-align: right; }
.kactions { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.kactions .ghost { padding: 11px 16px; }
.key-links {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 12.5px;
  color: var(--dim);
  padding: 2px 0 4px;
}
.key-links a {
  color: #b9a8ff;
  text-decoration: none;
  border-bottom: 1px dashed rgba(185, 168, 255, 0.45);
  padding-bottom: 1px;
}
.key-links a:hover { color: #d8ccff; border-bottom-color: #d8ccff; }
.kl-sep { color: var(--line-2); }

.linkbtn {
  align-self: center;
  background: none;
  border: 0;
  color: var(--dim);
  font-size: 12px;
  cursor: pointer;
  padding: 4px;
}
.linkbtn:hover { color: var(--muted); }

.pxhint { font-size: 11.5px; color: var(--dim); min-height: 16px; }

/* ---------- 提示 ---------- */
.toasts {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 340px;
}
.toast {
  padding: 11px 14px;
  border-radius: 11px;
  background: #1b2029;
  border: 1px solid var(--line-2);
  color: var(--text);
  font-size: 12.5px;
  line-height: 1.5;
  box-shadow: var(--shadow);
  animation: pop 0.2s ease-out;
}
.toast.err { border-color: #5c2525; color: #ffb0b0; }

.toast.dlhint {
  padding: 0;
  overflow: hidden;
  border-color: rgba(61, 220, 151, 0.35);
  background: #141a17;
}
.dh-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 13px 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ok);
}
.dh-head svg { flex: none; }
.dh-close {
  margin-left: auto;
  background: none;
  border: 0;
  color: var(--dim);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px;
}
.dh-body { padding: 0 13px 12px; font-size: 12px; color: var(--muted); line-height: 1.65; }
.dh-actions { display: flex; gap: 8px; padding: 0 13px 13px; }
.dh-actions button {
  flex: 1;
  padding: 7px 0;
  border-radius: 8px;
  border: 1px solid var(--line-2);
  background: var(--panel-2);
  color: var(--text);
  font-size: 12px;
  cursor: pointer;
}
.dh-actions button:hover { border-color: var(--accent); }

/* ---------- 移动端 ---------- */
@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
    padding: 12px;
    gap: 14px;
  }
  .panel {
    position: static;
    max-height: none;
  }
  .grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
  .card-prompt { -webkit-line-clamp: 2; }
  .topbar { padding: 0 12px; }
  .wallet-pop { right: 12px; }
  .lb-stage { padding: 0 46px 16px; }
  .lb-nav { width: 34px; height: 34px; font-size: 18px; }
  .lb-title { max-width: 40vw; }
  .card-foot { padding: 8px 10px; gap: 6px; }
  .stage-actions { gap: 10px; }
  .mini { padding: 5px 9px; font-size: 11.5px; }
  .brand span { font-size: 13.5px; }
  .toasts { left: 12px; right: 12px; bottom: 12px; max-width: none; }
}

@media (max-width: 420px) {
  .grid { grid-template-columns: 1fr 1fr; }
}
