:root{font-family:Segoe UI,system-ui,sans-serif}*{box-sizing:border-box}body{-webkit-tap-highlight-color:transparent;background:#eef2f7;margin:0}#app{min-height:100vh}.app-board{max-width:1200px;padding:14px;padding-bottom:calc(14px + env(safe-area-inset-bottom));gap:12px;margin:0 auto;display:grid}.topbar{background:#fff;border:1px solid #dbe4f0;border-radius:12px;justify-content:space-between;align-items:center;gap:10px;padding:10px 12px;display:flex}h1{margin:0;font-size:20px}.tools{align-items:center;gap:10px;display:flex}label{align-items:center;gap:8px;font-size:14px;display:flex}select{background:#fff;border:1px solid #cbd5e1;border-radius:8px;padding:6px 8px}.tools input[type=number]{border:1px solid #cbd5e1;border-radius:8px;width:72px;padding:6px 8px}button{cursor:pointer;background:#fff;border:1px solid #cbd5e1;border-radius:8px;min-height:38px;padding:6px 12px}button.primary{color:#fff;background:#2563eb;border-color:#1d4ed8}button:disabled{opacity:.45;cursor:not-allowed}.board-wrap{background:#fff;border:1px solid #dbe4f0;border-radius:12px;padding:10px;position:relative}.props-panel{z-index:40;background:#fff;border:1px solid #dbe4f0;border-radius:12px;width:268px;max-height:min(88vh,520px);padding:14px;position:fixed;top:50%;right:16px;overflow:auto;transform:translateY(-50%);box-shadow:0 12px 40px #0f172a1f}.props-panel-head{justify-content:space-between;align-items:center;gap:8px;margin-bottom:8px;display:flex}.props-panel-head h3{color:#111827;margin:0;font-size:16px}.props-close{color:#475569;cursor:pointer;background:#f1f5f9;border:none;border-radius:8px;width:32px;height:32px;padding:0;font-size:20px;line-height:1}.props-close:hover{background:#e2e8f0}.props-type{color:#64748b;margin:0 0 12px;font-size:13px}.props-field{color:#334155;gap:6px;margin-bottom:12px;font-size:13px;display:grid}.props-field input{border:1px solid #cbd5e1;border-radius:8px;width:100%;padding:8px 10px;font-size:14px}.props-hint{color:#64748b;margin:-4px 0 12px;font-size:12px;line-height:1.45}.props-apply{width:100%;margin-top:4px}.props-delete{width:100%;margin-top:8px}button.danger{color:#be123c;background:#fff1f2;border-color:#fecdd3}@media (width<=900px){.props-panel{width:auto;max-width:320px;margin-left:auto;left:8px;right:8px}}.board{touch-action:none;-webkit-user-select:none;user-select:none;background:#fff;border:1px solid #d1d5db;border-radius:8px;width:100%}.shape{fill:#0000;cursor:default}.shape.outer{stroke:#4b5563;stroke-width:8px}.shape.inner{stroke:#b6bec9;stroke-width:4px}.shape.outer.selected{stroke:#374151}.shape.inner.selected{stroke:#d5dbe3}.mullion-line{stroke-linecap:square;cursor:pointer}.mullion-line.outer{stroke:#4b5563;stroke-width:10px}.mullion-line.inner{stroke:#9ca3af;stroke-width:6px}.mullion-line.outer.selected{stroke:#374151}.mullion-line.inner.selected{stroke:#cbd5e1}.mullion-line.draft{stroke-dasharray:6 4}.line-handle{fill:#fff;stroke:#4b5563;stroke-width:2px;cursor:pointer}.shape-edge{fill:#0000;stroke:#0000;stroke-width:8px;pointer-events:visibleStroke;cursor:pointer}.shape-edge.selected{stroke:#2563eb}.shape.draft{stroke-dasharray:6 4;opacity:.9}.dim-line{stroke:#334155;stroke-width:1px}.dim-text{fill:#0f172a;text-anchor:middle;dominant-baseline:middle;font-size:12px}.dim-text.clickable{cursor:pointer;fill:#1d4ed8}.dim-text.vertical{writing-mode:vertical-rl}.handle{fill:#fff;stroke:#2563eb;stroke-width:2px;cursor:nwse-resize}.handle.edge{fill:#dbeafe;cursor:move}.footer-info{color:#334155;background:#fff;border:1px solid #dbe4f0;border-radius:12px;flex-wrap:wrap;gap:14px;padding:10px 12px;font-size:13px;display:flex}.modal-mask{z-index:50;background:#0f172a59;justify-content:center;align-items:center;display:flex;position:fixed;inset:0}.modal{background:#fff;border:1px solid #dbe4f0;border-radius:12px;width:min(92vw,360px);padding:14px}.modal h3{margin:0 0 8px;font-size:18px}.modal p{color:#475569;margin:0 0 10px;font-size:14px}.modal input{border:1px solid #cbd5e1;border-radius:8px;width:100%;padding:8px 10px}.modal-actions{justify-content:flex-end;gap:8px;margin-top:12px;display:flex}.bottom-toolbar{bottom:calc(8px + env(safe-area-inset-bottom));z-index:20;background:#fff;border:1px solid #dbe4f0;border-radius:12px;align-items:center;gap:8px;padding:8px;display:flex;position:sticky}.tool-btn{min-width:56px;min-height:40px}.tool-btn.active{color:#fff;background:#2563eb;border-color:#1d4ed8}.tool-hint{color:#475569;margin-left:auto;font-size:13px}@media (width<=800px){.app-board{padding:8px;padding-bottom:calc(90px + env(safe-area-inset-bottom));gap:8px}.topbar{z-index:25;border-radius:10px;flex-direction:column;align-items:stretch;position:sticky;top:0}.tools{flex-wrap:wrap;gap:8px}.tools label{font-size:13px}.tools select,.tools input[type=number],.tools button{min-height:40px}.tools input[type=number]{width:68px}.props-panel{top:auto;left:8px;right:8px;bottom:calc(64px + env(safe-area-inset-bottom));border-radius:14px;width:auto;max-width:none;max-height:42vh;transform:none}.bottom-toolbar{left:8px;right:8px;bottom:calc(8px + env(safe-area-inset-bottom));z-index:30;position:fixed;box-shadow:0 8px 22px #0f172a2e}.tool-btn{flex:1}}
