/* Vextra Studio – game editor styles */
.hidden { display: none !important; }
.mini { font-size: 11px; color: var(--muted); }
.row { display: flex; align-items: center; gap: 6px; flex-wrap: nowrap; margin: 4px 0; } .row.wrap { flex-wrap: wrap; } .row .sp, .sp { flex: 1; }
.row input[type=text], .row input:not([type]), .row select { min-width: 0; }

/* ---------- shell ---------- */
.gl { display: flex; height: 100%; min-height: 0; background: var(--bg); color: var(--text); }
.gl-left { width: 230px; flex: none; display: flex; flex-direction: column; border-right: 1px solid var(--border); background: var(--bg2); min-height: 0; }
.gl-right { width: 300px; flex: none; overflow: auto; border-left: 1px solid var(--border); background: var(--bg2); padding-bottom: 30px; }
.gl-center { flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 0; }
.gl .resizer.v { width: 4px; margin: 0 -2px; cursor: col-resize; flex: none; z-index: 5; background: transparent; } .gl .resizer.v:hover { background: var(--accent); opacity: .5; }
.gl-sec { display: flex; flex-direction: column; min-height: 0; border-bottom: 1px solid var(--border); } .gl-sec.grow { flex: 1; border-bottom: 0; }
.gl-sec-h { display: flex; align-items: center; gap: 4px; padding: 6px 8px 4px 10px; font-size: 10.5px; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.gl-scenes { padding: 0 4px 6px; max-height: 160px; overflow: auto; } .gl-hier { flex: 1; overflow: auto; padding: 0 4px 8px; min-height: 60px; }
.gl-row { display: flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 6px; cursor: pointer; font-size: 12.5px; user-select: none; }
.gl-row:hover { background: var(--hover); } .gl-row.on { background: var(--sel); color: var(--accent); } .gl-row.dim { opacity: .5; } .gl-row .nm { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .gl-row .ico { width: 18px; text-align: center; flex: none; }
.gl-row .badge { font-size: 10px; color: var(--muted); } .gl-row.prefab .nm { font-style: italic; } .gl-row.mine .nm { font-weight: 600; }
.gl-row .mini-btn, .beh-chip .mini-btn { border: 0; background: transparent; padding: 0 2px; font-size: 11px; opacity: 0; cursor: pointer; } .gl-row:hover .mini-btn { opacity: .8; }
.gl-tabs { display: flex; align-items: center; gap: 2px; padding: 4px 8px; border-bottom: 1px solid var(--border); background: var(--bg2); flex: none; }
.gl-tab { border: 0; background: transparent; padding: 5px 14px; border-radius: 7px; font-size: 12.5px; color: var(--muted); } .gl-tab:hover { background: var(--hover); color: var(--text); } .gl-tab.on { background: var(--sel); color: var(--accent); font-weight: 600; }
.gl-vtools { display: flex; gap: 4px; }
.gl-view { flex: 1; min-height: 0; position: relative; display: flex; }
.gl-vps { position: absolute; inset: 0; }

/* ---------- viewport ---------- */
.vp { position: absolute; inset: 0; overflow: hidden; background: var(--canvas, #0b0d12); }
.vp-canvas { display: block; width: 100%; height: 100%; outline: none; }
.vp.dnd-over, .ge-canvas.dnd-over { box-shadow: inset 0 0 0 2px var(--accent); }

/* ---------- palette (sidebar) ---------- */
.pal-note { font-size: 11.5px; color: var(--muted); padding: 4px 6px 8px; }
.pal-head { font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin: 10px 4px 4px; }
.pal-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.pal-item { border: 1px solid var(--border); background: var(--bg3); border-radius: 8px; padding: 8px 4px 6px; text-align: center; cursor: grab; user-select: none; } .pal-item:hover { border-color: var(--accent); background: var(--hover); }
.pal-item .pi { font-size: 20px; line-height: 1.2; } .pal-item .pl { font-size: 10.5px; color: var(--muted); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pi-img { width: 28px; height: 28px; object-fit: contain; image-rendering: pixelated; }

/* ---------- inspector ---------- */
.ins-title { display: flex; align-items: center; gap: 6px; padding: 10px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--bg2); z-index: 2; } .ins-title input { flex: 1; min-width: 0; font-weight: 600; }
.ins-sec { padding: 8px 10px 4px; border-bottom: 1px solid var(--border); } .ins-h { font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin-bottom: 6px; }
.ins-sub { font-size: 11px; color: var(--muted); margin: 8px 0 2px; }
.ins-row { display: grid; grid-template-columns: 78px minmax(0, 1fr); gap: 6px; align-items: center; margin: 5px 0; } .ins-row > label { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ins-row .ctl { display: flex; gap: 4px; align-items: center; min-width: 0; } .ins-row .ctl > input:not([type=checkbox]):not([type=color]), .ins-row .ctl > select, .ins-row .ctl > textarea { flex: 1; min-width: 0; width: 100%; }
.ins-row input[type=color] { width: 34px; height: 24px; padding: 0; border: 1px solid var(--border); border-radius: 5px; background: transparent; flex: none; }
.ins-note { font-size: 11.5px; color: var(--muted); margin: 4px 0 8px; line-height: 1.45; }
.nf { display: flex; align-items: center; gap: 3px; flex: 1; min-width: 0; } .nf span { font-size: 10px; color: var(--muted); width: 12px; flex: none; text-align: center; } .nf input { min-width: 0; width: 100%; }
input.n { width: 100%; }
.chk { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; }
.beh-list { display: flex; flex-direction: column; gap: 4px; margin-bottom: 6px; } .beh-chip { display: flex; align-items: center; gap: 4px; padding: 4px 8px; background: var(--bg3); border: 1px solid var(--border); border-radius: 7px; font-size: 12px; } .beh-chip .nm { flex: 1; cursor: pointer; } .beh-chip .nm:hover { color: var(--accent); } .beh-chip.missing { border-color: var(--danger); } .beh-chip .mini-btn { opacity: .7; }

/* ---------- logic view ---------- */
.lg-left { width: 190px; flex: none; border-right: 1px solid var(--border); background: var(--bg2); display: flex; flex-direction: column; min-height: 0; } .lg-list { flex: 1; overflow: auto; padding: 0 4px; }
.lg-main { flex: 1; min-width: 0; display: flex; flex-direction: column; } .lg-bar { display: flex; align-items: center; gap: 6px; padding: 5px 10px; border-bottom: 1px solid var(--border); background: var(--bg2); flex: none; flex-wrap: wrap; } .lg-name { cursor: pointer; } .lg-name:hover { color: var(--accent); } .lg-hint { color: var(--muted); font-size: 12px; }
.lg-body { flex: 1; min-height: 0; display: flex; } .lg-graph { flex: 1; min-width: 0; position: relative; } .lg-codewrap { flex: 1; min-width: 0; display: flex; flex-direction: column; border-left: 1px solid var(--border); } .lg-code { flex: 1; min-height: 0; position: relative; } .lg-code .ace_editor { position: absolute; inset: 0; }
.lg-body.m-blocks .lg-codewrap { display: none; } .lg-body.m-code .lg-graph { display: none; } .lg-body.m-code .lg-codewrap { border-left: 0; }
.lg-status { padding: 5px 10px; font-size: 11.5px; color: var(--muted); border-top: 1px solid var(--border); background: var(--bg2); } .lg-status.err { color: var(--danger); } .lg-status.ok { color: var(--ok); }
.ace-node-line { position: absolute; background: rgba(108, 140, 255, .3); }

/* ---------- graph editor ---------- */
.ge { position: absolute; inset: 0; display: flex; background: var(--canvas, #0b0d12); }
.ge-pal { width: 190px; flex: none; overflow: auto; border-right: 1px solid var(--border); background: var(--bg2); padding: 6px; } .ge-pal .search-input { width: 100%; margin-bottom: 6px; }
.ge-cat { display: flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; padding: 5px 4px; cursor: pointer; user-select: none; color: var(--text); } .ge-cat small { margin-left: auto; color: var(--muted); font-weight: 400; }
.ge-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; display: inline-block; }
.ge-item { display: flex; align-items: center; gap: 6px; padding: 3px 6px 3px 14px; font-size: 12px; border-radius: 5px; cursor: grab; user-select: none; } .ge-item:hover { background: var(--hover); }
.ge-canvas { flex: 1; position: relative; overflow: hidden; outline: none; background-image: radial-gradient(var(--dots, rgba(255,255,255,.08)) 1px, transparent 1px); background-size: 22px 22px; }
.ge-world { position: absolute; left: 0; top: 0; transform-origin: 0 0; width: 1px; height: 1px; } .ge-wires { position: absolute; left: 0; top: 0; width: 1px; height: 1px; overflow: visible; pointer-events: none; }
.ge-wire { fill: none; stroke: #6c7a99; stroke-width: 2.2; } .ge-wire.sel { stroke: var(--accent); stroke-width: 3.2; } .ge-wire.tmp { stroke: var(--accent); stroke-dasharray: 5 4; } .ge-hit { fill: none; stroke: transparent; stroke-width: 14; pointer-events: stroke; cursor: pointer; }
.ge-node { position: absolute; background: var(--bg2); border: 1px solid var(--border); border-radius: 9px; box-shadow: 0 4px 14px rgba(0,0,0,.3); user-select: none; } .ge-node.sel { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent), 0 4px 14px rgba(0,0,0,.3); } .ge-node.missing { border-color: var(--danger); } .ge-node.bundle { border-style: dashed; }
.ge-head { height: 28px; border-radius: 8px 8px 0 0; display: flex; align-items: center; justify-content: space-between; padding: 0 8px; color: #fff; font-size: 12.5px; font-weight: 600; cursor: grab; text-shadow: 0 1px 2px rgba(0,0,0,.4); } .ge-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ge-q { border: 0; width: 17px; height: 17px; border-radius: 50%; background: rgba(255,255,255,.25); color: #fff; font-size: 10px; padding: 0; cursor: pointer; flex: none; } .ge-q:hover { background: rgba(255,255,255,.5); }
.ge-ports { position: relative; } .ge-port { position: absolute; height: 22px; display: flex; align-items: center; font-size: 11.5px; color: var(--muted); cursor: crosshair; }
.ge-port.in { left: 0; padding-left: 12px; } .ge-port.out { right: 0; padding-right: 12px; justify-content: flex-end; }
.ge-port i { position: absolute; width: 11px; height: 11px; border-radius: 50%; background: var(--bg3); border: 2px solid #8793ad; top: 5.5px; } .ge-port.in i { left: -6px; } .ge-port.out i { right: -6px; } .ge-port:hover i { background: var(--accent); border-color: var(--accent); }
.ge-sum { padding: 4px 8px 7px; font-size: 10.5px; color: var(--muted); border-top: 1px solid var(--border); line-height: 1.4; overflow: hidden; } .ge-sum div { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ge-band { position: absolute; border: 1px solid var(--accent); background: rgba(108,140,255,.15); pointer-events: none; }
.ge-crumbs { position: absolute; top: 8px; left: 10px; display: flex; gap: 4px; font-size: 12px; z-index: 3; } .ge-crumbs:empty { display: none; }
.ge-empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); pointer-events: none; font-size: 13px; }
.ge-rz { flex: none; width: 5px; cursor: col-resize; background: transparent; margin: 0 -2px; z-index: 5; touch-action: none; } .ge-rz:hover, .ge-rz.on { background: var(--accent); opacity: .55; } .ge.pal-hidden .ge-pal + .ge-rz, .ge.side-hidden .ge-rz:nth-last-child(2) { display: none; }
.ge-side { width: 240px; flex: none; overflow: auto; border-left: 1px solid var(--border); background: var(--bg2); padding: 8px 10px; } .ge-side .group-title { font-weight: 600; font-size: 12.5px; margin-bottom: 6px; }
.ge.ro .ge-node { opacity: .95; } .ge.ro .ge-canvas::after { content: "read only"; position: absolute; right: 10px; top: 8px; font-size: 11px; color: var(--muted); background: var(--bg2); border: 1px solid var(--border); padding: 2px 8px; border-radius: 99px; }

/* ---------- assets ---------- */
.assets { position: absolute; inset: 0; display: flex; flex-direction: column; padding: 10px 14px; overflow: auto; }
.as-bar { display: flex; align-items: center; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; } .as-tab { border: 1px solid var(--border); background: var(--bg3); color: var(--text); padding: 5px 12px; border-radius: 99px; font-size: 12.5px; cursor: pointer; } .as-tab.on { background: var(--sel); border-color: var(--accent); color: var(--accent); } .as-tab .cnt { color: var(--muted); font-size: 11px; }
.as-search { width: 150px; }
.as-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; align-content: start; }
.as-card { border: 1px solid var(--border); background: var(--bg2); border-radius: 10px; padding: 10px 8px 8px; text-align: center; cursor: grab; user-select: none; } .as-card:hover { border-color: var(--accent); background: var(--hover); }
.as-img { width: 72px; height: 72px; object-fit: contain; background: repeating-conic-gradient(#2a2f42 0 25%, #222637 0 50%) 0 0 / 12px 12px; border-radius: 6px; image-rendering: pixelated; } .as-glyph { height: 72px; display: grid; place-items: center; font-size: 34px; }
.as-name { font-size: 12.5px; margin-top: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .as-meta { font-size: 10.5px; color: var(--muted); }
.as-empty, .as-hint { grid-column: 1 / -1; color: var(--muted); font-size: 12.5px; padding: 18px 4px; } .as-hint { padding: 14px 2px 0; font-size: 11.5px; }

/* ---------- studios ---------- */
.modal.studio { width: min(1080px, 96vw); } .modal.studio .modal-body { padding: 0; overflow: auto; }
.se { display: grid; grid-template-columns: 76px minmax(0, 1fr) 250px; grid-template-rows: minmax(0, 1fr) auto; min-height: 520px; max-height: 78vh; }
.se-tools { display: flex; flex-direction: column; gap: 4px; padding: 8px; border-right: 1px solid var(--border); overflow: auto; } .se-tools .btn { justify-content: center; } .se-tools hr { width: 100%; border: 0; border-top: 1px solid var(--border); margin: 4px 0; } .se-tools select { width: 100%; }
.se-center { display: flex; flex-direction: column; min-width: 0; min-height: 0; } .se-stage { flex: 1; overflow: auto; display: grid; place-items: center; background: #14171f; padding: 10px; min-height: 0; } .se-cv { image-rendering: pixelated; cursor: crosshair; box-shadow: 0 0 0 1px var(--border); touch-action: none; }
.se-foot { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.se-side { padding: 10px; overflow: auto; border-left: 1px solid var(--border); display: flex; flex-direction: column; gap: 4px; } .se-side input[type=text], .se-side input:not([type]), .se-side input[type=number] { width: 100%; }
.se-pal { display: grid; grid-template-columns: repeat(8, 1fr); gap: 3px; } .sw { width: 100%; aspect-ratio: 1; border: 1px solid rgba(255,255,255,.25); border-radius: 4px; padding: 0; cursor: pointer; display: inline-block; min-width: 16px; } .sw.on { outline: 2px solid var(--accent); outline-offset: 1px; }
.se-prev { image-rendering: pixelated; background: repeating-conic-gradient(#2a2f42 0 25%, #222637 0 50%) 0 0 / 10px 10px; border-radius: 6px; align-self: flex-start; }
.se-framebar { grid-column: 1 / -1; border-top: 1px solid var(--border); padding: 6px 10px; } .se-frames { display: flex; gap: 6px; overflow-x: auto; padding: 4px 0; } .se-fr { text-align: center; } .se-thumb { image-rendering: pixelated; border: 2px solid var(--border); border-radius: 4px; cursor: pointer; background: repeating-conic-gradient(#2a2f42 0 25%, #222637 0 50%) 0 0 / 8px 8px; display: block; } .se-thumb.on { border-color: var(--accent); }
.tool.on { background: var(--sel); border-color: var(--accent); }

.snd { padding: 14px; max-height: 78vh; overflow: auto; } .snd-presets { display: flex; gap: 5px; flex-wrap: wrap; margin: 8px 0 10px; } .snd-main { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(300px, 1fr); gap: 20px; align-items: start; } .snd-viz { width: 100%; max-width: 520px; border-radius: 8px; border: 1px solid var(--border); }
.slr { display: grid; grid-template-columns: 74px minmax(0, 1fr) 62px; align-items: center; gap: 8px; margin: 5px 0; } .slr label { font-size: 12px; color: var(--muted); } .slr .val { font-size: 11px; color: var(--muted); text-align: right; font-family: var(--mono); } .slr .seg { grid-column: 2 / 4; }
.snd-sample { padding: 14px 0; }
.seq { margin-top: 14px; border-top: 1px solid var(--border); padding-top: 10px; } .seq-grid { display: grid; gap: 2px; margin-top: 8px; overflow-x: auto; } .seq-lab { font-size: 9.5px; color: var(--muted); display: flex; align-items: center; } .seq-cell { height: 15px; min-width: 14px; background: var(--bg3); border-radius: 3px; cursor: pointer; } .seq-cell.beat { background: var(--hover); } .seq-cell:hover { outline: 1px solid var(--accent); } .seq-cell.on { background: var(--accent); }

.me { display: grid; grid-template-columns: minmax(0, 1fr) 360px; min-height: 480px; max-height: 78vh; } .me-main { padding: 12px; overflow: auto; } .me-side { padding: 12px; border-left: 1px solid var(--border); display: flex; flex-direction: column; gap: 6px; overflow: auto; } .me-side input { width: 100%; }
.me-vox { width: min(100%, 480px); aspect-ratio: 1; image-rendering: pixelated; cursor: crosshair; border-radius: 6px; touch-action: none; display: block; margin: 8px 0; } .me-pal { display: flex; flex-wrap: wrap; gap: 5px; margin: 6px 0; align-items: center; } .me-pal .sw { width: 26px; height: 26px; aspect-ratio: auto; }
.me-parts { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; } .me-part { border: 1px solid var(--border); border-radius: 8px; padding: 6px 8px; background: var(--bg2); } .me-part.on { border-color: var(--accent); } .row.g6 input.n { flex: 1; min-width: 0; }
.me-obj { width: 100%; height: 340px; font-family: var(--mono); font-size: 12px; resize: vertical; } .mp-canvas { border-radius: 8px; background: #151925; border: 1px solid var(--border); touch-action: none; }

/* ---------- play ---------- */
.play { position: absolute; inset: 0; display: flex; flex-direction: column; background: #07080c; } .play-bar { display: flex; align-items: center; gap: 6px; padding: 5px 10px; background: var(--bg2); border-bottom: 1px solid var(--border); flex-wrap: wrap; } .play-bar input[type=range] { width: 90px; }
.play-stage { flex: 1; min-height: 0; position: relative; display: grid; place-items: center; overflow: hidden; } .play-frame { border: 0; background: #000; display: block; } .play-frame.dev { border-radius: 22px; box-shadow: 0 0 0 10px #1c1f2b, 0 0 0 11px #353a4d, 0 20px 60px rgba(0,0,0,.6); }
.gl-tab { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.lg-body.m-split .ge-side { display: none; } .lg-body.m-split .ge-pal { width: 150px; } .lg-body.codemode .ge-pal { display: none; } .lg-body.m-split .lg-graph { flex: 3; } .lg-body.m-split .lg-codewrap { flex: 2; }

/* graph editor: collapsible panels + nodes, responsive widths */
.ge-pal { width: clamp(130px, 18%, 190px); } .ge-side { width: clamp(170px, 22%, 240px); }
.ge.pal-hidden .ge-pal, .ge.side-hidden .ge-side { display: none; }
.ge-tools { position: absolute; top: 8px; right: 10px; display: flex; gap: 4px; z-index: 4; flex-wrap: wrap; justify-content: flex-end; max-width: calc(100% - 20px); }
.ge-crumbs { top: 40px; }
.ge-tog { background: var(--bg2); color: var(--fg, inherit); border: 1px solid var(--border); border-radius: 7px; padding: 3px 9px; font-size: 11.5px; cursor: pointer; } .ge-tog:hover { border-color: var(--accent); } .ge-tog.on { background: var(--sel); border-color: var(--accent); }
.ge-fold { margin-right: 4px; width: 18px; padding: 0; background: transparent; border: 0; color: #fff; cursor: pointer; }
.ge-node.collapsed { opacity: .92; } .ge-node.collapsed .ge-head { border-radius: 8px; }

/* editor panels: responsive + collapsible */
.gl-left { width: clamp(170px, 22%, 230px); } .gl-right { width: clamp(200px, 26%, 300px); } .lg-left { width: clamp(130px, 20%, 190px); }
.gl.hide-left .gl-left, .gl.hide-left .resizer[data-for=left], .gl.hide-right .gl-right, .gl.hide-right .resizer[data-for=right] { display: none; }
.gl-tabs .btn.on { border-color: var(--accent); color: var(--accent); } .gl-tabs { flex-wrap: wrap; }
.ge-bic { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 20px; height: 20px; margin-right: 6px; border-radius: 6px; font-size: 12.5px; line-height: 1; background: color-mix(in srgb, var(--c, #888) 22%, transparent); border: 1px solid color-mix(in srgb, var(--c, #888) 45%, transparent); }
.ge-bic.hd { width: 18px; height: 18px; margin-right: 5px; font-size: 11.5px; background: #00000030; border-color: #ffffff30; }
.ge-item { display: flex; align-items: center; }
/* status / read-only notice sits on top of the code pane so it is always visible */
.lg-codewrap > .lg-status { border-top: 0; border-bottom: 1px solid var(--border); flex: none; line-height: 1.4; } .lg-status.ro { color: var(--text); background: color-mix(in srgb, var(--accent) 14%, var(--bg2)); font-weight: 600; } .lg-status:empty { display: none; }
/* ---- v3 studios: animation timeline, material, shader, defaults ---- */
.anm { display: flex; flex-direction: column; gap: 8px; padding: 10px; min-width: min(980px, 92vw); } .anm .row.wrap { flex-wrap: wrap; } .anm-body { display: flex; gap: 10px; min-height: 260px; } .anm-lanes { flex: 1; min-width: 0; overflow: auto; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); position: relative; max-height: 52vh; }
.anm-side { width: 240px; flex: none; display: flex; flex-direction: column; gap: 8px; } .anm-stage { width: 100%; border-radius: 8px; border: 1px solid var(--border); } .anm-key { display: flex; flex-direction: column; gap: 6px; padding: 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg2); }
.anm-ruler { position: sticky; top: 0; z-index: 3; height: 22px; margin-left: 170px; background: var(--bg2); border-bottom: 1px solid var(--border); cursor: ew-resize; touch-action: none; } .anm-ruler span { position: absolute; top: 4px; font-size: 10px; color: var(--muted); padding-left: 3px; border-left: 1px solid var(--border); height: 100%; }
.anm-rows { position: relative; margin-left: 170px; } .anm-lane { display: flex; height: 34px; border-bottom: 1px solid var(--border); position: relative; } .anm-name { position: absolute; left: -170px; width: 170px; height: 34px; display: flex; align-items: center; gap: 4px; padding: 0 6px; background: var(--bg2); border-right: 1px solid var(--border); box-sizing: border-box; z-index: 2; } .anm-name b { flex: 1; font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .anm-v { width: 60px; }
.anm-strip { position: relative; height: 34px; background: repeating-linear-gradient(90deg, transparent 0 39px, var(--border) 39px 40px); } .anm-k { position: absolute; top: 9px; width: 14px; height: 14px; margin-left: -7px; background: var(--accent); border: 2px solid var(--bg); transform: rotate(45deg); border-radius: 3px; cursor: ew-resize; touch-action: none; } .anm-k.on { outline: 2px solid #fff; } .anm-head { position: absolute; top: 0; bottom: 0; width: 2px; background: #ff4d6d; z-index: 1; pointer-events: none; }
.mat-wrap { display: flex; gap: 14px; padding: 10px; flex-wrap: wrap; min-width: min(760px, 92vw); } .mat-form { flex: 1; min-width: 300px; display: flex; flex-direction: column; gap: 7px; } .mat-prev { display: flex; flex-direction: column; gap: 8px; width: 300px; max-width: 100%; } .as-mat { border-radius: 50%; width: 44px; height: 44px; margin: auto; }
.shd { padding: 10px; display: flex; flex-direction: column; gap: 8px; min-width: min(900px, 92vw); } .shd-wrap { display: flex; gap: 12px; flex-wrap: wrap; } .shd-left { flex: 1; min-width: 320px; display: flex; flex-direction: column; } .shd-code { min-height: 340px; font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; tab-size: 2; } .shd-right { width: 320px; max-width: 100%; display: flex; flex-direction: column; gap: 8px; } .shd-prev { border: 1px solid var(--border); border-radius: 8px; background: #10131a; width: 100%; }
.dflt { display: flex; flex-direction: column; gap: 10px; min-width: min(880px, 92vw); } .dflt-grid { max-height: 56vh; overflow: auto; } .dflt .as-card { cursor: pointer; } .dflt .as-card.added { outline: 2px solid var(--ok, #3fb950); }
.anm .n { width: 64px; } .anm-v { width: 62px !important; flex: none; } .anm-name b { min-width: 40px; }

/* ---------- game editor: panels stack / shrink on narrow windows ---------- */
.ge-tools .ge-tog { white-space: nowrap; }
.lg-bar { row-gap: 4px; } .lg-bar .lg-hint { flex: 1 1 160px; min-width: 0; }
.lg-left { width: clamp(120px, 16vw, 190px); }
@media (max-width: 1100px) {
  .ge-side { width: clamp(150px, 24%, 220px); } .se { grid-template-columns: 64px minmax(0, 1fr) 210px; } .me { grid-template-columns: minmax(0, 1fr) 280px; }
}
@media (max-width: 860px) {
  .lg-left { display: none; } .ge-pal { width: 120px; } .ge-side { position: absolute; right: 0; top: 0; bottom: 0; z-index: 5; width: min(240px, 70%); box-shadow: -6px 0 18px rgba(0,0,0,.4); }
  .se, .me, .shd, .mat, .anm { grid-template-columns: 1fr !important; max-height: none; }
  .se-side, .me-side { border-left: 0; border-top: 1px solid var(--border); }
  .as-grid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
}

/* ---------- animation studios (sprite + model) ---------- */
.se-root, .me-root { display: flex; flex-direction: column; min-width: 0; }
.se-modes { display: flex; align-items: center; gap: 6px; padding: 6px 10px; border-bottom: 1px solid var(--border); background: var(--bg2); }
.se-modes .sp { flex: 1; } .se-mode.on { border-color: var(--accent); color: var(--accent); background: var(--sel); }
.sa, .ma { display: grid; grid-template-columns: 210px minmax(0, 1fr) 240px; min-height: 520px; max-height: 78vh; }
.ma { grid-template-columns: 210px minmax(0, 1fr); }
.sa-left { border-right: 1px solid var(--border); display: flex; flex-direction: column; min-height: 0; overflow: auto; }
.sa-right { border-left: 1px solid var(--border); padding: 12px; overflow: auto; }
.sa-mid { padding: 10px 12px; overflow: auto; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ma-main { padding: 10px 12px; overflow: auto; min-width: 0; }
.sa-h { display: flex; align-items: center; gap: 8px; padding: 8px 10px; } .sa-mid .sa-h { padding: 4px 0; } .sa-h .sp { flex: 1; }
.sa-list { display: flex; flex-direction: column; gap: 3px; padding: 0 6px; }
.sa-item { display: flex; flex-direction: column; padding: 6px 9px; border: 1px solid transparent; border-radius: 7px; cursor: pointer; gap: 1px; } .sa-item:hover { background: var(--hover); } .sa-item.on { background: var(--sel); border-color: var(--accent); }
.sa-hint { padding: 8px 10px; line-height: 1.45; }
.sa-stage { display: grid; place-items: center; min-height: 190px; padding: 14px; border: 1px solid var(--border); border-radius: 10px; background-color: #1a1e29; background-image: linear-gradient(45deg, #232838 25%, transparent 25%, transparent 75%, #232838 75%), linear-gradient(45deg, #232838 25%, transparent 25%, transparent 75%, #232838 75%); background-size: 16px 16px; background-position: 0 0, 8px 8px; overflow: auto; }
.sa-cv { image-rendering: pixelated; display: block; }
.sa-info { text-align: center; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.sa-ctl { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; } .sa-ctl .sp { flex: 1; } .sa-play { min-width: 92px; justify-content: center; }
.sa-tl, .sa-bin { display: flex; gap: 6px; overflow-x: auto; padding: 6px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg2); min-height: 74px; align-items: flex-start; }
.sa-card, .sa-bf { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 5px; border: 2px solid var(--border); border-radius: 8px; background: var(--bg3); cursor: pointer; flex: none; }
.sa-card.on { border-color: var(--accent); } .sa-card.now { background: var(--sel); box-shadow: 0 0 0 2px var(--accent) inset; } .sa-card.over { border-color: var(--ok); } .sa-bf:hover { border-color: var(--accent); }
.sa-thumb { image-rendering: pixelated; background: repeating-conic-gradient(#2a3047 0 25%, #1e2230 0 50%) 0 0 / 8px 8px; border-radius: 3px; }
.sa-no { font-size: 10.5px; color: var(--muted); } .sa-hold { display: flex; align-items: center; gap: 3px; font-size: 11px; } .sa-hold .btn { padding: 0 6px; min-height: 18px; line-height: 1; }
.sa-x { position: absolute; top: -7px; right: -7px; width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--border); background: var(--bg2); color: var(--muted); font-size: 10px; cursor: pointer; display: none; } .sa-card:hover .sa-x { display: block; } .sa-x:hover { color: var(--danger); }
.sa-props { display: flex; flex-direction: column; gap: 9px; } .sa-props .n { width: 70px; } .sa-sub { margin-top: 6px; font-size: 12px; }
.sa-stat { display: flex; gap: 18px; padding: 8px 10px; background: var(--bg3); border-radius: 8px; font-size: 12px; } .sa-stat b { font-size: 16px; }
.ma .anm { min-height: 0; } .ma .anm-stage, .ma .mp-canvas { border-radius: 8px; }
@media (max-width: 1000px) { .sa { grid-template-columns: 170px minmax(0, 1fr); } .sa-right { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--border); } .ma { grid-template-columns: 1fr; } }
.ma .anm { min-width: 0; padding: 0; } .ma .anm-body { flex-direction: column; } .ma .anm-side { width: 100%; flex-direction: row; order: -1; align-items: flex-start; } .ma .anm-side .mp-canvas { flex: none; } .ma .anm-key { flex: 1; min-width: 0; }
.ma .anm-rows { margin-left: 250px; } .ma .anm-name { left: -250px; width: 250px; } .ma .anm-name b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* layers, position readout and the UI-layer editor */
.vp-pos { position: absolute; left: 8px; bottom: 8px; display: flex; gap: 10px; font: 11px/1.3 ui-monospace, Menlo, Consolas, monospace; background: rgba(10, 12, 18, .72); color: #dfe6ff; padding: 4px 9px; border-radius: 7px; pointer-events: none; z-index: 3; border: 1px solid rgba(255,255,255,.08); }
.vp-pos .s { color: #ffd98a; } .vp-pos .s:before { content: '· '; color: #888; }
.layer-bar { display: inline-flex; gap: 2px; align-items: center; margin-left: 6px; padding-left: 8px; border-left: 1px solid var(--border, #333); }
.layer-bar .lb { display: inline-flex; align-items: center; border: 1px solid var(--border, #333); border-radius: 7px; overflow: hidden; }
.layer-bar .lb.on { border-color: var(--accent, #6c8cff); } .layer-bar .lb button { border: 0; background: transparent; color: inherit; padding: 2px 6px; font-size: 11px; cursor: pointer; } .layer-bar .lb button.nm { font-weight: 600; } .layer-bar .lb.on button.nm { color: var(--accent, #6c8cff); }
.gl-row .lay { font-size: 9px; padding: 0 4px; border-radius: 4px; background: rgba(255,255,255,.08); opacity: .75; } .gl-row .lay.ui { background: rgba(108,140,255,.25); } .gl-row .lay.background { background: rgba(120,200,160,.2); }
.uil { position: absolute; inset: 0; background: rgba(6, 8, 14, .55); z-index: 5; overflow: hidden; }
.uil-frame { position: absolute; transform-origin: 0 0; border: 2px solid rgba(108,140,255,.9); box-shadow: 0 0 0 1px rgba(0,0,0,.5); background: repeating-linear-gradient(0deg, rgba(255,255,255,.05) 0 1px, transparent 1px 32px), repeating-linear-gradient(90deg, rgba(255,255,255,.05) 0 1px, transparent 1px 32px); }
.uil-a { position: absolute; width: 9px; height: 9px; margin: -5px 0 0 -5px; border: 1.5px solid rgba(255,217,138,.8); border-radius: 50%; pointer-events: none; }
.uil-it { cursor: move; outline: 1.5px dashed rgba(255,255,255,.35); outline-offset: 2px; user-select: none; white-space: pre; } .uil-it:hover { outline-color: #fff; } .uil-it.on { outline: 2px solid #6c8cff; } .uil-it.moved { outline-color: rgba(245,196,81,.8); }
.uil-it.bar { background: rgba(0,0,0,.45); border: 1px solid rgba(255,255,255,.25); border-radius: 9px; overflow: hidden; }
.uil-panel { position: absolute; left: 8px; right: 8px; top: 8px; display: flex; gap: 10px; align-items: center; font-size: 12px; background: rgba(20,24,36,.92); padding: 6px 10px; border-radius: 8px; z-index: 2; } .uil-panel label { display: inline-flex; gap: 5px; align-items: center; } .uil-panel input[type=number] { width: 64px; } .uil-panel .hint { opacity: .75; }
.uil-info { position: absolute; left: 8px; bottom: 8px; font: 11px ui-monospace, Consolas, monospace; background: rgba(10,12,18,.8); padding: 3px 8px; border-radius: 6px; color: #dfe6ff; z-index: 2; }
.uil-empty { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 30px; font-size: 14px; color: rgba(255,255,255,.6); }

/* Logic tab live values */
.v-logic { position: relative; }
.ge-live { position: absolute; left: 0; right: 0; top: 100%; margin-top: 4px; background: rgba(20,24,40,.94); color: #e6ebff; border: 1px solid #3fb950; border-radius: 7px; padding: 3px 7px; font: 11px/1.35 ui-monospace, monospace; pointer-events: none; z-index: 5; }
.ge-live .n { float: right; opacity: .6; } .ge-live b { color: #3fb950; font-weight: 700; } .ge-live div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ge-node.live-hit { box-shadow: 0 0 0 2px #3fb950, 0 0 14px #3fb950; }
.live-box { position: absolute; right: 12px; bottom: 12px; width: min(380px, 46%); background: var(--bg2); border: 1px solid #3fb950; border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.45); z-index: 20; display: flex; flex-direction: column; overflow: hidden; }
.live-head { display: flex; gap: 6px; align-items: center; padding: 5px 8px; font-size: 12px; } .live-head .sp { flex: 1; } .live-head b { color: #3fb950; } .live-head .mini { opacity: .7; font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; } .live-head b { white-space: nowrap; }
.live-box .play { height: 240px; position: relative; } .live-box .play-bar { display: none; }
.bl-link { display: flex; flex-direction: column; gap: 10px; min-width: 520px; } .bl-conn { align-items: center; } .bl-dot { width: 10px; height: 10px; border-radius: 50%; background: #888; } .bl-dot.on { background: #4cd07d; box-shadow: 0 0 6px #4cd07d; }
.bl-card { border: 1px solid var(--border); background: var(--bg3); border-radius: 8px; padding: 10px; display: flex; flex-direction: column; gap: 8px; } .bl-row { align-items: center; } .bl-help { font-size: 12.5px; line-height: 1.5; } .bl-help ol { margin: 6px 0 6px 18px; padding: 0; } .bl-err { color: #ff8f8f; margin: 4px 0; } .bl-work { color: var(--accent); font-size: 12.5px; }
