:root{color-scheme:dark;--ink:#eee9dc;--muted:#aaa694;--panel:#242620;--line:#4a4c40;--accent:#d3a84b;--danger:#c86f63;--hex-w:48px;--hex-h:42px;--hex-step-x:36px;font-family:"Segoe UI","Microsoft YaHei",sans-serif}*{box-sizing:border-box}body{margin:0;background:#171914;color:var(--ink);min-height:100vh}header{height:82px;padding:14px 22px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line);background:#20221d}h1{font-size:25px;margin:2px 0}.eyebrow{font-size:10px;color:var(--accent);letter-spacing:.16em}button,input,select,textarea{font:inherit;color:inherit;background:#31342c;border:1px solid #56594d;border-radius:5px;padding:7px 9px}button{cursor:pointer}button:hover{border-color:var(--accent)}button.primary{background:#a87828;border-color:#d3a84b}button.danger,.danger{color:#f0a49b}.header-actions,.workspace-bar,.data-actions,.row{display:flex;gap:8px;align-items:center}.header-actions{justify-content:flex-end}main{display:grid;grid-template-columns:220px minmax(540px,1fr) 270px;gap:12px;padding:12px;height:calc(100vh - 82px)}.panel{background:var(--panel);border:1px solid #3c3f36;border-radius:8px;overflow:auto}.tools,.composition{padding:13px}.tools section,.composition section{padding-bottom:15px;margin-bottom:15px;border-bottom:1px solid #404239}h2{font-size:14px;margin:0 0 10px}label{display:flex;flex-direction:column;gap:5px;font-size:12px;color:var(--muted);margin-bottom:8px}.row label{flex:1}.check{flex-direction:row;align-items:center}.check input{width:auto}.hint{font-size:11px;line-height:1.5;color:var(--muted)}.palette{display:grid;grid-template-columns:1fr 1fr;gap:6px}.swatch{padding:7px 5px;text-align:left;font-size:11px}.swatch.active{outline:2px solid var(--accent)}.swatch i,.legend i{display:inline-flex;width:22px;height:22px;align-items:center;justify-content:center;margin-right:5px;border-radius:4px;color:#171914;font-style:normal;font-weight:700}.workspace{display:flex;flex-direction:column;overflow:hidden}.tabs{display:flex;border-bottom:1px solid var(--line)}.tab{border:0;border-radius:0;padding:11px 16px;background:transparent}.tab.active{background:#35382f;color:#f0c66e}.tab-page{display:none;min-height:0;flex:1}.tab-page.active{display:flex;flex-direction:column}.workspace-bar{justify-content:space-between;padding:10px 12px}.workspace-bar span{font-size:11px;color:var(--muted);margin-left:8px}.canvas-wrap{flex:1;overflow:auto;padding:18px;background:#191b17}.canvas-wrap.compact{min-height:420px}.grid{position:relative;user-select:none;touch-action:none}.cell{position:absolute;width:var(--hex-w);height:var(--hex-h);border:0;clip-path:polygon(25% 0,75% 0,100% 50%,75% 100%,25% 100%,0 50%);display:flex;align-items:center;justify-content:center;color:#171914;font-weight:800;cursor:crosshair}.cell::before{content:"";position:absolute;inset:2px;clip-path:inherit;border:1px solid #55584b;pointer-events:none}.cell small{position:absolute;left:8px;top:4px;font-size:8px;color:rgba(0,0,0,.57);font-weight:500}.cell.module-cell{filter:brightness(1.06)}.cell.fixed-cell::after{content:"◆";position:absolute;right:8px;bottom:3px;font-size:8px;color:#fff}.cell.conflict{filter:drop-shadow(0 0 4px #ff4f43) brightness(1.12);z-index:2}.slot-bound{position:absolute;border:2px dashed rgba(246,219,139,.8);pointer-events:none}.validation{padding:8px 12px;max-height:110px;overflow:auto;font-size:12px}.validation .error{color:#ff9188}.validation .warning{color:#e7c36d}.validation .ok{color:#8fcf8b}.split{display:grid;grid-template-columns:220px 1fr;min-height:0;flex:1}.module-list{border-right:1px solid var(--line);overflow:auto}.module-card{margin:7px;padding:9px;border:1px solid #505348;border-radius:5px;cursor:pointer}.module-card.active{border-color:var(--accent);background:#38372e}.module-card input{width:100%;margin-bottom:5px}.module-card .meta{font-size:10px;color:var(--muted)}.module-editor{display:flex;min-width:0;flex-direction:column}.data-actions{padding:10px}.data-actions+textarea,#jsonData{flex:1;margin:0 10px 10px;resize:none;font:12px/1.5 Consolas,monospace}.slot-card{border:1px solid #4c4f44;border-radius:6px;padding:8px;margin-bottom:8px}.slot-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:7px}.icon{padding:2px 7px}.triple label{min-width:0}.triple input,.triple select{width:100%}.slot-modules{height:74px}.legend{display:grid;grid-template-columns:1fr 1fr;gap:6px;font-size:11px;align-items:center}.composition input{width:100%}@media(max-width:1000px){main{grid-template-columns:190px 1fr}.composition{grid-column:1/-1;height:auto}main{height:auto}.workspace{min-height:680px}}@media(max-width:700px){header{height:auto;align-items:flex-start;gap:8px}.header-actions{flex-wrap:wrap}main{display:block}.panel{margin-bottom:10px}.workspace{min-height:700px}.split{grid-template-columns:1fr}.module-list{max-height:250px;border-right:0;border-bottom:1px solid var(--line)}}
