/* =========================================================
   天问 OPC · 设计系统 v2
   版式：纯黑底上的电光蓝磨砂颗粒光场；双色标题（白 + 灰）、短横线眉题、药丸按钮
   ========================================================= */
:root {
  --bg: #000000; --bg-2: #07070B; --surface: #0E0E11; --surface-2: #141418;
  --ink: #F4F4F6; --ink-2: #A3A3AD; --ink-3: #686873; --ink-dim: #7B7B86;
  --brand: #6A7BFF; --brand-2: #1A33FF; --blue: #011EFF; --brand-ink: #FFFFFF; --cyan: #8FA0FF;
  --glass: rgba(16, 16, 20, .64); --glass-2: rgba(22, 22, 27, .9); --glass-3: rgba(255, 255, 255, .028);
  --stroke: rgba(255, 255, 255, .075); --line: rgba(255, 255, 255, .07); --line-2: rgba(255, 255, 255, .12);
  --shadow: 0 1px 0 rgba(255, 255, 255, .035) inset;
  --shadow-lg: 0 1px 0 rgba(255, 255, 255, .05) inset, 0 40px 90px -30px rgba(0, 0, 0, .95);
  --orb-1: rgba(1, 30, 255, .55); --orb-2: rgba(70, 56, 255, .32); --orb-3: rgba(150, 160, 255, .16);
  --good: #4BD69B; --good-bg: rgba(75, 214, 155, .12); --warn: #F2B544; --warn-bg: rgba(242, 181, 68, .13);
  --bad: #FF6B7D; --bad-bg: rgba(255, 107, 125, .13); --info-bg: rgba(26, 51, 255, .2);
  --input: rgba(255, 255, 255, .035); --hover: rgba(255, 255, 255, .05); --canvas-dot: rgba(255, 255, 255, .09);
  --btn-inv-bg: #FFFFFF; --btn-inv-ink: #0A0A0C;
  --logo-l: none; --logo-d: block; --grain-op: .11; --grain-blend: overlay;
  color-scheme: dark;
  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.92' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --font: "Inter", "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", system-ui, sans-serif;
  --display: "Inter", "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", system-ui, sans-serif;
  --mono: "JetBrains Mono", "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
  --r-sm: 10px; --r: 14px; --r-lg: 20px; --r-xl: 26px;
  --side: 248px;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
  --bg: #F1F1F3; --bg-2: #E8E8EC; --surface: #FFFFFF; --surface-2: #F7F7F9;
    --ink: #0A0A0C; --ink-2: #55555F; --ink-3: #91919B; --ink-dim: #8A8A94;
    --brand: #1A33FF; --brand-2: #1A33FF; --blue: #011EFF; --brand-ink: #FFFFFF; --cyan: #5B6CFF;
    --glass: rgba(255, 255, 255, .66); --glass-2: rgba(255, 255, 255, .92); --glass-3: rgba(10, 10, 20, .028);
    --stroke: rgba(10, 10, 20, .07); --line: rgba(10, 10, 20, .07); --line-2: rgba(10, 10, 20, .12);
    --shadow: 0 1px 2px rgba(10, 10, 30, .04);
    --shadow-lg: 0 30px 70px -30px rgba(10, 16, 60, .3);
    --orb-1: rgba(1, 30, 255, .2); --orb-2: rgba(90, 80, 255, .14); --orb-3: rgba(150, 165, 255, .2);
    --good: #0E9467; --good-bg: rgba(14, 148, 103, .1); --warn: #B86E00; --warn-bg: rgba(214, 140, 10, .12);
    --bad: #D2384B; --bad-bg: rgba(210, 56, 75, .1); --info-bg: rgba(26, 51, 255, .08);
    --input: rgba(255, 255, 255, .8); --hover: rgba(10, 10, 20, .045); --canvas-dot: rgba(10, 10, 20, .12);
    --btn-inv-bg: #0A0A0C; --btn-inv-ink: #FFFFFF;
    --logo-l: block; --logo-d: none; --grain-op: .09; --grain-blend: multiply;
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #F1F1F3; --bg-2: #E8E8EC; --surface: #FFFFFF; --surface-2: #F7F7F9;
  --ink: #0A0A0C; --ink-2: #55555F; --ink-3: #91919B; --ink-dim: #8A8A94;
  --brand: #1A33FF; --brand-2: #1A33FF; --blue: #011EFF; --brand-ink: #FFFFFF; --cyan: #5B6CFF;
  --glass: rgba(255, 255, 255, .66); --glass-2: rgba(255, 255, 255, .92); --glass-3: rgba(10, 10, 20, .028);
  --stroke: rgba(10, 10, 20, .07); --line: rgba(10, 10, 20, .07); --line-2: rgba(10, 10, 20, .12);
  --shadow: 0 1px 2px rgba(10, 10, 30, .04);
  --shadow-lg: 0 30px 70px -30px rgba(10, 16, 60, .3);
  --orb-1: rgba(1, 30, 255, .2); --orb-2: rgba(90, 80, 255, .14); --orb-3: rgba(150, 165, 255, .2);
  --good: #0E9467; --good-bg: rgba(14, 148, 103, .1); --warn: #B86E00; --warn-bg: rgba(214, 140, 10, .12);
  --bad: #D2384B; --bad-bg: rgba(210, 56, 75, .1); --info-bg: rgba(26, 51, 255, .08);
  --input: rgba(255, 255, 255, .8); --hover: rgba(10, 10, 20, .045); --canvas-dot: rgba(10, 10, 20, .12);
  --btn-inv-bg: #0A0A0C; --btn-inv-ink: #FFFFFF;
  --logo-l: block; --logo-d: none; --grain-op: .09; --grain-blend: multiply;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 14px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden; font-optical-sizing: auto; font-feature-settings: "cv11", "ss01";
}
h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -.025em; text-wrap: balance; font-weight: 600; font-family: var(--display); }
.dim { color: var(--ink-dim); }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
img { max-width: 100%; display: block; }
::selection { background: color-mix(in srgb, var(--brand-2) 30%, transparent); }
.num, .tabular { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-2); } .faint { color: var(--ink-3); }
.i { flex: none; display: inline-block; vertical-align: middle; }
:focus-visible { outline: 2px solid var(--brand-2); outline-offset: 2px; border-radius: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- 动态背景：电光蓝光场 + 全局颗粒 ---------- */
.atmos { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; background: var(--bg); }
.atmos .orb { position: absolute; border-radius: 50%; will-change: transform; animation: drift 26s ease-in-out infinite alternate; }
.atmos .o1 { width: 70vw; height: 70vw; left: -28vw; top: -40vw; background: radial-gradient(closest-side, var(--orb-1), transparent); }
.atmos .o2 { width: 55vw; height: 55vw; right: -24vw; bottom: -30vw; background: radial-gradient(closest-side, var(--orb-2), transparent); animation-duration: 32s; animation-direction: alternate-reverse; }
.atmos .o3 { width: 60vw; height: 22vw; left: 20vw; top: 34vh; background: radial-gradient(closest-side, var(--orb-3), transparent); animation-duration: 38s; transform-origin: 30% 50%; }
@keyframes drift { from { transform: translate3d(0, 0, 0) rotate(0deg) scale(1); } to { transform: translate3d(8vw, 6vh, 0) rotate(8deg) scale(1.15); } }
body::after { content: ""; position: fixed; inset: -60px; z-index: 300; pointer-events: none; background-image: var(--noise); background-size: 200px; opacity: var(--grain-op); mix-blend-mode: var(--grain-blend); animation: grainShift 1s steps(6) infinite; }
@keyframes grainShift { 0% { transform: translate(0, 0); } 17% { transform: translate(-22px, 14px); } 33% { transform: translate(18px, -26px); } 50% { transform: translate(-30px, -8px); } 67% { transform: translate(26px, 20px); } 83% { transform: translate(-8px, 30px); } 100% { transform: translate(0, 0); } }

/* ---------- 动态磨砂颗粒图（替代所有图片） ---------- */
.gx { position: absolute; inset: 0; overflow: hidden; border-radius: inherit; isolation: isolate; background: var(--gx-base, #04040A); contain: paint; }
.gx > i { position: absolute; left: var(--x); top: var(--y); width: var(--w); height: var(--hh, var(--w)); border-radius: 50%; background: radial-gradient(closest-side, var(--c), transparent 100%); transform: translate(-50%, -50%) rotate(var(--r, 0deg)); animation: gxMove var(--d, 14s) ease-in-out var(--dl, 0s) infinite alternate; will-change: transform; }
@keyframes gxMove { from { transform: translate(-50%, -50%) rotate(var(--r, 0deg)) scale(1); } to { transform: translate(calc(-50% + var(--tx, 0%)), calc(-50% + var(--ty, 0%))) rotate(calc(var(--r, 0deg) + var(--rr, 0deg))) scale(var(--sc, 1.1)); } }
.gx::after { content: ""; position: absolute; inset: -40px; background-image: var(--noise); background-size: 160px; opacity: var(--gx-grain, .55); mix-blend-mode: overlay; pointer-events: none; animation: grainShift .9s steps(5) infinite; }
.gx::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, var(--gx-fade, 0))); }
.gx .gx-ico { position: absolute; z-index: 2; left: 50%; top: 50%; transform: translate(-50%, -50%); color: rgba(255, 255, 255, .92); filter: drop-shadow(0 6px 20px rgba(0, 0, 40, .5)); }

