:root {
  color-scheme: dark;
  --bg: #101114;
  --panel: #17181c;
  --panel-2: #1d1f24;
  --panel-3: #23252b;
  --line: #2c2e35;
  --line-2: #3a3d46;
  --text: #f3f1ec;
  --muted: #918f89;
  --muted-2: #696a70;
  --accent: #ff6b35;
  --accent-2: #e75522;
  --accent-soft: rgba(255,107,53,.13);
  --green: #5bc587;
  --yellow: #e8ba63;
  --sidebar: 252px;
  --inspector: 310px;
  --topbar: 64px;
}

* { box-sizing: border-box; }
html, body { margin: 0; width: 100%; height: 100%; overflow: hidden; }
body { font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif; background: var(--bg); color: var(--text); font-size: 13px; }
button, input, textarea, select { font: inherit; }
button { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.icon-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

.studio-shell { display: grid; grid-template: var(--topbar) calc(100vh - var(--topbar)) / var(--sidebar) minmax(0, 1fr) var(--inspector); min-width: 1040px; height: 100vh; background: var(--bg); opacity: 0; animation: shellIn .45s ease forwards; }
@keyframes shellIn { to { opacity: 1; } }

.topbar { grid-column: 1 / -1; display: grid; grid-template-columns: var(--sidebar) minmax(180px, 1fr) auto minmax(300px, 1fr); align-items: center; height: var(--topbar); border-bottom: 1px solid var(--line); background: rgba(20,21,24,.96); z-index: 30; }
.brand { height: 100%; display: flex; align-items: center; gap: 10px; padding: 0 18px; color: var(--text); text-decoration: none; border-right: 1px solid var(--line); }
.brand-mark { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; color: #fff; font-weight: 900; letter-spacing: -.08em; background: var(--accent); box-shadow: 0 7px 20px rgba(255,107,53,.22); }
.brand span:last-child { display: flex; flex-direction: column; line-height: 1.15; }
.brand b { font-size: 14px; letter-spacing: .02em; }
.brand small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.crumbs { min-width: 0; display: flex; align-items: center; gap: 6px; padding: 0 18px; color: var(--muted); white-space: nowrap; overflow: hidden; }
.crumbs svg { width: 13px; height: 13px; color: #4e5056; flex: none; }
.crumbs b { color: #d9d7d1; font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.stage-track { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 0 16px; }
.stage-track button { display: flex; align-items: center; gap: 6px; padding: 8px 3px; color: #77787d; border: 0; background: none; cursor: pointer; font-weight: 600; transition: color .18s; }
.stage-track button i { display: grid; place-items: center; width: 19px; height: 19px; border: 1px solid #44464c; border-radius: 50%; font-style: normal; font-size: 10px; }
.stage-track button.active { color: #f2eee7; }
.stage-track button.active i { color: #fff; border-color: var(--accent); background: var(--accent); }
.stage-track > span { width: 23px; height: 1px; background: #35373d; }
.top-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 0 16px; }
.saved { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 11px; margin-right: 4px; }
.saved svg { width: 13px; color: var(--green); }
.top-actions button { border: 0; border-radius: 8px; cursor: pointer; }
.top-actions .quiet { padding: 8px 11px; color: #c9c7c1; background: transparent; }
.top-actions .quiet:hover { background: #25272c; }
.top-actions .workflow-run { display: flex; align-items: center; gap: 6px; color: #e8a98f; }
.top-actions .workflow-run svg { width: 13px; }
.top-actions .workflow-run.running { color: #ffd0bd; background: rgba(255,107,53,.12); }
.top-actions .primary { display: flex; align-items: center; gap: 7px; padding: 9px 14px; background: var(--accent); color: #fff; font-weight: 650; box-shadow: 0 6px 18px rgba(255,107,53,.16); }
.top-actions .primary:hover { background: var(--accent-2); }
.top-actions .primary svg { width: 14px; fill: currentColor; }
.avatar { width: 31px; height: 31px; padding: 0; background: #3a2d27; color: #ffb99f; font-weight: 700; }

.sidebar { grid-area: 2 / 1; display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--line); background: var(--panel); z-index: 20; }
.sidebar-heading { display: flex; align-items: center; justify-content: space-between; padding: 16px 15px 13px; }
.sidebar-heading div { display: flex; flex-direction: column; gap: 4px; }
.sidebar-heading small, .inspector header small, .dialog-head small { color: var(--muted); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; }
.sidebar-heading strong { font-size: 13px; font-weight: 650; }
.icon-btn { display: grid; place-items: center; width: 30px; height: 30px; padding: 0; color: var(--muted); border: 1px solid transparent; border-radius: 7px; background: transparent; cursor: pointer; }
.icon-btn:hover { color: var(--text); background: var(--panel-3); border-color: var(--line); }
.project-nav { padding: 0 10px 12px; border-bottom: 1px solid var(--line); }
.project-nav button { width: 100%; border: 0; cursor: pointer; }
.nav-title { display: flex; align-items: center; gap: 7px; min-height: 34px; padding: 0 8px; background: transparent; color: #c7c5c0; text-align: left; font-weight: 600; }
.nav-title svg { width: 14px; transform: rotate(90deg); color: #66676b; }
.nav-title span { margin-left: auto; color: #5e6065; font-size: 10px; letter-spacing: 2px; }
.canvas-link { display: flex; align-items: center; gap: 9px; height: 33px; padding: 0 10px 0 18px; border-radius: 7px; color: #86878c; background: transparent; text-align: left; }
.canvas-link i { width: 6px; height: 6px; border-radius: 2px; background: #55575d; }
.canvas-link span { margin-left: auto; color: #5d5f64; font-size: 11px; }
.canvas-link.active { color: #f0eee9; background: #24262b; }
.canvas-link.active i { background: var(--accent); box-shadow: 0 0 0 3px rgba(255,107,53,.13); }
.new-canvas { display: flex; align-items: center; gap: 7px; padding: 9px 17px 3px; color: #73757a; background: transparent; font-size: 12px; }
.new-canvas:hover { color: #bebcb7; }
.new-canvas svg { width: 13px; }
.element-panel { display: flex; flex-direction: column; min-height: 0; flex: 1; padding: 14px 10px 8px; }
.element-head { display: flex; align-items: center; justify-content: space-between; padding: 0 5px 9px; }
.element-head strong { font-size: 12px; }
.element-head svg { width: 13px; transform: rotate(180deg); }
.search-field { display: flex; align-items: center; gap: 7px; height: 34px; padding: 0 9px; margin: 0 3px; border: 1px solid var(--line); border-radius: 8px; background: #121317; transition: border-color .16s; }
.search-field:focus-within { border-color: #555861; }
.search-field svg { width: 14px; color: #62646a; }
.search-field input { min-width: 0; width: 100%; padding: 0; color: #ddd9d2; border: 0; outline: 0; background: transparent; font-size: 12px; }
.search-field input::placeholder { color: #616268; }
.filters { display: flex; gap: 2px; padding: 10px 3px 7px; }
.filters button { padding: 4px 7px; color: #727378; border: 0; border-radius: 5px; background: transparent; cursor: pointer; font-size: 11px; }
.filters button.active { color: #d9d6cf; background: #292b31; }
.element-list { min-height: 0; overflow: auto; scrollbar-width: thin; scrollbar-color: #35373c transparent; }
.element-list > button { width: 100%; display: grid; grid-template-columns: 29px minmax(0,1fr) 6px; align-items: center; gap: 8px; padding: 7px 6px; color: inherit; border: 0; border-radius: 8px; background: transparent; text-align: left; cursor: pointer; }
.element-list > button:hover, .element-list > button.active { background: #22242a; }
.element-list > button > span:nth-child(2) { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
.element-list b { overflow: hidden; color: #c8c5bf; font-size: 11.5px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.element-list small { overflow: hidden; color: #66686d; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.element-list em { width: 5px; height: 5px; border-radius: 50%; background: #4d4f54; }
.element-icon { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 7px; }
.element-icon svg { width: 14px; }
.element-icon.text { color: #d6b56f; background: #312b20; }
.element-icon.script { color: #a995e8; background: #282439; }
.element-icon.image { color: #6dc4ac; background: #20312d; }
.element-icon.video { color: #73a8dd; background: #202b37; }
.library-link { display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 8px; min-height: 55px; padding: 8px 14px; color: #aaa8a3; border: 0; border-top: 1px solid var(--line); background: #18191d; text-align: left; cursor: pointer; }
.library-link > svg { width: 17px; color: #85868a; }
.library-link span { display: flex; flex-direction: column; gap: 2px; }
.library-link b { color: #d6d3cd; font-size: 12px; }
.library-link small { color: #66676c; font-size: 10px; }
.library-link > strong { display: grid; place-items: center; min-width: 24px; height: 20px; border-radius: 999px; background: #292b30; color: #85868b; font-size: 10px; }

.canvas-shell { grid-area: 2 / 2; position: relative; min-width: 0; overflow: hidden; background: #111216; }
.canvas-toolbar { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); z-index: 12; display: flex; align-items: center; gap: 4px; height: 40px; padding: 4px; border: 1px solid var(--line); border-radius: 10px; background: rgba(29,30,35,.94); box-shadow: 0 9px 24px rgba(0,0,0,.23); backdrop-filter: blur(10px); }
.canvas-toolbar button { display: flex; align-items: center; justify-content: center; gap: 6px; height: 30px; border: 0; border-radius: 7px; background: transparent; cursor: pointer; }
.tool-main { padding: 0 11px; color: #f3eee7; background: var(--accent) !important; font-weight: 650; }
.tool-main svg { width: 14px; }
.tool-icon { width: 31px; padding: 0; color: #8a8b8f; font-size: 16px; }
.tool-icon.active, .tool-icon:hover { color: #e5e2dc; background: #303239; }
.tool-text { padding: 0 9px; color: #95969a; }
.tool-text:hover { color: #e0ddd7; background: #292b31; }
.tool-text svg { width: 14px; }
.divider { width: 1px; height: 21px; margin: 0 2px; background: var(--line-2); }
.stage-note { position: absolute; top: 69px; left: 50%; transform: translateX(-50%); z-index: 11; display: flex; align-items: center; gap: 8px; padding: 7px 11px; border: 1px solid #32343a; border-radius: 7px; color: #8e8f94; background: rgba(21,22,26,.9); font-size: 11px; pointer-events: none; opacity: 0; animation: noteIn .45s .32s ease forwards; }
@keyframes noteIn { from { transform: translate(-50%,-5px); opacity:0; } to { transform:translate(-50%,0); opacity:1; } }
.stage-note span { color: #ff9d79; }
.canvas-viewport { position: absolute; inset: 0; overflow: hidden; cursor: grab; background-color: #111216; background-image: radial-gradient(circle, rgba(255,255,255,.11) 1px, transparent 1.1px); background-size: 20px 20px; }
.canvas-viewport.dragging { cursor: grabbing; }
.canvas-world { position: absolute; width: 2500px; height: 3000px; transform-origin: 0 0; will-change: transform; }
#nodeLayer { position: absolute; inset: 0; }
.edges { position: absolute; inset: 0; width: 2500px; height: 3000px; overflow: visible; pointer-events: none; }
.edges path { fill: none; stroke: #575a62; stroke-width: 2; marker-end: url(#arrow); opacity: .75; pointer-events: stroke; cursor: pointer; }
.edges path:hover, .edges path.selected { stroke: #ff8a60; stroke-width: 3; opacity: 1; }
.edges path.preview { stroke: #ff8a60; stroke-dasharray: 7 6; marker-end: none; pointer-events: none; }
.edges marker path { fill: #575a62; stroke: none; }

.node { position: absolute; left: var(--x); top: var(--y); width: var(--w); border: 1px solid #34363d; border-radius: 12px; background: #1a1b20; box-shadow: 0 14px 30px rgba(0,0,0,.22); overflow: visible; transition: border-color .17s, box-shadow .17s, transform .17s; user-select: none; }
.node:hover { border-color: #494c55; }
.node.selected { border-color: rgba(255,107,53,.82); box-shadow: 0 0 0 2px rgba(255,107,53,.11), 0 18px 36px rgba(0,0,0,.32); }
.node.failed { border-color: rgba(219,101,93,.58); }
.node > header { display: flex; align-items: center; justify-content: space-between; height: 42px; padding: 0 11px 0 13px; border-bottom: 1px solid #2b2d33; }
.node > header button { display: grid; place-items: center; width: 27px; height: 27px; padding: 0; color: #65676c; border: 0; border-radius: 6px; background: transparent; cursor: pointer; opacity: .58; transition: color .16s, background .16s, opacity .16s, transform .16s; }
.node:hover > header button, .node.selected > header button { opacity: 1; }
.node > header button:hover { color: #ee9189; background: rgba(213,94,86,.13); transform: translateY(-1px); }
.node > header button:focus-visible { outline: 2px solid rgba(238,145,137,.55); outline-offset: 1px; opacity: 1; }
.node > header svg { width: 14px; }
.node-type { display: flex; align-items: center; gap: 7px; color: #d6d3cc; font-weight: 650; font-size: 12px; }
.node-type svg { color: #96979c; }
.node > footer { display: flex; align-items: center; justify-content: space-between; min-height: 37px; padding: 0 13px; border-top: 1px solid #292b31; }
.node > footer small { color: #696a6f; font-size: 10px; }
.state { display: inline-flex; align-items: center; gap: 6px; color: #97989d; font-size: 10px; }
.state i { width: 6px; height: 6px; border-radius: 50%; background: #66686d; }
.state.done { color: #7bcf9c; }.state.done i { background: var(--green); box-shadow: 0 0 0 3px rgba(91,197,135,.1); }
.state.ready { color: #d4b26b; }.state.ready i { background: var(--yellow); }
.state.muted { color: #68696e; }.state.muted i { background: #505158; }
.state.error { color: #db7f78; }.state.error i { background: #d55e56; }
.port { position: absolute; z-index: 4; width: 14px; height: 14px; top: 50%; margin-top: -7px; border: 2px solid #8b8d94; border-radius: 50%; background: #1a1b20; cursor: crosshair; transition: transform .14s, border-color .14s, background .14s; }
.port.in { left: -7px; }.port.out { right: -7px; }.port.out.top { top: 40%; }.port.out.bottom { top: 72%; }
.node.selected .port { border-color: var(--accent); }
.port:hover, .port.link-target { transform: scale(1.3); border-color: #ff9d78; background: #4a2a20; }
.canvas-viewport.linking { cursor: crosshair; }
.input-list { display: flex; flex-direction: column; gap: 5px; }
.input-row { display: grid; grid-template-columns: 22px minmax(0,1fr) auto; align-items: center; gap: 7px; min-height: 34px; padding: 5px 6px; border: 1px solid #2d2f35; border-radius: 7px; background: #131418; }
.input-row > i { color: #ff9d78; font-style: normal; font-size: 9px; text-align: center; }
.input-row > span { overflow: hidden; color: #aaa8a3; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.input-row > div { display: flex; gap: 2px; }
.input-row button { width: 24px; height: 23px; padding: 0; color: #74767c; border: 0; border-radius: 5px; background: #24262b; cursor: pointer; }
.input-row button:hover { color: #eeeae4; background: #34363d; }
.node-action { display: flex; align-items: center; justify-content: center; gap: 7px; width: calc(100% - 24px); height: 34px; margin: 10px 12px 12px; border: 1px solid #373941; border-radius: 8px; color: #c6c4bf; background: #24262c; cursor: pointer; font-weight: 600; font-size: 11px; }
.node-action:hover { border-color: #50535c; background: #292b32; }
.node-action svg { width: 13px; }
.node-action.accent { border-color: rgba(255,107,53,.35); background: var(--accent-soft); color: #ff9d78; }
.node-action.download { margin-bottom: 0; color: #d9d6cf; border-color: rgba(255,107,53,.3); background: rgba(255,107,53,.09); text-decoration: none; }
.node-action.download:hover { color: #fff; border-color: rgba(255,107,53,.55); background: rgba(255,107,53,.16); }
.node-action:disabled { color: #57585d; background: #202126; cursor: not-allowed; }

.text-node textarea { display: block; width: 100%; height: 145px; padding: 15px; color: #c4c1bb; border: 0; outline: none; resize: none; background: transparent; line-height: 1.75; font-size: 12px; user-select: text; }
.script-summary { display: flex; align-items: center; gap: 7px; padding: 12px; }
.script-summary span { padding: 3px 6px; border-radius: 5px; color: #a898df; background: #29243a; font-size: 9px; }
.script-summary b { font-size: 12px; }.script-summary em { margin-left: auto; color: #707177; font-style: normal; font-size: 10px; }
.shot-table { margin: 0 12px; border: 1px solid #2d2f35; border-radius: 8px; overflow: hidden; }
.shot-table button { display: grid; grid-template-columns: 25px 1fr auto; align-items: center; gap: 8px; width: 100%; min-height: 46px; padding: 5px 9px; color: inherit; border: 0; border-bottom: 1px solid #292b31; background: #18191d; text-align: left; cursor: pointer; }
.shot-table button:last-child { border-bottom: 0; }.shot-table button:hover, .shot-table button.active { background: #22242a; }
.shot-table button > i { color: #6e7076; font-style: normal; font-size: 10px; }.shot-table button.active > i { color: var(--accent); }
.shot-table button > span { display: flex; flex-direction: column; gap: 2px; }.shot-table b { color: #c5c2bc; font-size: 10px; }.shot-table small { color: #696a6f; font-size: 9px; }
.shot-table em { padding: 3px 5px; border-radius: 4px; color: #7ebdab; background: #20302c; font-style: normal; font-size: 8px; }

.asset-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; padding: 11px 12px 3px; }
.asset-grid button { position: relative; overflow: hidden; min-height: 116px; padding: 0; border: 1px solid #30323a; border-radius: 8px; background: #121317; cursor: pointer; }
.asset-grid button:first-child { grid-row: span 2; }
.asset-grid.many button:first-child { grid-row: auto; }
.asset-grid.many button { min-height: 105px; }
.asset-grid img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: saturate(.8) brightness(.86); transition: transform .25s, filter .25s; }
.asset-grid button:hover img { transform: scale(1.025); filter: saturate(.95) brightness(.95); }
.asset-grid button:first-child img { object-position: 50% 22%; }
.asset-grid button span { position: absolute; inset: auto 0 0; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 18px 8px 7px; background: linear-gradient(transparent, rgba(8,8,10,.94)); text-align: left; }
.asset-grid b { color: #eeeae3; font-size: 9px; }.asset-grid small { color: #8b8b8e; font-size: 8px; }

.frame-preview, .video-preview { position: relative; overflow: hidden; margin: 11px 12px 9px; border-radius: 8px; background: #0d0e10; }
.frame-preview { height: 160px; }.video-preview { height: 206px; }
.frame-preview img, .video-preview img { width: 100%; height: 100%; object-fit: cover; filter: brightness(.8) saturate(.72); }
.video-preview video { display: block; width: 100%; height: 100%; object-fit: contain; background: #090a0c; }
.preview-empty { display: grid; place-items: center; width: 100%; height: 100%; color: #5f6167; background: linear-gradient(135deg,#15171b,#0f1013); font-size: 10px; }
.frame-preview span { position: absolute; right: 7px; bottom: 7px; padding: 3px 5px; border-radius: 4px; color: #ddd9d2; background: rgba(12,13,15,.75); font-size: 8px; }
.frame-node > p { margin: 0 13px; color: #9b9994; font-size: 10px; line-height: 1.55; }
.chip-row { display: flex; flex-wrap: wrap; gap: 4px; padding: 9px 13px 11px; }.chip-row span { padding: 3px 5px; border: 1px solid #32343b; border-radius: 4px; color: #77797e; background: #202126; font-size: 8px; }
.mini { padding: 4px 6px; color: #8b8c91; border: 0; border-radius: 5px; background: #25272c; cursor: pointer; font-size: 9px; }

.video-preview > button { position: absolute; left: 50%; top: 50%; display: grid; place-items: center; width: 45px; height: 45px; padding: 0; transform: translate(-50%,-50%); color: #fff; border: 1px solid rgba(255,255,255,.2); border-radius: 50%; background: rgba(14,15,18,.66); cursor: pointer; backdrop-filter: blur(7px); }
.video-preview > button:hover { background: var(--accent); border-color: var(--accent); }.video-preview > button svg { width: 17px; fill: currentColor; }
.node-model-source { position: absolute; left: 8px; top: 8px; z-index: 2; padding: 4px 7px; color: #d8d6d0; border: 1px solid rgba(255,255,255,.1); border-radius: 5px; background: rgba(13,14,17,.72); font-size: 8px; font-weight: 650; backdrop-filter: blur(6px); }
.progress { display: none; position: absolute; inset: auto 0 0; height: 3px; background: rgba(255,255,255,.12); }.progress i { display: block; width: 0; height: 100%; background: var(--accent); }
.video-node.running .progress { display: block; }.video-node.running .progress i { animation: renderProgress 3.6s ease forwards; }
@keyframes renderProgress { from { width: 4%; } to { width: 100%; } }
.video-config { display: grid; grid-template-columns: 1.25fr 1.25fr .7fr; gap: 5px; padding: 0 12px; }
.video-config span { display: flex; flex-direction: column; gap: 2px; padding: 7px; border-left: 1px solid #31333a; }
.video-config small { color: #62646a; font-size: 8px; }.video-config b { color: #adaba6; font-size: 9px; font-weight: 600; }

.timeline-strip { display: flex; gap: 3px; height: 66px; margin: 13px 12px; }.timeline-strip i { flex: 1; border-radius: 4px; background: var(--c); }.timeline-strip i:first-child { flex: 1.35; }.timeline-strip i:nth-child(4) { flex: 1.4; }
.compose-node ul { padding: 0 13px; margin: 0; list-style: none; }.compose-node li { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid #292b31; color: #74757a; font-size: 9px; }.compose-node li b { color: #aaa8a3; font-weight: 500; }
.compose-preview { display: block; width: calc(100% - 24px); height: 176px; margin: 12px; object-fit: contain; border-radius: 8px; background: #090a0c; }
.node-empty { padding: 24px 18px; color: #66686d; line-height: 1.65; text-align: center; font-size: 10px; }
.node-empty.roomy { min-height: 130px; display: grid; place-items: center; }
.asset-placeholder { position: absolute !important; inset: 0 !important; display: grid !important; place-items: center; padding: 0 !important; color: #62656b; background: #121317 !important; }

.zoom-control { position: absolute; z-index: 12; left: 16px; bottom: 17px; display: flex; align-items: center; height: 34px; border: 1px solid var(--line); border-radius: 8px; background: rgba(28,29,34,.93); box-shadow: 0 7px 18px rgba(0,0,0,.18); }
.zoom-control button { display: grid; place-items: center; min-width: 32px; height: 100%; padding: 0 7px; color: #88898e; border: 0; border-right: 1px solid var(--line); background: transparent; cursor: pointer; }.zoom-control button:last-child { border-right: 0; }.zoom-control button:hover { color: #e5e2dc; background: #292b31; }.zoom-control #zoomLevel { min-width: 48px; font-size: 10px; }.zoom-control svg { width: 14px; }
.canvas-tip { position: absolute; right: 16px; bottom: 20px; z-index: 11; color: #505156; font-size: 10px; pointer-events: none; }

.inspector { grid-area: 2 / 3; display: flex; flex-direction: column; min-height: 0; border-left: 1px solid var(--line); background: var(--panel); z-index: 20; }
.inspector > header { display: flex; align-items: center; justify-content: space-between; min-height: 62px; padding: 0 15px 0 17px; border-bottom: 1px solid var(--line); }
.inspector > header div { display: flex; flex-direction: column; gap: 5px; }.inspector > header strong { color: #dfdcd5; font-size: 13px; }
.inspector-body { flex: 1; min-height: 0; overflow: auto; padding: 15px 17px 22px; scrollbar-width: thin; scrollbar-color: #37393f transparent; }
.inspector-body .field { margin-bottom: 16px; }.inspector-body label, .inspector-body .label { display: flex; align-items: center; justify-content: space-between; margin-bottom: 7px; color: #9b9994; font-size: 10px; font-weight: 600; }.inspector-body label em { color: #5f6065; font-style: normal; font-weight: 400; }
.inspector-body input, .inspector-body textarea, .inspector-body select { width: 100%; padding: 9px 10px; color: #c6c3bd; border: 1px solid #30323a; border-radius: 7px; outline: none; background: #121317; font-size: 11px; }.inspector-body textarea { min-height: 100px; resize: vertical; line-height: 1.55; }.inspector-body input:focus, .inspector-body textarea:focus, .inspector-body select:focus { border-color: #565963; }
.model-picker-note { margin: -8px 0 16px; padding: 10px 11px; border-left: 2px solid var(--accent); border-radius: 0 7px 7px 0; background: #202126; }
.model-picker-note > div { display: flex; align-items: center; gap: 6px; }.model-picker-note span, .model-picker-note em { padding: 2px 5px; border-radius: 4px; font-size: 8px; font-style: normal; font-weight: 650; }.model-picker-note span { color: #b8b5ae; background: #30323a; }.model-picker-note em { color: #ffc2a8; background: rgba(255,107,53,.14); }.model-picker-note b { margin-left: auto; color: #6f7177; font-size: 8px; font-weight: 500; }
.model-picker-note p { margin: 8px 0 4px; color: #aaa8a2; font-size: 9.5px; line-height: 1.55; }.model-picker-note small { display: block; color: #66686e; font-size: 8.5px; line-height: 1.55; }
.two-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.two-fields > span { min-width: 0; }
.error-box { margin: 10px 0; padding: 10px; border: 1px solid rgba(213,94,86,.25); border-radius: 7px; color: #d98d86; background: rgba(116,42,38,.13); line-height: 1.5; font-size: 10px; }
.inspector-body .switch-row { display: flex; align-items: center; justify-content: space-between; min-height: 40px; border-bottom: 1px solid #292b31; color: #969792; font-size: 10px; }.switch { position: relative; width: 30px; height: 17px; border-radius: 999px; background: #34363c; }.switch::after { content:""; position: absolute; width: 13px; height: 13px; left: 2px; top: 2px; border-radius: 50%; background: #8b8d92; }.switch.on { background: rgba(255,107,53,.45); }.switch.on::after { left: 15px; background: #ff9d78; }
.inspector-body .asset-ref { display: flex; gap: 8px; }.asset-ref img { width: 58px; height: 58px; object-fit: cover; border: 1px solid #32343a; border-radius: 7px; }.asset-ref div { display: flex; flex-direction: column; justify-content: center; gap: 4px; }.asset-ref b { color: #c3c0ba; font-size: 10px; }.asset-ref small { color: #67686d; font-size: 9px; }
.inspector-body details { border-top: 1px solid #2a2c32; }.inspector-body summary { padding: 12px 0; color: #85868b; cursor: pointer; font-size: 10px; }.inspector-body details p { margin: 0 0 10px; color: #65666b; line-height: 1.55; font-size: 9px; }
.inspector > footer { display: flex; align-items: center; gap: 8px; padding: 12px 15px; border-top: 1px solid var(--line); }.inspector > footer button { height: 34px; border: 0; border-radius: 7px; cursor: pointer; font-size: 11px; }.inspector > footer button:disabled { opacity: .38; cursor: not-allowed; }.danger-text { padding: 0 7px; color: #bd786e; background: transparent; }.danger-text:not(:disabled):hover { color: #f0a099; background: rgba(213,94,86,.1); }.save-btn { flex: 1; color: #fff; background: #34363d; font-weight: 600; }.save-btn:not(:disabled):hover { background: #42454e; }

.node-dialog { width: 650px; padding: 0; color: var(--text); border: 1px solid #393b43; border-radius: 14px; background: #191a1f; box-shadow: 0 24px 80px rgba(0,0,0,.55); }.node-dialog::backdrop { background: rgba(7,8,10,.66); backdrop-filter: blur(4px); }.dialog-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px 12px; }.dialog-head h2 { margin: 3px 0 0; font-size: 17px; }.dialog-search { margin: 0 20px 14px; }.node-palette { display: grid; grid-template-columns: repeat(2,1fr); gap: 6px; padding: 0 14px 16px; }.node-palette > button { display: grid; grid-template-columns: 36px 1fr; align-items: center; gap: 10px; min-height: 62px; padding: 9px; color: inherit; border: 1px solid transparent; border-radius: 9px; background: transparent; text-align: left; cursor: pointer; }.node-palette > button:hover { border-color: #34363d; background: #22242a; }.node-palette > button > div { display: flex; flex-direction: column; gap: 4px; }.node-palette b { color: #d5d2cc; font-size: 11px; }.node-palette small { color: #737479; font-size: 9px; }
.asset-dialog { width: min(820px, calc(100vw - 40px)); }
.asset-history { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; max-height: min(620px,70vh); padding: 4px 18px 20px; overflow: auto; }
.asset-history > button { position: relative; overflow: hidden; min-height: 190px; padding: 0; border: 1px solid #30323a; border-radius: 9px; color: inherit; background: #101115; cursor: pointer; text-align: left; }
.asset-history > button:hover { border-color: #5a5d66; }
.asset-history img, .asset-history video { display: block; width: 100%; height: 145px; object-fit: cover; background: #090a0c; }
.asset-history span { display: flex; flex-direction: column; gap: 3px; padding: 9px; }
.asset-history b { overflow: hidden; color: #d5d2cc; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.asset-history small { color: #6f7177; font-size: 8px; }
.workflow-dialog { width: min(900px, calc(100vw - 40px)); }
.workflow-import-body { padding: 2px 20px 22px; }
.workflow-drop { display: grid; grid-template-columns: 42px minmax(0,1fr) auto; align-items: center; gap: 13px; min-height: 86px; padding: 14px 16px; border: 1px dashed #454852; border-radius: 11px; background: #14151a; cursor: pointer; transition: border-color .16s, background .16s, transform .16s; }
.workflow-drop:hover, .workflow-drop.dragging { border-color: #858996; background: #1b1d23; transform: translateY(-1px); }
.workflow-drop input { display: none; }
.workflow-drop > span { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid #3a3d46; border-radius: 10px; color: #b5b7bf; background: #202228; }
.workflow-drop svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.workflow-drop > div { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.workflow-drop b { color: #e2dfd8; font-size: 12px; }.workflow-drop small { color: #797b83; font-size: 9px; }.workflow-drop em { color: #666970; font-size: 9px; font-style: normal; white-space: nowrap; }
.workflow-library-head { display: flex; justify-content: space-between; align-items: end; margin: 19px 2px 9px; }
.workflow-library-head > div { display: flex; align-items: baseline; gap: 8px; }.workflow-library-head b { color: #d7d4ce; font-size: 11px; }.workflow-library-head small { color: #6e7077; font-size: 9px; }.workflow-library-head > span { padding: 4px 7px; border: 1px solid #34363e; border-radius: 5px; color: #8c8e95; font-size: 8px; }
.workflow-list { display: flex; flex-direction: column; gap: 7px; max-height: min(560px, 58vh); overflow-y: auto; }
.workflow-item { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 11px 18px; padding: 13px 14px; border: 1px solid #30323a; border-radius: 10px; background: #17181d; }
.workflow-item:hover { border-color: #444751; }.workflow-item-head { display: grid; grid-template-columns: 9px minmax(0,1fr); gap: 10px; align-items: start; }
.workflow-item-head > i, .workflow-node .compat-dot { width: 8px; height: 8px; margin-top: 4px; border-radius: 50%; background: #8a8d94; box-shadow: 0 0 0 3px rgba(138,141,148,.1); }
.workflow-item.ready .workflow-item-head > i, .workflow-item.compatible .workflow-item-head > i, .workflow-node .compat-dot.ready { background: #66ba87; box-shadow: 0 0 0 3px rgba(102,186,135,.12); }
.workflow-item.needs_setup .workflow-item-head > i, .workflow-node .compat-dot.needs_setup { background: #d3a654; box-shadow: 0 0 0 3px rgba(211,166,84,.12); }
.workflow-item-head div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }.workflow-item-head b { overflow: hidden; color: #dfdcd5; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }.workflow-item-head small { color: #777981; font-size: 9px; }
.workflow-item-actions { display: flex; align-items: start; gap: 5px; }.workflow-item-actions button, .workflow-item-actions a { padding: 6px 8px; border: 1px solid #3a3c44; border-radius: 6px; color: #aeb0b7; background: #202127; font-size: 9px; text-decoration: none; cursor: pointer; }.workflow-item-actions .add { color: #17181d; border-color: #e4e1db; background: #e4e1db; font-weight: 700; }
.workflow-report { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 1px; overflow: hidden; border: 1px solid #2c2e34; border-radius: 7px; background: #2c2e34; }.workflow-report span { display: flex; flex-direction: column; gap: 3px; padding: 8px 9px; background: #14151a; }.workflow-report small { color: #696b72; font-size: 8px; }.workflow-report b { color: #bbb8b2; font-size: 10px; }
.workflow-missing { grid-column: 1 / -1; color: #8d8f96; font-size: 9px; line-height: 1.6; }.workflow-missing details { padding-top: 3px; }.workflow-missing summary { color: #b8995e; cursor: pointer; }.workflow-missing p { margin: 6px 0 0; word-break: break-word; }
.workflow-node .workflow-summary { display: flex; align-items: center; gap: 9px; padding: 12px 13px 10px; }.workflow-node .workflow-summary > div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }.workflow-node .workflow-summary b { color: #d8d5cf; font-size: 11px; }.workflow-node .workflow-summary small { color: #777980; font-size: 9px; }
.workflow-node .compat-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1px; margin: 0 11px 10px; overflow: hidden; border: 1px solid #30323a; border-radius: 7px; background: #30323a; }.workflow-node .compat-grid span { display: flex; flex-direction: column; gap: 3px; padding: 8px; background: #18191e; }.workflow-node .compat-grid small { color: #686a71; font-size: 8px; }.workflow-node .compat-grid b { color: #bdbab4; font-size: 10px; }
.workflow-node .workflow-warning { margin: 0 11px 10px; color: #a98c59; font-size: 9px; line-height: 1.55; }
@media (max-width: 720px) { .workflow-drop { grid-template-columns: 42px minmax(0,1fr); }.workflow-drop > em { display: none; }.workflow-item { grid-template-columns: 1fr; }.workflow-item-actions { grid-row: 3; flex-wrap: wrap; }.workflow-report { grid-template-columns: repeat(2,1fr); } }
.list-empty { padding: 28px 12px; color: #65676d; text-align: center; font-size: 10px; }
.status-dot.queued, .status-dot.running { background: var(--yellow); }
.status-dot.done { background: var(--green); }
.status-dot.failed { background: #d55e56; }
.other-projects { margin: 8px 10px 0; padding-top: 9px; border-top: 1px solid var(--line); }
.other-projects > small { display: block; padding: 0 8px 5px; color: #55575d; font-size: 9px; }
.other-projects > button { width: 100%; overflow: hidden; padding: 6px 8px; color: #77797e; border: 0; border-radius: 6px; background: transparent; text-align: left; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; font-size: 10px; }
.other-projects > button:hover { color: #c5c2bc; background: #22242a; }
.element-panel.collapsed .search-field, .element-panel.collapsed .filters, .element-panel.collapsed .element-list { display: none; }
.element-panel.collapsed { flex: 0 0 auto; }
.saved.saving { color: #d3b16b; }.saved.error { color: #d98d86; }
.top-actions .primary:disabled { opacity: .48; cursor: not-allowed; }

.toast { position: fixed; z-index: 90; left: 50%; bottom: 24px; transform: translate(-50%, 12px); min-width: 220px; padding: 10px 14px; border: 1px solid #3b3e46; border-radius: 8px; color: #d8d5cf; background: #23252a; box-shadow: 0 12px 30px rgba(0,0,0,.35); text-align: center; font-size: 11px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }.toast.show { opacity: 1; transform: translate(-50%,0); }
.auth-gate { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 50% 10%, #242733 0, #111216 46%); }.auth-gate[hidden] { display: none; }.auth-gate > div { width: min(380px, 100%); padding: 34px; border: 1px solid #32343c; border-radius: 16px; background: #191a1f; box-shadow: 0 24px 80px rgba(0,0,0,.42); text-align: center; }.auth-gate .brand-mark { margin: 0 auto 18px; }.auth-gate h1 { margin: 0; font-size: 22px; }.auth-gate p { margin: 10px 0 22px; color: var(--muted); line-height: 1.65; }.auth-form { display: grid; gap: 8px; text-align: left; }.auth-form label { margin-top: 6px; color: #b9bbc3; font-size: 11px; font-weight: 650; }.auth-form input { width: 100%; height: 42px; padding: 0 12px; border: 1px solid #393b44; border-radius: 8px; color: #f0eee9; background: #121318; outline: none; }.auth-form input:focus { border-color: #777b89; box-shadow: 0 0 0 3px rgba(151,154,165,.12); }.auth-form button { height: 43px; margin-top: 10px; border: 0; border-radius: 8px; color: #111216; background: #efede8; font-weight: 750; cursor: pointer; }.auth-form button:disabled { opacity: .55; cursor: wait; }.auth-error { min-height: 18px; color: #f28d85; font-size: 11px; text-align: center; }.auth-gate .auth-back { display: inline-block; margin-top: 8px; color: #91939b; font-size: 11px; text-decoration: none; }.auth-gate .auth-back:hover { color: #ece9e3; }

@media (max-width: 1320px) {
  :root { --sidebar: 224px; --inspector: 284px; }
  .stage-track { display: none; }
  .topbar { grid-template-columns: var(--sidebar) minmax(220px,1fr) minmax(340px,auto); }
  .top-actions { grid-column: 3; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
