/* ============================================================
   AI 创作平台 · 前台样式
   设计基因：淡黄绿→薄荷→淡蓝的水彩渐变底 + 主绿强调 + 玻璃拟态
   布局：通栏公告条 / 左侧 100px 图标竖栏 / 右侧独立滚动的正文区
   全部本地化：无外部字体、无图标库、无 CDN、无位图装饰（hero 环形为内联 SVG）
   ============================================================ */

:root {
  /* 底色与水彩 */
  --bg: #F7FAF0;
  --wash-1: #F4F9DC;   /* 淡黄绿 */
  --wash-2: #DCF1CE;   /* 浅绿 */
  --wash-3: #CFEDE6;   /* 薄荷 */
  --wash-4: #E2F1F7;   /* 淡蓝 */

  /* 面 */
  --surface: #FFFFFF;
  --surface-soft: #F4F8F2;
  --glass: rgba(255, 255, 255, .55);
  --glass-strong: rgba(255, 255, 255, .78);
  --sunken: #EDF3EA;

  /* 字 */
  --ink: #1F2321;
  --ink-2: #5F6B62;
  --ink-3: #9AA79E;
  --ink-4: #C3CCC4;

  /* 品牌绿 */
  --green: #62B96A;
  --green-deep: #3E9A50;
  --green-soft: #E4F5E6;
  --green-line: #CBE8CF;
  --mint: #CFEDE6;

  /* 功能色 */
  --ok: #34B75E;
  --ok-soft: #E6F7EB;
  --warn: #E8A33D;
  --warn-soft: #FDF3E2;
  --bad: #DC4B3E;
  --bad-soft: #FCEAE8;

  --line: #E4ECE3;
  --line-soft: #EEF4ED;

  --sh-1: 0 1px 2px rgba(31, 35, 33, .04);
  --sh-2: 0 6px 20px -8px rgba(31, 35, 33, .12);
  --sh-3: 0 18px 44px -16px rgba(31, 35, 33, .20);
  --sh-glass: 0 8px 30px -12px rgba(74, 122, 92, .18);

  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 30px;

  --rail-w: 100px;
  --announce-h: 46px;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial,
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", "Noto Sans CJK SC", sans-serif;
  --mono: ui-monospace, "SF Mono", Consolas, "JetBrains Mono", Menlo, monospace;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  color: var(--ink);
  font: 14px/1.6 var(--font);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body.no-scroll { overflow: hidden; }

/* 水彩渐变底：四块柔光斑，固定不随滚动 */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(46% 42% at 6% 0%, var(--wash-1) 0%, rgba(244, 249, 220, 0) 68%),
    radial-gradient(52% 46% at 26% 8%, var(--wash-2) 0%, rgba(220, 241, 206, 0) 66%),
    radial-gradient(60% 52% at 72% 2%, var(--wash-3) 0%, rgba(207, 237, 230, 0) 62%),
    radial-gradient(50% 46% at 100% 22%, var(--wash-4) 0%, rgba(226, 241, 247, 0) 66%),
    linear-gradient(180deg, #FAFCF2 0%, var(--bg) 42%, #F5FAF3 100%);
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--green-deep); }
button { font-family: inherit; }
img, video { max-width: 100%; display: block; }
svg { width: 1em; height: 1em; }
[hidden] { display: none !important; }
::selection { background: var(--green-soft); color: var(--ink); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #D3E0D1; border-radius: 99px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: #B9CCB7; background-clip: content-box; }

.wrap { max-width: 1600px; margin: 0 auto; padding: 0 44px; }
.wrap-narrow { max-width: 1040px; margin: 0 auto; padding: 0 44px; }

/* ---------- 图标（内联 SVG sprite） ---------- */
.ic { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.ic-fill { fill: currentColor; stroke: none; }

/* ---------- 顶部公告条 ---------- */
.announce {
  position: relative; z-index: 30;
  height: var(--announce-h);
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: linear-gradient(90deg, #F3F9D6 0%, #E4F5C9 34%, #D8F1CF 60%, #E9F7DC 100%);
  color: #2A3229;
  font-size: 13.5px;
  padding: 0 56px;
}
.announce b { font-weight: 500; }
.announce .sp { color: var(--green-deep); }
.announce-close {
  position: absolute; right: 18px; top: 50%; transform: translateY(-50%);
  width: 28px; height: 28px; border: 0; background: transparent; color: #4E5A4C;
  font-size: 20px; line-height: 1; cursor: pointer; border-radius: 8px;
}
.announce-close:hover { background: rgba(255, 255, 255, .6); color: var(--ink); }

/* ---------- 外壳：左栏 + 右侧滚动 ---------- */
.shell {
  display: flex;
  height: calc(100vh - var(--announce-h));
}
body.no-announce .shell { height: 100vh; }
body.no-announce .announce { display: none; }

/* 左栏 */
.rail {
  position: relative; z-index: 20;
  flex: 0 0 var(--rail-w); width: var(--rail-w);
  display: flex; flex-direction: column; align-items: center;
  padding: 14px 0 22px;
  overflow-y: auto; overflow-x: hidden;
}
.rail::after {
  content: ""; position: absolute; right: 0; top: 12px; bottom: 12px; width: 1px;
  background: linear-gradient(180deg, rgba(255,255,255,0), rgba(255,255,255,.9) 18%, rgba(255,255,255,.9) 82%, rgba(255,255,255,0));
}
.rail-logo { display: block; margin: 6px 0 26px; color: var(--ink); }
.rail-logo svg { width: 38px; height: 38px; }
.rail-nav { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: 1; width: 100%; }
.rail-item {
  width: 80px; padding: 12px 4px 11px; margin: 0 auto;
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  border-radius: 16px; color: var(--ink-2); cursor: pointer;
  transition: background .18s, color .18s, transform .18s;
}
.rail-item svg { width: 25px; height: 25px; }
.rail-item span { font-size: 12px; letter-spacing: .02em; }
.rail-item:hover { background: rgba(255, 255, 255, .72); color: var(--ink); }
.rail-item.on { color: var(--ink); }
.rail-item.on svg { color: var(--green-deep); }
.rail-item.on span { font-weight: 500; }
.rail-foot { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 100%; }

/* 右侧滚动区 */
.main {
  flex: 1 1 auto; min-width: 0;
  overflow-y: auto; overflow-x: hidden;
  position: relative;
}
.main-head {
  position: sticky; top: 0; z-index: 15;
  display: flex; align-items: center; justify-content: flex-end; gap: 10px;
  padding: 10px 28px 0;
  pointer-events: none;
}
.main-head > * { pointer-events: auto; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 40px; padding: 0 22px; border-radius: 999px;
  border: 1px solid var(--ink); background: var(--ink); color: #fff;
  font-size: 13.5px; cursor: pointer; white-space: nowrap; transition: all .16s;
}
.btn:hover { color: #fff; opacity: .9; }
.btn:active { transform: translateY(1px); }
.btn svg { width: 16px; height: 16px; }
.btn-sm { height: 32px; padding: 0 14px; font-size: 13px; }
.btn-lg { height: 46px; padding: 0 28px; font-size: 14.5px; }
.btn-green { background: var(--green); border-color: var(--green); }
.btn-green:hover { color: #fff; background: var(--green-deep); border-color: var(--green-deep); }
.btn-ghost {
  background: rgba(255, 255, 255, .7); border-color: var(--line); color: var(--ink);
  backdrop-filter: blur(8px);
}
.btn-ghost:hover { background: #fff; color: var(--ink); border-color: var(--ink-4); }
.btn-danger { background: var(--bad); border-color: var(--bad); }
.btn-block { width: 100%; }
.btn[disabled], .btn.is-loading { opacity: .45; cursor: not-allowed; pointer-events: none; }
.btn.is-loading { position: relative; color: transparent; }
.btn.is-loading::after {
  content: ""; position: absolute; inset: 0; margin: auto; width: 15px; height: 15px;
  border: 1.5px solid rgba(255, 255, 255, .35); border-top-color: #fff; border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.icon-btn {
  width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); background: rgba(255,255,255,.75); color: var(--ink-2);
  border-radius: 10px; cursor: pointer; transition: all .16s;
}
.icon-btn:hover { color: var(--ink); border-color: var(--ink-4); background: #fff; }
.icon-btn svg { width: 16px; height: 16px; }
.icon-btn.danger:hover { color: var(--bad); border-color: var(--bad); }
.link-btn { border: 0; background: transparent; color: var(--green-deep); cursor: pointer; font-size: 13px; padding: 0; }
.link-btn:hover { text-decoration: underline; }

/* ---------- 表单 ---------- */
.input, .textarea, .select {
  width: 100%; padding: 10px 13px; border: 1px solid var(--line); border-radius: var(--r-sm);
  background: #FCFDFB; color: var(--ink); font-size: 14px; font-family: inherit; outline: none;
  transition: border-color .16s, background .16s, box-shadow .16s;
}
.input:focus, .textarea:focus, .select:focus {
  border-color: var(--green); background: #fff; box-shadow: 0 0 0 3px var(--green-soft);
}
.input::placeholder, .textarea::placeholder { color: var(--ink-3); }
.textarea { line-height: 1.7; resize: vertical; min-height: 96px; }
.select { appearance: none; cursor: pointer; padding-right: 34px;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%);
  background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
}
.field { margin-bottom: 16px; }
.field > label { display: block; font-size: 12.5px; color: var(--ink-2); margin-bottom: 7px; }
.field .tip { font-size: 12px; color: var(--ink-3); margin-top: 6px; }
.field-row { display: flex; gap: 12px; }
.field-row > * { flex: 1; min-width: 0; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13.5px; color: var(--ink-2); }
.check input { width: 16px; height: 16px; accent-color: var(--green); cursor: pointer; }
.switch { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; font-size: 13.5px; }
.switch input { appearance: none; width: 34px; height: 19px; border-radius: 999px; background: #DCE6DA; position: relative; cursor: pointer; transition: background .18s; margin: 0; }
.switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 15px; height: 15px; border-radius: 50%; background: #fff; box-shadow: var(--sh-1); transition: transform .18s; }
.switch input:checked { background: var(--green); }
.switch input:checked::after { transform: translateX(15px); }

/* ---------- 标签 / 徽标 ---------- */
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; background: var(--sunken); color: var(--ink-2); }
.tag-green { background: var(--green-soft); color: #2F7C3D; }
.tag-ok { background: var(--ok-soft); color: #227A3B; }
.tag-warn { background: var(--warn-soft); color: #8A5A00; }
.tag-bad { background: var(--bad-soft); color: #8A1F16; }

/* ---------- 首页 Hero ---------- */
.hero { position: relative; padding: 46px 0 0; }
.hero-inner { position: relative; max-width: 1600px; margin: 0 auto; padding: 0 44px; }
.hero h1 {
  margin: 0 0 26px; font-size: 52px; line-height: 1.26; font-weight: 500;
  letter-spacing: -.01em; max-width: 700px;
}
.hero h1 .l1 { color: #23282A; display: block; }
.hero h1 .l2 { color: var(--green); display: block; }
.hero-art {
  position: absolute; right: 40px; top: -96px; width: 560px; height: 560px;
  pointer-events: none; z-index: 0;
}
.hero-art svg { width: 100%; height: 100%; }
.hero-copy { position: relative; z-index: 1; }

/* ---------- 玻璃输入框（首页核心） ---------- */
.composer {
  position: relative; z-index: 2;
  background: linear-gradient(140deg, rgba(244, 252, 245, .82) 0%, rgba(232, 248, 246, .74) 46%, rgba(238, 250, 238, .80) 100%);
  border: 1px solid rgba(255, 255, 255, .85);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-glass), inset 0 1px 0 rgba(255, 255, 255, .9);
  backdrop-filter: blur(22px) saturate(1.25);
  -webkit-backdrop-filter: blur(22px) saturate(1.25);
  padding: 22px 24px 16px;
  transition: box-shadow .2s, border-color .2s;
}
.composer::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background:
    radial-gradient(34% 40% at 8% 12%, rgba(255, 255, 255, .75), rgba(255, 255, 255, 0) 70%),
    radial-gradient(40% 44% at 96% 90%, rgba(207, 237, 230, .55), rgba(207, 237, 230, 0) 72%);
}
.composer.focus { border-color: rgba(255, 255, 255, 1); box-shadow: var(--sh-glass), 0 0 0 3px rgba(255, 255, 255, .55); }
.composer-top { position: relative; z-index: 1; display: flex; align-items: flex-start; gap: 16px; }
.composer-upload {
  flex: 0 0 68px; width: 68px; height: 68px; border-radius: 18px;
  background: rgba(255, 255, 255, .92); border: 1px solid rgba(255, 255, 255, .9);
  box-shadow: 0 4px 14px -6px rgba(74, 122, 92, .28);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  color: #8C9A90; transition: transform .16s, color .16s;
}
.composer-upload:hover { transform: translateY(-2px); color: var(--green-deep); }
.composer-upload svg { width: 24px; height: 24px; stroke-width: 1.3; }
.composer-area { position: relative; flex: 1 1 auto; min-width: 0; }
.composer-input {
  width: 100%; min-height: 62px; max-height: 240px; border: 0; outline: none; resize: none;
  background: transparent; color: var(--ink); font: 15px/1.75 var(--font); padding: 4px 0 0;
  overflow-y: auto;
}
.composer-input:empty::before { content: attr(data-placeholder); color: #9FADA3; pointer-events: none; }
.composer-spark { position: absolute; color: var(--green); opacity: .5; pointer-events: none; }
.composer-spark svg { width: 18px; height: 18px; }
.composer-spark.s1 { left: 46%; top: 26px; }
.composer-spark.s2 { left: 62%; top: 64px; opacity: .35; }
.composer-spark.s2 svg { width: 14px; height: 14px; }

.composer-bar {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: 6px; margin-top: 14px; flex-wrap: wrap;
}
.pill-select {
  display: inline-flex; align-items: center; gap: 7px;
  height: 34px; padding: 0 12px; border-radius: 999px;
  border: 1px solid transparent; background: transparent; color: #4A5450;
  font-size: 14px; cursor: pointer; transition: background .16s, border-color .16s;
}
.pill-select:hover { background: rgba(255, 255, 255, .75); border-color: rgba(255,255,255,.9); }
.pill-select svg.lead { width: 17px; height: 17px; }
.pill-select svg.chev { width: 13px; height: 13px; color: #97A39A; }
.pill-select .lead.video { color: var(--green); }
.pill-select .lead.model { color: #4A8FE0; }
.pill-select .lead.omni { color: #6E6B7B; }
.pill-select select {
  border: 0; background: transparent; font: inherit; color: inherit; cursor: pointer;
  appearance: none; outline: none; padding-right: 2px; max-width: 210px;
}
.composer-tools { display: flex; align-items: center; gap: 4px; margin-left: 2px; }
.tool-ico {
  width: 34px; height: 34px; border: 0; background: transparent; color: #6D7A72;
  border-radius: 10px; cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background .16s, color .16s; font-size: 17px;
}
.tool-ico:hover { background: rgba(255, 255, 255, .8); color: var(--ink); }
.tool-ico svg { width: 18px; height: 18px; }
.composer-send {
  margin-left: auto; width: 38px; height: 38px; border-radius: 50%;
  border: 0; background: #555B57; color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: background .16s, transform .16s;
}
.composer-send:hover { background: var(--green-deep); }
.composer-send:active { transform: scale(.94); }
.composer-send svg { width: 18px; height: 18px; stroke-width: 1.9; }
.composer-send[disabled] { background: #B9C2BB; cursor: not-allowed; }

/* @ 引用胶囊（插在输入框里） */
.at-chip {
  display: inline-flex; align-items: center; gap: 5px; vertical-align: -4px;
  margin: 0 3px; padding: 1px 8px 1px 3px; border-radius: 999px;
  background: #fff; border: 1px solid var(--green-line); font-size: 13px; color: var(--ink);
  user-select: none; white-space: nowrap; transition: transform .14s, box-shadow .14s;
}
.at-chip:hover { transform: translateY(-1px); box-shadow: var(--sh-1); }
.at-chip .at-thumb {
  width: 19px; height: 19px; border-radius: 50%; overflow: hidden; flex: 0 0 19px;
  background: var(--sunken); display: flex; align-items: center; justify-content: center; color: var(--ink-3);
}
.at-chip .at-thumb img { width: 100%; height: 100%; object-fit: cover; }
.at-chip b { font-weight: 500; }
.at-chip .at-x { border: 0; background: transparent; color: var(--ink-3); cursor: pointer; font-size: 14px; line-height: 1; padding: 0 1px; }
.at-chip .at-x:hover { color: var(--bad); }

/* @ 浮层 */
.at-pop {
  position: absolute; z-index: 40; min-width: 280px; max-height: 300px; overflow-y: auto;
  background: rgba(255, 255, 255, .96); border: 1px solid var(--line); border-radius: var(--r-md);
  box-shadow: var(--sh-3); padding: 6px; backdrop-filter: blur(14px);
}
.at-pop .ap-head { padding: 7px 10px 8px; font-size: 11.5px; color: var(--ink-3); }
.at-pop .ap-item {
  display: flex; align-items: center; gap: 9px; padding: 7px 9px; border-radius: var(--r-sm);
  cursor: pointer; width: 100%; border: 0; background: transparent; text-align: left;
}
.at-pop .ap-item:hover, .at-pop .ap-item.on { background: var(--green-soft); }
.at-pop .ap-thumb { width: 30px; height: 30px; border-radius: 7px; overflow: hidden; flex: 0 0 30px; background: var(--sunken); }
.at-pop .ap-thumb img { width: 100%; height: 100%; object-fit: cover; }
.at-pop .ap-name { flex: 1; min-width: 0; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.at-pop .ap-label { font-family: var(--mono); font-size: 11px; color: var(--green-deep); }

/* ---------- 发现区工具行 ---------- */
.discover-head {
  display: flex; align-items: center; gap: 18px; margin: 40px 0 0;
  padding: 0 44px; max-width: 1600px; margin-left: auto; margin-right: auto;
}
.search-box {
  display: flex; align-items: center; gap: 8px; width: 190px;
  height: 34px; padding: 0 12px; border-radius: 999px;
  background: rgba(255, 255, 255, .6); border: 1px solid transparent;
  color: var(--ink-3); font-size: 13px; transition: all .16s;
}
.search-box:focus-within { background: #fff; border-color: var(--green-line); }
.search-box svg { width: 15px; height: 15px; flex: 0 0 15px; }
.search-box input { border: 0; background: transparent; outline: none; font: inherit; color: var(--ink); width: 100%; }
.search-box input::placeholder { color: var(--ink-3); }

.seg {
  display: flex; gap: 2px; padding: 4px; border-radius: 999px;
  background: rgba(255, 255, 255, .5); margin: 0 auto;
}
.seg a, .seg button {
  border: 0; background: transparent; padding: 7px 20px; border-radius: 999px;
  font-size: 14px; color: var(--ink-2); cursor: pointer; transition: all .18s;
}
.seg a:hover, .seg button:hover { color: var(--ink); }
.seg .on {
  background: linear-gradient(180deg, #EAF7E6 0%, #DFF3DC 100%);
  color: #2F6B36; font-weight: 500; box-shadow: var(--sh-1);
}

.cats {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  margin: 22px auto 20px; padding: 0 44px; flex-wrap: wrap;
}
.cats a, .cats button {
  border: 0; background: transparent; padding: 6px 14px; border-radius: 999px;
  font-size: 14px; color: var(--ink-2); cursor: pointer; transition: all .16s;
}
.cats a:hover, .cats button:hover { color: var(--ink); background: rgba(255, 255, 255, .6); }
.cats .on { color: var(--ink); font-weight: 600; }

/* ---------- 作品网格 ---------- */
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1400px) { .grid-4 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1040px) { .grid-4, .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.tile {
  position: relative; border-radius: var(--r-lg); overflow: hidden;
  background: var(--sunken); border: 1px solid rgba(255, 255, 255, .7);
  box-shadow: var(--sh-1); cursor: zoom-in; transition: transform .2s, box-shadow .2s;
}
.tile:hover { transform: translateY(-3px); box-shadow: var(--sh-2); }
.tile-media { position: relative; aspect-ratio: 4/3; background: var(--sunken); }
.tile.wide .tile-media { aspect-ratio: 16/9; }
.tile.portrait .tile-media { aspect-ratio: 3/4; }
.tile img, .tile video { width: 100%; height: 100%; object-fit: cover; }
.tile-play { position: absolute; left: 14px; top: 14px; width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.85); display: flex; align-items: center; justify-content: center; color: #23282A; box-shadow: var(--sh-2); pointer-events: none; }
.tile-play svg { width: 15px; height: 15px; margin-left: 2px; fill: currentColor; stroke: none; }
.tile-dur {
  position: absolute; right: 12px; bottom: 12px; background: rgba(28, 32, 30, .62); color: #fff;
  font-size: 11.5px; padding: 2px 8px; border-radius: 6px; font-variant-numeric: tabular-nums;
  backdrop-filter: blur(4px);
}
.tile-cat { position: absolute; left: 12px; bottom: 12px; background: rgba(255,255,255,.86); color: #3C4A40; font-size: 11.5px; padding: 2px 9px; border-radius: 999px; }
.tile-overlay {
  position: absolute; inset: auto 0 0 0; padding: 30px 14px 12px;
  background: linear-gradient(to top, rgba(24, 30, 26, .78), rgba(24, 30, 26, 0));
  color: #fff; opacity: 0; transition: opacity .2s;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 10px;
}
.tile:hover .tile-overlay { opacity: 1; }
.tile-overlay p { margin: 0; font-size: 12.5px; line-height: 1.5; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.tile-actions { display: flex; gap: 6px; flex: 0 0 auto; }
.tile-actions button {
  width: 28px; height: 28px; border-radius: 9px; border: 0; background: rgba(255,255,255,.24);
  color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(6px); transition: background .16s;
}
.tile-actions button:hover { background: rgba(255,255,255,.42); }
.tile-actions svg { width: 15px; height: 15px; }
.tile-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 4px 2px; font-size: 12.5px; color: var(--ink-3); }
.tile-meta b { font-weight: 500; color: var(--ink-2); }

/* ---------- 页面通用块（内页用） ---------- */
.page { max-width: 1600px; margin: 0 auto; padding: 26px 44px 72px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head h1 { font-size: 30px; font-weight: 600; letter-spacing: -.01em; margin: 0 0 6px; }
.page-head p { margin: 0; color: var(--ink-2); max-width: 680px; }

.panel {
  background: rgba(255, 255, 255, .74); border: 1px solid rgba(255, 255, 255, .8);
  border-radius: var(--r-lg); box-shadow: var(--sh-1); backdrop-filter: blur(12px);
}
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line-soft); }
.panel-head h3 { margin: 0; font-size: 15px; font-weight: 600; }
.panel-head .count { font-size: 12.5px; color: var(--ink-3); font-weight: 400; }
.panel-body { padding: 20px; }
.panel-body.tight { padding: 14px; }
.panel-plain { background: #fff; border: 1px solid var(--line); }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 22px; overflow-x: auto; }
.tabs a, .tabs button {
  border: 0; background: transparent; padding: 11px 15px; font-size: 14px; color: var(--ink-3);
  cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; transition: all .16s;
}
.tabs a:hover, .tabs button:hover { color: var(--ink-2); }
.tabs .on { color: var(--ink); border-bottom-color: var(--green); font-weight: 500; }

/* 属性键值 */
.kv { display: grid; grid-template-columns: 132px 1fr; gap: 10px 18px; font-size: 13.5px; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; word-break: break-all; }

/* 表格 */
.table-wrap { overflow-x: auto; border-radius: var(--r-md); border: 1px solid var(--line); background: #fff; }
table.tb { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.tb th { text-align: left; font-size: 12px; color: var(--ink-3); font-weight: 500; padding: 11px 16px; background: #FAFCF9; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.tb td { padding: 13px 16px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
table.tb tr:last-child td { border-bottom: 0; }
table.tb tr:hover td { background: #FBFDFA; }
.mono { font-family: var(--mono); font-size: 12.5px; }

/* 价格 */
.price-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 1000px) { .price-grid { grid-template-columns: 1fr; } }
.plan {
  background: rgba(255,255,255,.8); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 28px 26px; display: flex; flex-direction: column; position: relative;
  box-shadow: var(--sh-1); transition: transform .2s, box-shadow .2s;
}
.plan:hover { transform: translateY(-4px); box-shadow: var(--sh-2); }
.plan.hot { border-color: var(--green-line); box-shadow: 0 10px 34px -14px rgba(98, 185, 106, .38); }
.plan .plan-tag { position: absolute; top: -11px; left: 26px; background: var(--green); color: #fff; font-size: 11.5px; padding: 3px 12px; border-radius: 999px; }
.plan h3 { margin: 0 0 6px; font-size: 18px; font-weight: 600; }
.plan .plan-price { font-size: 36px; font-weight: 600; letter-spacing: -.02em; line-height: 1.1; }
.plan .plan-price small { font-size: 14px; font-weight: 400; color: var(--ink-3); }
.plan .plan-desc { color: var(--ink-3); font-size: 12.5px; margin: 8px 0 20px; }
.plan ul { list-style: none; margin: 0 0 24px; padding: 0; flex: 1; display: flex; flex-direction: column; gap: 11px; }
.plan li { display: flex; gap: 9px; font-size: 13.5px; color: var(--ink-2); align-items: flex-start; }
.plan li svg { width: 15px; height: 15px; color: var(--green); margin-top: 4px; flex: 0 0 15px; }

.pack-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1000px) { .pack-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pack {
  background: rgba(255,255,255,.82); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 22px 18px; text-align: center; cursor: pointer; transition: all .18s;
}
.pack:hover { transform: translateY(-3px); border-color: var(--green-line); box-shadow: var(--sh-2); }
.pack b { display: block; font-size: 24px; font-weight: 600; letter-spacing: -.02em; }
.pack b small { font-size: 12.5px; font-weight: 400; color: var(--ink-3); margin-left: 3px; }
.pack .pack-bonus { font-size: 12px; color: var(--green-deep); margin-top: 3px; min-height: 18px; }
.pack .pack-name { font-size: 12.5px; color: var(--ink-3); margin-top: 8px; }
.pack .pack-price { font-size: 17px; font-weight: 600; margin-top: 12px; }

/* ---------- 任务卡片 + 进度 ---------- */
.task-list { display: flex; flex-direction: column; gap: 12px; }
.task-card {
  background: rgba(255,255,255,.86); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 14px 16px 15px; position: relative; overflow: hidden; box-shadow: var(--sh-1);
}
.task-card .tc-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.task-card .tc-model { font-size: 12.5px; color: var(--ink-2); display: flex; align-items: center; gap: 7px; }
.task-card .tc-model svg { width: 15px; height: 15px; color: var(--green); }
.task-card .tc-prompt { font-size: 13.5px; color: var(--ink-2); line-height: 1.6; margin: 0 0 10px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.task-card .tc-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--ink-3); }
.task-card .tc-err { color: var(--bad); font-size: 12.5px; margin: 6px 0 0; }
.task-card .tc-tip { font-size: 12.5px; color: var(--ink-3); line-height: 1.6; margin: 0 0 8px; }
.ink-progress {
  position: absolute; left: 0; bottom: 0; height: 2px; width: 0;
  background: linear-gradient(90deg, var(--ink-4), var(--green));
  transition: width .5s cubic-bezier(.22, 1, .36, 1);
}
.task-card.working .ink-progress { animation: breathe 2.4s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { opacity: 1; } 50% { opacity: .5; } }
.task-card.working::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(98, 185, 106, .07), transparent);
  animation: sweep 2.4s ease-in-out infinite;
}
@keyframes sweep { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }

/* 生成中不编造百分比：用不确定进度条代替「卡在 50%」的假数字 */
.ink-progress.indet {
  width: 100%; transition: none;
  background: linear-gradient(90deg, rgba(98,185,106,0) 0%, var(--green) 45%, rgba(98,185,106,0) 90%);
  background-size: 45% 100%; background-repeat: no-repeat;
  animation: indet 1.5s linear infinite;
}
@keyframes indet { 0% { background-position: -50% 0; } 100% { background-position: 150% 0; } }

/* 任务区收尾提示：告诉用户作品去哪了 + 手动清空的入口 */
.task-note {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px;
  font-size: 12.5px; color: var(--ink-3);
  background: var(--sunken); border: 1px solid var(--line-soft); border-radius: var(--r-md);
  padding: 10px 14px;
}
.task-note .tn-act { display: inline-flex; align-items: center; gap: 14px; }
.task-note a { color: var(--green-deep); font-weight: 500; }

/* ---------- 右上角用户菜单 ---------- */
.dd-wrap { position: relative; }
.dropdown {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 212px;
  background: rgba(255,255,255,.97); border: 1px solid var(--line); border-radius: var(--r-md);
  box-shadow: var(--sh-3); padding: 6px; z-index: 60;
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .16s, transform .16s, visibility .16s; backdrop-filter: blur(14px);
}
.dropdown.open { opacity: 1; visibility: visible; transform: none; }
.dropdown a { display: block; padding: 9px 12px; border-radius: 10px; font-size: 13.5px; color: var(--ink-2); }
.dropdown a:hover { background: var(--green-soft); color: var(--ink); }
.dd-head { padding: 10px 12px 12px; }
.dd-head b { display: block; font-size: 14px; font-weight: 600; }
.dd-head span { font-size: 12px; color: var(--ink-3); }
.dd-sep { height: 1px; background: var(--line-soft); margin: 6px 8px; }

/* ---------- 拖拽态 / 操作行 / 分页 ---------- */
.composer.dragging { border-color: var(--green); box-shadow: var(--sh-glass), 0 0 0 3px var(--green-soft); }
.inline-fields { display: flex; gap: 12px; flex-wrap: wrap; }
.inline-fields > * { flex: 1 1 200px; min-width: 0; }
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.toolbar .grow { flex: 1; }
.toolbar .input, .toolbar .select { width: auto; min-width: 150px; }
.pager { padding: 16px 4px 4px; color: var(--ink-3); font-size: 12.5px; display: flex; gap: 8px; align-items: center; }
.pager a { padding: 4px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink-2); background: rgba(255,255,255,.7); }
.pager a:hover { border-color: var(--green-line); color: var(--green-deep); }

/* ---------- 骨架 / 空态 ---------- */
.sk { background: linear-gradient(90deg, #EDF3EA 25%, #E2EBE0 37%, #EDF3EA 63%); background-size: 400% 100%; animation: shimmer 1.5s ease-in-out infinite; border-radius: 8px; }
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.sk-tile { aspect-ratio: 4/3; border-radius: var(--r-lg); }
.empty { text-align: center; padding: 64px 24px; color: var(--ink-3); }
.empty .e-icon {
  width: 52px; height: 52px; border-radius: 18px; border: 1px solid var(--line); margin: 0 auto 18px;
  display: flex; align-items: center; justify-content: center; color: var(--green-deep); background: rgba(255,255,255,.8);
}
.empty .e-icon svg { width: 24px; height: 24px; }
.empty b { display: block; color: var(--ink-2); font-size: 15px; font-weight: 500; margin-bottom: 6px; }
.empty p { margin: 0 0 20px; font-size: 13.5px; max-width: 440px; margin-left: auto; margin-right: auto; }

/* ---------- 弹层 ---------- */
.modal-root { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal-mask { position: absolute; inset: 0; background: rgba(28, 36, 30, .34); backdrop-filter: blur(4px); }
.modal-box {
  position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--sh-3); width: 100%; max-width: 470px; max-height: calc(100vh - 40px); overflow-y: auto;
  animation: modalIn .2s cubic-bezier(.22, 1, .36, 1);
}
.modal-box.wide { max-width: 760px; }
.modal-box.narrow { max-width: 390px; }
@keyframes modalIn { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 22px 0; }
.modal-head h3 { margin: 0; font-size: 16.5px; font-weight: 600; }
.modal-head .m-close { border: 0; background: transparent; color: var(--ink-3); font-size: 21px; line-height: 1; cursor: pointer; padding: 2px 4px; border-radius: 8px; }
.modal-head .m-close:hover { color: var(--ink); background: var(--sunken); }
.modal-body { padding: 16px 22px 4px; }
.modal-foot { padding: 8px 22px 22px; display: flex; gap: 10px; justify-content: flex-end; }
.modal-foot.stack { flex-direction: column; }
.modal-foot.stack .btn { width: 100%; }

.toast-root { position: fixed; right: 24px; top: 66px; z-index: 300; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.toast {
  background: rgba(255,255,255,.97); border: 1px solid var(--line); border-radius: var(--r-sm);
  box-shadow: var(--sh-3); padding: 12px 16px; font-size: 13.5px; max-width: 350px;
  display: flex; align-items: flex-start; gap: 9px; pointer-events: auto;
  animation: toastIn .22s cubic-bezier(.22, 1, .36, 1);
}
@keyframes toastIn { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
.toast.out { animation: toastOut .2s ease forwards; }
@keyframes toastOut { to { opacity: 0; transform: translateX(14px); } }
.toast i { width: 7px; height: 7px; border-radius: 50%; margin-top: 7px; flex: 0 0 7px; background: var(--ink-3); }
.toast.ok i { background: var(--ok); }
.toast.bad i { background: var(--bad); }
.toast.warn i { background: var(--warn); }

.lightbox { position: fixed; inset: 0; z-index: 400; background: rgba(18, 24, 20, .93); display: flex; align-items: center; justify-content: center; padding: 32px; }
.lightbox img, .lightbox video { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 10px; }
.lightbox > [data-close], .lb-x { position: absolute; right: 24px; top: 20px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255,255,255,.16); color: #fff; font-size: 23px; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0 0 3px; }
.lightbox > [data-close]:hover, .lb-x:hover { background: rgba(255,255,255,.3); }

/* 左右翻页 */
.lightbox .lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%); width: 54px; height: 54px; padding: 0 0 4px;
  border-radius: 50%; border: 0; background: rgba(255,255,255,.12); color: #fff; font-size: 30px; line-height: 1;
  cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background .16s;
}
.lightbox .lb-nav:hover { background: rgba(255,255,255,.26); }
.lightbox .lb-prev { left: 26px; }
.lightbox .lb-next { right: 26px; }
/* 底部条：页码 + 下载 + 关闭 */
.lightbox .lb-bar { position: absolute; left: 0; right: 0; bottom: 22px; display: flex; align-items: center; justify-content: center; gap: 22px; color: rgba(255,255,255,.85); font-size: 13px; }
.lightbox .lb-bar .link-btn { color: rgba(255,255,255,.88); font-size: 13px; }
.lightbox .lb-bar .link-btn:hover { color: #fff; }
.lightbox .lb-count { font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.lightbox .lb-stage { margin: 0; display: flex; align-items: center; justify-content: center; max-width: 100%; max-height: 100%; }
.lightbox .lb-stage img, .lightbox .lb-stage video { max-width: calc(100vw - 170px); max-height: calc(100vh - 130px); }

/* 弹层说明文字（原来散落着一堆内联 style） */
.m-text { margin: 0; color: var(--ink-2); font-size: 13.5px; line-height: 1.75; }

/* ---------- 批量选择（作品 / 素材页） ---------- */
.batch-bar {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 22px; z-index: 250;
  display: flex; align-items: center; gap: 20px; padding: 10px 20px; border-radius: 999px;
  background: rgba(255,255,255,.97); border: 1px solid var(--line); box-shadow: var(--sh-3);
  font-size: 13px; opacity: 0; visibility: hidden; transition: opacity .18s, visibility .18s;
}
body.batch-on .batch-bar { opacity: 1; visibility: visible; }
.bb-count { color: var(--ink-2); font-weight: 500; font-variant-numeric: tabular-nums; }
.bb-act { display: inline-flex; align-items: center; gap: 16px; }
.bb-danger { color: var(--bad); }
.tile-pick {
  display: none; position: absolute; left: 10px; top: 10px; width: 24px; height: 24px; z-index: 4;
  border-radius: 7px; border: 1px solid var(--line); background: rgba(255,255,255,.94);
  color: transparent; align-items: center; justify-content: center;
}
.tile-pick svg { width: 14px; height: 14px; }
body.batch-on .tile-pick { display: flex; }
body.batch-on figure.tile { cursor: pointer; }
body.batch-on figure.tile .tile-overlay { opacity: 0; pointer-events: none; }
figure.tile.picked { box-shadow: 0 0 0 2px var(--green); }
figure.tile.picked .tile-pick { background: var(--green); border-color: var(--green); color: #fff; }

/* ---------- 画布：触屏手势 ---------- */
/* 让画布自己处理拖动与双指缩放，否则浏览器会把手指移动当成页面滚动 */
.canvas-wrap { touch-action: none; -webkit-user-select: none; user-select: none; }
.canvas-wrap .node { touch-action: none; }
/* 选中态（原来只在拖拽的一瞬间有，松手就没了） */
.canvas-wrap .node.sel { box-shadow: 0 0 0 2px var(--green), var(--sh-2); }
.canvas-wrap .node.sel::after { opacity: 1; }
/* 当前缩放比例，点一下回到 100% */
.zoom-pct {
  display: inline-flex; align-items: center; justify-content: center; height: 28px; padding: 0 10px;
  border-radius: 999px; font-size: 12px; color: var(--ink-2); background: rgba(255,255,255,.9);
  border: 1px solid var(--line); cursor: pointer; font-variant-numeric: tabular-nums; margin-left: 4px;
}
.zoom-pct:hover { border-color: var(--green-line); color: var(--green-deep); }

/* ---------- 资产页：三个页签 ---------- */
.as-tabs { display: inline-flex; gap: 2px; padding: 4px; border-radius: 999px; background: rgba(255,255,255,.62); border: 1px solid var(--line-soft); margin: 2px 0 20px; }
.as-tab {
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 20px; border: 0; border-radius: 999px;
  background: transparent; color: var(--ink-2); font-size: 13.5px; cursor: pointer; transition: .16s;
}
.as-tab i { font-style: normal; font-size: 11.5px; padding: 1px 7px; border-radius: 999px; background: var(--sunken); color: var(--ink-3); }
.as-tab:hover { color: var(--ink); }
.as-tab.on { background: linear-gradient(180deg, #EAF7E6, #DFF3DC); color: var(--green-deep); font-weight: 500; box-shadow: var(--sh-1); }
.as-tab.on i { background: rgba(47,107,54,.12); color: var(--green-deep); }

/* ---------- 演员（定妆照） ---------- */
.actor-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.actor-toolbar .hint { font-size: 13px; color: var(--ink-2); }
.actor-toolbar .hint b { color: var(--green-deep); }
.actor-tools { display: flex; gap: 10px; }
.actor-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 18px; }
.actor-card {
  border: 0; background: transparent; padding: 0; display: flex; flex-direction: column;
  align-items: center; gap: 8px; text-align: center; cursor: pointer;
}
/* 用户要的规格：100×100、圆角 */
.actor-face {
  width: 100px; height: 100px; border-radius: 16px; display: flex; align-items: center; justify-content: center;
  font-size: 30px; font-weight: 600; color: #fff; box-shadow: var(--sh-2); position: relative; overflow: hidden;
  background-size: cover; background-position: center;
  transition: transform .18s cubic-bezier(.22,1,.36,1), box-shadow .18s;
}
.actor-card:hover .actor-face { transform: translateY(-3px); box-shadow: var(--sh-3); }
.actor-card b { font-size: 13.5px; font-weight: 500; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.actor-dots { display: inline-flex; align-items: center; gap: 4px; }
.actor-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--line); }
.actor-dots i.on { background: var(--green); }
.actor-dots span { font-size: 11px; color: var(--ink-3); margin-left: 3px; }
.actor-add .actor-face { background: rgba(255,255,255,.55); border: 1.5px dashed var(--green-line); color: var(--green-deep); box-shadow: none; }
.actor-add .actor-face svg { width: 26px; height: 26px; }
.actor-add:hover .actor-face { background: var(--green-soft); }
.actor-add b { color: var(--ink-3); font-weight: 400; }
.actor-quota { margin: 18px 0 0; font-size: 12.5px; color: var(--ink-3); }
.actor-quota b { color: var(--green-deep); }
.af1 { background: linear-gradient(135deg,#8FD39A,#4FAE6B); }
.af2 { background: linear-gradient(135deg,#A8DCEC,#3E9FC4); }
.af3 { background: linear-gradient(135deg,#F0B7CE,#B93BA6); }
.af4 { background: linear-gradient(135deg,#F4D9A0,#D79A3E); }
.af5 { background: linear-gradient(135deg,#B9C6F0,#5A6FCB); }
.af6 { background: linear-gradient(135deg,#9EDBD2,#3F9C93); }

/* ---------- 演员弹窗里的角度图框 ---------- */
.angle-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 560px) { .angle-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.angle { position: relative; }
.angle .a-tag { position: absolute; left: 9px; top: 9px; z-index: 2; font-size: 11px; padding: 3px 9px; border-radius: 999px; background: rgba(255,255,255,.92); color: var(--ink-2); }
.angle-box {
  height: 120px; border-radius: var(--r-md); display: flex; align-items: center; justify-content: center;
  background: var(--sunken); border: 1px solid var(--line); color: var(--ink-3);
  background-size: cover; background-position: center; cursor: pointer; transition: .16s;
}
.angle-box svg { width: 24px; height: 24px; }
.angle-box:hover { border-color: var(--green-line); color: var(--green-deep); }
.angle.is-empty .angle-box { border-style: dashed; background-color: rgba(255,255,255,.55); }
.mini-btn { margin-top: 7px; width: 100%; height: 29px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink-2); font-size: 12px; cursor: pointer; }
.mini-btn:hover { border-color: var(--green-line); color: var(--green-deep); }

/* 普通弹窗的默认宽度放宽（原来 470px 偏窄）；.wide / .narrow 和全屏面板各有自己的宽度，不受影响 */
.modal-box { max-width: min(600px, 92vw); }

/* ---------- 空头像占位：一个圆里一个加号，一眼看出「还没传图」 ---------- */
.actor-empty,
.actor-face.big-empty {
  border-radius: 50%; border: 1.5px dashed var(--green-line); background: rgba(255, 255, 255, .55);
  color: var(--green-deep); display: flex; align-items: center; justify-content: center;
}
.actor-empty { width: 100px; height: 100px; box-shadow: none; }
.actor-empty svg { width: 28px; height: 28px; }
.actor-card:hover .actor-empty { background: var(--green-soft); }
/* 头像本身也改成圆 */
.actor-face { border-radius: 50%; }
.actor-add .actor-face { border-radius: 50%; }

/* 单独一个人的大圆（「我自己」页签用） */
.self-one { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 34px 0 26px; text-align: center; }
.self-one .face-big {
  width: 124px; height: 124px; border-radius: 50%; font-size: 38px; font-weight: 600; color: #fff;
  background-size: cover; background-position: center; box-shadow: var(--sh-2);
  display: flex; align-items: center; justify-content: center; transition: transform .18s, box-shadow .18s;
}
.self-one .face-big.is-empty { border: 1.5px dashed var(--green-line); background: rgba(255,255,255,.6); color: var(--green-deep); box-shadow: none; }
.self-one .face-big.is-empty svg { width: 34px; height: 34px; }
.self-one:hover .face-big { transform: translateY(-3px); box-shadow: var(--sh-3); }
.self-one b { font-size: 15px; }
.self-one p { margin: 0; font-size: 12.5px; color: var(--ink-3); line-height: 1.7; max-width: 380px; }
.self-one p b { color: var(--green-deep); }

/* ---------- 「我的资产」页：左边素材，右边人 ---------- */
.asset-split { display: grid; grid-template-columns: minmax(0, 1fr) 1px 286px; gap: 24px; align-items: start; }
.asset-split .split-line { background: var(--line-soft); align-self: stretch; min-height: 120px; }
.split-side h3 { margin: 0 0 4px; font-size: 14px; }
.split-side .side-hint { margin: 0 0 14px; font-size: 12.5px; color: var(--ink-3); line-height: 1.65; }
.split-side .side-block + .side-block { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line-soft); }
.split-side .actor-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.split-side .actor-face, .split-side .actor-empty { width: 108px; height: 108px; margin: 0 auto; }
@media (max-width: 1120px) {
  .asset-split { grid-template-columns: 1fr; }
  .asset-split .split-line { display: none; }
  .split-side .actor-grid { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); }
}

/* ---------- 资产页每个区块：标题 + 操作，全部左对齐、紧凑 ---------- */
.as-sec { margin-bottom: 24px; }
.as-sec-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.as-sec-head h2 { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.as-sec-head h2 i { font-style: normal; font-size: 12px; font-weight: 400; color: var(--ink-3); margin-left: 7px; }
.as-sec-head .btn { margin-left: auto; }
.as-row { display: flex; flex-wrap: wrap; gap: 18px; }

/* 80×80 圆角方块（我自己 / 演员通用尺寸） */
.mini-face { border: 0; background: transparent; padding: 0; display: flex; flex-direction: column; align-items: center; gap: 7px; cursor: pointer; width: 88px; }
.mf-box {
  flex: 0 0 auto; box-sizing: border-box;
  width: 80px; min-width: 80px; max-width: 80px;
  height: 80px; min-height: 80px; max-height: 80px;
  border-radius: 14px; display: flex; align-items: center; justify-content: center;
  font-size: 26px; font-weight: 600; color: #fff;
  background: linear-gradient(135deg, #8FD39A, #4FAE6B) center/cover no-repeat;
  box-shadow: var(--sh-1); transition: transform .18s, box-shadow .18s;
}
.mini-face:hover .mf-box { transform: translateY(-2px); box-shadow: var(--sh-2); }
.mf-box.is-empty { border: 1.5px dashed var(--green-line); background: rgba(255, 255, 255, .6); color: var(--green-deep); box-shadow: none; }
.mf-box.is-empty svg { width: 24px; height: 24px; }
.mf-name { font-size: 12.5px; color: var(--ink-2); max-width: 88px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 头像统一成「正方形 + 圆角」（覆盖前面的圆形写法） */
.actor-face { border-radius: 14px; }
.actor-face, .actor-empty { width: 80px; height: 80px; font-size: 26px; }
.actor-empty svg { width: 24px; height: 24px; }
.actor-grid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 16px; }
.actor-card b { font-size: 12.5px; }

/* 「我自己」页签：左对齐、去掉大留白、80 方块 */
.self-one { align-items: flex-start; text-align: left; padding: 0; gap: 10px; }
.self-one .face-big { width: 80px; height: 80px; border-radius: 14px; font-size: 26px; }
.self-one .face-big.is-empty svg { width: 24px; height: 24px; }
.self-one b { font-size: 14px; }
.self-one p { max-width: 520px; font-size: 12.5px; }

/* ---------- 右侧全屏面板（演员编辑用：左边留导航，右边装满） ---------- */
.modal-box.panel {
  position: fixed; left: 100px; right: 0; top: 0; bottom: 0;
  max-width: none; max-height: none; border-radius: 0; border: 0; border-left: 1px solid var(--line-soft);
  display: flex; flex-direction: column;
  animation: panelIn .22s cubic-bezier(.22, 1, .36, 1);
}
@keyframes panelIn { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }
.modal-box.panel .modal-head { padding: 18px 34px 14px; border-bottom: 1px solid var(--line-soft); flex: 0 0 auto; }
.modal-box.panel .modal-body { flex: 1 1 auto; overflow: auto; padding: 22px 34px; }
.modal-box.panel .modal-foot {
  flex: 0 0 auto; padding: 14px 34px 18px; border-top: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, .92);
}
/* 遮罩淡一些，让左边的导航还能看见，明确「这是右侧的一个面板」 */
.modal-root.pinned .modal-mask { background: rgba(24, 34, 27, .22); backdrop-filter: blur(1px); }
@media (max-width: 760px) { .modal-box.panel { left: 0; } }

/* 面板内部：三张定妆照的图框更大 */
.ap-angles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; max-width: 720px; }
.ap-angles .angle-box { height: 168px; }
.ap-angles .mini-btn { height: 34px; font-size: 12.5px; }
.ap-hint { margin: 0 0 18px; font-size: 12.5px; color: var(--ink-3); line-height: 1.75; }
.ap-hint b { color: var(--green-deep); }
.ap-cols { display: grid; grid-template-columns: minmax(260px, 360px) minmax(0, 1fr); gap: 34px; align-items: start; }
@media (max-width: 760px) { .ap-cols { grid-template-columns: 1fr; gap: 20px; } }
@media (max-width: 760px) { .ap-angles { grid-template-columns: 1fr; } }

/* ---------- 收银台 ---------- */
.pay-loading { padding: 36px 0; display: flex; justify-content: center; }
.pay-sum { text-align: center; padding: 6px 0 18px; }
.pay-amount { font-size: 36px; font-weight: 600; letter-spacing: -.02em; line-height: 1.1; }
.pay-title { font-size: 13.5px; color: var(--ink-2); margin-top: 6px; }
.pay-effect { font-size: 12.5px; color: var(--green-deep); margin-top: 6px; }
.pay-methods { display: flex; flex-direction: column; gap: 9px; }
.pay-method {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  padding: 13px 15px; border: 1px solid var(--line); border-radius: var(--r-md);
  background: #fff; cursor: pointer; transition: all .16s;
}
.pay-method:hover { border-color: var(--green-line); box-shadow: var(--sh-1); transform: translateY(-1px); }
.pm-icon { width: 36px; height: 36px; flex: 0 0 36px; border-radius: 11px; display: flex; align-items: center; justify-content: center; background: var(--sunken); color: var(--ink-2); }
.pm-icon svg { width: 18px; height: 18px; }
.pm-alipay { background: #E8F2FE; color: #1677FF; }
.pm-wechat { background: var(--ok-soft); color: #227A3B; }
.pm-manual { background: var(--green-soft); color: #2F7C3D; }
.pm-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.4; }
.pm-text b { font-size: 14px; font-weight: 500; }
.pm-text i { font-size: 12px; color: var(--ink-3); font-style: normal; }
.pm-arrow { width: 16px; height: 16px; color: var(--ink-3); }
.pay-foot-note { text-align: center; font-size: 12px; color: var(--ink-3); margin-top: 16px; line-height: 1.8; }
.pay-qr { display: flex; flex-direction: column; align-items: center; padding: 4px 0 8px; }
.pay-qr-box { width: 220px; height: 220px; padding: 10px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--sh-1); display: flex; align-items: center; justify-content: center; }
.pay-qr-box svg, .pay-qr-box img { width: 100%; height: 100%; display: block; }
.pay-manual { font-size: 12.5px; color: var(--ink-2); line-height: 1.7; text-align: center; padding: 0 4px 8px; }
.pay-wait { display: flex; justify-content: center; padding: 26px 0 20px; }
.pay-pulse { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--green); animation: payPulse 1.5s ease-in-out infinite; vertical-align: middle; margin-right: 6px; }
.pay-pulse.big { width: 34px; height: 34px; margin: 0; }
@keyframes payPulse { 0%, 100% { opacity: .28; transform: scale(.82); } 50% { opacity: 1; transform: scale(1); } }
.pay-success { text-align: center; padding: 24px 0 12px; }
.pay-check { width: 56px; height: 56px; border-radius: 50%; background: var(--ok-soft); color: #227A3B; display: flex; align-items: center; justify-content: center; margin: 0 auto 14px; animation: payPop .34s cubic-bezier(.22, 1, .36, 1); }
.pay-check svg { width: 28px; height: 28px; }
@keyframes payPop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
.pay-success b { font-size: 17.5px; font-weight: 600; }
.pay-success p { margin: 6px 0 0; font-size: 13px; color: var(--ink-2); }
.pay-err { text-align: center; padding: 20px 0 10px; }
.pay-err b { font-size: 15.5px; font-weight: 600; color: var(--bad); }
.pay-err p { margin: 8px 0 0; font-size: 13px; color: var(--ink-2); line-height: 1.7; }

/* ---------- 登录页 ---------- */
.auth-wrap { display: flex; align-items: center; justify-content: center; padding: 60px 24px 90px; min-height: 70vh; }
.auth-box {
  width: 100%; max-width: 410px; background: rgba(255,255,255,.82); border: 1px solid rgba(255,255,255,.9);
  border-radius: var(--r-xl); padding: 36px 34px; box-shadow: var(--sh-glass); backdrop-filter: blur(20px);
}
.auth-box h1 { font-size: 24px; font-weight: 600; margin: 0 0 6px; }
.auth-box .sub { color: var(--ink-3); font-size: 13.5px; margin: 0 0 26px; }
.auth-switch { text-align: center; font-size: 13px; color: var(--ink-3); margin-top: 18px; }

/* ---------- 画布 ---------- */
.canvas-wrap { position: relative; height: calc(100vh - var(--announce-h) - 66px); min-height: 520px; background: rgba(247, 250, 240, .5); overflow: hidden; border-radius: var(--r-lg); border: 1px solid var(--line); }
.canvas-dots { position: absolute; inset: 0; background-image: radial-gradient(circle, #D3E0D1 1px, transparent 1px); background-size: 26px 26px; }
.canvas-plane { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.canvas-edges { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; }
.canvas-edges path { fill: none; stroke: #C7D6C6; stroke-width: 1.3; }
.node {
  position: absolute; width: 236px; background: #fff; border: 1px solid var(--line);
  border-radius: var(--r-md); box-shadow: var(--sh-2); overflow: hidden; cursor: grab;
  transition: border-color .16s, box-shadow .16s;
}
.node:hover { border-color: var(--green-line); }
.node.sel { border-color: var(--green); box-shadow: var(--sh-3); }
.node.dragging { cursor: grabbing; box-shadow: var(--sh-3); }
.node-thumb { height: 132px; background: var(--sunken); position: relative; overflow: hidden; }
.node-thumb img, .node-thumb video { width: 100%; height: 100%; object-fit: cover; }
.node-thumb .ph { display: flex; align-items: center; justify-content: center; height: 100%; color: var(--ink-3); font-size: 12px; }
.node-idx { position: absolute; left: 9px; top: 9px; background: rgba(28, 32, 30, .62); color: #fff; font-family: var(--mono); font-size: 10.5px; padding: 1px 7px; border-radius: 999px; }
.node-body { padding: 11px 13px 13px; }
.node-body b { display: block; font-size: 13px; font-weight: 500; margin-bottom: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.node-body p { margin: 0; font-size: 11.5px; color: var(--ink-3); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.node-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 10px; }
.node-actions { display: flex; gap: 5px; }
.node-actions button { width: 25px; height: 25px; border-radius: 7px; border: 1px solid var(--line); background: #fff; color: var(--ink-2); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.node-actions button:hover { color: var(--ink); border-color: var(--ink-4); }
.node-actions svg { width: 13px; height: 13px; }
.node-bar { height: 2px; background: var(--sunken); }
.node-bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--ink-4), var(--green)); transition: width .4s; }
.canvas-tools {
  position: absolute; left: 18px; top: 16px; z-index: 20; display: flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.9); backdrop-filter: blur(12px); border: 1px solid rgba(255,255,255,.9);
  border-radius: 999px; padding: 6px; box-shadow: var(--sh-2);
}
.canvas-tools .tool-ico { width: 32px; height: 32px; font-size: 13px; gap: 5px; padding: 0 11px; width: auto; border-radius: 999px; }
.canvas-tools .tool-ico:hover { background: var(--green-soft); color: var(--green-deep); }
.canvas-tools .sep { width: 1px; height: 20px; background: var(--line); margin: 0 3px; }
.canvas-legend { position: absolute; left: 18px; bottom: 16px; z-index: 20; font-size: 12px; color: var(--ink-3); background: rgba(255,255,255,.9); backdrop-filter: blur(12px); border: 1px solid rgba(255,255,255,.9); border-radius: var(--r-sm); padding: 9px 13px; line-height: 1.9; }
.canvas-legend kbd { font-family: var(--mono); font-size: 11px; background: var(--sunken); border-radius: 4px; padding: 1px 5px; border: 1px solid var(--line); }

/* ---------- 短剧分镜表 ---------- */
.shot-row { display: grid; grid-template-columns: 40px 100px minmax(0, 1fr) 156px 88px; gap: 14px; padding: 13px 16px; border-bottom: 1px solid var(--line-soft); align-items: center; }
.shot-row:last-child { border-bottom: 0; }
.shot-row:hover { background: #FBFDFA; }
.shot-idx { font-family: var(--mono); font-size: 12.5px; color: var(--ink-3); }
.shot-thumb { width: 100px; height: 62px; border-radius: 9px; overflow: hidden; background: var(--sunken); }
.shot-thumb img, .shot-thumb video { width: 100%; height: 100%; object-fit: cover; }
.shot-thumb .ph { display: flex; align-items: center; justify-content: center; height: 100%; color: var(--ink-3); font-size: 11.5px; }
.shot-text b { display: block; font-size: 13.5px; font-weight: 500; margin-bottom: 2px; }
.shot-text p { margin: 0; font-size: 12.5px; color: var(--ink-3); line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.shot-act { display: flex; gap: 6px; justify-content: flex-end; }
@media (max-width: 980px) {
  /* 手机上不能再把「运镜」和「操作」整列藏掉 —— 那样重跑、改文案、状态标签全都没了。
     改成缩成两行：左边序号+缩略图跨行，右边依次排文案、运镜、操作。 */
  .shot-row { grid-template-columns: 34px 82px minmax(0, 1fr); row-gap: 8px; align-items: start; }
  .shot-row .shot-idx { grid-row: 1 / span 3; }
  .shot-row .shot-thumb { grid-row: 1 / span 3; }
  .shot-row .shot-text { grid-column: 3; grid-row: 1; }
  .shot-row .shot-cam { grid-column: 3; grid-row: 2; }
  .shot-row .shot-act { grid-column: 3; grid-row: 3; justify-content: flex-start; }
}

.drama-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.drama-card { background: rgba(255,255,255,.84); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; box-shadow: var(--sh-1); transition: transform .18s, box-shadow .18s; cursor: pointer; }
.drama-card:hover { transform: translateY(-3px); box-shadow: var(--sh-2); }
.drama-cover { height: 156px; background: var(--sunken); position: relative; }
.drama-cover img { width: 100%; height: 100%; object-fit: cover; }
.drama-cover .ph { height: 100%; display: flex; align-items: center; justify-content: center; color: var(--ink-3); font-size: 12.5px; gap: 6px; }
.drama-body { padding: 15px 17px 17px; }
.drama-body h3 { margin: 0 0 6px; font-size: 15px; font-weight: 600; }
.drama-body p { margin: 0; font-size: 12.5px; color: var(--ink-3); line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.drama-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 13px; font-size: 12px; color: var(--ink-3); }

/* 进度条 */
.bar { height: 6px; border-radius: 999px; background: var(--sunken); overflow: hidden; }
.bar > i { display: block; height: 100%; background: linear-gradient(90deg, #A9D8AE, var(--green)); transition: width .4s; }

/* ---------- 页脚 ---------- */
.foot { border-top: 1px solid var(--line); margin-top: 40px; padding: 36px 44px 48px; }
.foot-inner { max-width: 1600px; margin: 0 auto; display: flex; gap: 44px; justify-content: space-between; flex-wrap: wrap; }
.foot-brand { display: flex; gap: 12px; max-width: 340px; }
.foot-brand svg { width: 28px; height: 28px; flex: 0 0 28px; margin-top: 2px; }
.foot-brand b { font-size: 14.5px; font-weight: 600; }
.foot-brand p { margin: 6px 0 0; font-size: 12.5px; color: var(--ink-3); line-height: 1.65; }
.foot-links { display: flex; flex-direction: column; gap: 10px; font-size: 13.5px; }
.foot-links a { color: var(--ink-2); }
.foot-meta { font-size: 12.5px; color: var(--ink-3); display: flex; flex-direction: column; gap: 6px; text-align: right; }

/* ---------- 响应式 ---------- */
@media (max-width: 1240px) {
  .hero h1 { font-size: 42px; }
  .hero-art { width: 440px; height: 440px; right: -20px; top: -60px; opacity: .9; }
}
@media (max-width: 980px) {
  :root { --rail-w: 76px; }
  .rail-item { width: 62px; }
  .rail-item span { font-size: 11px; }
  .wrap, .page, .hero-inner, .discover-head, .cats { padding-left: 20px; padding-right: 20px; }
  .hero h1 { font-size: 34px; }
  .hero-art { width: 320px; height: 320px; opacity: .55; }
  .composer-upload { flex-basis: 54px; width: 54px; height: 54px; }
  .foot { padding-left: 20px; padding-right: 20px; }
}
@media (max-width: 680px) {
  .cats { justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; }
  .discover-head { flex-direction: column; align-items: stretch; }
  .seg { margin: 0; }
  .foot-meta { text-align: left; }
}

/* ---------- 暗色（后台可切默认值） ---------- */
html.dark {
  --bg: #12160F;
  --wash-1: #1B2415; --wash-2: #16241A; --wash-3: #132421; --wash-4: #141F26;
  --surface: #1B211B;
  --surface-soft: #202720;
  --glass: rgba(255,255,255,.06);
  --glass-strong: rgba(255,255,255,.1);
  --sunken: #222A22;
  --ink: #ECF1EA; --ink-2: #A9B5AB; --ink-3: #78847A; --ink-4: #4C574D;
  --green: #6FCB78; --green-deep: #86D98E; --green-soft: #1B2F1E; --green-line: #2C4630;
  --line: #2A332A; --line-soft: #232B23;
  --sh-1: 0 1px 2px rgba(0,0,0,.3);
  --sh-2: 0 6px 20px -8px rgba(0,0,0,.5);
  --sh-3: 0 18px 44px -16px rgba(0,0,0,.7);
  --sh-glass: 0 8px 30px -12px rgba(0,0,0,.6);
}
html.dark::before { background: linear-gradient(180deg, #131A12 0%, #12160F 100%); }
html.dark .btn { background: var(--ink); border-color: var(--ink); color: #12160F; }
html.dark .btn:hover { color: #12160F; }
html.dark .btn-ghost { background: rgba(255,255,255,.06); color: var(--ink); border-color: var(--line); }
html.dark .btn-ghost:hover { background: rgba(255,255,255,.12); color: var(--ink); }
html.dark .btn-green { background: var(--green); border-color: var(--green); color: #12160F; }
html.dark .composer { background: linear-gradient(140deg, rgba(30,40,30,.7), rgba(24,36,34,.7)); border-color: rgba(255,255,255,.08); }
html.dark .composer-upload { background: rgba(255,255,255,.1); color: var(--ink-2); }
html.dark .composer-send { background: var(--green); color: #12160F; }
html.dark .at-chip { background: #232B23; }
html.dark .at-pop { background: rgba(27,33,27,.97); }
html.dark .modal-box, html.dark .panel-plain, html.dark .table-wrap, html.dark .pay-method, html.dark .tile { background: var(--surface); }
html.dark .input, html.dark .textarea, html.dark .select { background: #171C17; }
html.dark .seg { background: rgba(255,255,255,.05); }
html.dark .seg .on { background: rgba(111,203,120,.16); color: var(--green); }
html.dark .search-box { background: rgba(255,255,255,.06); }
html.dark .announce { background: linear-gradient(90deg, #1E2A18, #23331C, #1F2E1E); color: #C9D8C6; }
html.dark .sk { background: linear-gradient(90deg, #222A22 25%, #2B342B 37%, #222A22 63%); background-size: 400% 100%; }
html.dark table.tb th { background: #1B211B; }
html.dark table.tb tr:hover td { background: #1F261F; }
html.dark .canvas-wrap { background: rgba(20,26,20,.5); }
html.dark .canvas-dots { background-image: radial-gradient(circle, #2A332A 1px, transparent 1px); }
html.dark .canvas-edges path { stroke: #354136; }
html.dark ::-webkit-scrollbar-thumb { background: #33403A; background-clip: content-box; }

/* ============================================================
   深色 / 浅色开关（右上角，登录按钮左侧）
   ============================================================ */
.theme-sw {
  position: relative;
  width: 60px; height: 30px; flex: 0 0 60px;
  padding: 0; border: 1px solid var(--line); border-radius: 999px;
  background: var(--sunken); cursor: pointer; overflow: hidden;
  transition: background .22s, border-color .22s;
  -webkit-tap-highlight-color: transparent;
}
.theme-sw:hover { border-color: var(--green-line); }
.theme-sw .ts-knob {
  position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(31, 35, 33, .22);
  transition: transform .26s cubic-bezier(.34, 1.4, .64, 1), background .22s;
  z-index: 2;
}
.theme-sw .ts-ic {
  position: absolute; top: 50%; transform: translateY(-50%);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-3); transition: color .22s, opacity .22s;
}
.theme-sw .ts-ic svg { width: 14px; height: 14px; }
.theme-sw .ts-moon { left: 7px; opacity: 0; }
.theme-sw .ts-sun { right: 7px; opacity: 1; }
/* 深色态：滑块右移，月亮亮起 */
html.dark .theme-sw { background: #24301F; border-color: #33402F; }
html.dark .theme-sw .ts-knob { transform: translateX(30px); background: #E8F2E4; }
html.dark .theme-sw .ts-moon { opacity: 1; color: var(--green); }
html.dark .theme-sw .ts-sun { opacity: 0; }
.theme-sw .ts-knob + .ts-ic { z-index: 1; }

/* 页脚友链 */
.foot-title { color: var(--ink-3); font-size: 12.5px; margin-bottom: 2px; }
.foot-site { color: var(--ink-3); font-size: 12.5px; margin: 4px 0 0; font-family: var(--mono); }

/* ============================================================
   底部悬浮功能条（下滑后出现，可快速上传参考图 + 输入提示词）
   ============================================================ */
.dock {
  position: fixed; left: 50%; bottom: 22px; z-index: 120;
  width: min(820px, calc(100vw - 2 * var(--rail-w) - 48px));
  transform: translate(-50%, 24px);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: transform .3s cubic-bezier(.22, 1, .36, 1), opacity .24s, visibility .24s;
}
.dock.on { transform: translate(-50%, 0); opacity: 1; visibility: visible; pointer-events: auto; }
.dock-inner {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px 9px 10px;
  background: linear-gradient(140deg, rgba(252,254,250, .93), rgba(240,250,244, .9));
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: 999px;
  box-shadow: 0 14px 40px -14px rgba(31, 35, 33, .28), inset 0 1px 0 rgba(255, 255, 255, .9);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
}
html.dark .dock-inner {
  background: linear-gradient(140deg, rgba(30, 38, 29, .95), rgba(24, 34, 31, .93));
  border-color: rgba(255, 255, 255, .08);
  box-shadow: 0 14px 40px -14px rgba(0, 0, 0, .7);
}
.dock-up {
  flex: 0 0 38px; width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--line); background: #fff; color: #7C8A80;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  transition: color .16s, border-color .16s, transform .16s;
}
.dock-up:hover { color: var(--green-deep); border-color: var(--green-line); transform: translateY(-1px); }
.dock-up svg { width: 18px; height: 18px; }
html.dark .dock-up { background: rgba(255,255,255,.06); }
.dock-area { position: relative; flex: 1 1 auto; min-width: 0; }
.dock-input {
  width: 100%; max-height: 96px; overflow-y: auto; outline: none;
  font: 14px/1.6 var(--font); color: var(--ink); padding: 8px 2px;
}
.dock-input:empty::before { content: attr(data-placeholder); color: var(--ink-3); pointer-events: none; }
.dock .at-pop { bottom: calc(100% + 10px); top: auto; left: 0; }
.dock-model {
  flex: 0 0 auto; display: flex; align-items: center; gap: 6px;
  font-size: 12.5px; color: var(--ink-2); padding: 0 10px 0 4px;
  white-space: nowrap; max-width: 190px; overflow: hidden; text-overflow: ellipsis;
}
.dock-model svg { width: 14px; height: 14px; color: var(--green); flex: 0 0 14px; }
.dock-send {
  flex: 0 0 38px; width: 38px; height: 38px; border-radius: 50%; border: 0;
  background: var(--green); color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .16s, transform .16s;
}
.dock-send:hover { background: var(--green-deep); }
.dock-send:active { transform: scale(.94); }
.dock-send[disabled] { background: #B9C7BB; cursor: not-allowed; }
.dock-send svg { width: 17px; height: 17px; stroke-width: 1.9; }
.dock-chip {
  position: absolute; left: 50%; top: -30px; transform: translateX(-50%);
  background: rgba(28, 32, 30, .82); color: #fff; font-size: 12px;
  padding: 4px 12px; border-radius: 999px; white-space: nowrap;
  opacity: 0; transition: opacity .2s;
}
.dock-chip.on { opacity: 1; }
@media (max-width: 980px) {
  .dock { width: calc(100vw - 2 * var(--rail-w) - 24px); bottom: 14px; }
  .dock-model { display: none; }
}
/* ---------- 品牌 Logo（内联 SVG 或自定义图片都走这里） ---------- */
.rail-logo-mark { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; }
.rail-logo-mark svg { width: 100%; height: 100%; }
.rail-logo-mark img { width: 100%; height: 100%; object-fit: contain; }
.foot-logo-mark { display: flex; width: 30px; height: 30px; flex: 0 0 30px; margin-top: 2px; }
.foot-logo-mark svg, .foot-logo-mark img { width: 100%; height: 100%; object-fit: contain; }
.auth-box .auth-logo { display: flex; width: 52px; height: 52px; margin: 0 auto 18px; }
.auth-box .auth-logo svg, .auth-box .auth-logo img { width: 100%; height: 100%; object-fit: contain; }

/* ============================================================
   演员面板：居中大弹窗（不再贴右边，关闭按钮更明显）
   ============================================================ */
.modal-box.panel {
  position: relative; left: auto; right: auto; top: auto; bottom: auto;
  width: min(1080px, 94vw); max-width: min(1080px, 94vw); max-height: 88vh;
  border: 1px solid rgba(255, 255, 255, .9); border-radius: var(--r-xl);
  display: flex; flex-direction: column;
}
.modal-box.panel .modal-head { padding: 18px 30px 14px; border-bottom: 1px solid var(--line-soft); flex: 0 0 auto; }
.modal-box.panel .modal-body { flex: 1 1 auto; overflow: auto; padding: 22px 30px; }
.modal-box.panel .modal-foot { flex: 0 0 auto; padding: 14px 30px 18px; border-top: 1px solid var(--line-soft); background: rgba(255, 255, 255, .92); }

/* 关闭按钮：给足尺寸且不许被 flex 挤扁，暗色下也一眼能看见 */
.m-close {
  flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--sunken); color: var(--ink);
  font-size: 19px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center; padding: 0 0 2px;
}
.m-close:hover { background: var(--green-soft); color: var(--green-deep); border-color: var(--green-line); }

/* ============================================================
   滚动条：细一点、圆一点，暗色下换成半透明白
   ============================================================ */
.modal-box.panel .modal-body { scrollbar-width: thin; scrollbar-color: rgba(120, 132, 122, .35) transparent; }
.modal-box.panel .modal-body::-webkit-scrollbar { width: 10px; height: 10px; }
.modal-box.panel .modal-body::-webkit-scrollbar-track { background: transparent; }
.modal-box.panel .modal-body::-webkit-scrollbar-thumb {
  background: rgba(120, 132, 122, .34); border-radius: 999px;
  border: 3px solid transparent; background-clip: content-box;
}
.modal-box.panel .modal-body::-webkit-scrollbar-thumb:hover { background: rgba(120, 132, 122, .55); background-clip: content-box; }

/* ============================================================
   暗色补齐：把截图里那些「漏网」的模块单独配色
   ============================================================ */
html.dark .modal-box.panel { background: var(--surface); border-color: rgba(255, 255, 255, .08); }
html.dark .modal-box.panel .modal-head,
html.dark .modal-box.panel .modal-foot { border-color: var(--line-soft); }
html.dark .modal-box.panel .modal-foot { background: rgba(27, 33, 27, .94); }
html.dark .m-close { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .16); color: var(--ink); }
html.dark .m-close:hover { background: rgba(111, 203, 120, .16); color: var(--green); border-color: var(--green-line); }
html.dark .modal-box.panel .modal-body { scrollbar-color: rgba(255, 255, 255, .2) transparent; }
html.dark .modal-box.panel .modal-body::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .18); background-clip: content-box; }
html.dark .modal-box.panel .modal-body::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, .32); background-clip: content-box; }

/* 空图框：暗色下别用亮白块，用很淡的白叠加 */
html.dark .actor-empty,
html.dark .mf-box.empty,
html.dark .angle-box,
html.dark .actor-face.big-empty,
html.dark .self-one .face-big.empty {
  background: rgba(255, 255, 255, .05) !important;
  border-color: rgba(255, 255, 255, .16) !important;
  color: var(--ink-3) !important;
}
html.dark .actor-card:hover .actor-empty,
html.dark .mini-face:hover .mf-box.empty,
html.dark .angle-box:hover { background: rgba(111, 203, 120, .12) !important; color: var(--green) !important; border-color: var(--green-line) !important; }

/* 图框下面那排「上传」白按钮，暗色下太刺眼 */
html.dark .mini-btn { background: rgba(255, 255, 255, .07); border-color: rgba(255, 255, 255, .14); color: var(--ink-2); }
html.dark .mini-btn:hover { background: rgba(111, 203, 120, .14); border-color: var(--green-line); color: var(--green); }

/* 角度小标签（正脸 / 侧面 / 背面） */
html.dark .a-tag { background: rgba(255, 255, 255, .12); color: var(--ink); }

/* 输入类控件：暗色下别用近黑，稍微抬一点并保留边框 */
html.dark .input, html.dark .textarea, html.dark .select {
  background: #171D17; border-color: var(--line); color: var(--ink);
}
html.dark .input:focus, html.dark .textarea:focus, html.dark .select:focus {
  border-color: var(--green); box-shadow: 0 0 0 3px rgba(111, 203, 120, .16);
}
html.dark .input::placeholder, html.dark .textarea::placeholder { color: var(--ink-4); }

/* 页签 / 区块标题 / 各种说明文字 */
html.dark .as-tab { color: var(--ink-2); }
html.dark .as-tab:hover { color: var(--ink); }
html.dark .as-tab.on { background: linear-gradient(180deg, rgba(111, 203, 120, .2), rgba(111, 203, 120, .11)); color: var(--green); box-shadow: none; }
html.dark .as-tab i { background: rgba(255, 255, 255, .08); color: var(--ink-3); }
html.dark .as-hint, html.dark .ap-hint, html.dark .side-hint, html.dark .actor-quota, html.dark .self-one p { color: var(--ink-3); }
html.dark .ap-hint b { color: var(--green); }
html.dark .actor-dots i { background: rgba(255, 255, 255, .14); }
html.dark .actor-dots i.on { background: var(--green); }
html.dark .actor-card b { color: var(--ink); }
html.dark .mf-name { color: var(--ink-2); }
html.dark .actor-face { box-shadow: none; }
html.dark .self-one .face-big { box-shadow: none; }
html.dark .btn-soft { background: rgba(255, 255, 255, .07); color: var(--ink); border-color: var(--line); }
html.dark .btn-soft:hover { background: rgba(111, 203, 120, .14); color: var(--green); border-color: var(--green-line); }
html.dark .angle .a-tag { background: rgba(255, 255, 255, .1); }
/* 关闭按钮：原规则 .modal-head .m-close 特异性更高，用同等选择器覆盖 */
.modal-head .m-close {
  flex: 0 0 auto; margin-left: auto; width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--sunken); color: var(--ink);
  font-size: 19px; line-height: 1; padding: 0 0 2px;
  display: flex; align-items: center; justify-content: center;
}
.modal-head .m-close:hover { background: var(--green-soft); color: var(--green-deep); border-color: var(--green-line); }
html.dark .modal-head .m-close { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .16); color: var(--ink); }
html.dark .modal-head .m-close:hover { background: rgba(111, 203, 120, .16); color: var(--green); border-color: var(--green-line); }

/* 滚动条的暗色（浅色下已有样式，这里只补暗色一份） */
html.dark ::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, .16);
  border: 3px solid transparent; background-clip: content-box; border-radius: 99px;
}
html.dark ::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, .3); background-clip: content-box; }
html.dark { scrollbar-color: rgba(255, 255, 255, .2) transparent; }
/* ============================================================
   暗色总修：不透明深底 + 标题提亮
   ============================================================ */
html.dark {
  --surface: #1A201A;
  --surface-soft: #1F261F;
  --sunken: #161B16;
  --glass: rgba(255, 255, 255, .05);
  --glass-strong: rgba(255, 255, 255, .08);
}

/* 常见容器：不透明深底，别再让白色半透明露出来 */
html.dark .panel,
html.dark .panel-body,
html.dark .card,
html.dark .stat,
html.dark .asset,
html.dark .drop,
html.dark .search-box,
html.dark .toolbar,
html.dark .seg,
html.dark .as-tabs,
html.dark .batch-bar,
html.dark .drama-card,
html.dark .task-card,
html.dark .node,
html.dark .toast,
html.dark .dock,
html.dark .empty,
html.dark .pager,
html.dark .auth-box,
html.dark .split-side,
html.dark .as-sec,
html.dark .me-card {
  background: #1A201A !important;
  border-color: #2A332A !important;
  color: #ECF1EA;
}

/* 输入类：一律不透明 */
html.dark .input,
html.dark .textarea,
html.dark .select,
html.dark .composer,
html.dark .dock-inner,
html.dark .at-pop,
html.dark .dropdown {
  background: #151A15 !important;
  border-color: #2A332A !important;
  color: #ECF1EA !important;
}

/* 标题：一律亮色（原来有些是硬编码深色，在深底上根本看不见） */
html.dark h1, html.dark h2, html.dark h3, html.dark h4,
html.dark .hero-copy h1, html.dark .page-head h1, html.dark .page-head h2,
html.dark .panel-head h3, html.dark .as-sec-head h2, html.dark .me-info h2,
html.dark .drama-card b, html.dark .a-name, html.dark .stat b {
  color: #ECF1EA !important;
}
html.dark .hero-copy h1 .l2 { color: var(--green) !important; }
html.dark .l1, html.dark .l2 { color: inherit; }

/* 次要文字 */
html.dark .pf-hint, html.dark .hint, html.dark .stat span { color: #A9B5AB; }

/* 首页右上那个大绿色装饰：暗色下压暗，别抢戏 */
html.dark .hero-art { opacity: .22 !important; filter: saturate(.75); }

/* 左栏 / 顶栏：不透明深色，去掉透出来的浅色 */
html.dark .rail { background: #151A15 !important; border-color: #232B23 !important; }
html.dark .topbar { background: rgba(21, 26, 21, .92) !important; border-color: #232B23 !important; }
html.dark .rail-item { color: #A9B5AB; }
html.dark .rail-item:hover { color: #ECF1EA; background: rgba(255, 255, 255, .06); }
html.dark .rail-item.on { color: var(--green); background: rgba(111, 203, 120, .12); }
html.dark .rail-item.on svg { color: var(--green); }

/* 占位符、分割线、徽标 */
html.dark ::placeholder { color: #6B776C !important; }
html.dark .composer-input:empty::before,
html.dark .dock-input:empty::before { color: #6B776C !important; }
html.dark .chip, html.dark .tag { background: rgba(255, 255, 255, .08); color: #A9B5AB; }
html.dark .tile-dur, html.dark .a-label { background: rgba(0, 0, 0, .55); color: #ECF1EA; }
/* ============================================================
   暗色第四轮：堵住「底部发白」+ 补齐漏掉的亮色小片
   ============================================================ */
html.dark, html.dark body {
  background: #10140F !important;
  background-image: none !important;
  color: #ECF1EA;
}
html.dark::before {
  background: linear-gradient(180deg, #141A13 0%, #10140F 45%, #0B0E0A 100%) !important;
  background-attachment: fixed !important;
}

/* 页脚：透明 + 淡字（原来整条是浅色） */
html.dark .foot { background: transparent !important; border-color: #232B23 !important; }
html.dark .foot .foot-brand b { color: #ECF1EA !important; }
html.dark .foot .foot-brand p,
html.dark .foot .foot-links a,
html.dark .foot .foot-meta span { color: #78847A !important; }
html.dark .foot .foot-links a:hover { color: #86D98E !important; }

/* 作品页 / 任务页那排页签（上次漏了） */
html.dark .filter-tabs { background: #1A201A !important; border: 1px solid #2A332A !important; }
html.dark .filter-tabs a { color: #A9B5AB !important; }
html.dark .filter-tabs a.on { background: rgba(111, 203, 120, .16) !important; color: #86D98E !important; box-shadow: none !important; }

/* 「共 N 件 · 第 x / y 页」那一条 */
html.dark .pager { background: transparent !important; color: #78847A !important; border-color: #232B23 !important; }
html.dark .pager span { color: #78847A !important; }
html.dark .pager a { color: #86D98E !important; }
html.dark .pager a:hover { color: #A6E8AC !important; }

/* 其他小控件 */
html.dark .seg { background: #1A201A !important; }
html.dark .seg a { color: #A9B5AB !important; }
html.dark .seg .on { background: rgba(111, 203, 120, .16) !important; color: #86D98E !important; }
html.dark .toolbar { background: transparent !important; border-color: #232B23 !important; }
html.dark .grow { background: transparent !important; }
html.dark .rail-foot a, html.dark .rail-foot .rail-item { color: #A9B5AB !important; }
html.dark .rail-foot a:hover, html.dark .rail-foot .rail-item:hover { color: #ECF1EA !important; background: rgba(255, 255, 255, .06) !important; }
html.dark .rail-logo { color: #ECF1EA; }

/* 统计卡里的单位、篩选行里的次要文字 */
html.dark .stat b small { color: #78847A !important; }
html.dark .toolbar .btn { background: #1A201A !important; border-color: #2A332A !important; color: #ECF1EA !important; }
html.dark .toolbar .btn:hover { border-color: var(--green-line) !important; color: #86D98E !important; }
/* ============================================================
   1. 左栏分割线：暗色下改成渐变
   ============================================================ */
html.dark .rail::after {
  content: "";
  position: absolute;
  right: 0;
  top: 12px;
  bottom: 12px;
  width: 1px;
  background: linear-gradient(180deg, rgb(0 0 0 / 0%), rgb(0 102 35 / 50%) 18%, rgb(33 22 22 / 90%) 82%, rgba(255, 255, 255, 0));
}

/* ============================================================
   2. 卡片左对齐：<figure> 自带 margin: 1em 40px，
      作品卡是 <figure class="tile">，那 40px 把它整体推右了
   ============================================================ */
.tile, figure.tile { margin: 0 !important; }
.grid { justify-items: stretch; align-items: start; }
.grid > figure { margin: 0 !important; }

/* 顺便把作品流和素材流的第一列钉死在左边（不会被任何居中规则带偏） */
.grid, .asset-grid, .drama-list, .actor-grid { justify-content: start; }
/* ============================================================
   1. 空头像 / 空图框：暗色下压到接近纯黑（原来 rgba(255,255,255,.05) 还是灰的）
   ============================================================ */
html.dark .actor-empty,
html.dark .mf-box.empty,
html.dark .angle-box,
html.dark .actor-face.big-empty,
html.dark .self-one .face-big.is-empty {
  background: #141A14 !important;
  border-color: #2E3A2E !important;
  color: #6B776C !important;
}
html.dark .actor-card:hover .actor-empty,
html.dark .mini-face:hover .mf-box.empty,
html.dark .angle-box:hover {
  background: #182018 !important;
  border-color: var(--green-line) !important;
  color: var(--green) !important;
}

/* ============================================================
   2. 四个定妆照：弹窗加宽，图框排一排
   ============================================================ */
.modal-box.panel {
  width: min(1180px, 94vw) !important;
  max-width: min(1180px, 94vw) !important;
}
.ap-cols { grid-template-columns: 1fr; gap: 20px; }
.ap-angles { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; max-width: none; }
.ap-angles .angle-box { height: 150px; }
@media (max-width: 900px) {
  .ap-angles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ============================================================
   3. 只有头像本身可点（原来整条 div 都能点，右边空白也误触）
   ============================================================ */
.self-one .face-big { cursor: pointer; }
.self-one { cursor: default; }
/* ============================================================
   演员面板：左窄（信息）+ 右宽（四个定妆照）
   ============================================================ */
.modal-box.panel {
  width: min(1240px, 94vw) !important;
  max-width: min(1240px, 94vw) !important;
}
.ap-cols {
  grid-template-columns: minmax(0, 290px) minmax(0, 1fr) !important;
  gap: 28px !important;
  align-items: start;
}
.ap-angles { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; max-width: none; }
.ap-angles .angle-box { height: 172px; }
.ap-angles .mini-btn { height: 32px; font-size: 12.5px; }
/* 左栏的备注别撑太高 */
.ap-cols .textarea { min-height: 96px; }

@media (max-width: 1080px) {
  .ap-cols { grid-template-columns: 1fr !important; }
  .ap-angles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ap-angles .angle-box { height: 150px; }
}
/* 演员面板遮罩：模糊调重一点，让底下的页面明显退后，面板更突出 */
.modal-root.pinned .modal-mask {
  background: rgba(24, 34, 27, .22);
  backdrop-filter: blur(11px);
  -webkit-backdrop-filter: blur(11px);
}
/* ============================================================
   演员面板：流动的渐变边框 + 会呼吸的背景光晕
   ============================================================ */
.modal-box.panel {
  border: 1.5px solid transparent;
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    linear-gradient(120deg, #E28FBE, #7E2A9C 26%, #1FA8CF 58%, #62B96A 100%) border-box;
  background-size: 100% 100%, 320% 320%;
  animation: panelBorderFlow 9s linear infinite;
}
@keyframes panelBorderFlow {
  0%   { background-position: 0 0, 0% 50%; }
  100% { background-position: 0 0, 320% 50%; }
}

/* 背后那圈彩光：慢速呼吸 */
.modal-box.panel::after {
  content: "";
  position: absolute;
  inset: -22px;
  border-radius: calc(var(--r-xl) + 22px);
  background:
    radial-gradient(58% 58% at 18% 4%, rgba(226, 143, 190, .55), transparent 70%),
    radial-gradient(52% 52% at 86% 12%, rgba(31, 168, 207, .5), transparent 72%),
    radial-gradient(70% 58% at 52% 108%, rgba(98, 185, 106, .45), transparent 70%);
  filter: blur(36px);
  opacity: .42;
  z-index: -1;
  pointer-events: none;
  animation: panelGlowBreath 7s ease-in-out infinite;
}
@keyframes panelGlowBreath {
  0%, 100% { opacity: .3; transform: scale(.985); }
  50%      { opacity: .62; transform: scale(1.015); }
}

/* 暗色下光晕收一点，别糊成一片 */
html.dark .modal-box.panel::after { opacity: .3; filter: blur(44px); }
html.dark .modal-box.panel { animation-duration: 11s; }

/* 尊重「减少动态效果」的系统偏好 */
@media (prefers-reduced-motion: reduce) {
  .modal-box.panel, .modal-box.panel::after { animation: none; }
  .modal-box.panel::after { opacity: .34; }
}
/* ============================================================
   1. 光晕改用 box-shadow：绝对定位的伪元素超出面板会撑出滚动条
   ============================================================ */
.modal-box.panel::after { display: none !important; }
.modal-box.panel {
  overflow: hidden;
  animation: panelBorderFlow 9s linear infinite, panelShadowBreath 7s ease-in-out infinite;
}
@keyframes panelShadowBreath {
  0%, 100% {
    box-shadow:
      0 0 40px 2px rgba(226, 143, 190, .16),
      0 0 72px 16px rgba(31, 168, 207, .1),
      0 22px 60px -24px rgba(0, 0, 0, .45);
  }
  50% {
    box-shadow:
      0 0 62px 10px rgba(226, 143, 190, .3),
      0 0 112px 34px rgba(31, 168, 207, .2),
      0 22px 60px -24px rgba(0, 0, 0, .45);
  }
}
html.dark .modal-box.panel { animation-duration: 11s, 9s; }
@media (prefers-reduced-motion: reduce) {
  .modal-box.panel { animation: none; }
}

/* ============================================================
   2. 横滚动条：网格里的项允许收缩
   ============================================================ */
.modal-box.panel .modal-body { overflow-x: hidden; }
.ap-cols > *, .ap-angles > *, .ap-angles .angle { min-width: 0; }
.ap-angles .angle-box { width: 100%; }

/* ============================================================
   3. 左栏分割线：原来那段 90% 不透明的深褐看着像一条黑线
   ============================================================ */
html.dark .rail::after {
  background: linear-gradient(180deg,
    rgba(0, 102, 35, 0) 0%,
    rgba(111, 203, 120, .42) 18%,
    rgba(111, 203, 120, .3) 55%,
    rgba(31, 168, 207, .22) 82%,
    rgba(255, 255, 255, 0) 100%) !important;
}
/* ============================================================
   首页暗色修补
   ============================================================ */
/* 1. 输入框 / 底部功能条的占位文字：提亮到读得清 */
html.dark .composer-input:empty::before,
html.dark .dock-input:empty::before { color: #9AA69B !important; }
html.dark .composer-input,
html.dark .dock-input { color: #ECF1EA; }
html.dark .composer-input .at-chip,
html.dark .dock-input .at-chip { color: var(--green); }

/* 2. 主题开关：暗色下换成半透明白底 + 亮色滑块 */
html.dark .theme-sw { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .16); }
html.dark .theme-sw .ts-knob { background: #ECF1EA; box-shadow: 0 1px 3px rgba(0, 0, 0, .45); }
html.dark .theme-sw .ts-ic { color: #A9B5AB; }
html.dark .theme-sw:hover { background: rgba(255, 255, 255, .16); }

/* 3. 作品卡上的播放圆钮：暗色下用深色半透明 + 白图标 */
html.dark .tile-play { background: rgba(0, 0, 0, .5); color: #fff; box-shadow: none; }
html.dark .tile-play svg { fill: #fff; }
html.dark .tile-overlay { background: linear-gradient(180deg, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, .62) 100%); }

/* 4. 绿色按钮上的字：暗色下必须是深色，否则绿底绿字看不清 */
html.dark .btn-green,
html.dark .btn.btn-green,
html.dark .btn-green:hover,
html.dark .btn.btn-green:hover { color: #0F140E !important; }
html.dark .btn-soft { color: var(--ink) !important; }
html.dark .btn-soft:hover { color: #86D98E !important; }
/* ============================================================
   暗色第五轮
   ============================================================ */
/* 1. 输入框上那层白渐变：暗色下换成极淡的微光，别再糊一层白 */
html.dark .composer::after,
html.dark .dock-inner::after {
  background:
    radial-gradient(34% 40% at 8% 12%, rgba(255, 255, 255, .045), rgba(255, 255, 255, 0) 70%),
    radial-gradient(40% 44% at 96% 90%, rgba(111, 203, 120, .07), rgba(111, 203, 120, 0) 72%) !important;
}
/* 注意：.composer::before 现在被「聚焦彩环」复用（见文件末尾），
   这里千万别再清它的 background —— 会连彩环一起清掉，暗色下就看不到环了（踩过）。 */

/* 2. 分页按钮：底色也是亮的（上轮只改了字色） */
html.dark .pager a {
  background: rgba(255, 255, 255, .06) !important;
  border-color: var(--line) !important;
  color: #A9B5AB !important;
}
html.dark .pager a:hover { background: rgba(111, 203, 120, .16) !important; color: #86D98E !important; }

/* 3. 主题开关的日 / 月图标：暗色下月亮是黑的，等于看不见 */
html.dark .theme-sw .ts-ic { color: #A9B5AB !important; }
html.dark .theme-sw .ts-moon { color: #ECF1EA !important; }
html.dark .theme-sw .ts-sun { color: #F0C674 !important; }
html.dark .theme-sw .ts-knob { background: #ECF1EA !important; }

/* 4. 绿底按钮上的字：连子元素一起兜住，避免再出现「绿底绿字」 */
html.dark .btn-green,
html.dark .btn-green:hover,
html.dark .btn.btn-green,
html.dark .btn.btn-green:hover,
html.dark .btn-green *,
html.dark .btn.btn-green *,
html.dark [class*="btn-green"],
html.dark [class*="btn-green"] * { color: #0F140E !important; }
/* ============================================================
   输入框聚焦：转动的彩色描边（鼠标离开自动恢复默认）
   ============================================================ */
@property --pf-ring {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}
@keyframes pfRingSpin { to { --pf-ring: 360deg; } }
@keyframes pfRingBreath { 0%, 100% { opacity: .95; } 50% { opacity: .5; } }

.composer:focus-within::before,
.dock-inner:focus-within::before {
  content: "" !important;
  position: absolute !important;
  inset: -2px !important;
  border-radius: inherit !important;
  padding: 2px !important;
  background: conic-gradient(from var(--pf-ring),
    #E28FBE, #7E2A9C 22%, #1FA8CF 47%, #62B96A 71%, #E28FBE) !important;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0) !important;
  -webkit-mask-composite: xor !important;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0) !important;
  mask-composite: exclude !important;
  pointer-events: none !important;
  z-index: 3;
  animation: pfRingSpin 3.2s linear infinite, pfRingBreath 2.6s ease-in-out infinite;
}
/* 系统开了「减少动态效果」时，只保留呼吸、不转 */
@media (prefers-reduced-motion: reduce) {
  .composer:focus-within::before,
  .dock-inner:focus-within::before {
    animation: pfRingBreath 2.6s ease-in-out infinite;
  }
}
/* ============================================================
   暗色下的聚焦彩环（明确再声明一次，避免被别的 ::before 规则压掉）
   ============================================================ */
html.dark .composer:focus-within::before,
html.dark .dock-inner:focus-within::before {
  content: "" !important;
  position: absolute !important;
  inset: -2px !important;
  border-radius: inherit !important;
  padding: 2px !important;
  background: conic-gradient(from var(--pf-ring),
    #F0B7CE, #B93BA6 22%, #33DDF6 47%, #6FCB78 71%, #F0B7CE) !important;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0) !important;
  -webkit-mask-composite: xor !important;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0) !important;
  mask-composite: exclude !important;
  pointer-events: none !important;
  z-index: 3;
  animation: pfRingSpin 3.2s linear infinite, pfRingBreath 2.6s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
  html.dark .composer:focus-within::before,
  html.dark .dock-inner:focus-within::before {
    animation: pfRingBreath 2.6s ease-in-out infinite;
  }
}
/* ============================================================
   1. 生成参数弹窗：选项横排紧凑（原来 flex-basis 200px 撑出三四行）
   ============================================================ */
.inline-fields { gap: 10px 18px; }
.inline-fields > .check { flex: 0 0 auto; }

/* ============================================================
   2. 原生下拉：让浏览器按当前主题画列表（option 由系统渲染，只能这样给）
   ============================================================ */
select option {
  background: #fff;
  color: #243027;
  font-size: 14px;
  padding: 8px 10px;
}
html.dark { color-scheme: dark; }
html.dark select option {
  background: #1A201A;
  color: #ECF1EA;
}
html.dark .select,
html.dark .pill-select select { color: #ECF1EA; }

/* 输入框下那一排胶囊：暗色下 hover 别变成白的 */
html.dark .pill-select {
  background: rgba(255, 255, 255, .06);
  border-color: rgba(255, 255, 255, .12);
  color: var(--ink-2);
}
html.dark .pill-select:hover {
  background: rgba(255, 255, 255, .12);
  border-color: rgba(255, 255, 255, .2);
  color: var(--ink);
}
html.dark .pill-select svg.chev { color: #78847A; }
html.dark .composer-bar .tool-ico { background: rgba(255, 255, 255, .06); color: var(--ink-2); }
html.dark .composer-bar .tool-ico:hover { background: rgba(111, 203, 120, .16); color: #86D98E; }

/* 参数弹窗里的单选项：暗色下文字要亮 */
html.dark .check { color: var(--ink); }
/* ============================================================
   自绘下拉（替代原生 select，因为 Safari 的下拉列表没法用 CSS 控）
   ============================================================ */
.pf-sel-wrap { position: relative; display: inline-flex; align-items: center; }
.pf-sel-native {
  position: absolute !important; width: 1px !important; height: 1px !important;
  opacity: 0 !important; pointer-events: none !important; margin: 0 !important;
}
.pf-sel-btn {
  display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent;
  color: inherit; font: inherit; cursor: pointer; padding: 0; max-width: 100%;
}
.pf-sel-btn .pf-sel-txt { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pf-sel-btn .chev { width: 13px; height: 13px; color: #97A39A; flex: 0 0 auto; transition: transform .18s; }
.pf-sel-btn.open .chev { transform: rotate(180deg); }

.pf-sel-pop {
  position: absolute; left: 0; top: calc(100% + 8px); z-index: 90; min-width: 132px;
  display: flex; flex-direction: column; gap: 2px; padding: 6px;
  background: rgba(255, 255, 255, .99); border: 1px solid var(--line);
  border-radius: var(--r-md); box-shadow: var(--sh-3); backdrop-filter: blur(12px);
  animation: pfSelIn .16s cubic-bezier(.22, 1, .36, 1);
}
@keyframes pfSelIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.pf-sel-opt {
  display: block; width: 100%; text-align: left; white-space: nowrap;
  padding: 9px 13px; border: 0; border-radius: 9px; background: transparent;
  color: var(--ink-2); font-size: 13.5px; cursor: pointer; transition: background .14s, color .14s;
}
.pf-sel-opt:hover { background: var(--green-soft); color: var(--green-deep); }
.pf-sel-opt.on { background: var(--green-soft); color: var(--green-deep); font-weight: 500; }

/* 暗色 */
html.dark .pf-sel-pop { background: rgba(26, 32, 26, .985); border-color: #2A332A; }
html.dark .pf-sel-opt { color: #A9B5AB; }
html.dark .pf-sel-opt:hover,
html.dark .pf-sel-opt.on { background: rgba(111, 203, 120, .16); color: #86D98E; }
html.dark .pf-sel-btn .chev { color: #78847A; }

/* 原来 select 旁边那个静态箭头，现在由自绘按钮提供，藏掉免得出现两个 */
.pill-select > svg.chev { display: none !important; }
/* 自绘按钮要撑满胶囊的高度，才能整块可点 */
.pill-select .pf-sel-wrap { height: 100%; }
.pill-select .pf-sel-btn { height: 100%; }
/* ============================================================
   下拉浮在聚焦彩环之上
   （彩环 z-index:3 在 .composer 内；工具栏这一层整体提到它上面，
     这样里面的下拉、按钮就不会被彩环压住）
   ============================================================ */
.composer-bar,
.composer-top,
.dock-inner > * { position: relative; z-index: 4; }
.pill-select { position: relative; }
.pf-sel-wrap { position: relative; z-index: 5; }
.pf-sel-pop { z-index: 120 !important; }

/* 作品流 / 参数弹窗里的下拉也要浮在弹窗内容之上 */
.modal-box .pf-sel-pop { z-index: 150 !important; }
/* ============================================================
   藏掉被自绘替换的原生 select
   （JS 只加了 data-pf-sel 属性，类名那条漏了 —— 用属性选择器兜住）
   ============================================================ */
select[data-pf-sel="1"] {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
}
/* ============================================================
   积分与会员页
   ============================================================ */
.pay-notice {
  border: 1px solid #F0DCB4; background: #FEF8EC; color: #8A5A00;
  border-radius: var(--r-lg); padding: 14px 18px; font-size: 13.5px; line-height: 1.7; margin-bottom: 22px;
}
.pay-methods-line { margin-top: 20px; color: var(--ink-3); font-size: 12.5px; }

/* 积分包：数字做大，整块可点 */
.pack { cursor: pointer; transition: transform .18s, box-shadow .18s, border-color .18s; }
.pack:hover { transform: translateY(-3px); box-shadow: var(--sh-2); border-color: var(--green-line); }
.pack b { font-size: 30px; line-height: 1.1; }
.pack b small { font-size: 13px; font-weight: 400; margin-left: 4px; }
.pack-bonus { color: var(--green-deep); font-size: 12.5px; font-weight: 500; }
.pack-price { font-size: 17px; font-weight: 600; }

/* 暗色 */
html.dark .pay-notice { border-color: #4A3B18; background: rgba(240, 220, 180, .07); color: #E8C87A; }
html.dark .plan, html.dark .pack {
  background: #1A201A !important; border-color: #2A332A !important; color: #ECF1EA;
}
html.dark .plan.hot { border-color: var(--green-line) !important; box-shadow: 0 0 0 1px rgba(111, 203, 120, .25); }
html.dark .plan h3, html.dark .plan-price, html.dark .pack b, html.dark .pack-price { color: #ECF1EA !important; }
html.dark .plan-price small { color: #78847A !important; }
html.dark .plan-desc, html.dark .pack-name, html.dark .plan ul li span { color: #A9B5AB !important; }
html.dark .plan ul li svg { color: #86D98E !important; }
html.dark .pack-bonus { color: #86D98E; }
html.dark .plan-tag { background: rgba(111, 203, 120, .18); color: #86D98E; }
html.dark .tabs { background: #1A201A !important; border-color: #2A332A !important; }
html.dark .tabs button { color: #A9B5AB !important; background: transparent !important; }
html.dark .tabs button.on { background: rgba(111, 203, 120, .16) !important; color: #86D98E !important; }
html.dark .pay-methods-line { color: #78847A; }
/* ============================================================
   移动端：≤768px
   ============================================================ */
@media (max-width: 768px) {
  /* ---- 1. 左栏 → 底部导航 ---- */
  .shell { flex-direction: column; }
  .rail {
    position: fixed; left: 0; right: 0; bottom: 0; top: auto;
    width: 100%; height: 58px; flex: 0 0 auto;
    flex-direction: row; align-items: stretch; justify-content: space-between;
    padding: 0 4px; gap: 0;
    border-right: 0; border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, .93);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    z-index: 120;
  }
  .rail-logo { display: none; }
  .rail-nav, .rail-foot {
    flex-direction: row; flex: 1 1 auto; width: auto;
    justify-content: space-around; align-items: center; gap: 0; margin: 0;
  }
  .rail-item {
    width: auto; flex: 1 1 0; padding: 6px 0 4px; gap: 3px;
    border-radius: 12px; background: transparent;
  }
  .rail-item svg { width: 21px; height: 21px; }
  .rail-item span { font-size: 10px; letter-spacing: 0; }
  .rail-item:hover { background: transparent; }
  .rail-item.on { background: transparent; }
  .main { padding-bottom: 60px; }

  /* ---- 2. 顶部栏吸顶、更紧凑 ---- */
  .main-head { position: sticky; top: 0; z-index: 60; padding: 8px 12px; gap: 8px; }
  .announce { font-size: 12.5px; padding: 7px 12px; }

  /* ---- 3. 首页 hero 简化 ---- */
  .hero { padding: 8px 0 4px; }
  .hero-art { display: none; }
  .hero-copy h1 { font-size: 25px; line-height: 1.25; }
  .hero-copy h1 .l1, .hero-copy h1 .l2 { display: block; }
  .composer { border-radius: 20px; }
  .composer-top { gap: 8px; }
  .composer-input { font-size: 14px; min-height: 96px; }
  .composer-bar { flex-wrap: wrap; gap: 6px 8px; }

  /* 底部功能条在手机上会和底部导航叠在一起，藏掉 */
  .dock { display: none !important; }

  /* ---- 4. 内容：两列 + 收窄留白 ---- */
  .page, .wrap { padding-left: 14px; padding-right: 14px; }
  .grid-4, .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 12px !important; }
  .grid-2 { grid-template-columns: 1fr !important; }
  .assets, .asset-grid, .drama-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  /* 分类 / 筛选：横向滚动，不换行 */
  .cats, .filter-tabs, .seg {
    overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .cats::-webkit-scrollbar, .filter-tabs::-webkit-scrollbar, .seg::-webkit-scrollbar { display: none; }
  .cats a, .filter-tabs a, .seg a { white-space: nowrap; flex: 0 0 auto; }

  /* ---- 5. 卡片与统计 ---- */
  .tile-overlay { opacity: 1; background: linear-gradient(180deg, transparent 45%, rgba(0,0,0,.6) 100%); }
  .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 12px; }
  .stat b { font-size: 22px; }

  /* ---- 6. 弹窗几乎全屏 ---- */
  .modal-root { padding: 12px; align-items: flex-end; }
  .modal-box { max-width: 100%; border-radius: var(--r-lg) var(--r-lg) 0 0; max-height: 88vh; }
  .modal-box.wide, .modal-box.panel { max-width: 100% !important; width: 100% !important; }
  .ap-cols { grid-template-columns: 1fr !important; }
  .ap-angles { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }

  /* ---- 7. 页脚简化 ---- */
  .foot { padding: 22px 0 90px; }
  .foot-inner { flex-direction: column; gap: 20px; }
  .foot-links { gap: 12px; }

  /* ---- 8. 表格类页面（短剧分镜、作品筛选）不撑破屏幕 ---- */
  .toolbar { flex-wrap: wrap; gap: 8px; }
  .toolbar .input, .toolbar .select { min-width: 0; flex: 1 1 140px; }
  .table-wrap, .pf-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

/* 暗色下的底部导航 */
@media (max-width: 768px) {
  html.dark .rail {
    background: rgba(21, 26, 21, .95);
    border-top-color: #232B23;
  }
  html.dark .rail-item.on { color: var(--green); }
  html.dark .modal-box { background: var(--surface); }
}