/* ---------- 磨砂面板 ---------- */
.glass { background: var(--glass); border: 1px solid var(--stroke); box-shadow: var(--shadow); -webkit-backdrop-filter: blur(24px) saturate(140%); backdrop-filter: blur(24px) saturate(140%); }
.card { background: var(--glass); border: 1px solid var(--stroke); box-shadow: var(--shadow); border-radius: var(--r-lg); -webkit-backdrop-filter: blur(24px) saturate(140%); backdrop-filter: blur(24px) saturate(140%); padding: 22px; min-width: 0; }
.card.flat { box-shadow: none; background: var(--glass-3); }
.card.tight { padding: 16px; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.card-h h3 { font-size: 16px; font-weight: 600; }
.card-h .sub { font-size: 12.5px; color: var(--ink-3); }
.eyebrow-l { display: inline-flex; align-items: center; gap: 12px; font-size: 13.5px; color: var(--ink); font-weight: 500; }
.eyebrow-l::before { content: ""; width: 30px; height: 2px; border-radius: 2px; background: currentColor; }

/* ---------- 电光蓝颗粒面板（品牌色块） ---------- */
.grainbox { position: relative; overflow: hidden; isolation: isolate; background: #03041A; color: #fff;
  --ink: #FFFFFF; --ink-2: rgba(255, 255, 255, .76); --ink-3: rgba(255, 255, 255, .56); --ink-dim: rgba(255, 255, 255, .5); --brand: #fff;
  --line: rgba(255, 255, 255, .14); --line-2: rgba(255, 255, 255, .22); --glass: rgba(255, 255, 255, .08); --glass-2: rgba(255, 255, 255, .12); --glass-3: rgba(255, 255, 255, .07); --hover: rgba(255, 255, 255, .1); --stroke: rgba(255, 255, 255, .16); --input: rgba(255, 255, 255, .08); }
.grainbox::before { content: ""; position: absolute; inset: -35%; z-index: -1; pointer-events: none;
  background: radial-gradient(34% 30% at 30% 34%, rgba(1, 30, 255, .95), transparent 70%), radial-gradient(28% 16% at 66% 62%, rgba(170, 178, 255, .8), transparent 72%), radial-gradient(40% 36% at 82% 24%, rgba(70, 50, 255, .75), transparent 70%), radial-gradient(36% 30% at 20% 84%, rgba(20, 40, 220, .7), transparent 70%);
  animation: gbDrift 20s ease-in-out infinite alternate; }
.grainbox::after { content: ""; position: absolute; inset: -40px; z-index: -1; pointer-events: none; background-image: var(--noise); background-size: 170px; opacity: .55; mix-blend-mode: overlay; animation: grainShift .9s steps(5) infinite; }
@keyframes gbDrift { from { transform: rotate(0deg) scale(1); } 50% { transform: translate(4%, -3%) rotate(10deg) scale(1.08); } to { transform: translate(-3%, 4%) rotate(-6deg) scale(1.02); } }
.grainbox .btn.primary { background: #fff; color: #0A0A0C; box-shadow: none; }
.grainbox .tile { background: rgba(255, 255, 255, .1); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2); color: #fff; }
.grainbox .card, .grainbox .glass { background: rgba(255, 255, 255, .07); border-color: rgba(255, 255, 255, .14); }

/* ---------- Logo（主题切换） ---------- */
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: .02em; }
.logo img { width: 38px; height: auto; border-radius: 10px; }
.logo .wm b { font-weight: 600; letter-spacing: -.01em; }
.logo .l-light { display: var(--logo-l); }
.logo .l-dark { display: var(--logo-d); }
.logo .wm { display: flex; flex-direction: column; line-height: 1.1; }
.logo .wm b { font-size: 16px; }
.logo .wm small { font-size: 9.5px; font-weight: 500; color: var(--ink-3); letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; }

/* ---------- 图标块：深色磨砂方块 + 电光蓝底光 ---------- */
.tile { --h: 224; position: relative; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; color: var(--ink); flex: none; overflow: hidden;
  background: radial-gradient(120% 90% at 50% 120%, rgba(26, 51, 255, .55), transparent 62%), var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--line-2), inset 0 1px 0 rgba(255, 255, 255, .06); }
