/* ============================================================
   Jaykou Studio · 设计系统
   浅色玻璃拟态：薰衣草渐变底 + 白色毛玻璃面板 + 彩色软图标
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

:root {
  --bg:        #E8EAF6;
  --bg-soft:   #F4F5FB;
  --panel:     rgba(255, 255, 255, 0.55);
  --panel-2:   rgba(255, 255, 255, 0.78);
  --border:    rgba(255, 255, 255, 0.72);
  --border-2:  rgba(255, 255, 255, 0.95);
  --inset:     rgba(255, 255, 255, 0.62);

  --text:      #26263A;
  --text-2:    #55556E;
  --text-3:    #8B8BA3;

  --acc:       #7C6CFF;                       /* 主强调：紫 */
  --acc-2:     #FF6CAB;                       /* 渐变另一端：粉 */
  --acc-soft:  rgba(124, 108, 255, 0.13);
  --acc-line:  rgba(124, 108, 255, 0.42);

  --red:       #F04E68;                       /* 只给危险 / 错误 */
  --red-soft:  rgba(240, 78, 104, 0.12);
  --red-line:  rgba(240, 78, 104, 0.38);

  --ok:        #1FA95C;
  --warn:      #D99A1F;

  --glass-shadow: 0 10px 34px rgba(96, 90, 180, 0.12);

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 22px;

  --nav-h: 62px;
  --max: 1320px;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro SC", "PingFang SC",
          "Helvetica Neue", "Segoe UI", Roboto, "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --w:        255, 255, 255;                  /* 毛玻璃表面色三元组（暗色主题换深色） */
  --nav-bg:   rgba(255, 255, 255, 0.52);
}

/* ---------------------------------------------------------- 暗色主题 */
html[data-theme="dark"] {
  --bg:        #131420;
  --bg-soft:   #191A28;
  --panel:     rgba(32, 34, 52, 0.55);
  --panel-2:   rgba(32, 34, 52, 0.82);
  --w:         36, 38, 58;
  --border:    rgba(255, 255, 255, 0.13);
  --border-2:  rgba(255, 255, 255, 0.26);
  --inset:     rgba(15, 16, 27, 0.6);

  --text:      #ECECF4;
  --text-2:    #B6B6C8;
  --text-3:    #7F7F95;

  --acc-soft:  rgba(139, 130, 255, 0.18);
  --acc-line:  rgba(139, 130, 255, 0.48);
  --red-soft:  rgba(240, 78, 104, 0.16);
  --red-line:  rgba(240, 78, 104, 0.5);
  --ok:        #3CCB7E;
  --warn:      #E5B04A;

  --glass-shadow: 0 10px 34px rgba(0, 0, 0, 0.42);
  --nav-bg:   rgba(19, 20, 32, 0.62);
}

/* 暗色下：光斑压暗成极光感，顶部白光换成冷紫微光 */
html[data-theme="dark"] body::before {
  background:
    radial-gradient(560px 560px at 82% 12%, rgba(255, 138, 190, 0.14), transparent 66%),
    radial-gradient(640px 640px at 10% 22%, rgba(110, 96, 255, 0.16), transparent 68%),
    radial-gradient(520px 520px at 55% 88%, rgba(64, 150, 255, 0.12), transparent 66%),
    radial-gradient(420px 420px at 90% 78%, rgba(150, 92, 255, 0.12), transparent 64%);
}
html[data-theme="dark"] body::after {
  background: radial-gradient(1200px 800px at 50% -10%, rgba(120, 110, 220, 0.09), transparent 60%);
}
html[data-theme="dark"] ::-webkit-scrollbar-thumb { background: rgba(255,255,255,.14); border-radius: 99px; border: 2px solid transparent; background-clip: content-box; }
html[data-theme="dark"] ::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.26); background-clip: content-box; }


html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* 大柔光斑：薰衣草底上浮动的紫 / 粉 / 蓝团块，参考玻璃拟态海报 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(560px 560px at 82% 12%, rgba(255, 158, 205, 0.55), transparent 66%),
    radial-gradient(640px 640px at 10% 22%, rgba(124, 108, 255, 0.42), transparent 68%),
    radial-gradient(520px 520px at 55% 88%, rgba(116, 205, 255, 0.45), transparent 66%),
    radial-gradient(420px 420px at 90% 78%, rgba(177, 108, 255, 0.38), transparent 64%);
}
/* 细颗粒柔光，让色块过渡更奶 */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(1200px 800px at 50% -10%, rgba(var(--w), .32), transparent 60%);
}

a { color: inherit; text-decoration: none; }
::placeholder { color: var(--text-3); opacity: 1; }
button { font-family: inherit; cursor: pointer; }
img, video { display: block; max-width: 100%; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(38,38,58,.16); border-radius: 99px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(38,38,58,.28); background-clip: content-box; }

/* ---------------------------------------------------------- 布局 */

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; position: relative; z-index: 1; }
.view { min-height: calc(100vh - var(--nav-h)); padding-bottom: 80px; }
.center { display: flex; align-items: center; justify-content: center; }
.row { display: flex; align-items: center; }
.gap8 { gap: 8px; } .gap12 { gap: 12px; } .gap16 { gap: 16px; }
.grow { flex: 1; }
.hide { display: none !important; }

/* ---------------------------------------------------------- 顶栏 */

.nav {
  position: sticky; top: 0; z-index: 50;
  height: var(--nav-h);
  backdrop-filter: blur(22px) saturate(170%);
  -webkit-backdrop-filter: blur(22px) saturate(170%);
  background: var(--nav-bg);
  border-bottom: 1px solid var(--border);
}
.nav-in { height: 100%; display: flex; align-items: center; gap: 16px; }

.logo { display: flex; align-items: center; gap: 9px; font-weight: 600; font-size: 15px; letter-spacing: -.01em; white-space: nowrap; flex: none; }
@media (max-width: 1280px) { .logo span { display: none; } }
.logo-mark {
  width: 26px; height: 26px; border-radius: 8px;
  background: linear-gradient(140deg, var(--acc), var(--acc-2));
  display: grid; place-items: center;
  font-size: 12px; font-weight: 700; color: #fff;
  box-shadow: 0 4px 12px rgba(124, 108, 255, .35);
}
.logo b { font-weight: 600; }
.logo span { color: var(--text-3); font-weight: 400; font-size: 12px; }

