:root{--panel:#0c1220d1;--border:#94a3b838;--text:#e2e8f0;--muted:#94a3b8;--accent:#4ade80;--blue:#3b82f6;--red:#ef4444;color:var(--text);font-family:ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,sans-serif}*{box-sizing:border-box}html,body{-webkit-user-select:none;user-select:none;background:#0b1020;height:100%;margin:0;overflow:hidden}#game{width:100%;height:100%;display:block;position:fixed;inset:0}#selbox{pointer-events:none;border:1px solid var(--accent);background:#4ade801f;display:none;position:fixed}.panel{background:var(--panel);border:1px solid var(--border);-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);border-radius:10px}#hud{min-width:210px;max-width:280px;padding:10px 14px;font-size:13px;position:fixed;top:12px;left:12px}.title{align-items:center;gap:8px;margin-bottom:6px;font-weight:600;display:flex}.tag{color:#bfdbfe;background:#3b82f640;border-radius:999px;padding:1px 7px;font-size:11px;font-weight:500}.grid{grid-template-columns:auto 1fr;gap:2px 14px;display:grid}.grid span{color:var(--muted)}.mono{font-family:ui-monospace,SF Mono,Menlo,monospace;font-weight:500}#status{color:var(--muted);margin-top:6px}#status.bad{color:#fca5a5;font-weight:600}#tools{width:260px;padding:10px 14px;font-size:13px;position:fixed;top:12px;right:12px}#tools ul{color:var(--muted);margin:6px 0 0;padding-left:16px;line-height:1.6}#tools ul b{color:var(--text);font-weight:500}#tools summary{cursor:pointer;color:var(--muted);margin-top:8px}#detresult{margin-top:6px;font-size:12px;line-height:1.5}#detresult .ok{color:var(--accent);font-weight:600}#detresult .fail{color:#fca5a5;font-weight:600}button{font:inherit;color:var(--text);border:1px solid var(--border);cursor:pointer;background:#94a3b826;border-radius:8px;padding:7px 12px}button:hover{background:#94a3b847}button.primary{background:var(--blue);border-color:var(--blue)}button.primary:hover{filter:brightness(1.1)}#bottom{pointer-events:none;align-items:flex-end;gap:12px;display:flex;position:fixed;bottom:12px;left:12px;right:12px}#minimap{pointer-events:auto;cursor:crosshair;width:200px;height:200px}#selection{pointer-events:auto;flex-wrap:wrap;flex:0 460px;align-items:center;gap:8px;min-height:64px;padding:10px 14px;font-size:13px;display:flex}.chip{background:#3b82f633;border:1px solid #3b82f666;border-radius:999px;align-items:center;gap:6px;padding:4px 10px;display:inline-flex}.muted{color:var(--muted)}.small{font-size:12px}#menu{-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);background:#050810b8;place-items:center;display:grid;position:fixed;inset:0}#menu.hidden{display:none}.card{background:var(--panel);border:1px solid var(--border);border-radius:14px;width:min(420px,100vw - 32px);padding:26px 28px}.card h1{margin:0 0 4px;font-size:22px}.card p{color:var(--muted);margin:0 0 18px}.card .primary{width:100%;margin-bottom:12px;padding:10px}.online{gap:8px;margin-bottom:12px;display:flex}.online input{min-width:0;font:inherit;color:var(--text);border:1px solid var(--border);background:#0000004d;border-radius:8px;flex:1;padding:7px 10px;font-size:13px}code{font-size:12px}@media (max-width:700px){#tools{display:none}#minimap{width:130px;height:130px}}.btnrow{gap:6px;display:flex}.btnrow button{flex:1;padding:7px 8px}.card .wide{width:100%;margin-bottom:12px}#modehint{pointer-events:none;background:#7f1d1dd9;border:1px solid #f8717180;border-radius:999px;padding:6px 14px;font-size:13px;display:none;position:fixed;bottom:110px;left:50%;transform:translate(-50%)}#res{white-space:nowrap;gap:18px;padding:8px 18px;font-size:14px;display:flex;position:fixed;top:12px;left:50%;transform:translate(-50%)}#res .metal b{color:#d9a066}#card{flex-direction:column;gap:8px;width:380px;padding:10px;display:none;position:fixed;bottom:12px;right:12px}#card .btns{gap:8px;display:flex}#card button.prod{text-align:left;flex-direction:column;flex:1;align-items:flex-start;gap:2px;display:flex;position:relative}#card button.prod span{color:var(--muted);font-size:11px}#card button.prod kbd{color:var(--muted);font-family:inherit;font-size:10px;position:absolute;top:5px;right:7px}#card button.poor{opacity:.45}#card .queue{flex-wrap:wrap;gap:6px;display:flex}#card .qitem{background:#94a3b826;border-radius:6px;padding:3px 8px;font-size:11px;position:relative;overflow:hidden}#card .qitem i{background:var(--accent);height:3px;position:absolute;bottom:0;left:0}#end{-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px);background:#020a0e99;place-items:center;display:grid;position:fixed;inset:0}#end.hidden{display:none}.card details.more{margin-bottom:12px}.card details.more summary{cursor:pointer;color:var(--muted);margin-bottom:8px;font-size:13px}.card details.more .wide{margin-bottom:8px}#res .precious b{color:#7fa6ff}#card .cardtitle{color:var(--muted);font-size:12px}#card .btns{flex-wrap:wrap}#card .tip{color:#fde68a;background:#78350f8c;border:1px solid #fbbf2473;border-radius:7px;padding:7px 9px;font-size:12px;line-height:1.45}#card .tip b{color:#fff;font-weight:600}#card .tip.flash{animation:.5s ease-out tipflash}@keyframes tipflash{0%{background:#d97706e6}}#card button.prod.busy{background:#4ade801f;border-color:#4ade80b3}#card button.prod .badge{background:var(--accent);color:#052e16;border-radius:999px;place-items:center;min-width:20px;height:20px;padding:0 5px;font-size:12px;font-style:normal;font-weight:700;display:grid;position:absolute;top:-8px;left:-6px;box-shadow:0 0 0 2px #0c1220e6}#card button.prod .bar{background:var(--accent);border-radius:0 0 0 8px;height:3px;position:absolute;bottom:0;left:0}#card .qslot{border:1px solid var(--border);white-space:nowrap;text-overflow:ellipsis;background:#94a3b826;border-radius:6px;flex:1;place-items:center;min-width:0;height:26px;padding:0 4px;font-size:11px;display:grid;position:relative;overflow:hidden}#card .qslot.empty{opacity:.5;background:0 0;border-style:dashed}#card .qslot i{background:var(--accent);height:3px;position:absolute;bottom:0;left:0}#card .qslot u{color:#fecaca;background:#7f1d1dd9;place-items:center;font-weight:700;text-decoration:none;display:none;position:absolute;inset:0}#card button.qslot.hot u{display:grid}#card .queue{flex-wrap:nowrap}#card .tip:has(.hint){border-color:var(--border);color:var(--muted);background:#94a3b81f}#card .btns{grid-template-columns:1fr 1fr;display:grid}#card button.prod{min-width:0}#card button.prod b{white-space:nowrap;text-overflow:ellipsis;max-width:100%;font-size:13px;overflow:hidden}#card button.prod span{white-space:nowrap;text-overflow:ellipsis;max-width:100%;overflow:hidden}#card button.prod.locked{opacity:.45;border-style:dashed}#card button.prod.done{background:#4ade800f;border-color:#4ade8059}#card button.prod.done b{color:var(--muted)}#card button.prod.done span{color:var(--accent)}.levelrow{color:var(--muted);align-items:center;gap:10px;margin-bottom:10px;font-size:13px;display:flex}.levelrow select{font:inherit;color:var(--text);border:1px solid var(--border);background:#0000004d;border-radius:8px;flex:1;padding:7px 8px}.levelrow select option{background:#0f1726}#sr-root{z-index:50;background:#041c24;position:fixed;inset:0}#sr-root.hidden{display:none}#sr-root>canvas{width:100%;height:100%;display:block;position:absolute;inset:0}.sr-labels{pointer-events:none;position:absolute;inset:0;overflow:hidden}.sr-label{white-space:nowrap;color:var(--muted);background:#08141cb3;border:1px solid #94a3b833;border-radius:6px;padding:2px 7px;font-size:12px;position:absolute;top:0;left:0}.sr-assetlabel{pointer-events:auto;cursor:pointer;color:#bbf7d0;border-color:#4ade8066}.sr-assetlabel.sel{color:#fff;background:#166534d9}.sr-label.bad{color:#fecaca;border-color:#f8717180}.sr-panel{flex-direction:column;gap:10px;width:340px;padding:12px 14px;font-size:13px;display:flex;position:absolute;top:12px;bottom:12px;right:12px;overflow-y:auto}.sr-head{justify-content:space-between;align-items:center;font-size:15px;display:flex}.sr-status.bad{color:#fca5a5}.sr-list{flex-direction:column;gap:4px;max-height:30vh;display:flex;overflow-y:auto}.sr-item{text-align:left;flex-direction:column;align-items:flex-start;gap:1px;padding:6px 9px;display:flex}.sr-item span{color:var(--muted);font-size:11px}.sr-item.sel{border-color:var(--accent);background:#4ade801f}.sr-item.bad span{color:#fca5a5}.sr-btns{flex-wrap:wrap;gap:6px;display:flex}.sr-btns button{flex:1}.sr-save.dirty{background:#b45309;border-color:#b45309}.sr-edit{flex-direction:column;gap:6px;display:flex}.sr-title{word-break:break-all;font-weight:600}.sr-row{grid-template-columns:92px 1fr 64px 26px;align-items:center;gap:6px;display:grid}.sr-row select{grid-column:2/5}.sr-row input[type=number],.sr-row select{font:inherit;color:var(--text);border:1px solid var(--border);background:#0000004d;border-radius:6px;min-width:0;padding:3px 5px;font-size:12px}.sr-row select option{background:#0f1726}.sr-row i{color:var(--muted);font-size:11px;font-style:normal}.sr-size{color:var(--muted)}.sr-env summary{cursor:pointer;color:var(--muted);margin-bottom:6px}.sr-env label{align-items:center;gap:8px;margin:4px 0;display:flex}.sr-env input[type=range]{flex:1}.bad{color:#fca5a5}#ed-root{z-index:50;background:#081218;display:flex;position:fixed;inset:0}#ed-root.hidden{display:none}.ed-canvaswrap{flex:1;place-items:center;padding:12px;display:grid;overflow:auto}.ed-canvaswrap canvas{cursor:crosshair;image-rendering:pixelated;box-shadow:0 0 0 1px #94a3b840}.ed-panel{flex-direction:column;gap:9px;width:340px;margin:12px 12px 12px 0;padding:12px 14px;font-size:13px;display:flex;overflow-y:auto}.ed-row{align-items:center;gap:8px;display:flex}.ed-row input[type=range]{flex:1}.ed-row input[type=number],.ed-name{font:inherit;color:var(--text);border:1px solid var(--border);background:#0000004d;border-radius:6px;min-width:0;padding:4px 6px;font-size:12px}.ed-name{flex:1}.ed-row input[type=number]{width:64px}.ed-tools{grid-template-columns:1fr 1fr;gap:5px;display:grid}.ed-tools button{text-align:left;align-items:center;gap:7px;padding:6px 8px;font-size:12px;display:flex}.ed-tools button i{border:1px solid #ffffff40;border-radius:3px;flex:none;width:12px;height:12px}.ed-tools button.sel{border-color:var(--accent);background:#4ade8024}.ed-issues .ok{color:var(--accent)}.levelrow label{min-width:84px}.qrow{align-items:center;gap:6px;margin-bottom:6px;font-size:12px;display:flex}.qrow select,.qrow input[type=range],.levelrow input[type=range]{flex:1}
