:root{color-scheme:light dark;--bg: #f4f6f4;--surface: #fff;--text: #22302b;--muted: #65736c;--border: #d6ddd9;--accent: #33695a;--on-accent: #fff;--selected: #e8f2ed;--line: #84998e;--focus: #247cbe;--danger: #a34343;--heading: #f0f4f2;--shape-line: #9eaca6;--text-2: #48574f;--hover: #eaf0ec;--accent-strong: #285446;--pk-bg: #fef3c7;--pk: #92400e;--pk-border: #d5ae57;--fk-bg: #dbeafe;--fk: #1e40af;--uq-bg: #f3e8ff;--uq: #6b21a8;--uq-border: #c2a4d9;--hint-accent: #9be2bf;--backdrop: rgb(24 32 28 / 36%);--shadow-color: rgb(24 32 28 / 8%);--shadow-deep: rgb(24 32 28 / 22%);--grid-dot: var(--border);--border-soft: color-mix(in srgb, var(--surface), var(--border) 65%);--accent-ring: color-mix(in srgb, var(--accent) 25%, transparent);--shadow-sm: 0 1px 2px var(--shadow-color);--shadow-md: 0 2px 8px var(--shadow-color), 0 8px 24px var(--shadow-color);--shadow-lg: 0 0 0 1px var(--border), 0 24px 64px var(--shadow-deep);--mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;font-family:-apple-system,BlinkMacSystemFont,Inter,Hiragino Sans,Noto Sans JP,system-ui,sans-serif;font-size:13px;color:var(--text);-webkit-font-smoothing:antialiased}@media(prefers-color-scheme:dark){:root{--bg: #131917;--surface: #1b2320;--text: #e2eae6;--muted: #9aa9a2;--border: #35433d;--accent: #7cc4ae;--on-accent: #0f1f19;--selected: #22382f;--line: #80958b;--focus: #5aaae6;--danger: #ef8f8f;--heading: #222c28;--shape-line: #64766e;--text-2: #bfcdc5;--hover: #2b3530;--accent-strong: #a0dbc8;--pk-bg: #3e321f;--pk: #f2cd7c;--pk-border: #79623d;--fk-bg: #213447;--fk: #a8cef6;--uq-bg: #382c46;--uq: #dcc3f4;--uq-border: #79658b;--hint-accent: #285446;--backdrop: rgb(0 0 0 / 56%);--shadow-color: rgb(0 0 0 / 25%);--shadow-deep: rgb(0 0 0 / 48%)}}*{box-sizing:border-box}body{margin:0;background:var(--bg)}button{font:inherit;background:var(--surface);color:var(--text);border:1px solid var(--border);border-radius:6px;padding:8px 12px;cursor:pointer;white-space:nowrap}button:hover{background:var(--selected)}button:disabled{opacity:.4;cursor:default}button:focus-visible,[tabindex]:focus-visible{outline:2px solid var(--focus);outline-offset:3px}.pointer-restored-focus:focus{outline:none}#canvas{position:relative;flex:1;min-height:280px;border-top:1px solid var(--border);border-bottom:1px solid var(--border);overflow:hidden}svg{width:100%;height:100%;display:block;touch-action:none;-webkit-user-select:none;user-select:none}.table-box{fill:var(--surface);stroke:var(--border);stroke-width:1.3}.table-heading{fill:var(--heading);cursor:grab}.table-heading:active{cursor:grabbing}.table-title{font:600 17px ui-monospace,SFMono-Regular,Consolas,monospace;fill:var(--text);pointer-events:none}.table-meta{font-size:12px;fill:var(--muted);pointer-events:none}.row{cursor:crosshair}.row-bg{fill:transparent}.row:hover .row-bg,.row.pending .row-bg{fill:var(--selected)}.column-name{font:14px ui-monospace,SFMono-Regular,Consolas,monospace;fill:var(--text);pointer-events:none}.column-type{font:12px ui-monospace,SFMono-Regular,Consolas,monospace;fill:var(--muted);pointer-events:none}.column-key{font:10px ui-monospace,SFMono-Regular,Consolas,monospace;fill:var(--accent);pointer-events:none}.port{opacity:0;fill:var(--surface);stroke:var(--line);stroke-width:1.5}.row:hover .port,.row.pending .port{opacity:1;opacity:0;fill:var(--accent);stroke:var(--accent)}.edge-path{fill:none;stroke:var(--line);stroke-width:2;pointer-events:none}.edge.selected .edge-path{stroke:var(--accent);stroke-width:2.5}.edge-hit{fill:none;stroke:transparent;stroke-width:18;cursor:pointer}.edge:hover .edge-path{stroke:var(--accent)}.drag-guide{stroke:var(--accent);stroke-width:2;stroke-dasharray:3 4;pointer-events:none}.drag-handle{fill:var(--surface);stroke:var(--accent);stroke-width:2;cursor:ew-resize}.drag-handle:hover{fill:var(--selected)}#selection{position:absolute;top:16px;left:50%;transform:translate(-50%);background:var(--surface);border:1px solid var(--border);border-radius:8px;padding:8px 10px;display:flex;align-items:center;gap:12px;box-shadow:var(--shadow-sm);max-width:calc(100% - 24px)}#selection[hidden]{display:none}#edge-label{font:13px ui-monospace,SFMono-Regular,monospace;white-space:nowrap}#selection button{font-size:12px;padding:7px 9px}#remove{color:var(--danger)}.zoom{position:absolute;bottom:18px;right:22px;display:flex;align-items:center;background:var(--surface);border:1px solid var(--border);border-radius:7px}.zoom button{border:0;background:transparent;font-size:18px}.zoom #zoom-label{min-width:48px;text-align:center;font-size:12px;color:var(--muted)}@media(max-width:760px){button{font-size:12px;padding:8px}#selection{flex-wrap:wrap;justify-content:center;gap:6px;width:max-content}#edge-label{width:100%;text-align:center}.zoom{right:12px;bottom:12px}}body{height:100dvh;display:flex;flex-direction:column}#save-status{font-size:12px;color:var(--muted);margin-right:8px}.primary{background:var(--accent);color:var(--on-accent);border-color:var(--accent)}.primary:hover{background:var(--text)}.edit-table{cursor:pointer}.edit-table:hover rect{fill:var(--selected)}.edit-table text{font:12px system-ui,sans-serif;fill:var(--muted)}dialog{width:760px;max-width:calc(100vw - 24px);max-height:calc(100dvh - 32px);padding:24px;border:1px solid var(--border);border-radius:10px;color:var(--text);background:var(--surface);overflow:auto}.dialog-heading,.column-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:20px}h2{font-size:19px;margin:0}h3{font-size:15px;margin:0}.dialog-heading button{border:0;font-size:20px}.field{display:flex;flex-direction:column;gap:8px;margin-bottom:24px}.field input{width:100%}input,select{font:inherit;padding:9px 10px;min-width:0;border:1px solid var(--border);border-radius:5px;color:var(--text);background:var(--surface)}input:focus-visible,select:focus-visible{outline:2px solid var(--focus);outline-offset:1px}.column-edit-row{display:grid;grid-template-columns:minmax(130px,1fr) minmax(80px,.7fr) 120px 118px;gap:8px;margin-bottom:10px}.row-actions{display:flex;gap:4px}.row-actions button{padding:8px 7px}.danger,.error,#save-status.error{color:var(--danger)}.error:empty{display:none}.dialog-actions{margin-top:24px;display:flex;gap:8px;align-items:center;flex-wrap:wrap}.dialog-actions>span{flex:1}.explanation{font-size:14px;line-height:1.8;color:var(--muted)}.candidate{display:flex;gap:12px;padding:14px 0;border-bottom:1px solid var(--border);font-family:ui-monospace,monospace;overflow-wrap:anywhere}.candidate input{accent-color:var(--accent);flex-shrink:0}details{margin-top:20px;font-size:13px;line-height:1.8;color:var(--muted)}summary{cursor:pointer}#skipped-list{padding-left:20px}@media(max-width:760px){.column-edit-row{grid-template-columns:minmax(120px,1fr) minmax(90px,1fr)}.column-edit-row select{width:100%}.row-actions{justify-content:flex-end}.column-edit-row{border-bottom:1px solid var(--border);padding-bottom:12px}dialog{padding:18px}.dialog-actions{gap:6px}#save-status{width:100%}#canvas{min-height:200px}}#table-editor{height:min(720px,calc(100dvh - 48px));max-height:calc(100dvh - 48px);overflow:hidden;margin:auto;padding:24px}#table-form{height:100%;display:flex;flex-direction:column;min-height:0}#table-form>.dialog-heading,#table-form>.field,#table-form>.column-heading,#table-form>.dialog-actions,#table-form>.error{flex-shrink:0}#table-form>.field{margin-bottom:18px}#table-form>.column-heading{margin-bottom:6px}#column-count{font-size:13px;font-weight:400;color:var(--muted)}#column-editor{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable;padding:4px 4px 4px 0;overflow-anchor:none}#table-editor .column-edit-row{grid-template-columns:28px minmax(120px,1fr) minmax(80px,.7fr) 120px 48px;position:relative;align-items:center;background:var(--surface)}.reorder-handle{border:0;background:transparent;color:var(--muted);font-size:23px;line-height:1;padding:8px 3px;cursor:grab;touch-action:none;-webkit-user-select:none;user-select:none}.reorder-handle:hover{color:var(--accent)}.reordering{z-index:2;box-shadow:var(--shadow-md);opacity:.92}.reordering .reorder-handle{cursor:grabbing}.column-edit-row.drop-before:before,.column-edit-row.drop-after:after{content:"";position:absolute;left:0;right:0;height:2px;background:var(--accent);pointer-events:none}.column-edit-row.drop-before:before{top:-6px}.column-edit-row.drop-after:after{bottom:-6px}#table-form>.error{max-height:60px;overflow:auto;font-size:13px}#table-form>.dialog-actions{margin-top:18px}@media(max-width:760px){#table-editor{padding:16px;height:calc(100dvh - 24px);max-height:calc(100dvh - 24px);margin:auto}#table-editor .column-edit-row{grid-template-columns:28px minmax(90px,1fr) minmax(85px,.8fr)}#table-editor .reorder-handle{grid-row:1 / 3;align-self:stretch}#table-editor .column-edit-row select{grid-column:2}#table-editor .row-actions{grid-column:3}#table-form>.dialog-actions{margin-top:12px}}.column-type-control{min-width:0;display:flex;flex-direction:column;gap:6px}.column-type-control select,.column-type-control input{width:100%;min-width:0}.column-type-control input[hidden]{display:none}.table-names{display:grid;grid-template-columns:1fr 1fr;gap:14px;flex-shrink:0}.table-names .field{margin-bottom:18px}.column-names{display:flex;flex-direction:column;gap:6px;min-width:0}.column-names input{width:100%;min-width:0}.column-names input+input{font-size:13px}#table-editor .column-edit-row{align-items:start}#table-editor .reorder-handle{align-self:stretch}@media(max-width:760px){.table-names{gap:8px}.table-names input{font-size:13px}#table-editor .column-names{grid-column:2}#table-editor .column-type-control{grid-column:3}}.file-options{position:relative;margin:0;color:var(--text);font-size:14px;line-height:normal}.file-options>summary{list-style:none;padding:8px 12px;border:1px solid var(--border);border-radius:6px;background:var(--surface);white-space:nowrap}.file-options>summary::-webkit-details-marker{display:none}.file-options>summary:after{content:"▾";margin-left:8px;color:var(--muted)}.file-options>summary:hover,.file-options[open]>summary{background:var(--selected)}.file-options>summary:focus-visible{outline:2px solid var(--focus);outline-offset:3px}.file-options-panel{position:absolute;left:0;top:calc(100% + 6px);z-index:5;min-width:160px;padding:4px;border:1px solid var(--border);border-radius:6px;background:var(--surface)}.file-options-panel button{display:block;width:100%;border:0;text-align:left}@media(max-width:760px){.file-options{font-size:12px}.file-options>summary{padding:8px}}.zoom #fit{font-size:12px;border-right:1px solid var(--border);border-radius:0;padding:8px 12px}.history-button{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;padding:7px}.history-button svg{width:20px;height:20px;pointer-events:none}#save-status:empty{display:none}.edge,.edge *{-webkit-tap-highlight-color:transparent}.edge:focus,.edge:focus-visible,.edge *:focus{outline:none}.edge:focus-visible .edge-path{stroke:var(--accent);stroke-width:3;stroke-dasharray:6 3}#root{height:100dvh;display:flex;flex-direction:column;min-height:0}.editor-header{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:20px;padding:10px 20px;flex:none;background:var(--surface);border-bottom:1px solid var(--border)}.editor-header h1{margin:0;font-size:17px;letter-spacing:.02em;white-space:nowrap}.document-menu,.editing-tools,.history-tools{display:flex;align-items:center;gap:8px}.document-menu{gap:16px}.editing-tools{min-width:0}.history-tools{gap:4px;padding-right:12px;margin-right:4px;border-right:1px solid var(--border)}.editor-header .file-options>summary,.editing-tools>button:not(.primary),.history-button{border-color:transparent}.name-display{position:relative;min-width:0;margin:0;padding:0;border:0}.name-display legend{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.name-segments{display:flex;border:1px solid var(--border);border-radius:6px;padding:2px}.name-segments label{position:relative;cursor:pointer}.name-segments input{position:absolute;width:1px;height:1px;padding:0;margin:0;opacity:0}.name-segments span{display:block;padding:6px 10px;border-radius:4px;font-size:12px;color:var(--muted);white-space:nowrap}.name-segments input:checked+span{background:var(--selected);color:var(--text);font-weight:600}.name-segments label:hover span{color:var(--text)}.name-segments input:focus-visible+span{outline:2px solid var(--focus);outline-offset:2px}main{display:flex;flex-direction:column;flex:1;min-height:0}.instruction{display:flex;flex-wrap:wrap;gap:8px 16px;flex:none;color:var(--muted)}.instruction[data-visible=true]{padding:8px 20px}.instruction>span:empty{display:none}#canvas{border-top:0}@media(max-width:960px){.editor-header{grid-template-columns:1fr auto;gap:8px 12px;padding:10px 16px}.editing-tools{grid-row:2;grid-column:1 / -1}.name-display{grid-row:1;grid-column:2}}@media(max-width:480px){.editor-header{padding:8px;gap:8px}.editor-header h1{font-size:15px}.document-menu,.editing-tools{gap:4px}.history-tools{gap:0;margin:0;padding-right:4px}.history-button{width:30px;height:34px;padding:5px}.editing-tools>button{padding:8px 6px}.name-segments span{padding:6px 8px}.instruction[data-visible=true]{padding:8px;font-size:12px}}@media(max-width:360px){.editing-tools>button{font-size:11px}.name-segments span{padding:6px}}#table-editor{--column-grid: 24px minmax(120px, 1fr) minmax(120px, 1fr) minmax(125px, .85fr) 132px 32px;width:920px;height:min(640px,calc(100dvh - 32px));padding:20px;max-height:calc(100dvh - 32px)}#table-form{height:100%;max-height:none}#table-form>.dialog-heading{margin-bottom:12px}#table-form .table-names{gap:20px}#table-form .table-names .field{font-size:13px;margin-bottom:16px}#table-form>.column-heading{margin-bottom:8px}#table-form>.column-labels{display:grid;grid-template-columns:var(--column-grid);gap:8px;padding:0 4px 8px 0;color:var(--muted);font-size:12px;flex-shrink:0;overflow-y:hidden;scrollbar-gutter:stable}.column-labels small{font:inherit}#column-editor{flex:1 1 0;padding:0 4px 0 0;min-height:0;border-top:1px solid var(--border)}#table-editor .column-edit-row{grid-template-columns:var(--column-grid);gap:8px;margin:0;padding:8px 0;border-bottom:1px solid var(--border);align-items:start}#table-editor .column-names{display:contents}#table-editor .column-edit-row input,#table-editor .column-edit-row select{height:36px;padding:6px 8px;font-size:13px;border-color:transparent;background:transparent}#table-editor .column-edit-row input:hover,#table-editor .column-edit-row select:hover{border-color:var(--border)}#table-editor .column-edit-row input:focus,#table-editor .column-edit-row select:focus{background:var(--surface);border-color:var(--border)}#table-editor .column-edit-row input::placeholder{color:var(--muted);font-size:12px}#table-editor .reorder-handle{align-self:start;height:36px;font-size:20px;padding:6px 2px}#table-editor .delete-column{display:inline-flex;align-items:center;justify-content:center;width:32px;height:36px;padding:8px;border-color:transparent;color:var(--muted)}#table-editor .delete-column:hover:not(:disabled){color:var(--danger)}#table-editor .delete-column svg{width:16px;height:16px}#table-editor .row-actions{gap:0}#table-form>.add-column{align-self:flex-start;flex-shrink:0;margin:8px 0 0 24px;padding:8px;border-color:transparent;color:var(--accent);font-size:13px}.add-column:before{content:"+";margin-right:6px}#table-form>.dialog-actions{flex-shrink:0;margin-top:12px;padding-top:12px;border-top:1px solid var(--border)}#table-form>.dialog-actions>.danger{border-color:transparent;font-size:13px}#table-editor .drop-before:before{top:0}#table-editor .drop-after:after{bottom:0}@media(max-width:760px){#table-editor{--column-grid: 24px minmax(90px, 1fr) minmax(105px, .85fr) 32px;padding:16px}#table-form{max-height:none}#table-form .table-names{gap:12px}#table-form>.column-labels{display:none}#table-editor .column-names{display:flex;grid-column:2;grid-row:1 / 3;gap:4px}#table-editor .column-type-control{grid-column:3;grid-row:1}#table-editor .column-edit-row>select{grid-column:3;grid-row:2}#table-editor .reorder-handle{grid-column:1;grid-row:1 / 3;align-self:center}#table-editor .row-actions{grid-column:4;grid-row:1 / 3;align-self:center}#table-editor .column-edit-row{gap:4px}#table-form>.dialog-actions{gap:6px}#table-form>.dialog-actions>.danger{padding:8px 0}}@media(max-width:380px){#table-editor{padding:12px}#table-form{max-height:none}#table-form>.dialog-actions>.danger{font-size:11px}}#table-editor{width:1120px;height:min(780px,calc(100dvh - 32px));overflow:hidden;--column-grid: 24px minmax(100px, 1fr) minmax(100px, 1fr) minmax(110px, .8fr) 48px 42px minmax(150px, 1.15fr) 32px}.table-editor-body{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;padding-right:6px}.table-editor-body .column-heading{margin-bottom:10px}#table-editor .column-labels{display:grid;grid-template-columns:var(--column-grid);gap:8px;padding:6px 0;color:var(--muted);font-size:12px}#table-editor #column-editor{overflow:visible;border-top:1px solid var(--border);padding:0}#table-editor .column-check{display:flex;justify-content:center;align-items:center;min-height:36px;gap:6px}#table-editor .column-check>span{display:none}#table-editor .column-check input[type=checkbox]{appearance:auto;width:16px;height:16px;padding:0;margin:0;accent-color:var(--accent)}.column-references{display:flex;flex-direction:column;align-items:flex-start;min-width:0;padding:4px 0}#table-editor .reference-link{background:transparent;border-color:transparent;padding:3px 0;color:var(--accent);font-size:12px;text-align:left;max-width:100%;overflow-wrap:anywhere}.reference-link small{margin-left:4px;font-size:11px;color:var(--muted)}#table-editor .reference-link:hover:not(:disabled){text-decoration:underline}#table-editor .reference-link:disabled{color:var(--muted)}.table-editor-body>.add-column{margin:8px 0;border-color:transparent;color:var(--accent)}.key-list{margin-top:18px;border-top:1px solid var(--border);padding-top:14px}.definition-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}.definition-heading h3{margin:0;font-size:14px}.key-list table{width:100%;border-collapse:collapse;table-layout:fixed;text-align:left;font-size:13px}.key-list th{color:var(--muted);font-size:12px;font-weight:400}.key-list th,.key-list td{padding:8px;border-bottom:1px solid var(--border);overflow-wrap:anywhere}.key-list th:first-child{width:115px}.key-list th:last-child{width:60px}.empty-definitions{color:var(--muted);font-size:12px}.definition-editor{margin:16px 0 8px;padding:16px;background:var(--selected);border:1px solid var(--border);border-radius:4px}.definition-field{display:flex;flex-direction:column;gap:6px;min-width:0;font-size:12px}.definition-field>select{width:100%;min-width:0}.definition-editor>.definition-field{max-width:360px}.column-picker{display:flex;flex-wrap:wrap;gap:12px 20px;padding:16px 0 8px}.column-picker label{display:flex;align-items:center;gap:6px;font-size:13px;overflow-wrap:anywhere}.column-picker input{width:16px;height:16px;margin:0;accent-color:var(--accent)}.selected-columns{list-style:none;display:flex;flex-wrap:wrap;gap:8px;padding:0;margin:8px 0}.selected-columns li{display:flex;align-items:center;gap:6px;padding:4px 8px;border:1px solid var(--border);background:var(--surface);border-radius:4px;font-size:13px;overflow-wrap:anywhere}.selected-columns button{padding:2px 4px;border:0}.column-order{color:var(--muted);font-size:12px}.definition-name{margin:12px 0;color:var(--muted);font-size:12px}.definition-name summary{cursor:pointer;overflow-wrap:anywhere}.definition-name input{display:block;margin-top:8px;width:min(100%,360px)}.definition-actions{display:flex;gap:8px;align-items:center;margin-top:14px;flex-wrap:wrap}.definition-actions>span{flex:1}.definition-actions>.danger{border-color:transparent}.reference-tables{display:grid;grid-template-columns:minmax(0,1fr) 20px minmax(0,1fr) 28px;gap:12px;align-items:end}.reference-tables strong{overflow-wrap:anywhere;padding-bottom:8px}.definition-editor .target-key-picker{margin:12px 40px 12px auto;width:calc((100% - 84px)/2);max-width:none}.mapping-row{display:grid;grid-template-columns:minmax(0,1fr) 20px minmax(0,1fr) 28px;gap:12px;align-items:center;padding:6px 0}.mapping-row select{width:100%;min-width:0}.mapping-target{font-size:13px;overflow-wrap:anywhere}.mapping-row>button{padding:4px;border-color:transparent}.pending-reference{display:flex;gap:16px;align-items:center;font-size:12px;color:var(--muted)}.definition-error{color:var(--danger);font-size:12px}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.inline-name{background:var(--surface);border:1px solid var(--border);padding:4px;font-size:12px}.inline-name label{display:flex;align-items:center;gap:6px}.inline-name input{width:100%;min-width:0}.inline-name small{display:block}.migration-notice{padding:6px 16px;font-size:12px}.table-title,.column-name{pointer-events:auto;cursor:text}@media(max-width:760px){#table-editor{--column-grid: 22px minmax(0, 1fr) minmax(100px, .8fr) 32px;padding:12px}#table-editor .column-labels{display:none}#table-editor .column-edit-row{row-gap:8px;align-items:start}#table-editor .column-names{display:flex;flex-direction:column;grid-column:2;grid-row:1}#table-editor .column-type-control{grid-column:3;grid-row:1}#table-editor .reorder-handle{grid-column:1;grid-row:1}#table-editor .row-actions{grid-column:4;grid-row:1}#table-editor .column-check>span{display:inline;font-size:12px}#table-editor .column-check{justify-content:flex-start;min-height:28px}#table-editor .primary-check{grid-column:2;grid-row:2}#table-editor .unique-check{grid-column:3;grid-row:2}#table-editor .column-references{grid-column:2 / 4;grid-row:3}.definition-editor{padding:10px}.definition-actions{gap:4px}.reference-tables,.mapping-row{gap:6px}.mapping-row,.reference-tables{grid-template-columns:minmax(0,1fr) 16px minmax(0,1fr) 22px}.definition-editor .target-key-picker{margin-right:28px;width:calc((100% - 56px)/2)}}.cardinality{fill:none;stroke:var(--line);stroke-width:1.7;pointer-events:none}.cardinality circle{fill:var(--bg)}.edge.selected .cardinality,.edge:hover .cardinality,.edge:focus-visible .cardinality{stroke:var(--accent)}.relationship-label{cursor:pointer}.relationship-label rect{fill:var(--bg)}.relationship-label text{font-size:12px;fill:var(--text)}.edge.selected .relationship-label text{fill:var(--accent)}.relationship-fields{border-top:1px solid var(--border);padding-top:14px;margin-top:14px;display:grid;gap:12px}.cardinality-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.cardinality-value{display:grid;gap:4px;color:var(--text)}.cardinality-value>span{overflow-wrap:anywhere}.cardinality-value select{min-width:0;width:100%}#selection button[aria-pressed=true]{background:var(--selected);border-color:var(--accent)}@media(max-width:560px){.cardinality-fields{grid-template-columns:1fr}}.issue-list{max-height:40vh;overflow:auto}.issue-row{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:5px 0}.issue-row>span{flex:1;min-width:180px;overflow-wrap:anywhere}.issue-row button{flex-shrink:0}.reference-impact{margin:6px 0;color:var(--muted);font-size:12px;max-height:18vh;overflow:auto}.reference-impact p{margin:6px 0}@media(max-width:480px){.issue-counts{display:none}}.mono{font-family:var(--mono)}svg.icon,svg.logo-mark,.reorder-handle svg{width:auto;height:auto;flex-shrink:0}.spacer{flex:1}button{display:inline-flex;align-items:center;justify-content:center;gap:6px;height:32px;padding:0 12px;border-color:var(--border);border-radius:6px;font-size:13px;font-weight:500;color:var(--text);transition:background-color .12s,border-color .12s,color .12s}button:hover{background:var(--hover)}button:focus-visible,[tabindex]:focus-visible{outline:2px solid var(--focus);outline-offset:2px}button .icon{flex-shrink:0}.primary{background:var(--accent);border-color:var(--accent);color:var(--on-accent)}.primary:hover{background:var(--accent-strong);border-color:var(--accent-strong)}.danger{color:var(--danger)}.icon-button{width:30px;height:30px;padding:0;border-color:transparent;background:transparent;color:var(--text-2)}.kbd{display:inline-flex;align-items:center;height:18px;padding:0 5px;border:1px solid var(--border);border-radius:4px;background:var(--heading);color:var(--muted);font:500 11px/1 -apple-system,BlinkMacSystemFont,system-ui,sans-serif}input,select{height:32px;padding:0 10px;border-color:var(--border);border-radius:6px;font-size:13px}input::placeholder{color:var(--muted)}input:focus-visible,select:focus-visible,input:focus,select:focus{outline:none;border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-ring)}.editor-header{min-height:48px;padding:0 10px 0 14px;gap:12px}.editor-header h1{display:flex;align-items:center;gap:8px;font-size:14px;font-weight:600;letter-spacing:-.01em}.logo-mark{color:var(--accent)}.document-menu{gap:10px}.file-options>summary{display:inline-flex;align-items:center;height:30px;padding:0 10px;border-color:transparent;font-size:13px;font-weight:500;color:var(--text-2)}.file-options>summary:hover,.file-options[open]>summary{background:var(--hover)}.file-options-panel{min-width:180px;max-height:calc(100dvh - 52px);overflow-y:auto;padding:4px;border-radius:8px;box-shadow:var(--shadow-md)}@media(max-width:480px){.file-options-panel{right:0;left:auto}}.file-options-panel button{display:flex;justify-content:flex-start;width:100%;height:30px;padding:0 10px}.save-indicator{display:inline-flex;align-items:center;gap:6px;font-size:12px;color:var(--muted);white-space:nowrap}.save-indicator.error{color:var(--danger)}.editing-tools{gap:4px}.editing-tools>button{height:30px;padding:0 10px}.editing-tools>button:not(.primary){background:transparent;color:var(--text-2)}.editing-tools>button:not(.primary):hover:not(:disabled){background:var(--hover);color:var(--text)}.history-tools{gap:2px;padding-right:8px;margin-right:4px}.history-button{width:30px;height:30px;padding:6px;background:transparent;color:var(--text-2)}.history-button svg{width:17px;height:17px}.name-segments{padding:2px;border:0;border-radius:7px;background:var(--hover)}.name-segments span{padding:5px 10px;border-radius:5px;font-weight:500}.name-segments input:checked+span{background:var(--surface);color:var(--text);font-weight:500;box-shadow:var(--shadow-sm)}.workspace{display:flex;flex:1;min-height:0;position:relative}#canvas{flex:1;min-width:0;border:0;background:var(--bg)}.sidebar{display:flex;flex-direction:column;flex:none;min-height:0;background:var(--surface)}.sidebar{width:232px;padding:10px 8px;gap:2px;border-right:1px solid var(--border);overflow:auto}.sidebar-search{display:flex;align-items:center;gap:8px;height:30px;padding:0 10px;margin:0 2px 6px;border:1px solid var(--border);border-radius:6px;color:var(--muted)}.sidebar-search:focus-within{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-ring)}.sidebar-search input{flex:1;height:28px;padding:0;border:0;background:transparent;box-shadow:none!important}.search-match{display:block;overflow:hidden;text-overflow:ellipsis;color:var(--muted);font-size:11px}.sidebar-item:has(.search-match){height:42px;text-align:left}.related-toggle{position:absolute;top:12px;left:12px;background:var(--surface)}.related-toggle:has(~#selection:not([hidden])){top:auto;bottom:64px}.related-toggle[aria-pressed=true]{border-color:var(--accent);color:var(--accent-strong)}.sidebar-section{display:flex;align-items:center;justify-content:space-between;padding:12px 10px 4px}.sidebar-section h2{margin:0;font-size:11px;font-weight:600;letter-spacing:.04em;color:var(--muted)}.sidebar-section h2 span{font-weight:500;margin-left:2px}.sidebar-section .icon-button{width:22px;height:22px}.sidebar-list{list-style:none;margin:0;padding:0}.sidebar-item{justify-content:flex-start;width:100%;height:30px;padding:0 10px;border-color:transparent;background:transparent;color:var(--text-2);font:500 12.5px var(--mono)}.sidebar-item .icon{color:var(--muted)}.sidebar-item[aria-current]{background:var(--selected);color:var(--accent-strong)}.sidebar-item[aria-current] .icon{color:var(--accent)}.sidebar-name{min-width:0;overflow:hidden;text-overflow:ellipsis}.sidebar-count{margin-left:auto;font:500 11px -apple-system,system-ui,sans-serif;color:var(--muted)}.sidebar-item.relation{font-size:11.5px;gap:4px}.sidebar-item .arrow{color:var(--muted);flex-shrink:0}.sidebar-empty{padding:6px 10px;font-size:12px;color:var(--muted)}.ddl{margin:0;padding:12px;overflow:auto;border:1px solid var(--border-soft);border-radius:8px;background:var(--surface);color:var(--text);font:11.5px/1.65 var(--mono);white-space:pre;tab-size:2}.grid-dot{fill:var(--grid-dot)}.table-box{fill:var(--surface);stroke:var(--shape-line);stroke-width:1;filter:drop-shadow(0 2px 4px var(--shadow-color))}.table-heading path{fill:var(--heading)}.table-divider{stroke:var(--border-soft)}.table-title{font:600 15px var(--mono);fill:var(--text)}.column-name{font:500 13.5px var(--mono);fill:var(--text)}.column-type{font:400 12px var(--mono);fill:var(--muted)}.column-key rect{fill:var(--hover)}.column-key text{font:600 10px var(--mono);fill:var(--text-2)}.column-key.pk rect,.column-key.pkfk rect{fill:var(--pk-bg)}.column-key.pk text{fill:var(--pk)}.column-key.fk rect{fill:var(--fk-bg)}.column-key.fk text,.column-key.pkfk text{fill:var(--fk)}.row:hover .row-bg,.row.pending .row-bg{fill:var(--hover)}.row.related .row-bg{fill:var(--selected)}.row.pending .row-bg{fill:var(--selected);stroke:var(--accent);stroke-width:1.5}.row[data-search-match] .column-name,.row.pending .column-name{fill:var(--accent-strong);font-weight:600}.table.selected .table-box{stroke:var(--accent);stroke-width:1.5;filter:drop-shadow(0 0 3px var(--accent-ring)) drop-shadow(0 8px 18px var(--shadow-color))}.table.selected .table-heading path{fill:var(--selected)}.edit-table{opacity:0;transition:opacity .12s}.table:hover .edit-table,.table.selected .edit-table,.edit-table:focus-visible{opacity:1}.edit-table rect{fill:transparent}.edit-table:hover rect{fill:var(--hover)}.edit-dot{fill:var(--text-2)}.edge-path{stroke:var(--line);stroke-width:1.5}.edge:hover .edge-path,.edge.related .edge-path{stroke:var(--accent)}.edge.selected .edge-path{stroke:var(--accent);stroke-width:2.25}.cardinality{stroke-width:1.5}.edge.related .cardinality{stroke:var(--accent)}.relationship-label rect{fill:var(--surface);stroke:var(--border)}.relationship-label text{font:500 11.5px var(--mono);fill:var(--text-2)}#selection{top:14px;padding:6px 6px 6px 12px;gap:4px;border-radius:10px;box-shadow:var(--shadow-md)}#edge-label{margin-right:6px;font:500 12px var(--mono);color:var(--text-2)}#selection button{height:28px;padding:0 10px;border-color:transparent;background:transparent;font-size:12px}#selection button:hover:not(:disabled){background:var(--hover)}#selection button[aria-pressed=true]{background:var(--selected);color:var(--accent-strong)}.zoom{bottom:16px;right:16px;gap:2px;padding:3px;border-radius:8px;box-shadow:var(--shadow-md)}.zoom button{height:30px;min-width:30px;padding:0 8px;font-size:12px;color:var(--text-2)}.zoom #fit{padding:0 10px 0 8px;border-right:1px solid var(--border-soft);border-radius:6px 0 0 6px}.zoom #zoom-label{min-width:52px;font-family:var(--mono)}.instruction[data-visible=true]{padding:8px 16px;font-size:12px;background:var(--heading);border-bottom:1px solid var(--border-soft)}.inline-name{border-radius:6px;box-shadow:var(--shadow-md);pointer-events:auto}.inline-name label{white-space:nowrap}.inline-add-column{width:100%;justify-content:flex-start;padding-inline:8px;border:0;background:var(--heading);color:var(--accent-strong)}.inline-name.adding-column{padding:0;border:0;box-shadow:none}.adding-column small{margin-top:3px;color:var(--muted)}.inline-name small.error{color:var(--danger)}dialog{border:0;border-radius:12px;box-shadow:var(--shadow-lg)}dialog::backdrop{background:var(--backdrop)}.dialog-heading{justify-content:flex-start;gap:10px;color:var(--accent)}.dialog-heading h2{font-size:15px;font-weight:600;color:var(--text)}.dialog-heading>button:last-child{margin-left:auto}.dialog-subject{height:22px;padding:0 8px;border-radius:5px;background:var(--hover);color:var(--text-2);font-size:12px;line-height:22px}.dialog-heading .kbd{margin-left:auto}.dialog-heading .kbd+.icon-button{margin-left:0}#table-editor{width:1160px;height:min(760px,calc(100dvh - 32px));padding:0}#table-form>.dialog-heading{height:56px;margin:0;padding:0 12px 0 20px;border-bottom:1px solid var(--border-soft)}.editor-layout{display:flex;flex:1;min-height:0}.editor-main{display:flex;flex-direction:column;flex:1;min-width:0;padding:16px 12px 0 20px}#table-form .table-names .field{gap:6px;font-size:12px;font-weight:500;color:var(--text-2)}.table-editor-body .column-heading h3{font-size:13px}#table-editor .column-edit-row{padding:6px 0;border-bottom-color:var(--border-soft)}#table-editor .column-edit-row:hover{background:var(--heading)}#table-editor .column-edit-row input,#table-editor .column-edit-row select{height:32px;font-size:13px}#table-editor .column-edit-row input[aria-label$=の物理名],#table-editor .column-edit-row select,#table-editor .column-type-control input{font-family:var(--mono)}#table-editor .column-edit-row input::placeholder{color:var(--muted)}#table-editor .column-edit-row input:focus,#table-editor .column-edit-row select:focus{border-color:var(--accent)}#table-editor .reorder-handle{height:32px;padding:0 4px;border-color:transparent;background:transparent;color:var(--muted)}#table-editor .reorder-handle:hover{color:var(--text-2)}#table-editor .column-check{position:relative;min-height:32px}#table-editor .column-check>span{display:inline-flex;align-items:center;justify-content:center;width:30px;height:22px;border:1px solid var(--border);border-radius:4px;background:var(--surface);color:var(--muted);font:600 10px var(--mono);cursor:pointer}#table-editor .column-check input[type=checkbox]{position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:pointer}#table-editor .primary-check:has(input:checked)>span{background:var(--pk-bg);border-color:var(--pk-border);color:var(--pk)}#table-editor .unique-check:has(input:checked)>span{background:var(--uq-bg);border-color:var(--uq-border);color:var(--uq)}#table-editor .column-check:has(input:focus-visible)>span{outline:2px solid var(--focus);outline-offset:2px}#table-editor .column-check:has(input:disabled)>span{opacity:.45;cursor:default}#table-editor .column-references .reference-link{height:24px;padding:0 8px;margin:2px 0;border-radius:5px;background:var(--fk-bg);color:var(--fk);font:500 12px var(--mono)}#table-editor .column-references .reference-link.add-reference{background:transparent;color:var(--muted);font-family:inherit}#table-editor .column-references .reference-link.add-reference:hover:not(:disabled){background:var(--hover);color:var(--text);text-decoration:none}.table-editor-body>.add-column,#table-form>.add-column{height:30px;color:var(--text-2)}.table-editor-body>.add-column:hover{background:var(--hover)}.key-list .reference-link,.pending-reference .reference-link{height:26px;padding:0 8px;color:var(--accent)}.definition-editor{border-radius:8px;background:var(--heading);border-color:var(--border)}#table-form>.reference-impact,#table-form>.error{margin:6px 20px 0}#table-form>.dialog-actions{margin:12px 0 0;padding:12px 16px 12px 12px;border-top:1px solid var(--border-soft)}#table-form>.dialog-actions>.danger{background:transparent}#infer-dialog{width:640px;padding:20px}#infer-dialog .candidate{font-family:var(--mono);font-size:12.5px;border-bottom-color:var(--border-soft)}#infer-dialog .dialog-heading h2{margin-right:auto}#help-dialog,#sample-dialog{width:560px;padding:20px}#help-dialog .dialog-heading h2,#sample-dialog .dialog-heading h2{margin-right:auto}#help-dialog .explanation{margin:0;font-size:13px}#help-dialog dl{margin:0 0 16px;font-size:12.5px}#help-dialog dl>div{display:grid;grid-template-columns:1fr 1fr;gap:16px;padding:9px 0;border-bottom:1px solid var(--border-soft)}#help-dialog dd{margin:0;color:var(--muted)}#help-dialog .dialog-actions{margin-top:16px}.sample-list{margin:0;padding:0;list-style:none}.sample-list button{display:flex;flex-direction:column;align-items:flex-start;gap:2px;width:100%;height:auto;padding:10px 12px;border:0;border-radius:8px;text-align:left}.sample-list button:hover{background:var(--hover)}.sample-list span{font-size:12px;color:var(--muted)}.file-options-panel hr{margin:4px 0;border:0;border-top:1px solid var(--border-soft)}.file-options-panel .kbd{margin-left:auto}.empty-diagram{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:min(600px,calc(100% - 32px));text-align:center}.empty-diagram h2{margin:0 0 16px;font-size:18px;font-weight:600}.empty-actions{display:flex;flex-wrap:wrap;gap:8px;justify-content:center}.empty-actions .kbd{margin-left:2px;background:transparent;border-color:currentColor;color:inherit}@media(max-width:960px){.sidebar{position:absolute;z-index:3;top:0;left:0;max-height:65%;border-bottom:1px solid var(--border);box-shadow:var(--shadow-md)}.editor-header{padding:8px 12px}}@media(max-width:760px){.save-indicator{display:none}.editor-main{padding:12px 12px 0}}@media(max-width:480px){.editing-tools{min-width:0;overflow-x:auto;scrollbar-width:none}.editing-tools>button{padding:0 8px;gap:4px}.editing-tools>button:not(.primary) .icon{display:none}}@media(max-width:420px){.editing-tools>button{padding-inline:5px}.editing-tools .primary .icon{display:none}}.connect-hint{position:absolute;top:14px;left:50%;transform:translate(-50%);display:flex;align-items:center;gap:6px;max-width:calc(100% - 24px);padding:8px 12px;border-radius:10px;background:var(--text);color:var(--surface);font-size:12.5px;box-shadow:var(--shadow-md);pointer-events:none}.connect-hint .mono{color:var(--hint-accent);font-weight:600}.connect-hint .kbd{margin-left:6px;background:transparent;border-color:currentColor;color:inherit}.connect-hint-note{margin-left:-2px;color:inherit}@media(max-width:560px){.connect-hint{flex-wrap:wrap;justify-content:center;width:max-content}}.row{cursor:default}.port{opacity:0;fill:var(--surface);stroke:var(--muted);stroke-width:1.5;pointer-events:none;transition:opacity .1s}.port-hit{fill:transparent;cursor:crosshair}.row:hover .port,.linking .row .port{opacity:1}.row g:hover .port{fill:var(--accent);stroke:var(--accent)}.row.link-end .row-bg{fill:var(--selected);stroke:var(--accent);stroke-width:1.5}.link-preview{fill:none;stroke:var(--accent);stroke-width:1.75;stroke-dasharray:4 4;pointer-events:none}.link-preview.ready{stroke-dasharray:none}.linking,.linking *{cursor:crosshair!important}#diagram [tabindex]:focus:not(:focus-visible){outline:none}.value-constraints .check-fields{display:grid;grid-template-columns:minmax(8em,1fr) minmax(14em,2fr) auto;align-items:end;gap:8px;margin-top:8px}.value-constraints textarea{min-width:0}.value-constraints td:last-child{width:60px}.value-constraints td{overflow-wrap:anywhere}.value-constraints .enum-editor{display:grid;gap:10px}.enum-value,.enum-actions{display:flex;gap:6px}.enum-actions{justify-content:flex-end}@media(max-width:650px){.value-constraints .check-fields{grid-template-columns:minmax(0,1fr)}.check-fields>button{justify-self:end}}.ddl-section{margin:16px 0 12px;color:var(--text-2)}.ddl-section summary{font-size:13px;font-weight:600;color:var(--text)}.ddl-section summary span{margin-left:6px;font-size:11.5px;font-weight:400;color:var(--muted)}.ddl-section .ddl{margin-top:8px;background:var(--heading)}.sidebar-toggle[aria-pressed=true]{background:var(--hover);color:var(--text)}@media(max-width:480px){#help-dialog dl>div{grid-template-columns:1fr;gap:2px}}.document-identity{display:flex;align-items:center;gap:6px;min-width:0}.document-menu{min-width:0}.diagram-list{width:min(590px,calc(100vw - 32px))}.diagram-list .dialog-heading>.icon-button{margin-left:0}.diagram-list .diagram-link{height:auto;border-color:transparent}@media(max-width:760px){.document-identity{flex-direction:column;align-items:flex-start;gap:0}.document-menu{gap:4px}.document-menu:has(.save-indicator){flex-wrap:wrap}.document-identity .document-title{max-width:100%}.document-identity .document-title input{text-overflow:ellipsis;padding:3px 4px}}@media(max-width:480px){.editor-header{padding:6px 8px;column-gap:4px}.document-menu{gap:2px}.document-menu .file-options>summary{padding-inline:4px}.document-identity h1{font-size:13px;gap:4px}.editor-header .name-segments span{padding-inline:6px}}.table-note{margin-bottom:12px;font-size:12px;color:var(--text-2)}.table-note summary{cursor:pointer;width:fit-content}.table-note textarea,.value-constraints textarea,.column-details textarea{width:100%;box-sizing:border-box;font:inherit;resize:vertical;color:var(--text);background:var(--surface);border:1px solid var(--border);border-radius:5px;padding:6px 8px}.table-note textarea{margin-top:6px}.column-details{grid-column:2 / -1;display:grid;grid-template-columns:1fr minmax(140px,.65fr) 1.5fr;gap:12px;padding:4px 0 8px;align-items:start}#table-editor .row-actions{display:flex;align-items:center}#table-editor .detail-toggle{width:auto;padding:0 4px;font-size:12px;white-space:nowrap}#table-editor .nn-check:has(input:checked)>span{color:var(--text);background:var(--hover);border-color:var(--muted)}#edge-label{white-space:normal;overflow-wrap:anywhere}.column-marks{font:10px var(--mono);fill:var(--text-2)}#selection{width:max-content}.edge-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:3px}@media(max-width:760px){.edge-actions{justify-content:center}}@media(min-width:761px){#table-editor{--column-grid: 20px minmax(76px, 1fr) minmax(76px, 1fr) minmax(95px, .85fr) 40px 30px 28px minmax(76px, 1fr) 70px}}@media(max-width:760px){#table-editor .nn-check{grid-column:2;grid-row:3}#table-editor .column-references{grid-column:3 / 5;grid-row:3}#table-editor .row-actions{flex-direction:column}.column-details{grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-row:4}.column-note{grid-column:1 / -1}}.group-border{fill:none;stroke:var(--muted);stroke-dasharray:5 4;stroke-width:1;pointer-events:none}.group-heading{cursor:grab}.group-heading:active{cursor:grabbing}.group-heading text{fill:var(--text-2);font-size:14px}.table-schema{fill:var(--text-2);font:11px var(--mono)}.table-appearance{display:flex;flex-wrap:wrap;gap:8px 16px;margin:0 0 10px}.table-appearance label{display:flex;align-items:center;gap:6px;color:var(--text-2);font-size:12px}.table-appearance input{width:11em}#group-dialog{width:min(380px,calc(100vw - 24px))}#group-dialog form{display:flex;flex-direction:column;max-height:80dvh}.group-fields{padding:16px;overflow:auto}.group-fields fieldset{border:none;margin:12px 0 0;padding:0}.group-fields fieldset input{width:14px;height:14px;padding:0;margin:0;accent-color:var(--accent)}.group-fields fieldset label{display:flex;align-items:center;gap:8px;padding:4px 0;overflow-wrap:anywhere}.group-fields small{color:var(--muted)}@media(pointer:coarse){button,.file-options>summary,input:not([type=checkbox],[type=radio],[type=color]),select,.name-segments span{min-height:40px}.name-segments span{display:inline-flex;align-items:center}.icon-button,.history-button,.zoom button,#table-editor .reorder-handle,#table-editor .row-actions button{min-width:40px}#table-editor .column-check{min-height:40px}.table.selected .port{opacity:1}.table.selected .port-hit{r:max(10px,calc(12 * var(--screen-px)))}.edit-table rect{--hit: max(28px, calc(40 * var(--screen-px)));x:calc(-.5 * var(--hit));y:calc(-.5 * var(--hit));width:var(--hit);height:var(--hit)}}@media(pointer:coarse)and (min-width:761px){#table-editor{--column-grid: 40px minmax(70px, 1fr) minmax(70px, 1fr) minmax(85px, .85fr) 40px 40px 40px minmax(70px, 1fr) 86px}}@media(pointer:coarse)and (max-width:760px){#table-editor{--column-grid: 40px minmax(0, 1fr) minmax(90px, .8fr) 40px}}.canvas-sources{display:flex;align-items:baseline;flex:none;gap:12px;padding:5px 16px;overflow-x:auto;white-space:nowrap;background:var(--surface);color:var(--muted);border-bottom:1px solid var(--border);font-size:12px}.canvas-sources a{color:var(--accent);text-underline-offset:2px}.column-name.missing-name{fill:var(--muted);font-style:italic}.missing-count{color:var(--muted);font-size:12px;margin:0 12px 8px}#table-editor .column-labels{white-space:nowrap}.ddl-destination small{color:var(--muted);flex-basis:100%}.candidate .type-change{display:block;color:var(--muted)}.document-title{margin:0;min-width:0}.document-title>span{position:absolute;width:1px;height:1px;clip-path:inset(50%);overflow:hidden}.document-title input{width:22ch;max-width:100%;border-color:transparent;font-size:14px;font-weight:600;background:transparent;padding:5px 6px}.document-title input:hover{border-color:var(--border)}.diagram-list .dialog-heading{gap:6px}.diagram-list h2{margin-right:auto}.list-hint{color:var(--muted);font-size:12px}.list-recovery{display:flex;flex-wrap:wrap;gap:6px;padding:10px 0;border-top:1px solid var(--border)}.list-recovery p{width:100%;margin:0;overflow-wrap:anywhere}.diagram-list ul{list-style:none;padding:0;margin:16px 0 0}.diagram-list li{border-top:1px solid var(--border)}.diagram-row,.row-actions{display:flex;align-items:center;gap:8px}.diagram-link{flex:1;min-width:0;display:grid;justify-content:start;gap:4px;padding:10px 6px;text-align:left;white-space:normal;overflow-wrap:anywhere}.diagram-link span,.row-toggle{font-size:12px;color:var(--muted)}.diagram-link strong{color:var(--accent)}.current-diagram{white-space:nowrap}.diagram-link:hover strong,.diagram-link:focus-visible strong{text-decoration:underline}.row-actions{flex-wrap:wrap;justify-content:flex-end;padding:0 0 8px}.row-actions .field,.row-actions p{width:100%;margin:0;overflow-wrap:anywhere}.row-actions button,.diagram-list .secondary{font-size:13px}.diagram-list .delete-diagram,.list-error{color:var(--danger)}@media(max-width:760px){.document-title input{width:14ch}}@media(pointer:coarse){.document-title input{font-size:16px}}main.missing-diagram{display:block;height:auto;margin:4rem auto;padding:1rem;max-width:32rem}.missing-diagram h1{font-size:1.3rem}.missing-diagram a{color:var(--accent)}.file-dialog{box-sizing:border-box;width:min(540px,calc(100vw - 24px));max-height:calc(100dvh - 24px);overflow:auto;padding:20px;border:1px solid var(--border);border-radius:8px;background:var(--surface);color:var(--text);font:inherit;font-size:14px}.file-dialog .dialog-heading,.file-dialog .source-row,.file-dialog .dialog-actions,.file-dialog .export-format{display:flex;align-items:center;justify-content:space-between;gap:8px}.file-dialog .dialog-heading{margin-bottom:16px}.file-dialog .dialog-heading h2{margin:0;font-size:18px}.file-dialog button,.file-dialog select{font:inherit}.file-dialog button{padding:5px 12px}.file-dialog .source-row{margin-bottom:6px}.file-dialog textarea,.file-dialog select{box-sizing:border-box;padding:7px;background:var(--surface);color:inherit;border:1px solid var(--border);border-radius:4px}.file-dialog textarea{width:100%;min-height:6em;resize:vertical;font:14px/1.5 monospace}.file-dialog .export-format{justify-content:flex-start}.file-dialog .export-format select{flex:1}.file-dialog fieldset{border:0;margin:14px 0;padding:0}.file-dialog legend{margin-bottom:4px}.file-dialog fieldset label{display:inline-flex;align-items:center;gap:4px;margin:2px 16px 2px 0}.file-dialog fieldset small{display:block}.file-dialog .file-format,.file-dialog small{font-size:12px;overflow-wrap:anywhere}.file-dialog .import-issues{max-height:20dvh;overflow:auto;overflow-wrap:anywhere;white-space:pre-line}.file-dialog .dialog-actions{justify-content:flex-end;margin-top:18px}.file-dialog .export-setting{display:flex;align-items:center;gap:8px;margin:12px 0 0;font-size:13px}.file-dialog .export-setting input,.file-dialog fieldset input{margin:0;accent-color:var(--accent)}.file-dialog .export-setting select{flex:1;min-width:0}.file-dialog .dialog-heading button{min-width:30px;min-height:30px;padding:0}.file-dialog .dialog-actions button:not(.primary),.file-dialog .source-row button{border:1px solid var(--border);border-radius:5px}.file-dialog button:focus-visible,.file-dialog select:focus-visible,.file-dialog textarea:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
