:root{color-scheme:light;--ink:#595959;--deep:#315f55;--green:#286d60;--mint:#eef9f6;--accent:#6bb3a3;--line:#b6cdc6;--danger:#8a392c}
*{box-sizing:border-box}body{margin:0;color:var(--ink);background:#f4f7f5;font:15px/1.5 'Open Sans',Arial,sans-serif}button,input,select{font:inherit}button,input,select,a{ -webkit-tap-highlight-color:transparent}button{cursor:pointer;border:1px solid #6e958c;border-radius:2px;background:#edf7f3;color:#245b50;padding:8px 12px;min-height:38px;font-weight:600}button:hover:not(:disabled){background:#dceee7}button.primary{background:var(--green);border-color:var(--green);color:#fff}button.primary:hover:not(:disabled){background:#205b50}button.danger{border-color:#b77f72;color:var(--danger);background:#fff8f5}button:disabled{cursor:default;opacity:.45}button[aria-pressed=true]{background:#d6ece4;outline:2px solid var(--green)}input,select{width:100%;border:1px solid #819d94;border-radius:2px;min-height:38px;padding:7px 9px;color:#334b45;background:#fff}input[type=checkbox]{width:18px;height:18px;min-height:0;accent-color:var(--green)}label{display:block;font-size:13px;font-weight:600;margin-bottom:5px}select{padding-right:20px}:focus-visible{outline:3px solid #397e6e;outline-offset:2px}a{color:var(--green);text-decoration:underline}[hidden]{display:none!important}.editor-app{max-width:1440px;margin:0 auto;padding:20px 22px 12px;background:#fff}.app-header{display:flex;justify-content:space-between;gap:22px;padding-bottom:16px;border-bottom:3px solid var(--accent)}.brand{display:inline-block;letter-spacing:1.6px;font-weight:700;font-size:13px;color:#315f55;text-decoration:none}h1{margin:3px 0;font-size:26px;line-height:1.25;color:var(--ink)}.app-header p{margin:5px 0 0;font-size:14px;color:#667b73}.header-tools{display:flex;align-items:center;gap:18px;flex-wrap:wrap;justify-content:flex-end}.language{margin:0;min-width:115px}.language span{font-size:12px}.language select{min-height:34px;padding:5px 8px}.open-full{display:none;font-size:13px}.embedded .open-full{display:inline}.embedded .editor-app{padding:12px}.embedded .app-header{padding-bottom:10px}.embedded h1{font-size:23px}.project-bar,.file-bar{display:flex;gap:10px;align-items:center;flex-wrap:wrap;padding:12px 0;border-bottom:1px solid #dbe6e1}.project-name{width:290px;max-width:100%;margin:0}.project-name span{display:block;margin-bottom:4px}.title-option{display:flex;gap:7px;align-items:center;margin:18px 0 0;font-size:13px;white-space:nowrap}.history-actions{margin-left:auto;display:flex;gap:6px;flex-wrap:wrap}.file-bar button{font-size:13px}.example-choice{display:flex;gap:7px;align-items:center;margin:0;font-size:13px}.example-choice select{width:180px;font-size:13px}.file-spacer{flex:1}.startup-message{border-left:4px solid #b22222;background:#fff9f8;padding:12px 16px}.editor-layout{display:grid;grid-template-columns:246px minmax(0,1fr);gap:18px;margin-top:16px;align-items:start}.sidebar{border:1px solid var(--line)}.tool-section{padding:14px;border-bottom:1px solid var(--line)}.tool-section:last-child{border-bottom:0}.tool-section h2,.entity-list-section h2{font-size:16px;line-height:1.35;margin:0 0 12px;color:var(--deep)}.tool-section label:not(:first-child){margin-top:9px}.tool-section input,.tool-section select{font-size:14px}.wide{width:100%;margin-top:9px;font-size:13px}.small{font-size:12px;color:#667b73;margin:8px 0}.inspector-actions{display:flex;gap:7px;margin-top:10px}.inspector-actions button{flex:1}.canvas-section{min-width:0}.canvas-toolbar{border:1px solid var(--line);border-bottom:0;background:#f5faf7;display:flex;justify-content:space-between;align-items:center;gap:8px;padding:8px 10px;min-height:51px;font-size:12px}.zoom-controls{display:flex;align-items:center;gap:5px}.zoom-controls button{min-height:30px;padding:3px 9px;font-size:13px}.zoom-controls output{font-size:12px;min-width:43px;text-align:center}.canvas-wrap{height:570px;position:relative;border:1px solid #819d94;background:#fff;overflow:hidden}.canvas-wrap svg#diagram{width:100%;height:100%;display:block;touch-action:none;user-select:none;cursor:grab}.canvas-wrap svg#diagram.is-dragging{cursor:grabbing}.canvas-wrap svg#diagram.is-connecting{cursor:crosshair}.entity-node{cursor:move}.entity-node rect{fill:var(--mint);stroke:#6e8580;stroke-width:1.5}.entity-node text{fill:#173e35;font-family:Arial,sans-serif;font-weight:700;pointer-events:none}.entity-node.selected rect,.entity-node.connect-source rect{stroke:var(--green);stroke-width:3}.entity-node.connect-source rect{fill:#d6ece4}.entity-node:focus-visible{outline:none}.entity-node:focus-visible rect{stroke:#286d60;stroke-width:4}.edge-hit{fill:none;stroke:transparent;stroke-width:18;cursor:pointer;pointer-events:stroke}.edge-line,.edge-symbol{fill:none;stroke:#405f56;stroke-width:2;pointer-events:none}.edge-count{fill:#405f56;font-family:Arial,sans-serif;font-size:14px;pointer-events:none}.edge-group.selected .edge-line,.edge-group.selected .edge-symbol{stroke:#1b8470;stroke-width:3}.edge-label text{fill:#405f56;font-family:Arial,sans-serif;font-size:14px;pointer-events:none}.edge-label{cursor:pointer}.edge-label rect{fill:#fff}.edge-group:focus-visible{outline:none}.edge-group:focus-visible .edge-line{stroke:#1b8470;stroke-width:4}.empty-canvas{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;flex-direction:column;text-align:center;gap:8px;padding:20px;pointer-events:none}.empty-canvas strong{font-size:21px;color:#315f55}.empty-canvas span{max-width:300px;color:#667b73}.canvas-footer{display:flex;gap:12px;justify-content:space-between;align-items:center;border:1px solid var(--line);border-top:0;padding:8px 12px;flex-wrap:wrap;background:#f8fbfa}.legend,.legend>span{display:flex;gap:7px;align-items:center}.legend{gap:17px;font-size:12px}.legend svg{width:45px;height:20px;stroke:#405f56;stroke-width:2;fill:none}.canvas-footer .small{margin:0}.status{min-height:24px;font-size:13px;margin:10px 0;color:#315f55}.status.error{color:var(--danger)}.entity-list-section{border-top:1px solid #dbe6e1;padding-top:12px}.entity-list-section h2{margin-bottom:8px;font-size:14px}.entity-list{display:flex;flex-wrap:wrap;gap:6px;list-style:none;padding:0;margin:0}.entity-list button{font-size:12px;min-height:30px;padding:4px 10px;font-weight:400;max-width:100%;overflow-wrap:anywhere}.entity-list button[aria-pressed=true]{font-weight:700;outline:0}.help{border:1px solid var(--line);margin:18px 0 10px;padding:12px 16px;background:#f8fbfa}.help summary{cursor:pointer;font-weight:700;color:var(--deep)}.help-content{max-width:950px;font-size:14px}.help-content li{margin:6px 0}.help-content p{margin:10px 0}.app-footer{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;border-top:1px solid #dbe6e1;padding-top:10px;font-size:11px;color:#75877e}
@media(max-width:1040px){.editor-app{padding:16px}.header-tools{gap:10px}.history-actions{margin-left:0}.file-spacer{display:none}.file-bar{gap:8px}.editor-layout{grid-template-columns:225px minmax(0,1fr);gap:12px}.tool-section{padding:12px}.canvas-toolbar{align-items:flex-start;flex-wrap:wrap}.canvas-wrap{height:550px}}
@media(max-width:720px){.editor-app{padding:10px}.app-header{gap:12px;flex-wrap:wrap}.header-tools{justify-content:flex-start}.language{min-width:105px}.project-bar{align-items:flex-start}.project-name{width:100%}.title-option{margin:0}.history-actions{margin-left:auto}.file-bar{align-items:stretch}.file-bar>button{flex:1 1 140px}.example-choice{width:100%}.example-choice select{flex:1;width:auto}.editor-layout{grid-template-columns:1fr}.canvas-section{grid-row:1}.canvas-wrap{height:440px}.sidebar{display:grid;grid-template-columns:1fr 1fr}.selected-section{grid-column:1/-1;border-top:1px solid var(--line)}.tool-section:first-child{border-right:1px solid var(--line)}.tool-section{border-bottom:0}.canvas-footer{align-items:flex-start;flex-direction:column}.canvas-toolbar{align-items:center}.app-header h1{font-size:23px}.help{margin-top:12px}}
@media(max-width:420px){.sidebar{display:block}.tool-section:first-child{border-right:0;border-bottom:1px solid var(--line)}.selected-section{border-top:1px solid var(--line)}.history-actions{margin-left:0;width:100%}.history-actions button{flex:1;font-size:12px;padding:7px}.canvas-toolbar{padding:7px}.canvas-wrap{height:400px}.zoom-controls button{padding:4px 7px}.header-tools{width:100%;justify-content:space-between}.language{display:flex;gap:7px;align-items:center}.language select{width:auto}.title-option{font-size:12px}}
@media print{body{background:white}.app-header,.project-bar,.file-bar,.sidebar,.canvas-toolbar,.canvas-footer,.status,.entity-list-section,.help,.app-footer{display:none!important}.editor-app{padding:0}.editor-layout{display:block}.canvas-wrap{height:650px;border:0}.canvas-wrap #canvas-background{fill:#fff}}
