/* 光陌AI · Web 创作工作台样式（与 design/设计规范.md 同源） */
* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --brand: #FF6A2B; --brand-deep: #C2410C; --brand-50: #FFF1E8; --brand-border: #FFE4D3;
  --accent: #FFB020; --bg: #fff; --bg-soft: #FAFAFA; --bg-hover: #F7F7F8;
  --text-1: #1F2329; --text-2: #646A73; --text-3: #8F959E; --text-4: #B4B2A9;
  --line: #EFF0F1; --line-dash: #E5E6EB;
  --success: #0B7A48; --success-bg: #E9F7F0; --danger: #B42318; --danger-bg: #FEECEB;
  --warn: #A16207; --warn-bg: #FEF6E7;
  --shadow-1: 0 6px 20px rgba(31,35,41,.07);
  --shadow-2: 0 8px 30px rgba(31,35,41,.07);
  --shadow-brand: 0 4px 14px rgba(255,77,46,.30);
}
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg); color: var(--text-1); -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font-family: inherit; }

/* 布局 */
.app { display: flex; min-height: 100vh; }
.sidebar { width: 64px; border-right: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; padding: 10px 0 16px; position: sticky; top: 0; height: 100vh; background: #fff; flex-shrink: 0; }
.nav-item { width: 56px; padding: 7px 0 6px; border-radius: 10px; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; color: var(--text-2); cursor: pointer; transition: .15s; }
.nav-item:hover { background: var(--bg-hover); }
.nav-item.active { background: var(--brand-50); color: var(--brand); font-weight: 600; }
.nav-item svg { width: 20px; height: 20px; }
.nav-spacer { flex: 1; }
.credits { display: flex; flex-direction: column; align-items: center; gap: 2px; margin-bottom: 12px; cursor: pointer; }
.credits .num { font-size: 11px; color: var(--brand); font-weight: 600; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--brand)); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 13px; font-weight: 600; margin-top: 8px; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { height: 56px; display: flex; align-items: center; gap: 10px; padding: 0 24px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: rgba(255,255,255,.94); backdrop-filter: blur(8px); z-index: 20; }
.logo { width: 30px; height: 30px; border-radius: 8px; background: linear-gradient(135deg, #FF9A3D, #FF4D2E); display: flex; align-items: center; justify-content: center; }
.brand { font-size: 16px; font-weight: 700; }
.brand-sub { font-size: 15px; font-weight: 400; color: var(--text-2); margin-left: 8px; }
.crumb { font-size: 13px; color: var(--text-3); margin-left: 12px; padding-left: 14px; border-left: 1px solid var(--line-dash); }
.crumb b { color: var(--text-1); font-weight: 600; }
.grow { flex: 1; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 32px 64px; width: 100%; }

/* 按钮 */
.btn { font-size: 13px; border-radius: 9px; padding: 8px 15px; cursor: pointer; border: 1px solid var(--line-dash); background: #fff; color: var(--text-1); transition: .15s; }
.btn:hover { border-color: #D9DBDE; }
.btn.primary { background: linear-gradient(135deg, #FF9A3D, #FF4D2E); color: #fff; border: none; font-weight: 600; box-shadow: var(--shadow-brand); }
.btn.primary:hover { transform: translateY(-1px); }
.btn.primary:disabled { background: #E5E6EB; color: var(--text-3); box-shadow: none; cursor: not-allowed; transform: none; }
.btn.ghost { color: var(--brand-deep); border-color: var(--brand-border); background: #FFF7F2; }
.btn.sm { padding: 6px 12px; font-size: 12.5px; }

/* 创作工作台 */
.slogan { text-align: center; margin: 56px 0 26px; position: relative; }
.slogan h1 { font-size: 30px; font-weight: 700; letter-spacing: 1px; background: linear-gradient(96deg, #FF9A3D 6%, #FF4D2E 70%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.slogan p { margin-top: 10px; font-size: 13px; color: var(--text-3); }
.composer { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 20px 20px 16px; box-shadow: var(--shadow-2); }
.quick { display: flex; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; align-items: center; }
.quick button { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--brand); background: #FFF7F2; border: 1px solid var(--brand-border); border-radius: 8px; padding: 5px 10px; cursor: pointer; }
.quick button:hover { background: #FFEFE4; }
.quick .tip { font-size: 12px; color: var(--text-4); }
.input-row { display: flex; gap: 14px; }
.upload { width: 68px; height: 68px; border-radius: 12px; background: var(--bg-soft); border: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--text-3); font-size: 12px; cursor: pointer; flex-shrink: 0; }
.upload:hover { border-color: var(--brand-border); color: var(--brand); background: #FFFBF8; }
.upload.filled { background: var(--brand-50); border-color: var(--brand-border); color: var(--brand-deep); }
.composer textarea { flex: 1; border: none; outline: none; resize: none; font-size: 14px; line-height: 1.7; color: var(--text-1); padding-top: 4px; height: 68px; }
.composer textarea::placeholder { color: var(--text-4); }
.params { display: flex; align-items: center; gap: 4px; margin-top: 16px; flex-wrap: wrap; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 9px; font-size: 13px; color: var(--text-1); cursor: pointer; }
.pill:hover { background: var(--bg-hover); }
.pill svg { width: 15px; height: 15px; color: var(--text-2); }
.pill.solid { background: #F2F4F8; font-weight: 600; padding: 5px 12px; }
.pill label { font-size: 13px; color: var(--text-2); }
.pill select { border: none; background: transparent; font-size: 13px; font-weight: 600; color: var(--text-1); outline: none; cursor: pointer; }
.pill.warn { background: #FEF6E7; color: var(--warn); }
.cost { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; color: var(--text-2); margin-right: 12px; }
.cost b { color: var(--text-1); font-weight: 600; }
.submit { width: 42px; height: 42px; border-radius: 50%; border: none; background: linear-gradient(135deg, #FF9A3D, #FF4D2E); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: var(--shadow-brand); }
.submit:disabled { background: #E5E6EB; box-shadow: none; cursor: not-allowed; }

.section-head { display: flex; align-items: center; justify-content: space-between; margin: 40px 0 0; gap: 20px; flex-wrap: wrap; }
.tabs { display: flex; gap: 26px; font-size: 15px; }
.tabs span { color: var(--text-2); cursor: pointer; padding-bottom: 8px; position: relative; }
.tabs span.active { color: var(--text-1); font-weight: 600; }
.tabs span.active::after { content: ""; position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); width: 20px; height: 3px; border-radius: 2px; background: var(--brand); }
.search { position: relative; width: 268px; }
.search input { width: 100%; height: 38px; border-radius: 19px; border: 1px solid var(--line); background: var(--bg-soft); padding: 0 14px 0 36px; font-size: 13px; outline: none; }
.search input:focus { border-color: var(--brand-border); background: #fff; }
.search svg { position: absolute; left: 12px; top: 11px; width: 16px; height: 16px; color: var(--text-4); }
.grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; margin-top: 20px; }
@media (max-width: 1440px) { .grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 1120px) { .grid { grid-template-columns: repeat(3, 1fr); } }
.card { position: relative; aspect-ratio: 3/4; border-radius: 14px; overflow: hidden; cursor: pointer; transition: .18s; }
.card:hover { transform: translateY(-3px); box-shadow: 0 10px 26px rgba(31,35,41,.14); }
.card .tag { position: absolute; left: 8px; top: 8px; font-size: 11px; color: #fff; background: rgba(0,0,0,.42); border-radius: 6px; padding: 2px 7px; }
.card .like { position: absolute; right: 9px; bottom: 9px; font-size: 12px; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.5); }
.card .cap { position: absolute; left: 10px; right: 10px; bottom: 8px; font-size: 12px; color: #fff; line-height: 1.45; text-shadow: 0 1px 4px rgba(0,0,0,.55); }
.c1 { background: linear-gradient(160deg, #FFD9A8, #F2A65A 55%, #C97B3C); }
.c2 { background: linear-gradient(160deg, #2B3A55, #46618E 60%, #1B2537); }
.c3 { background: linear-gradient(160deg, #C8E6D0, #7FB894 58%, #4E7F66); }
.c4 { background: linear-gradient(160deg, #F6D2DC, #DE8FA6 60%, #A75C74); }
.c5 { background: linear-gradient(160deg, #D8D3F5, #9C93E8 58%, #6B60C4); }
.c6 { background: linear-gradient(160deg, #FBE3B8, #E7B45C 55%, #B07F2E); }
.c7 { background: linear-gradient(160deg, #BFE3F5, #6FA9D6 58%, #3F6E9B); }
.c8 { background: linear-gradient(160deg, #EBD8C4, #C39B76 58%, #8A6544); }
.c9 { background: linear-gradient(160deg, #F3C9B4, #D97F5E 58%, #9E4B33); }
.c10 { background: linear-gradient(160deg, #CFD9E8, #93A6C4 58%, #5F7290); }

/* 分镜编辑器 */
.editor { flex: 1; display: flex; gap: 18px; padding: 18px 22px 28px; align-items: flex-start; background: var(--bg-soft); }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.panel-title { font-size: 14px; font-weight: 600; padding: 15px 18px 11px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.panel-title small { font-size: 12px; font-weight: 400; color: var(--text-3); }
.col-left { width: 292px; flex-shrink: 0; }
.col-mid { flex: 1; min-width: 0; }
.col-right { width: 342px; flex-shrink: 0; }
@media (max-width: 1280px) { .editor { flex-wrap: wrap; } .col-left, .col-right { width: 100%; } }
.shop { padding: 0 18px 16px; }
.shop h3 { font-size: 15px; font-weight: 600; line-height: 1.45; }
.shop .addr { font-size: 12px; color: var(--text-3); margin-top: 6px; line-height: 1.6; }
.kv { margin-top: 14px; border-top: 1px dashed var(--line); padding-top: 12px; font-size: 13px; }
.kv .row { display: flex; justify-content: space-between; padding: 5px 0; gap: 10px; }
.kv .row span:first-child { color: var(--text-2); flex-shrink: 0; }
.kv .row b { font-weight: 600; text-align: right; }
.del { color: var(--text-3); text-decoration: line-through; }
.taglist { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.taglist i { font-style: normal; font-size: 12px; color: #99440A; background: #FFF3E4; border-radius: 6px; padding: 3px 8px; }
.hookbox { padding: 0 18px 16px; }
.hook { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); margin-bottom: 8px; cursor: pointer; transition: .15s; }
.hook:hover { border-color: var(--line-dash); }
.hook.on { border-color: var(--brand-border); background: #FFFBF8; }
.hook .dot { width: 10px; height: 10px; border-radius: 3px; margin-top: 4px; flex-shrink: 0; }
.hook .txt b { display: block; font-size: 13px; font-weight: 600; }
.hook .txt span { font-size: 12px; color: var(--text-3); line-height: 1.5; display: block; margin-top: 2px; }
.hook .check { margin-left: auto; color: var(--brand); font-size: 12px; font-weight: 600; flex-shrink: 0; }
.table-wrap { padding: 0 12px 14px; overflow-x: auto; }
table.story { width: 100%; border-collapse: separate; border-spacing: 0; min-width: 720px; }
table.story th { font-size: 12px; font-weight: 600; color: var(--text-2); text-align: left; padding: 0 10px 10px; border-bottom: 1px solid var(--line); }
table.story td { padding: 7px 10px; font-size: 12.5px; line-height: 1.55; vertical-align: top; border-bottom: 1px solid #F5F6F7; }
table.story tr.group-head td { padding: 10px 10px 8px; font-size: 12px; font-weight: 600; }
table.story .no { font-weight: 600; color: var(--text-2); width: 46px; }
table.story .scene, table.story .move { width: 104px; color: var(--text-2); }
table.story .dur { width: 54px; text-align: right; color: var(--text-2); }
.cell { display: block; border-radius: 6px; padding: 4px 6px; margin: -4px -6px; cursor: text; }
.cell:hover { background: var(--bg-hover); box-shadow: inset 0 0 0 1px var(--line); }
.cell[contenteditable="true"]:focus { background: #fff; box-shadow: inset 0 0 0 1.5px var(--brand); outline: none; }
.row-g1 td { background: #FFFCF9; } .row-g2 td { background: #FAFAFE; } .row-g3 td { background: #FEFAFC; }
.script { padding: 0 18px 14px; }
.script p { font-size: 13px; line-height: 1.85; }
.script .hl { background: var(--brand-50); border-radius: 3px; padding: 0 2px; font-weight: 600; color: var(--brand-deep); }
.subs { margin-top: 12px; border-top: 1px dashed var(--line); padding-top: 10px; max-height: 190px; overflow: auto; }
.subs .s { display: flex; gap: 8px; font-size: 12px; padding: 4px 0; color: var(--text-2); }
.subs .s b { color: var(--brand); font-weight: 600; flex-shrink: 0; font-variant-numeric: tabular-nums; }
.actions { padding: 14px 18px 18px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.actions .row { display: flex; gap: 10px; }
.actions .row .btn { flex: 1; text-align: center; }
.hint { font-size: 11px; color: var(--text-4); line-height: 1.7; }

/* 任务中心 */
.filters { display: flex; align-items: center; gap: 26px; font-size: 15px; padding-top: 22px; }
.filters span { color: var(--text-2); cursor: pointer; padding-bottom: 8px; position: relative; }
.filters span.active { color: var(--text-1); font-weight: 600; }
.filters span.active::after { content: ""; position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); width: 20px; height: 3px; border-radius: 2px; background: var(--brand); }
.filters i { font-style: normal; font-size: 12px; color: var(--text-3); margin-left: 3px; }
.list { margin-top: 20px; display: flex; flex-direction: column; gap: 14px; }
.item { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px; display: flex; gap: 16px; align-items: center; }
.item:hover { box-shadow: var(--shadow-1); }
.thumb { width: 96px; height: 128px; border-radius: 10px; flex-shrink: 0; position: relative; overflow: hidden; background: var(--bg-hover); }
.thumb .cover { position: absolute; inset: 0; object-fit: cover; }
.thumb .pct { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 15px; font-weight: 600; background: rgba(31,35,41,.28); }
.thumb .bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255,255,255,.3); }
.thumb .bar i { display: block; height: 100%; background: var(--brand); transition: width .4s; }
.thumb .sk { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 12px; color: var(--text-3); }
.info { flex: 1; min-width: 0; }
.info h3 { font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.badge { font-size: 11px; font-weight: 500; border-radius: 6px; padding: 2px 7px; font-style: normal; }
.b-run { color: var(--brand-deep); background: var(--brand-50); }
.b-done { color: var(--success); background: var(--success-bg); }
.b-fail { color: var(--danger); background: var(--danger-bg); }
.b-warn { color: var(--warn); background: var(--warn-bg); }
.b-queue { color: var(--text-2); background: #F2F3F5; }
.meta { font-size: 12px; color: var(--text-3); margin-top: 8px; line-height: 1.9; }
.meta b { color: var(--text-2); font-weight: 500; }
.steps { display: flex; gap: 12px; margin-top: 10px; flex-wrap: wrap; }
.steps span { font-size: 11px; color: var(--text-4); display: flex; align-items: center; gap: 4px; }
.steps span.done { color: var(--success); }
.steps span.now { color: var(--brand); font-weight: 600; }
.steps span.bad { color: var(--danger); }
.steps em { width: 5px; height: 5px; border-radius: 50%; background: currentColor; display: block; font-style: normal; }
.chips { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.chips i { font-style: normal; font-size: 12px; border-radius: 6px; padding: 3px 8px; }
.ops { display: flex; flex-direction: column; gap: 8px; width: 122px; flex-shrink: 0; }
.ops .btn { width: 100%; text-align: center; font-size: 12.5px; padding: 7px 0; }
.empty { text-align: center; padding: 60px 0; color: var(--text-3); font-size: 13px; }
.empty a { color: var(--brand); }

/* 轻提示 */
#toast { position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%) translateY(20px); background: #1F2329; color: #fff; font-size: 13px; padding: 10px 18px; border-radius: 10px; opacity: 0; pointer-events: none; transition: .22s; z-index: 200; max-width: 70vw; }
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast.err { background: #B42318; }
.loading { position: fixed; inset: 0; background: rgba(255,255,255,.6); backdrop-filter: blur(2px); display: none; align-items: center; justify-content: center; z-index: 150; }
.loading.show { display: flex; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--brand-50); border-top-color: var(--brand); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.env { font-size: 12px; color: var(--text-3); display: flex; align-items: center; gap: 6px; }
.env em { font-style: normal; width: 6px; height: 6px; border-radius: 50%; background: var(--success); display: block; }
.env em.down { background: var(--danger); }