.nav-links { display: flex; align-items: center; gap: 2px; margin-left: 2px; }
.nav-links a {
  padding: 6px 10px; border-radius: var(--r-sm); white-space: nowrap; flex: none;
  color: var(--text-2); font-size: 13px; transition: .15s;
}
.nav-links a .ic { border-radius: 6px; }
.nav-links a { display: inline-flex; align-items: center; gap: 6px; }
.nav-links a:hover { color: var(--text); background: var(--panel-2); }
.nav-links a.on { color: var(--text); background: var(--panel-2); box-shadow: 0 2px 10px rgba(96,90,180,.1); }
.nav-links a.cta { color: var(--acc); font-weight: 500; }

.nav-search {
  margin-left: auto; display: flex; align-items: center; gap: 8px;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 99px; padding: 6px 14px; width: 210px; flex: none;
  transition: .18s;
}
@media (max-width: 1080px) { .nav-search { display: none; } }
.nav-search:focus-within { border-color: var(--border-2); background: var(--panel-2); }
.nav-search input {
  background: none; border: 0; outline: 0; color: var(--text);
  font-size: 13px; width: 100%; font-family: inherit;
}
.nav-search input::placeholder { color: var(--text-3); }
.nav-search svg { flex: none; opacity: .5; }

.nav-right { display: flex; align-items: center; gap: 10px; }

/* ---------------------------------------------------------- 按钮 */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 16px; border-radius: var(--r-sm); border: 1px solid var(--border-2);
  background: var(--panel); color: var(--text);
  font-size: 13px; font-weight: 500; transition: .16s; white-space: nowrap;
}
.btn:hover { background: var(--panel-2); border-color: var(--border-2); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }

.btn-primary {
  background: linear-gradient(135deg, var(--acc), var(--acc-2));
  border-color: transparent; color: #fff;
  box-shadow: 0 6px 18px rgba(124, 108, 255, .32);
}
.btn-primary:hover { filter: brightness(1.06); box-shadow: 0 8px 22px rgba(124, 108, 255, .4); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--panel); color: var(--text); border-color: transparent; }
.btn-sm { padding: 6px 11px; font-size: 12px; }
.btn-lg { padding: 12px 22px; font-size: 14px; border-radius: var(--r-md); }
.btn-block { width: 100%; }

/* ---------------------------------------------------------- 首页 hero */

.hero { padding: 84px 0 56px; text-align: center; }
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 13px 5px 9px; border-radius: 99px;
  background: var(--panel); border: 1px solid var(--border);
  font-size: 12px; color: var(--text-2); margin-bottom: 26px;
}
.pill i { width: 6px; height: 6px; border-radius: 99px; background: var(--ok); display: block; }

.hero h1 {
  font-size: clamp(32px, 5.4vw, 62px);
  line-height: 1.08; letter-spacing: -.032em; font-weight: 600;
  margin: 0 auto 20px; max-width: 15em;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(120deg, var(--acc), var(--acc-2));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero p.sub {
  font-size: clamp(14px, 1.5vw, 17px); color: var(--text-2);
  max-width: 44em; margin: 0 auto 34px; line-height: 1.65;
}

.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.stat-row {
  display: flex; justify-content: center; gap: 54px; flex-wrap: wrap;
  margin-top: 52px; padding-top: 34px; border-top: 1px solid var(--border);
}
.stat b { display: block; font-size: 27px; font-weight: 600; letter-spacing: -.02em; }
.stat span { font-size: 12px; color: var(--text-3); }

/* ---------------------------------------------------------- 版块 */

.sec { padding: 62px 0; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.sec-head h2 { font-size: 25px; font-weight: 600; letter-spacing: -.02em; margin: 0 0 6px; }
.sec-head p { margin: 0; color: var(--text-2); font-size: 13.5px; }
.eyebrow { font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--acc); margin-bottom: 10px; font-weight: 500; }

/* ---------------------------------------------------------- 视频卡片 */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(232px, 1fr));
  gap: 16px;
}
.grid.wide { grid-template-columns: repeat(auto-fill, minmax(288px, 1fr)); }

.card {
  position: relative; border-radius: var(--r-md); overflow: hidden;
  background: var(--panel); border: 1px solid var(--border);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  box-shadow: var(--glass-shadow);
  cursor: pointer; transition: .2s;
}
.card:hover { border-color: var(--border-2); transform: translateY(-2px); box-shadow: 0 16px 40px rgba(96,90,180,.18); }
.card-media { position: relative; background: #000; overflow: hidden; }
.card-media.portrait  { aspect-ratio: 9 / 16; }
.card-media.landscape { aspect-ratio: 16 / 9; }
.card-media.square    { aspect-ratio: 1 / 1; }
.card-media img, .card-media video {
  width: 100%; height: 100%; object-fit: cover;
  transition: opacity .3s;
}
.card-media video { position: absolute; inset: 0; opacity: 0; }
.card:hover .card-media video { opacity: 1; }

.card-badge {
  position: absolute; top: 8px; left: 8px; z-index: 2;
  padding: 3px 7px; border-radius: 5px; font-size: 10.5px; font-weight: 500;
  background: rgba(0,0,0,.62); backdrop-filter: blur(6px); color: #fff;
  border: 1px solid rgba(255,255,255,.14);
}
.card-dur {
  position: absolute; bottom: 8px; right: 8px; z-index: 2;
  padding: 2px 6px; border-radius: 5px; font-size: 10.5px;
  background: rgba(0,0,0,.68); color: #fff; font-variant-numeric: tabular-nums;
}
.card-body { padding: 10px 11px 11px; }
.card-prompt {
  font-size: 12px; line-height: 1.5; color: var(--text-2);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; margin-bottom: 9px; min-height: 36px;
}
.card-foot { display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--text-3); }
.avatar {
  width: 18px; height: 18px; border-radius: 99px; flex: none;
  background: linear-gradient(140deg, var(--acc), var(--acc-2));
  display: grid; place-items: center; font-size: 9px; color: #fff; font-weight: 600;
}
.card-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 9em; }
.card-metric { margin-left: auto; display: flex; gap: 9px; font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------- 标签 */

.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  padding: 5px 11px; border-radius: 99px; font-size: 12px;
  background: var(--panel); border: 1px solid var(--border);
  color: var(--text-2); transition: .15s; cursor: pointer; white-space: nowrap;
}
.chip:hover { color: var(--text); border-color: var(--border-2); }
.chip.on { background: var(--acc-soft); border-color: var(--acc-line); color: var(--acc); font-weight: 500; }
.chip small { opacity: .55; margin-left: 5px; font-size: 10.5px; }

