:root {
  --bg: #0a0e1a;
  --panel: #141d2e;
  --panel2: #1c283b;
  --text: #e8edf7;
  --muted: #aab5c8;
  --line: #2a3852;

  /* 与 app.css 同源：取自 3D 图标上那条 V 形飘带 */
  --teal: #2ad0c8;
  --teal-lite: #5eead4;
  --accent: #3b6ef5;
  --accent2: #a855f7;
  --accent2-lite: #c4a3ff;
  --ribbon: linear-gradient(118deg, var(--teal), var(--accent) 48%, var(--accent2));
  --gloss: inset 0 1px 0 rgba(255,255,255,.22);
  --glass-edge: inset 0 1px 0 rgba(255,255,255,.05);

  --green: #56d7a4;
  --amber: #f4c26b;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: linear-gradient(145deg, #09101e, #0a0e1a 42%, #101b31);
  background-attachment: fixed;
  color: var(--text);
  font-family: "Segoe UI", "Microsoft YaHei", -apple-system, sans-serif;
  line-height: 1.65;
}

a { color: #9fbaff; }
a:hover { color: var(--teal-lite); }

.shell { max-width: 1160px; margin: auto; padding: 24px; }

/* ---------- header ---------- */
.site-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 19px;
  font-weight: 600;
  text-decoration: none;
  color: var(--text);
  letter-spacing: .2px;
}
/* 放了 wordmark.png 就用图，文字字标让位；没放则完全按原样显示 */
.brand-img { height: 26px; width: auto; display: block; }
.brand.has-art { font-size: 0; }
.brand span {
  background: var(--ribbon);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.site-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.site-nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 7px 11px;
  border-radius: 9px;
  font-size: 15px;
}
.site-nav a:hover { color: #fff; background: var(--panel2); }
.site-nav a.active {
  color: #fff;
  background: linear-gradient(120deg, rgba(42,208,200,.16), rgba(59,110,245,.16) 55%, rgba(168,85,247,.13));
  box-shadow: var(--glass-edge);
}
.lang button {
  border: 1px solid var(--line);
  background: #111a2a;
  color: var(--text);
  border-radius: 9px;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 13px;
}
.lang button.active { background: var(--ribbon); border-color: transparent; box-shadow: var(--gloss); }

/* ---------- hero ---------- */
.hero {
  position: relative;
  margin-top: 26px;
  padding: 46px 38px;
  border: 1px solid #2f4162;
  border-radius: 20px;
  background:
    radial-gradient(760px 300px at 12% -10%, rgba(42,208,200,.12), transparent 62%),
    radial-gradient(700px 320px at 88% 0%, rgba(168,85,247,.13), transparent 60%),
    linear-gradient(120deg, #172847cc, #121b2fcc);
  box-shadow: var(--glass-edge);
  overflow: hidden;
}
/* 顶部一道飘带发丝，呼应图标而不喧宾夺主 */
.hero::before {
  content: "";
  position: absolute; left: 0; right: 0; top: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(42,208,200,.6) 18%, rgba(59,110,245,.5) 50%, rgba(168,85,247,.5) 78%, transparent);
}
.hero h1 span, .hero h1 b {
  background: var(--ribbon);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero h1 { font-size: 38px; margin: 0 0 12px; line-height: 1.25; }
.hero .sub { color: var(--muted); font-size: 17px; margin: 0 0 22px; max-width: 720px; }

.btn {
  display: inline-block;
  border-radius: 10px;
  padding: 11px 20px;
  text-decoration: none;
  font-size: 15px;
  border: none;
  background: var(--ribbon);
  color: #fff;
  margin-right: 10px;
  margin-bottom: 8px;
  box-shadow: var(--gloss), 0 4px 16px rgba(59,110,245,.3);
}
.btn.ghost {
  background: transparent;
  color: #cfe0ff;
  border: 1px solid var(--line);
  box-shadow: none;
}
.btn.ghost:hover { border-color: rgba(42,208,200,.55); color: #fff; }
.btn:hover { filter: brightness(1.09) saturate(1.05); }

/* ---------- layout ---------- */
.grid { display: grid; gap: 18px; margin-top: 26px; }
.grid.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: linear-gradient(145deg, #172235, #121a29);
  padding: 22px;
  box-shadow: var(--glass-edge);
  transition: border-color .16s, transform .16s;
}
.card:hover { border-color: rgba(59,110,245,.42); }
/* 卡片标题左侧一小段飘带，弱标识但成体系 */
.grid .card h3 { position: relative; padding-left: 12px; }
.grid .card h3::before {
  content: "";
  position: absolute; left: 0; top: .28em; bottom: .28em;
  width: 2.5px; border-radius: 3px;
  background: var(--ribbon);
}
.card h2 { margin: 0 0 10px; font-size: 22px; }
.card h3 { margin: 0 0 8px; font-size: 17px; color: #dce7ff; }
.card p { margin: 7px 0; color: #d8dfec; }

section { margin-top: 34px; }
section > h2 { font-size: 25px; margin: 0 0 6px; }
section > .lead { color: var(--muted); margin: 0 0 14px; }

.tag {
  display: inline-block;
  color: #bcd0ff;
  background: linear-gradient(120deg, rgba(42,208,200,.14), rgba(59,110,245,.16));
  border: 1px solid rgba(59,110,245,.34);
  border-radius: 99px;
  padding: 2px 10px;
  font-size: 12px;
  margin: 0 5px 5px 0;
}
.tag.soon { color: var(--amber); background: #3a2f16; border-color: #7a6330; }
.tag.live { color: var(--teal-lite); background: rgba(42,208,200,.13); border-color: rgba(42,208,200,.4); }

ul, ol { margin: 8px 0; padding-left: 22px; }
li { margin: 5px 0; color: #d8dfec; }

table { width: 100%; border-collapse: collapse; margin-top: 12px; }
th, td { text-align: left; padding: 10px; border-bottom: 1px solid var(--line); }
th { color: var(--teal-lite); font-weight: 600; letter-spacing: .01em; }

code {
  background: #0b1321;
  border: 1px solid rgba(42,208,200,.2);
  border-radius: 5px;
  padding: 1px 6px;
  color: #c8d9ff;
  font-size: .92em;
}
pre {
  background: #0b1321;
  border: 1px solid #263854;
  border-radius: 10px;
  padding: 14px 16px;
  overflow-x: auto;
  box-shadow: var(--glass-edge);
}
pre code { background: none; border: none; padding: 0; }

.site-foot {
  position: relative;
  margin-top: 46px;
  padding: 22px 0 10px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.site-foot a { color: var(--muted); text-decoration: none; margin-right: 14px; }
.site-foot a:hover { color: var(--teal-lite); }
.site-foot::before {
  content: "";
  position: absolute; left: 0; top: -1px; width: 180px; height: 1px;
  background: linear-gradient(90deg, rgba(42,208,200,.55), rgba(168,85,247,.28), transparent);
}

/* 页头下缘同样一道，和 app 外壳一致 */
.site-head { position: relative; }
.site-head::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, rgba(42,208,200,.5), rgba(59,110,245,.35) 40%, rgba(168,85,247,.3) 70%, transparent);
}

::selection { background: rgba(59,110,245,.36); }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #0a1120; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #33507e, #3b3f7a);
  border-radius: 6px; border: 2px solid transparent; background-clip: padding-box;
}

body:not(.lang-en) .en, body.lang-en .zh { display: none; }

@media (max-width: 860px) {
  .grid.c3, .grid.c2 { grid-template-columns: 1fr; }
  .grid.c4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { padding: 30px 22px; }
  .hero h1 { font-size: 28px; }
  .shell { padding: 14px; }
}


/* ---------- 外壳示意图 ----------
   原来用 ASCII 制表符画，中日韩字符与制表符在等宽字体里宽度对不齐，
   换个字体就散架。改成真盒子，双语切换也不再受字符宽度牵制。 */
.shell-diagram {
  display: grid;
  grid-template-columns: 1fr 1.7fr 1fr;
  gap: 10px;
  margin: 6px 0 14px;
}
.sd-col {
  border: 1px solid var(--line);
  border-radius: 11px;
  background: linear-gradient(160deg, #16223a, #111a2b);
  padding: 13px 14px;
  box-shadow: var(--glass-edge);
  display: flex; flex-direction: column; gap: 5px;
}
.sd-col.wide {
  border-color: rgba(59,110,245,.36);
  background:
    radial-gradient(300px 120px at 50% 0%, rgba(59,110,245,.13), transparent 70%),
    linear-gradient(160deg, #16223a, #111a2b);
}
.sd-col b {
  font-size: 13.5px; color: var(--text); font-weight: 600;
  padding-bottom: 6px; margin-bottom: 2px;
  border-bottom: 1px solid var(--line);
}
.sd-col span { font-size: 13px; color: var(--muted); }
@media (max-width: 860px) {
  .shell-diagram { grid-template-columns: 1fr; }
}


/* ---------- 下载槽 ----------
   SHA-256 是 64 个字符的连续串，不换行会直接顶出卡片。 */
.dl-slot { margin-top: 10px; }
.dl-slot p { margin: 8px 0 0; }
.dl-slot small { color: var(--muted); }
.dl-slot code {
  display: inline-block;
  max-width: 100%;
  word-break: break-all;
  font-size: .82em;
  line-height: 1.5;
}
.dl-slot + .dl-slot { border-top: 1px solid var(--line); padding-top: 12px; }


/* ---------- 账号 ----------
   登录/注册页与顶栏的账号态。配色仍走 --ribbon 那条飘带，
   不给鉴权单开一套视觉——它是站点的一部分，不是外挂系统。 */

.auth-wrap { max-width: 420px; margin: 40px auto 60px; }
.auth-card {
  border: 1px solid var(--line);
  border-radius: 15px;
  background: linear-gradient(145deg, #172235, #121a29);
  padding: 26px;
  box-shadow: var(--glass-edge), 0 18px 48px rgba(0,0,0,.34);
}
.auth-card h1 { font-size: 23px; margin: 0 0 4px; }
.auth-card .lead { color: var(--muted); font-size: 14px; margin: 0 0 20px; }

.auth-tabs { display: flex; gap: 6px; margin-bottom: 20px; }
.auth-tabs button {
  flex: 1;
  padding: 8px 0;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
}
.auth-tabs button.active {
  background: var(--ribbon);
  border-color: transparent;
  color: #fff;
  box-shadow: var(--gloss);
}

.field { margin-bottom: 13px; }
.field label { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 5px; }
.field input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: #0d1524;
  color: var(--text);
  font-size: 14.5px;
  outline: none;
}
.field input:focus { border-color: rgba(42,208,200,.6); box-shadow: 0 0 0 3px rgba(42,208,200,.1); }
.field .hint { font-size: 12px; color: #6b7a94; margin-top: 4px; }

.auth-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin: 4px 0 16px; font-size: 12.5px; color: var(--muted);
}
.auth-row label { display: flex; align-items: center; gap: 6px; cursor: pointer; }

.auth-submit { width: 100%; margin: 0; text-align: center; cursor: pointer; }
.auth-submit[disabled] { opacity: .55; cursor: default; filter: none; }

.auth-msg {
  border-radius: 9px; padding: 10px 12px; font-size: 13px;
  margin-bottom: 14px; display: none; line-height: 1.55;
}
.auth-msg.show { display: block; }
.auth-msg.err { background: rgba(255,122,138,.1); border: 1px solid rgba(255,122,138,.4); color: #ffc3cb; }
.auth-msg.ok  { background: rgba(86,215,164,.1); border: 1px solid rgba(86,215,164,.4); color: #b6f0d8; }
.auth-msg.info{ background: rgba(59,110,245,.1); border: 1px solid rgba(59,110,245,.36); color: #cfe0ff; }

.auth-sep {
  display: flex; align-items: center; gap: 10px;
  color: #6b7a94; font-size: 12px; margin: 20px 0 14px;
}
.auth-sep::before, .auth-sep::after {
  content: ""; flex: 1; height: 1px; background: var(--line);
}

.oauth-list { display: grid; gap: 8px; }
.oauth-list button {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  padding: 10px; border-radius: 9px;
  border: 1px solid var(--line); background: #101a2b;
  color: #dbe5f6; font-size: 14px; cursor: pointer;
}
.oauth-list button:hover { border-color: rgba(59,110,245,.5); color: #fff; }
.oauth-list svg { flex: none; }

.auth-foot { margin-top: 18px; font-size: 12.5px; color: #6b7a94; text-align: center; }

/* 顶栏账号态：未登录显示「登录」，已登录显示首字母圆章 + 菜单 */
.acct { position: relative; display: flex; align-items: center; gap: 8px; }
.acct-login {
  border: 1px solid var(--line); border-radius: 8px;
  padding: 5px 13px; font-size: 13px; color: #cfe0ff;
  text-decoration: none; white-space: nowrap;
}
.acct-login:hover { border-color: rgba(42,208,200,.55); color: #fff; }
.acct-chip {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--line); border-radius: 99px;
  padding: 3px 11px 3px 3px; background: transparent; cursor: pointer;
  color: var(--text); font-size: 13px; max-width: 190px;
}
.acct-chip:hover { border-color: rgba(59,110,245,.5); }
.acct-avatar {
  width: 24px; height: 24px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  background: var(--ribbon); color: #fff;
  font-size: 12px; font-weight: 600; box-shadow: var(--gloss);
}
.acct-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-menu {
  position: absolute; right: 0; top: calc(100% + 7px); z-index: 50;
  min-width: 214px; padding: 6px;
  border: 1px solid var(--line); border-radius: 11px;
  background: #131c2c; box-shadow: 0 18px 44px rgba(0,0,0,.5);
}
.acct-menu[hidden] { display: none; }
.acct-menu .who { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 5px; }
.acct-menu .who b { display: block; font-size: 13px; }
.acct-menu .who span { display: block; font-size: 11.5px; color: #6b7a94; word-break: break-all; }
.acct-menu a, .acct-menu button {
  display: block; width: 100%; text-align: left;
  padding: 7px 10px; border-radius: 7px; border: none; background: none;
  color: #dbe5f6; font-size: 13px; text-decoration: none; cursor: pointer;
}
.acct-menu a:hover, .acct-menu button:hover { background: #1c2942; color: #fff; }


/* ---------- 模型账号绑定 ---------- */
.prov-note {
  border: 1px solid rgba(42,208,200,.34);
  background: linear-gradient(120deg, rgba(42,208,200,.08), rgba(59,110,245,.08));
  border-radius: 12px; padding: 14px 16px; margin-bottom: 20px;
  font-size: 13.5px; color: #d8e3f5; line-height: 1.7;
}
.prov-note b { color: var(--teal-lite); }

.prov-list { display: grid; gap: 14px; }
.prov {
  border: 1px solid var(--line); border-radius: 13px;
  background: linear-gradient(145deg, #172235, #121a29);
  padding: 18px 20px; box-shadow: var(--glass-edge);
}
.prov.off { opacity: .62; }
.prov-head { display: flex; align-items: center; gap: 10px; }
.prov-head b { font-size: 16px; }
.prov-sub { color: var(--muted); font-size: 12.5px; margin-bottom: 10px; }

.prov-badge {
  font-size: 11.5px; border-radius: 99px; padding: 2px 10px;
  border: 1px solid var(--line); color: var(--muted);
}
.prov-badge.ok   { color: #b6f0d8; border-color: rgba(86,215,164,.5);  background: rgba(86,215,164,.1); }
.prov-badge.warn { color: #f6dda9; border-color: rgba(244,194,107,.5); background: rgba(244,194,107,.1); }
.prov-badge.grey { color: #8b99b3; }

.prov-msg { font-size: 12.8px; color: var(--muted); margin: 8px 0 0; line-height: 1.65; }
.prov-cond { margin: 8px 0 0; padding-left: 18px; font-size: 12.5px; color: #f6dda9; }
.prov-cond li { margin: 3px 0; }
.prov .field { margin-top: 12px; margin-bottom: 0; }
.prov-actions { display: flex; gap: 8px; margin-top: 14px; }
.prov-actions .btn { margin: 0; font-size: 13.5px; padding: 8px 16px; }
.prov-new { border-style: dashed; border-color: rgba(59,110,245,.4); }
.prov-new .field { margin-top: 10px; }
.prov select {
  width: 100%; padding: 10px 12px; border-radius: 9px;
  border: 1px solid var(--line); background: #0d1524; color: var(--text); font-size: 14.5px;
}
.prov-note.quickstart { border-color: rgba(86,215,164,.4);
  background: linear-gradient(120deg, rgba(86,215,164,.09), rgba(42,208,200,.07)); }
.prov-note.quickstart b { color: var(--green); }
.prov-note code { background: rgba(255,255,255,.07); padding: 1px 6px; border-radius: 5px; font-size: .9em; }

/* ---------- 生成区（模板 / 案例页） ----------
   模板页不是读物，是干活的地方：素材槽 → 参数 → 生成。
   配色沿用上面的令牌，不另起一套。 */
.gen {
  margin-top: 26px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: linear-gradient(145deg, #172235, #121a29);
  padding: 20px 22px 22px;
}
.gen-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.gen-head h2 { margin: 0; font-size: 19px; }
.gen-state {
  margin-left: auto;
  font-size: 11.5px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 3px 10px;
}
.gen-state.on { color: var(--teal-lite); border-color: rgba(42, 208, 200, .4); background: rgba(42, 208, 200, .12); }

.gen-grid { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 20px; align-items: start; }
.gen-label { font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0 0 9px; }
.gen-label + .gen-label, .gen-slots + .gen-label { margin-top: 18px; }

.gen-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.gen-slot { border: 1px solid var(--line); border-radius: 11px; background: #111a2a; padding: 11px 12px 12px; }
.gen-slot.need { border-color: #7a6330; }
.gen-slot.ok { border-color: rgba(42, 208, 200, .45); }
.gen-slot-head { display: flex; align-items: center; gap: 7px; font-size: 13px; margin-bottom: 9px; }
.gen-slot-head b { font-weight: 600; }
.gen-count { margin-left: auto; font-size: 11px; color: var(--muted); font-family: Consolas, monospace; }

.gen-drop {
  width: 100%;
  min-height: 62px;
  border: 1px dashed var(--line);
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12.5px;
  cursor: pointer;
}
.gen-drop:hover, .gen-drop.over { border-color: var(--accent); color: var(--text); background: rgba(59, 110, 245, .08); }

.gen-slot textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #0b1321;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  padding: 8px 10px;
  resize: vertical;
}

.gen-thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.gen-thumb { position: relative; aspect-ratio: 1; border-radius: 7px; overflow: hidden; border: 1px solid var(--line); background: #0b1321; display: block; }
.gen-thumb img, .gen-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.gen-file { display: grid; place-items: center; height: 100%; color: var(--teal-lite); font-size: 18px; }
.gen-thumb button {
  position: absolute; right: 3px; top: 3px;
  width: 17px; height: 17px; padding: 0;
  border: 0; border-radius: 50%;
  background: rgba(10, 14, 26, .82); color: #fff;
  font-size: 9px; cursor: pointer;
}
.gen-add {
  border: 1px dashed var(--line); border-radius: 7px; background: transparent;
  color: var(--muted); cursor: pointer; aspect-ratio: 1; font-size: 15px;
}
.gen-add:hover { border-color: var(--accent); color: var(--text); }

.gen-field { margin-bottom: 12px; }
.gen-field label { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 5px; }
.gen-field .req { color: #ff8f8f; }
.gen-field input[type="text"], .gen-field select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #0b1321;
  color: var(--text);
  font: inherit;
  font-size: 13.5px;
  padding: 8px 10px;
}
.gen-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 0 12px; }

.gen-side .btn { width: 100%; text-align: center; margin: 0 0 9px; }
.gen-warn {
  border: 1px solid #7a6330;
  background: #3a2f16;
  color: var(--amber);
  border-radius: 9px;
  padding: 8px 11px;
  font-size: 12.5px;
  margin-bottom: 10px;
}
.gen-facts { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 14px 0 0; font-size: 12.5px; }
.gen-facts dt { color: var(--muted); }
.gen-facts dd { margin: 0; font-family: Consolas, monospace; }

.gen-run-panel { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 16px; }
.gen-bar { height: 4px; border-radius: 99px; background: #1c283b; overflow: hidden; margin-bottom: 14px; }
.gen-bar i { display: block; height: 100%; width: 0; background: var(--ribbon); transition: width .35s ease; }
.gen-steps { display: grid; gap: 7px; }
.gen-step {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--line); border-radius: 9px;
  padding: 8px 12px; font-size: 13px; color: var(--muted);
  font-family: Consolas, monospace;
}
.gen-step i { margin-left: auto; font-style: normal; font-size: 12px; }
.gen-step.run { border-color: rgba(59, 110, 245, .5); color: var(--text); background: rgba(59, 110, 245, .07); }
.gen-step.done { border-color: rgba(86, 215, 164, .38); color: var(--green); }

.gen-artifacts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.gen-artifact {
  border: 1px solid var(--line); border-radius: 9px;
  padding: 8px 12px; font-size: 12.5px;
  display: flex; gap: 8px; align-items: center;
}
.gen-artifact b { font-weight: 600; }
.gen-artifact span { color: var(--green); }
.gen-note { width: 100%; color: var(--muted); font-size: 12px; margin: 4px 0 0; }

/* ---------- 运行记录 ---------- */
.run-row {
  display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: center;
  border: 1px solid var(--line); border-radius: 12px; background: #111a2a;
  padding: 12px 14px; margin-bottom: 10px;
}
.run-row b { font-size: 14.5px; }
.run-facts { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 5px; font-size: 11.5px; color: var(--muted); font-family: Consolas, monospace; }
.run-actions { display: flex; gap: 8px; }
.run-figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 18px 0 24px; }
.run-figure { border: 1px solid var(--line); border-radius: 12px; background: #111a2a; padding: 14px 16px; }
.run-figure b { display: block; font-size: 22px; }
.run-figure span { font-size: 12px; color: var(--muted); }

@media (max-width: 860px) {
  .gen-grid { grid-template-columns: 1fr; }
  .gen-slots, .gen-fields { grid-template-columns: 1fr; }
}


/* ---------- 商店：分区聚合，密度优先 ----------
   商店首页要一屏看到多个板块（模板 / 应用 / 模型接入），
   而不是几张巨图就占满。卡片一律做小，横向轨道收纳长列表。 */
.sec-head { display: flex; align-items: baseline; gap: 12px; margin: 32px 0 12px; }
.sec-head h2 { font-size: 20px; margin: 0; }
.sec-head .more { margin-left: auto; font-size: 13.5px; }

.rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 186px;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 10px;
  scrollbar-width: thin;
  scroll-snap-type: x proximity;
}
.rail > * { scroll-snap-align: start; }

.mini {
  display: block;
  border: 1px solid var(--line);
  border-radius: 11px;
  overflow: hidden;
  background: #111a2a;
  text-decoration: none;
  color: inherit;
  transition: border-color .16s ease, transform .16s ease;
}
.mini:hover { border-color: rgba(42,208,200,.55); transform: translateY(-2px); }
.mini-art { display: block; position: relative; aspect-ratio: 16 / 10; background: #0a0f1e; overflow: hidden; }
.mini-art img, .mini-art video { width: 100%; height: 100%; object-fit: cover; display: block; }
.mini-art .dur {
  display: block;
  position: absolute; right: 5px; bottom: 5px;
  font-size: 10.5px; padding: 1px 6px; border-radius: 99px;
  background: rgba(6,10,20,.78); color: #dbe4f8;
}
.mini-t {
  display: block;
  padding: 7px 9px 9px; font-size: 12.5px; line-height: 1.35; color: #dce7ff;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; min-height: 42px;
}

.app-rail { grid-auto-columns: 132px; }
.app-mini { text-align: center; padding: 15px 8px 13px; }
.app-mini b { display: block; font-size: 13px; margin-top: 4px; }
.app-mini span { display: block; font-size: 11px; color: var(--muted); }

/* ---------- 风格分类：小卡密排，一屏看完 ---------- */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin: 18px 0 34px;
}
.cat-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #111a2a;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: transform .16s ease, border-color .16s ease;
}
.cat-card:hover { transform: translateY(-2px); border-color: rgba(42,208,200,.55); }
.cat-art { display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; gap: 1px; background: #0a0f1e; aspect-ratio: 16 / 9; }
.cat-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cat-art img:first-child { grid-row: span 2; }
.cat-body { display: flex; align-items: center; gap: 8px; padding: 9px 11px; }
.cat-body b { font-size: 13.5px; font-weight: 600; }
.cat-n { margin-left: auto; font-size: 11px; color: var(--muted); }

/* ---------- 列表：小卡，一行五六个 ---------- */
.lib-toolbar {
  display: flex; gap: 7px; flex-wrap: wrap;
  margin: 18px 0 6px;
  position: sticky; top: 0; z-index: 5;
  padding: 12px 0;
  background: linear-gradient(180deg, #0a0e1af0 75%, transparent);
  backdrop-filter: blur(6px);
}
.lib-count { color: var(--muted); font-size: 13px; margin: 4px 0 14px; }
.lib-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(186px, 1fr));
  gap: 12px;
  margin-bottom: 36px;
}
.lcard {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #111a2a;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: border-color .16s ease, transform .16s ease;
}
.lcard:hover { border-color: rgba(42,208,200,.55); transform: translateY(-2px); }
.lcard.lib-hide { display: none; }
.lcard-thumb { position: relative; width: 100%; padding-top: 62.5%; overflow: hidden; background: #0a0f1e; }
.lcard-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.lcard-ph {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #101a33 0%, #0a0f1e 70%);
  color: var(--muted); font-size: 12px; letter-spacing: .08em; text-align: center; padding: 0 12px;
}
.lcard-tag {
  position: absolute; left: 8px; top: 8px; z-index: 2;
  background: rgba(42,208,200,.9); color: #04121a;
  font-size: 10px; font-weight: 600; line-height: 1; padding: 4px 6px; border-radius: 4px;
}
.lcard-body { padding: 8px 10px 10px; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.lcard-title {
  font-size: 12.5px; line-height: 1.35; color: #e8edf7; font-weight: 600;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.lcard-meta { font-size: 11px; color: var(--muted); margin-top: auto; padding-top: 4px; }
.lib-empty { color: var(--muted); padding: 40px 0; text-align: center; display: none; }
.lcard-thumb video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; display: block; background: #0a0f1e;
}

.lib-toolbar { gap: 7px; }
.cat-btn { font-size: 12.5px; padding: 6px 12px; }
.cat-btn.active { background: var(--ribbon); border-color: transparent; color: #fff; box-shadow: var(--gloss); }

/* ---------- 模板页头图 ---------- */
.case-hero { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #05070d; }
.case-hero img, .case-video { width: 100%; display: block; max-height: 62vh; object-fit: contain; }
.case-badges { display: flex; gap: 6px; flex-wrap: wrap; margin: 14px 0 4px; }

/* ---------- 生成区里的提示词 ---------- */
.gen-prompt { margin-top: 4px; }
.gen-prompt-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.gen-prompt-head .gen-label { margin: 0; }
.gen-copy {
  margin-left: auto;
  border: 1px solid var(--line);
  background: #111a2a;
  color: var(--text);
  border-radius: 8px;
  padding: 5px 12px;
  font-size: 12.5px;
  cursor: pointer;
}
.gen-copy:hover { border-color: var(--teal); color: var(--teal-lite); }
.gen-copy.done { color: var(--green); border-color: rgba(86,215,164,.45); }
.gen-prompt textarea {
  width: 100%;
  min-height: 240px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #0b1321;
  color: #c9f8df;
  font-family: Consolas, "SF Mono", monospace;
  font-size: 12.5px;
  line-height: 1.65;
  padding: 12px 14px;
  resize: vertical;
}
.gen-prompt textarea:focus { outline: none; border-color: var(--accent); }
/* 案例自带的参考素材：和用户上传的同列摆放，只多一个来源角标，删除键一样有 */
.gen-thumb.from-case { border-color: var(--teal); }
.gen-thumb-tag {
  position: absolute; left: 3px; bottom: 3px;
  padding: 1px 5px; border-radius: 5px;
  background: rgba(10, 14, 26, .82); color: var(--teal-lite);
  font-size: 9px; font-style: normal; line-height: 1.5;
  max-width: calc(100% - 6px); overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
}

@media (max-width: 860px) {
  .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lib-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- 产品图标：放了 PNG 才出现 ---------- */
.app-icon {
  width: 28px; height: 28px;
  border-radius: 6px;
  vertical-align: -4px;
  margin-right: 8px;
  object-fit: contain;
}
.app-icon.lg { width: 46px; height: 46px; border-radius: 10px; vertical-align: -10px; }
/* 有图标时把卡片标题那条飘带收掉，两个标识并排会打架 */
.grid .card h3:has(.app-icon) { padding-left: 0; }
.grid .card h3:has(.app-icon)::before { display: none; }

/* 助记词仪式：12 个词只显示一次，排版要能一眼抄下来 */
.seed-title { margin: 22px 0 6px; font-size: 20px; }
.seed-vuid { font-size: 13px; color: #6b7a94; margin: 8px 0 12px; word-break: break-all; }
.seed-vuid code { color: #9fb0cc; }
.seed-words {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px 12px;
  margin: 0 0 16px; padding: 14px; list-style: decimal inside;
  background: #0f1524; border: 1px solid #2a3550; border-radius: 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14px;
}
.seed-words li { color: #dfe7f5; }
.seed-words li.seed-pending { color: #3a4870; }
.seed-ack input[disabled] + * , .seed-ack input[disabled] { cursor: default; }
.seed-ack { display: block; margin: 0 0 12px; font-size: 13px; color: #9fb0cc; cursor: pointer; }
.seed-ack input { margin-right: 6px; }
@media (max-width: 520px) { .seed-words { grid-template-columns: repeat(2, 1fr); } }
