:root{--bg: #f4f5f7;--panel: #ffffff;--text: #1c2230;--muted: #5d6677;--line: #dde1e8;--accent: #2266d9;--accent-text: #ffffff;--accent-soft: #e6eefc;--warn-bg: #fff6e0;--warn-text: #7a5300;--err-bg: #fdecec;--err-text: #9b1c1c;--stage: #e9ebef;--radius: 8px;font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif;font-size:14px;color:var(--text)}@media(prefers-color-scheme:dark){:root{--bg: #14171d;--panel: #1c2028;--text: #e5e8ee;--muted: #9aa3b2;--line: #2d333e;--accent: #5b93f0;--accent-text: #0d1320;--accent-soft: #1f2d47;--warn-bg: #3a2f14;--warn-text: #f3d28a;--err-bg: #3d1d1d;--err-text: #f7b4b4;--stage: #0f1115}}*{box-sizing:border-box}[hidden]{display:none!important}html,body{margin:0;height:100%}body{background:var(--bg);display:flex;flex-direction:column}.top{padding:10px 18px;border-bottom:1px solid var(--line);background:var(--panel)}.brand{display:flex;gap:12px;align-items:center}.brand svg{width:30px;height:30px;flex:none}.brand rect{fill:var(--accent)}.brand path{stroke:var(--panel);stroke-width:1.6;fill:none}.brand h1{font-size:20px;margin:0;letter-spacing:-.01em}.brand p{margin:2px 0 0;color:var(--muted);font-size:13px}.app{flex:1;display:grid;grid-template-columns:330px 1fr;min-height:0}.panel{background:var(--panel);border-right:1px solid var(--line);overflow-y:auto;padding:4px 16px 24px}.panel section{padding:12px 0;border-bottom:1px solid var(--line)}.panel section:last-child{border-bottom:none}.panel h2{font-size:13px;text-transform:uppercase;letter-spacing:.04em;color:var(--muted);margin:4px 0 10px}.row{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:8px 0}.row.two{gap:12px}.row.two label{display:flex;flex-direction:column;gap:4px;flex:1}.grid4{display:grid;grid-template-columns:1fr 1fr;gap:8px 12px;margin:8px 0}.grid4 label{display:flex;flex-direction:column;gap:4px}.check{display:flex;gap:8px;align-items:center;margin:7px 0;cursor:pointer}.hint{color:var(--muted);font-size:12.5px;line-height:1.4;margin:4px 0 8px}.muted{color:var(--muted);font-size:13px;margin-top:8px;line-height:1.45;word-break:break-word}input[type=number],select{font:inherit;color:var(--text);background:var(--bg);border:1px solid var(--line);border-radius:6px;padding:5px 7px}input[type=number]{width:78px;text-align:right}input:focus-visible,select:focus-visible,button:focus-visible{outline:2px solid var(--accent);outline-offset:1px}.ratio,.unit{display:inline-flex;align-items:center;gap:5px;white-space:nowrap}.row select{max-width:200px}.seg{display:inline-flex;border:1px solid var(--line);border-radius:6px;overflow:hidden}.seg label{cursor:pointer}.seg input{position:absolute;opacity:0;pointer-events:none}.seg span{display:block;padding:5px 9px;font-size:13px}.seg input:checked+span{background:var(--accent);color:var(--accent-text)}.seg input:focus-visible+span{outline:2px solid var(--accent);outline-offset:-2px}.file-btn input{position:absolute;opacity:0;width:1px;height:1px}.file-btn span{display:inline-block;padding:8px 14px;border-radius:6px;cursor:pointer;background:var(--accent-soft);color:var(--accent);font-weight:600}.file-btn:focus-within span{outline:2px solid var(--accent)}.warnings{list-style:none;padding:0;margin:8px 0 0}.warnings li{background:var(--warn-bg);color:var(--warn-text);padding:7px 9px;border-radius:6px;margin-top:6px;font-size:12.5px;line-height:1.4}button{font:inherit;border-radius:6px;cursor:pointer}button.primary{background:var(--accent);color:var(--accent-text);border:none;padding:8px 16px;font-weight:600}button.primary:disabled{opacity:.45;cursor:not-allowed}button.ghost{background:transparent;color:var(--text);border:1px solid var(--line);padding:6px 10px}button.ghost:hover{background:var(--accent-soft)}.view{display:flex;flex-direction:column;min-width:0;min-height:0}.toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 16px;border-bottom:1px solid var(--line);background:var(--panel);flex-wrap:wrap}.summary{font-size:13.5px;line-height:1.45}.summary b{font-size:17px}.tools{display:flex;gap:8px;align-items:center}.zoom{display:inline-flex;gap:4px}.error{background:var(--err-bg);color:var(--err-text);padding:9px 16px;font-size:13.5px}.progress{display:flex;align-items:center;gap:12px;padding:8px 16px;font-size:13px;color:var(--muted)}.progress .bar{flex:0 0 220px;height:6px;background:var(--line);border-radius:3px;overflow:hidden}.progress .bar div{height:100%;width:0;background:var(--accent);transition:width .15s}.viewport{flex:1;overflow:auto;background:var(--stage);position:relative;min-height:0}.drop{position:absolute;inset:16px;border:2px dashed var(--line);border-radius:12px;display:grid;place-items:center;text-align:center;color:var(--muted)}.drop strong{display:block;font-size:17px;color:var(--text);margin-bottom:4px}.viewport.dragging .drop,.viewport.dragging{outline:3px solid var(--accent);outline-offset:-3px}.stage{position:relative;margin:16px auto;width:calc(100% - 32px);box-shadow:0 1px 4px #0003;background:#fff}.stage canvas{display:block;width:100%;height:auto}.stage #overlay{position:absolute;inset:0;height:100%;cursor:pointer}.tip{position:fixed;pointer-events:none;background:var(--text);color:var(--panel);padding:4px 8px;border-radius:5px;font-size:12px;z-index:10}@media(max-width:760px){.app{grid-template-columns:1fr}.panel{border-right:none;border-bottom:1px solid var(--line);max-height:none}.viewport{min-height:60vh}}
