.nos-editor{display:flex;flex-direction:column;gap:12px;min-height:0;color:var(--text-primary,#1c315b)}
.nos-editor>header{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.nos-editor h3{margin:0}.nos-editor header>input{flex:1;min-width:180px}.nos-editor .standard-command-set{display:flex;gap:8px;flex-wrap:wrap}
.nos-editor input:not([type=checkbox]),.nos-editor select,.nos-editor textarea{border:1px solid #ccd7df;border-radius:10px;background:var(--surface,#fff);color:inherit;padding:8px;max-width:100%;min-width:0;box-sizing:border-box}.nos-editor input[type=color]{height:36px;padding:4px}.nos-editor input[type=checkbox]{accent-color:#50999a;width:18px;height:18px}
.nos-toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:8px}.nos-toolbar>span{margin-left:auto;color:#557779;font-size:12px}
.nos-workspace{display:grid;grid-template-columns:200px minmax(240px,1fr) 230px;gap:14px;min-height:430px;height:56vh;max-height:680px}.nos-layers,.nos-properties{overflow:auto;border:1px solid #d8e0e4;border-radius:14px;padding:12px;background:var(--surface,#fff)}.nos-workspace h4{margin:0 0 12px}
.nos-layers>div{display:flex;gap:6px;align-items:center;margin:5px 0}.nos-layers button{flex:1;text-align:left;border:1px solid #d8e0e4;border-radius:8px;padding:8px;background:transparent;color:inherit;font-size:12px;overflow:hidden}.nos-layers button.selected{border-color:#7462da;background:#f1eefc}.nos-stage{overflow:auto;background:#e8eef2;border:1px solid #d8e0e4;border-radius:16px;padding:22px;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:12px;min-width:0}.nos-stage>svg{background:white;box-shadow:0 8px 20px #182d4920;width:100%;max-height:90%;flex:none;touch-action:none}.nos-stage>small{color:#47616f}.nos-properties label{display:flex;flex-direction:column;gap:5px;font-size:12px;font-weight:600;margin-bottom:10px}.nos-properties textarea{min-height:70px}.nos-help{margin:0;color:#687c88;font-size:12px}.nos-editor button:disabled{opacity:.5;cursor:default}
@media(max-width:950px){.nos-workspace{grid-template-columns:150px minmax(200px,1fr) 190px;gap:8px}.nos-stage{padding:8px}}
@media(max-width:700px){.nos-workspace{display:flex;flex-wrap:wrap;height:auto;max-height:none}.nos-stage{order:-1;width:100%;min-height:200px}.nos-layers,.nos-properties{flex:1;max-height:320px;min-width:150px}}
/* The editor owns the dialog frame; only its three working panes scroll. */
.nos-editor>header>.standard-command-set{margin-left:auto;justify-content:flex-end}
.nos-stage{display:grid;grid-template-rows:minmax(0,1fr) auto;justify-content:stretch;align-items:stretch;overflow:hidden}
.nos-paper-viewport{display:flex;justify-content:center;align-items:center;overflow:auto;min-width:0;min-height:0;scrollbar-gutter:stable}
.nos-page-stage .nos-paper-viewport{align-items:flex-start}
.nos-paper-viewport>svg{background:white;box-shadow:0 8px 20px #182d4920;flex:none;touch-action:none;max-width:none;max-height:none}
.nos-stage>small{text-align:center}
.od-library:has(.nos-editor){inset:0;width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;margin:0;padding:14px;box-sizing:border-box;border-radius:0;overflow:hidden;display:flex;flex-direction:column}
.od-library:has(.nos-editor)>header,.od-library:has(.nos-editor)>.od-notice,.od-library:has(.nos-editor) .od-layout>nav{display:none}
.od-library:has(.nos-editor) .od-layout{display:flex;flex:1;min-height:0;margin:0;overflow:hidden}
.od-library:has(.nos-editor) .od-content{display:flex;flex-direction:column;flex:1;min-width:0;min-height:0;overflow:hidden}
.od-library .nos-editor{flex:1;min-width:0;min-height:0;overflow:hidden;gap:10px}
.od-library .nos-editor>header{flex:none;padding:0 0 10px;border-bottom:1px solid #d8e0e4;gap:10px}
.od-library .nos-editor h3{font-size:20px;line-height:1.2}
.od-library .nos-editor header>input{width:auto;flex:1 1 200px;max-width:400px}
.od-library .nos-toolbar{flex:none}
.od-library .nos-toolbar>select{width:auto;flex:0 1 240px;height:38px}
.od-library .nos-workspace{flex:1;min-height:0;height:auto;max-height:none;grid-template-columns:220px minmax(240px,1fr) 250px}
.od-library .nos-layers,.od-library .nos-properties{min-height:0;min-width:0;overscroll-behavior:contain}
.od-library .nos-stage{min-height:0}
.od-library .nos-help{flex:none}
@media(max-width:950px){.od-library .nos-workspace{grid-template-columns:170px minmax(190px,1fr) 210px}.od-library .nos-editor>header{gap:6px}.od-library .nos-editor h3{font-size:18px}}
@media(max-width:700px){.od-library:has(.nos-editor){padding:8px}.od-library .nos-workspace{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:minmax(180px,1fr) minmax(150px,1fr);overflow:auto}.od-library .nos-stage{grid-column:1/-1;width:auto;min-height:0}.od-library .nos-layers,.od-library .nos-properties{max-height:none;min-width:0}.od-library .nos-toolbar>select{flex:1 1 140px}.od-library .nos-editor header>input{max-width:none}.od-library .nos-help{display:none}}