.tile::after { content: ""; position: absolute; inset: 0; background-image: var(--noise); background-size: 120px; opacity: .35; mix-blend-mode: overlay; pointer-events: none; }
.tile .i { position: relative; z-index: 1; }
.tile.sm { width: 34px; height: 34px; border-radius: 11px; }
.tile.lg { width: 56px; height: 56px; border-radius: 18px; }
.tile.on, .tile.blue { color: #fff; background: radial-gradient(120% 100% at 30% 0%, #6B7BFF, var(--brand-2) 55%, #0812A0); box-shadow: 0 10px 26px -10px rgba(1, 30, 255, .8), inset 0 1px 0 rgba(255, 255, 255, .3); }
.tile.soft { color: var(--brand); background: var(--info-bg); box-shadow: none; }
.tile.soft::after { display: none; }

/* ---------- 按钮 ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 18px; border-radius: 999px; font-weight: 500; font-size: 14px; white-space: nowrap; transition: transform .15s ease, box-shadow .2s ease, background .2s ease, opacity .2s, border-color .2s; user-select: none; }
.btn:active { transform: translateY(1px) scale(.985); }
.btn.primary { color: #fff; background: var(--brand-2); box-shadow: 0 10px 30px -12px rgba(1, 30, 255, .85), inset 0 1px 0 rgba(255, 255, 255, .22); }
.btn.primary:hover { background: #2B44FF; box-shadow: 0 14px 36px -10px rgba(1, 30, 255, .95), inset 0 1px 0 rgba(255, 255, 255, .28); }
.btn.inv { color: var(--btn-inv-ink); background: var(--btn-inv-bg); padding-right: 6px; gap: 12px; }
.btn.inv .arw { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--blue); color: #fff; transition: transform .25s; }
.btn.lg.inv .arw { width: 38px; height: 38px; }
.btn.inv:hover .arw { transform: rotate(45deg); }
.btn.ghost { background: var(--glass-3); border: 1px solid var(--line-2); color: var(--ink); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.btn.ghost:hover { background: var(--hover); border-color: var(--ink-3); }
.btn.plain { color: var(--ink-2); padding: 0 12px; }
.btn.plain:hover { background: var(--hover); color: var(--ink); }
.btn.danger { color: var(--bad); background: var(--bad-bg); }
.btn.good { color: var(--good); background: var(--good-bg); }
.btn.sm { height: 32px; padding: 0 13px; font-size: 13px; }
.btn.lg { height: 52px; padding: 0 26px; font-size: 15.5px; }
.btn.icon { width: 40px; padding: 0; }
.btn.icon.sm { width: 32px; }
.btn.block { width: 100%; }
.btn[disabled], .btn.loading { opacity: .55; pointer-events: none; }
.btn.loading::before { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 表单 ---------- */
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field > label, .label { font-size: 12.5px; font-weight: 600; color: var(--ink-2); letter-spacing: .02em; }
.field .hint { font-size: 12px; color: var(--ink-3); }
.input, .textarea, .select { width: 100%; height: 44px; padding: 0 14px; border-radius: 13px; border: 1px solid var(--line-2); background: var(--input); outline: none; transition: border .2s, box-shadow .2s, background .2s; }
.textarea { height: auto; min-height: 96px; padding: 12px 14px; resize: vertical; line-height: 1.6; }
.select { appearance: none; padding-right: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' stroke='%238891AE' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 18px; }
.input:focus, .textarea:focus, .select:focus { border-color: color-mix(in srgb, var(--brand-2) 60%, transparent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand-2) 16%, transparent); }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap > .i:first-child { position: absolute; left: 14px; color: var(--ink-3); pointer-events: none; }
.input-wrap .input { padding-left: 42px; }
.input-wrap .suffix { position: absolute; right: 6px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.nowrap { flex-wrap: nowrap; }
.stack { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.range { width: 100%; accent-color: var(--brand-2); }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; color: var(--ink-2); }
.check input { width: 16px; height: 16px; accent-color: var(--brand-2); }

/* 分段控件 / 芯片 */
.seg { display: inline-flex; padding: 4px; gap: 2px; border-radius: 999px; background: var(--glass-3); border: 1px solid var(--line); flex-wrap: wrap; }
.seg button { height: 32px; padding: 0 15px; border-radius: 999px; font-size: 13px; font-weight: 500; color: var(--ink-2); transition: all .2s; display: inline-flex; align-items: center; gap: 6px; }
.seg button:hover { color: var(--ink); }
.seg button.on { background: var(--ink); color: var(--bg); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; font-size: 13px; color: var(--ink-2); transition: all .2s; cursor: pointer; }
.chip:hover { color: var(--ink); border-color: var(--ink-3); }
.chip.on { color: #fff; background: var(--brand-2); border-color: transparent; }
.pill { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--info-bg); color: var(--brand); }
.pill.good { background: var(--good-bg); color: var(--good); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.bad { background: var(--bad-bg); color: var(--bad); }
.pill.mute { background: var(--hover); color: var(--ink-2); }
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* 头像 */
.av { --h: 220; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex: none; color: #fff; font-weight: 600; font-size: 14px; position: relative; overflow: hidden;
  background: radial-gradient(90% 90% at 28% 22%, hsl(calc(226 + var(--h) / 12) 100% 76%), hsl(calc(232 + var(--h) / 18) 100% 48%) 45%, #050620 100%); box-shadow: 0 0 0 2px var(--bg); }
.av::after { content: ""; position: absolute; inset: 0; background-image: var(--noise); background-size: 90px; opacity: .45; mix-blend-mode: overlay; }
.av.sm { width: 28px; height: 28px; font-size: 12px; } .av.lg { width: 64px; height: 64px; font-size: 24px; }
.av-stack { display: flex; } .av-stack .av { margin-left: -8px; } .av-stack .av:first-child { margin-left: 0; }

/* ---------- 应用框架 ---------- */
.shell { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: 100%; }
.side { position: sticky; top: 0; height: 100vh; padding: 16px 14px; display: flex; flex-direction: column; gap: 10px; z-index: 30; }
.side-inner { flex: 1; display: flex; flex-direction: column; border-radius: var(--r-xl); padding: 18px 12px 12px; min-height: 0; }
.side .logo { padding: 0 8px 16px; }
.nav { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; padding-right: 2px; scrollbar-width: thin; }
.nav-g { font-size: 11px; font-weight: 600; letter-spacing: .14em; color: var(--ink-3); padding: 14px 12px 6px; }
.nav a { position: relative; display: flex; align-items: center; gap: 11px; height: 40px; padding: 0 12px; border-radius: 12px; color: var(--ink-2); font-weight: 550; transition: background .2s, color .2s; }
.nav a:hover { background: var(--hover); color: var(--ink); }
.nav a.on { color: #fff; background: var(--brand-2); box-shadow: 0 8px 24px -10px rgba(1, 30, 255, .8); }
.nav a.on .i { color: #fff; }
.nav a .badge { margin-left: auto; font-size: 11px; min-width: 20px; height: 20px; border-radius: 10px; display: grid; place-items: center; padding: 0 6px; background: var(--bad); color: #fff; font-weight: 700; }
.side-foot { margin-top: 10px; padding: 14px; border-radius: 18px; }
.side-foot b { font-size: 13px; } .side-foot p { font-size: 12px; color: var(--ink-2); margin: 4px 0 10px; }

.main { min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; padding: 16px 24px 0 8px; }
.top-inner { display: flex; align-items: center; gap: 12px; height: 60px; padding: 0 10px 0 18px; border-radius: 999px; }
.top h1 { font-size: 17px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top .crumb { font-size: 12px; color: var(--ink-3); }
.top .spacer { flex: 1; }
.search-btn { display: flex; align-items: center; gap: 10px; height: 40px; width: 260px; padding: 0 14px; border-radius: 999px; background: var(--glass-3); border: 1px solid var(--line); color: var(--ink-3); font-size: 13px; }
.search-btn kbd { margin-left: auto; font-family: var(--mono); font-size: 11px; padding: 2px 6px; border-radius: 6px; border: 1px solid var(--line-2); }
.meter { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 999px; background: var(--glass-3); border: 1px solid var(--line); font-weight: 600; font-size: 13px; white-space: nowrap; }
.meter .i { color: var(--brand); }
.iconbtn { position: relative; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: var(--ink-2); transition: background .2s, color .2s; }
.iconbtn:hover { background: var(--hover); color: var(--ink); }
.iconbtn .dotn { position: absolute; top: 9px; right: 10px; width: 8px; height: 8px; border-radius: 50%; background: var(--bad); box-shadow: 0 0 0 2px var(--glass-2); }
.menu-btn { display: none; }
.page { padding: 22px 24px 48px 8px; display: flex; flex-direction: column; gap: 20px; min-width: 0; animation: pageIn .45s cubic-bezier(.2, .7, .2, 1); }
@keyframes pageIn { from { transform: translateY(8px); opacity: .4; } to { transform: none; opacity: 1; } }
.page-h { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 6px; }
.page-h .eyebrow-l { margin-bottom: 14px; }
.page-h h2 { font-size: clamp(28px, 3vw, 40px); font-weight: 500; letter-spacing: -.04em; line-height: 1.1; }
.page-h h2 .dim { color: var(--ink-dim); }
.page-h p { color: var(--ink-2); margin-top: 10px; max-width: 62ch; font-size: 14.5px; }
.mode-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--warn); background: var(--warn-bg); padding: 3px 10px; border-radius: 999px; font-weight: 600; }

/* 统计块 */
.kpi { display: flex; flex-direction: column; gap: 10px; }
.kpi .k-top { display: flex; align-items: center; justify-content: space-between; }
.kpi .k-label { font-size: 13px; color: var(--ink-2); font-weight: 550; }
.kpi .k-val { font-size: 30px; font-weight: 500; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.kpi .k-val small { font-size: 14px; font-weight: 600; color: var(--ink-3); margin-left: 2px; }
.kpi .k-foot { font-size: 12px; color: var(--ink-3); display: flex; align-items: center; gap: 6px; }
.up { color: var(--good); font-weight: 600; }

/* 列表 */
.list { display: flex; flex-direction: column; }
.li { display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--line); min-width: 0; }
.li:last-child { border-bottom: 0; }
.li .grow { flex: 1; min-width: 0; }
.li .t { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li .s { font-size: 12.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.table-wrap { overflow-x: auto; }
table.tb { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tb th { text-align: left; font-size: 12px; font-weight: 600; color: var(--ink-3); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tb td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tb tr:last-child td { border-bottom: 0; }
.tb tr:hover td { background: var(--hover); }

.progress { height: 8px; border-radius: 99px; background: var(--hover); overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--brand-2), #8C9BFF); transition: width .6s cubic-bezier(.2, .7, .2, 1); }

.empty { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px; padding: 40px 20px; color: var(--ink-3); }
.empty .tile { margin-bottom: 6px; }
.empty b { color: var(--ink); font-size: 15px; }

/* 封面（生成艺术） */
.cover { position: relative; border-radius: var(--r); overflow: hidden; aspect-ratio: 16 / 9; max-width: 100%; background: var(--hover); }
.cover canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.cover .cover-tag { position: absolute; left: 12px; top: 12px; }
.cover .cover-ico { position: absolute; right: 12px; bottom: 12px; }

/* 卡片网格（课程/商品/IP） */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.item { display: flex; flex-direction: column; gap: 12px; padding: 12px 12px 16px; border-radius: var(--r-lg); transition: transform .25s cubic-bezier(.2, .7, .2, 1), box-shadow .25s; cursor: pointer; }
.item:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.item .body { padding: 0 6px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.item h4 { font-size: 15.5px; font-weight: 650; }
.item .desc { font-size: 13px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.item .meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; font-size: 12.5px; color: var(--ink-3); }
.price { font-size: 18px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.price small { font-size: 12px; color: var(--ink-3); font-weight: 600; }

/* ---------- 弹窗 / 抽屉 / 提示 ---------- */
.overlay { position: fixed; inset: 0; z-index: 100; background: rgba(6, 10, 30, .32); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 20px; animation: fadeIn .2s ease; }
.overlay.right { place-items: stretch end; padding: 12px; }
.modal { width: min(560px, 100%); max-height: calc(100vh - 40px); overflow: auto; border-radius: var(--r-xl); padding: 26px; background: var(--glass-2); border: 1px solid var(--stroke); box-shadow: var(--shadow-lg); -webkit-backdrop-filter: blur(30px) saturate(180%); backdrop-filter: blur(30px) saturate(180%); animation: pop .3s cubic-bezier(.2, .8, .2, 1.1); }
.modal.wide { width: min(860px, 100%); }
.drawer { width: min(460px, 100%); height: 100%; overflow: auto; border-radius: var(--r-xl); padding: 24px; background: var(--glass-2); border: 1px solid var(--stroke); box-shadow: var(--shadow-lg); -webkit-backdrop-filter: blur(30px) saturate(180%); backdrop-filter: blur(30px) saturate(180%); animation: slideIn .35s cubic-bezier(.2, .8, .2, 1); }
.modal-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.modal-h h3 { font-size: 19px; }
.modal-h p { font-size: 13px; color: var(--ink-2); margin-top: 4px; }
.modal-f { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.97); } }
@keyframes slideIn { from { opacity: 0; transform: translateX(30px); } }
.toasts { position: fixed; z-index: 200; top: calc(18px + env(safe-area-inset-top, 0px)); left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; padding: 11px 16px; border-radius: 14px; background: var(--glass-2); border: 1px solid var(--stroke); box-shadow: var(--shadow-lg); -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); font-weight: 550; font-size: 13.5px; animation: pop .3s cubic-bezier(.2, .8, .2, 1.1); max-width: min(92vw, 480px); }
.toast.good .i { color: var(--good); } .toast.bad .i { color: var(--bad); } .toast.info .i { color: var(--brand); }
.pop-menu { position: absolute; top: calc(100% + 8px); right: 0; z-index: 50; width: 340px; max-height: 70vh; overflow: auto; padding: 8px; border-radius: 18px; background: var(--glass-2); border: 1px solid var(--stroke); box-shadow: var(--shadow-lg); -webkit-backdrop-filter: blur(30px); backdrop-filter: blur(30px); animation: pop .2s ease; }
.pop-menu .mi { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 12px; text-align: left; font-size: 13.5px; }
.pop-menu .mi:hover { background: var(--hover); }
.pop-menu .sep { height: 1px; background: var(--line); margin: 6px 4px; }

/* 命令面板 */
.cmdk { width: min(620px, 100%); align-self: start; margin-top: 12vh; padding: 0; overflow: hidden; }
.cmdk .input-wrap { padding: 14px; border-bottom: 1px solid var(--line); }
.cmdk .input { border: 0; background: transparent; box-shadow: none !important; font-size: 16px; }
.cmdk .res { max-height: 50vh; overflow: auto; padding: 8px; }
.cmdk .res .mi { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 12px; width: 100%; text-align: left; }
.cmdk .res .mi.on, .cmdk .res .mi:hover { background: var(--hover); }

/* ---------- 登录注册 ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 16px; padding: 16px max(16px, env(safe-area-inset-right, 0px)) 16px max(16px, env(safe-area-inset-left, 0px)); }
.auth-brand { border-radius: 30px; padding: 40px; display: flex; flex-direction: column; justify-content: space-between; min-height: 600px; }
.auth-brand .top-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.auth-brand .back { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px 0 10px; border-radius: 999px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18); font-size: 13px; }
.auth-brand .big-logo { width: 64px; border-radius: 16px; }
.auth-brand .wordmark { display: block; white-space: normal; text-align: left; font-family: "Noto Sans SC", var(--display); font-weight: 900; font-size: clamp(72px, 9vw, 150px); line-height: .92; letter-spacing: -.04em; }
.auth-brand h2 { font-size: clamp(24px, 2.4vw, 34px); font-weight: 500; letter-spacing: -.035em; line-height: 1.2; margin-top: 22px; }
.auth-brand h2 .dim { color: rgba(255, 255, 255, .55); }
.auth-brand .rule { display: flex; align-items: center; gap: 18px; font-size: 15px; color: rgba(255, 255, 255, .85); }
.auth-brand .rule i { flex: 1; height: 1px; background: rgba(255, 255, 255, .3); }
.auth-side { display: grid; place-items: center; padding: 20px 0; }
.auth-card { width: min(440px, 100%); border-radius: 28px; padding: 34px; }
.auth-card h3 { font-size: 30px; font-weight: 500; letter-spacing: -.04em; }
.auth-card .sub { color: var(--ink-2); margin: 8px 0 26px; }
.auth-card form { display: flex; flex-direction: column; gap: 14px; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--ink-3); font-size: 12px; margin: 6px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }
.err { color: var(--bad); font-size: 13px; min-height: 18px; }
.pw-meter { display: flex; gap: 4px; } .pw-meter i { flex: 1; height: 4px; border-radius: 4px; background: var(--hover); transition: background .3s; }

/* ---------- 工作台 ---------- */
.welcome { position: relative; overflow: hidden; padding: 32px; border-radius: var(--r-xl); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: center; }
.welcome h2 { font-size: clamp(26px, 2.6vw, 34px); font-weight: 500; letter-spacing: -.035em; }
.welcome .qa { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.welcome .wallet { display: flex; gap: 12px; }
.welcome .wallet .w { padding: 14px 18px; border-radius: 18px; min-width: 140px; }
.welcome .wallet .w span { font-size: 12px; color: var(--ink-3); display: flex; align-items: center; gap: 6px; }
.welcome .wallet .w b { font-size: 26px; font-weight: 500; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.dash { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.chart { width: 100%; height: 200px; display: block; }
.chart text { fill: var(--ink-3); font-size: 11px; font-family: var(--font); }

/* ---------- 入驻 ---------- */
.steps { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.steps .st { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-3); font-weight: 600; }
.steps .st .n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line-2); font-size: 12px; }
.steps .st.on { color: var(--ink); } .steps .st.on .n { background: var(--brand-2); color: #fff; border-color: transparent; }
.steps .bar { width: 36px; height: 1px; background: var(--line-2); }
.choice { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.choice button { text-align: left; padding: 18px; border-radius: 20px; display: flex; flex-direction: column; gap: 12px; border: 1px solid var(--line); background: var(--glass-3); transition: all .2s; }
.choice button:hover { border-color: color-mix(in srgb, var(--brand-2) 40%, var(--line)); }
.choice button.on { border-color: var(--brand-2); background: var(--glass-2); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand-2) 14%, transparent); }
.choice b { font-size: 15px; } .choice span { font-size: 12.5px; color: var(--ink-2); }
.timeline { display: flex; flex-direction: column; gap: 0; }
.timeline .tl { display: grid; grid-template-columns: 28px 1fr; gap: 12px; padding-bottom: 18px; position: relative; }
.timeline .tl::before { content: ""; position: absolute; left: 13px; top: 28px; bottom: 0; width: 1px; background: var(--line-2); }
.timeline .tl:last-child::before { display: none; }
.timeline .tl .d { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--hover); color: var(--ink-3); }
.timeline .tl.ok .d { background: var(--good-bg); color: var(--good); }
.timeline .tl.cur .d { background: var(--info-bg); color: var(--brand); }

/* ---------- 学院 ---------- */
.lesson { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 16px; transition: background .2s; cursor: pointer; }
.lesson:hover { background: var(--hover); }
.lesson .no { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--hover); font-size: 13px; font-weight: 700; color: var(--ink-2); font-family: var(--mono); flex: none; }
.lesson.done .no { background: var(--good-bg); color: var(--good); }
.player { position: relative; aspect-ratio: 16 / 9; border-radius: 18px; overflow: hidden; background: #050814; max-width: 100%; }
.player canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.player .ctrl { position: absolute; left: 12px; right: 12px; bottom: 12px; display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 14px; background: rgba(10, 16, 40, .55); color: #fff; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.player .ctrl .progress { flex: 1; background: rgba(255, 255, 255, .18); height: 5px; cursor: pointer; }
.player .ctrl button { color: #fff; }
.player .ctrl span { font-size: 12px; font-family: var(--mono); }

/* ---------- AI 工作室 ---------- */
.studio { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 16px; min-height: calc(100vh - 140px); }
.rail { display: flex; flex-direction: column; gap: 6px; padding: 10px 8px; border-radius: 24px; position: sticky; top: 96px; align-self: start; }
.rail a { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 8px 4px; border-radius: 14px; font-size: 11.5px; color: var(--ink-2); font-weight: 600; transition: background .2s; }
.rail a:hover { background: var(--hover); }
.rail a.on { background: var(--glass-2); color: var(--ink); box-shadow: inset 0 0 0 1px var(--stroke); }
.rail a .tile { width: 38px; height: 38px; border-radius: 13px; }
.rail a:not(.on) .tile { filter: saturate(.75); opacity: .85; }
.work { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 16px; align-items: start; }
.work .params { position: sticky; top: 96px; }
.output { min-height: 520px; display: flex; flex-direction: column; gap: 16px; }
.cost { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; opacity: .85; padding: 2px 8px; border-radius: 999px; background: rgba(255, 255, 255, .18); }
.gen-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.gen-grid .gi { position: relative; border-radius: 18px; overflow: hidden; background: var(--hover); }
.gen-grid .gi canvas { width: 100%; height: auto; display: block; }
.gen-grid .gi .acts { position: absolute; right: 10px; bottom: 10px; display: flex; gap: 6px; opacity: 0; transition: opacity .2s; }
.gen-grid .gi:hover .acts { opacity: 1; }
.gen-grid .gi .acts button { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; color: #fff; background: rgba(8, 14, 40, .5); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.screenplay { font-size: 14.5px; line-height: 1.85; }
.screenplay .sc { padding: 18px 0; border-bottom: 1px dashed var(--line-2); }
.screenplay .sc:last-child { border-bottom: 0; }
.screenplay .sh { font-weight: 700; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.screenplay .sd { color: var(--ink-2); margin: 6px 0 10px; font-style: italic; }
.screenplay .ln { display: grid; grid-template-columns: 76px 1fr; gap: 12px; padding: 3px 0; }
.screenplay .ln b { color: var(--brand); font-weight: 650; }
.history { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.history .h { display: flex; gap: 10px; align-items: center; padding: 10px; border-radius: 14px; border: 1px solid var(--line); background: var(--glass-3); cursor: pointer; min-width: 0; }
.history .h:hover { border-color: color-mix(in srgb, var(--brand-2) 40%, var(--line)); }
.history .h .t { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.history .h .s { font-size: 11.5px; color: var(--ink-3); }
.viz { width: 100%; height: 160px; display: block; border-radius: 16px; background: var(--hover); }
.storyboard { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.storyboard .shot { border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: var(--glass-3); font-size: 12px; cursor: pointer; }
.storyboard .shot.on { border-color: var(--brand-2); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-2) 20%, transparent); }
.storyboard .shot canvas { width: 100%; aspect-ratio: 16 / 10; display: block; }
.storyboard .shot div { padding: 8px 10px; }
.sfx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.sfx-grid button { padding: 14px 10px; border-radius: 16px; border: 1px solid var(--line); background: var(--glass-3); display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; transition: all .2s; }
.sfx-grid button:hover { transform: translateY(-2px); }
.sfx-grid button.on { border-color: var(--brand-2); background: var(--glass-2); }

/* 剪辑时间线 */
.editor { display: grid; grid-template-columns: 240px minmax(0, 1fr) 240px; gap: 14px; }
.lib { display: flex; flex-direction: column; gap: 8px; max-height: 420px; overflow: auto; }
.lib .lc { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; border: 1px solid var(--line); background: var(--glass-3); cursor: grab; font-size: 12.5px; }
.lib .lc:hover { border-color: color-mix(in srgb, var(--brand-2) 40%, var(--line)); }
.lib .lc .thumb { width: 44px; height: 30px; border-radius: 8px; overflow: hidden; flex: none; }
.lib .lc .thumb canvas { width: 100%; height: 100%; display: block; }
.preview-box { position: relative; width: 100%; aspect-ratio: 16 / 9; max-width: 100%; border-radius: 16px; overflow: hidden; background: #000; }
.preview-box canvas { width: 100%; height: 100%; display: block; }
.timeline-box { margin-top: 14px; border-radius: 18px; border: 1px solid var(--line); background: var(--glass-3); overflow-x: auto; position: relative; user-select: none; }
.tl-inner { position: relative; min-width: 100%; }
.tl-ruler { height: 26px; border-bottom: 1px solid var(--line); position: relative; font-size: 10.5px; color: var(--ink-3); font-family: var(--mono); cursor: pointer; }
.tl-ruler span { position: absolute; top: 5px; transform: translateX(3px); }
.tl-ruler i { position: absolute; bottom: 0; width: 1px; height: 6px; background: var(--line-2); }
.tl-track { position: relative; height: 54px; border-bottom: 1px solid var(--line); }
.tl-track:last-child { border-bottom: 0; }
.tl-track .tl-lab { position: sticky; left: 0; z-index: 3; display: inline-flex; align-items: center; gap: 6px; height: 100%; padding: 0 10px; font-size: 11.5px; color: var(--ink-3); font-weight: 600; background: linear-gradient(90deg, var(--glass-2) 70%, transparent); width: 74px; }
.clip { position: absolute; top: 8px; height: 38px; border-radius: 10px; padding: 0 10px; display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: #fff; overflow: hidden; white-space: nowrap; cursor: grab; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 6px 14px -8px rgba(0, 0, 0, .5); }
.clip.sel { outline: 2px solid #fff; outline-offset: -2px; box-shadow: 0 0 0 3px var(--brand-2); }
.clip .rh { position: absolute; right: 0; top: 0; bottom: 0; width: 8px; cursor: ew-resize; background: rgba(255, 255, 255, .25); }
.playhead { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--bad); z-index: 4; pointer-events: none; }
.playhead::before { content: ""; position: absolute; top: 0; left: -5px; width: 12px; height: 12px; border-radius: 3px 3px 6px 6px; background: var(--bad); }

/* 自由画布 */
.board-wrap { position: relative; height: calc(100vh - 150px); min-height: 520px; border-radius: var(--r-xl); overflow: hidden; }
.board { position: absolute; inset: 0; overflow: hidden; cursor: default; touch-action: none;
  background-image: radial-gradient(var(--canvas-dot) 1.2px, transparent 1.2px); background-size: 24px 24px; }
.board.pan { cursor: grab; } .board.panning { cursor: grabbing; } .board.draw { cursor: crosshair; }
.world { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.world svg.links { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; }
.node { position: absolute; border-radius: 16px; padding: 14px; font-size: 14px; line-height: 1.6; box-shadow: 0 14px 30px -18px rgba(10, 20, 60, .5); cursor: move; user-select: none; }
.node.note { background: var(--nc, #FFF3B8); color: #1D1A0E; }
.node.text { background: transparent; box-shadow: none; padding: 4px; font-size: 22px; font-weight: 700; color: var(--ink); }
.node.rect { background: color-mix(in srgb, var(--nc, #3D68FF) 18%, transparent); border: 2px solid var(--nc, #3D68FF); color: var(--ink); display: grid; place-items: center; text-align: center; }
.node.ellipse { background: color-mix(in srgb, var(--nc, #2CB5EE) 18%, transparent); border: 2px solid var(--nc, #2CB5EE); color: var(--ink); border-radius: 50%; display: grid; place-items: center; text-align: center; }
.node.image { padding: 6px; background: var(--glass-2); border: 1px solid var(--stroke); }
.node.image canvas, .node.image img { width: 100%; height: 100%; border-radius: 11px; display: block; pointer-events: none; }
.node.scene { background: var(--glass-2); border: 1px solid var(--stroke); color: var(--ink); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.node.scene .sh { font-size: 12px; font-weight: 700; color: var(--brand); margin-bottom: 6px; }
.node.sel { outline: 2px solid var(--brand-2); outline-offset: 3px; }
.node.link-src { outline: 2px dashed var(--cyan); outline-offset: 3px; }
.node .txt { outline: none; white-space: pre-wrap; word-break: break-word; min-height: 1em; }
.node .txt[contenteditable="true"] { cursor: text; user-select: text; }
.node .rz { position: absolute; right: -6px; bottom: -6px; width: 14px; height: 14px; border-radius: 5px; background: var(--brand-2); border: 2px solid #fff; cursor: nwse-resize; display: none; }
.node.sel .rz { display: block; }
.board-tools { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 5; display: flex; gap: 4px; padding: 6px; border-radius: 18px; }
.board-tools button { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; color: var(--ink-2); position: relative; }
.board-tools button:hover { background: var(--hover); color: var(--ink); }
.board-tools button.on { background: var(--brand-2); color: #fff; }
.board-tools .sep { width: 1px; background: var(--line-2); margin: 6px 4px; }
.board-tools button[data-k]::after { content: attr(data-k); position: absolute; right: 3px; bottom: 1px; font-size: 9px; opacity: .55; font-family: var(--mono); }
.board-side { position: absolute; right: 14px; top: 14px; z-index: 5; width: 240px; padding: 14px; border-radius: 18px; display: flex; flex-direction: column; gap: 10px; }
.board-zoom { position: absolute; left: 14px; bottom: 14px; z-index: 5; display: flex; align-items: center; gap: 4px; padding: 6px; border-radius: 14px; font-size: 12px; font-family: var(--mono); }
.board-zoom button { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; color: var(--ink-2); }
.board-zoom button:hover { background: var(--hover); }
.board-title { position: absolute; left: 14px; top: 14px; z-index: 5; display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 12px; border-radius: 14px; }
.board-title input { border: 0; background: transparent; outline: none; font-weight: 650; width: 150px; }
.swatches { display: flex; gap: 6px; flex-wrap: wrap; }
.swatches button { width: 24px; height: 24px; border-radius: 8px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .1); }
.swatches button.on { box-shadow: 0 0 0 2px var(--glass-2), 0 0 0 4px var(--brand-2); }

/* ---------- 接单 / 社区 / 分发 / IP / 商城 / 分销 ---------- */
.task { display: flex; flex-direction: column; gap: 12px; padding: 20px; border-radius: var(--r-lg); cursor: pointer; transition: transform .25s, box-shadow .25s; }
.task:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.task h4 { font-size: 16px; }
.task .foot-row { margin-top: auto; }
.task .budget { font-size: 22px; font-weight: 750; font-variant-numeric: tabular-nums; }
.task .budget small { font-size: 12px; color: var(--ink-3); font-weight: 600; }
.feed { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.post { display: flex; flex-direction: column; gap: 12px; }
.post .ph { display: flex; align-items: center; gap: 10px; }
.post .ph b { font-size: 14.5px; } .post .ph span { font-size: 12px; color: var(--ink-3); }
.post .pc { font-size: 14.5px; line-height: 1.8; white-space: pre-wrap; word-break: break-word; }
.post .pa { display: flex; gap: 6px; }
.post .pa button { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 10px; color: var(--ink-2); font-size: 13px; font-weight: 600; }
.post .pa button:hover { background: var(--hover); color: var(--ink); }
.post .pa button.liked { color: var(--bad); }
.post .pa button.liked .i { fill: currentColor; }
.post .attach { border-radius: 16px; overflow: hidden; max-width: 360px; }
.post .attach canvas { width: 100%; display: block; }
.comments { display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: 14px; background: var(--hover); }
.comments .cm { display: flex; gap: 8px; font-size: 13px; }
.comments .cm b { color: var(--brand); font-weight: 600; white-space: nowrap; }
.channels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ch { display: flex; align-items: center; gap: 8px; padding: 10px; border-radius: 14px; border: 1px solid var(--line); background: var(--glass-3); font-size: 13px; font-weight: 600; transition: all .2s; }
.ch .cd { width: 26px; height: 26px; border-radius: 9px; display: grid; place-items: center; color: #fff; font-size: 12px; font-weight: 800; flex: none; }
.ch.on { border-color: var(--brand-2); background: var(--glass-2); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-2) 14%, transparent); }
.bars { display: flex; flex-direction: column; gap: 12px; }
.bars .br { display: grid; grid-template-columns: 70px 1fr 70px; gap: 12px; align-items: center; font-size: 13px; }
.bars .br .progress { height: 10px; }
.bars .br .v { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.cart-line { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.qty { display: inline-flex; align-items: center; gap: 2px; border: 1px solid var(--line-2); border-radius: 10px; padding: 2px; }
.qty button { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; }
.qty button:hover { background: var(--hover); }
.qty span { min-width: 22px; text-align: center; font-variant-numeric: tabular-nums; font-weight: 600; }
.fab { position: fixed; right: max(24px, env(safe-area-inset-right, 0px)); bottom: calc(24px + env(safe-area-inset-bottom, 0px)); z-index: 40; height: 52px; padding: 0 20px; border-radius: 18px; }
.fab .cnt { min-width: 22px; height: 22px; border-radius: 11px; background: #fff; color: var(--brand); display: grid; place-items: center; font-size: 12px; font-weight: 800; padding: 0 6px; }
.invite { position: relative; overflow: hidden; padding: 28px; border-radius: var(--r-xl); }
.invite .code { font-family: var(--mono); font-size: 34px; font-weight: 700; letter-spacing: .14em; }
.invite .lnk { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 14px; border-radius: 14px; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .2); font-size: 13px; margin-top: 16px; }
.invite .lnk span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--mono); }
.invite .btn.ghost { background: #fff; color: #0A0A0C; border: 0; }
.cert-card { padding: 24px; border-radius: 20px; text-align: center; border: 1px solid var(--line-2); background: radial-gradient(400px 200px at 50% 0%, var(--info-bg), transparent), var(--glass-3); }
.cert-card .cn { font-family: var(--mono); color: var(--ink-3); font-size: 12px; margin-top: 8px; }

/* ---------- 响应式 ---------- */
@media (max-width: 1180px) {
  .dash, .feed { grid-template-columns: minmax(0, 1fr); }
  .work { grid-template-columns: minmax(0, 1fr); }
  .work .params { position: static; }
  .editor { grid-template-columns: minmax(0, 1fr); }
  .choice { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .search-btn { width: 40px; padding: 0; justify-content: center; } .search-btn span, .search-btn kbd { display: none; }
}
@media (max-width: 960px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 280px; transform: translateX(-105%); transition: transform .35s cubic-bezier(.2, .8, .2, 1); padding-left: max(14px, env(safe-area-inset-left, 0px)); }
  .side.open { transform: none; }
  .side-mask { position: fixed; inset: 0; background: rgba(6, 10, 30, .3); z-index: 25; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
  .menu-btn { display: grid; }
  .top { padding: 12px max(16px, env(safe-area-inset-right, 0px)) 0 max(16px, env(safe-area-inset-left, 0px)); }
  .page { padding: 18px max(16px, env(safe-area-inset-right, 0px)) 40px max(16px, env(safe-area-inset-left, 0px)); }
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth-brand { min-height: auto; padding: 28px; gap: 28px; }
  .auth-brand .orbit, .auth-brand .feats { display: none; }
  .studio { grid-template-columns: minmax(0, 1fr); }
  .rail { position: static; flex-direction: row; overflow-x: auto; }
  .rail a { min-width: 64px; }
  .welcome { grid-template-columns: minmax(0, 1fr); }
  .grid3 { grid-template-columns: minmax(0, 1fr); }
  .meter.pts { display: none; }
}
@media (max-width: 620px) {
  .board-tools { left: 8px; right: 8px; transform: none; overflow-x: auto; }
  .board-title input { width: 90px; }
  .grid2, .choice, .gen-grid { grid-template-columns: minmax(0, 1fr); }
  .grid4 { gap: 12px; }
  .kpi .k-val { font-size: 24px; }
  .mode-chip, .search-btn, .top .crumb { display: none; }
  .logo .wm small { display: none; }
  .channels { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .welcome .wallet { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .welcome .wallet .w { min-width: 0; padding: 12px 14px; }
  .welcome .wallet .w b { font-size: 19px; }
  .top h1 { font-size: 15px; }
  .page-h h2 { font-size: 22px; }
  .board-side { display: none; }
  .modal { padding: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* ---------- 素材上传 ---------- */
.drop-zone { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center; padding: 18px 12px; border-radius: 16px; border: 1.5px dashed color-mix(in srgb, var(--brand-2) 45%, var(--line-2)); background: color-mix(in srgb, var(--brand-2) 6%, transparent); color: var(--brand); cursor: pointer; transition: all .2s; }
.drop-zone b { color: var(--ink); font-size: 14px; }
.drop-zone span { font-size: 12px; color: var(--ink-3); line-height: 1.6; }
.drop-zone:hover, .drop-zone.over { background: color-mix(in srgb, var(--brand-2) 14%, transparent); border-color: var(--brand-2); }
.drop-zone:focus-within { outline: 2px solid var(--brand-2); outline-offset: 2px; }
.up-row { display: flex; flex-direction: column; gap: 6px; padding: 8px 10px; border-radius: 12px; background: var(--hover); }
.preview-box .pv-tag { position: absolute; left: 12px; top: 12px; font-size: 11.5px; font-weight: 700; color: #fff; padding: 3px 10px; border-radius: 999px; background: rgba(0, 0, 0, .45); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.preview-box .pv-tag:empty { display: none; }
.tl-inner.over { background: color-mix(in srgb, var(--brand-2) 10%, transparent); box-shadow: inset 0 0 0 2px var(--brand-2); border-radius: 18px; }
.clip.up { background-image: repeating-linear-gradient(135deg, rgba(255, 255, 255, .1) 0 6px, transparent 6px 12px) !important; }
.lib .lc .thumb { position: relative; background: var(--hover); }
.node.image img { width: 100%; height: 100%; border-radius: 11px; display: block; pointer-events: none; object-fit: cover; }
.ptag { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 11px; border-radius: 999px; font-size: 12px; font-weight: 500; color: #fff; background: rgba(0, 0, 0, .38); border: 1px solid rgba(255, 255, 255, .18); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); z-index: 3; }
.cover .cover-tag, .cover .cover-ico { z-index: 3; }
.cover { background: #04040A; }
.gen-grid .gi .acts { z-index: 3; }
.rail a.on .tile { color: #fff; background: radial-gradient(120% 100% at 30% 0%, #6B7BFF, var(--brand-2) 55%, #0812A0); box-shadow: 0 10px 26px -10px rgba(1, 30, 255, .8); }
.rail a:not(.on) .tile { filter: none; opacity: 1; }
.clip { color: #fff; }
