:root{color-scheme:dark;--bg:#101620;--panel:#18212d;--line:#2e3a4a;--text:#eff5fc;--sub:#97a7bb;--accent:#f5b966;--mint:#71d9b4}
*{box-sizing:border-box}html,body{margin:0;min-height:100%;font-family:Inter,ui-sans-serif,system-ui,-apple-system,Segoe UI,sans-serif;background:var(--bg);color:var(--text)}
button,input,select{font:inherit}button{cursor:pointer}button:disabled{opacity:.35;cursor:not-allowed}
.app{height:100dvh;min-height:650px;display:flex;flex-direction:column}.topbar{height:68px;display:flex;justify-content:space-between;align-items:center;padding:12px 22px;border-bottom:1px solid var(--line);background:#151d28;gap:14px}
.brand{display:flex;align-items:center;gap:12px}.mark{background:linear-gradient(145deg,#f3c27d,#b87735);border-radius:12px;width:38px;height:38px;display:grid;place-items:center;font-size:22px;color:#222}.brand strong{display:block;font-size:13px;letter-spacing:.075em}.brand strong span{color:var(--accent)}.brand small{display:block;letter-spacing:.095em;color:var(--sub);font-size:9px;margin-top:5px}.headright{display:flex;gap:8px}.tag{font-size:10px;border:1px solid #75553e;color:#ffc486;border-radius:999px;padding:7px 10px;white-space:nowrap}.tag.subtle{border-color:var(--line);color:var(--sub)}
.layout{display:flex;min-height:0;flex:1;overflow:hidden}.workspace{display:flex;flex:1;flex-direction:column;min-width:0;padding:16px 18px 13px;gap:11px}.scene-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.scene-picker{display:flex;gap:7px;flex-wrap:wrap}.scene-picker button,.zoomset button{border:1px solid var(--line);background:#1d2937;color:#c8d5e5;padding:9px 12px;border-radius:8px;font-size:12px}.scene-picker button.active{background:#31352d;color:#ffd9a7;border-color:#957448}.zoomset{display:flex;align-items:center;gap:6px}.zoomset output{min-width:42px;text-align:center;font-size:11px;color:var(--sub)}.zoomset button{padding:6px 11px;font-size:17px}
.stage-wrap{position:relative;min-height:280px;flex:1;background:radial-gradient(circle at 45% 45%,#35445a,#182231 70%);border:1px solid #354454;border-radius:14px;overflow:hidden;touch-action:none}.stage-wrap canvas{display:block;width:100%;height:100%;outline:none;touch-action:none;image-rendering:pixelated}.stage-info{position:absolute;top:12px;left:12px;border:1px solid #304356;background:#13202bdf;border-radius:10px;padding:8px 11px;display:flex;align-items:center;gap:10px;font-size:12px;pointer-events:none}.stage-info small{color:#bac8d6;font-size:10px}.live-dot{height:7px;width:7px;display:inline-block;border-radius:50%;background:#7ae6b4;box-shadow:0 0 8px #38b389}.tutorial{position:absolute;bottom:15px;left:15px;right:15px;width:fit-content;max-width:calc(100% - 30px);background:#10202be9;border:1px solid #34475a;padding:8px 11px;border-radius:8px;color:#d7e4ed;font-size:11px;pointer-events:none}.status{display:flex;justify-content:space-between;gap:12px;font-size:11px;color:var(--sub)}
.sidebar{width:340px;flex-shrink:0;background:var(--panel);border-left:1px solid var(--line);display:flex;flex-direction:column;min-height:0}.sidebar-head{display:flex;justify-content:space-between;gap:12px;padding:20px 18px 6px}.sidebar-head small{font-size:10px;color:var(--accent);letter-spacing:.12em;font-weight:700}.sidebar-head h2{margin:5px 0 7px;font-size:19px;letter-spacing:-.025em}.sidebar-head p{font-size:11px;color:var(--sub);line-height:1.55;margin:0}.count{height:26px;min-width:30px;display:grid;place-items:center;padding:0 7px;background:#364451;border-radius:8px;font-size:12px}.filters{padding:12px 18px;display:flex;gap:7px}.filters input,.filters select{min-width:0;border:1px solid #394657;border-radius:8px;background:#121b25;color:var(--text);font-size:11px;padding:9px}.filters input{flex:1;width:58%}.filters select{max-width:47%}
.items{min-height:130px;flex:1;overflow-y:auto;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));align-content:start;gap:9px;padding:0 18px 15px}.item{min-width:0;height:101px;border:1px solid #344354;border-radius:10px;background:#222f3b;color:#d6e1ed;text-align:center;padding:6px;display:flex;flex-direction:column;gap:3px;align-items:center;justify-content:center}.item:hover,.item:focus-visible{border-color:var(--accent);background:#2c3b49}.item img{object-fit:contain;max-width:100%;width:100%;height:63px;image-rendering:pixelated}.item span{font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:100%}.item.disabled{opacity:.5}.tools{border-top:1px solid var(--line);padding:14px 18px 18px;max-height:47%;overflow:auto}.tools-title{display:flex;justify-content:space-between;font-size:12px;font-weight:700;align-items:center;margin-bottom:11px}.tools-title span{font-weight:400;color:var(--sub)}.button-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.button-grid button{border-radius:7px;color:#dbe8f4;border:1px solid #405060;background:#273746;padding:9px 3px;font-size:11px}.button-grid button:hover{background:#364959}.toggles{display:flex;gap:15px;flex-wrap:wrap;margin:12px 0;font-size:11px;color:var(--sub)}.toggles label{display:flex;align-items:center;gap:5px;cursor:pointer}.toggles input{accent-color:#f5b966}.button-grid.file-buttons{grid-template-columns:1fr 1fr}.button-grid.file-buttons button{color:#fbd5aa;border-color:#756043}.help{font-size:10px;color:#8e9eb0;line-height:1.55;margin-top:11px}.toast{position:fixed;left:50%;transform:translateX(-50%) translateY(25px);bottom:25px;opacity:0;transition:.22s;pointer-events:none;background:#213f37;color:#f3fff5;padding:10px 16px;border:1px solid #638776;box-shadow:0 6px 28px #0007;border-radius:9px;font-size:12px;z-index:100;white-space:nowrap;max-width:92vw;text-overflow:ellipsis;overflow:hidden}.toast.show{transform:translateX(-50%) translateY(0);opacity:1}
.dpad{display:none;position:absolute;right:12px;bottom:14px;width:130px;height:130px;pointer-events:none}.dpad button{pointer-events:auto;position:absolute;width:41px;height:41px;border:1px solid #7192a3;background:#1a2f44e6;color:white;border-radius:10px;touch-action:none}.dpad .up{top:1px;left:44px}.dpad .left{top:44px;left:0}.dpad .down{top:87px;left:44px}.dpad .right{top:44px;left:87px}
@media(max-width:920px){.app{height:auto;min-height:100dvh}.layout{flex-direction:column;overflow:visible}.workspace{height:62dvh;min-height:390px;padding:10px 12px}.sidebar{width:auto;border-left:0;border-top:1px solid var(--line);min-height:520px}.sidebar-head{padding-top:15px}.items{max-height:360px;flex:initial;grid-template-columns:repeat(4,minmax(0,1fr))}.tools{max-height:none}.dpad{display:block}.tutorial{bottom:8px;max-width:56%;font-size:10px}.scene-picker button{font-size:11px;padding:7px 9px}.stage-info{top:7px;left:7px;font-size:11px;padding:6px 8px}}
@media(max-width:480px){.headright .subtle{display:none}.topbar{padding:10px 12px;height:58px}.brand strong{font-size:11px}.brand small{font-size:8px}.mark{width:30px;height:30px;font-size:18px}.scene-bar{gap:6px}.scene-picker{gap:4px}.scene-picker button{font-size:10px;padding:7px 6px}.zoomset{margin-left:auto}.stage-wrap{min-height:210px}.workspace{height:60dvh;min-height:340px}.items{grid-template-columns:repeat(3,minmax(0,1fr))}}