.tag-inline {
  display: inline-block; padding: 3px 9px; border-radius: 99px; font-size: 11.5px;
  background: var(--panel-2); color: var(--text-2); border: 1px solid var(--border);
  margin: 0 6px 6px 0;
}
.tag-inline.on { background: var(--acc-soft); color: var(--acc); border-color: var(--acc-line); }

/* ---------------------------------------------------------- 作品集工具条 */

.toolbar {
  position: sticky; top: var(--nav-h); z-index: 20;
  padding: 14px 0; margin-bottom: 8px;
  background: linear-gradient(180deg, rgba(232,234,246,.9) 55%, rgba(232,234,246,0));
  backdrop-filter: blur(12px);
}
.toolbar-in { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.seg { display: flex; background: var(--panel); border: 1px solid var(--border); border-radius: 99px; padding: 3px; }
.seg button {
  padding: 5px 15px; border-radius: 99px; border: 0; background: none;
  color: var(--text-2); font-size: 12.5px; transition: .15s;
}
.seg button.on { background: #fff; color: var(--text); font-weight: 500; box-shadow: 0 2px 8px rgba(96,90,180,.14); }

.tagbar { display: flex; gap: 7px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.tagbar::-webkit-scrollbar { display: none; }

/* ---------------------------------------------------------- 单条作品页 */

.detail { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(320px, 1fr); gap: 26px; padding-top: 26px; }
@media (max-width: 980px) { .detail { grid-template-columns: 1fr; } }

.player-shell {
  position: relative; border-radius: var(--r-lg); overflow: hidden;
  background: #000; border: 1px solid var(--border);
}
.player-shell video { width: 100%; max-height: 74vh; background: #000; }

.detail-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

.pane {
  background: var(--panel); border: 1px solid var(--border);
  backdrop-filter: blur(20px) saturate(165%);
  -webkit-backdrop-filter: blur(20px) saturate(165%);
  box-shadow: var(--glass-shadow);
  border-radius: var(--r-lg); padding: 16px;
}
.pane-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.pane-head h3 {
  margin: 0; font-size: 13px; font-weight: 600; color: var(--text); letter-spacing: .02em;
  display: inline-flex; align-items: center; gap: 8px;
}
.pane-head h3 .ic { filter: drop-shadow(0 3px 7px rgba(96, 90, 180, .18)); }

.prompt-box {
  font-size: 13px; line-height: 1.75; color: var(--text);
  white-space: pre-wrap; word-break: break-word;
  max-height: 340px; overflow-y: auto;
  background: var(--inset); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 14px;
}
.prompt-box.tall { max-height: 560px; }
.prompt-box em {
  font-style: normal; color: var(--acc); font-weight: 500;
}

.meta-list { display: flex; flex-direction: column; gap: 0; }
.meta-row {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 12.5px;
}
.meta-row:last-child { border-bottom: 0; }
.meta-row span { color: var(--text-3); }
.meta-row b { font-weight: 500; color: var(--text); font-variant-numeric: tabular-nums; }
.meta-row b.mono { font-family: var(--mono); font-size: 11.5px; }

.author-row { display: flex; align-items: center; gap: 11px; }
.author-row .avatar { width: 36px; height: 36px; font-size: 14px; }

/* ---------------------------------------------------------- 创作台 */

.studio { display: grid; grid-template-columns: minmax(0, 1fr) 322px; gap: 22px; padding-top: 26px; }
@media (max-width: 1000px) { .studio { grid-template-columns: 1fr; } }

.field { margin-bottom: 15px; }
.field > label { display: block; font-size: 12px; color: var(--text-2); margin-bottom: 7px; font-weight: 500; }
.input, .textarea, .select {
  width: 100%; background: var(--inset); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--r-sm);
  padding: 10px 12px; font-size: 13px; font-family: inherit; outline: 0; transition: .15s;
}
.input:focus, .textarea:focus, .select:focus { border-color: var(--acc-line); background: rgba(var(--w), .9); }
.textarea { resize: vertical; min-height: 132px; line-height: 1.7; }
.textarea.tall { min-height: 240px; }
.select { appearance: none; cursor: pointer; }
.select option { background: #fff; color: var(--text); }

.seg-sm { display: flex; gap: 4px; background: var(--inset); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 3px; }
.seg-sm button {
  flex: 1; padding: 6px 8px; border: 0; border-radius: 6px; background: none;
  color: var(--text-2); font-size: 12px; transition: .15s;
}
.seg-sm button.on { background: #fff; color: var(--text); font-weight: 500; box-shadow: 0 2px 8px rgba(96,90,180,.14); }

.preset {
  display: flex; gap: 9px; padding: 10px; border-radius: var(--r-sm);
  background: var(--panel); border: 1px solid var(--border);
  cursor: pointer; transition: .15s; margin-bottom: 8px;
}
.preset:hover { border-color: var(--border-2); background: var(--panel-2); }
.preset-thumb { width: 42px; height: 56px; border-radius: 6px; object-fit: cover; background: #000; flex: none; }
.preset-t { font-size: 12px; line-height: 1.45; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.preset-t b { color: var(--text); font-weight: 500; }

.notice {
  display: flex; gap: 10px; padding: 12px 14px; border-radius: var(--r-md);
  background: var(--red-soft); border: 1px solid var(--red-line);
  font-size: 12.5px; color: #C13B54; line-height: 1.6;
}
.notice.info { background: var(--acc-soft); border-color: var(--acc-line); color: #5747D6; }
.notice b { color: inherit; font-weight: 600; }

/* ---------------------------------------------------------- 开发者页 */

.code {
  font-family: var(--mono); font-size: 12px; line-height: 1.7;
  background: rgba(var(--w), .72); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 14px 16px; overflow-x: auto;
  color: #3A3A52; white-space: pre;
}
.code .k { color: var(--acc); }
.code .s { color: #1E7E4A; }
.code .c { color: var(--text-3); }

.endpoint {
  display: flex; align-items: center; gap: 11px; padding: 11px 14px;
  border-radius: var(--r-md); background: var(--panel); border: 1px solid var(--border);
  margin-bottom: 9px; font-size: 12.5px; flex-wrap: wrap;
}
.verb {
  font-family: var(--mono); font-size: 10.5px; font-weight: 600; letter-spacing: .04em;
  padding: 3px 7px; border-radius: 4px; background: rgba(53,196,106,.16); color: var(--ok); flex: none;
}
.verb.post { background: rgba(255,75,75,.16); color: var(--red); }
.endpoint code { font-family: var(--mono); font-size: 12px; color: var(--text); }
.endpoint .desc { color: var(--text-3); margin-left: auto; }

.table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.table th, .table td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--border); }
.table th { color: var(--text-3); font-weight: 500; font-size: 11.5px; letter-spacing: .03em; }
.table td { color: var(--text-2); }
.table td:first-child { color: var(--text); font-family: var(--mono); font-size: 11.5px; }
.table tr:last-child td { border-bottom: 0; }

/* ---------------------------------------------------------- 杂项 */

.sk { border-radius: var(--r-md); background: var(--panel); border: 1px solid var(--border); }
.sk-anim {
  background: linear-gradient(90deg, var(--panel) 0%, var(--panel-2) 50%, var(--panel) 100%);
  background-size: 200% 100%; animation: sk 1.3s linear infinite;
}
@keyframes sk { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

.loading { text-align: center; padding: 54px 0; color: var(--text-3); font-size: 13px; }

.empty { text-align: center; padding: 76px 20px; color: var(--text-3); }
.empty b { display: block; color: var(--text-2); font-size: 15px; margin-bottom: 8px; font-weight: 500; }

.toast-host { position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 9px; align-items: center; }
.toast {
  padding: 10px 17px; border-radius: 99px; font-size: 12.5px;
  background: rgba(var(--w), .9); border: 1px solid var(--border-2);
  backdrop-filter: blur(14px); box-shadow: 0 10px 30px rgba(96,90,180,.22);
  color: var(--text);
  animation: tin .26s ease;
}
.toast.err { border-color: var(--red-line); color: var(--red); }
@keyframes tin { from { opacity: 0; transform: translateY(10px); } }

.banner {
  padding: 9px 14px; font-size: 12px; text-align: center;
  background: rgba(232,179,58,.1); color: var(--warn); border-bottom: 1px solid rgba(232,179,58,.25);
}

.foot { border-top: 1px solid var(--border); margin-top: 60px; padding: 34px 0 60px; color: var(--text-3); font-size: 12.5px; }
.foot-in { display: flex; justify-content: space-between; gap: 22px; flex-wrap: wrap; }
.foot a:hover { color: var(--text-2); }
.foot-brand { color: var(--text-2); font-weight: 500; margin-bottom: 7px; }

/* ============================================================
   新增组件：上传 / 互动 / 进度 / 我的生成 / 合成
   ============================================================ */

/* ---------- 提示条 ---------- */
.notice.warn {
  border-color: var(--red-line);
  background: var(--red-soft);
}
.notice.warn b { color: var(--red); }
.notice code {
  font-family: var(--mono);
  font-size: 11.5px;
  padding: 1px 5px;
  border-radius: 5px;
  background: rgba(38, 38, 58, .08);
}

/* ---------- 参考图上传 ---------- */
.up-row { display: flex; gap: 12px; flex-wrap: wrap; }
.up-slot {
  position: relative;
  width: 132px; height: 132px;
  border: 1px dashed var(--border-2);
  border-radius: var(--r-md);
  overflow: hidden;
  cursor: pointer;
  background: var(--panel);
  transition: border-color .18s, background .18s;
}
.up-slot:hover { border-color: var(--acc-line); background: var(--panel-2); }
.up-slot.filled { border-style: solid; }
.up-slot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.up-ph {
  width: 100%; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; color: var(--text-3);
}
.up-ph span { font-size: 22px; line-height: 1; }
.up-ph em { font-style: normal; font-size: 11.5px; }
.up-del {
  position: absolute; top: 6px; right: 6px;
  width: 22px; height: 22px; border-radius: 50%;
  border: none; cursor: pointer;
  background: rgba(0, 0, 0, .62); color: #fff;
  font-size: 14px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
.up-del:hover { background: var(--red); }

/* ---------- 小按钮 ---------- */
.btn-xs {
  padding: 3px 9px;
  font-size: 11.5px;
  border-radius: 6px;
}
.btn.danger, .btn-xs.danger {
  color: var(--red);
  border-color: var(--red-line);
}
.btn.danger:hover, .btn-xs.danger:hover { background: var(--red-soft); }

/* ---------- 卡片徽章 ---------- */
.card-badge.mine {
  background: linear-gradient(135deg, var(--acc), var(--acc-2));
  color: #fff;
  left: auto; right: 8px;
}
.card-badge.status-queued    { background: rgba(232, 179, 58, .9); }
.card-badge.status-processing{ background: rgba(232, 179, 58, .9); }
.card-badge.status-failed    { background: rgba(255, 75, 75, .9); }

/* ---------- 我的生成：卡片下操作条 ---------- */
.mine-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px;
  border-top: 1px solid var(--border);
}
.mine-status {
  font-size: 11px; padding: 2px 7px; border-radius: 5px;
  background: var(--panel-2); color: var(--text-2);
  margin-right: auto;
}
.mine-status.s-succeeded { color: var(--ok); }
.mine-status.s-failed    { color: var(--red); }
.mine-status.s-processing, .mine-status.s-queued { color: var(--warn); }
.mine-err {
  padding: 7px 10px;
  font-size: 11px; color: var(--red);
  background: var(--red-soft);
  border-top: 1px solid var(--border);
  word-break: break-all;
  max-height: 54px; overflow: hidden;
}

/* ---------- 详情页互动条 ---------- */
.act-bar {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-top: 12px;
}
.act {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 13px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--panel);
  color: var(--text-2);
  font-size: 12.5px;
  cursor: pointer;
  transition: all .16s;
}
.act:hover { border-color: var(--border-2); color: var(--text); }
.act span { font-size: 13px; line-height: 1; }
.act.on { color: var(--acc); border-color: var(--acc-line); background: var(--acc-soft); }
.act.danger:hover { color: var(--red); border-color: var(--red-line); }

/* ---------- 生成进度 ---------- */
.prog-line {
  height: 4px; border-radius: 2px;
  background: var(--panel-2);
  overflow: hidden;
}
.prog-bar {
  height: 100%; width: 35%;
  border-radius: 2px;
  background: var(--warn);
  transition: width .4s ease;
}
.prog-bar.succeeded { width: 100%; background: var(--ok); }
.prog-bar.failed    { width: 100%; background: var(--red); }
.prog-bar.queued, .prog-bar.processing {
  animation: progslide 1.4s ease-in-out infinite;
}
@keyframes progslide {
  0%   { margin-left: -35%; }
  100% { margin-left: 100%; }
}

/* ---------- 合成页 ---------- */
.compose {
  display: grid;
  grid-template-columns: 1fr 372px;
  gap: 18px;
  margin-top: 16px;
  align-items: start;
}
.compose > aside { position: sticky; top: calc(var(--nav-h) + 16px); }

.pool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 10px;
  max-height: 460px;
  overflow-y: auto;
  padding-right: 4px;
}
.pool-item {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  overflow: hidden;
  background: none;
  padding: 0; cursor: pointer;
  transition: border-color .16s, transform .16s;
}
.pool-item:hover { transform: translateY(-2px); border-color: var(--border-2); }
.pool-item.on { border-color: var(--acc); box-shadow: 0 0 0 1px var(--acc); }
.pool-item img { width: 100%; aspect-ratio: 9/13; object-fit: cover; display: block; }
.pool-n {
  display: block; padding: 5px 6px;
  font-size: 10.5px; color: var(--text-3); text-align: left;
  line-height: 1.35;
}
.pool-tick {
  position: absolute; top: 5px; right: 5px;
  width: 19px; height: 19px; border-radius: 50%;
  background: linear-gradient(135deg, var(--acc), var(--acc-2)); color: #fff;
  font-size: 11px;
  display: flex; align-items: center; justify-content: center;
}

.clip-row {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 8px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  margin-bottom: 7px;
}
.clip-i {
  width: 18px; height: 18px; flex: none;
  border-radius: 50%;
  background: var(--panel-2); color: var(--text-2);
  font-size: 10.5px;
  display: flex; align-items: center; justify-content: center;
}
.clip-row img { width: 34px; height: 46px; object-fit: cover; border-radius: 4px; flex: none; }
.clip-t {
  flex: 1; min-width: 0;
  font-size: 11.5px; color: var(--text-2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.clip-d { font-size: 11px; color: var(--text-3); flex: none; }
.clip-btns { display: flex; gap: 3px; flex: none; }
.clip-btns button {
  width: 22px; height: 22px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--panel);
  color: var(--text-2);
  cursor: pointer; font-size: 11px; line-height: 1;
}
.clip-btns button:hover:not(:disabled) { color: var(--text); border-color: var(--border-2); }
.clip-btns button:disabled { opacity: .35; cursor: default; }

.saved-row {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.saved-row:last-child { border-bottom: none; }

.play-stage {
  background: #000;
  border-radius: var(--r-md);
  overflow: hidden;
  display: flex; justify-content: center;
}
.play-stage video { max-height: 480px; width: auto; max-width: 100%; display: block; }

/* ---------- 输入框 ---------- */
.input {
  padding: 7px 11px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--panel);
  color: var(--text);
  font-size: 12.5px;
  font-family: inherit;
  outline: none;
}
.input:focus { border-color: var(--acc-line); }

/* ---------- 窄屏 ---------- */
@media (max-width: 1080px) {
  .compose { grid-template-columns: 1fr; }
  .compose > aside { position: static; }
}

/* ============================================================
   素材台：图片资产生成 + 资产库
   ============================================================ */

.assets {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 18px;
  margin-top: 16px;
  align-items: start;
}
.assets > aside { position: sticky; top: calc(var(--nav-h) + 16px); }

.lbl {
  font-size: 11.5px;
  color: var(--text-3);
  align-self: center;
}

.asset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(126px, 1fr));
  gap: 10px;
  max-height: 520px;
  overflow-y: auto;
  padding-right: 4px;
}
.asset-card {
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--panel);
  transition: border-color .16s, transform .16s;
}
.asset-card:hover { border-color: var(--border-2); transform: translateY(-2px); }
.asset-img {
  position: relative;
  aspect-ratio: 1/1;
  background: var(--panel-2);
  overflow: hidden;
}
.asset-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.asset-kind {
  position: absolute; top: 5px; left: 5px;
  font-size: 10px; padding: 2px 6px; border-radius: 5px;
  background: rgba(0, 0, 0, .6); color: #fff;
}
.asset-group {
  position: absolute; top: 5px; right: 5px;
  font-size: 10px; padding: 2px 6px; border-radius: 5px;
  background: linear-gradient(135deg, var(--acc), var(--acc-2)); color: #fff;
  max-width: 62px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.asset-name {
  padding: 6px 7px 2px;
  font-size: 11.5px; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.asset-meta {
  padding: 0 7px 6px;
  font-size: 10.5px; color: var(--text-3);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.asset-acts {
  display: flex; gap: 4px; flex-wrap: wrap;
  padding: 6px 7px;
  border-top: 1px solid var(--border);
}

/* ---------- 资产选择浮层（创作台里选参考图）---------- */
.asset-picker {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(70, 64, 120, .35);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.asset-picker-in {
  width: min(720px, 100%);
  max-height: 86vh; overflow-y: auto;
  background: rgba(244, 245, 251, .92);
  backdrop-filter: blur(22px) saturate(160%);
  border: 1px solid var(--border-2);
  border-radius: var(--r-md);
  padding: 16px;
  box-shadow: 0 24px 60px rgba(96, 90, 180, .25);
}

@media (max-width: 1080px) {
  .assets { grid-template-columns: 1fr; }
  .assets > aside { position: static; }
}

/* ============================================================
   导演编剧台
   ============================================================ */
.dir-grid {
  display: grid;
  grid-template-columns: 400px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  padding-top: 22px;
}
@media (max-width: 1080px) { .dir-grid { grid-template-columns: 1fr; } }

/* 主模式选择 */
.dir-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.mode-btn {
  text-align: left;
  padding: 9px 11px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--inset);
  color: var(--text-2);
  display: flex; flex-direction: column; gap: 2px;
  transition: border-color .15s, background .15s;
}
.mode-btn:hover { border-color: var(--border-2); background: rgba(var(--w), .85); }
.mode-btn b { font-size: 12.5px; font-weight: 500; color: var(--text); }
.mode-btn em { font-style: normal; font-size: 10.5px; color: var(--text-3); }
.mode-btn.on { border-color: var(--acc-line); background: var(--acc-soft); }
.mode-btn.on b { color: var(--acc); }

/* 素材映射行 */
.asset-row {
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 9px 10px;
  margin-bottom: 9px;
  background: var(--inset);
}
.asset-row .input { padding: 6px 9px; font-size: 12px; }
.asset-row .select { padding: 6px 8px; font-size: 12px; }

/* 分镜表 */
.beat {
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 10px 11px;
  margin-bottom: 10px;
  background: var(--inset);
}
.beat-no {
  width: 21px; height: 21px; flex: none;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--panel-2);
  font-size: 11px; color: var(--text-2);
  font-variant-numeric: tabular-nums;
}
.beat-t { width: 58px; flex: none; padding: 5px 7px !important; font-size: 12px; text-align: center; }
.beat .input { padding: 6px 9px; font-size: 12px; }
.beat .textarea { min-height: 0; font-size: 12.5px; line-height: 1.6; padding: 7px 9px; }

/* 诊断 */
.diag {
  display: flex; gap: 9px; align-items: flex-start;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 12.5px;
}
.diag:last-child { border-bottom: 0; }
.diag-ico {
  width: 17px; height: 17px; flex: none;
  display: grid; place-items: center;
  border-radius: 50%;
  font-size: 11px; font-weight: 700;
  margin-top: 1px;
}
.diag.err  .diag-ico { background: var(--red-soft); color: var(--red); }
.diag.warn .diag-ico { background: rgba(232, 179, 58, .16); color: var(--warn); }
.diag.ok   .diag-ico { background: rgba(53, 196, 106, .16); color: var(--ok); }
.diag-msg { color: var(--text); line-height: 1.55; }
.diag.err .diag-msg { color: #C13B54; }
.diag-fix { color: var(--text-3); font-size: 11.5px; margin-top: 3px; }

/* 导演方案键值行 */
.kv {
  display: grid; grid-template-columns: 96px minmax(0, 1fr);
  gap: 10px; padding: 7px 0;
  border-bottom: 1px solid var(--border);
  font-size: 12.5px;
}
.kv:last-child { border-bottom: 0; }
.kv > span { color: var(--text-3); }
.kv > b { font-weight: 400; color: var(--text-2); line-height: 1.65; }

/* 输出框 */
.out-box {
  background: rgba(var(--w), .72);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 12px 13px;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.75;
  color: var(--text-2);
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 460px;
  overflow-y: auto;
}

/* 逐条分镜出片 */
.shot-row {
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 9px 11px;
  margin-bottom: 8px;
  background: var(--inset);
}
.shot-h { display: flex; align-items: center; gap: 9px; font-size: 12.5px; }
.shot-p {
  font-family: var(--mono); font-size: 11px;
  color: var(--text-3); margin-top: 5px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* 转场词表 */
.trans-box { display: flex; flex-direction: column; gap: 6px; }
.trans-row {
  display: grid; grid-template-columns: 82px minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 10px; font-size: 11.5px;
  padding: 5px 0; border-bottom: 1px solid var(--border);
}
.trans-row:last-child { border-bottom: 0; }
.trans-row b { font-weight: 500; color: var(--text-2); }
@media (max-width: 640px) { .trans-row { grid-template-columns: 1fr; gap: 2px; } }
.seg-sm button { white-space: nowrap; flex: 1; }

/* 配音 · 音频驱动分镜 */
.vo-line {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 9px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  margin-bottom: 7px;
  background: var(--inset);
  font-size: 12px;
}
.vo-line .vo-text {
  flex: 1; min-width: 0;
  color: var(--text-2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.vo-line audio { flex: none; filter: saturate(.8); }

/* ============================================================
   智能助理（右下角悬浮）
   ============================================================ */
#asstFab {
  position: fixed; right: 22px; bottom: 22px; z-index: 95;
  width: 54px; height: 54px; border-radius: 50%;
  border: 1px solid rgba(var(--w), .8);
  cursor: pointer; display: grid; place-items: center;
  background: linear-gradient(140deg, #7C6CFF, #FF6CAB);
  box-shadow: 0 10px 28px rgba(124, 108, 255, .38), 0 2px 8px rgba(0, 0, 0, .12);
  transition: transform .18s, box-shadow .18s;
}
#asstFab:hover { transform: translateY(-2px) scale(1.04); box-shadow: 0 14px 34px rgba(124, 108, 255, .46), 0 2px 8px rgba(0, 0, 0, .12); }
#asstFab svg rect { fill: rgba(255,255,255,.18); }   /* 白块融进渐变底 */
#asstFab.on { background: linear-gradient(140deg, #8B8BA3, #55556E); box-shadow: 0 10px 28px rgba(85, 85, 110, .3); }

#asstPanel {
  position: fixed; right: 22px; bottom: 88px; z-index: 94;
  width: min(384px, calc(100vw - 32px));
  height: min(620px, calc(100vh - 130px));
  display: flex; flex-direction: column;
  border-radius: 20px; overflow: hidden;
  background: rgba(var(--w), .72);
  backdrop-filter: blur(26px) saturate(170%);
  -webkit-backdrop-filter: blur(26px) saturate(170%);
  border: 1px solid var(--border-2);
  box-shadow: 0 24px 64px rgba(90, 70, 180, .22), 0 4px 16px rgba(0, 0, 0, .08);
  opacity: 0; transform: translateY(14px) scale(.98); pointer-events: none;
  transition: opacity .2s, transform .2s;
}
#asstPanel.on { opacity: 1; transform: none; pointer-events: auto; }

.asst-head {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 14px 11px;
  border-bottom: 1px solid var(--border-2);
  background: rgba(var(--w), .4);
}
.asst-title { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 8px; }
.asst-title b { font-size: 14px; color: var(--text); font-weight: 600; }
.asst-title span { font-size: 11px; color: var(--text-3); background: rgba(124, 108, 255, .1); padding: 2px 8px; border-radius: 99px; }
.asst-clear {
  border: 1px solid var(--border); background: rgba(var(--w), .6);
  color: var(--text-3); font-size: 11px; padding: 4px 10px; border-radius: 99px; cursor: pointer;
}
.asst-clear:hover { color: var(--red); border-color: var(--red-line); }

.asst-list { flex: 1; overflow-y: auto; padding: 14px 14px 6px; }
.asst-hello { font-size: 12.5px; color: var(--text-3); line-height: 1.7; padding: 10px 12px; }
.asst-row { display: flex; margin-bottom: 10px; }
.asst-row.me { justify-content: flex-end; }
.asst-msg {
  max-width: 86%; padding: 9px 12px; border-radius: 14px;
  font-size: 12.5px; line-height: 1.7; word-break: break-word;
}
.asst-msg.ai { background: rgba(var(--w), .85); color: var(--text); border: 1px solid var(--border-2); border-bottom-left-radius: 4px; box-shadow: 0 2px 8px rgba(90, 70, 180, .06); }
.asst-msg.me { background: linear-gradient(140deg, #7C6CFF, #9D6CFF); color: #fff; border-bottom-right-radius: 4px; }
.asst-msg.err { background: var(--red-soft); color: var(--red-line); border: 1px solid var(--red-line); }
.asst-msg code { font-family: var(--mono); font-size: 11px; background: rgba(124, 108, 255, .1); color: #5B4BD4; padding: 1px 5px; border-radius: 5px; }
.asst-msg.me code { background: rgba(255,255,255,.2); color: #fff; }
.asst-msg b { font-weight: 600; }
.asst-typing { display: flex; gap: 4px; align-items: center; padding: 12px 14px; }
.asst-typing i { width: 6px; height: 6px; border-radius: 50%; background: #B8B0E8; animation: asstblink 1.2s infinite; }
.asst-typing i:nth-child(2) { animation-delay: .18s; }
.asst-typing i:nth-child(3) { animation-delay: .36s; }
@keyframes asstblink { 0%, 70%, 100% { opacity: .35; transform: none; } 35% { opacity: 1; transform: translateY(-3px); } }

.asst-quick { display: flex; gap: 6px; padding: 6px 12px 8px; flex-wrap: wrap; }
.asst-quick button {
  border: 1px solid var(--border); background: rgba(var(--w), .55);
  color: var(--text-2); font-size: 11px; padding: 5px 10px; border-radius: 99px; cursor: pointer;
  transition: .15s;
}
.asst-quick button:hover { color: #5B4BD4; border-color: rgba(124, 108, 255, .5); background: rgba(124, 108, 255, .08); }

.asst-input {
  display: flex; align-items: flex-end; gap: 8px;
  padding: 10px 12px 12px;
  border-top: 1px solid var(--border-2);
  background: rgba(var(--w), .4);
}
.asst-input textarea {
  flex: 1; resize: none; border: 1px solid var(--border); border-radius: 12px;
  background: rgba(var(--w), .75); color: var(--text);
  font-family: inherit; font-size: 12.5px; line-height: 1.5;
  padding: 9px 11px; outline: 0; max-height: 96px;
}
.asst-input textarea:focus { border-color: rgba(124, 108, 255, .55); }
.asst-input button {
  flex: none; width: 36px; height: 36px; border-radius: 12px; border: 0; cursor: pointer;
  background: linear-gradient(140deg, #7C6CFF, #FF6CAB);
  display: grid; place-items: center;
  box-shadow: 0 4px 12px rgba(124, 108, 255, .3);
  transition: .15s;
}
.asst-input button:hover { transform: translateY(-1px); }
.asst-input button:disabled { opacity: .5; cursor: not-allowed; }
.asst-input button svg rect { fill: rgba(255,255,255,.18); }

/* ============================================================
   模型接入设置窗口
   ============================================================ */
#navSettings { display: inline-flex; align-items: center; gap: 6px; }

/* 主题切换：圆形图标按钮 */
.theme-btn {
  width: 32px; height: 32px; padding: 0; border-radius: 50%;
  display: inline-grid; place-items: center;
  color: var(--text-2); transition: .15s;
}
.theme-btn:hover { color: var(--acc); border-color: var(--acc-line); transform: rotate(15deg); }

/* 积分胶囊 */
.credits-pill {
  display: inline-flex; align-items: center; gap: 5px;
  color: var(--acc); border-color: var(--acc-line);
  background: var(--acc-soft); font-variant-numeric: tabular-nums;
}
.credits-pill:hover { border-color: var(--acc); }
#navSettings svg rect { background: none; }

#stModal {
  position: fixed; inset: 0; z-index: 96;
  background: rgba(60, 50, 110, .32);
  /* Closed overlays must not retain a full-screen backdrop compositing layer. */
  visibility: hidden; backdrop-filter: none;
  display: grid; place-items: center;
  opacity: 0; pointer-events: none; transition: opacity .18s;
}
#stModal.on { visibility: visible; backdrop-filter: blur(6px); opacity: 1; pointer-events: auto; }

.st-panel {
  width: min(640px, calc(100vw - 32px));
  max-height: min(720px, calc(100vh - 48px));
  display: flex; flex-direction: column;
  border-radius: 20px; overflow: hidden;
  background: rgba(var(--w), .88);
  backdrop-filter: blur(28px) saturate(170%);
  border: 1px solid var(--border-2);
  box-shadow: 0 32px 80px rgba(60, 45, 140, .28);
  transform: translateY(12px) scale(.98); transition: transform .18s;
}
#stModal.on .st-panel { transform: none; }

.st-head {
  display: flex; align-items: center; gap: 11px;
  padding: 15px 16px 13px;
  border-bottom: 1px solid rgba(124, 108, 255, .12);
}
.st-head > div { flex: 1; min-width: 0; }
.st-head b { display: block; font-size: 15px; color: var(--text); }
.st-head span { font-size: 11.5px; color: var(--text-3); }
.st-x {
  width: 30px; height: 30px; border-radius: 10px; border: 1px solid var(--border);
  background: rgba(var(--w), .6); color: var(--text-3); cursor: pointer;
}
.st-x:hover { color: var(--text); border-color: var(--border-2); }

.st-body { flex: 1; overflow-y: auto; padding: 14px 16px; }

.st-cap {
  border: 1px solid var(--border); border-radius: 14px;
  padding: 12px 13px; margin-bottom: 12px;
  background: rgba(var(--w), .55);
}
.st-cap-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.st-cap-head b { font-size: 13.5px; color: var(--text); font-weight: 600; }
.st-cap-head em { font-style: normal; font-size: 11.5px; color: var(--text-3); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-dot { width: 8px; height: 8px; border-radius: 50%; background: #C9C7DE; flex: none; }
.st-dot.on { background: #35C46A; box-shadow: 0 0 0 3px rgba(53, 196, 106, .18); }

.st-presets { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.st-presets button {
  border: 1px solid var(--border); background: rgba(var(--w), .65);
  color: var(--text-2); font-size: 11px; padding: 4px 10px; border-radius: 99px; cursor: pointer;
}
.st-presets button:hover { color: #5B4BD4; border-color: rgba(124, 108, 255, .5); background: rgba(124, 108, 255, .08); }

.st-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; }
.st-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.st-field span { font-size: 11px; color: var(--text-3); }
.st-field input, .st-field select {
  border: 1px solid var(--border); border-radius: 9px;
  background: rgba(var(--w), .8); color: var(--text);
  font-family: var(--mono); font-size: 12px;
  padding: 8px 10px; outline: 0; min-width: 0;
}
.st-field input:focus, .st-field select:focus { border-color: rgba(124, 108, 255, .55); }
.st-field input[type="password"] { letter-spacing: .05em; }
.st-cap > .st-field { margin-bottom: 8px; }
.st-grid .st-field:first-child { grid-column: span 2; }

.st-cap-foot { display: flex; align-items: center; gap: 9px; margin-top: 10px; }
.st-test-msg { flex: 1; min-width: 0; font-size: 11.5px; color: var(--text-3); }
.st-test-msg.good { color: #1F9D52; }
.st-test-msg.bad { color: var(--red); }
.st-reset { color: var(--text-3) !important; }
.st-note { margin: 8px 0 0; font-size: 11px; line-height: 1.5; color: var(--text-3); }

.st-foot {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  border-top: 1px solid rgba(124, 108, 255, .12);
}
.st-foot span { flex: 1; min-width: 0; font-size: 12px; color: #1F9D52; }

@media (max-width: 560px) { .st-grid { grid-template-columns: 1fr; } .st-grid .st-field { grid-column: auto; } }

/* ============================================================
   无障碍：键盘焦点、跳转链接、动效偏好
   ============================================================ */

/* 全局可见焦点。用 focus-visible 而不是 focus：
   鼠标点击不该闪出蓝框，键盘 Tab 必须有明确落点。 */
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible,
.card:focus-visible,
.select:focus-visible {
  outline: 2px solid var(--acc);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

/* 跳过导航：Tab 第一下就能直达正文，不用每次穿过 8 个导航项 */
.skip-link {
  position: absolute; left: 12px; top: -70px; z-index: 999;
  padding: 9px 16px;
  border-radius: 0 0 var(--r-md) var(--r-md);
  background: var(--acc); color: #fff;
  font: 600 13px/1 var(--font); text-decoration: none;
  box-shadow: var(--glass-shadow);
  transition: top .18s ease;
}
.skip-link:focus { top: 0; }

/* 屏幕阅读器专用文本 */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* 尊重系统「减弱动态效果」：装饰性动效全部停掉，内容照常 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================================
   RunningHub 运行面板（素材台 → 生成资产 → 来源：RunningHub 应用）
   ============================================================ */

/* 节点参数行：nodeId / 字段名 / 值 / 删除 */
.rh-row {
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 6px;
}
.rh-row .input { font-size: 12px; font-family: var(--mono); }

.rh-empty {
  padding: 10px 12px; font-size: 12.5px; line-height: 1.7;
  color: var(--text-3); text-align: center;
  background: var(--inset);
  border: 1px dashed var(--border);
  border-radius: var(--r-sm);
}

/* 运行结果 */
.rh-out {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px;
}
.rh-thumb {
  display: block; width: 92px; height: 92px; overflow: hidden;
  border-radius: var(--r-sm);
  border: 1px solid var(--border-2);
  background: var(--inset);
  box-shadow: 0 2px 10px rgba(96, 90, 180, 0.10);
}
.rh-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rh-file {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 12px; font-size: 12.5px; font-family: var(--mono);
  color: var(--text-2); text-decoration: none;
  background: var(--inset);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
}
.rh-file:hover { color: var(--acc); border-color: var(--acc-line); }

/* 最近运行记录 */
.rh-job {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 7px 10px; margin-bottom: 6px;
  font-size: 12px;
  background: var(--inset);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
}
.rh-badge {
  flex: none; padding: 2px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 600;
  color: var(--text-2); background: rgba(124, 108, 255, 0.12);
}
.rh-badge.ok  { color: var(--ok);  background: rgba(31, 169, 92, 0.13); }
.rh-badge.bad { color: var(--red); background: var(--red-soft); }
.rh-job-id {
  font-family: var(--mono); color: var(--text-2);
  max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.rh-job-time { color: var(--text-3); }
.rh-job a { color: var(--acc); text-decoration: none; }
.rh-job a:hover { text-decoration: underline; }
.rh-job em {
  color: var(--red); font-style: normal;
  max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* Optional professional controls stay out of the default writing flow. */
.prompt-advanced > summary { cursor: pointer; color: var(--text-2); font-size: 13px; padding: 10px 0; }
.prompt-advanced > summary:focus-visible { outline: 2px solid var(--red); outline-offset: 4px; }
[aria-describedby="previewNotice"]:disabled { opacity: .5; cursor: not-allowed; }

html[data-theme="dark"] .seg-sm button.on,
html[data-theme="dark"] .seg button.on { color: var(--bg); }
@media (max-width: 640px) {
  .studio .pane-head, .studio .pane-head .row { flex-wrap: wrap; }
}

.notice.preview-info { color: var(--text-2); background: var(--panel); border-color: var(--border); }
.notice.preview-info b { color: var(--text); }
@media (max-width: 1480px) {
  .nav { height: auto; }
  .nav-in { height: auto; min-height: var(--nav-h); flex-wrap: wrap; gap: 8px; padding-top: 8px; padding-bottom: 8px; }
  .nav-right { margin-left: auto; }
  .nav-links { order: 3; flex: 1 0 100%; max-width: 100%; overflow-x: auto; margin-left: 0; }
  .studio > aside { position: static; }
}
@media (max-width: 640px) {
  .nav-right { flex: 1 1 100%; flex-wrap: wrap; margin-left: 0; gap: 6px; }
}
